@ncino/web-components 2.0.1-preview.1 → 2.1.0-preview.10
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/assets/index-chunk12.js +1 -1
- package/dist/assets/index-chunk13.js +1 -1
- package/dist/assets/input-rich-text.css +3 -3
- package/dist/components/accordion/gator/base/accordion.gator.js +1 -1
- package/dist/components/accordion/gator/group/accordion-group.gator.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/gator/base/alert.gator.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/banner/gator/banner.gator.js +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/boolean/boolean.gator.js +1 -1
- package/dist/components/boolean/index.js +1 -1
- package/dist/components/button/gator/button.gator.js +1 -1
- package/dist/components/checkbox/checkbox.gator.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.gator.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/date-picker/base/datepicker.js +1 -1
- package/dist/components/date-picker/base/gator/datepicker.gator.js +88 -64
- package/dist/components/date-picker/year-month-selector/year-month-selector.gator.js +2 -2
- package/dist/components/display-card/gator/display-card.gator.js +1 -1
- package/dist/components/display-card/index.js +1 -1
- package/dist/components/headline-card/gator/headline-card.gator.js +2 -2
- package/dist/components/headline-card/index.js +1 -1
- package/dist/components/icon/gator/icon.gator.js +1 -1
- package/dist/components/icon/gator/index.js +1 -1
- package/dist/components/icon/gator/templates/calendar.js +4 -0
- package/dist/components/icon/gator/templates/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/gator/icon-button.gator.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/input/base/input-base.gator.js +1 -1
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +20 -15
- package/dist/components/input/gator/help-text/help-text.gator.js +1 -1
- package/dist/components/input/gator/input-date/input-date.gator.js +31 -0
- package/dist/components/input/gator/input-label/input-label.gator.js +7 -7
- package/dist/components/input/gator/input-masked/input-masked.gator.js +1 -1
- package/dist/components/input/gator/input-percent/input-percent.gator.js +1 -1
- package/dist/components/input/gator/input-phone/input-phone.gator.js +48 -0
- package/dist/components/input/gator/input-text/input-text.gator.js +19 -11
- package/dist/components/input/gator/input-textarea/input-textarea.gator.js +1 -1
- package/dist/components/input/index.gator.js +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/input-rich-text/ckeditor-config.js +332 -335
- package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
- package/dist/components/list/gator/list/index.js +1 -1
- package/dist/components/list/gator/list/list.gator.js +1 -1
- package/dist/components/list/gator/list-item/index.js +1 -1
- package/dist/components/list/gator/list-item/list-item.gator.js +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/menu/base/gator/menu.gator.js +1 -1
- package/dist/components/menu/base/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +1 -1
- package/dist/components/menu/menu-item/index.js +1 -1
- package/dist/components/modal/gator/modal.gator.js +9 -9
- package/dist/components/modal/index.js +1 -1
- package/dist/components/progress-bar/gator/progress-bar.gator.js +25 -0
- package/dist/components/progress-bar/index.js +1 -0
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/radio.gator.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.gator.js +1 -1
- package/dist/components/selection-box/index.js +1 -1
- package/dist/components/selection-box/selection-box.gator.js +1 -1
- package/dist/components/selection-box-group/index.js +1 -1
- package/dist/components/selection-box-group/selection-box-group.gator.js +1 -1
- package/dist/components/text-link/gator/text-link.gator.js +1 -1
- package/dist/components/text-link/index.js +1 -1
- package/dist/components/toast/gator/base/toast.gator.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooltip/gator/tooltip.gator.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/slds/tooltip.slds.js +1 -1
- package/dist/index.gator.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.slds.js +1 -1
- package/dist/types/components/date-picker/base/datepicker.d.ts +17 -8
- package/dist/types/components/date-picker/base/gator/datepicker.gator.d.ts +28 -4
- package/dist/types/components/icon/gator/templates/calendar.d.ts +1 -0
- package/dist/types/components/icon/gator/templates/index.d.ts +1 -0
- package/dist/types/components/input/base/input-base.d.ts +1 -1
- package/dist/types/components/input/gator/dropdown/input-dropdown.gator.d.ts +13 -2
- package/dist/types/components/input/gator/input-date/input-date.gator.d.ts +107 -0
- package/dist/types/components/input/gator/input-date/input-date.gator.test.d.ts +0 -0
- package/dist/types/components/input/gator/input-phone/input-phone.gator.d.ts +20 -0
- package/dist/types/components/input/gator/input-phone/input-phone.gator.test.d.ts +0 -0
- package/dist/types/components/input/gator/input-text/input-text.gator.d.ts +7 -1
- package/dist/types/components/input/index.gator.d.ts +2 -0
- package/dist/types/components/progress-bar/gator/progress-bar.gator.d.ts +61 -0
- package/dist/types/components/progress-bar/gator/progress-bar.gator.test.d.ts +0 -0
- package/dist/types/components/progress-bar/index.d.ts +1 -0
- package/dist/types/index.gator.d.ts +1 -0
- package/dist/types/utils/data/data-models.d.ts +5 -0
- package/dist/types/utils/data/phone-country-codes.json.d.ts +1215 -0
- package/dist/types/utils/error-utils.d.ts +13 -0
- package/dist/types/utils/phone-utils.d.ts +4 -0
- package/dist/types/utils/storybook-args.d.ts +70 -0
- package/dist/types/utils/vitest-utils.d.ts +1 -0
- package/dist/utils/error-utils.js +1 -0
- package/dist/utils/phone-utils.js +1 -0
- package/dist/utils/storybook-args.js +1 -0
- package/package.json +33 -29
- package/web-types.json +638 -185
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=":host,:root{--gator-menu-dropdown-max-width: 400px;--ngc-menu-item-min-width: unset;--gator-menu-item-hover-background-color: var(--color-blue-10, #F3F5F7);--gator-menu-item-pressed-background-color: var(--color-blue-25)}";export{o as m};
|
|
1
|
+
const Ot=["top","right","bottom","left"],nt=["start","end"],ot=Ot.reduce((t,e)=>t.concat(e,e+"-"+nt[0],e+"-"+nt[1]),[]),K=Math.min,B=Math.max,z=Math.round,$=Math.floor,C=t=>({x:t,y:t}),Et={left:"right",right:"left",bottom:"top",top:"bottom"},Tt={start:"end",end:"start"};function ft(t,e){return typeof t=="function"?t(e):t}function j(t){return t.split("-")[0]}function D(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function at(t){return["top","bottom"].includes(j(t))?"y":"x"}function dt(t){return Ct(at(t))}function Lt(t,e,n){n===void 0&&(n=!1);const o=D(t),i=dt(t),s=ut(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function At(t){return t.replace(/start|end/g,e=>Tt[e])}function it(t){return t.replace(/left|right|bottom|top/g,e=>Et[e])}function St(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?St(t):{top:t,right:t,bottom:t,left:t}}function I(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function rt(t,e,n){let{reference:o,floating:i}=t;const s=at(e),r=dt(e),c=ut(r),f=j(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;let a;switch(f){case"top":a={x:d,y:o.y-i.height};break;case"bottom":a={x:d,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:u};break;case"left":a={x:o.x-i.width,y:u};break;default:a={x:o.x,y:o.y}}switch(D(e)){case"start":a[r]-=h*(n&&l?-1:1);break;case"end":a[r]+=h*(n&&l?-1:1);break}return a}const Dt=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e));let l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=rt(l,o,f),h=o,a={},y=0;for(let m=0;m<c.length;m++){const{name:p,fn:g}=c[m],{x:w,y:b,data:v,reset:x}=await g({x:d,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:a,rects:l,platform:r,elements:{reference:t,floating:e}});d=w??d,u=b??u,a={...a,[p]:{...a[p],...v}},x&&y<=50&&(y++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(l=x.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:d,y:u}=rt(l,h,f)),m=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:a}};async function Ft(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:a=0}=ft(e,t),y=Pt(a),p=c[h?u==="floating"?"reference":"floating":u],g=I(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:f})),w=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},x=I(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:f}):w);return{top:(g.top-x.top+y.top)/v.y,bottom:(x.bottom-g.bottom+y.bottom)/v.y,left:(g.left-x.left+y.left)/v.x,right:(x.right-g.right+y.right)/v.x}}function Bt(t,e,n){return(t?[...n.filter(i=>D(i)===t),...n.filter(i=>D(i)!==t)]:n.filter(i=>j(i)===i)).filter(i=>t?D(i)===t||(e?At(i)!==i:!1):!0)}const Nt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:s,middlewareData:r,placement:c,platform:f,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:h=ot,autoAlignment:a=!0,...y}=ft(t,e),m=u!==void 0||h===ot?Bt(u||null,a,h):h,p=await Ft(e,y),g=((n=r.autoPlacement)==null?void 0:n.index)||0,w=m[g];if(w==null)return{};const b=Lt(w,s,await(f.isRTL==null?void 0:f.isRTL(l.floating)));if(c!==w)return{reset:{placement:m[0]}};const v=[p[j(w)],p[b[0]],p[b[1]]],x=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:w,overflows:v}],V=m[g+1];if(V)return{data:{index:g+1,overflows:x},reset:{placement:V}};const P=x.map(T=>{const k=D(T.placement);return[T.placement,k&&d?T.overflows.slice(0,2).reduce((vt,Rt)=>vt+Rt,0):T.overflows[0],T.overflows]}).sort((T,k)=>T[1]-k[1]),et=((i=P.filter(T=>T[2].slice(0,D(T[0])?2:3).every(k=>k<=0))[0])==null?void 0:i[0])||P[0][0];return et!==c?{data:{index:g+1,overflows:x},reset:{placement:et}}:{}}}};function Y(){return typeof window<"u"}function M(t){return ht(t)?(t.nodeName||"").toLowerCase():"#document"}function R(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function A(t){var e;return(e=(ht(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ht(t){return Y()?t instanceof Node||t instanceof R(t).Node:!1}function O(t){return Y()?t instanceof Element||t instanceof R(t).Element:!1}function L(t){return Y()?t instanceof HTMLElement||t instanceof R(t).HTMLElement:!1}function st(t){return!Y()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof R(t).ShadowRoot}function _(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Wt(t){return["table","td","th"].includes(M(t))}function q(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function J(t){const e=Q(),n=O(t)?E(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Mt(t){let e=S(t);for(;L(e)&&!W(e);){if(J(e))return e;if(q(e))return null;e=S(e)}return null}function Q(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function W(t){return["html","body","#document"].includes(M(t))}function E(t){return R(t).getComputedStyle(t)}function X(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function S(t){if(M(t)==="html")return t;const e=t.assignedSlot||t.parentNode||st(t)&&t.host||A(t);return st(e)?e.host:e}function gt(t){const e=S(t);return W(e)?t.ownerDocument?t.ownerDocument.body:t.body:L(e)&&_(e)?e:gt(e)}function H(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=gt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=R(i);if(s){const c=G(r);return e.concat(r,r.visualViewport||[],_(i)?i:[],c&&n?H(c):[])}return e.concat(i,H(i,[],n))}function G(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function mt(t){const e=E(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=L(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=z(n)!==s||z(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function Z(t){return O(t)?t:t.contextElement}function N(t){const e=Z(t);if(!L(e))return C(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=mt(e);let r=(s?z(n.width):n.width)/o,c=(s?z(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Vt=C(0);function pt(t){const e=R(t);return!Q()||!e.visualViewport?Vt:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function kt(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==R(t)?!1:e}function F(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Z(t);let r=C(1);e&&(o?O(o)&&(r=N(o)):r=N(t));const c=kt(s,n,o)?pt(s):C(0);let f=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s){const h=R(s),a=o&&O(o)?R(o):o;let y=h,m=G(y);for(;m&&o&&a!==y;){const p=N(m),g=m.getBoundingClientRect(),w=E(m),b=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*p.x,v=g.top+(m.clientTop+parseFloat(w.paddingTop))*p.y;f*=p.x,l*=p.y,d*=p.x,u*=p.y,f+=b,l+=v,y=R(m),m=G(y)}}return I({width:d,height:u,x:f,y:l})}function tt(t,e){const n=X(t).scrollLeft;return e?e.left+n:F(A(t)).left+n}function wt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:tt(t,o)),s=o.top+e.scrollTop;return{x:i,y:s}}function Ht(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=A(o),c=e?q(e.floating):!1;if(o===r||c&&s)return n;let f={scrollLeft:0,scrollTop:0},l=C(1);const d=C(0),u=L(o);if((u||!u&&!s)&&((M(o)!=="body"||_(r))&&(f=X(o)),L(o))){const a=F(o);l=N(o),d.x=a.x+o.clientLeft,d.y=a.y+o.clientTop}const h=r&&!u&&!s?wt(r,f,!0):C(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-f.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-f.scrollTop*l.y+d.y+h.y}}function _t(t){return Array.from(t.getClientRects())}function $t(t){const e=A(t),n=X(t),o=t.ownerDocument.body,i=B(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=B(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+tt(t);const c=-n.scrollTop;return E(o).direction==="rtl"&&(r+=B(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:c}}function zt(t,e){const n=R(t),o=A(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,c=0,f=0;if(i){s=i.width,r=i.height;const l=Q();(!l||l&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}return{width:s,height:r,x:c,y:f}}function It(t,e){const n=F(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=L(t)?N(t):C(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=i*s.x,l=o*s.y;return{width:r,height:c,x:f,y:l}}function ct(t,e,n){let o;if(e==="viewport")o=zt(t,n);else if(e==="document")o=$t(A(t));else if(O(e))o=It(e,n);else{const i=pt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return I(o)}function yt(t,e){const n=S(t);return n===e||!O(n)||W(n)?!1:E(n).position==="fixed"||yt(n,e)}function jt(t,e){const n=e.get(t);if(n)return n;let o=H(t,[],!1).filter(c=>O(c)&&M(c)!=="body"),i=null;const s=E(t).position==="fixed";let r=s?S(t):t;for(;O(r)&&!W(r);){const c=E(r),f=J(r);!f&&c.position==="fixed"&&(i=null),(s?!f&&!i:!f&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||_(r)&&!f&&yt(t,r))?o=o.filter(d=>d!==r):i=c,r=S(r)}return e.set(t,o),o}function Yt(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?q(e)?[]:jt(e,this._c):[].concat(n),o],c=r[0],f=r.reduce((l,d)=>{const u=ct(e,d,i);return l.top=B(u.top,l.top),l.right=K(u.right,l.right),l.bottom=K(u.bottom,l.bottom),l.left=B(u.left,l.left),l},ct(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function qt(t){const{width:e,height:n}=mt(t);return{width:e,height:n}}function Xt(t,e,n){const o=L(e),i=A(e),s=n==="fixed",r=F(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const f=C(0);if(o||!o&&!s)if((M(e)!=="body"||_(i))&&(c=X(e)),o){const h=F(e,!0,s,e);f.x=h.x+e.clientLeft,f.y=h.y+e.clientTop}else i&&(f.x=tt(i));const l=i&&!o&&!s?wt(i,c):C(0),d=r.left+c.scrollLeft-f.x-l.x,u=r.top+c.scrollTop-f.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function U(t){return E(t).position==="static"}function lt(t,e){if(!L(t)||E(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return A(t)===n&&(n=n.ownerDocument.body),n}function xt(t,e){const n=R(t);if(q(t))return n;if(!L(t)){let i=S(t);for(;i&&!W(i);){if(O(i)&&!U(i))return i;i=S(i)}return n}let o=lt(t,e);for(;o&&Wt(o)&&U(o);)o=lt(o,e);return o&&W(o)&&U(o)&&!J(o)?n:o||Mt(t)||n}const Ut=async function(t){const e=this.getOffsetParent||xt,n=this.getDimensions,o=await n(t.floating);return{reference:Xt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Kt(t){return E(t).direction==="rtl"}const Gt={convertOffsetParentRelativeRectToViewportRelativeRect:Ht,getDocumentElement:A,getClippingRect:Yt,getOffsetParent:xt,getElementRects:Ut,getClientRects:_t,getDimensions:qt,getScale:N,isElement:O,isRTL:Kt};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Jt(t,e){let n=null,o;const i=A(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),s();const l=t.getBoundingClientRect(),{left:d,top:u,width:h,height:a}=l;if(c||e(),!h||!a)return;const y=$(u),m=$(i.clientWidth-(d+h)),p=$(i.clientHeight-(u+a)),g=$(d),b={rootMargin:-y+"px "+-m+"px "+-p+"px "+-g+"px",threshold:B(0,K(1,f))||1};let v=!0;function x(V){const P=V[0].intersectionRatio;if(P!==f){if(!v)return r();P?r(!1,P):o=setTimeout(()=>{r(!1,1e-7)},1e3)}P===1&&!bt(l,t.getBoundingClientRect())&&r(),v=!1}try{n=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,b)}n.observe(t)}return r(!0),s}function Zt(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,l=Z(t),d=i||s?[...l?H(l):[],...H(e)]:[];d.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=l&&c?Jt(l,n):null;let h=-1,a=null;r&&(a=new ResizeObserver(g=>{let[w]=g;w&&w.target===l&&a&&(a.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=a)==null||b.observe(e)})),n()}),l&&!f&&a.observe(l),a.observe(e));let y,m=f?F(t):null;f&&p();function p(){const g=F(t);m&&!bt(m,g)&&n(),m=g,y=requestAnimationFrame(p)}return n(),()=>{var g;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),u==null||u(),(g=a)==null||g.disconnect(),a=null,f&&cancelAnimationFrame(y)}}const te=Nt,ee=(t,e,n)=>{const o=new Map,i={platform:Gt,...n},s={...i.platform,_c:o};return Dt(t,e,{...i,platform:s})};export{Zt as a,te as b,ee as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const Ot=["top","right","bottom","left"],nt=["start","end"],ot=Ot.reduce((t,e)=>t.concat(e,e+"-"+nt[0],e+"-"+nt[1]),[]),K=Math.min,B=Math.max,z=Math.round,$=Math.floor,C=t=>({x:t,y:t}),Et={left:"right",right:"left",bottom:"top",top:"bottom"},Tt={start:"end",end:"start"};function ft(t,e){return typeof t=="function"?t(e):t}function j(t){return t.split("-")[0]}function D(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function at(t){return["top","bottom"].includes(j(t))?"y":"x"}function dt(t){return Ct(at(t))}function Lt(t,e,n){n===void 0&&(n=!1);const o=D(t),i=dt(t),s=ut(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function At(t){return t.replace(/start|end/g,e=>Tt[e])}function it(t){return t.replace(/left|right|bottom|top/g,e=>Et[e])}function St(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?St(t):{top:t,right:t,bottom:t,left:t}}function I(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function rt(t,e,n){let{reference:o,floating:i}=t;const s=at(e),r=dt(e),c=ut(r),f=j(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;let a;switch(f){case"top":a={x:d,y:o.y-i.height};break;case"bottom":a={x:d,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:u};break;case"left":a={x:o.x-i.width,y:u};break;default:a={x:o.x,y:o.y}}switch(D(e)){case"start":a[r]-=h*(n&&l?-1:1);break;case"end":a[r]+=h*(n&&l?-1:1);break}return a}const Dt=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e));let l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=rt(l,o,f),h=o,a={},y=0;for(let m=0;m<c.length;m++){const{name:p,fn:g}=c[m],{x:w,y:b,data:v,reset:x}=await g({x:d,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:a,rects:l,platform:r,elements:{reference:t,floating:e}});d=w??d,u=b??u,a={...a,[p]:{...a[p],...v}},x&&y<=50&&(y++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(l=x.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:d,y:u}=rt(l,h,f)),m=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:a}};async function Ft(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:a=0}=ft(e,t),y=Pt(a),p=c[h?u==="floating"?"reference":"floating":u],g=I(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:f})),w=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},x=I(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:f}):w);return{top:(g.top-x.top+y.top)/v.y,bottom:(x.bottom-g.bottom+y.bottom)/v.y,left:(g.left-x.left+y.left)/v.x,right:(x.right-g.right+y.right)/v.x}}function Bt(t,e,n){return(t?[...n.filter(i=>D(i)===t),...n.filter(i=>D(i)!==t)]:n.filter(i=>j(i)===i)).filter(i=>t?D(i)===t||(e?At(i)!==i:!1):!0)}const Nt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:s,middlewareData:r,placement:c,platform:f,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:h=ot,autoAlignment:a=!0,...y}=ft(t,e),m=u!==void 0||h===ot?Bt(u||null,a,h):h,p=await Ft(e,y),g=((n=r.autoPlacement)==null?void 0:n.index)||0,w=m[g];if(w==null)return{};const b=Lt(w,s,await(f.isRTL==null?void 0:f.isRTL(l.floating)));if(c!==w)return{reset:{placement:m[0]}};const v=[p[j(w)],p[b[0]],p[b[1]]],x=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:w,overflows:v}],V=m[g+1];if(V)return{data:{index:g+1,overflows:x},reset:{placement:V}};const P=x.map(T=>{const k=D(T.placement);return[T.placement,k&&d?T.overflows.slice(0,2).reduce((vt,Rt)=>vt+Rt,0):T.overflows[0],T.overflows]}).sort((T,k)=>T[1]-k[1]),et=((i=P.filter(T=>T[2].slice(0,D(T[0])?2:3).every(k=>k<=0))[0])==null?void 0:i[0])||P[0][0];return et!==c?{data:{index:g+1,overflows:x},reset:{placement:et}}:{}}}};function Y(){return typeof window<"u"}function M(t){return ht(t)?(t.nodeName||"").toLowerCase():"#document"}function R(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function A(t){var e;return(e=(ht(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ht(t){return Y()?t instanceof Node||t instanceof R(t).Node:!1}function O(t){return Y()?t instanceof Element||t instanceof R(t).Element:!1}function L(t){return Y()?t instanceof HTMLElement||t instanceof R(t).HTMLElement:!1}function st(t){return!Y()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof R(t).ShadowRoot}function _(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Wt(t){return["table","td","th"].includes(M(t))}function q(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function J(t){const e=Q(),n=O(t)?E(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Mt(t){let e=S(t);for(;L(e)&&!W(e);){if(J(e))return e;if(q(e))return null;e=S(e)}return null}function Q(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function W(t){return["html","body","#document"].includes(M(t))}function E(t){return R(t).getComputedStyle(t)}function X(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function S(t){if(M(t)==="html")return t;const e=t.assignedSlot||t.parentNode||st(t)&&t.host||A(t);return st(e)?e.host:e}function gt(t){const e=S(t);return W(e)?t.ownerDocument?t.ownerDocument.body:t.body:L(e)&&_(e)?e:gt(e)}function H(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=gt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=R(i);if(s){const c=G(r);return e.concat(r,r.visualViewport||[],_(i)?i:[],c&&n?H(c):[])}return e.concat(i,H(i,[],n))}function G(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function mt(t){const e=E(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=L(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=z(n)!==s||z(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function Z(t){return O(t)?t:t.contextElement}function N(t){const e=Z(t);if(!L(e))return C(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=mt(e);let r=(s?z(n.width):n.width)/o,c=(s?z(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Vt=C(0);function pt(t){const e=R(t);return!Q()||!e.visualViewport?Vt:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function kt(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==R(t)?!1:e}function F(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Z(t);let r=C(1);e&&(o?O(o)&&(r=N(o)):r=N(t));const c=kt(s,n,o)?pt(s):C(0);let f=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s){const h=R(s),a=o&&O(o)?R(o):o;let y=h,m=G(y);for(;m&&o&&a!==y;){const p=N(m),g=m.getBoundingClientRect(),w=E(m),b=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*p.x,v=g.top+(m.clientTop+parseFloat(w.paddingTop))*p.y;f*=p.x,l*=p.y,d*=p.x,u*=p.y,f+=b,l+=v,y=R(m),m=G(y)}}return I({width:d,height:u,x:f,y:l})}function tt(t,e){const n=X(t).scrollLeft;return e?e.left+n:F(A(t)).left+n}function wt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:tt(t,o)),s=o.top+e.scrollTop;return{x:i,y:s}}function Ht(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=A(o),c=e?q(e.floating):!1;if(o===r||c&&s)return n;let f={scrollLeft:0,scrollTop:0},l=C(1);const d=C(0),u=L(o);if((u||!u&&!s)&&((M(o)!=="body"||_(r))&&(f=X(o)),L(o))){const a=F(o);l=N(o),d.x=a.x+o.clientLeft,d.y=a.y+o.clientTop}const h=r&&!u&&!s?wt(r,f,!0):C(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-f.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-f.scrollTop*l.y+d.y+h.y}}function _t(t){return Array.from(t.getClientRects())}function $t(t){const e=A(t),n=X(t),o=t.ownerDocument.body,i=B(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=B(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+tt(t);const c=-n.scrollTop;return E(o).direction==="rtl"&&(r+=B(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:c}}function zt(t,e){const n=R(t),o=A(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,c=0,f=0;if(i){s=i.width,r=i.height;const l=Q();(!l||l&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}return{width:s,height:r,x:c,y:f}}function It(t,e){const n=F(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=L(t)?N(t):C(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=i*s.x,l=o*s.y;return{width:r,height:c,x:f,y:l}}function ct(t,e,n){let o;if(e==="viewport")o=zt(t,n);else if(e==="document")o=$t(A(t));else if(O(e))o=It(e,n);else{const i=pt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return I(o)}function yt(t,e){const n=S(t);return n===e||!O(n)||W(n)?!1:E(n).position==="fixed"||yt(n,e)}function jt(t,e){const n=e.get(t);if(n)return n;let o=H(t,[],!1).filter(c=>O(c)&&M(c)!=="body"),i=null;const s=E(t).position==="fixed";let r=s?S(t):t;for(;O(r)&&!W(r);){const c=E(r),f=J(r);!f&&c.position==="fixed"&&(i=null),(s?!f&&!i:!f&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||_(r)&&!f&&yt(t,r))?o=o.filter(d=>d!==r):i=c,r=S(r)}return e.set(t,o),o}function Yt(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?q(e)?[]:jt(e,this._c):[].concat(n),o],c=r[0],f=r.reduce((l,d)=>{const u=ct(e,d,i);return l.top=B(u.top,l.top),l.right=K(u.right,l.right),l.bottom=K(u.bottom,l.bottom),l.left=B(u.left,l.left),l},ct(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function qt(t){const{width:e,height:n}=mt(t);return{width:e,height:n}}function Xt(t,e,n){const o=L(e),i=A(e),s=n==="fixed",r=F(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const f=C(0);if(o||!o&&!s)if((M(e)!=="body"||_(i))&&(c=X(e)),o){const h=F(e,!0,s,e);f.x=h.x+e.clientLeft,f.y=h.y+e.clientTop}else i&&(f.x=tt(i));const l=i&&!o&&!s?wt(i,c):C(0),d=r.left+c.scrollLeft-f.x-l.x,u=r.top+c.scrollTop-f.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function U(t){return E(t).position==="static"}function lt(t,e){if(!L(t)||E(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return A(t)===n&&(n=n.ownerDocument.body),n}function xt(t,e){const n=R(t);if(q(t))return n;if(!L(t)){let i=S(t);for(;i&&!W(i);){if(O(i)&&!U(i))return i;i=S(i)}return n}let o=lt(t,e);for(;o&&Wt(o)&&U(o);)o=lt(o,e);return o&&W(o)&&U(o)&&!J(o)?n:o||Mt(t)||n}const Ut=async function(t){const e=this.getOffsetParent||xt,n=this.getDimensions,o=await n(t.floating);return{reference:Xt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Kt(t){return E(t).direction==="rtl"}const Gt={convertOffsetParentRelativeRectToViewportRelativeRect:Ht,getDocumentElement:A,getClippingRect:Yt,getOffsetParent:xt,getElementRects:Ut,getClientRects:_t,getDimensions:qt,getScale:N,isElement:O,isRTL:Kt};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Jt(t,e){let n=null,o;const i=A(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),s();const l=t.getBoundingClientRect(),{left:d,top:u,width:h,height:a}=l;if(c||e(),!h||!a)return;const y=$(u),m=$(i.clientWidth-(d+h)),p=$(i.clientHeight-(u+a)),g=$(d),b={rootMargin:-y+"px "+-m+"px "+-p+"px "+-g+"px",threshold:B(0,K(1,f))||1};let v=!0;function x(V){const P=V[0].intersectionRatio;if(P!==f){if(!v)return r();P?r(!1,P):o=setTimeout(()=>{r(!1,1e-7)},1e3)}P===1&&!bt(l,t.getBoundingClientRect())&&r(),v=!1}try{n=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,b)}n.observe(t)}return r(!0),s}function Zt(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,l=Z(t),d=i||s?[...l?H(l):[],...H(e)]:[];d.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=l&&c?Jt(l,n):null;let h=-1,a=null;r&&(a=new ResizeObserver(g=>{let[w]=g;w&&w.target===l&&a&&(a.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=a)==null||b.observe(e)})),n()}),l&&!f&&a.observe(l),a.observe(e));let y,m=f?F(t):null;f&&p();function p(){const g=F(t);m&&!bt(m,g)&&n(),m=g,y=requestAnimationFrame(p)}return n(),()=>{var g;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),u==null||u(),(g=a)==null||g.disconnect(),a=null,f&&cancelAnimationFrame(y)}}const te=Nt,ee=(t,e,n)=>{const o=new Map,i={platform:Gt,...n},s={...i.platform,_c:o};return Dt(t,e,{...i,platform:s})};export{Zt as a,te as b,ee as c};
|
|
1
|
+
const o=":host,:root{--gator-menu-dropdown-max-width: 400px;--ngc-menu-item-min-width: unset;--gator-menu-item-hover-background-color: var(--color-blue-10, #F3F5F7);--gator-menu-item-pressed-background-color: var(--color-blue-25)}";export{o as m};
|