@radui/ui 0.0.25 → 0.0.27

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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Accordion.js +1 -1
  3. package/dist/components/AlertDialog.js +2 -2
  4. package/dist/components/AspectRatio.js +1 -0
  5. package/dist/components/Avatar.js +1 -1
  6. package/dist/components/AvatarGroup.js +1 -1
  7. package/dist/components/Badge.js +1 -1
  8. package/dist/components/BlockQuote.js +1 -1
  9. package/dist/components/Button.js +1 -1
  10. package/dist/components/Callout.js +1 -1
  11. package/dist/components/Card.js +1 -1
  12. package/dist/components/Code.js +1 -1
  13. package/dist/components/Collapsible.js +1 -1
  14. package/dist/components/Dropdown.js +5 -1
  15. package/dist/components/Em.js +1 -1
  16. package/dist/components/Heading.js +1 -1
  17. package/dist/components/HoverCard.js +5 -0
  18. package/dist/components/Kbd.js +1 -1
  19. package/dist/components/Link.js +1 -1
  20. package/dist/components/Modal.js +2 -2
  21. package/dist/components/Progress.js +1 -1
  22. package/dist/components/Quote.js +1 -1
  23. package/dist/components/RadioGroup.js +1 -1
  24. package/dist/components/Separator.js +1 -1
  25. package/dist/components/Skeleton.js +1 -1
  26. package/dist/components/Strong.js +1 -1
  27. package/dist/components/Switch.js +1 -1
  28. package/dist/components/Table.js +1 -1
  29. package/dist/components/Tabs.js +1 -1
  30. package/dist/components/Text.js +1 -1
  31. package/dist/components/TextArea.js +1 -1
  32. package/dist/components/Toggle.js +1 -1
  33. package/dist/components/ToggleGroup.js +1 -1
  34. package/dist/components/Tooltip.js +5 -1
  35. package/dist/components/Tree.js +1 -1
  36. package/dist/components/VisuallyHidden.js +1 -0
  37. package/dist/themes/default.css +1 -1
  38. package/package.json +24 -11
@@ -1,5 +1,5 @@
1
- 'use client';import*as e from"react";import t,{useLayoutEffect as n,useEffect as r,useRef as o}from"react";import*as i from"react-dom";function l(){return"undefined"!=typeof window}function u(e){return a(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(a(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function a(e){return!!l()&&(e instanceof Node||e instanceof c(e).Node)}function f(e){return!!l()&&(e instanceof Element||e instanceof c(e).Element)}function d(e){return!!l()&&(e instanceof HTMLElement||e instanceof c(e).HTMLElement)}function p(e){return!(!l()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}function m(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=b(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function h(e){return["table","td","th"].includes(u(e))}function v(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function g(e){const t=y(),n=f(e)?b(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function w(e){return["html","body","#document"].includes(u(e))}function b(e){return c(e).getComputedStyle(e)}function x(e){return f(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function E(e){if("html"===u(e))return e;const t=e.assignedSlot||e.parentNode||p(e)&&e.host||s(e);return p(t)?t.host:t}function R(e){const t=E(e);return w(t)?e.ownerDocument?e.ownerDocument.body:e.body:d(t)&&m(t)?t:R(t)}function S(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=R(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=c(o);if(i){const e=C(l);return t.concat(l,l.visualViewport||[],m(o)?o:[],e&&n?S(e):[])}return t.concat(o,S(o,[],n))}function C(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function T(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function O(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function A(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function L(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function N(e){return!L().includes("jsdom/")&&(!k()&&0===e.width&&0===e.height||k()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function k(){const e=/android/i;return e.test(A())||e.test(L())}function M(e){return(null==e?void 0:e.ownerDocument)||document}function I(e){return"composedPath"in e?e.composedPath()[0]:e.target}function D(e){e.preventDefault(),e.stopPropagation()}function F(e){return!!e&&("combobox"===e.getAttribute("role")&&function(e){return d(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e))}const P=Math.min,j=Math.max,W=Math.round,V=e=>({x:e,y:e});function B(e){return e.split("-")[0]}function H(e){return["top","bottom"].includes(B(e))?"y":"x"}function q(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
1
+ 'use client';import*as e from"react";import t,{useLayoutEffect as n,useEffect as r,useRef as o}from"react";import*as i from"react-dom";function u(){return"undefined"!=typeof window}function l(e){return a(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(a(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function a(e){return!!u()&&(e instanceof Node||e instanceof c(e).Node)}function f(e){return!!u()&&(e instanceof Element||e instanceof c(e).Element)}function d(e){return!!u()&&(e instanceof HTMLElement||e instanceof c(e).HTMLElement)}function p(e){return!(!u()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}function m(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=b(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function h(e){return["table","td","th"].includes(l(e))}function v(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function g(e){const t=y(),n=f(e)?b(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function w(e){return["html","body","#document"].includes(l(e))}function b(e){return c(e).getComputedStyle(e)}function x(e){return f(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function E(e){if("html"===l(e))return e;const t=e.assignedSlot||e.parentNode||p(e)&&e.host||s(e);return p(t)?t.host:t}function R(e){const t=E(e);return w(t)?e.ownerDocument?e.ownerDocument.body:e.body:d(t)&&m(t)?t:R(t)}function S(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=R(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),u=c(o);if(i){const e=C(u);return t.concat(u,u.visualViewport||[],m(o)?o:[],e&&n?S(e):[])}return t.concat(o,S(o,[],n))}function C(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function O(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function T(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function A(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function L(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function N(e){return!L().includes("jsdom/")&&(!k()&&0===e.width&&0===e.height||k()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function k(){const e=/android/i;return e.test(A())||e.test(L())}function M(e){return(null==e?void 0:e.ownerDocument)||document}function I(e){return"composedPath"in e?e.composedPath()[0]:e.target}function D(e){e.preventDefault(),e.stopPropagation()}function F(e){return!!e&&("combobox"===e.getAttribute("role")&&function(e){return d(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e))}const P=Math.min,j=Math.max,W=Math.round,V=e=>({x:e,y:e});function B(e){return e.split("-")[0]}function q(e){return["top","bottom"].includes(B(e))?"y":"x"}function H(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
- */var _=["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(","),U="undefined"==typeof Element,$=U?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,z=!U&&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},X=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)},Y=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!X(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),c=e(u.length?u:l.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:l,candidates:c})}else{$.call(l,_)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),a=!X(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&a){var f=e(!0===s?l.children:s.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},K=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},G=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))&&!K(e)?0:e.tabIndex},J=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Q=function(e){return"INPUT"===e.tagName},Z=function(e){return function(e){return Q(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||z(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)},ee=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},te=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=$.call(e,"details>summary:first-of-type")?e.parentElement:e;if($.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ee(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,u=z(e);if(l&&!l.shadowRoot&&!0===r(l))return ee(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=i}if(function(e){var t,n,r,o,i=e&&z(e),l=null===(t=i)||void 0===t?void 0:t.host,u=!1;if(i&&i!==e)for(u=!!(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));!u&&l;){var c,s,a;u=!(null===(s=l=null===(c=i=z(l))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(l))}return u}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},ne=function(e,t){return!(t.disabled||X(t)||function(e){return Q(e)&&"hidden"===e.type}(t)||te(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!!$.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},re=function(e,t){return!(Z(t)||G(t)<0||!ne(e,t))},oe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ie=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,u=function(e,t){var n=G(e);return n<0&&t&&!K(e)?0:n}(l,i),c=i?e(t.candidates):l;0===u?i?n.push.apply(n,c):n.push(l):r.push({documentOrder:o,tabIndex:u,item:t,isScope:i,content:c})})),r.sort(J).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},le=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Y([e],t.includeContainer,{filter:re.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:oe}):function(e,t,n){if(X(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(_));return t&&$.call(e,_)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,re.bind(null,t)),ie(n)};function ue(e,t,n){let{reference:r,floating:o}=e;const i=H(t),l=function(e){return"x"===H(e)?"y":"x"}(t),u="y"===l?"height":"width";const c=B(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let p;switch(c){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,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(function(e){return e.split("-")[1]}(t)){case"start":p[l]-=d*(n&&s?-1:1);break;case"end":p[l]+=d*(n&&s?-1:1)}return p}function ce(e){const t=b(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=d(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=W(n)!==i||W(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function se(e){return f(e)?e:e.contextElement}function ae(e){const t=se(e);if(!d(t))return V(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ce(t);let l=(i?W(n.width):n.width)/r,u=(i?W(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}const fe=V(0);function de(e){const t=c(e);return y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fe}function pe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=se(e);let l=V(1);t&&(r?f(r)&&(l=ae(r)):l=ae(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==c(e))&&t}(i,n,r)?de(i):V(0);let s=(o.left+u.x)/l.x,a=(o.top+u.y)/l.y,d=o.width/l.x,p=o.height/l.y;if(i){const e=c(i),t=r&&f(r)?c(r):r;let n=e,o=C(n);for(;o&&r&&t!==n;){const e=ae(o),t=o.getBoundingClientRect(),r=b(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,a*=e.y,d*=e.x,p*=e.y,s+=i,a+=l,n=c(o),o=C(n)}}return q({width:d,height:p,x:s,y:a})}function me(e,t){const n=x(e).scrollLeft;return t?t.left+n:pe(s(e)).left+n}function he(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:me(e,r)),y:r.top+t.scrollTop}}function ve(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=c(e),r=s(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,a=0;if(o){i=o.width,l=o.height;const e=y();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:u,y:a}}(e,n);else if("document"===t)r=function(e){const t=s(e),n=x(e),r=e.ownerDocument.body,o=j(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=j(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+me(e);const u=-n.scrollTop;return"rtl"===b(r).direction&&(l+=j(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:u}}(s(e));else if(f(t))r=function(e,t){const n=pe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=d(e)?ae(e):V(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=de(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return q(r)}function ge(e,t){const n=E(e);return!(n===t||!f(n)||w(n))&&("fixed"===b(n).position||ge(n,t))}function ye(e,t,n){const r=d(t),o=s(t),i="fixed"===n,l=pe(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=V(0);if(r||!r&&!i)if(("body"!==u(t)||m(o))&&(c=x(t)),r){const e=pe(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=me(o));const f=!o||r||i?V(0):he(o,c);return{x:l.left+c.scrollLeft-a.x-f.x,y:l.top+c.scrollTop-a.y-f.y,width:l.width,height:l.height}}function we(e){return"static"===b(e).position}function be(e,t){if(!d(e)||"fixed"===b(e).position)return null;if(t)return t(e);let n=e.offsetParent;return s(e)===n&&(n=n.ownerDocument.body),n}function xe(e,t){const n=c(e);if(v(e))return n;if(!d(e)){let t=E(e);for(;t&&!w(t);){if(f(t)&&!we(t))return t;t=E(t)}return n}let r=be(e,t);for(;r&&h(r)&&we(r);)r=be(r,t);return r&&w(r)&&we(r)&&!g(r)?n:r||function(e){let t=E(e);for(;d(t)&&!w(t);){if(g(t))return t;if(v(t))return null;t=E(t)}return null}(e)||n}const Ee={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=s(r),c=!!t&&v(t.floating);if(r===l||c&&i)return n;let a={scrollLeft:0,scrollTop:0},f=V(1);const p=V(0),h=d(r);if((h||!h&&!i)&&(("body"!==u(r)||m(l))&&(a=x(r)),d(r))){const e=pe(r);f=ae(r),p.x=e.x+r.clientLeft,p.y=e.y+r.clientTop}const g=!l||h||i?V(0):he(l,a,!0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+p.x+g.x,y:n.y*f.y-a.scrollTop*f.y+p.y+g.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?v(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=S(e,[],!1).filter((e=>f(e)&&"body"!==u(e))),o=null;const i="fixed"===b(e).position;let l=i?E(e):e;for(;f(l)&&!w(l);){const t=b(l),n=g(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||m(l)&&!n&&ge(e,l))?r=r.filter((e=>e!==l)):o=t,l=E(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],c=i.reduce(((e,n)=>{const r=ve(t,n,o);return e.top=j(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=j(r.left,e.left),e}),ve(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:xe,getElementRects:async function(e){const t=this.getOffsetParent||xe,n=this.getDimensions,r=await n(e.floating);return{reference:ye(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}=ce(e);return{width:t,height:n}},getScale:ae,isElement:f,isRTL:function(e){return"rtl"===b(e).direction}},Re=(e,t,n)=>{const r=new Map,o={platform:Ee,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=ue(s,r,c),d=r,p={},m=0;for(let n=0;n<u.length;n++){const{name:i,fn:h}=u[n],{x:v,y:g,data:y,reset:w}=await h({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});a=null!=v?v:a,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=ue(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Se="undefined"!=typeof document?n:r;function Ce(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(!Ce(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)&&!Ce(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Te(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oe(e,t){const n=Te(e);return Math.round(t*n)/n}function Ae(t){const n=e.useRef(t);return Se((()=>{n.current=t})),n}const Le={...e},Ne=Le.useInsertionEffect||(e=>e());function ke(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Ne((()=>{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)}),[])}let Me=0;function Ie(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Me);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Me=requestAnimationFrame(i)}var De="undefined"!=typeof document?n:r;function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(this,arguments)}let Pe=!1,je=0;const We=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+je++;const Ve=Le.useId||function(){const[t,n]=e.useState((()=>Pe?We():void 0));return De((()=>{null==t&&n(We())}),[]),e.useEffect((()=>{Pe=!0}),[]),t};let Be;"production"!==process.env.NODE_ENV&&(Be=new Set);const He=e.createContext(null),qe=e.createContext(null),_e=()=>e.useContext(qe);function Ue(e){return"data-floating-ui-"+e}function $e(e){const t=o(e);return De((()=>{t.current=e})),t}function ze(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 Xe=new WeakMap,Ye=new WeakSet,Ke={},Ge=0;const Je=e=>e&&(e.host||Je(e.parentNode));function Qe(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=Je(e);return c.contains(t)?t:null})).filter((e=>null!=e)));var c;const s=new Set,a=new Set(l),f=[];Ke[o]||(Ke[o]=new WeakMap);const d=Ke[o];return l.forEach((function e(t){if(!t||s.has(t))return;s.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||a.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==u(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Xe.get(t)||0)+1,l=(d.get(t)||0)+1;Xe.set(t,r),d.set(t,l),f.push(t),1===r&&n&&Ye.add(t),1===l&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),Ge++,()=>{f.forEach((e=>{const t=(Xe.get(e)||0)-1,n=(d.get(e)||0)-1;Xe.set(e,t),d.set(e,n),t||(!Ye.has(e)&&i&&e.removeAttribute(i),Ye.delete(e)),n||e.removeAttribute(o)})),Ge--,Ge||(Xe=new WeakMap,Xe=new WeakMap,Ye=new WeakSet,Ke={})}}function Ze(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=M(e[0]).body;return Qe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const et=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function tt(e,t){const n=le(e,et());"prev"===t&&n.reverse();const r=n.indexOf(T(M(e)));return n.slice(r+1)[0]}function nt(){return tt(document.body,"next")}function rt(){return tt(document.body,"prev")}function ot(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!O(n,r)}function it(e){le(e,et()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function lt(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 ut={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 ct(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const st=e.forwardRef((function(t,n){const[r,o]=e.useState();De((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",ct),()=>{document.removeEventListener("keydown",ct)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[Ue("focus-guard")]:"",style:ut};return e.createElement("span",Fe({},t,i))})),at=e.createContext(null),ft=Ue("portal");function dt(t){const{children:n,id:r,root:o,preserveTabOrder:l=!0}=t,u=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=Ve(),i=pt(),[l,u]=e.useState(null),c=e.useRef(null);return De((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{c.current=null}))}),[l]),De((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(ft,""),e.appendChild(t),c.current=t,u(t)}),[n,o]),De((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!f(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(ft,""),e=t||e,e.appendChild(l),c.current=l,u(l)}),[n,r,o,i]),l}({id:r,root:o}),[c,s]=e.useState(null),a=e.useRef(null),d=e.useRef(null),p=e.useRef(null),m=e.useRef(null),h=null==c?void 0:c.modal,v=null==c?void 0:c.open,g=!!c&&!c.modal&&c.open&&l&&!(!o&&!u);return e.useEffect((()=>{if(u&&l&&!h)return u.addEventListener("focusin",e,!0),u.addEventListener("focusout",e,!0),()=>{u.removeEventListener("focusin",e,!0),u.removeEventListener("focusout",e,!0)};function e(e){if(u&&ot(e)){("focusin"===e.type?lt:it)(u)}}}),[u,l,h]),e.useEffect((()=>{u&&(v||lt(u))}),[v,u]),e.createElement(at.Provider,{value:e.useMemo((()=>({preserveTabOrder:l,beforeOutsideRef:a,afterOutsideRef:d,beforeInsideRef:p,afterInsideRef:m,portalNode:u,setFocusManagerState:s})),[l,u])},g&&u&&e.createElement(st,{"data-type":"outside",ref:a,onFocus:e=>{if(ot(e,u)){var t;null==(t=p.current)||t.focus()}else{const e=rt()||(null==c?void 0:c.refs.domReference.current);null==e||e.focus()}}}),g&&u&&e.createElement("span",{"aria-owns":u.id,style:ut}),u&&i.createPortal(n,u),g&&u&&e.createElement(st,{"data-type":"outside",ref:d,onFocus:e=>{if(ot(e,u)){var t;null==(t=m.current)||t.focus()}else{const t=nt()||(null==c?void 0:c.refs.domReference.current);null==t||t.focus(),(null==c?void 0:c.closeOnFocusOut)&&(null==c||c.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const pt=()=>e.useContext(at),mt="data-floating-ui-focusable";let ht=[];function vt(e){ht=ht.filter((e=>e.isConnected));let t=e;if(t&&"body"!==u(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$.call(e,_)&&re(t,e)}(t,et())){const e=le(t,et())[0];e&&(t=e)}ht.push(t),ht.length>20&&(ht=ht.slice(-20))}}function gt(){return ht.slice().reverse().find((e=>e.isConnected))}const yt=e.forwardRef((function(t,n){return e.createElement("button",Fe({},t,{type:"button",ref:n,tabIndex:-1,style:ut}))}));function wt(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:u=0,returnFocus:c=!0,restoreFocus:s=!1,modal:a=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:p=!0}=t,{open:m,refs:h,nodeId:v,onOpenChange:g,events:y,dataRef:w,floatingId:b,elements:{domReference:x,floating:E}}=n,R="number"==typeof u&&u<0,S=F(x)&&R,C="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||l,A=$e(i),L=$e(u),P=$e(c),j=_e(),W=pt(),V=e.useRef(null),B=e.useRef(null),H=e.useRef(!1),q=e.useRef(!1),_=e.useRef(-1),U=null!=W,$=(z=E)?z.hasAttribute(mt)?z:z.querySelector("["+mt+"]")||z:null;var z;const X=ke((function(e){return void 0===e&&(e=$),e?le(e,et()):[]})),Y=ke((e=>{const t=X(e);return A.current.map((e=>x&&"reference"===e?x:$&&"floating"===e?$:t)).filter(Boolean).flat()}));function K(t){return!o&&f&&a?e.createElement(yt,{ref:"start"===t?V:B,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof f?f:"Dismiss"):null}e.useEffect((()=>{H.current=!1}),[o]),e.useEffect((()=>{if(o)return;if(!a)return;function e(e){if("Tab"===e.key){O($,T(M($)))&&0===X().length&&!S&&D(e);const t=Y(),n=I(e);"reference"===A.current[0]&&n===x&&(D(e),e.shiftKey?Ie(t[t.length-1]):Ie(t[1])),"floating"===A.current[1]&&n===$&&e.shiftKey&&(D(e),Ie(t[0]))}}const t=M($);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,x,$,a,A,S,X,Y]),e.useEffect((()=>{if(!o&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){const t=I(e),n=X().indexOf(t);-1!==n&&(_.current=n)}}),[o,E,X]),e.useEffect((()=>{if(!o&&p)return E&&d(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),E.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t)}):void 0;function e(){q.current=!0,setTimeout((()=>{q.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(O(x,t)||O(E,t)||O(t,E)||O(null==W?void 0:W.portalNode,t)||null!=t&&t.hasAttribute(Ue("focus-guard"))||j&&(ze(j.nodesRef.current,v).find((e=>{var n,r;return O(null==(n=e.context)?void 0:n.elements.floating,t)||O(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(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}(j.nodesRef.current,v).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(s&&n&&T(M($))===M($).body){d($)&&$.focus();const e=_.current,t=X(),n=t[e]||t[t.length-1]||$;d(n)&&n.focus()}!S&&a||!t||!n||q.current||t===gt()||(H.current=!0,g(!1,e,"focus-out"))}))}}),[o,x,E,$,a,v,j,W,g,p,s,X,S]),e.useEffect((()=>{var e;if(o)return;const t=Array.from((null==W||null==(e=W.portalNode)?void 0:e.querySelectorAll("["+Ue("portal")+"]"))||[]);if(E){const e=[E,...t,V.current,B.current,A.current.includes("reference")||S?x:null].filter((e=>null!=e)),n=a||S?Ze(e,C,!C):Ze(e);return()=>{n()}}}),[o,x,E,a,A,W,S,C]),De((()=>{if(o||!d($))return;const e=T(M($));queueMicrotask((()=>{const t=Y($),n=L.current,r=("number"==typeof n?t[n]:n.current)||$,o=O($,e);R||o||!m||Ie(r,{preventScroll:r===$})}))}),[o,m,$,R,Y,L]),De((()=>{if(o||!$)return;let e=!1;const t=M($),n=T(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&&h.domReference.current&&vt(h.domReference.current),"hover"===o&&"mouseleave"===i.type&&(H.current=!0),"outside-press"===o&&(l?(H.current=!1,e=!0):H.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(k()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||N(i)))}vt(n),y.on("openchange",i);const l=t.createElement("span");return l.setAttribute("tabindex","-1"),l.setAttribute("aria-hidden","true"),Object.assign(l.style,ut),U&&x&&x.insertAdjacentElement("afterend",l),()=>{y.off("openchange",i);const n=T(t),o=O(E,n)||j&&ze(j.nodesRef.current,v).some((e=>{var t;return O(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&h.domReference.current&&vt(h.domReference.current);const u="boolean"==typeof P.current?gt()||l:P.current.current||l;queueMicrotask((()=>{P.current&&!H.current&&d(u)&&(u===n||n===t.body||o)&&u.focus({preventScroll:e}),l.remove()}))}}),[o,E,$,P,w,h,y,j,v,U,x]),De((()=>{if(!o&&W)return W.setFocusManagerState({modal:a,closeOnFocusOut:p,open:m,onOpenChange:g,refs:h}),()=>{W.setFocusManagerState(null)}}),[o,W,a,m,g,h,p]),De((()=>{if(o)return;if(!$)return;if("function"!=typeof MutationObserver)return;if(R)return;const e=()=>{const e=$.getAttribute("tabindex"),t=X(),n=T(M(E)),r=t.indexOf(n);-1!==r&&(_.current=r),A.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&$.setAttribute("tabindex","0"):"-1"!==e&&$.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe($,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,E,$,h,A,X,R]);const G=!o&&C&&(!a||!S)&&(U||a);return e.createElement(e.Fragment,null,G&&e.createElement(st,{"data-type":"inside",ref:null==W?void 0:W.beforeInsideRef,onFocus:e=>{if(a){const e=Y();Ie("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(H.current=!1,ot(e,W.portalNode)){const e=nt()||x;null==e||e.focus()}else{var t;null==(t=W.beforeOutsideRef.current)||t.focus()}}}),!S&&K("start"),r,K("end"),G&&e.createElement(st,{"data-type":"inside",ref:null==W?void 0:W.afterInsideRef,onFocus:e=>{if(a)Ie(Y()[0]);else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(p&&(H.current=!0),ot(e,W.portalNode)){const e=rt()||x;null==e||e.focus()}else{var t;null==(t=W.afterOutsideRef.current)||t.focus()}}}))}let bt=0;let xt=()=>{};const Et=e.forwardRef((function(t,n){const{lockScroll:r=!1,...o}=t;return De((()=>{if(r)return bt++,1===bt&&(xt=function(){const e=/iP(hone|ad|od)|iOS/.test(A()),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,u;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(u=window.visualViewport)?void 0:u.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))}}()),()=>{bt--,0===bt&&xt()}}),[r]),e.createElement("div",Fe({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Rt(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=Ve(),l=e.useRef({}),[u]=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)))||[])}}}())),c=null!=((null==(s=e.useContext(He))?void 0:s.id)||null);var s;if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!f(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=Be)&&e.has(o)||(null==(i=Be)||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,d]=e.useState(o.reference),p=ke(((e,t,n)=>{l.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),m=e.useMemo((()=>({setPositionReference:d})),[]),h=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:p,elements:h,events:u,floatingId:i,refs:m})),[n,p,h,u,i,m])}function St(t){void 0===t&&(t={});const{nodeId:n}=t,r=Rt({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,l=o.elements,[u,c]=e.useState(null),[s,a]=e.useState(null),d=(null==l?void 0:l.domReference)||u,p=e.useRef(null),m=_e();De((()=>{d&&(p.current=d)}),[d]);const h=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:c}={},transform:s=!0,whileElementsMounted:a,open:f}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=e.useState(o);Ce(m,o)||h(o);const[v,g]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==C.current&&(C.current=e,w(e))}),[]),E=u||v,R=c||y,S=e.useRef(null),C=e.useRef(null),T=e.useRef(d),O=null!=a,A=Ae(a),L=Ae(l),N=Ae(f),k=e.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:m};L.current&&(e.platform=L.current),Re(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};M.current&&!Ce(T.current,t)&&(T.current=t,i.flushSync((()=>{p(t)})))}))}),[m,n,r,L,N]);Se((()=>{!1===f&&T.current.isPositioned&&(T.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const M=e.useRef(!1);Se((()=>(M.current=!0,()=>{M.current=!1})),[]),Se((()=>{if(E&&(S.current=E),R&&(C.current=R),E&&R){if(A.current)return A.current(E,R,k);k()}}),[E,R,k,A,O]);const I=e.useMemo((()=>({reference:S,floating:C,setReference:b,setFloating:x})),[b,x]),D=e.useMemo((()=>({reference:E,floating:R})),[E,R]),F=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=Oe(D.floating,d.x),n=Oe(D.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Te(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,D.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:k,refs:I,elements:D,floatingStyles:F})),[d,k,I,D,F])}({...t,elements:{...l,...s&&{reference:s}}}),v=e.useCallback((e=>{const t=f(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),h.refs.setReference(t)}),[h.refs]),g=e.useCallback((e=>{(f(e)||null===e)&&(p.current=e,c(e)),(f(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!f(e))&&h.refs.setReference(e)}),[h.refs]),y=e.useMemo((()=>({...h.refs,setReference:g,setPositionReference:v,domReference:p})),[h.refs,g,v]),w=e.useMemo((()=>({...h.elements,domReference:d})),[h.elements,d]),b=e.useMemo((()=>({...h,...o,refs:y,elements:w,nodeId:n})),[h,y,w,n,o]);return De((()=>{o.dataRef.current.floatingContext=b;const e=null==m?void 0:m.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...h,context:b,refs:y,elements:w})),[h,y,w,b])}var Ct=function(e){var n=e.open,r=void 0===n||n,o=e.onClose,i=e.children,l=St().context;return t.createElement("div",{className:"modal"},t.createElement("div",{className:"modal__content"},t.createElement("div",null,i),t.createElement("div",null,r&&t.createElement(dt,null,t.createElement(Et,{className:"overlay",lockScroll:!0},t.createElement(wt,{context:l},t.createElement("div",{className:"fixed bg-black/80 overflow-auto w-screen h-screen grid place-items-center"},t.createElement("div",{className:"bg-white p-4 inline-block rounded-md shadow-lg"},t.createElement("button",{onClick:function(){o(!1)}},"Close"),t.createElement("div",null,"Modal Content",t.createElement("div",null,t.createElement("input",{type:"text",autoFocus:!0})))))))))))};export{Ct as Modal,Ct as default};
5
+ */var _=["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(","),U="undefined"==typeof Element,$=U?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,z=!U&&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},X=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)},Y=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var u=i.shift();if(!X(u,!1))if("SLOT"===u.tagName){var l=u.assignedElements(),c=e(l.length?l:u.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:u,candidates:c})}else{$.call(u,_)&&r.filter(u)&&(n||!t.includes(u))&&o.push(u);var s=u.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(u),a=!X(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(u));if(s&&a){var f=e(!0===s?u.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:u,candidates:f})}else i.unshift.apply(i,u.children)}}return o},K=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},G=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))&&!K(e)?0:e.tabIndex},J=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Q=function(e){return"INPUT"===e.tagName},Z=function(e){return function(e){return Q(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||z(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)},ee=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},te=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=$.call(e,"details>summary:first-of-type")?e.parentElement:e;if($.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ee(e)}else{if("function"==typeof r){for(var i=e;e;){var u=e.parentElement,l=z(e);if(u&&!u.shadowRoot&&!0===r(u))return ee(e);e=e.assignedSlot?e.assignedSlot:u||l===e.ownerDocument?u:l.host}e=i}if(function(e){var t,n,r,o,i=e&&z(e),u=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=u)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(u)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&u;){var c,s,a;l=!(null===(s=u=null===(c=i=z(u))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(u))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},ne=function(e,t){return!(t.disabled||X(t)||function(e){return Q(e)&&"hidden"===e.type}(t)||te(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!!$.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},re=function(e,t){return!(Z(t)||G(t)<0||!ne(e,t))},oe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ie=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,u=i?t.scopeParent:t,l=function(e,t){var n=G(e);return n<0&&t&&!K(e)?0:n}(u,i),c=i?e(t.candidates):u;0===l?i?n.push.apply(n,c):n.push(u):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(J).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},ue=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Y([e],t.includeContainer,{filter:re.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:oe}):function(e,t,n){if(X(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(_));return t&&$.call(e,_)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,re.bind(null,t)),ie(n)};function le(e,t,n){let{reference:r,floating:o}=e;const i=q(t),u=function(e){return"x"===q(e)?"y":"x"}(t),l="y"===u?"height":"width";const c=B(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,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(function(e){return e.split("-")[1]}(t)){case"start":p[u]-=d*(n&&s?-1:1);break;case"end":p[u]+=d*(n&&s?-1:1)}return p}function ce(e){const t=b(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=d(e),i=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=W(n)!==i||W(r)!==u;return l&&(n=i,r=u),{width:n,height:r,$:l}}function se(e){return f(e)?e:e.contextElement}function ae(e){const t=se(e);if(!d(t))return V(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ce(t);let u=(i?W(n.width):n.width)/r,l=(i?W(n.height):n.height)/o;return u&&Number.isFinite(u)||(u=1),l&&Number.isFinite(l)||(l=1),{x:u,y:l}}const fe=V(0);function de(e){const t=c(e);return y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fe}function pe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=se(e);let u=V(1);t&&(r?f(r)&&(u=ae(r)):u=ae(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==c(e))&&t}(i,n,r)?de(i):V(0);let s=(o.left+l.x)/u.x,a=(o.top+l.y)/u.y,d=o.width/u.x,p=o.height/u.y;if(i){const e=c(i),t=r&&f(r)?c(r):r;let n=e,o=C(n);for(;o&&r&&t!==n;){const e=ae(o),t=o.getBoundingClientRect(),r=b(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,u=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,a*=e.y,d*=e.x,p*=e.y,s+=i,a+=u,n=c(o),o=C(n)}}return H({width:d,height:p,x:s,y:a})}function me(e,t){const n=x(e).scrollLeft;return t?t.left+n:pe(s(e)).left+n}function he(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:me(e,r)),y:r.top+t.scrollTop}}function ve(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=c(e),r=s(e),o=n.visualViewport;let i=r.clientWidth,u=r.clientHeight,l=0,a=0;if(o){i=o.width,u=o.height;const e=y();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:u,x:l,y:a}}(e,n);else if("document"===t)r=function(e){const t=s(e),n=x(e),r=e.ownerDocument.body,o=j(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=j(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+me(e);const l=-n.scrollTop;return"rtl"===b(r).direction&&(u+=j(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:u,y:l}}(s(e));else if(f(t))r=function(e,t){const n=pe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=d(e)?ae(e):V(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=de(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return H(r)}function ge(e,t){const n=E(e);return!(n===t||!f(n)||w(n))&&("fixed"===b(n).position||ge(n,t))}function ye(e,t,n){const r=d(t),o=s(t),i="fixed"===n,u=pe(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=V(0);if(r||!r&&!i)if(("body"!==l(t)||m(o))&&(c=x(t)),r){const e=pe(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=me(o));const f=!o||r||i?V(0):he(o,c);return{x:u.left+c.scrollLeft-a.x-f.x,y:u.top+c.scrollTop-a.y-f.y,width:u.width,height:u.height}}function we(e){return"static"===b(e).position}function be(e,t){if(!d(e)||"fixed"===b(e).position)return null;if(t)return t(e);let n=e.offsetParent;return s(e)===n&&(n=n.ownerDocument.body),n}function xe(e,t){const n=c(e);if(v(e))return n;if(!d(e)){let t=E(e);for(;t&&!w(t);){if(f(t)&&!we(t))return t;t=E(t)}return n}let r=be(e,t);for(;r&&h(r)&&we(r);)r=be(r,t);return r&&w(r)&&we(r)&&!g(r)?n:r||function(e){let t=E(e);for(;d(t)&&!w(t);){if(g(t))return t;if(v(t))return null;t=E(t)}return null}(e)||n}const Ee={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,u=s(r),c=!!t&&v(t.floating);if(r===u||c&&i)return n;let a={scrollLeft:0,scrollTop:0},f=V(1);const p=V(0),h=d(r);if((h||!h&&!i)&&(("body"!==l(r)||m(u))&&(a=x(r)),d(r))){const e=pe(r);f=ae(r),p.x=e.x+r.clientLeft,p.y=e.y+r.clientTop}const g=!u||h||i?V(0):he(u,a,!0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+p.x+g.x,y:n.y*f.y-a.scrollTop*f.y+p.y+g.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?v(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=S(e,[],!1).filter((e=>f(e)&&"body"!==l(e))),o=null;const i="fixed"===b(e).position;let u=i?E(e):e;for(;f(u)&&!w(u);){const t=b(u),n=g(u);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||m(u)&&!n&&ge(e,u))?r=r.filter((e=>e!==u)):o=t,u=E(u)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=i[0],c=i.reduce(((e,n)=>{const r=ve(t,n,o);return e.top=j(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=j(r.left,e.left),e}),ve(t,u,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:xe,getElementRects:async function(e){const t=this.getOffsetParent||xe,n=this.getDimensions,r=await n(e.floating);return{reference:ye(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}=ce(e);return{width:t,height:n}},getScale:ae,isElement:f,isRTL:function(e){return"rtl"===b(e).direction}},Re=(e,t,n)=>{const r=new Map,o={platform:Ee,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u}=n,l=i.filter(Boolean),c=await(null==u.isRTL?void 0:u.isRTL(t));let s=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=le(s,r,c),d=r,p={},m=0;for(let n=0;n<l.length;n++){const{name:i,fn:h}=l[n],{x:v,y:g,data:y,reset:w}=await h({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:u,elements:{reference:e,floating:t}});a=null!=v?v:a,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await u.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=le(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Se="undefined"!=typeof document?n:r;function Ce(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(!Ce(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)&&!Ce(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Oe(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Te(e,t){const n=Oe(e);return Math.round(t*n)/n}function Ae(t){const n=e.useRef(t);return Se((()=>{n.current=t})),n}function Le(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 Ne={...e},ke=Ne.useInsertionEffect||(e=>e());function Me(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return ke((()=>{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 Ie="undefined"!=typeof document?n:r;function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(this,arguments)}let Fe=!1,Pe=0;const je=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Pe++;const We=Ne.useId||function(){const[t,n]=e.useState((()=>Fe?je():void 0));return Ie((()=>{null==t&&n(je())}),[]),e.useEffect((()=>{Fe=!0}),[]),t};let Ve;"production"!==process.env.NODE_ENV&&(Ve=new Set);const Be=e.createContext(null),qe=e.createContext(null),He=()=>e.useContext(qe);function _e(e){return"data-floating-ui-"+e}function Ue(e){const t=o(e);return Ie((()=>{t.current=e})),t}let $e=0;function ze(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($e);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():$e=requestAnimationFrame(i)}function Xe(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 Ye=new WeakMap,Ke=new WeakSet,Ge={},Je=0;const Qe=e=>e&&(e.host||Qe(e.parentNode));function Ze(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,u=(c=t,e.map((e=>{if(c.contains(e))return e;const t=Qe(e);return c.contains(t)?t:null})).filter((e=>null!=e)));var c;const s=new Set,a=new Set(u),f=[];Ge[o]||(Ge[o]=new WeakMap);const d=Ge[o];return u.forEach((function e(t){if(!t||s.has(t))return;s.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||a.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==l(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Ye.get(t)||0)+1,u=(d.get(t)||0)+1;Ye.set(t,r),d.set(t,u),f.push(t),1===r&&n&&Ke.add(t),1===u&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),Je++,()=>{f.forEach((e=>{const t=(Ye.get(e)||0)-1,n=(d.get(e)||0)-1;Ye.set(e,t),d.set(e,n),t||(!Ke.has(e)&&i&&e.removeAttribute(i),Ke.delete(e)),n||e.removeAttribute(o)})),Je--,Je||(Ye=new WeakMap,Ye=new WeakMap,Ke=new WeakSet,Ge={})}}function et(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=M(e[0]).body;return Ze(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const tt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function nt(e,t){const n=ue(e,tt());"prev"===t&&n.reverse();const r=n.indexOf(O(M(e)));return n.slice(r+1)[0]}function rt(){return nt(document.body,"next")}function ot(){return nt(document.body,"prev")}function it(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!T(n,r)}function ut(e){ue(e,tt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function lt(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 ct={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 st(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const at=e.forwardRef((function(t,n){const[r,o]=e.useState();Ie((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",st),()=>{document.removeEventListener("keydown",st)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[_e("focus-guard")]:"",style:ct};return e.createElement("span",De({},t,i))})),ft=e.createContext(null),dt=_e("portal");function pt(t){const{children:n,id:r,root:o,preserveTabOrder:u=!0}=t,l=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=We(),i=mt(),[u,l]=e.useState(null),c=e.useRef(null);return Ie((()=>()=>{null==u||u.remove(),queueMicrotask((()=>{c.current=null}))}),[u]),Ie((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(dt,""),e.appendChild(t),c.current=t,l(t)}),[n,o]),Ie((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!f(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const u=document.createElement("div");u.id=o,u.setAttribute(dt,""),e=t||e,e.appendChild(u),c.current=u,l(u)}),[n,r,o,i]),u}({id:r,root:o}),[c,s]=e.useState(null),a=e.useRef(null),d=e.useRef(null),p=e.useRef(null),m=e.useRef(null),h=null==c?void 0:c.modal,v=null==c?void 0:c.open,g=!!c&&!c.modal&&c.open&&u&&!(!o&&!l);return e.useEffect((()=>{if(l&&u&&!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&&it(e)){("focusin"===e.type?lt:ut)(l)}}}),[l,u,h]),e.useEffect((()=>{l&&(v||lt(l))}),[v,l]),e.createElement(ft.Provider,{value:e.useMemo((()=>({preserveTabOrder:u,beforeOutsideRef:a,afterOutsideRef:d,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:s})),[u,l])},g&&l&&e.createElement(at,{"data-type":"outside",ref:a,onFocus:e=>{if(it(e,l)){var t;null==(t=p.current)||t.focus()}else{const e=ot()||(null==c?void 0:c.refs.domReference.current);null==e||e.focus()}}}),g&&l&&e.createElement("span",{"aria-owns":l.id,style:ct}),l&&i.createPortal(n,l),g&&l&&e.createElement(at,{"data-type":"outside",ref:d,onFocus:e=>{if(it(e,l)){var t;null==(t=m.current)||t.focus()}else{const t=rt()||(null==c?void 0:c.refs.domReference.current);null==t||t.focus(),(null==c?void 0:c.closeOnFocusOut)&&(null==c||c.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const mt=()=>e.useContext(ft),ht="data-floating-ui-focusable";let vt=[];function gt(e){vt=vt.filter((e=>e.isConnected)),e&&"body"!==l(e)&&(vt.push(e),vt.length>20&&(vt=vt.slice(-20)))}function yt(){return vt.slice().reverse().find((e=>e.isConnected))}function wt(e){const t=tt();return function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$.call(e,_)&&re(t,e)}(e,t)?e:ue(e,t)[0]}const bt=e.forwardRef((function(t,n){return e.createElement("button",De({},t,{type:"button",ref:n,tabIndex:-1,style:ct}))}));function xt(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:u=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:s=!1,modal:a=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:p=!0,outsideElementsInert:m=!1}=t,{open:h,refs:v,nodeId:g,onOpenChange:y,events:w,dataRef:b,elements:{domReference:x,floating:E}}=n,R="number"==typeof l&&l<0,S=F(x)&&R,C="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,A=!C||u,L=!A||C&&m,P=Ue(i),j=Ue(l),W=Ue(c),V=He(),B=mt(),q=e.useRef(null),H=e.useRef(null),_=e.useRef(!1),U=e.useRef(!1),$=e.useRef(-1),z=null!=B,X=(Y=E)?Y.hasAttribute(ht)?Y:Y.querySelector("["+ht+"]")||Y:null;var Y;const K=Me((function(e){return void 0===e&&(e=X),e?ue(e,tt()):[]})),G=Me((e=>{const t=K(e);return P.current.map((e=>x&&"reference"===e?x:X&&"floating"===e?X:t)).filter(Boolean).flat()}));e.useEffect((()=>{if(o)return;if(!a)return;function e(e){if("Tab"===e.key){T(X,O(M(X)))&&0===K().length&&!S&&D(e);const t=G(),n=I(e);"reference"===P.current[0]&&n===x&&(D(e),e.shiftKey?ze(t[t.length-1]):ze(t[1])),"floating"===P.current[1]&&n===X&&e.shiftKey&&(D(e),ze(t[0]))}}const t=M(X);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,x,X,a,P,S,K,G]),e.useEffect((()=>{if(!o&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){const t=I(e),n=K().indexOf(t);-1!==n&&($.current=n)}}),[o,E,K]),e.useEffect((()=>{if(!o&&p)return E&&d(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),E.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t)}):void 0;function e(){U.current=!0,setTimeout((()=>{U.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(T(x,t)||T(E,t)||T(t,E)||T(null==B?void 0:B.portalNode,t)||null!=t&&t.hasAttribute(_e("focus-guard"))||V&&(Xe(V.nodesRef.current,g).find((e=>{var n,r;return T(null==(n=e.context)?void 0:n.elements.floating,t)||T(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(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}(V.nodesRef.current,g).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(s&&n&&O(M(X))===M(X).body){d(X)&&X.focus();const e=$.current,t=K(),n=t[e]||t[t.length-1]||X;d(n)&&n.focus()}!S&&a||!t||!n||U.current||t===yt()||(_.current=!0,y(!1,e,"focus-out"))}))}}),[o,x,E,X,a,g,V,B,y,p,s,K,S]);const J=e.useRef(null),Q=e.useRef(null),Z=Le([J,null==B?void 0:B.beforeInsideRef]),ee=Le([Q,null==B?void 0:B.afterInsideRef]);function te(t){return!o&&f&&a?e.createElement(bt,{ref:"start"===t?q:H,onClick:e=>y(!1,e.nativeEvent)},"string"==typeof f?f:"Dismiss"):null}e.useEffect((()=>{var e;if(o)return;const t=Array.from((null==B||null==(e=B.portalNode)?void 0:e.querySelectorAll("["+_e("portal")+"]"))||[]);if(E){const e=[E,...t,q.current,H.current,J.current,Q.current,null==B?void 0:B.beforeOutsideRef.current,null==B?void 0:B.afterOutsideRef.current,P.current.includes("reference")||S?x:null].filter((e=>null!=e)),n=a||S?et(e,!L,L):et(e);return()=>{n()}}}),[o,x,E,a,P,B,S,A,L]),Ie((()=>{if(o||!d(X))return;const e=O(M(X));queueMicrotask((()=>{const t=G(X),n=j.current,r=("number"==typeof n?t[n]:n.current)||X,o=T(X,e);R||o||!h||ze(r,{preventScroll:r===X})}))}),[o,h,X,R,G,j]),Ie((()=>{if(o||!X)return;let e=!1;const t=M(X),n=O(t);let r=b.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:u}=t;n&&(r=i),"escape-key"===o&&v.domReference.current&&gt(v.domReference.current),["hover","safe-polygon"].includes(o)&&"mouseleave"===i.type&&(_.current=!0),"outside-press"===o&&(u?(_.current=!1,e=!0):_.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(k()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||N(i)))}gt(n),w.on("openchange",i);const u=t.createElement("span");return u.setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),Object.assign(u.style,ct),z&&x&&x.insertAdjacentElement("afterend",u),()=>{w.off("openchange",i);const n=O(t),o=T(E,n)||V&&Xe(V.nodesRef.current,g).some((e=>{var t;return T(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&v.domReference.current&&gt(v.domReference.current);const l="boolean"==typeof W.current?yt()||u:W.current.current||u;queueMicrotask((()=>{const r=wt(l);W.current&&!_.current&&d(r)&&(r===n||n===t.body||o)&&r.focus({preventScroll:e}),u.remove()}))}}),[o,E,X,W,b,v,w,V,g,z,x]),e.useEffect((()=>{queueMicrotask((()=>{_.current=!1}))}),[o]),Ie((()=>{if(!o&&B)return B.setFocusManagerState({modal:a,closeOnFocusOut:p,open:h,onOpenChange:y,refs:v}),()=>{B.setFocusManagerState(null)}}),[o,B,a,h,y,v,p]),Ie((()=>{if(o)return;if(!X)return;if("function"!=typeof MutationObserver)return;if(R)return;const e=()=>{const e=X.getAttribute("tabindex"),t=K(),n=O(M(E)),r=t.indexOf(n);-1!==r&&($.current=r),P.current.includes("floating")||n!==v.domReference.current&&0===t.length?"0"!==e&&X.setAttribute("tabindex","0"):"-1"!==e&&X.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(X,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,E,X,v,P,K,R]);const ne=!o&&A&&(!a||!S)&&(z||a);return e.createElement(e.Fragment,null,ne&&e.createElement(at,{"data-type":"inside",ref:Z,onFocus:e=>{if(a){const e=G();ze("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=B&&B.preserveTabOrder&&B.portalNode)if(_.current=!1,it(e,B.portalNode)){const e=rt()||x;null==e||e.focus()}else{var t;null==(t=B.beforeOutsideRef.current)||t.focus()}}}),!S&&te("start"),r,te("end"),ne&&e.createElement(at,{"data-type":"inside",ref:ee,onFocus:e=>{if(a)ze(G()[0]);else if(null!=B&&B.preserveTabOrder&&B.portalNode)if(p&&(_.current=!0),it(e,B.portalNode)){const e=ot()||x;null==e||e.focus()}else{var t;null==(t=B.afterOutsideRef.current)||t.focus()}}}))}let Et=0;let Rt=()=>{};const St=e.forwardRef((function(t,n){const{lockScroll:r=!1,...o}=t;return Ie((()=>{if(r)return Et++,1===Et&&(Rt=function(){const e=/iP(hone|ad|od)|iOS/.test(A()),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 u,l;const e=(null==(u=window.visualViewport)?void 0:u.offsetLeft)||0,n=(null==(l=window.visualViewport)?void 0:l.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))}}()),()=>{Et--,0===Et&&Rt()}}),[r]),e.createElement("div",De({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Ct(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=We(),u=e.useRef({}),[l]=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)))||[])}}}())),c=null!=((null==(s=e.useContext(Be))?void 0:s.id)||null);var s;if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!f(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=Ve)&&e.has(o)||(null==(i=Ve)||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,d]=e.useState(o.reference),p=Me(((e,t,n)=>{u.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),m=e.useMemo((()=>({setPositionReference:d})),[]),h=e.useMemo((()=>({reference:a||o.reference||null,floating:o.floating||null,domReference:o.reference})),[a,o.reference,o.floating]);return e.useMemo((()=>({dataRef:u,open:n,onOpenChange:p,elements:h,events:l,floatingId:i,refs:m})),[n,p,h,l,i,m])}function Ot(t){void 0===t&&(t={});const{nodeId:n}=t,r=Ct({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,u=o.elements,[l,c]=e.useState(null),[s,a]=e.useState(null),d=(null==u?void 0:u.domReference)||l,p=e.useRef(null),m=He();Ie((()=>{d&&(p.current=d)}),[d]);const h=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:u,elements:{reference:l,floating:c}={},transform:s=!0,whileElementsMounted:a,open:f}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=e.useState(o);Ce(m,o)||h(o);const[v,g]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==C.current&&(C.current=e,w(e))}),[]),E=l||v,R=c||y,S=e.useRef(null),C=e.useRef(null),O=e.useRef(d),T=null!=a,A=Ae(a),L=Ae(u),N=Ae(f),k=e.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:m};L.current&&(e.platform=L.current),Re(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};M.current&&!Ce(O.current,t)&&(O.current=t,i.flushSync((()=>{p(t)})))}))}),[m,n,r,L,N]);Se((()=>{!1===f&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const M=e.useRef(!1);Se((()=>(M.current=!0,()=>{M.current=!1})),[]),Se((()=>{if(E&&(S.current=E),R&&(C.current=R),E&&R){if(A.current)return A.current(E,R,k);k()}}),[E,R,k,A,T]);const I=e.useMemo((()=>({reference:S,floating:C,setReference:b,setFloating:x})),[b,x]),D=e.useMemo((()=>({reference:E,floating:R})),[E,R]),F=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=Te(D.floating,d.x),n=Te(D.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Oe(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,D.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:k,refs:I,elements:D,floatingStyles:F})),[d,k,I,D,F])}({...t,elements:{...u,...s&&{reference:s}}}),v=e.useCallback((e=>{const t=f(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),h.refs.setReference(t)}),[h.refs]),g=e.useCallback((e=>{(f(e)||null===e)&&(p.current=e,c(e)),(f(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!f(e))&&h.refs.setReference(e)}),[h.refs]),y=e.useMemo((()=>({...h.refs,setReference:g,setPositionReference:v,domReference:p})),[h.refs,g,v]),w=e.useMemo((()=>({...h.elements,domReference:d})),[h.elements,d]),b=e.useMemo((()=>({...h,...o,refs:y,elements:w,nodeId:n})),[h,y,w,n,o]);return Ie((()=>{o.dataRef.current.floatingContext=b;const e=null==m?void 0:m.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...h,context:b,refs:y,elements:w})),[h,y,w,b])}var Tt=function(e){var n=e.open,r=void 0===n||n,o=e.onClose,i=e.children,u=Ot().context;return t.createElement("div",{className:"modal"},t.createElement("div",{className:"modal__content"},t.createElement("div",null,i),t.createElement("div",null,r&&t.createElement(pt,null,t.createElement(St,{className:"overlay",lockScroll:!0},t.createElement(xt,{context:u},t.createElement("div",{className:"fixed bg-black/80 overflow-auto w-screen h-screen grid place-items-center"},t.createElement("div",{className:"bg-white p-4 inline-block rounded-md shadow-lg"},t.createElement("button",{onClick:function(){o(!1)}},"Close"),t.createElement("div",null,"Modal Content",t.createElement("div",null,t.createElement("input",{type:"text",autoFocus:!0})))))))))))};export{Tt as Modal,Tt as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var t=function(r,e){void 0===r&&(r=""),void 0===e&&(e="");var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return r||(e?"".concat("rad-ui","-").concat(t):"")};function o(e){var o=e.children,a=e.customRootClass,c=t(a,n);return r.createElement("div",{className:c},o)}function a(e){var o=e.value,a=e.minValue,c=void 0===a?0:a,l=e.maxValue,s=void 0===l?100:l,u=e.customRootClass,i=e.renderLabel,p=t(u,n);if(o<c||o>s)throw new Error("value should be greater than or equal to ".concat(c," and less than or equal to ").concat(s));return r.createElement("div",{role:"progressbar",className:"".concat(p,"-indicator"),style:{transform:"translateX(-".concat(s-o,"%)")},"aria-valuenow":o,"aria-valuemax":s,"aria-valuemin":c},null==i?void 0:i(o))}var n="Progress";function c(t){var n=t.customRootClass,c=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t}(t,["customRootClass"]);return r.createElement(o,{customRootClass:n},r.createElement(a,e({customRootClass:n},c)))}c.displayName=n,c.Root=o,c.Indicator=a;export{n as COMPONENT_NAME,c as default};
1
+ 'use client';import e,{createContext as a,useContext as r}from"react";var t=function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var o in a=arguments[r])Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);return e},t.apply(this,arguments)};function o(e){var a,r,t="";if("string"==typeof e||"number"==typeof e)t+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(a=0;a<n;a++)e[a]&&(r=o(e[a]))&&(t&&(t+=" "),t+=r)}else for(r in e)e[r]&&(t&&(t+=" "),t+=r);return t}function n(){for(var e,a,r=0,t="",n=arguments.length;r<n;r++)(e=arguments[r])&&(a=o(e))&&(t&&(t+=" "),t+=a);return t}"function"==typeof SuppressedError&&SuppressedError;var l=function(e,a){if(void 0===e&&(e=""),e)return e;var r=a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(r)},u=a({value:0,minValue:0,maxValue:100}),i=function(a){var r=a.value,t=void 0===r?0:r,o=a.minValue,i=void 0===o?0:o,s=a.maxValue,m=void 0===s?100:s,v=a.children,f=a.customRootClass,p=l(f,c),d={value:t,minValue:i,maxValue:m};return e.createElement(u.Provider,{value:d},e.createElement("div",{className:n(p)},v))};function s(a){var t=a.customRootClass,o=a.renderLabel,i=l(t,c),s=r(u),m=s.value,v=s.minValue,f=s.maxValue,p=Math.min(Math.max(m,v),f);return e.createElement("div",{role:"progressbar",className:n("".concat(i,"-indicator")),style:{transform:"translateX(-".concat(f-p,"%)")},"aria-valuenow":p,"aria-valuemax":f,"aria-valuemin":v},null==o?void 0:o(m))}var c="Progress";function m(a){var r=a.value,o=void 0===r?0:r,n=a.maxValue,l=void 0===n?100:n,u=a.minValue,c=void 0===u?0:u,m=a.customRootClass,v=function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)a.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}(a,["value","maxValue","minValue","customRootClass"]);return e.createElement(i,{value:o,maxValue:l,minValue:c,customRootClass:m},e.createElement(s,t({customRootClass:m},v)))}m.Root=i,m.Indicator=s,m.displayName=c;export{c as COMPONENT_NAME,m as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var t=function(){return t=Object.assign||function(r){for(var t,e=1,o=arguments.length;e<o;e++)for(var a in t=arguments[e])Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]);return r},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var e="Quote",o=function(o){var a=o.children,n=o.customRootClass,c=o.className,s=function(r,t){var e={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(e[o[a]]=r[o[a]])}return e}(o,["children","customRootClass","className"]),l=function(r,t){void 0===r&&(r=""),void 0===t&&(t="");var e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return r||(t?"".concat("rad-ui","-").concat(e):"")}(n,e);return r.createElement("q",t({className:"".concat(l," ").concat(c)},s),a)};o.displayName=e;export{o as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}var n="Quote",a=function(t){var a=t.children,c=t.customRootClass,s=t.className,f=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","customRootClass","className"]),i=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(c,n);return r.createElement("q",e({className:o(i,s)},f),a)};a.displayName=n;export{a as default};
@@ -1 +1 @@
1
- 'use client';import e from"react";var r=function(){return r=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},r.apply(this,arguments)};function t(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var a=function(a){a.role;var o=a.label,n=void 0===o?"":o,c=a.id,l=a.value,i=a.defaultChecked,d=a.onChange,u=a.checked,p=a.children,s=t(a,["role","label","id","value","defaultChecked","onChange","checked","children"]),f={"aria-label":n||void 0,"aria-checked":u?"true":"false","data-checked":u?"true":"false"};return e.createElement("div",null,e.createElement("input",r({type:"radio",id:c},f,s,{value:l,checked:i,onChange:d})),e.createElement("label",{htmlFor:c}," ",p))},o=function(o){var n=o.children,c=o.type,l=void 0===c?"radio":c,i=o.className,d=void 0===i?"":i,u=o.customRootClass,p=void 0===u?"":u,s=t(o,["children","type","className","customRootClass"]),f=function(e,r){void 0===e&&(e=""),void 0===r&&(r="");var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e||(r?"".concat("rad-ui","-").concat(t):"")}(p,"RadioGroup");return e.createElement("div",{className:"".concat(f," ").concat(d),role:"radiogroup"},e.createElement(a,r({type:l},s),n))};export{o as default};
1
+ 'use client';import e from"react";var r=function(){return r=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},r.apply(this,arguments)};function t(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var a=function(a){a.role;var o=a.label,n=void 0===o?"":o,l=a.id,c=a.value,i=a.defaultChecked,u=a.onChange,d=a.checked,f=a.children,p=t(a,["role","label","id","value","defaultChecked","onChange","checked","children"]),s={"aria-label":n||void 0,"aria-checked":d?"true":"false","data-checked":d?"true":"false"};return e.createElement("div",null,e.createElement("input",r({type:"radio",id:l},s,p,{value:c,checked:i,onChange:u})),e.createElement("label",{htmlFor:l}," ",f))};function o(e){var r,t,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=o(e[r]))&&(a&&(a+=" "),a+=t)}else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}function n(){for(var e,r,t=0,a="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=o(e))&&(a&&(a+=" "),a+=r);return a}var l=function(o){var l=o.children,c=o.type,i=void 0===c?"radio":c,u=o.className,d=void 0===u?"":u,f=o.customRootClass,p=void 0===f?"":f,s=t(o,["children","type","className","customRootClass"]),v=function(e,r){if(void 0===e&&(e=""),e)return e;var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(p,"RadioGroup");return e.createElement("div",{className:n(v,d),role:"radiogroup"},e.createElement(a,r({type:i},s),l))};export{l as default};
@@ -1 +1 @@
1
- 'use client';import t from"react";var r=function(){return r=Object.assign||function(t){for(var r,o=1,e=arguments.length;o<e;o++)for(var a in r=arguments[o])Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a]);return t},r.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var o="Separator",e=function(e){var a=e.orientation,n=void 0===a?"horizontal":a,c=e.className,i=e.customRootClass,l=function(t,r){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(o[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(e=Object.getOwnPropertySymbols(t);a<e.length;a++)r.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(t,e[a])&&(o[e[a]]=t[e[a]])}return o}(e,["orientation","className","customRootClass"]),s=function(t,r){void 0===t&&(t=""),void 0===r&&(r="");var o=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return t||(r?"".concat("rad-ui","-").concat(o):"")}(i,o),p="".concat(s,"vertical"===n?"-vertical":"-horizontal");return t.createElement("div",r({className:"".concat(s," ").concat(p," ").concat(c)},l))};e.displayName=o;export{e as default};
1
+ 'use client';import r from"react";var t=function(){return t=Object.assign||function(r){for(var t,e=1,o=arguments.length;e<o;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function e(r){var t,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(t=0;t<a;t++)r[t]&&(o=e(r[t]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,t,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(t=e(r))&&(n&&(n+=" "),n+=t);return n}var n="Separator",a=function(e){var a=e.orientation,i=void 0===a?"horizontal":a,c=e.className,l=e.customRootClass,s=function(r,t){var e={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(e[o[n]]=r[o[n]])}return e}(e,["orientation","className","customRootClass"]),f=function(r,t){if(void 0===r&&(r=""),r)return r;var e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(e)}(l,n),p="".concat(f,"vertical"===i?"-vertical":"-horizontal");return r.createElement("div",t({className:o(f,p,c)},s))};a.displayName=n;export{a as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var t="Skeleton",o=function(o){var n=o.loading,a=void 0===n||n,c=o.className,l=void 0===c?"":c,s=o.customRootClass,i=void 0===s?"":s,p=o.children,u=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(o,["loading","className","customRootClass","children"]);if(!a)return p;var f=function(r,e){void 0===r&&(r=""),void 0===e&&(e="");var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return r||(e?"".concat("rad-ui","-").concat(t):"")}(i,t);return r.createElement("span",e({className:"".concat(f," ").concat(l)},u),p)};o.displayName=t;export{o as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}var n="Skeleton",a=function(t){var a=t.loading,i=void 0===a||a,c=t.className,l=void 0===c?"":c,s=t.customRootClass,f=void 0===s?"":s,p=t.children,u=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["loading","className","customRootClass","children"]);if(!i)return p;var y=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(f,n);return r.createElement("span",e({className:o(y,l)},u),p)};a.displayName=n;export{a as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var t=function(){return t=Object.assign||function(r){for(var t,e=1,o=arguments.length;e<o;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var e="Strong",o=function(o){var n=o.children,a=o.className,c=o.customRootClass,s=function(r,t){var e={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(e[o[n]]=r[o[n]])}return e}(o,["children","className","customRootClass"]),l=function(r,t){void 0===r&&(r=""),void 0===t&&(t="");var e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return r||(t?"".concat("rad-ui","-").concat(e):"")}(c,e);return r.createElement("strong",t({className:"".concat(l," ").concat(a)},s),n)};o.displayName=e;export{o as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}"function"==typeof SuppressedError&&SuppressedError;var n="Strong",a=function(t){var a=t.children,c=t.className,s=t.customRootClass,f=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","className","customRootClass"]),i=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(s,n);return r.createElement("strong",e({className:o(i,c)},f),a)};a.displayName=n;export{a as default};
@@ -1 +1 @@
1
- 'use client';import e,{useState as t}from"react";var r=function(){return r=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var o="Switch",n=function(n){n.children;var c=n.customRootClass,a=void 0===c?"":c;n.className,n.color;var l=n.defaultChecked,s=n.checked,i=n.onChange,p=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(n,["children","customRootClass","className","color","defaultChecked","checked","onChange"]),u=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");var r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e||(t?"".concat("rad-ui","-").concat(r):"")}(a,o),f=t(s||l),d=f[0],h=f[1];return e.createElement(e.Fragment,null,e.createElement("input",r({type:"checkbox",className:"".concat(u)},p,{checked:d})),e.createElement("button",{type:"button",onClick:function(){var e=!d;h(e),i(e)},role:"switch"}))};n.displayName=o;export{n as default};
1
+ 'use client';import e,{useState as r}from"react";var t=function(){return t=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function o(e){var r,t,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=o(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function n(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=o(e))&&(n&&(n+=" "),n+=r);return n}var a="Switch",c=function(o){o.children;var c=o.customRootClass,l=void 0===c?"":c;o.className,o.color;var i=o.defaultChecked,f=o.checked,u=o.onChange,s=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]])}return t}(o,["children","customRootClass","className","color","defaultChecked","checked","onChange"]),p=function(e,r){if(void 0===e&&(e=""),e)return e;var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(l,a),y=r(f||i),h=y[0],d=y[1];return e.createElement(e.Fragment,null,e.createElement("input",t({type:"checkbox",className:n(p)},s,{checked:h})),e.createElement("button",{type:"button",onClick:function(){var e=!h;d(e),u(e)},role:"switch"}))};c.displayName=a;export{c as default};
@@ -1 +1 @@
1
- 'use client';import e from"react";var r=function(){return r=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},r.apply(this,arguments)};function t(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)r.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(t[a[n]]=e[a[n]])}return t}"function"==typeof SuppressedError&&SuppressedError;var a=function(a){var n=a.children,c=a.className,l=void 0===c?"":c,o=a.customRootClass,s=void 0===o?"":o,i=t(a,["children","className","customRootClass"]),u=function(e,r){void 0===e&&(e=""),void 0===r&&(r="");var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e||(r?"".concat("rad-ui","-").concat(t):"")}(s,"Table");return e.createElement("div",r({className:"".concat(u,"-wrapper ").concat(l)},i),e.createElement("table",{className:u},n))},n=function(a){var n=a.children,c=a.className,l=void 0===c?"header":c,o=t(a,["children","className"]);return e.createElement("thead",r({className:l},o),n)},c=function(a){var n=a.children,c=a.className,l=void 0===c?"":c,o=t(a,["children","className"]);return e.createElement("tbody",r({className:l},o),n)},l=function(a){var n=a.children,c=a.className,l=void 0===c?"row":c,o=t(a,["children","className"]);return e.createElement("tr",r({className:l},o),n)},o=function(a){var n=a.children,c=a.className,l=void 0===c?"cell-header":c,o=t(a,["children","className"]);return e.createElement("th",r({className:l},o),n)},s=function(a){var n=a.children,c=a.className,l=void 0===c?"cell":c,o=t(a,["children","className"]);return e.createElement("td",r({className:l},o),n)},i=function(r){var t=r.columns,i=void 0===t?[]:t,u=r.data,m=void 0===u?[]:u,d=i.map((function(e){return(null==e?void 0:e.key)||""}));return e.createElement(a,null,e.createElement(n,null,e.createElement(l,null,i.map((function(r){return e.createElement(o,{key:(null==r?void 0:r.key)||""},(null==r?void 0:r.name)||"")})))),e.createElement(c,null,m.map((function(r){return e.createElement(l,{key:r.id},d.map((function(t){if(r[t])return e.createElement(s,{key:t},r[t])})))}))))};i.Root=a,i.Body=c,i.Head=n,i.Row=l;export{i as default};
1
+ 'use client';import e from"react";var r=function(){return r=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},r.apply(this,arguments)};function t(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]])}return t}function n(e){var r,t,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var c=e.length;for(r=0;r<c;r++)e[r]&&(t=n(e[r]))&&(a&&(a+=" "),a+=t)}else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}function a(){for(var e,r,t=0,a="",c=arguments.length;t<c;t++)(e=arguments[t])&&(r=n(e))&&(a&&(a+=" "),a+=r);return a}"function"==typeof SuppressedError&&SuppressedError;var c=function(n){var c=n.children,l=n.className,o=void 0===l?"":l,i=n.customRootClass,s=void 0===i?"":i,u=t(n,["children","className","customRootClass"]),m=function(e,r){if(void 0===e&&(e=""),e)return e;var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(s,"Table");return e.createElement("div",r({className:a("".concat(m,"-wrapper"),o)},u),e.createElement("table",{className:a(m)},c))},l=function(n){var c=n.children,l=n.className,o=void 0===l?"header":l,i=t(n,["children","className"]);return e.createElement("thead",r({className:a(o)},i),c)},o=function(n){var c=n.children,l=n.className,o=void 0===l?"":l,i=t(n,["children","className"]);return e.createElement("tbody",r({className:a(o)},i),c)},i=function(n){var c=n.children,l=n.className,o=void 0===l?"row":l,i=t(n,["children","className"]);return e.createElement("tr",r({className:a(o)},i),c)},s=function(n){var c=n.children,l=n.className,o=void 0===l?"cell-header":l,i=t(n,["children","className"]);return e.createElement("th",r({className:a(o)},i),c)},u=function(n){var c=n.children,l=n.className,o=void 0===l?"cell":l,i=t(n,["children","className"]);return e.createElement("td",r({className:a(o)},i),c)},m=function(r){var t=r.columns,n=void 0===t?[]:t,a=r.data,m=void 0===a?[]:a,d=n.map((function(e){return(null==e?void 0:e.key)||""}));return e.createElement(c,null,e.createElement(l,null,e.createElement(i,null,n.map((function(r){return e.createElement(s,{key:(null==r?void 0:r.key)||""},(null==r?void 0:r.name)||"")})))),e.createElement(o,null,m.map((function(r){return e.createElement(i,{key:r.id},d.map((function(t){return e.createElement(u,{key:"".concat(r.id,"-").concat(t)},r[t]||"")})))}))))};m.Root=c,m.Body=o,m.Head=l,m.Row=i;export{m as default};
@@ -1 +1 @@
1
- 'use client';import t,{createContext as e,useContext as a,useRef as n,useState as r}from"react";var o=function(){return o=Object.assign||function(t){for(var e,a=1,n=arguments.length;a<n;a++)for(var r in e=arguments[a])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function c(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]])}return a}"function"==typeof SuppressedError&&SuppressedError;var l=e(null),u=function(e){var n=e.className,r=void 0===n?"":n,o=e.children,c=a(l).rootClass;return t.createElement("div",{role:"tablist","aria-orientation":"horizontal","aria-label":"todo",className:"".concat(c,"-list ").concat(r)},o)};u.displayName="TabList";var i=function(e){var r=e.tab,u=e.className,i=void 0===u?"":u,s=c(e,["tab","className"]),v=a(l),b=v.previousTab,f=v.nextTab,d=v.activeTab,m=v.setActiveTab,p=v.rootClass,y=n(null),T=d===r.value;return t.createElement("button",o({ref:y,role:"tab",className:"".concat(p,"-trigger ").concat(T?"active":""," ").concat(i)},s,{onKeyDown:function(t){"ArrowLeft"==t.key&&b(),"ArrowRight"==t.key&&f()},onClick:function(){return function(t){m(t.value)}(r)},onFocus:function(){return function(t){var e;y.current&&(null===(e=y.current)||void 0===e||e.focus()),m(t.value)}(r)},tabIndex:T?0:-1,"data-rad-ui-batch-element":!0}),r.label)};i.displayName="TabTrigger";var s=function(t,e){void 0===t&&(t=""),void 0===e&&(e="");var a=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return t||(e?"".concat("rad-ui","-").concat(a):"")},v="TabContent",b=function(e){var n=e.className,r=e.customRootClass,o=s(r,v),c=a(l),u=c.tabs,i=c.activeTab;return c.setActiveTab,t.createElement("div",{className:"".concat(o," ").concat(n)},u.map((function(e,a){return e.value===i?t.createElement("div",{key:a},e.content):null})))};b.displayName=v;var f=function(t){return t.querySelectorAll("[data-rad-ui-batch-element]")},d=function(t){var e=null;return t.forEach((function(t){t.hasAttribute("data-rad-ui-focus-element")&&(e=t)})),e},m="Tabs",p=function(e){var a=e.children,u=e.defaultTab,i=void 0===u?"":u,v=e.customRootClass,b=e.tabs,p=void 0===b?[]:b,y=e.className,T=e.color,E=c(e,["children","defaultTab","customRootClass","tabs","className","color"]),h=s(v,m),g=n(null),N=r(i||p[0].value||""),O={rootClass:h,activeTab:N[0],setActiveTab:N[1],nextTab:function(){var t=function(t){var e=d(t),a=null==e?void 0:e.nextElementSibling;return a||t[t.length-1]}(f(null==g?void 0:g.current));t.focus()},previousTab:function(){var t=function(t){var e=d(t),a=null==e?void 0:e.previousElementSibling;return a||t[0]}(f(null==g?void 0:g.current));t.focus()},tabs:p};return t.createElement(l.Provider,{value:O},t.createElement("div",o({ref:g,className:"".concat(h," ").concat(y),"data-accent-color":T},E),a))};p.displayName=m;var y=function(e){var a=e.tabs,n=void 0===a?[]:a;c(e,["tabs"]);var r=n[0].value||"";return t.createElement(p,{tabs:n,defaultTab:r},t.createElement(u,null,n.map((function(e){return t.createElement(i,{key:e.value,tab:e})}))),t.createElement(b,null))};y.List=u,y.Content=b,y.Root=p;export{y as default};
1
+ 'use client';import e,{createContext as t,useContext as r,useRef as a,useState as n}from"react";var o=function(){return o=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};function l(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}function c(e){var t,r,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=c(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function i(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=c(e))&&(a&&(a+=" "),a+=t);return a}"function"==typeof SuppressedError&&SuppressedError;var u=t(null),s=function(t){var a=t.className,n=void 0===a?"":a,o=t.children,l=r(u).rootClass;return e.createElement("div",{role:"tablist","aria-orientation":"horizontal","aria-label":"todo",className:i("".concat(l,"-list"),n)},o)};s.displayName="TabList";var v=function(t){var n=t.tab,c=t.className,s=void 0===c?"":c,v=l(t,["tab","className"]),f=r(u),b=f.previousTab,d=f.nextTab,m=f.activeTab,p=f.setActiveTab,y=f.rootClass,g=a(null),h=m===n.value;return e.createElement("button",o({ref:g,role:"tab",className:i("".concat(y,"-trigger"),"".concat(h?"active":""),s)},v,{onKeyDown:function(e){"ArrowLeft"==e.key&&b(),"ArrowRight"==e.key&&d()},onClick:function(){return function(e){p(e.value)}(n)},onFocus:function(){return function(e){var t;g.current&&(null===(t=g.current)||void 0===t||t.focus()),p(e.value)}(n)},tabIndex:h?0:-1,"data-rad-ui-batch-element":!0}),n.label)};v.displayName="TabTrigger";var f=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=""),e)return e;if(!t)return"";var r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(r)},b="TabContent",d=function(t){var a=t.className,n=t.customRootClass,o=f(n,b),l=r(u),c=l.tabs,s=l.activeTab;return l.setActiveTab,e.createElement("div",{className:i(o,a)},c.map((function(t,r){return t.value===s?e.createElement("div",{key:r},t.content):null})))};d.displayName=b;var m=function(e){return e.querySelectorAll("[data-rad-ui-batch-element]")},p=function(e){var t=null;return e.forEach((function(e){e.hasAttribute("data-rad-ui-focus-element")&&(t=e)})),t},y="Tabs",g=function(t){var r=t.children,c=t.defaultTab,s=void 0===c?"":c,v=t.customRootClass,b=t.tabs,d=void 0===b?[]:b,g=t.className,h=t.color,T=l(t,["children","defaultTab","customRootClass","tabs","className","color"]),E=f(v,y),N=a(null),O=n(s||d[0].value||""),A={rootClass:E,activeTab:O[0],setActiveTab:O[1],nextTab:function(){var e=function(e,t){void 0===t&&(t=!1);var r=p(e),a=null==r?void 0:r.nextElementSibling;return a||(t?e[0]:e[e.length-1])}(m(null==N?void 0:N.current));e.focus()},previousTab:function(){var e=function(e,t){void 0===t&&(t=!1);var r=p(e),a=null==r?void 0:r.previousElementSibling;return a||(t?e[e.length-1]:e[0])}(m(null==N?void 0:N.current));e.focus()},tabs:d};return e.createElement(u.Provider,{value:A},e.createElement("div",o({ref:N,className:i(E,g),"data-accent-color":h},T),r))};g.displayName=y;var h=function(t){var r=t.tabs,a=void 0===r?[]:r;l(t,["tabs"]);var n=a[0].value||"";return e.createElement(g,{tabs:a,defaultTab:n},e.createElement(s,null,a.map((function(t){return e.createElement(v,{key:t.value,tab:t})}))),e.createElement(d,null))};h.List=s,h.Content=d,h.Root=g;export{h as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var t=function(){return t=Object.assign||function(r){for(var t,e=1,o=arguments.length;e<o;e++)for(var a in t=arguments[e])Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]);return r},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var e="Text",o=function(o){var a=o.children,n=o.customRootClass,c=void 0===n?"":n,s=o.className,l=void 0===s?"":s,p=function(r,t){var e={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(e[o[a]]=r[o[a]])}return e}(o,["children","customRootClass","className"]),i=function(r,t){void 0===r&&(r=""),void 0===t&&(t="");var e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return r||(t?"".concat("rad-ui","-").concat(e):"")}(c,e);return r.createElement("p",t({className:"".concat(i," ").concat(l)},p),a)};o.displayName=e;export{o as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}var n="Text",a=["div","span","p","label"],s=function(t){var s=t.children,c=t.customRootClass,i=void 0===c?"":c,l=t.className,p=void 0===l?"":l,f=t.as,u=void 0===f?"p":f,y=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","customRootClass","className","as"]),v=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,n);return a.includes(u)||(u="p"),r.createElement(u,e({className:o(v,p)},y),s)};s.displayName=n;export{s as default};
@@ -1 +1 @@
1
- 'use client';import e from"react";"function"==typeof SuppressedError&&SuppressedError;var t=function(t){var r=t.children,o=t.customRootClass,a=void 0===o?"":o,c=t.className,n=void 0===c?"":c,l=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");var r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e||(t?"".concat("rad-ui","-").concat(r):"")}(a,"TextArea");return e.createElement("div",{className:"".concat(l).concat(n)},r)},r=function(t){var r=t.children,o=t.placeholder,a=void 0===o?"":o;return e.createElement("textarea",{placeholder:a},r)},o=function(o){var a=o.customRootClass,c=void 0===a?"":a,n=o.className,l=void 0===n?"":n,s=o.children;return function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]])}}(o,["customRootClass","className","children"]),e.createElement(t,{customRootClass:c,className:"".concat(l)},e.createElement(r,{placeholder:"enter text"},s),s)};o.Input=r,o.Root=t;export{o as default};
1
+ 'use client';import e from"react";function r(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=r(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}function t(){for(var e,t,o=0,n="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}"function"==typeof SuppressedError&&SuppressedError;var o=function(r){var o=r.children,n=r.customRootClass,a=void 0===n?"":n,c=r.className,l=void 0===c?"":c,s=function(e,r){if(void 0===e&&(e=""),e)return e;var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(a,"TextArea");return e.createElement("div",{className:t(s,l)},o)},n=function(r){var t=r.children,o=r.placeholder,n=void 0===o?"":o;return e.createElement("textarea",{placeholder:n},t)},a=function(r){var a=r.customRootClass,c=void 0===a?"":a,l=r.className,s=void 0===l?"":l,i=r.children;return function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]])}}(r,["customRootClass","className","children"]),e.createElement(o,{customRootClass:c,className:t(s)},e.createElement(n,{placeholder:"enter text"},i),i)};a.Input=n,a.Root=o;export{a as default};
@@ -1 +1 @@
1
- 'use client';import e,{useState as r}from"react";var t=function(){return t=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)};function a(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var o=function(r){var o=r.role,n=void 0===o?"button":o,i=r.label,s=void 0===i?"":i,l=r.description,d=void 0===l?"":l,c=r.disabled,p=void 0!==c&&c,u=r.children,f=a(r,["role","label","description","disabled","children"]);return s&&(f["aria-label"]=s),d&&(f["aria-description"]=d),p&&(f["aria-disabled"]="true",d||(f["aria-description"]="Disabled Button")),e.createElement("button",t({role:n,disabled:p},f),u)},n="Toggle",i=function(i){var s=i.defaultPressed,l=i.customRootClass,d=void 0===l?"":l,c=i.children;i.className;var p=i.pressed,u=i.onChange,f=a(i,["defaultPressed","customRootClass","children","className","pressed","onChange"]),b=function(e,r){void 0===e&&(e=""),void 0===r&&(r="");var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e||(r?"".concat("rad-ui","-").concat(t):"")}(d,n),v=r(p||s),y=v[0],m=v[1];return e.createElement(o,t({className:"".concat(b),onClick:function(){var e=!y;m(e),u(e)},"data-state":y?"on":"off",type:"button","data-disabled":f.disabled?"":void 0,"aria-pressed":p},f),c)};i.displayName=n;export{i as default};
1
+ 'use client';import e,{useState as r}from"react";var t=function(){return t=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},t.apply(this,arguments)};function n(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]])}return t}function a(e){var r,t,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(t=a(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function o(){for(var e,r,t=0,n="",o=arguments.length;t<o;t++)(e=arguments[t])&&(r=a(e))&&(n&&(n+=" "),n+=r);return n}"function"==typeof SuppressedError&&SuppressedError;var s=["div","span","button"].reduce((function(r,a){return r[a]=function(r){var a=e.forwardRef((function(a,o){var s=a.asChild,i=void 0!==s&&s,l=a.children,d=n(a,["asChild","children"]);return i&&e.isValidElement(l)?e.cloneElement(l,t(t({},d),{ref:o})):e.createElement(r,t(t({},d),{ref:o}),l)}));return a.displayName="Primitive.".concat(r),a}(a),r}),{}),i=function(a){var o=a.children,i=a.label,l=void 0===i?"":i,d=a.defaultPressed,f=void 0!==d&&d,c=a.pressed,u=a.onPressedChange,p=void 0===u?function(){}:u,v=a.disabled,b=n(a,["children","label","defaultPressed","pressed","onPressedChange","disabled"]),y=r(f),h=y[0],m=y[1],g=void 0!==c,O=g?c:h,P=function(){if(!v){var e=!O;g||m(e),p(e)}},C=l?{"aria-label":l}:{};return C["aria-pressed"]=O?"true":"false",C["aria-disabled"]=v?"true":"false",e.createElement(s.button,t({onClick:P,onKeyDown:function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),P())},"data-state":O?"on":"off",disabled:v},C,b),o)},l="Toggle",d=function(a){a.defaultPressed;var s=a.customRootClass,d=void 0===s?"":s,f=a.children;a.className;var c=a.pressed,u=void 0!==c&&c,p=a.onChange,v=n(a,["defaultPressed","customRootClass","children","className","pressed","onChange"]);if("boolean"!=typeof u)throw new Error("Toggle: pressed prop must be a boolean");var b=function(e,r){if(void 0===e&&(e=""),e)return e;var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(d,l),y=r(u),h=y[0],m=y[1];return e.createElement(i,t({className:o(b),pressed:h,onPressedChange:function(){var e=!h;m(e),p(e)},"data-state":h?"on":"off","data-disabled":v.disabled?"":void 0},v),f)};d.displayName=l;export{d as default};
@@ -1 +1 @@
1
- 'use client';import e,{createContext as t,useState as r,useContext as o}from"react";var l=t({}),n=function(t){var o=t.type,n=void 0===o?"multiple":o,i=t.className,a=void 0===i?"":i,c=t.customRootClass,u=void 0===c?"":c,s=t.componentName,d=void 0===s?"":s,v=t.value,p=void 0===v?null:v,f=t.children,g=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");var r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return e||(t?"".concat("rad-ui","-").concat(r):"")}(u,d),m=r(p||[]),y=m[0],b=m[1];return e.createElement("div",{className:"".concat(g," ").concat(a),role:"group"},e.createElement(l.Provider,{value:{activeToggles:y,setActiveToggles:b,type:n}},f))},i=function(){return i=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var l in t=arguments[r])Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l]);return e},i.apply(this,arguments)};function a(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(r[o[l]]=e[o[l]])}return r}function c(e,t,r){if(r||2===arguments.length)for(var o,l=0,n=t.length;l<n;l++)!o&&l in t||(o||(o=Array.prototype.slice.call(t,0,l)),o[l]=t[l]);return e.concat(o||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var u=function(t){var r=t.role,o=void 0===r?"button":r,l=t.label,n=void 0===l?"":l,c=t.description,u=void 0===c?"":c,s=t.disabled,d=void 0!==s&&s,v=t.children,p=a(t,["role","label","description","disabled","children"]);return n&&(p["aria-label"]=n),u&&(p["aria-description"]=u),d&&(p["aria-disabled"]="true",u||(p["aria-description"]="Disabled Button")),e.createElement("button",i({role:o,disabled:d},p),v)},s=function(t){var r,n=t.children,s=t.value,d=void 0===s?null:s,v=a(t,["children","value"]),p=o(l),f=null==p?void 0:p.type,g=null===(r=null==p?void 0:p.activeToggles)||void 0===r?void 0:r.includes(d);return v["aria-pressed"]=g?"true":"false",e.createElement(u,i({className:"".concat(g?"bg-blue-600":""),onClick:function(){!function(){var e=(null==p?void 0:p.activeToggles)||[];if("single"===f)return g?void(null==p||p.setActiveToggles([])):void(null==p||p.setActiveToggles([d]));"multiple"===f&&(e=g?e.filter((function(e){return e!==d})):c(c([],e,!0),[d],!1)),null==p||p.setActiveToggles(e)}()}},v),n)},d="ToggleGroup",v=function(t){var r=t.type,o=void 0===r?"single":r,l=t.items,i=void 0===l?[]:l;return e.createElement(n,{type:o,componentName:d},i.map((function(t,r){return e.createElement(s,{key:r,value:t.value},t.label)})))};v.displayName=d,v.Root=n,v.Item=s;export{v as default};
1
+ 'use client';import e,{createContext as t,useRef as r,useState as n,useContext as o}from"react";function a(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=a(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function i(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=a(e))&&(n&&(n+=" "),n+=t);return n}var l=function(e){return e.querySelectorAll("[data-rad-ui-batch-element]")},u=function(e){var t=null;return e.forEach((function(e){e.hasAttribute("data-rad-ui-focus-element")&&(t=e)})),t},c=t({}),f=function(t){var o=t.type,a=void 0===o?"multiple":o,f=t.className,d=void 0===f?"":f,s=t.loop,v=void 0===s||s,p=t.customRootClass,m=void 0===p?"":p,y=t.componentName,g=void 0===y?"":y,h=t.value,b=void 0===h?null:h,E=t.children,O=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=""),e)return e;if(!t)return"";var r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(r)}(m,g),A=r(null),w=n(b||[]),P={nextItem:function(){var e=function(e,t){void 0===t&&(t=!1);var r=u(e),n=null==r?void 0:r.nextElementSibling;return n||(t?e[0]:e[e.length-1])}(l(null==A?void 0:A.current),v);e&&(null==e||e.focus())},previousItem:function(){var e=function(e,t){void 0===t&&(t=!1);var r=u(e),n=null==r?void 0:r.previousElementSibling;return n||(t?e[e.length-1]:e[0])}(l(null==A?void 0:A.current),v);e&&(null==e||e.focus())},activeToggles:w[0],setActiveToggles:w[1],type:a};return e.createElement("div",{className:i(O,d),role:"group",ref:A},e.createElement(c.Provider,{value:P},E))},d=function(){return d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function v(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var p=["div","span","button"].reduce((function(t,r){return t[r]=function(t){var r=e.forwardRef((function(r,n){var o=r.asChild,a=void 0!==o&&o,i=r.children,l=s(r,["asChild","children"]);return a&&e.isValidElement(i)?e.cloneElement(i,d(d({},l),{ref:n})):e.createElement(t,d(d({},l),{ref:n}),i)}));return r.displayName="Primitive.".concat(t),r}(r),t}),{}),m=function(t){var r=t.children,o=t.label,a=void 0===o?"":o,i=t.defaultPressed,l=void 0!==i&&i,u=t.pressed,c=t.onPressedChange,f=void 0===c?function(){}:c,v=t.disabled,m=s(t,["children","label","defaultPressed","pressed","onPressedChange","disabled"]),y=n(l),g=y[0],h=y[1],b=void 0!==u,E=b?u:g,O=function(){if(!v){var e=!E;b||h(e),f(e)}},A=a?{"aria-label":a}:{};return A["aria-pressed"]=E?"true":"false",A["aria-disabled"]=v?"true":"false",e.createElement(p.button,d({onClick:O,onKeyDown:function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),O())},"data-state":E?"on":"off",disabled:v},A,m),r)},y=function(t){var r=t.children,a=t.value,i=void 0===a?null:a,l=s(t,["children","value"]),u=o(c),f=u.type,p=u.activeToggles,y=u.setActiveToggles,g=u.nextItem,h=u.previousItem,b=null==p?void 0:p.includes(i),E=n(!1),O=E[0],A=E[1],w={},P={};return b?(w["aria-pressed"]="true",P["data-active"]="true"):(w["aria-pressed"]="false",P["data-active"]="false"),e.createElement(m,d({onClick:function(){var e=p||[];if("single"===f)return b?void y([]):void y([i]);"multiple"===f&&(e=b?e.filter((function(e){return e!==i})):v(v([],e,!0),[i],!1)),y(e)},onFocus:function(){A(!0)},onBlur:function(){A(!1)}},w,P,{"data-rad-ui-batch-element":!0,onKeyDown:function(e){"ArrowRight"===e.key&&(e.preventDefault(),g()),"ArrowLeft"===e.key&&(e.preventDefault(),h())}},O?{"data-rad-ui-focus-element":""}:{},l),r)},g="ToggleGroup",h=function(t){var r=t.type,n=void 0===r?"single":r,o=t.items,a=void 0===o?[]:o;return e.createElement(f,{type:n,componentName:g},a.map((function(t,r){return e.createElement(y,{key:r,value:t.value},t.label)})))};h.displayName=g,h.Root=f,h.Item=y;export{h as default};