@purpur/library 9.0.0 → 9.0.1
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/CHANGELOG.json +12 -0
- package/CHANGELOG.md +8 -1
- package/dist/LICENSE.txt +5 -5
- package/dist/checkbox-Dk3bZkZ3.js.map +1 -1
- package/dist/checkbox-LYzMiXu7.mjs.map +1 -1
- package/dist/chip-group-CJVvfl_J.mjs.map +1 -1
- package/dist/chip-group-aj1fdnjC.js.map +1 -1
- package/dist/{date-picker-BRkh2YEH.mjs → date-picker-BRnwwZv1.mjs} +364 -354
- package/dist/date-picker-BRnwwZv1.mjs.map +1 -0
- package/dist/date-picker-DlJGggam.js +2 -0
- package/dist/date-picker-DlJGggam.js.map +1 -0
- package/dist/date-picker.cjs.js +1 -1
- package/dist/date-picker.es.js +1 -1
- package/dist/floating-ui.react-dom-0ol4sFzt.mjs +1363 -0
- package/dist/floating-ui.react-dom-0ol4sFzt.mjs.map +1 -0
- package/dist/floating-ui.react-dom-Cc_YSprQ.js +2 -0
- package/dist/floating-ui.react-dom-Cc_YSprQ.js.map +1 -0
- package/dist/index-2cFVyGXq.js.map +1 -1
- package/dist/index-B8Mazo6u.mjs.map +1 -1
- package/dist/index-BG6K_yAm.js.map +1 -1
- package/dist/index-BVmlsxuF.js.map +1 -1
- package/dist/index-BbtRr5Q6.js.map +1 -1
- package/dist/index-BtWPC8xc.js.map +1 -1
- package/dist/index-ByaXH_ih.mjs.map +1 -1
- package/dist/index-C1AXAWlO.mjs.map +1 -1
- package/dist/index-CCNZ9uWB.mjs.map +1 -1
- package/dist/index-CEQ35j8b.mjs.map +1 -1
- package/dist/index-CKCTy3ZL.mjs.map +1 -1
- package/dist/index-CLMd7NJE.mjs.map +1 -1
- package/dist/index-Cje7xxa1.js.map +1 -1
- package/dist/index-CleLBinl.js.map +1 -1
- package/dist/index-CoR7YA3H.js.map +1 -1
- package/dist/index-CxBG4Ssm.js.map +1 -1
- package/dist/index-DA01QPpC.js.map +1 -1
- package/dist/index-DCcK_d4W.mjs.map +1 -1
- package/dist/index-DDrLXRUs.mjs.map +1 -1
- package/dist/index-DLcqcWxM.mjs.map +1 -1
- package/dist/index-DOFLOnao.js.map +1 -1
- package/dist/index-DOfn3ixy.mjs.map +1 -1
- package/dist/index-DPxjTK4w.mjs.map +1 -1
- package/dist/index-DSf4qCR-.mjs.map +1 -1
- package/dist/index-DlMXYAr3.js.map +1 -1
- package/dist/index-HJvG7FXj.js.map +1 -1
- package/dist/index-Hk_HrrHM.js.map +1 -1
- package/dist/index-IpWiejWQ.mjs.map +1 -1
- package/dist/index-MiRhI3nq.mjs.map +1 -1
- package/dist/index-_XxjJPRD.js.map +1 -1
- package/dist/index-kcwFA4Dv.js.map +1 -1
- package/dist/index-tyLV0iiH.mjs.map +1 -1
- package/dist/label-7sJe5-pX.mjs.map +1 -1
- package/dist/label-yHK80hhV.js.map +1 -1
- package/dist/library.cjs.js +1 -1
- package/dist/library.es.js +5 -5
- package/dist/{popover-CYyCtoef.js → popover-B1BgSoQx.js} +2 -2
- package/dist/{popover-CYyCtoef.js.map → popover-B1BgSoQx.js.map} +1 -1
- package/dist/{popover-C6nZb3cQ.mjs → popover-DBMI9Jy1.mjs} +4 -4
- package/dist/{popover-C6nZb3cQ.mjs.map → popover-DBMI9Jy1.mjs.map} +1 -1
- package/dist/popover.cjs.js +1 -1
- package/dist/popover.es.js +1 -1
- package/dist/slider-CDOrFmK-.mjs.map +1 -1
- package/dist/slider-_R6JmPZl.js.map +1 -1
- package/dist/{stepper-DA0c9Utm.js → stepper-B248FwO-.js} +2 -2
- package/dist/{stepper-DA0c9Utm.js.map → stepper-B248FwO-.js.map} +1 -1
- package/dist/{stepper-D81jmbEf.mjs → stepper-BfIbJwZn.mjs} +2 -2
- package/dist/{stepper-D81jmbEf.mjs.map → stepper-BfIbJwZn.mjs.map} +1 -1
- package/dist/stepper.cjs.js +1 -1
- package/dist/stepper.es.js +1 -1
- package/dist/{table-Dd58bK_Q.js → table-BNeo_B1h.js} +2 -2
- package/dist/{table-Dd58bK_Q.js.map → table-BNeo_B1h.js.map} +1 -1
- package/dist/{table-CIrmGGb2.mjs → table-DvcpczWf.mjs} +2 -2
- package/dist/{table-CIrmGGb2.mjs.map → table-DvcpczWf.mjs.map} +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.es.js +1 -1
- package/dist/tabs-CfHd4UQ2.js.map +1 -1
- package/dist/tabs-CoXMAwMx.mjs.map +1 -1
- package/dist/toggle-C8IwTbX8.js.map +1 -1
- package/dist/toggle-Cezg5MUc.mjs.map +1 -1
- package/dist/{tooltip-870Nmk-v.js → tooltip-CLQLxoaf.js} +2 -2
- package/dist/{tooltip-870Nmk-v.js.map → tooltip-CLQLxoaf.js.map} +1 -1
- package/dist/{tooltip-Cqfj0lSz.mjs → tooltip-DXi7ikUT.mjs} +2 -2
- package/dist/{tooltip-Cqfj0lSz.mjs.map → tooltip-DXi7ikUT.mjs.map} +1 -1
- package/dist/tooltip.cjs.js +1 -1
- package/dist/tooltip.es.js +1 -1
- package/dist/visually-hidden-BYFkJEp1.mjs.map +1 -1
- package/dist/visually-hidden-C2CKovZx.js.map +1 -1
- package/package.json +68 -68
- package/dist/date-picker-BRkh2YEH.mjs.map +0 -1
- package/dist/date-picker-C2Wtf7XQ.js +0 -2
- package/dist/date-picker-C2Wtf7XQ.js.map +0 -1
- package/dist/floating-ui.react-dom-B_rB55Mr.mjs +0 -1340
- package/dist/floating-ui.react-dom-B_rB55Mr.mjs.map +0 -1
- package/dist/floating-ui.react-dom-z0lMBJ4R.js +0 -2
- package/dist/floating-ui.react-dom-z0lMBJ4R.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const O=require("react/jsx-runtime"),Z=require("react"),y=require("./floating-ui.react-dom-z0lMBJ4R.js"),Ft=require("react-dom"),Ye=require("./calendar-pMM0fKEu.js"),ze=require("./date-field-CPiTZqa0.js"),Pe=require("./drawer-nBpCtIdI.js"),Lt=require("./icon-DNHpBTHs-faYHqTXU.js"),_t=require("./bind-DeUYJ6m9.js");function pt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=pt(Z),jt=pt(Ft);var Vt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Se=Vt.join(","),ht=typeof Element>"u",ge=ht?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!ht&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ie=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ie(t.parentNode));return i},Bt=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Et=function(t,n,r){if(Ie(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Se));return n&&ge.call(t,Se)&&o.unshift(t),o=o.filter(r),o},Ae=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ie(i,!1))if(i.tagName==="SLOT"){var u=i.assignedElements(),d=u.length?u:i.children,a=Ae(d,!0,r);r.flatten?o.push.apply(o,a):o.push({scopeParent:i,candidates:a})}else{var v=ge.call(i,Se);v&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var R=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),A=!Ie(R,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(R&&A){var f=Ae(R===!0?i.children:R.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},Rt=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},yt=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Bt(t))&&!Rt(t)?0:t.tabIndex},Ht=function(t,n){var r=yt(t);return r<0&&n&&!Rt(t)?0:r},$t=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xt=function(t){return t.tagName==="INPUT"},qt=function(t){return xt(t)&&t.type==="hidden"},Kt=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Wt=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Ut=function(t){if(!t.name)return!0;var n=t.form||Ce(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Wt(o,t.form);return!s||s===t},Gt=function(t){return xt(t)&&t.type==="radio"},Yt=function(t){return Gt(t)&&!Ut(t)},zt=function(t){var n,r=t&&Ce(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,u,d;for(s=!!((i=o)!==null&&i!==void 0&&(u=i.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!s&&o;){var a,v,R;r=Ce(o),o=(a=r)===null||a===void 0?void 0:a.host,s=!!((v=o)!==null&&v!==void 0&&(R=v.ownerDocument)!==null&&R!==void 0&&R.contains(o))}}return s},Ze=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Zt=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=ge.call(t,"details>summary:first-of-type"),u=i?t.parentElement:t;if(ge.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var a=t.parentElement,v=Ce(t);if(a&&!a.shadowRoot&&o(a)===!0)return Ze(t);t.assignedSlot?t=t.assignedSlot:!a&&v!==t.ownerDocument?t=v.host:t=a}t=d}if(zt(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ze(t);return!1},Xt=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ge.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ve=function(t,n){return!(n.disabled||qt(n)||Zt(n,t)||Kt(n)||Xt(n))},Be=function(t,n){return!(Yt(n)||yt(n)<0||!Ve(t,n))},Jt=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},wt=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,u=i?o.scopeParent:o,d=Ht(u,i),a=i?wt(o.candidates):u;d===0?i?n.push.apply(n,a):n.push(u):r.push({documentOrder:s,tabIndex:d,item:o,isScope:i,content:a})}),r.sort($t).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ke=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ae([t],n.includeContainer,{filter:Be.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Jt}):r=Et(t,n.includeContainer,Be.bind(null,n)),wt(r)},Qt=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ae([t],n.includeContainer,{filter:Ve.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Et(t,n.includeContainer,Ve.bind(null,n)),r},Tt=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ge.call(t,Se)===!1?!1:Be(n,t)};function en(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function St(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function tn(){return/apple/i.test(navigator.vendor)}function He(){const e=/android/i;return e.test(en())||e.test(St())}function nn(){return St().includes("jsdom/")}const Xe="data-floating-ui-focusable",rn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ve(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function W(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&y.isShadowRoot(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ue(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Me(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function on(e){return e.matches("html,body")}function X(e){return e?.ownerDocument||document}function Ct(e){return y.isHTMLElement(e)&&e.matches(rn)}function Je(e){return e?e.getAttribute("role")==="combobox"&&Ct(e):!1}function Qe(e){return e?e.hasAttribute(Xe)?e:e.querySelector("["+Xe+"]")||e:null}function be(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var s;return o.parentId===t&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...be(e,o.id,n)])}function et(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s?.parentId,s&&(r=r.concat(s))}return r}function Fe(e){e.preventDefault(),e.stopPropagation()}function sn(e){return"nativeEvent"in e}function an(e){return e.mozInputSource===0&&e.isTrusted?!0:He()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function un(e){return nn()?!1:!He()&&e.width===0&&e.height===0||He()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function tt(e,t){return["mouse","pen"].includes(e)}var cn=typeof document<"u",ln=function(){},Y=cn?Z.useLayoutEffect:ln;const fn={...c};function Le(e){const t=c.useRef(e);return Y(()=>{t.current=e}),t}const dn=fn.useInsertionEffect,vn=dn||(e=>e());function Q(e){const t=c.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return vn(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Re=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function It(e,t){const n=ke(e,Re()),r=n.length;if(r===0)return;const o=ve(X(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function At(e){return It(X(e).body,1)||e}function Dt(e){return It(X(e).body,-1)||e}function he(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!W(n,r)}function bn(e){ke(e,Re()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function nt(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const mn="data-floating-ui-focusable",rt="active",ot="selected",gn={...c};let st=!1,pn=0;const it=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+pn++;function hn(){const[e,t]=c.useState(()=>st?it():void 0);return Y(()=>{e==null&&t(it())},[]),c.useEffect(()=>{st=!0},[]),e}const En=gn.useId,kt=En||hn;let $e;process.env.NODE_ENV!=="production"&&($e=new Set);function Rn(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=$e)!=null&&e.has(o))){var s;(s=$e)==null||s.add(o),console.error(o)}}function yn(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const xn=c.createContext(null),wn=c.createContext(null),Tn=()=>{var e;return((e=c.useContext(xn))==null?void 0:e.id)||null},Ke=()=>c.useContext(wn);function Ee(e){return"data-floating-ui-"+e}function Sn(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}let at=0;function de(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(at);const s=()=>e?.focus({preventScroll:n});o?s():at=requestAnimationFrame(s)}function Cn(e){return e?.ownerDocument||document}const me={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ut(e){return e==="inert"?me.inert:e==="aria-hidden"?me["aria-hidden"]:me.none}let we=new WeakSet,Te={},_e=0;const In=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ot=e=>e&&(e.host||Ot(e.parentNode)),An=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ot(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Dn(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=An(t,e),u=new Set,d=new Set(i),a=[];Te[o]||(Te[o]=new WeakMap);const v=Te[o];i.forEach(R),A(t),u.clear();function R(f){!f||u.has(f)||(u.add(f),f.parentNode&&R(f.parentNode))}function A(f){!f||d.has(f)||[].forEach.call(f.children,p=>{if(y.getNodeName(p)!=="script")if(u.has(p))A(p);else{const l=s?p.getAttribute(s):null,w=l!==null&&l!=="false",S=ut(s),b=(S.get(p)||0)+1,g=(v.get(p)||0)+1;S.set(p,b),v.set(p,g),a.push(p),b===1&&w&&we.add(p),g===1&&p.setAttribute(o,""),!w&&s&&p.setAttribute(s,s==="inert"?"":"true")}})}return _e++,()=>{a.forEach(f=>{const p=ut(s),w=(p.get(f)||0)-1,S=(v.get(f)||0)-1;p.set(f,w),v.set(f,S),w||(!we.has(f)&&s&&f.removeAttribute(s),we.delete(f)),S||f.removeAttribute(o)}),_e--,_e||(me.inert=new WeakMap,me["aria-hidden"]=new WeakMap,me.none=new WeakMap,we=new WeakSet,Te={})}}function ct(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Cn(e[0]).body;return Dn(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const We={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},De=c.forwardRef(function(t,n){const[r,o]=c.useState();Y(()=>{tn()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ee("focus-guard")]:"",style:We};return O.jsx("span",{...t,...s})}),kn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Nt=c.createContext(null),lt=Ee("portal");function On(e){e===void 0&&(e={});const{id:t,root:n}=e,r=kt(),o=Pt(),[s,i]=c.useState(null),u=c.useRef(null);return Y(()=>()=>{s?.remove(),queueMicrotask(()=>{u.current=null})},[s]),Y(()=>{if(!r||u.current)return;const d=t?document.getElementById(t):null;if(!d)return;const a=document.createElement("div");a.id=r,a.setAttribute(lt,""),d.appendChild(a),u.current=a,i(a)},[t,r]),Y(()=>{if(n===null||!r||u.current)return;let d=n||o?.portalNode;d&&!y.isNode(d)&&(d=d.current),d=d||document.body;let a=null;t&&(a=document.createElement("div"),a.id=t,d.appendChild(a));const v=document.createElement("div");v.id=r,v.setAttribute(lt,""),d=a||d,d.appendChild(v),u.current=v,i(v)},[t,n,r,o]),s}function Nn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=On({id:n,root:r}),[i,u]=c.useState(null),d=c.useRef(null),a=c.useRef(null),v=c.useRef(null),R=c.useRef(null),A=i?.modal,f=i?.open,p=!!i&&!i.modal&&i.open&&o&&!!(r||s);return c.useEffect(()=>{if(!s||!o||A)return;function l(w){s&&he(w)&&(w.type==="focusin"?nt:bn)(s)}return s.addEventListener("focusin",l,!0),s.addEventListener("focusout",l,!0),()=>{s.removeEventListener("focusin",l,!0),s.removeEventListener("focusout",l,!0)}},[s,o,A]),c.useEffect(()=>{s&&(f||nt(s))},[f,s]),O.jsxs(Nt.Provider,{value:c.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:d,afterOutsideRef:a,beforeInsideRef:v,afterInsideRef:R,portalNode:s,setFocusManagerState:u}),[o,s]),children:[p&&s&&O.jsx(De,{"data-type":"outside",ref:d,onFocus:l=>{if(he(l,s)){var w;(w=v.current)==null||w.focus()}else{const S=i?i.domReference:null,b=Dt(S);b?.focus()}}}),p&&s&&O.jsx("span",{"aria-owns":s.id,style:kn}),s&&jt.createPortal(t,s),p&&s&&O.jsx(De,{"data-type":"outside",ref:a,onFocus:l=>{if(he(l,s)){var w;(w=R.current)==null||w.focus()}else{const S=i?i.domReference:null,b=At(S);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,l.nativeEvent,"focus-out")}}})]})}const Pt=()=>c.useContext(Nt);function ft(e){return c.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const Pn=20;let ce=[];function Ue(){ce=ce.filter(e=>e.isConnected)}function Mn(e){Ue(),e&&y.getNodeName(e)!=="body"&&(ce.push(e),ce.length>Pn&&(ce=ce.slice(-20)))}function dt(){return Ue(),ce[ce.length-1]}function Fn(e){const t=Re();return Tt(e,t)?e:ke(e,t)[0]||e}function vt(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Re(),s=Qt(e,r).filter(u=>{const d=u.getAttribute("data-tabindex")||"";return Tt(u,r)||u.hasAttribute("data-tabindex")&&!d.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const Ln=c.forwardRef(function(t,n){return O.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:We})});function _n(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:u=!0,restoreFocus:d=!1,modal:a=!0,visuallyHiddenDismiss:v=!1,closeOnFocusOut:R=!0,outsideElementsInert:A=!1,getInsideElements:f=()=>[]}=e,{open:p,onOpenChange:l,events:w,dataRef:S,elements:{domReference:b,floating:g}}=t,_=Q(()=>{var x;return(x=S.current.floatingContext)==null?void 0:x.nodeId}),$=Q(f),q=typeof i=="number"&&i<0,M=Je(b)&&q,H=In(),re=H?s:!0,ee=!re||H&&A,C=Le(o),pe=Le(i),oe=Le(u),h=Ke(),m=Pt(),B=c.useRef(null),j=c.useRef(null),E=c.useRef(!1),F=c.useRef(!1),V=c.useRef(-1),z=c.useRef(-1),fe=m!=null,I=Qe(g),J=Q(function(x){return x===void 0&&(x=I),x?ke(x,Re()):[]}),P=Q(x=>{const D=J(x);return C.current.map(T=>b&&T==="reference"?b:I&&T==="floating"?I:D).filter(Boolean).flat()});c.useEffect(()=>{if(r||!a)return;function x(T){if(T.key==="Tab"){W(I,ve(X(I)))&&J().length===0&&!M&&Fe(T);const N=P(),L=ue(T);C.current[0]==="reference"&&L===b&&(Fe(T),T.shiftKey?de(N[N.length-1]):de(N[1])),C.current[1]==="floating"&&L===I&&T.shiftKey&&(Fe(T),de(N[0]))}}const D=X(I);return D.addEventListener("keydown",x),()=>{D.removeEventListener("keydown",x)}},[r,b,I,a,C,M,J,P]),c.useEffect(()=>{if(r||!g)return;function x(D){const T=ue(D),L=J().indexOf(T);L!==-1&&(V.current=L)}return g.addEventListener("focusin",x),()=>{g.removeEventListener("focusin",x)}},[r,g,J]),c.useEffect(()=>{if(r||!R)return;function x(){F.current=!0,setTimeout(()=>{F.current=!1})}function D(L){const k=L.relatedTarget,te=L.currentTarget,G=ue(L);queueMicrotask(()=>{const K=_(),le=!(W(b,k)||W(g,k)||W(k,g)||W(m?.portalNode,k)||k!=null&&k.hasAttribute(Ee("focus-guard"))||h&&(be(h.nodesRef.current,K).find(ie=>{var ne,ae;return W((ne=ie.context)==null?void 0:ne.elements.floating,k)||W((ae=ie.context)==null?void 0:ae.elements.domReference,k)})||et(h.nodesRef.current,K).find(ie=>{var ne,ae,Ge;return[(ne=ie.context)==null?void 0:ne.elements.floating,Qe((ae=ie.context)==null?void 0:ae.elements.floating)].includes(k)||((Ge=ie.context)==null?void 0:Ge.elements.domReference)===k})));if(te===b&&I&&vt(I,C),d&&te!==b&&!(G!=null&&G.isConnected)&&ve(X(I))===X(I).body){y.isHTMLElement(I)&&I.focus();const ie=V.current,ne=J(),ae=ne[ie]||ne[ne.length-1]||I;y.isHTMLElement(ae)&&ae.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(M||!a)&&k&&le&&!F.current&&k!==dt()&&(E.current=!0,l(!1,L,"focus-out"))})}const T=!!(!h&&m);function N(){Sn(z),S.current.insideReactTree=!0,z.current=window.setTimeout(()=>{S.current.insideReactTree=!1})}if(g&&y.isHTMLElement(b))return b.addEventListener("focusout",D),b.addEventListener("pointerdown",x),g.addEventListener("focusout",D),T&&g.addEventListener("focusout",N,!0),()=>{b.removeEventListener("focusout",D),b.removeEventListener("pointerdown",x),g.removeEventListener("focusout",D),T&&g.removeEventListener("focusout",N,!0)}},[r,b,g,I,a,h,m,l,R,d,J,M,_,C,S]);const U=c.useRef(null),se=c.useRef(null),Oe=ft([U,m?.beforeInsideRef]),Ne=ft([se,m?.afterInsideRef]);c.useEffect(()=>{var x,D;if(r||!g)return;const T=Array.from((m==null||(x=m.portalNode)==null?void 0:x.querySelectorAll("["+Ee("portal")+"]"))||[]),L=(D=(h?et(h.nodesRef.current,_()):[]).find(G=>{var K;return Je(((K=G.context)==null?void 0:K.elements.domReference)||null)}))==null||(D=D.context)==null?void 0:D.elements.domReference,k=[g,L,...T,...$(),B.current,j.current,U.current,se.current,m?.beforeOutsideRef.current,m?.afterOutsideRef.current,C.current.includes("reference")||M?b:null].filter(G=>G!=null),te=a||M?ct(k,!ee,ee):ct(k);return()=>{te()}},[r,b,g,a,C,m,M,re,ee,h,_,$]),Y(()=>{if(r||!y.isHTMLElement(I))return;const x=X(I),D=ve(x);queueMicrotask(()=>{const T=P(I),N=pe.current,L=(typeof N=="number"?T[N]:N.current)||I,k=W(I,D);!q&&!k&&p&&de(L,{preventScroll:L===I})})},[r,p,I,q,P,pe]),Y(()=>{if(r||!I)return;const x=X(I),D=ve(x);Mn(D);function T(k){let{reason:te,event:G,nested:K}=k;if(["hover","safe-polygon"].includes(te)&&G.type==="mouseleave"&&(E.current=!0),te==="outside-press")if(K)E.current=!1;else if(an(G)||un(G))E.current=!1;else{let le=!1;document.createElement("div").focus({get preventScroll(){return le=!0,!1}}),le?E.current=!1:E.current=!0}}w.on("openchange",T);const N=x.createElement("span");N.setAttribute("tabindex","-1"),N.setAttribute("aria-hidden","true"),Object.assign(N.style,We),fe&&b&&b.insertAdjacentElement("afterend",N);function L(){if(typeof oe.current=="boolean"){const k=b||dt();return k&&k.isConnected?k:N}return oe.current.current||N}return()=>{w.off("openchange",T);const k=ve(x),te=W(g,k)||h&&be(h.nodesRef.current,_(),!1).some(K=>{var le;return W((le=K.context)==null?void 0:le.elements.floating,k)}),G=L();queueMicrotask(()=>{const K=Fn(G);oe.current&&!E.current&&y.isHTMLElement(K)&&(!(K!==k&&k!==x.body)||te)&&K.focus({preventScroll:!0}),N.remove()})}},[r,g,I,oe,S,w,h,fe,b,_]),c.useEffect(()=>(queueMicrotask(()=>{E.current=!1}),()=>{queueMicrotask(Ue)}),[r]),Y(()=>{if(!r&&m)return m.setFocusManagerState({modal:a,closeOnFocusOut:R,open:p,onOpenChange:l,domReference:b}),()=>{m.setFocusManagerState(null)}},[r,m,a,p,l,R,b]),Y(()=>{r||I&&vt(I,C)},[r,I,C]);function ye(x){return r||!v||!a?null:O.jsx(Ln,{ref:x==="start"?B:j,onClick:D=>l(!1,D.nativeEvent),children:typeof v=="string"?v:"Dismiss"})}const xe=!r&&re&&(a?!M:!0)&&(fe||a);return O.jsxs(O.Fragment,{children:[xe&&O.jsx(De,{"data-type":"inside",ref:Oe,onFocus:x=>{if(a){const T=P();de(o[0]==="reference"?T[0]:T[T.length-1])}else if(m!=null&&m.preserveTabOrder&&m.portalNode)if(E.current=!1,he(x,m.portalNode)){const T=At(b);T?.focus()}else{var D;(D=m.beforeOutsideRef.current)==null||D.focus()}}}),!M&&ye("start"),n,ye("end"),xe&&O.jsx(De,{"data-type":"inside",ref:Ne,onFocus:x=>{if(a)de(P()[0]);else if(m!=null&&m.preserveTabOrder&&m.portalNode)if(R&&(E.current=!0),he(x,m.portalNode)){const T=Dt(b);T?.focus()}else{var D;(D=m.afterOutsideRef.current)==null||D.focus()}}})]})}function bt(e){return y.isHTMLElement(e.target)&&e.target.tagName==="BUTTON"}function jn(e){return y.isHTMLElement(e.target)&&e.target.tagName==="A"}function mt(e){return Ct(e)}function Vn(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:u="click",toggle:d=!0,ignoreMouse:a=!1,keyboardHandlers:v=!0,stickIfOpen:R=!0}=t,A=c.useRef(),f=c.useRef(!1),p=c.useMemo(()=>({onPointerDown(l){A.current=l.pointerType},onMouseDown(l){const w=A.current;l.button===0&&u!=="click"&&(tt(w)&&a||(n&&d&&(!(o.current.openEvent&&R)||o.current.openEvent.type==="mousedown")?r(!1,l.nativeEvent,"click"):(l.preventDefault(),r(!0,l.nativeEvent,"click"))))},onClick(l){const w=A.current;if(u==="mousedown"&&A.current){A.current=void 0;return}tt(w)&&a||(n&&d&&(!(o.current.openEvent&&R)||o.current.openEvent.type==="click")?r(!1,l.nativeEvent,"click"):r(!0,l.nativeEvent,"click"))},onKeyDown(l){A.current=void 0,!(l.defaultPrevented||!v||bt(l))&&(l.key===" "&&!mt(s)&&(l.preventDefault(),f.current=!0),!jn(l)&&l.key==="Enter"&&r(!(n&&d),l.nativeEvent,"click"))},onKeyUp(l){l.defaultPrevented||!v||bt(l)||mt(s)||l.key===" "&&f.current&&(f.current=!1,r(!(n&&d),l.nativeEvent,"click"))}}),[o,s,u,a,v,r,n,R,d]);return c.useMemo(()=>i?{reference:p}:{},[i,p])}const Bn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},gt=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function $n(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:a="pointerdown",referencePress:v=!1,referencePressEvent:R="pointerdown",ancestorScroll:A=!1,bubbles:f,capture:p}=t,l=Ke(),w=Q(typeof d=="function"?d:()=>!1),S=typeof d=="function"?w:d,b=c.useRef(!1),{escapeKey:g,outsidePress:_}=gt(f),{escapeKey:$,outsidePress:q}=gt(p),M=c.useRef(!1),H=Q(h=>{var m;if(!n||!i||!u||h.key!=="Escape"||M.current)return;const B=(m=s.current.floatingContext)==null?void 0:m.nodeId,j=l?be(l.nodesRef.current,B):[];if(!g&&(h.stopPropagation(),j.length>0)){let E=!0;if(j.forEach(F=>{var V;if((V=F.context)!=null&&V.open&&!F.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}r(!1,sn(h)?h.nativeEvent:h,"escape-key")}),re=Q(h=>{var m;const B=()=>{var j;H(h),(j=ue(h))==null||j.removeEventListener("keydown",B)};(m=ue(h))==null||m.addEventListener("keydown",B)}),ee=Q(h=>{var m;const B=s.current.insideReactTree;s.current.insideReactTree=!1;const j=b.current;if(b.current=!1,a==="click"&&j||B||typeof S=="function"&&!S(h))return;const E=ue(h),F="["+Ee("inert")+"]",V=X(o.floating).querySelectorAll(F);let z=y.isElement(E)?E:null;for(;z&&!y.isLastTraversableNode(z);){const P=y.getParentNode(z);if(y.isLastTraversableNode(P)||!y.isElement(P))break;z=P}if(V.length&&y.isElement(E)&&!on(E)&&!W(E,o.floating)&&Array.from(V).every(P=>!W(z,P)))return;if(y.isHTMLElement(E)&&oe){const P=y.isLastTraversableNode(E),U=y.getComputedStyle(E),se=/auto|scroll/,Oe=P||se.test(U.overflowX),Ne=P||se.test(U.overflowY),ye=Oe&&E.clientWidth>0&&E.scrollWidth>E.clientWidth,xe=Ne&&E.clientHeight>0&&E.scrollHeight>E.clientHeight,x=U.direction==="rtl",D=xe&&(x?h.offsetX<=E.offsetWidth-E.clientWidth:h.offsetX>E.clientWidth),T=ye&&h.offsetY>E.clientHeight;if(D||T)return}const fe=(m=s.current.floatingContext)==null?void 0:m.nodeId,I=l&&be(l.nodesRef.current,fe).some(P=>{var U;return Me(h,(U=P.context)==null?void 0:U.elements.floating)});if(Me(h,o.floating)||Me(h,o.domReference)||I)return;const J=l?be(l.nodesRef.current,fe):[];if(J.length>0){let P=!0;if(J.forEach(U=>{var se;if((se=U.context)!=null&&se.open&&!U.context.dataRef.current.__outsidePressBubbles){P=!1;return}}),!P)return}r(!1,h,"outside-press")}),C=Q(h=>{var m;const B=()=>{var j;ee(h),(j=ue(h))==null||j.removeEventListener(a,B)};(m=ue(h))==null||m.addEventListener(a,B)});c.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=g,s.current.__outsidePressBubbles=_;let h=-1;function m(V){r(!1,V,"ancestor-scroll")}function B(){window.clearTimeout(h),M.current=!0}function j(){h=window.setTimeout(()=>{M.current=!1},y.isWebKit()?5:0)}const E=X(o.floating);u&&(E.addEventListener("keydown",$?re:H,$),E.addEventListener("compositionstart",B),E.addEventListener("compositionend",j)),S&&E.addEventListener(a,q?C:ee,q);let F=[];return A&&(y.isElement(o.domReference)&&(F=y.getOverflowAncestors(o.domReference)),y.isElement(o.floating)&&(F=F.concat(y.getOverflowAncestors(o.floating))),!y.isElement(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(y.getOverflowAncestors(o.reference.contextElement)))),F=F.filter(V=>{var z;return V!==((z=E.defaultView)==null?void 0:z.visualViewport)}),F.forEach(V=>{V.addEventListener("scroll",m,{passive:!0})}),()=>{u&&(E.removeEventListener("keydown",$?re:H,$),E.removeEventListener("compositionstart",B),E.removeEventListener("compositionend",j)),S&&E.removeEventListener(a,q?C:ee,q),F.forEach(V=>{V.removeEventListener("scroll",m)}),window.clearTimeout(h)}},[s,o,u,S,a,n,r,A,i,g,_,H,$,re,ee,q,C]),c.useEffect(()=>{s.current.insideReactTree=!1},[s,S,a]);const pe=c.useMemo(()=>({onKeyDown:H,...v&&{[Bn[R]]:h=>{r(!1,h.nativeEvent,"reference-press")},...R!=="click"&&{onClick(h){r(!1,h.nativeEvent,"reference-press")}}}}),[H,r,v,R]),oe=c.useMemo(()=>({onKeyDown:H,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Hn[a]]:()=>{s.current.insideReactTree=!0}}),[H,a,s]);return c.useMemo(()=>i?{reference:pe,floating:oe}:{},[i,pe,oe])}function qn(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=kt(),s=c.useRef({}),[i]=c.useState(()=>yn()),u=Tn()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!y.isElement(f)&&Rn("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,a]=c.useState(r.reference),v=Q((f,p,l)=>{s.current.openEvent=f?p:void 0,i.emit("openchange",{open:f,event:p,reason:l,nested:u}),n?.(f,p,l)}),R=c.useMemo(()=>({setPositionReference:a}),[]),A=c.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return c.useMemo(()=>({dataRef:s,open:t,onOpenChange:v,elements:A,events:i,floatingId:o,refs:R}),[t,v,A,i,o,R])}function Kn(e){e===void 0&&(e={});const{nodeId:t}=e,n=qn({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=c.useState(null),[u,d]=c.useState(null),v=o?.domReference||s,R=c.useRef(null),A=Ke();Y(()=>{v&&(R.current=v)},[v]);const f=y.useFloating({...e,elements:{...o,...u&&{reference:u}}}),p=c.useCallback(g=>{const _=y.isElement(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),getClientRects:()=>g.getClientRects(),contextElement:g}:g;d(_),f.refs.setReference(_)},[f.refs]),l=c.useCallback(g=>{(y.isElement(g)||g===null)&&(R.current=g,i(g)),(y.isElement(f.refs.reference.current)||f.refs.reference.current===null||g!==null&&!y.isElement(g))&&f.refs.setReference(g)},[f.refs]),w=c.useMemo(()=>({...f.refs,setReference:l,setPositionReference:p,domReference:R}),[f.refs,l,p]),S=c.useMemo(()=>({...f.elements,domReference:v}),[f.elements,v]),b=c.useMemo(()=>({...f,...r,refs:w,elements:S,nodeId:t}),[f,w,S,t,r]);return Y(()=>{r.dataRef.current.floatingContext=b;const g=A?.nodesRef.current.find(_=>_.id===t);g&&(g.context=b)}),c.useMemo(()=>({...f,context:b,refs:w,elements:S}),[f,w,S,b])}function je(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[rt]:i,[ot]:u,...d}=e;s=d}return{...n==="floating"&&{tabIndex:-1,[mn]:""},...s,...t.map(i=>{const u=i?i[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((i,u)=>(u&&Object.entries(u).forEach(d=>{let[a,v]=d;if(!(o&&[rt,ot].includes(a)))if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof v=="function"){var R;(R=r.get(a))==null||R.push(v),i[a]=function(){for(var A,f=arguments.length,p=new Array(f),l=0;l<f;l++)p[l]=arguments[l];return(A=r.get(a))==null?void 0:A.map(w=>w(...p)).find(w=>w!==void 0)}}}else i[a]=v}),i),{})}}function Wn(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),o=c.useCallback(u=>je(u,e,"reference"),t),s=c.useCallback(u=>je(u,e,"floating"),n),i=c.useCallback(u=>je(u,e,"item"),r);return c.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const Un={name:"calendar",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M8 1.6a.9.9 0 0 1 .9.9V7a.9.9 0 0 1-1.8 0V5.9H4a.1.1 0 0 0-.1.1v3.105A.91.91 0 0 1 4 9.1h16.1V6a.1.1 0 0 0-.1-.1h-3.1V7a.9.9 0 1 1-1.8 0V5.9h-3.6a.9.9 0 1 1 0-1.8h3.6V2.5a.9.9 0 1 1 1.8 0v1.6H20c1.05 0 1.9.85 1.9 1.9v14a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V6c0-1.05.85-1.9 1.9-1.9h3.1V2.5a.9.9 0 0 1 .9-.9Zm12.1 9.3H4a.917.917 0 0 1-.1-.005V20a.1.1 0 0 0 .1.1h16a.1.1 0 0 0 .1-.1v-9.1ZM5.6 13.5a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm-10 4a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Zm5 0a.9.9 0 0 1 .9-.9h1a.9.9 0 1 1 0 1.8h-1a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',keywords:["calendar"],category:"other"},qe=e=>O.jsx(Lt.b,{...e,svg:Un});qe.displayName="IconCalendar";const Gn={"date-picker-calendar-container":"_date-picker-calendar-container_17f84_1"},Yn=_t.c.bind(Gn),Mt=Z.forwardRef(({calendarProps:e,drawerContentProps:t,value:n,onChange:r,overlayZIndex:o,...s},i)=>{const[u,d]=Z.useState(!1),[a,v]=Z.useState(!1),[R,A]=Z.useState(!1),f=Z.useRef(null),{context:p,refs:l,floatingStyles:w}=Kn({open:u,onOpenChange:C=>{s.readOnly||d(C)},placement:"bottom-start",middleware:[y.offset({mainAxis:10,crossAxis:-32}),y.flip()],whileElementsMounted:y.autoUpdate}),S=Vn(p),b=$n(p),{getFloatingProps:g,getReferenceProps:_}=Wn([S,b]),[$,q]=Z.useState(n);Z.useEffect(()=>{q(n)},[n]);const M=C=>{C?(q(C),r?.(C),(u||a)&&(d(!1),v(!1))):(q(void 0),r?.(void 0))},H=Z.useId();return Z.useLayoutEffect(()=>{const C=()=>{A(window.innerWidth<600)};return C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]),R?O.jsxs(Pe.Drawer,{open:a,onOpenChange:v,children:[O.jsx(Pe.Drawer.Trigger,{children:O.jsx(ze.DateField,{...s,startAdornment:O.jsx(qe,{size:"sm"}),id:H,value:$,onChange:C=>M(C),"data-testid":s["data-testid"]})}),O.jsx(Pe.Drawer.Content,{"data-testid":s["data-testid"]&&`${s["data-testid"]}-calendar`,fitToContent:!0,...t,zIndex:o,children:O.jsx(Ye.Calendar,{showOutsideDays:!0,...e,mode:"single",selected:$,onSelect:C=>M(C)})})]}):O.jsxs("div",{ref:i,children:[O.jsx(ze.DateField,{..._(s),ref:l.setReference,startAdornment:O.jsx(qe,{size:"sm"}),id:H,value:$,onChange:C=>M(C),"data-testid":s["data-testid"]}),u&&!s.readOnly&&O.jsx(Nn,{children:O.jsx(_n,{context:p,initialFocus:f,children:O.jsx("div",{"data-testid":s["data-testid"]&&`${s["data-testid"]}-calendar`,className:Yn("date-picker-calendar-container"),ref:l.setFloating,style:{...w,zIndex:o},...g(),children:O.jsx(Ye.Calendar,{showOutsideDays:!0,...e,mode:"single",selected:$,onSelect:C=>M(C),firstElementRef:f})})})})]})});Mt.displayName="DatePicker";exports.DatePicker=Mt;
|
|
2
|
-
//# sourceMappingURL=date-picker-C2Wtf7XQ.js.map
|