@adam-milo/ui 1.0.102 → 1.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +1 -1
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +1 -1
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +1 -1
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +1 -1
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +1 -1
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +5 -3
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +1 -2
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +1 -1
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +3 -1
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +2 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +1 -1
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +1 -5
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +1 -3
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +3 -1
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +1 -4
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +1 -1
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +4 -2
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +1 -1
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +2 -1
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +1 -1
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +1 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +1 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +1 -1
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +1 -1
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +8 -6
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +8 -8
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +1 -1
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +1 -1
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +4 -5
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +2 -3
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +3 -2
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +2 -2
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +2 -2
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +2 -2
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +2 -10
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +10 -11
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +11 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +1 -1
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +1 -1
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +1 -9
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +9 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +1 -1
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +1 -1
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +1 -1
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +1 -1
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +1 -1
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +1 -1
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +1 -7
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +7 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +1 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +1 -1
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +1 -1
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +1 -1
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -1
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +1 -10
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +10 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +1 -1
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +1 -1
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +1 -1
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +1 -1
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +1 -1
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +1 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +1 -1
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +1 -1
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +1 -1
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +1 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +1 -1
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +1 -1
- package/dist/src/components/data-display/datatable/DataTable.component.d.ts.map +1 -1
- package/dist/src/components/data-display/datatable/DataTable.styles.d.ts +2 -2
- package/dist/src/components/data-display/datatable/DataTable.styles.d.ts.map +1 -1
- package/dist/src/components/data-display/datatable/DataTable.types.d.ts +2 -0
- package/dist/src/components/data-display/datatable/DataTable.types.d.ts.map +1 -1
- package/dist/src/components/feedback/toast/Toast.component.d.ts.map +1 -1
- package/dist/src/components/feedback/toast/Toast.styles.d.ts +3 -3
- package/dist/src/components/feedback/toast/Toast.styles.d.ts.map +1 -1
- package/dist/src/components/layout/auth-layout/AuthLayout.component.d.ts +1 -1
- package/dist/src/components/layout/auth-layout/AuthLayout.component.d.ts.map +1 -1
- package/dist/src/components/layout/auth-layout/AuthLayout.styles.d.ts +0 -2
- package/dist/src/components/layout/auth-layout/AuthLayout.styles.d.ts.map +1 -1
- package/dist/src/components/layout/auth-layout/AuthLayout.types.d.ts +0 -4
- package/dist/src/components/layout/auth-layout/AuthLayout.types.d.ts.map +1 -1
- package/dist/src/components/layout/main-content/MainContent.component.d.ts +5 -0
- package/dist/src/components/layout/main-content/MainContent.component.d.ts.map +1 -0
- package/dist/src/components/layout/main-content/MainContent.styles.d.ts +2 -0
- package/dist/src/components/layout/main-content/MainContent.styles.d.ts.map +1 -0
- package/dist/src/components/layout/main-content/MainContent.types.d.ts +11 -0
- package/dist/src/components/layout/main-content/MainContent.types.d.ts.map +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index115.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index116.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const n=r(e);var o=n[" useInsertionEffect ".trim().toString()]||t.useLayoutEffect;exports.useControllableState=function({prop:e,defaultProp:t,onChange:r=()=>{},caller:u}){const[c,f,s]=function({defaultProp:e,onChange:t}){const[r,u]=n.useState(e),c=n.useRef(r),f=n.useRef(t);return o(()=>{f.current=t},[t]),n.useEffect(()=>{c.current!==r&&(f.current?.(r),c.current=r)},[r,c]),[r,u,f]}({defaultProp:t,onChange:r}),i=void 0!==e,a=i?e:c;{const t=n.useRef(void 0!==e);n.useEffect(()=>{const e=t.current;if(e!==i){}t.current=i},[i,u])}const l=n.useCallback(t=>{if(i){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else f(t)},[i,e,f,s]);return[a,l]};
|
package/dist/index115.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import*as e from"react";import{
|
|
2
|
-
return g(I,{scope:t,forceMount:n,children:/* @__PURE__ */g(d,{present:n||i.open,children:/* @__PURE__ */g(p,{asChild:!0,container:r,children:o})})})};N.displayName=O;var A="TooltipContent",B=e.forwardRef((e,t)=>{const n=H(A,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,a=P(A,e.__scopeTooltip);/* @__PURE__ */
|
|
3
|
-
return g(d,{present:o||a.open,children:a.disableHoverableContent?/* @__PURE__ */g(Y,{side:r,...i,ref:t}):/* @__PURE__ */g(F,{side:r,...i,ref:t})})}),F=e.forwardRef((t,o)=>{const r=P(A,t.__scopeTooltip),i=R(A,t.__scopeTooltip),a=e.useRef(null),s=n(o,a),[c,l]=e.useState(null),{trigger:u,onClose:p}=r,d=a.current,{onPointerInTransitChange:f}=i,h=e.useCallback(()=>{l(null),f(!1)},[f]),m=e.useCallback((e,t)=>{const n=e.currentTarget,o={x:e.clientX,y:e.clientY},r=function(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return o}(o,function(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}(o,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const n=e[o];for(;t.length>=2;){const e=t[t.length-1],o=t[t.length-2];if(!((e.x-o.x)*(n.y-o.y)>=(e.y-o.y)*(n.x-o.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const t=e[o];for(;n.length>=2;){const e=n[n.length-1],o=n[n.length-2];if(!((e.x-o.x)*(t.y-o.y)>=(e.y-o.y)*(t.x-o.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...r,...function(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}(t.getBoundingClientRect())]);l(i),f(!0)},[f]);return e.useEffect(()=>()=>h(),[h]),e.useEffect(()=>{if(u&&d){const e=e=>m(e,d),t=e=>m(e,u);return u.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[u,d,m,h]),e.useEffect(()=>{if(c){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},o=u?.contains(t)||d?.contains(t),r=!function(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i],s=t[a],c=e.x,l=e.y,u=s.x,p=s.y;l>o!=p>o&&n<(u-c)*(o-l)/(p-l)+c&&(r=!r)}return r}(n,c);o?h():r&&(h(),p())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,d,c,p,h]),/* @__PURE__ */g(Y,{...t,ref:s})}),[K,S]=v(k,{isInside:!1}),X=h("TooltipContent"),Y=e.forwardRef((t,n)=>{const{__scopeTooltip:o,children:i,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=t,p=P(A,o),d=b(o),{onClose:f}=p;return e.useEffect(()=>(document.addEventListener(T,f),()=>document.removeEventListener(T,f)),[f]),e.useEffect(()=>{if(p.trigger){const e=e=>{const t=e.target;t?.contains(p.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[p.trigger,f]),/* @__PURE__ */g(r,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:/* @__PURE__ */y(u,{"data-state":p.stateAttribute,...d,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[
|
|
4
|
-
/* @__PURE__ */g(X,{children:i}),
|
|
5
|
-
/* @__PURE__ */g(K,{scope:o,isInside:!0,children:/* @__PURE__ */g(x,{id:p.contentId,role:"tooltip",children:a||i})})]})})});B.displayName=A;var q="TooltipArrow",z=e.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=b(n);return S(q,n).isInside?null:/* @__PURE__ */g(c,{...r,...o,ref:t})});z.displayName=q;var G=_,J=L,Q=M,U=N,V=B,W=z;export{W as Arrow,V as Content,U as Portal,G as Provider,J as Root,L as Tooltip,z as TooltipArrow,B as TooltipContent,N as TooltipPortal,_ as TooltipProvider,M as TooltipTrigger,Q as Trigger};
|
|
1
|
+
import*as e from"react";import{useLayoutEffect as t}from"./index116.js";var r=e[" useInsertionEffect ".trim().toString()]||t;function n({prop:t,defaultProp:n,onChange:o=()=>{},caller:u}){const[c,f,s]=function({defaultProp:t,onChange:n}){const[o,u]=e.useState(t),c=e.useRef(o),f=e.useRef(n);return r(()=>{f.current=n},[n]),e.useEffect(()=>{c.current!==o&&(f.current?.(o),c.current=o)},[o,c]),[o,u,f]}({defaultProp:n,onChange:o}),a=void 0!==t,i=a?t:c;{const r=e.useRef(void 0!==t);e.useEffect(()=>{const e=r.current;if(e!==a){}r.current=a},[a,u])}const p=e.useCallback(e=>{if(a){const r=function(e){return"function"==typeof e}(e)?e(t):e;r!==t&&s.current?.(r)}else f(e)},[a,t,f,s]);return[i,p]}export{n as useControllableState};
|
package/dist/index116.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const t=e(require("react"));var r=globalThis?.document?t.useLayoutEffect:()=>{};exports.useLayoutEffect=r;
|
package/dist/index116.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
return e(t,{...l,ref:i,children:n.isValidElement(r)?n.cloneElement(r,void 0,o):null})}/* @__PURE__ */
|
|
3
|
-
return e(t,{...l,ref:i,children:o})});return i.displayName=`${r}.Slot`,i}function o(e){const t=n.forwardRef((e,t)=>{const{children:i,...o}=e;if(n.isValidElement(i)){const e=function(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=r&&"isReactWarning"in r&&r.isReactWarning;if(e)return n.ref;if(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=r&&"isReactWarning"in r&&r.isReactWarning,e)return n.props.ref;return n.props.ref||n.ref}(i),l=function(n,r){const e={...r};for(const t in r){const i=n[t],o=r[t];/^on[A-Z]/.test(t)?i&&o?e[t]=(...n)=>{const r=o(...n);return i(...n),r}:i&&(e[t]=i):"style"===t?e[t]={...i,...o}:"className"===t&&(e[t]=[i,o].filter(Boolean).join(" "))}return{...n,...e}}(o,i.props);return i.type!==n.Fragment&&(l.ref=t?r(t,e):e),n.cloneElement(i,l)}return n.Children.count(i)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var l=/* @__PURE__ */Symbol("radix.slottable");function c(n){const r=({children:n})=>/* @__PURE__ */e(t,{children:n});return r.displayName=`${n}.Slottable`,r.__radixId=l,r}function s(r){return n.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===l}export{i as createSlot,c as createSlottable};
|
|
1
|
+
import*as t from"react";var a=globalThis?.document?t.useLayoutEffect:()=>{};export{a as useLayoutEffect};
|
package/dist/index117.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index113.cjs"),t=require("react/jsx-runtime");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}const i=o(e);var n=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a=i.forwardRef((e,o)=>t.jsx(r.Primitive.span,{...e,ref:o,style:{...n,...e.style}}));a.displayName="VisuallyHidden";var s=a;exports.Root=s,exports.VISUALLY_HIDDEN_STYLES=n,exports.VisuallyHidden=a;
|
package/dist/index117.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{Primitive as e}from"./index113.js";import{jsx as a}from"react/jsx-runtime";var i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o=r.forwardRef((r,o)=>/* @__PURE__ */a(e.span,{...r,ref:o,style:{...i,...r.style}}));o.displayName="VisuallyHidden";var t=o;export{t as Root,i as VISUALLY_HIDDEN_STYLES,o as VisuallyHidden};
|
package/dist/index118.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index107.cjs"),t=require("react/jsx-runtime");function n(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}const o=n(e);function i(e){const t=o.forwardRef((e,t)=>{const{children:n,...i}=e;if(o.isValidElement(n)){const e=function(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning;if(t)return e.ref;if(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(n),l=function(e,r){const t={...r};for(const n in r){const o=e[n],i=r[n];/^on[A-Z]/.test(n)?o&&i?t[n]=(...e)=>{const r=i(...e);return o(...e),r}:o&&(t[n]=o):"style"===n?t[n]={...o,...i}:"className"===n&&(t[n]=[o,i].filter(Boolean).join(" "))}return{...e,...t}}(i,n.props);return n.type!==o.Fragment&&(l.ref=t?r.composeRefs(t,e):e),o.cloneElement(n,l)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var l=Symbol("radix.slottable");function c(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l}exports.createSlot=function(e){const r=i(e),n=o.forwardRef((e,n)=>{const{children:i,...l}=e,s=o.Children.toArray(i),a=s.find(c);if(a){const e=a.props.children,i=s.map(r=>r===a?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:r);return t.jsx(r,{...l,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,i):null})}return t.jsx(r,{...l,ref:n,children:i})});return n.displayName=`${e}.Slot`,n},exports.createSlottable=function(e){const r=({children:e})=>t.jsx(t.Fragment,{children:e});return r.displayName=`${e}.Slottable`,r.__radixId=l,r};
|
package/dist/index118.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"react";import{composeRefs as r}from"./index107.js";import{jsx as e,Fragment as t}from"react/jsx-runtime";function i(r){const t=/* @__PURE__ */o(r),i=n.forwardRef((r,i)=>{const{children:o,...l}=r,c=n.Children.toArray(o),a=c.find(s);if(a){const r=a.props.children,o=c.map(e=>e===a?n.Children.count(r)>1?n.Children.only(null):n.isValidElement(r)?r.props.children:null:e);/* @__PURE__ */
|
|
2
|
+
return e(t,{...l,ref:i,children:n.isValidElement(r)?n.cloneElement(r,void 0,o):null})}/* @__PURE__ */
|
|
3
|
+
return e(t,{...l,ref:i,children:o})});return i.displayName=`${r}.Slot`,i}function o(e){const t=n.forwardRef((e,t)=>{const{children:i,...o}=e;if(n.isValidElement(i)){const e=function(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=r&&"isReactWarning"in r&&r.isReactWarning;if(e)return n.ref;if(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=r&&"isReactWarning"in r&&r.isReactWarning,e)return n.props.ref;return n.props.ref||n.ref}(i),l=function(n,r){const e={...r};for(const t in r){const i=n[t],o=r[t];/^on[A-Z]/.test(t)?i&&o?e[t]=(...n)=>{const r=o(...n);return i(...n),r}:i&&(e[t]=i):"style"===t?e[t]={...i,...o}:"className"===t&&(e[t]=[i,o].filter(Boolean).join(" "))}return{...n,...e}}(o,i.props);return i.type!==n.Fragment&&(l.ref=t?r(t,e):e),n.cloneElement(i,l)}return n.Children.count(i)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var l=/* @__PURE__ */Symbol("radix.slottable");function c(n){const r=({children:n})=>/* @__PURE__ */e(t,{children:n});return r.displayName=`${n}.Slottable`,r.__radixId=l,r}function s(r){return n.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===l}export{i as createSlot,c as createSlottable};
|
package/dist/index119.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index114.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const n=r(e);exports.useEscapeKeydown=function(e,r=globalThis?.document){const o=t.useCallbackRef(e);n.useEffect(()=>{const e=e=>{"Escape"===e.key&&o(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})},[o,r])};
|
package/dist/index119.js
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import*as e from"react";import{
|
|
2
|
-
return u(b,{scope:t,anchor:i,onAnchorChange:n,children:o})};A.displayName=y;var j="PopperAnchor",S=e.forwardRef((r,t)=>{const{__scopePopper:o,virtualRef:i,...n}=r,a=P(j,o),s=e.useRef(null),d=l(t,s),p=e.useRef(null);return e.useEffect(()=>{const e=p.current;p.current=i?.current||s.current,e!==p.current&&a.onAnchorChange(p.current)}),i?null:/* @__PURE__ */u(f.div,{...n,ref:d})});S.displayName=j;var $="PopperContent",[O,_]=w($),C=e.forwardRef((p,c)=>{const{__scopePopper:y,side:w="bottom",sideOffset:v=0,align:b="center",alignOffset:A=0,arrowPadding:j=0,avoidCollisions:S=!0,collisionBoundary:_=[],collisionPadding:C=0,sticky:H="partial",hideWhenDetached:R=!1,updatePositionStrategy:W="optimized",onPlaced:X,...z}=p,D=P($,y),[k,B]=e.useState(null),F=l(c,e=>B(e)),[I,L]=e.useState(null),M=g(I),q=M?.width??0,G=M?.height??0,J=w+("center"!==b?"-"+b:""),K="number"==typeof C?C:{top:0,right:0,bottom:0,left:0,...C},Q=Array.isArray(_)?_:[_],T=Q.length>0,U={padding:K,boundary:Q.filter(Y),altBoundary:T},{refs:V,floatingStyles:Z,placement:ee,isPositioned:re,middlewareData:te}=r({strategy:"fixed",placement:J,whileElementsMounted:(...e)=>x(...e,{animationFrame:"always"===W}),elements:{reference:D.anchor},middleware:[t({mainAxis:v+G,alignmentAxis:A}),S&&o({mainAxis:!0,crossAxis:!1,limiter:"partial"===H?d():void 0,...U}),S&&i({...U}),n({...U,apply:({elements:e,rects:r,availableWidth:t,availableHeight:o})=>{const{width:i,height:n}=r.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${t}px`),a.setProperty("--radix-popper-available-height",`${o}px`),a.setProperty("--radix-popper-anchor-width",`${i}px`),a.setProperty("--radix-popper-anchor-height",`${n}px`)}}),I&&a({element:I,padding:j}),E({arrowWidth:q,arrowHeight:G}),R&&s({strategy:"referenceHidden",...U})]}),[oe,ie]=N(ee),ne=m(X);h(()=>{re&&ne?.()},[re,ne]);const ae=te.arrow?.x,se=te.arrow?.y,de=0!==te.arrow?.centerOffset,[pe,le]=e.useState();return h(()=>{k&&le(window.getComputedStyle(k).zIndex)},[k]),/* @__PURE__ */u("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:re?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" "),...te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:p.dir,children:/* @__PURE__ */u(O,{scope:y,placedSide:oe,onArrowChange:L,arrowX:ae,arrowY:se,shouldHideArrow:de,children:/* @__PURE__ */u(f.div,{"data-side":oe,"data-align":ie,...z,ref:F,style:{...z.style,animation:re?void 0:"none"}})})})});C.displayName=$;var H="PopperArrow",R={top:"bottom",right:"left",bottom:"top",left:"right"},W=e.forwardRef(function(e,r){const{__scopePopper:t,...o}=e,i=_(H,t),n=R[i.placedSide];
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
return u("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[n]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:/* @__PURE__ */u(p,{...o,ref:r,style:{...o.style,display:"block"}})})});function Y(e){return null!==e}W.displayName=H;var E=e=>({name:"transformOrigin",options:e,fn(r){const{placement:t,rects:o,middlewareData:i}=r,n=0!==i.arrow?.centerOffset,a=n?0:e.arrowWidth,s=n?0:e.arrowHeight,[d,p]=N(t),l={start:"0%",center:"50%",end:"100%"}[p],c=(i.arrow?.x??0)+a/2,f=(i.arrow?.y??0)+s/2;let m="",h="";return"bottom"===d?(m=n?l:`${c}px`,h=-s+"px"):"top"===d?(m=n?l:`${c}px`,h=`${o.floating.height+s}px`):"right"===d?(m=-s+"px",h=n?l:`${f}px`):"left"===d&&(m=`${o.floating.width+s}px`,h=n?l:`${f}px`),{data:{x:m,y:h}}}});function N(e){const[r,t="center"]=e.split("-");return[r,t]}var X=A,z=S,D=C,k=W;export{z as Anchor,k as Arrow,D as Content,A as Popper,S as PopperAnchor,W as PopperArrow,C as PopperContent,X as Root,v as createPopperScope};
|
|
1
|
+
import*as e from"react";import{useCallbackRef as t}from"./index114.js";function n(n,o=globalThis?.document){const r=t(n);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return o.addEventListener("keydown",e,{capture:!0}),()=>o.removeEventListener("keydown",e,{capture:!0})},[r,o])}export{n as useEscapeKeydown};
|
package/dist/index12.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./index57.cjs"),s=require("./index68.cjs"),t=r.forwardRef(({label:t,error:d,helperText:l,className:i,id:c,required:n,disabled:o,checked:p,"data-cy":u,"data-testid":y,...b},h)=>{const x=r.useId(),m=c||x,S=`${m}-error`,$=`${m}-helper`,j=u||"radio",N=y||"radio",f=r.useRef(null),q=r.useCallback(e=>{f.current=e,h&&("function"==typeof h?h(e):"current"in h&&(h.current=e))},[h]),w=t&&n&&!t.includes("*")?`${t} *`:t;return e.jsxs("div",{className:a.cn(s.wrapperStyles,o&&s.wrapperDisabledStyles),"data-cy":`${j}-wrapper`,"data-testid":`${N}-wrapper`,children:[e.jsxs("div",{className:s.containerStyles,children:[e.jsx("input",{ref:q,id:m,type:"radio",checked:p,className:a.cn(s.inputBaseStyles,d&&s.inputErrorStyles,i),"aria-describedby":d?S:l?$:void 0,"data-cy":j,"data-testid":N,disabled:o,required:n,...b}),t&&e.jsx("label",{htmlFor:m,className:a.cn(s.labelStyles,o&&s.labelDisabledStyles),"data-cy":`${j}-label`,"data-testid":`${N}-label`,children:w})]}),d&&e.jsx("span",{id:S,className:s.errorMsgStyles,role:"alert","data-cy":`${j}-error`,"data-testid":`${N}-error`,children:d}),l&&!d&&e.jsx("span",{id:$,className:s.helperMsgStyles,"data-cy":`${j}-helper`,"data-testid":`${N}-helper`,children:l})]})});t.displayName="Radio",exports.Radio=t;
|
package/dist/index12.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as r,useId as d,useRef as t,useCallback as i}from"react";import{cn as l}from"./
|
|
1
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as r,useId as d,useRef as t,useCallback as i}from"react";import{cn as l}from"./index57.js";import{containerStyles as c,errorMsgStyles as s,helperMsgStyles as o,inputErrorStyles as n,inputBaseStyles as p,labelDisabledStyles as m,labelStyles as h,wrapperDisabledStyles as u,wrapperStyles as $}from"./index68.js";const y=r(({label:r,error:y,helperText:b,className:N,id:f,required:x,disabled:j,checked:v,"data-cy":k,"data-testid":q,...w},F)=>{const R=d(),T=f||R,g=`${T}-error`,z=`${T}-helper`,A=k||"radio",B=q||"radio",C=t(null),D=i(e=>{C.current=e,F&&("function"==typeof F?F(e):"current"in F&&(F.current=e))},[F]),E=r&&x&&!r.includes("*")?`${r} *`:r;/* @__PURE__ */
|
|
2
2
|
return e("div",{className:l($,j&&u),"data-cy":`${A}-wrapper`,"data-testid":`${B}-wrapper`,children:[
|
|
3
3
|
/* @__PURE__ */e("div",{className:c,children:[
|
|
4
4
|
/* @__PURE__ */a("input",{ref:D,id:T,type:"radio",checked:v,className:l(p,y&&n,N),"aria-describedby":y?g:b?z:void 0,"data-cy":A,"data-testid":B,disabled:j,required:x,...w}),r&&/* @__PURE__ */a("label",{htmlFor:T,className:l(h,j&&m),"data-cy":`${A}-label`,"data-testid":`${B}-label`,children:E})]}),y&&/* @__PURE__ */a("span",{id:g,className:s,role:"alert","data-cy":`${A}-error`,"data-testid":`${B}-error`,children:y}),b&&!y&&/* @__PURE__ */a("span",{id:z,className:o,"data-cy":`${A}-helper`,"data-testid":`${B}-helper`,children:b})]})});y.displayName="Radio";export{y as Radio};
|
package/dist/index120.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index116.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const n=r(e);var o=n[" useId ".trim().toString()]||(()=>{}),u=0;exports.useId=function(e){const[r,c]=n.useState(o());return t.useLayoutEffect(()=>{c(e=>e??String(u++))},[e]),r?`radix-${r}`:""};
|
package/dist/index120.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as t from"react";import{useLayoutEffect as r}from"./index116.js";var e=t[" useId ".trim().toString()]||(()=>{}),o=0;function i(i){const[a,n]=t.useState(e());return r(()=>{n(t=>t??String(o++))},[i]),a?`radix-${a}`:""}export{i as useId};
|
package/dist/index121.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index122.cjs"),t=require("./index123.cjs"),o=require("./index107.cjs"),i=require("./index109.cjs"),n=require("./index113.cjs"),a=require("./index114.cjs"),s=require("./index116.cjs"),p=require("./index124.cjs"),l=require("react/jsx-runtime"),d=require("./index125.cjs");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}const f=c(e);var u="Popper",[h,x]=i.createContextScope(u),[g,m]=h(u),y=e=>{const{__scopePopper:r,children:t}=e,[o,i]=f.useState(null);return l.jsx(g,{scope:r,anchor:o,onAnchorChange:i,children:t})};y.displayName=u;var w="PopperAnchor",P=f.forwardRef((e,r)=>{const{__scopePopper:t,virtualRef:i,...a}=e,s=m(w,t),p=f.useRef(null),d=o.useComposedRefs(r,p),c=f.useRef(null);return f.useEffect(()=>{const e=c.current;c.current=i?.current||p.current,e!==c.current&&s.onAnchorChange(c.current)}),i?null:l.jsx(n.Primitive.div,{...a,ref:d})});P.displayName=w;var b="PopperContent",[v,j]=h(b),S=f.forwardRef((e,t)=>{const{__scopePopper:i,side:c="bottom",sideOffset:u=0,align:h="center",alignOffset:x=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:w=[],collisionPadding:P=0,sticky:j="partial",hideWhenDetached:S=!1,updatePositionStrategy:A="optimized",onPlaced:O,...C}=e,_=m(b,i),[H,z]=f.useState(null),E=o.useComposedRefs(t,e=>z(e)),[W,Y]=f.useState(null),D=p.useSize(W),N=D?.width??0,X=D?.height??0,k=c+("center"!==h?"-"+h:""),F="number"==typeof P?P:{top:0,right:0,bottom:0,left:0,...P},M=Array.isArray(w)?w:[w],B=M.length>0,I={padding:F,boundary:M.filter(q),altBoundary:B},{refs:L,floatingStyles:T,placement:U,isPositioned:G,middlewareData:J}=r.useFloating({strategy:"fixed",placement:k,whileElementsMounted:(...e)=>d.autoUpdate(...e,{animationFrame:"always"===A}),elements:{reference:_.anchor},middleware:[r.offset({mainAxis:u+X,alignmentAxis:x}),y&&r.shift({mainAxis:!0,crossAxis:!1,limiter:"partial"===j?r.limitShift():void 0,...I}),y&&r.flip({...I}),r.size({...I,apply:({elements:e,rects:r,availableWidth:t,availableHeight:o})=>{const{width:i,height:n}=r.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${t}px`),a.setProperty("--radix-popper-available-height",`${o}px`),a.setProperty("--radix-popper-anchor-width",`${i}px`),a.setProperty("--radix-popper-anchor-height",`${n}px`)}}),W&&r.arrow({element:W,padding:g}),R({arrowWidth:N,arrowHeight:X}),S&&r.hide({strategy:"referenceHidden",...I})]}),[K,Q]=$(U),V=a.useCallbackRef(O);s.useLayoutEffect(()=>{G&&V?.()},[G,V]);const Z=J.arrow?.x,ee=J.arrow?.y,re=0!==J.arrow?.centerOffset,[te,oe]=f.useState();return s.useLayoutEffect(()=>{H&&oe(window.getComputedStyle(H).zIndex)},[H]),l.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:G?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[J.transformOrigin?.x,J.transformOrigin?.y].join(" "),...J.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(v,{scope:i,placedSide:K,onArrowChange:Y,arrowX:Z,arrowY:ee,shouldHideArrow:re,children:l.jsx(n.Primitive.div,{"data-side":K,"data-align":Q,...C,ref:E,style:{...C.style,animation:G?void 0:"none"}})})})});S.displayName=b;var A="PopperArrow",O={top:"bottom",right:"left",bottom:"top",left:"right"},C=f.forwardRef(function(e,r){const{__scopePopper:o,...i}=e,n=j(A,o),a=O[n.placedSide];return l.jsx("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:l.jsx(t.Root,{...i,ref:r,style:{...i.style,display:"block"}})})});function q(e){return null!==e}C.displayName=A;var R=e=>({name:"transformOrigin",options:e,fn(r){const{placement:t,rects:o,middlewareData:i}=r,n=0!==i.arrow?.centerOffset,a=n?0:e.arrowWidth,s=n?0:e.arrowHeight,[p,l]=$(t),d={start:"0%",center:"50%",end:"100%"}[l],c=(i.arrow?.x??0)+a/2,f=(i.arrow?.y??0)+s/2;let u="",h="";return"bottom"===p?(u=n?d:`${c}px`,h=-s+"px"):"top"===p?(u=n?d:`${c}px`,h=`${o.floating.height+s}px`):"right"===p?(u=-s+"px",h=n?d:`${f}px`):"left"===p&&(u=`${o.floating.width+s}px`,h=n?d:`${f}px`),{data:{x:u,y:h}}}});function $(e){const[r,t="center"]=e.split("-");return[r,t]}var _=y,H=P,z=S,E=C;exports.Anchor=H,exports.Arrow=E,exports.Content=z,exports.Popper=y,exports.PopperAnchor=P,exports.PopperArrow=C,exports.PopperContent=S,exports.Root=_,exports.createPopperScope=x;
|
package/dist/index121.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
return i(e.
|
|
1
|
+
import*as e from"react";import{useFloating as r,offset as t,shift as o,flip as i,size as n,arrow as a,hide as s,limitShift as d}from"./index122.js";import{Root as p}from"./index123.js";import{useComposedRefs as l}from"./index107.js";import{createContextScope as c}from"./index109.js";import{Primitive as f}from"./index113.js";import{useCallbackRef as m}from"./index114.js";import{useLayoutEffect as h}from"./index116.js";import{useSize as g}from"./index124.js";import{jsx as u}from"react/jsx-runtime";import{autoUpdate as x}from"./index125.js";var y="Popper",[w,v]=c(y),[b,P]=w(y),A=r=>{const{__scopePopper:t,children:o}=r,[i,n]=e.useState(null);/* @__PURE__ */
|
|
2
|
+
return u(b,{scope:t,anchor:i,onAnchorChange:n,children:o})};A.displayName=y;var j="PopperAnchor",S=e.forwardRef((r,t)=>{const{__scopePopper:o,virtualRef:i,...n}=r,a=P(j,o),s=e.useRef(null),d=l(t,s),p=e.useRef(null);return e.useEffect(()=>{const e=p.current;p.current=i?.current||s.current,e!==p.current&&a.onAnchorChange(p.current)}),i?null:/* @__PURE__ */u(f.div,{...n,ref:d})});S.displayName=j;var $="PopperContent",[O,_]=w($),C=e.forwardRef((p,c)=>{const{__scopePopper:y,side:w="bottom",sideOffset:v=0,align:b="center",alignOffset:A=0,arrowPadding:j=0,avoidCollisions:S=!0,collisionBoundary:_=[],collisionPadding:C=0,sticky:H="partial",hideWhenDetached:R=!1,updatePositionStrategy:W="optimized",onPlaced:X,...z}=p,D=P($,y),[k,B]=e.useState(null),F=l(c,e=>B(e)),[I,L]=e.useState(null),M=g(I),q=M?.width??0,G=M?.height??0,J=w+("center"!==b?"-"+b:""),K="number"==typeof C?C:{top:0,right:0,bottom:0,left:0,...C},Q=Array.isArray(_)?_:[_],T=Q.length>0,U={padding:K,boundary:Q.filter(Y),altBoundary:T},{refs:V,floatingStyles:Z,placement:ee,isPositioned:re,middlewareData:te}=r({strategy:"fixed",placement:J,whileElementsMounted:(...e)=>x(...e,{animationFrame:"always"===W}),elements:{reference:D.anchor},middleware:[t({mainAxis:v+G,alignmentAxis:A}),S&&o({mainAxis:!0,crossAxis:!1,limiter:"partial"===H?d():void 0,...U}),S&&i({...U}),n({...U,apply:({elements:e,rects:r,availableWidth:t,availableHeight:o})=>{const{width:i,height:n}=r.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${t}px`),a.setProperty("--radix-popper-available-height",`${o}px`),a.setProperty("--radix-popper-anchor-width",`${i}px`),a.setProperty("--radix-popper-anchor-height",`${n}px`)}}),I&&a({element:I,padding:j}),E({arrowWidth:q,arrowHeight:G}),R&&s({strategy:"referenceHidden",...U})]}),[oe,ie]=N(ee),ne=m(X);h(()=>{re&&ne?.()},[re,ne]);const ae=te.arrow?.x,se=te.arrow?.y,de=0!==te.arrow?.centerOffset,[pe,le]=e.useState();return h(()=>{k&&le(window.getComputedStyle(k).zIndex)},[k]),/* @__PURE__ */u("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:re?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" "),...te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:p.dir,children:/* @__PURE__ */u(O,{scope:y,placedSide:oe,onArrowChange:L,arrowX:ae,arrowY:se,shouldHideArrow:de,children:/* @__PURE__ */u(f.div,{"data-side":oe,"data-align":ie,...z,ref:F,style:{...z.style,animation:re?void 0:"none"}})})})});C.displayName=$;var H="PopperArrow",R={top:"bottom",right:"left",bottom:"top",left:"right"},W=e.forwardRef(function(e,r){const{__scopePopper:t,...o}=e,i=_(H,t),n=R[i.placedSide];
|
|
3
|
+
/* @__PURE__ */
|
|
4
|
+
return u("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[n]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:/* @__PURE__ */u(p,{...o,ref:r,style:{...o.style,display:"block"}})})});function Y(e){return null!==e}W.displayName=H;var E=e=>({name:"transformOrigin",options:e,fn(r){const{placement:t,rects:o,middlewareData:i}=r,n=0!==i.arrow?.centerOffset,a=n?0:e.arrowWidth,s=n?0:e.arrowHeight,[d,p]=N(t),l={start:"0%",center:"50%",end:"100%"}[p],c=(i.arrow?.x??0)+a/2,f=(i.arrow?.y??0)+s/2;let m="",h="";return"bottom"===d?(m=n?l:`${c}px`,h=-s+"px"):"top"===d?(m=n?l:`${c}px`,h=`${o.floating.height+s}px`):"right"===d?(m=-s+"px",h=n?l:`${f}px`):"left"===d&&(m=`${o.floating.width+s}px`,h=n?l:`${f}px`),{data:{x:m,y:h}}}});function N(e){const[r,t="center"]=e.split("-");return[r,t]}var X=A,z=S,D=C,k=W;export{z as Anchor,k as Arrow,D as Content,A as Popper,S as PopperAnchor,W as PopperArrow,C as PopperContent,X as Root,v as createPopperScope};
|
package/dist/index122.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index125.cjs"),t=require("react"),r=require("react-dom");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const o=n(t),i=n(r);var u="undefined"!=typeof document?t.useLayoutEffect:function(){};function s(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 r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!s(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!s(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function f(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c(e,t){const r=f(e);return Math.round(t*r)/r}function l(e){const t=o.useRef(e);return u(()=>{t.current=e}),t}const a=t=>({name:"arrow",options:t,fn(r){const{element:n,padding:o}="function"==typeof t?t(r):t;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?e.arrow({element:n.current,padding:o}).fn(r):{}:n?e.arrow({element:n,padding:o}).fn(r):{};var i}});exports.autoUpdate=e.autoUpdate,exports.computePosition=e.computePosition,exports.platform=e.platform,exports.arrow=(e,t)=>({...a(e),options:[e,t]}),exports.flip=(t,r)=>({...e.flip(t),options:[t,r]}),exports.hide=(t,r)=>({...e.hide(t),options:[t,r]}),exports.limitShift=(t,r)=>({...e.limitShift(t),options:[t,r]}),exports.offset=(t,r)=>({...e.offset(t),options:[t,r]}),exports.shift=(t,r)=>({...e.shift(t),options:[t,r]}),exports.size=(t,r)=>({...e.size(t),options:[t,r]}),exports.useFloating=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:p,elements:{reference:d,floating:m}={},transform:g=!0,whileElementsMounted:y,open:w}=t,[x,h]=o.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[b,P]=o.useState(a);s(b,a)||P(a);const[S,O]=o.useState(null),[j,M]=o.useState(null),R=o.useCallback(e=>{e!==q.current&&(q.current=e,O(e))},[]),v=o.useCallback(e=>{e!==z.current&&(z.current=e,M(e))},[]),k=d||S,C=m||j,q=o.useRef(null),z=o.useRef(null),D=o.useRef(x),A=null!=y,E=l(y),F=l(p),T=l(w),U=o.useCallback(()=>{if(!q.current||!z.current)return;const t={placement:r,strategy:n,middleware:b};F.current&&(t.platform=F.current),e.computePosition(q.current,z.current,t).then(e=>{const t={...e,isPositioned:!1!==T.current};$.current&&!s(D.current,t)&&(D.current=t,i.flushSync(()=>{h(t)}))})},[b,r,n,F,T]);u(()=>{!1===w&&D.current.isPositioned&&(D.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[w]);const $=o.useRef(!1);u(()=>($.current=!0,()=>{$.current=!1}),[]),u(()=>{if(k&&(q.current=k),C&&(z.current=C),k&&C){if(E.current)return E.current(k,C,U);U()}},[k,C,U,E,A]);const L=o.useMemo(()=>({reference:q,floating:z,setReference:R,setFloating:v}),[R,v]),V=o.useMemo(()=>({reference:k,floating:C}),[k,C]),_=o.useMemo(()=>{const e={position:n,left:0,top:0};if(!V.floating)return e;const t=c(V.floating,x.x),r=c(V.floating,x.y);return g?{...e,transform:"translate("+t+"px, "+r+"px)",...f(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,g,V.floating,x.x,x.y]);return o.useMemo(()=>({...x,update:U,refs:L,elements:V,floatingStyles:_}),[x,U,L,V,_])};
|
package/dist/index122.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{computePosition as e,offset as t,shift as n,flip as r,size as o,hide as i,arrow as u,limitShift as s}from"./index125.js";import{autoUpdate as f,platform as a}from"./index125.js";import*as c from"react";import{useLayoutEffect as l}from"react";import*as p from"react-dom";var m="undefined"!=typeof document?l:function(){};function d(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(!d(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)&&!d(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function g(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function y(e,t){const n=g(e);return Math.round(t*n)/n}function w(e){const t=c.useRef(e);return m(()=>{t.current=e}),t}function h(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:u,floating:s}={},transform:f=!0,whileElementsMounted:a,open:l}=t,[h,x]=c.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[S,b]=c.useState(o);d(S,o)||b(o);const[P,R]=c.useState(null),[M,j]=c.useState(null),k=c.useCallback(e=>{e!==A.current&&(A.current=e,R(e))},[]),v=c.useCallback(e=>{e!==D.current&&(D.current=e,j(e))},[]),C=u||P,O=s||M,A=c.useRef(null),D=c.useRef(null),$=c.useRef(h),z=null!=a,E=w(a),F=w(i),V=w(l),_=c.useCallback(()=>{if(!A.current||!D.current)return;const t={placement:n,strategy:r,middleware:S};F.current&&(t.platform=F.current),e(A.current,D.current,t).then(e=>{const t={...e,isPositioned:!1!==V.current};q.current&&!d($.current,t)&&($.current=t,p.flushSync(()=>{x(t)}))})},[S,n,r,F,V]);m(()=>{!1===l&&$.current.isPositioned&&($.current.isPositioned=!1,x(e=>({...e,isPositioned:!1})))},[l]);const q=c.useRef(!1);m(()=>(q.current=!0,()=>{q.current=!1}),[]),m(()=>{if(C&&(A.current=C),O&&(D.current=O),C&&O){if(E.current)return E.current(C,O,_);_()}},[C,O,_,E,z]);const B=c.useMemo(()=>({reference:A,floating:D,setReference:k,setFloating:v}),[k,v]),G=c.useMemo(()=>({reference:C,floating:O}),[C,O]),H=c.useMemo(()=>{const e={position:r,left:0,top:0};if(!G.floating)return e;const t=y(G.floating,h.x),n=y(G.floating,h.y);return f?{...e,transform:"translate("+t+"px, "+n+"px)",...g(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,f,G.floating,h.x,h.y]);return c.useMemo(()=>({...h,update:_,refs:B,elements:G,floatingStyles:H}),[h,_,B,G,H])}const x=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?u({element:n.current,padding:r}).fn(t):{}:n?u({element:n,padding:r}).fn(t):{};var o}}),S=(e,n)=>({...t(e),options:[e,n]}),b=(e,t)=>({...n(e),options:[e,t]}),P=(e,t)=>({...s(e),options:[e,t]}),R=(e,t)=>({...r(e),options:[e,t]}),M=(e,t)=>({...o(e),options:[e,t]}),j=(e,t)=>({...i(e),options:[e,t]}),k=(e,t)=>({...x(e),options:[e,t]});export{k as arrow,f as autoUpdate,e as computePosition,R as flip,j as hide,P as limitShift,S as offset,a as platform,b as shift,M as size,h as useFloating};
|
package/dist/index123.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index113.cjs"),t=require("react/jsx-runtime");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}var i=o(e).forwardRef((e,o)=>{const{children:i,width:n=10,height:s=5,...c}=e;return t.jsx(r.Primitive.svg,{...c,ref:o,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?i:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});i.displayName="Arrow";var n=i;exports.Arrow=i,exports.Root=n;
|
package/dist/index123.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as r from"react";import{Primitive as e}from"./index113.js";import{jsx as i}from"react/jsx-runtime";var o=r.forwardRef((r,o)=>{const{children:t,width:a=10,height:n=5,...s}=r;/* @__PURE__ */
|
|
2
|
+
return i(e.svg,{...s,ref:o,width:a,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?t:/* @__PURE__ */i("polygon",{points:"0,0 30,0 15,10"})})});o.displayName="Arrow";var t=o;export{o as Arrow,t as Root};
|
package/dist/index124.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index116.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const o=r(e);exports.useSize=function(e){const[r,i]=o.useState(void 0);return t.useLayoutEffect(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,n;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,n=t.blockSize}else o=e.offsetWidth,n=e.offsetHeight;i({width:o,height:n})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}i(void 0)},[e]),r};
|
package/dist/index124.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{useLayoutEffect as r}from"./index116.js";function t(t){const[i,o]=e.useState(void 0);return r(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let i,s;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,s=t.blockSize}else i=t.offsetWidth,s=t.offsetHeight;o({width:i,height:s})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)},[t]),i}export{t as useSize};
|
package/dist/index125.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index126.cjs"),e=require("./index127.cjs"),n=require("./index128.cjs");function o(t){const o=n.getComputedStyle(t);let i=parseFloat(o.width)||0,r=parseFloat(o.height)||0;const l=n.isHTMLElement(t),s=l?t.offsetWidth:i,c=l?t.offsetHeight:r,f=e.round(i)!==s||e.round(r)!==c;return f&&(i=s,r=c),{width:i,height:r,$:f}}function i(t){return n.isElement(t)?t:t.contextElement}function r(t){const r=i(t);if(!n.isHTMLElement(r))return e.createCoords(1);const l=r.getBoundingClientRect(),{width:s,height:c,$:f}=o(r);let u=(f?e.round(l.width):l.width)/s,a=(f?e.round(l.height):l.height)/c;return u&&Number.isFinite(u)||(u=1),a&&Number.isFinite(a)||(a=1),{x:u,y:a}}const l=e.createCoords(0);function s(t){const e=n.getWindow(t);return n.isWebKit()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:l}function c(t,o,l,c){void 0===o&&(o=!1),void 0===l&&(l=!1);const f=t.getBoundingClientRect(),u=i(t);let a=e.createCoords(1);o&&(c?n.isElement(c)&&(a=r(c)):a=r(t));const d=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==n.getWindow(t))&&e}(u,l,c)?s(u):e.createCoords(0);let g=(f.left+d.x)/a.x,h=(f.top+d.y)/a.y,m=f.width/a.x,p=f.height/a.y;if(u){const t=n.getWindow(u),e=c&&n.isElement(c)?n.getWindow(c):c;let o=t,i=n.getFrameElement(o);for(;i&&c&&e!==o;){const t=r(i),e=i.getBoundingClientRect(),l=n.getComputedStyle(i),s=e.left+(i.clientLeft+parseFloat(l.paddingLeft))*t.x,c=e.top+(i.clientTop+parseFloat(l.paddingTop))*t.y;g*=t.x,h*=t.y,m*=t.x,p*=t.y,g+=s,h+=c,o=n.getWindow(i),i=n.getFrameElement(o)}}return e.rectToClientRect({width:m,height:p,x:g,y:h})}function f(t,e){const o=n.getNodeScroll(t).scrollLeft;return e?e.left+o:c(n.getDocumentElement(t)).left+o}function u(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-f(t,n),y:n.top+e.scrollTop}}const a=new Set(["absolute","fixed"]);function d(t,o,i){let l;if("viewport"===o)l=function(t,e){const o=n.getWindow(t),i=n.getDocumentElement(t),r=o.visualViewport;let l=i.clientWidth,s=i.clientHeight,c=0,u=0;if(r){l=r.width,s=r.height;const t=n.isWebKit();(!t||t&&"fixed"===e)&&(c=r.offsetLeft,u=r.offsetTop)}const a=f(i);if(a<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-e.clientWidth-o);r<=25&&(l-=r)}else a<=25&&(l+=a);return{width:l,height:s,x:c,y:u}}(t,i);else if("document"===o)l=function(t){const o=n.getDocumentElement(t),i=n.getNodeScroll(t),r=t.ownerDocument.body,l=e.max(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),s=e.max(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let c=-i.scrollLeft+f(t);const u=-i.scrollTop;return"rtl"===n.getComputedStyle(r).direction&&(c+=e.max(o.clientWidth,r.clientWidth)-l),{width:l,height:s,x:c,y:u}}(n.getDocumentElement(t));else if(n.isElement(o))l=function(t,o){const i=c(t,!0,"fixed"===o),l=i.top+t.clientTop,s=i.left+t.clientLeft,f=n.isHTMLElement(t)?r(t):e.createCoords(1);return{width:t.clientWidth*f.x,height:t.clientHeight*f.y,x:s*f.x,y:l*f.y}}(o,i);else{const e=s(t);l={x:o.x-e.x,y:o.y-e.y,width:o.width,height:o.height}}return e.rectToClientRect(l)}function g(t,e){const o=n.getParentNode(t);return!(o===e||!n.isElement(o)||n.isLastTraversableNode(o))&&("fixed"===n.getComputedStyle(o).position||g(o,e))}function h(t,o,i){const r=n.isHTMLElement(o),l=n.getDocumentElement(o),s="fixed"===i,a=c(t,!0,s,o);let d={scrollLeft:0,scrollTop:0};const g=e.createCoords(0);function h(){g.x=f(l)}if(r||!r&&!s)if(("body"!==n.getNodeName(o)||n.isOverflowElement(l))&&(d=n.getNodeScroll(o)),r){const t=c(o,!0,s,o);g.x=t.x+o.clientLeft,g.y=t.y+o.clientTop}else l&&h();s&&!r&&l&&h();const m=!l||r||s?e.createCoords(0):u(l,d);return{x:a.left+d.scrollLeft-g.x-m.x,y:a.top+d.scrollTop-g.y-m.y,width:a.width,height:a.height}}function m(t){return"static"===n.getComputedStyle(t).position}function p(t,e){if(!n.isHTMLElement(t)||"fixed"===n.getComputedStyle(t).position)return null;if(e)return e(t);let o=t.offsetParent;return n.getDocumentElement(t)===o&&(o=o.ownerDocument.body),o}function x(t,e){const o=n.getWindow(t);if(n.isTopLayer(t))return o;if(!n.isHTMLElement(t)){let e=n.getParentNode(t);for(;e&&!n.isLastTraversableNode(e);){if(n.isElement(e)&&!m(e))return e;e=n.getParentNode(e)}return o}let i=p(t,e);for(;i&&n.isTableElement(i)&&m(i);)i=p(i,e);return i&&n.isLastTraversableNode(i)&&m(i)&&!n.isContainingBlock(i)?o:i||n.getContainingBlock(t)||o}const y={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:o,rect:i,offsetParent:l,strategy:s}=t;const f="fixed"===s,a=n.getDocumentElement(l),d=!!o&&n.isTopLayer(o.floating);if(l===a||d&&f)return i;let g={scrollLeft:0,scrollTop:0},h=e.createCoords(1);const m=e.createCoords(0),p=n.isHTMLElement(l);if((p||!p&&!f)&&(("body"!==n.getNodeName(l)||n.isOverflowElement(a))&&(g=n.getNodeScroll(l)),n.isHTMLElement(l))){const t=c(l);h=r(l),m.x=t.x+l.clientLeft,m.y=t.y+l.clientTop}const x=!a||p||f?e.createCoords(0):u(a,g);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-g.scrollLeft*h.x+m.x+x.x,y:i.y*h.y-g.scrollTop*h.y+m.y+x.y}},getDocumentElement:n.getDocumentElement,getClippingRect:function(t){let{element:o,boundary:i,rootBoundary:r,strategy:l}=t;const s=[..."clippingAncestors"===i?n.isTopLayer(o)?[]:function(t,e){const o=e.get(t);if(o)return o;let i=n.getOverflowAncestors(t,[],!1).filter(t=>n.isElement(t)&&"body"!==n.getNodeName(t)),r=null;const l="fixed"===n.getComputedStyle(t).position;let s=l?n.getParentNode(t):t;for(;n.isElement(s)&&!n.isLastTraversableNode(s);){const e=n.getComputedStyle(s),o=n.isContainingBlock(s);o||"fixed"!==e.position||(r=null),(l?!o&&!r:!o&&"static"===e.position&&r&&a.has(r.position)||n.isOverflowElement(s)&&!o&&g(t,s))?i=i.filter(t=>t!==s):r=e,s=n.getParentNode(s)}return e.set(t,i),i}(o,this._c):[].concat(i),r],c=s[0],f=s.reduce((t,n)=>{const i=d(o,n,l);return t.top=e.max(i.top,t.top),t.right=e.min(i.right,t.right),t.bottom=e.min(i.bottom,t.bottom),t.left=e.max(i.left,t.left),t},d(o,c,l));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}},getOffsetParent:x,getElementRects:async function(t){const e=this.getOffsetParent||x,n=this.getDimensions,o=await n(t.floating);return{reference:h(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=o(t);return{width:e,height:n}},getScale:r,isElement:n.isElement,isRTL:function(t){return"rtl"===n.getComputedStyle(t).direction}};function w(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const v=t.offset,E=t.shift,C=t.flip,T=t.size,L=t.hide,b=t.arrow,S=t.limitShift;exports.getOverflowAncestors=n.getOverflowAncestors,exports.arrow=b,exports.autoUpdate=function(t,o,r,l){void 0===l&&(l={});const{ancestorScroll:s=!0,ancestorResize:f=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:d=!1}=l,g=i(t),h=s||f?[...g?n.getOverflowAncestors(g):[],...n.getOverflowAncestors(o)]:[];h.forEach(t=>{s&&t.addEventListener("scroll",r,{passive:!0}),f&&t.addEventListener("resize",r)});const m=g&&a?function(t,o){let i,r=null;const l=n.getDocumentElement(t);function s(){var t;clearTimeout(i),null==(t=r)||t.disconnect(),r=null}return function n(c,f){void 0===c&&(c=!1),void 0===f&&(f=1),s();const u=t.getBoundingClientRect(),{left:a,top:d,width:g,height:h}=u;if(c||o(),!g||!h)return;const m={rootMargin:-e.floor(d)+"px "+-e.floor(l.clientWidth-(a+g))+"px "+-e.floor(l.clientHeight-(d+h))+"px "+-e.floor(a)+"px",threshold:e.max(0,e.min(1,f))||1};let p=!0;function x(e){const o=e[0].intersectionRatio;if(o!==f){if(!p)return n();o?n(!1,o):i=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==o||w(u,t.getBoundingClientRect())||n(),p=!1}try{r=new IntersectionObserver(x,{...m,root:l.ownerDocument})}catch(y){r=new IntersectionObserver(x,m)}r.observe(t)}(!0),s}(g,r):null;let p,x=-1,y=null;u&&(y=new ResizeObserver(t=>{let[e]=t;e&&e.target===g&&y&&(y.unobserve(o),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(o)})),r()}),g&&!d&&y.observe(g),y.observe(o));let v=d?c(t):null;return d&&function e(){const n=c(t);v&&!w(v,n)&&r();v=n,p=requestAnimationFrame(e)}(),r(),()=>{var t;h.forEach(t=>{s&&t.removeEventListener("scroll",r),f&&t.removeEventListener("resize",r)}),null==m||m(),null==(t=y)||t.disconnect(),y=null,d&&cancelAnimationFrame(p)}},exports.computePosition=(e,n,o)=>{const i=new Map,r={platform:y,...o},l={...r.platform,_c:i};return t.computePosition(e,n,{...r,platform:l})},exports.flip=C,exports.hide=L,exports.limitShift=S,exports.offset=v,exports.platform=y,exports.shift=E,exports.size=T;
|
package/dist/index125.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{computePosition as t,offset as e,shift as n,flip as i,size as o,hide as r,arrow as c,limitShift as l}from"./index126.js";import{createCoords as s,round as f,max as u,min as h,rectToClientRect as a,floor as d}from"./index127.js";import{isElement as g,getDocumentElement as p,getOverflowAncestors as x,getComputedStyle as y,isHTMLElement as m,getWindow as w,isTopLayer as v,getParentNode as b,isLastTraversableNode as R,isTableElement as L,isContainingBlock as T,getContainingBlock as C,getNodeName as F,isOverflowElement as W,getNodeScroll as E,getFrameElement as S,isWebKit as H}from"./index128.js";function O(t){const e=y(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=m(t),r=o?t.offsetWidth:n,c=o?t.offsetHeight:i,l=f(n)!==r||f(i)!==c;return l&&(n=r,i=c),{width:n,height:i,$:l}}function z(t){return g(t)?t:t.contextElement}function B(t){const e=z(t);if(!m(e))return s(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=O(e);let c=(r?f(n.width):n.width)/i,l=(r?f(n.height):n.height)/o;return c&&Number.isFinite(c)||(c=1),l&&Number.isFinite(l)||(l=1),{x:c,y:l}}const D=/* @__PURE__ */s(0);function A(t){const e=w(t);return H()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:D}function P(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=z(t);let c=s(1);e&&(i?g(i)&&(c=B(i)):c=B(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==w(t))&&e}(r,n,i)?A(r):s(0);let f=(o.left+l.x)/c.x,u=(o.top+l.y)/c.y,h=o.width/c.x,d=o.height/c.y;if(r){const t=w(r),e=i&&g(i)?w(i):i;let n=t,o=S(n);for(;o&&i&&e!==n;){const t=B(o),e=o.getBoundingClientRect(),i=y(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;f*=t.x,u*=t.y,h*=t.x,d*=t.y,f+=r,u+=c,n=w(o),o=S(n)}}return a({width:h,height:d,x:f,y:u})}function V(t,e){const n=E(t).scrollLeft;return e?e.left+n:P(p(t)).left+n}function M(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-V(t,n),y:n.top+e.scrollTop}}const j=/* @__PURE__ */new Set(["absolute","fixed"]);function I(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=w(t),i=p(t),o=n.visualViewport;let r=i.clientWidth,c=i.clientHeight,l=0,s=0;if(o){r=o.width,c=o.height;const t=H();(!t||t&&"fixed"===e)&&(l=o.offsetLeft,s=o.offsetTop)}const f=V(i);if(f<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,c=Math.abs(i.clientWidth-e.clientWidth-o);c<=25&&(r-=c)}else f<=25&&(r+=f);return{width:r,height:c,x:l,y:s}}(t,n);else if("document"===e)i=function(t){const e=p(t),n=E(t),i=t.ownerDocument.body,o=u(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=u(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let c=-n.scrollLeft+V(t);const l=-n.scrollTop;return"rtl"===y(i).direction&&(c+=u(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:c,y:l}}(p(t));else if(g(e))i=function(t,e){const n=P(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=m(t)?B(t):s(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=A(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return a(i)}function q(t,e){const n=b(t);return!(n===e||!g(n)||R(n))&&("fixed"===y(n).position||q(n,e))}function N(t,e,n){const i=m(e),o=p(e),r="fixed"===n,c=P(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const f=s(0);function u(){f.x=V(o)}if(i||!i&&!r)if(("body"!==F(e)||W(o))&&(l=E(e)),i){const t=P(e,!0,r,e);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop}else o&&u();r&&!i&&o&&u();const h=!o||i||r?s(0):M(o,l);return{x:c.left+l.scrollLeft-f.x-h.x,y:c.top+l.scrollTop-f.y-h.y,width:c.width,height:c.height}}function $(t){return"static"===y(t).position}function _(t,e){if(!m(t)||"fixed"===y(t).position)return null;if(e)return e(t);let n=t.offsetParent;return p(t)===n&&(n=n.ownerDocument.body),n}function k(t,e){const n=w(t);if(v(t))return n;if(!m(t)){let e=b(t);for(;e&&!R(e);){if(g(e)&&!$(e))return e;e=b(e)}return n}let i=_(t,e);for(;i&&L(i)&&$(i);)i=_(i,e);return i&&R(i)&&$(i)&&!T(i)?n:i||C(t)||n}const G={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,c=p(i),l=!!e&&v(e.floating);if(i===c||l&&r)return n;let f={scrollLeft:0,scrollTop:0},u=s(1);const h=s(0),a=m(i);if((a||!a&&!r)&&(("body"!==F(i)||W(c))&&(f=E(i)),m(i))){const t=P(i);u=B(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}const d=!c||a||r?s(0):M(c,f);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+h.x+d.x,y:n.y*u.y-f.scrollTop*u.y+h.y+d.y}},getDocumentElement:p,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?v(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=x(t,[],!1).filter(t=>g(t)&&"body"!==F(t)),o=null;const r="fixed"===y(t).position;let c=r?b(t):t;for(;g(c)&&!R(c);){const e=y(c),n=T(c);n||"fixed"!==e.position||(o=null),(r?!n&&!o:!n&&"static"===e.position&&o&&j.has(o.position)||W(c)&&!n&&q(t,c))?i=i.filter(t=>t!==c):o=e,c=b(c)}return e.set(t,i),i}(e,this._c):[].concat(n),i],c=r[0],l=r.reduce((t,n)=>{const i=I(e,n,o);return t.top=u(i.top,t.top),t.right=h(i.right,t.right),t.bottom=h(i.bottom,t.bottom),t.left=u(i.left,t.left),t},I(e,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:k,getElementRects:async function(t){const e=this.getOffsetParent||k,n=this.getDimensions,i=await n(t.floating);return{reference:N(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=O(t);return{width:e,height:n}},getScale:B,isElement:g,isRTL:function(t){return"rtl"===y(t).direction}};function J(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function K(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=i,f=z(t),a=o||r?[...f?x(f):[],...x(e)]:[];a.forEach(t=>{o&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const g=f&&l?function(t,e){let n,i=null;const o=p(t);function r(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function c(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),r();const f=t.getBoundingClientRect(),{left:a,top:g,width:p,height:x}=f;if(l||e(),!p||!x)return;const y={rootMargin:-d(g)+"px "+-d(o.clientWidth-(a+p))+"px "+-d(o.clientHeight-(g+x))+"px "+-d(a)+"px",threshold:u(0,h(1,s))||1};let m=!0;function w(e){const i=e[0].intersectionRatio;if(i!==s){if(!m)return c();i?c(!1,i):n=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==i||J(f,t.getBoundingClientRect())||c(),m=!1}try{i=new IntersectionObserver(w,{...y,root:o.ownerDocument})}catch(v){i=new IntersectionObserver(w,y)}i.observe(t)}(!0),r}(f,n):null;let y,m=-1,w=null;c&&(w=new ResizeObserver(t=>{let[i]=t;i&&i.target===f&&w&&(w.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var t;null==(t=w)||t.observe(e)})),n()}),f&&!s&&w.observe(f),w.observe(e));let v=s?P(t):null;return s&&function e(){const i=P(t);v&&!J(v,i)&&n();v=i,y=requestAnimationFrame(e)}(),n(),()=>{var t;a.forEach(t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==g||g(),null==(t=w)||t.disconnect(),w=null,s&&cancelAnimationFrame(y)}}const Q=e,U=n,X=i,Y=o,Z=r,tt=c,et=l,nt=(e,n,i)=>{const o=/* @__PURE__ */new Map,r={platform:G,...i},c={...r.platform,_c:o};return t(e,n,{...r,platform:c})};export{tt as arrow,K as autoUpdate,nt as computePosition,X as flip,x as getOverflowAncestors,Z as hide,et as limitShift,Q as offset,G as platform,U as shift,Y as size};
|