naria-ui 0.3.32 → 0.3.34

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.
@@ -19,7 +19,7 @@
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,O,B,M,B),Ye[B+O]=!0)}if(B=null,S!==void 0&&(v(S),B=""+S),J(L)&&(v(L.key),B=""+L.key),"key"in L){S={};for(var re in L)re!=="key"&&(S[re]=L[re])}else S=L;return B&&R(S,typeof w=="function"?w.displayName||w.name||"Unknown":w),f(w,B,S,$(),c,ye)}function l(w){X(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===k&&(w._payload.status==="fulfilled"?X(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function X(w){return typeof w=="object"&&w!==null&&w.$$typeof===G}var D=N,G=Symbol.for("react.transitional.element"),me=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_e=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),ce=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),H=Symbol.for("react.client.reference"),Se=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,ie=Array.isArray,Q=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function(w){return w()}};var $e,pe={},xe=D.react_stack_bottom_frame.bind(D,A)(),je=Q(y(A)),Ye={};Tt.Fragment=C,Tt.jsx=function(w,L,S){var O=1e4>Se.recentlyCreatedOwnerStacks++;return E(w,L,S,!1,O?Error("react-stack-top-frame"):xe,O?Q(y(w)):je)},Tt.jsxs=function(w,L,S){var O=1e4>Se.recentlyCreatedOwnerStacks++;return E(w,L,S,!0,O?Error("react-stack-top-frame"):xe,O?Q(y(w)):je)}})()),Tt}var fn;function fo(){return fn||(fn=1,process.env.NODE_ENV==="production"?zt.exports=co():zt.exports=ho()),zt.exports}var Y=fo();const wt=({classNames:d={root:"",color:""}})=>Y.jsxs("svg",{className:`naria-loading ${d.root}`,"data-prop":"root",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Y.jsx("path",{d:"M32 3C35.8083 3 39.5794 3.75011 43.0978 5.20749C46.6163 6.66488 49.8132 8.80101 52.5061 11.4939C55.199 14.1868 57.3351 17.3837 58.7925 20.9022C60.2499 24.4206 61 28.1917 61 32C61 35.8083 60.2499 39.5794 58.7925 43.0978C57.3351 46.6163 55.199 49.8132 52.5061 52.5061C49.8132 55.199 46.6163 57.3351 43.0978 58.7925C39.5794 60.2499 35.8083 61 32 61C28.1917 61 24.4206 60.2499 20.9022 58.7925C17.3837 57.3351 14.1868 55.199 11.4939 52.5061C8.801 49.8132 6.66487 46.6163 5.20749 43.0978C3.7501 39.5794 3 35.8083 3 32C3 28.1917 3.75011 24.4206 5.2075 20.9022C6.66489 17.3837 8.80101 14.1868 11.4939 11.4939C14.1868 8.80099 17.3838 6.66487 20.9022 5.20749C24.4206 3.7501 28.1917 3 32 3L32 3Z",stroke:"currentColor",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round"}),Y.jsx("path",{d:"M32 3C36.5778 3 41.0906 4.08374 45.1692 6.16256C49.2477 8.24138 52.7762 11.2562 55.466 14.9605C58.1558 18.6647 59.9304 22.9531 60.6448 27.4748C61.3591 31.9965 60.9928 36.6232 59.5759 40.9762",stroke:"currentColor",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round",className:d.color,"data-prop":"color"})]}),mo=({type:d="button",classNames:x={root:"",loading:{root:"",color:""}},value:v,icon:y=void 0,isLoading:$=!1,isDisabled:A=!1,...J})=>Y.jsxs("button",{type:d,disabled:A,...J,className:`naria-button ${A?"naria-button--disabled":""} ${x==null?void 0:x.root}`,"data-class-prop":"root",children:[$?Y.jsx(wt,{classNames:{root:x.loading.root,color:x.loading.color},"data-class-prop":"root","data-class-prop-color":"color"}):y,v]}),mn=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M209.5 369c-9.4 9.4-24.6 9.4-33.9 0L15.5 209c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l143 143 143-143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-160 160z"})),kn=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M7.5 105c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l151 151 151-151c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-151 151 151 151c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-151-151-151 151c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l151-151-151-151z"})),yn=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M368 208a160 160 0 1 0 -320 0 160 160 0 1 0 320 0zM337.1 371.1C301.7 399.2 256.8 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208c0 48.8-16.8 93.7-44.9 129.1L505 471c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L337.1 371.1z"})),Sn=(d,x,v)=>{N.useEffect(()=>{function y($){x.current&&!x.current.contains($.target)&&(d!=null&&d.current)&&!(d!=null&&d.current.contains($.target))&&v()}return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[d,v])},gr=()=>{const[d,x]=N.useState(typeof window<"u"?window.innerWidth:0),v=()=>x(typeof window<"u"?window.innerWidth:0);return N.useEffect(()=>(window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)),[d]),d};let tt;const pr=d=>{let x;window.location.hash.includes("/")?x=`${window.location.pathname}${window.location.search}${window.location.hash.replace("/#"+d,"")}`:x=`${window.location.pathname}${window.location.search}${window.location.hash.replace("#"+d,"")}`,tt=`${window.location.origin}${window.location.pathname}${x}`,window.history.replaceState(null,"",x)},Mr=d=>{window.location.hash?window.location.hash=window.location.hash+"/#"+d:window.location.hash=d},Dr=d=>{const[x,v]=N.useState(!1);return N.useEffect(()=>{tt=window.location.href;const y=$=>{console.log("daasda0",window.location.href,tt,window.history),window.location.hash.includes(d)?window.location.hash.length===window.location.hash.indexOf(d)+d.length&&(window.location.href===tt?(console.log("daasda1",window.location.href,tt),window.history.replaceState(null,"",`${window.location.origin}${window.location.pathname}`),tt=`${window.location.origin}${window.location.pathname}`,v(!0)):(console.log("daasda2",window.location.href,tt),v(!1),tt=window.location.href)):v(!0)};return window.addEventListener("popstate",y),()=>{window.removeEventListener("popstate",y)}},[]),x},vr=d=>{let x="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",v="";for(let y=d;y>0;--y)v+=x[Math.round(Math.random()*(x.length-1))];return v},Yr=({children:d})=>lo.createPortal(d,document.body),yo=({options:d,label:x,hasError:v,title:y,value:$,api:A,selected:J,placeholder:R,disabled:ae=!1,pagination:f,optionFilterLabel:E,hasSearch:l=!1,backdrop:X="opaque",classNames:D={root:"",label:"",title:"",button:"",searchInput:"",listRoot:"",list:"",option:"",optionActive:"",mobileHeader:"",errorText:"",searchInputRoot:"",iconRoot:"",closeIcon:"",arrowIcon:"",searchIcon:"",backdrop:""},onSelectChange:G})=>{let me=!0;const C=gr(),_e=N.useRef(vr(5)),ge=Dr("#select-"+_e.current),[ue,ce]=N.useState(!1),[K,De]=N.useState({top:void 0,bottom:void 0,left:void 0,right:void 0,width:void 0,type:"fade-in-scale",position:""}),[q,V]=N.useState(!0),[k,F]=N.useState(void 0),[H,Se]=N.useState(void 0),[se,ie]=N.useState(""),[Q,$e]=N.useState({page:1,pageLabel:"page",size:20,sizeLabel:"size",isLoading:!1}),pe=N.useRef(void 0),xe=N.useRef(void 0),je=N.useRef(void 0),Ye=async()=>{if(pe!=null&&pe.current)try{const M=await fetch(pe==null?void 0:pe.current);if(!M.ok)throw new Error(`Response status: ${M.status}`);return await M.json()}catch(M){console.error(M)}};N.useEffect(()=>()=>{me=!1},[]),N.useEffect(()=>{if(A!=null&&A.length){if(pe.current=A,pe.current.includes((f==null?void 0:f.pageLabel)||"page")){const M=new URL(A);M.searchParams.set((f==null?void 0:f.pageLabel)||"page",((f==null?void 0:f.page)||Q.page).toString()),M.searchParams.set((f==null?void 0:f.sizeLabel)||"size",((f==null?void 0:f.size)||Q.size).toString()),pe.current=M.href}V(!0),Ye().then(M=>{me&&(V(!1),Se(M))})}},[A,f]),N.useEffect(()=>{if(Q.isLoading){if(pe.current.includes((f==null?void 0:f.pageLabel)||"page")){const M=new URL(pe.current);M.searchParams.set((f==null?void 0:f.pageLabel)||"page",Q.page.toString()),pe.current=M.href}Ye().then(M=>{me&&(V(!1),$e({...Q,isLoading:!1}),Se([...H,...M]))})}},[Q]),N.useEffect(()=>{var M;C<768?ue?(Mr("select-"+_e.current),document.body.style.overflow="hidden",(M=je.current)==null||M.focus()):(window.location.hash&&!document.referrer.includes("#")&&pr("select-"+_e.current),document.body.style.overflow="auto"):ue?setTimeout(()=>{w()},0):De({top:void 0,bottom:void 0,left:void 0,right:void 0,width:void 0,type:"fade-in-scale",position:""})},[ue]);const w=()=>{var M;if(je!=null&&je.current&&xe.current){const re=((M=document.documentElement)==null?void 0:M.getAttribute("dir"))==="rtl",ee=xe.current.getBoundingClientRect(),fe=je.current.getBoundingClientRect();window.innerHeight-fe.bottom>ee.height?De({top:fe.bottom+window.scrollY,bottom:void 0,left:re?void 0:fe.left,right:re?(window.innerWidth||document.documentElement.clientWidth)-fe.right:void 0,width:fe.width,type:K.type,position:"transform-origin-top-start"}):De({top:void 0,bottom:window.innerHeight-fe.top-window.scrollY,left:re?void 0:fe.left,right:re?(window.innerWidth||document.documentElement.clientWidth)-fe.right:void 0,width:fe.width,type:K.type,position:"transform-origin-bottom-start"})}};N.useEffect(()=>{J&&(d!=null&&d.length)?d!=null&&d.find(M=>M[x]===J)?F(d==null?void 0:d.find(M=>M[x]===J)):F(J):k!==void 0&&(F(void 0),ie(""))},[J]),N.useEffect(()=>(document.addEventListener("scroll",w,{capture:!0}),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w),document.removeEventListener("scroll",w,{capture:!0})}),[w]),N.useEffect(()=>{k&&l&&($!=null&&$.length&&(H!=null&&H.find(M=>M[x]===k[x]))?ie((H==null?void 0:H.find(M=>M[x]===k[x])[$])||""):ie(k))},[k]),N.useEffect(()=>{ge&&ce(!1)},[ge]),N.useEffect(()=>{d!=null&&d.length&&Se(d)},[d]);const L=()=>{l&&Se(d),ce(M=>!M)},S=()=>{l&&(Se(d),ie(typeof k=="string"?k:k?k[$]:"")),ce(!1)},O=M=>{l&&($!=null&&$.length?ie(M[$]):ie(M)),F(M),L(),G&&G(M)},c=M=>{if(!k)return"";if(x!=null&&x.length&&M[x]===k[x])return`naria-select__option--active ${D==null?void 0:D.optionActive}`;if(M===k)return`naria-select__option--active ${D==null?void 0:D.optionActive}`},ye=M=>{A!=null&&A.length&&(H!=null&&H.length)&&!Q.isLoading&&M.target.offsetHeight+M.target.scrollTop>=M.target.scrollHeight-100&&$e({page:Q.page+1,isLoading:!0})},B=M=>{var ee,fe,Qe;const re=(fe=(ee=M==null?void 0:M.target)==null?void 0:ee.value)!=null&&fe.length?d.filter(He=>{var Le,Fe;return typeof He=="object"?He[E!=null&&E.length?E:$].includes((Le=M==null?void 0:M.target)==null?void 0:Le.value):He.includes((Fe=M==null?void 0:M.target)==null?void 0:Fe.value)}):d;Se(re),ie((Qe=M==null?void 0:M.target)==null?void 0:Qe.value),ue||ce(!0)};return Sn(xe,je,S),Y.jsxs("div",{className:`naria-select ${ae?"naria-select--disabled":""} ${D==null?void 0:D.root}`,"data-class-prop":"root",children:[Y.jsxs("label",{className:`naria-select__label ${v&&"naria-select__label--error"} ${D==null?void 0:D.label}`,"data-class-prop":"label",children:[Y.jsx("span",{className:`naria-select__title ${D==null?void 0:D.title}`,"data-class-prop":"title",children:y}),l?Y.jsxs("div",{className:`naria-select__search-input-root ${D.searchInputRoot}`,"data-class-prop":"searchInputRoot",children:[Y.jsx("input",{ref:je,placeholder:R!=null&&R.length?R:"Select",className:`naria-select__search-input ${k?"naria-select__search-input--selected":""}
22
+ <%s key={someKey} {...props} />`,O,B,M,B),Ye[B+O]=!0)}if(B=null,S!==void 0&&(v(S),B=""+S),J(L)&&(v(L.key),B=""+L.key),"key"in L){S={};for(var re in L)re!=="key"&&(S[re]=L[re])}else S=L;return B&&R(S,typeof w=="function"?w.displayName||w.name||"Unknown":w),f(w,B,S,$(),c,ye)}function l(w){X(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===k&&(w._payload.status==="fulfilled"?X(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function X(w){return typeof w=="object"&&w!==null&&w.$$typeof===G}var D=N,G=Symbol.for("react.transitional.element"),me=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_e=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),ce=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),H=Symbol.for("react.client.reference"),Se=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,ie=Array.isArray,Q=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function(w){return w()}};var $e,pe={},xe=D.react_stack_bottom_frame.bind(D,A)(),je=Q(y(A)),Ye={};Tt.Fragment=C,Tt.jsx=function(w,L,S){var O=1e4>Se.recentlyCreatedOwnerStacks++;return E(w,L,S,!1,O?Error("react-stack-top-frame"):xe,O?Q(y(w)):je)},Tt.jsxs=function(w,L,S){var O=1e4>Se.recentlyCreatedOwnerStacks++;return E(w,L,S,!0,O?Error("react-stack-top-frame"):xe,O?Q(y(w)):je)}})()),Tt}var fn;function fo(){return fn||(fn=1,process.env.NODE_ENV==="production"?zt.exports=co():zt.exports=ho()),zt.exports}var Y=fo();const wt=({classNames:d={root:"",color:""}})=>Y.jsxs("svg",{className:`naria-loading ${d.root}`,"data-prop":"root",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Y.jsx("path",{d:"M32 3C35.8083 3 39.5794 3.75011 43.0978 5.20749C46.6163 6.66488 49.8132 8.80101 52.5061 11.4939C55.199 14.1868 57.3351 17.3837 58.7925 20.9022C60.2499 24.4206 61 28.1917 61 32C61 35.8083 60.2499 39.5794 58.7925 43.0978C57.3351 46.6163 55.199 49.8132 52.5061 52.5061C49.8132 55.199 46.6163 57.3351 43.0978 58.7925C39.5794 60.2499 35.8083 61 32 61C28.1917 61 24.4206 60.2499 20.9022 58.7925C17.3837 57.3351 14.1868 55.199 11.4939 52.5061C8.801 49.8132 6.66487 46.6163 5.20749 43.0978C3.7501 39.5794 3 35.8083 3 32C3 28.1917 3.75011 24.4206 5.2075 20.9022C6.66489 17.3837 8.80101 14.1868 11.4939 11.4939C14.1868 8.80099 17.3838 6.66487 20.9022 5.20749C24.4206 3.7501 28.1917 3 32 3L32 3Z",stroke:"currentColor",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round"}),Y.jsx("path",{d:"M32 3C36.5778 3 41.0906 4.08374 45.1692 6.16256C49.2477 8.24138 52.7762 11.2562 55.466 14.9605C58.1558 18.6647 59.9304 22.9531 60.6448 27.4748C61.3591 31.9965 60.9928 36.6232 59.5759 40.9762",stroke:"currentColor",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round",className:d.color,"data-prop":"color"})]}),mo=({type:d="button",classNames:x={root:"",loading:{root:"",color:""}},value:v,icon:y=void 0,isLoading:$=!1,isDisabled:A=!1,...J})=>Y.jsxs("button",{type:d,disabled:A,...J,className:`naria-button ${A?"naria-button--disabled":""} ${x==null?void 0:x.root}`,"data-class-prop":"root",children:[$?Y.jsx(wt,{classNames:{root:x.loading.root,color:x.loading.color},"data-class-prop":"root","data-class-prop-color":"color"}):y,v]}),mn=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M209.5 369c-9.4 9.4-24.6 9.4-33.9 0L15.5 209c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l143 143 143-143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-160 160z"})),kn=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M7.5 105c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l151 151 151-151c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-151 151 151 151c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-151-151-151 151c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l151-151-151-151z"})),yn=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M368 208a160 160 0 1 0 -320 0 160 160 0 1 0 320 0zM337.1 371.1C301.7 399.2 256.8 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208c0 48.8-16.8 93.7-44.9 129.1L505 471c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L337.1 371.1z"})),Sn=(d,x,v)=>{N.useEffect(()=>{function y($){x.current&&!x.current.contains($.target)&&(d!=null&&d.current)&&!(d!=null&&d.current.contains($.target))&&v()}return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[d,v])},gr=()=>{const[d,x]=N.useState(typeof window<"u"?window.innerWidth:0),v=()=>x(typeof window<"u"?window.innerWidth:0);return N.useEffect(()=>(window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)),[d]),d};let tt;const pr=d=>{let x;window.location.hash.includes("/")?x=`${window.location.pathname}${window.location.search}${window.location.hash.replace("/#"+d,"")}`:x=`${window.location.pathname}${window.location.search}${window.location.hash.replace("#"+d,"")}`,tt=`${window.location.origin}${x}`,console.log("daasda3",tt,x),window.history.replaceState(null,"",x)},Mr=d=>{window.location.hash?window.location.hash=window.location.hash+"/#"+d:window.location.hash=d},Dr=d=>{const[x,v]=N.useState(!1);return N.useEffect(()=>{tt=window.location.href;const y=$=>{window.location.hash.includes(d)?window.location.hash.length===window.location.hash.indexOf(d)+d.length&&(window.location.href===tt?(window.history.replaceState(null,"",`${window.location.origin}${window.location.pathname}`),tt=`${window.location.origin}${window.location.pathname}`,console.log("daasda1",tt),v(!0)):(v(!1),tt=`${window.location.origin}${window.location.pathname}`,console.log("daasda2",tt))):v(!0)};return window.addEventListener("popstate",y),()=>{window.removeEventListener("popstate",y)}},[]),x},vr=d=>{let x="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",v="";for(let y=d;y>0;--y)v+=x[Math.round(Math.random()*(x.length-1))];return v},Yr=({children:d})=>lo.createPortal(d,document.body),yo=({options:d,label:x,hasError:v,title:y,value:$,api:A,selected:J,placeholder:R,disabled:ae=!1,pagination:f,optionFilterLabel:E,hasSearch:l=!1,backdrop:X="opaque",classNames:D={root:"",label:"",title:"",button:"",searchInput:"",listRoot:"",list:"",option:"",optionActive:"",mobileHeader:"",errorText:"",searchInputRoot:"",iconRoot:"",closeIcon:"",arrowIcon:"",searchIcon:"",backdrop:""},onSelectChange:G})=>{let me=!0;const C=gr(),_e=N.useRef(vr(5)),ge=Dr("#select-"+_e.current),[ue,ce]=N.useState(!1),[K,De]=N.useState({top:void 0,bottom:void 0,left:void 0,right:void 0,width:void 0,type:"fade-in-scale",position:""}),[q,V]=N.useState(!0),[k,F]=N.useState(void 0),[H,Se]=N.useState(void 0),[se,ie]=N.useState(""),[Q,$e]=N.useState({page:1,pageLabel:"page",size:20,sizeLabel:"size",isLoading:!1}),pe=N.useRef(void 0),xe=N.useRef(void 0),je=N.useRef(void 0),Ye=async()=>{if(pe!=null&&pe.current)try{const M=await fetch(pe==null?void 0:pe.current);if(!M.ok)throw new Error(`Response status: ${M.status}`);return await M.json()}catch(M){console.error(M)}};N.useEffect(()=>()=>{me=!1},[]),N.useEffect(()=>{if(A!=null&&A.length){if(pe.current=A,pe.current.includes((f==null?void 0:f.pageLabel)||"page")){const M=new URL(A);M.searchParams.set((f==null?void 0:f.pageLabel)||"page",((f==null?void 0:f.page)||Q.page).toString()),M.searchParams.set((f==null?void 0:f.sizeLabel)||"size",((f==null?void 0:f.size)||Q.size).toString()),pe.current=M.href}V(!0),Ye().then(M=>{me&&(V(!1),Se(M))})}},[A,f]),N.useEffect(()=>{if(Q.isLoading){if(pe.current.includes((f==null?void 0:f.pageLabel)||"page")){const M=new URL(pe.current);M.searchParams.set((f==null?void 0:f.pageLabel)||"page",Q.page.toString()),pe.current=M.href}Ye().then(M=>{me&&(V(!1),$e({...Q,isLoading:!1}),Se([...H,...M]))})}},[Q]),N.useEffect(()=>{var M;C<768?ue?(Mr("select-"+_e.current),document.body.style.overflow="hidden",(M=je.current)==null||M.focus()):(window.location.hash&&!document.referrer.includes("#")&&pr("select-"+_e.current),document.body.style.overflow="auto"):ue?setTimeout(()=>{w()},0):De({top:void 0,bottom:void 0,left:void 0,right:void 0,width:void 0,type:"fade-in-scale",position:""})},[ue]);const w=()=>{var M;if(je!=null&&je.current&&xe.current){const re=((M=document.documentElement)==null?void 0:M.getAttribute("dir"))==="rtl",ee=xe.current.getBoundingClientRect(),fe=je.current.getBoundingClientRect();window.innerHeight-fe.bottom>ee.height?De({top:fe.bottom+window.scrollY,bottom:void 0,left:re?void 0:fe.left,right:re?(window.innerWidth||document.documentElement.clientWidth)-fe.right:void 0,width:fe.width,type:K.type,position:"transform-origin-top-start"}):De({top:void 0,bottom:window.innerHeight-fe.top-window.scrollY,left:re?void 0:fe.left,right:re?(window.innerWidth||document.documentElement.clientWidth)-fe.right:void 0,width:fe.width,type:K.type,position:"transform-origin-bottom-start"})}};N.useEffect(()=>{J&&(d!=null&&d.length)?d!=null&&d.find(M=>M[x]===J)?F(d==null?void 0:d.find(M=>M[x]===J)):F(J):k!==void 0&&(F(void 0),ie(""))},[J]),N.useEffect(()=>(document.addEventListener("scroll",w,{capture:!0}),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w),document.removeEventListener("scroll",w,{capture:!0})}),[w]),N.useEffect(()=>{k&&l&&($!=null&&$.length&&(H!=null&&H.find(M=>M[x]===k[x]))?ie((H==null?void 0:H.find(M=>M[x]===k[x])[$])||""):ie(k))},[k]),N.useEffect(()=>{ge&&ce(!1)},[ge]),N.useEffect(()=>{d!=null&&d.length&&Se(d)},[d]);const L=()=>{l&&Se(d),ce(M=>!M)},S=()=>{l&&(Se(d),ie(typeof k=="string"?k:k?k[$]:"")),ce(!1)},O=M=>{l&&($!=null&&$.length?ie(M[$]):ie(M)),F(M),L(),G&&G(M)},c=M=>{if(!k)return"";if(x!=null&&x.length&&M[x]===k[x])return`naria-select__option--active ${D==null?void 0:D.optionActive}`;if(M===k)return`naria-select__option--active ${D==null?void 0:D.optionActive}`},ye=M=>{A!=null&&A.length&&(H!=null&&H.length)&&!Q.isLoading&&M.target.offsetHeight+M.target.scrollTop>=M.target.scrollHeight-100&&$e({page:Q.page+1,isLoading:!0})},B=M=>{var ee,fe,Qe;const re=(fe=(ee=M==null?void 0:M.target)==null?void 0:ee.value)!=null&&fe.length?d.filter(He=>{var Le,Fe;return typeof He=="object"?He[E!=null&&E.length?E:$].includes((Le=M==null?void 0:M.target)==null?void 0:Le.value):He.includes((Fe=M==null?void 0:M.target)==null?void 0:Fe.value)}):d;Se(re),ie((Qe=M==null?void 0:M.target)==null?void 0:Qe.value),ue||ce(!0)};return Sn(xe,je,S),Y.jsxs("div",{className:`naria-select ${ae?"naria-select--disabled":""} ${D==null?void 0:D.root}`,"data-class-prop":"root",children:[Y.jsxs("label",{className:`naria-select__label ${v&&"naria-select__label--error"} ${D==null?void 0:D.label}`,"data-class-prop":"label",children:[Y.jsx("span",{className:`naria-select__title ${D==null?void 0:D.title}`,"data-class-prop":"title",children:y}),l?Y.jsxs("div",{className:`naria-select__search-input-root ${D.searchInputRoot}`,"data-class-prop":"searchInputRoot",children:[Y.jsx("input",{ref:je,placeholder:R!=null&&R.length?R:"Select",className:`naria-select__search-input ${k?"naria-select__search-input--selected":""}
23
23
  ${v&&"naria-select__search-input--error"} ${D==null?void 0:D.searchInput}`,value:se,disabled:ae,type:"text",onClick:L,onChange:B,"data-class-prop":"searchInput"}),Y.jsx("div",{className:`naria-select__icon-root ${D==null?void 0:D.iconRoot}`,"data-class-prop":"iconRoot",children:ue?Y.jsx("div",{className:`naria-select__search-icon ${D==null?void 0:D.searchIcon}`,"data-class-prop":"searchIcon",children:Y.jsx(yn,{})}):Y.jsx("div",{className:`naria-select__arrow-icon ${D==null?void 0:D.arrowIcon} ${ue?"naria-select__arrow-icon--rotate-180":""}`,"data-class-prop":"arrowIcon",children:Y.jsx(mn,{})})})]}):Y.jsxs("button",{type:"button",ref:je,disabled:ae,className:`naria-select__handler ${k?"select__handler--selected":""}
24
24
  ${v&&"select__handler--error"} ${D==null?void 0:D.button}`,"data-class-prop":"button",onClick:L,children:[k?$!=null&&$.length?k[$]:k:R!=null&&R.length?R:"Select",Y.jsx("div",{className:`naria-select__icon-root ${D==null?void 0:D.iconRoot}`,"data-class-prop":"iconRoot",children:Y.jsx("div",{className:`naria-select__arrow-icon ${D==null?void 0:D.arrowIcon} ${ue?"naria-select__arrow-icon--rotate-180":""}`,"data-class-prop":"arrowIcon",children:Y.jsx(mn,{})})})]})]}),ue?Y.jsx(Yr,{children:C<768?Y.jsx("div",{className:`naria-select__list-root naria-select__list-root--mobile ${D==null?void 0:D.listRoot} ${X!=="transparent"?`backdrop--${X}`:""}`,"data-class-prop":"listRoot",children:Y.jsx("div",{className:`naria-select__list naria-select__list--mobile ${D==null?void 0:D.list}`,"data-class-prop":"list",ref:xe,onScroll:ye,children:A&&q?Y.jsx("div",{className:"naria-select__loading-root",children:Y.jsx("div",{className:"naria-select__loading",children:Y.jsx(wt,{})})}):Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{className:`naria-select__header--mobile ${D==null?void 0:D.mobileHeader}`,"data-class-prop":"mobileHeader",children:[l?Y.jsxs("div",{className:`naria-select__search-input-root ${D.searchInputRoot}`,"data-class-prop":"searchInputRoot",children:[Y.jsx("input",{ref:je,placeholder:R!=null&&R.length?R:"Select",className:`naria-select__search-input ${k?"naria-select__search-input--selected":""}
25
25
  ${D==null?void 0:D.searchInput} ${v&&"naria-select__search-input--error"}`,"data-class-prop":"input",value:se,disabled:ae,type:"text",onChange:B}),Y.jsx("div",{className:`naria-select__icon-root ${D==null?void 0:D.iconRoot}`,"data-class-prop":"iconRoot",children:Y.jsx("div",{className:"naria-select__search-icon","data-class-prop":"searchIcon",children:Y.jsx(yn,{})})})]}):void 0,Y.jsx("button",{className:`naria-select__close-icon ${D==null?void 0:D.closeIcon}`,onClick:S,disabled:ae,"data-class-prop":"closeIcon",children:Y.jsx(kn,{})})]}),H!=null&&H.length?Y.jsx(Y.Fragment,{children:H==null?void 0:H.map((M,re)=>Y.jsx("button",{type:"button",onClick:()=>O(M),disabled:ae,className:`naria-select__option ${D==null?void 0:D.option} ${c(M)}`,"data-class-prop":"option","data-class-prop-active":"optionActive",children:$!=null&&$.length?M[$]:M},re.toString()))}):Y.jsx("div",{children:"No Data"}),Q.isLoading?Y.jsx("div",{className:"naria-select__loading-more-root",children:Y.jsx("div",{className:"naria-select__loading-more",children:Y.jsx(wt,{})})}):void 0]})})}):Y.jsx("div",{className:`naria-select__list-root ${D==null?void 0:D.listRoot}`,"data-class-prop":"listRoot",children:Y.jsx("div",{className:`naria-select__list naria-select__list--desktop ${D==null?void 0:D.list} ${K.type} ${K.position}`,"data-class-prop":"list",style:{bottom:K.bottom!==void 0?K.bottom:"unset",top:K.top!==void 0?K.top:"unset",left:K.left!==void 0?K.left:"unset",right:K.right!==void 0?K.right:"unset",maxWidth:K.width!==void 0?K.width:"unset"},ref:xe,onScroll:ye,children:A&&q?Y.jsx("div",{className:"naria-select__loading-root",children:Y.jsx("div",{className:"naria-select__loading",children:Y.jsx(wt,{})})}):Y.jsxs(Y.Fragment,{children:[H!=null&&H.length?Y.jsx(Y.Fragment,{children:H==null?void 0:H.map((M,re)=>Y.jsx("button",{type:"button",onClick:()=>O(M),disabled:ae,className:`naria-select__option ${D==null?void 0:D.option} ${c(M)}`,"data-class-prop":"option","data-class-prop-active":"optionActive",children:$!=null&&$.length?M[$]:M},re.toString()))}):Y.jsx("div",{children:"No Data"}),Q.isLoading?Y.jsx("div",{className:"naria-select__loading-more-root",children:Y.jsx("div",{className:"naria-select__loading-more",children:Y.jsx(wt,{})})}):void 0]})})})}):void 0,v&&Y.jsx("p",{className:`naria-select--error-text ${D==null?void 0:D.errorText}`,"data-class-prop":"errorText",children:v})]})},_o=({type:d="text",placeholder:x,classNames:v={root:"",label:"",title:"",input:"",errorText:""},title:y,hasError:$,register:A,name:J,isDisabled:R=!1,autocomplete:ae=!1,...f})=>Y.jsxs("div",{className:`naria-input ${v.root}`,"data-class-prop":"root",children:[Y.jsxs("label",{htmlFor:J,className:`${v.label} ${$&&"naria-input__label--error"}`,"data-class-prop":"label",children:[Y.jsx("span",{className:v==null?void 0:v.title,"data-class-prop":"title",children:y}),Y.jsx("input",{disabled:R,autoComplete:ae?"on":"off",id:J,...A,...f,type:d,name:J,className:`${v.input} ${$&&"naria-input__input--error"}`,placeholder:x,"data-class-prop":"input"})]}),$&&Y.jsx("p",{className:`naria-input--error-text ${v==null?void 0:v.errorText}`,"data-class-prop":"errorText",children:$})]}),wo=({classNames:d={root:"",backdrop:"",content:""},backdrop:x="opaque",placement:v="bottom-start",isOpen:y=!1,onOpenChange:$,children:A,...J})=>{const[R,ae]=N.Children.toArray(A),[f,E]=N.useState({type:"fade-in-scale",position:""}),[l,X]=N.useState({top:void 0,bottom:void 0,left:void 0,right:void 0}),D=gr(),G=N.useRef(void 0),me=N.useRef(void 0),C=N.useRef(vr(5)),_e=Dr("#popover-"+C.current),ge=()=>{$&&$(!1)},ue=()=>{$&&$(!y)};Sn(G,me,ge),N.useEffect(()=>{var De;D<768?y?(document.body.style.overflow="hidden",(De=me.current)==null||De.focus(),setTimeout(()=>{Mr("popover-"+C.current)},50)):(window.location.hash&&!document.referrer.includes("#")&&pr("popover-"+C.current),document.body.style.overflow="auto"):y?setTimeout(()=>{ce()},0):X({top:void 0,bottom:void 0,left:void 0,right:void 0})},[y]),N.useEffect(()=>{_e&&ge()},[_e]),N.useEffect(()=>(document.addEventListener("scroll",ge,{capture:!0}),()=>{document.removeEventListener("scroll",ge,{capture:!0})}),[]);const ce=()=>{var De;if(me!=null&&me.current&&G.current){const q=((De=document.documentElement)==null?void 0:De.getAttribute("dir"))==="rtl",V=G.current.getBoundingClientRect(),k=me.current.getBoundingClientRect();switch(!0){case v==="bottom-start":{window.innerHeight-k.bottom>V.height?(E({type:f.type,position:"transform-origin-top-start"}),X({top:k.bottom+window.scrollY,bottom:void 0,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0})):(E({type:f.type,position:"transform-origin-bottom-start"}),X({top:void 0,bottom:window.innerHeight-k.top-window.scrollY,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0}));break}case v==="bottom-end":{(window.innerHeight||document.documentElement.clientHeight)-k.bottom>V.height?(E({type:f.type,position:"transform-origin-top-end"}),X({top:k.bottom+window.scrollY,bottom:void 0,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0})):(E({type:f.type,position:"transform-origin-bottom-end"}),X({top:void 0,bottom:window.innerHeight-k.top-window.scrollY,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0}));break}case v==="bottom":{let F={y:"bottom",x:"center"},H={top:void 0,bottom:window.innerHeight-k.top-window.scrollY,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0};(window.innerHeight||document.documentElement.clientHeight)-k.bottom>V.height&&(F={...F,y:"top"},H={...H,top:k.bottom+window.scrollY,bottom:void 0}),q?(window.innerWidth||document.documentElement.clientWidth)-k.right>V.width/2-k.width/2?(H={...H,left:void 0,right:(window.innerWidth||document.documentElement.clientWidth)-k.right-(V.width/2-k.width/2)},F={...F,x:"center"}):F={...F,x:"start"}:V.width/2-k.width/2<k.left?(H={...H,left:k.left-(V.width/2-k.width/2),right:void 0},F={...F,x:"center"}):F={...F,x:"start"},E({type:f.type,position:`transform-origin-${F.y}-${F.x}`}),X(H);break}case v==="top":{let F={y:"top",x:"center"},H={top:k.bottom+window.scrollY,bottom:void 0,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0};k.top-V.height>0&&(F={...F,y:"bottom"},H={...H,top:void 0,bottom:window.innerHeight-k.top-window.scrollY}),q?(window.innerWidth||document.documentElement.clientWidth)-k.right>V.width/2-k.width/2?(H={...H,left:void 0,right:(window.innerWidth||document.documentElement.clientWidth)-k.right-(V.width/2-k.width/2)},F={...F,x:"center"}):F={...F,x:"start"}:V.width/2-k.width/2<k.left?(H={...H,left:k.left-(V.width/2-k.width/2),right:void 0},F={...F,x:"center"}):F={...F,x:"start"},E({type:f.type,position:`transform-origin-${F.y}-${F.x}`}),X(H);break}case v==="top-start":{k.top>V.height?(E({type:f.type,position:"transform-origin-bottom-start"}),X({top:void 0,bottom:window.innerHeight-k.top-window.scrollY,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0})):(E({type:f.type,position:"transform-origin-top-start"}),X({top:k.bottom+window.scrollY,bottom:void 0,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0}));break}case v==="top-end":{k.top-V.height>0?(E({type:f.type,position:"transform-origin-bottom-end"}),X({top:void 0,bottom:window.innerHeight-k.top-window.scrollY,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0})):(E({type:f.type,position:"transform-origin-top-end"}),X({top:k.bottom+window.scrollY,bottom:void 0,left:q?void 0:k.left,right:q?(window.innerWidth||document.documentElement.clientWidth)-k.right:void 0}));break}}}},K=De=>{De.currentTarget===De.target&&ge()};return N.useEffect(()=>(window.addEventListener("resize",ce),()=>{window.removeEventListener("resize",ce)}),[ce]),Y.jsxs(Y.Fragment,{children:[Y.jsx("div",{className:`naria-popover ${d.root}`,"data-class-prop":"root",children:N.cloneElement(R,{onClick:()=>ue(),ref:me})}),y?Y.jsx(Yr,{children:D<768?Y.jsx("div",{onClick:K,className:`naria-popover__backdrop ${x!=="transparent"?`backdrop--${x}`:""} ${d.backdrop}`,"data-class-prop":"backdrop",children:Y.jsx("div",{className:`naria-popover__content naria-popover__content--mobile ${d.content}`,"data-class-prop":"content",children:ae})}):Y.jsx("div",{className:`naria-popover__content naria-popover__content--desktop ${f.type} ${f.position} ${d.content}`,ref:G,style:{bottom:l.bottom!==void 0?l.bottom:"unset",top:l.top!==void 0?l.top:"unset",left:l.left!==void 0?l.left:"unset",right:l.right!==void 0?l.right:"unset"},"data-class-prop":"content",children:ae})}):void 0]})},_n=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M241.5 239c9.4 9.4 9.4 24.6 0 33.9L81.5 433c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l143-143-143-143c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l160 160z"})),wn=d=>Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",...d},Ae.createElement("path",{fill:"currentColor",d:"M81.5 433l160-160c9.4-9.4 9.4-24.6 0-33.9L81.5 79c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l143 143-143 143c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0zm192 0l160-160c9.4-9.4 9.4-24.6 0-33.9L273.5 79c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l143 143-143 143c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0z"}));var Jt={exports:{}};function jn(d){throw new Error('Could not dynamically require "'+d+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Zt={exports:{}},go=Zt.exports,gn;function kr(){return gn||(gn=1,(function(d,x){(function(v,y){d.exports=y()})(go,(function(){var v;function y(){return v.apply(null,arguments)}function $(e){v=e}function A(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function J(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ae(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(R(e,t))return!1;return!0}function f(e){return e===void 0}function E(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function l(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function X(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function D(e,t){for(var r in t)R(t,r)&&(e[r]=t[r]);return R(t,"toString")&&(e.toString=t.toString),R(t,"valueOf")&&(e.valueOf=t.valueOf),e}function G(e,t,r,n){return Hr(e,t,r,n,!0).utc()}function me(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function C(e){return e._pf==null&&(e._pf=me()),e._pf}var _e;Array.prototype.some?_e=Array.prototype.some:_e=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function ge(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=C(e),r=_e.call(t.parsedDateParts,function(s){return s!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function ue(e){var t=G(NaN);return e!=null?D(C(t),e):C(t).userInvalidated=!0,t}var ce=y.momentProperties=[],K=!1;function De(e,t){var r,n,s,o=ce.length;if(f(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),f(t._i)||(e._i=t._i),f(t._f)||(e._f=t._f),f(t._l)||(e._l=t._l),f(t._strict)||(e._strict=t._strict),f(t._tzm)||(e._tzm=t._tzm),f(t._isUTC)||(e._isUTC=t._isUTC),f(t._offset)||(e._offset=t._offset),f(t._pf)||(e._pf=C(t)),f(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)n=ce[r],s=t[n],f(s)||(e[n]=s);return e}function q(e){De(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),K===!1&&(K=!0,y.updateOffset(this),K=!1)}function V(e){return e instanceof q||e!=null&&e._isAMomentObject!=null}function k(e){y.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function F(e,t){var r=!0;return D(function(){if(y.deprecationHandler!=null&&y.deprecationHandler(null,e),r){var n=[],s,o,_,W=arguments.length;for(o=0;o<W;o++){if(s="",typeof arguments[o]=="object"){s+=`
@@ -366,7 +366,7 @@ const Ot = ({
366
366
  let nt;
367
367
  const Dr = (d) => {
368
368
  let O;
369
- window.location.hash.includes("/") ? O = `${window.location.pathname}${window.location.search}${window.location.hash.replace("/#" + d, "")}` : O = `${window.location.pathname}${window.location.search}${window.location.hash.replace("#" + d, "")}`, nt = `${window.location.origin}${window.location.pathname}${O}`, window.history.replaceState(null, "", O);
369
+ window.location.hash.includes("/") ? O = `${window.location.pathname}${window.location.search}${window.location.hash.replace("/#" + d, "")}` : O = `${window.location.pathname}${window.location.search}${window.location.hash.replace("#" + d, "")}`, nt = `${window.location.origin}${O}`, console.log("daasda3", nt, O), window.history.replaceState(null, "", O);
370
370
  }, Yr = (d) => {
371
371
  window.location.hash ? window.location.hash = window.location.hash + "/#" + d : window.location.hash = d;
372
372
  }, vr = (d) => {
@@ -374,7 +374,7 @@ const Dr = (d) => {
374
374
  return ke(() => {
375
375
  nt = window.location.href;
376
376
  const _ = ($) => {
377
- console.log("daasda0", window.location.href, nt, window.history), window.location.hash.includes(d) ? window.location.hash.length === window.location.hash.indexOf(d) + d.length && (window.location.href === nt ? (console.log("daasda1", window.location.href, nt), window.history.replaceState(null, "", `${window.location.origin}${window.location.pathname}`), nt = `${window.location.origin}${window.location.pathname}`, k(!0)) : (console.log("daasda2", window.location.href, nt), k(!1), nt = window.location.href)) : k(!0);
377
+ window.location.hash.includes(d) ? window.location.hash.length === window.location.hash.indexOf(d) + d.length && (window.location.href === nt ? (window.history.replaceState(null, "", `${window.location.origin}${window.location.pathname}`), nt = `${window.location.origin}${window.location.pathname}`, console.log("daasda1", nt), k(!0)) : (k(!1), nt = `${window.location.origin}${window.location.pathname}`, console.log("daasda2", nt))) : k(!0);
378
378
  };
379
379
  return window.addEventListener("popstate", _), () => {
380
380
  window.removeEventListener("popstate", _);
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "",
6
6
  "url": ""
7
7
  },
8
- "version": "0.3.32",
8
+ "version": "0.3.34",
9
9
  "type": "module",
10
10
  "main": "dist/naria-ui.cjs.js",
11
11
  "module": "dist/naria-ui.es.js",