@ncino/web-components 2.1.0-preview.2 → 2.1.0-preview.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/assets/index-chunk12.js +1 -1
  2. package/dist/assets/index-chunk13.js +1 -1
  3. package/dist/components/input/gator/dropdown/input-dropdown.gator.js +14 -11
  4. package/dist/components/input/gator/input-label/input-label.gator.js +7 -7
  5. package/dist/components/input/gator/input-phone/input-phone.gator.js +48 -0
  6. package/dist/components/input/gator/input-text/input-text.gator.js +10 -7
  7. package/dist/components/input/index.gator.js +1 -1
  8. package/dist/components/input/index.js +1 -1
  9. package/dist/components/list/gator/list/index.js +1 -1
  10. package/dist/components/list/gator/list/list.gator.js +1 -1
  11. package/dist/components/menu/base/gator/menu.gator.js +1 -1
  12. package/dist/components/menu/base/index.js +1 -1
  13. package/dist/components/menu/index.js +1 -1
  14. package/dist/components/menu/menu-item/gator/menu-item.gator.js +1 -1
  15. package/dist/components/menu/menu-item/index.js +1 -1
  16. package/dist/components/modal/gator/modal.gator.js +9 -9
  17. package/dist/components/modal/index.js +1 -1
  18. package/dist/components/tooltip/gator/tooltip.gator.js +1 -1
  19. package/dist/components/tooltip/index.js +1 -1
  20. package/dist/components/tooltip/slds/tooltip.slds.js +1 -1
  21. package/dist/index.gator.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/index.slds.js +1 -1
  24. package/dist/types/components/input/gator/dropdown/input-dropdown.gator.d.ts +11 -1
  25. package/dist/types/components/input/gator/input-phone/input-phone.gator.d.ts +20 -0
  26. package/dist/types/components/input/gator/input-phone/input-phone.gator.test.d.ts +0 -0
  27. package/dist/types/components/input/index.gator.d.ts +2 -0
  28. package/dist/types/utils/data/data-models.d.ts +5 -0
  29. package/dist/types/utils/data/phone-country-codes.json.d.ts +1215 -0
  30. package/dist/types/utils/phone-utils.d.ts +4 -0
  31. package/dist/utils/phone-utils.js +1 -0
  32. package/package.json +2 -1
  33. package/web-types.json +379 -272
@@ -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};
@@ -1,10 +1,12 @@
1
- import{a as v,x as d}from"../../../../assets/index-chunk2.js";import"../input-label/input-label.gator.js";import"../help-text/help-text.gator.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/check.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/chevron-down.js";import"../../../icon/gator/templates/chevron-left.js";import"../../../icon/gator/templates/chevron-right.js";import"../../../icon/gator/templates/chevron-up.js";import"../../../icon/gator/templates/dashboard.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/link.js";import"../../../icon/gator/templates/overflow-menu.js";import"../../../icon/gator/templates/percent.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/shield-lock.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/settings.js";import"../../../icon/gator/templates/warning.js";import"../../../list/gator/list/list.gator.js";import"../../../list/gator/list-item/list-item.gator.js";import{t as m}from"../../../../assets/index-chunk3.js";import{n as p}from"../../../../assets/index-chunk.js";import{r as f}from"../../../../assets/index-chunk4.js";import{e as c,n}from"../../../../assets/index-chunk8.js";import{a as x,c as b,b as y}from"../../../../assets/index-chunk13.js";import{K as o}from"../../../../consts/key-constants.js";import{N as g}from"../../base/input-base.gator.js";import{f as w,a as $}from"../../../../utils/places-utils.js";import{f as _}from"../../../../utils/industry-utils.js";import{o as R}from"../../../../assets/index-chunk7.js";import"../../../../assets/index-chunk5.js";import"../../../../assets/index-chunk6.js";import"../../../../utils/mixins/attribute-deletion.js";import"../../../icon/icon-registry.js";import"../../../../utils/components/testable-lit-element/testable-lit-element.js";import"../../../divider/gator/divider.gator.js";import"../../../divider/divider.js";import"../../../../assets/index-chunk9.js";import"../../base/input-base.js";const D=':root,:host{--ngc-input-dropdown-list-max-height: 14rem}.gator-dropdown-listbox{position:absolute;width:max-content;top:0;left:0;display:none;max-height:var(--ngc-input-dropdown-list-max-height);overflow-y:scroll;overflow-x:hidden;border-radius:var(--radius-card-medium, .5rem);padding:var(--spacing-padding-margin-8, .5rem) 2px;background:var(--color-surface-primary-white, #FFF);box-shadow:var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-1-y-offset, 7px) var(--shadow-shadow-3-dropdown-property-1-blur, 12px) var(--shadow-shadow-3-dropdown-property-1-spread, 0px) var(--shadow-color-10, rgba(31, 31, 31, .1)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-2-y-offset, 8px) var(--shadow-shadow-3-dropdown-property-2-blur, 16px) var(--shadow-shadow-3-dropdown-property-2-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-3-y-offset, 9px) var(--shadow-shadow-3-dropdown-property-3-blur, 18px) var(--shadow-shadow-3-dropdown-property-3-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08))}.gator-form-element-control:focus{outline:2px solid var(--ngc-input-border-color-focused, #1F1F1F)!important;border:1px solid transparent!important}.gator-dropdown-listbox_expanded{display:block}.gator-faux-input-placeholder{color:var(--text-color-placeholder, #6D6D6D);font-family:var(--text-family-body, "Open Sans");font-size:var(--text-size-body-1, 1.0625rem);line-height:var(--text-line-height-body-1, 1.5rem);letter-spacing:var(--text-letter-spacing-default, 0rem)}';var F=Object.defineProperty,k=Object.getOwnPropertyDescriptor,I=Object.getPrototypeOf,O=Reflect.get,l=(t,e,i,a)=>{for(var r=a>1?void 0:a?k(e,i):e,h=t.length-1,u;h>=0;h--)(u=t[h])&&(r=(a?u(e,i,r):u(r))||r);return a&&r&&F(e,i,r),r},P=(t,e,i)=>O(I(t),i,e);let s=class extends g{constructor(){super(...arguments),this.options=[],this.autocomplete=!1,this._expanded=!1,this._searchValue="",this.listboxRef=c(),this.listRef=c(),this.inputRef=c()}render(){return d`
1
+ import{a as m,x as d}from"../../../../assets/index-chunk2.js";import"../input-label/input-label.gator.js";import"../help-text/help-text.gator.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/check.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/chevron-down.js";import"../../../icon/gator/templates/chevron-left.js";import"../../../icon/gator/templates/chevron-right.js";import"../../../icon/gator/templates/chevron-up.js";import"../../../icon/gator/templates/dashboard.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/link.js";import"../../../icon/gator/templates/overflow-menu.js";import"../../../icon/gator/templates/percent.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/shield-lock.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/settings.js";import"../../../icon/gator/templates/warning.js";import"../../../list/gator/list/list.gator.js";import"../../../list/gator/list-item/list-item.gator.js";import{t as x}from"../../../../assets/index-chunk3.js";import{n}from"../../../../assets/index-chunk.js";import{r as f}from"../../../../assets/index-chunk4.js";import{e as c,n as p}from"../../../../assets/index-chunk8.js";import{a as y,c as b,b as g}from"../../../../assets/index-chunk12.js";import{K as a}from"../../../../consts/key-constants.js";import{N as w}from"../../base/input-base.gator.js";import{f as $,a as _}from"../../../../utils/places-utils.js";import{f as R}from"../../../../utils/industry-utils.js";import{f as D}from"../../../../utils/phone-utils.js";import{o as v}from"../../../../assets/index-chunk7.js";import"../../../../assets/index-chunk5.js";import"../../../../assets/index-chunk6.js";import"../../../../utils/mixins/attribute-deletion.js";import"../../../icon/icon-registry.js";import"../../../../utils/components/testable-lit-element/testable-lit-element.js";import"../../../divider/gator/divider.gator.js";import"../../../divider/divider.js";import"../../../../assets/index-chunk9.js";import"../../base/input-base.js";const F=':root,:host{--ngc-input-dropdown-list-max-height: 14rem}.gator-dropdown-listbox{position:absolute;width:max-content;top:0;left:0;display:none;max-height:var(--ngc-input-dropdown-list-max-height);overflow-y:scroll;overflow-x:hidden;border-radius:var(--radius-card-medium, .5rem);padding:var(--spacing-padding-margin-8, .5rem) 2px;background:var(--color-surface-primary-white, #FFF);box-shadow:var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-1-y-offset, 7px) var(--shadow-shadow-3-dropdown-property-1-blur, 12px) var(--shadow-shadow-3-dropdown-property-1-spread, 0px) var(--shadow-color-10, rgba(31, 31, 31, .1)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-2-y-offset, 8px) var(--shadow-shadow-3-dropdown-property-2-blur, 16px) var(--shadow-shadow-3-dropdown-property-2-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-3-y-offset, 9px) var(--shadow-shadow-3-dropdown-property-3-blur, 18px) var(--shadow-shadow-3-dropdown-property-3-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08))}.gator-form-element-control:focus{outline:2px solid var(--ngc-input-border-color-focused, #1F1F1F)!important;border:1px solid transparent!important}.gator-dropdown-listbox_expanded{display:block}.gator-faux-input-placeholder{color:var(--text-color-placeholder, #6D6D6D);font-family:var(--text-family-body, "Open Sans");font-size:var(--text-size-body-1, 1.0625rem);line-height:var(--text-line-height-body-1, 1.5rem);letter-spacing:var(--text-letter-spacing-default, 0rem)}';var k=Object.defineProperty,C=Object.getOwnPropertyDescriptor,I=Object.getPrototypeOf,P=Reflect.get,r=(t,e,i,s)=>{for(var l=s>1?void 0:s?C(e,i):e,h=t.length-1,u;h>=0;h--)(u=t[h])&&(l=(s?u(e,i,l):u(l))||l);return s&&l&&k(e,i,l),l},O=(t,e,i)=>P(I(t),i,e);let o=class extends w{constructor(){super(...arguments),this.options=[],this.autocomplete=!1,this.valueDisplayed=!1,this._expanded=!1,this._searchValue="",this.listboxRef=c(),this.listRef=c(),this.inputRef=c()}render(){return d`
2
2
  <div class="gator-form-element">
3
- ${this.label?this.labelMarkup:null}
3
+ <slot name="label">
4
+ ${this.label?this.labelMarkup:null}
5
+ </slot>
4
6
  <div
5
- ${n(this.controlRef)}
7
+ ${p(this.controlRef)}
6
8
  class="gator-form-element-control ${this.errorClass} gator-cursor-pointer"
7
- data-testid=${R(this.dataTestid)}-listbox
9
+ data-testid=${v(this.dataTestid)}-listbox
8
10
  aria-controls="listbox-${this.id}"
9
11
  aria-expanded="${this._expanded}"
10
12
  aria-haspopup="listbox"
@@ -25,7 +27,7 @@ import{a as v,x as d}from"../../../../assets/index-chunk2.js";import"../input-la
25
27
  </div>`:null}
26
28
  ${this.autocomplete?d`
27
29
  <input
28
- ${n(this.inputRef)}
30
+ ${p(this.inputRef)}
29
31
  type="${this.type}"
30
32
  .id="${this.id}"
31
33
  .placeholder="${this.placeholder}"
@@ -33,6 +35,7 @@ import{a as v,x as d}from"../../../../assets/index-chunk2.js";import"../input-la
33
35
  .disabled="${this.disabled}"
34
36
  class="gator-input"
35
37
  autocomplete="one-time-code"
38
+ aria-label="${v(this.label)}"
36
39
  .value="${this.displayedValue}"
37
40
  @input="${this.handleInput}"
38
41
  @keydown="${this.handleInputKeydown}"
@@ -52,18 +55,18 @@ import{a as v,x as d}from"../../../../assets/index-chunk2.js";import"../input-la
52
55
 
53
56
  ${this.listboxMarkup}
54
57
  </div>
55
- `}_topLevelFocusOut(t){t.relatedTarget||(this._expanded=!1)}_handleControlFocusIn(){var t;this.autocomplete&&((t=this.inputRef.value)==null||t.focus())}firstUpdated(){this._expanded&&this.toggleListbox(o.ENTER,!0)}updated(){var t,e,i,a;this._expanded&&this.value&&((t=this.controlRef.value)==null||t.setAttribute("aria-activedescendant",this.replacedActiveDescendant)),this._expanded&&!this.value&&(this._activeDescendant=(i=(e=this.shadowRoot)==null?void 0:e.querySelector("ngc-list-item"))==null?void 0:i.id,(a=this.controlRef.value)==null||a.setAttribute("aria-activedescendant",this.replacedActiveDescendant))}get fauxInputMarkup(){return d`
58
+ `}_topLevelFocusOut(t){t.relatedTarget||(this._expanded=!1)}_handleControlFocusIn(){var t;this.autocomplete&&((t=this.inputRef.value)==null||t.focus())}firstUpdated(){this._expanded&&this.toggleListbox(a.ENTER,!0)}updated(){var t,e,i,s;this._expanded&&this.value&&((t=this.controlRef.value)==null||t.setAttribute("aria-activedescendant",this.replacedActiveDescendant)),this._expanded&&!this.value&&(this._activeDescendant=(i=(e=this.shadowRoot)==null?void 0:e.querySelector("ngc-list-item"))==null?void 0:i.id,(s=this.controlRef.value)==null||s.setAttribute("aria-activedescendant",this.replacedActiveDescendant))}get fauxInputMarkup(){return d`
56
59
  <div class="gator-faux-input ${this.showPlaceholder?"gator-faux-input-placeholder":null}">
57
60
  ${this.displayedValue||this.placeholder}
58
61
  </div>
59
- `}get displayedValue(){var t;return this.value?((t=this.displayedOptions.find(e=>e.value===this.value))==null?void 0:t.label)??this.value:""}get showPlaceholder(){return this.placeholder&&!this.value}get replacedActiveDescendant(){return this._activeDescendant?this._activeDescendant.replace(" ",""):""}get listboxMarkup(){return d`
62
+ `}get displayedValue(){var t;return this.value?this.valueDisplayed?this.value:((t=this.displayedOptions.find(e=>e.value===this.value))==null?void 0:t.label)??this.value:""}get showPlaceholder(){return this.placeholder&&!this.value}get replacedActiveDescendant(){return this._activeDescendant?this._activeDescendant.replace(" ",""):""}get listboxMarkup(){return d`
60
63
  <div
61
- ${n(this.listboxRef)}
64
+ ${p(this.listboxRef)}
62
65
  class="gator-dropdown-listbox ${this._expanded?"gator-dropdown-listbox_expanded":""}"
63
66
  >
64
67
  <ngc-list
65
68
  .id="listbox-${this.id}"
66
- ${n(this.listRef)}
69
+ ${p(this.listRef)}
67
70
  selectable
68
71
  @selected="${this.handleSelected}"
69
72
  faux-focus
@@ -81,11 +84,11 @@ import{a as v,x as d}from"../../../../assets/index-chunk2.js";import"../input-la
81
84
  `)}
82
85
  </ngc-list>
83
86
  </div>
84
- `}get displayedOptions(){let t=this.options;return this.dataType==="country"?t=w():this.dataType==="state"&&this.countryCode?t=$(this.countryCode):this.dataType==="naics"&&(t=_()),this._searchValue?[...t.filter(e=>e.label.toLowerCase().includes(this._searchValue.toLowerCase()))]:t}handleSelected(){var t;this._expanded=!1,this._activeDescendant=void 0,(t=this.controlRef.value)==null||t.removeAttribute("aria-activedescendant")}handleComboboxKeydown(t){var e,i;!this._expanded&&(t.key===o.ENTER||t.key===o.SPACE||t.key===o.DOWN)?this.toggleListbox(t.key,!1):this._expanded&&this.listRef.value&&((t.key===o.ENTER||t.key===o.SPACE)&&this.listRef.value.selectFalseFocusedItem(),t.key===o.DOWN&&(this._activeDescendant=this.listRef.value.falseFocusNextItem(),(e=this.controlRef.value)==null||e.setAttribute("aria-activedescendant",this.replacedActiveDescendant)),t.key===o.UP&&(this._activeDescendant=this.listRef.value.falseFocusPreviousItem(),(i=this.controlRef.value)==null||i.setAttribute("aria-activedescendant",this.replacedActiveDescendant))),t.key===o.ESCAPE&&(this._expanded=!1)}get errorClass(){return this.errorText?"gator-has-error":""}get labelMarkup(){return d`
87
+ `}get displayedOptions(){let t=this.options;return this.dataType==="country"?t=$():this.dataType==="state"&&this.countryCode?t=_(this.countryCode):this.dataType==="naics"?t=R():this.dataType==="phoneCodes"&&(t=D()),this._searchValue?[...t.filter(e=>e.label.toLowerCase().includes(this._searchValue.toLowerCase()))]:t}handleSelected(){var t;this._expanded=!1,this._activeDescendant=void 0,(t=this.controlRef.value)==null||t.removeAttribute("aria-activedescendant")}handleComboboxKeydown(t){var e,i;!this._expanded&&(t.key===a.ENTER||t.key===a.SPACE||t.key===a.DOWN)?this.toggleListbox(t.key,!1):this._expanded&&this.listRef.value&&((t.key===a.ENTER||t.key===a.SPACE)&&this.listRef.value.selectFalseFocusedItem(),t.key===a.DOWN&&(this._activeDescendant=this.listRef.value.falseFocusNextItem(),(e=this.controlRef.value)==null||e.setAttribute("aria-activedescendant",this.replacedActiveDescendant)),t.key===a.UP&&(this._activeDescendant=this.listRef.value.falseFocusPreviousItem(),(i=this.controlRef.value)==null||i.setAttribute("aria-activedescendant",this.replacedActiveDescendant))),t.key===a.ESCAPE&&(this._expanded=!1)}get errorClass(){return this.errorText?"gator-has-error":""}get labelMarkup(){return d`
85
88
  <ngc-input-label
86
89
  .for="dropdown-label-${this.id}"
87
90
  .required="${this.required}"
88
91
  type="div"
89
92
  >
90
93
  ${this.label}
91
- </ngc-input-label>`}toggleListbox(t,e){var i;e||(this._expanded=!this._expanded),setTimeout(()=>{var a;this.assignPosition(),this.listRef.value&&(t==o.DOWN||!this.value)?this._activeDescendant=this.listRef.value.falseFocusFirstItem():this.value&&this.listRef.value&&(this._activeDescendant=this.listRef.value.setFalseFocusToValue(this.value)),this._expanded&&((a=this.controlRef.value)==null||a.setAttribute("aria-activedescendant",this.replacedActiveDescendant))}),this._expanded||(this._activeDescendant=void 0,(i=this.controlRef.value)==null||i.removeAttribute("aria-activedescendant"))}get endIconMarkup(){return d`<ngc-icon .name="${this.endIcon||"chevron-down"}"></ngc-icon>`}assignPosition(){const t=this.controlRef.value;!this.listboxRef||!this.listboxRef.value||!t||(this._cleanup=x(t,this.listboxRef.value,async()=>{if(!this.listboxRef||!this.listboxRef.value||!t)return;const{x:e,y:i,placement:a}=await b(t,this.listboxRef.value,{placement:"bottom",middleware:[y()]});let r=a==="bottom"?4:-4;Object.assign(this.listboxRef.value.style,{left:`${e}px`,top:`${i+r}px`,width:`${t.clientWidth}px`})}))}handleInput(t){let e=t.target;this._searchValue=e.value,this._expanded=!0}handleInputKeydown(t){if((t.key===o.DOWN||t.key===o.UP)&&t.preventDefault(),t.key===o.SPACE){t.stopPropagation();return}}};s.styles=[...P(s,s,"styles"),v(D)];l([p({type:Array})],s.prototype,"options",2);l([p({type:Boolean})],s.prototype,"autocomplete",2);l([p({type:String,attribute:"data-type"})],s.prototype,"dataType",2);l([p({type:String,attribute:"country-code"})],s.prototype,"countryCode",2);l([f()],s.prototype,"_activeDescendant",2);l([f()],s.prototype,"_expanded",2);l([f()],s.prototype,"_searchValue",2);s=l([m("ngc-input-dropdown")],s);
94
+ </ngc-input-label>`}toggleListbox(t,e){var i;e||(this._expanded=!this._expanded),setTimeout(()=>{var s;this.assignPosition(),this.listRef.value&&(t==a.DOWN||!this.value)?this._activeDescendant=this.listRef.value.falseFocusFirstItem():this.value&&this.listRef.value&&(this._activeDescendant=this.listRef.value.setFalseFocusToValue(this.value)),this._expanded&&((s=this.controlRef.value)==null||s.setAttribute("aria-activedescendant",this.replacedActiveDescendant))}),this._expanded||(this._activeDescendant=void 0,(i=this.controlRef.value)==null||i.removeAttribute("aria-activedescendant"))}get endIconMarkup(){return d`<ngc-icon .name="${this.endIcon||"chevron-down"}"></ngc-icon>`}assignPosition(){const t=this.controlRef.value;!this.listboxRef||!this.listboxRef.value||!t||(this._cleanup=y(t,this.listboxRef.value,async()=>{if(!this.listboxRef||!this.listboxRef.value||!t)return;const{x:e,y:i,placement:s}=await b(t,this.listboxRef.value,{placement:"bottom-start",middleware:[g({alignment:"start"})]});let l=s==="bottom-start"?4:-4;Object.assign(this.listboxRef.value.style,{left:`${e}px`,top:`${i+l}px`,width:`${this.listWidth??t.clientWidth}px`})}))}handleInput(t){let e=t.target;this._searchValue=e.value,this._expanded=!0}handleInputKeydown(t){if((t.key===a.DOWN||t.key===a.UP)&&t.preventDefault(),t.key===a.SPACE){t.stopPropagation();return}}};o.styles=[...O(o,o,"styles"),m(F)];r([n({type:Array})],o.prototype,"options",2);r([n({type:Boolean})],o.prototype,"autocomplete",2);r([n({type:String,attribute:"data-type"})],o.prototype,"dataType",2);r([n({type:String,attribute:"country-code"})],o.prototype,"countryCode",2);r([n({type:String,attribute:"list-width"})],o.prototype,"listWidth",2);r([n({type:Boolean,attribute:"value-displayed"})],o.prototype,"valueDisplayed",2);r([f()],o.prototype,"_activeDescendant",2);r([f()],o.prototype,"_expanded",2);r([f()],o.prototype,"_searchValue",2);o=r([x("ngc-input-dropdown")],o);
@@ -1,11 +1,11 @@
1
- import{r as u,a as o,x as l}from"../../../../assets/index-chunk2.js";import{t as b}from"../../../../assets/index-chunk3.js";import{n as f}from"../../../../assets/index-chunk.js";import{p as m}from"../../../../assets/index-chunk5.js";import{s as h}from"../../../../assets/index-chunk6.js";import{A as c}from"../../../../utils/mixins/attribute-deletion.js";const v=".gator-label{font-family:var(--gator-input-label-font-family);font-weight:var(--gator-input-label-font-weight, 400);color:var(--gator-input-label-color, var(--color-neutral-50, #6D6D6D));font-size:var(--gator-input-label-font-size, var(--text-size-body-1, 1.0625rem));line-height:var(--gator-input-label-line-height, var(--text-line-height-body-1, 1.5rem))}.gator-label_required{font-size:var(--text-size-subtitle-1, 1.0625rem);margin-right:var(--spacing-padding-margin-8, .5rem);color:var(--color-text-error, #AA330E);font-weight:700}",d=':host{--gator-input-label-color: var(--color-text-primary-base, #1F1F1F);--gator-input-label-font-family: var(--text-family-sans-serif, "Open Sans", sans-serif);--gator-input-label-font-weight: 400;--gator-input-label-font-size: 1.0625rem;--gator-input-label-line-height: 1.5rem}';var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,i=(g,r,s,a)=>{for(var t=a>1?void 0:a?w(r,s):r,n=g.length-1,p;n>=0;n--)(p=g[n])&&(t=(a?p(r,s,t):p(t))||t);return a&&t&&y(r,s,t),t};let e=class extends c(u){constructor(){super(...arguments),this.for="",this.type="label",this.required=!1}render(){switch(this.type){default:case"label":return l`
2
- <label class="gator-label" for=${this.for}>
3
- ${this.required?l`<span class="gator-label_required">*</span>`:null}
1
+ import{r as b,a as o,x as i}from"../../../../assets/index-chunk2.js";import{t as f}from"../../../../assets/index-chunk3.js";import{n as s}from"../../../../assets/index-chunk.js";import{p as d}from"../../../../assets/index-chunk5.js";import{s as u}from"../../../../assets/index-chunk6.js";import{A as m}from"../../../../utils/mixins/attribute-deletion.js";const c=".gator-label{font-family:var(--gator-input-label-font-family);font-weight:var(--gator-input-label-font-weight, 400);color:var(--gator-input-label-color, var(--color-neutral-50, #6D6D6D));font-size:var(--gator-input-label-font-size, var(--text-size-body-1, 1.0625rem));line-height:var(--gator-input-label-line-height, var(--text-line-height-body-1, 1.5rem))}.gator-label_required{font-size:var(--text-size-subtitle-1, 1.0625rem);margin-right:var(--spacing-padding-margin-8, .5rem);color:var(--color-text-error, #AA330E);font-weight:700}.gator-label_hidden{display:none}",v=':host{--gator-input-label-color: var(--color-text-primary-base, #1F1F1F);--gator-input-label-font-family: var(--text-family-sans-serif, "Open Sans", sans-serif);--gator-input-label-font-weight: 400;--gator-input-label-font-size: 1.0625rem;--gator-input-label-line-height: 1.5rem}';var y=Object.defineProperty,_=Object.getOwnPropertyDescriptor,r=(h,a,n,l)=>{for(var t=l>1?void 0:l?_(a,n):a,p=h.length-1,g;p>=0;p--)(g=h[p])&&(t=(l?g(a,n,t):g(t))||t);return l&&t&&y(a,n,t),t};let e=class extends m(b){constructor(){super(...arguments),this.for="",this.type="label",this.required=!1,this.hideLabel=!1}render(){switch(this.type){default:case"label":return i`
2
+ <label class="gator-label ${this.hiddenClass}" for=${this.for}>
4
3
  <slot></slot>
4
+ ${this.required?i`<span class="gator-label_required">*</span>`:null}
5
5
  </label>
6
- `;case"div":return l`
7
- <div class="gator-label" id=${this.for}>
8
- ${this.required?l`<span class="gator-label_required">*</span>`:null}
6
+ `;case"div":return i`
7
+ <div class="gator-label ${this.hiddenClass}" id=${this.for}>
9
8
  <slot></slot>
9
+ ${this.required?i`<span class="gator-label_required">*</span>`:null}
10
10
  </div>
11
- `}}};e.shadowRootOptions={...u.shadowRootOptions,mode:"open"};e.styles=[o(v),o(d),o(h),o(m)];i([f({type:String})],e.prototype,"for",2);i([f({type:String})],e.prototype,"type",2);i([f({type:Boolean})],e.prototype,"required",2);e=i([b("ngc-input-label")],e);
11
+ `}}get hiddenClass(){return this.hideLabel?"gator-label_hidden":""}};e.shadowRootOptions={...b.shadowRootOptions,mode:"open"};e.styles=[o(c),o(v),o(u),o(d)];r([s({type:String})],e.prototype,"for",2);r([s({type:String})],e.prototype,"type",2);r([s({type:Boolean})],e.prototype,"required",2);r([s({type:Boolean,attribute:"hide-label"})],e.prototype,"hideLabel",2);e=r([f("ngc-input-label")],e);