@radui/ui 0.0.45 → 0.0.47
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/README.md +2 -8
- package/dist/components/Accordion.d.ts +53 -0
- package/dist/components/Accordion.js +1 -1
- package/dist/components/AlertDialog.d.ts +62 -0
- package/dist/components/AlertDialog.js +1 -5
- package/dist/components/AspectRatio.d.ts +16 -0
- package/dist/components/AspectRatio.js +1 -1
- package/dist/components/Avatar.d.ts +39 -0
- package/dist/components/Avatar.js +1 -1
- package/dist/components/AvatarGroup.d.ts +41 -0
- package/dist/components/AvatarGroup.js +1 -1
- package/dist/components/AvatarPrimitiveFallback-CSD78PQE.js +1 -0
- package/dist/components/Badge.d.ts +15 -0
- package/dist/components/Badge.js +1 -1
- package/dist/components/BlockQuote.d.ts +18 -0
- package/dist/components/BlockQuote.js +1 -1
- package/dist/components/Button.d.ts +15 -0
- package/dist/components/Button.js +1 -1
- package/dist/components/Callout.d.ts +35 -0
- package/dist/components/Callout.js +1 -1
- package/dist/components/Card.d.ts +28 -0
- package/dist/components/Card.js +1 -1
- package/dist/components/Checkbox.d.ts +23 -0
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/CheckboxCards.d.ts +37 -0
- package/dist/components/CheckboxCards.js +1 -1
- package/dist/components/CheckboxGroup.d.ts +38 -0
- package/dist/components/CheckboxGroup.js +1 -1
- package/dist/components/CheckboxGroupPrimitive-PcT11bev.js +1 -0
- package/dist/components/Code.d.ts +13 -0
- package/dist/components/Code.js +1 -1
- package/dist/components/Collapsible.d.ts +30 -0
- package/dist/components/Collapsible.js +1 -1
- package/dist/components/ContextMenu.d.ts +52 -0
- package/dist/components/ContextMenu.js +1 -0
- package/dist/components/DataList.d.ts +24 -0
- package/dist/components/DataList.js +1 -1
- package/dist/components/Dialog.d.ts +51 -0
- package/dist/components/Dialog.js +1 -5
- package/dist/components/Disclosure.d.ts +41 -0
- package/dist/components/Disclosure.js +1 -1
- package/dist/components/DropdownMenu.d.ts +52 -0
- package/dist/components/DropdownMenu.js +1 -0
- package/dist/components/Em.d.ts +15 -0
- package/dist/components/Em.js +1 -1
- package/dist/components/Heading.d.ts +293 -0
- package/dist/components/Heading.js +1 -1
- package/dist/components/HoverCard.d.ts +37 -0
- package/dist/components/HoverCard.js +1 -5
- package/dist/components/Kbd.d.ts +13 -0
- package/dist/components/Kbd.js +1 -1
- package/dist/components/Link.d.ts +17 -0
- package/dist/components/Link.js +1 -1
- package/dist/components/MenuPrimitive-M690K2sI.js +1 -0
- package/dist/components/Menubar.d.ts +60 -0
- package/dist/components/Menubar.js +1 -0
- package/dist/components/NumberField.d.ts +43 -0
- package/dist/components/NumberField.js +1 -0
- package/dist/components/Progress.d.ts +24 -0
- package/dist/components/Progress.js +1 -1
- package/dist/components/Quote.d.ts +15 -0
- package/dist/components/Quote.js +1 -1
- package/dist/components/Radio.d.ts +14 -0
- package/dist/components/Radio.js +1 -1
- package/dist/components/RadioCards.d.ts +41 -0
- package/dist/components/RadioCards.js +1 -1
- package/dist/components/RadioGroup.d.ts +54 -0
- package/dist/components/RadioGroup.js +1 -1
- package/dist/components/RadioGroupPrimitive-CUgW2PyL.js +1 -0
- package/dist/components/ScrollArea.d.ts +18 -0
- package/dist/components/ScrollArea.js +1 -1
- package/dist/components/Select.d.ts +37 -0
- package/dist/components/Select.js +1 -5
- package/dist/components/Separator.d.ts +18 -0
- package/dist/components/Separator.js +1 -1
- package/dist/components/Skeleton.d.ts +18 -0
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/Slider.d.ts +29 -0
- package/dist/components/Slider.js +1 -1
- package/dist/components/Strong.d.ts +14 -0
- package/dist/components/Strong.js +1 -1
- package/dist/components/Switch.d.ts +35 -0
- package/dist/components/Switch.js +1 -1
- package/dist/components/TabNav.d.ts +31 -0
- package/dist/components/TabNav.js +1 -1
- package/dist/components/Table.d.ts +35 -0
- package/dist/components/Table.js +1 -1
- package/dist/components/Tabs.d.ts +64 -0
- package/dist/components/Tabs.js +1 -1
- package/dist/components/Text.d.ts +283 -0
- package/dist/components/Text.js +1 -1
- package/dist/components/TextArea.d.ts +24 -0
- package/dist/components/TextArea.js +1 -1
- package/dist/components/Theme.d.ts +13 -0
- package/dist/components/Theme.js +1 -1
- package/dist/components/Toggle.d.ts +45 -0
- package/dist/components/Toggle.js +1 -1
- package/dist/components/ToggleGroup.d.ts +42 -0
- package/dist/components/ToggleGroup.js +1 -1
- package/dist/components/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip.js +1 -5
- package/dist/components/Tree.d.ts +20 -0
- package/dist/components/Tree.js +1 -1
- package/dist/components/VisuallyHidden.d.ts +16 -0
- package/dist/components/VisuallyHidden.js +1 -1
- package/dist/components/clsx-BaVHROc5.js +1 -0
- package/dist/components/floating-ui.react-jh3caJnc.js +5 -0
- package/dist/components/index-8D8A0ALD.js +1 -0
- package/dist/components/index-BNg6qXF-.js +1 -0
- package/dist/components/index-BVxS3Ixi.js +1 -0
- package/dist/components/index-CaFVBHZz.js +1 -0
- package/dist/components/index-CyT0hgZn.js +1 -0
- package/dist/components/index-DAboJYKJ.js +1 -0
- package/dist/components/index-DIw4zyNG.js +1 -0
- package/dist/components/index-DpUtikes.js +1 -0
- package/dist/components/index-ZMIfeyHL.js +1 -0
- package/dist/components/index-fkj4Fdgt.js +1 -0
- package/dist/components/setupTests.d.ts +3 -0
- package/dist/components/tslib.es6-BtVxab8e.js +1 -0
- package/dist/themes/default.css +1 -1
- package/package.json +139 -47
- package/dist/components/Dropdown.js +0 -1
|
@@ -1,5 +1 @@
|
|
|
1
|
-
'use client';import
|
|
2
|
-
/*!
|
|
3
|
-
* tabbable 6.2.0
|
|
4
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
|
-
*/var xe=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Re="undefined"==typeof Element,Ce=Re?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Se=!Re&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Oe=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Ae=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!Oe(l,!1))if("SLOT"===l.tagName){var c=l.assignedElements(),u=e(c.length?c:l.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:l,candidates:u})}else{Ce.call(l,xe)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var a=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),s=!Oe(a,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(a&&s){var f=e(!0===a?l.children:a.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return o},ke=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Le=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!ke(e)?0:e.tabIndex},Ie=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Te=function(e){return"INPUT"===e.tagName},Pe=function(e){return function(e){return Te(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Se(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Me=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},De=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ce.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ce.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Me(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,c=Se(e);if(l&&!l.shadowRoot&&!0===r(l))return Me(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=i}if(function(e){var t,n,r,o,i=e&&Se(e),l=null===(t=i)||void 0===t?void 0:t.host,c=!1;if(i&&i!==e)for(c=!!(null!==(n=l)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(l)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&l;){var u,a,s;c=!(null===(a=l=null===(u=i=Se(l))||void 0===u?void 0:u.host)||void 0===a||null===(s=a.ownerDocument)||void 0===s||!s.contains(l))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Ne=function(e,t){return!(t.disabled||Oe(t)||function(e){return Te(e)&&"hidden"===e.type}(t)||De(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Ce.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Fe=function(e,t){return!(Pe(t)||Le(t)<0||!Ne(e,t))},Ve=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},We=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,c=function(e,t){var n=Le(e);return n<0&&t&&!ke(e)?0:n}(l,i),u=i?e(t.candidates):l;0===c?i?n.push.apply(n,u):n.push(l):r.push({documentOrder:o,tabIndex:c,item:t,isScope:i,content:u})})),r.sort(Ie).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Be=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Ae([e],t.includeContainer,{filter:Fe.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ve}):function(e,t,n){if(Oe(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(xe));return t&&Ce.call(e,xe)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Fe.bind(null,t)),We(n)};function je(e,t,n){let{reference:r,floating:o}=e;const i=he(t),l=ge(t),c=ve(l),u=de(t),a="y"===i,s=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let p;switch(u){case"top":p={x:s,y:r.y-o.height};break;case"bottom":p={x:s,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(pe(t)){case"start":p[l]-=d*(n&&a?-1:1);break;case"end":p[l]+=d*(n&&a?-1:1)}return p}async function He(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:c,strategy:u}=e,{boundary:a="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=fe(t,e),m=we(p),v=c[d?"floating"===f?"reference":"floating":f],h=Ee(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:s,strategy:u})),g="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Ee(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:y,strategy:u}):g);return{top:(h.top-w.top+m.top)/b.y,bottom:(w.bottom-h.bottom+m.bottom)/b.y,left:(h.left-w.left+m.left)/b.x,right:(w.right-h.right+m.right)/b.x}}function qe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _e(e){return re.some((t=>e[t]>=0))}function Ke(e){const t=W(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=I(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,c=le(n)!==i||le(r)!==l;return c&&(n=i,r=l),{width:n,height:r,$:c}}function Ue(e){return L(e)?e:e.contextElement}function Xe(e){const t=Ue(e);if(!I(t))return ce(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ke(t);let l=(i?le(n.width):n.width)/r,c=(i?le(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const ze=ce(0);function Ye(e){const t=O(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ze}function $e(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ue(e);let l=ce(1);t&&(r?L(r)&&(l=Xe(r)):l=Xe(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==O(e))&&t}(i,n,r)?Ye(i):ce(0);let u=(o.left+c.x)/l.x,a=(o.top+c.y)/l.y,s=o.width/l.x,f=o.height/l.y;if(i){const e=O(i),t=r&&L(r)?O(r):r;let n=e,o=_(n);for(;o&&r&&t!==n;){const e=Xe(o),t=o.getBoundingClientRect(),r=W(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,a*=e.y,s*=e.x,f*=e.y,u+=i,a+=l,n=O(o),o=_(n)}}return Ee({width:s,height:f,x:u,y:a})}function Ge(e,t){const n=B(e).scrollLeft;return t?t.left+n:$e(A(e)).left+n}function Ze(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Ge(e,r)),y:r.top+t.scrollTop}}function Qe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=O(e),r=A(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,c=0,u=0;if(o){i=o.width,l=o.height;const e=F();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,u=o.offsetTop)}return{width:i,height:l,x:c,y:u}}(e,n);else if("document"===t)r=function(e){const t=A(e),n=B(e),r=e.ownerDocument.body,o=ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Ge(e);const c=-n.scrollTop;return"rtl"===W(r).direction&&(l+=ie(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:c}}(A(e));else if(L(t))r=function(e,t){const n=$e(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=I(e)?Xe(e):ce(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ye(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ee(r)}function Je(e,t){const n=j(e);return!(n===t||!L(n)||V(n))&&("fixed"===W(n).position||Je(n,t))}function et(e,t,n){const r=I(t),o=A(t),i="fixed"===n,l=$e(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=ce(0);if(r||!r&&!i)if(("body"!==S(t)||P(o))&&(c=B(t)),r){const e=$e(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=Ge(o));const a=!o||r||i?ce(0):Ze(o,c);return{x:l.left+c.scrollLeft-u.x-a.x,y:l.top+c.scrollTop-u.y-a.y,width:l.width,height:l.height}}function tt(e){return"static"===W(e).position}function nt(e,t){if(!I(e)||"fixed"===W(e).position)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function rt(e,t){const n=O(e);if(D(e))return n;if(!I(e)){let t=j(e);for(;t&&!V(t);){if(L(t)&&!tt(t))return t;t=j(t)}return n}let r=nt(e,t);for(;r&&M(r)&&tt(r);)r=nt(r,t);return r&&V(r)&&tt(r)&&!N(r)?n:r||function(e){let t=j(e);for(;I(t)&&!V(t);){if(N(t))return t;if(D(t))return null;t=j(t)}return null}(e)||n}const ot={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=A(r),c=!!t&&D(t.floating);if(r===l||c&&i)return n;let u={scrollLeft:0,scrollTop:0},a=ce(1);const s=ce(0),f=I(r);if((f||!f&&!i)&&(("body"!==S(r)||P(l))&&(u=B(r)),I(r))){const e=$e(r);a=Xe(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}const d=!l||f||i?ce(0):Ze(l,u,!0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-u.scrollLeft*a.x+s.x+d.x,y:n.y*a.y-u.scrollTop*a.y+s.y+d.y}},getDocumentElement:A,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?D(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=q(e,[],!1).filter((e=>L(e)&&"body"!==S(e))),o=null;const i="fixed"===W(e).position;let l=i?j(e):e;for(;L(l)&&!V(l);){const t=W(l),n=N(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||P(l)&&!n&&Je(e,l))?r=r.filter((e=>e!==l)):o=t,l=j(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],c=i.reduce(((e,n)=>{const r=Qe(t,n,o);return e.top=ie(r.top,e.top),e.right=oe(r.right,e.right),e.bottom=oe(r.bottom,e.bottom),e.left=ie(r.left,e.left),e}),Qe(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:rt,getElementRects:async function(e){const t=this.getOffsetParent||rt,n=this.getDimensions,r=await n(e.floating);return{reference:et(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ke(e);return{width:t,height:n}},getScale:Xe,isElement:L,isRTL:function(e){return"rtl"===W(e).direction}},it=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:c}=t,u=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=de(n),c=pe(n),u="y"===he(n),a=["left","top"].includes(l)?-1:1,s=i&&u?-1:1,f=fe(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&"number"==typeof m&&(p="end"===c?-1*m:m),u?{x:p*s,y:d*a}:{x:d*a,y:p*s}}(t,e);return l===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}}},lt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=fe(e,t),a={x:n,y:r},s=await He(t,u),f=he(de(o)),d=me(f);let p=a[d],m=a[f];if(i){const e="y"===d?"bottom":"right";p=se(p+s["y"===d?"top":"left"],p,p-s[e])}if(l){const e="y"===f?"bottom":"right";m=se(m+s["y"===f?"top":"left"],m,m-s[e])}const v=c.fn({...t,[d]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[d]:i,[f]:l}}}}}},ct=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:c,platform:u,elements:a}=t,{mainAxis:s=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...h}=fe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=de(o),y=he(c),b=de(c)===c,w=await(null==u.isRTL?void 0:u.isRTL(a.floating)),E=d||(b||!v?[be(c)]:function(e){const t=be(e);return[ye(e),t,ye(t)]}(c)),x="none"!==m;!d&&x&&E.push(...function(e,t,n,r){const o=pe(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(de(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(ye)))),i}(c,v,m,w));const R=[c,...E],C=await He(t,h),S=[];let O=(null==(r=i.flip)?void 0:r.overflows)||[];if(s&&S.push(C[g]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=pe(e),o=ge(e),i=ve(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=be(l)),[l,be(l)]}(o,l,w);S.push(C[e[0]],C[e[1]])}if(O=[...O,{placement:o,overflows:S}],!S.every((e=>e<=0))){var A,k;const e=((null==(A=i.flip)?void 0:A.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(k=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var L;const e=null==(L=O.filter((e=>{if(x){const t=he(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},ut=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=fe(e,t);switch(r){case"referenceHidden":{const e=qe(await He(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_e(e)}}}case"escaped":{const e=qe(await He(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_e(e)}}}default:return{}}}}},at=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:c,middlewareData:u}=t,{element:a,padding:s=0}=fe(e,t)||{};if(null==a)return{};const f=we(s),d={x:n,y:r},p=ge(o),m=ve(p),v=await l.getDimensions(a),h="y"===p,g=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-d[p]-i.floating[m],E=d[p]-i.reference[p],x=await(null==l.getOffsetParent?void 0:l.getOffsetParent(a));let R=x?x[b]:0;R&&await(null==l.isElement?void 0:l.isElement(x))||(R=c.floating[b]||i.floating[m]);const C=w/2-E/2,S=R/2-v[m]/2-1,O=oe(f[g],S),A=oe(f[y],S),k=O,L=R-v[m]-A,I=R/2-v[m]/2+C,T=se(k,I,L),P=!u.arrow&&null!=pe(o)&&I!==T&&i.reference[m]/2-(I<k?O:A)-v[m]/2<0,M=P?I<k?I-k:I-L:0;return{[p]:d[p]+M,data:{[p]:T,centerOffset:I-T-M,...P&&{alignmentOffset:M}},reset:P}}}),st=(e,t,n)=>{const r=new Map,o={platform:ot,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,c=i.filter(Boolean),u=await(null==l.isRTL?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:f}=je(a,r,u),d=r,p={},m=0;for(let n=0;n<c.length;n++){const{name:i,fn:v}=c[n],{x:h,y:g,data:y,reset:b}=await v({x:s,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:a,platform:l,elements:{reference:e,floating:t}});s=null!=h?h:s,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(a=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:s,y:f}=je(a,d,u))),n=-1)}return{x:s,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var ft="undefined"!=typeof document?a:l;function dt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!dt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!dt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function pt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mt(e,t){const n=pt(e);return Math.round(t*n)/n}function vt(t){const n=e.useRef(t);return ft((()=>{n.current=t})),n}const ht=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?at({element:n.current,padding:r}).fn(t):{}:n?at({element:n,padding:r}).fn(t):{};var o}});function gt(t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)}))}),t)}const yt={...e},bt=yt.useInsertionEffect||(e=>e());function wt(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return bt((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}var Et="undefined"!=typeof document?a:l;let xt=!1,Rt=0;const Ct=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Rt++;const St=yt.useId||function(){const[t,n]=e.useState((()=>xt?Ct():void 0));return Et((()=>{null==t&&n(Ct())}),[]),e.useEffect((()=>{xt=!0}),[]),t};let Ot;"production"!==process.env.NODE_ENV&&(Ot=new Set);const At=e.forwardRef((function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:l}},width:c=14,height:u=7,tipRadius:a=0,strokeWidth:s=0,staticOffset:p,stroke:m,d:v,style:{transform:h,...g}={},...y}=t;"production"!==process.env.NODE_ENV&&(n||function(){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(" ");var i;null!=(e=Ot)&&e.has(o)||(null==(i=Ot)||i.add(o),console.warn(o))}("The `ref` prop is required for `FloatingArrow`."));const b=St(),[w,E]=e.useState(!1);if(Et((()=>{if(!o)return;"rtl"===W(o).direction&&E(!0)}),[o]),!o)return null;const[x,R]=r.split("-"),C="top"===x||"bottom"===x;let S=p;(C&&null!=l&&l.x||!C&&null!=l&&l.y)&&(S=null);const O=2*s,A=O/2,k=c/2*(a/-8+1),L=u/2*a/4,I=!!v,T=S&&"end"===R?"bottom":"top";let P=S&&"end"===R?"right":"left";S&&w&&(P="end"===R?"left":"right");const M=null!=(null==i?void 0:i.x)?S||i.x:"",D=null!=(null==i?void 0:i.y)?S||i.y:"",N=v||"M0,0 H"+c+" L"+(c-k)+","+(u-L)+" Q"+c/2+","+u+" "+k+","+(u-L)+" Z",F={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[x];return f("svg",{...y,"aria-hidden":!0,ref:n,width:I?c:c+O,height:c,viewBox:"0 0 "+c+" "+(u>c?u:c),style:{position:"absolute",pointerEvents:"none",[P]:M,[T]:D,[x]:C||I?"100%":"calc(100% - "+O/2+"px)",transform:[F,h].filter((e=>!!e)).join(" "),...g},children:[O>0&&d("path",{clipPath:"url(#"+b+")",fill:"none",stroke:m,strokeWidth:O+(v?0:1),d:N}),d("path",{stroke:O&&!v?y.fill:"none",d:N}),d("clipPath",{id:b,children:d("rect",{x:-A,y:A*(I?-1:1),width:c+O,height:c})})]})}));const kt=e.createContext(null),Lt=e.createContext(null),It=()=>{var t;return(null==(t=e.useContext(kt))?void 0:t.id)||null},Tt=()=>e.useContext(Lt);function Pt(e){return"data-floating-ui-"+e}function Mt(e){const t=r(e);return Et((()=>{t.current=e})),t}const Dt=Pt("safe-polygon");function Nt(e,t,n){return n&&!Z(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Ft=0;function Vt(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ft);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Ft=requestAnimationFrame(i)}function Wt(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function Bt(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let jt=new WeakMap,Ht=new WeakSet,qt={},_t=0;const Kt=e=>e&&(e.host||Kt(e.parentNode));function Ut(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=(c=t,e.map((e=>{if(c.contains(e))return e;const t=Kt(e);return c.contains(t)?t:null})).filter((e=>null!=e)));var c;const u=new Set,a=new Set(l),s=[];qt[o]||(qt[o]=new WeakMap);const f=qt[o];return l.forEach((function e(t){if(!t||u.has(t))return;u.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||a.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==S(t))if(u.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=jt.get(t)||0,l=i?r+1:r,c=(f.get(t)||0)+1;jt.set(t,l),f.set(t,c),s.push(t),1===l&&n&&Ht.add(t),1===c&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),u.clear(),_t++,()=>{s.forEach((e=>{const t=jt.get(e)||0,n=i?t-1:t,r=(f.get(e)||0)-1;jt.set(e,n),f.set(e,r),n||(!Ht.has(e)&&i&&e.removeAttribute(i),Ht.delete(e)),r||e.removeAttribute(o)})),_t--,_t||(jt=new WeakMap,jt=new WeakMap,Ht=new WeakSet,qt={})}}function Xt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=Q(e[0]).body;return Ut(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const zt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Yt(e,t){const n=Be(e,zt());"prev"===t&&n.reverse();const r=n.indexOf(K(Q(e)));return n.slice(r+1)[0]}function $t(){return Yt(document.body,"next")}function Gt(){return Yt(document.body,"prev")}function Zt(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!U(n,r)}function Qt(e){Be(e,zt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Jt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const en={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};function tn(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const nn=e.forwardRef((function(t,n){const[r,o]=e.useState();Et((()=>($()&&o("button"),document.addEventListener("keydown",tn),()=>{document.removeEventListener("keydown",tn)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[Pt("focus-guard")]:"",style:en};return d("span",{...t,...i})})),rn=e.createContext(null),on=Pt("portal");const ln=()=>e.useContext(rn),cn="data-floating-ui-focusable";function un(e){return e?e.hasAttribute(cn)?e:e.querySelector("["+cn+"]")||e:null}let an=[];function sn(e){an=an.filter((e=>e.isConnected)),e&&"body"!==S(e)&&(an.push(e),an.length>20&&(an=an.slice(-20)))}function fn(){return an.slice().reverse().find((e=>e.isConnected))}function dn(e){const t=zt();return function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Ce.call(e,xe)&&Fe(t,e)}(e,t)?e:Be(e,t)[0]||e}const pn=e.forwardRef((function(e,t){return d("button",{...e,type:"button",ref:t,tabIndex:-1,style:en})}));let mn=0;let vn=()=>{};const hn=e.forwardRef((function(e,t){const{lockScroll:n=!1,...r}=e;return Et((()=>{if(n)return mn++,1===mn&&(vn=function(){const e=/iP(hone|ad|od)|iOS/.test(X()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var l,c;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{mn--,0===mn&&vn()}}),[n]),d("div",{ref:t,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})})),gn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},yn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},bn=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function wn(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=St(),l=e.useRef({}),[c]=e.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),u=null!=It();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!L(e)&&function(){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(" ");var i;null!=(e=Ot)&&e.has(o)||(null==(i=Ot)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,s]=e.useState(o.reference),f=wt(((e,t,n)=>{l.current.openEvent=e?t:void 0,c.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==r||r(e,t,n)})),d=e.useMemo((()=>({setPositionReference:s})),[]),p=e.useMemo((()=>({reference:a||o.reference||null,floating:o.floating||null,domReference:o.reference})),[a,o.reference,o.floating]);return e.useMemo((()=>({dataRef:l,open:n,onOpenChange:f,elements:p,events:c,floatingId:i,refs:d})),[n,f,p,c,i,d])}const En="active",xn="selected";function Rn(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[En]:t,[xn]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[cn]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var l;o&&[En,xn].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Cn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var Sn={Portal:function(t){const{children:n,id:r,root:o,preserveTabOrder:i=!0}=t,l=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=St(),i=ln(),[l,c]=e.useState(null),u=e.useRef(null);return Et((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{u.current=null}))}),[l]),Et((()=>{if(!o)return;if(u.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(on,""),e.appendChild(t),u.current=t,c(t)}),[n,o]),Et((()=>{if(null===r)return;if(!o)return;if(u.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!L(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const l=document.createElement("div");l.id=o,l.setAttribute(on,""),e=t||e,e.appendChild(l),u.current=l,c(l)}),[n,r,o,i]),l}({id:r,root:o}),[c,u]=e.useState(null),a=e.useRef(null),s=e.useRef(null),p=e.useRef(null),v=e.useRef(null),h=null==c?void 0:c.modal,g=null==c?void 0:c.open,y=!!c&&!c.modal&&c.open&&i&&!(!o&&!l);return e.useEffect((()=>{if(l&&i&&!h)return l.addEventListener("focusin",e,!0),l.addEventListener("focusout",e,!0),()=>{l.removeEventListener("focusin",e,!0),l.removeEventListener("focusout",e,!0)};function e(e){if(l&&Zt(e)){("focusin"===e.type?Jt:Qt)(l)}}}),[l,i,h]),e.useEffect((()=>{l&&(g||Jt(l))}),[g,l]),f(rn.Provider,{value:e.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:a,afterOutsideRef:s,beforeInsideRef:p,afterInsideRef:v,portalNode:l,setFocusManagerState:u})),[i,l]),children:[y&&l&&d(nn,{"data-type":"outside",ref:a,onFocus:e=>{if(Zt(e,l)){var t;null==(t=p.current)||t.focus()}else{const e=Gt()||(null==c?void 0:c.domReference);null==e||e.focus()}}}),y&&l&&d("span",{"aria-owns":l.id,style:en}),l&&m.createPortal(n,l),y&&l&&d(nn,{"data-type":"outside",ref:s,onFocus:e=>{if(Zt(e,l)){var t;null==(t=v.current)||t.focus()}else{const t=$t()||(null==c?void 0:c.domReference);null==t||t.focus(),(null==c?void 0:c.closeOnFocusOut)&&(null==c||c.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})},Overlay:hn,FocusManager:function(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:c=0,returnFocus:u=!0,restoreFocus:a=!1,modal:s=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:v=!0,outsideElementsInert:h=!1}=t,{open:g,onOpenChange:y,events:b,dataRef:w,elements:{domReference:E,floating:x}}=n,R=wt((()=>{var e;return null==(e=w.current.floatingContext)?void 0:e.nodeId})),C="number"==typeof c&&c<0,S=!!(O=E)&&"combobox"===O.getAttribute("role")&&te(O)&&C;var O;const A="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,k=!A||l,L=!k||A&&h,T=Mt(i),P=Mt(c),M=Mt(u),D=Tt(),N=ln(),F=e.useRef(null),V=e.useRef(null),W=e.useRef(!1),B=e.useRef(!1),j=e.useRef(-1),H=null!=N,q=un(x),_=wt((function(e){return void 0===e&&(e=q),e?Be(e,zt()):[]})),X=wt((e=>{const t=_(e);return T.current.map((e=>E&&"reference"===e?E:q&&"floating"===e?q:t)).filter(Boolean).flat()}));e.useEffect((()=>{if(o)return;if(!s)return;function e(e){if("Tab"===e.key){U(q,K(Q(q)))&&0===_().length&&!S&&ne(e);const t=X(),n=ee(e);"reference"===T.current[0]&&n===E&&(ne(e),e.shiftKey?Vt(t[t.length-1]):Vt(t[1])),"floating"===T.current[1]&&n===q&&e.shiftKey&&(ne(e),Vt(t[0]))}}const t=Q(q);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,E,q,s,T,S,_,X]),e.useEffect((()=>{if(!o&&x)return x.addEventListener("focusin",e),()=>{x.removeEventListener("focusin",e)};function e(e){const t=ee(e),n=_().indexOf(t);-1!==n&&(j.current=n)}}),[o,x,_]),e.useEffect((()=>{if(!o&&v)return x&&I(E)?(E.addEventListener("focusout",t),E.addEventListener("pointerdown",e),x.addEventListener("focusout",t),()=>{E.removeEventListener("focusout",t),E.removeEventListener("pointerdown",e),x.removeEventListener("focusout",t)}):void 0;function e(){B.current=!0,setTimeout((()=>{B.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=R(),r=!(U(E,t)||U(x,t)||U(t,x)||U(null==N?void 0:N.portalNode,t)||null!=t&&t.hasAttribute(Pt("focus-guard"))||D&&(Bt(D.nodesRef.current,n).find((e=>{var n,r;return U(null==(n=e.context)?void 0:n.elements.floating,t)||U(null==(r=e.context)?void 0:r.elements.domReference,t)}))||Wt(D.nodesRef.current,n).find((e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,un(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t}))));if(a&&r&&K(Q(q))===Q(q).body){I(q)&&q.focus();const e=j.current,t=_(),n=t[e]||t[t.length-1]||q;I(n)&&n.focus()}!S&&s||!t||!r||B.current||t===fn()||(W.current=!0,y(!1,e,"focus-out"))}))}}),[o,E,x,q,s,D,N,y,v,a,_,S,R]);const z=e.useRef(null),$=e.useRef(null),Z=gt([z,null==N?void 0:N.beforeInsideRef]),J=gt([$,null==N?void 0:N.afterInsideRef]);function re(e){return!o&&m&&s?d(pn,{ref:"start"===e?F:V,onClick:e=>y(!1,e.nativeEvent),children:"string"==typeof m?m:"Dismiss"}):null}e.useEffect((()=>{var e;if(o)return;if(!x)return;const t=Array.from((null==N||null==(e=N.portalNode)?void 0:e.querySelectorAll("["+Pt("portal")+"]"))||[]),n=D&&!s?Wt(null==D?void 0:D.nodesRef.current,R()).map((e=>{var t;return null==(t=e.context)?void 0:t.elements.floating})):[],r=[x,...t,...n,F.current,V.current,z.current,$.current,null==N?void 0:N.beforeOutsideRef.current,null==N?void 0:N.afterOutsideRef.current,T.current.includes("reference")||S?E:null].filter((e=>null!=e)),i=s||S?Xt(r,!L,L):Xt(r);return()=>{i()}}),[o,E,x,s,T,N,S,k,L,D,R]),Et((()=>{if(o||!I(q))return;const e=K(Q(q));queueMicrotask((()=>{const t=X(q),n=P.current,r=("number"==typeof n?t[n]:n.current)||q,o=U(q,e);C||o||!g||Vt(r,{preventScroll:r===q})}))}),[o,g,q,C,X,P]),Et((()=>{if(o||!q)return;let e=!1;const t=Q(q),n=K(t);let r=w.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:l}=t;n&&(r=i),"escape-key"===o&&E&&sn(E),["hover","safe-polygon"].includes(o)&&"mouseleave"===i.type&&(W.current=!0),"outside-press"===o&&(l?(W.current=!1,e=!0):W.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(G()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||Y(i)))}sn(n),b.on("openchange",i);const l=t.createElement("span");return l.setAttribute("tabindex","-1"),l.setAttribute("aria-hidden","true"),Object.assign(l.style,en),H&&E&&E.insertAdjacentElement("afterend",l),()=>{b.off("openchange",i);const n=K(t),o=U(x,n)||D&&Bt(D.nodesRef.current,R()).some((e=>{var t;return U(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&E&&sn(E);const c="boolean"==typeof M.current?fn()||l:M.current.current||l;queueMicrotask((()=>{const r=dn(c);M.current&&!W.current&&I(r)&&(r===n||n===t.body||o)&&r.focus({preventScroll:e}),l.remove()}))}}),[o,x,q,M,w,b,D,H,E,R]),e.useEffect((()=>{queueMicrotask((()=>{W.current=!1}))}),[o]),Et((()=>{if(!o&&N)return N.setFocusManagerState({modal:s,closeOnFocusOut:v,open:g,onOpenChange:y,domReference:E}),()=>{N.setFocusManagerState(null)}}),[o,N,s,g,y,v,E]),Et((()=>{if(o)return;if(!q)return;if("function"!=typeof MutationObserver)return;if(C)return;const e=()=>{const e=q.getAttribute("tabindex"),t=_(),n=K(Q(x)),r=t.indexOf(n);-1!==r&&(j.current=r),T.current.includes("floating")||n!==E&&0===t.length?"0"!==e&&q.setAttribute("tabindex","0"):"-1"!==e&&q.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(q,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,x,q,E,T,_,C]);const oe=!o&&k&&(!s||!S)&&(H||s);return f(p,{children:[oe&&d(nn,{"data-type":"inside",ref:Z,onFocus:e=>{if(s){const e=X();Vt("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=N&&N.preserveTabOrder&&N.portalNode)if(W.current=!1,Zt(e,N.portalNode)){const e=$t()||E;null==e||e.focus()}else{var t;null==(t=N.beforeOutsideRef.current)||t.focus()}}}),!S&&re("start"),r,re("end"),oe&&d(nn,{"data-type":"inside",ref:J,onFocus:e=>{if(s)Vt(X()[0]);else if(null!=N&&N.preserveTabOrder&&N.portalNode)if(v&&(W.current=!0),Zt(e,N.portalNode)){const e=Gt()||E;null==e||e.focus()}else{var t;null==(t=N.afterOutsideRef.current)||t.focus()}}})]})},useFloating:function(t){void 0===t&&(t={});const{nodeId:n}=t,r=wn({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,i=o.elements,[l,c]=e.useState(null),[u,a]=e.useState(null),s=(null==i?void 0:i.domReference)||l,f=e.useRef(null),d=Tt();Et((()=>{s&&(f.current=s)}),[s]);const p=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:u=!0,whileElementsMounted:a,open:s}=t,[f,d]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=e.useState(o);dt(p,o)||v(o);const[h,g]=e.useState(null),[y,b]=e.useState(null),w=e.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),E=e.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),x=l||h,R=c||y,C=e.useRef(null),S=e.useRef(null),O=e.useRef(f),A=null!=a,k=vt(a),L=vt(i),I=vt(s),T=e.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:n,strategy:r,middleware:p};L.current&&(e.platform=L.current),st(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==I.current};P.current&&!dt(O.current,t)&&(O.current=t,m.flushSync((()=>{d(t)})))}))}),[p,n,r,L,I]);ft((()=>{!1===s&&O.current.isPositioned&&(O.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const P=e.useRef(!1);ft((()=>(P.current=!0,()=>{P.current=!1})),[]),ft((()=>{if(x&&(C.current=x),R&&(S.current=R),x&&R){if(k.current)return k.current(x,R,T);T()}}),[x,R,T,k,A]);const M=e.useMemo((()=>({reference:C,floating:S,setReference:w,setFloating:E})),[w,E]),D=e.useMemo((()=>({reference:x,floating:R})),[x,R]),N=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=mt(D.floating,f.x),n=mt(D.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+n+"px)",...pt(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,u,D.floating,f.x,f.y]);return e.useMemo((()=>({...f,update:T,refs:M,elements:D,floatingStyles:N})),[f,T,M,D,N])}({...t,elements:{...i,...u&&{reference:u}}}),v=e.useCallback((e=>{const t=L(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),p.refs.setReference(t)}),[p.refs]),h=e.useCallback((e=>{(L(e)||null===e)&&(f.current=e,c(e)),(L(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!L(e))&&p.refs.setReference(e)}),[p.refs]),g=e.useMemo((()=>({...p.refs,setReference:h,setPositionReference:v,domReference:f})),[p.refs,h,v]),y=e.useMemo((()=>({...p.elements,domReference:s})),[p.elements,s]),b=e.useMemo((()=>({...p,...o,refs:g,elements:y,nodeId:n})),[p,g,y,n,o]);return Et((()=>{o.dataRef.current.floatingContext=b;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...p,context:b,refs:g,elements:y})),[p,g,y,b])},Arrow:At,arrow:(e,t)=>({...ht(e),options:[e,t]}),useRole:function(t,n){var r;void 0===n&&(n={});const{open:o,floatingId:i}=t,{enabled:l=!0,role:c="dialog"}=n,u=null!=(r=Cn.get(c))?r:c,a=St(),s=null!=It(),f=e.useMemo((()=>"tooltip"===u||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===u?"dialog":u,"aria-controls":o?i:void 0,..."listbox"===u&&{role:"combobox"},..."menu"===u&&{id:a},..."menu"===u&&s&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[u,i,s,o,a,c]),d=e.useMemo((()=>{const e={id:i,...u&&{role:u}};return"tooltip"===u||"label"===c?e:{...e,..."menu"===u&&{"aria-labelledby":a}}}),[u,i,a,c]),p=e.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(c){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[i,c]);return e.useMemo((()=>l?{reference:f,floating:d,item:p}:{}),[l,f,d,p])},useFocus:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,events:i,dataRef:l,elements:c}=t,{enabled:u=!0,visibleOnly:a=!0}=n,s=e.useRef(!1),f=e.useRef(),d=e.useRef(!0);e.useEffect((()=>{if(!u)return;const e=O(c.domReference);function t(){!r&&I(c.domReference)&&c.domReference===K(Q(c.domReference))&&(s.current=!0)}function n(){d.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",n,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",n,!0)}}),[c.domReference,r,u]),e.useEffect((()=>{if(u)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(s.current=!0)}}),[i,u]),e.useEffect((()=>()=>{clearTimeout(f.current)}),[]);const p=e.useMemo((()=>({onPointerDown(e){Y(e.nativeEvent)||(d.current=!1)},onMouseLeave(){s.current=!1},onFocus(e){if(s.current)return;const t=ee(e.nativeEvent);if(a&&L(t))try{if($()&&X().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints)throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!d.current&&!te(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){s.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=L(t)&&t.hasAttribute(Pt("focus-guard"))&&"outside"===t.getAttribute("data-type");f.current=window.setTimeout((()=>{var e;const i=K(c.domReference?c.domReference.ownerDocument:document);(t||i!==c.domReference)&&(U(null==(e=l.current.floatingContext)?void 0:e.refs.floating.current,i)||U(c.domReference,i)||r||o(!1,n,"focus"))}))}})),[l,c.domReference,o,a]);return e.useMemo((()=>u?{reference:p}:{}),[u,p])},useInteractions:function(t){void 0===t&&(t=[]);const n=t.map((e=>null==e?void 0:e.reference)),r=t.map((e=>null==e?void 0:e.floating)),o=t.map((e=>null==e?void 0:e.item)),i=e.useCallback((e=>Rn(e,t,"reference")),n),l=e.useCallback((e=>Rn(e,t,"floating")),r),c=e.useCallback((e=>Rn(e,t,"item")),o);return e.useMemo((()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:c})),[i,l,c])},useDismiss:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:l}=t,{enabled:c=!0,escapeKey:u=!0,outsidePress:a=!0,outsidePressEvent:s="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:v}=n,h=Tt(),g=wt("function"==typeof a?a:()=>!1),y="function"==typeof a?g:a,b=e.useRef(!1),w=e.useRef(!1),{escapeKey:E,outsidePress:x}=bn(m),{escapeKey:R,outsidePress:C}=bn(v),S=e.useRef(!1),O=wt((e=>{var t;if(!r||!c||!u||"Escape"!==e.key)return;if(S.current)return;const n=null==(t=l.current.floatingContext)?void 0:t.nodeId,i=h?Bt(h.nodesRef.current,n):[];if(!E&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),A=wt((e=>{var t;const n=()=>{var t;O(e),null==(t=ee(e))||t.removeEventListener("keydown",n)};null==(t=ee(e))||t.addEventListener("keydown",n)})),k=wt((e=>{var t;const n=b.current;b.current=!1;const r=w.current;if(w.current=!1,"click"===s&&r)return;if(n)return;if("function"==typeof y&&!y(e))return;const c=ee(e),u="["+Pt("inert")+"]",a=Q(i.floating).querySelectorAll(u);let f=L(c)?c:null;for(;f&&!V(f);){const e=j(f);if(V(e)||!L(e))break;f=e}if(a.length&&L(c)&&!c.matches("html,body")&&!U(c,i.floating)&&Array.from(a).every((e=>!U(f,e))))return;if(I(c)&&M){const t=V(c),n=W(c),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),l=o&&c.clientWidth>0&&c.scrollWidth>c.clientWidth,u=i&&c.clientHeight>0&&c.scrollHeight>c.clientHeight,a="rtl"===n.direction,s=u&&(a?e.offsetX<=c.offsetWidth-c.clientWidth:e.offsetX>c.clientWidth),f=l&&e.offsetY>c.clientHeight;if(s||f)return}const d=null==(t=l.current.floatingContext)?void 0:t.nodeId,p=h&&Bt(h.nodesRef.current,d).some((t=>{var n;return J(e,null==(n=t.context)?void 0:n.elements.floating)}));if(J(e,i.floating)||J(e,i.domReference)||p)return;const m=h?Bt(h.nodesRef.current,d):[];if(m.length>0){let e=!0;if(m.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),T=wt((e=>{var t;const n=()=>{var t;k(e),null==(t=ee(e))||t.removeEventListener(s,n)};null==(t=ee(e))||t.addEventListener(s,n)}));e.useEffect((()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=E,l.current.__outsidePressBubbles=x;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),S.current=!0}function a(){e=window.setTimeout((()=>{S.current=!1}),F()?5:0)}const f=Q(i.floating);u&&(f.addEventListener("keydown",R?A:O,R),f.addEventListener("compositionstart",n),f.addEventListener("compositionend",a)),y&&f.addEventListener(s,C?T:k,C);let d=[];return p&&(L(i.domReference)&&(d=q(i.domReference)),L(i.floating)&&(d=d.concat(q(i.floating))),!L(i.reference)&&i.reference&&i.reference.contextElement&&(d=d.concat(q(i.reference.contextElement)))),d=d.filter((e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})),d.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{u&&(f.removeEventListener("keydown",R?A:O,R),f.removeEventListener("compositionstart",n),f.removeEventListener("compositionend",a)),y&&f.removeEventListener(s,C?T:k,C),d.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[l,i,u,y,s,r,o,p,c,E,x,O,R,A,k,C,T]),e.useEffect((()=>{b.current=!1}),[y,s]);const P=e.useMemo((()=>({onKeyDown:O,...f&&{[gn[d]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==d&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}})),[O,o,f,d]),M=e.useMemo((()=>({onKeyDown:O,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[yn[s]]:()=>{b.current=!0}})),[O,s]);return e.useMemo((()=>c?{reference:P,floating:M}:{}),[c,P,M])},useHover:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:l,elements:c}=t,{enabled:u=!0,delay:a=0,handleClose:s=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=n,m=Tt(),v=It(),h=Mt(s),g=Mt(a),y=Mt(r),b=e.useRef(),w=e.useRef(-1),E=e.useRef(),x=e.useRef(-1),R=e.useRef(!0),C=e.useRef(!1),S=e.useRef((()=>{})),O=e.useRef(!1),A=e.useCallback((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[i]);e.useEffect((()=>{if(u)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(w.current),clearTimeout(x.current),R.current=!0,O.current=!1)}}),[u,l]),e.useEffect((()=>{if(!u)return;if(!h.current)return;if(!r)return;function e(e){A()&&o(!1,e,"hover")}const t=Q(c.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[c.floating,r,o,u,h,A]);const k=e.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Nt(g.current,"close",b.current);r&&!E.current?(clearTimeout(w.current),w.current=window.setTimeout((()=>o(!1,e,n)),r)):t&&(clearTimeout(w.current),o(!1,e,n))}),[g,o]),I=wt((()=>{S.current(),E.current=void 0})),T=wt((()=>{if(C.current){const e=Q(c.floating).body;e.style.pointerEvents="",e.removeAttribute(Dt),C.current=!1}})),P=wt((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));e.useEffect((()=>{if(u&&L(c.domReference)){var e;const o=c.domReference;return r&&o.addEventListener("mouseleave",l),null==(e=c.floating)||e.addEventListener("mouseleave",l),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",l),null==(e=c.floating)||e.removeEventListener("mouseleave",l),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(w.current),R.current=!1,f&&!Z(b.current)||d>0&&!Nt(g.current,"open"))return;const t=Nt(g.current,"open",b.current);t?w.current=window.setTimeout((()=>{y.current||o(!0,e,"hover")}),t):r||o(!0,e,"hover")}function n(e){if(P())return;S.current();const t=Q(c.floating);if(clearTimeout(x.current),O.current=!1,h.current&&i.current.floatingContext){r||clearTimeout(w.current),E.current=h.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){T(),I(),P()||k(e,!0,"safe-polygon")}});const n=E.current;return t.addEventListener("mousemove",n),void(S.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==b.current||!U(c.floating,e.relatedTarget))&&k(e)}function l(e){P()||i.current.floatingContext&&(null==h.current||h.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){T(),I(),P()||k(e)}})(e))}}),[c,u,t,f,d,p,k,I,T,o,r,y,m,g,h,i,P]),Et((()=>{var e;if(u&&r&&null!=(e=h.current)&&e.__options.blockPointerEvents&&A()){C.current=!0;const e=c.floating;if(L(c.domReference)&&e){var t;const n=Q(c.floating).body;n.setAttribute(Dt,"");const r=c.domReference,o=null==m||null==(t=m.nodesRef.current.find((e=>e.id===v)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[u,r,v,c,m,h,A]),Et((()=>{r||(b.current=void 0,O.current=!1,I(),T())}),[r,I,T]),e.useEffect((()=>()=>{I(),clearTimeout(w.current),clearTimeout(x.current),T()}),[u,c.domReference,I,T]);const M=e.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){R.current||y.current||o(!0,t,"hover")}f&&!Z(b.current)||r||0===d||O.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(x.current),"touch"===b.current?n():(O.current=!0,x.current=window.setTimeout(n,d)))}}}),[f,o,r,y,d]),D=e.useMemo((()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(e){P()||k(e.nativeEvent,!1)}})),[k,P]);return e.useMemo((()=>u?{reference:M,floating:D}:{}),[u,M,D])},flip:(e,t)=>({...ct(e),options:[e,t]}),shift:(e,t)=>({...lt(e),options:[e,t]}),hide:(e,t)=>({...ut(e),options:[e,t]}),offset:(e,t)=>({...it(e),options:[e,t]}),useMergeRefs:gt};var On=function(){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null};On.Root=function(e){var n=e.children,i=e.className,c=e.value,u=e.name,f=e.defaultValue,d=void 0===f?"":f,p=e.onValueChange;e.onClickOutside;var m=e.placement,g=void 0===m?"bottom-start":m,w=e.offsetValue,E=e.shift,x=void 0===E||E,C=h(e,["children","className","value","name","defaultValue","onValueChange","onClickOutside","placement","offsetValue","shift"]),S=t.useState(!1),O=S[0],A=S[1],k=t.useState(w),L=k[0],I=k[1],T=t.useState(""),P=T[0],M=T[1],D=t.useRef(null),N=function(e,t,n){var i=o(t),c=i[0],u=i[1],a=void 0!==e,f=a?e:c,d=r(a),p=r(e);l((function(){"production"!==process.env.NODE_ENV&&(d.current!==a&&console.warn("Component changed from ".concat(d.current?"controlled":"uncontrolled"," to ").concat(a?"controlled":"uncontrolled",".")),d.current=a)}),[a]),l((function(){"production"!==process.env.NODE_ENV&&a&&!n&&e!==p.current&&console.warn("A component is changing a controlled value without an onChange handler. This will render a controlled component as uncontrolled."),p.current=e}),[e,a,n]);var m=s((function(e){var t="function"==typeof e?e(f):e;a||u(t),n&&n(t)}),[a,n,f]);return[f,m]}(c,d,p),F=N[0],V=N[1],W=t.useRef(null),B=function(e){var t=o(!1),n=t[0],r=t[1];return l((function(){if(e){for(var t=e;t;){if("FORM"===t.tagName)return void r(!0);t=t.parentElement}r(!1)}else r(!1)}),[e]),n}(W.current),j=Sn.useFloating({middleware:[Sn.offset(L)],open:O,onOpenChange:A,placement:g}),H=j.refs,q=j.floatingStyles,_=j.context,K=Sn.useDismiss(_),U=Sn.useRole(_,{role:"listbox"}),X=Sn.useInteractions([K,U]),z=X.getReferenceProps,Y=X.getFloatingProps,$=X.getItemProps;a((function(){if(x&&H.floating.current&&D.current){var e=H.floating.current.getBoundingClientRect(),t=D.current.getBoundingClientRect(),n=e.top-t.bottom;I(n)}}),[H.floating.current,D.current,x,O]);var G={isOpen:O,setIsOpen:A,selectedValue:F,setSelectedValue:V,handleSelect:function(e){V(e),A(!1)},floatingContext:_,refs:H,getFloatingProps:Y,getReferenceProps:z,floatingStyles:q,getItemProps:$,selectedItemRef:D,setOffsetPositionValue:I,activeItemValue:P,setActiveItemValue:M};return t.createElement(y.Provider,{value:G},t.createElement(R.Root,{orientation:"vertical"},t.createElement(b.div,v({},C,{className:i,ref:W}),n,B&&t.createElement("select",{name:u,value:F,hidden:!0,"aria-hidden":"true",tabIndex:-1},t.createElement("option",{value:F},F)))))},On.Content=function(e){var n=e.children,r=h(e,["children"]),o=u(y),i=o.isOpen;o.setIsOpen,o.selectedValue;var l=o.floatingContext,c=o.refs,a=o.getFloatingProps,s=o.floatingStyles,f=o.handleSelect;return t.createElement(t.Fragment,null,i&&t.createElement(Sn.FocusManager,{context:l},t.createElement(R.Group,null,t.createElement("div",v({ref:c.setFloating,style:s},a(),r,{onKeyDownCapture:function(e){if("Enter"===e.key){e.preventDefault();var t=c.floating.current.querySelector('[data-active="true"]');t&&f(t.getAttribute("data-value"))}}}),n))))},On.Portal=function(e){var n=e.children,r=u(y).isOpen,i=o(!1),c=i[0],a=i[1],s=document.querySelector("#rad-ui-theme-container")||document.body;return l((function(){s&&a(!0)}),[s]),r&&c?t.createElement(Sn.Portal,{root:s},n):null},On.Overlay=function(e){e.className;var n=u(y),r=n.isOpen,o=n.handleOverlayClick;return t.createElement(t.Fragment,null,r&&t.createElement(Sn.Overlay,{onClick:o}))},On.Item=function(e){var n=e.children,r=e.value,o=e.disabled,i=h(e,["children","value","disabled"]),l=u(y),c=l.handleSelect,a=l.selectedValue,s=l.getItemProps,f=l.selectedItemRef,d=l.activeItemValue,p=t.useState(!1),m=p[0],g=p[1];return t.createElement(R.Item,{role:"option",onFocus:function(e){g(!0)},onBlur:function(e){g(!1)}},t.createElement(b.div,v({disabled:o,"data-value":r,"aria-selected":r===a,"data-active":d===r||m,onClick:function(){return c(r)}},i,s(),{ref:r===a?f:void 0}),n))},On.Trigger=function(e){var n=e.children,r=h(e,["children"]),o=u(y),i=o.isOpen,l=o.setIsOpen,c=o.selectedValue,a=o.refs,s=o.getReferenceProps;return t.createElement("button",v({onClick:function(){return l(!i)}},r,{"aria-expanded":i,ref:a.setReference},s(),{role:"combobox"}),c||n)},On.Group=function(e){var n=e.children,r=e.className;return t.createElement("div",{className:r},n)},On.Search=function(e){var n=e.className,r=t.useState(""),o=r[0],i=r[1],l=u(y),c=l.refs;l.selectedItemRef;var a=l.handleSelect,s=l.activeItemValue,f=l.setActiveItemValue,d=l.setSelectedValue,p=t.useRef([]);return t.useEffect((function(){if(c.floating.current){var e=c.floating.current,t=Array.from(e.querySelectorAll('[role="option"]'));0===p.current.length&&(p.current=t.map((function(e){return{element:e,parent:e.parentElement}}))),p.current.forEach((function(e){var t=e.element;t.parentElement&&t.parentElement.removeChild(t)})),p.current.forEach((function(e){var t,n=e.element,r=e.parent;((null===(t=n.textContent)||void 0===t?void 0:t.toLowerCase())||"").includes(o.toLowerCase())&&r&&r.appendChild(n)}))}}),[o,c.floating.current]),console.log("activeItemValue",s),t.createElement(b.input,{type:"search",className:n,placeholder:"Search...",tabIndex:-1,value:o,"aria-activedescendant":s,onChange:function(e){return i(e.target.value)},onKeyDown:function(e){if("Enter"===e.key&&(e.preventDefault(),s&&a(s)),"ArrowDown"===e.key||"ArrowUp"===e.key){if(d(""),!c.floating.current)return;var t=c.floating.current,n=Array.from(t.querySelectorAll('[role="option"]'));if(e.preventDefault(),console.log("arrow input taken"),0===n.length)return;var r=-1;s&&(r=n.findIndex((function(e){return e.getAttribute("data-value")===s})));var o=n["ArrowDown"===e.key?r<n.length-1?r+1:0:r>0?r-1:n.length-1].getAttribute("data-value")||"";f(o)}}})};var An=t.createContext({rootClass:""});var kn=function(){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null};kn.Root=function(e){var n=e.customRootClass,r=e.children,o=e.defaultValue,i=e.value,l=e.onValueChange,c=e.shift,u=h(e,["customRootClass","children","defaultValue","value","onValueChange","shift"]),a=function(e,t){void 0===e&&(e="");var n=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e?"".concat(e,"-").concat(n):"".concat("rad-ui","-").concat(n)}(n,"Select");return t.createElement(An.Provider,{value:{rootClass:a}},t.createElement(On.Root,v({className:"".concat(a,"-root"),defaultValue:o,value:i,onValueChange:l,shift:c},u),r))},kn.Content=function(e){e.customRootClass;var n=e.children,r=e.position,o=void 0===r?"popper":r,i=h(e,["customRootClass","children","position"]),l=u(An).rootClass;return t.createElement(On.Content,v({className:"".concat(l,"-content"),position:o,"data-position":o},i),n)},kn.Item=function(e){e.customRootClass;var n=e.children,r=e.value,o=e.disabled,i=h(e,["customRootClass","children","value","disabled"]),l=u(An).rootClass;return t.createElement(On.Item,v({className:"".concat(l,"-item"),value:r,disabled:o,"data-disabled":o?"":void 0,role:"option","aria-disabled":o?"true":void 0},i),t.createElement("span",{className:"".concat(l,"-text")},n))},kn.Trigger=function(e){e.customRootClass;var n=e.children,r=e.disabled,o=e.placeholder,i=h(e,["customRootClass","children","disabled","placeholder"]),l=u(An).rootClass,c=t.useRef(null);return t.createElement(On.Trigger,v({className:"".concat(l,"-trigger"),"aria-disabled":r?"true":void 0,"data-placeholder":o?"":void 0,ref:c},i),n)},kn.Portal=function(e){var n=e.children;return document.querySelector("#rad-ui-theme-container")||document.body,t.createElement(On.Portal,null,n)},kn.Group=function(e){var n=e.children,r=u(An).rootClass;return t.createElement(On.Group,{className:"".concat(r,"-group")},n)},kn.Indicator=function(){var e=u(An).rootClass;return t.createElement("div",{className:"".concat(e,"-item-indicator")},t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M13.3332 4L5.99984 11.3333L2.6665 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},kn.Search=function(){var e=u(An).rootClass;return t.createElement(On.Search,{className:"".concat(e,"-search")})};export{kn as default};
|
|
1
|
+
'use client';import{_ as e,a as t}from"./tslib.es6-BtVxab8e.js";import n,{createContext as a,useContext as r,useState as l,useEffect as o,useLayoutEffect as s}from"react";import{F as c}from"./index-DAboJYKJ.js";import{P as i}from"./index-DIw4zyNG.js";import{u}from"./index-fkj4Fdgt.js";import{c as d}from"./index-BVxS3Ixi.js";import"./floating-ui.react-jh3caJnc.js";import"react/jsx-runtime";import"react-dom";var f=a({});var m=function(){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null};m.Root=function(a){var r=a.children,d=a.className,m=a.value,v=a.name,p=a.defaultValue,h=void 0===p?"":p,g=a.onValueChange;a.onClickOutside;var R=a.placement,C=void 0===R?"bottom-start":R,b=a.offsetValue,E=a.shift,x=void 0===E||E,S=e(a,["children","className","value","name","defaultValue","onValueChange","onClickOutside","placement","offsetValue","shift"]),I=n.useState(!1),N=I[0],y=I[1],P=n.useState(b),w=P[0],k=P[1],V=u(m,h,g),L=V[0],F=V[1],O=n.useRef(null),j=n.useRef([]),D=n.useRef([]),T=n.useRef([]),A=n.useRef(!1),M=n.useRef(null),q=n.useRef(null),B=n.useState(null),G=B[0],H=B[1],K=n.useState(null),W=K[0],_=K[1],z=n.useState(!1),J=z[0],Q=z[1],U=function(e){var t=l(!1),n=t[0],a=t[1];return o((function(){if(e){for(var t=e;t;){if("FORM"===t.tagName)return void a(!0);t=t.parentElement}a(!1)}else a(!1)}),[e]),n}(M.current),X=c.useFloating({middleware:[c.offset(w)],open:N,onOpenChange:y,placement:C}),Y=X.refs,Z=X.floatingStyles,$=X.context,ee=c.useClick($),te=c.useDismiss($),ne=c.useRole($,{role:"listbox"}),ae=n.useCallback((function(e){if(_(e),y(!1),null!==e){var t=D.current[e];t&&F(t)}}),[]),re=c.useListNavigation($,{listRef:j,activeIndex:G,selectedIndex:W,onNavigate:H,virtual:J,virtualItemRef:q}),le=c.useTypeahead($,{listRef:D,activeIndex:G,selectedIndex:W,enabled:!J,onMatch:function(e){N?H(e):ae(e)},onTypingChange:function(e){A.current=e}}),oe=c.useInteractions([ee,te,ne,re,le]),se=oe.getReferenceProps,ce=oe.getFloatingProps,ie=oe.getItemProps;s((function(){if(x&&O&&Y.floating.current&&O.current){var e=Y.floating.current.getBoundingClientRect(),t=O.current.getBoundingClientRect(),n=e.top-t.bottom;k(n)}}),[O.current,x]);var ue={isOpen:N,setIsOpen:y,handleSelect:ae,floatingContext:$,refs:Y,getFloatingProps:ce,getReferenceProps:se,floatingStyles:Z,getItemProps:ie,activeIndex:G,selectedIndex:W,elementsRef:j,labelsRef:D,valuesRef:T,setActiveIndex:H,selectedLabel:L,isTypingRef:A,virtualItemRef:q,hasSearch:J,setHasSearch:Q,selectedItemRef:O};return n.createElement(f.Provider,{value:ue},n.createElement(i.div,t({},S,{className:d,ref:M}),r,U&&n.createElement("select",{name:v,value:L,hidden:!0,"aria-hidden":"true",tabIndex:-1},n.createElement("option",{value:L},L))))},m.Content=function(a){var l=a.children,o=a.className,s=e(a,["children","className"]),i=r(f),u=i.isOpen,d=i.elementsRef,m=i.labelsRef,v=i.floatingContext,p=i.refs,h=i.getFloatingProps,g=i.floatingStyles;return n.createElement(n.Fragment,null,u&&n.createElement(c.FocusManager,{context:v},n.createElement(c.FloatingList,{elementsRef:d,labelsRef:m},n.createElement("div",t({ref:p.setFloating,style:g,className:o},h(),s),l))))},m.Portal=function(e){var t=e.children,a=r(f).isOpen,s=l(!1),i=s[0],u=s[1],d=document.querySelector("#rad-ui-theme-container")||document.body;return o((function(){d&&u(!0)}),[d]),a&&i?n.createElement(c.Portal,{root:d},t):null},m.Item=function(a){var l,o=a.children,s=a.value;a.disabled;var u=a.className,d=e(a,["children","value","disabled","className"]),m=r(f);if(!m)return console.error("SelectPrimitiveItem must be used within a SelectPrimitive"),null;var v=m.handleSelect,p=m.isTypingRef,h=m.getItemProps,g=m.activeIndex,R=m.selectedIndex,C=m.virtualItemRef,b=m.selectedItemRef,E=m.hasSearch,x=n.useRef(null),S=c.useListItem({label:s}),I=S.ref,N=S.index,y=g===N,P=R===N,w=s||"select-item-".concat(N);return n.useEffect((function(){P&&!E&&(b.current=x.current)}),[P,E]),n.createElement(i.div,t({ref:c.useMergeRefs([I,x]),id:w,role:"option",className:u,"data-value":s,"data-active":E?(null===(l=C.current)||void 0===l?void 0:l.id)==w:y,"aria-selected":P,tabIndex:y?0:-1},h({onClick:function(){return v(N)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),v(N))," "!==e.key||p.current||(e.preventDefault(),v(N))}}),d),o)},m.Trigger=function(a){var l=a.children,o=a.className,s=e(a,["children","className"]),c=r(f),i=c.isOpen,u=c.setIsOpen,d=c.selectedLabel,m=c.refs,v=c.getReferenceProps;return n.createElement("button",t({type:"button",onClick:function(){return u(!i)},className:o,"aria-expanded":i,ref:m.setReference},v(),{role:"combobox"},s),d||l)},m.Group=function(e){var t=e.children,a=e.className;return n.createElement("div",{className:a},t)},m.Search=function(e){var a,l=e.className,o=n.useState(""),s=o[0],c=o[1],u=r(f),d=n.useRef(null);if(!u||!u.refs)return n.createElement(i.input,{type:"search",className:l,placeholder:"Search...",value:s,onChange:function(e){return c(e.target.value)}});var m=u.refs,v=u.handleSelect,p=u.labelsRef,h=u.valuesRef,g=u.activeIndex,R=u.elementsRef,C=u.virtualItemRef,b=u.getReferenceProps;u.isTypingRef;var E=u.setHasSearch,x=n.useRef([]);n.useEffect((function(){E(!0),u&&u.setActiveIndex(0)}),[E]),n.useEffect((function(){if(m.floating.current){var e=m.floating.current,t=Array.from(e.querySelectorAll('[role="option"]'));0===x.current.length&&(x.current=t.map((function(e){var t;return{element:e,label:e.getAttribute("data-label")||(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",value:e.getAttribute("data-value")||e.id||"",parent:e.parentElement}}))),x.current.forEach((function(e){var t=e.element;t.parentElement&&t.parentElement.removeChild(t)}));var n=[];x.current.forEach((function(e){var t=e.element,a=e.label,r=e.value,l=e.parent;a.toLowerCase().includes(s.toLowerCase())&&l&&(l.appendChild(t),n.push({element:t,label:a,value:r}))})),u.setActiveIndex(null),R.current=n.map((function(e){return e.element})),p.current=n.map((function(e){return e.label}))}}),[s,m.floating.current]);var S=b();return n.createElement(i.input,t({type:"search",className:l,placeholder:"Search...",ref:d,value:s,"aria-activedescendant":(null===(a=C.current)||void 0===a?void 0:a.id)||(null!==g&&h.current[g]?h.current[g]:void 0),onChange:function(e){return c(e.target.value)}},S,{onKeyDown:function(e){null!==g&&"Enter"===e.key&&(e.preventDefault(),v(g))}}))};var v=n.createContext({rootClass:""});var p=function(){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null};p.Root=function(a){var r=a.customRootClass,l=a.children,o=a.defaultValue,s=a.value,c=a.onValueChange,i=a.shift,u=e(a,["customRootClass","children","defaultValue","value","onValueChange","shift"]),f=d(r,"Select");return n.createElement(v.Provider,{value:{rootClass:f}},n.createElement(m.Root,t({className:"".concat(f,"-root"),defaultValue:o,value:s,onValueChange:c,shift:i},u),l))},p.Content=function(a){a.customRootClass;var l=a.children,o=a.position,s=void 0===o?"popper":o,c=e(a,["customRootClass","children","position"]),i=r(v).rootClass;return n.createElement(m.Content,t({className:"".concat(i,"-content"),position:s,"data-position":s},c),l)},p.Item=function(a){a.customRootClass;var l=a.children,o=a.value,s=a.disabled,c=e(a,["customRootClass","children","value","disabled"]),i=r(v).rootClass;return n.createElement(m.Item,t({className:"".concat(i,"-item"),value:o,disabled:s,"data-disabled":s?"":void 0,role:"option","aria-disabled":s?"true":void 0},c),n.createElement("span",{className:"".concat(i,"-text")},l))},p.Trigger=function(a){a.customRootClass;var l=a.children,o=a.disabled,s=a.placeholder,c=e(a,["customRootClass","children","disabled","placeholder"]),i=r(v).rootClass,u=n.useRef(null);return n.createElement(m.Trigger,t({className:"".concat(i,"-trigger"),"aria-disabled":o?"true":void 0,"data-placeholder":s?"":void 0,ref:u},c),l)},p.Portal=function(e){var t=e.children;return document.querySelector("#rad-ui-theme-container")||document.body,n.createElement(m.Portal,null,t)},p.Group=function(e){var t=e.children,a=r(v).rootClass;return n.createElement(m.Group,{className:"".concat(a,"-group")},t)},p.Indicator=function(){var e=r(v).rootClass;return n.createElement("div",{className:"".concat(e,"-item-indicator")},n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M13.3332 4L5.99984 11.3333L2.6665 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},p.Search=function(){var e=r(v).rootClass;return n.createElement(m.Search,{className:"".concat(e,"-search")})};export{p as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type SeparatorProps = {
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
className?: string;
|
|
6
|
+
customRootClass?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
decorative?: boolean;
|
|
10
|
+
props?: any;
|
|
11
|
+
} & React.ComponentProps<'div'>;
|
|
12
|
+
declare const Separator: {
|
|
13
|
+
({ orientation, className, customRootClass, color, asChild, decorative, ...props }: SeparatorProps): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { Separator as default };
|
|
18
|
+
export type { SeparatorProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import
|
|
1
|
+
'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as t}from"./index-BVxS3Ixi.js";import{c as i}from"./clsx-BaVHROc5.js";import{P as e}from"./index-DIw4zyNG.js";var s="Separator",c=function(c){var l=c.orientation,d=void 0===l?"horizontal":l,m=c.className,n=c.customRootClass,v=c.color,p=void 0===v?"":v,f=c.asChild,u=void 0!==f&&f,h=c.decorative,C=void 0!==h&&h,j=a(c,["orientation","className","customRootClass","color","asChild","decorative"]),x=t(n,s),N="".concat(x,"vertical"===d?"-vertical":"-horizontal"),z={};return z["data-orientation"]=d,p&&(z["data-rad-ui-accent-color"]=p),C&&(z.role="separator",z["aria-hidden"]="true"),r.createElement(e.div,o({className:i(x,N,m),asChild:u},z,j))};c.displayName=s;export{c as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type SkeletonProps = {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
customRootClass?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
height: string;
|
|
9
|
+
width: string;
|
|
10
|
+
radius?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Skeleton: {
|
|
13
|
+
({ loading, className, customRootClass, children, height, width, radius, ...props }: SkeletonProps): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { Skeleton as default };
|
|
18
|
+
export type { SkeletonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import
|
|
1
|
+
'use client';import{_ as s,a as e}from"./tslib.es6-BtVxab8e.js";import t from"react";import{c as a}from"./index-BVxS3Ixi.js";import{c as i}from"./clsx-BaVHROc5.js";var o="Skeleton",r=function(r){var l,d=r.loading,m=void 0===d||d,n=r.className,c=void 0===n?"":n,h=r.customRootClass,u=void 0===h?"":h,f=r.children,v=r.height,p=r.width,g=r.radius,k=s(r,["loading","className","customRootClass","children","height","width","radius"]);if(!m)return f;var N=a(u,o);return t.createElement("div",e({className:i(N,c)},k,{style:(l={},l["--skeleton-height"]=v,l["--skeleton-width"]=p,l["--skeleton-radius"]=g,l)}))};r.displayName=o;export{r as default};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
declare const Slider: {
|
|
4
|
+
(): null;
|
|
5
|
+
Root: ({ children, className, customRootClass, defaultValue, min, max, step, disabled, readOnly, orientation, valueLabelDisplay }: {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
customRootClass?: string;
|
|
9
|
+
defaultValue?: number;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
step?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
orientation?: "horizontal" | "vertical";
|
|
16
|
+
valueLabelDisplay?: "auto" | "on" | "off";
|
|
17
|
+
}) => react.JSX.Element;
|
|
18
|
+
Track: ({ children }: {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}) => react.JSX.Element;
|
|
21
|
+
Range: ({ children }: {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}) => react.JSX.Element;
|
|
24
|
+
Thumb: ({ children }: {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}) => react.JSX.Element;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { Slider as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import e,{createContext as t}from"react";
|
|
1
|
+
'use client';import e,{createContext as t}from"react";import{c as a}from"./clsx-BaVHROc5.js";import{c as n}from"./index-BVxS3Ixi.js";var o=t({rootClass:"",value:0,setValue:function(){},minValue:0,setMinValue:function(){},maxValue:100,setMaxValue:function(){}}),l=function(){return console.warn("Direct usage of Slider is not supported. Please use Slider.Root, Slider.Track, etc. instead."),null};l.Root=function(t){var l=t.children,r=t.className,c=void 0===r?"":r,i=t.customRootClass,s=void 0===i?"":i,u=t.defaultValue,d=void 0===u?0:u,m=t.min,v=void 0===m?0:m,f=t.max,p=void 0===f?100:f;t.step,t.disabled,t.readOnly,t.orientation,t.valueLabelDisplay;var g=n(s,"Slider"),x=e.useState(d),C=x[0],h=x[1],V=e.useState(v),P=V[0],E=V[1],M=e.useState(p),S=M[0],y=M[1],N={rootClass:g,value:C,setValue:h,minValue:P,setMinValue:E,maxValue:S,setMaxValue:y},R=function(e){var t=e.currentTarget.getBoundingClientRect(),a=e.clientX-t.left,n=Math.max(0,Math.min(100,a/t.width*100));h(n)};return e.createElement(o.Provider,{value:N},e.createElement("div",{className:a(g,c),onClick:function(e){e.stopPropagation(),R(e)},onPointerDown:function(e){e.stopPropagation(),R(e)},onPointerMove:function(e){var t=e.target;t.setPointerCapture(e.pointerId),e.stopPropagation(),t.focus(),e.preventDefault(),R(e),console.log("moving")}},l))},l.Track=function(t){var a=t.children,n=e.useContext(o).rootClass;return e.createElement("div",{className:"".concat(n,"-track")},a)},l.Range=function(t){var a=t.children,n=e.useContext(o),l=n.rootClass,r=n.value;return e.createElement("div",{className:"".concat(l,"-range"),style:{left:"calc(".concat(r,"% - 16px)"),width:"calc(".concat(r,"%)")}},a)},l.Thumb=function(t){t.children;var a=e.useContext(o),n=a.rootClass,l=a.value,r=e.useRef(null);return e.createElement("div",{className:"".concat(n,"-thumb"),onClick:function(e){var t;e.stopPropagation(),null===(t=r.current)||void 0===t||t.focus()},style:{left:"calc(".concat(l,"% - 16px)")}},e.createElement("span",{className:"".concat(n,"-thumb-value")}),e.createElement("input",{onChange:function(e){console.log(e.target.value)},value:l,style:{display:"none"},ref:r}))};export{l as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type StrongProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
customRootClass?: string;
|
|
7
|
+
} & React.ComponentProps<'strong'>;
|
|
8
|
+
declare const Strong: {
|
|
9
|
+
({ children, className, customRootClass, ...props }: StrongProps): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { Strong as default };
|
|
14
|
+
export type { StrongProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import
|
|
1
|
+
'use client';import{_ as s,a}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as t}from"./index-BVxS3Ixi.js";var e="Strong",m=function(m){var c=m.children,l=m.className,i=m.customRootClass,n=s(m,["children","className","customRootClass"]),f=t(i,e);return r.createElement("strong",a({className:o(f,l)},n),c)};m.displayName=e;export{m as default};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type SwitchThumbProps = {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
children?: React__default.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type SwitchRootProps = {
|
|
11
|
+
children: React__default.ReactNode;
|
|
12
|
+
customRootClass?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
variant?: string;
|
|
15
|
+
size?: string;
|
|
16
|
+
defaultChecked?: boolean;
|
|
17
|
+
checked?: boolean;
|
|
18
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
name?: string;
|
|
22
|
+
value?: string;
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
declare const Switch: {
|
|
27
|
+
(): null;
|
|
28
|
+
Root: ({ children, customRootClass, color, variant, size, defaultChecked, checked, onCheckedChange, disabled, required, name, value, asChild, ...props }: SwitchRootProps) => React.JSX.Element;
|
|
29
|
+
Thumb: ({ asChild, className, children, ...props }: SwitchThumbProps) => React.JSX.Element;
|
|
30
|
+
};
|
|
31
|
+
declare namespace SwitchProps {
|
|
32
|
+
type Root = SwitchRootProps;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { SwitchProps, Switch as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import
|
|
1
|
+
'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import s,{createContext as d,useContext as i}from"react";import{B as c}from"./index-8D8A0ALD.js";import{c as t}from"./index-BVxS3Ixi.js";import{u as o,a as r,b as l}from"./index-DpUtikes.js";import{u as n}from"./index-fkj4Fdgt.js";import{P as h}from"./index-DIw4zyNG.js";var u=d({checked:!1,setChecked:function(){},rootClass:"",disabled:!1}),m=function(){return console.warn("Direct usage of Switch is not supported. Please use Switch.Root, Switch.Thumb, etc. instead."),null};m.Root=function(d){var i=d.children,h=d.customRootClass,m=d.color,C=void 0===m?"":m,v=d.variant,k=d.size,f=d.defaultChecked,b=void 0!==f&&f,p=d.checked,w=d.onCheckedChange,j=d.disabled,x=void 0!==j&&j,N=d.required,R=void 0!==N&&N,S=d.name,g=d.value,q=d.asChild,z=void 0!==q&&q,E=e(d,["children","customRootClass","color","variant","size","defaultChecked","checked","onCheckedChange","disabled","required","name","value","asChild"]),P=n(p,b,w),T=P[0],B=P[1],D=t(h,"Switch"),_=o("switch",{variant:v,size:k}),y=r(C),A=l(_(),y()),F={checked:T,setChecked:B,rootClass:D,disabled:x},G=a(a(a({},A()),{"data-state":T?"checked":"unchecked","data-disabled":x?"":void 0,role:"switch","aria-checked":T,"aria-required":R,disabled:x}),E);return S&&(G.name=S),g&&(G.value=g),s.createElement(u.Provider,{value:F},s.createElement(c,a({onClick:function(){x||B(!T)},className:D,asChild:z},G),i))},m.Thumb=function(d){var c=d.asChild,t=void 0!==c&&c,o=d.className,r=d.children,l=e(d,["asChild","className","children"]),n=i(u),m=n.checked,C=n.rootClass,v=n.disabled,k={};return k["data-state"]=m?"checked":"unchecked",v&&(k["data-disabled"]=""),s.createElement(h.span,a({role:"switch",className:"".concat(C,"-indicator ").concat(o||""),asChild:t},k,l),r)};export{m as default};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type TabNavLinkProps = {
|
|
5
|
+
children: React__default.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
value?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type TabNavRootProps = {
|
|
14
|
+
className?: string;
|
|
15
|
+
loop?: boolean;
|
|
16
|
+
orientation?: 'horizontal' | 'vertical';
|
|
17
|
+
children: React__default.ReactNode;
|
|
18
|
+
customRootClass?: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onValueChange?: (value: string) => void;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare const TabNav: {
|
|
26
|
+
(): null;
|
|
27
|
+
Root: ({ className, loop, orientation, children, color, customRootClass, defaultValue, onValueChange, value, ...props }: TabNavRootProps) => React.JSX.Element;
|
|
28
|
+
Link: ({ value, className, href, children, disabled, asChild }: TabNavLinkProps) => React.JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { TabNav as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import
|
|
1
|
+
'use client';import{a,_ as e}from"./tslib.es6-BtVxab8e.js";import o,{createContext as n,useContext as t,useRef as r,useEffect as l}from"react";import{c as i}from"./clsx-BaVHROc5.js";import{R as s}from"./index-BNg6qXF-.js";import{P as u}from"./index-DIw4zyNG.js";import{c}from"./index-BVxS3Ixi.js";import{u as d}from"./index-fkj4Fdgt.js";import"./index-8D8A0ALD.js";var m=n({rootClass:"",tabValue:"",handleTabChange:function(){}}),f=function(){return console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null};f.Root=function(n){var t=n.className,r=n.loop,u=void 0===r||r,f=n.orientation,v=void 0===f?"horizontal":f,h=n.children;n.color;var p=n.customRootClass,b=void 0===p?"":p,C=n.defaultValue,N=void 0===C?"":C,j=n.onValueChange,x=void 0===j?function(){}:j,T=n.value,V=e(n,["className","loop","orientation","children","color","customRootClass","defaultValue","onValueChange","value"]),g=c(b,"TabNav"),R=d(T,N||"",x),E=R[0],k=R[1],P=function(a){k(a)};l((function(){N&&P(N)}),[N]);var L={rootClass:g,tabValue:E,handleTabChange:P};return o.createElement(m.Provider,{value:L},o.createElement(s.Root,a({loop:u,orientation:v},V),o.createElement(s.Group,{className:i(g,t)},h)))},f.Link=function(e){var n=e.value,l=e.className,c=void 0===l?"":l,d=e.href,f=void 0===d?"#":d,v=e.children,h=e.disabled,p=e.asChild,b=t(m),C=b.rootClass,N=b.tabValue,j=b.handleTabChange;p&&(h=!1);var x=r(null),T=n===N;return o.createElement(s.Item,{onFocus:function(){return n&&!h&&function(a){var e;h||(x.current&&(null===(e=x.current)||void 0===e||e.focus()),j(a))}(n)}},o.createElement(u.a,a({ref:x,className:i("".concat(C,"-link"),c),asChild:p,"aria-disabled":h,"aria-selected":T,disabled:h},h?{}:{href:f}),v))};export{f as default};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type TableProps = React.HTMLAttributes<HTMLTableElement> & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const Table: {
|
|
7
|
+
(): null;
|
|
8
|
+
Root: {
|
|
9
|
+
({ children, className, customRootClass, ...props }: any): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
Body: {
|
|
13
|
+
({ children, className, ...props }: any): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
Head: {
|
|
17
|
+
({ children, className, ...props }: any): React.JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
Row: {
|
|
21
|
+
({ children, className, ...props }: any): React.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
Cell: {
|
|
25
|
+
({ children, className, ...props }: any): React.JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
ColumnCellHeader: {
|
|
29
|
+
({ children, className, ...props }: any): React.JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { Table as default };
|
|
35
|
+
export type { TableProps };
|
package/dist/components/Table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';import
|
|
1
|
+
'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import l from"react";import{c as s}from"./clsx-BaVHROc5.js";import{c as r}from"./index-BVxS3Ixi.js";var c="Table",t=function(t){var n=t.children,o=t.className,m=void 0===o?"":o,d=t.customRootClass,i=void 0===d?"":d,N=e(t,["children","className","customRootClass"]),u=r(i,c);return l.createElement("div",a({className:s("".concat(u,"-wrapper"),m)},N),l.createElement("table",{className:s(u)},n))};t.displayName=c;var n=function(r){var c=r.children,t=r.className,n=void 0===t?"header":t,o=e(r,["children","className"]);return l.createElement("thead",a({className:s(n)},o),c)};n.displayName="TableHead";var o=function(r){var c=r.children,t=r.className,n=void 0===t?"":t,o=e(r,["children","className"]);return l.createElement("tbody",a({className:s(n)},o),c)};o.displayName="TableBody";var m=function(r){var c=r.children,t=r.className,n=void 0===t?"row":t,o=e(r,["children","className"]);return l.createElement("tr",a({className:s(n)},o),c)};m.displayName="TableRow";var d=function(r){var c=r.children,t=r.className,n=void 0===t?"cell-header":t,o=e(r,["children","className"]);return l.createElement("th",a({className:s(n)},o),c)};d.displayName="TableColumnCellHeader";var i=function(r){var c=r.children,t=r.className,n=void 0===t?"cell":t,o=e(r,["children","className"]);return l.createElement("td",a({className:s(n)},o),c)};i.displayName="TableCell";var N=function(){return console.warn("Direct usage of Table is not supported. Please use Table.Root, Table.Head, etc. instead."),null};N.Root=t,N.Body=o,N.Head=n,N.Row=m,N.Cell=i,N.ColumnCellHeader=d;export{N as default};
|