@ulu/frontend 0.1.0-beta.26 → 0.1.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +2 -1
- package/docs-dev/changelog/index.html +22 -1
- package/docs-dev/demos/card/index.html +89 -47
- package/docs-dev/demos/popovers/index.html +99 -3
- package/docs-dev/sass/components/card/index.html +1 -1
- package/docs-dev/sass/components/popover/index.html +1 -1
- package/js/ui/popover.js +1 -0
- package/package.json +1 -1
- package/scss/_utils.scss +34 -9
- package/scss/components/_popover.scss +66 -33
- package/types/ui/popover.d.ts.map +1 -1
package/dist/ulu-frontend.min.js
CHANGED
|
@@ -35,7 +35,8 @@ var _a=Object.defineProperty;var Ea=(t,e,n)=>e in t?_a(t,e,{enumerable:!0,config
|
|
|
35
35
|
`}};Y(Ae,"instances",[]),Y(Ae,"defaults",{namespace:"Flipcard",proxyClick:{allowSelection:!0,selectionMin:10,exclude:"a, input, textarea, button"}});let Et=Ae;const $t={init:"data-ulu-flipcard-init",flipcard:"data-ulu-flipcard",front:"data-ulu-flipcard-front",back:"data-ulu-flipcard-back"},os=t=>`[${$t[t]}]`,rn=t=>`${os(t)}:not([${$t.init}])`,as=[];function ss(){document.addEventListener(W("pageModified"),on),on()}function on(){document.querySelectorAll(rn("flipcard")).forEach(ls)}function ls(t){t.setAttribute($t.init,"");const e=be(t,"uluFlipcard"),n=Object.assign({},e),r=t.querySelector(rn("front")),o=t.querySelector(rn("back"));as.push(new Et(t,r,o,n))}const us=Object.freeze(Object.defineProperty({__proto__:null,Flipcard:Et,attrs:$t,init:ss,setup:on},Symbol.toStringTag,{value:"Module"}));function cs(t="[data-grid]",e){document.addEventListener(W("pageModified"),()=>vt(t,e)),document.addEventListener(W("pageResized"),()=>vt(t,e)),vt(t,e)}function vt(t,e){document.querySelectorAll(t).forEach(n=>eo(n,e||void 0))}const fs=Object.freeze(Object.defineProperty({__proto__:null,init:cs,setup:vt},Symbol.toStringTag,{value:"Module"}));function bi(){return function(e,n){const r=n==="next",{track:o}=e.elements;if(!o.children)return 400;const a=window.getComputedStyle(o).getPropertyValue("scroll-padding-left").replace("auto","0px"),s=parseInt(a,10),{scrollLeft:l,offsetWidth:u}=o,m=l+u,f=[...o.children].map(v=>{const{offsetLeft:h,offsetWidth:p}=v;return{element:v,offsetLeft:h,offsetRight:h+p}});let d;if(r)d=f.find(v=>v.offsetRight>=m);else{let v=f.findLastIndex(h=>h.offsetLeft<=l);if(v){let h=f[v];d=f.slice(0,v+1).find(b=>b.offsetLeft+s+u>=h.offsetRight)}}return d?r?d.offsetLeft:d.offsetLeft+s:400}}const ds=Object.freeze(Object.defineProperty({__proto__:null,createPager:bi},Symbol.toStringTag,{value:"Module"}));function gi(t){return e=>t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}const ps=["track","controls"],et=class et{constructor(e,n){this.options=Object.assign({},et.defaults,n),gi(ps)||te(this,"Missing a required Element"),this.elements={...e,...this.createControls(e.controls)},this.nextEnabled=!0,this.previousEnabled=!0,this.scrollHandler=r=>this.onScroll(r),this.elements.track.addEventListener("scroll",this.scrollHandler,{passive:!0}),this.checkOverflow(),this.onScroll()}checkOverflow(){const{track:e}=this.elements;this.hasOverflow=e.scrollWidth>e.clientWidth}createControls(e){const n=document.createElement("ul"),r=document.createElement("li"),o=document.createElement("li"),i=this.createControlButton("previous"),a=this.createControlButton("next"),s=this.getClass("controls-item");return o.classList.add(s),o.classList.add(s+"--next"),r.classList.add(s),r.classList.add(s+"--previous"),n.classList.add(this.getClass("controls")),r.appendChild(i),o.appendChild(a),n.appendChild(r),n.appendChild(o),i.addEventListener("click",this.previous.bind(this)),a.addEventListener("click",this.next.bind(this)),e.appendChild(n),{controls:n,previousItem:r,nextItem:o,previous:i,next:a}}createControlButton(e){const n=document.createElement("button");return n.classList.add(this.getClass("control-button")),n.classList.add(this.getClass(`control-button--${e}`)),n.classList.add(...this.options.buttonClasses),n.setAttribute("type","button"),n.innerHTML=this.getControlContent(e),n}getControlContent(e){const n=this.options[e==="next"?"iconClassNext":"iconClassPrevious"];return`
|
|
36
36
|
<span class="hidden-visually">${e}</span>
|
|
37
37
|
<span class="${n}" aria-hidden="true"></span>
|
|
38
|
-
`}onScroll(e){this.hasOverflow&&this.onScrollHorizontal()}onScrollHorizontal(){const{nextEnabled:e,previousEnabled:n}=this,{track:r}=this.elements,{offsetStart:o,offsetEnd:i}=this.options,{scrollWidth:a,clientWidth:s,scrollLeft:l}=r,u=l<=o,m=a-l-i<=s;u&&n?this.setControlState("previous",!1):!u&&!n&&this.setControlState("previous",!0),m&&e?this.setControlState("next",!1):!m&&!e&&this.setControlState("next",!0)}setControlState(e,n){const r=e==="next",{next:o,nextItem:i,previous:a,previousItem:s}=this.elements,l=r?i:s,u=r?o:a,m=n?"remove":"add";l.classList[m](this.getClass("controls-item--disabled")),u.classList[n?"remove":"add"](this.getClass("control--disabled")),n?u.removeAttribute("disabled"):u.setAttribute("disabled",""),this[r?"nextEnabled":"previousEnabled"]=n}resolveAmount(e){const n=e==="next",{amount:r}=this.options,{scrollLeft:o,offsetWidth:i}=this.elements.track;return r==="auto"?n?o+i:o-i:typeof r=="function"?r(this,e):typeof r=="number"?n?o+r:o-r:(te("Unable to resolve amount for scroll"),500)}next(){this.elements.track.scrollTo({top:0,left:this.resolveAmount("next"),behavior:"smooth"})}previous(){this.elements.track.scrollTo({top:0,left:this.resolveAmount("previous"),behavior:"smooth"})}getClass(e){const{namespace:n}=this.options;return`${n}__${e}`}};Y(et,"instances",[]),Y(et,"defaults",{namespace:"OverflowScroller",events:{},horizontal:!0,offsetStart:100,offsetEnd:100,amount:"auto",buttonClasses:["button","button--icon"],iconClassPrevious:Me("iconClassPrevious"),iconClassNext:Me("iconClassNext")});let wt=et;const vs=Object.freeze(Object.defineProperty({__proto__:null,OverflowScroller:wt},Symbol.toStringTag,{value:"Module"})),he=Math.min,le=Math.max,St=Math.round,dt=Math.floor,Ee=t=>({x:t,y:t}),hs={left:"right",right:"left",bottom:"top",top:"bottom"},ms={start:"end",end:"start"};function an(t,e,n){return le(t,he(e,n))}function Ue(t,e){return typeof t=="function"?t(e):t}function me(t){return t.split("-")[0]}function st(t){return t.split("-")[1]}function fo(t){return t==="x"?"y":"x"}function xi(t){return t==="y"?"height":"width"}function lt(t){return["top","bottom"].includes(me(t))?"y":"x"}function yi(t){return fo(lt(t))}function bs(t,e,n){n===void 0&&(n=!1);const r=st(t),o=yi(t),i=xi(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Ot(a)),[a,Ot(a)]}function gs(t){const e=Ot(t);return[sn(t),e,sn(e)]}function sn(t){return t.replace(/start|end/g,e=>ms[e])}function xs(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:a;default:return[]}}function ys(t,e,n,r){const o=st(t);let i=xs(me(t),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),e&&(i=i.concat(i.map(sn)))),i}function Ot(t){return t.replace(/left|right|bottom|top/g,e=>hs[e])}function _s(t){return{top:0,right:0,bottom:0,left:0,...t}}function _i(t){return typeof t!="number"?_s(t):{top:t,right:t,bottom:t,left:t}}function Ke(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function Fi(t,e,n){let{reference:r,floating:o}=t;const i=lt(e),a=yi(e),s=xi(a),l=me(e),u=i==="y",m=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2;let v;switch(l){case"top":v={x:m,y:r.y-o.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-o.width,y:f};break;default:v={x:r.x,y:r.y}}switch(st(e)){case"start":v[a]-=d*(n&&u?-1:1);break;case"end":v[a]+=d*(n&&u?-1:1);break}return v}const Es=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:m,y:f}=Fi(u,r,l),d=r,v={},h=0;for(let p=0;p<s.length;p++){const{name:b,fn:_}=s[p],{x:g,y,data:E,reset:C}=await _({x:m,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:t,floating:e}});m=g??m,f=y??f,v={...v,[b]:{...v[b],...E}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:o}):C.rects),{x:m,y:f}=Fi(u,d,l)),p=-1)}return{x:m,y:f,placement:d,strategy:o,middlewareData:v}};async function po(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:d=!1,padding:v=0}=Ue(e,t),h=_i(v),b=s[d?f==="floating"?"reference":"floating":f],_=Ke(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:m,strategy:l})),g=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Ke(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:l}):g);return{top:(_.top-C.top+h.top)/E.y,bottom:(C.bottom-_.bottom+h.bottom)/E.y,left:(_.left-C.left+h.left)/E.x,right:(C.right-_.right+h.right)/E.x}}const ws=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=e,{element:u,padding:m=0}=Ue(t,e)||{};if(u==null)return{};const f=_i(m),d={x:n,y:r},v=yi(o),h=xi(v),p=await a.getDimensions(u),b=v==="y",_=b?"top":"left",g=b?"bottom":"right",y=b?"clientHeight":"clientWidth",E=i.reference[h]+i.reference[v]-d[v]-i.floating[h],C=d[v]-i.reference[v],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let P=A?A[y]:0;(!P||!await(a.isElement==null?void 0:a.isElement(A)))&&(P=s.floating[y]||i.floating[h]);const T=E/2-C/2,w=P/2-p[h]/2-1,c=he(f[_],w),x=he(f[g],w),O=c,M=P-p[h]-x,D=P/2-p[h]/2+T,L=an(O,D,M),B=!l.arrow&&st(o)!=null&&D!==L&&i.reference[h]/2-(D<O?c:x)-p[h]/2<0,j=B?D<O?D-O:D-M:0;return{[v]:d[v]+j,data:{[v]:L,centerOffset:D-L-j,...B&&{alignmentOffset:j}},reset:B}}}),Ss=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...b}=Ue(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const _=me(o),g=me(s)===s,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=d||(g||!p?[Ot(s)]:gs(s));!d&&h!=="none"&&E.push(...ys(s,p,h,y));const C=[s,...E],A=await po(e,b),P=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&P.push(A[_]),f){const O=bs(o,a,y);P.push(A[O[0]],A[O[1]])}if(T=[...T,{placement:o,overflows:P}],!P.every(O=>O<=0)){var w,c;const O=(((w=i.flip)==null?void 0:w.index)||0)+1,M=C[O];if(M)return{data:{index:O,overflows:T},reset:{placement:M}};let D=(c=T.filter(L=>L.overflows[0]<=0).sort((L,B)=>L.overflows[1]-B.overflows[1])[0])==null?void 0:c.placement;if(!D)switch(v){case"bestFit":{var x;const L=(x=T.map(B=>[B.placement,B.overflows.filter(j=>j>0).reduce((j,K)=>j+K,0)]).sort((B,j)=>B[1]-j[1])[0])==null?void 0:x[0];L&&(D=L);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function vo(t){const e=he(...t.map(i=>i.left)),n=he(...t.map(i=>i.top)),r=le(...t.map(i=>i.right)),o=le(...t.map(i=>i.bottom));return{x:e,y:n,width:r-e,height:o-n}}function Os(t){const e=t.slice().sort((o,i)=>o.y-i.y),n=[];let r=null;for(let o=0;o<e.length;o++){const i=e[o];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>Ke(vo(o)))}const Cs=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:o,platform:i,strategy:a}=e,{padding:s=2,x:l,y:u}=Ue(t,e),m=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),f=Os(m),d=Ke(vo(m)),v=_i(s);function h(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&u!=null)return f.find(b=>l>b.left-v.left&&l<b.right+v.right&&u>b.top-v.top&&u<b.bottom+v.bottom)||d;if(f.length>=2){if(lt(n)==="y"){const c=f[0],x=f[f.length-1],O=me(n)==="top",M=c.top,D=x.bottom,L=O?c.left:x.left,B=O?c.right:x.right,j=B-L,K=D-M;return{top:M,bottom:D,left:L,right:B,width:j,height:K,x:L,y:M}}const b=me(n)==="left",_=le(...f.map(c=>c.right)),g=he(...f.map(c=>c.left)),y=f.filter(c=>b?c.left===g:c.right===_),E=y[0].top,C=y[y.length-1].bottom,A=g,P=_,T=P-A,w=C-E;return{top:E,bottom:C,left:A,right:P,width:T,height:w,x:A,y:E}}return d}const p=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:a});return o.reference.x!==p.reference.x||o.reference.y!==p.reference.y||o.reference.width!==p.reference.width||o.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}};async function Ts(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=me(n),s=st(n),l=lt(n)==="y",u=["left","top"].includes(a)?-1:1,m=i&&l?-1:1,f=Ue(e,t);let{mainAxis:d,crossAxis:v,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(v=s==="end"?h*-1:h),l?{x:v*m,y:d*u}:{x:d*u,y:v*m}}const As=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=e,l=await Ts(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Ms=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:_,y:g}=b;return{x:_,y:g}}},...l}=Ue(t,e),u={x:n,y:r},m=await po(e,l),f=lt(me(o)),d=fo(f);let v=u[d],h=u[f];if(i){const b=d==="y"?"top":"left",_=d==="y"?"bottom":"right",g=v+m[b],y=v-m[_];v=an(g,v,y)}if(a){const b=f==="y"?"top":"left",_=f==="y"?"bottom":"right",g=h+m[b],y=h-m[_];h=an(g,h,y)}const p=s.fn({...e,[d]:v,[f]:h});return{...p,data:{x:p.x-n,y:p.y-r}}}}};function Ze(t){return ho(t)?(t.nodeName||"").toLowerCase():"#document"}function ee(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ge(t){var e;return(e=(ho(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ho(t){return t instanceof Node||t instanceof ee(t).Node}function ue(t){return t instanceof Element||t instanceof ee(t).Element}function ce(t){return t instanceof HTMLElement||t instanceof ee(t).HTMLElement}function Ni(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ee(t).ShadowRoot}function ut(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=oe(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Ps(t){return["table","td","th"].includes(Ze(t))}function Ei(t){const e=wi(),n=oe(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Is(t){let e=we(t);for(;ce(e)&&!Ge(e);){if(Ei(e))return e;e=we(e)}return null}function wi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ge(t){return["html","body","#document"].includes(Ze(t))}function oe(t){return ee(t).getComputedStyle(t)}function Rt(t){return ue(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function we(t){if(Ze(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ni(t)&&t.host||ge(t);return Ni(e)?e.host:e}function mo(t){const e=we(t);return Ge(e)?t.ownerDocument?t.ownerDocument.body:t.body:ce(e)&&ut(e)?e:mo(e)}function rt(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=mo(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),a=ee(o);return i?e.concat(a,a.visualViewport||[],ut(o)?o:[],a.frameElement&&n?rt(a.frameElement):[]):e.concat(o,rt(o,[],n))}function bo(t){const e=oe(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=ce(t),i=o?t.offsetWidth:n,a=o?t.offsetHeight:r,s=St(n)!==i||St(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Si(t){return ue(t)?t:t.contextElement}function Ve(t){const e=Si(t);if(!ce(e))return Ee(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=bo(e);let a=(i?St(n.width):n.width)/r,s=(i?St(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const ks=Ee(0);function go(t){const e=ee(t);return!wi()||!e.visualViewport?ks:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ls(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ee(t)?!1:e}function Pe(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=Si(t);let a=Ee(1);e&&(r?ue(r)&&(a=Ve(r)):a=Ve(t));const s=Ls(i,n,r)?go(i):Ee(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,m=o.width/a.x,f=o.height/a.y;if(i){const d=ee(i),v=r&&ue(r)?ee(r):r;let h=d,p=h.frameElement;for(;p&&r&&v!==h;){const b=Ve(p),_=p.getBoundingClientRect(),g=oe(p),y=_.left+(p.clientLeft+parseFloat(g.paddingLeft))*b.x,E=_.top+(p.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,u*=b.y,m*=b.x,f*=b.y,l+=y,u+=E,h=ee(p),p=h.frameElement}}return Ke({width:m,height:f,x:l,y:u})}const Ds=[":popover-open",":modal"];function Oi(t){return Ds.some(e=>{try{return t.matches(e)}catch{return!1}})}function $s(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",a=ge(r),s=e?Oi(e.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Ee(1);const m=Ee(0),f=ce(r);if((f||!f&&!i)&&((Ze(r)!=="body"||ut(a))&&(l=Rt(r)),ce(r))){const d=Pe(r);u=Ve(r),m.x=d.x+r.clientLeft,m.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x,y:n.y*u.y-l.scrollTop*u.y+m.y}}function Rs(t){return Array.from(t.getClientRects())}function xo(t){return Pe(ge(t)).left+Rt(t).scrollLeft}function Fs(t){const e=ge(t),n=Rt(t),r=t.ownerDocument.body,o=le(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=le(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+xo(t);const s=-n.scrollTop;return oe(r).direction==="rtl"&&(a+=le(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Ns(t,e){const n=ee(t),r=ge(t),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=wi();(!u||u&&e==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function qs(t,e){const n=Pe(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=ce(t)?Ve(t):Ee(1),a=t.clientWidth*i.x,s=t.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function qi(t,e,n){let r;if(e==="viewport")r=Ns(t,n);else if(e==="document")r=Fs(ge(t));else if(ue(e))r=qs(e,n);else{const o=go(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return Ke(r)}function yo(t,e){const n=we(t);return n===e||!ue(n)||Ge(n)?!1:oe(n).position==="fixed"||yo(n,e)}function Hs(t,e){const n=e.get(t);if(n)return n;let r=rt(t,[],!1).filter(s=>ue(s)&&Ze(s)!=="body"),o=null;const i=oe(t).position==="fixed";let a=i?we(t):t;for(;ue(a)&&!Ge(a);){const s=oe(a),l=Ei(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ut(a)&&!l&&yo(t,a))?r=r.filter(m=>m!==a):o=s,a=we(a)}return e.set(t,r),r}function Bs(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const a=[...n==="clippingAncestors"?Oi(e)?[]:Hs(e,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,m)=>{const f=qi(e,m,o);return u.top=le(f.top,u.top),u.right=he(f.right,u.right),u.bottom=he(f.bottom,u.bottom),u.left=le(f.left,u.left),u},qi(e,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ws(t){const{width:e,height:n}=bo(t);return{width:e,height:n}}function js(t,e,n){const r=ce(e),o=ge(e),i=n==="fixed",a=Pe(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=Ee(0);if(r||!r&&!i)if((Ze(e)!=="body"||ut(o))&&(s=Rt(e)),r){const f=Pe(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=xo(o));const u=a.left+s.scrollLeft-l.x,m=a.top+s.scrollTop-l.y;return{x:u,y:m,width:a.width,height:a.height}}function Zt(t){return oe(t).position==="static"}function Hi(t,e){return!ce(t)||oe(t).position==="fixed"?null:e?e(t):t.offsetParent}function _o(t,e){const n=ee(t);if(Oi(t))return n;if(!ce(t)){let o=we(t);for(;o&&!Ge(o);){if(ue(o)&&!Zt(o))return o;o=we(o)}return n}let r=Hi(t,e);for(;r&&Ps(r)&&Zt(r);)r=Hi(r,e);return r&&Ge(r)&&Zt(r)&&!Ei(r)?n:r||Is(t)||n}const Vs=async function(t){const e=this.getOffsetParent||_o,n=this.getDimensions,r=await n(t.floating);return{reference:js(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zs(t){return oe(t).direction==="rtl"}const Ks={convertOffsetParentRelativeRectToViewportRelativeRect:$s,getDocumentElement:ge,getClippingRect:Bs,getOffsetParent:_o,getElementRects:Vs,getClientRects:Rs,getDimensions:Ws,getScale:Ve,isElement:ue,isRTL:zs};function Gs(t,e){let n=null,r;const o=ge(t);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:u,top:m,width:f,height:d}=t.getBoundingClientRect();if(s||e(),!f||!d)return;const v=dt(m),h=dt(o.clientWidth-(u+f)),p=dt(o.clientHeight-(m+d)),b=dt(u),g={rootMargin:-v+"px "+-h+"px "+-p+"px "+-b+"px",threshold:le(0,he(1,l))||1};let y=!0;function E(C){const A=C[0].intersectionRatio;if(A!==l){if(!y)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(E,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,g)}n.observe(t)}return a(!0),i}function Us(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Si(t),m=o||i?[...u?rt(u):[],...rt(e)]:[];m.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),i&&_.addEventListener("resize",n)});const f=u&&s?Gs(u,n):null;let d=-1,v=null;a&&(v=new ResizeObserver(_=>{let[g]=_;g&&g.target===u&&v&&(v.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(e)})),n()}),u&&!l&&v.observe(u),v.observe(e));let h,p=l?Pe(t):null;l&&b();function b(){const _=Pe(t);p&&(_.x!==p.x||_.y!==p.y||_.width!==p.width||_.height!==p.height)&&n(),p=_,h=requestAnimationFrame(b)}return n(),()=>{var _;m.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),f==null||f(),(_=v)==null||_.disconnect(),v=null,l&&cancelAnimationFrame(h)}}const Zs=As,Xs=Ms,Js=Ss,Ys=ws,Qs=Cs,el=(t,e,n)=>{const r=new Map,o={platform:Ks,...n},i={...o.platform,_c:r};return Es(t,e,{...o,platform:i})},Eo={strategy:"absolute",placement:"bottom",inline:!1,offset:{mainAxis:16},shift:!0,flip:!0,arrow:!0};function Ci(t,e){const n=Object.assign({},Eo,e),{placement:r,strategy:o}=n,{trigger:i,content:a,contentArrow:s}=t;return Us(i,a,()=>{el(i,a,{placement:r,strategy:o,middleware:[...Qe(Qs,n.inline),...Qe(Zs,n.offset),...Qe(Js,n.flip),...Qe(Xs,n.shift),...Qe(Ys,s&&n.arrow,{element:s})]}).then(l=>{const{x:u,y:m,middlewareData:f,placement:d}=l,v=f.arrow;Object.assign(a.style,{left:`${u}px`,top:`${m}px`}),a.setAttribute("data-placement",d),v&&Object.assign(s.style,{left:(v==null?void 0:v.x)!=null?`${v.x}px`:"",top:(v==null?void 0:v.y)!=null?`${v.y}px`:""})})})}function Qe(t,e,n={}){return e?typeof e=="object"?[t({...e,...n})]:[t(n)]:[]}const tl=Object.freeze(Object.defineProperty({__proto__:null,createFloatingUi:Ci,defaults:Eo},Symbol.toStringTag,{value:"Module"})),ln=new WeakMap,wo=(...t)=>console.error("@ulu (popovers):",...t),So={trigger:"data-ulu-popover-trigger",content:"data-ulu-popover-content",arrow:"data-ulu-popover-arrow",anchor:"data-ulu-popover-trigger-anchor"},Ct=t=>`[${So[t]}]`,nl={clickOutsideCloses:!0,escapeCloses:!0};function rl(){document.addEventListener(W("pageModified"),un),un()}function un(){const t=document.querySelectorAll(Ct("trigger"));Array.from(t).filter(n=>!ln.has(n)).map(Oo).filter(n=>n).forEach(({elements:n,options:r,floatingOptions:o})=>{ln.set(n.trigger,new To(n,r,o))})}function Oo(t){const e=t.dataset.uluPopoverTrigger,n=e!=null&&e.length?JSON.parse(e):{},r=Co(t),o={trigger:t,content:r,anchor:t.querySelector(Ct("anchor"))||t,contentArrow:r.querySelector(Ct("arrow"))},i=n.floating||{};return delete n.floating,r?{elements:o,options:n,floatingOptions:i}:(wo("Unable to make popover for",t),!1)}function Co(t){var r;let e;const n=t.getAttribute("aria-controls");if(n)e=document.getElementById(n);else if((r=t==null?void 0:t.nextElementSibling)!=null&&r.hasAttribute(So.content))e=t.nextElementSibling;else{const o=Array.from(t.parentNode.children),i=o.findIndex(s=>s===t);e=o.slice(i).find(s=>s.matches(Ct("content")))}return e||wo("Unable to resolve 'content' element for popover",t),e}class To extends yt{constructor(e,n,r){const o=Object.assign({},nl,n);super(e,o),this.floatingOptions=r||{}}setState(e,n){super.setState(e,n),this.destroyFloatingInstance(),e&&this.createFloatingInstance()}destroy(){super.destroy(),this.destroyFloatingInstance()}createFloatingInstance(){const{content:e,anchor:n,contentArrow:r}=this.elements,o={trigger:n,contentArrow:r,content:e};this.floatingCleanup=Ci(o,this.floatingOptions)}destroyFloatingInstance(){this.floatingCleanup&&(this.floatingCleanup(),this.floatingCleanup=null)}}const il=Object.freeze(Object.defineProperty({__proto__:null,Popover:To,getContentByTrigger:Co,init:rl,instances:ln,resolve:Oo,setup:un},Symbol.toStringTag,{value:"Module"})),Ti={trigger:"data-ulu-tooltip",init:"data-ulu-init",body:"data-ulu-tooltip-display-body",arrow:"data-ulu-tooltip-arrow"},cn=t=>`[${Ti[t]}]`,ol=t=>`${cn(t)}:not([${Ti.init}])`;function al(){document.addEventListener(W("pageModified"),fn),fn()}function fn(){document.querySelectorAll(ol("trigger")).forEach(Ao)}function Ao(t){const e=be(t,"uluTooltip"),n=typeof e=="object"?e:{};return typeof e=="string"&&(n.content=e),new Tt({trigger:t},n)}const We=class We{constructor(e,n,r){const{trigger:o}=e;if(!o){te(this,"missing required trigger");return}this.options=Object.assign({},We.defaults,n),this.floatingOptions=Object.assign({},We.defaultFloatingOptions,r),this.elements={...e},this.handlers={},this.isOpen=!1,xt(o),this.setup()}setup(){this.createContentElement(),this.attachHandlers(),this.setupAccessibility()}setupAccessibility(){const{trigger:e,content:n}=this.elements,{accessible:r}=this.options;r&&e.setAttribute("aria-describedby",n.id)}destroy(){this.destroyHandlers(),this.destroyDisplay()}getInnerContent(){const{fromElement:e,content:n,isHtml:r,fromAnchor:o}=this.options;if(n)return n;if(e||o){const i=o?this.getAnchorElement():document.querySelector(e);return i?r?i.innerHTML:i.innerText:""}else te(this,"Could not resolve inner content")}getAnchorElement(){const{trigger:e}=this.elements,{href:n}=e,r=n?n.split("#")[1]:null,o=r?document.getElementById(r):null;return o||console.error("Unable to get 'fromAnchor' element",e),o}createContentElement(){const{options:e}=this,n=Ji(e.template(e)),r=n.querySelector(cn("body")),o=this.getInnerContent();e.isHtml?r.innerHTML=o:r.textContent=o,n.id=vi(),e.contentClass&&n.classList.add(e.contentClass),this.elements.content=n,this.elements.contentArrow=n.querySelector(cn("arrow")),document.body.appendChild(n)}attachHandlers(){const{trigger:e}=this.elements,{showEvents:n,hideEvents:r,delay:o}=this.options;let i=null;const a=u=>{i||(i=setTimeout(()=>{this.show(u),clearTimeout(i)},o))},s=u=>{i&&(clearTimeout(i),i=null),this.hide(u)},l=u=>{u.key==="Escape"&&this.hide(u)};n.forEach(u=>{e.addEventListener(u,a)}),r.forEach(u=>{e.addEventListener(u,s)}),document.addEventListener("keydown",l),this.handlers={onShow:a,onHide:s,onDocumentKeydown:l}}destroyHandlers(){const{trigger:e}=this,{onShow:n,onHide:r,onDocumentKeydown:o}=this.handlers,{showEvents:i,hideEvents:a}=this.options;n&&i.forEach(s=>{e.removeEventListener(s,n)}),r&&a.forEach(s=>{e.removeEventListener(s,r)}),o&&document.removeEventListener("keydown",o)}setState(e,n){const r={instance:this,isOpen:e,event:n},{trigger:o,content:i}=this.elements,{openClass:a}=this.options,s=l=>l.classList[e?"add":"remove"](a);s(o),s(i),this.isOpen=e,this.options.onChange(r),o.dispatchEvent(this.createEvent("change",r)),this.destroyFloatingInstance(),e&&this.createFloatingInstance()}createEvent(e,n){return new CustomEvent(W("tooltip:"+e),{detail:n})}createFloatingInstance(){this.floatingCleanup=Ci(this.elements,this.floatingOptions)}destroyFloatingInstance(){this.floatingCleanup&&(this.floatingCleanup(),this.floatingCleanup=null)}show(e){this.setState(!0,e)}hide(e){this.setState(!1,e)}};Y(We,"defaults",{accessible:!0,content:null,openClass:"is-active",contentClass:"",isHtml:!1,fromElement:null,fromAnchor:!1,endOfDocument:!0,showEvents:["pointerenter","focus"],hideEvents:["pointerleave","blur"],delay:500,template(e){return`
|
|
38
|
+
`}onScroll(e){this.hasOverflow&&this.onScrollHorizontal()}onScrollHorizontal(){const{nextEnabled:e,previousEnabled:n}=this,{track:r}=this.elements,{offsetStart:o,offsetEnd:i}=this.options,{scrollWidth:a,clientWidth:s,scrollLeft:l}=r,u=l<=o,m=a-l-i<=s;u&&n?this.setControlState("previous",!1):!u&&!n&&this.setControlState("previous",!0),m&&e?this.setControlState("next",!1):!m&&!e&&this.setControlState("next",!0)}setControlState(e,n){const r=e==="next",{next:o,nextItem:i,previous:a,previousItem:s}=this.elements,l=r?i:s,u=r?o:a,m=n?"remove":"add";l.classList[m](this.getClass("controls-item--disabled")),u.classList[n?"remove":"add"](this.getClass("control--disabled")),n?u.removeAttribute("disabled"):u.setAttribute("disabled",""),this[r?"nextEnabled":"previousEnabled"]=n}resolveAmount(e){const n=e==="next",{amount:r}=this.options,{scrollLeft:o,offsetWidth:i}=this.elements.track;return r==="auto"?n?o+i:o-i:typeof r=="function"?r(this,e):typeof r=="number"?n?o+r:o-r:(te("Unable to resolve amount for scroll"),500)}next(){this.elements.track.scrollTo({top:0,left:this.resolveAmount("next"),behavior:"smooth"})}previous(){this.elements.track.scrollTo({top:0,left:this.resolveAmount("previous"),behavior:"smooth"})}getClass(e){const{namespace:n}=this.options;return`${n}__${e}`}};Y(et,"instances",[]),Y(et,"defaults",{namespace:"OverflowScroller",events:{},horizontal:!0,offsetStart:100,offsetEnd:100,amount:"auto",buttonClasses:["button","button--icon"],iconClassPrevious:Me("iconClassPrevious"),iconClassNext:Me("iconClassNext")});let wt=et;const vs=Object.freeze(Object.defineProperty({__proto__:null,OverflowScroller:wt},Symbol.toStringTag,{value:"Module"})),he=Math.min,le=Math.max,St=Math.round,dt=Math.floor,Ee=t=>({x:t,y:t}),hs={left:"right",right:"left",bottom:"top",top:"bottom"},ms={start:"end",end:"start"};function an(t,e,n){return le(t,he(e,n))}function Ue(t,e){return typeof t=="function"?t(e):t}function me(t){return t.split("-")[0]}function st(t){return t.split("-")[1]}function fo(t){return t==="x"?"y":"x"}function xi(t){return t==="y"?"height":"width"}function lt(t){return["top","bottom"].includes(me(t))?"y":"x"}function yi(t){return fo(lt(t))}function bs(t,e,n){n===void 0&&(n=!1);const r=st(t),o=yi(t),i=xi(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Ot(a)),[a,Ot(a)]}function gs(t){const e=Ot(t);return[sn(t),e,sn(e)]}function sn(t){return t.replace(/start|end/g,e=>ms[e])}function xs(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:a;default:return[]}}function ys(t,e,n,r){const o=st(t);let i=xs(me(t),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),e&&(i=i.concat(i.map(sn)))),i}function Ot(t){return t.replace(/left|right|bottom|top/g,e=>hs[e])}function _s(t){return{top:0,right:0,bottom:0,left:0,...t}}function _i(t){return typeof t!="number"?_s(t):{top:t,right:t,bottom:t,left:t}}function Ke(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function Fi(t,e,n){let{reference:r,floating:o}=t;const i=lt(e),a=yi(e),s=xi(a),l=me(e),u=i==="y",m=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2;let v;switch(l){case"top":v={x:m,y:r.y-o.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-o.width,y:f};break;default:v={x:r.x,y:r.y}}switch(st(e)){case"start":v[a]-=d*(n&&u?-1:1);break;case"end":v[a]+=d*(n&&u?-1:1);break}return v}const Es=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:m,y:f}=Fi(u,r,l),d=r,v={},h=0;for(let p=0;p<s.length;p++){const{name:b,fn:_}=s[p],{x:g,y,data:E,reset:C}=await _({x:m,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:t,floating:e}});m=g??m,f=y??f,v={...v,[b]:{...v[b],...E}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:o}):C.rects),{x:m,y:f}=Fi(u,d,l)),p=-1)}return{x:m,y:f,placement:d,strategy:o,middlewareData:v}};async function po(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:d=!1,padding:v=0}=Ue(e,t),h=_i(v),b=s[d?f==="floating"?"reference":"floating":f],_=Ke(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:m,strategy:l})),g=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Ke(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:l}):g);return{top:(_.top-C.top+h.top)/E.y,bottom:(C.bottom-_.bottom+h.bottom)/E.y,left:(_.left-C.left+h.left)/E.x,right:(C.right-_.right+h.right)/E.x}}const ws=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=e,{element:u,padding:m=0}=Ue(t,e)||{};if(u==null)return{};const f=_i(m),d={x:n,y:r},v=yi(o),h=xi(v),p=await a.getDimensions(u),b=v==="y",_=b?"top":"left",g=b?"bottom":"right",y=b?"clientHeight":"clientWidth",E=i.reference[h]+i.reference[v]-d[v]-i.floating[h],C=d[v]-i.reference[v],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let P=A?A[y]:0;(!P||!await(a.isElement==null?void 0:a.isElement(A)))&&(P=s.floating[y]||i.floating[h]);const T=E/2-C/2,w=P/2-p[h]/2-1,c=he(f[_],w),x=he(f[g],w),O=c,M=P-p[h]-x,D=P/2-p[h]/2+T,L=an(O,D,M),B=!l.arrow&&st(o)!=null&&D!==L&&i.reference[h]/2-(D<O?c:x)-p[h]/2<0,j=B?D<O?D-O:D-M:0;return{[v]:d[v]+j,data:{[v]:L,centerOffset:D-L-j,...B&&{alignmentOffset:j}},reset:B}}}),Ss=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...b}=Ue(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const _=me(o),g=me(s)===s,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=d||(g||!p?[Ot(s)]:gs(s));!d&&h!=="none"&&E.push(...ys(s,p,h,y));const C=[s,...E],A=await po(e,b),P=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&P.push(A[_]),f){const O=bs(o,a,y);P.push(A[O[0]],A[O[1]])}if(T=[...T,{placement:o,overflows:P}],!P.every(O=>O<=0)){var w,c;const O=(((w=i.flip)==null?void 0:w.index)||0)+1,M=C[O];if(M)return{data:{index:O,overflows:T},reset:{placement:M}};let D=(c=T.filter(L=>L.overflows[0]<=0).sort((L,B)=>L.overflows[1]-B.overflows[1])[0])==null?void 0:c.placement;if(!D)switch(v){case"bestFit":{var x;const L=(x=T.map(B=>[B.placement,B.overflows.filter(j=>j>0).reduce((j,K)=>j+K,0)]).sort((B,j)=>B[1]-j[1])[0])==null?void 0:x[0];L&&(D=L);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function vo(t){const e=he(...t.map(i=>i.left)),n=he(...t.map(i=>i.top)),r=le(...t.map(i=>i.right)),o=le(...t.map(i=>i.bottom));return{x:e,y:n,width:r-e,height:o-n}}function Os(t){const e=t.slice().sort((o,i)=>o.y-i.y),n=[];let r=null;for(let o=0;o<e.length;o++){const i=e[o];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>Ke(vo(o)))}const Cs=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:o,platform:i,strategy:a}=e,{padding:s=2,x:l,y:u}=Ue(t,e),m=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),f=Os(m),d=Ke(vo(m)),v=_i(s);function h(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&u!=null)return f.find(b=>l>b.left-v.left&&l<b.right+v.right&&u>b.top-v.top&&u<b.bottom+v.bottom)||d;if(f.length>=2){if(lt(n)==="y"){const c=f[0],x=f[f.length-1],O=me(n)==="top",M=c.top,D=x.bottom,L=O?c.left:x.left,B=O?c.right:x.right,j=B-L,K=D-M;return{top:M,bottom:D,left:L,right:B,width:j,height:K,x:L,y:M}}const b=me(n)==="left",_=le(...f.map(c=>c.right)),g=he(...f.map(c=>c.left)),y=f.filter(c=>b?c.left===g:c.right===_),E=y[0].top,C=y[y.length-1].bottom,A=g,P=_,T=P-A,w=C-E;return{top:E,bottom:C,left:A,right:P,width:T,height:w,x:A,y:E}}return d}const p=await i.getElementRects({reference:{getBoundingClientRect:h},floating:r.floating,strategy:a});return o.reference.x!==p.reference.x||o.reference.y!==p.reference.y||o.reference.width!==p.reference.width||o.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}};async function Ts(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=me(n),s=st(n),l=lt(n)==="y",u=["left","top"].includes(a)?-1:1,m=i&&l?-1:1,f=Ue(e,t);let{mainAxis:d,crossAxis:v,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(v=s==="end"?h*-1:h),l?{x:v*m,y:d*u}:{x:d*u,y:v*m}}const As=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=e,l=await Ts(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Ms=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:_,y:g}=b;return{x:_,y:g}}},...l}=Ue(t,e),u={x:n,y:r},m=await po(e,l),f=lt(me(o)),d=fo(f);let v=u[d],h=u[f];if(i){const b=d==="y"?"top":"left",_=d==="y"?"bottom":"right",g=v+m[b],y=v-m[_];v=an(g,v,y)}if(a){const b=f==="y"?"top":"left",_=f==="y"?"bottom":"right",g=h+m[b],y=h-m[_];h=an(g,h,y)}const p=s.fn({...e,[d]:v,[f]:h});return{...p,data:{x:p.x-n,y:p.y-r}}}}};function Ze(t){return ho(t)?(t.nodeName||"").toLowerCase():"#document"}function ee(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ge(t){var e;return(e=(ho(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ho(t){return t instanceof Node||t instanceof ee(t).Node}function ue(t){return t instanceof Element||t instanceof ee(t).Element}function ce(t){return t instanceof HTMLElement||t instanceof ee(t).HTMLElement}function Ni(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ee(t).ShadowRoot}function ut(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=oe(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Ps(t){return["table","td","th"].includes(Ze(t))}function Ei(t){const e=wi(),n=oe(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Is(t){let e=we(t);for(;ce(e)&&!Ge(e);){if(Ei(e))return e;e=we(e)}return null}function wi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ge(t){return["html","body","#document"].includes(Ze(t))}function oe(t){return ee(t).getComputedStyle(t)}function Rt(t){return ue(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function we(t){if(Ze(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ni(t)&&t.host||ge(t);return Ni(e)?e.host:e}function mo(t){const e=we(t);return Ge(e)?t.ownerDocument?t.ownerDocument.body:t.body:ce(e)&&ut(e)?e:mo(e)}function rt(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=mo(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),a=ee(o);return i?e.concat(a,a.visualViewport||[],ut(o)?o:[],a.frameElement&&n?rt(a.frameElement):[]):e.concat(o,rt(o,[],n))}function bo(t){const e=oe(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=ce(t),i=o?t.offsetWidth:n,a=o?t.offsetHeight:r,s=St(n)!==i||St(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Si(t){return ue(t)?t:t.contextElement}function Ve(t){const e=Si(t);if(!ce(e))return Ee(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=bo(e);let a=(i?St(n.width):n.width)/r,s=(i?St(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const ks=Ee(0);function go(t){const e=ee(t);return!wi()||!e.visualViewport?ks:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ls(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ee(t)?!1:e}function Pe(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=Si(t);let a=Ee(1);e&&(r?ue(r)&&(a=Ve(r)):a=Ve(t));const s=Ls(i,n,r)?go(i):Ee(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,m=o.width/a.x,f=o.height/a.y;if(i){const d=ee(i),v=r&&ue(r)?ee(r):r;let h=d,p=h.frameElement;for(;p&&r&&v!==h;){const b=Ve(p),_=p.getBoundingClientRect(),g=oe(p),y=_.left+(p.clientLeft+parseFloat(g.paddingLeft))*b.x,E=_.top+(p.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,u*=b.y,m*=b.x,f*=b.y,l+=y,u+=E,h=ee(p),p=h.frameElement}}return Ke({width:m,height:f,x:l,y:u})}const Ds=[":popover-open",":modal"];function Oi(t){return Ds.some(e=>{try{return t.matches(e)}catch{return!1}})}function $s(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",a=ge(r),s=e?Oi(e.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Ee(1);const m=Ee(0),f=ce(r);if((f||!f&&!i)&&((Ze(r)!=="body"||ut(a))&&(l=Rt(r)),ce(r))){const d=Pe(r);u=Ve(r),m.x=d.x+r.clientLeft,m.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x,y:n.y*u.y-l.scrollTop*u.y+m.y}}function Rs(t){return Array.from(t.getClientRects())}function xo(t){return Pe(ge(t)).left+Rt(t).scrollLeft}function Fs(t){const e=ge(t),n=Rt(t),r=t.ownerDocument.body,o=le(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=le(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+xo(t);const s=-n.scrollTop;return oe(r).direction==="rtl"&&(a+=le(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Ns(t,e){const n=ee(t),r=ge(t),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=wi();(!u||u&&e==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function qs(t,e){const n=Pe(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=ce(t)?Ve(t):Ee(1),a=t.clientWidth*i.x,s=t.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function qi(t,e,n){let r;if(e==="viewport")r=Ns(t,n);else if(e==="document")r=Fs(ge(t));else if(ue(e))r=qs(e,n);else{const o=go(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return Ke(r)}function yo(t,e){const n=we(t);return n===e||!ue(n)||Ge(n)?!1:oe(n).position==="fixed"||yo(n,e)}function Hs(t,e){const n=e.get(t);if(n)return n;let r=rt(t,[],!1).filter(s=>ue(s)&&Ze(s)!=="body"),o=null;const i=oe(t).position==="fixed";let a=i?we(t):t;for(;ue(a)&&!Ge(a);){const s=oe(a),l=Ei(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ut(a)&&!l&&yo(t,a))?r=r.filter(m=>m!==a):o=s,a=we(a)}return e.set(t,r),r}function Bs(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const a=[...n==="clippingAncestors"?Oi(e)?[]:Hs(e,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,m)=>{const f=qi(e,m,o);return u.top=le(f.top,u.top),u.right=he(f.right,u.right),u.bottom=he(f.bottom,u.bottom),u.left=le(f.left,u.left),u},qi(e,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ws(t){const{width:e,height:n}=bo(t);return{width:e,height:n}}function js(t,e,n){const r=ce(e),o=ge(e),i=n==="fixed",a=Pe(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=Ee(0);if(r||!r&&!i)if((Ze(e)!=="body"||ut(o))&&(s=Rt(e)),r){const f=Pe(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=xo(o));const u=a.left+s.scrollLeft-l.x,m=a.top+s.scrollTop-l.y;return{x:u,y:m,width:a.width,height:a.height}}function Zt(t){return oe(t).position==="static"}function Hi(t,e){return!ce(t)||oe(t).position==="fixed"?null:e?e(t):t.offsetParent}function _o(t,e){const n=ee(t);if(Oi(t))return n;if(!ce(t)){let o=we(t);for(;o&&!Ge(o);){if(ue(o)&&!Zt(o))return o;o=we(o)}return n}let r=Hi(t,e);for(;r&&Ps(r)&&Zt(r);)r=Hi(r,e);return r&&Ge(r)&&Zt(r)&&!Ei(r)?n:r||Is(t)||n}const Vs=async function(t){const e=this.getOffsetParent||_o,n=this.getDimensions,r=await n(t.floating);return{reference:js(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zs(t){return oe(t).direction==="rtl"}const Ks={convertOffsetParentRelativeRectToViewportRelativeRect:$s,getDocumentElement:ge,getClippingRect:Bs,getOffsetParent:_o,getElementRects:Vs,getClientRects:Rs,getDimensions:Ws,getScale:Ve,isElement:ue,isRTL:zs};function Gs(t,e){let n=null,r;const o=ge(t);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:u,top:m,width:f,height:d}=t.getBoundingClientRect();if(s||e(),!f||!d)return;const v=dt(m),h=dt(o.clientWidth-(u+f)),p=dt(o.clientHeight-(m+d)),b=dt(u),g={rootMargin:-v+"px "+-h+"px "+-p+"px "+-b+"px",threshold:le(0,he(1,l))||1};let y=!0;function E(C){const A=C[0].intersectionRatio;if(A!==l){if(!y)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(E,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,g)}n.observe(t)}return a(!0),i}function Us(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Si(t),m=o||i?[...u?rt(u):[],...rt(e)]:[];m.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),i&&_.addEventListener("resize",n)});const f=u&&s?Gs(u,n):null;let d=-1,v=null;a&&(v=new ResizeObserver(_=>{let[g]=_;g&&g.target===u&&v&&(v.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(e)})),n()}),u&&!l&&v.observe(u),v.observe(e));let h,p=l?Pe(t):null;l&&b();function b(){const _=Pe(t);p&&(_.x!==p.x||_.y!==p.y||_.width!==p.width||_.height!==p.height)&&n(),p=_,h=requestAnimationFrame(b)}return n(),()=>{var _;m.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),f==null||f(),(_=v)==null||_.disconnect(),v=null,l&&cancelAnimationFrame(h)}}const Zs=As,Xs=Ms,Js=Ss,Ys=ws,Qs=Cs,el=(t,e,n)=>{const r=new Map,o={platform:Ks,...n},i={...o.platform,_c:r};return Es(t,e,{...o,platform:i})},Eo={strategy:"absolute",placement:"bottom",inline:!1,offset:{mainAxis:16},shift:!0,flip:!0,arrow:!0};function Ci(t,e){const n=Object.assign({},Eo,e),{placement:r,strategy:o}=n,{trigger:i,content:a,contentArrow:s}=t;return Us(i,a,()=>{el(i,a,{placement:r,strategy:o,middleware:[...Qe(Qs,n.inline),...Qe(Zs,n.offset),...Qe(Js,n.flip),...Qe(Xs,n.shift),...Qe(Ys,s&&n.arrow,{element:s})]}).then(l=>{const{x:u,y:m,middlewareData:f,placement:d}=l,v=f.arrow;Object.assign(a.style,{left:`${u}px`,top:`${m}px`}),a.setAttribute("data-placement",d),v&&Object.assign(s.style,{left:(v==null?void 0:v.x)!=null?`${v.x}px`:"",top:(v==null?void 0:v.y)!=null?`${v.y}px`:""})})})}function Qe(t,e,n={}){return e?typeof e=="object"?[t({...e,...n})]:[t(n)]:[]}const tl=Object.freeze(Object.defineProperty({__proto__:null,createFloatingUi:Ci,defaults:Eo},Symbol.toStringTag,{value:"Module"})),ln=new WeakMap,wo=(...t)=>console.error("@ulu (popovers):",...t),So={trigger:"data-ulu-popover-trigger",content:"data-ulu-popover-content",arrow:"data-ulu-popover-arrow",anchor:"data-ulu-popover-trigger-anchor"},Ct=t=>`[${So[t]}]`,nl={clickOutsideCloses:!0,escapeCloses:!0};function rl(){document.addEventListener(W("pageModified"),un),un()}function un(){const t=document.querySelectorAll(Ct("trigger"));Array.from(t).filter(n=>!ln.has(n)).map(Oo).filter(n=>n).forEach(({elements:n,options:r,floatingOptions:o})=>{ln.set(n.trigger,new To(n,r,o))})}function Oo(t){const e=t.dataset.uluPopoverTrigger,n=e!=null&&e.length?JSON.parse(e):{},r=Co(t),o={trigger:t,content:r,anchor:t.querySelector(Ct("anchor"))||t,contentArrow:r.querySelector(Ct("arrow"))},i=n.floating||{};return delete n.floating,r?{elements:o,options:n,floatingOptions:i}:(wo("Unable to make popover for",t),!1)}function Co(t){var r;let e;const n=t.getAttribute("aria-controls");if(n)e=document.getElementById(n);else if((r=t==null?void 0:t.nextElementSibling)!=null&&r.hasAttribute(So.content))e=t.nextElementSibling;else{const o=Array.from(t.parentNode.children),i=o.findIndex(s=>s===t);e=o.slice(i).find(s=>s.matches(Ct("content")))}return e||wo("Unable to resolve 'content' element for popover",t),e}class To extends yt{constructor(e,n,r){const o=Object.assign({},nl,n);super(e,o),this.floatingOptions=r||{}}setState(e,n){super.setState(e,n),this.destroyFloatingInstance(),e&&this.createFloatingInstance()}destroy(){super.destroy(),this.destroyFloatingInstance()}createFloatingInstance(){const{content:e,anchor:n,contentArrow:r}=this.elements,o={trigger:n,contentArrow:r,content:e};console.log(`this.floatingOptions:
|
|
39
|
+
`,this.floatingOptions),this.floatingCleanup=Ci(o,this.floatingOptions)}destroyFloatingInstance(){this.floatingCleanup&&(this.floatingCleanup(),this.floatingCleanup=null)}}const il=Object.freeze(Object.defineProperty({__proto__:null,Popover:To,getContentByTrigger:Co,init:rl,instances:ln,resolve:Oo,setup:un},Symbol.toStringTag,{value:"Module"})),Ti={trigger:"data-ulu-tooltip",init:"data-ulu-init",body:"data-ulu-tooltip-display-body",arrow:"data-ulu-tooltip-arrow"},cn=t=>`[${Ti[t]}]`,ol=t=>`${cn(t)}:not([${Ti.init}])`;function al(){document.addEventListener(W("pageModified"),fn),fn()}function fn(){document.querySelectorAll(ol("trigger")).forEach(Ao)}function Ao(t){const e=be(t,"uluTooltip"),n=typeof e=="object"?e:{};return typeof e=="string"&&(n.content=e),new Tt({trigger:t},n)}const We=class We{constructor(e,n,r){const{trigger:o}=e;if(!o){te(this,"missing required trigger");return}this.options=Object.assign({},We.defaults,n),this.floatingOptions=Object.assign({},We.defaultFloatingOptions,r),this.elements={...e},this.handlers={},this.isOpen=!1,xt(o),this.setup()}setup(){this.createContentElement(),this.attachHandlers(),this.setupAccessibility()}setupAccessibility(){const{trigger:e,content:n}=this.elements,{accessible:r}=this.options;r&&e.setAttribute("aria-describedby",n.id)}destroy(){this.destroyHandlers(),this.destroyDisplay()}getInnerContent(){const{fromElement:e,content:n,isHtml:r,fromAnchor:o}=this.options;if(n)return n;if(e||o){const i=o?this.getAnchorElement():document.querySelector(e);return i?r?i.innerHTML:i.innerText:""}else te(this,"Could not resolve inner content")}getAnchorElement(){const{trigger:e}=this.elements,{href:n}=e,r=n?n.split("#")[1]:null,o=r?document.getElementById(r):null;return o||console.error("Unable to get 'fromAnchor' element",e),o}createContentElement(){const{options:e}=this,n=Ji(e.template(e)),r=n.querySelector(cn("body")),o=this.getInnerContent();e.isHtml?r.innerHTML=o:r.textContent=o,n.id=vi(),e.contentClass&&n.classList.add(e.contentClass),this.elements.content=n,this.elements.contentArrow=n.querySelector(cn("arrow")),document.body.appendChild(n)}attachHandlers(){const{trigger:e}=this.elements,{showEvents:n,hideEvents:r,delay:o}=this.options;let i=null;const a=u=>{i||(i=setTimeout(()=>{this.show(u),clearTimeout(i)},o))},s=u=>{i&&(clearTimeout(i),i=null),this.hide(u)},l=u=>{u.key==="Escape"&&this.hide(u)};n.forEach(u=>{e.addEventListener(u,a)}),r.forEach(u=>{e.addEventListener(u,s)}),document.addEventListener("keydown",l),this.handlers={onShow:a,onHide:s,onDocumentKeydown:l}}destroyHandlers(){const{trigger:e}=this,{onShow:n,onHide:r,onDocumentKeydown:o}=this.handlers,{showEvents:i,hideEvents:a}=this.options;n&&i.forEach(s=>{e.removeEventListener(s,n)}),r&&a.forEach(s=>{e.removeEventListener(s,r)}),o&&document.removeEventListener("keydown",o)}setState(e,n){const r={instance:this,isOpen:e,event:n},{trigger:o,content:i}=this.elements,{openClass:a}=this.options,s=l=>l.classList[e?"add":"remove"](a);s(o),s(i),this.isOpen=e,this.options.onChange(r),o.dispatchEvent(this.createEvent("change",r)),this.destroyFloatingInstance(),e&&this.createFloatingInstance()}createEvent(e,n){return new CustomEvent(W("tooltip:"+e),{detail:n})}createFloatingInstance(){this.floatingCleanup=Ci(this.elements,this.floatingOptions)}destroyFloatingInstance(){this.floatingCleanup&&(this.floatingCleanup(),this.floatingCleanup=null)}show(e){this.setState(!0,e)}hide(e){this.setState(!1,e)}};Y(We,"defaults",{accessible:!0,content:null,openClass:"is-active",contentClass:"",isHtml:!1,fromElement:null,fromAnchor:!1,endOfDocument:!0,showEvents:["pointerenter","focus"],hideEvents:["pointerleave","blur"],delay:500,template(e){return`
|
|
39
40
|
<div class="popover popover--tooltip">
|
|
40
41
|
<div class="popover__inner" ${Ti.body}>
|
|
41
42
|
</div>
|
|
@@ -5016,6 +5016,9 @@
|
|
|
5016
5016
|
<div class="toc">
|
|
5017
5017
|
<ol>
|
|
5018
5018
|
|
|
5019
|
+
<li><a href="#version-0.1.0-beta.26">Version 0.1.0-beta.26</a>
|
|
5020
|
+
</li>
|
|
5021
|
+
|
|
5019
5022
|
<li><a href="#version-0.1.0-beta.25">Version 0.1.0-beta.25</a>
|
|
5020
5023
|
</li>
|
|
5021
5024
|
|
|
@@ -5148,11 +5151,29 @@
|
|
|
5148
5151
|
|
|
5149
5152
|
<div class="changelog">
|
|
5150
5153
|
<h1 id="change-log" tabindex="-1">Change Log</h1>
|
|
5154
|
+
<h2 id="version-0.1.0-beta.26" tabindex="-1">Version 0.1.0-beta.26</h2>
|
|
5155
|
+
<ul>
|
|
5156
|
+
<li>scss/components/card
|
|
5157
|
+
<ul>
|
|
5158
|
+
<li>Make modifier card--no-image, which is used to inform layout in the card when it doesn't have an image, now hides the image as well (with CSS)</li>
|
|
5159
|
+
</ul>
|
|
5160
|
+
</li>
|
|
5161
|
+
</ul>
|
|
5151
5162
|
<h2 id="version-0.1.0-beta.25" tabindex="-1">Version 0.1.0-beta.25</h2>
|
|
5152
5163
|
<ul>
|
|
5164
|
+
<li>scss/components/accordion
|
|
5165
|
+
<ul>
|
|
5166
|
+
<li>Make normal summary (when used without icon) flexbox for older browser support (uses :has() selector)</li>
|
|
5167
|
+
</ul>
|
|
5168
|
+
</li>
|
|
5153
5169
|
<li>scss/components/card
|
|
5154
5170
|
<ul>
|
|
5155
|
-
<li>
|
|
5171
|
+
<li>Change how horizontal cards display when in horizontal
|
|
5172
|
+
<ul>
|
|
5173
|
+
<li>Body and footer stack to the side of image</li>
|
|
5174
|
+
<li>Image fills height</li>
|
|
5175
|
+
</ul>
|
|
5176
|
+
</li>
|
|
5156
5177
|
<li>add card--image-fit modifier to all images to properly be contained in cards regardless of card size</li>
|
|
5157
5178
|
</ul>
|
|
5158
5179
|
</li>
|
|
@@ -5039,91 +5039,133 @@
|
|
|
5039
5039
|
<label for="fieldBody">Body</label>
|
|
5040
5040
|
</div>
|
|
5041
5041
|
<div class="form-theme__item">
|
|
5042
|
-
<input type="checkbox" id="
|
|
5043
|
-
<label for="
|
|
5042
|
+
<input type="checkbox" id="fieldTitle" name="fieldTitle" checked="">
|
|
5043
|
+
<label for="fieldTitle">Title</label>
|
|
5044
5044
|
</div>
|
|
5045
5045
|
<div class="form-theme__item">
|
|
5046
|
-
<input type="checkbox" id="
|
|
5047
|
-
<label for="
|
|
5046
|
+
<input type="checkbox" id="fieldContent" name="fieldContent" checked="">
|
|
5047
|
+
<label for="fieldContent">Content</label>
|
|
5048
|
+
</div>
|
|
5049
|
+
<div class="form-theme__item">
|
|
5050
|
+
<input type="checkbox" id="fieldFooter" name="fieldFooter" checked="">
|
|
5051
|
+
<label for="fieldFooter">Footer</label>
|
|
5048
5052
|
</div>
|
|
5049
5053
|
<div class="form-theme__item">
|
|
5050
5054
|
<label for="fieldImage">Image:</label>
|
|
5051
5055
|
<select id="fieldImage" name="fieldImage">
|
|
5052
|
-
<option value="none">No Image</option>
|
|
5053
|
-
<option value="image" selected="">Image</option>
|
|
5054
5056
|
<option value="icon">Icon</option>
|
|
5057
|
+
<option value="image" selected="">Image</option>
|
|
5058
|
+
<option value="none">No Image</option>
|
|
5059
|
+
</select>
|
|
5060
|
+
</div>
|
|
5061
|
+
<div class="form-theme__item">
|
|
5062
|
+
<label for="fieldModifier">Modifier:</label>
|
|
5063
|
+
<select id="fieldModifier" name="fieldModifier">
|
|
5064
|
+
<option value="default" selected="">Default</option>
|
|
5065
|
+
<option value="horizontal">Horizontal</option>
|
|
5066
|
+
<option value="overlay">Overlay</option>
|
|
5055
5067
|
</select>
|
|
5056
5068
|
</div>
|
|
5057
5069
|
<div class="form-theme__actions">
|
|
5058
5070
|
<button type="button" id="icdSubmit" class="button">Refresh</button>
|
|
5059
5071
|
</div>
|
|
5060
5072
|
</form>
|
|
5073
|
+
<div><em>Note the following config combinations are not currently supported</em></div>
|
|
5074
|
+
<dl>
|
|
5075
|
+
<dt>Overlay</dt>
|
|
5076
|
+
<dd>No Image</dd>
|
|
5077
|
+
<dd>Icon</dd>
|
|
5078
|
+
</dl>
|
|
5061
5079
|
</div>
|
|
5080
|
+
<!-- Note you will need to run the pageModified event after re-rendering the card, you can add the following to cause the scripts to update
|
|
5081
|
+
|
|
5082
|
+
document.dispatchEvent(new CustomEvent("ulu:pageModified", { bubbles: true })); -->
|
|
5062
5083
|
<script>
|
|
5063
5084
|
(() => {
|
|
5064
5085
|
const display = document.getElementById("icd-display");
|
|
5065
5086
|
const submit = document.getElementById("icdSubmit");
|
|
5066
5087
|
const form = document.getElementById("icdForm");
|
|
5067
|
-
const defaults = {
|
|
5068
|
-
// Add default options
|
|
5069
|
-
};
|
|
5070
|
-
|
|
5071
5088
|
|
|
5072
5089
|
// Run initially
|
|
5073
|
-
|
|
5090
|
+
render();
|
|
5074
5091
|
|
|
5075
5092
|
// Update on submit click
|
|
5076
5093
|
submit.addEventListener("click", (event) => {
|
|
5077
5094
|
event.preventDefault();
|
|
5095
|
+
render();
|
|
5096
|
+
document.dispatchEvent(new CustomEvent("ulu:pageModified", { bubbles: true }));
|
|
5097
|
+
});
|
|
5098
|
+
|
|
5099
|
+
function render() {
|
|
5078
5100
|
const formData = new FormData(form);
|
|
5079
|
-
const values = {
|
|
5101
|
+
const values = {};
|
|
5080
5102
|
formData.forEach((value, key) => {
|
|
5081
5103
|
values[key] = value;
|
|
5082
5104
|
});
|
|
5083
5105
|
console.log("values:\n", values);
|
|
5084
|
-
|
|
5085
|
-
}
|
|
5106
|
+
display.innerHTML = cardTemplate(values);
|
|
5107
|
+
}
|
|
5086
5108
|
|
|
5087
|
-
function
|
|
5088
|
-
|
|
5109
|
+
function cardFooterBuilder(options) {
|
|
5110
|
+
if(options.fieldFooter) {
|
|
5111
|
+
return `
|
|
5112
|
+
<div class="card__footer">
|
|
5113
|
+
${ options.fieldTitle && options.fieldBody ? `<a class="button button--small" href="https://www.yahoo.com/">Footer</a>` : `Card Footer Text` }
|
|
5114
|
+
</div>
|
|
5115
|
+
`.trim();
|
|
5116
|
+
}
|
|
5117
|
+
return "";
|
|
5118
|
+
}
|
|
5119
|
+
|
|
5120
|
+
function cardImageBuilder(imageType) {
|
|
5121
|
+
if(imageType == "image") {
|
|
5122
|
+
return `
|
|
5123
|
+
<div class="card__image">
|
|
5124
|
+
<img src="/frontend/assets/placeholder/image-1.jpg">
|
|
5125
|
+
</div>
|
|
5126
|
+
`.trim();
|
|
5127
|
+
} else if(imageType == "icon") {
|
|
5128
|
+
return `
|
|
5129
|
+
<div class="card__image card__image--icon">
|
|
5130
|
+
<span aria-hidden class="css-icon css-icon--circle-question"></span>
|
|
5131
|
+
</div>
|
|
5132
|
+
`.trim();
|
|
5133
|
+
}
|
|
5134
|
+
return "";
|
|
5135
|
+
}
|
|
5136
|
+
|
|
5137
|
+
function cardBodyBuilder(options) {
|
|
5138
|
+
if(options.fieldBody) {
|
|
5139
|
+
let cardContent = `<div class="card__body">`
|
|
5140
|
+
if(options.fieldTitle) {
|
|
5141
|
+
cardContent = cardContent + `
|
|
5142
|
+
<h5 class="card__title">
|
|
5143
|
+
<a class="card__title-link" href="https://www.google.com" data-ulu-proxy-click-source="">Card Title</a>
|
|
5144
|
+
</h5>
|
|
5145
|
+
`.trim();
|
|
5146
|
+
}
|
|
5147
|
+
if(options.fieldContent) {
|
|
5148
|
+
cardContent = cardContent + `
|
|
5149
|
+
<div>
|
|
5150
|
+
This is the card content. It can contain around 2-3 sentences.
|
|
5151
|
+
</div>
|
|
5152
|
+
`.trim();
|
|
5153
|
+
}
|
|
5154
|
+
cardContent = cardContent + `</div>`
|
|
5155
|
+
return cardContent
|
|
5156
|
+
}
|
|
5157
|
+
return "";
|
|
5089
5158
|
}
|
|
5090
5159
|
|
|
5091
5160
|
// Template for update
|
|
5092
5161
|
function cardTemplate(options) {
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
<a class="card__title-link" href="https://www.google.com" data-ulu-proxy-click-source="">Card Title</a>
|
|
5098
|
-
</h5>
|
|
5099
|
-
<p>
|
|
5100
|
-
This is the card content. It can contain around 2-3 sentences.
|
|
5101
|
-
</p>
|
|
5102
|
-
</div>
|
|
5103
|
-
<div class="card__image">
|
|
5104
|
-
<img src="/assets/placeholder/image-1.jpg">
|
|
5105
|
-
</div>
|
|
5106
|
-
<div class="card__image card__image--icon">
|
|
5107
|
-
<span aria-hidden class="css-icon css-icon--circle-question"></span>
|
|
5108
|
-
</div>
|
|
5109
|
-
<div class="card__footer">
|
|
5110
|
-
<a class="button button--small" href="https://www.yahoo.com/">Footer</a>
|
|
5111
|
-
</div>
|
|
5112
|
-
</article>
|
|
5113
|
-
`;
|
|
5162
|
+
const cardOpen = `<${ options.fieldTitle && options.fieldBody ? 'article data-ulu-proxy-click' : 'a href="https://www.google.com"' } class="card card--${options.fieldModifier}">`
|
|
5163
|
+
const cardClose = (options.fieldTitle && options.fieldBody) ? '</article>' : '</a>'
|
|
5164
|
+
console.log(cardClose)
|
|
5165
|
+
return cardOpen + cardBodyBuilder(options) + cardImageBuilder(options.fieldImage) + cardFooterBuilder(options) + cardClose
|
|
5114
5166
|
}
|
|
5115
5167
|
})();
|
|
5116
5168
|
</script>
|
|
5117
|
-
<!-- card short code parameter order is -->
|
|
5118
|
-
<!-- <article class="card " data-ulu-proxy-click><div class="card__body"><h5 class="card__title">
|
|
5119
|
-
<a class="card__title-link" href="https://www.google.com" data-ulu-proxy-click-source="">Card 1 Title</a>
|
|
5120
|
-
</h5><div>
|
|
5121
|
-
This is the card content. It can contain around 2-3 sentences.
|
|
5122
|
-
</div></div><div class="card__image ">
|
|
5123
|
-
<img src="/assets/placeholder/image-1.jpg"/>
|
|
5124
|
-
</div><div class="card__footer">
|
|
5125
|
-
<a class="button button--small" href="https://www.yahoo.com/">Footer</a>
|
|
5126
|
-
</div></article> -->
|
|
5127
5169
|
<details class="accordion">
|
|
5128
5170
|
<summary class="accordion__summary">
|
|
5129
5171
|
Card Default Styling
|
|
@@ -5030,9 +5030,87 @@
|
|
|
5030
5030
|
|
|
5031
5031
|
<hr class="rule rule--light rule--margin-large">
|
|
5032
5032
|
|
|
5033
|
-
|
|
5033
|
+
|
|
5034
|
+
<h2 class="h2">Example with placements</h2>
|
|
5035
|
+
|
|
5036
|
+
<button class="button" type="button" data-ulu-popover-trigger='{
|
|
5037
|
+
"floating" : { "placement" : "top" }
|
|
5038
|
+
}'>
|
|
5039
|
+
<span>Placement (top)</span>
|
|
5040
|
+
<span class="button__icon">
|
|
5041
|
+
<span data-feather="fas fa-chevron-down"></span>
|
|
5042
|
+
</span>
|
|
5043
|
+
</button>
|
|
5044
|
+
<div class="popover" data-ulu-popover-content="">
|
|
5045
|
+
<div class="popover__inner">
|
|
5046
|
+
<p>
|
|
5047
|
+
This is the popover body area <a href="#">test link</a>
|
|
5048
|
+
</p>
|
|
5049
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
|
|
5050
|
+
</div>
|
|
5051
|
+
<span class="popover__arrow" data-ulu-popover-arrow=""></span>
|
|
5052
|
+
</div>
|
|
5053
|
+
|
|
5054
|
+
<button class="button" type="button" data-ulu-popover-trigger='{
|
|
5055
|
+
"floating" : { "placement" : "bottom" }
|
|
5056
|
+
}'>
|
|
5057
|
+
<span>Placement (bottom)</span>
|
|
5058
|
+
<span class="button__icon">
|
|
5059
|
+
<span data-feather="fas fa-chevron-down"></span>
|
|
5060
|
+
</span>
|
|
5061
|
+
</button>
|
|
5062
|
+
<div class="popover" data-ulu-popover-content="">
|
|
5063
|
+
<div class="popover__inner">
|
|
5064
|
+
<p>
|
|
5065
|
+
This is the popover body area <a href="#">test link</a>
|
|
5066
|
+
</p>
|
|
5067
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
|
|
5068
|
+
</div>
|
|
5069
|
+
<span class="popover__arrow" data-ulu-popover-arrow=""></span>
|
|
5070
|
+
</div>
|
|
5071
|
+
|
|
5072
|
+
<button class="button" type="button" data-ulu-popover-trigger='{
|
|
5073
|
+
"floating" : { "placement" : "left" }
|
|
5074
|
+
}'>
|
|
5075
|
+
<span>Placement (left)</span>
|
|
5076
|
+
<span class="button__icon">
|
|
5077
|
+
<span data-feather="fas fa-chevron-down"></span>
|
|
5078
|
+
</span>
|
|
5079
|
+
</button>
|
|
5080
|
+
<div class="popover" data-ulu-popover-content="">
|
|
5081
|
+
<div class="popover__inner">
|
|
5082
|
+
<p>
|
|
5083
|
+
This is the popover body area <a href="#">test link</a>
|
|
5084
|
+
</p>
|
|
5085
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
|
|
5086
|
+
</div>
|
|
5087
|
+
<span class="popover__arrow" data-ulu-popover-arrow=""></span>
|
|
5088
|
+
</div>
|
|
5089
|
+
|
|
5090
|
+
<button class="button" type="button" data-ulu-popover-trigger='{
|
|
5091
|
+
"floating" : { "placement" : "right" }
|
|
5092
|
+
}'>
|
|
5093
|
+
<span>Placement (right)</span>
|
|
5094
|
+
<span class="button__icon">
|
|
5095
|
+
<span data-feather="fas fa-chevron-down"></span>
|
|
5096
|
+
</span>
|
|
5097
|
+
</button>
|
|
5098
|
+
<div class="popover" data-ulu-popover-content="">
|
|
5099
|
+
<div class="popover__inner">
|
|
5100
|
+
<p>
|
|
5101
|
+
This is the popover body area <a href="#">test link</a>
|
|
5102
|
+
</p>
|
|
5103
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
|
|
5104
|
+
</div>
|
|
5105
|
+
<span class="popover__arrow" data-ulu-popover-arrow=""></span>
|
|
5106
|
+
</div>
|
|
5107
|
+
|
|
5108
|
+
|
|
5109
|
+
|
|
5110
|
+
<h2 class="h2">With Footer</h2>
|
|
5111
|
+
|
|
5034
5112
|
<div>
|
|
5035
|
-
<button class="button" type="button" data-ulu-popover-trigger=
|
|
5113
|
+
<button class="button" type="button" data-ulu-popover-trigger="">
|
|
5036
5114
|
<span>Show Popover</span>
|
|
5037
5115
|
<span class="button__icon">
|
|
5038
5116
|
<span data-feather="fas fa-chevron-down"></span>
|
|
@@ -5042,8 +5120,26 @@
|
|
|
5042
5120
|
<div class="popover__inner">
|
|
5043
5121
|
This is the popover body area <a href="#">test link</a>
|
|
5044
5122
|
</div>
|
|
5045
|
-
<span class="popover__arrow" data-ulu-popover-arrow=""></span>
|
|
5046
5123
|
<div class="popover__footer">Popover Footer</div>
|
|
5124
|
+
<span class="popover__arrow" data-ulu-popover-arrow=""></span>
|
|
5125
|
+
</div>
|
|
5126
|
+
</div>
|
|
5127
|
+
|
|
5128
|
+
<h2 class="h2">No Arrow</h2>
|
|
5129
|
+
|
|
5130
|
+
<div>
|
|
5131
|
+
<button class="button" type="button" data-ulu-popover-trigger="">
|
|
5132
|
+
<span>Show Popover</span>
|
|
5133
|
+
<span class="button__icon">
|
|
5134
|
+
<span data-feather="fas fa-chevron-down"></span>
|
|
5135
|
+
</span>
|
|
5136
|
+
</button>
|
|
5137
|
+
<div class="popover" data-ulu-popover-content="">
|
|
5138
|
+
<div class="popover__inner">
|
|
5139
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
|
|
5140
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
|
|
5141
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam commodo felis nisi, nec pretium justo varius sit amet. Vestibulum vitae quam in velit scelerisque tincidunt et vitae mauris. Fusce aliquet, ipsum sit amet lacinia euismod, est risus rhoncus ligula, eget egestas urna ligula nec enim. Fusce vulputate ornare ligula ut tempus. Sed accumsan orci sed turpis iaculis, at aliquam nibh rhoncus. Maecenas porta lorem a sem tincidunt, sed tristique ex laoreet. Nullam accumsan metus at lobortis interdum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sagittis sem erat, quis fermentum lectus ultrices quis.</p>
|
|
5142
|
+
</div>
|
|
5047
5143
|
</div>
|
|
5048
5144
|
</div>
|
|
5049
5145
|
</div>
|
|
@@ -5547,7 +5547,7 @@
|
|
|
5547
5547
|
<li><strong>Group:</strong> card</li>
|
|
5548
5548
|
<li><strong>Type:</strong> mixin</li>
|
|
5549
5549
|
<li><strong>Lines (comments):</strong> 172-176</li>
|
|
5550
|
-
<li><strong>Lines (code):</strong> 178-
|
|
5550
|
+
<li><strong>Lines (code):</strong> 178-452</li>
|
|
5551
5551
|
</ul>
|
|
5552
5552
|
</details>
|
|
5553
5553
|
<div class="callout callout--demo crop-margins">
|
|
@@ -5351,7 +5351,7 @@
|
|
|
5351
5351
|
<li><strong>Group:</strong> popover</li>
|
|
5352
5352
|
<li><strong>Type:</strong> mixin</li>
|
|
5353
5353
|
<li><strong>Lines (comments):</strong> 114-116</li>
|
|
5354
|
-
<li><strong>Lines (code):</strong> 118-
|
|
5354
|
+
<li><strong>Lines (code):</strong> 118-272</li>
|
|
5355
5355
|
</ul>
|
|
5356
5356
|
</details>
|
|
5357
5357
|
<h4 id="examples-1" tabindex="-1">Examples</h4>
|
package/js/ui/popover.js
CHANGED
|
@@ -124,6 +124,7 @@ export class Popover extends Collapsible {
|
|
|
124
124
|
createFloatingInstance() {
|
|
125
125
|
const { content, anchor, contentArrow } = this.elements;
|
|
126
126
|
const floatingElements = { trigger: anchor, contentArrow, content };
|
|
127
|
+
console.log("this.floatingOptions:\n", this.floatingOptions);
|
|
127
128
|
this.floatingCleanup = createFloatingUi(floatingElements, this.floatingOptions);
|
|
128
129
|
}
|
|
129
130
|
destroyFloatingInstance() {
|
package/package.json
CHANGED
package/scss/_utils.scss
CHANGED
|
@@ -128,24 +128,39 @@ $config: (
|
|
|
128
128
|
|
|
129
129
|
// Returns number unit info, and strips the unit
|
|
130
130
|
/// @param {String} $number Number to get meta info for
|
|
131
|
-
/// @return {Map} With properties (unit, value)
|
|
131
|
+
/// @return {Map} With properties (unit, value, invalid [true/false if not number])
|
|
132
132
|
|
|
133
|
-
@function number-info($number) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
@function number-info($number, $errors: false) {
|
|
134
|
+
|
|
135
|
+
@if (meta.type-of($number) == 'number') {
|
|
136
|
+
$is-unitless: math.is-unitless($number);
|
|
137
137
|
@return (
|
|
138
|
-
"unit": null,
|
|
139
|
-
"value": $number
|
|
138
|
+
"unit": if($is-unitless, null, math.unit($number)),
|
|
139
|
+
"value": if($is-unitless, $number, strip-unit($number)),
|
|
140
|
+
"invalid" : false
|
|
140
141
|
);
|
|
142
|
+
|
|
141
143
|
} @else {
|
|
144
|
+
@if ($errors) {
|
|
145
|
+
@error "Expected Number, got #{ meta.type-of($number) } for #{ $number }";
|
|
146
|
+
}
|
|
142
147
|
@return (
|
|
143
|
-
"unit"
|
|
144
|
-
"value":
|
|
148
|
+
"unit": null,
|
|
149
|
+
"value": $number,
|
|
150
|
+
"invalid" : true
|
|
145
151
|
);
|
|
146
152
|
}
|
|
147
153
|
}
|
|
148
154
|
|
|
155
|
+
/// Adds unit to unitless number
|
|
156
|
+
/// @param {Number} $number The unitless number to add unit to
|
|
157
|
+
/// @param {String} $unit The unit to add to number
|
|
158
|
+
/// @return {String} Number with unit attached (can't be used in maths)
|
|
159
|
+
|
|
160
|
+
@function add-unit($number, $unit) {
|
|
161
|
+
@return $number + string.unquote($unit);
|
|
162
|
+
}
|
|
163
|
+
|
|
149
164
|
/// Reusable merge method
|
|
150
165
|
/// @param {Map} $original Source map
|
|
151
166
|
/// @param {Map} $changes Changes to merge into source map
|
|
@@ -485,4 +500,14 @@ $config: (
|
|
|
485
500
|
) {
|
|
486
501
|
#{ $property } : $value;
|
|
487
502
|
#{ $property } : calc(#{ $value } + #{ $responsive-change });
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/// Calculates the hypotenuse of a triangle
|
|
506
|
+
/// - Can be used to get length between two corners of a rectangle
|
|
507
|
+
/// @param {Number} $width The width of the triangle
|
|
508
|
+
/// @param {Number} $height The height of the triangle
|
|
509
|
+
/// @return {Number} Hypotenuse of a triangle
|
|
510
|
+
|
|
511
|
+
@function hypotenuse($width, $height) {
|
|
512
|
+
@return math.sqrt(math.pow($width, 2) + math.pow($height, 2));
|
|
488
513
|
}
|