polpo 0.1.18 → 0.1.19
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 +2 -1
- package/dist/components.d.ts +2 -1
- package/dist/components.js +1 -1
- package/package.json +3 -11
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 Co=(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 Te=require("react");function N(e,o,t,r){let a=(0,Te.useRef)(o);(0,Te.useEffect)(()=>{a.current=o},[o]),(0,Te.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 Ce=(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"),Tt=(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 Ct=(e={})=>{let[o,t]=(0,Ye.useState)(!1),r=(0,Ye.useRef)(null);return Tt(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=Co(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:b}=m,{clientWidth:f,clientHeight:v}=b,{top:y,left:C}=d.getBoundingClientRect(),T=(u-C)/f,x=(g-y)/v,P=T*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}),b=(0,Ke.useMemo)(()=>Oo[e]??Oo.body,[e]);return(0,Ke.createElement)(n??b,{...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}),b=h({"accordion-toggle-icon":!0,isOpen:d,[s?.toggleIcon??""]:!!s?.toggleIcon}),f=h({"accordion-body":!0,[s?.body??""]:!!s?.body}),v=Le(e,d),y=Le(o,d),C=Le(a,d),T=Le(n,d)??(0,J.jsxs)("section",{className:g,children:[(0,J.jsx)(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:v}),(0,J.jsx)(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:y})]}),x=Le(i,d)??(0,J.jsx)(r,{className:b}),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:[C,T,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,b=(d-u.top)*100/u.height;console.log({y:b,pageY:d,rectTop:u.top,rectHeight:u.height});let 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=`${b}%`,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,className:s="",...l})=>(0,qe.jsxs)("button",{...l,className:gt("button",o,t,r&&`radius-${r}`,a&&`size-${a}`,n&&"no-wrap",i&&"icon",s),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 b=(0,Vt.useMemo)(()=>crypto.randomUUID(),[]),{handlers:f}=O({onChange:C=>t(C.target.checked),onBlur:r,onFocus:a}),v=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:v,style:i,onClick:C=>C.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:b,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:b,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=b=>f=>{f.stopPropagation();let v=document.getElementById(e);v?.focus(),v?.click(),b&&b()};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:b=!1,error:f,...v})=>{let y=(0,Wt.useMemo)(()=>crypto.randomUUID(),[]),{isFocus:C,handlers:T}=O({onBlur:r,onChange:x=>t(x.target.value),onFocus:a});return(0,to.jsx)(H,{id:y,error:f,isFocus:C,...v,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,...T})})},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:b=!1,invalid:f=!1,error:v,min:y,max:C,...T})=>{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:v,isFocus:S,...T,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:C,...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:b,...f})=>{let v=(0,Uo.useMemo)(()=>crypto.randomUUID(),[]),[y,C]=Lt(["password","text"]),{isFocus:T,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:v,error:b,isFocus:T,...f,rightIcon:P,onClickRightIcon:()=>C(),children:(0,no.jsx)("input",{id:v,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=Co(require("color"),1),X=require("react"),lo=require("react-colorful"),ir=require("react-icons/fa6"),sr=Co(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:b,zIndex:f=1e3,...v})=>{let y=(0,io.useMemo)(()=>crypto.randomUUID(),[]),C=(0,io.useRef)(null),{modalState:T,isVisible:x}=kt({transitionDuration:d,isOpen:t});Pt({modalRef:c??C,containerRef:b,offset:u,windowOffset:p,position:g,isOpen:x}),lt(c??C,()=>{t&&m&&r()});let P=h({"modal-content":!0,[a]:!!a,[`animation-${s}`]:!!s&&s!=="none",[l]:T==="CLOSING"||T==="CLOSED"});return x?(0,ke.jsxs)(Yo,{id:`modal-${e}-${y}`,children:[(0,ke.jsx)(jo,{...v,modalState:T,zIndex:f}),(0,ke.jsx)("section",{className:"modal",ref:c??C,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),b=(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?b: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})}),Tn=({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=Tn;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:b=!1,error:f,...v})=>{let{open:y,isSupported:C}=(0,sr.default)(),[T,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)(()=>{T.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(T):x(o)},[T,t,o]),se=h({"input-color-box":!0,[i]:!!i});return(0,Y.jsxs)(H,{id:P,error:f,isFocus:U,...v,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:T,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:[C()?(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",{})]})]})]})},Cn=({rules:e,...o})=>(0,Y.jsx)(I,{Component:_o,defaultValue:"#147EFB",inputProps:o,rules:e});_o.Controller=Cn;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:b,ai:f,as:v,gtc:y,gtr:C,gta:T,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}:{},...b?{alignContent:b}:{},...f?{alignItems:f}:{},...v?{alignSelf:v}:{},...y?{gridTemplateColumns:y}:{},...C?{gridTemplateRows:C}:{},...T?{gridTemplateAreas:T}:{},...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:b=3e3,label:f})=>{let[v,y]=(0,ne.useState)(null),C=(0,ne.useMemo)(()=>crypto.randomUUID(),[]),{handlers:T}=O({onBlur:r,onFocus:a,onChange:w=>{let{files:E}=w.target;E&&x(E)}});(0,ne.useEffect)(()=>{let w=null;return v!==null&&(w=setTimeout(()=>{y(null)},b)),()=>{w!==null&&clearTimeout(w)}},[v,b]);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 ${Ce(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:Ce(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:C,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:C,noPadding:!0,weight:"bold",children:m}),(0,k.jsxs)(R,{variant:"small",noPadding:!0,children:["Max size (",Ce(g),")"]})]}),(0,k.jsx)("input",{id:C,type:"file",name:e,value:"",placeholder:m,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:n,style:i,accept:p,multiple:u,title:"",...T})]}),v!==null&&(0,k.jsx)(R,{variant:"small",noPadding:!0,className:"error",children:v}),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 - ",Ce(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:b=!1,error:f,min:v,max:y,decimalSeparator:C,format:T={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...x})=>{let P=(0,he.useMemo)(()=>crypto.randomUUID(),[]),S=(0,he.useMemo)(()=>{if(typeof T=="function")return T;let{locales:w,...E}=T;return Intl.NumberFormat(w,E).format},[T]),[D,F]=(0,he.useState)(po(o,S)),{handlers:V,isFocus:U}=O({onChange:w=>{let E=pr(w.target.value,C);E.endsWith(".")?F(w.target.value):(F(po(Number(E),S)),t(Number(E)))},onBlur:w=>{let E=pr(w.target.value,C);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:v,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 b=(0,mr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:f}=O({onChange:C=>t(C.target.value),onBlur:r,onFocus:a}),v=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:v,style:i,children:[(0,de.jsxs)("section",{className:y,children:[(0,de.jsx)("section",{className:"radio-fill"}),(0,de.jsx)("input",{id:b,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:b,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}=Ct(),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",T=>{if(["ArrowDown","ArrowUp"].includes(T.code)){T.preventDefault();let x=document.activeElement;if(x?.tagName==="LI")switch(T.code){case"ArrowDown":x?.nextSibling?.focus();break;case"ArrowUp":x?.previousElementSibling?.focus();break}}});let g=(0,G.useCallback)(T=>{let{value:x}=T.target;n&&n(x),d(x)},[n]);(0,G.useEffect)(()=>{p.current&&p.current.focus()},[]);let{h:b}=Sn({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[f,v]=(0,G.useState)(!1),y=(0,G.useCallback)(()=>{let T=Math.round(l.current?.getBoundingClientRect().height??0)+2,x=Math.round(c.current?.scrollHeight??0);v(T>=x)},[]);(0,G.useEffect)(y,[y]),ce(l,y),ce(c,y),N("resize",y);let C=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":b,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[n&&(0,ve.jsx)("section",{className:C,style:a,children:(0,ve.jsx)("input",{name:"query",className:"input-search",value:o??m,onChange:g,placeholder:t,onClick:T=>T.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:b,setValue:f,onBlur:v,onFocus:y,className:C="",style:T={},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]),To=(0,z.useMemo)(()=>c?b.length>0:!!b,[c,b]),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:b,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:T,onBlur:v,className:`select ${U?"disabled":""} ${C}`,children:[(0,M.jsxs)("section",{id:nt,className:`select-container ${To&&x?"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":$e,onFocus:le=>{xo(!0),y&&y(le)},children:To?(0,M.jsx)(d,{...c?{value:b,multiselect:c}:{value:b}}):(0,M.jsx)(R,{variant:"label",noPadding:!0,nowrap:!0,children:w})}),To&&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:b="off",isDirty:f=!1,isTouched:v=!1,invalid:y=!1,error:C,...T})=>{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:C,isFocus:S,...T,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:b,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:b,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 Tr=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:b=!1,invalid:f=!1,error:v,...y})=>{let C=(0,Tr.useMemo)(()=>crypto.randomUUID(),[]),{handlers:T,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:C,error:v,isFocus:x,...y,children:(0,uo.jsx)("textarea",{id:C,name:e,className:P,style:{resize:i,...l},value:o,rows:n,...T,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 Cr=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,Cr.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:b="regular",size:f="regular",dotHoverSize:v=1.3,padding:y=.25,leftIcon:C,rightIcon:T,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[b]??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(v,1),2)}em`,"--padding":`${A}em`},children:[u?(0,$.jsx)(R,{variant:"label-form",className:"switch-label",htmlFor:V,children:u}):null,C!==void 0&&(0,$.jsx)(Me,{content:S,disabled:!S,offset:10,children:(0,$.jsx)(C,{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})]}),T!==void 0&&(0,$.jsx)(Me,{content:D,disabled:!D,offset:10,children:(0,$.jsx)(T,{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:(v,y)=>(0,oe.jsx)(ge,{name:`selected-${y}`,value:`${y}`in s,setValue:C=>{l(T=>{let x={...T};return C?x[`${y}`]=v:delete x[`${y}`],x})}})},...f]),f},[e,r,s]),b=(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,v)=>(0,oe.jsx)(Mr,{toggleSortField:u,sortField:d,orderField:p,...f},v))})}),(0,oe.jsx)("tbody",{children:b.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,b]=(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 v=d.current?.getBoundingClientRect()??tt,y=m.current?.getBoundingClientRect()??tt,C=v.width,T=o==="line"?2:v.height,x=v.left-y.left,P=o==="line"?v.top+v.height-y.top:v.top-y.top;b({left:x,top:P,width:C,height:T}),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:v,label:y})=>(0,He.jsx)(Ie.Tab,{id:v,ref:v===i?d:void 0,children:y},v)),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 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});
|
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{.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
|
+
.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)}}
|
|
2
2
|
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
package/dist/components.d.cts
CHANGED
|
@@ -89,8 +89,9 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
89
89
|
ref?: React.Ref<HTMLButtonElement>;
|
|
90
90
|
forIcon?: boolean;
|
|
91
91
|
isLoading?: boolean;
|
|
92
|
+
fullWidth?: boolean;
|
|
92
93
|
}
|
|
93
|
-
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
94
|
+
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, fullWidth, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
94
95
|
|
|
95
96
|
type SlideCardProps = {
|
|
96
97
|
children: React__default.ReactNode;
|
package/dist/components.d.ts
CHANGED
|
@@ -89,8 +89,9 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
89
89
|
ref?: React.Ref<HTMLButtonElement>;
|
|
90
90
|
forIcon?: boolean;
|
|
91
91
|
isLoading?: boolean;
|
|
92
|
+
fullWidth?: boolean;
|
|
92
93
|
}
|
|
93
|
-
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
94
|
+
declare const Button: ({ children, color, variant, radius, size, noWrap, forIcon, fullWidth, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
94
95
|
|
|
95
96
|
type SlideCardProps = {
|
|
96
97
|
children: React__default.ReactNode;
|
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 Cr}from"react/jsx-runtime";var xr=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(xr||{}),Tr=(r=>(r.SOLID="solid",r.DOTTED="dotted",r.DASHED="dashed",r))(Tr||{}),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 Cr("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),To=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 Co=({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:b}=m,{clientWidth:f,clientHeight:v}=b,{top:y,left:C}=d.getBoundingClientRect(),T=(u-C)/f,x=(g-y)/v,P=T*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}),b=Nr(()=>Ne[e]??Ne.body,[e]);return Ir(n??b,{...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]=To(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}),b=h({"accordion-toggle-icon":!0,isOpen:d,[s?.toggleIcon??""]:!!s?.toggleIcon}),f=h({"accordion-body":!0,[s?.body??""]:!!s?.body}),v=re(e,d),y=re(o,d),C=re(a,d),T=re(n,d)??Oe("section",{className:g,children:[ne(R,{className:s?.title,variant:"body",noPadding:!0,weight:"bold",children:v}),ne(R,{className:s?.subtitle,variant:"label",noPadding:!0,weight:"light",children:y})]}),x=re(i,d)??ne(r,{className:b}),P=h({"accordion-item":!0,[l]:!!l});return Oe("section",{className:P,style:c,children:[Oe("section",{className:u,onClick:p,children:[C,T,x]}),ne(Co,{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,b=(d-u.top)*100/u.height;console.log({y:b,pageY:d,rectTop:u.top,rectHeight:u.height});let 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=`${b}%`,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,className:s="",...l})=>zr("button",{...l,className:no("button",o,t,r&&`radius-${r}`,a&&`size-${a}`,n&&"no-wrap",i&&"icon",s),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 b=Yr(()=>crypto.randomUUID(),[]),{handlers:f}=I({onChange:C=>t(C.target.checked),onBlur:r,onFocus:a}),v=h({"checkbox-container":!0,[n]:!!n,[`color-${u}`]:!!u}),y=h({checkbox:!0,"is-checked":o,[`size-${g}`]:!!g});return No("section",{className:v,style:i,onClick:C=>C.stopPropagation(),children:[No("section",{className:y,children:[ae("section",{className:"checkbox-fill",children:ae(d,{size:"1.3em",className:"checkbox-icon"})}),ae("input",{id:b,type:"checkbox",name:e,className:"checkbox-input",checked:o,autoFocus:s,autoComplete:m,disabled:c||l,...f})]}),p?ae(R,{variant:"label-form",htmlFor:b,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=b=>f=>{f.stopPropagation();let v=document.getElementById(e);v?.focus(),v?.click(),b&&b()};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:b=!1,error:f,...v})=>{let y=Xr(()=>crypto.randomUUID(),[]),{isFocus:C,handlers:T}=I({onBlur:r,onChange:x=>t(x.target.value),onFocus:a});return Fe(H,{id:y,error:f,isFocus:C,...v,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,...T})})},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:b=!1,invalid:f=!1,error:v,min:y,max:C,...T})=>{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:v,isFocus:k,...T,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:C,...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:b,...f})=>{let v=Ho(()=>crypto.randomUUID(),[]),[y,C]=yo(["password","text"]),{isFocus:T,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:v,error:b,isFocus:T,...f,rightIcon:P,onClickRightIcon:()=>C(),children:ze("input",{id:v,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:b,zIndex:f=1e3,...v})=>{let y=ln(()=>crypto.randomUUID(),[]),C=cn(null),{modalState:T,isVisible:x}=ho({transitionDuration:d,isOpen:t});fo({modalRef:c??C,containerRef:b,offset:u,windowOffset:p,position:g,isOpen:x}),oo(c??C,()=>{t&&m&&r()});let P=h({"modal-content":!0,[a]:!!a,[`animation-${s}`]:!!s&&s!=="none",[l]:T==="CLOSING"||T==="CLOSED"});return x?dn($o,{id:`modal-${e}-${y}`,children:[$e(Bo,{...v,modalState:T,zIndex:f}),$e("section",{className:"modal",ref:c??C,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),b=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?b: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 Tn,useMemo as Cn}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=Tn(g=>{g.stopPropagation(),n||c(!i)},[n,c,i]),u=Cn(()=>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:b=!1,error:f,...v})=>{let{open:y,isSupported:C}=On(),[T,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(()=>{T.match(/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i)?t(T):x(o)},[T,t,o]),_=h({"input-color-box":!0,[i]:!!i});return be(H,{id:P,error:f,isFocus:z,...v,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:T,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:[C()?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:b,ai:f,as:v,gtc:y,gtr:C,gta:T,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}:{},...b?{alignContent:b}:{},...f?{alignItems:f}:{},...v?{alignSelf:v}:{},...y?{gridTemplateColumns:y}:{},...C?{gridTemplateRows:C}:{},...T?{gridTemplateAreas:T}:{},...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:b=3e3,label:f})=>{let[v,y]=zn(null),C=Zo(()=>crypto.randomUUID(),[]),{handlers:T}=I({onBlur:r,onFocus:a,onChange:w=>{let{files:S}=w.target;S&&x(S)}});Hn(()=>{let w=null;return v!==null&&(w=setTimeout(()=>{y(null)},b)),()=>{w!==null&&clearTimeout(w)}},[v,b]);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:C,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:C,noPadding:!0,weight:"bold",children:m}),j(R,{variant:"small",noPadding:!0,children:["Max size (",q(g),")"]})]}),D("input",{id:C,type:"file",name:e,value:"",placeholder:m,readOnly:l,autoFocus:s,disabled:c,autoComplete:d,className:n,style:i,accept:p,multiple:u,title:"",...T})]}),v!==null&&D(R,{variant:"small",noPadding:!0,className:"error",children:v}),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:b=!1,error:f,min:v,max:y,decimalSeparator:C,format:T={locales:"en-US",style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2},...x})=>{let P=qo(()=>crypto.randomUUID(),[]),k=qo(()=>{if(typeof T=="function")return T;let{locales:w,...S}=T;return Intl.NumberFormat(w,S).format},[T]),[O,A]=_n(ve(o,k)),{handlers:$,isFocus:z}=I({onChange:w=>{let S=ot(w.target.value,C);S.endsWith(".")?A(w.target.value):(A(ve(Number(S),k)),t(Number(S)))},onBlur:w=>{let S=ot(w.target.value,C);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:v,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 b=Xn(()=>crypto.randomUUID(),[]),{handlers:f}=I({onChange:C=>t(C.target.value),onBlur:r,onFocus:a}),v=h({"radio-container":!0,[n]:!!n,[`color-${u}`]:!!u}),y=h({radio:!0,"is-checked":d===o,[`size-${g}`]:!!g});return rt("section",{className:v,style:i,children:[rt("section",{className:y,children:[ye("section",{className:"radio-fill"}),ye("input",{id:b,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:b,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 Te,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",T=>{if(["ArrowDown","ArrowUp"].includes(T.code)){T.preventDefault();let x=document.activeElement;if(x?.tagName==="LI")switch(T.code){case"ArrowDown":x?.nextSibling?.focus();break;case"ArrowUp":x?.previousElementSibling?.focus();break}}});let g=je(T=>{let{value:x}=T.target;n&&n(x),d(x)},[n]);_e(()=>{p.current&&p.current.focus()},[]);let{h:b}=Jn({height:s,minHeight:150,containerRef:i,offset:5,windowOffset:10}),[f,v]=We(!1),y=je(()=>{let T=Math.round(l.current?.getBoundingClientRect().height??0)+2,x=Math.round(c.current?.scrollHeight??0);v(T>=x)},[]);_e(y,[y]),X(l,y),X(c,y),M("resize",y);let C=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":b,maxHeight:s,width:i.current?.offsetWidth??"auto"},children:[n&&xe("section",{className:C,style:a,children:xe("input",{name:"query",className:"input-search",value:o??m,onChange:g,placeholder:t,onClick:T=>T.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=Te(()=>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:b,setValue:f,onBlur:v,onFocus:y,className:C="",style:T={},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=Te(()=>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=Te(()=>c?b.length>0:!!b,[c,b]),Bt=Te(()=>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:b,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:T,onBlur:v,className:`select ${z?"disabled":""} ${C}`,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(b)?b.length>0:b)?"":"placeholder"}`,"aria-haspopup":"listbox","aria-expanded":me,onFocus:W=>{Pe(!0),y&&y(W)},children:ke?N(d,{...c?{value:b,multiselect:c}:{value:b}}):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 Ce,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:b="off",isDirty:f=!1,isTouched:v=!1,invalid:y=!1,error:C,...T})=>{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 Ce(H,{id:x,error:C,isFocus:k,...T,children:ua("section",{className:A,children:[Ce("input",{id:x,type:"range",name:e,className:`slider ${c}`,style:m,value:o,autoFocus:d,autoComplete:b,placeholder:g,disabled:u,readOnly:p,min:n,max:i,step:s,...O}),!l&&Ce("input",{id:x,type:"number",name:e,className:`slider-number ${c}`,style:m,value:o,autoComplete:b,disabled:u,readOnly:p,min:n,max:i,step:s,...O})]})})},ma=({rules:e,...o})=>Ce(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:b=!1,invalid:f=!1,error:v,...y})=>{let C=fa(()=>crypto.randomUUID(),[]),{handlers:T,isFocus:x}=I({onBlur:r,onChange:k=>t(k.target.value),onFocus:a}),P=h({textarea:!0,[s]:!!s});return Xe(H,{id:C,error:v,isFocus:x,...y,children:Xe("textarea",{id:C,name:e,className:P,style:{resize:i,...l},value:o,rows:n,...T,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 Ct}from"react/jsx-runtime";var xt={small:1,regular:1.2,large:1.4},Tt={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:b="regular",size:f="regular",dotHoverSize:v=1.3,padding:y=.25,leftIcon:C,rightIcon:T,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,_=(Tt[b]??Tt.regular)*F,L=Math.min(y,F);return Ct("section",{className:w,style:{...i,"--width":`${_}em`,"--dot-size":`${F}em`,"--dot-hover-size":`${F*Math.min(Math.max(v,1),2)}em`,"--padding":`${L}em`},children:[u?G(R,{variant:"label-form",className:"switch-label",htmlFor:$,children:u}):null,C!==void 0&&G(ce,{content:k,disabled:!k,offset:10,children:G(C,{size:`${F*.7}em`,className:"switch-icon",onClick:()=>t(!o)})}),Ct("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})]}),T!==void 0&&G(ce,{content:O,disabled:!O,offset:10,children:G(T,{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]})},Ta=({rules:e,...o})=>G(E,{Component:wt,defaultValue:!1,inputProps:o,rules:e});wt.Controller=Ta;import{jsx as Ca}from"react/jsx-runtime";var mh=({alt:e="",loading:o="eager",...t})=>Ca("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:(v,y)=>J(oe,{name:`selected-${y}`,value:`${y}`in s,setValue:C=>{l(T=>{let x={...T};return C?x[`${y}`]=v:delete x[`${y}`],x})}})},...f]),f},[e,r,s]),b=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,v)=>J(Pt,{toggleSortField:u,sortField:d,orderField:p,...f},v))})}),J("tbody",{children:b.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,b]=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 v=d.current?.getBoundingClientRect()??Ze,y=m.current?.getBoundingClientRect()??Ze,C=v.width,T=o==="line"?2:v.height,x=v.left-y.left,P=o==="line"?v.top+v.height-y.top:v.top-y.top;b({left:x,top:P,width:C,height:T}),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:v,label:y})=>Ot(de.Tab,{id:v,ref:v===i?d:void 0,children:y},v)),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,Tr as LineStyle,Y as Menu,U as Modal,an as ModalBackdrop,$o as Portal,nt as Radio,ee as Ripple,K as Select,Co 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,To as useAccordionItem};
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polpo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -11,16 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": null,
|
|
14
|
-
"./components.css":
|
|
15
|
-
|
|
16
|
-
"import": "./dist/components.css",
|
|
17
|
-
"default": "./dist/components.css"
|
|
18
|
-
},
|
|
19
|
-
"./layouts.css": {
|
|
20
|
-
"development": "./dist/layouts.css",
|
|
21
|
-
"import": "./dist/layouts.css",
|
|
22
|
-
"default": "./dist/layouts.css"
|
|
23
|
-
},
|
|
14
|
+
"./components.css": "./dist/components.css",
|
|
15
|
+
"./layouts.css": "./dist/layouts.css",
|
|
24
16
|
"./components": {
|
|
25
17
|
"types": {
|
|
26
18
|
"import": "./dist/components.d.ts",
|