polpo 0.1.19 → 0.1.20
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 +18 -18
- package/dist/components.d.ts +18 -18
- package/dist/components.js +1 -1
- package/dist/layouts.cjs +1 -1
- package/dist/layouts.js +1 -1
- package/package.json +1 -2
- package/dist/layouts.css +0 -2
package/dist/components.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var Yr=Object.create;var Be=Object.defineProperty;var jr=Object.getOwnPropertyDescriptor;var _r=Object.getOwnPropertyNames;var Wr=Object.getPrototypeOf,Xr=Object.prototype.hasOwnProperty;var Qr=(e,o)=>{for(var t in o)Be(e,t,{get:o[t],enumerable:!0})},it=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of _r(o))!Xr.call(e,a)&&a!==t&&Be(e,a,{get:()=>o[a],enumerable:!(r=jr(o,a))||r.enumerable});return e};var To=(e,o,t)=>(t=e!=null?Yr(Wr(e)):{},it(o||!e||!e.__esModule?Be(t,"default",{value:e,enumerable:!0}):t,e)),Zr=e=>it(Be({},"__esModule",{value:!0}),e);var _n={};Qr(_n,{Accordion:()=>nn,AccordionItem:()=>ln,ActionModal:()=>Se,AsideModal:()=>bn,Backdrop:()=>jo,Button:()=>Fo,Checkbox:()=>ge,ClickToCopy:()=>Fn,ConfirmationModal:()=>vn,Cursor:()=>cn,DatePicker:()=>Bo,Field:()=>H,FieldOrientation:()=>$o,FieldVariant:()=>zo,FlipCard:()=>an,HoverCard:()=>sn,Image:()=>zn,InfinityScroll:()=>Zo,Input:()=>Go,InputColor:()=>_o,InputFile:()=>Wo,InputNumber:()=>Xo,InputPassword:()=>Vo,Line:()=>Ne,LineOrientation:()=>At,LineStyle:()=>Dt,Menu:()=>q,Modal:()=>Z,ModalBackdrop:()=>Jt,Portal:()=>Yo,Radio:()=>Qo,Ripple:()=>fe,Select:()=>pe,SlideCard:()=>Io,Slider:()=>Jo,SmartTable:()=>Bn,Switch:()=>ot,Tabs:()=>Ie,Tag:()=>jn,TagRounded:()=>Hr,Textarea:()=>qo,Tooltip:()=>Me,Typography:()=>R,useAccordionItem:()=>Mo});module.exports=Zr(_n);var K=require("react");var Ro=require("react");var wo=require("react");var st=require("react"),h=e=>(0,st.useMemo)(()=>Object.entries(e).reduce((o,[t,r])=>r?[...o,t]:o,[]).join(" "),[e]);var Ce=require("react");function N(e,o,t,r){let a=(0,Ce.useRef)(o);(0,Ce.useEffect)(()=>{a.current=o},[o]),(0,Ce.useLayoutEffect)(()=>{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 Kr=(e,o)=>e.current&&!e.current.contains(o),lt=(e,o)=>{N("keydown",t=>{t.key==="Escape"&&o()}),N("mousedown",t=>{let r=t.target;if(!r?.isConnected)return;(Array.isArray(e)?e:[e]).every(n=>Kr(n,r))&&o()})};var Jr=require("react");var ct=require("react");var Ge=require("react"),Po=(e,o=500)=>{let[t,r]=(0,Ge.useState)(e);return(0,Ge.useEffect)(()=>{let a=setTimeout(()=>r(e),o);return()=>{clearTimeout(a)}},[e,o]),t};var qr=require("react");var en=require("react");var dt=require("react"),ce=(e,o)=>{(0,dt.useEffect)(()=>{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])};var Ue=require("react"),pt=e=>{let o=document.getElementById(e);return o===null&&(o=document.createElement("div"),o.setAttribute("id",e),document.body.appendChild(o)),o},mt=e=>{let[o,t]=(0,Ue.useState)(()=>pt(e));return(0,Ue.useEffect)(()=>{let r=document.getElementById(e);if(o===null||r===null){let a=pt(e);t(a)}return()=>{o&&o.parentNode&&process.env.NODE_ENV==="production"&&document.body.removeChild(o)}},[o,e]),o};var yt=require("react");var ut=require("clsx"),ft=require("tailwind-merge"),gt=(...e)=>(0,ft.twMerge)((0,ut.clsx)(e));var Te=(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 ht=({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)}},on=({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(" ")},tn=({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}},bt=({c:e,m:o,offset:t,windowOffset:r,position:a})=>{let n={c:e,m:o,offset:t,position:a},i=ht(n),s=on(i,a,r,o);s!==a&&(i=ht({...n,position:s}));let l=tn(i,o,r);return{left:`${l.left}px`,top:`${l.top}px`}};var vt=({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 ko=require("react");var So=require("react");var Ye=require("react");var xt=require("react"),Ct=(e,o,t={})=>{(0,xt.useEffect)(()=>{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 Tt=(e={})=>{let[o,t]=(0,Ye.useState)(!1),r=(0,Ye.useRef)(null);return Ct(r,([a])=>{t(a.isIntersecting)},e),{ref:r,inView:o}};var we=require("react"),O=({onBlur:e,onFocus:o,onChange:t}={})=>{let[r,a]=(0,we.useState)(!1),n=(0,we.useCallback)(l=>{a(!0),o&&o(l)},[o]),i=(0,we.useCallback)(l=>{a(!1),e&&e(l)},[e]),s=(0,we.useCallback)(l=>{t&&t(l)},[t]);return{isFocus:r,handlers:{onFocus:n,onBlur:i,onChange:s}}};var je=require("react"),_e=e=>{let[o,t]=(0,je.useState)(!1);return(0,je.useEffect)(()=>{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};var We=require("react"),wt=()=>{let e=(0,We.useRef)(null),[o,t]=(0,We.useState)(!1);return{containerRef:e,isOpen:o,openModal:()=>{t(!0)},closeModal:()=>{t(!1)}}};var ue=require("react");var Rt=e=>({x:e.x,y:e.y,w:e.width,h:e.height,top:e.top,left:e.left}),Pt=({offset:e=0,windowOffset:o=0,position:t="bottom",modalRef:r,containerRef:a,isOpen:n})=>{let i=(0,ue.useRef)(null),s=(0,ue.useCallback)((c,m)=>{let d=c.current?.getClientRects()[0],p=m.current?.getClientRects()[0];if(!d)return;let u=p?bt({c:Rt(p),m:Rt(d),offset:e,windowOffset:o,position:t}):vt({position:t,windowOffset:o});Object.keys(u).forEach(g=>{c.current?.style.setProperty(g,u[g])})},[t,o,e]),l=(0,ue.useCallback)(()=>{n&&s(r,a??i)},[s,n,a,r]);(0,ue.useLayoutEffect)(l,[l]),ce(a??i,l),ce(r,l),N("resize",l),N("scroll",l,r)};var Q=To(require("react"),1);var kt=({transitionDuration:e=0,isOpen:o})=>{let[t,r]=Q.default.useState("CLOSED"),a=(0,Q.useMemo)(()=>t!=="CLOSED",[t]);(0,Q.useEffect)(()=>{document.documentElement.style.overflow=a?"hidden":"auto"},[a]);let n=(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&&n()},[o,i,n,t]),{isVisible:a,modalState:t}};var Xe=require("react");var St=(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}},Et=e=>{let o=(0,Xe.useRef)(null),[t,r]=(0,Xe.useState)({x:null,y:null,elementX:null,elementY:null,elementPositionX:null,elementPositionY:null});return N("mousemove",n=>{let{clientX:i,clientY:s}=n;if(r(l=>({...l,x:i,y:s})),e?.current instanceof Element){let l=St(e.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}else if(o.current instanceof Element){let l=St(o.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}}),{...t,ref:o}};var rn=require("react");var Mt=require("react");var Eo=require("react");var It=require("react");var Nt=require("react");var Qe=require("react"),Lt=(e,o=0)=>{let[t,r]=(0,Qe.useState)(o),a=(0,Qe.useCallback)(n=>{r(n!==void 0?n:i=>(i+1)%e.length)},[e.length]);return[e[t],a]};var Ot=require("react");var Ft=require("react/jsx-runtime"),At=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(At||{}),Dt=(r=>(r.SOLID="solid",r.DOTTED="dotted",r.DASHED="dashed",r))(Dt||{}),Ne=({orientation:e="horizontal",className:o="",style:t={},color:r="currentColor",size:a=1,lineStyle:n="solid",dashedSize:i=1,spacing:s=1})=>{let l=h({"custom-line":!0,[e]:!0,[o]:!!o,[n]:!0});return(0,Ft.jsx)("span",{className:l,style:{...t,"--color":r,"--size":`${a}px`,"--spacing":`${s}px`,"--dashSize":`${i}px`}})};var Ze=require("react/jsx-runtime"),Ht=(0,K.createContext)(null),Mo=e=>{let o=(0,K.useContext)(Ht);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]},nn=({children:e,className:o="",noSeparators:t,multiple:r,style:a={},defaultOpened:n=[]})=>{let[i,s]=(0,K.useState)(()=>(Array.isArray(n)?n:[n]).reduce((d,p)=>typeof p=="string"?{...d,[p]:!0}:d,{})),l=(0,K.useCallback)(d=>{s(p=>({...r?p:{},[d]:!p[d]}))},[r]),c=(0,K.useMemo)(()=>Object.keys(i).filter(d=>i[d]),[i]),m=h({accordion:!0,[o]:!!o});return(0,Ze.jsx)(Ht.Provider,{value:{toggleItem:l,openedItems:c},children:(0,Ze.jsx)("section",{className:m,style:a,children:(Array.isArray(e)?e:[e]).flatMap((d,p)=>p===0?d:[t?null:(0,Ze.jsx)(Ne,{orientation:"horizontal"},`${p}.5`),d])})})};var $t=require("react"),Bt=require("react-icons/fa");var zt=require("react/jsx-runtime"),Io=({children:e,isOpen:o,className:t="",style:r={}})=>(0,zt.jsx)("section",{className:t,style:{overflow:"hidden",height:o?"auto":0,transition:"height 300ms ease",interpolateSize:"allow-keywords",...r},children:e});var No=require("react");var Re=require("react/jsx-runtime"),an=({cardZIndex:e="auto",flipDirection:o="vertical",flipSpeed:t=500,isFlipped:r=!1,children:a})=>{let n=c=>{if(a.length!==2)throw new Error("Component FlipCard requires 2 children");return a[c]},i=(0,No.useMemo)(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?180:0}deg)`,[o,r]),s=(0,No.useMemo)(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?0:-180}deg)`,[o,r]),l=h({"flip-card":!0,"is-flipped":r});return(0,Re.jsx)("section",{className:l,style:{"--cardZIndex":e,"--flipSpeed":`${t}ms`,"--frontRotate":i,"--backRotate":s},children:(0,Re.jsxs)("section",{className:"flipper",children:[(0,Re.jsx)("section",{className:"front",children:n(0)}),(0,Re.jsx)("section",{className:"back",children:n(1)})]})})};var Pe=require("react");var Lo=require("react/jsx-runtime"),sn=({children:e,threshold:o=5,translationZ:t=25,width:r="fit-content",className:a=""})=>{let n=(0,Pe.useRef)(null),i=(0,Pe.useRef)(null),s=(0,Pe.useCallback)(m=>{let d=n.current,p=i.current;if(!d||!p)return;let{clientX:u,clientY:g,currentTarget:v}=m,{clientWidth:f,clientHeight:b}=v,{top:y,left:T}=d.getBoundingClientRect(),C=(u-T)/f,x=(g-y)/b,P=C*2-1,D=((x*2-1)*o).toFixed(2),F=(P*o).toFixed(2);p.style.transform=`perspective(${f}px) rotateX(${-D}deg) rotateY(${F}deg)`,d.style.transform=`perspective(${f}px) translateZ(${t}px)`},[o,t]),l=(0,Pe.useCallback)(m=>{let d=n.current,p=i.current;!d||!p||(p.style.transform=`perspective(${m.currentTarget.clientWidth}px) rotateX(0) rotateY(0)`,d.style.transform=`perspective(${m.currentTarget.clientWidth}px) translateZ(0)`)},[]);N("mousemove",s,n),N("mouseleave",l,n);let c=h({"hover-card":!0,[a]:!!a});return(0,Lo.jsx)("span",{ref:n,style:{width:r},className:c,children:(0,Lo.jsx)("span",{className:"card-hover-layer",ref:i,children:e})})};var Ke=require("react");var Oo={hero:"h1",header1:"h1",header2:"h2",header3:"h3",header4:"h4",body:"p",label:"span","label-form":"label",small:"small"},Ao={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:m,htmlFor:d,recommendedWidth:p=!1,...u})=>{let g=h({typography:!0,[Ao[e]]:Ao[e]!==void 0,[t]:!!t,[i??""]:!!i,[m??""]:!!m,"no-padding":l,"code-family":s==="code","recommended-width":p,"nowrap-max-lines":typeof o=="number","nowrap-max-lines-2":o===2,"nowrap-max-lines-3":o===3,"nowrap-max-lines-4":o===4,"nowrap-max-lines-5":o===5,nowrap:o===!0}),v=(0,Ke.useMemo)(()=>Oo[e]??Oo.body,[e]);return(0,Ke.createElement)(n??v,{...u,className:g,htmlFor:d,style:{textAlign:c,...r}},a)};var J=require("react/jsx-runtime"),Le=(e,o)=>typeof e=="function"?e(o):e,ln=({title:e,subtitle:o,children:t,icon:r=Bt.FaCaretLeft,startContent:a,content:n,endContent:i,classNames:s={},className:l="",style:c={}})=>{let m=(0,$t.useMemo)(()=>crypto.randomUUID(),[]),[d,p]=Mo(m),u=h({"accordion-header":!0,"has-start-content":!!a,[s?.header??""]:!!s?.header,"is-open":d}),g=h({"accordion-header-content":!0,[s?.headerContent??""]:!!s?.headerContent}),v=h({"accordion-toggle-icon":!0,isOpen:d,[s?.toggleIcon??""]:!!s?.toggleIcon}),f=h({"accordion-body":!0,[s?.body??""]:!!s?.body}),b=Le(e,d),y=Le(o,d),T=Le(a,d),C=Le(n,d)??(0,J.jsxs)("section",{className:g,children:[(0,J.jsx)(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:b}),(0,J.jsx)(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:y})]}),x=Le(i,d)??(0,J.jsx)(r,{className:v}),P=h({"accordion-item":!0,[l]:!!l});return(0,J.jsxs)("section",{className:P,style:c,children:[(0,J.jsxs)("section",{className:u,onClick:p,children:[T,C,x]}),(0,J.jsx)(Io,{isOpen:d,children:(0,J.jsx)("section",{className:f,children:t})})]})};var Je=require("react");var Gt=require("react/jsx-runtime"),fe=({color:e,duration:o=1e3,timingFunction:t="ease-out",times:r=1,className:a="",style:n={},zIndex:i=1})=>{let s=(0,Je.useRef)(null);return(0,Je.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,Gt.jsx)("span",{ref:s,onMouseDown:c=>{let{pageX:m,pageY:d,currentTarget:p}=c,u=p.getBoundingClientRect(),g=(m-u.left)*100/u.width,v=(d-u.top)*100/u.height,f=document.createElement("span");f.classList.add("ripple-effect"),f.style.animationDuration=`${o}ms`,f.style.animationTimingFunction=t,f.style.left=`${g}%`,f.style.top=`${v}%`,e&&(f.style.background=e),p.appendChild(f),setTimeout(()=>{f.remove()},Math.max(o,500)*Math.max(r,1))},className:`ripple ${a}`,style:{...n,zIndex:i}})};var qe=require("react/jsx-runtime"),Fo=({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})=>(0,qe.jsxs)("button",{...c,className:gt("polpo-button",o,t,s&&"full",r&&`radius-${r}`,a&&`size-${a}`,n&&"no-wrap",i&&"icon",l),children:[e,(0,qe.jsx)(fe,{})]});var eo=require("react");var Oe=require("react/jsx-runtime"),cn=()=>{let{x:e,y:o,elementX:t,elementY:r,ref:a}=Et(),[n,i]=(0,eo.useState)(!1);if(N("mouseover",l=>{let c=getComputedStyle(l.target).cursor;i(c==="pointer")}),(0,eo.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,Oe.jsxs)("section",{className:"cursor-overlay",ref:a,children:[(0,Oe.jsx)("span",{className:`cursor outer-circle ${n?"cursor-hover":""}`,style:{transform:s}}),(0,Oe.jsx)("span",{className:`cursor inner-circle ${n?"cursor-hover":""}`,style:{transform:s}})]})};var Vt=require("react"),Yt=require("react-icons/io5");var oo=require("react-hook-form"),Ho=require("react/jsx-runtime"),I=({Component:e,inputProps:o,defaultValue:t,rules:r})=>{let{control:a,setValue:n}=(0,oo.useFormContext)(),{name:i,defaultValue:s}=o;return(0,Ho.jsx)(oo.Controller,{name:i,control:a,rules:r,defaultValue:s??t,render:({field:{onBlur:l,value:c},fieldState:m})=>(0,Ho.jsx)(e,{value:c,error:m.error?.message,invalid:m.invalid,isTouched:m.isTouched,isDirty:m.isDirty,setValue:d=>n(i,d),onBlur:l,...o})})};var te=require("react/jsx-runtime"),ge=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:m="off",icon:d=Yt.IoCheckmarkOutline,label:p,color:u="primary",size:g="regular"})=>{let v=(0,Vt.useMemo)(()=>crypto.randomUUID(),[]),{handlers:f}=O({onChange:T=>t(T.target.checked),onBlur:r,onFocus:a}),b=h({"checkbox-container":!0,[n]:!!n,[`color-${u}`]:!!u}),y=h({checkbox:!0,"is-checked":o,[`size-${g}`]:!!g});return(0,te.jsxs)("section",{className:b,style:i,onClick:T=>T.stopPropagation(),children:[(0,te.jsxs)("section",{className:y,children:[(0,te.jsx)("section",{className:"checkbox-fill",children:(0,te.jsx)(d,{size:"1.3em",className:"checkbox-icon"})}),(0,te.jsx)("input",{id:v,type:"checkbox",name:e,className:"checkbox-input",checked:o,autoFocus:s,autoComplete:m,disabled:c||l,...f})]}),p?(0,te.jsx)(R,{variant:"label-form",htmlFor:v,className:"checkbox-label",children:p}):null]})},dn=({rules:e,...o})=>(0,te.jsx)(I,{Component:ge,defaultValue:!1,inputProps:o,rules:e});ge.Controller=dn;var Wt=require("react");var _t=require("react-icons/im");var zo=(r=>(r.FULL_BORDER="full-border",r.CONTENT_BORDER="content-border",r.CONTENT_LINE="line",r))(zo||{}),$o=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))($o||{});var _=require("react/jsx-runtime"),jt=({icon:e,className:o,onClick:t})=>e?(0,_.jsx)(e,{className:o,onClick:t}):(0,_.jsx)("span",{}),H=({id:e,label:o,leftIcon:t,rightIcon:r,errorIcon:a=_t.ImCross,error:n,onClickLeftIcon:i,onClickRightIcon:s,fieldOrientation:l="vertical",children:c,isFocus:m=!1,variant:d,ref:p})=>{let u=h({"form-field":!0,focus:m,error:!!n,"variant-content-border":d==="content-border","variant-content-line":d==="line","variant-full-border":d==="full-border","variant-inline":l==="horizontal"}),g=v=>f=>{f.stopPropagation();let b=document.getElementById(e);b?.focus(),b?.click(),v&&v()};return(0,_.jsxs)("section",{className:u,ref:p,children:[o?(0,_.jsx)(R,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:e,children:o}):null,(0,_.jsxs)("section",{className:"field-content",children:[jt({className:"field-left-icon",icon:t,onClick:g(i)}),(0,_.jsx)("section",{className:"field-children",children:c}),jt({className:"field-right-icon",icon:r,onClick:g(s)})]}),!!n&&(0,_.jsxs)("section",{className:"field-message",children:[a?(0,_.jsx)(a,{size:10}):(0,_.jsx)("span",{}),(0,_.jsx)(R,{noPadding:!0,variant:"small",children:n})]})]})};var to=require("react/jsx-runtime"),Bo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,type:n="date",className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:m=!1,placeholder:d="",autoComplete:p="off",isDirty:u=!1,isTouched:g=!1,invalid:v=!1,error:f,...b})=>{let y=(0,Wt.useMemo)(()=>crypto.randomUUID(),[]),{isFocus:T,handlers:C}=O({onBlur:r,onChange:x=>t(x.target.value),onFocus:a});return(0,to.jsx)(H,{id:y,error:f,isFocus:T,...b,children:(0,to.jsx)("input",{id:y,type:n,name:e,className:i,style:s,value:o,autoFocus:l,autoComplete:p,placeholder:d,disabled:m,readOnly:c,...C})})},pn=({rules:e,...o})=>(0,to.jsx)(I,{Component:Bo,defaultValue:"",inputProps:o,rules:e});Bo.Controller=pn;var Xt=require("react");var ro=require("react/jsx-runtime"),Go=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,pattern:n,type:i="text",className:s="",style:l={},autoFocus:c=!1,readOnly:m=!1,disabled:d=!1,placeholder:p="",autoComplete:u="off",isDirty:g=!1,isTouched:v=!1,invalid:f=!1,error:b,min:y,max:T,...C})=>{let x=(0,Xt.useMemo)(()=>crypto.randomUUID(),[]),{handlers:P,isFocus:S}=O({onChange:D=>t(D.target.value),onBlur:r,onFocus:a});return(0,ro.jsx)(H,{id:x,error:b,isFocus:S,...C,children:(0,ro.jsx)("input",{id:x,type:i,name:e,className:s,style:l,value:o,pattern:n,autoFocus:c,autoComplete:u,placeholder:p,disabled:d,readOnly:m,min:y,max:T,...P})})},mn=({rules:e,...o})=>(0,ro.jsx)(I,{Component:Go,defaultValue:"",inputProps:o,rules:e});Go.Controller=mn;var Uo=require("react"),ao=require("react-icons/fi"),Qt=require("react-icons/io");var no=require("react/jsx-runtime"),Vo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:m="",autoComplete:d="off",isDirty:p=!1,isTouched:u=!1,invalid:g=!1,error:v,...f})=>{let b=(0,Uo.useMemo)(()=>crypto.randomUUID(),[]),[y,T]=Lt(["password","text"]),{isFocus:C,handlers:x}=O({onBlur:r,onChange:S=>t(S.target.value),onFocus:a}),P=(0,Uo.useMemo)(()=>y==="password"?ao.FiEye:y==="text"?ao.FiEyeOff:Qt.IoIosWarning,[y]);return(0,no.jsx)(H,{id:b,error:v,isFocus:C,...f,rightIcon:P,onClickRightIcon:()=>T(),children:(0,no.jsx)("input",{id:b,type:y,name:e,className:n,style:i,value:o,autoFocus:s,autoComplete:d,placeholder:m,disabled:c,readOnly:l,...x})})},un=({rules:e,...o})=>(0,no.jsx)(I,{Component:Vo,defaultValue:"",inputProps:o,rules:e});Vo.Controller=un;var ar=To(require("color"),1),X=require("react"),lo=require("react-colorful"),ir=require("react-icons/fa6"),sr=To(require("use-eye-dropper"),1);var W=require("react"),er=require("react-icons/im");var io=require("react");var Zt=require("react-dom");var Yo=({children:e,id:o})=>{let t=mt(o);return t===null?null:(0,Zt.createPortal)(e,t)};var Kt=require("react");var qt=require("react/jsx-runtime"),Jt=(a=>(a.OPAQUE="opaque",a.TRANSPARENT="transparent",a.BLUR="blur",a.NONE="none",a))(Jt||{}),jo=({opacity:e=.6,backdrop:o="blur",zIndex:t,backdropOnClick:r,modalState:a})=>{let n=h({"modal-backdrop":!0,"backdrop-close":a==="CLOSING"||a==="CLOSED"}),i=(0,Kt.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,qt.jsx)("section",{tabIndex:-1,onClick:r,className:n,style:{zIndex:t,...i}})};var ke=require("react/jsx-runtime"),Z=({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:m=!0,transitionDuration:d=300,windowOffset:p=10,offset:u=20,position:g,containerRef:v,zIndex:f=1e3,...b})=>{let y=(0,io.useMemo)(()=>crypto.randomUUID(),[]),T=(0,io.useRef)(null),{modalState:C,isVisible:x}=kt({transitionDuration:d,isOpen:t});Pt({modalRef:c??T,containerRef:v,offset:u,windowOffset:p,position:g,isOpen:x}),lt(c??T,()=>{t&&m&&r()});let P=h({"modal-content":!0,[a]:!!a,[`animation-${s}`]:!!s&&s!=="none",[l]:C==="CLOSING"||C==="CLOSED"});return x?(0,ke.jsxs)(Yo,{id:`modal-${e}-${y}`,children:[(0,ke.jsx)(jo,{...b,modalState:C,zIndex:f}),(0,ke.jsx)("section",{className:"modal",ref:c??T,style:{maxWidth:`calc(100dvw - ${p*2}px)`,maxHeight:`calc(100dvh - ${p*2}px)`,...i,zIndex:+f+1},children:(0,ke.jsx)("section",{style:{...n,animationDuration:`${d}ms`},className:P,children:o})})]}):null};var j=require("react/jsx-runtime"),or=(0,W.createContext)(null),gn=()=>{let e=(0,W.useContext)(or);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:m={},...d})=>{let[p,u]=(0,W.useState)(!1),g=(0,W.useRef)(null),v=(0,W.useCallback)(()=>{g.current?.classList.add("shake-animation"),setTimeout(()=>{g.current?.classList.remove("shake-animation")},500)},[]),f=h({"action-modal-content":!0,"back-card":s,"line-on-top":i,"no-padding":l});return(0,j.jsx)(or.Provider,{value:{onClose:t,isActionInProgress:p,setIsActionInProgress:u},children:(0,j.jsx)(Z,{className:"action-modal",id:"action-modal",animation:"bounce",opacity:.8,isOpen:o,onClose:t,...d,backdropOnClick:r?v:t,position:"center",children:(0,j.jsx)("section",{ref:g,className:"modal-content",children:(0,j.jsxs)("section",{className:f,children:[!n&&!r&&(0,j.jsx)("section",{className:"close-modal-button",onClick:()=>t(),children:(0,j.jsx)(er.ImCross,{})}),a?(0,j.jsx)(R,{variant:"header4",className:"action-modal-icon",children:(0,j.jsx)(a,{})}):null,(0,j.jsx)("section",{className:"action-modal-body",children:(0,j.jsx)("section",{className:`action-modal-content ${c}`,style:m,children:e})})]})})})})},hn=({onClick:e,children:o,isLoading:t,...r})=>{let{onClose:a,isActionInProgress:n,setIsActionInProgress:i}=gn(),[s,l]=(0,W.useState)(!1),c=(0,W.useCallback)(()=>{l(!0),i(!0);let m=e();m instanceof Promise?m.then(()=>{a(),l(!1),i(!1)}):(a(),l(!1),i(!1))},[e,a,i]);return!s&&n?null:(0,j.jsx)(Fo,{...r,onClick:c,isLoading:t||s,children:o})};Se.ActionButton=hn;var tr=require("react"),rr=require("react-icons/im");var Ee=require("react/jsx-runtime"),bn=({children:e,isOpen:o,onClose:t,position:r="left",size:a,className:n="",...i})=>{let s=(0,tr.useMemo)(()=>({top:{height:a,width:"100%"},left:{height:"100%",width:a},right:{height:"100%",width:a},bottom:{height:a,width:"100%"}})[r],[r,a]);return(0,Ee.jsxs)(Z,{id:"aside",isOpen:o,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:`aside-modal ${n} ${r}`,rootStyle:s,backdropOnClick:t,position:r,...i,children:[(0,Ee.jsx)("span",{className:"close-modal-button",onClick:t,children:(0,Ee.jsx)(rr.ImCross,{})}),(0,Ee.jsx)("section",{className:"aside-modal-content",children:e})]})};var re=require("react/jsx-runtime"),vn=({title:e,onAccept:o,onReject:t=()=>null,acceptText:r,rejectText:a,children:n,isLoading:i,...s})=>(0,re.jsx)(Se,{...s,backCard:!0,children:(0,re.jsxs)("section",{className:"confirmation-modal",children:[(0,re.jsx)(R,{variant:"header4",children:e}),(0,re.jsx)("section",{children:n}),(0,re.jsxs)("section",{className:"confirmation-modal-actions",children:[!i&&(0,re.jsx)(Se.ActionButton,{variant:"flat",onClick:t,children:a}),(0,re.jsx)(Se.ActionButton,{isLoading:i,onClick:o,children:r})]})]})});var so=require("react");var L=require("react/jsx-runtime"),q=({children:e,isOpen:o,onClose:t,id:r,menuContentRef:a,contentClassName:n="",contentStyle:i={},className:s="",...l})=>{let c=h({"menu-modal":!0,[s]:!!s});return(0,L.jsx)(Z,{className:c,...l,id:`menu-${r}`,isOpen:o,onClose:t,children:(0,L.jsx)("ul",{className:`menu-content ${n}`,role:"listbox",style:i,ref:a,children:e})})},yn=({children:e,label:o="",asCheckbox:t,icon:r,id:a,disabled:n=!1,selected:i=!1,className:s="",style:l={},onClick:c=()=>null,...m})=>{let d=h({"menu-option":!0,[s]:!0,"is-disabled":n,"is-selected":i}),p=(0,so.useCallback)(g=>{g.stopPropagation(),n||c(!i)},[n,c,i]),u=(0,so.useMemo)(()=>e||(t?(0,L.jsx)(ge,{className:"menu-checkbox",disabled:n,value:i,setValue:g=>c(g),name:"option",style:{pointerEvents:"none"},size:"small",label:(0,L.jsxs)(L.Fragment,{children:[r!==void 0&&(0,L.jsx)(r,{className:"option-icon"}),(0,L.jsx)(R,{variant:"label",children:o})]})}):(0,L.jsxs)(L.Fragment,{children:[r!==void 0&&(0,L.jsx)(r,{className:"option-icon"}),typeof o=="string"?(0,L.jsx)(R,{variant:"label",children:o}):o]})),[t,e,n,r,o,c,i]);return(0,L.jsxs)("li",{...m,id:a,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":n,onClick:p,className:d,style:l,children:[(0,L.jsx)(fe,{zIndex:10}),u]})},xn=()=>(0,L.jsx)("li",{children:(0,L.jsx)(Ne,{className:"divider"})}),nr=({children:e,className:o="",...t})=>(0,L.jsx)("li",{tabIndex:-1,className:"menu-label",children:(0,L.jsx)(R,{...t,variant:"small",className:`menu-group-label ${o}`,children:e})}),Cn=({children:e,label:o,className:t="",style:r={},contentClassName:a="",contentStyle:n={},...i})=>{let s=h({"menu-group":!0,[t]:!!t});return(0,L.jsxs)("li",{tabIndex:-1,...i,className:s,style:r,children:[o&&(0,L.jsx)(nr,{children:o}),(0,L.jsx)("ul",{className:`menu-group-content ${a}`,role:"listbox",style:n,children:e})]})};q.Option=yn;q.Divider=xn;q.GroupLabel=nr;q.Group=Cn;var Y=require("react/jsx-runtime"),_o=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,showValueText:n=!1,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:m=!1,placeholder:d="",autoComplete:p="off",isDirty:u=!1,isTouched:g=!1,invalid:v=!1,error:f,...b})=>{let{open:y,isSupported:T}=(0,sr.default)(),[C,x]=(0,X.useState)(o),P=(0,X.useMemo)(()=>crypto.randomUUID(),[]),S=(0,X.useRef)(null),[D,F]=(0,X.useState)(!1),{handlers:V,isFocus:U}=O({onChange:A=>x(A.target.value),onBlur:A=>{B(),r&&r(A)},onFocus:A=>{B(),a&&a(A)}}),w=(0,X.useMemo)(()=>{let A=(0,ar.default)(o===""?"#000000":o);return A.isLight()||A.alpha()<.5?"#000000":"#FFFFFF"},[o]),E=async()=>{let{sRGBHex:A}=await y();t(A)};(0,X.useEffect)(()=>{x(o)},[o]);let B=(0,X.useCallback)(()=>{C.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(C):x(o)},[C,t,o]),se=h({"input-color-box":!0,[i]:!!i});return(0,Y.jsxs)(H,{id:P,error:f,isFocus:U,...b,children:[(0,Y.jsxs)("section",{className:"input-color",onClick:A=>{A.stopPropagation(),F(!0)},ref:S,children:[(0,Y.jsx)("section",{className:se,style:{borderColor:w,background:o,color:o,...s}}),n?(0,Y.jsx)("input",{id:P,name:e,value:C,placeholder:d,readOnly:c,autoFocus:l,disabled:m,autoComplete:p,className:"color-input",...V}):null]}),(0,Y.jsxs)(Z,{id:"input-color",isOpen:D,onClose:()=>F(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:S,className:"input-color-selector",children:[(0,Y.jsx)(lo.HexAlphaColorPicker,{id:P,color:o,onChange:t}),(0,Y.jsxs)("section",{className:"color-input-container",children:[T()?(0,Y.jsx)(ir.FaEyeDropper,{onClick:()=>{E()}}):(0,Y.jsx)("span",{}),(0,Y.jsx)(lo.HexColorInput,{className:"color-input",id:P,name:e,color:o,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),(0,Y.jsx)("span",{})]})]})]})},Tn=({rules:e,...o})=>(0,Y.jsx)(I,{Component:_o,defaultValue:"#147EFB",inputProps:o,rules:e});_o.Controller=Tn;var ne=require("react"),De=require("react-icons/fa6"),cr=require("react-icons/io"),co=require("react-icons/pi");var wn=require("react");var lr=require("react");var Ae=({tag:e="section",children:o,className:t,style:r,flow:a,columnSize:n,rowSize:i,column:s,row:l,pc:c,pi:m,ps:d,jc:p,ji:u,js:g,ac:v,ai:f,as:b,gtc:y,gtr:T,gta:C,gt:x,gap:P,...S})=>(0,lr.createElement)(e,{className:t,...S,style:{...r,...a?{gridAutoFlow:a}:{},...n?{gridAutoColumns:n}:{},...i?{gridAutoRows:i}:{},...s?{gridColumn:s}:{},...l?{gridRow:l}:{},...c?{placeContent:c}:{},...m?{placeItems:m}:{},...d?{placeSelf:d}:{},...p?{justifyContent:p}:{},...u?{justifyItems:u}:{},...g?{justifySelf:g}:{},...v?{alignContent:v}:{},...f?{alignItems:f}:{},...b?{alignSelf:b}:{},...y?{gridTemplateColumns:y}:{},...T?{gridTemplateRows:T}:{},...C?{gridTemplateAreas:C}:{},...x?{gridTemplate:x}:{},...P?{gap:P}:{},display:"grid"}},o);var k=require("react/jsx-runtime"),Wo=({name:e,value:o={},setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:m="Click to upload or drag and drop",autoComplete:d="off",accept:p,multiple:u=!1,limitSize:g=5e6,errorTimeout:v=3e3,label:f})=>{let[b,y]=(0,ne.useState)(null),T=(0,ne.useMemo)(()=>crypto.randomUUID(),[]),{handlers:C}=O({onBlur:r,onFocus:a,onChange:w=>{let{files:E}=w.target;E&&x(E)}});(0,ne.useEffect)(()=>{let w=null;return b!==null&&(w=setTimeout(()=>{y(null)},v)),()=>{w!==null&&clearTimeout(w)}},[b,v]);let x=w=>{let E=u?{...o}:{},B=u?w.length:1;for(let se=0;se<B;se++){let A=w.item(se);A&&(A.size<g?E[A.name]=A:y(`File '${A.name}' size is larger than ${Te(g)}`))}t(E)},P=w=>{w.preventDefault(),w.stopPropagation(),w.dataTransfer.files&&w.dataTransfer.files.length&&x(w.dataTransfer.files)},S=(0,ne.useCallback)(w=>({"image/png":co.PiFilePngFill,"application/pdf":co.PiFilePdfFill})[w]??cr.IoIosWarning,[]),D=w=>{let E={...o};delete E[w.name],t(E)},F=()=>{t({})},V=(0,ne.useMemo)(()=>Object.values(o).reduce((w,{size:E})=>w+E,0),[o]),U=(w,E)=>{let B=S(w.type);return(0,k.jsxs)("section",{className:"input-file-card",children:[(0,k.jsx)("section",{className:"file-card--image",children:(0,k.jsx)(B,{})}),(0,k.jsxs)(Ae,{children:[(0,k.jsx)(R,{variant:"label",noPadding:!0,nowrap:!0,children:w.name}),(0,k.jsx)(R,{noPadding:!0,variant:"small",children:Te(w.size)})]}),(0,k.jsx)("section",{className:"file-card--delete",onClick:()=>D(w),children:(0,k.jsx)(De.FaRegTrashCan,{})})]},E)};return(0,k.jsxs)("section",{className:"input-file-container",children:[!!f&&(0,k.jsx)(R,{variant:"label-form",htmlFor:T,noPadding:!0,children:f}),(0,k.jsxs)("section",{className:"input-file--box",onDrop:P,children:[(0,k.jsx)("section",{className:"input-file--box--icon",children:(0,k.jsx)(De.FaMagnifyingGlass,{})}),(0,k.jsxs)(Ae,{children:[(0,k.jsx)(R,{variant:"label-form",htmlFor:T,noPadding:!0,weight:"bold",children:m}),(0,k.jsxs)(R,{variant:"small",noPadding:!0,children:["Max size (",Te(g),")"]})]}),(0,k.jsx)("input",{id:T,type:"file",name:e,value:"",placeholder:m,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:n,style:i,accept:p,multiple:u,title:"",...C})]}),b!==null&&(0,k.jsx)(R,{variant:"small",noPadding:!0,className:"error",children:b}),Object.keys(o).length>0&&(0,k.jsxs)(k.Fragment,{children:[u&&(0,k.jsxs)("span",{className:"total-info",children:[(0,k.jsxs)(R,{variant:"small",noPadding:!0,children:[Object.keys(o).length," files - ",Te(V)]}),(0,k.jsx)("span",{className:"total-info--delete",onClick:F,children:(0,k.jsx)(De.FaRegTrashCan,{})})]}),(0,k.jsx)("section",{className:"input-file--files",children:(0,k.jsx)("section",{className:"input-file--files--content",children:Object.values(o).map(U)})})]})]})},Rn=({rules:e,...o})=>(0,k.jsx)(I,{Component:Wo,defaultValue:{},inputProps:o,rules:e});Wo.Controller=Rn;var he=require("react");var mo=require("react/jsx-runtime"),dr={comma:/(?!^-)[^0-9,]/g,dot:/(?!^-)[^0-9.]/g},pr=(e,o=".")=>{let t=o==="."?dr.dot:dr.comma,r=e.replace(t,"").replace(",",".");return r||""},po=(e,o)=>!e||Number.isNaN(e)?o(0):o(e),Xo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,pattern:n,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:m=!1,placeholder:d="",autoComplete:p="off",isDirty:u=!1,isTouched:g=!1,invalid:v=!1,error:f,min:b,max:y,decimalSeparator:T,format:C={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...x})=>{let P=(0,he.useMemo)(()=>crypto.randomUUID(),[]),S=(0,he.useMemo)(()=>{if(typeof C=="function")return C;let{locales:w,...E}=C;return Intl.NumberFormat(w,E).format},[C]),[D,F]=(0,he.useState)(po(o,S)),{handlers:V,isFocus:U}=O({onChange:w=>{let E=pr(w.target.value,T);E.endsWith(".")?F(w.target.value):(F(po(Number(E),S)),t(Number(E)))},onBlur:w=>{let E=pr(w.target.value,T);F(po(Number(E),S)),t(Number(E)),r&&r(w)},onFocus:a});return(0,he.useEffect)(()=>{let w=po(o,S);D!==w&&F(w)},[S,D,o]),(0,mo.jsx)(H,{id:P,error:f,isFocus:U,...x,children:(0,mo.jsx)("input",{id:P,type:"text",name:e,className:i,style:s,value:D,pattern:n,autoFocus:l,autoComplete:p,placeholder:d,disabled:m,readOnly:c,min:b,max:y,...V})})},Pn=({rules:e,...o})=>(0,mo.jsx)(I,{Component:Xo,defaultValue:0,inputProps:o,rules:e});Xo.Controller=Pn;var mr=require("react");var de=require("react/jsx-runtime"),Qo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:m="off",radioValue:d,label:p,color:u="primary",size:g="regular"})=>{let v=(0,mr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:f}=O({onChange:T=>t(T.target.value),onBlur:r,onFocus:a}),b=h({"radio-container":!0,[n]:!!n,[`color-${u}`]:!!u}),y=h({radio:!0,"is-checked":d===o,[`size-${g}`]:!!g});return(0,de.jsxs)("section",{className:b,style:i,children:[(0,de.jsxs)("section",{className:y,children:[(0,de.jsx)("section",{className:"radio-fill"}),(0,de.jsx)("input",{id:v,type:"radio",name:e,className:`radio-input ${n}`,style:i,value:d,checked:d===o,autoFocus:s,autoComplete:m,disabled:c||l,...f})]}),p?(0,de.jsx)(R,{variant:"label-form",htmlFor:v,className:"radio-label",children:p}):null]})},kn=({rules:e,...o})=>(0,de.jsx)(I,{Component:Qo,defaultValue:"",inputProps:o,rules:e});Qo.Controller=kn;var z=require("react"),br=require("react-icons/im"),vr=require("react-icons/pi");var ur=require("react");var ae=require("react/jsx-runtime"),Zo=({isLoading:e=!1,hasNextPage:o=!1,loadMore:t,customLoadMoreElement:r,emptyMessage:a,children:n})=>{let{ref:i,inView:s}=Tt(),l=Po(e,100);(0,ur.useEffect)(()=>{o&&s&&!l&&t()},[o,l,t,s]);let c=Array.isArray(n)?n.length>0:!!n;return(0,ae.jsxs)(ae.Fragment,{children:[n,(0,ae.jsxs)("section",{className:"infinity-scroll",children:[!!a&&!c&&!l&&(0,ae.jsx)("p",{className:"empty-message",children:a}),(o||l)&&(r?r(i):(0,ae.jsx)("section",{ref:i,className:"loading",children:l&&(0,ae.jsx)("span",{className:"loading--icon",children:":D"})}))]})]})};var be=require("react");var Ko=require("react/jsx-runtime"),fr=({children:e,value:o})=>{let{multiselect:t,isEqualComparator:r,maxOptions:a,selectedValue:n,setValue:i,setIsOpen:s}=gr(),l=(0,be.useCallback)((u,g)=>["number","string"].includes(typeof u)?u===g:!!r&&r(u,g),[r]),c=(0,be.useCallback)(u=>{if(u)if(t){if(a&&Array.isArray(n)&&n.length>=a)return;i([...n,o])}else i(o),s(!1);else t?i(n.filter(g=>!l(g,o))):(i(null),s(!1))},[t,a,n,i,o,s,l]),m=(0,be.useMemo)(()=>n===""||n===null?!1:Array.isArray(n)?["number","string"].includes(typeof o)?n.includes(o):n.some(u=>!!r&&r(o,u)):l(o,n),[l,r,n,o]),d=(0,be.useCallback)(u=>{["Enter"," "].includes(u.key)&&(u.preventDefault(),c(!(m&&t)))},[c,m,t]),p=(0,be.useMemo)(()=>typeof e=="string"?(0,Ko.jsx)(R,{"data-value":o,variant:"label",nowrap:!0,children:e}):e,[e,o]);return(0,Ko.jsx)(q.Option,{label:p,onKeyDown:d,asCheckbox:t,selected:m,onClick:u=>c(t?u:!0)})};var G=require("react");var ve=require("react/jsx-runtime"),Sn=({height:e,minHeight:o,containerRef:t,offset:r,windowOffset:a})=>{let[n,i]=(0,G.useState)(void 0),s=(0,G.useCallback)(()=>{let l=t.current?.getBoundingClientRect().bottom??0,c=window.innerHeight-l-a-r-5,m=window.innerHeight-a*3,d=c<o?m:c,p=Math.min(d,e),u=Math.max(p,o);i(`${Math.round(u)}px`)},[t,a,r,o,e]);return(0,G.useEffect)(()=>{s()},[s]),ce(t,s),N("resize",s),{h:n}},hr=({children:e,searchQueryValue:o,searchQueryPlaceholder:t="Search option",searchQueryClassName:r="",searchQueryStyle:a={},onSearchQuery:n,containerRef:i,height:s=300})=>{let l=(0,G.useRef)(null),c=(0,G.useRef)(null),[m,d]=(0,G.useState)(""),p=(0,G.useRef)(null),u=_e("(max-width: 480px)");N("keydown",C=>{if(["ArrowDown","ArrowUp"].includes(C.code)){C.preventDefault();let x=document.activeElement;if(x?.tagName==="LI")switch(C.code){case"ArrowDown":x?.nextSibling?.focus();break;case"ArrowUp":x?.previousElementSibling?.focus();break}}});let g=(0,G.useCallback)(C=>{let{value:x}=C.target;n&&n(x),d(x)},[n]);(0,G.useEffect)(()=>{p.current&&p.current.focus()},[]);let{h:v}=Sn({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[f,b]=(0,G.useState)(!1),y=(0,G.useCallback)(()=>{let C=Math.round(l.current?.getBoundingClientRect().height??0)+2,x=Math.round(c.current?.scrollHeight??0);b(C>=x)},[]);(0,G.useEffect)(y,[y]),ce(l,y),ce(c,y),N("resize",y);let T=h({"select-options-header":!0,[r]:!!r});return(0,ve.jsxs)("section",{className:`select-options ${n?"with-search-query":""}`,style:u?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{height:f?"auto":v,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[n&&(0,ve.jsx)("section",{className:T,style:a,children:(0,ve.jsx)("input",{name:"query",className:"input-search",value:o??m,onChange:g,placeholder:t,onClick:C=>C.stopPropagation(),ref:p,autoFocus:!0})}),(0,ve.jsx)("section",{className:"select-options-list-container",ref:l,children:(0,ve.jsx)("ul",{className:"select-options-list",ref:c,children:e})})]})};var M=require("react/jsx-runtime"),yr=(0,z.createContext)(null),gr=()=>{let e=(0,z.useContext)(yr);if(!e)throw new Error("useSelectContext must be used within a Select component");return e},En=({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})},Mn=({value:e})=>(0,M.jsx)(R,{variant:"label",nowrap:!0,children:typeof e=="string"||typeof e=="number"?e:JSON.stringify(e)}),In=({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)}),pe=({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:m=Mn,valueComponent:d=In,maxOptions:p,children:u,name:g,value:v,setValue:f,onBlur:b,onFocus:y,className:T="",style:C={},showClearOption:x=!1,height:P,searchQueryStyle:S,searchQueryClassName:D,autoFocus:F=!1,readOnly:V=!1,disabled:U=!1,placeholder:w="",autoComplete:E="off",isDirty:B=!1,isTouched:se=!1,invalid:A=!1,error:vo,...$r})=>{let Br=(0,z.useRef)(null),ze=_e("(max-width: 480px)"),nt=(0,z.useMemo)(()=>crypto.randomUUID(),[]),yo=(0,z.useRef)(null),[$e,at]=(0,z.useState)(!1),xo=(0,z.useCallback)(le=>{at(le&&!U)},[U]),Gr=(0,z.useCallback)(le=>{le.stopPropagation(),f(c?[]:null)},[c,f]),Co=(0,z.useMemo)(()=>c?v.length>0:!!v,[c,v]),Ur=(0,z.useMemo)(()=>u||e.map((le,Vr)=>(0,M.jsx)(pe.Option,{value:le,children:(0,M.jsx)(m,{value:le})},Vr)),[m,u,e]);return(0,M.jsx)(yr.Provider,{value:{selectedValue:v,setValue:f,multiselect:c??!1,isEqualComparator:o,maxOptions:p??null,setIsOpen:at},children:(0,M.jsx)(H,{id:nt,error:vo,isFocus:$e,ref:yo,...$r,children:(0,M.jsxs)("section",{id:g,style:C,onBlur:b,className:`select ${U?"disabled":""} ${T}`,children:[(0,M.jsxs)("section",{id:nt,className:`select-container ${Co&&x?"three-columns":""}`,onClick:()=>xo(!0),children:[(0,M.jsx)("button",{type:"button",className:`input-button ${(Array.isArray(v)?v.length>0:v)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":$e,onFocus:le=>{xo(!0),y&&y(le)},children:Co?(0,M.jsx)(d,{...c?{value:v,multiselect:c}:{value:v}}):(0,M.jsx)(R,{variant:"label",noPadding:!0,nowrap:!0,children:w})}),Co&&x&&(0,M.jsx)("section",{className:"icon-close",onClick:Gr,children:(0,M.jsx)(br.ImCross,{})}),(0,M.jsx)(vr.PiCaretDown,{className:`select-caret-icon ${$e&&"is-select-open"}`})]}),(0,M.jsx)(q,{id:"form-select",isOpen:$e,onClose:()=>xo(!1),backdrop:ze?"blur":"transparent",opacity:ze?.8:.4,position:ze?"center":"bottom",offset:5,modalRef:Br,windowOffset:10,transitionDuration:200,containerRef:ze?void 0:yo,contentClassName:"select-menu-content",className:"select-options-menu",children:(0,M.jsx)(hr,{containerRef:yo,onSearchQuery:a,searchQueryValue:t,searchQueryPlaceholder:r,searchQueryClassName:D,searchQueryStyle:S,height:P,children:(0,M.jsx)(Zo,{isLoading:i,hasNextPage:s,loadMore:n,emptyMessage:l,children:Ur})})})]})})})},Nn=({rules:e,...o})=>(0,M.jsx)(I,{Component:pe,defaultValue:[],inputProps:{...o,multiselect:!0},rules:e}),Ln=({rules:e,...o})=>(0,M.jsx)(I,{Component:pe,defaultValue:null,inputProps:{...o,multiselect:!1},rules:e}),On=e=>{let{multiselect:o}=e;return o?(0,M.jsx)(Nn,{...e,multiselect:!0}):(0,M.jsx)(Ln,{...e,multiselect:!1})};pe.Controller=On;pe.Option=fr;pe.OptionLabel=En;var xr=require("react");var ye=require("react/jsx-runtime"),Jo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,min:n,max:i,step:s,onlySlider:l=!1,className:c="",style:m={},autoFocus:d=!1,readOnly:p=!1,disabled:u=!1,placeholder:g="",autoComplete:v="off",isDirty:f=!1,isTouched:b=!1,invalid:y=!1,error:T,...C})=>{let x=(0,xr.useMemo)(()=>crypto.randomUUID(),[]),P=V=>{r&&r(V);let U=parseInt(`${o}`);n!==void 0&&U<n&&t(n),i!==void 0&&U>i&&t(i),t(U)},{isFocus:S,handlers:D}=O({onBlur:P,onChange:V=>t(+V.target.value),onFocus:a}),F=h({"input-slider":!0,"is-focus":S});return(0,ye.jsx)(H,{id:x,error:T,isFocus:S,...C,children:(0,ye.jsxs)("section",{className:F,children:[(0,ye.jsx)("input",{id:x,type:"range",name:e,className:`slider ${c}`,style:m,value:o,autoFocus:d,autoComplete:v,placeholder:g,disabled:u,readOnly:p,min:n,max:i,step:s,...D}),!l&&(0,ye.jsx)("input",{id:x,type:"number",name:e,className:`slider-number ${c}`,style:m,value:o,autoComplete:v,disabled:u,readOnly:p,min:n,max:i,step:s,...D})]})})},An=({rules:e,...o})=>(0,ye.jsx)(I,{Component:Jo,defaultValue:0,inputProps:o,rules:e});Jo.Controller=An;var Cr=require("react");var uo=require("react/jsx-runtime"),qo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,rows:n=4,resize:i="vertical",className:s="",style:l={},autoFocus:c=!1,readOnly:m=!1,disabled:d=!1,placeholder:p="",autoComplete:u="off",isDirty:g=!1,isTouched:v=!1,invalid:f=!1,error:b,...y})=>{let T=(0,Cr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:C,isFocus:x}=O({onBlur:r,onChange:S=>t(S.target.value),onFocus:a}),P=h({textarea:!0,[s]:!!s});return(0,uo.jsx)(H,{id:T,error:b,isFocus:x,...y,children:(0,uo.jsx)("textarea",{id:T,name:e,className:P,style:{resize:i,...l},value:o,rows:n,...C,autoFocus:c,autoComplete:u,placeholder:p,disabled:d,readOnly:m})})},Dn=({rules:e,...o})=>(0,uo.jsx)(I,{Component:qo,defaultValue:"",inputProps:o,rules:e});qo.Controller=Dn;var kr=require("react");var wr=require("react");var Tr=require("react");var xe=require("react/jsx-runtime"),Me=({position:e="top",children:o,content:t,offset:r=5,disabled:a=!1})=>{let{containerRef:n,openModal:i,closeModal:s,isOpen:l}=wt(),c=h({tooltip:!0,[e]:!0});return N("mouseenter",()=>i(),n),N("mouseleave",()=>s(),n),a?o:(0,xe.jsxs)(xe.Fragment,{children:[(0,Tr.cloneElement)(o,{ref:n}),(0,xe.jsx)(Z,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:n,onClose:s,position:e,className:c,closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:100,closeAnimationClassName:"close-animation",children:(0,xe.jsx)("span",{className:"tooltip-content",children:t})})]})};var et=require("react/jsx-runtime"),Fn=({children:e,value:o,position:t,offset:r,tooltipText:a,tooltipCopiedText:n,copiedTextTimeout:i=500})=>{let[s,l]=(0,wr.useState)(!1);return(0,et.jsx)(Me,{content:s&&n?n:a,position:t,offset:r,children:(0,et.jsx)("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(o),setTimeout(()=>l(!1),i)},children:e})})};var $=require("react/jsx-runtime"),Rr={small:1,regular:1.2,large:1.4},Pr={small:2,regular:2.5,large:3},ot=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:m="",autoComplete:d="off",label:p,leftLabel:u,rightLabel:g,width:v="regular",size:f="regular",dotHoverSize:b=1.3,padding:y=.25,leftIcon:T,rightIcon:C,internalLeftIcon:x,internalRightIcon:P,leftIconTooltip:S,rightIconTooltip:D,color:F})=>{let V=(0,kr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:U}=O({onChange:vo=>t(vo.target.checked),onBlur:r,onFocus:a}),w=h({"switch-container":!0,[n]:!!n,[`color-${F}`]:!!F}),E=h({switch:!0,"is-checked":o,"is-readonly":!c&&l}),B=Rr[f]??Rr.regular,se=(Pr[v]??Pr.regular)*B,A=Math.min(y,B);return(0,$.jsxs)("section",{className:w,style:{...i,"--width":`${se}em`,"--dot-size":`${B}em`,"--dot-hover-size":`${B*Math.min(Math.max(b,1),2)}em`,"--padding":`${A}em`},children:[u?(0,$.jsx)(R,{variant:"label-form",className:"switch-label",htmlFor:V,children:u}):null,T!==void 0&&(0,$.jsx)(Me,{content:S,disabled:!S,offset:10,children:(0,$.jsx)(T,{size:`${B*.7}em`,className:"switch-icon",onClick:()=>t(!o)})}),(0,$.jsxs)("section",{className:E,children:[x!==void 0&&(0,$.jsx)("span",{className:"switch-internal-left-icon",children:(0,$.jsx)(x,{size:`${B*.7}em`})}),P!==void 0&&(0,$.jsx)("span",{className:"switch-internal-right-icon",children:(0,$.jsx)(P,{size:`${B*.7}em`})}),(0,$.jsx)("span",{className:"switch-dot"}),(0,$.jsx)("input",{id:V,type:"checkbox",name:e,className:`switch-checkbox ${n}`,style:i,checked:o,autoFocus:s,autoComplete:d,placeholder:m,disabled:c||l,...U})]}),C!==void 0&&(0,$.jsx)(Me,{content:D,disabled:!D,offset:10,children:(0,$.jsx)(C,{size:`${B*.7}em`,className:"switch-icon",onClick:()=>t(!o)})}),p||g?(0,$.jsx)(R,{variant:"label-form",className:"switch-label",htmlFor:V,children:p||g}):null]})},Hn=({rules:e,...o})=>(0,$.jsx)(I,{Component:ot,defaultValue:!1,inputProps:o,rules:e});ot.Controller=Hn;var Sr=require("react/jsx-runtime"),zn=({alt:e="",loading:o="eager",...t})=>(0,Sr.jsx)("img",{loading:o,alt:e,...t,width:"100%"});var Fe=require("react");var Er=require("react"),fo=require("react-icons/md");var ee=require("react/jsx-runtime"),Mr=({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,m=h({"sort-on-click":!!c}),d=c?()=>n(c):void 0,p=(0,Er.useMemo)(()=>c?(0,ee.jsx)("span",{className:"sort-icon",children:!!i&&i===c&&(s==="asc"?(0,ee.jsx)(fo.MdArrowUpward,{}):(0,ee.jsx)(fo.MdArrowDownward,{}))}):null,[c,i,s]);return l?null:(0,ee.jsxs)("th",{style:{width:r},className:m,onClick:d,children:[(0,ee.jsxs)(Ae,{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}),p]}),(0,ee.jsx)(fe,{color:"var(--color-primary-700)"})]})};var go=require("react/jsx-runtime"),$n=(e,{field:o,render:t,Component:r},a)=>{if(o&&e[o])return(0,go.jsx)(R,{noPadding:!0,nowrap:!0,children:e[o]});if(t)return t(e,a);if(r)return(0,go.jsx)(r,{data:e,rowKey:a})},Ir=(e,o,t)=>o.map((r,a)=>r.hidden?null:(0,go.jsx)("td",{children:$n(e,r,t)},a)),Nr=(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;var ho=require("react"),Lr=()=>{let[[e,o],t]=(0,ho.useState)([null,null]),r=(0,ho.useCallback)(a=>{t(([n,i])=>a!==n?[a,"asc"]:i==="asc"?[a,"desc"]:[null,null])},[]);return{sortBy:e,order:o,toggleSortField:r}};var Ar=require("react/jsx-runtime"),Or=({data:e,columns:o,isSelected:t=!1,selectable:r=!1,rowKey:a})=>{let n=h({"row-selected":r&&t});return(0,Ar.jsx)("tr",{className:n,children:Ir(e,o,a)})};var oe=require("react/jsx-runtime"),Bn=({columns:e,data:o,width:t,selectable:r=!1,rowId:a,className:n="",tableClassName:i=""})=>{let[s,l]=(0,Fe.useState)({}),c=h({"smart-table":!0,[i]:!!i,"layout-fixed":t==="content","layout-scrollable":t==="scroll"}),m=h({"smart-table-container":!0,[n]:!!n}),{sortBy:d,order:p,toggleSortField:u}=Lr(),g=(0,Fe.useMemo)(()=>{let f=[...e];return r&&(f=[{header:`${Object.values(s).length}`,render:(b,y)=>(0,oe.jsx)(ge,{name:`selected-${y}`,value:`${y}`in s,setValue:T=>{l(C=>{let x={...C};return T?x[`${y}`]=b:delete x[`${y}`],x})}})},...f]),f},[e,r,s]),v=(0,Fe.useMemo)(()=>Nr(o,d,p),[o,d,p]);return(0,oe.jsx)("section",{className:m,children:(0,oe.jsxs)("table",{className:c,children:[(0,oe.jsx)("thead",{children:(0,oe.jsx)("tr",{children:g.map((f,b)=>(0,oe.jsx)(Mr,{toggleSortField:u,sortField:d,orderField:p,...f},b))})}),(0,oe.jsx)("tbody",{children:v.map(f=>(0,oe.jsx)(Or,{rowKey:f[a],data:f,columns:g,isSelected:`${f[a]}`in s,selectable:r},f[a]))})]})})};var ie=require("react");var me=require("react");var He=require("react/jsx-runtime");var tt={top:0,left:0,width:0,height:0};var Dr=({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 m=(0,me.useRef)(null),d=(0,me.useRef)(null),[p,u]=(0,me.useState)(!1),[g,v]=(0,me.useState)(tt),f=h({"tab-list":!0,[`variant-${o}`]:!!o,[`size-${s}`]:!!s,[`radius-${t}`]:!!t,[`color-${a}`]:!!a,"vertical-direction":r==="vertical",[l]:!!l});return(0,me.useEffect)(()=>{let b=d.current?.getBoundingClientRect()??tt,y=m.current?.getBoundingClientRect()??tt,T=b.width,C=o==="line"?2:b.height,x=b.left-y.left,P=o==="line"?b.top+b.height-y.top:b.top-y.top;v({left:x,top:P,width:T,height:C}),p||setTimeout(()=>{u(!0)},100)},[p,o,i]),(0,He.jsxs)("section",{className:f,ref:m,style:c,children:[!!o&&(0,He.jsx)("span",{className:`tabs-selector ${p?"active":""}`,style:g}),e.map(({id:b,label:y})=>(0,He.jsx)(Ie.Tab,{id:b,ref:b===i?d:void 0,children:y},b)),n]})};var bo=require("react/jsx-runtime"),rt=(0,ie.createContext)(null),Fr=e=>{let o=(0,ie.useContext)(rt);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)]},Gn=()=>{let e=(0,ie.useContext)(rt);if(!e)throw new Error("You cant use this component out off an Tabs component");return e},Ie=({children:e,defaultOpenTab:o,onChange:t})=>{let[r,a]=(0,ie.useState)(o);return(0,ie.useEffect)(()=>{t&&t(r)},[r,t]),(0,bo.jsx)(rt.Provider,{value:{openTab:r,changeOpenTab:n=>a(n)},children:e})},Un=({id:e,children:o,className:t="",style:r={},onClick:a,ref:n})=>{let[i,s]=Fr(e),l=h({tab:!0,[t]:!!t,"is-open":i});return(0,bo.jsx)("span",{className:l,style:r,onClick:m=>{s(),a&&a(m)},ref:n,children:o})},Vn=({id:e,children:o})=>{let[t]=Fr(e);return t?o:null},Yn=({children:e,...o})=>{let{openTab:t}=Gn();return(0,bo.jsx)(Dr,{...o,openTab:t,children:e})};Ie.Tab=Un;Ie.TabPanel=Vn;Ie.TabList=Yn;var zr=require("react/jsx-runtime"),Hr=(n=>(n.NONE="none",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n.FULL="full",n))(Hr||{}),jn=({children:e,rounded:o="medium",selected:t=!1,noWrap:r=!1,ref:a})=>{let n=h({tag:!0,[`rounded-${o}`]:!!o,"is-selected":t,"no-wrap":r});return(0,zr.jsx)("span",{className:n,ref:a,children:e})};0&&(module.exports={Accordion,AccordionItem,ActionModal,AsideModal,Backdrop,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,Tag,TagRounded,Textarea,Tooltip,Typography,useAccordionItem});
|
|
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});
|
package/dist/components.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.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)))}}}.accordion{display:grid}.accordion-item{display:grid;position:relative;.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}}.accordion-header-content{display:grid}.accordion-toggle-icon{transition:all .3s ease;&.isOpen{transform:rotate(-90deg)}}.accordion-body{padding:10px 0 20px}}.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);.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}}}.hover-card{display:inline-block;transition:all .3s ease;.card-hover-layer{transition:all .1s ease;width:100%;height:100%;display:grid}}.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}}.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}}}.cursor-overlay{position:fixed;top:0;left:0;width:100%;height:100%;cursor:none;pointer-events:none}.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}}}.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%)}}.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%}}.modal{position:fixed;z-index:1001;pointer-events:none}.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}}}.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)}}.action-modal{background:transparent;.modal-content{&.shake-animation{animation:headShake .6s linear}}}.action-modal-content{position:relative;.action-modal-body{box-shadow:0 0 10px -5px;border-radius:10px;overflow:hidden;display:grid}.action-modal-content{background:var(--color-background);padding:3em 4em 2em;display:grid;gap:1em}&.no-padding .action-modal-content{padding:2em 0 0}&:has(.action-modal-icon) .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{.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}}}.aside-modal{color:var(--color-foreground);overflow:auto;height:100%;.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))}}}.confirmation-modal{display:grid;max-width:450px;gap:1em;place-content:center;justify-items:center;text-align:center;.confirmation-modal-actions{display:grid;grid-auto-flow:column;justify-content:center;gap:1em}}.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;.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)}}.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}.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%)}}}.menu-group{position:relative;.menu-group-content{display:grid;gap:.2em;padding:0;margin:0;list-style:none;align-content:start;position:relative}}.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}}.grida{display:grid}.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)}}}.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;.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}}.radio-fill{transition:all .2s ease-out;border-radius:inherit;margin:auto;width:0;height:0}.radio-container{--color: var(--color-gray-800);display:flex;align-items:center;gap:1em;width:fit-content;.radio-label{cursor:pointer;user-select:none}.radio{color:var(--color);&.is-checked{.radio-fill{width:100%;height:100%;background:var(--color)}}}.radio:hover,&:has(.radio-label:hover) .radio{box-shadow:0 0 0 .4em hsl(from var(--color) h s l / 50%);.radio-fill{width:20%;height:20%;background:hsl(from var(--color) h s l / 50%)}&:is(.is-checked){.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)}}.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)}}.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%}}.input-slider{display:grid;grid-template-columns:1fr 50px;align-items:center;gap:10px;.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%)}.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)}}}.textarea{border:0;outline:0;field-sizing:content}.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)}}}.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;.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;.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}.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);.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);.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)}}.switch-checkbox{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:3}}.switch-label{cursor:pointer;user-select:none;padding:0 .5em}.switch:not(:has(.is-readonly,input:disabled)):hover .switch-dot,&:has(.switch-icon:hover) .switch:not(:has(.is-readonly,input:disabled)) .switch-dot,&:has(.switch-label:hover) .switch:not(:has(.is-readonly,input:disabled)) .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))}}.switch:not(:has(.is-readonly,input:disabled)):active .switch-dot,&:has(.switch-icon:active) .switch:not(:has(.is-readonly,input:disabled)) .switch-dot,&:has(.switch-label:active) .switch:not(:has(.is-readonly,input:disabled)) .switch-dot{width:var(--dot-hover-size)}.switch:not(:has(.is-readonly,input:disabled)).is-checked:active .switch-dot,&:has(.switch-icon:active) .switch:not(:has(.is-readonly,input:disabled)).is-checked .switch-dot,&:has(.switch-label:active) .switch:not(:has(.is-readonly,input:disabled)).is-checked .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)}}.smart-table-container{border:0 solid var(--color-primary-500);border-radius:5px;overflow:auto;height:100%;width:100%;margin:auto}.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}}}.tab{cursor:pointer;user-select:none;transition:all .3s ease}.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,.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))}.tabs-selector{position:absolute;background:var(--color);color:var(--color-contrast);border-radius:1.5em;&.active{transition:all .3s ease}}.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)}.tabs-selector{border-radius:0}.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)}}.tag{--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)}}
|
|
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)}}}
|
|
2
2
|
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
package/dist/components.d.cts
CHANGED
|
@@ -50,6 +50,22 @@ type AccordionItemContentProps = AccordionItemCommonProps & {
|
|
|
50
50
|
type AccordionItemProps = AccordionItemTitleProps | AccordionItemContentProps;
|
|
51
51
|
declare const AccordionItem: React__default.FC<AccordionItemProps>;
|
|
52
52
|
|
|
53
|
+
declare enum BadgeRounded {
|
|
54
|
+
NONE = "none",
|
|
55
|
+
SMALL = "small",
|
|
56
|
+
MEDIUM = "medium",
|
|
57
|
+
LARGE = "large",
|
|
58
|
+
FULL = "full"
|
|
59
|
+
}
|
|
60
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
selected?: boolean;
|
|
63
|
+
rounded?: `${BadgeRounded}`;
|
|
64
|
+
noWrap?: boolean;
|
|
65
|
+
ref?: React.Ref<HTMLElement>;
|
|
66
|
+
}
|
|
67
|
+
declare const Badge: ({ children, rounded, selected, noWrap, ref, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
68
|
+
|
|
53
69
|
declare enum ColorTypes {
|
|
54
70
|
DEFAULT = "default",
|
|
55
71
|
PRIMARY = "primary",
|
|
@@ -1757,7 +1773,7 @@ type SmartTableProps<RowData extends RowDataObject> = {
|
|
|
1757
1773
|
className?: string;
|
|
1758
1774
|
tableClassName?: string;
|
|
1759
1775
|
};
|
|
1760
|
-
declare const SmartTable: <RowData extends RowDataObject>({ columns: initialColumns, data, width, selectable, rowId, className, tableClassName
|
|
1776
|
+
declare const SmartTable: <RowData extends RowDataObject>({ columns: initialColumns, data, width, selectable, rowId, className, tableClassName, }: SmartTableProps<RowData>) => react_jsx_runtime.JSX.Element;
|
|
1761
1777
|
|
|
1762
1778
|
declare enum RadiusVariants {
|
|
1763
1779
|
None = "none",
|
|
@@ -1826,22 +1842,6 @@ type TabPanelProps = {
|
|
|
1826
1842
|
children: React__default.ReactNode;
|
|
1827
1843
|
};
|
|
1828
1844
|
|
|
1829
|
-
declare enum TagRounded {
|
|
1830
|
-
NONE = "none",
|
|
1831
|
-
SMALL = "small",
|
|
1832
|
-
MEDIUM = "medium",
|
|
1833
|
-
LARGE = "large",
|
|
1834
|
-
FULL = "full"
|
|
1835
|
-
}
|
|
1836
|
-
interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
1837
|
-
children: React.ReactNode;
|
|
1838
|
-
selected?: boolean;
|
|
1839
|
-
rounded?: `${TagRounded}`;
|
|
1840
|
-
noWrap?: boolean;
|
|
1841
|
-
ref?: React.Ref<HTMLElement>;
|
|
1842
|
-
}
|
|
1843
|
-
declare const Tag: ({ children, rounded, selected, noWrap, ref }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
1844
|
-
|
|
1845
1845
|
type TooltipProps = {
|
|
1846
1846
|
position?: `${PositionContainer.TOP}` | `${PositionContainer.LEFT}` | `${PositionContainer.RIGHT}` | `${PositionContainer.BOTTOM}`;
|
|
1847
1847
|
offset?: number | `${number}`;
|
|
@@ -1864,4 +1864,4 @@ type ClickToCopyProps = {
|
|
|
1864
1864
|
};
|
|
1865
1865
|
declare const ClickToCopy: ({ children, value, position, offset, tooltipText, tooltipCopiedText, copiedTextTimeout, }: ClickToCopyProps) => react_jsx_runtime.JSX.Element;
|
|
1866
1866
|
|
|
1867
|
-
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, 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,
|
|
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 };
|
package/dist/components.d.ts
CHANGED
|
@@ -50,6 +50,22 @@ type AccordionItemContentProps = AccordionItemCommonProps & {
|
|
|
50
50
|
type AccordionItemProps = AccordionItemTitleProps | AccordionItemContentProps;
|
|
51
51
|
declare const AccordionItem: React__default.FC<AccordionItemProps>;
|
|
52
52
|
|
|
53
|
+
declare enum BadgeRounded {
|
|
54
|
+
NONE = "none",
|
|
55
|
+
SMALL = "small",
|
|
56
|
+
MEDIUM = "medium",
|
|
57
|
+
LARGE = "large",
|
|
58
|
+
FULL = "full"
|
|
59
|
+
}
|
|
60
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
selected?: boolean;
|
|
63
|
+
rounded?: `${BadgeRounded}`;
|
|
64
|
+
noWrap?: boolean;
|
|
65
|
+
ref?: React.Ref<HTMLElement>;
|
|
66
|
+
}
|
|
67
|
+
declare const Badge: ({ children, rounded, selected, noWrap, ref, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
68
|
+
|
|
53
69
|
declare enum ColorTypes {
|
|
54
70
|
DEFAULT = "default",
|
|
55
71
|
PRIMARY = "primary",
|
|
@@ -1757,7 +1773,7 @@ type SmartTableProps<RowData extends RowDataObject> = {
|
|
|
1757
1773
|
className?: string;
|
|
1758
1774
|
tableClassName?: string;
|
|
1759
1775
|
};
|
|
1760
|
-
declare const SmartTable: <RowData extends RowDataObject>({ columns: initialColumns, data, width, selectable, rowId, className, tableClassName
|
|
1776
|
+
declare const SmartTable: <RowData extends RowDataObject>({ columns: initialColumns, data, width, selectable, rowId, className, tableClassName, }: SmartTableProps<RowData>) => react_jsx_runtime.JSX.Element;
|
|
1761
1777
|
|
|
1762
1778
|
declare enum RadiusVariants {
|
|
1763
1779
|
None = "none",
|
|
@@ -1826,22 +1842,6 @@ type TabPanelProps = {
|
|
|
1826
1842
|
children: React__default.ReactNode;
|
|
1827
1843
|
};
|
|
1828
1844
|
|
|
1829
|
-
declare enum TagRounded {
|
|
1830
|
-
NONE = "none",
|
|
1831
|
-
SMALL = "small",
|
|
1832
|
-
MEDIUM = "medium",
|
|
1833
|
-
LARGE = "large",
|
|
1834
|
-
FULL = "full"
|
|
1835
|
-
}
|
|
1836
|
-
interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
1837
|
-
children: React.ReactNode;
|
|
1838
|
-
selected?: boolean;
|
|
1839
|
-
rounded?: `${TagRounded}`;
|
|
1840
|
-
noWrap?: boolean;
|
|
1841
|
-
ref?: React.Ref<HTMLElement>;
|
|
1842
|
-
}
|
|
1843
|
-
declare const Tag: ({ children, rounded, selected, noWrap, ref }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
1844
|
-
|
|
1845
1845
|
type TooltipProps = {
|
|
1846
1846
|
position?: `${PositionContainer.TOP}` | `${PositionContainer.LEFT}` | `${PositionContainer.RIGHT}` | `${PositionContainer.BOTTOM}`;
|
|
1847
1847
|
offset?: number | `${number}`;
|
|
@@ -1864,4 +1864,4 @@ type ClickToCopyProps = {
|
|
|
1864
1864
|
};
|
|
1865
1865
|
declare const ClickToCopy: ({ children, value, position, offset, tooltipText, tooltipCopiedText, copiedTextTimeout, }: ClickToCopyProps) => react_jsx_runtime.JSX.Element;
|
|
1866
1866
|
|
|
1867
|
-
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, 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,
|
|
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 };
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{createContext as wr,useCallback as Rr,useContext as Pr,useMemo as kr,useState as Sr}from"react";import{useCallback as Ka,useMemo as Ja,useReducer as qa}from"react";import{useCallback as ja,useLayoutEffect as _a,useRef as Wa}from"react";import{useMemo as Ut}from"react";var h=e=>Ut(()=>Object.entries(e).reduce((o,[t,r])=>r?[...o,t]:o,[]).join(" "),[e]);import{useEffect as Vt,useLayoutEffect as Yt,useRef as jt}from"react";function M(e,o,t,r){let a=jt(o);Vt(()=>{a.current=o},[o]),Yt(()=>{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 _t=(e,o)=>e.current&&!e.current.contains(o),oo=(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=>_t(n,r))&&o()})};import{useState as di}from"react";import{useState as ui,useCallback as fi}from"react";import{useEffect as Wt,useState as Xt}from"react";var Se=(e,o=500)=>{let[t,r]=Xt(e);return Wt(()=>{let a=setTimeout(()=>r(e),o);return()=>{clearTimeout(a)}},[e,o]),t};import{useState as yi}from"react";import{useState as ki}from"react";import{useEffect as Qt}from"react";var X=(e,o)=>{Qt(()=>{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 Zt,useState as Kt}from"react";var to=e=>{let o=document.getElementById(e);return o===null&&(o=document.createElement("div"),o.setAttribute("id",e),document.body.appendChild(o)),o},ro=e=>{let[o,t]=Kt(()=>to(e));return Zt(()=>{let r=document.getElementById(e);if(o===null||r===null){let a=to(e);t(a)}return()=>{o&&o.parentNode&&process.env.NODE_ENV==="production"&&document.body.removeChild(o)}},[o,e]),o};import{useEffect as Zi,useState as Ki}from"react";import{clsx as Jt}from"clsx";import{twMerge as qt}from"tailwind-merge";var no=(...e)=>qt(Jt(e));var q=(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 ao=({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)}},er=({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(" ")},or=({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}},io=({c:e,m:o,offset:t,windowOffset:r,position:a})=>{let n={c:e,m:o,offset:t,position:a},i=ao(n),s=er(i,a,r,o);s!==a&&(i=ao({...n,position:s}));let l=or(i,o,r);return{left:`${l.left}px`,top:`${l.top}px`}};var so=({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{useEffect as os,useRef as ts,useState as rs}from"react";import{useCallback as is,useRef as ss,useState as ls}from"react";import{useRef as rr,useState as nr}from"react";import{useEffect as tr}from"react";var lo=(e,o,t={})=>{tr(()=>{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 co=(e={})=>{let[o,t]=nr(!1),r=rr(null);return lo(r,([a])=>{t(a.isIntersecting)},e),{ref:r,inView:o}};import{useCallback as Ee,useState as ar}from"react";var I=({onBlur:e,onFocus:o,onChange:t}={})=>{let[r,a]=ar(!1),n=Ee(l=>{a(!0),o&&o(l)},[o]),i=Ee(l=>{a(!1),e&&e(l)},[e]),s=Ee(l=>{t&&t(l)},[t]);return{isFocus:r,handlers:{onFocus:n,onBlur:i,onChange:s}}};import{useEffect as ir,useState as sr}from"react";var fe=e=>{let[o,t]=sr(!1);return ir(()=>{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 lr,useState as cr}from"react";var po=()=>{let e=lr(null),[o,t]=cr(!1);return{containerRef:e,isOpen:o,openModal:()=>{t(!0)},closeModal:()=>{t(!1)}}};import{useCallback as mo,useLayoutEffect as dr,useRef as pr}from"react";var uo=e=>({x:e.x,y:e.y,w:e.width,h:e.height,top:e.top,left:e.left}),fo=({offset:e=0,windowOffset:o=0,position:t="bottom",modalRef:r,containerRef:a,isOpen:n})=>{let i=pr(null),s=mo((c,m)=>{let d=c.current?.getClientRects()[0],p=m.current?.getClientRects()[0];if(!d)return;let u=p?io({c:uo(p),m:uo(d),offset:e,windowOffset:o,position:t}):so({position:t,windowOffset:o});Object.keys(u).forEach(g=>{c.current?.style.setProperty(g,u[g])})},[t,o,e]),l=mo(()=>{n&&s(r,a??i)},[s,n,a,r]);dr(l,[l]),X(a??i,l),X(r,l),M("resize",l),M("scroll",l,r)};import mr,{useCallback as go,useEffect as ur,useLayoutEffect as fr,useMemo as gr}from"react";var ho=({transitionDuration:e=0,isOpen:o})=>{let[t,r]=mr.useState("CLOSED"),a=gr(()=>t!=="CLOSED",[t]);ur(()=>{document.documentElement.style.overflow=a?"hidden":"auto"},[a]);let n=go(()=>{["OPENING","OPEN"].includes(t)&&(e>0?(r("CLOSING"),setTimeout(()=>{r("CLOSED")},e)):r("CLOSED"))},[t,e]),i=go(()=>{["CLOSING","CLOSED"].includes(t)&&(e>0?(r("OPENING"),setTimeout(()=>{r("OPEN")},e)):r("OPEN"))},[t,e]);return fr(()=>{t==="CLOSED"&&o?i():t==="OPEN"&&!o&&n()},[o,i,n,t]),{isVisible:a,modalState:t}};import{useRef as hr,useState as br}from"react";var bo=(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}},vo=e=>{let o=hr(null),[t,r]=br({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=bo(e.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}else if(o.current instanceof Element){let l=bo(o.current.getBoundingClientRect(),n);r(c=>({...c,...l}))}}),{...t,ref:o}};import{useState as zs}from"react";import{useEffect as Us,useRef as Vs}from"react";import{useEffect as _s,useRef as Ws,useState as Xs}from"react";import{useEffect as qs,useState as el}from"react";import{useCallback as rl,useState as nl}from"react";import{useCallback as vr,useState as yr}from"react";var yo=(e,o=0)=>{let[t,r]=yr(o),a=vr(n=>{r(n!==void 0?n:i=>(i+1)%e.length)},[e.length]);return[e[t],a]};import{useEffect as cl,useState as dl}from"react";import{jsx as Tr}from"react/jsx-runtime";var xr=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(xr||{}),Cr=(r=>(r.SOLID="solid",r.DOTTED="dotted",r.DASHED="dashed",r))(Cr||{}),ge=({orientation:e="horizontal",className:o="",style:t={},color:r="currentColor",size:a=1,lineStyle:n="solid",dashedSize:i=1,spacing:s=1})=>{let l=h({"custom-line":!0,[e]:!0,[o]:!!o,[n]:!0});return Tr("span",{className:l,style:{...t,"--color":r,"--size":`${a}px`,"--spacing":`${s}px`,"--dashSize":`${i}px`}})};import{jsx as Me}from"react/jsx-runtime";var xo=wr(null),Co=e=>{let o=Pr(xo);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]},ac=({children:e,className:o="",noSeparators:t,multiple:r,style:a={},defaultOpened:n=[]})=>{let[i,s]=Sr(()=>(Array.isArray(n)?n:[n]).reduce((d,p)=>typeof p=="string"?{...d,[p]:!0}:d,{})),l=Rr(d=>{s(p=>({...r?p:{},[d]:!p[d]}))},[r]),c=kr(()=>Object.keys(i).filter(d=>i[d]),[i]),m=h({accordion:!0,[o]:!!o});return Me(xo.Provider,{value:{toggleItem:l,openedItems:c},children:Me("section",{className:m,style:a,children:(Array.isArray(e)?e:[e]).flatMap((d,p)=>p===0?d:[t?null:Me(ge,{orientation:"horizontal"},`${p}.5`),d])})})};import{useMemo as Lr}from"react";import{FaCaretLeft as Or}from"react-icons/fa";import{jsx as Er}from"react/jsx-runtime";var To=({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 wo}from"react";import{jsx as Ie,jsxs as Mr}from"react/jsx-runtime";var vc=({cardZIndex:e="auto",flipDirection:o="vertical",flipSpeed:t=500,isFlipped:r=!1,children:a})=>{let n=c=>{if(a.length!==2)throw new Error("Component FlipCard requires 2 children");return a[c]},i=wo(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?180:0}deg)`,[o,r]),s=wo(()=>`rotate${o==="horizontal"?"Y":"X"}(${r?0:-180}deg)`,[o,r]),l=h({"flip-card":!0,"is-flipped":r});return Ie("section",{className:l,style:{"--cardZIndex":e,"--flipSpeed":`${t}ms`,"--frontRotate":i,"--backRotate":s},children:Mr("section",{className:"flipper",children:[Ie("section",{className:"front",children:n(0)}),Ie("section",{className:"back",children:n(1)})]})})};import{useCallback as Ro,useRef as Po}from"react";import{jsx as ko}from"react/jsx-runtime";var Ic=({children:e,threshold:o=5,translationZ:t=25,width:r="fit-content",className:a=""})=>{let n=Po(null),i=Po(null),s=Ro(m=>{let d=n.current,p=i.current;if(!d||!p)return;let{clientX:u,clientY:g,currentTarget:v}=m,{clientWidth:f,clientHeight:b}=v,{top:y,left:T}=d.getBoundingClientRect(),C=(u-T)/f,x=(g-y)/b,P=C*2-1,O=((x*2-1)*o).toFixed(2),A=(P*o).toFixed(2);p.style.transform=`perspective(${f}px) rotateX(${-O}deg) rotateY(${A}deg)`,d.style.transform=`perspective(${f}px) translateZ(${t}px)`},[o,t]),l=Ro(m=>{let d=n.current,p=i.current;!d||!p||(p.style.transform=`perspective(${m.currentTarget.clientWidth}px) rotateX(0) rotateY(0)`,d.style.transform=`perspective(${m.currentTarget.clientWidth}px) translateZ(0)`)},[]);M("mousemove",s,n),M("mouseleave",l,n);let c=h({"hover-card":!0,[a]:!!a});return ko("span",{ref:n,style:{width:r},className:c,children:ko("span",{className:"card-hover-layer",ref:i,children:e})})};import{createElement as Ir,useMemo as Nr}from"react";var Ne={hero:"h1",header1:"h1",header2:"h2",header3:"h3",header4:"h4",body:"p",label:"span","label-form":"label",small:"small"},Le={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:m,htmlFor:d,recommendedWidth:p=!1,...u})=>{let g=h({typography:!0,[Le[e]]:Le[e]!==void 0,[t]:!!t,[i??""]:!!i,[m??""]:!!m,"no-padding":l,"code-family":s==="code","recommended-width":p,"nowrap-max-lines":typeof o=="number","nowrap-max-lines-2":o===2,"nowrap-max-lines-3":o===3,"nowrap-max-lines-4":o===4,"nowrap-max-lines-5":o===5,nowrap:o===!0}),v=Nr(()=>Ne[e]??Ne.body,[e]);return Ir(n??v,{...u,className:g,htmlFor:d,style:{textAlign:c,...r}},a)};import{jsx as ne,jsxs as Oe}from"react/jsx-runtime";var re=(e,o)=>typeof e=="function"?e(o):e,id=({title:e,subtitle:o,children:t,icon:r=Or,startContent:a,content:n,endContent:i,classNames:s={},className:l="",style:c={}})=>{let m=Lr(()=>crypto.randomUUID(),[]),[d,p]=Co(m),u=h({"accordion-header":!0,"has-start-content":!!a,[s?.header??""]:!!s?.header,"is-open":d}),g=h({"accordion-header-content":!0,[s?.headerContent??""]:!!s?.headerContent}),v=h({"accordion-toggle-icon":!0,isOpen:d,[s?.toggleIcon??""]:!!s?.toggleIcon}),f=h({"accordion-body":!0,[s?.body??""]:!!s?.body}),b=re(e,d),y=re(o,d),T=re(a,d),C=re(n,d)??Oe("section",{className:g,children:[ne(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:b}),ne(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:y})]}),x=re(i,d)??ne(r,{className:v}),P=h({"accordion-item":!0,[l]:!!l});return Oe("section",{className:P,style:c,children:[Oe("section",{className:u,onClick:p,children:[T,C,x]}),ne(To,{isOpen:d,children:ne("section",{className:f,children:t})})]})};import{useEffect as Ar,useRef as Dr}from"react";import{jsx as Fr}from"react/jsx-runtime";var ee=({color:e,duration:o=1e3,timingFunction:t="ease-out",times:r=1,className:a="",style:n={},zIndex:i=1})=>{let s=Dr(null);return Ar(()=>{if(!s.current?.parentElement)return;let c=getComputedStyle(s.current.parentElement).position;["absolute","fixed","sticky","relative"].includes(c)||(s.current.parentElement.style.position="relative")},[]),Fr("span",{ref:s,onMouseDown:c=>{let{pageX:m,pageY:d,currentTarget:p}=c,u=p.getBoundingClientRect(),g=(m-u.left)*100/u.width,v=(d-u.top)*100/u.height,f=document.createElement("span");f.classList.add("ripple-effect"),f.style.animationDuration=`${o}ms`,f.style.animationTimingFunction=t,f.style.left=`${g}%`,f.style.top=`${v}%`,e&&(f.style.background=e),p.appendChild(f),setTimeout(()=>{f.remove()},Math.max(o,500)*Math.max(r,1))},className:`ripple ${a}`,style:{...n,zIndex:i}})};import{jsx as Hr,jsxs as zr}from"react/jsx-runtime";var Eo=({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})=>zr("button",{...c,className:no("polpo-button",o,t,s&&"full",r&&`radius-${r}`,a&&`size-${a}`,n&&"no-wrap",i&&"icon",l),children:[e,Hr(ee,{})]});import{useEffect as $r,useState as Br}from"react";import{jsx as Mo,jsxs as Gr}from"react/jsx-runtime";var $d=()=>{let{x:e,y:o,elementX:t,elementY:r,ref:a}=vo(),[n,i]=Br(!1);if(M("mouseover",l=>{let c=getComputedStyle(l.target).cursor;i(c==="pointer")}),$r(()=>("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 Gr("section",{className:"cursor-overlay",ref:a,children:[Mo("span",{className:`cursor outer-circle ${n?"cursor-hover":""}`,style:{transform:s}}),Mo("span",{className:`cursor inner-circle ${n?"cursor-hover":""}`,style:{transform:s}})]})};import{useMemo as Yr}from"react";import{IoCheckmarkOutline as jr}from"react-icons/io5";import{Controller as Ur,useFormContext as Vr}from"react-hook-form";import{jsx as Io}from"react/jsx-runtime";var E=({Component:e,inputProps:o,defaultValue:t,rules:r})=>{let{control:a,setValue:n}=Vr(),{name:i,defaultValue:s}=o;return Io(Ur,{name:i,control:a,rules:r,defaultValue:s??t,render:({field:{onBlur:l,value:c},fieldState:m})=>Io(e,{value:c,error:m.error?.message,invalid:m.invalid,isTouched:m.isTouched,isDirty:m.isDirty,setValue:d=>n(i,d),onBlur:l,...o})})};import{jsx as ae,jsxs as No}from"react/jsx-runtime";var oe=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:m="off",icon:d=jr,label:p,color:u="primary",size:g="regular"})=>{let v=Yr(()=>crypto.randomUUID(),[]),{handlers:f}=I({onChange:T=>t(T.target.checked),onBlur:r,onFocus:a}),b=h({"checkbox-container":!0,[n]:!!n,[`color-${u}`]:!!u}),y=h({checkbox:!0,"is-checked":o,[`size-${g}`]:!!g});return No("section",{className:b,style:i,onClick:T=>T.stopPropagation(),children:[No("section",{className:y,children:[ae("section",{className:"checkbox-fill",children:ae(d,{size:"1.3em",className:"checkbox-icon"})}),ae("input",{id:v,type:"checkbox",name:e,className:"checkbox-input",checked:o,autoFocus:s,autoComplete:m,disabled:c||l,...f})]}),p?ae(R,{variant:"label-form",htmlFor:v,className:"checkbox-label",children:p}):null]})},_r=({rules:e,...o})=>ae(E,{Component:oe,defaultValue:!1,inputProps:o,rules:e});oe.Controller=_r;import{useMemo as Xr}from"react";import{ImCross as Wr}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 Z,jsxs as De}from"react/jsx-runtime";var Ao=({icon:e,className:o,onClick:t})=>e?Z(e,{className:o,onClick:t}):Z("span",{}),H=({id:e,label:o,leftIcon:t,rightIcon:r,errorIcon:a=Wr,error:n,onClickLeftIcon:i,onClickRightIcon:s,fieldOrientation:l="vertical",children:c,isFocus:m=!1,variant:d,ref:p})=>{let u=h({"form-field":!0,focus:m,error:!!n,"variant-content-border":d==="content-border","variant-content-line":d==="line","variant-full-border":d==="full-border","variant-inline":l==="horizontal"}),g=v=>f=>{f.stopPropagation();let b=document.getElementById(e);b?.focus(),b?.click(),v&&v()};return De("section",{className:u,ref:p,children:[o?Z(R,{className:"field-label",noPadding:!0,variant:"label-form",htmlFor:e,children:o}):null,De("section",{className:"field-content",children:[Ao({className:"field-left-icon",icon:t,onClick:g(i)}),Z("section",{className:"field-children",children:c}),Ao({className:"field-right-icon",icon:r,onClick:g(s)})]}),!!n&&De("section",{className:"field-message",children:[a?Z(a,{size:10}):Z("span",{}),Z(R,{noPadding:!0,variant:"small",children:n})]})]})};import{jsx as Fe}from"react/jsx-runtime";var Do=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,type:n="date",className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:m=!1,placeholder:d="",autoComplete:p="off",isDirty:u=!1,isTouched:g=!1,invalid:v=!1,error:f,...b})=>{let y=Xr(()=>crypto.randomUUID(),[]),{isFocus:T,handlers:C}=I({onBlur:r,onChange:x=>t(x.target.value),onFocus:a});return Fe(H,{id:y,error:f,isFocus:T,...b,children:Fe("input",{id:y,type:n,name:e,className:i,style:s,value:o,autoFocus:l,autoComplete:p,placeholder:d,disabled:m,readOnly:c,...C})})},Qr=({rules:e,...o})=>Fe(E,{Component:Do,defaultValue:"",inputProps:o,rules:e});Do.Controller=Qr;import{useMemo as Zr}from"react";import{jsx as He}from"react/jsx-runtime";var Fo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,pattern:n,type:i="text",className:s="",style:l={},autoFocus:c=!1,readOnly:m=!1,disabled:d=!1,placeholder:p="",autoComplete:u="off",isDirty:g=!1,isTouched:v=!1,invalid:f=!1,error:b,min:y,max:T,...C})=>{let x=Zr(()=>crypto.randomUUID(),[]),{handlers:P,isFocus:k}=I({onChange:O=>t(O.target.value),onBlur:r,onFocus:a});return He(H,{id:x,error:b,isFocus:k,...C,children:He("input",{id:x,type:i,name:e,className:s,style:l,value:o,pattern:n,autoFocus:c,autoComplete:u,placeholder:p,disabled:d,readOnly:m,min:y,max:T,...P})})},Kr=({rules:e,...o})=>He(E,{Component:Fo,defaultValue:"",inputProps:o,rules:e});Fo.Controller=Kr;import{useMemo as Ho}from"react";import{FiEye as Jr,FiEyeOff as qr}from"react-icons/fi";import{IoIosWarning as en}from"react-icons/io";import{jsx as ze}from"react/jsx-runtime";var zo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:m="",autoComplete:d="off",isDirty:p=!1,isTouched:u=!1,invalid:g=!1,error:v,...f})=>{let b=Ho(()=>crypto.randomUUID(),[]),[y,T]=yo(["password","text"]),{isFocus:C,handlers:x}=I({onBlur:r,onChange:k=>t(k.target.value),onFocus:a}),P=Ho(()=>y==="password"?Jr:y==="text"?qr:en,[y]);return ze(H,{id:b,error:v,isFocus:C,...f,rightIcon:P,onClickRightIcon:()=>T(),children:ze("input",{id:b,type:y,name:e,className:n,style:i,value:o,autoFocus:s,autoComplete:d,placeholder:m,disabled:c,readOnly:l,...x})})},on=({rules:e,...o})=>ze(E,{Component:zo,defaultValue:"",inputProps:o,rules:e});zo.Controller=on;import kn from"color";import{useCallback as Sn,useEffect as En,useMemo as Wo,useRef as Mn,useState as Xo}from"react";import{HexAlphaColorPicker as In,HexColorInput as Nn}from"react-colorful";import{FaEyeDropper as Ln}from"react-icons/fa6";import On from"use-eye-dropper";import{createContext as pn,useCallback as Go,useContext as mn,useRef as un,useState as Uo}from"react";import{ImCross as fn}from"react-icons/im";import{useMemo as ln,useRef as cn}from"react";import{createPortal as tn}from"react-dom";var $o=({children:e,id:o})=>{let t=ro(o);return t===null?null:tn(e,t)};import{useMemo as nn}from"react";import{jsx as sn}from"react/jsx-runtime";var an=(a=>(a.OPAQUE="opaque",a.TRANSPARENT="transparent",a.BLUR="blur",a.NONE="none",a))(an||{}),Bo=({opacity:e=.6,backdrop:o="blur",zIndex:t,backdropOnClick:r,modalState:a})=>{let n=h({"modal-backdrop":!0,"backdrop-close":a==="CLOSING"||a==="CLOSED"}),i=nn(()=>({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:sn("section",{tabIndex:-1,onClick:r,className:n,style:{zIndex:t,...i}})};import{jsx as $e,jsxs as dn}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:m=!0,transitionDuration:d=300,windowOffset:p=10,offset:u=20,position:g,containerRef:v,zIndex:f=1e3,...b})=>{let y=ln(()=>crypto.randomUUID(),[]),T=cn(null),{modalState:C,isVisible:x}=ho({transitionDuration:d,isOpen:t});fo({modalRef:c??T,containerRef:v,offset:u,windowOffset:p,position:g,isOpen:x}),oo(c??T,()=>{t&&m&&r()});let P=h({"modal-content":!0,[a]:!!a,[`animation-${s}`]:!!s&&s!=="none",[l]:C==="CLOSING"||C==="CLOSED"});return x?dn($o,{id:`modal-${e}-${y}`,children:[$e(Bo,{...b,modalState:C,zIndex:f}),$e("section",{className:"modal",ref:c??T,style:{maxWidth:`calc(100dvw - ${p*2}px)`,maxHeight:`calc(100dvh - ${p*2}px)`,...i,zIndex:+f+1},children:$e("section",{style:{...n,animationDuration:`${d}ms`},className:P,children:o})})]}):null};import{jsx as V,jsxs as bn}from"react/jsx-runtime";var Vo=pn(null),gn=()=>{let e=mn(Vo);if(!e)throw new Error("useActionModalContext must be used within a ActionModal");return e},ie=({children:e,isOpen:o,onClose:t,actionRequired:r,icon:a,noCloseButton:n,lineOnTop:i=!1,backCard:s=!1,noPadding:l=!1,className:c="",style:m={},...d})=>{let[p,u]=Uo(!1),g=un(null),v=Go(()=>{g.current?.classList.add("shake-animation"),setTimeout(()=>{g.current?.classList.remove("shake-animation")},500)},[]),f=h({"action-modal-content":!0,"back-card":s,"line-on-top":i,"no-padding":l});return V(Vo.Provider,{value:{onClose:t,isActionInProgress:p,setIsActionInProgress:u},children:V(U,{className:"action-modal",id:"action-modal",animation:"bounce",opacity:.8,isOpen:o,onClose:t,...d,backdropOnClick:r?v:t,position:"center",children:V("section",{ref:g,className:"modal-content",children:bn("section",{className:f,children:[!n&&!r&&V("section",{className:"close-modal-button",onClick:()=>t(),children:V(fn,{})}),a?V(R,{variant:"header4",className:"action-modal-icon",children:V(a,{})}):null,V("section",{className:"action-modal-body",children:V("section",{className:`action-modal-content ${c}`,style:m,children:e})})]})})})})},hn=({onClick:e,children:o,isLoading:t,...r})=>{let{onClose:a,isActionInProgress:n,setIsActionInProgress:i}=gn(),[s,l]=Uo(!1),c=Go(()=>{l(!0),i(!0);let m=e();m instanceof Promise?m.then(()=>{a(),l(!1),i(!1)}):(a(),l(!1),i(!1))},[e,a,i]);return!s&&n?null:V(Eo,{...r,onClick:c,isLoading:t||s,children:o})};ie.ActionButton=hn;import{useMemo as vn}from"react";import{ImCross as yn}from"react-icons/im";import{jsx as Be,jsxs as xn}from"react/jsx-runtime";var Zm=({children:e,isOpen:o,onClose:t,position:r="left",size:a,className:n="",...i})=>{let s=vn(()=>({top:{height:a,width:"100%"},left:{height:"100%",width:a},right:{height:"100%",width:a},bottom:{height:a,width:"100%"}})[r],[r,a]);return xn(U,{id:"aside",isOpen:o,onClose:t,opacity:.6,windowOffset:0,animation:"none",className:`aside-modal ${n} ${r}`,rootStyle:s,backdropOnClick:t,position:r,...i,children:[Be("span",{className:"close-modal-button",onClick:t,children:Be(yn,{})}),Be("section",{className:"aside-modal-content",children:e})]})};import{jsx as se,jsxs as Yo}from"react/jsx-runtime";var su=({title:e,onAccept:o,onReject:t=()=>null,acceptText:r,rejectText:a,children:n,isLoading:i,...s})=>se(ie,{...s,backCard:!0,children:Yo("section",{className:"confirmation-modal",children:[se(R,{variant:"header4",children:e}),se("section",{children:n}),Yo("section",{className:"confirmation-modal-actions",children:[!i&&se(ie.ActionButton,{variant:"flat",onClick:t,children:a}),se(ie.ActionButton,{isLoading:i,onClick:o,children:r})]})]})});import{useCallback as Cn,useMemo as Tn}from"react";import{Fragment as jo,jsx as B,jsxs as he}from"react/jsx-runtime";var Y=({children:e,isOpen:o,onClose:t,id:r,menuContentRef:a,contentClassName:n="",contentStyle:i={},className:s="",...l})=>{let c=h({"menu-modal":!0,[s]:!!s});return B(U,{className:c,...l,id:`menu-${r}`,isOpen:o,onClose:t,children:B("ul",{className:`menu-content ${n}`,role:"listbox",style:i,ref:a,children:e})})},wn=({children:e,label:o="",asCheckbox:t,icon:r,id:a,disabled:n=!1,selected:i=!1,className:s="",style:l={},onClick:c=()=>null,...m})=>{let d=h({"menu-option":!0,[s]:!0,"is-disabled":n,"is-selected":i}),p=Cn(g=>{g.stopPropagation(),n||c(!i)},[n,c,i]),u=Tn(()=>e||(t?B(oe,{className:"menu-checkbox",disabled:n,value:i,setValue:g=>c(g),name:"option",style:{pointerEvents:"none"},size:"small",label:he(jo,{children:[r!==void 0&&B(r,{className:"option-icon"}),B(R,{variant:"label",children:o})]})}):he(jo,{children:[r!==void 0&&B(r,{className:"option-icon"}),typeof o=="string"?B(R,{variant:"label",children:o}):o]})),[t,e,n,r,o,c,i]);return he("li",{...m,id:a,role:"option",tabIndex:-1,"aria-selected":i,"aria-disabled":n,onClick:p,className:d,style:l,children:[B(ee,{zIndex:10}),u]})},Rn=()=>B("li",{children:B(ge,{className:"divider"})}),_o=({children:e,className:o="",...t})=>B("li",{tabIndex:-1,className:"menu-label",children:B(R,{...t,variant:"small",className:`menu-group-label ${o}`,children:e})}),Pn=({children:e,label:o,className:t="",style:r={},contentClassName:a="",contentStyle:n={},...i})=>{let s=h({"menu-group":!0,[t]:!!t});return he("li",{tabIndex:-1,...i,className:s,style:r,children:[o&&B(_o,{children:o}),B("ul",{className:`menu-group-content ${a}`,role:"listbox",style:n,children:e})]})};Y.Option=wn;Y.Divider=Rn;Y.GroupLabel=_o;Y.Group=Pn;import{jsx as Q,jsxs as be}from"react/jsx-runtime";var Qo=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,showValueText:n=!1,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:m=!1,placeholder:d="",autoComplete:p="off",isDirty:u=!1,isTouched:g=!1,invalid:v=!1,error:f,...b})=>{let{open:y,isSupported:T}=On(),[C,x]=Xo(o),P=Wo(()=>crypto.randomUUID(),[]),k=Mn(null),[O,A]=Xo(!1),{handlers:$,isFocus:z}=I({onChange:L=>x(L.target.value),onBlur:L=>{F(),r&&r(L)},onFocus:L=>{F(),a&&a(L)}}),w=Wo(()=>{let L=kn(o===""?"#000000":o);return L.isLight()||L.alpha()<.5?"#000000":"#FFFFFF"},[o]),S=async()=>{let{sRGBHex:L}=await y();t(L)};En(()=>{x(o)},[o]);let F=Sn(()=>{C.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(C):x(o)},[C,t,o]),_=h({"input-color-box":!0,[i]:!!i});return be(H,{id:P,error:f,isFocus:z,...b,children:[be("section",{className:"input-color",onClick:L=>{L.stopPropagation(),A(!0)},ref:k,children:[Q("section",{className:_,style:{borderColor:w,background:o,color:o,...s}}),n?Q("input",{id:P,name:e,value:C,placeholder:d,readOnly:c,autoFocus:l,disabled:m,autoComplete:p,className:"color-input",...$}):null]}),be(U,{id:"input-color",isOpen:O,onClose:()=>A(!1),position:"bottom right",offset:5,backdrop:"transparent",containerRef:k,className:"input-color-selector",children:[Q(In,{id:P,color:o,onChange:t}),be("section",{className:"color-input-container",children:[T()?Q(Ln,{onClick:()=>{S()}}):Q("span",{}),Q(Nn,{className:"color-input",id:P,name:e,color:o,placeholder:"Type a color",prefixed:!0,alpha:!0,onChange:t}),Q("span",{})]})]})]})},An=({rules:e,...o})=>Q(E,{Component:Qo,defaultValue:"#147EFB",inputProps:o,rules:e});Qo.Controller=An;import{useCallback as Fn,useEffect as Hn,useMemo as Zo,useState as zn}from"react";import{FaMagnifyingGlass as $n,FaRegTrashCan as Ko}from"react-icons/fa6";import{IoIosWarning as Bn}from"react-icons/io";import{PiFilePdfFill as Gn,PiFilePngFill as Un}from"react-icons/pi";import{createElement as tf}from"react";import{createElement as Dn}from"react";var le=({tag:e="section",children:o,className:t,style:r,flow:a,columnSize:n,rowSize:i,column:s,row:l,pc:c,pi:m,ps:d,jc:p,ji:u,js:g,ac:v,ai:f,as:b,gtc:y,gtr:T,gta:C,gt:x,gap:P,...k})=>Dn(e,{className:t,...k,style:{...r,...a?{gridAutoFlow:a}:{},...n?{gridAutoColumns:n}:{},...i?{gridAutoRows:i}:{},...s?{gridColumn:s}:{},...l?{gridRow:l}:{},...c?{placeContent:c}:{},...m?{placeItems:m}:{},...d?{placeSelf:d}:{},...p?{justifyContent:p}:{},...u?{justifyItems:u}:{},...g?{justifySelf:g}:{},...v?{alignContent:v}:{},...f?{alignItems:f}:{},...b?{alignSelf:b}:{},...y?{gridTemplateColumns:y}:{},...T?{gridTemplateRows:T}:{},...C?{gridTemplateAreas:C}:{},...x?{gridTemplate:x}:{},...P?{gap:P}:{},display:"grid"}},o);import{Fragment as Yn,jsx as D,jsxs as j}from"react/jsx-runtime";var Jo=({name:e,value:o={},setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:m="Click to upload or drag and drop",autoComplete:d="off",accept:p,multiple:u=!1,limitSize:g=5e6,errorTimeout:v=3e3,label:f})=>{let[b,y]=zn(null),T=Zo(()=>crypto.randomUUID(),[]),{handlers:C}=I({onBlur:r,onFocus:a,onChange:w=>{let{files:S}=w.target;S&&x(S)}});Hn(()=>{let w=null;return b!==null&&(w=setTimeout(()=>{y(null)},v)),()=>{w!==null&&clearTimeout(w)}},[b,v]);let x=w=>{let S=u?{...o}:{},F=u?w.length:1;for(let _=0;_<F;_++){let L=w.item(_);L&&(L.size<g?S[L.name]=L:y(`File '${L.name}' size is larger than ${q(g)}`))}t(S)},P=w=>{w.preventDefault(),w.stopPropagation(),w.dataTransfer.files&&w.dataTransfer.files.length&&x(w.dataTransfer.files)},k=Fn(w=>({"image/png":Un,"application/pdf":Gn})[w]??Bn,[]),O=w=>{let S={...o};delete S[w.name],t(S)},A=()=>{t({})},$=Zo(()=>Object.values(o).reduce((w,{size:S})=>w+S,0),[o]),z=(w,S)=>{let F=k(w.type);return j("section",{className:"input-file-card",children:[D("section",{className:"file-card--image",children:D(F,{})}),j(le,{children:[D(R,{variant:"label",noPadding:!0,nowrap:!0,children:w.name}),D(R,{noPadding:!0,variant:"small",children:q(w.size)})]}),D("section",{className:"file-card--delete",onClick:()=>O(w),children:D(Ko,{})})]},S)};return j("section",{className:"input-file-container",children:[!!f&&D(R,{variant:"label-form",htmlFor:T,noPadding:!0,children:f}),j("section",{className:"input-file--box",onDrop:P,children:[D("section",{className:"input-file--box--icon",children:D($n,{})}),j(le,{children:[D(R,{variant:"label-form",htmlFor:T,noPadding:!0,weight:"bold",children:m}),j(R,{variant:"small",noPadding:!0,children:["Max size (",q(g),")"]})]}),D("input",{id:T,type:"file",name:e,value:"",placeholder:m,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:n,style:i,accept:p,multiple:u,title:"",...C})]}),b!==null&&D(R,{variant:"small",noPadding:!0,className:"error",children:b}),Object.keys(o).length>0&&j(Yn,{children:[u&&j("span",{className:"total-info",children:[j(R,{variant:"small",noPadding:!0,children:[Object.keys(o).length," files - ",q($)]}),D("span",{className:"total-info--delete",onClick:A,children:D(Ko,{})})]}),D("section",{className:"input-file--files",children:D("section",{className:"input-file--files--content",children:Object.values(o).map(z)})})]})]})},Vn=({rules:e,...o})=>D(E,{Component:Jo,defaultValue:{},inputProps:o,rules:e});Jo.Controller=Vn;import{useEffect as jn,useMemo as qo,useState as _n}from"react";import{jsx as Ge}from"react/jsx-runtime";var et={comma:/(?!^-)[^0-9,]/g,dot:/(?!^-)[^0-9.]/g},ot=(e,o=".")=>{let t=o==="."?et.dot:et.comma,r=e.replace(t,"").replace(",",".");return r||""},ve=(e,o)=>!e||Number.isNaN(e)?o(0):o(e),tt=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,pattern:n,className:i="",style:s={},autoFocus:l=!1,readOnly:c=!1,disabled:m=!1,placeholder:d="",autoComplete:p="off",isDirty:u=!1,isTouched:g=!1,invalid:v=!1,error:f,min:b,max:y,decimalSeparator:T,format:C={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...x})=>{let P=qo(()=>crypto.randomUUID(),[]),k=qo(()=>{if(typeof C=="function")return C;let{locales:w,...S}=C;return Intl.NumberFormat(w,S).format},[C]),[O,A]=_n(ve(o,k)),{handlers:$,isFocus:z}=I({onChange:w=>{let S=ot(w.target.value,T);S.endsWith(".")?A(w.target.value):(A(ve(Number(S),k)),t(Number(S)))},onBlur:w=>{let S=ot(w.target.value,T);A(ve(Number(S),k)),t(Number(S)),r&&r(w)},onFocus:a});return jn(()=>{let w=ve(o,k);O!==w&&A(w)},[k,O,o]),Ge(H,{id:P,error:f,isFocus:z,...x,children:Ge("input",{id:P,type:"text",name:e,className:i,style:s,value:O,pattern:n,autoFocus:l,autoComplete:p,placeholder:d,disabled:m,readOnly:c,min:b,max:y,...$})})},Wn=({rules:e,...o})=>Ge(E,{Component:tt,defaultValue:0,inputProps:o,rules:e});tt.Controller=Wn;import{useMemo as Xn}from"react";import{jsx as ye,jsxs as rt}from"react/jsx-runtime";var nt=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,autoComplete:m="off",radioValue:d,label:p,color:u="primary",size:g="regular"})=>{let v=Xn(()=>crypto.randomUUID(),[]),{handlers:f}=I({onChange:T=>t(T.target.value),onBlur:r,onFocus:a}),b=h({"radio-container":!0,[n]:!!n,[`color-${u}`]:!!u}),y=h({radio:!0,"is-checked":d===o,[`size-${g}`]:!!g});return rt("section",{className:b,style:i,children:[rt("section",{className:y,children:[ye("section",{className:"radio-fill"}),ye("input",{id:v,type:"radio",name:e,className:`radio-input ${n}`,style:i,value:d,checked:d===o,autoFocus:s,autoComplete:m,disabled:c||l,...f})]}),p?ye(R,{variant:"label-form",htmlFor:v,className:"radio-label",children:p}):null]})},Qn=({rules:e,...o})=>ye(E,{Component:nt,defaultValue:"",inputProps:o,rules:e});nt.Controller=Qn;import{createContext as ea,useCallback as mt,useContext as oa,useMemo as Ce,useRef as ut,useState as ta}from"react";import{ImCross as ra}from"react-icons/im";import{PiCaretDown as na}from"react-icons/pi";import{useEffect as Zn}from"react";import{Fragment as Kn,jsx as Ue,jsxs as at}from"react/jsx-runtime";var it=({isLoading:e=!1,hasNextPage:o=!1,loadMore:t,customLoadMoreElement:r,emptyMessage:a,children:n})=>{let{ref:i,inView:s}=co(),l=Se(e,100);Zn(()=>{o&&s&&!l&&t()},[o,l,t,s]);let c=Array.isArray(n)?n.length>0:!!n;return at(Kn,{children:[n,at("section",{className:"infinity-scroll",children:[!!a&&!c&&!l&&Ue("p",{className:"empty-message",children:a}),(o||l)&&(r?r(i):Ue("section",{ref:i,className:"loading",children:l&&Ue("span",{className:"loading--icon",children:":D"})}))]})]})};import{useCallback as Ve,useMemo as st}from"react";import{jsx as lt}from"react/jsx-runtime";var ct=({children:e,value:o})=>{let{multiselect:t,isEqualComparator:r,maxOptions:a,selectedValue:n,setValue:i,setIsOpen:s}=dt(),l=Ve((u,g)=>["number","string"].includes(typeof u)?u===g:!!r&&r(u,g),[r]),c=Ve(u=>{if(u)if(t){if(a&&Array.isArray(n)&&n.length>=a)return;i([...n,o])}else i(o),s(!1);else t?i(n.filter(g=>!l(g,o))):(i(null),s(!1))},[t,a,n,i,o,s,l]),m=st(()=>n===""||n===null?!1:Array.isArray(n)?["number","string"].includes(typeof o)?n.includes(o):n.some(u=>!!r&&r(o,u)):l(o,n),[l,r,n,o]),d=Ve(u=>{["Enter"," "].includes(u.key)&&(u.preventDefault(),c(!(m&&t)))},[c,m,t]),p=st(()=>typeof e=="string"?lt(R,{"data-value":o,variant:"label",nowrap:!0,children:e}):e,[e,o]);return lt(Y.Option,{label:p,onKeyDown:d,asCheckbox:t,selected:m,onClick:u=>c(t?u:!0)})};import{useCallback as je,useEffect as _e,useRef as Ye,useState as We}from"react";import{jsx as xe,jsxs as qn}from"react/jsx-runtime";var Jn=({height:e,minHeight:o,containerRef:t,offset:r,windowOffset:a})=>{let[n,i]=We(void 0),s=je(()=>{let l=t.current?.getBoundingClientRect().bottom??0,c=window.innerHeight-l-a-r-5,m=window.innerHeight-a*3,d=c<o?m:c,p=Math.min(d,e),u=Math.max(p,o);i(`${Math.round(u)}px`)},[t,a,r,o,e]);return _e(()=>{s()},[s]),X(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=Ye(null),c=Ye(null),[m,d]=We(""),p=Ye(null),u=fe("(max-width: 480px)");M("keydown",C=>{if(["ArrowDown","ArrowUp"].includes(C.code)){C.preventDefault();let x=document.activeElement;if(x?.tagName==="LI")switch(C.code){case"ArrowDown":x?.nextSibling?.focus();break;case"ArrowUp":x?.previousElementSibling?.focus();break}}});let g=je(C=>{let{value:x}=C.target;n&&n(x),d(x)},[n]);_e(()=>{p.current&&p.current.focus()},[]);let{h:v}=Jn({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[f,b]=We(!1),y=je(()=>{let C=Math.round(l.current?.getBoundingClientRect().height??0)+2,x=Math.round(c.current?.scrollHeight??0);b(C>=x)},[]);_e(y,[y]),X(l,y),X(c,y),M("resize",y);let T=h({"select-options-header":!0,[r]:!!r});return qn("section",{className:`select-options ${n?"with-search-query":""}`,style:u?{maxHeight:window.innerHeight-100,width:window.innerWidth-100}:{height:f?"auto":v,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[n&&xe("section",{className:T,style:a,children:xe("input",{name:"query",className:"input-search",value:o??m,onChange:g,placeholder:t,onClick:C=>C.stopPropagation(),ref:p,autoFocus:!0})}),xe("section",{className:"select-options-list-container",ref:l,children:xe("ul",{className:"select-options-list",ref:c,children:e})})]})};import{jsx as N,jsxs as ft}from"react/jsx-runtime";var gt=ea(null),dt=()=>{let e=oa(gt);if(!e)throw new Error("useSelectContext must be used within a Select component");return e},aa=({children:e})=>{let o=Ce(()=>typeof e=="string"?N(R,{noPadding:!0,variant:"label",nowrap:!0,children:e}):e,[e]);return N(Y.GroupLabel,{children:o})},ia=({value:e})=>N(R,{variant:"label",nowrap:!0,children:typeof e=="string"||typeof e=="number"?e:JSON.stringify(e)}),sa=({value:e,multiselect:o})=>o?N(R,{noPadding:!0,nowrap:!0,variant:"label",children:`${e.length} item${e.length===1?"":"s"} selected`}):e===null?null:N(R,{noPadding:!0,variant:"label",nowrap:!0,children:typeof e=="string"||typeof e=="number"?e:JSON.stringify(e)}),K=({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:m=ia,valueComponent:d=sa,maxOptions:p,children:u,name:g,value:v,setValue:f,onBlur:b,onFocus:y,className:T="",style:C={},showClearOption:x=!1,height:P,searchQueryStyle:k,searchQueryClassName:O,autoFocus:A=!1,readOnly:$=!1,disabled:z=!1,placeholder:w="",autoComplete:S="off",isDirty:F=!1,isTouched:_=!1,invalid:L=!1,error:we,...Ht})=>{let zt=ut(null),pe=fe("(max-width: 480px)"),qe=Ce(()=>crypto.randomUUID(),[]),Re=ut(null),[me,eo]=ta(!1),Pe=mt(W=>{eo(W&&!z)},[z]),$t=mt(W=>{W.stopPropagation(),f(c?[]:null)},[c,f]),ke=Ce(()=>c?v.length>0:!!v,[c,v]),Bt=Ce(()=>u||e.map((W,Gt)=>N(K.Option,{value:W,children:N(m,{value:W})},Gt)),[m,u,e]);return N(gt.Provider,{value:{selectedValue:v,setValue:f,multiselect:c??!1,isEqualComparator:o,maxOptions:p??null,setIsOpen:eo},children:N(H,{id:qe,error:we,isFocus:me,ref:Re,...Ht,children:ft("section",{id:g,style:C,onBlur:b,className:`select ${z?"disabled":""} ${T}`,children:[ft("section",{id:qe,className:`select-container ${ke&&x?"three-columns":""}`,onClick:()=>Pe(!0),children:[N("button",{type:"button",className:`input-button ${(Array.isArray(v)?v.length>0:v)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":me,onFocus:W=>{Pe(!0),y&&y(W)},children:ke?N(d,{...c?{value:v,multiselect:c}:{value:v}}):N(R,{variant:"label",noPadding:!0,nowrap:!0,children:w})}),ke&&x&&N("section",{className:"icon-close",onClick:$t,children:N(ra,{})}),N(na,{className:`select-caret-icon ${me&&"is-select-open"}`})]}),N(Y,{id:"form-select",isOpen:me,onClose:()=>Pe(!1),backdrop:pe?"blur":"transparent",opacity:pe?.8:.4,position:pe?"center":"bottom",offset:5,modalRef:zt,windowOffset:10,transitionDuration:200,containerRef:pe?void 0:Re,contentClassName:"select-menu-content",className:"select-options-menu",children:N(pt,{containerRef:Re,onSearchQuery:a,searchQueryValue:t,searchQueryPlaceholder:r,searchQueryClassName:O,searchQueryStyle:k,height:P,children:N(it,{isLoading:i,hasNextPage:s,loadMore:n,emptyMessage:l,children:Bt})})})]})})})},la=({rules:e,...o})=>N(E,{Component:K,defaultValue:[],inputProps:{...o,multiselect:!0},rules:e}),ca=({rules:e,...o})=>N(E,{Component:K,defaultValue:null,inputProps:{...o,multiselect:!1},rules:e}),da=e=>{let{multiselect:o}=e;return o?N(la,{...e,multiselect:!0}):N(ca,{...e,multiselect:!1})};K.Controller=da;K.Option=ct;K.OptionLabel=aa;import{useMemo as pa}from"react";import{jsx as Te,jsxs as ua}from"react/jsx-runtime";var ht=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,min:n,max:i,step:s,onlySlider:l=!1,className:c="",style:m={},autoFocus:d=!1,readOnly:p=!1,disabled:u=!1,placeholder:g="",autoComplete:v="off",isDirty:f=!1,isTouched:b=!1,invalid:y=!1,error:T,...C})=>{let x=pa(()=>crypto.randomUUID(),[]),P=$=>{r&&r($);let z=parseInt(`${o}`);n!==void 0&&z<n&&t(n),i!==void 0&&z>i&&t(i),t(z)},{isFocus:k,handlers:O}=I({onBlur:P,onChange:$=>t(+$.target.value),onFocus:a}),A=h({"input-slider":!0,"is-focus":k});return Te(H,{id:x,error:T,isFocus:k,...C,children:ua("section",{className:A,children:[Te("input",{id:x,type:"range",name:e,className:`slider ${c}`,style:m,value:o,autoFocus:d,autoComplete:v,placeholder:g,disabled:u,readOnly:p,min:n,max:i,step:s,...O}),!l&&Te("input",{id:x,type:"number",name:e,className:`slider-number ${c}`,style:m,value:o,autoComplete:v,disabled:u,readOnly:p,min:n,max:i,step:s,...O})]})})},ma=({rules:e,...o})=>Te(E,{Component:ht,defaultValue:0,inputProps:o,rules:e});ht.Controller=ma;import{useMemo as fa}from"react";import{jsx as Xe}from"react/jsx-runtime";var bt=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,rows:n=4,resize:i="vertical",className:s="",style:l={},autoFocus:c=!1,readOnly:m=!1,disabled:d=!1,placeholder:p="",autoComplete:u="off",isDirty:g=!1,isTouched:v=!1,invalid:f=!1,error:b,...y})=>{let T=fa(()=>crypto.randomUUID(),[]),{handlers:C,isFocus:x}=I({onBlur:r,onChange:k=>t(k.target.value),onFocus:a}),P=h({textarea:!0,[s]:!!s});return Xe(H,{id:T,error:b,isFocus:x,...y,children:Xe("textarea",{id:T,name:e,className:P,style:{resize:i,...l},value:o,rows:n,...C,autoFocus:c,autoComplete:u,placeholder:p,disabled:d,readOnly:m})})},ga=({rules:e,...o})=>Xe(E,{Component:bt,defaultValue:"",inputProps:o,rules:e});bt.Controller=ga;import{useMemo as xa}from"react";import{useState as ya}from"react";import{cloneElement as ha}from"react";import{Fragment as ba,jsx as vt,jsxs as va}from"react/jsx-runtime";var ce=({position:e="top",children:o,content:t,offset:r=5,disabled:a=!1})=>{let{containerRef:n,openModal:i,closeModal:s,isOpen:l}=po(),c=h({tooltip:!0,[e]:!0});return M("mouseenter",()=>i(),n),M("mouseleave",()=>s(),n),a?o:va(ba,{children:[ha(o,{ref:n}),vt(U,{backdrop:"none",id:"tooltip",isOpen:l,containerRef:n,onClose:s,position:e,className:c,closeOnClickOutside:!1,offset:6+ +r,windowOffset:10,transitionDuration:100,closeAnimationClassName:"close-animation",children:vt("span",{className:"tooltip-content",children:t})})]})};import{jsx as yt}from"react/jsx-runtime";var Mg=({children:e,value:o,position:t,offset:r,tooltipText:a,tooltipCopiedText:n,copiedTextTimeout:i=500})=>{let[s,l]=ya(!1);return yt(ce,{content:s&&n?n:a,position:t,offset:r,children:yt("span",{onClick:()=>{l(!0),navigator.clipboard.writeText(o),setTimeout(()=>l(!1),i)},children:e})})};import{jsx as G,jsxs as Tt}from"react/jsx-runtime";var xt={small:1,regular:1.2,large:1.4},Ct={small:2,regular:2.5,large:3},wt=({name:e,value:o,setValue:t,onBlur:r,onFocus:a,className:n="",style:i={},autoFocus:s=!1,readOnly:l=!1,disabled:c=!1,placeholder:m="",autoComplete:d="off",label:p,leftLabel:u,rightLabel:g,width:v="regular",size:f="regular",dotHoverSize:b=1.3,padding:y=.25,leftIcon:T,rightIcon:C,internalLeftIcon:x,internalRightIcon:P,leftIconTooltip:k,rightIconTooltip:O,color:A})=>{let $=xa(()=>crypto.randomUUID(),[]),{handlers:z}=I({onChange:we=>t(we.target.checked),onBlur:r,onFocus:a}),w=h({"switch-container":!0,[n]:!!n,[`color-${A}`]:!!A}),S=h({switch:!0,"is-checked":o,"is-readonly":!c&&l}),F=xt[f]??xt.regular,_=(Ct[v]??Ct.regular)*F,L=Math.min(y,F);return Tt("section",{className:w,style:{...i,"--width":`${_}em`,"--dot-size":`${F}em`,"--dot-hover-size":`${F*Math.min(Math.max(b,1),2)}em`,"--padding":`${L}em`},children:[u?G(R,{variant:"label-form",className:"switch-label",htmlFor:$,children:u}):null,T!==void 0&&G(ce,{content:k,disabled:!k,offset:10,children:G(T,{size:`${F*.7}em`,className:"switch-icon",onClick:()=>t(!o)})}),Tt("section",{className:S,children:[x!==void 0&&G("span",{className:"switch-internal-left-icon",children:G(x,{size:`${F*.7}em`})}),P!==void 0&&G("span",{className:"switch-internal-right-icon",children:G(P,{size:`${F*.7}em`})}),G("span",{className:"switch-dot"}),G("input",{id:$,type:"checkbox",name:e,className:`switch-checkbox ${n}`,style:i,checked:o,autoFocus:s,autoComplete:d,placeholder:m,disabled:c||l,...z})]}),C!==void 0&&G(ce,{content:O,disabled:!O,offset:10,children:G(C,{size:`${F*.7}em`,className:"switch-icon",onClick:()=>t(!o)})}),p||g?G(R,{variant:"label-form",className:"switch-label",htmlFor:$,children:p||g}):null]})},Ca=({rules:e,...o})=>G(E,{Component:wt,defaultValue:!1,inputProps:o,rules:e});wt.Controller=Ca;import{jsx as Ta}from"react/jsx-runtime";var mh=({alt:e="",loading:o="eager",...t})=>Ta("img",{loading:o,alt:e,...t,width:"100%"});import{useMemo as It,useState as Ia}from"react";import{useMemo as wa}from"react";import{MdArrowDownward as Ra,MdArrowUpward as Pa}from"react-icons/md";import{jsx as te,jsxs as Rt}from"react/jsx-runtime";var Pt=({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,m=h({"sort-on-click":!!c}),d=c?()=>n(c):void 0,p=wa(()=>c?te("span",{className:"sort-icon",children:!!i&&i===c&&(s==="asc"?te(Pa,{}):te(Ra,{}))}):null,[c,i,s]);return l?null:Rt("th",{style:{width:r},className:m,onClick:d,children:[Rt(le,{flow:"column",gap:"0.5em",jc:"space-between",ai:"center",children:[t?te(t,{}):null,te(R,{variant:"label",noPadding:!0,children:e}),p]}),te(ee,{color:"var(--color-primary-700)"})]})};import{jsx as Qe}from"react/jsx-runtime";var ka=(e,{field:o,render:t,Component:r},a)=>{if(o&&e[o])return Qe(R,{noPadding:!0,nowrap:!0,children:e[o]});if(t)return t(e,a);if(r)return Qe(r,{data:e,rowKey:a})},kt=(e,o,t)=>o.map((r,a)=>r.hidden?null:Qe("td",{children:ka(e,r,t)},a)),St=(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 Sa,useState as Ea}from"react";var Et=()=>{let[[e,o],t]=Ea([null,null]),r=Sa(a=>{t(([n,i])=>a!==n?[a,"asc"]:i==="asc"?[a,"desc"]:[null,null])},[]);return{sortBy:e,order:o,toggleSortField:r}};import{jsx as Ma}from"react/jsx-runtime";var Mt=({data:e,columns:o,isSelected:t=!1,selectable:r=!1,rowKey:a})=>{let n=h({"row-selected":r&&t});return Ma("tr",{className:n,children:kt(e,o,a)})};import{jsx as J,jsxs as Na}from"react/jsx-runtime";var Yh=({columns:e,data:o,width:t,selectable:r=!1,rowId:a,className:n="",tableClassName:i=""})=>{let[s,l]=Ia({}),c=h({"smart-table":!0,[i]:!!i,"layout-fixed":t==="content","layout-scrollable":t==="scroll"}),m=h({"smart-table-container":!0,[n]:!!n}),{sortBy:d,order:p,toggleSortField:u}=Et(),g=It(()=>{let f=[...e];return r&&(f=[{header:`${Object.values(s).length}`,render:(b,y)=>J(oe,{name:`selected-${y}`,value:`${y}`in s,setValue:T=>{l(C=>{let x={...C};return T?x[`${y}`]=b:delete x[`${y}`],x})}})},...f]),f},[e,r,s]),v=It(()=>St(o,d,p),[o,d,p]);return J("section",{className:m,children:Na("table",{className:c,children:[J("thead",{children:J("tr",{children:g.map((f,b)=>J(Pt,{toggleSortField:u,sortField:d,orderField:p,...f},b))})}),J("tbody",{children:v.map(f=>J(Mt,{rowKey:f[a],data:f,columns:g,isSelected:`${f[a]}`in s,selectable:r},f[a]))})]})})};import{createContext as Aa,useContext as Dt,useEffect as Da,useState as Fa}from"react";import{useEffect as La,useRef as Nt,useState as Lt}from"react";import{jsx as Ot,jsxs as Oa}from"react/jsx-runtime";var Ze={top:0,left:0,width:0,height:0};var At=({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 m=Nt(null),d=Nt(null),[p,u]=Lt(!1),[g,v]=Lt(Ze),f=h({"tab-list":!0,[`variant-${o}`]:!!o,[`size-${s}`]:!!s,[`radius-${t}`]:!!t,[`color-${a}`]:!!a,"vertical-direction":r==="vertical",[l]:!!l});return La(()=>{let b=d.current?.getBoundingClientRect()??Ze,y=m.current?.getBoundingClientRect()??Ze,T=b.width,C=o==="line"?2:b.height,x=b.left-y.left,P=o==="line"?b.top+b.height-y.top:b.top-y.top;v({left:x,top:P,width:T,height:C}),p||setTimeout(()=>{u(!0)},100)},[p,o,i]),Oa("section",{className:f,ref:m,style:c,children:[!!o&&Ot("span",{className:`tabs-selector ${p?"active":""}`,style:g}),e.map(({id:b,label:y})=>Ot(de.Tab,{id:b,ref:b===i?d:void 0,children:y},b)),n]})};import{jsx as Je}from"react/jsx-runtime";var Ke=Aa(null),Ft=e=>{let o=Dt(Ke);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)]},Ha=()=>{let e=Dt(Ke);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]=Fa(o);return Da(()=>{t&&t(r)},[r,t]),Je(Ke.Provider,{value:{openTab:r,changeOpenTab:n=>a(n)},children:e})},za=({id:e,children:o,className:t="",style:r={},onClick:a,ref:n})=>{let[i,s]=Ft(e),l=h({tab:!0,[t]:!!t,"is-open":i});return Je("span",{className:l,style:r,onClick:m=>{s(),a&&a(m)},ref:n,children:o})},$a=({id:e,children:o})=>{let[t]=Ft(e);return t?o:null},Ba=({children:e,...o})=>{let{openTab:t}=Ha();return Je(At,{...o,openTab:t,children:e})};de.Tab=za;de.TabPanel=$a;de.TabList=Ba;import{jsx as Ua}from"react/jsx-runtime";var Ga=(n=>(n.NONE="none",n.SMALL="small",n.MEDIUM="medium",n.LARGE="large",n.FULL="full",n))(Ga||{}),vb=({children:e,rounded:o="medium",selected:t=!1,noWrap:r=!1,ref:a})=>{let n=h({tag:!0,[`rounded-${o}`]:!!o,"is-selected":t,"no-wrap":r});return Ua("span",{className:n,ref:a,children:e})};export{ac as Accordion,id as AccordionItem,ie as ActionModal,Zm as AsideModal,Bo as Backdrop,Eo as Button,oe as Checkbox,Mg as ClickToCopy,su as ConfirmationModal,$d as Cursor,Do as DatePicker,H as Field,Oo as FieldOrientation,Lo as FieldVariant,vc as FlipCard,Ic as HoverCard,mh as Image,it as InfinityScroll,Fo as Input,Qo as InputColor,Jo as InputFile,tt as InputNumber,zo as InputPassword,ge as Line,xr as LineOrientation,Cr as LineStyle,Y as Menu,U as Modal,an as ModalBackdrop,$o as Portal,nt as Radio,ee as Ripple,K as Select,To as SlideCard,ht as Slider,Yh as SmartTable,wt as Switch,de as Tabs,vb as Tag,Ga as TagRounded,bt as Textarea,ce as Tooltip,R as Typography,Co as useAccordionItem};
|
|
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};
|
package/dist/layouts.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var x=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var H=(t,e)=>{for(var i in e)x(t,i,{get:e[i],enumerable:!0})},L=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of E(e))!G.call(t,r)&&r!==i&&x(t,r,{get:()=>e[r],enumerable:!(a=F(e,r))||a.enumerable});return t};var M=t=>L(x({},"__esModule",{value:!0}),t);var D={};H(D,{Flex:()=>h,Grid:()=>N});module.exports=M(D);var w=require("react"),h=({tag:t="section",children:e,className:i,style:a,direction:r,wrap:o,basis:s,grow:S,shrink:l,flow:p,pc:c,pi:n,ps:C,jc:R,ji:f,js:m,ac:P,ai:g,as:d,gap:u})=>(0,w.createElement)(t,{className:i,style:{...a,...r?{flexDirection:r}:{},...o?{flexWrap:o}:{},...s?{flexBasis:s}:{},...S?{flexGrow:S}:{},...l?{flexShrink:l}:{},...p?{flexFlow:p}:{},...c?{placeContent:c}:{},...n?{placeItems:n}:{},...C?{placeSelf:C}:{},...R?{justifyContent:R}:{},...f?{justifyItems:f}:{},...m?{justifySelf:m}:{},...P?{alignContent:P}:{},...g?{alignItems:g}:{},...d?{alignSelf:d}:{},...u?{gap:u}:{},display:"flex"}},e);var I=require("react"),N=({tag:t="section",children:e,className:i,style:a,flow:r,columnSize:o,rowSize:s,column:S,row:l,pc:p,pi:c,ps:n,jc:C,ji:R,js:f,ac:m,ai:P,as:g,gtc:d,gtr:u,gta:y,gt:T,gap:j,...A})=>(0,I.createElement)(t,{className:i,...A,style:{...a,...r?{gridAutoFlow:r}:{},...o?{gridAutoColumns:o}:{},...s?{gridAutoRows:s}:{},...S?{gridColumn:S}:{},...l?{gridRow:l}:{},...p?{placeContent:p}:{},...c?{placeItems:c}:{},...n?{placeSelf:n}:{},...C?{justifyContent:C}:{},...R?{justifyItems:R}:{},...f?{justifySelf:f}:{},...m?{alignContent:m}:{},...P?{alignItems:P}:{},...g?{alignSelf:g}:{},...d?{gridTemplateColumns:d}:{},...u?{gridTemplateRows:u}:{},...y?{gridTemplateAreas:y}:{},...T?{gridTemplate:T}:{},...j?{gap:j}:{},display:"grid"}},e);0&&(module.exports={Flex,Grid});
|
package/dist/layouts.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{createElement as
|
|
2
|
+
import{createElement as w}from"react";var E=({tag:P="section",children:g,className:d,style:u,direction:e,wrap:t,basis:r,grow:i,shrink:a,flow:o,pc:s,pi:S,ps:l,jc:p,ji:c,js:n,ac:C,ai:R,as:f,gap:m})=>w(P,{className:d,style:{...u,...e?{flexDirection:e}:{},...t?{flexWrap:t}:{},...r?{flexBasis:r}:{},...i?{flexGrow:i}:{},...a?{flexShrink:a}:{},...o?{flexFlow:o}:{},...s?{placeContent:s}:{},...S?{placeItems:S}:{},...l?{placeSelf:l}:{},...p?{justifyContent:p}:{},...c?{justifyItems:c}:{},...n?{justifySelf:n}:{},...C?{alignContent:C}:{},...R?{alignItems:R}:{},...f?{alignSelf:f}:{},...m?{gap:m}:{},display:"flex"}},g);import{createElement as I}from"react";var N=({tag:P="section",children:g,className:d,style:u,flow:e,columnSize:t,rowSize:r,column:i,row:a,pc:o,pi:s,ps:S,jc:l,ji:p,js:c,ac:n,ai:C,as:R,gtc:f,gtr:m,gta:x,gt:y,gap:T,...j})=>I(P,{className:d,...j,style:{...u,...e?{gridAutoFlow:e}:{},...t?{gridAutoColumns:t}:{},...r?{gridAutoRows:r}:{},...i?{gridColumn:i}:{},...a?{gridRow:a}:{},...o?{placeContent:o}:{},...s?{placeItems:s}:{},...S?{placeSelf:S}:{},...l?{justifyContent:l}:{},...p?{justifyItems:p}:{},...c?{justifySelf:c}:{},...n?{alignContent:n}:{},...C?{alignItems:C}:{},...R?{alignSelf:R}:{},...f?{gridTemplateColumns:f}:{},...m?{gridTemplateRows:m}:{},...x?{gridTemplateAreas:x}:{},...y?{gridTemplate:y}:{},...T?{gap:T}:{},display:"grid"}},g);export{E as Flex,N as Grid};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polpo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": null,
|
|
14
14
|
"./components.css": "./dist/components.css",
|
|
15
|
-
"./layouts.css": "./dist/layouts.css",
|
|
16
15
|
"./components": {
|
|
17
16
|
"types": {
|
|
18
17
|
"import": "./dist/components.d.ts",
|
package/dist/layouts.css
DELETED