polpo 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs +1 -1
- package/dist/components.css +1 -1
- package/dist/components.d.cts +36 -35
- package/dist/components.d.ts +36 -35
- package/dist/components.js +1 -1
- package/package.json +2 -2
package/dist/components.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var Yr=Object.create;var Ge=Object.defineProperty;var _r=Object.getOwnPropertyDescriptor;var jr=Object.getOwnPropertyNames;var Wr=Object.getPrototypeOf,Xr=Object.prototype.hasOwnProperty;var Qr=(e,o)=>{for(var t in o)Ge(e,t,{get:o[t],enumerable:!0})},at=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of jr(o))!Xr.call(e,n)&&n!==t&&Ge(e,n,{get:()=>o[n],enumerable:!(r=_r(o,n))||r.enumerable});return e};var Co=(e,o,t)=>(t=e!=null?Yr(Wr(e)):{},at(o||!e||!e.__esModule?Ge(t,"default",{value:e,enumerable:!0}):t,e)),Zr=e=>at(Ge({},"__esModule",{value:!0}),e);var jn={};Qr(jn,{Accordion:()=>qr,AccordionItem:()=>ln,ActionModal:()=>Ee,AsideModal:()=>vn,Backdrop:()=>Yo,Badge:()=>cn,BadgeRounded:()=>Bt,Button:()=>Do,Checkbox:()=>he,ClickToCopy:()=>Hn,ConfirmationModal:()=>yn,Cursor:()=>pn,DatePicker:()=>$o,Field:()=>H,FieldOrientation:()=>zo,FieldVariant:()=>Ho,FlipCard:()=>en,HoverCard:()=>sn,Image:()=>$n,InfinityScroll:()=>Qo,Input:()=>Bo,InputColor:()=>_o,InputFile:()=>jo,InputNumber:()=>Wo,InputPassword:()=>Uo,Line:()=>Oe,LineOrientation:()=>dt,LineStyle:()=>mt,Menu:()=>q,Modal:()=>Z,ModalBackdrop:()=>qt,Portal:()=>Vo,Radio:()=>Xo,Ripple:()=>ge,Select:()=>me,SlideCard:()=>Ro,Slider:()=>Ko,SmartTable:()=>Gn,Switch:()=>et,Tabs:()=>Le,Textarea:()=>Jo,Tooltip:()=>Ie,Typography:()=>R,useAccordionItem:()=>wo});module.exports=Zr(jn);var K=require("react");var it=require("clsx"),st=require("tailwind-merge"),h=(...e)=>(0,st.twMerge)((0,it.clsx)(e));var Ce=(e,o=2)=>{if(e===0)return"0 Bytes";let t=1e3,r=o<0?0:o,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,a)).toFixed(r))+" "+n[a]};var lt=({c:e,m:o,offset:t,position:r})=>{let n=e.y+e.h+t,a=e.x-(o.w-e.w)*(50/100);switch(r){case"top":case"top center":n=e.y-o.h-t,a=e.x-(o.w-e.w)/2;break;case"top left":n=e.y-o.h-t,a=e.x-o.w+e.w;break;case"top right":n=e.y-o.h-t,a=e.x;break;case"bottom":case"bottom center":n=e.y+e.h+t,a=e.x-(o.w-e.w)/2;break;case"bottom left":n=e.y+e.h+t,a=e.x-o.w+e.w;break;case"bottom right":n=e.y+e.h+t,a=e.x;break;case"left":case"left center":n=e.y-(o.h-e.h)/2,a=e.x-o.w-t;break;case"left top":n=e.y-o.h+e.h,a=e.x-o.w-t;break;case"left bottom":n=e.y,a=e.x-o.w-t;break;case"right":case"right center":n=e.y-(o.h-e.h)/2,a=e.x+e.w+t;break;case"right top":n=e.y-o.h+e.h,a=e.x+e.w+t;break;case"right bottom":n=e.y,a=e.x+e.w+t;break}return{left:Math.round(a),top:Math.round(n)}},Kr=({top:e,left:o},t,r,n)=>{let a=t.split(" "),i=[],s=o+n.w+r-window.innerWidth,l=e+n.h+r-window.innerHeight;for(let c of a)c==="top"&&e<r?i.push("bottom"):c==="left"&&o<r?i.push("right"):c==="bottom"&&l>0?i.push("top"):c==="right"&&s>0?i.push("left"):i.push(c);return i.join(" ")},Jr=({top:e,left:o},t,r)=>{let n=o+t.w+r-window.innerWidth,a=e+t.h+r-window.innerHeight;return o=n>0?o-n:o,e=a>0?e-a:e,o=o<r?r:o,e=e<r?r:e,{top:e,left:o}},ct=({c:e,m:o,offset:t,windowOffset:r,position:n})=>{let a={c:e,m:o,offset:t,position:n},i=lt(a),s=Kr(i,n,r,o);s!==n&&(i=lt({...a,position:s}));let l=Jr(i,o,r);return{left:`${l.left}px`,top:`${l.top}px`}};var pt=({position:e,windowOffset:o})=>{switch(e){case"center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case"top":case"top center":return{top:`${o}px`,left:"50%",transform:"translateX(-50%)"};case"top left":case"left top":return{top:`${o}px`,left:`${o}px`};case"top right":case"right top":return{top:`${o}px`,right:`${o}px`};case"bottom":case"bottom center":return{bottom:`${o}px`,left:"50%",transform:"translateX(-50%)"};case"left bottom":case"bottom left":return{bottom:`${o}px`,left:`${o}px`};case"right bottom":case"bottom right":return{bottom:`${o}px`,right:`${o}px`};case"left":case"left center":return{top:"50%",left:`${o}px`,transform:"translateY(-50%)"};case"right":case"right center":return{top:"50%",right:`${o}px`,transform:"translateY(-50%)"}}return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"}};var ut=require("react/jsx-runtime"),dt=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(dt||{}),mt=(r=>(r.SOLID="solid",r.DOTTED="dotted",r.DASHED="dashed",r))(mt||{}),Oe=({orientation:e="horizontal",className:o="",style:t={},color:r="currentColor",size:n=1,lineStyle:a="solid",dashedSize:i=1,spacing:s=1})=>(0,ut.jsx)("span",{className:h("polpo-custom-line",e,o,a),style:{...t,"--color":r,"--size":`${n}px`,"--spacing":`${s}px`,"--dashSize":`${i}px`}});var Ve=require("react/jsx-runtime"),ft=(0,K.createContext)(null),wo=e=>{let o=(0,K.useContext)(ft);if(!o)throw new Error("You cant use this component out off an Accordion component");let{toggleItem:t,openedItems:r}=o,n=()=>t(e);return[r.includes(e),n]},qr=({children:e,className:o="",noSeparators:t,multiple:r,style:n={},defaultOpened:a=[]})=>{let[i,s]=(0,K.useState)(()=>(Array.isArray(a)?a:[a]).reduce((p,d)=>typeof d=="string"?{...p,[d]:!0}:p,{})),l=(0,K.useCallback)(p=>{s(d=>({...r?d:{},[p]:!d[p]}))},[r]),c=(0,K.useMemo)(()=>Object.keys(i).filter(p=>i[p]),[i]);return(0,Ve.jsx)(ft.Provider,{value:{toggleItem:l,openedItems:c},children:(0,Ve.jsx)("section",{className:h("polpo-accordion",o),style:n,children:(Array.isArray(e)?e:[e]).flatMap((p,d)=>d===0?p:[t?null:(0,Ve.jsx)(Oe,{orientation:"horizontal"},`${d}.5`),p])})})};var zt=require("react"),$t=require("react-icons/fa");var gt=require("react/jsx-runtime"),Ro=({children:e,isOpen:o,className:t="",style:r={}})=>(0,gt.jsx)("section",{className:t,style:{overflow:"hidden",height:o?"auto":0,transition:"height 300ms ease",interpolateSize:"allow-keywords",...r},children:e});var Po=require("react");var we=require("react/jsx-runtime"),en=({cardZIndex:e="auto",flipDirection:o="vertical",flipSpeed:t=500,isFlipped:r=!1,children:n})=>{let a=l=>{if(n.length!==2)throw new Error("Component FlipCard requires 2 children");return n[l]},i=(0,Po.useMemo)(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?180:0}deg)`,[o,r]),s=(0,Po.useMemo)(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?0:-180}deg)`,[o,r]);return(0,we.jsx)("section",{className:h("polpo-flip-card",r&&"is-flipped"),style:{"--cardZIndex":e,"--flipSpeed":`${t}ms`,"--frontRotate":i,"--backRotate":s},children:(0,we.jsxs)("section",{className:"polpo-flipper",children:[(0,we.jsx)("section",{className:"front",children:a(0)}),(0,we.jsx)("section",{className:"back",children:a(1)})]})})};var ke=require("react");var So=require("react");var ko=require("react");var ht=require("react"),X=e=>(0,ht.useMemo)(()=>Object.entries(e).reduce((o,[t,r])=>r?[...o,t]:o,[]).join(" "),[e]);var Re=require("react");function L(e,o,t,r){let n=(0,Re.useRef)(o);(0,Re.useEffect)(()=>{n.current=o},[o]),(0,Re.useLayoutEffect)(()=>{let a=t?.current??window;if(!(a&&a.addEventListener))return;let i=s=>n.current(s);return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[e,t,r])}var on=(e,o)=>e.current&&!e.current.contains(o),bt=(e,o)=>{L("keydown",t=>{t.key==="Escape"&&o()}),L("mousedown",t=>{let r=t.target;if(!r?.isConnected)return;(Array.isArray(e)?e:[e]).every(a=>on(a,r))&&o()})};var tn=require("react");var vt=require("react");var Ye=require("react"),Eo=(e,o=500)=>{let[t,r]=(0,Ye.useState)(e);return(0,Ye.useEffect)(()=>{let n=setTimeout(()=>r(e),o);return()=>{clearTimeout(n)}},[e,o]),t};var rn=require("react");var nn=require("react");var yt=require("react"),pe=(e,o)=>{(0,yt.useEffect)(()=>{let t=Array.isArray(e)?e:[e],r=new ResizeObserver(o);return t.forEach(n=>n.current&&r.observe(n.current)),()=>{r.disconnect()}},[e,o])};var _e=require("react"),xt=e=>{let o=document.getElementById(e);return o===null&&(o=document.createElement("div"),o.setAttribute("id",e),document.body.appendChild(o)),o},Tt=e=>{let[o,t]=(0,_e.useState)(()=>xt(e));return(0,_e.useEffect)(()=>{let r=document.getElementById(e);if(o===null||r===null){let n=xt(e);t(n)}return()=>{o&&o.parentNode&&process.env.NODE_ENV==="production"&&document.body.removeChild(o)}},[o,e]),o};var Ct=require("react");var Mo=require("react");var Io=require("react");var je=require("react");var wt=require("react"),Rt=(e,o,t={})=>{(0,wt.useEffect)(()=>{let r=Array.isArray(e)?e:[e],n=new IntersectionObserver(o,t);return r.forEach(a=>a.current&&n.observe(a.current)),()=>{n.disconnect()}},[o,t,e])};var Pt=(e={})=>{let[o,t]=(0,je.useState)(!1),r=(0,je.useRef)(null);return Rt(r,([n])=>{t(n.isIntersecting)},e),{ref:r,inView:o}};var Pe=require("react"),N=({onBlur:e,onFocus:o,onChange:t}={})=>{let[r,n]=(0,Pe.useState)(!1),a=(0,Pe.useCallback)(l=>{n(!0),o&&o(l)},[o]),i=(0,Pe.useCallback)(l=>{n(!1),e&&e(l)},[e]),s=(0,Pe.useCallback)(l=>{t&&t(l)},[t]);return{isFocus:r,handlers:{onFocus:a,onBlur:i,onChange:s}}};var We=require("react"),Xe=e=>{let[o,t]=(0,We.useState)(!1);return(0,We.useEffect)(()=>{let r=window.matchMedia(e);r.matches!==o&&t(r.matches);let n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[o,e]),o};var Qe=require("react"),kt=()=>{let e=(0,Qe.useRef)(null),[o,t]=(0,Qe.useState)(!1);return{containerRef:e,isOpen:o,openModal:()=>{t(!0)},closeModal:()=>{t(!1)}}};var fe=require("react");var St=e=>({x:e.x,y:e.y,w:e.width,h:e.height,top:e.top,left:e.left}),Et=({offset:e=0,windowOffset:o=0,position:t="bottom",modalRef:r,containerRef:n,isOpen:a})=>{let i=(0,fe.useRef)(null),s=(0,fe.useCallback)((c,p)=>{let d=c.current?.getClientRects()[0],u=p.current?.getClientRects()[0];if(!d)return;let m=u?ct({c:St(u),m:St(d),offset:e,windowOffset:o,position:t}):pt({position:t,windowOffset:o});Object.keys(m).forEach(f=>{c.current?.style.setProperty(f,m[f])})},[t,o,e]),l=(0,fe.useCallback)(()=>{a&&s(r,n??i)},[s,a,n,r]);(0,fe.useLayoutEffect)(l,[l]),pe(n??i,l),pe(r,l),L("resize",l),L("scroll",l,r)};var Q=Co(require("react"),1);var Mt=({transitionDuration:e=0,isOpen:o})=>{let[t,r]=Q.default.useState("CLOSED"),n=(0,Q.useMemo)(()=>t!=="CLOSED",[t]);(0,Q.useEffect)(()=>{document.documentElement.style.overflow=n?"hidden":"auto"},[n]);let a=(0,Q.useCallback)(()=>{["OPENING","OPEN"].includes(t)&&(e>0?(r("CLOSING"),setTimeout(()=>{r("CLOSED")},e)):r("CLOSED"))},[t,e]),i=(0,Q.useCallback)(()=>{["CLOSING","CLOSED"].includes(t)&&(e>0?(r("OPENING"),setTimeout(()=>{r("OPEN")},e)):r("OPEN"))},[t,e]);return(0,Q.useLayoutEffect)(()=>{t==="CLOSED"&&o?i():t==="OPEN"&&!o&&a()},[o,i,a,t]),{isVisible:n,modalState:t}};var Ze=require("react");var It=(e,o)=>{let{left:t,top:r}=e,n=t+window.scrollX,a=r+window.scrollY,i=o.pageX-n,s=o.pageY-a;return{x:o.pageX,y:o.pageY,elementX:i,elementY:s,elementPositionX:n,elementPositionY:a}},Lt=e=>{let o=(0,Ze.useRef)(null),[t,r]=(0,Ze.useState)({x:null,y:null,elementX:null,elementY:null,elementPositionX:null,elementPositionY:null});return L("mousemove",a=>{let{clientX:i,clientY:s}=a;if(r(l=>({...l,x:i,y:s})),e?.current instanceof Element){let l=It(e.current.getBoundingClientRect(),a);r(c=>({...c,...l}))}else if(o.current instanceof Element){let l=It(o.current.getBoundingClientRect(),a);r(c=>({...c,...l}))}}),{...t,ref:o}};var an=require("react");var Ot=require("react");var Lo=require("react");var Nt=require("react");var At=require("react");var Ke=require("react"),Dt=(e,o=0)=>{let[t,r]=(0,Ke.useState)(o),n=(0,Ke.useCallback)(a=>{r(a!==void 0?a:i=>(i+1)%e.length)},[e.length]);return[e[t],n]};var Ft=require("react");var Oo=require("react/jsx-runtime"),sn=({children:e,threshold:o=5,translationZ:t=25,width:r="fit-content",className:n=""})=>{let a=(0,ke.useRef)(null),i=(0,ke.useRef)(null),s=(0,ke.useCallback)(c=>{let p=a.current,d=i.current;if(!p||!d)return;let{clientX:u,clientY:m,currentTarget:f}=c,{clientWidth:b,clientHeight:g}=f,{top:y,left:w}=p.getBoundingClientRect(),C=(u-w)/b,x=(m-y)/g,T=C*2-1,E=((x*2-1)*o).toFixed(2),A=(T*o).toFixed(2);d.style.transform=`perspective(${b}px) rotateX(${-E}deg) rotateY(${A}deg)`,p.style.transform=`perspective(${b}px) translateZ(${t}px)`},[o,t]),l=(0,ke.useCallback)(c=>{let p=a.current,d=i.current;!p||!d||(d.style.transform=`perspective(${c.currentTarget.clientWidth}px) rotateX(0) rotateY(0)`,p.style.transform=`perspective(${c.currentTarget.clientWidth}px) translateZ(0)`)},[]);return L("mousemove",s,a),L("mouseleave",l,a),(0,Oo.jsx)("span",{ref:a,style:{width:r},className:h("polpo-hover-card",n),children:(0,Oo.jsx)("span",{className:"polpo-hover-card-layer",ref:i,children:e})})};var Je=require("react");var No={hero:"h1",header1:"h1",header2:"h2",header3:"h3",header4:"h4",body:"p",label:"span","label-form":"label",small:"small"},Ht={hero:"hero",header1:"header1",header2:"header2",header3:"header3",header4:"header4",body:"body",label:"label","label-form":"label",small:"small"};var R=({variant:e="body",nowrap:o=!1,className:t="",style:r={},children:n,as:a,weight:i,family:s="primary",noPadding:l=!1,align:c,color:p,htmlFor:d,recommendedWidth:u=!1,...m})=>{let f=(0,Je.useMemo)(()=>No[e]??No.body,[e]);return(0,Je.createElement)(a??f,{...m,className:h("polpo-typography",Ht[e],t,i,p,l&&"no-padding",s==="code"&&"code-family",u&&"recommended-width",typeof o=="number"&&"nowrap-max-lines",o===2&&"nowrap-max-lines-2",o===3&&"nowrap-max-lines-3",o===4&&"nowrap-max-lines-4",o===5&&"nowrap-max-lines-5",o&&"nowrap"),htmlFor:d,style:{textAlign:c,...r}},n)};var J=require("react/jsx-runtime"),Ne=(e,o)=>typeof e=="function"?e(o):e,ln=({title:e,subtitle:o,children:t,icon:r=$t.FaCaretLeft,startContent:n,content:a,endContent:i,classNames:s={},className:l="",style:c={}})=>{let p=(0,zt.useMemo)(()=>crypto.randomUUID(),[]),[d,u]=wo(p),m=Ne(e,d),f=Ne(o,d),b=Ne(n,d),g=Ne(a,d)??(0,J.jsxs)("section",{className:h("polpo-accordion-header-content",s?.headerContent),children:[(0,J.jsx)(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:m}),(0,J.jsx)(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:f})]}),y=Ne(i,d)??(0,J.jsx)(r,{className:h("polpo-accordion-toggle-icon",d&&"is-open",s?.toggleIcon)});return(0,J.jsxs)("section",{className:h("polpo-accordion-item",l),style:c,children:[(0,J.jsxs)("section",{className:h("polpo-accordion-header",n&&"has-start-content",d&&"is-open",s?.header),onClick:u,children:[b,g,y]}),(0,J.jsx)(Ro,{isOpen:d,children:(0,J.jsx)("section",{className:h("polpo-accordion-body",s?.body),children:t})})]})};var Gt=require("react/jsx-runtime"),Bt=(a=>(a.NONE="none",a.SMALL="small",a.MEDIUM="medium",a.LARGE="large",a.FULL="full",a))(Bt||{}),cn=({children:e,rounded:o="medium",selected:t=!1,noWrap:r=!1,ref:n})=>(0,Gt.jsx)("span",{className:h("polpo-badge",o&&`rounded-${o}`,t&&"is-selected",r&&"no-wrap"),ref:n,children:e});var qe=require("react");var Ut=require("react/jsx-runtime"),ge=({color:e,duration:o=1e3,timingFunction:t="ease-out",times:r=1,className:n="",style:a={},zIndex:i=1})=>{let s=(0,qe.useRef)(null);return(0,qe.useEffect)(()=>{if(!s.current?.parentElement)return;let c=getComputedStyle(s.current.parentElement).position;["absolute","fixed","sticky","relative"].includes(c)||(s.current.parentElement.style.position="relative")},[]),(0,Ut.jsx)("span",{ref:s,onMouseDown:c=>{let{pageX:p,pageY:d,currentTarget:u}=c,m=u.getBoundingClientRect(),f=(p-m.left)*100/m.width,b=(d-m.top)*100/m.height,g=document.createElement("span");g.classList.add("ripple-effect"),g.style.animationDuration=`${o}ms`,g.style.animationTimingFunction=t,g.style.left=`${f}%`,g.style.top=`${b}%`,e&&(g.style.background=e),u.appendChild(g),setTimeout(()=>{g.remove()},Math.max(o,500)*Math.max(r,1))},className:h("polpo-ripple",n),style:{...a,zIndex:i}})};var eo=require("react/jsx-runtime"),Do=({children:e,color:o="default",variant:t="solid",radius:r="medium",size:n="regular",noWrap:a=!1,forIcon:i=!1,fullWidth:s=!1,className:l="",...c})=>(0,eo.jsxs)("button",{...c,className:h("polpo-button",o,t,s&&"full",r&&`radius-${r}`,n&&`size-${n}`,a&&"no-wrap",i&&"icon",l),children:[e,(0,eo.jsx)(ge,{})]});var oo=require("react");var Ae=require("react/jsx-runtime"),pn=()=>{let{x:e,y:o,elementX:t,elementY:r,ref:n}=Lt(),[a,i]=(0,oo.useState)(!1);if(L("mouseover",l=>{let c=getComputedStyle(l.target).cursor;i(c==="pointer")}),(0,oo.useEffect)(()=>("ontouchstart"in window||navigator.maxTouchPoints||(document.body.style.cursor="none"),()=>{document.body.style.cursor="auto"}),[]),e===null||o===null||"ontouchstart"in window||navigator.maxTouchPoints)return null;let s=`translate3d(${t}px, ${r}px, 0)`;return(0,Ae.jsxs)("section",{className:"polpo-cursor-overlay",ref:n,children:[(0,Ae.jsx)("span",{className:`polpo-cursor outer-circle ${a?"cursor-hover":""}`,style:{transform:s}}),(0,Ae.jsx)("span",{className:`polpo-cursor inner-circle ${a?"cursor-hover":""}`,style:{transform:s}})]})};var Yt=require("react"),_t=require("react-icons/io5");var to=require("react-hook-form"),Fo=require("react/jsx-runtime"),I=({Component:e,inputProps:o,defaultValue:t,rules:r})=>{let{control:n,setValue:a}=(0,to.useFormContext)(),{name:i,defaultValue:s}=o;return(0,Fo.jsx)(to.Controller,{name:i,control:n,rules:r,defaultValue:s??t,render:({field:{onBlur:l,value:c},fieldState:p})=>(0,Fo.jsx)(e,{value:c,error:p.error?.message,invalid:p.invalid,isTouched:p.isTouched,isDirty:p.isDirty,setValue:d=>a(i,d),onBlur:l,...o})})};var re=require("react/jsx-runtime"),he=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",icon:d=_t.IoCheckmarkOutline,label:u,color:m="primary",size:f="regular"})=>{let b=(0,Yt.useMemo)(()=>crypto.randomUUID(),[]),{handlers:g}=N({onChange:C=>t(C.target.checked),onBlur:r,onFocus:n}),y=X({"checkbox-container":!0,[a]:!!a,[`color-${m}`]:!!m}),w=X({checkbox:!0,"is-checked":o,[`size-${f}`]:!!f});return(0,re.jsxs)("section",{className:y,style:i,onClick:C=>C.stopPropagation(),children:[(0,re.jsxs)("section",{className:w,children:[(0,re.jsx)("section",{className:"checkbox-fill",children:(0,re.jsx)(d,{size:"1.3em",className:"checkbox-icon"})}),(0,re.jsx)("input",{id:b,type:"checkbox",name:e,className:"checkbox-input",checked:o,autoFocus:s,autoComplete:p,disabled:c||l,...g})]}),u?(0,re.jsx)(R,{variant:"label-form",htmlFor:b,className:"checkbox-label",children:u}):null]})},dn=({rules:e,...o})=>(0,re.jsx)(I,{Component:he,defaultValue:!1,inputProps:o,rules:e});he.Controller=dn;var Xt=require("react");var Wt=require("react-icons/im");var Ho=(r=>(r.FULL_BORDER="full-border",r.CONTENT_BORDER="content-border",r.CONTENT_LINE="line",r))(Ho||{}),zo=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(zo||{});var Y=require("react/jsx-runtime"),jt=({icon:e,className:o,onClick:t})=>e?(0,Y.jsx)(e,{className:o,onClick:t}):(0,Y.jsx)("span",{}),H=({id:e,label:o,leftIcon:t,rightIcon:r,errorIcon:n=Wt.ImCross,error:a,onClickLeftIcon:i,onClickRightIcon:s,fieldOrientation:l="vertical",children:c,isFocus:p=!1,variant:d,ref:u})=>{let m=X({"form-field":!0,focus:p,error:!!a,"variant-content-border":d==="content-border","variant-content-line":d==="line","variant-full-border":d==="full-border","variant-inline":l==="horizontal"}),f=b=>g=>{g.stopPropagation();let y=document.getElementById(e);y?.focus(),y?.click(),b&&b()};return(0,Y.jsxs)("section",{className:m,ref:u,children:[o?(0,Y.jsx)(R,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:e,children:o}):null,(0,Y.jsxs)("section",{className:"field-content",children:[jt({className:"field-left-icon",icon:t,onClick:f(i)}),(0,Y.jsx)("section",{className:"field-children",children:c}),jt({className:"field-right-icon",icon:r,onClick:f(s)})]}),!!a&&(0,Y.jsxs)("section",{className:"field-message",children:[n?(0,Y.jsx)(n,{size:10}):(0,Y.jsx)("span",{}),(0,Y.jsx)(R,{noPadding:!0,variant:"small",children:a})]})]})};var ro=require("react/jsx-runtime"),$o=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,type:a="date",className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:u="off",isDirty:m=!1,isTouched:f=!1,invalid:b=!1,error:g,...y})=>{let w=(0,Xt.useMemo)(()=>crypto.randomUUID(),[]),{isFocus:C,handlers:x}=N({onBlur:r,onChange:T=>t(T.target.value),onFocus:n});return(0,ro.jsx)(H,{id:w,error:g,isFocus:C,...y,children:(0,ro.jsx)("input",{id:w,type:a,name:e,className:i,style:s,value:o,autoFocus:l,autoComplete:u,placeholder:d,disabled:p,readOnly:c,...x})})},mn=({rules:e,...o})=>(0,ro.jsx)(I,{Component:$o,defaultValue:"",inputProps:o,rules:e});$o.Controller=mn;var Qt=require("react");var no=require("react/jsx-runtime"),Bo=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,pattern:a,type:i="text",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:u="",autoComplete:m="off",isDirty:f=!1,isTouched:b=!1,invalid:g=!1,error:y,min:w,max:C,...x})=>{let T=(0,Qt.useMemo)(()=>crypto.randomUUID(),[]),{handlers:k,isFocus:E}=N({onChange:A=>t(A.target.value),onBlur:r,onFocus:n});return(0,no.jsx)(H,{id:T,error:y,isFocus:E,...x,children:(0,no.jsx)("input",{id:T,type:i,name:e,className:s,style:l,value:o,pattern:a,autoFocus:c,autoComplete:m,placeholder:u,disabled:d,readOnly:p,min:w,max:C,...k})})},un=({rules:e,...o})=>(0,no.jsx)(I,{Component:Bo,defaultValue:"",inputProps:o,rules:e});Bo.Controller=un;var Go=require("react"),io=require("react-icons/fi"),Zt=require("react-icons/io");var ao=require("react/jsx-runtime"),Uo=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",isDirty:u=!1,isTouched:m=!1,invalid:f=!1,error:b,...g})=>{let y=(0,Go.useMemo)(()=>crypto.randomUUID(),[]),[w,C]=Dt(["password","text"]),{isFocus:x,handlers:T}=N({onBlur:r,onChange:E=>t(E.target.value),onFocus:n}),k=(0,Go.useMemo)(()=>w==="password"?io.FiEye:w==="text"?io.FiEyeOff:Zt.IoIosWarning,[w]);return(0,ao.jsx)(H,{id:y,error:b,isFocus:x,...g,rightIcon:k,onClickRightIcon:()=>C(),children:(0,ao.jsx)("input",{id:y,type:w,name:e,className:a,style:i,value:o,autoFocus:s,autoComplete:d,placeholder:p,disabled:c,readOnly:l,...T})})},fn=({rules:e,...o})=>(0,ao.jsx)(I,{Component:Uo,defaultValue:"",inputProps:o,rules:e});Uo.Controller=fn;var ir=Co(require("color"),1),j=require("react"),co=require("react-colorful"),sr=require("react-icons/fa6"),lr=Co(require("use-eye-dropper"),1);var _=require("react"),or=require("react-icons/im");var so=require("react");var Kt=require("react-dom");var Vo=({children:e,id:o})=>{let t=Tt(o);return t===null?null:(0,Kt.createPortal)(e,t)};var Jt=require("react");var er=require("react/jsx-runtime"),qt=(n=>(n.OPAQUE="opaque",n.TRANSPARENT="transparent",n.BLUR="blur",n.NONE="none",n))(qt||{}),Yo=({opacity:e=.6,backdrop:o="blur",zIndex:t,backdropOnClick:r,modalState:n})=>{let a=(0,Jt.useMemo)(()=>({opaque:{background:`hsl(from var(--color-background-paper) h s l / ${e*100}%)`},transparent:{background:"transparent"},blur:{background:`hsl(from var(--color-background-paper) h s l / ${e*100}%)`,backdropFilter:"blur(5px)"},none:{display:"none"}})[o]??{},[o,e]);return o==="none"?null:(0,er.jsx)("section",{tabIndex:-1,onClick:r,className:h("polpo-modal-backdrop",n==="CLOSING"||n==="CLOSED"&&"backdrop-close"),style:{zIndex:t,...a}})};var Se=require("react/jsx-runtime"),Z=({id:e,children:o,isOpen:t,onClose:r,className:n="",style:a={},rootStyle:i={},animation:s="fade-down",closeAnimationClassName:l="modal-close",modalRef:c,closeOnClickOutside:p=!0,transitionDuration:d=300,windowOffset:u=10,offset:m=20,position:f,containerRef:b,zIndex:g=1e3,...y})=>{let w=(0,so.useMemo)(()=>crypto.randomUUID(),[]),C=(0,so.useRef)(null),{modalState:x,isVisible:T}=Mt({transitionDuration:d,isOpen:t});return Et({modalRef:c??C,containerRef:b,offset:m,windowOffset:u,position:f,isOpen:T}),bt(c??C,()=>{t&&p&&r()}),T?(0,Se.jsxs)(Vo,{id:`modal-${e}-${w}`,children:[(0,Se.jsx)(Yo,{...y,modalState:x,zIndex:g}),(0,Se.jsx)("section",{className:"polpo-modal",ref:c??C,style:{maxWidth:`calc(100dvw - ${u*2}px)`,maxHeight:`calc(100dvh - ${u*2}px)`,...i,zIndex:+g+1},children:(0,Se.jsx)("section",{style:{...a,animationDuration:`${d}ms`},className:h("polpo-modal-content",n,!!s&&s!=="none"&&`animation-${s}`,x==="CLOSING"||x==="CLOSED"&&l),children:o})})]}):null};var V=require("react/jsx-runtime"),tr=(0,_.createContext)(null),hn=()=>{let e=(0,_.useContext)(tr);if(!e)throw new Error("useActionModalContext must be used within a ActionModal");return e},Ee=({children:e,isOpen:o,onClose:t,actionRequired:r,icon:n,noCloseButton:a,lineOnTop:i=!1,backCard:s=!1,noPadding:l=!1,className:c="",style:p={},...d})=>{let[u,m]=(0,_.useState)(!1),f=(0,_.useRef)(null),b=(0,_.useCallback)(()=>{f.current?.classList.add("shake-animation"),setTimeout(()=>{f.current?.classList.remove("shake-animation")},500)},[]);return(0,V.jsx)(tr.Provider,{value:{onClose:t,isActionInProgress:u,setIsActionInProgress:m},children:(0,V.jsx)(Z,{className:"polpo-action-modal",id:"action-modal",animation:"bounce",opacity:.8,isOpen:o,onClose:t,...d,backdropOnClick:r?b:t,position:"center",children:(0,V.jsx)("section",{ref:f,className:"polpo-modal-content",children:(0,V.jsxs)("section",{className:h("polpo-action-modal-content",s&&"back-card",i&&"line-on-top",l&&"no-padding"),children:[!a&&!r&&(0,V.jsx)("section",{className:"close-modal-button",onClick:()=>t(),children:(0,V.jsx)(or.ImCross,{})}),n?(0,V.jsx)(R,{variant:"header4",className:"action-modal-icon",children:(0,V.jsx)(n,{})}):null,(0,V.jsx)("section",{className:"polpo-action-modal-body",children:(0,V.jsx)("section",{className:`polpo-action-modal-content ${c}`,style:p,children:e})})]})})})})},bn=({onClick:e,children:o,isLoading:t,...r})=>{let{onClose:n,isActionInProgress:a,setIsActionInProgress:i}=hn(),[s,l]=(0,_.useState)(!1),c=(0,_.useCallback)(()=>{l(!0),i(!0);let p=e();p instanceof Promise?p.then(()=>{n(),l(!1),i(!1)}):(n(),l(!1),i(!1))},[e,n,i]);return!s&&a?null:(0,V.jsx)(Do,{...r,onClick:c,isLoading:t||s,children:o})};Ee.ActionButton=bn;var rr=require("react"),nr=require("react-icons/im");var Me=require("react/jsx-runtime"),vn=({children:e,isOpen:o,onClose:t,position:r="left",size:n,className:a="",...i})=>{let s=(0,rr.useMemo)(()=>({top:{height:n,width:"100%"},left:{height:"100%",width:n},right:{height:"100%",width:n},bottom:{height:n,width:"100%"}})[r],[r,n]);return(0,Me.jsxs)(Z,{id:"aside",isOpen:o,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:h("polpo-aside-modal",a,r),rootStyle:s,backdropOnClick:t,position:r,...i,children:[(0,Me.jsx)("span",{className:"close-modal-button",onClick:t,children:(0,Me.jsx)(nr.ImCross,{})}),(0,Me.jsx)("section",{className:"polpo-aside-modal-content",children:e})]})};var ne=require("react/jsx-runtime"),yn=({title:e,onAccept:o,onReject:t=()=>null,acceptText:r,rejectText:n,children:a,isLoading:i,...s})=>(0,ne.jsx)(Ee,{...s,backCard:!0,children:(0,ne.jsxs)("section",{className:"polpo-confirmation-modal",children:[(0,ne.jsx)(R,{variant:"header4",children:e}),(0,ne.jsx)("section",{children:a}),(0,ne.jsxs)("section",{className:"polpo-confirmation-modal-actions",children:[!i&&(0,ne.jsx)(Ee.ActionButton,{variant:"flat",onClick:t,children:n}),(0,ne.jsx)(Ee.ActionButton,{isLoading:i,onClick:o,children:r})]})]})});var lo=require("react");var O=require("react/jsx-runtime"),q=({children:e,isOpen:o,onClose:t,id:r,menuContentRef:n,contentClassName:a="",contentStyle:i={},className:s="",...l})=>(0,O.jsx)(Z,{className:h("polpo-menu-modal",s),...l,id:`menu-${r}`,isOpen:o,onClose:t,children:(0,O.jsx)("ul",{className:`polpo-menu-content ${a}`,role:"listbox",style:i,ref:n,children:e})}),xn=({children:e,label:o="",asCheckbox:t,icon:r,id:n,disabled:a=!1,selected:i=!1,className:s="",style:l={},onClick:c=()=>null,...p})=>{let d=(0,lo.useCallback)(m=>{m.stopPropagation(),a||c(!i)},[a,c,i]),u=(0,lo.useMemo)(()=>e||(t?(0,O.jsx)(he,{className:"menu-checkbox",disabled:a,value:i,setValue:m=>c(m),name:"option",style:{pointerEvents:"none"},size:"small",label:(0,O.jsxs)(O.Fragment,{children:[r!==void 0&&(0,O.jsx)(r,{className:"option-icon"}),(0,O.jsx)(R,{variant:"label",children:o})]})}):(0,O.jsxs)(O.Fragment,{children:[r!==void 0&&(0,O.jsx)(r,{className:"option-icon"}),typeof o=="string"?(0,O.jsx)(R,{variant:"label",children:o}):o]})),[t,e,a,r,o,c,i]);return(0,O.jsxs)("li",{...p,id:n,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":a,onClick:d,className:h("polpo-menu-option",a&&"is-disabled",i&&"is-selected",s),style:l,children:[(0,O.jsx)(ge,{zIndex:10}),u]})},Tn=()=>(0,O.jsx)("li",{children:(0,O.jsx)(Oe,{className:"divider"})}),ar=({children:e,className:o="",...t})=>(0,O.jsx)("li",{tabIndex:-1,className:"polpo-menu-label",children:(0,O.jsx)(R,{...t,variant:"small",className:`menu-group-label ${o}`,children:e})}),Cn=({children:e,label:o,className:t="",style:r={},contentClassName:n="",contentStyle:a={},...i})=>{let s=X({"polpo-menu-group":!0,[t]:!!t});return(0,O.jsxs)("li",{tabIndex:-1,...i,className:s,style:r,children:[o&&(0,O.jsx)(ar,{children:o}),(0,O.jsx)("ul",{className:`polpo-menu-group-content ${n}`,role:"listbox",style:a,children:e})]})};q.Option=xn;q.Divider=Tn;q.GroupLabel=ar;q.Group=Cn;var U=require("react/jsx-runtime"),_o=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,showValueText:a=!1,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:u="off",isDirty:m=!1,isTouched:f=!1,invalid:b=!1,error:g,...y})=>{let{open:w,isSupported:C}=(0,lr.default)(),[x,T]=(0,j.useState)(o),k=(0,j.useMemo)(()=>crypto.randomUUID(),[]),E=(0,j.useRef)(null),[A,F]=(0,j.useState)(!1),{handlers:G,isFocus:W}=N({onChange:D=>T(D.target.value),onBlur:D=>{te(),r&&r(D)},onFocus:D=>{te(),n&&n(D)}}),v=(0,j.useMemo)(()=>{let D=(0,ir.default)(o===""?"#000000":o);return D.isLight()||D.alpha()<.5?"#000000":"#FFFFFF"},[o]),S=async()=>{let{sRGBHex:D}=await w();t(D)};(0,j.useEffect)(()=>{T(o)},[o]);let te=(0,j.useCallback)(()=>{x.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(x):T(o)},[x,t,o]),le=X({"input-color-box":!0,[i]:!!i});return(0,U.jsxs)(H,{id:k,error:g,isFocus:W,...y,children:[(0,U.jsxs)("section",{className:"input-color",onClick:D=>{D.stopPropagation(),F(!0)},ref:E,children:[(0,U.jsx)("section",{className:le,style:{borderColor:v,background:o,color:o,...s}}),a?(0,U.jsx)("input",{id:k,name:e,value:x,placeholder:d,readOnly:c,autoFocus:l,disabled:p,autoComplete:u,className:"color-input",...G}):null]}),(0,U.jsxs)(Z,{id:"input-color",isOpen:A,onClose:()=>F(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:E,className:"input-color-selector",children:[(0,U.jsx)(co.HexAlphaColorPicker,{id:k,color:o,onChange:t}),(0,U.jsxs)("section",{className:"color-input-container",children:[C()?(0,U.jsx)(sr.FaEyeDropper,{onClick:()=>{S()}}):(0,U.jsx)("span",{}),(0,U.jsx)(co.HexColorInput,{className:"color-input",id:k,name:e,color:o,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),(0,U.jsx)("span",{})]})]})]})},wn=({rules:e,...o})=>(0,U.jsx)(I,{Component:_o,defaultValue:"#147EFB",inputProps:o,rules:e});_o.Controller=wn;var ae=require("react"),Fe=require("react-icons/fa6"),pr=require("react-icons/io"),po=require("react-icons/pi");var Rn=require("react");var cr=require("react"),De=({tag:e="section",children:o,className:t,style:r,flow:n,columnSize:a,rowSize:i,column:s,row:l,pc:c,pi:p,ps:d,jc:u,ji:m,js:f,ac:b,ai:g,as:y,gtc:w,gtr:C,gta:x,gt:T,gap:k,...E})=>(0,cr.createElement)(e,{className:t,...E,style:{...r,...n?{gridAutoFlow:n}:{},...a?{gridAutoColumns:a}:{},...i?{gridAutoRows:i}:{},...s?{gridColumn:s}:{},...l?{gridRow:l}:{},...c?{placeContent:c}:{},...p?{placeItems:p}:{},...d?{placeSelf:d}:{},...u?{justifyContent:u}:{},...m?{justifyItems:m}:{},...f?{justifySelf:f}:{},...b?{alignContent:b}:{},...g?{alignItems:g}:{},...y?{alignSelf:y}:{},...w?{gridTemplateColumns:w}:{},...C?{gridTemplateRows:C}:{},...x?{gridTemplateAreas:x}:{},...T?{gridTemplate:T}:{},...k?{gap:k}:{},display:"grid"}},o);var P=require("react/jsx-runtime"),jo=({name:e,value:o={},setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="Click to upload or drag and drop",autoComplete:d="off",accept:u,multiple:m=!1,limitSize:f=5e6,errorTimeout:b=3e3,label:g})=>{let[y,w]=(0,ae.useState)(null),C=(0,ae.useMemo)(()=>crypto.randomUUID(),[]),{handlers:x}=N({onBlur:r,onFocus:n,onChange:v=>{let{files:S}=v.target;S&&T(S)}});(0,ae.useEffect)(()=>{let v=null;return y!==null&&(v=setTimeout(()=>{w(null)},b)),()=>{v!==null&&clearTimeout(v)}},[y,b]);let T=v=>{let S=m?{...o}:{},te=m?v.length:1;for(let le=0;le<te;le++){let D=v.item(le);D&&(D.size<f?S[D.name]=D:w(`File '${D.name}' size is larger than ${Ce(f)}`))}t(S)},k=v=>{v.preventDefault(),v.stopPropagation(),v.dataTransfer.files&&v.dataTransfer.files.length&&T(v.dataTransfer.files)},E=(0,ae.useCallback)(v=>({"image/png":po.PiFilePngFill,"application/pdf":po.PiFilePdfFill})[v]??pr.IoIosWarning,[]),A=v=>{let S={...o};delete S[v.name],t(S)},F=()=>{t({})},G=(0,ae.useMemo)(()=>Object.values(o).reduce((v,{size:S})=>v+S,0),[o]),W=(v,S)=>{let te=E(v.type);return(0,P.jsxs)("section",{className:"input-file-card",children:[(0,P.jsx)("section",{className:"file-card--image",children:(0,P.jsx)(te,{})}),(0,P.jsxs)(De,{children:[(0,P.jsx)(R,{variant:"label",noPadding:!0,nowrap:!0,children:v.name}),(0,P.jsx)(R,{noPadding:!0,variant:"small",children:Ce(v.size)})]}),(0,P.jsx)("section",{className:"file-card--delete",onClick:()=>A(v),children:(0,P.jsx)(Fe.FaRegTrashCan,{})})]},S)};return(0,P.jsxs)("section",{className:"input-file-container",children:[!!g&&(0,P.jsx)(R,{variant:"label-form",htmlFor:C,noPadding:!0,children:g}),(0,P.jsxs)("section",{className:"input-file--box",onDrop:k,children:[(0,P.jsx)("section",{className:"input-file--box--icon",children:(0,P.jsx)(Fe.FaMagnifyingGlass,{})}),(0,P.jsxs)(De,{children:[(0,P.jsx)(R,{variant:"label-form",htmlFor:C,noPadding:!0,weight:"bold",children:p}),(0,P.jsxs)(R,{variant:"small",noPadding:!0,children:["Max size (",Ce(f),")"]})]}),(0,P.jsx)("input",{id:C,type:"file",name:e,value:"",placeholder:p,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:a,style:i,accept:u,multiple:m,title:"",...x})]}),y!==null&&(0,P.jsx)(R,{variant:"small",noPadding:!0,className:"error",children:y}),Object.keys(o).length>0&&(0,P.jsxs)(P.Fragment,{children:[m&&(0,P.jsxs)("span",{className:"total-info",children:[(0,P.jsxs)(R,{variant:"small",noPadding:!0,children:[Object.keys(o).length," files - ",Ce(G)]}),(0,P.jsx)("span",{className:"total-info--delete",onClick:F,children:(0,P.jsx)(Fe.FaRegTrashCan,{})})]}),(0,P.jsx)("section",{className:"input-file--files",children:(0,P.jsx)("section",{className:"input-file--files--content",children:Object.values(o).map(W)})})]})]})},Pn=({rules:e,...o})=>(0,P.jsx)(I,{Component:jo,defaultValue:{},inputProps:o,rules:e});jo.Controller=Pn;var be=require("react");var uo=require("react/jsx-runtime"),dr={comma:/(?!^-)[^0-9,]/g,dot:/(?!^-)[^0-9.]/g},mr=(e,o=".")=>{let t=o==="."?dr.dot:dr.comma,r=e.replace(t,"").replace(",",".");return r||""},mo=(e,o)=>!e||Number.isNaN(e)?o(0):o(e),Wo=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,pattern:a,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:u="off",isDirty:m=!1,isTouched:f=!1,invalid:b=!1,error:g,min:y,max:w,decimalSeparator:C,format:x={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...T})=>{let k=(0,be.useMemo)(()=>crypto.randomUUID(),[]),E=(0,be.useMemo)(()=>{if(typeof x=="function")return x;let{locales:v,...S}=x;return Intl.NumberFormat(v,S).format},[x]),[A,F]=(0,be.useState)(mo(o,E)),{handlers:G,isFocus:W}=N({onChange:v=>{let S=mr(v.target.value,C);S.endsWith(".")?F(v.target.value):(F(mo(Number(S),E)),t(Number(S)))},onBlur:v=>{let S=mr(v.target.value,C);F(mo(Number(S),E)),t(Number(S)),r&&r(v)},onFocus:n});return(0,be.useEffect)(()=>{let v=mo(o,E);A!==v&&F(v)},[E,A,o]),(0,uo.jsx)(H,{id:k,error:g,isFocus:W,...T,children:(0,uo.jsx)("input",{id:k,type:"text",name:e,className:i,style:s,value:A,pattern:a,autoFocus:l,autoComplete:u,placeholder:d,disabled:p,readOnly:c,min:y,max:w,...G})})},kn=({rules:e,...o})=>(0,uo.jsx)(I,{Component:Wo,defaultValue:0,inputProps:o,rules:e});Wo.Controller=kn;var ur=require("react");var de=require("react/jsx-runtime"),Xo=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",radioValue:d,label:u,color:m="primary",size:f="regular"})=>{let b=(0,ur.useMemo)(()=>crypto.randomUUID(),[]),{handlers:g}=N({onChange:y=>t(y.target.value),onBlur:r,onFocus:n});return(0,de.jsxs)("section",{className:h("polpo-radio-container",a,m&&[`color-${m}`]),style:i,children:[(0,de.jsxs)("section",{className:h("polpo-radio",d===o&&"is-checked",f&&[`size-${f}`]),children:[(0,de.jsx)("section",{className:"polpo-radio-fill"}),(0,de.jsx)("input",{id:b,type:"radio",name:e,className:`polpo-radio-input ${a}`,style:i,value:d,checked:d===o,autoFocus:s,autoComplete:p,disabled:c||l,...g})]}),u?(0,de.jsx)(R,{variant:"label-form",htmlFor:b,className:"polpo-radio-label",children:u}):null]})},Sn=({rules:e,...o})=>(0,de.jsx)(I,{Component:Xo,defaultValue:"",inputProps:o,rules:e});Xo.Controller=Sn;var z=require("react"),vr=require("react-icons/im"),yr=require("react-icons/pi");var fr=require("react");var ie=require("react/jsx-runtime"),Qo=({isLoading:e=!1,hasNextPage:o=!1,loadMore:t,customLoadMoreElement:r,emptyMessage:n,children:a})=>{let{ref:i,inView:s}=Pt(),l=Eo(e,100);(0,fr.useEffect)(()=>{o&&s&&!l&&t()},[o,l,t,s]);let c=Array.isArray(a)?a.length>0:!!a;return(0,ie.jsxs)(ie.Fragment,{children:[a,(0,ie.jsxs)("section",{className:"polpo-infinity-scroll",children:[!!n&&!c&&!l&&(0,ie.jsx)("p",{className:"empty-message",children:n}),(o||l)&&(r?r(i):(0,ie.jsx)("section",{ref:i,className:"loading",children:l&&(0,ie.jsx)("span",{className:"loading--icon",children:":D"})}))]})]})};var ve=require("react");var Zo=require("react/jsx-runtime"),gr=({children:e,value:o})=>{let{multiselect:t,isEqualComparator:r,maxOptions:n,selectedValue:a,setValue:i,setIsOpen:s}=hr(),l=(0,ve.useCallback)((m,f)=>["number","string"].includes(typeof m)?m===f:!!r&&r(m,f),[r]),c=(0,ve.useCallback)(m=>{if(m)if(t){if(n&&Array.isArray(a)&&a.length>=n)return;i([...a,o])}else i(o),s(!1);else t?i(a.filter(f=>!l(f,o))):(i(null),s(!1))},[t,n,a,i,o,s,l]),p=(0,ve.useMemo)(()=>a===""||a===null?!1:Array.isArray(a)?["number","string"].includes(typeof o)?a.includes(o):a.some(m=>!!r&&r(o,m)):l(o,a),[l,r,a,o]),d=(0,ve.useCallback)(m=>{["Enter"," "].includes(m.key)&&(m.preventDefault(),c(!(p&&t)))},[c,p,t]),u=(0,ve.useMemo)(()=>typeof e=="string"?(0,Zo.jsx)(R,{"data-value":o,variant:"label",nowrap:!0,children:e}):e,[e,o]);return(0,Zo.jsx)(q.Option,{label:u,onKeyDown:d,asCheckbox:t,selected:p,onClick:m=>c(t?m:!0)})};var B=require("react");var ye=require("react/jsx-runtime"),En=({height:e,minHeight:o,containerRef:t,offset:r,windowOffset:n})=>{let[a,i]=(0,B.useState)(void 0),s=(0,B.useCallback)(()=>{let l=t.current?.getBoundingClientRect().bottom??0,c=window.innerHeight-l-n-r-5,p=window.innerHeight-n*3,d=c<o?p:c,u=Math.min(d,e),m=Math.max(u,o);i(`${Math.round(m)}px`)},[t,n,r,o,e]);return(0,B.useEffect)(()=>{s()},[s]),pe(t,s),L("resize",s),{h:a}},br=({children:e,searchQueryValue:o,searchQueryPlaceholder:t="Search option",searchQueryClassName:r="",searchQueryStyle:n={},onSearchQuery:a,containerRef:i,height:s=300})=>{let l=(0,B.useRef)(null),c=(0,B.useRef)(null),[p,d]=(0,B.useState)(""),u=(0,B.useRef)(null),m=Xe("(max-width: 480px)");L("keydown",x=>{if(["ArrowDown","ArrowUp"].includes(x.code)){x.preventDefault();let T=document.activeElement;if(T?.tagName==="LI")switch(x.code){case"ArrowDown":T?.nextSibling?.focus();break;case"ArrowUp":T?.previousElementSibling?.focus();break}}});let f=(0,B.useCallback)(x=>{let{value:T}=x.target;a&&a(T),d(T)},[a]);(0,B.useEffect)(()=>{u.current&&u.current.focus()},[]);let{h:b}=En({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[g,y]=(0,B.useState)(!1),w=(0,B.useCallback)(()=>{let x=Math.round(l.current?.getBoundingClientRect().height??0)+2,T=Math.round(c.current?.scrollHeight??0);y(x>=T)},[]);(0,B.useEffect)(w,[w]),pe(l,w),pe(c,w),L("resize",w);let C=X({"select-options-header":!0,[r]:!!r});return(0,ye.jsxs)("section",{className:`select-options ${a?"with-search-query":""}`,style:m?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{height:g?"auto":b,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[a&&(0,ye.jsx)("section",{className:C,style:n,children:(0,ye.jsx)("input",{name:"query",className:"input-search",value:o??p,onChange:f,placeholder:t,onClick:x=>x.stopPropagation(),ref:u,autoFocus:!0})}),(0,ye.jsx)("section",{className:"select-options-list-container",ref:l,children:(0,ye.jsx)("ul",{className:"select-options-list",ref:c,children:e})})]})};var M=require("react/jsx-runtime"),xr=(0,z.createContext)(null),hr=()=>{let e=(0,z.useContext)(xr);if(!e)throw new Error("useSelectContext must be used within a Select component");return e},Mn=({children:e})=>{let o=(0,z.useMemo)(()=>typeof e=="string"?(0,M.jsx)(R,{noPadding:!0,variant:"label",nowrap:!0,children:e}):e,[e]);return(0,M.jsx)(q.GroupLabel,{children:o})},In=({value:e})=>(0,M.jsx)(R,{variant:"label",nowrap:!0,children:typeof e=="string"||typeof e=="number"?e:JSON.stringify(e)}),Ln=({value:e,multiselect:o})=>o?(0,M.jsx)(R,{noPadding:!0,nowrap:!0,variant:"label",children:`${e.length} item${e.length===1?"":"s"} selected`}):e===null?null:(0,M.jsx)(R,{noPadding:!0,variant:"label",nowrap:!0,children:typeof e=="string"||typeof e=="number"?e:JSON.stringify(e)}),me=({options:e,isEqualComparator:o,searchQueryValue:t,searchQueryPlaceholder:r,onSearchQuery:n,loadMore:a=()=>null,isLoading:i=!1,hasNextPage:s=!1,emptyMessage:l="No options to select",multiselect:c,optionComponent:p=In,valueComponent:d=Ln,maxOptions:u,children:m,name:f,value:b,setValue:g,onBlur:y,onFocus:w,className:C="",style:x={},showClearOption:T=!1,height:k,searchQueryStyle:E,searchQueryClassName:A,autoFocus:F=!1,readOnly:G=!1,disabled:W=!1,placeholder:v="",autoComplete:S="off",isDirty:te=!1,isTouched:le=!1,invalid:D=!1,error:zr,...$r})=>{let Br=(0,z.useRef)(null),$e=Xe("(max-width: 480px)"),rt=(0,z.useMemo)(()=>crypto.randomUUID(),[]),yo=(0,z.useRef)(null),[Be,nt]=(0,z.useState)(!1),xo=(0,z.useCallback)(ce=>{nt(ce&&!W)},[W]),Gr=(0,z.useCallback)(ce=>{ce.stopPropagation(),g(c?[]:null)},[c,g]),To=(0,z.useMemo)(()=>c?b.length>0:!!b,[c,b]),Ur=(0,z.useMemo)(()=>m||e.map((ce,Vr)=>(0,M.jsx)(me.Option,{value:ce,children:(0,M.jsx)(p,{value:ce})},Vr)),[p,m,e]);return(0,M.jsx)(xr.Provider,{value:{selectedValue:b,setValue:g,multiselect:c??!1,isEqualComparator:o,maxOptions:u??null,setIsOpen:nt},children:(0,M.jsx)(H,{id:rt,error:zr,isFocus:Be,ref:yo,...$r,children:(0,M.jsxs)("section",{id:f,style:x,onBlur:y,className:`select ${W?"disabled":""} ${C}`,children:[(0,M.jsxs)("section",{id:rt,className:`select-container ${To&&T?"three-columns":""}`,onClick:()=>xo(!0),children:[(0,M.jsx)("button",{type:"button",className:`input-button ${(Array.isArray(b)?b.length>0:b)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":Be,onFocus:ce=>{xo(!0),w&&w(ce)},children:To?(0,M.jsx)(d,{...c?{value:b,multiselect:c}:{value:b}}):(0,M.jsx)(R,{variant:"label",noPadding:!0,nowrap:!0,children:v})}),To&&T&&(0,M.jsx)("section",{className:"icon-close",onClick:Gr,children:(0,M.jsx)(vr.ImCross,{})}),(0,M.jsx)(yr.PiCaretDown,{className:`select-caret-icon ${Be&&"is-select-open"}`})]}),(0,M.jsx)(q,{id:"form-select",isOpen:Be,onClose:()=>xo(!1),backdrop:$e?"blur":"transparent",opacity:$e?.8:.4,position:$e?"center":"bottom",offset:5,modalRef:Br,windowOffset:10,transitionDuration:200,containerRef:$e?void 0:yo,contentClassName:"select-menu-content",className:"select-options-menu",children:(0,M.jsx)(br,{containerRef:yo,onSearchQuery:n,searchQueryValue:t,searchQueryPlaceholder:r,searchQueryClassName:A,searchQueryStyle:E,height:k,children:(0,M.jsx)(Qo,{isLoading:i,hasNextPage:s,loadMore:a,emptyMessage:l,children:Ur})})})]})})})},On=({rules:e,...o})=>(0,M.jsx)(I,{Component:me,defaultValue:[],inputProps:{...o,multiselect:!0},rules:e}),Nn=({rules:e,...o})=>(0,M.jsx)(I,{Component:me,defaultValue:null,inputProps:{...o,multiselect:!1},rules:e}),An=e=>{let{multiselect:o}=e;return o?(0,M.jsx)(On,{...e,multiselect:!0}):(0,M.jsx)(Nn,{...e,multiselect:!1})};me.Controller=An;me.Option=gr;me.OptionLabel=Mn;var Tr=require("react");var xe=require("react/jsx-runtime"),Ko=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,min:a,max:i,step:s,onlySlider:l=!1,className:c="",style:p={},autoFocus:d=!1,readOnly:u=!1,disabled:m=!1,placeholder:f="",autoComplete:b="off",isDirty:g=!1,isTouched:y=!1,invalid:w=!1,error:C,...x})=>{let T=(0,Tr.useMemo)(()=>crypto.randomUUID(),[]),k=F=>{r&&r(F);let G=parseInt(`${o}`);a!==void 0&&G<a&&t(a),i!==void 0&&G>i&&t(i),t(G)},{isFocus:E,handlers:A}=N({onBlur:k,onChange:F=>t(+F.target.value),onFocus:n});return(0,xe.jsx)(H,{id:T,error:C,isFocus:E,...x,children:(0,xe.jsxs)("section",{className:h("polpo-input-slider",E&&"is-focus"),children:[(0,xe.jsx)("input",{id:T,type:"range",name:e,className:`polpo-slider ${c}`,style:p,value:o,autoFocus:d,autoComplete:b,placeholder:f,disabled:m,readOnly:u,min:a,max:i,step:s,...A}),!l&&(0,xe.jsx)("input",{id:T,type:"number",name:e,className:`polpo-slider-number ${c}`,style:p,value:o,autoComplete:b,disabled:m,readOnly:u,min:a,max:i,step:s,...A})]})})},Dn=({rules:e,...o})=>(0,xe.jsx)(I,{Component:Ko,defaultValue:0,inputProps:o,rules:e});Ko.Controller=Dn;var Cr=require("react");var fo=require("react/jsx-runtime"),Jo=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,rows:a=4,resize:i="vertical",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:u="",autoComplete:m="off",isDirty:f=!1,isTouched:b=!1,invalid:g=!1,error:y,...w})=>{let C=(0,Cr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:x,isFocus:T}=N({onBlur:r,onChange:k=>t(k.target.value),onFocus:n});return(0,fo.jsx)(H,{id:C,error:y,isFocus:T,...w,children:(0,fo.jsx)("textarea",{id:C,name:e,className:h("polpo-textarea",s),style:{resize:i,...l},value:o,rows:a,...x,autoFocus:c,autoComplete:m,placeholder:u,disabled:d,readOnly:p})})},Fn=({rules:e,...o})=>(0,fo.jsx)(I,{Component:Jo,defaultValue:"",inputProps:o,rules:e});Jo.Controller=Fn;var Sr=require("react");var Rr=require("react");var wr=require("react");var Te=require("react/jsx-runtime"),Ie=({position:e="top",children:o,content:t,offset:r=5,disabled:n=!1})=>{let{containerRef:a,openModal:i,closeModal:s,isOpen:l}=kt();return L("mouseenter",()=>i(),a),L("mouseleave",()=>s(),a),n?o:(0,Te.jsxs)(Te.Fragment,{children:[(0,wr.cloneElement)(o,{ref:a}),(0,Te.jsx)(Z,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:a,onClose:s,position:e,className:h("polpo-tooltip",e),closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:100,closeAnimationClassName:"close-animation",children:(0,Te.jsx)("span",{className:"tooltip-content",children:t})})]})};var qo=require("react/jsx-runtime"),Hn=({children:e,value:o,position:t,offset:r,tooltipText:n,tooltipCopiedText:a,copiedTextTimeout:i=500})=>{let[s,l]=(0,Rr.useState)(!1);return(0,qo.jsx)(Ie,{content:s&&a?a:n,position:t,offset:r,children:(0,qo.jsx)("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(o),setTimeout(()=>l(!1),i)},children:e})})};var $=require("react/jsx-runtime"),Pr={small:1,regular:1.2,large:1.4},kr={small:2,regular:2.5,large:3},et=({name:e,value:o,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",label:u,leftLabel:m,rightLabel:f,width:b="regular",size:g="regular",dotHoverSize:y=1.3,padding:w=.25,leftIcon:C,rightIcon:x,internalLeftIcon:T,internalRightIcon:k,leftIconTooltip:E,rightIconTooltip:A,color:F})=>{let G=(0,Sr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:W}=N({onChange:le=>t(le.target.checked),onBlur:r,onFocus:n}),v=Pr[g]??Pr.regular,S=(kr[b]??kr.regular)*v,te=Math.min(w,v);return(0,$.jsxs)("section",{className:h("polpo-switch-container",a,F&&`color-${F}`),style:{...i,"--width":`${S}em`,"--dot-size":`${v}em`,"--dot-hover-size":`${v*Math.min(Math.max(y,1),2)}em`,"--padding":`${te}em`},children:[m?(0,$.jsx)(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:G,children:m}):null,C!==void 0&&(0,$.jsx)(Ie,{content:E,disabled:!E,offset:10,children:(0,$.jsx)(C,{size:`${v*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!o)})}),(0,$.jsxs)("section",{className:h("polpo-switch",o&&"is-checked",!c&&l&&"is-readonly"),children:[T!==void 0&&(0,$.jsx)("span",{className:"switch-internal-left-icon",children:(0,$.jsx)(T,{size:`${v*.7}em`})}),k!==void 0&&(0,$.jsx)("span",{className:"switch-internal-right-icon",children:(0,$.jsx)(k,{size:`${v*.7}em`})}),(0,$.jsx)("span",{className:"polpo-switch-dot"}),(0,$.jsx)("input",{id:G,type:"checkbox",name:e,className:`polpo-switch-checkbox ${a}`,style:i,checked:o,autoFocus:s,autoComplete:d,placeholder:p,disabled:c||l,...W})]}),x!==void 0&&(0,$.jsx)(Ie,{content:A,disabled:!A,offset:10,children:(0,$.jsx)(x,{size:`${v*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!o)})}),u||f?(0,$.jsx)(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:G,children:u||f}):null]})},zn=({rules:e,...o})=>(0,$.jsx)(I,{Component:et,defaultValue:!1,inputProps:o,rules:e});et.Controller=zn;var Er=require("react/jsx-runtime"),$n=({alt:e="",loading:o="eager",...t})=>(0,Er.jsx)("img",{loading:o,alt:e,...t,width:"100%"});var He=require("react");var Mr=require("react"),go=require("react-icons/md");var ee=require("react/jsx-runtime"),Ir=({header:e,sortBy:o,icon:t,width:r,field:n,toggleSortField:a,sortField:i,orderField:s,hidden:l})=>{let c=o!==void 0?o:n,p=c?()=>a(c):void 0,d=(0,Mr.useMemo)(()=>c?(0,ee.jsx)("span",{className:"sort-icon",children:!!i&&i===c&&(s==="asc"?(0,ee.jsx)(go.MdArrowUpward,{}):(0,ee.jsx)(go.MdArrowDownward,{}))}):null,[c,i,s]);return l?null:(0,ee.jsxs)("th",{style:{width:r},className:h(c&&"sort-on-click"),onClick:p,children:[(0,ee.jsxs)(De,{flow:"column",gap:"0.5em",jc:"space-between",ai:"center",children:[t?(0,ee.jsx)(t,{}):null,(0,ee.jsx)(R,{variant:"label",noPadding:!0,children:e}),d]}),(0,ee.jsx)(ge,{color:"var(--color-primary-700)"})]})};var ho=require("react/jsx-runtime"),Bn=(e,{field:o,render:t,Component:r},n)=>{if(o&&e[o])return(0,ho.jsx)(R,{noPadding:!0,nowrap:!0,children:e[o]});if(t)return t(e,n);if(r)return(0,ho.jsx)(r,{data:e,rowKey:n})},Lr=(e,o,t)=>o.map((r,n)=>r.hidden?null:(0,ho.jsx)("td",{children:Bn(e,r,t)},n)),Or=(e,o,t)=>o?e.toSorted((r,n)=>{let a=r[o],i=n[o];return["number","boolean","string"].includes(typeof a)&&["number","boolean","string"].includes(typeof i)?a===i?0:t==="asc"?a>i?1:-1:a>i?-1:1:0}):e;var bo=require("react"),Nr=()=>{let[[e,o],t]=(0,bo.useState)([null,null]),r=(0,bo.useCallback)(n=>{t(([a,i])=>n!==a?[n,"asc"]:i==="asc"?[n,"desc"]:[null,null])},[]);return{sortBy:e,order:o,toggleSortField:r}};var Dr=require("react/jsx-runtime"),Ar=({data:e,columns:o,isSelected:t=!1,selectable:r=!1,rowKey:n})=>(0,Dr.jsx)("tr",{className:h(r&&t&&"row-selected"),children:Lr(e,o,n)});var oe=require("react/jsx-runtime"),Gn=({columns:e,data:o,width:t,selectable:r=!1,rowId:n,className:a="",tableClassName:i=""})=>{let[s,l]=(0,He.useState)({}),{sortBy:c,order:p,toggleSortField:d}=Nr(),u=(0,He.useMemo)(()=>{let f=[...e];return r&&(f=[{header:`${Object.values(s).length}`,render:(b,g)=>(0,oe.jsx)(he,{name:`selected-${g}`,value:`${g}`in s,setValue:y=>{l(w=>{let C={...w};return y?C[`${g}`]=b:delete C[`${g}`],C})}})},...f]),f},[e,r,s]),m=(0,He.useMemo)(()=>Or(o,c,p),[o,c,p]);return(0,oe.jsx)("section",{className:h("polpo-smart-table-container",a),children:(0,oe.jsxs)("table",{className:h("polpo-smart-table",i,t==="content"&&"layout-fixed",t==="scroll"&&"layout-scrollable"),children:[(0,oe.jsx)("thead",{children:(0,oe.jsx)("tr",{children:u.map((f,b)=>(0,oe.jsx)(Ir,{toggleSortField:d,sortField:c,orderField:p,...f},b))})}),(0,oe.jsx)("tbody",{children:m.map(f=>(0,oe.jsx)(Ar,{rowKey:f[n],data:f,columns:u,isSelected:`${f[n]}`in s,selectable:r},f[n]))})]})})};var se=require("react");var ue=require("react");var ze=require("react/jsx-runtime");var ot={top:0,left:0,width:0,height:0};var Fr=({tabs:e=[],variant:o="solid",radius:t="full",direction:r="horizontal",color:n,children:a,openTab:i,size:s="medium",className:l="",style:c={}})=>{let p=(0,ue.useRef)(null),d=(0,ue.useRef)(null),[u,m]=(0,ue.useState)(!1),[f,b]=(0,ue.useState)(ot);return(0,ue.useEffect)(()=>{let g=d.current?.getBoundingClientRect()??ot,y=p.current?.getBoundingClientRect()??ot,w=g.width,C=o==="line"?2:g.height,x=g.left-y.left,T=o==="line"?g.top+g.height-y.top:g.top-y.top;b({left:x,top:T,width:w,height:C}),u||setTimeout(()=>{m(!0)},100)},[u,o,i]),(0,ze.jsxs)("section",{className:h("polpo-tab-list",o&&`variant-${o}`,s&&`size-${s}`,t&&`radius-${t}`,n&&`color-${n}`,r==="vertical"&&"vertical-direction",l),ref:p,style:c,children:[!!o&&(0,ze.jsx)("span",{className:h("polpo-tabs-selector",u&&"active"),style:f}),e.map(({id:g,label:y})=>(0,ze.jsx)(Le.Tab,{id:g,ref:g===i?d:void 0,children:y},g)),a]})};var vo=require("react/jsx-runtime"),tt=(0,se.createContext)(null),Hr=e=>{let o=(0,se.useContext)(tt);if(!o)throw new Error("You cant use this component out off an Tabs component");let{openTab:t,changeOpenTab:r}=o;return[t===e,()=>r(e)]},Un=()=>{let e=(0,se.useContext)(tt);if(!e)throw new Error("You cant use this component out off an Tabs component");return e},Le=({children:e,defaultOpenTab:o,onChange:t})=>{let[r,n]=(0,se.useState)(o);return(0,se.useEffect)(()=>{t&&t(r)},[r,t]),(0,vo.jsx)(tt.Provider,{value:{openTab:r,changeOpenTab:a=>n(a)},children:e})},Vn=({id:e,children:o,className:t="",style:r={},onClick:n,ref:a})=>{let[i,s]=Hr(e),l=c=>{s(),n&&n(c)};return(0,vo.jsx)("span",{className:h("polpo-tab",t,i&&"is-open"),style:r,onClick:l,ref:a,children:o})},Yn=({id:e,children:o})=>{let[t]=Hr(e);return t?o:null},_n=({children:e,...o})=>{let{openTab:t}=Un();return(0,vo.jsx)(Fr,{...o,openTab:t,children:e})};Le.Tab=Vn;Le.TabPanel=Yn;Le.TabList=_n;0&&(module.exports={Accordion,AccordionItem,ActionModal,AsideModal,Backdrop,Badge,BadgeRounded,Button,Checkbox,ClickToCopy,ConfirmationModal,Cursor,DatePicker,Field,FieldOrientation,FieldVariant,FlipCard,HoverCard,Image,InfinityScroll,Input,InputColor,InputFile,InputNumber,InputPassword,Line,LineOrientation,LineStyle,Menu,Modal,ModalBackdrop,Portal,Radio,Ripple,Select,SlideCard,Slider,SmartTable,Switch,Tabs,Textarea,Tooltip,Typography,useAccordionItem});
|
|
2
|
+
"use strict";var jr=Object.create;var Yo=Object.defineProperty;var Wr=Object.getOwnPropertyDescriptor;var Xr=Object.getOwnPropertyNames;var Qr=Object.getPrototypeOf,Zr=Object.prototype.hasOwnProperty;var Kr=(o,e)=>{for(var t in e)Yo(o,t,{get:e[t],enumerable:!0})},lt=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Xr(e))!Zr.call(o,n)&&n!==t&&Yo(o,n,{get:()=>e[n],enumerable:!(r=Wr(e,n))||r.enumerable});return o};var Re=(o,e,t)=>(t=o!=null?jr(Qr(o)):{},lt(e||!o||!o.__esModule?Yo(t,"default",{value:o,enumerable:!0}):t,o)),Jr=o=>lt(Yo({},"__esModule",{value:!0}),o);var Xn={};Kr(Xn,{Accordion:()=>en,AccordionItem:()=>pn,ActionModal:()=>Io,AsideModal:()=>xn,Backdrop:()=>We,Badge:()=>dn,BadgeRounded:()=>Vt,Button:()=>ze,Checkbox:()=>bo,ClickToCopy:()=>$n,ColorTypes:()=>Ao,ConfirmationModal:()=>Tn,Cursor:()=>mn,DatePicker:()=>Ue,Field:()=>H,FieldOrientation:()=>Ge,FieldVariant:()=>Be,FlipCard:()=>tn,HoverCard:()=>cn,Image:()=>Gn,InfinityScroll:()=>Je,Input:()=>Ve,InputColor:()=>Xe,InputFile:()=>Qe,InputNumber:()=>Ze,InputPassword:()=>_e,Line:()=>Do,LineOrientation:()=>ft,LineStyle:()=>ht,Menu:()=>q,Modal:()=>Z,ModalBackdrop:()=>er,Portal:()=>je,Radio:()=>Ke,RadiusTypes:()=>Pe,Ripple:()=>go,Select:()=>uo,SizeTypes:()=>wo,SlideCard:()=>Ee,Slider:()=>ot,SmartTable:()=>Vn,Switch:()=>rt,Tabs:()=>No,Textarea:()=>et,Tooltip:()=>Oo,Typography:()=>R,VariantTypes:()=>ke,useAccordionItem:()=>Se});module.exports=Jr(Xn);var Ao=(p=>(p.DEFAULT="default",p.PRIMARY="primary",p.SECONDARY="secondary",p.TERTIARY="tertiary",p.ACCENT="accent",p.HIGHLIGHT="highlight",p.ACTIVE="active",p.WARNING="warning",p.ALERT="alert",p.INFO="info",p))(Ao||{}),wo=(r=>(r.SMALL="small",r.REGULAR="regular",r.LARGE="large",r))(wo||{}),ke=(n=>(n.SOLID="solid",n.FLAT="flat",n.OUTLINED="outlined",n.TEXT="text",n))(ke||{}),Pe=(a=>(a.NONE="none",a.SMALL="small",a.MEDIUM="medium",a.LARGE="large",a.FULL="full",a))(Pe||{});var K=require("react");var ct=require("clsx"),pt=require("tailwind-merge"),g=(...o)=>(0,pt.twMerge)((0,ct.clsx)(o));var Ro=(o,e=2)=>{if(o===0)return"0 Bytes";let t=1e3,r=e<0?0:e,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(o)/Math.log(t));return parseFloat((o/Math.pow(t,a)).toFixed(r))+" "+n[a]};var dt=({c:o,m:e,offset:t,position:r})=>{let n=o.y+o.h+t,a=o.x-(e.w-o.w)*(50/100);switch(r){case"top":case"top center":n=o.y-e.h-t,a=o.x-(e.w-o.w)/2;break;case"top left":n=o.y-e.h-t,a=o.x-e.w+o.w;break;case"top right":n=o.y-e.h-t,a=o.x;break;case"bottom":case"bottom center":n=o.y+o.h+t,a=o.x-(e.w-o.w)/2;break;case"bottom left":n=o.y+o.h+t,a=o.x-e.w+o.w;break;case"bottom right":n=o.y+o.h+t,a=o.x;break;case"left":case"left center":n=o.y-(e.h-o.h)/2,a=o.x-e.w-t;break;case"left top":n=o.y-e.h+o.h,a=o.x-e.w-t;break;case"left bottom":n=o.y,a=o.x-e.w-t;break;case"right":case"right center":n=o.y-(e.h-o.h)/2,a=o.x+o.w+t;break;case"right top":n=o.y-e.h+o.h,a=o.x+o.w+t;break;case"right bottom":n=o.y,a=o.x+o.w+t;break}return{left:Math.round(a),top:Math.round(n)}},qr=({top:o,left:e},t,r,n)=>{let a=t.split(" "),i=[],s=e+n.w+r-window.innerWidth,l=o+n.h+r-window.innerHeight;for(let c of a)c==="top"&&o<r?i.push("bottom"):c==="left"&&e<r?i.push("right"):c==="bottom"&&l>0?i.push("top"):c==="right"&&s>0?i.push("left"):i.push(c);return i.join(" ")},on=({top:o,left:e},t,r)=>{let n=e+t.w+r-window.innerWidth,a=o+t.h+r-window.innerHeight;return e=n>0?e-n:e,o=a>0?o-a:o,e=e<r?r:e,o=o<r?r:o,{top:o,left:e}},mt=({c:o,m:e,offset:t,windowOffset:r,position:n})=>{let a={c:o,m:e,offset:t,position:n},i=dt(a),s=qr(i,n,r,e);s!==n&&(i=dt({...a,position:s}));let l=on(i,e,r);return{left:`${l.left}px`,top:`${l.top}px`}};var ut=({position:o,windowOffset:e})=>{switch(o){case"center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case"top":case"top center":return{top:`${e}px`,left:"50%",transform:"translateX(-50%)"};case"top left":case"left top":return{top:`${e}px`,left:`${e}px`};case"top right":case"right top":return{top:`${e}px`,right:`${e}px`};case"bottom":case"bottom center":return{bottom:`${e}px`,left:"50%",transform:"translateX(-50%)"};case"left bottom":case"bottom left":return{bottom:`${e}px`,left:`${e}px`};case"right bottom":case"bottom right":return{bottom:`${e}px`,right:`${e}px`};case"left":case"left center":return{top:"50%",left:`${e}px`,transform:"translateY(-50%)"};case"right":case"right center":return{top:"50%",right:`${e}px`,transform:"translateY(-50%)"}}return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"}};var gt=require("react/jsx-runtime"),ft=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(ft||{}),ht=(r=>(r.SOLID="solid",r.DOTTED="dotted",r.DASHED="dashed",r))(ht||{}),Do=({orientation:o="horizontal",className:e="",style:t={},color:r="currentColor",size:n=1,lineStyle:a="solid",dashedSize:i=1,spacing:s=1})=>(0,gt.jsx)("span",{className:g("polpo-custom-line",o,e,a),style:{...t,"--color":r,"--size":`${n}px`,"--spacing":`${s}px`,"--dashSize":`${i}px`}});var jo=require("react/jsx-runtime"),bt=(0,K.createContext)(null),Se=o=>{let e=(0,K.useContext)(bt);if(!e)throw new Error("You cant use this component out off an Accordion component");let{toggleItem:t,openedItems:r}=e,n=()=>t(o);return[r.includes(o),n]},en=({children:o,className:e="",noSeparators:t,multiple:r,style:n={},defaultOpened:a=[]})=>{let[i,s]=(0,K.useState)(()=>(Array.isArray(a)?a:[a]).reduce((p,d)=>typeof d=="string"?{...p,[d]:!0}:p,{})),l=(0,K.useCallback)(p=>{s(d=>({...r?d:{},[p]:!d[p]}))},[r]),c=(0,K.useMemo)(()=>Object.keys(i).filter(p=>i[p]),[i]);return(0,jo.jsx)(bt.Provider,{value:{toggleItem:l,openedItems:c},children:(0,jo.jsx)("section",{className:g("polpo-accordion",e),style:n,children:(Array.isArray(o)?o:[o]).flatMap((p,d)=>d===0?p:[t?null:(0,jo.jsx)(Do,{orientation:"horizontal"},`${d}.5`),p])})})};var Gt=require("react"),Ut=require("react-icons/fa");var vt=require("react/jsx-runtime"),Ee=({children:o,isOpen:e,className:t="",style:r={}})=>(0,vt.jsx)("section",{className:t,style:{overflow:"hidden",height:e?"auto":0,transition:"height 300ms ease",interpolateSize:"allow-keywords",...r},children:o});var Me=require("react");var ko=require("react/jsx-runtime"),tn=({cardZIndex:o="auto",flipDirection:e="vertical",flipSpeed:t=500,isFlipped:r=!1,children:n})=>{let a=l=>{if(n.length!==2)throw new Error("Component FlipCard requires 2 children");return n[l]},i=(0,Me.useMemo)(()=>`rotate${e==="horizontal"?"Y":"X"}(${r?180:0}deg)`,[e,r]),s=(0,Me.useMemo)(()=>`rotate${e==="horizontal"?"Y":"X"}(${r?0:-180}deg)`,[e,r]);return(0,ko.jsx)("section",{className:g("polpo-flip-card",r&&"is-flipped"),style:{"--cardZIndex":o,"--flipSpeed":`${t}ms`,"--frontRotate":i,"--backRotate":s},children:(0,ko.jsxs)("section",{className:"polpo-flipper",children:[(0,ko.jsx)("section",{className:"front",children:a(0)}),(0,ko.jsx)("section",{className:"back",children:a(1)})]})})};var Eo=require("react");var Le=require("react");var Ie=require("react");var yt=require("react"),X=o=>(0,yt.useMemo)(()=>Object.entries(o).reduce((e,[t,r])=>r?[...e,t]:e,[]).join(" "),[o]);var Po=require("react");function L(o,e,t,r){let n=(0,Po.useRef)(e);(0,Po.useEffect)(()=>{n.current=e},[e]),(0,Po.useLayoutEffect)(()=>{let a=t?.current??window;if(!(a&&a.addEventListener))return;let i=s=>n.current(s);return a.addEventListener(o,i,r),()=>{a.removeEventListener(o,i,r)}},[o,t,r])}var rn=(o,e)=>o.current&&!o.current.contains(e),xt=(o,e)=>{L("keydown",t=>{t.key==="Escape"&&e()}),L("mousedown",t=>{let r=t.target;if(!r?.isConnected)return;(Array.isArray(o)?o:[o]).every(a=>rn(a,r))&&e()})};var nn=require("react");var Tt=require("react");var Wo=require("react"),Oe=(o,e=500)=>{let[t,r]=(0,Wo.useState)(o);return(0,Wo.useEffect)(()=>{let n=setTimeout(()=>r(o),e);return()=>{clearTimeout(n)}},[o,e]),t};var an=require("react");var sn=require("react");var Ct=require("react"),po=(o,e)=>{(0,Ct.useEffect)(()=>{let t=Array.isArray(o)?o:[o],r=new ResizeObserver(e);return t.forEach(n=>n.current&&r.observe(n.current)),()=>{r.disconnect()}},[o,e])};var Xo=require("react"),wt=o=>{let e=document.getElementById(o);return e===null&&(e=document.createElement("div"),e.setAttribute("id",o),document.body.appendChild(e)),e},Rt=o=>{let[e,t]=(0,Xo.useState)(()=>wt(o));return(0,Xo.useEffect)(()=>{let r=document.getElementById(o);if(e===null||r===null){let n=wt(o);t(n)}return()=>{e&&e.parentNode&&process.env.NODE_ENV==="production"&&document.body.removeChild(e)}},[e,o]),e};var kt=require("react");var Ne=require("react");var Ae=require("react");var Qo=require("react");var Pt=require("react"),St=(o,e,t={})=>{(0,Pt.useEffect)(()=>{let r=Array.isArray(o)?o:[o],n=new IntersectionObserver(e,t);return r.forEach(a=>a.current&&n.observe(a.current)),()=>{n.disconnect()}},[e,t,o])};var Et=(o={})=>{let[e,t]=(0,Qo.useState)(!1),r=(0,Qo.useRef)(null);return St(r,([n])=>{t(n.isIntersecting)},o),{ref:r,inView:e}};var So=require("react"),N=({onBlur:o,onFocus:e,onChange:t}={})=>{let[r,n]=(0,So.useState)(!1),a=(0,So.useCallback)(l=>{n(!0),e&&e(l)},[e]),i=(0,So.useCallback)(l=>{n(!1),o&&o(l)},[o]),s=(0,So.useCallback)(l=>{t&&t(l)},[t]);return{isFocus:r,handlers:{onFocus:a,onBlur:i,onChange:s}}};var Zo=require("react"),Ko=o=>{let[e,t]=(0,Zo.useState)(!1);return(0,Zo.useEffect)(()=>{let r=window.matchMedia(o);r.matches!==e&&t(r.matches);let n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[e,o]),e};var Jo=require("react"),Mt=()=>{let o=(0,Jo.useRef)(null),[e,t]=(0,Jo.useState)(!1);return{containerRef:o,isOpen:e,openModal:()=>{t(!0)},closeModal:()=>{t(!1)}}};var ho=require("react");var It=o=>({x:o.x,y:o.y,w:o.width,h:o.height,top:o.top,left:o.left}),Lt=({offset:o=0,windowOffset:e=0,position:t="bottom",modalRef:r,containerRef:n,isOpen:a})=>{let i=(0,ho.useRef)(null),s=(0,ho.useCallback)((c,p)=>{let d=c.current?.getClientRects()[0],f=p.current?.getClientRects()[0];if(!d)return;let m=f?mt({c:It(f),m:It(d),offset:o,windowOffset:e,position:t}):ut({position:t,windowOffset:e});Object.keys(m).forEach(u=>{c.current?.style.setProperty(u,m[u])})},[t,e,o]),l=(0,ho.useCallback)(()=>{a&&s(r,n??i)},[s,a,n,r]);(0,ho.useLayoutEffect)(l,[l]),po(n??i,l),po(r,l),L("resize",l),L("scroll",l,r)};var Q=Re(require("react"),1);var Ot=({transitionDuration:o=0,isOpen:e})=>{let[t,r]=Q.default.useState("CLOSED"),n=(0,Q.useMemo)(()=>t!=="CLOSED",[t]);(0,Q.useEffect)(()=>{document.documentElement.style.overflow=n?"hidden":"auto"},[n]);let a=(0,Q.useCallback)(()=>{["OPENING","OPEN"].includes(t)&&(o>0?(r("CLOSING"),setTimeout(()=>{r("CLOSED")},o)):r("CLOSED"))},[t,o]),i=(0,Q.useCallback)(()=>{["CLOSING","CLOSED"].includes(t)&&(o>0?(r("OPENING"),setTimeout(()=>{r("OPEN")},o)):r("OPEN"))},[t,o]);return(0,Q.useLayoutEffect)(()=>{t==="CLOSED"&&e?i():t==="OPEN"&&!e&&a()},[e,i,a,t]),{isVisible:n,modalState:t}};var qo=require("react");var Nt=(o,e)=>{let{left:t,top:r}=o,n=t+window.scrollX,a=r+window.scrollY,i=e.pageX-n,s=e.pageY-a;return{x:e.pageX,y:e.pageY,elementX:i,elementY:s,elementPositionX:n,elementPositionY:a}},At=o=>{let e=(0,qo.useRef)(null),[t,r]=(0,qo.useState)({x:null,y:null,elementX:null,elementY:null,elementPositionX:null,elementPositionY:null});return L("mousemove",a=>{let{clientX:i,clientY:s}=a;if(r(l=>({...l,x:i,y:s})),o?.current instanceof Element){let l=Nt(o.current.getBoundingClientRect(),a);r(c=>({...c,...l}))}else if(e.current instanceof Element){let l=Nt(e.current.getBoundingClientRect(),a);r(c=>({...c,...l}))}}),{...t,ref:e}};var ln=require("react");var Dt=require("react");var De=require("react");var Ft=require("react");var Ht=require("react");var oe=require("react"),zt=(o,e=0)=>{let[t,r]=(0,oe.useState)(e),n=(0,oe.useCallback)(a=>{r(a!==void 0?a:i=>(i+1)%o.length)},[o.length]);return[o[t],n]};var $t=require("react");var Fe=require("react/jsx-runtime"),cn=({children:o,threshold:e=5,translationZ:t=25,width:r="fit-content",className:n=""})=>{let a=(0,Eo.useRef)(null),i=(0,Eo.useRef)(null),s=(0,Eo.useCallback)(c=>{let p=a.current,d=i.current;if(!p||!d)return;let{clientX:f,clientY:m,currentTarget:u}=c,{clientWidth:b,clientHeight:v}=u,{top:h,left:w}=p.getBoundingClientRect(),C=(f-w)/b,x=(m-h)/v,T=C*2-1,E=((x*2-1)*e).toFixed(2),A=(T*e).toFixed(2);d.style.transform=`perspective(${b}px) rotateX(${-E}deg) rotateY(${A}deg)`,p.style.transform=`perspective(${b}px) translateZ(${t}px)`},[e,t]),l=(0,Eo.useCallback)(c=>{let p=a.current,d=i.current;!p||!d||(d.style.transform=`perspective(${c.currentTarget.clientWidth}px) rotateX(0) rotateY(0)`,p.style.transform=`perspective(${c.currentTarget.clientWidth}px) translateZ(0)`)},[]);return L("mousemove",s,a),L("mouseleave",l,a),(0,Fe.jsx)("span",{ref:a,style:{width:r},className:g("polpo-hover-card",n),children:(0,Fe.jsx)("span",{className:"polpo-hover-card-layer",ref:i,children:o})})};var ee=require("react");var He={hero:"h1",header1:"h1",header2:"h2",header3:"h3",header4:"h4",body:"p",label:"span","label-form":"label",small:"small"},Bt={hero:"hero",header1:"header1",header2:"header2",header3:"header3",header4:"header4",body:"body",label:"label","label-form":"label",small:"small"};var R=({variant:o="body",nowrap:e=!1,className:t="",style:r={},children:n,as:a,weight:i,family:s="primary",noPadding:l=!1,align:c,color:p,htmlFor:d,recommendedWidth:f=!1,...m})=>{let u=(0,ee.useMemo)(()=>He[o]??He.body,[o]);return(0,ee.createElement)(a??u,{...m,className:g("polpo-typography",Bt[o],t,i,p,l&&"no-padding",s==="code"&&"code-family",f&&"recommended-width",typeof e=="number"&&"nowrap-max-lines",e===2&&"nowrap-max-lines-2",e===3&&"nowrap-max-lines-3",e===4&&"nowrap-max-lines-4",e===5&&"nowrap-max-lines-5",e&&"nowrap"),htmlFor:d,style:{textAlign:c,...r}},n)};var J=require("react/jsx-runtime"),Fo=(o,e)=>typeof o=="function"?o(e):o,pn=({title:o,subtitle:e,children:t,icon:r=Ut.FaCaretLeft,startContent:n,content:a,endContent:i,classNames:s={},className:l="",style:c={}})=>{let p=(0,Gt.useMemo)(()=>crypto.randomUUID(),[]),[d,f]=Se(p),m=Fo(o,d),u=Fo(e,d),b=Fo(n,d),v=Fo(a,d)??(0,J.jsxs)("section",{className:g("polpo-accordion-header-content",s?.headerContent),children:[(0,J.jsx)(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:m}),(0,J.jsx)(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:u})]}),h=Fo(i,d)??(0,J.jsx)(r,{className:g("polpo-accordion-toggle-icon",d&&"is-open",s?.toggleIcon)});return(0,J.jsxs)("section",{className:g("polpo-accordion-item",l),style:c,children:[(0,J.jsxs)("section",{className:g("polpo-accordion-header",n&&"has-start-content",d&&"is-open",s?.header),onClick:f,children:[b,v,h]}),(0,J.jsx)(Ee,{isOpen:d,children:(0,J.jsx)("section",{className:g("polpo-accordion-body",s?.body),children:t})})]})};var Yt=require("react/jsx-runtime"),Vt=(a=>(a.NONE="none",a.SMALL="small",a.MEDIUM="medium",a.LARGE="large",a.FULL="full",a))(Vt||{}),dn=({children:o,rounded:e="medium",selected:t=!1,noWrap:r=!1,ref:n})=>(0,Yt.jsx)("span",{className:g("polpo-badge",e&&`rounded-${e}`,t&&"is-selected",r&&"no-wrap"),ref:n,children:o});var te=require("react");var _t=require("react/jsx-runtime"),go=({color:o,disabled:e,duration:t=1e3,timingFunction:r="ease-out",times:n=1,className:a="",style:i={},zIndex:s=1})=>{let l=(0,te.useRef)(null);(0,te.useEffect)(()=>{if(!l.current?.parentElement)return;let p=getComputedStyle(l.current.parentElement).position;["absolute","fixed","sticky","relative"].includes(p)||(l.current.parentElement.style.position="relative")},[]);let c=p=>{let{clientX:d,clientY:f,currentTarget:m}=p,u=m.getBoundingClientRect(),b=(d-u.left)*100/u.width,v=(f-u.top)*100/u.height,h=document.createElement("span");h.classList.add("ripple-effect"),h.style.animationDuration=`${t}ms`,h.style.animationTimingFunction=r,h.style.left=`${b}%`,h.style.top=`${v}%`,o&&(h.style.background=o),m.appendChild(h),setTimeout(()=>{h.remove()},Math.max(t,500)*Math.max(n,1))};return e?null:(0,_t.jsx)("span",{ref:l,onMouseDown:c,className:g("polpo-ripple",a),style:{...i,zIndex:s}})};var re=require("react/jsx-runtime"),ze=({children:o,color:e="default",variant:t="solid",radius:r="medium",size:n="regular",noWrap:a=!1,forIcon:i=!1,isLoading:s=!1,fullWidth:l=!1,disabled:c=!1,className:p="",...d})=>(0,re.jsxs)("button",{...d,disabled:c,className:g("polpo-button",e,t,l&&"full",r&&`radius-${r}`,n&&`size-${n}`,a&&"no-wrap",i&&"icon",p,s&&"is-loading"),children:[o,(0,re.jsx)(go,{disabled:s||c})]});var ne=require("react");var Ho=require("react/jsx-runtime"),mn=()=>{let{x:o,y:e,elementX:t,elementY:r,ref:n}=At(),[a,i]=(0,ne.useState)(!1);if(L("mouseover",l=>{let c=getComputedStyle(l.target).cursor;i(c==="pointer")}),(0,ne.useEffect)(()=>("ontouchstart"in window||navigator.maxTouchPoints||(document.body.style.cursor="none"),()=>{document.body.style.cursor="auto"}),[]),o===null||e===null||"ontouchstart"in window||navigator.maxTouchPoints)return null;let s=`translate3d(${t}px, ${r}px, 0)`;return(0,Ho.jsxs)("section",{className:"polpo-cursor-overlay",ref:n,children:[(0,Ho.jsx)("span",{className:`polpo-cursor outer-circle ${a?"cursor-hover":""}`,style:{transform:s}}),(0,Ho.jsx)("span",{className:`polpo-cursor inner-circle ${a?"cursor-hover":""}`,style:{transform:s}})]})};var jt=require("react"),Wt=require("react-icons/io5");var ae=require("react-hook-form"),$e=require("react/jsx-runtime"),I=({Component:o,inputProps:e,defaultValue:t,rules:r})=>{let{control:n,setValue:a}=(0,ae.useFormContext)(),{name:i,defaultValue:s}=e;return(0,$e.jsx)(ae.Controller,{name:i,control:n,rules:r,defaultValue:s??t,render:({field:{onBlur:l,value:c},fieldState:p})=>(0,$e.jsx)(o,{value:c,error:p.error?.message,invalid:p.invalid,isTouched:p.isTouched,isDirty:p.isDirty,setValue:d=>a(i,d),onBlur:l,...e})})};var ro=require("react/jsx-runtime"),bo=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",icon:d=Wt.IoCheckmarkOutline,label:f,color:m="primary",size:u="regular"})=>{let b=(0,jt.useMemo)(()=>crypto.randomUUID(),[]),{handlers:v}=N({onChange:C=>t(C.target.checked),onBlur:r,onFocus:n}),h=X({"checkbox-container":!0,[a]:!!a,[`color-${m}`]:!!m}),w=X({checkbox:!0,"is-checked":e,[`size-${u}`]:!!u});return(0,ro.jsxs)("section",{className:h,style:i,onClick:C=>C.stopPropagation(),children:[(0,ro.jsxs)("section",{className:w,children:[(0,ro.jsx)("section",{className:"checkbox-fill",children:(0,ro.jsx)(d,{size:"1.3em",className:"checkbox-icon"})}),(0,ro.jsx)("input",{id:b,type:"checkbox",name:o,className:"checkbox-input",checked:e,autoFocus:s,autoComplete:p,disabled:c||l,...v})]}),f?(0,ro.jsx)(R,{variant:"label-form",htmlFor:b,className:"checkbox-label",children:f}):null]})},un=({rules:o,...e})=>(0,ro.jsx)(I,{Component:bo,defaultValue:!1,inputProps:e,rules:o});bo.Controller=un;var Zt=require("react");var Qt=require("react-icons/im");var Be=(r=>(r.FULL_BORDER="full-border",r.CONTENT_BORDER="content-border",r.CONTENT_LINE="line",r))(Be||{}),Ge=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(Ge||{});var Y=require("react/jsx-runtime"),Xt=({icon:o,className:e,onClick:t})=>o?(0,Y.jsx)(o,{className:e,onClick:t}):(0,Y.jsx)("span",{}),H=({id:o,label:e,leftIcon:t,rightIcon:r,errorIcon:n=Qt.ImCross,error:a,onClickLeftIcon:i,onClickRightIcon:s,fieldOrientation:l="vertical",children:c,isFocus:p=!1,variant:d,ref:f})=>{let m=X({"form-field":!0,focus:p,error:!!a,"variant-content-border":d==="content-border","variant-content-line":d==="line","variant-full-border":d==="full-border","variant-inline":l==="horizontal"}),u=b=>v=>{v.stopPropagation();let h=document.getElementById(o);h?.focus(),h?.click(),b&&b()};return(0,Y.jsxs)("section",{className:m,ref:f,children:[e?(0,Y.jsx)(R,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:o,children:e}):null,(0,Y.jsxs)("section",{className:"field-content",children:[Xt({className:"field-left-icon",icon:t,onClick:u(i)}),(0,Y.jsx)("section",{className:"field-children",children:c}),Xt({className:"field-right-icon",icon:r,onClick:u(s)})]}),!!a&&(0,Y.jsxs)("section",{className:"field-message",children:[n?(0,Y.jsx)(n,{size:10}):(0,Y.jsx)("span",{}),(0,Y.jsx)(R,{noPadding:!0,variant:"small",children:a})]})]})};var ie=require("react/jsx-runtime"),Ue=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,type:a="date",className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:f="off",isDirty:m=!1,isTouched:u=!1,invalid:b=!1,error:v,...h})=>{let w=(0,Zt.useMemo)(()=>crypto.randomUUID(),[]),{isFocus:C,handlers:x}=N({onBlur:r,onChange:T=>t(T.target.value),onFocus:n});return(0,ie.jsx)(H,{id:w,error:v,isFocus:C,...h,children:(0,ie.jsx)("input",{id:w,type:a,name:o,className:i,style:s,value:e,autoFocus:l,autoComplete:f,placeholder:d,disabled:p,readOnly:c,...x})})},fn=({rules:o,...e})=>(0,ie.jsx)(I,{Component:Ue,defaultValue:"",inputProps:e,rules:o});Ue.Controller=fn;var Kt=require("react");var se=require("react/jsx-runtime"),Ve=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,pattern:a,type:i="text",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:f="",autoComplete:m="off",isDirty:u=!1,isTouched:b=!1,invalid:v=!1,error:h,min:w,max:C,...x})=>{let T=(0,Kt.useMemo)(()=>crypto.randomUUID(),[]),{handlers:P,isFocus:E}=N({onChange:A=>t(A.target.value),onBlur:r,onFocus:n});return(0,se.jsx)(H,{id:T,error:h,isFocus:E,...x,children:(0,se.jsx)("input",{id:T,type:i,name:o,className:s,style:l,value:e,pattern:a,autoFocus:c,autoComplete:m,placeholder:f,disabled:d,readOnly:p,min:w,max:C,...P})})},hn=({rules:o,...e})=>(0,se.jsx)(I,{Component:Ve,defaultValue:"",inputProps:e,rules:o});Ve.Controller=hn;var Ye=require("react"),ce=require("react-icons/fi"),Jt=require("react-icons/io");var le=require("react/jsx-runtime"),_e=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",isDirty:f=!1,isTouched:m=!1,invalid:u=!1,error:b,...v})=>{let h=(0,Ye.useMemo)(()=>crypto.randomUUID(),[]),[w,C]=zt(["password","text"]),{isFocus:x,handlers:T}=N({onBlur:r,onChange:E=>t(E.target.value),onFocus:n}),P=(0,Ye.useMemo)(()=>w==="password"?ce.FiEye:w==="text"?ce.FiEyeOff:Jt.IoIosWarning,[w]);return(0,le.jsx)(H,{id:h,error:b,isFocus:x,...v,rightIcon:P,onClickRightIcon:()=>C(),children:(0,le.jsx)("input",{id:h,type:w,name:o,className:a,style:i,value:e,autoFocus:s,autoComplete:d,placeholder:p,disabled:c,readOnly:l,...T})})},gn=({rules:o,...e})=>(0,le.jsx)(I,{Component:_e,defaultValue:"",inputProps:e,rules:o});_e.Controller=gn;var lr=Re(require("color"),1),j=require("react"),me=require("react-colorful"),cr=require("react-icons/fa6"),pr=Re(require("use-eye-dropper"),1);var _=require("react"),rr=require("react-icons/im");var pe=require("react");var qt=require("react-dom");var je=({children:o,id:e})=>{let t=Rt(e);return t===null?null:(0,qt.createPortal)(o,t)};var or=require("react");var tr=require("react/jsx-runtime"),er=(n=>(n.OPAQUE="opaque",n.TRANSPARENT="transparent",n.BLUR="blur",n.NONE="none",n))(er||{}),We=({opacity:o=.6,backdrop:e="blur",zIndex:t,backdropOnClick:r,modalState:n})=>{let a=(0,or.useMemo)(()=>({opaque:{background:`hsl(from var(--color-background-paper) h s l / ${o*100}%)`},transparent:{background:"transparent"},blur:{background:`hsl(from var(--color-background-paper) h s l / ${o*100}%)`,backdropFilter:"blur(5px)"},none:{display:"none"}})[e]??{},[e,o]);return e==="none"?null:(0,tr.jsx)("section",{tabIndex:-1,onClick:r,className:g("polpo-modal-backdrop",n==="CLOSING"||n==="CLOSED"&&"backdrop-close"),style:{zIndex:t,...a}})};var Mo=require("react/jsx-runtime"),Z=({id:o,children:e,isOpen:t,onClose:r,className:n="",style:a={},rootStyle:i={},animation:s="fade-down",closeAnimationClassName:l="modal-close",modalRef:c,closeOnClickOutside:p=!0,transitionDuration:d=300,windowOffset:f=10,offset:m=20,position:u,containerRef:b,zIndex:v=1e3,...h})=>{let w=(0,pe.useMemo)(()=>crypto.randomUUID(),[]),C=(0,pe.useRef)(null),{modalState:x,isVisible:T}=Ot({transitionDuration:d,isOpen:t});return Lt({modalRef:c??C,containerRef:b,offset:m,windowOffset:f,position:u,isOpen:T}),xt(c??C,()=>{t&&p&&r()}),T?(0,Mo.jsxs)(je,{id:`modal-${o}-${w}`,children:[(0,Mo.jsx)(We,{...h,modalState:x,zIndex:v}),(0,Mo.jsx)("section",{className:"polpo-modal",ref:c??C,style:{maxWidth:`calc(100dvw - ${f*2}px)`,maxHeight:`calc(100dvh - ${f*2}px)`,...i,zIndex:+v+1},children:(0,Mo.jsx)("section",{style:{...a,animationDuration:`${d}ms`},className:g("polpo-modal-content",n,!!s&&s!=="none"&&`animation-${s}`,x==="CLOSING"||x==="CLOSED"&&l),children:e})})]}):null};var V=require("react/jsx-runtime"),nr=(0,_.createContext)(null),vn=()=>{let o=(0,_.useContext)(nr);if(!o)throw new Error("useActionModalContext must be used within a ActionModal");return o},Io=({children:o,isOpen:e,onClose:t,actionRequired:r,icon:n,noCloseButton:a,lineOnTop:i=!1,backCard:s=!1,noPadding:l=!1,className:c="",style:p={},...d})=>{let[f,m]=(0,_.useState)(!1),u=(0,_.useRef)(null),b=(0,_.useCallback)(()=>{u.current?.classList.add("shake-animation"),setTimeout(()=>{u.current?.classList.remove("shake-animation")},500)},[]);return(0,V.jsx)(nr.Provider,{value:{onClose:t,isActionInProgress:f,setIsActionInProgress:m},children:(0,V.jsx)(Z,{className:"polpo-action-modal",id:"action-modal",animation:"bounce",opacity:.8,isOpen:e,onClose:t,...d,backdropOnClick:r?b:t,position:"center",children:(0,V.jsx)("section",{ref:u,className:"polpo-modal-content",children:(0,V.jsxs)("section",{className:g("polpo-action-modal-content",s&&"back-card",i&&"line-on-top",l&&"no-padding"),children:[!a&&!r&&(0,V.jsx)("section",{className:"close-modal-button",onClick:()=>t(),children:(0,V.jsx)(rr.ImCross,{})}),n?(0,V.jsx)(R,{variant:"header4",className:"action-modal-icon",children:(0,V.jsx)(n,{})}):null,(0,V.jsx)("section",{className:"polpo-action-modal-body",children:(0,V.jsx)("section",{className:`polpo-action-modal-content ${c}`,style:p,children:o})})]})})})})},yn=({onClick:o,children:e,isLoading:t,...r})=>{let{onClose:n,isActionInProgress:a,setIsActionInProgress:i}=vn(),[s,l]=(0,_.useState)(!1),c=(0,_.useCallback)(()=>{l(!0),i(!0);let p=o();p instanceof Promise?p.then(()=>{n(),l(!1),i(!1)}):(n(),l(!1),i(!1))},[o,n,i]);return!s&&a?null:(0,V.jsx)(ze,{...r,onClick:c,isLoading:t||s,children:e})};Io.ActionButton=yn;var ar=require("react"),ir=require("react-icons/im");var Lo=require("react/jsx-runtime"),xn=({children:o,isOpen:e,onClose:t,position:r="left",size:n,className:a="",...i})=>{let s=(0,ar.useMemo)(()=>({top:{height:n,width:"100%"},left:{height:"100%",width:n},right:{height:"100%",width:n},bottom:{height:n,width:"100%"}})[r],[r,n]);return(0,Lo.jsxs)(Z,{id:"aside",isOpen:e,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:g("polpo-aside-modal",a,r),rootStyle:s,backdropOnClick:t,position:r,...i,children:[(0,Lo.jsx)("span",{className:"close-modal-button",onClick:t,children:(0,Lo.jsx)(ir.ImCross,{})}),(0,Lo.jsx)("section",{className:"polpo-aside-modal-content",children:o})]})};var no=require("react/jsx-runtime"),Tn=({title:o,onAccept:e,onReject:t=()=>null,acceptText:r,rejectText:n,children:a,isLoading:i,...s})=>(0,no.jsx)(Io,{...s,backCard:!0,children:(0,no.jsxs)("section",{className:"polpo-confirmation-modal",children:[(0,no.jsx)(R,{variant:"header4",children:o}),(0,no.jsx)("section",{children:a}),(0,no.jsxs)("section",{className:"polpo-confirmation-modal-actions",children:[!i&&(0,no.jsx)(Io.ActionButton,{variant:"flat",onClick:t,children:n}),(0,no.jsx)(Io.ActionButton,{isLoading:i,onClick:e,children:r})]})]})});var de=require("react");var O=require("react/jsx-runtime"),q=({children:o,isOpen:e,onClose:t,id:r,menuContentRef:n,contentClassName:a="",contentStyle:i={},className:s="",...l})=>(0,O.jsx)(Z,{className:g("polpo-menu-modal",s),...l,id:`menu-${r}`,isOpen:e,onClose:t,children:(0,O.jsx)("ul",{className:`polpo-menu-content ${a}`,role:"listbox",style:i,ref:n,children:o})}),Cn=({children:o,label:e="",asCheckbox:t,icon:r,id:n,disabled:a=!1,selected:i=!1,className:s="",style:l={},onClick:c=()=>null,...p})=>{let d=(0,de.useCallback)(m=>{m.stopPropagation(),a||c(!i)},[a,c,i]),f=(0,de.useMemo)(()=>o||(t?(0,O.jsx)(bo,{className:"menu-checkbox",disabled:a,value:i,setValue:m=>c(m),name:"option",style:{pointerEvents:"none"},size:"small",label:(0,O.jsxs)(O.Fragment,{children:[r!==void 0&&(0,O.jsx)(r,{className:"option-icon"}),(0,O.jsx)(R,{variant:"label",children:e})]})}):(0,O.jsxs)(O.Fragment,{children:[r!==void 0&&(0,O.jsx)(r,{className:"option-icon"}),typeof e=="string"?(0,O.jsx)(R,{variant:"label",children:e}):e]})),[t,o,a,r,e,c,i]);return(0,O.jsxs)("li",{...p,id:n,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":a,onClick:d,className:g("polpo-menu-option",a&&"is-disabled",i&&"is-selected",s),style:l,children:[(0,O.jsx)(go,{zIndex:10}),f]})},wn=()=>(0,O.jsx)("li",{children:(0,O.jsx)(Do,{className:"divider"})}),sr=({children:o,className:e="",...t})=>(0,O.jsx)("li",{tabIndex:-1,className:"polpo-menu-label",children:(0,O.jsx)(R,{...t,variant:"small",className:`menu-group-label ${e}`,children:o})}),Rn=({children:o,label:e,className:t="",style:r={},contentClassName:n="",contentStyle:a={},...i})=>{let s=X({"polpo-menu-group":!0,[t]:!!t});return(0,O.jsxs)("li",{tabIndex:-1,...i,className:s,style:r,children:[e&&(0,O.jsx)(sr,{children:e}),(0,O.jsx)("ul",{className:`polpo-menu-group-content ${n}`,role:"listbox",style:a,children:o})]})};q.Option=Cn;q.Divider=wn;q.GroupLabel=sr;q.Group=Rn;var U=require("react/jsx-runtime"),Xe=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,showValueText:a=!1,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:f="off",isDirty:m=!1,isTouched:u=!1,invalid:b=!1,error:v,...h})=>{let{open:w,isSupported:C}=(0,pr.default)(),[x,T]=(0,j.useState)(e),P=(0,j.useMemo)(()=>crypto.randomUUID(),[]),E=(0,j.useRef)(null),[A,F]=(0,j.useState)(!1),{handlers:G,isFocus:W}=N({onChange:D=>T(D.target.value),onBlur:D=>{to(),r&&r(D)},onFocus:D=>{to(),n&&n(D)}}),y=(0,j.useMemo)(()=>{let D=(0,lr.default)(e===""?"#000000":e);return D.isLight()||D.alpha()<.5?"#000000":"#FFFFFF"},[e]),S=async()=>{let{sRGBHex:D}=await w();t(D)};(0,j.useEffect)(()=>{T(e)},[e]);let to=(0,j.useCallback)(()=>{x.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(x):T(e)},[x,t,e]),lo=X({"input-color-box":!0,[i]:!!i});return(0,U.jsxs)(H,{id:P,error:v,isFocus:W,...h,children:[(0,U.jsxs)("section",{className:"input-color",onClick:D=>{D.stopPropagation(),F(!0)},ref:E,children:[(0,U.jsx)("section",{className:lo,style:{borderColor:y,background:e,color:e,...s}}),a?(0,U.jsx)("input",{id:P,name:o,value:x,placeholder:d,readOnly:c,autoFocus:l,disabled:p,autoComplete:f,className:"color-input",...G}):null]}),(0,U.jsxs)(Z,{id:"input-color",isOpen:A,onClose:()=>F(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:E,className:"input-color-selector",children:[(0,U.jsx)(me.HexAlphaColorPicker,{id:P,color:e,onChange:t}),(0,U.jsxs)("section",{className:"color-input-container",children:[C()?(0,U.jsx)(cr.FaEyeDropper,{onClick:()=>{S()}}):(0,U.jsx)("span",{}),(0,U.jsx)(me.HexColorInput,{className:"color-input",id:P,name:o,color:e,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),(0,U.jsx)("span",{})]})]})]})},kn=({rules:o,...e})=>(0,U.jsx)(I,{Component:Xe,defaultValue:"#147EFB",inputProps:e,rules:o});Xe.Controller=kn;var ao=require("react"),$o=require("react-icons/fa6"),mr=require("react-icons/io"),ue=require("react-icons/pi");var Pn=require("react");var dr=require("react"),zo=({tag:o="section",children:e,className:t,style:r,flow:n,columnSize:a,rowSize:i,column:s,row:l,pc:c,pi:p,ps:d,jc:f,ji:m,js:u,ac:b,ai:v,as:h,gtc:w,gtr:C,gta:x,gt:T,gap:P,...E})=>(0,dr.createElement)(o,{className:t,...E,style:{...r,...n?{gridAutoFlow:n}:{},...a?{gridAutoColumns:a}:{},...i?{gridAutoRows:i}:{},...s?{gridColumn:s}:{},...l?{gridRow:l}:{},...c?{placeContent:c}:{},...p?{placeItems:p}:{},...d?{placeSelf:d}:{},...f?{justifyContent:f}:{},...m?{justifyItems:m}:{},...u?{justifySelf:u}:{},...b?{alignContent:b}:{},...v?{alignItems:v}:{},...h?{alignSelf:h}:{},...w?{gridTemplateColumns:w}:{},...C?{gridTemplateRows:C}:{},...x?{gridTemplateAreas:x}:{},...T?{gridTemplate:T}:{},...P?{gap:P}:{},display:"grid"}},e);var k=require("react/jsx-runtime"),Qe=({name:o,value:e={},setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="Click to upload or drag and drop",autoComplete:d="off",accept:f,multiple:m=!1,limitSize:u=5e6,errorTimeout:b=3e3,label:v})=>{let[h,w]=(0,ao.useState)(null),C=(0,ao.useMemo)(()=>crypto.randomUUID(),[]),{handlers:x}=N({onBlur:r,onFocus:n,onChange:y=>{let{files:S}=y.target;S&&T(S)}});(0,ao.useEffect)(()=>{let y=null;return h!==null&&(y=setTimeout(()=>{w(null)},b)),()=>{y!==null&&clearTimeout(y)}},[h,b]);let T=y=>{let S=m?{...e}:{},to=m?y.length:1;for(let lo=0;lo<to;lo++){let D=y.item(lo);D&&(D.size<u?S[D.name]=D:w(`File '${D.name}' size is larger than ${Ro(u)}`))}t(S)},P=y=>{y.preventDefault(),y.stopPropagation(),y.dataTransfer.files&&y.dataTransfer.files.length&&T(y.dataTransfer.files)},E=(0,ao.useCallback)(y=>({"image/png":ue.PiFilePngFill,"application/pdf":ue.PiFilePdfFill})[y]??mr.IoIosWarning,[]),A=y=>{let S={...e};delete S[y.name],t(S)},F=()=>{t({})},G=(0,ao.useMemo)(()=>Object.values(e).reduce((y,{size:S})=>y+S,0),[e]),W=(y,S)=>{let to=E(y.type);return(0,k.jsxs)("section",{className:"input-file-card",children:[(0,k.jsx)("section",{className:"file-card--image",children:(0,k.jsx)(to,{})}),(0,k.jsxs)(zo,{children:[(0,k.jsx)(R,{variant:"label",noPadding:!0,nowrap:!0,children:y.name}),(0,k.jsx)(R,{noPadding:!0,variant:"small",children:Ro(y.size)})]}),(0,k.jsx)("section",{className:"file-card--delete",onClick:()=>A(y),children:(0,k.jsx)($o.FaRegTrashCan,{})})]},S)};return(0,k.jsxs)("section",{className:"input-file-container",children:[!!v&&(0,k.jsx)(R,{variant:"label-form",htmlFor:C,noPadding:!0,children:v}),(0,k.jsxs)("section",{className:"input-file--box",onDrop:P,children:[(0,k.jsx)("section",{className:"input-file--box--icon",children:(0,k.jsx)($o.FaMagnifyingGlass,{})}),(0,k.jsxs)(zo,{children:[(0,k.jsx)(R,{variant:"label-form",htmlFor:C,noPadding:!0,weight:"bold",children:p}),(0,k.jsxs)(R,{variant:"small",noPadding:!0,children:["Max size (",Ro(u),")"]})]}),(0,k.jsx)("input",{id:C,type:"file",name:o,value:"",placeholder:p,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:a,style:i,accept:f,multiple:m,title:"",...x})]}),h!==null&&(0,k.jsx)(R,{variant:"small",noPadding:!0,className:"error",children:h}),Object.keys(e).length>0&&(0,k.jsxs)(k.Fragment,{children:[m&&(0,k.jsxs)("span",{className:"total-info",children:[(0,k.jsxs)(R,{variant:"small",noPadding:!0,children:[Object.keys(e).length," files - ",Ro(G)]}),(0,k.jsx)("span",{className:"total-info--delete",onClick:F,children:(0,k.jsx)($o.FaRegTrashCan,{})})]}),(0,k.jsx)("section",{className:"input-file--files",children:(0,k.jsx)("section",{className:"input-file--files--content",children:Object.values(e).map(W)})})]})]})},Sn=({rules:o,...e})=>(0,k.jsx)(I,{Component:Qe,defaultValue:{},inputProps:e,rules:o});Qe.Controller=Sn;var vo=require("react");var he=require("react/jsx-runtime"),ur={comma:/(?!^-)[^0-9,]/g,dot:/(?!^-)[^0-9.]/g},fr=(o,e=".")=>{let t=e==="."?ur.dot:ur.comma,r=o.replace(t,"").replace(",",".");return r||""},fe=(o,e)=>!o||Number.isNaN(o)?e(0):e(o),Ze=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,pattern:a,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:f="off",isDirty:m=!1,isTouched:u=!1,invalid:b=!1,error:v,min:h,max:w,decimalSeparator:C,format:x={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...T})=>{let P=(0,vo.useMemo)(()=>crypto.randomUUID(),[]),E=(0,vo.useMemo)(()=>{if(typeof x=="function")return x;let{locales:y,...S}=x;return Intl.NumberFormat(y,S).format},[x]),[A,F]=(0,vo.useState)(fe(e,E)),{handlers:G,isFocus:W}=N({onChange:y=>{let S=fr(y.target.value,C);S.endsWith(".")?F(y.target.value):(F(fe(Number(S),E)),t(Number(S)))},onBlur:y=>{let S=fr(y.target.value,C);F(fe(Number(S),E)),t(Number(S)),r&&r(y)},onFocus:n});return(0,vo.useEffect)(()=>{let y=fe(e,E);A!==y&&F(y)},[E,A,e]),(0,he.jsx)(H,{id:P,error:v,isFocus:W,...T,children:(0,he.jsx)("input",{id:P,type:"text",name:o,className:i,style:s,value:A,pattern:a,autoFocus:l,autoComplete:f,placeholder:d,disabled:p,readOnly:c,min:h,max:w,...G})})},En=({rules:o,...e})=>(0,he.jsx)(I,{Component:Ze,defaultValue:0,inputProps:e,rules:o});Ze.Controller=En;var hr=require("react");var mo=require("react/jsx-runtime"),Ke=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",radioValue:d,label:f,color:m="primary",size:u="regular"})=>{let b=(0,hr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:v}=N({onChange:h=>t(h.target.value),onBlur:r,onFocus:n});return(0,mo.jsxs)("section",{className:g("polpo-radio-container",a,m&&[`color-${m}`]),style:i,children:[(0,mo.jsxs)("section",{className:g("polpo-radio",d===e&&"is-checked",u&&[`size-${u}`]),children:[(0,mo.jsx)("section",{className:"polpo-radio-fill"}),(0,mo.jsx)("input",{id:b,type:"radio",name:o,className:`polpo-radio-input ${a}`,style:i,value:d,checked:d===e,autoFocus:s,autoComplete:p,disabled:c||l,...v})]}),f?(0,mo.jsx)(R,{variant:"label-form",htmlFor:b,className:"polpo-radio-label",children:f}):null]})},Mn=({rules:o,...e})=>(0,mo.jsx)(I,{Component:Ke,defaultValue:"",inputProps:e,rules:o});Ke.Controller=Mn;var z=require("react"),xr=require("react-icons/im"),Tr=require("react-icons/pi");var gr=require("react");var io=require("react/jsx-runtime"),Je=({isLoading:o=!1,hasNextPage:e=!1,loadMore:t,customLoadMoreElement:r,emptyMessage:n,children:a})=>{let{ref:i,inView:s}=Et(),l=Oe(o,100);(0,gr.useEffect)(()=>{e&&s&&!l&&t()},[e,l,t,s]);let c=Array.isArray(a)?a.length>0:!!a;return(0,io.jsxs)(io.Fragment,{children:[a,(0,io.jsxs)("section",{className:"polpo-infinity-scroll",children:[!!n&&!c&&!l&&(0,io.jsx)("p",{className:"empty-message",children:n}),(e||l)&&(r?r(i):(0,io.jsx)("section",{ref:i,className:"loading",children:l&&(0,io.jsx)("span",{className:"loading--icon",children:":D"})}))]})]})};var yo=require("react");var qe=require("react/jsx-runtime"),br=({children:o,value:e})=>{let{multiselect:t,isEqualComparator:r,maxOptions:n,selectedValue:a,setValue:i,setIsOpen:s}=vr(),l=(0,yo.useCallback)((m,u)=>["number","string"].includes(typeof m)?m===u:!!r&&r(m,u),[r]),c=(0,yo.useCallback)(m=>{if(m)if(t){if(n&&Array.isArray(a)&&a.length>=n)return;i([...a,e])}else i(e),s(!1);else t?i(a.filter(u=>!l(u,e))):(i(null),s(!1))},[t,n,a,i,e,s,l]),p=(0,yo.useMemo)(()=>a===""||a===null?!1:Array.isArray(a)?["number","string"].includes(typeof e)?a.includes(e):a.some(m=>!!r&&r(e,m)):l(e,a),[l,r,a,e]),d=(0,yo.useCallback)(m=>{["Enter"," "].includes(m.key)&&(m.preventDefault(),c(!(p&&t)))},[c,p,t]),f=(0,yo.useMemo)(()=>typeof o=="string"?(0,qe.jsx)(R,{"data-value":e,variant:"label",nowrap:!0,children:o}):o,[o,e]);return(0,qe.jsx)(q.Option,{label:f,onKeyDown:d,asCheckbox:t,selected:p,onClick:m=>c(t?m:!0)})};var B=require("react");var xo=require("react/jsx-runtime"),In=({height:o,minHeight:e,containerRef:t,offset:r,windowOffset:n})=>{let[a,i]=(0,B.useState)(void 0),s=(0,B.useCallback)(()=>{let l=t.current?.getBoundingClientRect().bottom??0,c=window.innerHeight-l-n-r-5,p=window.innerHeight-n*3,d=c<e?p:c,f=Math.min(d,o),m=Math.max(f,e);i(`${Math.round(m)}px`)},[t,n,r,e,o]);return(0,B.useEffect)(()=>{s()},[s]),po(t,s),L("resize",s),{h:a}},yr=({children:o,searchQueryValue:e,searchQueryPlaceholder:t="Search option",searchQueryClassName:r="",searchQueryStyle:n={},onSearchQuery:a,containerRef:i,height:s=300})=>{let l=(0,B.useRef)(null),c=(0,B.useRef)(null),[p,d]=(0,B.useState)(""),f=(0,B.useRef)(null),m=Ko("(max-width: 480px)");L("keydown",x=>{if(["ArrowDown","ArrowUp"].includes(x.code)){x.preventDefault();let T=document.activeElement;if(T?.tagName==="LI")switch(x.code){case"ArrowDown":T?.nextSibling?.focus();break;case"ArrowUp":T?.previousElementSibling?.focus();break}}});let u=(0,B.useCallback)(x=>{let{value:T}=x.target;a&&a(T),d(T)},[a]);(0,B.useEffect)(()=>{f.current&&f.current.focus()},[]);let{h:b}=In({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[v,h]=(0,B.useState)(!1),w=(0,B.useCallback)(()=>{let x=Math.round(l.current?.getBoundingClientRect().height??0)+2,T=Math.round(c.current?.scrollHeight??0);h(x>=T)},[]);(0,B.useEffect)(w,[w]),po(l,w),po(c,w),L("resize",w);let C=X({"select-options-header":!0,[r]:!!r});return(0,xo.jsxs)("section",{className:`select-options ${a?"with-search-query":""}`,style:m?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{height:v?"auto":b,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[a&&(0,xo.jsx)("section",{className:C,style:n,children:(0,xo.jsx)("input",{name:"query",className:"input-search",value:e??p,onChange:u,placeholder:t,onClick:x=>x.stopPropagation(),ref:f,autoFocus:!0})}),(0,xo.jsx)("section",{className:"select-options-list-container",ref:l,children:(0,xo.jsx)("ul",{className:"select-options-list",ref:c,children:o})})]})};var M=require("react/jsx-runtime"),Cr=(0,z.createContext)(null),vr=()=>{let o=(0,z.useContext)(Cr);if(!o)throw new Error("useSelectContext must be used within a Select component");return o},Ln=({children:o})=>{let e=(0,z.useMemo)(()=>typeof o=="string"?(0,M.jsx)(R,{noPadding:!0,variant:"label",nowrap:!0,children:o}):o,[o]);return(0,M.jsx)(q.GroupLabel,{children:e})},On=({value:o})=>(0,M.jsx)(R,{variant:"label",nowrap:!0,children:typeof o=="string"||typeof o=="number"?o:JSON.stringify(o)}),Nn=({value:o,multiselect:e})=>e?(0,M.jsx)(R,{noPadding:!0,nowrap:!0,variant:"label",children:`${o.length} item${o.length===1?"":"s"} selected`}):o===null?null:(0,M.jsx)(R,{noPadding:!0,variant:"label",nowrap:!0,children:typeof o=="string"||typeof o=="number"?o:JSON.stringify(o)}),uo=({options:o,isEqualComparator:e,searchQueryValue:t,searchQueryPlaceholder:r,onSearchQuery:n,loadMore:a=()=>null,isLoading:i=!1,hasNextPage:s=!1,emptyMessage:l="No options to select",multiselect:c,optionComponent:p=On,valueComponent:d=Nn,maxOptions:f,children:m,name:u,value:b,setValue:v,onBlur:h,onFocus:w,className:C="",style:x={},showClearOption:T=!1,height:P,searchQueryStyle:E,searchQueryClassName:A,autoFocus:F=!1,readOnly:G=!1,disabled:W=!1,placeholder:y="",autoComplete:S="off",isDirty:to=!1,isTouched:lo=!1,invalid:D=!1,error:Br,...Gr})=>{let Ur=(0,z.useRef)(null),Uo=Ko("(max-width: 480px)"),it=(0,z.useMemo)(()=>crypto.randomUUID(),[]),Te=(0,z.useRef)(null),[Vo,st]=(0,z.useState)(!1),Ce=(0,z.useCallback)(co=>{st(co&&!W)},[W]),Vr=(0,z.useCallback)(co=>{co.stopPropagation(),v(c?[]:null)},[c,v]),we=(0,z.useMemo)(()=>c?b.length>0:!!b,[c,b]),Yr=(0,z.useMemo)(()=>m||o.map((co,_r)=>(0,M.jsx)(uo.Option,{value:co,children:(0,M.jsx)(p,{value:co})},_r)),[p,m,o]);return(0,M.jsx)(Cr.Provider,{value:{selectedValue:b,setValue:v,multiselect:c??!1,isEqualComparator:e,maxOptions:f??null,setIsOpen:st},children:(0,M.jsx)(H,{id:it,error:Br,isFocus:Vo,ref:Te,...Gr,children:(0,M.jsxs)("section",{id:u,style:x,onBlur:h,className:`select ${W?"disabled":""} ${C}`,children:[(0,M.jsxs)("section",{id:it,className:`select-container ${we&&T?"three-columns":""}`,onClick:()=>Ce(!0),children:[(0,M.jsx)("button",{type:"button",className:`input-button ${(Array.isArray(b)?b.length>0:b)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":Vo,onFocus:co=>{Ce(!0),w&&w(co)},children:we?(0,M.jsx)(d,{...c?{value:b,multiselect:c}:{value:b}}):(0,M.jsx)(R,{variant:"label",noPadding:!0,nowrap:!0,children:y})}),we&&T&&(0,M.jsx)("section",{className:"icon-close",onClick:Vr,children:(0,M.jsx)(xr.ImCross,{})}),(0,M.jsx)(Tr.PiCaretDown,{className:`select-caret-icon ${Vo&&"is-select-open"}`})]}),(0,M.jsx)(q,{id:"form-select",isOpen:Vo,onClose:()=>Ce(!1),backdrop:Uo?"blur":"transparent",opacity:Uo?.8:.4,position:Uo?"center":"bottom",offset:5,modalRef:Ur,windowOffset:10,transitionDuration:200,containerRef:Uo?void 0:Te,contentClassName:"select-menu-content",className:"select-options-menu",children:(0,M.jsx)(yr,{containerRef:Te,onSearchQuery:n,searchQueryValue:t,searchQueryPlaceholder:r,searchQueryClassName:A,searchQueryStyle:E,height:P,children:(0,M.jsx)(Je,{isLoading:i,hasNextPage:s,loadMore:a,emptyMessage:l,children:Yr})})})]})})})},An=({rules:o,...e})=>(0,M.jsx)(I,{Component:uo,defaultValue:[],inputProps:{...e,multiselect:!0},rules:o}),Dn=({rules:o,...e})=>(0,M.jsx)(I,{Component:uo,defaultValue:null,inputProps:{...e,multiselect:!1},rules:o}),Fn=o=>{let{multiselect:e}=o;return e?(0,M.jsx)(An,{...o,multiselect:!0}):(0,M.jsx)(Dn,{...o,multiselect:!1})};uo.Controller=Fn;uo.Option=br;uo.OptionLabel=Ln;var wr=require("react");var To=require("react/jsx-runtime"),ot=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,min:a,max:i,step:s,onlySlider:l=!1,className:c="",style:p={},autoFocus:d=!1,readOnly:f=!1,disabled:m=!1,placeholder:u="",autoComplete:b="off",isDirty:v=!1,isTouched:h=!1,invalid:w=!1,error:C,...x})=>{let T=(0,wr.useMemo)(()=>crypto.randomUUID(),[]),P=F=>{r&&r(F);let G=parseInt(`${e}`);a!==void 0&&G<a&&t(a),i!==void 0&&G>i&&t(i),t(G)},{isFocus:E,handlers:A}=N({onBlur:P,onChange:F=>t(+F.target.value),onFocus:n});return(0,To.jsx)(H,{id:T,error:C,isFocus:E,...x,children:(0,To.jsxs)("section",{className:g("polpo-input-slider",E&&"is-focus"),children:[(0,To.jsx)("input",{id:T,type:"range",name:o,className:`polpo-slider ${c}`,style:p,value:e,autoFocus:d,autoComplete:b,placeholder:u,disabled:m,readOnly:f,min:a,max:i,step:s,...A}),!l&&(0,To.jsx)("input",{id:T,type:"number",name:o,className:`polpo-slider-number ${c}`,style:p,value:e,autoComplete:b,disabled:m,readOnly:f,min:a,max:i,step:s,...A})]})})},Hn=({rules:o,...e})=>(0,To.jsx)(I,{Component:ot,defaultValue:0,inputProps:e,rules:o});ot.Controller=Hn;var Rr=require("react");var ge=require("react/jsx-runtime"),et=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,rows:a=4,resize:i="vertical",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:f="",autoComplete:m="off",isDirty:u=!1,isTouched:b=!1,invalid:v=!1,error:h,...w})=>{let C=(0,Rr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:x,isFocus:T}=N({onBlur:r,onChange:P=>t(P.target.value),onFocus:n});return(0,ge.jsx)(H,{id:C,error:h,isFocus:T,...w,children:(0,ge.jsx)("textarea",{id:C,name:o,className:g("polpo-textarea",s),style:{resize:i,...l},value:e,rows:a,...x,autoFocus:c,autoComplete:m,placeholder:f,disabled:d,readOnly:p})})},zn=({rules:o,...e})=>(0,ge.jsx)(I,{Component:et,defaultValue:"",inputProps:e,rules:o});et.Controller=zn;var Mr=require("react");var Pr=require("react");var kr=require("react");var Co=require("react/jsx-runtime"),Oo=({position:o="top",children:e,content:t,offset:r=5,disabled:n=!1})=>{let{containerRef:a,openModal:i,closeModal:s,isOpen:l}=Mt();return L("mouseenter",()=>i(),a),L("mouseleave",()=>s(),a),n?e:(0,Co.jsxs)(Co.Fragment,{children:[(0,kr.cloneElement)(e,{ref:a}),(0,Co.jsx)(Z,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:a,onClose:s,position:o,className:g("polpo-tooltip",o),closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:100,closeAnimationClassName:"close-animation",children:(0,Co.jsx)("span",{className:"tooltip-content",children:t})})]})};var tt=require("react/jsx-runtime"),$n=({children:o,value:e,position:t,offset:r,tooltipText:n,tooltipCopiedText:a,copiedTextTimeout:i=500})=>{let[s,l]=(0,Pr.useState)(!1);return(0,tt.jsx)(Oo,{content:s&&a?a:n,position:t,offset:r,children:(0,tt.jsx)("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(e),setTimeout(()=>l(!1),i)},children:o})})};var $=require("react/jsx-runtime"),Sr={small:1,regular:1.2,large:1.4},Er={small:2,regular:2.5,large:3},rt=({name:o,value:e,setValue:t,onBlur:r,onFocus:n,className:a="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",label:f,leftLabel:m,rightLabel:u,width:b="regular",size:v="regular",dotHoverSize:h=1.3,padding:w=.25,leftIcon:C,rightIcon:x,internalLeftIcon:T,internalRightIcon:P,leftIconTooltip:E,rightIconTooltip:A,color:F})=>{let G=(0,Mr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:W}=N({onChange:lo=>t(lo.target.checked),onBlur:r,onFocus:n}),y=Sr[v]??Sr.regular,S=(Er[b]??Er.regular)*y,to=Math.min(w,y);return(0,$.jsxs)("section",{className:g("polpo-switch-container",a,F&&`color-${F}`),style:{...i,"--width":`${S}em`,"--dot-size":`${y}em`,"--dot-hover-size":`${y*Math.min(Math.max(h,1),2)}em`,"--padding":`${to}em`},children:[m?(0,$.jsx)(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:G,children:m}):null,C!==void 0&&(0,$.jsx)(Oo,{content:E,disabled:!E,offset:10,children:(0,$.jsx)(C,{size:`${y*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!e)})}),(0,$.jsxs)("section",{className:g("polpo-switch",e&&"is-checked",!c&&l&&"is-readonly"),children:[T!==void 0&&(0,$.jsx)("span",{className:"switch-internal-left-icon",children:(0,$.jsx)(T,{size:`${y*.7}em`})}),P!==void 0&&(0,$.jsx)("span",{className:"switch-internal-right-icon",children:(0,$.jsx)(P,{size:`${y*.7}em`})}),(0,$.jsx)("span",{className:"polpo-switch-dot"}),(0,$.jsx)("input",{id:G,type:"checkbox",name:o,className:`polpo-switch-checkbox ${a}`,style:i,checked:e,autoFocus:s,autoComplete:d,placeholder:p,disabled:c||l,...W})]}),x!==void 0&&(0,$.jsx)(Oo,{content:A,disabled:!A,offset:10,children:(0,$.jsx)(x,{size:`${y*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!e)})}),f||u?(0,$.jsx)(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:G,children:f||u}):null]})},Bn=({rules:o,...e})=>(0,$.jsx)(I,{Component:rt,defaultValue:!1,inputProps:e,rules:o});rt.Controller=Bn;var Ir=require("react/jsx-runtime"),Gn=({alt:o="",loading:e="eager",...t})=>(0,Ir.jsx)("img",{loading:e,alt:o,...t,width:"100%"});var Bo=require("react");var Lr=require("react"),be=require("react-icons/md");var oo=require("react/jsx-runtime"),Or=({header:o,sortBy:e,icon:t,width:r,field:n,toggleSortField:a,sortField:i,orderField:s,hidden:l})=>{let c=e!==void 0?e:n,p=c?()=>a(c):void 0,d=(0,Lr.useMemo)(()=>c?(0,oo.jsx)("span",{className:"sort-icon",children:!!i&&i===c&&(s==="asc"?(0,oo.jsx)(be.MdArrowUpward,{}):(0,oo.jsx)(be.MdArrowDownward,{}))}):null,[c,i,s]);return l?null:(0,oo.jsxs)("th",{style:{width:r},className:g(c&&"sort-on-click"),onClick:p,children:[(0,oo.jsxs)(zo,{flow:"column",gap:"0.5em",jc:"space-between",ai:"center",children:[t?(0,oo.jsx)(t,{}):null,(0,oo.jsx)(R,{variant:"label",noPadding:!0,children:o}),d]}),(0,oo.jsx)(go,{color:"var(--color-primary-700)"})]})};var ve=require("react/jsx-runtime"),Un=(o,{field:e,render:t,Component:r},n)=>{if(e&&o[e])return(0,ve.jsx)(R,{noPadding:!0,nowrap:!0,children:o[e]});if(t)return t(o,n);if(r)return(0,ve.jsx)(r,{data:o,rowKey:n})},Nr=(o,e,t)=>e.map((r,n)=>r.hidden?null:(0,ve.jsx)("td",{children:Un(o,r,t)},n)),Ar=(o,e,t)=>e?o.toSorted((r,n)=>{let a=r[e],i=n[e];return["number","boolean","string"].includes(typeof a)&&["number","boolean","string"].includes(typeof i)?a===i?0:t==="asc"?a>i?1:-1:a>i?-1:1:0}):o;var ye=require("react"),Dr=()=>{let[[o,e],t]=(0,ye.useState)([null,null]),r=(0,ye.useCallback)(n=>{t(([a,i])=>n!==a?[n,"asc"]:i==="asc"?[n,"desc"]:[null,null])},[]);return{sortBy:o,order:e,toggleSortField:r}};var Hr=require("react/jsx-runtime"),Fr=({data:o,columns:e,isSelected:t=!1,selectable:r=!1,rowKey:n})=>(0,Hr.jsx)("tr",{className:g(r&&t&&"row-selected"),children:Nr(o,e,n)});var eo=require("react/jsx-runtime"),Vn=({columns:o,data:e,width:t,selectable:r=!1,rowId:n,className:a="",tableClassName:i=""})=>{let[s,l]=(0,Bo.useState)({}),{sortBy:c,order:p,toggleSortField:d}=Dr(),f=(0,Bo.useMemo)(()=>{let u=[...o];return r&&(u=[{header:`${Object.values(s).length}`,render:(b,v)=>(0,eo.jsx)(bo,{name:`selected-${v}`,value:`${v}`in s,setValue:h=>{l(w=>{let C={...w};return h?C[`${v}`]=b:delete C[`${v}`],C})}})},...u]),u},[o,r,s]),m=(0,Bo.useMemo)(()=>Ar(e,c,p),[e,c,p]);return(0,eo.jsx)("section",{className:g("polpo-smart-table-container",a),children:(0,eo.jsxs)("table",{className:g("polpo-smart-table",i,t==="content"&&"layout-fixed",t==="scroll"&&"layout-scrollable"),children:[(0,eo.jsx)("thead",{children:(0,eo.jsx)("tr",{children:f.map((u,b)=>(0,eo.jsx)(Or,{toggleSortField:d,sortField:c,orderField:p,...u},b))})}),(0,eo.jsx)("tbody",{children:m.map(u=>(0,eo.jsx)(Fr,{rowKey:u[n],data:u,columns:f,isSelected:`${u[n]}`in s,selectable:r},u[n]))})]})})};var so=require("react");var fo=require("react");var Go=require("react/jsx-runtime");var nt={top:0,left:0,width:0,height:0};var zr=({tabs:o=[],variant:e="solid",radius:t="full",direction:r="horizontal",color:n,children:a,openTab:i,size:s="medium",className:l="",style:c={}})=>{let p=(0,fo.useRef)(null),d=(0,fo.useRef)(null),[f,m]=(0,fo.useState)(!1),[u,b]=(0,fo.useState)(nt);return(0,fo.useEffect)(()=>{let v=d.current?.getBoundingClientRect()??nt,h=p.current?.getBoundingClientRect()??nt,w=v.width,C=e==="line"?2:v.height,x=v.left-h.left,T=e==="line"?v.top+v.height-h.top:v.top-h.top;b({left:x,top:T,width:w,height:C}),f||setTimeout(()=>{m(!0)},100)},[f,e,i]),(0,Go.jsxs)("section",{className:g("polpo-tab-list",e&&`variant-${e}`,s&&`size-${s}`,t&&`radius-${t}`,n&&`color-${n}`,r==="vertical"&&"vertical-direction",l),ref:p,style:c,children:[!!e&&(0,Go.jsx)("span",{className:g("polpo-tabs-selector",f&&"active"),style:u}),o.map(({id:v,label:h})=>(0,Go.jsx)(No.Tab,{id:v,ref:v===i?d:void 0,children:h},v)),a]})};var xe=require("react/jsx-runtime"),at=(0,so.createContext)(null),$r=o=>{let e=(0,so.useContext)(at);if(!e)throw new Error("You cant use this component out off an Tabs component");let{openTab:t,changeOpenTab:r}=e;return[t===o,()=>r(o)]},Yn=()=>{let o=(0,so.useContext)(at);if(!o)throw new Error("You cant use this component out off an Tabs component");return o},No=({children:o,defaultOpenTab:e,onChange:t})=>{let[r,n]=(0,so.useState)(e);return(0,so.useEffect)(()=>{t&&t(r)},[r,t]),(0,xe.jsx)(at.Provider,{value:{openTab:r,changeOpenTab:a=>n(a)},children:o})},_n=({id:o,children:e,className:t="",style:r={},onClick:n,ref:a})=>{let[i,s]=$r(o),l=c=>{s(),n&&n(c)};return(0,xe.jsx)("span",{className:g("polpo-tab",t,i&&"is-open"),style:r,onClick:l,ref:a,children:e})},jn=({id:o,children:e})=>{let[t]=$r(o);return t?e:null},Wn=({children:o,...e})=>{let{openTab:t}=Yn();return(0,xe.jsx)(zr,{...e,openTab:t,children:o})};No.Tab=_n;No.TabPanel=jn;No.TabList=Wn;0&&(module.exports={Accordion,AccordionItem,ActionModal,AsideModal,Backdrop,Badge,BadgeRounded,Button,Checkbox,ClickToCopy,ColorTypes,ConfirmationModal,Cursor,DatePicker,Field,FieldOrientation,FieldVariant,FlipCard,HoverCard,Image,InfinityScroll,Input,InputColor,InputFile,InputNumber,InputPassword,Line,LineOrientation,LineStyle,Menu,Modal,ModalBackdrop,Portal,Radio,RadiusTypes,Ripple,Select,SizeTypes,SlideCard,Slider,SmartTable,Switch,Tabs,Textarea,Tooltip,Typography,VariantTypes,useAccordionItem});
|
package/dist/components.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.polpo-custom-line{--color: attr(data-color, "currentColor");--size: attr(data-size, 1px);--spacing: attr(data-spacing, 1px);--dashSize: attr(data-dash-size, 1px);&.horizontal,&.vertical{background:var(--color);display:inline-block;border-radius:100px}&.horizontal{width:100%;height:var(--size);&.dotted{background:radial-gradient(calc(var(--size) / 2) calc(var(--size) / 2),var(--color) 100%,transparent) 0 0 / calc(var(--spacing) + var(--size)) 100%}&.dashed{background:repeating-linear-gradient(90deg,var(--color),var(--color) var(--dashSize),transparent var(--dashSize),transparent calc(var(--spacing) + var(--dashSize)))}}&.vertical{height:100%;width:var(--size);&.dotted{background:radial-gradient(calc(var(--size) / 2) calc(var(--size) / 2),var(--color) 100%,transparent) 0 0 / 100% calc(var(--spacing) + var(--size))}&.dashed{background:repeating-linear-gradient(0deg,var(--color),var(--color) var(--dashSize),transparent var(--dashSize),transparent calc(var(--spacing) + var(--dashSize)))}}}}@layer components{.polpo-accordion{display:grid}.polpo-accordion-item{display:grid;position:relative;.polpo-accordion-header{display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px;cursor:pointer;position:sticky;top:0;padding:20px 0;&.has-start-content{grid-template-columns:auto 1fr auto}}.polpo-accordion-header-content{display:grid}.polpo-accordion-toggle-icon{transition:all .3s ease;&.is-open{transform:rotate(-90deg)}}.polpo-accordion-body{padding:10px 0 20px}}}@layer components{.polpo-flip-card{--cardZIndex: attr(data-zIndex);--flipSpeed: attr(data-flipSpeed, .5s);--frontRotate: attr(data-frontRotate);--backRotate: attr(data-backRotate);perspective:1000px;z-index:var(--cardZIndex);.polpo-flipper{height:100%;position:relative;width:100%;transform-style:preserve-3d}.front,.back{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d;transition:var(--flipSpeed);height:100%;left:0;top:0;width:100%}.front{position:relative;transform:var(--frontRotate);z-index:2}.back{position:absolute;transform:var(--backRotate)}.is-flipped{.front{position:absolute}.back{position:relative}}}}@layer components{.polpo-hover-card{display:inline-block;transition:all .3s ease;.polpo-hover-card-layer{transition:all .1s ease;width:100%;height:100%;display:grid}}}@layer components{.polpo-typography{margin:0;padding:.5em 0 .4em;&.primary{color:var(--color-primary-500)}&.secondary{color:var(--color-secondary-500)}&.tertiary{color:var(--color-tertiary-500)}&.active{color:var(--color-active-500)}&.alert{color:var(--color-alert-500)}&.warning{color:var(--color-warning-500)}&.info{color:var(--color-info-500)}&.recommended-width{max-width:70ch}&.code-family{font-family:monospace}&.no-padding{padding:0}&.nowrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}&.nowrap-max-lines{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}&.nowrap-max-lines-2{-webkit-line-clamp:2;line-clamp:2}&.nowrap-max-lines-3{-webkit-line-clamp:3;line-clamp:3}&.nowrap-max-lines-4{-webkit-line-clamp:4;line-clamp:4}&.nowrap-max-lines-5{-webkit-line-clamp:5;line-clamp:5}&.hero{font-size:var(--text-hero, clamp(4rem, 10vw, 5.5rem));line-height:var(--tw-leading, var(--text-hero--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-hero--letter-spacing, -4px));font-weight:var(--tw-font-weight, var(--text-hero--font-weight, bolder))}&.header1{font-size:var(--text-header1, clamp(3rem, 8vw, 4rem));line-height:var(--tw-leading, var(--text-header1--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header1--letter-spacing, -3px));font-weight:var(--tw-font-weight, var(--text-header1--font-weight, bold))}&.header2{font-size:var(--text-header2, clamp(2rem, 6vw, 3rem));line-height:var(--tw-leading, var(--text-header2--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header2--letter-spacing, -2px));font-weight:var(--tw-font-weight, var(--text-header2--font-weight, bold))}&.header3{font-size:var(--text-header3, clamp(1.5rem, 4vw, 2rem));line-height:var(--tw-leading, var(--text-header3--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header3--letter-spacing, -1px));font-weight:var(--tw-font-weight, var(--text-header3--font-weight, bold))}&.header4{font-size:var(--text-header4, clamp(1.2rem, 3vw, 1.5rem));line-height:var(--tw-leading, var(--text-header4--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header4--letter-spacing, 0));font-weight:var(--tw-font-weight, var(--text-header4--font-weight, bold))}&.body{font-size:var(--text-body, 1rem);line-height:var(--tw-leading, var(--text-body--line-height, 1.6));letter-spacing:var(--tw-tracking, var(--text-body--letter-spacing, 0));font-weight:var(--tw-font-weight, var(--text-body--font-weight, regular))}&.label{font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6))}&.small{font-size:var(--text-small, .75rem);line-height:var(--tw-leading, var(--text-small--line-height, 1.6));font-weight:var(--tw-font-weight, var(--text-small--font-weight, regular))}&.bold{font-weight:700}&.regular{font-weight:400}&.light{font-weight:300}}}@layer components{.polpo-badge{--background: attr(data-background, var(--color-primary-500));--text: attr(data-text, var(--color-primary-50));--background-selected: attr(data-background-selected, var(--color-primary-700));--text-selected: attr(data-text-selected, var(--color-primary-50));padding:.4em .8em;border-radius:.3em;border:1px solid;background:var(--background);color:var(--text);transition:all .3s ease;display:inline-block;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));user-select:none;&.no-wrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}&.rounded-none{border-radius:0}&.rounded-small{border-radius:.25em}&.rounded-medium{border-radius:.5em}&.rounded-large{border-radius:1em}&.rounded-full{border-radius:100rem}&:hover,&.is-selected{background:var(--background-selected);color:var(--text-selected)}}}@layer components{.polpo-ripple{position:absolute;display:block;inset:0;overflow:hidden;border-radius:inherit;z-index:1;.ripple-effect{position:absolute;transform:translate(-50%,-50%);border-radius:50%;width:0;height:0;pointer-events:none;animation:ripple-effect infinite;opacity:.4}}@keyframes ripple-effect{to{width:300px;height:300px;opacity:0;filter:blur(5px)}}}@layer components{.polpo-button{--button-blur: 2px;--color: var(--color-gray-800);--solid-background: var(--color-gray-900);--solid-text: var(--color-gray-50);--solid-hover-background: var(--color-gray-800);--solid-active-background: var(--color-gray-900);--flat-background: hsl(from var(--color-gray-100) h s l / 80%);--flat-hover-background: var(--color-gray-50);--flat-active-background: var(--color-gray-100);--outlined-hover-background: hsl(from var(--color-gray-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-gray-100) h s l / 50%);--text-hover-background: hsl(from var(--color-gray-100) h s l / 20%);--text-active-background: hsl(from var(--color-gray-100) h s l / 50%);--shadow-color: hsl(from var(--color-gray-800) h s l / 20%);--focus-background: hsl(from var(--color-gray-100) h s l / 20%);display:flex;flex-direction:row;justify-content:center;align-items:center;padding:.625em 2.1875em;gap:.625em;width:auto;border-radius:.5em;font-weight:700;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));cursor:pointer;outline:none;transition:all .15s ease;user-select:none;&.icon{padding:.625em}&.full{width:100%}&.no-wrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}&.size-small{font-size:var(--text-small, .75rem);line-height:var(--tw-leading, var(--text-small--line-height, 1.6));font-weight:var(--tw-font-weight, var(--text-small--font-weight, regular))}&.size-regular{font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6))}&.size-large{font-size:var(--text-body, 1rem);line-height:var(--tw-leading, var(--text-body--line-height, 1.6));letter-spacing:var(--tw-tracking, var(--text-body--letter-spacing, 0));font-weight:var(--tw-font-weight, var(--text-body--font-weight, regular))}&.radius-none{border-radius:0}&.radius-small{border-radius:.25em}&.radius-medium{border-radius:.5em}&.radius-large{border-radius:1em}&.radius-full{border-radius:100rem}&:not(:disabled){&:hover,&:active,&:focus-visible{backdrop-filter:blur(var(--button-blur))}&:hover{transform:scale(1.01);box-shadow:0 1.4em .5em -1em hsl(from var(--color-black) h s l / 20%),0 .7em 1em -.5em hsl(from var(--color-black) h s l / 20%)}&:active{transform:scale(.98);box-shadow:0 .3em .4em -.2em hsl(from var(--color-black) h s l / 20%),0 .2em .8em -.1em hsl(from var(--color-black) h s l / 20%)}}color:var(--color);.ripple-effect{background:var(--color)}&.solid{background:var(--solid-background);color:var(--solid-text);backdrop-filter:blur(var(--button-blur));.ripple-effect{background:var(--solid-text)}&:focus-visible{box-shadow:0 0 0 .3125em var(--shadow-color);background:var(--solid-background)}&:hover{background:var(--solid-hover-background)}&:active{background:var(--solid-active-background)}}&.flat{background:var(--flat-background);backdrop-filter:blur(var(--button-blur));&:hover{background:var(--flat-hover-background)}&:active{background:var(--flat-active-background)}}&.outlined{background:transparent;border:1px solid;&:hover{background:var(--outlined-hover-background)}&:active{background:var(--outlined-active-background)}}&.text{background:transparent;&:hover{background:var(--text-hover-background)}&:active{background:var(--text-active-background)}}&:focus-visible{box-shadow:0 0 0 .3125em var(--shadow-color);background:var(--focus-background)}&.primary{--color: var(--color-primary-500);--solid-background: var(--color-primary-500);--solid-text: var(--color-primary-50);--solid-hover-background: var(--color-primary-400);--solid-active-background: var(--color-primary-600);--flat-background: hsl(from var(--color-primary-100) h s l / 80%);--flat-hover-background: var(--color-primary-50);--flat-active-background: var(--color-primary-100);--outlined-hover-background: hsl(from var(--color-primary-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-primary-100) h s l / 50%);--text-hover-background: hsl(from var(--color-primary-100) h s l / 20%);--text-active-background: hsl(from var(--color-primary-100) h s l / 50%);--shadow-color: hsl(from var(--color-primary-500) h s l / 20%);--focus-background: hsl(from var(--color-primary-100) h s l / 20%)}&.secondary{--color: var(--color-secondary-500);--solid-background: var(--color-secondary-500);--solid-text: var(--color-secondary-50);--solid-hover-background: var(--color-secondary-400);--solid-active-background: var(--color-secondary-600);--flat-background: hsl(from var(--color-secondary-100) h s l / 80%);--flat-hover-background: var(--color-secondary-50);--flat-active-background: var(--color-secondary-100);--outlined-hover-background: hsl(from var(--color-secondary-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-secondary-100) h s l / 50%);--text-hover-background: hsl(from var(--color-secondary-100) h s l / 20%);--text-active-background: hsl(from var(--color-secondary-100) h s l / 50%);--shadow-color: hsl(from var(--color-secondary-500) h s l / 20%);--focus-background: hsl(from var(--color-secondary-100) h s l / 20%)}&.tertiary{--color: var(--color-tertiary-500);--solid-background: var(--color-tertiary-500);--solid-text: var(--color-tertiary-50);--solid-hover-background: var(--color-tertiary-400);--solid-active-background: var(--color-tertiary-600);--flat-background: hsl(from var(--color-tertiary-100) h s l / 80%);--flat-hover-background: var(--color-tertiary-50);--flat-active-background: var(--color-tertiary-100);--outlined-hover-background: hsl(from var(--color-tertiary-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-tertiary-100) h s l / 50%);--text-hover-background: hsl(from var(--color-tertiary-100) h s l / 20%);--text-active-background: hsl(from var(--color-tertiary-100) h s l / 50%);--shadow-color: hsl(from var(--color-tertiary-500) h s l / 20%);--focus-background: hsl(from var(--color-tertiary-100) h s l / 20%)}&.active{--color: var(--color-active-500);--solid-background: var(--color-active-500);--solid-text: var(--color-active-50);--solid-hover-background: var(--color-active-400);--solid-active-background: var(--color-active-600);--flat-background: hsl(from var(--color-active-100) h s l / 80%);--flat-hover-background: var(--color-active-50);--flat-active-background: var(--color-active-100);--outlined-hover-background: hsl(from var(--color-active-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-active-100) h s l / 50%);--text-hover-background: hsl(from var(--color-active-100) h s l / 20%);--text-active-background: hsl(from var(--color-active-100) h s l / 50%);--shadow-color: hsl(from var(--color-active-500) h s l / 20%);--focus-background: hsl(from var(--color-active-100) h s l / 20%)}&.warning{--color: var(--color-warning-500);--solid-background: var(--color-warning-500);--solid-text: var(--color-warning-50);--solid-hover-background: var(--color-warning-400);--solid-active-background: var(--color-warning-600);--flat-background: hsl(from var(--color-warning-100) h s l / 80%);--flat-hover-background: var(--color-warning-50);--flat-active-background: var(--color-warning-100);--outlined-hover-background: hsl(from var(--color-warning-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-warning-100) h s l / 50%);--text-hover-background: hsl(from var(--color-warning-100) h s l / 20%);--text-active-background: hsl(from var(--color-warning-100) h s l / 50%);--shadow-color: hsl(from var(--color-warning-500) h s l / 20%);--focus-background: hsl(from var(--color-warning-100) h s l / 20%)}&.alert{--color: var(--color-alert-500);--solid-background: var(--color-alert-500);--solid-text: var(--color-alert-50);--solid-hover-background: var(--color-alert-400);--solid-active-background: var(--color-alert-600);--flat-background: hsl(from var(--color-alert-100) h s l / 80%);--flat-hover-background: var(--color-alert-50);--flat-active-background: var(--color-alert-100);--outlined-hover-background: hsl(from var(--color-alert-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-alert-100) h s l / 50%);--text-hover-background: hsl(from var(--color-alert-100) h s l / 20%);--text-active-background: hsl(from var(--color-alert-100) h s l / 50%);--shadow-color: hsl(from var(--color-alert-500) h s l / 20%);--focus-background: hsl(from var(--color-alert-100) h s l / 20%)}&.info{--color: var(--color-info-500);--solid-background: var(--color-info-500);--solid-text: var(--color-info-50);--solid-hover-background: var(--color-info-400);--solid-active-background: var(--color-info-600);--flat-background: hsl(from var(--color-info-100) h s l / 80%);--flat-hover-background: var(--color-info-50);--flat-active-background: var(--color-info-100);--outlined-hover-background: hsl(from var(--color-info-100) h s l / 20%);--outlined-active-background: hsl(from var(--color-info-100) h s l / 50%);--text-hover-background: hsl(from var(--color-info-100) h s l / 20%);--text-active-background: hsl(from var(--color-info-100) h s l / 50%);--shadow-color: hsl(from var(--color-info-500) h s l / 20%);--focus-background: hsl(from var(--color-info-100) h s l / 20%)}&:disabled{color:var(--color-gray-200);pointer-events:none}&.solid:disabled{background:var(--color-gray-200);color:var(--color-gray-50)}&.flat:disabled{background:hsl(from var(--color-gray-50) h s l / 80%)}&.outlined:disabled,&.text:disabled{background:transparent}}}@layer components{.polpo-cursor-overlay{position:fixed;top:0;left:0;width:100%;height:100%;cursor:none;pointer-events:none}.polpo-cursor{position:fixed;border-radius:50%;z-index:99999999;pointer-events:none;transform:translateZ(0);@media(any-pointer:coarse){display:none}&.outer-circle{margin-left:-15px;margin-top:-15px;width:30px;height:30px;border:2px solid var(--color-primary-500);box-sizing:border-box;z-index:99999999;opacity:.5;transition:all .08s ease-out,width .3s ease-in-out,height .3s ease-in-out,margin .3s ease-in-out,opacity .3s ease-in-out;&.cursor-hover{margin-left:-40px;margin-top:-40px;width:80px;height:80px;background-color:var(--color-primary-500);opacity:.3}&.cursor-text{margin-left:-2px;margin-top:-40px;width:4px;height:80px;background-color:var(--color-primary-500);opacity:.3}}&.inner-circle{margin-left:-3px;margin-top:-3px;width:6px;height:6px;z-index:99999999;background-color:var(--color-primary-500);transition:opacity .3s ease-in-out;opacity:1;&.cursor-hover{opacity:0}}}}@layer components{.checkbox{border-radius:40%;background:var(--color-background-paper);transition:all .3s ease;width:1em;height:1em;margin:2px;outline:1px solid;display:flex;position:relative;.checkbox-input{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:2}&.size-small{font-size:1em}&.size-regular{font-size:1.2em}&.size-large{font-size:1.4em}}.checkbox-fill{transition:all .2s ease-out;border-radius:inherit;margin:auto;width:0;height:0;overflow:hidden;position:relative;display:grid;place-content:center;place-items:center;.checkbox-icon{font-size:.7em;z-index:1;opacity:0;transition:opacity .3s ease}}.checkbox-container{--color: var(--color-gray-800);--color-icon: var(--color-gray-50);--color-hover: hsl(from var(--color-gray-800) h s l / 50%);display:grid;grid-auto-flow:column;grid-auto-columns:auto 1fr;align-items:center;gap:.5em;width:fit-content;.checkbox-label{cursor:pointer;user-select:none;width:100%}.checkbox{color:var(--color);&.is-checked{.checkbox-fill{width:100%;height:100%;background:var(--color);color:var(--color-icon)}.checkbox-icon{opacity:1}}}.checkbox:hover,&:has(.checkbox-label:hover) .checkbox{box-shadow:0 0 0 .3em var(--color-hover);.checkbox-fill{width:20%;height:20%;border-radius:20%;background:var(--color-hover);color:var(--color-icon)}&:is(.is-checked){.checkbox-fill{width:100%;height:100%;border-radius:inherit;background:var(--color)}}}.checkbox:focus,&:has(.checkbox-input:focus) .checkbox,&:has(.checkbox-label:focus) .checkbox{box-shadow:0 0 0 .3em var(--color-hover)}&.color-primary{--color: var(--color-primary-500);--color-icon: var(--color-primary-50);--color-hover: hsl(from var(--color-primary-500) h s l / 50%)}&.color-secondary{--color: var(--color-secondary-500);--color-icon: var(--color-secondary-50);--color-hover: hsl(from var(--color-secondary-500) h s l / 50%)}&.color-tertiary{--color: var(--color-tertiary-500);--color-icon: var(--color-tertiary-50);--color-hover: hsl(from var(--color-tertiary-500) h s l / 50%)}&.color-active{--color: var(--color-active-500);--color-icon: var(--color-active-50);--color-hover: hsl(from var(--color-active-500) h s l / 50%)}&.color-warning{--color: var(--color-warning-500);--color-icon: var(--color-warning-50);--color-hover: hsl(from var(--color-warning-500) h s l / 50%)}&.color-alert{--color: var(--color-alert-500);--color-icon: var(--color-alert-50);--color-hover: hsl(from var(--color-alert-500) h s l / 50%)}&.color-info{--color: var(--color-info-500);--color-icon: var(--color-info-50);--color-hover: hsl(from var(--color-info-500) h s l / 50%)}}}@layer components{.form-field{display:grid;grid-auto-columns:auto;gap:.5em;transition:all .2s ease;.field-content{display:grid;grid-template-columns:auto 1fr auto;align-items:center}.field-left-icon,.field-right-icon{font-size:1em}.field-left-icon{margin-right:1em}.field-right-icon{margin-left:1em}.field-message{display:grid;grid-auto-flow:column;gap:5px;align-items:center;justify-content:start}&.variant-content-border{.field-content{border:1px solid var(--color-border);border-radius:4px;padding:1em;background:var(--color-background)}}&.variant-content-line{.field-content{border-bottom:1px solid;padding:.5em 0}}&.variant-full-border{border:1px solid var(--color-border);border-radius:4px;padding:.5em 0;background:var(--color-background);.field-label,.field-content,.field-message{padding:0 1em}}&.variant-inline{grid-auto-flow:column;padding:.5em 0;align-items:center;.field-label{width:auto}}&.error{color:var(--color-alert-500);border-color:var(--color-alert-500)}&.focus{color:var(--color-info-500);border-color:var(--color-info-500)}&.error,&.focus{.field-left-icon,.field-right-icon,.field-children{color:var(--color-foreground);border-color:var(--color-foreground)}}.field-children>*{width:100%}}}@layer components{.polpo-modal{position:fixed;z-index:1001;pointer-events:none}.polpo-modal-content{background:var(--color-background-paper);pointer-events:initial;&.animation-fade-down{animation:fadeInDown .2s ease;&.modal-close{animation:fadeOutUp .2s ease;transform:translateY(-10px);opacity:0}}&.animation-bounce{animation:bounceIn .5s ease;&.modal-close{animation:bounceOut .5s ease;transform:scale3d(.3,.3,.3);opacity:0}}}.polpo-modal-backdrop{position:fixed;width:100%;height:100%;top:0;left:0;z-index:1000;animation:backdropOpen .5s cubic-bezier(.215,.61,.355,1);&.backdrop-close{animation:backdropClose .5s cubic-bezier(.215,.61,.355,1);opacity:0;transform:translateY(-10px)}}@keyframes backdropOpen{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes backdropClose{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-10px)}}}@layer components{.polpo-action-modal{background:transparent;.polpo-modal-content{&.shake-animation{animation:headShake .6s linear}}}.polpo-action-modal-content{position:relative;.polpo-action-modal-body{box-shadow:0 0 10px -5px;border-radius:10px;overflow:hidden;display:grid}.polpo-action-modal-content{background:var(--color-background);padding:3em 4em 2em;display:grid;gap:1em}&.no-padding .polpo-action-modal-content{padding:2em 0 0}&:has(.action-modal-icon) .polpo-action-modal-content{padding-top:4em}&.back-card{&:before{content:"";position:absolute;width:90%;height:100%;top:8px;left:50%;transform:translate(-50%);z-index:-1;background:var(--color-primary-500);border-radius:10px;display:block;transition:top .3s cubic-bezier(.81,-.52,.42,2.5)}}.action-modal-icon{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);background:var(--color-primary-500);color:var(--color-primary-50);padding:0;border-radius:50%;width:2em;height:2em;display:grid;place-content:center;transition:box-shadow .3s cubic-bezier(.81,-.52,.42,2.5);z-index:1;box-shadow:0 0 hsl(from var(--color-primary-500) h s l / 53%),0 0 hsl(from var(--color-primary-500) h s l / 40%),0 0 hsl(from var(--color-primary-500) h s l / 27%),0 0 hsl(from var(--color-primary-500) h s l / 14%)}.close-modal-button{width:1em;height:1em;border-radius:50%;cursor:pointer;background:var(--color-background);position:absolute;top:10px;right:5px;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));opacity:0;transition:opacity .3s ease;z-index:1}&.line-on-top{.polpo-action-modal-content{border-top:5px solid var(--color-primary-500)}}&:hover{.action-modal-icon{box-shadow:0 0 0 7px hsl(from var(--color-primary-500) h s l / 53%),0 0 0 14px hsl(from var(--color-primary-500) h s l / 40%),0 0 0 21px hsl(from var(--color-primary-500) h s l / 27%),0 0 0 28px hsl(from var(--color-primary-500) h s l / 14%)}.close-modal-button{opacity:1}&:before{top:15px}}}}@layer components{.polpo-aside-modal{color:var(--color-foreground);overflow:auto;height:100%;.polpo-aside-modal-content{padding:2em}.close-modal-button{border-radius:50%;cursor:pointer;display:grid;place-content:center;background:var(--color-background);border:4px solid var(--color-primary-500);position:absolute;padding:.5em}&.left{border-right:4px solid var(--color-primary-500);animation:slideIn-left .3s ease;&.modal-close{animation:slideOut-left .3s ease;transform:translate(-100%)}.close-modal-button{top:2em;left:100%;transform:translate(calc(-50% + 2px))}}&.right{border-left:4px solid var(--color-primary-500);animation:slideIn-right .3s ease;&.modal-close{animation:slideOut-right .3s ease;transform:translate(100%)}.close-modal-button{top:2em;right:100%;transform:translate(calc(50% - 2px))}}&.top{border-bottom:4px solid var(--color-primary-500);animation:slideIn-top .3s ease;&.modal-close{animation:slideOut-top .3s ease;transform:translateY(-100%)}.close-modal-button{bottom:0;right:2em;transform:translateY(calc(50% - 2px))}}&.bottom{border-top:4px solid var(--color-primary-500);animation:slideIn-bottom .3s ease;&.modal-close{animation:slideOut-bottom .3s ease;transform:translateY(100%)}.close-modal-button{top:0;right:2em;transform:translateY(calc(-50% + 2px))}}}}@layer components{.polpo-confirmation-modal{display:grid;max-width:450px;gap:1em;place-content:center;justify-items:center;text-align:center;.polpo-confirmation-modal-actions{display:grid;grid-auto-flow:column;justify-content:center;gap:1em}}}@layer components{.polpo-menu-modal{border-radius:.5em;border:1px solid var(--color-border);background:var(--color-background);box-shadow:0 0 25px var(--color-background-paper);user-select:none;position:relative;overflow-y:auto;.polpo-menu-content{display:grid;gap:.2em;padding:0;margin:0;list-style:none;align-content:start;height:100%;position:relative;overflow-y:auto}.divider{margin:.4em 0;color:var(--color-border)}}.polpo-menu-label{background:var(--color-background);color:var(--color-foreground);font-weight:lighter;padding:.5em 1.2em;position:sticky;top:0;z-index:10;pointer-events:none}.polpo-menu-option{padding:.2em 1em;border-radius:.3em;transition:all .3s ease;cursor:pointer;display:flex;align-items:center;outline:0;margin:0 .2em;position:relative;.ripple-effect{background:hsl(from var(--color-foreground) h s l / 31%)}&:first-child{margin-top:5px}.option-icon{margin-right:.5em}.menu-checkbox{width:100%}&.is-disabled{opacity:.4;pointer-events:none;cursor:default}&:focus,&:hover{background:hsl(from var(--color-background-paper) h s l / 25%)}&.is-selected{background:var(--color-background-paper);&:focus,&:hover{background:hsl(from var(--color-background-paper) h s l / 75%)}}}.polpo-menu-group{position:relative;.polpo-menu-group-content{display:grid;gap:.2em;padding:0;margin:0;list-style:none;align-content:start;position:relative}}}@layer components{.input-color{display:grid;grid-auto-flow:column;align-items:center;justify-content:start;gap:.5em;.input-color-value{margin-left:10px}.color-input{padding-right:1em;border-radius:inherit;width:100%;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));font-family:var(--font-main) sans-serif}}.input-color-box{background:#fff;border-radius:5px;border:2px solid;width:25px;height:25px;position:relative;cursor:pointer;&:before{content:"";position:absolute;border-radius:inherit;top:0;left:0;width:100%;height:100%;background:repeating-conic-gradient(#ccc 0% 25%,#fff 0% 50%) 50% / 8px 8px;z-index:-1}}.input-color-selector{display:grid;gap:10px;background:var(--color-background);color:var(--color-foreground);padding:10px;border-radius:0 18px 18px;border:1px solid;box-shadow:0 5px 30px -5px var(--color-gray-900);.react-colorful__pointer{width:1em;height:1em;border-radius:50%}.react-colorful__hue-pointer,.react-colorful__alpha-pointer{width:8px;height:100%;border-radius:4px;border-width:2px}.color-input-container{display:grid;grid-template-columns:16px 1fr 16px;align-items:center;gap:10px;border:1px solid;border-radius:8px;padding:.5em;width:100%;max-width:200px}.color-input{padding:0;border-radius:inherit;background:var(--color-background);color:var(--color-foreground);width:100%;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));font-family:var(--font-main) sans-serif;letter-spacing:2px;text-align:center}}}@layer components{.input-file-container{display:grid;gap:10px;.input-file--box{border:1px solid;border-radius:5px;position:relative;transition:all .3s ease;display:grid;grid-template-columns:32px 1fr;padding:10px;gap:10px;background:var(--color-secondary-500);color:var(--color-secondary-50);align-items:center;.input-file--box--icon{width:32px;height:32px;border-radius:5px;background:var(--color-primary-50);color:var(--color-primary-500);display:grid;place-content:center}input{position:absolute;top:0;left:0;width:100%;height:100%;cursor:copy;opacity:0}&:hover{background:var(--color-primary-50);color:var(--color-primary-500);.input-file--box--icon{background:var(--color-primary-500);color:var(--color-primary-50)}}}.input-file--files{max-height:280px;overflow-y:auto;border:1px solid;border-radius:5px;.input-file--files--content{display:grid}}.error{color:tomato}.total-info{font-size:1em;display:grid;grid-auto-flow:column;justify-content:end;align-items:center;gap:.5em;.total-info--delete{display:grid;place-content:center;height:100%;background:transparent;cursor:pointer;transition:all .3s ease;aspect-ratio:1 / 1;border-radius:50%;width:2em;font-size:.8em;&:hover{background:var(--color-primary-500);color:var(--color-primary-50)}}}}.input-file-card{display:grid;grid-template-columns:35px 1fr 35px;gap:1em;align-items:center;padding:10px;background:var(--color-background);&:not(:last-child){border-bottom:1px dashed}&:hover{.file-card--delete{color:var(--color-primary-500)}}.file-card--image{background:var(--color-primary-500);color:var(--color-primary-50);width:32px;height:32px;border-radius:5px;display:grid;place-content:center;border:1px solid}.file-card--data{display:grid;font-size:.7em;justify-content:start}.file-card--delete{border-radius:5px;display:grid;place-content:center;width:32px;height:32px;cursor:pointer;transition:all .3s ease;&:hover{background:var(--color-primary-500);color:var(--color-primary-50)}}}}@layer components{.polpo-radio{border-radius:50%;background:var(--color-background-paper);transition:all .3s ease;width:1em;height:1em;outline:2px solid;display:flex;position:relative;padding:2px;.polpo-radio-input{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:1}&.size-small{font-size:1em}&.size-regular{font-size:1.2em}&.size-large{font-size:1.4em}}.polpo-radio-fill{transition:all .2s ease-out;border-radius:inherit;margin:auto;width:0;height:0}.polpo-radio-container{--color: var(--color-gray-800);display:flex;align-items:center;gap:1em;width:fit-content;.polpo-radio-label{cursor:pointer;user-select:none}.polpo-radio{color:var(--color);&.is-checked{.polpo-radio-fill{width:100%;height:100%;background:var(--color)}}}.polpo-radio:hover,&:has(.polpo-radio-label:hover) .polpo-radio{box-shadow:0 0 0 .4em hsl(from var(--color) h s l / 50%);.polpo-radio-fill{width:20%;height:20%;background:hsl(from var(--color) h s l / 50%)}&:is(.is-checked){.polpo-radio-fill{width:80%;height:80%;background:var(--color)}}}&.color-primary{--color: var(--color-primary-500)}&.color-secondary{--color: var(--color-secondary-500)}&.color-tertiary{--color: var(--color-tertiary-500)}&.color-active{--color: var(--color-active-500)}&.color-warning{--color: var(--color-warning-500)}&.color-alert{--color: var(--color-alert-500)}&.color-info{--color: var(--color-info-500)}}}@layer components{.polpo-infinity-scroll{display:grid;place-content:start center;place-items:start center;.loading{width:100%;height:30px;display:grid;place-content:center;.loading--icon{animation:spin .5s linear infinite;font-size:20px}}.empty-message{font-size:.8em;text-align:center;color:#a6a6a6}}}@keyframes spin{to{transform:rotate(360deg)}}@layer components{.select{cursor:pointer;.icon-close{display:grid;place-content:center;align-self:center;border-radius:100%;cursor:pointer;font-size:.6em;padding:.5em;&:hover{background:hsl(from var(--color-foreground) h s l / 33%)}}.select-container{display:grid;grid-template-columns:1fr auto;gap:.5em;align-items:center;grid-auto-rows:auto;position:relative;cursor:pointer;user-select:none;&.three-columns{grid-template-columns:1fr auto auto}}.input-button{appearance:none;-webkit-appearance:none;-moz-appearance:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:grid;min-width:0;width:100%;border:0;margin:0;border-radius:0;background:transparent;color:currentColor;text-align:left;-webkit-tap-highlight-color:transparent;padding:0;grid-template-columns:1fr auto;&.placeholder{color:#919191}}.select-caret-icon{transition:transform .2s ease;&.is-select-open{transform:rotate(180deg)}}}.select-options-menu{.select-menu-content{gap:0;display:block;height:auto;overflow:initial}}.select-options{gap:0;display:grid;grid-template-rows:1fr;height:100%;overflow:auto;&.with-search-query{grid-template-rows:auto 1fr}.select-options-list-container{height:100%;overflow:auto}.select-options-list{display:grid;gap:.2em;padding:0;margin:0;list-style:none;align-content:start}}.select-options-header{background:var(--color-background);padding:2px 5px;border-bottom:1px solid var(--color-border);.input-search{outline:none;padding:.8em 5px;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));width:100%}}}@layer components{.polpo-input-slider{display:grid;grid-template-columns:1fr 50px;align-items:center;gap:10px;.polpo-slider{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:grid;align-items:center;&:focus{outline:none}&::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:1em;background:var(--color-primary-500);box-shadow:0 0 0 0 var(--color-gray-500);margin-top:-8px;transition:all .3s ease;cursor:pointer}&::-webkit-slider-runnable-track{height:4px;border-radius:1em;background:hsl(from var(--color-primary-200) h s l / 50%);transition:all .3s ease}&:focus,&:hover{&::-webkit-slider-thumb{background:var(--color-primary-500);box-shadow:0 0 0 6px hsl(from var(--color-primary-500) h s l / 50%);cursor:grab}}&:active{&::-webkit-slider-thumb{box-shadow:0 0 0 12px hsl(from var(--color-primary-500) h s l / 31%);cursor:grabbing}}&:focus{&::-webkit-slider-runnable-track{background:var(--color-primary-300)}}}&:has(.slider-number:focus) .slider::-webkit-slider-thumb,&:has(.slider-number:hover) .slider::-webkit-slider-thumb{background:var(--color-primary-500);box-shadow:0 0 0 6px hsl(from var(--color-primary-500) h s l / 31%)}.polpo-slider-number{transition:all .3s ease;border:1px solid;border-radius:5px;text-align:center;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));appearance:none;-webkit-appearance:none;-moz-appearance:none;width:100%;padding:4px 8px;font-weight:700;color:inherit;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}}&.is-focus{.slider-number{color:var(--color-primary-500)}}}}@layer components{.polpo-textarea{border:0;outline:0;field-sizing:content}}@layer components{.polpo-tooltip{color:var(--color-foreground);font-size:var(--text-small, .75rem);line-height:var(--tw-leading, var(--text-small--line-height, 1.6));font-weight:var(--tw-font-weight, var(--text-small--font-weight, regular));line-height:1em;border-radius:5px;padding:.5em 1em;display:block;border:1px solid;pointer-events:none;&:before{content:"";display:block;background:var(--color-background-paper);position:absolute;z-index:1;width:10px;height:10px;border-left:1px solid transparent;border-top:1px solid transparent;border-right:1px solid var(--color-foreground);border-bottom:1px solid var(--color-foreground);border-radius:0 0 3px}&.left{animation:fadeInRight .25s ease-out;&.close-animation{animation:fadeOutLeft .25s ease-out;transform:translate(-10px);opacity:0}&:before{top:50%;left:100%;transform:translate(-50%,-50%) rotate(-45deg)}}&.right{animation:fadeInLeft .25s ease-out;&.close-animation{animation:fadeOutRight .25s ease-out;transform:translate(10px);opacity:0}&:before{top:50%;right:100%;transform:translate(50%,-50%) rotate(135deg)}}&.top{animation:fadeInDown .25s ease-out;&.close-animation{animation:fadeOutUp .25s ease-out;transform:translateY(-10px);opacity:0}&:before{top:100%;left:50%;transform:translate(-50%,-50%) rotate(45deg)}}&.bottom{animation:fadeInUp .25s ease-out;&.close-animation{animation:fadeOutDown .25s ease-out;transform:translateY(10px);opacity:0}&:before{left:50%;bottom:100%;transform:translate(-50%,50%) rotate(-135deg)}}}}@layer components{.polpo-switch-container{--width: attr(data-width);--dot-size: attr(data-dot-size);--dot-hover-size: attr(data-dot-hover-size);--padding: attr(data-padding);--color: var(--color-gray-500);--color-dark: var(--color-gray-800);--color-contrast: var(--color-gray-50);display:flex;align-items:center;gap:.5em;width:fit-content;.polpo-switch{width:calc(var(--width) + var(--padding) * 2);border-radius:100em;background:var(--color-background-paper);padding:var(--padding);transition:all .3s ease;position:relative;.polpo-switch-dot{width:var(--dot-size);height:var(--dot-size);border-radius:100em;background:var(--color);display:block;transition:all .3s ease;margin-left:0;position:relative;z-index:1}.polpo-switch-icon{cursor:pointer;display:block}.switch-internal-left-icon,.switch-internal-right-icon{width:var(--dot-size);height:var(--dot-size);position:absolute;top:var(--padding);display:grid;place-content:center;color:var(--color-contrast);transition:all .3s ease}.switch-internal-left-icon{left:var(--padding)}.switch-internal-right-icon{right:var(--padding)}&.is-checked{background:var(--color);.polpo-switch-dot{margin-left:calc(var(--width) - var(--dot-size));background:var(--color);@supports (color: color-mix(in lab,red,red)){background:color-mix(in hsl,var(--color),var(--color-contrast) 75%)}}}&:not(.is-readonly):has(input:disabled){background:var(--color-background-disabled);.polpo-switch-dot{background:var(--color-foreground-disabled)}.switch-internal-left-icon,.switch-internal-right-icon{color:var(--color-foreground-disabled)}&.is-checked{background:var(--color-dark)}}.polpo-switch-checkbox{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:3}}.polpo-switch-label{cursor:pointer;user-select:none;padding:0 .5em}.polpo-switch:not(:has(.is-readonly,input:disabled)):hover .polpo-switch-dot,&:has(.polpo-switch-icon:hover) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot,&:has(.polpo-switch-label:hover) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot{box-shadow:0 0 0 calc(.3 * var(--dot-size)) var(--color);@supports (color: color-mix(in lab,red,red)){box-shadow:0 0 0 calc(.3 * var(--dot-size)) color-mix(in hsl,var(--color) 50%,var(--color-contrast))}}.polpo-switch:not(:has(.is-readonly,input:disabled)):active .polpo-switch-dot,&:has(.polpo-switch-icon:active) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot,&:has(.polpo-switch-label:active) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot{width:var(--dot-hover-size)}.polpo-switch:not(:has(.is-readonly,input:disabled)).is-checked:active .polpo-switch-dot,&:has(.polpo-switch-icon:active) .polpo-switch:not(:has(.is-readonly,input:disabled)).is-checked .polpo-switch-dot,&:has(.polpo-switch-label:active) .polpo-switch:not(:has(.is-readonly,input:disabled)).is-checked .polpo-switch-dot{margin-left:calc(var(--width) - var(--dot-hover-size))}&.color-primary{--color: var(--color-primary-500);--color-dark: var(--color-primary-700);--color-contrast: var(--color-primary-50)}&.color-secondary{--color: var(--color-secondary-500);--color-dark: var(--color-secondary-700);--color-contrast: var(--color-secondary-50)}&.color-tertiary{--color: var(--color-tertiary-500);--color-dark: var(--color-tertiary-700);--color-contrast: var(--color-tertiary-50)}&.color-active{--color: var(--color-active-500);--color-dark: var(--color-active-700);--color-contrast: var(--color-active-50)}&.color-warning{--color: var(--color-warning-500);--color-dark: var(--color-warning-700);--color-contrast: var(--color-warning-50)}&.color-alert{--color: var(--color-alert-500);--color-dark: var(--color-alert-700);--color-contrast: var(--color-alert-50)}&.color-info{--color: var(--color-info-500);--color-dark: var(--color-info-700);--color-contrast: var(--color-info-50)}}}@layer components{.polpo-smart-table-container{border:0 solid var(--color-primary-500);border-radius:5px;overflow:auto;height:100%;width:100%;margin:auto}.polpo-smart-table{border-collapse:collapse;position:relative;width:100%;&.layout-fixed{table-layout:fixed}&.layout-scrollable{table-layout:auto}thead{position:sticky;z-index:10;top:0;box-shadow:0 3px 5px #0003,0 1px 10px #0000001f;tr{background:var(--color-primary-500);color:var(--color-primary-50);transition:all .3s ease}}tbody{tr{box-shadow:inset 0 0 0 0 var(--color-primary-500);transition:box-shadow .3s ease;&.row-selected,&:hover{background:var(--color-background-paper)}&.row-selected{box-shadow:inset 10px 0 0 -5px var(--color-primary-500)}&:not(:last-child){border-bottom:1px solid var(--color-border)}}}th{padding:.8em 1.2em;user-select:none;&.sort-on-click{cursor:pointer}.sort-icon{width:1em;display:block}svg{animation:fadeIn .3s ease}path{transition:all .3s ease}&:first-child{padding-left:2em}&:last-child{padding-right:2em}}td{transition:all .3s ease;padding:.6em 1em;&:first-child{padding-left:2em}&:last-child{padding-right:2em}}}}@layer components{.polpo-tab{cursor:pointer;user-select:none;transition:all .3s ease}.polpo-tab-list{--color: var(--color-gray-900);--color-contrast: var(--color-gray-50);--inner-radius: 0;--outer-radius: 0;display:grid;grid-auto-flow:column;gap:1em;align-items:center;position:relative;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));border-radius:var(--outer-radius);.tab,.polpo-tabs-selector{border-radius:var(--inner-radius)}&.size-small{font-size:var(--text-small, .75rem);line-height:var(--tw-leading, var(--text-small--line-height, 1.6));font-weight:var(--tw-font-weight, var(--text-small--font-weight, regular))}&.size-medium{font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6))}&.size-large{font-size:var(--text-body, 1rem);line-height:var(--tw-leading, var(--text-body--line-height, 1.6));letter-spacing:var(--tw-tracking, var(--text-body--letter-spacing, 0));font-weight:var(--tw-font-weight, var(--text-body--font-weight, regular))}.polpo-tabs-selector{position:absolute;background:var(--color);color:var(--color-contrast);border-radius:1.5em;&.active{transition:all .3s ease}}.polpo-tab{border-radius:1.5em;padding:.5em 1em;z-index:1;text-align:center;&.is-open{color:var(--color-contrast)}&:not(.is-open):hover{color:var(--color-gray-900)}}&.radius-none{--outer-radius: 0;--inner-radius: 0}&.radius-small{--outer-radius: .5em;--inner-radius: .5em}&.radius-medium{--outer-radius: 1em;--inner-radius: .8em}&.radius-large{--outer-radius: 1.5em;--inner-radius: 1.3em}&.radius-full{--outer-radius: 1.8em;--inner-radius: 1.6em}&.vertical-direction{grid-auto-flow:row;align-items:unset;align-content:start}&.variant-solid{background:var(--color-background-paper);color:var(--color-foreground);padding:.5em}&.variant-ghost{border:1px solid var(--color);padding:.5em}&.variant-line{border-radius:0;&:not(.vertical-direction){border-bottom:2px solid var(--color-border)}.polpo-tabs-selector{border-radius:0}.polpo-tab{border-radius:0;&.is-open{color:var(--color)}}}&.color-primary{--color: var(--color-primary-500);--color-contrast: var(--color-primary-50)}&.color-secondary{--color: var(--color-secondary-500);--color-contrast: var(--color-secondary-50)}&.color-tertiary{--color: var(--color-tertiary-500);--color-contrast: var(--color-tertiary-50)}&.color-active{--color: var(--color-active-500);--color-contrast: var(--color-active-50)}&.color-warning{--color: var(--color-warning-500);--color-contrast: var(--color-warning-50)}&.color-alert{--color: var(--color-alert-500);--color-contrast: var(--color-alert-50)}&.color-info{--color: var(--color-info-500);--color-contrast: var(--color-info-50)}}}
|
|
1
|
+
@layer components{.polpo-custom-line{--color: attr(data-color, "currentColor");--size: attr(data-size, 1px);--spacing: attr(data-spacing, 1px);--dashSize: attr(data-dash-size, 1px);&.horizontal,&.vertical{background:var(--color);display:inline-block;border-radius:100px}&.horizontal{width:100%;height:var(--size);&.dotted{background:radial-gradient(calc(var(--size) / 2) calc(var(--size) / 2),var(--color) 100%,transparent) 0 0 / calc(var(--spacing) + var(--size)) 100%}&.dashed{background:repeating-linear-gradient(90deg,var(--color),var(--color) var(--dashSize),transparent var(--dashSize),transparent calc(var(--spacing) + var(--dashSize)))}}&.vertical{height:100%;width:var(--size);&.dotted{background:radial-gradient(calc(var(--size) / 2) calc(var(--size) / 2),var(--color) 100%,transparent) 0 0 / 100% calc(var(--spacing) + var(--size))}&.dashed{background:repeating-linear-gradient(0deg,var(--color),var(--color) var(--dashSize),transparent var(--dashSize),transparent calc(var(--spacing) + var(--dashSize)))}}}}@layer components{.polpo-accordion{display:grid}.polpo-accordion-item{display:grid;position:relative;.polpo-accordion-header{display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px;cursor:pointer;position:sticky;top:0;padding:20px 0;&.has-start-content{grid-template-columns:auto 1fr auto}}.polpo-accordion-header-content{display:grid}.polpo-accordion-toggle-icon{transition:all .3s ease;&.is-open{transform:rotate(-90deg)}}.polpo-accordion-body{padding:10px 0 20px}}}@layer components{.polpo-flip-card{--cardZIndex: attr(data-zIndex);--flipSpeed: attr(data-flipSpeed, .5s);--frontRotate: attr(data-frontRotate);--backRotate: attr(data-backRotate);perspective:1000px;z-index:var(--cardZIndex);.polpo-flipper{height:100%;position:relative;width:100%;transform-style:preserve-3d}.front,.back{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d;transition:var(--flipSpeed);height:100%;left:0;top:0;width:100%}.front{position:relative;transform:var(--frontRotate);z-index:2}.back{position:absolute;transform:var(--backRotate)}.is-flipped{.front{position:absolute}.back{position:relative}}}}@layer components{.polpo-hover-card{display:inline-block;transition:all .3s ease;.polpo-hover-card-layer{transition:all .1s ease;width:100%;height:100%;display:grid}}}@layer components{.polpo-typography{margin:0;padding:.5em 0 .4em;&.primary{color:var(--color-primary-500)}&.secondary{color:var(--color-secondary-500)}&.tertiary{color:var(--color-tertiary-500)}&.active{color:var(--color-active-500)}&.alert{color:var(--color-alert-500)}&.warning{color:var(--color-warning-500)}&.info{color:var(--color-info-500)}&.recommended-width{max-width:70ch}&.code-family{font-family:monospace}&.no-padding{padding:0}&.nowrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}&.nowrap-max-lines{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}&.nowrap-max-lines-2{-webkit-line-clamp:2;line-clamp:2}&.nowrap-max-lines-3{-webkit-line-clamp:3;line-clamp:3}&.nowrap-max-lines-4{-webkit-line-clamp:4;line-clamp:4}&.nowrap-max-lines-5{-webkit-line-clamp:5;line-clamp:5}&.hero{font-size:var(--text-hero, clamp(4rem, 10vw, 5.5rem));line-height:var(--tw-leading, var(--text-hero--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-hero--letter-spacing, -4px));font-weight:var(--tw-font-weight, var(--text-hero--font-weight, bolder))}&.header1{font-size:var(--text-header1, clamp(3rem, 8vw, 4rem));line-height:var(--tw-leading, var(--text-header1--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header1--letter-spacing, -3px));font-weight:var(--tw-font-weight, var(--text-header1--font-weight, bold))}&.header2{font-size:var(--text-header2, clamp(2rem, 6vw, 3rem));line-height:var(--tw-leading, var(--text-header2--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header2--letter-spacing, -2px));font-weight:var(--tw-font-weight, var(--text-header2--font-weight, bold))}&.header3{font-size:var(--text-header3, clamp(1.5rem, 4vw, 2rem));line-height:var(--tw-leading, var(--text-header3--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header3--letter-spacing, -1px));font-weight:var(--tw-font-weight, var(--text-header3--font-weight, bold))}&.header4{font-size:var(--text-header4, clamp(1.2rem, 3vw, 1.5rem));line-height:var(--tw-leading, var(--text-header4--line-height, 1.4));letter-spacing:var(--tw-tracking, var(--text-header4--letter-spacing, 0));font-weight:var(--tw-font-weight, var(--text-header4--font-weight, bold))}&.body{font-size:var(--text-body, 1rem);line-height:var(--tw-leading, var(--text-body--line-height, 1.6));letter-spacing:var(--tw-tracking, var(--text-body--letter-spacing, 0));font-weight:var(--tw-font-weight, var(--text-body--font-weight, regular))}&.label{font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6))}&.small{font-size:var(--text-small, .75rem);line-height:var(--tw-leading, var(--text-small--line-height, 1.6));font-weight:var(--tw-font-weight, var(--text-small--font-weight, regular))}&.bold{font-weight:700}&.regular{font-weight:400}&.light{font-weight:300}}}@layer components{.polpo-badge{--background: attr(data-background, var(--color-primary-500));--text: attr(data-text, var(--color-primary-50));--background-selected: attr(data-background-selected, var(--color-primary-700));--text-selected: attr(data-text-selected, var(--color-primary-50));padding:.4em .8em;border-radius:.3em;border:1px solid;background:var(--background);color:var(--text);transition:all .3s ease;display:inline-block;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));user-select:none;&.no-wrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}&.rounded-none{border-radius:0}&.rounded-small{border-radius:.25em}&.rounded-medium{border-radius:.5em}&.rounded-large{border-radius:1em}&.rounded-full{border-radius:100rem}&:hover,&.is-selected{background:var(--background-selected);color:var(--text-selected)}}}@layer components{.polpo-ripple{position:absolute;display:block;inset:0;overflow:hidden;border-radius:inherit;z-index:1;.ripple-effect{position:absolute;transform:translate(-50%,-50%);border-radius:50%;width:0;height:0;pointer-events:none;animation:ripple-effect infinite;opacity:.4}}@keyframes ripple-effect{to{width:300px;height:300px;opacity:0;filter:blur(5px)}}}@layer components{.polpo-button{--button-blur: 2px;--color: var(--color-gray-800);--solid-background: var(--color-gray-800);--solid-text: var(--color-gray-50);--solid-hover-background: var(--color-gray-700);--solid-active-background: var(--color-gray-900);--flat-text: var(--color-gray-700);--flat-background: hsl(from var(--color-gray-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-gray-300) h s l / 50%);--flat-active-background: hsl(from var(--color-gray-300) h s l / 80%);--outlined-text: var(--color-gray-600);--outlined-hover-background: hsl(from var(--color-gray-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-gray-500) h s l / 30%);--text-hover-background: hsl(from var(--color-gray-300) h s l / 20%);--text-active-background: hsl(from var(--color-gray-400) h s l / 30%);--shadow-color: hsl(from var(--color-gray-800) h s l / 20%);--focus-background: hsl(from var(--color-gray-100) h s l / 20%);display:flex;position:relative;flex-direction:row;justify-content:center;align-items:center;padding:.625em 2.1875em;gap:.625em;width:auto;border-radius:.5em;font-weight:700;font-size:var(--text-label);cursor:pointer;outline:none;transition:all .15s ease;user-select:none;white-space:nowrap;&.icon{padding:.625em}&.full{width:100%}&.no-wrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}&.size-small{font-size:var(--text-small)}&.size-regular{font-size:var(--text-label)}&.size-large{font-size:var(--text-body)}&.radius-none{border-radius:0}&.radius-small{border-radius:.25em}&.radius-medium{border-radius:.5em}&.radius-large{border-radius:1em}&.radius-full{border-radius:100rem}&.is-loading{cursor:progress}&:not(:disabled):not(.is-loading){&:hover,&:active,&:focus-visible{backdrop-filter:blur(var(--button-blur))}&:hover{transform:scale(1.01);&:not(.text){box-shadow:0 1.4em .5em -1em hsl(from var(--color-black) h s l / 20%),0 .7em 1em -.5em hsl(from var(--color-black) h s l / 20%)}}&:active{transform:scale(.98);&:not(.text){box-shadow:0 .3em .4em -.2em hsl(from var(--color-black) h s l / 20%),0 .2em .8em -.1em hsl(from var(--color-black) h s l / 20%)}}}color:var(--color);.ripple-effect{background:var(--color)}&.solid{background:var(--solid-background);color:var(--solid-text);backdrop-filter:blur(var(--button-blur));.ripple-effect{background:var(--solid-text)}&:focus-visible{box-shadow:0 0 0 .3125em var(--shadow-color);background:var(--solid-hover-background)}&:hover{background:var(--solid-hover-background)}&:active{background:var(--solid-active-background)}}&.flat{background:var(--flat-background);backdrop-filter:blur(var(--button-blur));color:var(--flat-text);&:hover{background:var(--flat-hover-background)}&:active{background:var(--flat-active-background)}}&.outlined{background:transparent;border:1px solid;color:var(--outlined-text);&:hover{background:var(--outlined-hover-background)}&:active{background:var(--outlined-active-background)}}&.text{background:transparent;&:hover{background:var(--text-hover-background)}&:active{background:var(--text-active-background)}}&:focus-visible{box-shadow:0 0 0 .3125em var(--shadow-color);background:var(--focus-background)}&.primary{--color: var(--color-primary-500);--solid-background: var(--color-primary-400);--solid-text: var(--color-primary-foreground);--solid-hover-background: var(--color-primary-300);--solid-active-background: var(--color-primary-500);--flat-text: var(--color-primary-700);--flat-background: hsl(from var(--color-primary-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-primary-300) h s l / 50%);--flat-active-background: hsl(from var(--color-primary-300) h s l / 80%);--outlined-text: var(--color-primary-600);--outlined-hover-background: hsl(from var(--color-primary-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-primary-500) h s l / 30%);--text-hover-background: hsl(from var(--color-primary-300) h s l / 20%);--text-active-background: hsl(from var(--color-primary-400) h s l / 30%);--shadow-color: hsl(from var(--color-primary-500) h s l / 20%);--focus-background: hsl(from var(--color-primary-200) h s l / 20%)}&.secondary{--color: var(--color-secondary-500);--solid-background: var(--color-secondary-400);--solid-text: var(--color-secondary-foreground);--solid-hover-background: var(--color-secondary-300);--solid-active-background: var(--color-secondary-500);--flat-text: var(--color-secondary-700);--flat-background: hsl(from var(--color-secondary-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-secondary-300) h s l / 50%);--flat-active-background: hsl(from var(--color-secondary-300) h s l / 80%);--outlined-text: var(--color-secondary-600);--outlined-hover-background: hsl(from var(--color-secondary-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-secondary-500) h s l / 30%);--text-hover-background: hsl(from var(--color-secondary-300) h s l / 20%);--text-active-background: hsl(from var(--color-secondary-400) h s l / 30%);--shadow-color: hsl(from var(--color-secondary-500) h s l / 20%);--focus-background: hsl(from var(--color-secondary-100) h s l / 20%)}&.tertiary{--color: var(--color-tertiary-500);--solid-background: var(--color-tertiary-400);--solid-text: var(--color-tertiary-foreground);--solid-hover-background: var(--color-tertiary-300);--solid-active-background: var(--color-tertiary-500);--flat-text: var(--color-tertiary-700);--flat-background: hsl(from var(--color-tertiary-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-tertiary-300) h s l / 50%);--flat-active-background: hsl(from var(--color-tertiary-300) h s l / 80%);--outlined-text: var(--color-tertiary-600);--outlined-hover-background: hsl(from var(--color-tertiary-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-tertiary-500) h s l / 30%);--text-hover-background: hsl(from var(--color-tertiary-300) h s l / 20%);--text-active-background: hsl(from var(--color-tertiary-400) h s l / 30%);--shadow-color: hsl(from var(--color-tertiary-500) h s l / 20%);--focus-background: hsl(from var(--color-tertiary-100) h s l / 20%)}&.active{--color: var(--color-active-500);--solid-background: var(--color-active-400);--solid-text: var(--color-active-foreground);--solid-hover-background: var(--color-active-300);--solid-active-background: var(--color-active-500);--flat-text: var(--color-active-700);--flat-background: hsl(from var(--color-active-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-active-300) h s l / 50%);--flat-active-background: hsl(from var(--color-active-300) h s l / 80%);--outlined-text: var(--color-active-600);--outlined-hover-background: hsl(from var(--color-active-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-active-500) h s l / 30%);--text-hover-background: hsl(from var(--color-active-300) h s l / 20%);--text-active-background: hsl(from var(--color-active-400) h s l / 30%);--shadow-color: hsl(from var(--color-active-500) h s l / 20%);--focus-background: hsl(from var(--color-active-100) h s l / 20%)}&.warning{--color: var(--color-warning-500);--solid-background: var(--color-warning-400);--solid-text: var(--color-warning-foreground);--solid-hover-background: var(--color-warning-300);--solid-active-background: var(--color-warning-500);--flat-text: var(--color-warning-700);--flat-background: hsl(from var(--color-warning-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-warning-300) h s l / 50%);--flat-active-background: hsl(from var(--color-warning-300) h s l / 80%);--outlined-text: var(--color-warning-600);--outlined-hover-background: hsl(from var(--color-warning-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-warning-500) h s l / 30%);--text-hover-background: hsl(from var(--color-warning-300) h s l / 20%);--text-active-background: hsl(from var(--color-warning-400) h s l / 30%);--shadow-color: hsl(from var(--color-warning-500) h s l / 20%);--focus-background: hsl(from var(--color-warning-100) h s l / 20%)}&.alert{--color: var(--color-alert-500);--solid-background: var(--color-alert-400);--solid-text: var(--color-alert-foreground);--solid-hover-background: var(--color-alert-300);--solid-active-background: var(--color-alert-500);--flat-text: var(--color-alert-700);--flat-background: hsl(from var(--color-alert-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-alert-300) h s l / 50%);--flat-active-background: hsl(from var(--color-alert-300) h s l / 80%);--outlined-text: var(--color-alert-600);--outlined-hover-background: hsl(from var(--color-alert-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-alert-500) h s l / 30%);--text-hover-background: hsl(from var(--color-alert-300) h s l / 20%);--text-active-background: hsl(from var(--color-alert-400) h s l / 30%);--shadow-color: hsl(from var(--color-alert-500) h s l / 20%);--focus-background: hsl(from var(--color-alert-100) h s l / 20%)}&.info{--color: var(--color-info-500);--solid-background: var(--color-info-400);--solid-text: var(--color-info-foreground);--solid-hover-background: var(--color-info-300);--solid-active-background: var(--color-info-500);--flat-text: var(--color-info-700);--flat-background: hsl(from var(--color-info-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-info-300) h s l / 50%);--flat-active-background: hsl(from var(--color-info-300) h s l / 80%);--outlined-text: var(--color-info-600);--outlined-hover-background: hsl(from var(--color-info-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-info-500) h s l / 30%);--text-hover-background: hsl(from var(--color-info-300) h s l / 20%);--text-active-background: hsl(from var(--color-info-400) h s l / 30%);--shadow-color: hsl(from var(--color-info-500) h s l / 20%);--focus-background: hsl(from var(--color-info-100) h s l / 20%)}&.accent{--color: var(--color-accent-500);--solid-background: var(--color-accent-400);--solid-text: var(--color-accent-foreground);--solid-hover-background: var(--color-accent-300);--solid-active-background: var(--color-accent-500);--flat-text: var(--color-accent-700);--flat-background: hsl(from var(--color-accent-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-accent-300) h s l / 50%);--flat-active-background: hsl(from var(--color-accent-300) h s l / 80%);--outlined-text: var(--color-accent-600);--outlined-hover-background: hsl(from var(--color-accent-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-accent-500) h s l / 30%);--text-hover-background: hsl(from var(--color-accent-300) h s l / 20%);--text-active-background: hsl(from var(--color-accent-400) h s l / 30%);--shadow-color: hsl(from var(--color-accent-500) h s l / 20%);--focus-background: hsl(from var(--color-accent-100) h s l / 20%)}&.highlight{--color: var(--color-highlight-500);--solid-background: var(--color-highlight-400);--solid-text: var(--color-highlight-foreground);--solid-hover-background: var(--color-highlight-300);--solid-active-background: var(--color-highlight-500);--flat-text: var(--color-highlight-700);--flat-background: hsl(from var(--color-highlight-400) h s l / 50%);--flat-hover-background: hsl(from var(--color-highlight-300) h s l / 50%);--flat-active-background: hsl(from var(--color-highlight-300) h s l / 80%);--outlined-text: var(--color-highlight-600);--outlined-hover-background: hsl(from var(--color-highlight-400) h s l / 20%);--outlined-active-background: hsl(from var(--color-highlight-500) h s l / 30%);--text-hover-background: hsl(from var(--color-highlight-300) h s l / 20%);--text-active-background: hsl(from var(--color-highlight-400) h s l / 30%);--shadow-color: hsl(from var(--color-highlight-500) h s l / 20%);--focus-background: hsl(from var(--color-highlight-100) h s l / 20%)}&:disabled{color:var(--color-gray-300);pointer-events:none}&.solid:disabled{background:var(--color-gray-300);color:var(--color-gray-100)}&.flat:disabled{background:hsl(from var(--color-gray-100) h s l / 80%)}&.outlined:disabled,&.text:disabled{background:transparent}}}@layer components{.polpo-cursor-overlay{position:fixed;top:0;left:0;width:100%;height:100%;cursor:none;pointer-events:none}.polpo-cursor{position:fixed;border-radius:50%;z-index:99999999;pointer-events:none;transform:translateZ(0);@media(any-pointer:coarse){display:none}&.outer-circle{margin-left:-15px;margin-top:-15px;width:30px;height:30px;border:2px solid var(--color-primary-500);box-sizing:border-box;z-index:99999999;opacity:.5;transition:all .08s ease-out,width .3s ease-in-out,height .3s ease-in-out,margin .3s ease-in-out,opacity .3s ease-in-out;&.cursor-hover{margin-left:-40px;margin-top:-40px;width:80px;height:80px;background-color:var(--color-primary-500);opacity:.3}&.cursor-text{margin-left:-2px;margin-top:-40px;width:4px;height:80px;background-color:var(--color-primary-500);opacity:.3}}&.inner-circle{margin-left:-3px;margin-top:-3px;width:6px;height:6px;z-index:99999999;background-color:var(--color-primary-500);transition:opacity .3s ease-in-out;opacity:1;&.cursor-hover{opacity:0}}}}@layer components{.checkbox{border-radius:40%;background:var(--color-background-paper);transition:all .3s ease;width:1em;height:1em;margin:2px;outline:1px solid;display:flex;position:relative;.checkbox-input{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:2}&.size-small{font-size:1em}&.size-regular{font-size:1.2em}&.size-large{font-size:1.4em}}.checkbox-fill{transition:all .2s ease-out;border-radius:inherit;margin:auto;width:0;height:0;overflow:hidden;position:relative;display:grid;place-content:center;place-items:center;.checkbox-icon{font-size:.7em;z-index:1;opacity:0;transition:opacity .3s ease}}.checkbox-container{--color: var(--color-gray-800);--color-icon: var(--color-gray-50);--color-hover: hsl(from var(--color-gray-800) h s l / 50%);display:grid;grid-auto-flow:column;grid-auto-columns:auto 1fr;align-items:center;gap:.5em;width:fit-content;.checkbox-label{cursor:pointer;user-select:none;width:100%}.checkbox{color:var(--color);&.is-checked{.checkbox-fill{width:100%;height:100%;background:var(--color);color:var(--color-icon)}.checkbox-icon{opacity:1}}}.checkbox:hover,&:has(.checkbox-label:hover) .checkbox{box-shadow:0 0 0 .3em var(--color-hover);.checkbox-fill{width:20%;height:20%;border-radius:20%;background:var(--color-hover);color:var(--color-icon)}&:is(.is-checked){.checkbox-fill{width:100%;height:100%;border-radius:inherit;background:var(--color)}}}.checkbox:focus,&:has(.checkbox-input:focus) .checkbox,&:has(.checkbox-label:focus) .checkbox{box-shadow:0 0 0 .3em var(--color-hover)}&.color-primary{--color: var(--color-primary-500);--color-icon: var(--color-primary-50);--color-hover: hsl(from var(--color-primary-500) h s l / 50%)}&.color-secondary{--color: var(--color-secondary-500);--color-icon: var(--color-secondary-50);--color-hover: hsl(from var(--color-secondary-500) h s l / 50%)}&.color-tertiary{--color: var(--color-tertiary-500);--color-icon: var(--color-tertiary-50);--color-hover: hsl(from var(--color-tertiary-500) h s l / 50%)}&.color-active{--color: var(--color-active-500);--color-icon: var(--color-active-50);--color-hover: hsl(from var(--color-active-500) h s l / 50%)}&.color-warning{--color: var(--color-warning-500);--color-icon: var(--color-warning-50);--color-hover: hsl(from var(--color-warning-500) h s l / 50%)}&.color-alert{--color: var(--color-alert-500);--color-icon: var(--color-alert-50);--color-hover: hsl(from var(--color-alert-500) h s l / 50%)}&.color-info{--color: var(--color-info-500);--color-icon: var(--color-info-50);--color-hover: hsl(from var(--color-info-500) h s l / 50%)}}}@layer components{.form-field{display:grid;grid-auto-columns:auto;gap:.5em;transition:all .2s ease;.field-content{display:grid;grid-template-columns:auto 1fr auto;align-items:center}.field-left-icon,.field-right-icon{font-size:1em}.field-left-icon{margin-right:1em}.field-right-icon{margin-left:1em}.field-message{display:grid;grid-auto-flow:column;gap:5px;align-items:center;justify-content:start}&.variant-content-border{.field-content{border:1px solid var(--color-border);border-radius:4px;padding:1em;background:var(--color-background)}}&.variant-content-line{.field-content{border-bottom:1px solid;padding:.5em 0}}&.variant-full-border{border:1px solid var(--color-border);border-radius:4px;padding:.5em 0;background:var(--color-background);.field-label,.field-content,.field-message{padding:0 1em}}&.variant-inline{grid-auto-flow:column;padding:.5em 0;align-items:center;.field-label{width:auto}}&.error{color:var(--color-alert-500);border-color:var(--color-alert-500)}&.focus{color:var(--color-info-500);border-color:var(--color-info-500)}&.error,&.focus{.field-left-icon,.field-right-icon,.field-children{color:var(--color-foreground);border-color:var(--color-foreground)}}.field-children>*{width:100%}}}@layer components{.polpo-modal{position:fixed;z-index:1001;pointer-events:none}.polpo-modal-content{background:var(--color-background-paper);pointer-events:initial;&.animation-fade-down{animation:fadeInDown .2s ease;&.modal-close{animation:fadeOutUp .2s ease;transform:translateY(-10px);opacity:0}}&.animation-bounce{animation:bounceIn .5s ease;&.modal-close{animation:bounceOut .5s ease;transform:scale3d(.3,.3,.3);opacity:0}}}.polpo-modal-backdrop{position:fixed;width:100%;height:100%;top:0;left:0;z-index:1000;animation:backdropOpen .5s cubic-bezier(.215,.61,.355,1);&.backdrop-close{animation:backdropClose .5s cubic-bezier(.215,.61,.355,1);opacity:0;transform:translateY(-10px)}}@keyframes backdropOpen{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes backdropClose{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-10px)}}}@layer components{.polpo-action-modal{background:transparent;.polpo-modal-content{&.shake-animation{animation:headShake .6s linear}}}.polpo-action-modal-content{position:relative;.polpo-action-modal-body{box-shadow:0 0 10px -5px;border-radius:10px;overflow:hidden;display:grid}.polpo-action-modal-content{background:var(--color-background);padding:3em 4em 2em;display:grid;gap:1em}&.no-padding .polpo-action-modal-content{padding:2em 0 0}&:has(.action-modal-icon) .polpo-action-modal-content{padding-top:4em}&.back-card{&:before{content:"";position:absolute;width:90%;height:100%;top:8px;left:50%;transform:translate(-50%);z-index:-1;background:var(--color-primary-500);border-radius:10px;display:block;transition:top .3s cubic-bezier(.81,-.52,.42,2.5)}}.action-modal-icon{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);background:var(--color-primary-500);color:var(--color-primary-50);padding:0;border-radius:50%;width:2em;height:2em;display:grid;place-content:center;transition:box-shadow .3s cubic-bezier(.81,-.52,.42,2.5);z-index:1;box-shadow:0 0 hsl(from var(--color-primary-500) h s l / 53%),0 0 hsl(from var(--color-primary-500) h s l / 40%),0 0 hsl(from var(--color-primary-500) h s l / 27%),0 0 hsl(from var(--color-primary-500) h s l / 14%)}.close-modal-button{width:1em;height:1em;border-radius:50%;cursor:pointer;background:var(--color-background);position:absolute;top:10px;right:5px;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));opacity:0;transition:opacity .3s ease;z-index:1}&.line-on-top{.polpo-action-modal-content{border-top:5px solid var(--color-primary-500)}}&:hover{.action-modal-icon{box-shadow:0 0 0 7px hsl(from var(--color-primary-500) h s l / 53%),0 0 0 14px hsl(from var(--color-primary-500) h s l / 40%),0 0 0 21px hsl(from var(--color-primary-500) h s l / 27%),0 0 0 28px hsl(from var(--color-primary-500) h s l / 14%)}.close-modal-button{opacity:1}&:before{top:15px}}}}@layer components{.polpo-aside-modal{color:var(--color-foreground);overflow:auto;height:100%;.polpo-aside-modal-content{padding:2em}.close-modal-button{border-radius:50%;cursor:pointer;display:grid;place-content:center;background:var(--color-background);border:4px solid var(--color-primary-500);position:absolute;padding:.5em}&.left{border-right:4px solid var(--color-primary-500);animation:slideIn-left .3s ease;&.modal-close{animation:slideOut-left .3s ease;transform:translate(-100%)}.close-modal-button{top:2em;left:100%;transform:translate(calc(-50% + 2px))}}&.right{border-left:4px solid var(--color-primary-500);animation:slideIn-right .3s ease;&.modal-close{animation:slideOut-right .3s ease;transform:translate(100%)}.close-modal-button{top:2em;right:100%;transform:translate(calc(50% - 2px))}}&.top{border-bottom:4px solid var(--color-primary-500);animation:slideIn-top .3s ease;&.modal-close{animation:slideOut-top .3s ease;transform:translateY(-100%)}.close-modal-button{bottom:0;right:2em;transform:translateY(calc(50% - 2px))}}&.bottom{border-top:4px solid var(--color-primary-500);animation:slideIn-bottom .3s ease;&.modal-close{animation:slideOut-bottom .3s ease;transform:translateY(100%)}.close-modal-button{top:0;right:2em;transform:translateY(calc(-50% + 2px))}}}}@layer components{.polpo-confirmation-modal{display:grid;max-width:450px;gap:1em;place-content:center;justify-items:center;text-align:center;.polpo-confirmation-modal-actions{display:grid;grid-auto-flow:column;justify-content:center;gap:1em}}}@layer components{.polpo-menu-modal{border-radius:.5em;border:1px solid var(--color-border);background:var(--color-background);box-shadow:0 0 25px var(--color-background-paper);user-select:none;position:relative;overflow-y:auto;.polpo-menu-content{display:grid;gap:.2em;padding:0;margin:0;list-style:none;align-content:start;height:100%;position:relative;overflow-y:auto}.divider{margin:.4em 0;color:var(--color-border)}}.polpo-menu-label{background:var(--color-background);color:var(--color-foreground);font-weight:lighter;padding:.5em 1.2em;position:sticky;top:0;z-index:10;pointer-events:none}.polpo-menu-option{padding:.2em 1em;border-radius:.3em;transition:all .3s ease;cursor:pointer;display:flex;align-items:center;outline:0;margin:0 .2em;position:relative;.ripple-effect{background:hsl(from var(--color-foreground) h s l / 31%)}&:first-child{margin-top:5px}.option-icon{margin-right:.5em}.menu-checkbox{width:100%}&.is-disabled{opacity:.4;pointer-events:none;cursor:default}&:focus,&:hover{background:hsl(from var(--color-background-paper) h s l / 25%)}&.is-selected{background:var(--color-background-paper);&:focus,&:hover{background:hsl(from var(--color-background-paper) h s l / 75%)}}}.polpo-menu-group{position:relative;.polpo-menu-group-content{display:grid;gap:.2em;padding:0;margin:0;list-style:none;align-content:start;position:relative}}}@layer components{.input-color{display:grid;grid-auto-flow:column;align-items:center;justify-content:start;gap:.5em;.input-color-value{margin-left:10px}.color-input{padding-right:1em;border-radius:inherit;width:100%;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));font-family:var(--font-main) sans-serif}}.input-color-box{background:#fff;border-radius:5px;border:2px solid;width:25px;height:25px;position:relative;cursor:pointer;&:before{content:"";position:absolute;border-radius:inherit;top:0;left:0;width:100%;height:100%;background:repeating-conic-gradient(#ccc 0% 25%,#fff 0% 50%) 50% / 8px 8px;z-index:-1}}.input-color-selector{display:grid;gap:10px;background:var(--color-background);color:var(--color-foreground);padding:10px;border-radius:0 18px 18px;border:1px solid;box-shadow:0 5px 30px -5px var(--color-gray-900);.react-colorful__pointer{width:1em;height:1em;border-radius:50%}.react-colorful__hue-pointer,.react-colorful__alpha-pointer{width:8px;height:100%;border-radius:4px;border-width:2px}.color-input-container{display:grid;grid-template-columns:16px 1fr 16px;align-items:center;gap:10px;border:1px solid;border-radius:8px;padding:.5em;width:100%;max-width:200px}.color-input{padding:0;border-radius:inherit;background:var(--color-background);color:var(--color-foreground);width:100%;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));font-family:var(--font-main) sans-serif;letter-spacing:2px;text-align:center}}}@layer components{.input-file-container{display:grid;gap:10px;.input-file--box{border:1px solid;border-radius:5px;position:relative;transition:all .3s ease;display:grid;grid-template-columns:32px 1fr;padding:10px;gap:10px;background:var(--color-secondary-500);color:var(--color-secondary-50);align-items:center;.input-file--box--icon{width:32px;height:32px;border-radius:5px;background:var(--color-primary-50);color:var(--color-primary-500);display:grid;place-content:center}input{position:absolute;top:0;left:0;width:100%;height:100%;cursor:copy;opacity:0}&:hover{background:var(--color-primary-50);color:var(--color-primary-500);.input-file--box--icon{background:var(--color-primary-500);color:var(--color-primary-50)}}}.input-file--files{max-height:280px;overflow-y:auto;border:1px solid;border-radius:5px;.input-file--files--content{display:grid}}.error{color:tomato}.total-info{font-size:1em;display:grid;grid-auto-flow:column;justify-content:end;align-items:center;gap:.5em;.total-info--delete{display:grid;place-content:center;height:100%;background:transparent;cursor:pointer;transition:all .3s ease;aspect-ratio:1 / 1;border-radius:50%;width:2em;font-size:.8em;&:hover{background:var(--color-primary-500);color:var(--color-primary-50)}}}}.input-file-card{display:grid;grid-template-columns:35px 1fr 35px;gap:1em;align-items:center;padding:10px;background:var(--color-background);&:not(:last-child){border-bottom:1px dashed}&:hover{.file-card--delete{color:var(--color-primary-500)}}.file-card--image{background:var(--color-primary-500);color:var(--color-primary-50);width:32px;height:32px;border-radius:5px;display:grid;place-content:center;border:1px solid}.file-card--data{display:grid;font-size:.7em;justify-content:start}.file-card--delete{border-radius:5px;display:grid;place-content:center;width:32px;height:32px;cursor:pointer;transition:all .3s ease;&:hover{background:var(--color-primary-500);color:var(--color-primary-50)}}}}@layer components{.polpo-radio{border-radius:50%;background:var(--color-background-paper);transition:all .3s ease;width:1em;height:1em;outline:2px solid;display:flex;position:relative;padding:2px;.polpo-radio-input{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:1}&.size-small{font-size:1em}&.size-regular{font-size:1.2em}&.size-large{font-size:1.4em}}.polpo-radio-fill{transition:all .2s ease-out;border-radius:inherit;margin:auto;width:0;height:0}.polpo-radio-container{--color: var(--color-gray-800);display:flex;align-items:center;gap:1em;width:fit-content;.polpo-radio-label{cursor:pointer;user-select:none}.polpo-radio{color:var(--color);&.is-checked{.polpo-radio-fill{width:100%;height:100%;background:var(--color)}}}.polpo-radio:hover,&:has(.polpo-radio-label:hover) .polpo-radio{box-shadow:0 0 0 .4em hsl(from var(--color) h s l / 50%);.polpo-radio-fill{width:20%;height:20%;background:hsl(from var(--color) h s l / 50%)}&:is(.is-checked){.polpo-radio-fill{width:80%;height:80%;background:var(--color)}}}&.color-primary{--color: var(--color-primary-500)}&.color-secondary{--color: var(--color-secondary-500)}&.color-tertiary{--color: var(--color-tertiary-500)}&.color-active{--color: var(--color-active-500)}&.color-warning{--color: var(--color-warning-500)}&.color-alert{--color: var(--color-alert-500)}&.color-info{--color: var(--color-info-500)}}}@layer components{.polpo-infinity-scroll{display:grid;place-content:start center;place-items:start center;.loading{width:100%;height:30px;display:grid;place-content:center;.loading--icon{animation:spin .5s linear infinite;font-size:20px}}.empty-message{font-size:.8em;text-align:center;color:#a6a6a6}}}@keyframes spin{to{transform:rotate(360deg)}}@layer components{.select{cursor:pointer;.icon-close{display:grid;place-content:center;align-self:center;border-radius:100%;cursor:pointer;font-size:.6em;padding:.5em;&:hover{background:hsl(from var(--color-foreground) h s l / 33%)}}.select-container{display:grid;grid-template-columns:1fr auto;gap:.5em;align-items:center;grid-auto-rows:auto;position:relative;cursor:pointer;user-select:none;&.three-columns{grid-template-columns:1fr auto auto}}.input-button{appearance:none;-webkit-appearance:none;-moz-appearance:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:grid;min-width:0;width:100%;border:0;margin:0;border-radius:0;background:transparent;color:currentColor;text-align:left;-webkit-tap-highlight-color:transparent;padding:0;grid-template-columns:1fr auto;&.placeholder{color:#919191}}.select-caret-icon{transition:transform .2s ease;&.is-select-open{transform:rotate(180deg)}}}.select-options-menu{.select-menu-content{gap:0;display:block;height:auto;overflow:initial}}.select-options{gap:0;display:grid;grid-template-rows:1fr;height:100%;overflow:auto;&.with-search-query{grid-template-rows:auto 1fr}.select-options-list-container{height:100%;overflow:auto}.select-options-list{display:grid;gap:.2em;padding:0;margin:0;list-style:none;align-content:start}}.select-options-header{background:var(--color-background);padding:2px 5px;border-bottom:1px solid var(--color-border);.input-search{outline:none;padding:.8em 5px;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));width:100%}}}@layer components{.polpo-input-slider{display:grid;grid-template-columns:1fr 50px;align-items:center;gap:10px;.polpo-slider{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:grid;align-items:center;&:focus{outline:none}&::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:1em;background:var(--color-primary-500);box-shadow:0 0 0 0 var(--color-gray-500);margin-top:-8px;transition:all .3s ease;cursor:pointer}&::-webkit-slider-runnable-track{height:4px;border-radius:1em;background:hsl(from var(--color-primary-200) h s l / 50%);transition:all .3s ease}&:focus,&:hover{&::-webkit-slider-thumb{background:var(--color-primary-500);box-shadow:0 0 0 6px hsl(from var(--color-primary-500) h s l / 50%);cursor:grab}}&:active{&::-webkit-slider-thumb{box-shadow:0 0 0 12px hsl(from var(--color-primary-500) h s l / 31%);cursor:grabbing}}&:focus{&::-webkit-slider-runnable-track{background:var(--color-primary-300)}}}&:has(.slider-number:focus) .slider::-webkit-slider-thumb,&:has(.slider-number:hover) .slider::-webkit-slider-thumb{background:var(--color-primary-500);box-shadow:0 0 0 6px hsl(from var(--color-primary-500) h s l / 31%)}.polpo-slider-number{transition:all .3s ease;border:1px solid;border-radius:5px;text-align:center;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));appearance:none;-webkit-appearance:none;-moz-appearance:none;width:100%;padding:4px 8px;font-weight:700;color:inherit;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}}&.is-focus{.slider-number{color:var(--color-primary-500)}}}}@layer components{.polpo-textarea{border:0;outline:0;field-sizing:content}}@layer components{.polpo-tooltip{color:var(--color-foreground);font-size:var(--text-small, .75rem);line-height:var(--tw-leading, var(--text-small--line-height, 1.6));font-weight:var(--tw-font-weight, var(--text-small--font-weight, regular));line-height:1em;border-radius:5px;padding:.5em 1em;display:block;border:1px solid;pointer-events:none;&:before{content:"";display:block;background:var(--color-background-paper);position:absolute;z-index:1;width:10px;height:10px;border-left:1px solid transparent;border-top:1px solid transparent;border-right:1px solid var(--color-foreground);border-bottom:1px solid var(--color-foreground);border-radius:0 0 3px}&.left{animation:fadeInRight .25s ease-out;&.close-animation{animation:fadeOutLeft .25s ease-out;transform:translate(-10px);opacity:0}&:before{top:50%;left:100%;transform:translate(-50%,-50%) rotate(-45deg)}}&.right{animation:fadeInLeft .25s ease-out;&.close-animation{animation:fadeOutRight .25s ease-out;transform:translate(10px);opacity:0}&:before{top:50%;right:100%;transform:translate(50%,-50%) rotate(135deg)}}&.top{animation:fadeInDown .25s ease-out;&.close-animation{animation:fadeOutUp .25s ease-out;transform:translateY(-10px);opacity:0}&:before{top:100%;left:50%;transform:translate(-50%,-50%) rotate(45deg)}}&.bottom{animation:fadeInUp .25s ease-out;&.close-animation{animation:fadeOutDown .25s ease-out;transform:translateY(10px);opacity:0}&:before{left:50%;bottom:100%;transform:translate(-50%,50%) rotate(-135deg)}}}}@layer components{.polpo-switch-container{--width: attr(data-width);--dot-size: attr(data-dot-size);--dot-hover-size: attr(data-dot-hover-size);--padding: attr(data-padding);--color: var(--color-gray-500);--color-dark: var(--color-gray-800);--color-contrast: var(--color-gray-50);display:flex;align-items:center;gap:.5em;width:fit-content;.polpo-switch{width:calc(var(--width) + var(--padding) * 2);border-radius:100em;background:var(--color-background-paper);padding:var(--padding);transition:all .3s ease;position:relative;.polpo-switch-dot{width:var(--dot-size);height:var(--dot-size);border-radius:100em;background:var(--color);display:block;transition:all .3s ease;margin-left:0;position:relative;z-index:1}.polpo-switch-icon{cursor:pointer;display:block}.switch-internal-left-icon,.switch-internal-right-icon{width:var(--dot-size);height:var(--dot-size);position:absolute;top:var(--padding);display:grid;place-content:center;color:var(--color-contrast);transition:all .3s ease}.switch-internal-left-icon{left:var(--padding)}.switch-internal-right-icon{right:var(--padding)}&.is-checked{background:var(--color);.polpo-switch-dot{margin-left:calc(var(--width) - var(--dot-size));background:var(--color);@supports (color: color-mix(in lab,red,red)){background:color-mix(in hsl,var(--color),var(--color-contrast) 75%)}}}&:not(.is-readonly):has(input:disabled){background:var(--color-background-disabled);.polpo-switch-dot{background:var(--color-foreground-disabled)}.switch-internal-left-icon,.switch-internal-right-icon{color:var(--color-foreground-disabled)}&.is-checked{background:var(--color-dark)}}.polpo-switch-checkbox{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:3}}.polpo-switch-label{cursor:pointer;user-select:none;padding:0 .5em}.polpo-switch:not(:has(.is-readonly,input:disabled)):hover .polpo-switch-dot,&:has(.polpo-switch-icon:hover) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot,&:has(.polpo-switch-label:hover) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot{box-shadow:0 0 0 calc(.3 * var(--dot-size)) var(--color);@supports (color: color-mix(in lab,red,red)){box-shadow:0 0 0 calc(.3 * var(--dot-size)) color-mix(in hsl,var(--color) 50%,var(--color-contrast))}}.polpo-switch:not(:has(.is-readonly,input:disabled)):active .polpo-switch-dot,&:has(.polpo-switch-icon:active) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot,&:has(.polpo-switch-label:active) .polpo-switch:not(:has(.is-readonly,input:disabled)) .polpo-switch-dot{width:var(--dot-hover-size)}.polpo-switch:not(:has(.is-readonly,input:disabled)).is-checked:active .polpo-switch-dot,&:has(.polpo-switch-icon:active) .polpo-switch:not(:has(.is-readonly,input:disabled)).is-checked .polpo-switch-dot,&:has(.polpo-switch-label:active) .polpo-switch:not(:has(.is-readonly,input:disabled)).is-checked .polpo-switch-dot{margin-left:calc(var(--width) - var(--dot-hover-size))}&.color-primary{--color: var(--color-primary-500);--color-dark: var(--color-primary-700);--color-contrast: var(--color-primary-50)}&.color-secondary{--color: var(--color-secondary-500);--color-dark: var(--color-secondary-700);--color-contrast: var(--color-secondary-50)}&.color-tertiary{--color: var(--color-tertiary-500);--color-dark: var(--color-tertiary-700);--color-contrast: var(--color-tertiary-50)}&.color-active{--color: var(--color-active-500);--color-dark: var(--color-active-700);--color-contrast: var(--color-active-50)}&.color-warning{--color: var(--color-warning-500);--color-dark: var(--color-warning-700);--color-contrast: var(--color-warning-50)}&.color-alert{--color: var(--color-alert-500);--color-dark: var(--color-alert-700);--color-contrast: var(--color-alert-50)}&.color-info{--color: var(--color-info-500);--color-dark: var(--color-info-700);--color-contrast: var(--color-info-50)}}}@layer components{.polpo-smart-table-container{border:0 solid var(--color-primary-500);border-radius:5px;overflow:auto;height:100%;width:100%;margin:auto}.polpo-smart-table{border-collapse:collapse;position:relative;width:100%;&.layout-fixed{table-layout:fixed}&.layout-scrollable{table-layout:auto}thead{position:sticky;z-index:10;top:0;box-shadow:0 3px 5px #0003,0 1px 10px #0000001f;tr{background:var(--color-primary-500);color:var(--color-primary-50);transition:all .3s ease}}tbody{tr{box-shadow:inset 0 0 0 0 var(--color-primary-500);transition:box-shadow .3s ease;&.row-selected,&:hover{background:var(--color-background-paper)}&.row-selected{box-shadow:inset 10px 0 0 -5px var(--color-primary-500)}&:not(:last-child){border-bottom:1px solid var(--color-border)}}}th{padding:.8em 1.2em;user-select:none;&.sort-on-click{cursor:pointer}.sort-icon{width:1em;display:block}svg{animation:fadeIn .3s ease}path{transition:all .3s ease}&:first-child{padding-left:2em}&:last-child{padding-right:2em}}td{transition:all .3s ease;padding:.6em 1em;&:first-child{padding-left:2em}&:last-child{padding-right:2em}}}}@layer components{.polpo-tab{cursor:pointer;user-select:none;transition:all .3s ease}.polpo-tab-list{--color: var(--color-gray-900);--color-contrast: var(--color-gray-50);--inner-radius: 0;--outer-radius: 0;display:grid;grid-auto-flow:column;gap:1em;align-items:center;position:relative;font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6));border-radius:var(--outer-radius);.tab,.polpo-tabs-selector{border-radius:var(--inner-radius)}&.size-small{font-size:var(--text-small, .75rem);line-height:var(--tw-leading, var(--text-small--line-height, 1.6));font-weight:var(--tw-font-weight, var(--text-small--font-weight, regular))}&.size-medium{font-size:var(--text-label, .875rem);line-height:var(--tw-leading, var(--text-label--line-height, 1.6))}&.size-large{font-size:var(--text-body, 1rem);line-height:var(--tw-leading, var(--text-body--line-height, 1.6));letter-spacing:var(--tw-tracking, var(--text-body--letter-spacing, 0));font-weight:var(--tw-font-weight, var(--text-body--font-weight, regular))}.polpo-tabs-selector{position:absolute;background:var(--color);color:var(--color-contrast);border-radius:1.5em;&.active{transition:all .3s ease}}.polpo-tab{border-radius:1.5em;padding:.5em 1em;z-index:1;text-align:center;&.is-open{color:var(--color-contrast)}&:not(.is-open):hover{color:var(--color-gray-900)}}&.radius-none{--outer-radius: 0;--inner-radius: 0}&.radius-small{--outer-radius: .5em;--inner-radius: .5em}&.radius-medium{--outer-radius: 1em;--inner-radius: .8em}&.radius-large{--outer-radius: 1.5em;--inner-radius: 1.3em}&.radius-full{--outer-radius: 1.8em;--inner-radius: 1.6em}&.vertical-direction{grid-auto-flow:row;align-items:unset;align-content:start}&.variant-solid{background:var(--color-background-paper);color:var(--color-foreground);padding:.5em}&.variant-ghost{border:1px solid var(--color);padding:.5em}&.variant-line{border-radius:0;&:not(.vertical-direction){border-bottom:2px solid var(--color-border)}.polpo-tabs-selector{border-radius:0}.polpo-tab{border-radius:0;&.is-open{color:var(--color)}}}&.color-primary{--color: var(--color-primary-500);--color-contrast: var(--color-primary-50)}&.color-secondary{--color: var(--color-secondary-500);--color-contrast: var(--color-secondary-50)}&.color-tertiary{--color: var(--color-tertiary-500);--color-contrast: var(--color-tertiary-50)}&.color-active{--color: var(--color-active-500);--color-contrast: var(--color-active-50)}&.color-warning{--color: var(--color-warning-500);--color-contrast: var(--color-warning-50)}&.color-alert{--color: var(--color-alert-500);--color-contrast: var(--color-alert-50)}&.color-info{--color: var(--color-info-500);--color-contrast: var(--color-info-50)}}}
|
|
2
2
|
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
package/dist/components.d.cts
CHANGED
|
@@ -8,6 +8,37 @@ import { P as PositionContainer } from './get-modal-position-C5jQsaGx.cjs';
|
|
|
8
8
|
import * as csstype from 'csstype';
|
|
9
9
|
import { KeyValuesOf } from './types.cjs';
|
|
10
10
|
|
|
11
|
+
declare enum ColorTypes {
|
|
12
|
+
DEFAULT = "default",
|
|
13
|
+
PRIMARY = "primary",
|
|
14
|
+
SECONDARY = "secondary",
|
|
15
|
+
TERTIARY = "tertiary",
|
|
16
|
+
ACCENT = "accent",
|
|
17
|
+
HIGHLIGHT = "highlight",
|
|
18
|
+
ACTIVE = "active",
|
|
19
|
+
WARNING = "warning",
|
|
20
|
+
ALERT = "alert",
|
|
21
|
+
INFO = "info"
|
|
22
|
+
}
|
|
23
|
+
declare enum SizeTypes {
|
|
24
|
+
SMALL = "small",
|
|
25
|
+
REGULAR = "regular",
|
|
26
|
+
LARGE = "large"
|
|
27
|
+
}
|
|
28
|
+
declare enum VariantTypes {
|
|
29
|
+
SOLID = "solid",
|
|
30
|
+
FLAT = "flat",
|
|
31
|
+
OUTLINED = "outlined",
|
|
32
|
+
TEXT = "text"
|
|
33
|
+
}
|
|
34
|
+
declare enum RadiusTypes {
|
|
35
|
+
NONE = "none",
|
|
36
|
+
SMALL = "small",
|
|
37
|
+
MEDIUM = "medium",
|
|
38
|
+
LARGE = "large",
|
|
39
|
+
FULL = "full"
|
|
40
|
+
}
|
|
41
|
+
|
|
11
42
|
declare const useAccordionItem: (id: string) => [boolean, () => void];
|
|
12
43
|
type AccordionProps = {
|
|
13
44
|
children: React__default.ReactNode;
|
|
@@ -66,35 +97,6 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
66
97
|
}
|
|
67
98
|
declare const Badge: ({ children, rounded, selected, noWrap, ref, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
68
99
|
|
|
69
|
-
declare enum ColorTypes {
|
|
70
|
-
DEFAULT = "default",
|
|
71
|
-
PRIMARY = "primary",
|
|
72
|
-
SECONDARY = "secondary",
|
|
73
|
-
TERTIARY = "tertiary",
|
|
74
|
-
ACTIVE = "active",
|
|
75
|
-
WARNING = "warning",
|
|
76
|
-
ALERT = "alert",
|
|
77
|
-
INFO = "info"
|
|
78
|
-
}
|
|
79
|
-
declare enum SizeTypes {
|
|
80
|
-
SMALL = "small",
|
|
81
|
-
REGULAR = "regular",
|
|
82
|
-
LARGE = "large"
|
|
83
|
-
}
|
|
84
|
-
declare enum VariantTypes {
|
|
85
|
-
SOLID = "solid",
|
|
86
|
-
FLAT = "flat",
|
|
87
|
-
OUTLINED = "outlined",
|
|
88
|
-
TEXT = "text"
|
|
89
|
-
}
|
|
90
|
-
declare enum RadiusTypes {
|
|
91
|
-
NONE = "none",
|
|
92
|
-
SMALL = "small",
|
|
93
|
-
MEDIUM = "medium",
|
|
94
|
-
LARGE = "large",
|
|
95
|
-
FULL = "full"
|
|
96
|
-
}
|
|
97
|
-
|
|
98
100
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
99
101
|
children: React.ReactNode;
|
|
100
102
|
color?: `${ColorTypes}`;
|
|
@@ -107,7 +109,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
107
109
|
isLoading?: boolean;
|
|
108
110
|
fullWidth?: boolean;
|
|
109
111
|
}
|
|
110
|
-
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, fullWidth, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
112
|
+
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, isLoading, fullWidth, disabled, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
111
113
|
|
|
112
114
|
type SlideCardProps = {
|
|
113
115
|
children: React__default.ReactNode;
|
|
@@ -1722,6 +1724,7 @@ declare const Portal: ({ children, id }: PortalProps) => React$1.ReactPortal | n
|
|
|
1722
1724
|
|
|
1723
1725
|
interface RippleProps {
|
|
1724
1726
|
color?: string;
|
|
1727
|
+
disabled?: boolean;
|
|
1725
1728
|
duration?: number;
|
|
1726
1729
|
timingFunction?: React__default.CSSProperties['animationTimingFunction'];
|
|
1727
1730
|
times?: number;
|
|
@@ -1729,12 +1732,10 @@ interface RippleProps {
|
|
|
1729
1732
|
style?: React__default.CSSProperties;
|
|
1730
1733
|
zIndex?: React__default.CSSProperties['zIndex'];
|
|
1731
1734
|
}
|
|
1732
|
-
declare const Ripple: ({ color, duration, timingFunction, times, className, style, zIndex, }: RippleProps) => react_jsx_runtime.JSX.Element;
|
|
1735
|
+
declare const Ripple: ({ color, disabled, duration, timingFunction, times, className, style, zIndex, }: RippleProps) => react_jsx_runtime.JSX.Element | null;
|
|
1733
1736
|
|
|
1734
1737
|
type Primitive = string | number | boolean;
|
|
1735
|
-
type RowDataObject =
|
|
1736
|
-
[key: string]: Primitive | object;
|
|
1737
|
-
};
|
|
1738
|
+
type RowDataObject = object;
|
|
1738
1739
|
type Order = 'asc' | 'desc';
|
|
1739
1740
|
type ColumnDataCommon<RowData extends RowDataObject> = {
|
|
1740
1741
|
header: React__default.ReactNode;
|
|
@@ -1864,4 +1865,4 @@ type ClickToCopyProps = {
|
|
|
1864
1865
|
};
|
|
1865
1866
|
declare const ClickToCopy: ({ children, value, position, offset, tooltipText, tooltipCopiedText, copiedTextTimeout, }: ClickToCopyProps) => react_jsx_runtime.JSX.Element;
|
|
1866
1867
|
|
|
1867
|
-
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, Badge, BadgeRounded, Button, type ButtonProps, Checkbox, ClickToCopy, type ColumnData, ConfirmationModal, Cursor, DatePicker, Field, FieldOrientation, type FieldProps, FieldVariant, FlipCard, HoverCard, Image, InfinityScroll, Input, InputColor, type InputFieldProps, InputFile, InputNumber, InputPassword, Line, LineOrientation, LineStyle, Menu, type MenuOptionProps, Modal, ModalBackdrop, type ModalProps, type Order, Portal, type Primitive, Radio, Ripple, type RowDataObject, Select, SlideCard, Slider, SmartTable, Switch, Tabs, Textarea, Tooltip, type TooltipProps, Typography, type TypographyProps, useAccordionItem };
|
|
1868
|
+
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, Badge, BadgeRounded, Button, type ButtonProps, Checkbox, ClickToCopy, ColorTypes, type ColumnData, ConfirmationModal, Cursor, DatePicker, Field, FieldOrientation, type FieldProps, FieldVariant, FlipCard, HoverCard, Image, InfinityScroll, Input, InputColor, type InputFieldProps, InputFile, InputNumber, InputPassword, Line, LineOrientation, LineStyle, Menu, type MenuOptionProps, Modal, ModalBackdrop, type ModalProps, type Order, Portal, type Primitive, Radio, RadiusTypes, Ripple, type RowDataObject, Select, SizeTypes, SlideCard, Slider, SmartTable, Switch, Tabs, Textarea, Tooltip, type TooltipProps, Typography, type TypographyProps, VariantTypes, useAccordionItem };
|
package/dist/components.d.ts
CHANGED
|
@@ -8,6 +8,37 @@ import { P as PositionContainer } from './get-modal-position-C5jQsaGx.js';
|
|
|
8
8
|
import * as csstype from 'csstype';
|
|
9
9
|
import { KeyValuesOf } from './types.js';
|
|
10
10
|
|
|
11
|
+
declare enum ColorTypes {
|
|
12
|
+
DEFAULT = "default",
|
|
13
|
+
PRIMARY = "primary",
|
|
14
|
+
SECONDARY = "secondary",
|
|
15
|
+
TERTIARY = "tertiary",
|
|
16
|
+
ACCENT = "accent",
|
|
17
|
+
HIGHLIGHT = "highlight",
|
|
18
|
+
ACTIVE = "active",
|
|
19
|
+
WARNING = "warning",
|
|
20
|
+
ALERT = "alert",
|
|
21
|
+
INFO = "info"
|
|
22
|
+
}
|
|
23
|
+
declare enum SizeTypes {
|
|
24
|
+
SMALL = "small",
|
|
25
|
+
REGULAR = "regular",
|
|
26
|
+
LARGE = "large"
|
|
27
|
+
}
|
|
28
|
+
declare enum VariantTypes {
|
|
29
|
+
SOLID = "solid",
|
|
30
|
+
FLAT = "flat",
|
|
31
|
+
OUTLINED = "outlined",
|
|
32
|
+
TEXT = "text"
|
|
33
|
+
}
|
|
34
|
+
declare enum RadiusTypes {
|
|
35
|
+
NONE = "none",
|
|
36
|
+
SMALL = "small",
|
|
37
|
+
MEDIUM = "medium",
|
|
38
|
+
LARGE = "large",
|
|
39
|
+
FULL = "full"
|
|
40
|
+
}
|
|
41
|
+
|
|
11
42
|
declare const useAccordionItem: (id: string) => [boolean, () => void];
|
|
12
43
|
type AccordionProps = {
|
|
13
44
|
children: React__default.ReactNode;
|
|
@@ -66,35 +97,6 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
66
97
|
}
|
|
67
98
|
declare const Badge: ({ children, rounded, selected, noWrap, ref, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
68
99
|
|
|
69
|
-
declare enum ColorTypes {
|
|
70
|
-
DEFAULT = "default",
|
|
71
|
-
PRIMARY = "primary",
|
|
72
|
-
SECONDARY = "secondary",
|
|
73
|
-
TERTIARY = "tertiary",
|
|
74
|
-
ACTIVE = "active",
|
|
75
|
-
WARNING = "warning",
|
|
76
|
-
ALERT = "alert",
|
|
77
|
-
INFO = "info"
|
|
78
|
-
}
|
|
79
|
-
declare enum SizeTypes {
|
|
80
|
-
SMALL = "small",
|
|
81
|
-
REGULAR = "regular",
|
|
82
|
-
LARGE = "large"
|
|
83
|
-
}
|
|
84
|
-
declare enum VariantTypes {
|
|
85
|
-
SOLID = "solid",
|
|
86
|
-
FLAT = "flat",
|
|
87
|
-
OUTLINED = "outlined",
|
|
88
|
-
TEXT = "text"
|
|
89
|
-
}
|
|
90
|
-
declare enum RadiusTypes {
|
|
91
|
-
NONE = "none",
|
|
92
|
-
SMALL = "small",
|
|
93
|
-
MEDIUM = "medium",
|
|
94
|
-
LARGE = "large",
|
|
95
|
-
FULL = "full"
|
|
96
|
-
}
|
|
97
|
-
|
|
98
100
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
99
101
|
children: React.ReactNode;
|
|
100
102
|
color?: `${ColorTypes}`;
|
|
@@ -107,7 +109,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
107
109
|
isLoading?: boolean;
|
|
108
110
|
fullWidth?: boolean;
|
|
109
111
|
}
|
|
110
|
-
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, fullWidth, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
112
|
+
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, isLoading, fullWidth, disabled, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
111
113
|
|
|
112
114
|
type SlideCardProps = {
|
|
113
115
|
children: React__default.ReactNode;
|
|
@@ -1722,6 +1724,7 @@ declare const Portal: ({ children, id }: PortalProps) => React$1.ReactPortal | n
|
|
|
1722
1724
|
|
|
1723
1725
|
interface RippleProps {
|
|
1724
1726
|
color?: string;
|
|
1727
|
+
disabled?: boolean;
|
|
1725
1728
|
duration?: number;
|
|
1726
1729
|
timingFunction?: React__default.CSSProperties['animationTimingFunction'];
|
|
1727
1730
|
times?: number;
|
|
@@ -1729,12 +1732,10 @@ interface RippleProps {
|
|
|
1729
1732
|
style?: React__default.CSSProperties;
|
|
1730
1733
|
zIndex?: React__default.CSSProperties['zIndex'];
|
|
1731
1734
|
}
|
|
1732
|
-
declare const Ripple: ({ color, duration, timingFunction, times, className, style, zIndex, }: RippleProps) => react_jsx_runtime.JSX.Element;
|
|
1735
|
+
declare const Ripple: ({ color, disabled, duration, timingFunction, times, className, style, zIndex, }: RippleProps) => react_jsx_runtime.JSX.Element | null;
|
|
1733
1736
|
|
|
1734
1737
|
type Primitive = string | number | boolean;
|
|
1735
|
-
type RowDataObject =
|
|
1736
|
-
[key: string]: Primitive | object;
|
|
1737
|
-
};
|
|
1738
|
+
type RowDataObject = object;
|
|
1738
1739
|
type Order = 'asc' | 'desc';
|
|
1739
1740
|
type ColumnDataCommon<RowData extends RowDataObject> = {
|
|
1740
1741
|
header: React__default.ReactNode;
|
|
@@ -1864,4 +1865,4 @@ type ClickToCopyProps = {
|
|
|
1864
1865
|
};
|
|
1865
1866
|
declare const ClickToCopy: ({ children, value, position, offset, tooltipText, tooltipCopiedText, copiedTextTimeout, }: ClickToCopyProps) => react_jsx_runtime.JSX.Element;
|
|
1866
1867
|
|
|
1867
|
-
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, Badge, BadgeRounded, Button, type ButtonProps, Checkbox, ClickToCopy, type ColumnData, ConfirmationModal, Cursor, DatePicker, Field, FieldOrientation, type FieldProps, FieldVariant, FlipCard, HoverCard, Image, InfinityScroll, Input, InputColor, type InputFieldProps, InputFile, InputNumber, InputPassword, Line, LineOrientation, LineStyle, Menu, type MenuOptionProps, Modal, ModalBackdrop, type ModalProps, type Order, Portal, type Primitive, Radio, Ripple, type RowDataObject, Select, SlideCard, Slider, SmartTable, Switch, Tabs, Textarea, Tooltip, type TooltipProps, Typography, type TypographyProps, useAccordionItem };
|
|
1868
|
+
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, Badge, BadgeRounded, Button, type ButtonProps, Checkbox, ClickToCopy, ColorTypes, type ColumnData, ConfirmationModal, Cursor, DatePicker, Field, FieldOrientation, type FieldProps, FieldVariant, FlipCard, HoverCard, Image, InfinityScroll, Input, InputColor, type InputFieldProps, InputFile, InputNumber, InputPassword, Line, LineOrientation, LineStyle, Menu, type MenuOptionProps, Modal, ModalBackdrop, type ModalProps, type Order, Portal, type Primitive, Radio, RadiusTypes, Ripple, type RowDataObject, Select, SizeTypes, SlideCard, Slider, SmartTable, Switch, Tabs, Textarea, Tooltip, type TooltipProps, Typography, type TypographyProps, VariantTypes, useAccordionItem };
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{createContext as Qt,useCallback as Zt,useContext as Kt,useMemo as Jt,useState as qt}from"react";import{clsx as Ut}from"clsx";import{twMerge as Vt}from"tailwind-merge";var h=(...e)=>Vt(Ut(e));var ee=(e,o=2)=>{if(e===0)return"0 Bytes";let t=1e3,r=o<0?0:o,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(r))+" "+a[n]};var eo=({c:e,m:o,offset:t,position:r})=>{let a=e.y+e.h+t,n=e.x-(o.w-e.w)*(50/100);switch(r){case"top":case"top center":a=e.y-o.h-t,n=e.x-(o.w-e.w)/2;break;case"top left":a=e.y-o.h-t,n=e.x-o.w+e.w;break;case"top right":a=e.y-o.h-t,n=e.x;break;case"bottom":case"bottom center":a=e.y+e.h+t,n=e.x-(o.w-e.w)/2;break;case"bottom left":a=e.y+e.h+t,n=e.x-o.w+e.w;break;case"bottom right":a=e.y+e.h+t,n=e.x;break;case"left":case"left center":a=e.y-(o.h-e.h)/2,n=e.x-o.w-t;break;case"left top":a=e.y-o.h+e.h,n=e.x-o.w-t;break;case"left bottom":a=e.y,n=e.x-o.w-t;break;case"right":case"right center":a=e.y-(o.h-e.h)/2,n=e.x+e.w+t;break;case"right top":a=e.y-o.h+e.h,n=e.x+e.w+t;break;case"right bottom":a=e.y,n=e.x+e.w+t;break}return{left:Math.round(n),top:Math.round(a)}},Yt=({top:e,left:o},t,r,a)=>{let n=t.split(" "),i=[],s=o+a.w+r-window.innerWidth,l=e+a.h+r-window.innerHeight;for(let c of n)c==="top"&&e<r?i.push("bottom"):c==="left"&&o<r?i.push("right"):c==="bottom"&&l>0?i.push("top"):c==="right"&&s>0?i.push("left"):i.push(c);return i.join(" ")},_t=({top:e,left:o},t,r)=>{let a=o+t.w+r-window.innerWidth,n=e+t.h+r-window.innerHeight;return o=a>0?o-a:o,e=n>0?e-n:e,o=o<r?r:o,e=e<r?r:e,{top:e,left:o}},oo=({c:e,m:o,offset:t,windowOffset:r,position:a})=>{let n={c:e,m:o,offset:t,position:a},i=eo(n),s=Yt(i,a,r,o);s!==a&&(i=eo({...n,position:s}));let l=_t(i,o,r);return{left:`${l.left}px`,top:`${l.top}px`}};var to=({position:e,windowOffset:o})=>{switch(e){case"center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case"top":case"top center":return{top:`${o}px`,left:"50%",transform:"translateX(-50%)"};case"top left":case"left top":return{top:`${o}px`,left:`${o}px`};case"top right":case"right top":return{top:`${o}px`,right:`${o}px`};case"bottom":case"bottom center":return{bottom:`${o}px`,left:"50%",transform:"translateX(-50%)"};case"left bottom":case"bottom left":return{bottom:`${o}px`,left:`${o}px`};case"right bottom":case"bottom right":return{bottom:`${o}px`,right:`${o}px`};case"left":case"left center":return{top:"50%",left:`${o}px`,transform:"translateY(-50%)"};case"right":case"right center":return{top:"50%",right:`${o}px`,transform:"translateY(-50%)"}}return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"}};import{jsx as Xt}from"react/jsx-runtime";var jt=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(jt||{}),Wt=(r=>(r.SOLID="solid",r.DOTTED="dotted",r.DASHED="dashed",r))(Wt||{}),ge=({orientation:e="horizontal",className:o="",style:t={},color:r="currentColor",size:a=1,lineStyle:n="solid",dashedSize:i=1,spacing:s=1})=>Xt("span",{className:h("polpo-custom-line",e,o,n),style:{...t,"--color":r,"--size":`${a}px`,"--spacing":`${s}px`,"--dashSize":`${i}px`}});import{jsx as Se}from"react/jsx-runtime";var ro=Qt(null),no=e=>{let o=Kt(ro);if(!o)throw new Error("You cant use this component out off an Accordion component");let{toggleItem:t,openedItems:r}=o,a=()=>t(e);return[r.includes(e),a]},Ci=({children:e,className:o="",noSeparators:t,multiple:r,style:a={},defaultOpened:n=[]})=>{let[i,s]=qt(()=>(Array.isArray(n)?n:[n]).reduce((p,d)=>typeof d=="string"?{...p,[d]:!0}:p,{})),l=Zt(p=>{s(d=>({...r?d:{},[p]:!d[p]}))},[r]),c=Jt(()=>Object.keys(i).filter(p=>i[p]),[i]);return Se(ro.Provider,{value:{toggleItem:l,openedItems:c},children:Se("section",{className:h("polpo-accordion",o),style:a,children:(Array.isArray(e)?e:[e]).flatMap((p,d)=>d===0?p:[t?null:Se(ge,{orientation:"horizontal"},`${d}.5`),p])})})};import{useMemo as Or}from"react";import{FaCaretLeft as Nr}from"react-icons/fa";import{jsx as er}from"react/jsx-runtime";var ao=({children:e,isOpen:o,className:t="",style:r={}})=>er("section",{className:t,style:{overflow:"hidden",height:o?"auto":0,transition:"height 300ms ease",interpolateSize:"allow-keywords",...r},children:e});import{useMemo as io}from"react";import{jsx as Ee,jsxs as or}from"react/jsx-runtime";var Di=({cardZIndex:e="auto",flipDirection:o="vertical",flipSpeed:t=500,isFlipped:r=!1,children:a})=>{let n=l=>{if(a.length!==2)throw new Error("Component FlipCard requires 2 children");return a[l]},i=io(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?180:0}deg)`,[o,r]),s=io(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?0:-180}deg)`,[o,r]);return Ee("section",{className:h("polpo-flip-card",r&&"is-flipped"),style:{"--cardZIndex":e,"--flipSpeed":`${t}ms`,"--frontRotate":i,"--backRotate":s},children:or("section",{className:"polpo-flipper",children:[Ee("section",{className:"front",children:n(0)}),Ee("section",{className:"back",children:n(1)})]})})};import{useCallback as Co,useRef as wo}from"react";import{useCallback as Xi,useMemo as Qi,useReducer as Zi}from"react";import{useCallback as Ui,useLayoutEffect as Vi,useRef as Yi}from"react";import{useMemo as tr}from"react";var G=e=>tr(()=>Object.entries(e).reduce((o,[t,r])=>r?[...o,t]:o,[]).join(" "),[e]);import{useEffect as rr,useLayoutEffect as nr,useRef as ar}from"react";function M(e,o,t,r){let a=ar(o);rr(()=>{a.current=o},[o]),nr(()=>{let n=t?.current??window;if(!(n&&n.addEventListener))return;let i=s=>a.current(s);return n.addEventListener(e,i,r),()=>{n.removeEventListener(e,i,r)}},[e,t,r])}var ir=(e,o)=>e.current&&!e.current.contains(o),so=(e,o)=>{M("keydown",t=>{t.key==="Escape"&&o()}),M("mousedown",t=>{let r=t.target;if(!r?.isConnected)return;(Array.isArray(e)?e:[e]).every(n=>ir(n,r))&&o()})};import{useState as ss}from"react";import{useState as ps,useCallback as ds}from"react";import{useEffect as sr,useState as lr}from"react";var Me=(e,o=500)=>{let[t,r]=lr(e);return sr(()=>{let a=setTimeout(()=>r(e),o);return()=>{clearTimeout(a)}},[e,o]),t};import{useState as hs}from"react";import{useState as ws}from"react";import{useEffect as cr}from"react";var Q=(e,o)=>{cr(()=>{let t=Array.isArray(e)?e:[e],r=new ResizeObserver(o);return t.forEach(a=>a.current&&r.observe(a.current)),()=>{r.disconnect()}},[e,o])};import{useEffect as pr,useState as dr}from"react";var lo=e=>{let o=document.getElementById(e);return o===null&&(o=document.createElement("div"),o.setAttribute("id",e),document.body.appendChild(o)),o},co=e=>{let[o,t]=dr(()=>lo(e));return pr(()=>{let r=document.getElementById(e);if(o===null||r===null){let a=lo(e);t(a)}return()=>{o&&o.parentNode&&process.env.NODE_ENV==="production"&&document.body.removeChild(o)}},[o,e]),o};import{useEffect as Ms,useState as Is}from"react";import{useEffect as As,useRef as Ds,useState as Fs}from"react";import{useCallback as $s,useRef as Bs,useState as Gs}from"react";import{useRef as ur,useState as fr}from"react";import{useEffect as mr}from"react";var po=(e,o,t={})=>{mr(()=>{let r=Array.isArray(e)?e:[e],a=new IntersectionObserver(o,t);return r.forEach(n=>n.current&&a.observe(n.current)),()=>{a.disconnect()}},[o,t,e])};var mo=(e={})=>{let[o,t]=fr(!1),r=ur(null);return po(r,([a])=>{t(a.isIntersecting)},e),{ref:r,inView:o}};import{useCallback as Ie,useState as gr}from"react";var I=({onBlur:e,onFocus:o,onChange:t}={})=>{let[r,a]=gr(!1),n=Ie(l=>{a(!0),o&&o(l)},[o]),i=Ie(l=>{a(!1),e&&e(l)},[e]),s=Ie(l=>{t&&t(l)},[t]);return{isFocus:r,handlers:{onFocus:n,onBlur:i,onChange:s}}};import{useEffect as hr,useState as br}from"react";var he=e=>{let[o,t]=br(!1);return hr(()=>{let r=window.matchMedia(e);r.matches!==o&&t(r.matches);let a=()=>{t(r.matches)};return r.addEventListener("change",a),()=>{r.removeEventListener("change",a)}},[o,e]),o};import{useRef as vr,useState as yr}from"react";var uo=()=>{let e=vr(null),[o,t]=yr(!1);return{containerRef:e,isOpen:o,openModal:()=>{t(!0)},closeModal:()=>{t(!1)}}};import{useCallback as fo,useLayoutEffect as xr,useRef as Tr}from"react";var go=e=>({x:e.x,y:e.y,w:e.width,h:e.height,top:e.top,left:e.left}),ho=({offset:e=0,windowOffset:o=0,position:t="bottom",modalRef:r,containerRef:a,isOpen:n})=>{let i=Tr(null),s=fo((c,p)=>{let d=c.current?.getClientRects()[0],u=p.current?.getClientRects()[0];if(!d)return;let m=u?oo({c:go(u),m:go(d),offset:e,windowOffset:o,position:t}):to({position:t,windowOffset:o});Object.keys(m).forEach(f=>{c.current?.style.setProperty(f,m[f])})},[t,o,e]),l=fo(()=>{n&&s(r,a??i)},[s,n,a,r]);xr(l,[l]),Q(a??i,l),Q(r,l),M("resize",l),M("scroll",l,r)};import Cr,{useCallback as bo,useEffect as wr,useLayoutEffect as Rr,useMemo as Pr}from"react";var vo=({transitionDuration:e=0,isOpen:o})=>{let[t,r]=Cr.useState("CLOSED"),a=Pr(()=>t!=="CLOSED",[t]);wr(()=>{document.documentElement.style.overflow=a?"hidden":"auto"},[a]);let n=bo(()=>{["OPENING","OPEN"].includes(t)&&(e>0?(r("CLOSING"),setTimeout(()=>{r("CLOSED")},e)):r("CLOSED"))},[t,e]),i=bo(()=>{["CLOSING","CLOSED"].includes(t)&&(e>0?(r("OPENING"),setTimeout(()=>{r("OPEN")},e)):r("OPEN"))},[t,e]);return Rr(()=>{t==="CLOSED"&&o?i():t==="OPEN"&&!o&&n()},[o,i,n,t]),{isVisible:a,modalState:t}};import{useRef as kr,useState as Sr}from"react";var yo=(e,o)=>{let{left:t,top:r}=e,a=t+window.scrollX,n=r+window.scrollY,i=o.pageX-a,s=o.pageY-n;return{x:o.pageX,y:o.pageY,elementX:i,elementY:s,elementPositionX:a,elementPositionY:n}},xo=e=>{let o=kr(null),[t,r]=Sr({x:null,y:null,elementX:null,elementY:null,elementPositionX:null,elementPositionY:null});return M("mousemove",n=>{let{clientX:i,clientY:s}=n;if(r(l=>({...l,x:i,y:s})),e?.current instanceof Element){let l=yo(e.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}else if(o.current instanceof Element){let l=yo(o.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}}),{...t,ref:o}};import{useState as bl}from"react";import{useEffect as Tl,useRef as Cl}from"react";import{useEffect as Pl,useRef as kl,useState as Sl}from"react";import{useEffect as Ol,useState as Nl}from"react";import{useCallback as Fl,useState as Hl}from"react";import{useCallback as Er,useState as Mr}from"react";var To=(e,o=0)=>{let[t,r]=Mr(o),a=Er(n=>{r(n!==void 0?n:i=>(i+1)%e.length)},[e.length]);return[e[t],a]};import{useEffect as Ul,useState as Vl}from"react";import{jsx as Ro}from"react/jsx-runtime";var Lc=({children:e,threshold:o=5,translationZ:t=25,width:r="fit-content",className:a=""})=>{let n=wo(null),i=wo(null),s=Co(c=>{let p=n.current,d=i.current;if(!p||!d)return;let{clientX:u,clientY:m,currentTarget:f}=c,{clientWidth:b,clientHeight:g}=f,{top:y,left:w}=p.getBoundingClientRect(),C=(u-w)/b,x=(m-y)/g,T=C*2-1,S=((x*2-1)*o).toFixed(2),O=(T*o).toFixed(2);d.style.transform=`perspective(${b}px) rotateX(${-S}deg) rotateY(${O}deg)`,p.style.transform=`perspective(${b}px) translateZ(${t}px)`},[o,t]),l=Co(c=>{let p=n.current,d=i.current;!p||!d||(d.style.transform=`perspective(${c.currentTarget.clientWidth}px) rotateX(0) rotateY(0)`,p.style.transform=`perspective(${c.currentTarget.clientWidth}px) translateZ(0)`)},[]);return M("mousemove",s,n),M("mouseleave",l,n),Ro("span",{ref:n,style:{width:r},className:h("polpo-hover-card",a),children:Ro("span",{className:"polpo-hover-card-layer",ref:i,children:e})})};import{createElement as Ir,useMemo as Lr}from"react";var Le={hero:"h1",header1:"h1",header2:"h2",header3:"h3",header4:"h4",body:"p",label:"span","label-form":"label",small:"small"},Po={hero:"hero",header1:"header1",header2:"header2",header3:"header3",header4:"header4",body:"body",label:"label","label-form":"label",small:"small"};var R=({variant:e="body",nowrap:o=!1,className:t="",style:r={},children:a,as:n,weight:i,family:s="primary",noPadding:l=!1,align:c,color:p,htmlFor:d,recommendedWidth:u=!1,...m})=>{let f=Lr(()=>Le[e]??Le.body,[e]);return Ir(n??f,{...m,className:h("polpo-typography",Po[e],t,i,p,l&&"no-padding",s==="code"&&"code-family",u&&"recommended-width",typeof o=="number"&&"nowrap-max-lines",o===2&&"nowrap-max-lines-2",o===3&&"nowrap-max-lines-3",o===4&&"nowrap-max-lines-4",o===5&&"nowrap-max-lines-5",o&&"nowrap"),htmlFor:d,style:{textAlign:c,...r}},a)};import{jsx as ae,jsxs as Oe}from"react/jsx-runtime";var ne=(e,o)=>typeof e=="function"?e(o):e,sp=({title:e,subtitle:o,children:t,icon:r=Nr,startContent:a,content:n,endContent:i,classNames:s={},className:l="",style:c={}})=>{let p=Or(()=>crypto.randomUUID(),[]),[d,u]=no(p),m=ne(e,d),f=ne(o,d),b=ne(a,d),g=ne(n,d)??Oe("section",{className:h("polpo-accordion-header-content",s?.headerContent),children:[ae(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:m}),ae(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:f})]}),y=ne(i,d)??ae(r,{className:h("polpo-accordion-toggle-icon",d&&"is-open",s?.toggleIcon)});return Oe("section",{className:h("polpo-accordion-item",l),style:c,children:[Oe("section",{className:h("polpo-accordion-header",a&&"has-start-content",d&&"is-open",s?.header),onClick:u,children:[b,g,y]}),ae(ao,{isOpen:d,children:ae("section",{className:h("polpo-accordion-body",s?.body),children:t})})]})};import{jsx as Dr}from"react/jsx-runtime";var Ar=(n=>(n.NONE="none",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n.FULL="full",n))(Ar||{}),bp=({children:e,rounded:o="medium",selected:t=!1,noWrap:r=!1,ref:a})=>Dr("span",{className:h("polpo-badge",o&&`rounded-${o}`,t&&"is-selected",r&&"no-wrap"),ref:a,children:e});import{useEffect as Fr,useRef as Hr}from"react";import{jsx as zr}from"react/jsx-runtime";var oe=({color:e,duration:o=1e3,timingFunction:t="ease-out",times:r=1,className:a="",style:n={},zIndex:i=1})=>{let s=Hr(null);return Fr(()=>{if(!s.current?.parentElement)return;let c=getComputedStyle(s.current.parentElement).position;["absolute","fixed","sticky","relative"].includes(c)||(s.current.parentElement.style.position="relative")},[]),zr("span",{ref:s,onMouseDown:c=>{let{pageX:p,pageY:d,currentTarget:u}=c,m=u.getBoundingClientRect(),f=(p-m.left)*100/m.width,b=(d-m.top)*100/m.height,g=document.createElement("span");g.classList.add("ripple-effect"),g.style.animationDuration=`${o}ms`,g.style.animationTimingFunction=t,g.style.left=`${f}%`,g.style.top=`${b}%`,e&&(g.style.background=e),u.appendChild(g),setTimeout(()=>{g.remove()},Math.max(o,500)*Math.max(r,1))},className:h("polpo-ripple",a),style:{...n,zIndex:i}})};import{jsx as $r,jsxs as Br}from"react/jsx-runtime";var So=({children:e,color:o="default",variant:t="solid",radius:r="medium",size:a="regular",noWrap:n=!1,forIcon:i=!1,fullWidth:s=!1,className:l="",...c})=>Br("button",{...c,className:h("polpo-button",o,t,s&&"full",r&&`radius-${r}`,a&&`size-${a}`,n&&"no-wrap",i&&"icon",l),children:[e,$r(oe,{})]});import{useEffect as Gr,useState as Ur}from"react";import{jsx as Eo,jsxs as Vr}from"react/jsx-runtime";var Zp=()=>{let{x:e,y:o,elementX:t,elementY:r,ref:a}=xo(),[n,i]=Ur(!1);if(M("mouseover",l=>{let c=getComputedStyle(l.target).cursor;i(c==="pointer")}),Gr(()=>("ontouchstart"in window||navigator.maxTouchPoints||(document.body.style.cursor="none"),()=>{document.body.style.cursor="auto"}),[]),e===null||o===null||"ontouchstart"in window||navigator.maxTouchPoints)return null;let s=`translate3d(${t}px, ${r}px, 0)`;return Vr("section",{className:"polpo-cursor-overlay",ref:a,children:[Eo("span",{className:`polpo-cursor outer-circle ${n?"cursor-hover":""}`,style:{transform:s}}),Eo("span",{className:`polpo-cursor inner-circle ${n?"cursor-hover":""}`,style:{transform:s}})]})};import{useMemo as jr}from"react";import{IoCheckmarkOutline as Wr}from"react-icons/io5";import{Controller as Yr,useFormContext as _r}from"react-hook-form";import{jsx as Mo}from"react/jsx-runtime";var E=({Component:e,inputProps:o,defaultValue:t,rules:r})=>{let{control:a,setValue:n}=_r(),{name:i,defaultValue:s}=o;return Mo(Yr,{name:i,control:a,rules:r,defaultValue:s??t,render:({field:{onBlur:l,value:c},fieldState:p})=>Mo(e,{value:c,error:p.error?.message,invalid:p.invalid,isTouched:p.isTouched,isDirty:p.isDirty,setValue:d=>n(i,d),onBlur:l,...o})})};import{jsx as ie,jsxs as Io}from"react/jsx-runtime";var te=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",icon:d=Wr,label:u,color:m="primary",size:f="regular"})=>{let b=jr(()=>crypto.randomUUID(),[]),{handlers:g}=I({onChange:C=>t(C.target.checked),onBlur:r,onFocus:a}),y=G({"checkbox-container":!0,[n]:!!n,[`color-${m}`]:!!m}),w=G({checkbox:!0,"is-checked":o,[`size-${f}`]:!!f});return Io("section",{className:y,style:i,onClick:C=>C.stopPropagation(),children:[Io("section",{className:w,children:[ie("section",{className:"checkbox-fill",children:ie(d,{size:"1.3em",className:"checkbox-icon"})}),ie("input",{id:b,type:"checkbox",name:e,className:"checkbox-input",checked:o,autoFocus:s,autoComplete:p,disabled:c||l,...g})]}),u?ie(R,{variant:"label-form",htmlFor:b,className:"checkbox-label",children:u}):null]})},Xr=({rules:e,...o})=>ie(E,{Component:te,defaultValue:!1,inputProps:o,rules:e});te.Controller=Xr;import{useMemo as Zr}from"react";import{ImCross as Qr}from"react-icons/im";var Lo=(r=>(r.FULL_BORDER="full-border",r.CONTENT_BORDER="content-border",r.CONTENT_LINE="line",r))(Lo||{}),Oo=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(Oo||{});import{jsx as K,jsxs as Ae}from"react/jsx-runtime";var No=({icon:e,className:o,onClick:t})=>e?K(e,{className:o,onClick:t}):K("span",{}),F=({id:e,label:o,leftIcon:t,rightIcon:r,errorIcon:a=Qr,error:n,onClickLeftIcon:i,onClickRightIcon:s,fieldOrientation:l="vertical",children:c,isFocus:p=!1,variant:d,ref:u})=>{let m=G({"form-field":!0,focus:p,error:!!n,"variant-content-border":d==="content-border","variant-content-line":d==="line","variant-full-border":d==="full-border","variant-inline":l==="horizontal"}),f=b=>g=>{g.stopPropagation();let y=document.getElementById(e);y?.focus(),y?.click(),b&&b()};return Ae("section",{className:m,ref:u,children:[o?K(R,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:e,children:o}):null,Ae("section",{className:"field-content",children:[No({className:"field-left-icon",icon:t,onClick:f(i)}),K("section",{className:"field-children",children:c}),No({className:"field-right-icon",icon:r,onClick:f(s)})]}),!!n&&Ae("section",{className:"field-message",children:[a?K(a,{size:10}):K("span",{}),K(R,{noPadding:!0,variant:"small",children:n})]})]})};import{jsx as De}from"react/jsx-runtime";var Ao=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,type:n="date",className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:u="off",isDirty:m=!1,isTouched:f=!1,invalid:b=!1,error:g,...y})=>{let w=Zr(()=>crypto.randomUUID(),[]),{isFocus:C,handlers:x}=I({onBlur:r,onChange:T=>t(T.target.value),onFocus:a});return De(F,{id:w,error:g,isFocus:C,...y,children:De("input",{id:w,type:n,name:e,className:i,style:s,value:o,autoFocus:l,autoComplete:u,placeholder:d,disabled:p,readOnly:c,...x})})},Kr=({rules:e,...o})=>De(E,{Component:Ao,defaultValue:"",inputProps:o,rules:e});Ao.Controller=Kr;import{useMemo as Jr}from"react";import{jsx as Fe}from"react/jsx-runtime";var Do=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,pattern:n,type:i="text",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:u="",autoComplete:m="off",isDirty:f=!1,isTouched:b=!1,invalid:g=!1,error:y,min:w,max:C,...x})=>{let T=Jr(()=>crypto.randomUUID(),[]),{handlers:P,isFocus:S}=I({onChange:O=>t(O.target.value),onBlur:r,onFocus:a});return Fe(F,{id:T,error:y,isFocus:S,...x,children:Fe("input",{id:T,type:i,name:e,className:s,style:l,value:o,pattern:n,autoFocus:c,autoComplete:m,placeholder:u,disabled:d,readOnly:p,min:w,max:C,...P})})},qr=({rules:e,...o})=>Fe(E,{Component:Do,defaultValue:"",inputProps:o,rules:e});Do.Controller=qr;import{useMemo as Fo}from"react";import{FiEye as en,FiEyeOff as on}from"react-icons/fi";import{IoIosWarning as tn}from"react-icons/io";import{jsx as He}from"react/jsx-runtime";var Ho=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",isDirty:u=!1,isTouched:m=!1,invalid:f=!1,error:b,...g})=>{let y=Fo(()=>crypto.randomUUID(),[]),[w,C]=To(["password","text"]),{isFocus:x,handlers:T}=I({onBlur:r,onChange:S=>t(S.target.value),onFocus:a}),P=Fo(()=>w==="password"?en:w==="text"?on:tn,[w]);return He(F,{id:y,error:b,isFocus:x,...g,rightIcon:P,onClickRightIcon:()=>C(),children:He("input",{id:y,type:w,name:e,className:n,style:i,value:o,autoFocus:s,autoComplete:d,placeholder:p,disabled:c,readOnly:l,...T})})},rn=({rules:e,...o})=>He(E,{Component:Ho,defaultValue:"",inputProps:o,rules:e});Ho.Controller=rn;import En from"color";import{useCallback as Mn,useEffect as In,useMemo as jo,useRef as Ln,useState as Wo}from"react";import{HexAlphaColorPicker as On,HexColorInput as Nn}from"react-colorful";import{FaEyeDropper as An}from"react-icons/fa6";import Dn from"use-eye-dropper";import{createContext as un,useCallback as Bo,useContext as fn,useRef as gn,useState as Go}from"react";import{ImCross as hn}from"react-icons/im";import{useMemo as pn,useRef as dn}from"react";import{createPortal as nn}from"react-dom";var zo=({children:e,id:o})=>{let t=co(o);return t===null?null:nn(e,t)};import{useMemo as sn}from"react";import{jsx as cn}from"react/jsx-runtime";var ln=(a=>(a.OPAQUE="opaque",a.TRANSPARENT="transparent",a.BLUR="blur",a.NONE="none",a))(ln||{}),$o=({opacity:e=.6,backdrop:o="blur",zIndex:t,backdropOnClick:r,modalState:a})=>{let n=sn(()=>({opaque:{background:`hsl(from var(--color-background-paper) h s l / ${e*100}%)`},transparent:{background:"transparent"},blur:{background:`hsl(from var(--color-background-paper) h s l / ${e*100}%)`,backdropFilter:"blur(5px)"},none:{display:"none"}})[o]??{},[o,e]);return o==="none"?null:cn("section",{tabIndex:-1,onClick:r,className:h("polpo-modal-backdrop",a==="CLOSING"||a==="CLOSED"&&"backdrop-close"),style:{zIndex:t,...n}})};import{jsx as ze,jsxs as mn}from"react/jsx-runtime";var U=({id:e,children:o,isOpen:t,onClose:r,className:a="",style:n={},rootStyle:i={},animation:s="fade-down",closeAnimationClassName:l="modal-close",modalRef:c,closeOnClickOutside:p=!0,transitionDuration:d=300,windowOffset:u=10,offset:m=20,position:f,containerRef:b,zIndex:g=1e3,...y})=>{let w=pn(()=>crypto.randomUUID(),[]),C=dn(null),{modalState:x,isVisible:T}=vo({transitionDuration:d,isOpen:t});return ho({modalRef:c??C,containerRef:b,offset:m,windowOffset:u,position:f,isOpen:T}),so(c??C,()=>{t&&p&&r()}),T?mn(zo,{id:`modal-${e}-${w}`,children:[ze($o,{...y,modalState:x,zIndex:g}),ze("section",{className:"polpo-modal",ref:c??C,style:{maxWidth:`calc(100dvw - ${u*2}px)`,maxHeight:`calc(100dvh - ${u*2}px)`,...i,zIndex:+g+1},children:ze("section",{style:{...n,animationDuration:`${d}ms`},className:h("polpo-modal-content",a,!!s&&s!=="none"&&`animation-${s}`,x==="CLOSING"||x==="CLOSED"&&l),children:o})})]}):null};import{jsx as V,jsxs as yn}from"react/jsx-runtime";var Uo=un(null),bn=()=>{let e=fn(Uo);if(!e)throw new Error("useActionModalContext must be used within a ActionModal");return e},se=({children:e,isOpen:o,onClose:t,actionRequired:r,icon:a,noCloseButton:n,lineOnTop:i=!1,backCard:s=!1,noPadding:l=!1,className:c="",style:p={},...d})=>{let[u,m]=Go(!1),f=gn(null),b=Bo(()=>{f.current?.classList.add("shake-animation"),setTimeout(()=>{f.current?.classList.remove("shake-animation")},500)},[]);return V(Uo.Provider,{value:{onClose:t,isActionInProgress:u,setIsActionInProgress:m},children:V(U,{className:"polpo-action-modal",id:"action-modal",animation:"bounce",opacity:.8,isOpen:o,onClose:t,...d,backdropOnClick:r?b:t,position:"center",children:V("section",{ref:f,className:"polpo-modal-content",children:yn("section",{className:h("polpo-action-modal-content",s&&"back-card",i&&"line-on-top",l&&"no-padding"),children:[!n&&!r&&V("section",{className:"close-modal-button",onClick:()=>t(),children:V(hn,{})}),a?V(R,{variant:"header4",className:"action-modal-icon",children:V(a,{})}):null,V("section",{className:"polpo-action-modal-body",children:V("section",{className:`polpo-action-modal-content ${c}`,style:p,children:e})})]})})})})},vn=({onClick:e,children:o,isLoading:t,...r})=>{let{onClose:a,isActionInProgress:n,setIsActionInProgress:i}=bn(),[s,l]=Go(!1),c=Bo(()=>{l(!0),i(!0);let p=e();p instanceof Promise?p.then(()=>{a(),l(!1),i(!1)}):(a(),l(!1),i(!1))},[e,a,i]);return!s&&n?null:V(So,{...r,onClick:c,isLoading:t||s,children:o})};se.ActionButton=vn;import{useMemo as xn}from"react";import{ImCross as Tn}from"react-icons/im";import{jsx as $e,jsxs as Cn}from"react/jsx-runtime";var lu=({children:e,isOpen:o,onClose:t,position:r="left",size:a,className:n="",...i})=>{let s=xn(()=>({top:{height:a,width:"100%"},left:{height:"100%",width:a},right:{height:"100%",width:a},bottom:{height:a,width:"100%"}})[r],[r,a]);return Cn(U,{id:"aside",isOpen:o,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:h("polpo-aside-modal",n,r),rootStyle:s,backdropOnClick:t,position:r,...i,children:[$e("span",{className:"close-modal-button",onClick:t,children:$e(Tn,{})}),$e("section",{className:"polpo-aside-modal-content",children:e})]})};import{jsx as le,jsxs as Vo}from"react/jsx-runtime";var yu=({title:e,onAccept:o,onReject:t=()=>null,acceptText:r,rejectText:a,children:n,isLoading:i,...s})=>le(se,{...s,backCard:!0,children:Vo("section",{className:"polpo-confirmation-modal",children:[le(R,{variant:"header4",children:e}),le("section",{children:n}),Vo("section",{className:"polpo-confirmation-modal-actions",children:[!i&&le(se.ActionButton,{variant:"flat",onClick:t,children:a}),le(se.ActionButton,{isLoading:i,onClick:o,children:r})]})]})});import{useCallback as wn,useMemo as Rn}from"react";import{Fragment as Yo,jsx as z,jsxs as be}from"react/jsx-runtime";var _=({children:e,isOpen:o,onClose:t,id:r,menuContentRef:a,contentClassName:n="",contentStyle:i={},className:s="",...l})=>z(U,{className:h("polpo-menu-modal",s),...l,id:`menu-${r}`,isOpen:o,onClose:t,children:z("ul",{className:`polpo-menu-content ${n}`,role:"listbox",style:i,ref:a,children:e})}),Pn=({children:e,label:o="",asCheckbox:t,icon:r,id:a,disabled:n=!1,selected:i=!1,className:s="",style:l={},onClick:c=()=>null,...p})=>{let d=wn(m=>{m.stopPropagation(),n||c(!i)},[n,c,i]),u=Rn(()=>e||(t?z(te,{className:"menu-checkbox",disabled:n,value:i,setValue:m=>c(m),name:"option",style:{pointerEvents:"none"},size:"small",label:be(Yo,{children:[r!==void 0&&z(r,{className:"option-icon"}),z(R,{variant:"label",children:o})]})}):be(Yo,{children:[r!==void 0&&z(r,{className:"option-icon"}),typeof o=="string"?z(R,{variant:"label",children:o}):o]})),[t,e,n,r,o,c,i]);return be("li",{...p,id:a,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":n,onClick:d,className:h("polpo-menu-option",n&&"is-disabled",i&&"is-selected",s),style:l,children:[z(oe,{zIndex:10}),u]})},kn=()=>z("li",{children:z(ge,{className:"divider"})}),_o=({children:e,className:o="",...t})=>z("li",{tabIndex:-1,className:"polpo-menu-label",children:z(R,{...t,variant:"small",className:`menu-group-label ${o}`,children:e})}),Sn=({children:e,label:o,className:t="",style:r={},contentClassName:a="",contentStyle:n={},...i})=>{let s=G({"polpo-menu-group":!0,[t]:!!t});return be("li",{tabIndex:-1,...i,className:s,style:r,children:[o&&z(_o,{children:o}),z("ul",{className:`polpo-menu-group-content ${a}`,role:"listbox",style:n,children:e})]})};_.Option=Pn;_.Divider=kn;_.GroupLabel=_o;_.Group=Sn;import{jsx as Z,jsxs as ve}from"react/jsx-runtime";var Xo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,showValueText:n=!1,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:u="off",isDirty:m=!1,isTouched:f=!1,invalid:b=!1,error:g,...y})=>{let{open:w,isSupported:C}=Dn(),[x,T]=Wo(o),P=jo(()=>crypto.randomUUID(),[]),S=Ln(null),[O,A]=Wo(!1),{handlers:H,isFocus:B}=I({onChange:N=>T(N.target.value),onBlur:N=>{Y(),r&&r(N)},onFocus:N=>{Y(),a&&a(N)}}),v=jo(()=>{let N=En(o===""?"#000000":o);return N.isLight()||N.alpha()<.5?"#000000":"#FFFFFF"},[o]),k=async()=>{let{sRGBHex:N}=await w();t(N)};In(()=>{T(o)},[o]);let Y=Mn(()=>{x.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(x):T(o)},[x,t,o]),W=G({"input-color-box":!0,[i]:!!i});return ve(F,{id:P,error:g,isFocus:B,...y,children:[ve("section",{className:"input-color",onClick:N=>{N.stopPropagation(),A(!0)},ref:S,children:[Z("section",{className:W,style:{borderColor:v,background:o,color:o,...s}}),n?Z("input",{id:P,name:e,value:x,placeholder:d,readOnly:c,autoFocus:l,disabled:p,autoComplete:u,className:"color-input",...H}):null]}),ve(U,{id:"input-color",isOpen:O,onClose:()=>A(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:S,className:"input-color-selector",children:[Z(On,{id:P,color:o,onChange:t}),ve("section",{className:"color-input-container",children:[C()?Z(An,{onClick:()=>{k()}}):Z("span",{}),Z(Nn,{className:"color-input",id:P,name:e,color:o,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),Z("span",{})]})]})]})},Fn=({rules:e,...o})=>Z(E,{Component:Xo,defaultValue:"#147EFB",inputProps:o,rules:e});Xo.Controller=Fn;import{useCallback as zn,useEffect as $n,useMemo as Qo,useState as Bn}from"react";import{FaMagnifyingGlass as Gn,FaRegTrashCan as Zo}from"react-icons/fa6";import{IoIosWarning as Un}from"react-icons/io";import{PiFilePdfFill as Vn,PiFilePngFill as Yn}from"react-icons/pi";import{createElement as hf}from"react";import{createElement as Hn}from"react";var ce=({tag:e="section",children:o,className:t,style:r,flow:a,columnSize:n,rowSize:i,column:s,row:l,pc:c,pi:p,ps:d,jc:u,ji:m,js:f,ac:b,ai:g,as:y,gtc:w,gtr:C,gta:x,gt:T,gap:P,...S})=>Hn(e,{className:t,...S,style:{...r,...a?{gridAutoFlow:a}:{},...n?{gridAutoColumns:n}:{},...i?{gridAutoRows:i}:{},...s?{gridColumn:s}:{},...l?{gridRow:l}:{},...c?{placeContent:c}:{},...p?{placeItems:p}:{},...d?{placeSelf:d}:{},...u?{justifyContent:u}:{},...m?{justifyItems:m}:{},...f?{justifySelf:f}:{},...b?{alignContent:b}:{},...g?{alignItems:g}:{},...y?{alignSelf:y}:{},...w?{gridTemplateColumns:w}:{},...C?{gridTemplateRows:C}:{},...x?{gridTemplateAreas:x}:{},...T?{gridTemplate:T}:{},...P?{gap:P}:{},display:"grid"}},o);import{Fragment as jn,jsx as D,jsxs as j}from"react/jsx-runtime";var Ko=({name:e,value:o={},setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="Click to upload or drag and drop",autoComplete:d="off",accept:u,multiple:m=!1,limitSize:f=5e6,errorTimeout:b=3e3,label:g})=>{let[y,w]=Bn(null),C=Qo(()=>crypto.randomUUID(),[]),{handlers:x}=I({onBlur:r,onFocus:a,onChange:v=>{let{files:k}=v.target;k&&T(k)}});$n(()=>{let v=null;return y!==null&&(v=setTimeout(()=>{w(null)},b)),()=>{v!==null&&clearTimeout(v)}},[y,b]);let T=v=>{let k=m?{...o}:{},Y=m?v.length:1;for(let W=0;W<Y;W++){let N=v.item(W);N&&(N.size<f?k[N.name]=N:w(`File '${N.name}' size is larger than ${ee(f)}`))}t(k)},P=v=>{v.preventDefault(),v.stopPropagation(),v.dataTransfer.files&&v.dataTransfer.files.length&&T(v.dataTransfer.files)},S=zn(v=>({"image/png":Yn,"application/pdf":Vn})[v]??Un,[]),O=v=>{let k={...o};delete k[v.name],t(k)},A=()=>{t({})},H=Qo(()=>Object.values(o).reduce((v,{size:k})=>v+k,0),[o]),B=(v,k)=>{let Y=S(v.type);return j("section",{className:"input-file-card",children:[D("section",{className:"file-card--image",children:D(Y,{})}),j(ce,{children:[D(R,{variant:"label",noPadding:!0,nowrap:!0,children:v.name}),D(R,{noPadding:!0,variant:"small",children:ee(v.size)})]}),D("section",{className:"file-card--delete",onClick:()=>O(v),children:D(Zo,{})})]},k)};return j("section",{className:"input-file-container",children:[!!g&&D(R,{variant:"label-form",htmlFor:C,noPadding:!0,children:g}),j("section",{className:"input-file--box",onDrop:P,children:[D("section",{className:"input-file--box--icon",children:D(Gn,{})}),j(ce,{children:[D(R,{variant:"label-form",htmlFor:C,noPadding:!0,weight:"bold",children:p}),j(R,{variant:"small",noPadding:!0,children:["Max size (",ee(f),")"]})]}),D("input",{id:C,type:"file",name:e,value:"",placeholder:p,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:n,style:i,accept:u,multiple:m,title:"",...x})]}),y!==null&&D(R,{variant:"small",noPadding:!0,className:"error",children:y}),Object.keys(o).length>0&&j(jn,{children:[m&&j("span",{className:"total-info",children:[j(R,{variant:"small",noPadding:!0,children:[Object.keys(o).length," files - ",ee(H)]}),D("span",{className:"total-info--delete",onClick:A,children:D(Zo,{})})]}),D("section",{className:"input-file--files",children:D("section",{className:"input-file--files--content",children:Object.values(o).map(B)})})]})]})},_n=({rules:e,...o})=>D(E,{Component:Ko,defaultValue:{},inputProps:o,rules:e});Ko.Controller=_n;import{useEffect as Wn,useMemo as Jo,useState as Xn}from"react";import{jsx as Be}from"react/jsx-runtime";var qo={comma:/(?!^-)[^0-9,]/g,dot:/(?!^-)[^0-9.]/g},et=(e,o=".")=>{let t=o==="."?qo.dot:qo.comma,r=e.replace(t,"").replace(",",".");return r||""},ye=(e,o)=>!e||Number.isNaN(e)?o(0):o(e),ot=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,pattern:n,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:u="off",isDirty:m=!1,isTouched:f=!1,invalid:b=!1,error:g,min:y,max:w,decimalSeparator:C,format:x={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...T})=>{let P=Jo(()=>crypto.randomUUID(),[]),S=Jo(()=>{if(typeof x=="function")return x;let{locales:v,...k}=x;return Intl.NumberFormat(v,k).format},[x]),[O,A]=Xn(ye(o,S)),{handlers:H,isFocus:B}=I({onChange:v=>{let k=et(v.target.value,C);k.endsWith(".")?A(v.target.value):(A(ye(Number(k),S)),t(Number(k)))},onBlur:v=>{let k=et(v.target.value,C);A(ye(Number(k),S)),t(Number(k)),r&&r(v)},onFocus:a});return Wn(()=>{let v=ye(o,S);O!==v&&A(v)},[S,O,o]),Be(F,{id:P,error:g,isFocus:B,...T,children:Be("input",{id:P,type:"text",name:e,className:i,style:s,value:O,pattern:n,autoFocus:l,autoComplete:u,placeholder:d,disabled:p,readOnly:c,min:y,max:w,...H})})},Qn=({rules:e,...o})=>Be(E,{Component:ot,defaultValue:0,inputProps:o,rules:e});ot.Controller=Qn;import{useMemo as Zn}from"react";import{jsx as xe,jsxs as tt}from"react/jsx-runtime";var rt=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",radioValue:d,label:u,color:m="primary",size:f="regular"})=>{let b=Zn(()=>crypto.randomUUID(),[]),{handlers:g}=I({onChange:y=>t(y.target.value),onBlur:r,onFocus:a});return tt("section",{className:h("polpo-radio-container",n,m&&[`color-${m}`]),style:i,children:[tt("section",{className:h("polpo-radio",d===o&&"is-checked",f&&[`size-${f}`]),children:[xe("section",{className:"polpo-radio-fill"}),xe("input",{id:b,type:"radio",name:e,className:`polpo-radio-input ${n}`,style:i,value:d,checked:d===o,autoFocus:s,autoComplete:p,disabled:c||l,...g})]}),u?xe(R,{variant:"label-form",htmlFor:b,className:"polpo-radio-label",children:u}):null]})},Kn=({rules:e,...o})=>xe(E,{Component:rt,defaultValue:"",inputProps:o,rules:e});rt.Controller=Kn;import{createContext as ta,useCallback as dt,useContext as ra,useMemo as Ce,useRef as mt,useState as na}from"react";import{ImCross as aa}from"react-icons/im";import{PiCaretDown as ia}from"react-icons/pi";import{useEffect as Jn}from"react";import{Fragment as qn,jsx as Ge,jsxs as nt}from"react/jsx-runtime";var at=({isLoading:e=!1,hasNextPage:o=!1,loadMore:t,customLoadMoreElement:r,emptyMessage:a,children:n})=>{let{ref:i,inView:s}=mo(),l=Me(e,100);Jn(()=>{o&&s&&!l&&t()},[o,l,t,s]);let c=Array.isArray(n)?n.length>0:!!n;return nt(qn,{children:[n,nt("section",{className:"polpo-infinity-scroll",children:[!!a&&!c&&!l&&Ge("p",{className:"empty-message",children:a}),(o||l)&&(r?r(i):Ge("section",{ref:i,className:"loading",children:l&&Ge("span",{className:"loading--icon",children:":D"})}))]})]})};import{useCallback as Ue,useMemo as it}from"react";import{jsx as st}from"react/jsx-runtime";var lt=({children:e,value:o})=>{let{multiselect:t,isEqualComparator:r,maxOptions:a,selectedValue:n,setValue:i,setIsOpen:s}=ct(),l=Ue((m,f)=>["number","string"].includes(typeof m)?m===f:!!r&&r(m,f),[r]),c=Ue(m=>{if(m)if(t){if(a&&Array.isArray(n)&&n.length>=a)return;i([...n,o])}else i(o),s(!1);else t?i(n.filter(f=>!l(f,o))):(i(null),s(!1))},[t,a,n,i,o,s,l]),p=it(()=>n===""||n===null?!1:Array.isArray(n)?["number","string"].includes(typeof o)?n.includes(o):n.some(m=>!!r&&r(o,m)):l(o,n),[l,r,n,o]),d=Ue(m=>{["Enter"," "].includes(m.key)&&(m.preventDefault(),c(!(p&&t)))},[c,p,t]),u=it(()=>typeof e=="string"?st(R,{"data-value":o,variant:"label",nowrap:!0,children:e}):e,[e,o]);return st(_.Option,{label:u,onKeyDown:d,asCheckbox:t,selected:p,onClick:m=>c(t?m:!0)})};import{useCallback as Ye,useEffect as _e,useRef as Ve,useState as je}from"react";import{jsx as Te,jsxs as oa}from"react/jsx-runtime";var ea=({height:e,minHeight:o,containerRef:t,offset:r,windowOffset:a})=>{let[n,i]=je(void 0),s=Ye(()=>{let l=t.current?.getBoundingClientRect().bottom??0,c=window.innerHeight-l-a-r-5,p=window.innerHeight-a*3,d=c<o?p:c,u=Math.min(d,e),m=Math.max(u,o);i(`${Math.round(m)}px`)},[t,a,r,o,e]);return _e(()=>{s()},[s]),Q(t,s),M("resize",s),{h:n}},pt=({children:e,searchQueryValue:o,searchQueryPlaceholder:t="Search option",searchQueryClassName:r="",searchQueryStyle:a={},onSearchQuery:n,containerRef:i,height:s=300})=>{let l=Ve(null),c=Ve(null),[p,d]=je(""),u=Ve(null),m=he("(max-width: 480px)");M("keydown",x=>{if(["ArrowDown","ArrowUp"].includes(x.code)){x.preventDefault();let T=document.activeElement;if(T?.tagName==="LI")switch(x.code){case"ArrowDown":T?.nextSibling?.focus();break;case"ArrowUp":T?.previousElementSibling?.focus();break}}});let f=Ye(x=>{let{value:T}=x.target;n&&n(T),d(T)},[n]);_e(()=>{u.current&&u.current.focus()},[]);let{h:b}=ea({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[g,y]=je(!1),w=Ye(()=>{let x=Math.round(l.current?.getBoundingClientRect().height??0)+2,T=Math.round(c.current?.scrollHeight??0);y(x>=T)},[]);_e(w,[w]),Q(l,w),Q(c,w),M("resize",w);let C=G({"select-options-header":!0,[r]:!!r});return oa("section",{className:`select-options ${n?"with-search-query":""}`,style:m?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{height:g?"auto":b,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[n&&Te("section",{className:C,style:a,children:Te("input",{name:"query",className:"input-search",value:o??p,onChange:f,placeholder:t,onClick:x=>x.stopPropagation(),ref:u,autoFocus:!0})}),Te("section",{className:"select-options-list-container",ref:l,children:Te("ul",{className:"select-options-list",ref:c,children:e})})]})};import{jsx as L,jsxs as ut}from"react/jsx-runtime";var ft=ta(null),ct=()=>{let e=ra(ft);if(!e)throw new Error("useSelectContext must be used within a Select component");return e},sa=({children:e})=>{let o=Ce(()=>typeof e=="string"?L(R,{noPadding:!0,variant:"label",nowrap:!0,children:e}):e,[e]);return L(_.GroupLabel,{children:o})},la=({value:e})=>L(R,{variant:"label",nowrap:!0,children:typeof e=="string"||typeof e=="number"?e:JSON.stringify(e)}),ca=({value:e,multiselect:o})=>o?L(R,{noPadding:!0,nowrap:!0,variant:"label",children:`${e.length} item${e.length===1?"":"s"} selected`}):e===null?null:L(R,{noPadding:!0,variant:"label",nowrap:!0,children:typeof e=="string"||typeof e=="number"?e:JSON.stringify(e)}),J=({options:e,isEqualComparator:o,searchQueryValue:t,searchQueryPlaceholder:r,onSearchQuery:a,loadMore:n=()=>null,isLoading:i=!1,hasNextPage:s=!1,emptyMessage:l="No options to select",multiselect:c,optionComponent:p=la,valueComponent:d=ca,maxOptions:u,children:m,name:f,value:b,setValue:g,onBlur:y,onFocus:w,className:C="",style:x={},showClearOption:T=!1,height:P,searchQueryStyle:S,searchQueryClassName:O,autoFocus:A=!1,readOnly:H=!1,disabled:B=!1,placeholder:v="",autoComplete:k="off",isDirty:Y=!1,isTouched:W=!1,invalid:N=!1,error:Ft,...Ht})=>{let zt=mt(null),me=he("(max-width: 480px)"),Je=Ce(()=>crypto.randomUUID(),[]),Re=mt(null),[ue,qe]=na(!1),Pe=dt(X=>{qe(X&&!B)},[B]),$t=dt(X=>{X.stopPropagation(),g(c?[]:null)},[c,g]),ke=Ce(()=>c?b.length>0:!!b,[c,b]),Bt=Ce(()=>m||e.map((X,Gt)=>L(J.Option,{value:X,children:L(p,{value:X})},Gt)),[p,m,e]);return L(ft.Provider,{value:{selectedValue:b,setValue:g,multiselect:c??!1,isEqualComparator:o,maxOptions:u??null,setIsOpen:qe},children:L(F,{id:Je,error:Ft,isFocus:ue,ref:Re,...Ht,children:ut("section",{id:f,style:x,onBlur:y,className:`select ${B?"disabled":""} ${C}`,children:[ut("section",{id:Je,className:`select-container ${ke&&T?"three-columns":""}`,onClick:()=>Pe(!0),children:[L("button",{type:"button",className:`input-button ${(Array.isArray(b)?b.length>0:b)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":ue,onFocus:X=>{Pe(!0),w&&w(X)},children:ke?L(d,{...c?{value:b,multiselect:c}:{value:b}}):L(R,{variant:"label",noPadding:!0,nowrap:!0,children:v})}),ke&&T&&L("section",{className:"icon-close",onClick:$t,children:L(aa,{})}),L(ia,{className:`select-caret-icon ${ue&&"is-select-open"}`})]}),L(_,{id:"form-select",isOpen:ue,onClose:()=>Pe(!1),backdrop:me?"blur":"transparent",opacity:me?.8:.4,position:me?"center":"bottom",offset:5,modalRef:zt,windowOffset:10,transitionDuration:200,containerRef:me?void 0:Re,contentClassName:"select-menu-content",className:"select-options-menu",children:L(pt,{containerRef:Re,onSearchQuery:a,searchQueryValue:t,searchQueryPlaceholder:r,searchQueryClassName:O,searchQueryStyle:S,height:P,children:L(at,{isLoading:i,hasNextPage:s,loadMore:n,emptyMessage:l,children:Bt})})})]})})})},pa=({rules:e,...o})=>L(E,{Component:J,defaultValue:[],inputProps:{...o,multiselect:!0},rules:e}),da=({rules:e,...o})=>L(E,{Component:J,defaultValue:null,inputProps:{...o,multiselect:!1},rules:e}),ma=e=>{let{multiselect:o}=e;return o?L(pa,{...e,multiselect:!0}):L(da,{...e,multiselect:!1})};J.Controller=ma;J.Option=lt;J.OptionLabel=sa;import{useMemo as ua}from"react";import{jsx as we,jsxs as ga}from"react/jsx-runtime";var gt=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,min:n,max:i,step:s,onlySlider:l=!1,className:c="",style:p={},autoFocus:d=!1,readOnly:u=!1,disabled:m=!1,placeholder:f="",autoComplete:b="off",isDirty:g=!1,isTouched:y=!1,invalid:w=!1,error:C,...x})=>{let T=ua(()=>crypto.randomUUID(),[]),P=A=>{r&&r(A);let H=parseInt(`${o}`);n!==void 0&&H<n&&t(n),i!==void 0&&H>i&&t(i),t(H)},{isFocus:S,handlers:O}=I({onBlur:P,onChange:A=>t(+A.target.value),onFocus:a});return we(F,{id:T,error:C,isFocus:S,...x,children:ga("section",{className:h("polpo-input-slider",S&&"is-focus"),children:[we("input",{id:T,type:"range",name:e,className:`polpo-slider ${c}`,style:p,value:o,autoFocus:d,autoComplete:b,placeholder:f,disabled:m,readOnly:u,min:n,max:i,step:s,...O}),!l&&we("input",{id:T,type:"number",name:e,className:`polpo-slider-number ${c}`,style:p,value:o,autoComplete:b,disabled:m,readOnly:u,min:n,max:i,step:s,...O})]})})},fa=({rules:e,...o})=>we(E,{Component:gt,defaultValue:0,inputProps:o,rules:e});gt.Controller=fa;import{useMemo as ha}from"react";import{jsx as We}from"react/jsx-runtime";var ht=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,rows:n=4,resize:i="vertical",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:u="",autoComplete:m="off",isDirty:f=!1,isTouched:b=!1,invalid:g=!1,error:y,...w})=>{let C=ha(()=>crypto.randomUUID(),[]),{handlers:x,isFocus:T}=I({onBlur:r,onChange:P=>t(P.target.value),onFocus:a});return We(F,{id:C,error:y,isFocus:T,...w,children:We("textarea",{id:C,name:e,className:h("polpo-textarea",s),style:{resize:i,...l},value:o,rows:n,...x,autoFocus:c,autoComplete:m,placeholder:u,disabled:d,readOnly:p})})},ba=({rules:e,...o})=>We(E,{Component:ht,defaultValue:"",inputProps:o,rules:e});ht.Controller=ba;import{useMemo as Ca}from"react";import{useState as Ta}from"react";import{cloneElement as va}from"react";import{Fragment as ya,jsx as bt,jsxs as xa}from"react/jsx-runtime";var pe=({position:e="top",children:o,content:t,offset:r=5,disabled:a=!1})=>{let{containerRef:n,openModal:i,closeModal:s,isOpen:l}=uo();return M("mouseenter",()=>i(),n),M("mouseleave",()=>s(),n),a?o:xa(ya,{children:[va(o,{ref:n}),bt(U,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:n,onClose:s,position:e,className:h("polpo-tooltip",e),closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:100,closeAnimationClassName:"close-animation",children:bt("span",{className:"tooltip-content",children:t})})]})};import{jsx as vt}from"react/jsx-runtime";var Ug=({children:e,value:o,position:t,offset:r,tooltipText:a,tooltipCopiedText:n,copiedTextTimeout:i=500})=>{let[s,l]=Ta(!1);return vt(pe,{content:s&&n?n:a,position:t,offset:r,children:vt("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(o),setTimeout(()=>l(!1),i)},children:e})})};import{jsx as $,jsxs as Tt}from"react/jsx-runtime";var yt={small:1,regular:1.2,large:1.4},xt={small:2,regular:2.5,large:3},Ct=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",label:u,leftLabel:m,rightLabel:f,width:b="regular",size:g="regular",dotHoverSize:y=1.3,padding:w=.25,leftIcon:C,rightIcon:x,internalLeftIcon:T,internalRightIcon:P,leftIconTooltip:S,rightIconTooltip:O,color:A})=>{let H=Ca(()=>crypto.randomUUID(),[]),{handlers:B}=I({onChange:W=>t(W.target.checked),onBlur:r,onFocus:a}),v=yt[g]??yt.regular,k=(xt[b]??xt.regular)*v,Y=Math.min(w,v);return Tt("section",{className:h("polpo-switch-container",n,A&&`color-${A}`),style:{...i,"--width":`${k}em`,"--dot-size":`${v}em`,"--dot-hover-size":`${v*Math.min(Math.max(y,1),2)}em`,"--padding":`${Y}em`},children:[m?$(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:H,children:m}):null,C!==void 0&&$(pe,{content:S,disabled:!S,offset:10,children:$(C,{size:`${v*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!o)})}),Tt("section",{className:h("polpo-switch",o&&"is-checked",!c&&l&&"is-readonly"),children:[T!==void 0&&$("span",{className:"switch-internal-left-icon",children:$(T,{size:`${v*.7}em`})}),P!==void 0&&$("span",{className:"switch-internal-right-icon",children:$(P,{size:`${v*.7}em`})}),$("span",{className:"polpo-switch-dot"}),$("input",{id:H,type:"checkbox",name:e,className:`polpo-switch-checkbox ${n}`,style:i,checked:o,autoFocus:s,autoComplete:d,placeholder:p,disabled:c||l,...B})]}),x!==void 0&&$(pe,{content:O,disabled:!O,offset:10,children:$(x,{size:`${v*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!o)})}),u||f?$(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:H,children:u||f}):null]})},wa=({rules:e,...o})=>$(E,{Component:Ct,defaultValue:!1,inputProps:o,rules:e});Ct.Controller=wa;import{jsx as Ra}from"react/jsx-runtime";var kh=({alt:e="",loading:o="eager",...t})=>Ra("img",{loading:o,alt:e,...t,width:"100%"});import{useMemo as Mt,useState as Oa}from"react";import{useMemo as Pa}from"react";import{MdArrowDownward as ka,MdArrowUpward as Sa}from"react-icons/md";import{jsx as re,jsxs as wt}from"react/jsx-runtime";var Rt=({header:e,sortBy:o,icon:t,width:r,field:a,toggleSortField:n,sortField:i,orderField:s,hidden:l})=>{let c=o!==void 0?o:a,p=c?()=>n(c):void 0,d=Pa(()=>c?re("span",{className:"sort-icon",children:!!i&&i===c&&(s==="asc"?re(Sa,{}):re(ka,{}))}):null,[c,i,s]);return l?null:wt("th",{style:{width:r},className:h(c&&"sort-on-click"),onClick:p,children:[wt(ce,{flow:"column",gap:"0.5em",jc:"space-between",ai:"center",children:[t?re(t,{}):null,re(R,{variant:"label",noPadding:!0,children:e}),d]}),re(oe,{color:"var(--color-primary-700)"})]})};import{jsx as Xe}from"react/jsx-runtime";var Ea=(e,{field:o,render:t,Component:r},a)=>{if(o&&e[o])return Xe(R,{noPadding:!0,nowrap:!0,children:e[o]});if(t)return t(e,a);if(r)return Xe(r,{data:e,rowKey:a})},Pt=(e,o,t)=>o.map((r,a)=>r.hidden?null:Xe("td",{children:Ea(e,r,t)},a)),kt=(e,o,t)=>o?e.toSorted((r,a)=>{let n=r[o],i=a[o];return["number","boolean","string"].includes(typeof n)&&["number","boolean","string"].includes(typeof i)?n===i?0:t==="asc"?n>i?1:-1:n>i?-1:1:0}):e;import{useCallback as Ma,useState as Ia}from"react";var St=()=>{let[[e,o],t]=Ia([null,null]),r=Ma(a=>{t(([n,i])=>a!==n?[a,"asc"]:i==="asc"?[a,"desc"]:[null,null])},[]);return{sortBy:e,order:o,toggleSortField:r}};import{jsx as La}from"react/jsx-runtime";var Et=({data:e,columns:o,isSelected:t=!1,selectable:r=!1,rowKey:a})=>La("tr",{className:h(r&&t&&"row-selected"),children:Pt(e,o,a)});import{jsx as q,jsxs as Na}from"react/jsx-runtime";var nb=({columns:e,data:o,width:t,selectable:r=!1,rowId:a,className:n="",tableClassName:i=""})=>{let[s,l]=Oa({}),{sortBy:c,order:p,toggleSortField:d}=St(),u=Mt(()=>{let f=[...e];return r&&(f=[{header:`${Object.values(s).length}`,render:(b,g)=>q(te,{name:`selected-${g}`,value:`${g}`in s,setValue:y=>{l(w=>{let C={...w};return y?C[`${g}`]=b:delete C[`${g}`],C})}})},...f]),f},[e,r,s]),m=Mt(()=>kt(o,c,p),[o,c,p]);return q("section",{className:h("polpo-smart-table-container",n),children:Na("table",{className:h("polpo-smart-table",i,t==="content"&&"layout-fixed",t==="scroll"&&"layout-scrollable"),children:[q("thead",{children:q("tr",{children:u.map((f,b)=>q(Rt,{toggleSortField:d,sortField:c,orderField:p,...f},b))})}),q("tbody",{children:m.map(f=>q(Et,{rowKey:f[a],data:f,columns:u,isSelected:`${f[a]}`in s,selectable:r},f[a]))})]})})};import{createContext as Fa,useContext as At,useEffect as Ha,useState as za}from"react";import{useEffect as Aa,useRef as It,useState as Lt}from"react";import{jsx as Ot,jsxs as Da}from"react/jsx-runtime";var Qe={top:0,left:0,width:0,height:0};var Nt=({tabs:e=[],variant:o="solid",radius:t="full",direction:r="horizontal",color:a,children:n,openTab:i,size:s="medium",className:l="",style:c={}})=>{let p=It(null),d=It(null),[u,m]=Lt(!1),[f,b]=Lt(Qe);return Aa(()=>{let g=d.current?.getBoundingClientRect()??Qe,y=p.current?.getBoundingClientRect()??Qe,w=g.width,C=o==="line"?2:g.height,x=g.left-y.left,T=o==="line"?g.top+g.height-y.top:g.top-y.top;b({left:x,top:T,width:w,height:C}),u||setTimeout(()=>{m(!0)},100)},[u,o,i]),Da("section",{className:h("polpo-tab-list",o&&`variant-${o}`,s&&`size-${s}`,t&&`radius-${t}`,a&&`color-${a}`,r==="vertical"&&"vertical-direction",l),ref:p,style:c,children:[!!o&&Ot("span",{className:h("polpo-tabs-selector",u&&"active"),style:f}),e.map(({id:g,label:y})=>Ot(de.Tab,{id:g,ref:g===i?d:void 0,children:y},g)),n]})};import{jsx as Ke}from"react/jsx-runtime";var Ze=Fa(null),Dt=e=>{let o=At(Ze);if(!o)throw new Error("You cant use this component out off an Tabs component");let{openTab:t,changeOpenTab:r}=o;return[t===e,()=>r(e)]},$a=()=>{let e=At(Ze);if(!e)throw new Error("You cant use this component out off an Tabs component");return e},de=({children:e,defaultOpenTab:o,onChange:t})=>{let[r,a]=za(o);return Ha(()=>{t&&t(r)},[r,t]),Ke(Ze.Provider,{value:{openTab:r,changeOpenTab:n=>a(n)},children:e})},Ba=({id:e,children:o,className:t="",style:r={},onClick:a,ref:n})=>{let[i,s]=Dt(e),l=c=>{s(),a&&a(c)};return Ke("span",{className:h("polpo-tab",t,i&&"is-open"),style:r,onClick:l,ref:n,children:o})},Ga=({id:e,children:o})=>{let[t]=Dt(e);return t?o:null},Ua=({children:e,...o})=>{let{openTab:t}=$a();return Ke(Nt,{...o,openTab:t,children:e})};de.Tab=Ba;de.TabPanel=Ga;de.TabList=Ua;export{Ci as Accordion,sp as AccordionItem,se as ActionModal,lu as AsideModal,$o as Backdrop,bp as Badge,Ar as BadgeRounded,So as Button,te as Checkbox,Ug as ClickToCopy,yu as ConfirmationModal,Zp as Cursor,Ao as DatePicker,F as Field,Oo as FieldOrientation,Lo as FieldVariant,Di as FlipCard,Lc as HoverCard,kh as Image,at as InfinityScroll,Do as Input,Xo as InputColor,Ko as InputFile,ot as InputNumber,Ho as InputPassword,ge as Line,jt as LineOrientation,Wt as LineStyle,_ as Menu,U as Modal,ln as ModalBackdrop,zo as Portal,rt as Radio,oe as Ripple,J as Select,ao as SlideCard,gt as Slider,nb as SmartTable,Ct as Switch,de as Tabs,ht as Textarea,pe as Tooltip,R as Typography,no as useAccordionItem};
|
|
2
|
+
var go=(p=>(p.DEFAULT="default",p.PRIMARY="primary",p.SECONDARY="secondary",p.TERTIARY="tertiary",p.ACCENT="accent",p.HIGHLIGHT="highlight",p.ACTIVE="active",p.WARNING="warning",p.ALERT="alert",p.INFO="info",p))(go||{}),no=(r=>(r.SMALL="small",r.REGULAR="regular",r.LARGE="large",r))(no||{}),te=(a=>(a.SOLID="solid",a.FLAT="flat",a.OUTLINED="outlined",a.TEXT="text",a))(te||{}),re=(n=>(n.NONE="none",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n.FULL="full",n))(re||{});import{createContext as Kt,useCallback as Jt,useContext as qt,useMemo as or,useState as er}from"react";import{clsx as Yt}from"clsx";import{twMerge as _t}from"tailwind-merge";var g=(...o)=>_t(Yt(o));var oo=(o,e=2)=>{if(o===0)return"0 Bytes";let t=1e3,r=e<0?0:e,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(o)/Math.log(t));return parseFloat((o/Math.pow(t,n)).toFixed(r))+" "+a[n]};var ne=({c:o,m:e,offset:t,position:r})=>{let a=o.y+o.h+t,n=o.x-(e.w-o.w)*(50/100);switch(r){case"top":case"top center":a=o.y-e.h-t,n=o.x-(e.w-o.w)/2;break;case"top left":a=o.y-e.h-t,n=o.x-e.w+o.w;break;case"top right":a=o.y-e.h-t,n=o.x;break;case"bottom":case"bottom center":a=o.y+o.h+t,n=o.x-(e.w-o.w)/2;break;case"bottom left":a=o.y+o.h+t,n=o.x-e.w+o.w;break;case"bottom right":a=o.y+o.h+t,n=o.x;break;case"left":case"left center":a=o.y-(e.h-o.h)/2,n=o.x-e.w-t;break;case"left top":a=o.y-e.h+o.h,n=o.x-e.w-t;break;case"left bottom":a=o.y,n=o.x-e.w-t;break;case"right":case"right center":a=o.y-(e.h-o.h)/2,n=o.x+o.w+t;break;case"right top":a=o.y-e.h+o.h,n=o.x+o.w+t;break;case"right bottom":a=o.y,n=o.x+o.w+t;break}return{left:Math.round(n),top:Math.round(a)}},jt=({top:o,left:e},t,r,a)=>{let n=t.split(" "),i=[],s=e+a.w+r-window.innerWidth,l=o+a.h+r-window.innerHeight;for(let c of n)c==="top"&&o<r?i.push("bottom"):c==="left"&&e<r?i.push("right"):c==="bottom"&&l>0?i.push("top"):c==="right"&&s>0?i.push("left"):i.push(c);return i.join(" ")},Wt=({top:o,left:e},t,r)=>{let a=e+t.w+r-window.innerWidth,n=o+t.h+r-window.innerHeight;return e=a>0?e-a:e,o=n>0?o-n:o,e=e<r?r:e,o=o<r?r:o,{top:o,left:e}},ae=({c:o,m:e,offset:t,windowOffset:r,position:a})=>{let n={c:o,m:e,offset:t,position:a},i=ne(n),s=jt(i,a,r,e);s!==a&&(i=ne({...n,position:s}));let l=Wt(i,e,r);return{left:`${l.left}px`,top:`${l.top}px`}};var ie=({position:o,windowOffset:e})=>{switch(o){case"center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case"top":case"top center":return{top:`${e}px`,left:"50%",transform:"translateX(-50%)"};case"top left":case"left top":return{top:`${e}px`,left:`${e}px`};case"top right":case"right top":return{top:`${e}px`,right:`${e}px`};case"bottom":case"bottom center":return{bottom:`${e}px`,left:"50%",transform:"translateX(-50%)"};case"left bottom":case"bottom left":return{bottom:`${e}px`,left:`${e}px`};case"right bottom":case"bottom right":return{bottom:`${e}px`,right:`${e}px`};case"left":case"left center":return{top:"50%",left:`${e}px`,transform:"translateY(-50%)"};case"right":case"right center":return{top:"50%",right:`${e}px`,transform:"translateY(-50%)"}}return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"}};import{jsx as Zt}from"react/jsx-runtime";var Xt=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(Xt||{}),Qt=(r=>(r.SOLID="solid",r.DOTTED="dotted",r.DASHED="dashed",r))(Qt||{}),vo=({orientation:o="horizontal",className:e="",style:t={},color:r="currentColor",size:a=1,lineStyle:n="solid",dashedSize:i=1,spacing:s=1})=>Zt("span",{className:g("polpo-custom-line",o,e,n),style:{...t,"--color":r,"--size":`${a}px`,"--spacing":`${s}px`,"--dashSize":`${i}px`}});import{jsx as Io}from"react/jsx-runtime";var se=Kt(null),le=o=>{let e=qt(se);if(!e)throw new Error("You cant use this component out off an Accordion component");let{toggleItem:t,openedItems:r}=e,a=()=>t(o);return[r.includes(o),a]},ki=({children:o,className:e="",noSeparators:t,multiple:r,style:a={},defaultOpened:n=[]})=>{let[i,s]=er(()=>(Array.isArray(n)?n:[n]).reduce((p,d)=>typeof d=="string"?{...p,[d]:!0}:p,{})),l=Jt(p=>{s(d=>({...r?d:{},[p]:!d[p]}))},[r]),c=or(()=>Object.keys(i).filter(p=>i[p]),[i]);return Io(se.Provider,{value:{toggleItem:l,openedItems:c},children:Io("section",{className:g("polpo-accordion",e),style:a,children:(Array.isArray(o)?o:[o]).flatMap((p,d)=>d===0?p:[t?null:Io(vo,{orientation:"horizontal"},`${d}.5`),p])})})};import{useMemo as Ar}from"react";import{FaCaretLeft as Dr}from"react-icons/fa";import{jsx as tr}from"react/jsx-runtime";var ce=({children:o,isOpen:e,className:t="",style:r={}})=>tr("section",{className:t,style:{overflow:"hidden",height:e?"auto":0,transition:"height 300ms ease",interpolateSize:"allow-keywords",...r},children:o});import{useMemo as pe}from"react";import{jsx as Lo,jsxs as rr}from"react/jsx-runtime";var zi=({cardZIndex:o="auto",flipDirection:e="vertical",flipSpeed:t=500,isFlipped:r=!1,children:a})=>{let n=l=>{if(a.length!==2)throw new Error("Component FlipCard requires 2 children");return a[l]},i=pe(()=>`rotate${e==="horizontal"?"Y":"X"}(${r?180:0}deg)`,[e,r]),s=pe(()=>`rotate${e==="horizontal"?"Y":"X"}(${r?0:-180}deg)`,[e,r]);return Lo("section",{className:g("polpo-flip-card",r&&"is-flipped"),style:{"--cardZIndex":o,"--flipSpeed":`${t}ms`,"--frontRotate":i,"--backRotate":s},children:rr("section",{className:"polpo-flipper",children:[Lo("section",{className:"front",children:n(0)}),Lo("section",{className:"back",children:n(1)})]})})};import{useCallback as ke,useRef as Pe}from"react";import{useCallback as Ki,useMemo as Ji,useReducer as qi}from"react";import{useCallback as _i,useLayoutEffect as ji,useRef as Wi}from"react";import{useMemo as nr}from"react";var G=o=>nr(()=>Object.entries(o).reduce((e,[t,r])=>r?[...e,t]:e,[]).join(" "),[o]);import{useEffect as ar,useLayoutEffect as ir,useRef as sr}from"react";function M(o,e,t,r){let a=sr(e);ar(()=>{a.current=e},[e]),ir(()=>{let n=t?.current??window;if(!(n&&n.addEventListener))return;let i=s=>a.current(s);return n.addEventListener(o,i,r),()=>{n.removeEventListener(o,i,r)}},[o,t,r])}var lr=(o,e)=>o.current&&!o.current.contains(e),de=(o,e)=>{M("keydown",t=>{t.key==="Escape"&&e()}),M("mousedown",t=>{let r=t.target;if(!r?.isConnected)return;(Array.isArray(o)?o:[o]).every(n=>lr(n,r))&&e()})};import{useState as ps}from"react";import{useState as us,useCallback as fs}from"react";import{useEffect as cr,useState as pr}from"react";var Oo=(o,e=500)=>{let[t,r]=pr(o);return cr(()=>{let a=setTimeout(()=>r(o),e);return()=>{clearTimeout(a)}},[o,e]),t};import{useState as ys}from"react";import{useState as Ps}from"react";import{useEffect as dr}from"react";var Q=(o,e)=>{dr(()=>{let t=Array.isArray(o)?o:[o],r=new ResizeObserver(e);return t.forEach(a=>a.current&&r.observe(a.current)),()=>{r.disconnect()}},[o,e])};import{useEffect as mr,useState as ur}from"react";var me=o=>{let e=document.getElementById(o);return e===null&&(e=document.createElement("div"),e.setAttribute("id",o),document.body.appendChild(e)),e},ue=o=>{let[e,t]=ur(()=>me(o));return mr(()=>{let r=document.getElementById(o);if(e===null||r===null){let a=me(o);t(a)}return()=>{e&&e.parentNode&&process.env.NODE_ENV==="production"&&document.body.removeChild(e)}},[e,o]),e};import{useEffect as Os,useState as Ns}from"react";import{useEffect as Hs,useRef as zs,useState as $s}from"react";import{useCallback as Us,useRef as Vs,useState as Ys}from"react";import{useRef as hr,useState as gr}from"react";import{useEffect as fr}from"react";var fe=(o,e,t={})=>{fr(()=>{let r=Array.isArray(o)?o:[o],a=new IntersectionObserver(e,t);return r.forEach(n=>n.current&&a.observe(n.current)),()=>{a.disconnect()}},[e,t,o])};var he=(o={})=>{let[e,t]=gr(!1),r=hr(null);return fe(r,([a])=>{t(a.isIntersecting)},o),{ref:r,inView:e}};import{useCallback as No,useState as br}from"react";var I=({onBlur:o,onFocus:e,onChange:t}={})=>{let[r,a]=br(!1),n=No(l=>{a(!0),e&&e(l)},[e]),i=No(l=>{a(!1),o&&o(l)},[o]),s=No(l=>{t&&t(l)},[t]);return{isFocus:r,handlers:{onFocus:n,onBlur:i,onChange:s}}};import{useEffect as vr,useState as yr}from"react";var yo=o=>{let[e,t]=yr(!1);return vr(()=>{let r=window.matchMedia(o);r.matches!==e&&t(r.matches);let a=()=>{t(r.matches)};return r.addEventListener("change",a),()=>{r.removeEventListener("change",a)}},[e,o]),e};import{useRef as xr,useState as Tr}from"react";var ge=()=>{let o=xr(null),[e,t]=Tr(!1);return{containerRef:o,isOpen:e,openModal:()=>{t(!0)},closeModal:()=>{t(!1)}}};import{useCallback as be,useLayoutEffect as Cr,useRef as wr}from"react";var ve=o=>({x:o.x,y:o.y,w:o.width,h:o.height,top:o.top,left:o.left}),ye=({offset:o=0,windowOffset:e=0,position:t="bottom",modalRef:r,containerRef:a,isOpen:n})=>{let i=wr(null),s=be((c,p)=>{let d=c.current?.getClientRects()[0],f=p.current?.getClientRects()[0];if(!d)return;let m=f?ae({c:ve(f),m:ve(d),offset:o,windowOffset:e,position:t}):ie({position:t,windowOffset:e});Object.keys(m).forEach(u=>{c.current?.style.setProperty(u,m[u])})},[t,e,o]),l=be(()=>{n&&s(r,a??i)},[s,n,a,r]);Cr(l,[l]),Q(a??i,l),Q(r,l),M("resize",l),M("scroll",l,r)};import Rr,{useCallback as xe,useEffect as kr,useLayoutEffect as Pr,useMemo as Sr}from"react";var Te=({transitionDuration:o=0,isOpen:e})=>{let[t,r]=Rr.useState("CLOSED"),a=Sr(()=>t!=="CLOSED",[t]);kr(()=>{document.documentElement.style.overflow=a?"hidden":"auto"},[a]);let n=xe(()=>{["OPENING","OPEN"].includes(t)&&(o>0?(r("CLOSING"),setTimeout(()=>{r("CLOSED")},o)):r("CLOSED"))},[t,o]),i=xe(()=>{["CLOSING","CLOSED"].includes(t)&&(o>0?(r("OPENING"),setTimeout(()=>{r("OPEN")},o)):r("OPEN"))},[t,o]);return Pr(()=>{t==="CLOSED"&&e?i():t==="OPEN"&&!e&&n()},[e,i,n,t]),{isVisible:a,modalState:t}};import{useRef as Er,useState as Mr}from"react";var Ce=(o,e)=>{let{left:t,top:r}=o,a=t+window.scrollX,n=r+window.scrollY,i=e.pageX-a,s=e.pageY-n;return{x:e.pageX,y:e.pageY,elementX:i,elementY:s,elementPositionX:a,elementPositionY:n}},we=o=>{let e=Er(null),[t,r]=Mr({x:null,y:null,elementX:null,elementY:null,elementPositionX:null,elementPositionY:null});return M("mousemove",n=>{let{clientX:i,clientY:s}=n;if(r(l=>({...l,x:i,y:s})),o?.current instanceof Element){let l=Ce(o.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}else if(e.current instanceof Element){let l=Ce(e.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}}),{...t,ref:e}};import{useState as xl}from"react";import{useEffect as Rl,useRef as kl}from"react";import{useEffect as El,useRef as Ml,useState as Il}from"react";import{useEffect as Dl,useState as Fl}from"react";import{useCallback as $l,useState as Bl}from"react";import{useCallback as Ir,useState as Lr}from"react";var Re=(o,e=0)=>{let[t,r]=Lr(e),a=Ir(n=>{r(n!==void 0?n:i=>(i+1)%o.length)},[o.length]);return[o[t],a]};import{useEffect as _l,useState as jl}from"react";import{jsx as Se}from"react/jsx-runtime";var Ac=({children:o,threshold:e=5,translationZ:t=25,width:r="fit-content",className:a=""})=>{let n=Pe(null),i=Pe(null),s=ke(c=>{let p=n.current,d=i.current;if(!p||!d)return;let{clientX:f,clientY:m,currentTarget:u}=c,{clientWidth:b,clientHeight:v}=u,{top:h,left:w}=p.getBoundingClientRect(),C=(f-w)/b,x=(m-h)/v,T=C*2-1,S=((x*2-1)*e).toFixed(2),O=(T*e).toFixed(2);d.style.transform=`perspective(${b}px) rotateX(${-S}deg) rotateY(${O}deg)`,p.style.transform=`perspective(${b}px) translateZ(${t}px)`},[e,t]),l=ke(c=>{let p=n.current,d=i.current;!p||!d||(d.style.transform=`perspective(${c.currentTarget.clientWidth}px) rotateX(0) rotateY(0)`,p.style.transform=`perspective(${c.currentTarget.clientWidth}px) translateZ(0)`)},[]);return M("mousemove",s,n),M("mouseleave",l,n),Se("span",{ref:n,style:{width:r},className:g("polpo-hover-card",a),children:Se("span",{className:"polpo-hover-card-layer",ref:i,children:o})})};import{createElement as Or,useMemo as Nr}from"react";var Ao={hero:"h1",header1:"h1",header2:"h2",header3:"h3",header4:"h4",body:"p",label:"span","label-form":"label",small:"small"},Ee={hero:"hero",header1:"header1",header2:"header2",header3:"header3",header4:"header4",body:"body",label:"label","label-form":"label",small:"small"};var R=({variant:o="body",nowrap:e=!1,className:t="",style:r={},children:a,as:n,weight:i,family:s="primary",noPadding:l=!1,align:c,color:p,htmlFor:d,recommendedWidth:f=!1,...m})=>{let u=Nr(()=>Ao[o]??Ao.body,[o]);return Or(n??u,{...m,className:g("polpo-typography",Ee[o],t,i,p,l&&"no-padding",s==="code"&&"code-family",f&&"recommended-width",typeof e=="number"&&"nowrap-max-lines",e===2&&"nowrap-max-lines-2",e===3&&"nowrap-max-lines-3",e===4&&"nowrap-max-lines-4",e===5&&"nowrap-max-lines-5",e&&"nowrap"),htmlFor:d,style:{textAlign:c,...r}},a)};import{jsx as io,jsxs as Do}from"react/jsx-runtime";var ao=(o,e)=>typeof o=="function"?o(e):o,pp=({title:o,subtitle:e,children:t,icon:r=Dr,startContent:a,content:n,endContent:i,classNames:s={},className:l="",style:c={}})=>{let p=Ar(()=>crypto.randomUUID(),[]),[d,f]=le(p),m=ao(o,d),u=ao(e,d),b=ao(a,d),v=ao(n,d)??Do("section",{className:g("polpo-accordion-header-content",s?.headerContent),children:[io(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:m}),io(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:u})]}),h=ao(i,d)??io(r,{className:g("polpo-accordion-toggle-icon",d&&"is-open",s?.toggleIcon)});return Do("section",{className:g("polpo-accordion-item",l),style:c,children:[Do("section",{className:g("polpo-accordion-header",a&&"has-start-content",d&&"is-open",s?.header),onClick:f,children:[b,v,h]}),io(ce,{isOpen:d,children:io("section",{className:g("polpo-accordion-body",s?.body),children:t})})]})};import{jsx as Hr}from"react/jsx-runtime";var Fr=(n=>(n.NONE="none",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n.FULL="full",n))(Fr||{}),xp=({children:o,rounded:e="medium",selected:t=!1,noWrap:r=!1,ref:a})=>Hr("span",{className:g("polpo-badge",e&&`rounded-${e}`,t&&"is-selected",r&&"no-wrap"),ref:a,children:o});import{useEffect as zr,useRef as $r}from"react";import{jsx as Br}from"react/jsx-runtime";var eo=({color:o,disabled:e,duration:t=1e3,timingFunction:r="ease-out",times:a=1,className:n="",style:i={},zIndex:s=1})=>{let l=$r(null);zr(()=>{if(!l.current?.parentElement)return;let p=getComputedStyle(l.current.parentElement).position;["absolute","fixed","sticky","relative"].includes(p)||(l.current.parentElement.style.position="relative")},[]);let c=p=>{let{clientX:d,clientY:f,currentTarget:m}=p,u=m.getBoundingClientRect(),b=(d-u.left)*100/u.width,v=(f-u.top)*100/u.height,h=document.createElement("span");h.classList.add("ripple-effect"),h.style.animationDuration=`${t}ms`,h.style.animationTimingFunction=r,h.style.left=`${b}%`,h.style.top=`${v}%`,o&&(h.style.background=o),m.appendChild(h),setTimeout(()=>{h.remove()},Math.max(t,500)*Math.max(a,1))};return e?null:Br("span",{ref:l,onMouseDown:c,className:g("polpo-ripple",n),style:{...i,zIndex:s}})};import{jsx as Gr,jsxs as Ur}from"react/jsx-runtime";var Me=({children:o,color:e="default",variant:t="solid",radius:r="medium",size:a="regular",noWrap:n=!1,forIcon:i=!1,isLoading:s=!1,fullWidth:l=!1,disabled:c=!1,className:p="",...d})=>Ur("button",{...d,disabled:c,className:g("polpo-button",e,t,l&&"full",r&&`radius-${r}`,a&&`size-${a}`,n&&"no-wrap",i&&"icon",p,s&&"is-loading"),children:[o,Gr(eo,{disabled:s||c})]});import{useEffect as Vr,useState as Yr}from"react";import{jsx as Ie,jsxs as _r}from"react/jsx-runtime";var Zp=()=>{let{x:o,y:e,elementX:t,elementY:r,ref:a}=we(),[n,i]=Yr(!1);if(M("mouseover",l=>{let c=getComputedStyle(l.target).cursor;i(c==="pointer")}),Vr(()=>("ontouchstart"in window||navigator.maxTouchPoints||(document.body.style.cursor="none"),()=>{document.body.style.cursor="auto"}),[]),o===null||e===null||"ontouchstart"in window||navigator.maxTouchPoints)return null;let s=`translate3d(${t}px, ${r}px, 0)`;return _r("section",{className:"polpo-cursor-overlay",ref:a,children:[Ie("span",{className:`polpo-cursor outer-circle ${n?"cursor-hover":""}`,style:{transform:s}}),Ie("span",{className:`polpo-cursor inner-circle ${n?"cursor-hover":""}`,style:{transform:s}})]})};import{useMemo as Xr}from"react";import{IoCheckmarkOutline as Qr}from"react-icons/io5";import{Controller as jr,useFormContext as Wr}from"react-hook-form";import{jsx as Le}from"react/jsx-runtime";var E=({Component:o,inputProps:e,defaultValue:t,rules:r})=>{let{control:a,setValue:n}=Wr(),{name:i,defaultValue:s}=e;return Le(jr,{name:i,control:a,rules:r,defaultValue:s??t,render:({field:{onBlur:l,value:c},fieldState:p})=>Le(o,{value:c,error:p.error?.message,invalid:p.invalid,isTouched:p.isTouched,isDirty:p.isDirty,setValue:d=>n(i,d),onBlur:l,...e})})};import{jsx as so,jsxs as Oe}from"react/jsx-runtime";var to=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",icon:d=Qr,label:f,color:m="primary",size:u="regular"})=>{let b=Xr(()=>crypto.randomUUID(),[]),{handlers:v}=I({onChange:C=>t(C.target.checked),onBlur:r,onFocus:a}),h=G({"checkbox-container":!0,[n]:!!n,[`color-${m}`]:!!m}),w=G({checkbox:!0,"is-checked":e,[`size-${u}`]:!!u});return Oe("section",{className:h,style:i,onClick:C=>C.stopPropagation(),children:[Oe("section",{className:w,children:[so("section",{className:"checkbox-fill",children:so(d,{size:"1.3em",className:"checkbox-icon"})}),so("input",{id:b,type:"checkbox",name:o,className:"checkbox-input",checked:e,autoFocus:s,autoComplete:p,disabled:c||l,...v})]}),f?so(R,{variant:"label-form",htmlFor:b,className:"checkbox-label",children:f}):null]})},Zr=({rules:o,...e})=>so(E,{Component:to,defaultValue:!1,inputProps:e,rules:o});to.Controller=Zr;import{useMemo as Jr}from"react";import{ImCross as Kr}from"react-icons/im";var Ne=(r=>(r.FULL_BORDER="full-border",r.CONTENT_BORDER="content-border",r.CONTENT_LINE="line",r))(Ne||{}),Ae=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(Ae||{});import{jsx as K,jsxs as Fo}from"react/jsx-runtime";var De=({icon:o,className:e,onClick:t})=>o?K(o,{className:e,onClick:t}):K("span",{}),F=({id:o,label:e,leftIcon:t,rightIcon:r,errorIcon:a=Kr,error:n,onClickLeftIcon:i,onClickRightIcon:s,fieldOrientation:l="vertical",children:c,isFocus:p=!1,variant:d,ref:f})=>{let m=G({"form-field":!0,focus:p,error:!!n,"variant-content-border":d==="content-border","variant-content-line":d==="line","variant-full-border":d==="full-border","variant-inline":l==="horizontal"}),u=b=>v=>{v.stopPropagation();let h=document.getElementById(o);h?.focus(),h?.click(),b&&b()};return Fo("section",{className:m,ref:f,children:[e?K(R,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:o,children:e}):null,Fo("section",{className:"field-content",children:[De({className:"field-left-icon",icon:t,onClick:u(i)}),K("section",{className:"field-children",children:c}),De({className:"field-right-icon",icon:r,onClick:u(s)})]}),!!n&&Fo("section",{className:"field-message",children:[a?K(a,{size:10}):K("span",{}),K(R,{noPadding:!0,variant:"small",children:n})]})]})};import{jsx as Ho}from"react/jsx-runtime";var Fe=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,type:n="date",className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:f="off",isDirty:m=!1,isTouched:u=!1,invalid:b=!1,error:v,...h})=>{let w=Jr(()=>crypto.randomUUID(),[]),{isFocus:C,handlers:x}=I({onBlur:r,onChange:T=>t(T.target.value),onFocus:a});return Ho(F,{id:w,error:v,isFocus:C,...h,children:Ho("input",{id:w,type:n,name:o,className:i,style:s,value:e,autoFocus:l,autoComplete:f,placeholder:d,disabled:p,readOnly:c,...x})})},qr=({rules:o,...e})=>Ho(E,{Component:Fe,defaultValue:"",inputProps:e,rules:o});Fe.Controller=qr;import{useMemo as on}from"react";import{jsx as zo}from"react/jsx-runtime";var He=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,pattern:n,type:i="text",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:f="",autoComplete:m="off",isDirty:u=!1,isTouched:b=!1,invalid:v=!1,error:h,min:w,max:C,...x})=>{let T=on(()=>crypto.randomUUID(),[]),{handlers:k,isFocus:S}=I({onChange:O=>t(O.target.value),onBlur:r,onFocus:a});return zo(F,{id:T,error:h,isFocus:S,...x,children:zo("input",{id:T,type:i,name:o,className:s,style:l,value:e,pattern:n,autoFocus:c,autoComplete:m,placeholder:f,disabled:d,readOnly:p,min:w,max:C,...k})})},en=({rules:o,...e})=>zo(E,{Component:He,defaultValue:"",inputProps:e,rules:o});He.Controller=en;import{useMemo as ze}from"react";import{FiEye as tn,FiEyeOff as rn}from"react-icons/fi";import{IoIosWarning as nn}from"react-icons/io";import{jsx as $o}from"react/jsx-runtime";var $e=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",isDirty:f=!1,isTouched:m=!1,invalid:u=!1,error:b,...v})=>{let h=ze(()=>crypto.randomUUID(),[]),[w,C]=Re(["password","text"]),{isFocus:x,handlers:T}=I({onBlur:r,onChange:S=>t(S.target.value),onFocus:a}),k=ze(()=>w==="password"?tn:w==="text"?rn:nn,[w]);return $o(F,{id:h,error:b,isFocus:x,...v,rightIcon:k,onClickRightIcon:()=>C(),children:$o("input",{id:h,type:w,name:o,className:n,style:i,value:e,autoFocus:s,autoComplete:d,placeholder:p,disabled:c,readOnly:l,...T})})},an=({rules:o,...e})=>$o(E,{Component:$e,defaultValue:"",inputProps:e,rules:o});$e.Controller=an;import In from"color";import{useCallback as Ln,useEffect as On,useMemo as Xe,useRef as Nn,useState as Qe}from"react";import{HexAlphaColorPicker as An,HexColorInput as Dn}from"react-colorful";import{FaEyeDropper as Fn}from"react-icons/fa6";import Hn from"use-eye-dropper";import{createContext as hn,useCallback as Ue,useContext as gn,useRef as bn,useState as Ve}from"react";import{ImCross as vn}from"react-icons/im";import{useMemo as mn,useRef as un}from"react";import{createPortal as sn}from"react-dom";var Be=({children:o,id:e})=>{let t=ue(e);return t===null?null:sn(o,t)};import{useMemo as cn}from"react";import{jsx as dn}from"react/jsx-runtime";var pn=(a=>(a.OPAQUE="opaque",a.TRANSPARENT="transparent",a.BLUR="blur",a.NONE="none",a))(pn||{}),Ge=({opacity:o=.6,backdrop:e="blur",zIndex:t,backdropOnClick:r,modalState:a})=>{let n=cn(()=>({opaque:{background:`hsl(from var(--color-background-paper) h s l / ${o*100}%)`},transparent:{background:"transparent"},blur:{background:`hsl(from var(--color-background-paper) h s l / ${o*100}%)`,backdropFilter:"blur(5px)"},none:{display:"none"}})[e]??{},[e,o]);return e==="none"?null:dn("section",{tabIndex:-1,onClick:r,className:g("polpo-modal-backdrop",a==="CLOSING"||a==="CLOSED"&&"backdrop-close"),style:{zIndex:t,...n}})};import{jsx as Bo,jsxs as fn}from"react/jsx-runtime";var U=({id:o,children:e,isOpen:t,onClose:r,className:a="",style:n={},rootStyle:i={},animation:s="fade-down",closeAnimationClassName:l="modal-close",modalRef:c,closeOnClickOutside:p=!0,transitionDuration:d=300,windowOffset:f=10,offset:m=20,position:u,containerRef:b,zIndex:v=1e3,...h})=>{let w=mn(()=>crypto.randomUUID(),[]),C=un(null),{modalState:x,isVisible:T}=Te({transitionDuration:d,isOpen:t});return ye({modalRef:c??C,containerRef:b,offset:m,windowOffset:f,position:u,isOpen:T}),de(c??C,()=>{t&&p&&r()}),T?fn(Be,{id:`modal-${o}-${w}`,children:[Bo(Ge,{...h,modalState:x,zIndex:v}),Bo("section",{className:"polpo-modal",ref:c??C,style:{maxWidth:`calc(100dvw - ${f*2}px)`,maxHeight:`calc(100dvh - ${f*2}px)`,...i,zIndex:+v+1},children:Bo("section",{style:{...n,animationDuration:`${d}ms`},className:g("polpo-modal-content",a,!!s&&s!=="none"&&`animation-${s}`,x==="CLOSING"||x==="CLOSED"&&l),children:e})})]}):null};import{jsx as V,jsxs as Tn}from"react/jsx-runtime";var Ye=hn(null),yn=()=>{let o=gn(Ye);if(!o)throw new Error("useActionModalContext must be used within a ActionModal");return o},lo=({children:o,isOpen:e,onClose:t,actionRequired:r,icon:a,noCloseButton:n,lineOnTop:i=!1,backCard:s=!1,noPadding:l=!1,className:c="",style:p={},...d})=>{let[f,m]=Ve(!1),u=bn(null),b=Ue(()=>{u.current?.classList.add("shake-animation"),setTimeout(()=>{u.current?.classList.remove("shake-animation")},500)},[]);return V(Ye.Provider,{value:{onClose:t,isActionInProgress:f,setIsActionInProgress:m},children:V(U,{className:"polpo-action-modal",id:"action-modal",animation:"bounce",opacity:.8,isOpen:e,onClose:t,...d,backdropOnClick:r?b:t,position:"center",children:V("section",{ref:u,className:"polpo-modal-content",children:Tn("section",{className:g("polpo-action-modal-content",s&&"back-card",i&&"line-on-top",l&&"no-padding"),children:[!n&&!r&&V("section",{className:"close-modal-button",onClick:()=>t(),children:V(vn,{})}),a?V(R,{variant:"header4",className:"action-modal-icon",children:V(a,{})}):null,V("section",{className:"polpo-action-modal-body",children:V("section",{className:`polpo-action-modal-content ${c}`,style:p,children:o})})]})})})})},xn=({onClick:o,children:e,isLoading:t,...r})=>{let{onClose:a,isActionInProgress:n,setIsActionInProgress:i}=yn(),[s,l]=Ve(!1),c=Ue(()=>{l(!0),i(!0);let p=o();p instanceof Promise?p.then(()=>{a(),l(!1),i(!1)}):(a(),l(!1),i(!1))},[o,a,i]);return!s&&n?null:V(Me,{...r,onClick:c,isLoading:t||s,children:e})};lo.ActionButton=xn;import{useMemo as Cn}from"react";import{ImCross as wn}from"react-icons/im";import{jsx as Go,jsxs as Rn}from"react/jsx-runtime";var lu=({children:o,isOpen:e,onClose:t,position:r="left",size:a,className:n="",...i})=>{let s=Cn(()=>({top:{height:a,width:"100%"},left:{height:"100%",width:a},right:{height:"100%",width:a},bottom:{height:a,width:"100%"}})[r],[r,a]);return Rn(U,{id:"aside",isOpen:e,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:g("polpo-aside-modal",n,r),rootStyle:s,backdropOnClick:t,position:r,...i,children:[Go("span",{className:"close-modal-button",onClick:t,children:Go(wn,{})}),Go("section",{className:"polpo-aside-modal-content",children:o})]})};import{jsx as co,jsxs as _e}from"react/jsx-runtime";var yu=({title:o,onAccept:e,onReject:t=()=>null,acceptText:r,rejectText:a,children:n,isLoading:i,...s})=>co(lo,{...s,backCard:!0,children:_e("section",{className:"polpo-confirmation-modal",children:[co(R,{variant:"header4",children:o}),co("section",{children:n}),_e("section",{className:"polpo-confirmation-modal-actions",children:[!i&&co(lo.ActionButton,{variant:"flat",onClick:t,children:a}),co(lo.ActionButton,{isLoading:i,onClick:e,children:r})]})]})});import{useCallback as kn,useMemo as Pn}from"react";import{Fragment as je,jsx as z,jsxs as xo}from"react/jsx-runtime";var _=({children:o,isOpen:e,onClose:t,id:r,menuContentRef:a,contentClassName:n="",contentStyle:i={},className:s="",...l})=>z(U,{className:g("polpo-menu-modal",s),...l,id:`menu-${r}`,isOpen:e,onClose:t,children:z("ul",{className:`polpo-menu-content ${n}`,role:"listbox",style:i,ref:a,children:o})}),Sn=({children:o,label:e="",asCheckbox:t,icon:r,id:a,disabled:n=!1,selected:i=!1,className:s="",style:l={},onClick:c=()=>null,...p})=>{let d=kn(m=>{m.stopPropagation(),n||c(!i)},[n,c,i]),f=Pn(()=>o||(t?z(to,{className:"menu-checkbox",disabled:n,value:i,setValue:m=>c(m),name:"option",style:{pointerEvents:"none"},size:"small",label:xo(je,{children:[r!==void 0&&z(r,{className:"option-icon"}),z(R,{variant:"label",children:e})]})}):xo(je,{children:[r!==void 0&&z(r,{className:"option-icon"}),typeof e=="string"?z(R,{variant:"label",children:e}):e]})),[t,o,n,r,e,c,i]);return xo("li",{...p,id:a,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":n,onClick:d,className:g("polpo-menu-option",n&&"is-disabled",i&&"is-selected",s),style:l,children:[z(eo,{zIndex:10}),f]})},En=()=>z("li",{children:z(vo,{className:"divider"})}),We=({children:o,className:e="",...t})=>z("li",{tabIndex:-1,className:"polpo-menu-label",children:z(R,{...t,variant:"small",className:`menu-group-label ${e}`,children:o})}),Mn=({children:o,label:e,className:t="",style:r={},contentClassName:a="",contentStyle:n={},...i})=>{let s=G({"polpo-menu-group":!0,[t]:!!t});return xo("li",{tabIndex:-1,...i,className:s,style:r,children:[e&&z(We,{children:e}),z("ul",{className:`polpo-menu-group-content ${a}`,role:"listbox",style:n,children:o})]})};_.Option=Sn;_.Divider=En;_.GroupLabel=We;_.Group=Mn;import{jsx as Z,jsxs as To}from"react/jsx-runtime";var Ze=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,showValueText:n=!1,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:f="off",isDirty:m=!1,isTouched:u=!1,invalid:b=!1,error:v,...h})=>{let{open:w,isSupported:C}=Hn(),[x,T]=Qe(e),k=Xe(()=>crypto.randomUUID(),[]),S=Nn(null),[O,A]=Qe(!1),{handlers:H,isFocus:B}=I({onChange:N=>T(N.target.value),onBlur:N=>{Y(),r&&r(N)},onFocus:N=>{Y(),a&&a(N)}}),y=Xe(()=>{let N=In(e===""?"#000000":e);return N.isLight()||N.alpha()<.5?"#000000":"#FFFFFF"},[e]),P=async()=>{let{sRGBHex:N}=await w();t(N)};On(()=>{T(e)},[e]);let Y=Ln(()=>{x.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(x):T(e)},[x,t,e]),W=G({"input-color-box":!0,[i]:!!i});return To(F,{id:k,error:v,isFocus:B,...h,children:[To("section",{className:"input-color",onClick:N=>{N.stopPropagation(),A(!0)},ref:S,children:[Z("section",{className:W,style:{borderColor:y,background:e,color:e,...s}}),n?Z("input",{id:k,name:o,value:x,placeholder:d,readOnly:c,autoFocus:l,disabled:p,autoComplete:f,className:"color-input",...H}):null]}),To(U,{id:"input-color",isOpen:O,onClose:()=>A(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:S,className:"input-color-selector",children:[Z(An,{id:k,color:e,onChange:t}),To("section",{className:"color-input-container",children:[C()?Z(Fn,{onClick:()=>{P()}}):Z("span",{}),Z(Dn,{className:"color-input",id:k,name:o,color:e,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),Z("span",{})]})]})]})},zn=({rules:o,...e})=>Z(E,{Component:Ze,defaultValue:"#147EFB",inputProps:e,rules:o});Ze.Controller=zn;import{useCallback as Bn,useEffect as Gn,useMemo as Ke,useState as Un}from"react";import{FaMagnifyingGlass as Vn,FaRegTrashCan as Je}from"react-icons/fa6";import{IoIosWarning as Yn}from"react-icons/io";import{PiFilePdfFill as _n,PiFilePngFill as jn}from"react-icons/pi";import{createElement as gf}from"react";import{createElement as $n}from"react";var po=({tag:o="section",children:e,className:t,style:r,flow:a,columnSize:n,rowSize:i,column:s,row:l,pc:c,pi:p,ps:d,jc:f,ji:m,js:u,ac:b,ai:v,as:h,gtc:w,gtr:C,gta:x,gt:T,gap:k,...S})=>$n(o,{className:t,...S,style:{...r,...a?{gridAutoFlow:a}:{},...n?{gridAutoColumns:n}:{},...i?{gridAutoRows:i}:{},...s?{gridColumn:s}:{},...l?{gridRow:l}:{},...c?{placeContent:c}:{},...p?{placeItems:p}:{},...d?{placeSelf:d}:{},...f?{justifyContent:f}:{},...m?{justifyItems:m}:{},...u?{justifySelf:u}:{},...b?{alignContent:b}:{},...v?{alignItems:v}:{},...h?{alignSelf:h}:{},...w?{gridTemplateColumns:w}:{},...C?{gridTemplateRows:C}:{},...x?{gridTemplateAreas:x}:{},...T?{gridTemplate:T}:{},...k?{gap:k}:{},display:"grid"}},e);import{Fragment as Xn,jsx as D,jsxs as j}from"react/jsx-runtime";var qe=({name:o,value:e={},setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="Click to upload or drag and drop",autoComplete:d="off",accept:f,multiple:m=!1,limitSize:u=5e6,errorTimeout:b=3e3,label:v})=>{let[h,w]=Un(null),C=Ke(()=>crypto.randomUUID(),[]),{handlers:x}=I({onBlur:r,onFocus:a,onChange:y=>{let{files:P}=y.target;P&&T(P)}});Gn(()=>{let y=null;return h!==null&&(y=setTimeout(()=>{w(null)},b)),()=>{y!==null&&clearTimeout(y)}},[h,b]);let T=y=>{let P=m?{...e}:{},Y=m?y.length:1;for(let W=0;W<Y;W++){let N=y.item(W);N&&(N.size<u?P[N.name]=N:w(`File '${N.name}' size is larger than ${oo(u)}`))}t(P)},k=y=>{y.preventDefault(),y.stopPropagation(),y.dataTransfer.files&&y.dataTransfer.files.length&&T(y.dataTransfer.files)},S=Bn(y=>({"image/png":jn,"application/pdf":_n})[y]??Yn,[]),O=y=>{let P={...e};delete P[y.name],t(P)},A=()=>{t({})},H=Ke(()=>Object.values(e).reduce((y,{size:P})=>y+P,0),[e]),B=(y,P)=>{let Y=S(y.type);return j("section",{className:"input-file-card",children:[D("section",{className:"file-card--image",children:D(Y,{})}),j(po,{children:[D(R,{variant:"label",noPadding:!0,nowrap:!0,children:y.name}),D(R,{noPadding:!0,variant:"small",children:oo(y.size)})]}),D("section",{className:"file-card--delete",onClick:()=>O(y),children:D(Je,{})})]},P)};return j("section",{className:"input-file-container",children:[!!v&&D(R,{variant:"label-form",htmlFor:C,noPadding:!0,children:v}),j("section",{className:"input-file--box",onDrop:k,children:[D("section",{className:"input-file--box--icon",children:D(Vn,{})}),j(po,{children:[D(R,{variant:"label-form",htmlFor:C,noPadding:!0,weight:"bold",children:p}),j(R,{variant:"small",noPadding:!0,children:["Max size (",oo(u),")"]})]}),D("input",{id:C,type:"file",name:o,value:"",placeholder:p,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:n,style:i,accept:f,multiple:m,title:"",...x})]}),h!==null&&D(R,{variant:"small",noPadding:!0,className:"error",children:h}),Object.keys(e).length>0&&j(Xn,{children:[m&&j("span",{className:"total-info",children:[j(R,{variant:"small",noPadding:!0,children:[Object.keys(e).length," files - ",oo(H)]}),D("span",{className:"total-info--delete",onClick:A,children:D(Je,{})})]}),D("section",{className:"input-file--files",children:D("section",{className:"input-file--files--content",children:Object.values(e).map(B)})})]})]})},Wn=({rules:o,...e})=>D(E,{Component:qe,defaultValue:{},inputProps:e,rules:o});qe.Controller=Wn;import{useEffect as Qn,useMemo as ot,useState as Zn}from"react";import{jsx as Uo}from"react/jsx-runtime";var et={comma:/(?!^-)[^0-9,]/g,dot:/(?!^-)[^0-9.]/g},tt=(o,e=".")=>{let t=e==="."?et.dot:et.comma,r=o.replace(t,"").replace(",",".");return r||""},Co=(o,e)=>!o||Number.isNaN(o)?e(0):e(o),rt=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,pattern:n,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:p=!1,placeholder:d="",autoComplete:f="off",isDirty:m=!1,isTouched:u=!1,invalid:b=!1,error:v,min:h,max:w,decimalSeparator:C,format:x={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...T})=>{let k=ot(()=>crypto.randomUUID(),[]),S=ot(()=>{if(typeof x=="function")return x;let{locales:y,...P}=x;return Intl.NumberFormat(y,P).format},[x]),[O,A]=Zn(Co(e,S)),{handlers:H,isFocus:B}=I({onChange:y=>{let P=tt(y.target.value,C);P.endsWith(".")?A(y.target.value):(A(Co(Number(P),S)),t(Number(P)))},onBlur:y=>{let P=tt(y.target.value,C);A(Co(Number(P),S)),t(Number(P)),r&&r(y)},onFocus:a});return Qn(()=>{let y=Co(e,S);O!==y&&A(y)},[S,O,e]),Uo(F,{id:k,error:v,isFocus:B,...T,children:Uo("input",{id:k,type:"text",name:o,className:i,style:s,value:O,pattern:n,autoFocus:l,autoComplete:f,placeholder:d,disabled:p,readOnly:c,min:h,max:w,...H})})},Kn=({rules:o,...e})=>Uo(E,{Component:rt,defaultValue:0,inputProps:e,rules:o});rt.Controller=Kn;import{useMemo as Jn}from"react";import{jsx as wo,jsxs as nt}from"react/jsx-runtime";var at=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:p="off",radioValue:d,label:f,color:m="primary",size:u="regular"})=>{let b=Jn(()=>crypto.randomUUID(),[]),{handlers:v}=I({onChange:h=>t(h.target.value),onBlur:r,onFocus:a});return nt("section",{className:g("polpo-radio-container",n,m&&[`color-${m}`]),style:i,children:[nt("section",{className:g("polpo-radio",d===e&&"is-checked",u&&[`size-${u}`]),children:[wo("section",{className:"polpo-radio-fill"}),wo("input",{id:b,type:"radio",name:o,className:`polpo-radio-input ${n}`,style:i,value:d,checked:d===e,autoFocus:s,autoComplete:p,disabled:c||l,...v})]}),f?wo(R,{variant:"label-form",htmlFor:b,className:"polpo-radio-label",children:f}):null]})},qn=({rules:o,...e})=>wo(E,{Component:at,defaultValue:"",inputProps:e,rules:o});at.Controller=qn;import{createContext as na,useCallback as ut,useContext as aa,useMemo as ko,useRef as ft,useState as ia}from"react";import{ImCross as sa}from"react-icons/im";import{PiCaretDown as la}from"react-icons/pi";import{useEffect as oa}from"react";import{Fragment as ea,jsx as Vo,jsxs as it}from"react/jsx-runtime";var st=({isLoading:o=!1,hasNextPage:e=!1,loadMore:t,customLoadMoreElement:r,emptyMessage:a,children:n})=>{let{ref:i,inView:s}=he(),l=Oo(o,100);oa(()=>{e&&s&&!l&&t()},[e,l,t,s]);let c=Array.isArray(n)?n.length>0:!!n;return it(ea,{children:[n,it("section",{className:"polpo-infinity-scroll",children:[!!a&&!c&&!l&&Vo("p",{className:"empty-message",children:a}),(e||l)&&(r?r(i):Vo("section",{ref:i,className:"loading",children:l&&Vo("span",{className:"loading--icon",children:":D"})}))]})]})};import{useCallback as Yo,useMemo as lt}from"react";import{jsx as ct}from"react/jsx-runtime";var pt=({children:o,value:e})=>{let{multiselect:t,isEqualComparator:r,maxOptions:a,selectedValue:n,setValue:i,setIsOpen:s}=dt(),l=Yo((m,u)=>["number","string"].includes(typeof m)?m===u:!!r&&r(m,u),[r]),c=Yo(m=>{if(m)if(t){if(a&&Array.isArray(n)&&n.length>=a)return;i([...n,e])}else i(e),s(!1);else t?i(n.filter(u=>!l(u,e))):(i(null),s(!1))},[t,a,n,i,e,s,l]),p=lt(()=>n===""||n===null?!1:Array.isArray(n)?["number","string"].includes(typeof e)?n.includes(e):n.some(m=>!!r&&r(e,m)):l(e,n),[l,r,n,e]),d=Yo(m=>{["Enter"," "].includes(m.key)&&(m.preventDefault(),c(!(p&&t)))},[c,p,t]),f=lt(()=>typeof o=="string"?ct(R,{"data-value":e,variant:"label",nowrap:!0,children:o}):o,[o,e]);return ct(_.Option,{label:f,onKeyDown:d,asCheckbox:t,selected:p,onClick:m=>c(t?m:!0)})};import{useCallback as jo,useEffect as Wo,useRef as _o,useState as Xo}from"react";import{jsx as Ro,jsxs as ra}from"react/jsx-runtime";var ta=({height:o,minHeight:e,containerRef:t,offset:r,windowOffset:a})=>{let[n,i]=Xo(void 0),s=jo(()=>{let l=t.current?.getBoundingClientRect().bottom??0,c=window.innerHeight-l-a-r-5,p=window.innerHeight-a*3,d=c<e?p:c,f=Math.min(d,o),m=Math.max(f,e);i(`${Math.round(m)}px`)},[t,a,r,e,o]);return Wo(()=>{s()},[s]),Q(t,s),M("resize",s),{h:n}},mt=({children:o,searchQueryValue:e,searchQueryPlaceholder:t="Search option",searchQueryClassName:r="",searchQueryStyle:a={},onSearchQuery:n,containerRef:i,height:s=300})=>{let l=_o(null),c=_o(null),[p,d]=Xo(""),f=_o(null),m=yo("(max-width: 480px)");M("keydown",x=>{if(["ArrowDown","ArrowUp"].includes(x.code)){x.preventDefault();let T=document.activeElement;if(T?.tagName==="LI")switch(x.code){case"ArrowDown":T?.nextSibling?.focus();break;case"ArrowUp":T?.previousElementSibling?.focus();break}}});let u=jo(x=>{let{value:T}=x.target;n&&n(T),d(T)},[n]);Wo(()=>{f.current&&f.current.focus()},[]);let{h:b}=ta({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[v,h]=Xo(!1),w=jo(()=>{let x=Math.round(l.current?.getBoundingClientRect().height??0)+2,T=Math.round(c.current?.scrollHeight??0);h(x>=T)},[]);Wo(w,[w]),Q(l,w),Q(c,w),M("resize",w);let C=G({"select-options-header":!0,[r]:!!r});return ra("section",{className:`select-options ${n?"with-search-query":""}`,style:m?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{height:v?"auto":b,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[n&&Ro("section",{className:C,style:a,children:Ro("input",{name:"query",className:"input-search",value:e??p,onChange:u,placeholder:t,onClick:x=>x.stopPropagation(),ref:f,autoFocus:!0})}),Ro("section",{className:"select-options-list-container",ref:l,children:Ro("ul",{className:"select-options-list",ref:c,children:o})})]})};import{jsx as L,jsxs as ht}from"react/jsx-runtime";var gt=na(null),dt=()=>{let o=aa(gt);if(!o)throw new Error("useSelectContext must be used within a Select component");return o},ca=({children:o})=>{let e=ko(()=>typeof o=="string"?L(R,{noPadding:!0,variant:"label",nowrap:!0,children:o}):o,[o]);return L(_.GroupLabel,{children:e})},pa=({value:o})=>L(R,{variant:"label",nowrap:!0,children:typeof o=="string"||typeof o=="number"?o:JSON.stringify(o)}),da=({value:o,multiselect:e})=>e?L(R,{noPadding:!0,nowrap:!0,variant:"label",children:`${o.length} item${o.length===1?"":"s"} selected`}):o===null?null:L(R,{noPadding:!0,variant:"label",nowrap:!0,children:typeof o=="string"||typeof o=="number"?o:JSON.stringify(o)}),J=({options:o,isEqualComparator:e,searchQueryValue:t,searchQueryPlaceholder:r,onSearchQuery:a,loadMore:n=()=>null,isLoading:i=!1,hasNextPage:s=!1,emptyMessage:l="No options to select",multiselect:c,optionComponent:p=pa,valueComponent:d=da,maxOptions:f,children:m,name:u,value:b,setValue:v,onBlur:h,onFocus:w,className:C="",style:x={},showClearOption:T=!1,height:k,searchQueryStyle:S,searchQueryClassName:O,autoFocus:A=!1,readOnly:H=!1,disabled:B=!1,placeholder:y="",autoComplete:P="off",isDirty:Y=!1,isTouched:W=!1,invalid:N=!1,error:zt,...$t})=>{let Bt=ft(null),fo=yo("(max-width: 480px)"),oe=ko(()=>crypto.randomUUID(),[]),So=ft(null),[ho,ee]=ia(!1),Eo=ut(X=>{ee(X&&!B)},[B]),Gt=ut(X=>{X.stopPropagation(),v(c?[]:null)},[c,v]),Mo=ko(()=>c?b.length>0:!!b,[c,b]),Ut=ko(()=>m||o.map((X,Vt)=>L(J.Option,{value:X,children:L(p,{value:X})},Vt)),[p,m,o]);return L(gt.Provider,{value:{selectedValue:b,setValue:v,multiselect:c??!1,isEqualComparator:e,maxOptions:f??null,setIsOpen:ee},children:L(F,{id:oe,error:zt,isFocus:ho,ref:So,...$t,children:ht("section",{id:u,style:x,onBlur:h,className:`select ${B?"disabled":""} ${C}`,children:[ht("section",{id:oe,className:`select-container ${Mo&&T?"three-columns":""}`,onClick:()=>Eo(!0),children:[L("button",{type:"button",className:`input-button ${(Array.isArray(b)?b.length>0:b)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":ho,onFocus:X=>{Eo(!0),w&&w(X)},children:Mo?L(d,{...c?{value:b,multiselect:c}:{value:b}}):L(R,{variant:"label",noPadding:!0,nowrap:!0,children:y})}),Mo&&T&&L("section",{className:"icon-close",onClick:Gt,children:L(sa,{})}),L(la,{className:`select-caret-icon ${ho&&"is-select-open"}`})]}),L(_,{id:"form-select",isOpen:ho,onClose:()=>Eo(!1),backdrop:fo?"blur":"transparent",opacity:fo?.8:.4,position:fo?"center":"bottom",offset:5,modalRef:Bt,windowOffset:10,transitionDuration:200,containerRef:fo?void 0:So,contentClassName:"select-menu-content",className:"select-options-menu",children:L(mt,{containerRef:So,onSearchQuery:a,searchQueryValue:t,searchQueryPlaceholder:r,searchQueryClassName:O,searchQueryStyle:S,height:k,children:L(st,{isLoading:i,hasNextPage:s,loadMore:n,emptyMessage:l,children:Ut})})})]})})})},ma=({rules:o,...e})=>L(E,{Component:J,defaultValue:[],inputProps:{...e,multiselect:!0},rules:o}),ua=({rules:o,...e})=>L(E,{Component:J,defaultValue:null,inputProps:{...e,multiselect:!1},rules:o}),fa=o=>{let{multiselect:e}=o;return e?L(ma,{...o,multiselect:!0}):L(ua,{...o,multiselect:!1})};J.Controller=fa;J.Option=pt;J.OptionLabel=ca;import{useMemo as ha}from"react";import{jsx as Po,jsxs as ba}from"react/jsx-runtime";var bt=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,min:n,max:i,step:s,onlySlider:l=!1,className:c="",style:p={},autoFocus:d=!1,readOnly:f=!1,disabled:m=!1,placeholder:u="",autoComplete:b="off",isDirty:v=!1,isTouched:h=!1,invalid:w=!1,error:C,...x})=>{let T=ha(()=>crypto.randomUUID(),[]),k=A=>{r&&r(A);let H=parseInt(`${e}`);n!==void 0&&H<n&&t(n),i!==void 0&&H>i&&t(i),t(H)},{isFocus:S,handlers:O}=I({onBlur:k,onChange:A=>t(+A.target.value),onFocus:a});return Po(F,{id:T,error:C,isFocus:S,...x,children:ba("section",{className:g("polpo-input-slider",S&&"is-focus"),children:[Po("input",{id:T,type:"range",name:o,className:`polpo-slider ${c}`,style:p,value:e,autoFocus:d,autoComplete:b,placeholder:u,disabled:m,readOnly:f,min:n,max:i,step:s,...O}),!l&&Po("input",{id:T,type:"number",name:o,className:`polpo-slider-number ${c}`,style:p,value:e,autoComplete:b,disabled:m,readOnly:f,min:n,max:i,step:s,...O})]})})},ga=({rules:o,...e})=>Po(E,{Component:bt,defaultValue:0,inputProps:e,rules:o});bt.Controller=ga;import{useMemo as va}from"react";import{jsx as Qo}from"react/jsx-runtime";var vt=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,rows:n=4,resize:i="vertical",className:s="",style:l={},autoFocus:c=!1,readOnly:p=!1,disabled:d=!1,placeholder:f="",autoComplete:m="off",isDirty:u=!1,isTouched:b=!1,invalid:v=!1,error:h,...w})=>{let C=va(()=>crypto.randomUUID(),[]),{handlers:x,isFocus:T}=I({onBlur:r,onChange:k=>t(k.target.value),onFocus:a});return Qo(F,{id:C,error:h,isFocus:T,...w,children:Qo("textarea",{id:C,name:o,className:g("polpo-textarea",s),style:{resize:i,...l},value:e,rows:n,...x,autoFocus:c,autoComplete:m,placeholder:f,disabled:d,readOnly:p})})},ya=({rules:o,...e})=>Qo(E,{Component:vt,defaultValue:"",inputProps:e,rules:o});vt.Controller=ya;import{useMemo as Ra}from"react";import{useState as wa}from"react";import{cloneElement as xa}from"react";import{Fragment as Ta,jsx as yt,jsxs as Ca}from"react/jsx-runtime";var mo=({position:o="top",children:e,content:t,offset:r=5,disabled:a=!1})=>{let{containerRef:n,openModal:i,closeModal:s,isOpen:l}=ge();return M("mouseenter",()=>i(),n),M("mouseleave",()=>s(),n),a?e:Ca(Ta,{children:[xa(e,{ref:n}),yt(U,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:n,onClose:s,position:o,className:g("polpo-tooltip",o),closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:100,closeAnimationClassName:"close-animation",children:yt("span",{className:"tooltip-content",children:t})})]})};import{jsx as xt}from"react/jsx-runtime";var Uh=({children:o,value:e,position:t,offset:r,tooltipText:a,tooltipCopiedText:n,copiedTextTimeout:i=500})=>{let[s,l]=wa(!1);return xt(mo,{content:s&&n?n:a,position:t,offset:r,children:xt("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(e),setTimeout(()=>l(!1),i)},children:o})})};import{jsx as $,jsxs as wt}from"react/jsx-runtime";var Tt={small:1,regular:1.2,large:1.4},Ct={small:2,regular:2.5,large:3},Rt=({name:o,value:e,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:p="",autoComplete:d="off",label:f,leftLabel:m,rightLabel:u,width:b="regular",size:v="regular",dotHoverSize:h=1.3,padding:w=.25,leftIcon:C,rightIcon:x,internalLeftIcon:T,internalRightIcon:k,leftIconTooltip:S,rightIconTooltip:O,color:A})=>{let H=Ra(()=>crypto.randomUUID(),[]),{handlers:B}=I({onChange:W=>t(W.target.checked),onBlur:r,onFocus:a}),y=Tt[v]??Tt.regular,P=(Ct[b]??Ct.regular)*y,Y=Math.min(w,y);return wt("section",{className:g("polpo-switch-container",n,A&&`color-${A}`),style:{...i,"--width":`${P}em`,"--dot-size":`${y}em`,"--dot-hover-size":`${y*Math.min(Math.max(h,1),2)}em`,"--padding":`${Y}em`},children:[m?$(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:H,children:m}):null,C!==void 0&&$(mo,{content:S,disabled:!S,offset:10,children:$(C,{size:`${y*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!e)})}),wt("section",{className:g("polpo-switch",e&&"is-checked",!c&&l&&"is-readonly"),children:[T!==void 0&&$("span",{className:"switch-internal-left-icon",children:$(T,{size:`${y*.7}em`})}),k!==void 0&&$("span",{className:"switch-internal-right-icon",children:$(k,{size:`${y*.7}em`})}),$("span",{className:"polpo-switch-dot"}),$("input",{id:H,type:"checkbox",name:o,className:`polpo-switch-checkbox ${n}`,style:i,checked:e,autoFocus:s,autoComplete:d,placeholder:p,disabled:c||l,...B})]}),x!==void 0&&$(mo,{content:O,disabled:!O,offset:10,children:$(x,{size:`${y*.7}em`,className:"polpo-switch-icon",onClick:()=>t(!e)})}),f||u?$(R,{variant:"label-form",className:"polpo-switch-label",htmlFor:H,children:f||u}):null]})},ka=({rules:o,...e})=>$(E,{Component:Rt,defaultValue:!1,inputProps:e,rules:o});Rt.Controller=ka;import{jsx as Pa}from"react/jsx-runtime";var Pg=({alt:o="",loading:e="eager",...t})=>Pa("img",{loading:e,alt:o,...t,width:"100%"});import{useMemo as Lt,useState as Aa}from"react";import{useMemo as Sa}from"react";import{MdArrowDownward as Ea,MdArrowUpward as Ma}from"react-icons/md";import{jsx as ro,jsxs as kt}from"react/jsx-runtime";var Pt=({header:o,sortBy:e,icon:t,width:r,field:a,toggleSortField:n,sortField:i,orderField:s,hidden:l})=>{let c=e!==void 0?e:a,p=c?()=>n(c):void 0,d=Sa(()=>c?ro("span",{className:"sort-icon",children:!!i&&i===c&&(s==="asc"?ro(Ma,{}):ro(Ea,{}))}):null,[c,i,s]);return l?null:kt("th",{style:{width:r},className:g(c&&"sort-on-click"),onClick:p,children:[kt(po,{flow:"column",gap:"0.5em",jc:"space-between",ai:"center",children:[t?ro(t,{}):null,ro(R,{variant:"label",noPadding:!0,children:o}),d]}),ro(eo,{color:"var(--color-primary-700)"})]})};import{jsx as Zo}from"react/jsx-runtime";var Ia=(o,{field:e,render:t,Component:r},a)=>{if(e&&o[e])return Zo(R,{noPadding:!0,nowrap:!0,children:o[e]});if(t)return t(o,a);if(r)return Zo(r,{data:o,rowKey:a})},St=(o,e,t)=>e.map((r,a)=>r.hidden?null:Zo("td",{children:Ia(o,r,t)},a)),Et=(o,e,t)=>e?o.toSorted((r,a)=>{let n=r[e],i=a[e];return["number","boolean","string"].includes(typeof n)&&["number","boolean","string"].includes(typeof i)?n===i?0:t==="asc"?n>i?1:-1:n>i?-1:1:0}):o;import{useCallback as La,useState as Oa}from"react";var Mt=()=>{let[[o,e],t]=Oa([null,null]),r=La(a=>{t(([n,i])=>a!==n?[a,"asc"]:i==="asc"?[a,"desc"]:[null,null])},[]);return{sortBy:o,order:e,toggleSortField:r}};import{jsx as Na}from"react/jsx-runtime";var It=({data:o,columns:e,isSelected:t=!1,selectable:r=!1,rowKey:a})=>Na("tr",{className:g(r&&t&&"row-selected"),children:St(o,e,a)});import{jsx as q,jsxs as Da}from"react/jsx-runtime";var nb=({columns:o,data:e,width:t,selectable:r=!1,rowId:a,className:n="",tableClassName:i=""})=>{let[s,l]=Aa({}),{sortBy:c,order:p,toggleSortField:d}=Mt(),f=Lt(()=>{let u=[...o];return r&&(u=[{header:`${Object.values(s).length}`,render:(b,v)=>q(to,{name:`selected-${v}`,value:`${v}`in s,setValue:h=>{l(w=>{let C={...w};return h?C[`${v}`]=b:delete C[`${v}`],C})}})},...u]),u},[o,r,s]),m=Lt(()=>Et(e,c,p),[e,c,p]);return q("section",{className:g("polpo-smart-table-container",n),children:Da("table",{className:g("polpo-smart-table",i,t==="content"&&"layout-fixed",t==="scroll"&&"layout-scrollable"),children:[q("thead",{children:q("tr",{children:f.map((u,b)=>q(Pt,{toggleSortField:d,sortField:c,orderField:p,...u},b))})}),q("tbody",{children:m.map(u=>q(It,{rowKey:u[a],data:u,columns:f,isSelected:`${u[a]}`in s,selectable:r},u[a]))})]})})};import{createContext as za,useContext as Ft,useEffect as $a,useState as Ba}from"react";import{useEffect as Fa,useRef as Ot,useState as Nt}from"react";import{jsx as At,jsxs as Ha}from"react/jsx-runtime";var Ko={top:0,left:0,width:0,height:0};var Dt=({tabs:o=[],variant:e="solid",radius:t="full",direction:r="horizontal",color:a,children:n,openTab:i,size:s="medium",className:l="",style:c={}})=>{let p=Ot(null),d=Ot(null),[f,m]=Nt(!1),[u,b]=Nt(Ko);return Fa(()=>{let v=d.current?.getBoundingClientRect()??Ko,h=p.current?.getBoundingClientRect()??Ko,w=v.width,C=e==="line"?2:v.height,x=v.left-h.left,T=e==="line"?v.top+v.height-h.top:v.top-h.top;b({left:x,top:T,width:w,height:C}),f||setTimeout(()=>{m(!0)},100)},[f,e,i]),Ha("section",{className:g("polpo-tab-list",e&&`variant-${e}`,s&&`size-${s}`,t&&`radius-${t}`,a&&`color-${a}`,r==="vertical"&&"vertical-direction",l),ref:p,style:c,children:[!!e&&At("span",{className:g("polpo-tabs-selector",f&&"active"),style:u}),o.map(({id:v,label:h})=>At(uo.Tab,{id:v,ref:v===i?d:void 0,children:h},v)),n]})};import{jsx as qo}from"react/jsx-runtime";var Jo=za(null),Ht=o=>{let e=Ft(Jo);if(!e)throw new Error("You cant use this component out off an Tabs component");let{openTab:t,changeOpenTab:r}=e;return[t===o,()=>r(o)]},Ga=()=>{let o=Ft(Jo);if(!o)throw new Error("You cant use this component out off an Tabs component");return o},uo=({children:o,defaultOpenTab:e,onChange:t})=>{let[r,a]=Ba(e);return $a(()=>{t&&t(r)},[r,t]),qo(Jo.Provider,{value:{openTab:r,changeOpenTab:n=>a(n)},children:o})},Ua=({id:o,children:e,className:t="",style:r={},onClick:a,ref:n})=>{let[i,s]=Ht(o),l=c=>{s(),a&&a(c)};return qo("span",{className:g("polpo-tab",t,i&&"is-open"),style:r,onClick:l,ref:n,children:e})},Va=({id:o,children:e})=>{let[t]=Ht(o);return t?e:null},Ya=({children:o,...e})=>{let{openTab:t}=Ga();return qo(Dt,{...e,openTab:t,children:o})};uo.Tab=Ua;uo.TabPanel=Va;uo.TabList=Ya;export{ki as Accordion,pp as AccordionItem,lo as ActionModal,lu as AsideModal,Ge as Backdrop,xp as Badge,Fr as BadgeRounded,Me as Button,to as Checkbox,Uh as ClickToCopy,go as ColorTypes,yu as ConfirmationModal,Zp as Cursor,Fe as DatePicker,F as Field,Ae as FieldOrientation,Ne as FieldVariant,zi as FlipCard,Ac as HoverCard,Pg as Image,st as InfinityScroll,He as Input,Ze as InputColor,qe as InputFile,rt as InputNumber,$e as InputPassword,vo as Line,Xt as LineOrientation,Qt as LineStyle,_ as Menu,U as Modal,pn as ModalBackdrop,Be as Portal,at as Radio,re as RadiusTypes,eo as Ripple,J as Select,no as SizeTypes,ce as SlideCard,bt as Slider,nb as SmartTable,Rt as Switch,uo as Tabs,vt as Textarea,mo as Tooltip,R as Typography,te as VariantTypes,le as useAccordionItem};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polpo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"react-hook-form": "7.75.0",
|
|
91
91
|
"react-icons": "*",
|
|
92
92
|
"use-eye-dropper": "^1.7.2",
|
|
93
|
-
"polpo-tailwind-config": "0.
|
|
93
|
+
"polpo-tailwind-config": "0.1.1"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|
|
96
96
|
"lint": "eslint src",
|