@fluid-topics/ft-floating-menu 1.2.46 → 1.2.49

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.
@@ -511,7 +511,7 @@ Also for action icons.`,r.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
511
511
  <div class="ft-ripple--background"></div>
512
512
  <div class="ft-ripple--effect"></div>
513
513
  </div>
514
- `}contentAvailableCallback(o){super.contentAvailableCallback(o),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(o){var a,i;super.update(o),o.has("disabled")&&(this.disabled?(this.endRipple(),(a=this.target)===null||a===void 0||a.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var o,a;let i=(o=this.shadowRoot)===null||o===void 0?void 0:o.host.parentElement;i&&this.setupFor((a=this.target)!==null&&a!==void 0?a:i)}setupFor(o){if(this.setupDebouncer.cancel(),this.target===o)return;this.onDisconnect&&this.onDisconnect(),this.target=o,o.setAttribute("data-is-ft-ripple-target","true");let a=(...p)=>y=>{p.forEach(h=>window.addEventListener(h,this.endPress,{once:!0})),this.startPress(y)},i=a("mouseup","contextmenu"),c=a("touchend","touchcancel"),l=p=>{["Enter"," "].includes(p.key)&&a("keyup")(p)},s={passive:!0};o.addEventListener("mouseover",this.startHover,s),o.addEventListener("mousemove",this.moveRipple,s),o.addEventListener("mouseleave",this.endHover,s),o.addEventListener("mousedown",i,s),o.addEventListener("touchstart",c,s),o.addEventListener("touchmove",this.moveRipple,s),o.addEventListener("keydown",l,s),o.addEventListener("focus",this.startFocus,s),o.addEventListener("blur",this.endFocus,s),o.addEventListener("focusin",this.startFocus,s),o.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{o.removeAttribute("data-is-ft-ripple-target"),o.removeEventListener("mouseover",this.startHover,s),o.removeEventListener("mousemove",this.moveRipple,s),o.removeEventListener("mouseleave",this.endHover,s),o.removeEventListener("mousedown",i,s),o.removeEventListener("touchstart",c,s),o.removeEventListener("touchmove",this.moveRipple,s),o.removeEventListener("keydown",l,s),o.removeEventListener("focus",this.startFocus,s),o.removeEventListener("blur",this.endFocus,s),o.removeEventListener("focusin",this.startFocus,s),o.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(o){let a=o,i=o,c,l;return a.x!=null?{x:c,y:l}=a:i.touches!=null&&(c=i.touches[0].clientX,l=i.touches[0].clientY),{x:c,y:l}}isFocusVisible(o){return o instanceof HTMLElement?o.matches(":focus-visible"):!0}isIgnored(o){if(this.disabled)return!0;if(o!=null)for(let a of o.composedPath()){if(a===this.target)break;if("hasAttribute"in a&&a.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};A.elementDefinitions={};A.styles=Wo;q([(0,Z.property)({type:Boolean})],A.prototype,"primary",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"secondary",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"unbounded",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"activated",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"selected",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"disabled",void 0);q([(0,Z.state)()],A.prototype,"hovered",void 0);q([(0,Z.state)()],A.prototype,"focused",void 0);q([(0,Z.state)()],A.prototype,"pressed",void 0);q([(0,Z.state)()],A.prototype,"rippling",void 0);q([(0,Z.state)()],A.prototype,"originX",void 0);q([(0,Z.state)()],A.prototype,"originY",void 0);q([(0,Z.query)(".ft-ripple")],A.prototype,"ripple",void 0);q([(0,Z.query)(".ft-ripple--effect")],A.prototype,"rippleEffect",void 0);(0,Br.customElement)("ft-ripple")(A);var va=b(E());var Ca=b(P()),D=b(dt()),ue=b(E());var Yr=b(E());var Je=globalThis,Re=Je.trustedTypes,Ir=Re?Re.createPolicy("lit-html",{createHTML:e=>e}):void 0,Hr="$lit$",vt=`lit$${Math.random().toFixed(9).slice(2)}$`,_r="?"+vt,Ja=`<${_r}>`,Bt=document,Le=()=>Bt.createComment(""),ce=e=>e===null||typeof e!="object"&&typeof e!="function",to=Array.isArray,tn=e=>to(e)||typeof e?.[Symbol.iterator]=="function",Ve=`[
514
+ `}contentAvailableCallback(o){super.contentAvailableCallback(o),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(o){var a,i;super.update(o),o.has("disabled")&&(this.disabled?(this.endRipple(),(a=this.target)===null||a===void 0||a.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var o,a;let i=(o=this.shadowRoot)===null||o===void 0?void 0:o.host.parentElement;i&&this.setupFor((a=this.target)!==null&&a!==void 0?a:i)}forceFocusUpdate(){var o;!((o=this.target)===null||o===void 0)&&o.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(o){if(this.setupDebouncer.cancel(),this.target===o)return;this.onDisconnect&&this.onDisconnect(),this.target=o,o.setAttribute("data-is-ft-ripple-target","true");let a=(...p)=>y=>{p.forEach(h=>window.addEventListener(h,this.endPress,{once:!0})),this.startPress(y)},i=a("mouseup","contextmenu"),c=a("touchend","touchcancel"),l=p=>{["Enter"," "].includes(p.key)&&a("keyup")(p)},s={passive:!0};o.addEventListener("mouseover",this.startHover,s),o.addEventListener("mousemove",this.moveRipple,s),o.addEventListener("mouseleave",this.endHover,s),o.addEventListener("mousedown",i,s),o.addEventListener("touchstart",c,s),o.addEventListener("touchmove",this.moveRipple,s),o.addEventListener("keydown",l,s),o.addEventListener("focus",this.startFocus,s),o.addEventListener("blur",this.endFocus,s),o.addEventListener("focusin",this.startFocus,s),o.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{o.removeAttribute("data-is-ft-ripple-target"),o.removeEventListener("mouseover",this.startHover,s),o.removeEventListener("mousemove",this.moveRipple,s),o.removeEventListener("mouseleave",this.endHover,s),o.removeEventListener("mousedown",i,s),o.removeEventListener("touchstart",c,s),o.removeEventListener("touchmove",this.moveRipple,s),o.removeEventListener("keydown",l,s),o.removeEventListener("focus",this.startFocus,s),o.removeEventListener("blur",this.endFocus,s),o.removeEventListener("focusin",this.startFocus,s),o.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(o){let a=o,i=o,c,l;return a.x!=null?{x:c,y:l}=a:i.touches!=null&&(c=i.touches[0].clientX,l=i.touches[0].clientY),{x:c,y:l}}isFocusVisible(o){return o instanceof HTMLElement?o.matches(":focus-visible"):!0}isIgnored(o){if(this.disabled)return!0;if(o!=null)for(let a of o.composedPath()){if(a===this.target)break;if("hasAttribute"in a&&a.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};A.elementDefinitions={};A.styles=Wo;q([(0,Z.property)({type:Boolean})],A.prototype,"primary",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"secondary",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"unbounded",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"activated",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"selected",void 0);q([(0,Z.property)({type:Boolean})],A.prototype,"disabled",void 0);q([(0,Z.state)()],A.prototype,"hovered",void 0);q([(0,Z.state)()],A.prototype,"focused",void 0);q([(0,Z.state)()],A.prototype,"pressed",void 0);q([(0,Z.state)()],A.prototype,"rippling",void 0);q([(0,Z.state)()],A.prototype,"originX",void 0);q([(0,Z.state)()],A.prototype,"originY",void 0);q([(0,Z.query)(".ft-ripple")],A.prototype,"ripple",void 0);q([(0,Z.query)(".ft-ripple--effect")],A.prototype,"rippleEffect",void 0);(0,Br.customElement)("ft-ripple")(A);var va=b(E());var Ca=b(P()),D=b(dt()),ue=b(E());var Yr=b(E());var Je=globalThis,Re=Je.trustedTypes,Ir=Re?Re.createPolicy("lit-html",{createHTML:e=>e}):void 0,Hr="$lit$",vt=`lit$${Math.random().toFixed(9).slice(2)}$`,_r="?"+vt,Ja=`<${_r}>`,Bt=document,Le=()=>Bt.createComment(""),ce=e=>e===null||typeof e!="object"&&typeof e!="function",to=Array.isArray,tn=e=>to(e)||typeof e?.[Symbol.iterator]=="function",Ve=`[
515
515
  \f\r]`,ie=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pr=/-->/g,Wr=/>/g,At=RegExp(`>|${Ve}(?:([^\\s"'>=/]+)(${Ve}*=${Ve}*(?:[^
516
516
  \f\r"'\`<>=]|("|')|))|$)`,"g"),kr=/'/g,zr=/"/g,Dr=/^(?:script|style|textarea|title)$/i,eo=e=>(o,...a)=>({_$litType$:e,strings:o,values:a}),Ur=eo(1),Gr=eo(2),Mr=eo(3),le=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),Tr=new WeakMap,$t=Bt.createTreeWalker(Bt,129);function Zr(e,o){if(!to(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ir!==void 0?Ir.createHTML(o):o}var en=(e,o)=>{let a=e.length-1,i=[],c,l=o===2?"<svg>":o===3?"<math>":"",s=ie;for(let p=0;p<a;p++){let y=e[p],h,O,x=-1,N=0;for(;N<y.length&&(s.lastIndex=N,O=s.exec(y),O!==null);)N=s.lastIndex,s===ie?O[1]==="!--"?s=Pr:O[1]!==void 0?s=Wr:O[2]!==void 0?(Dr.test(O[2])&&(c=RegExp("</"+O[2],"g")),s=At):O[3]!==void 0&&(s=At):s===At?O[0]===">"?(s=c??ie,x=-1):O[1]===void 0?x=-2:(x=s.lastIndex-O[2].length,h=O[1],s=O[3]===void 0?At:O[3]==='"'?zr:kr):s===zr||s===kr?s=At:s===Pr||s===Wr?s=ie:(s=At,c=void 0);let v=s===At&&e[p+1].startsWith("/>")?" ":"";l+=s===ie?y+Ja:x>=0?(i.push(h),y.slice(0,x)+Hr+y.slice(x)+vt+v):y+vt+(x===-2?p:v)}return[Zr(e,l+(e[a]||"<?>")+(o===2?"</svg>":o===3?"</math>":"")),i]},se=class e{constructor({strings:o,_$litType$:a},i){let c;this.parts=[];let l=0,s=0,p=o.length-1,y=this.parts,[h,O]=en(o,a);if(this.el=e.createElement(h,i),$t.currentNode=this.el.content,a===2||a===3){let x=this.el.content.firstChild;x.replaceWith(...x.childNodes)}for(;(c=$t.nextNode())!==null&&y.length<p;){if(c.nodeType===1){if(c.hasAttributes())for(let x of c.getAttributeNames())if(x.endsWith(Hr)){let N=O[s++],v=c.getAttribute(x).split(vt),w=/([.?@])?(.*)/.exec(N);y.push({type:1,index:l,name:w[2],strings:v,ctor:w[1]==="."?Ye:w[1]==="?"?Xe:w[1]==="@"?qe:Kt}),c.removeAttribute(x)}else x.startsWith(vt)&&(y.push({type:6,index:l}),c.removeAttribute(x));if(Dr.test(c.tagName)){let x=c.textContent.split(vt),N=x.length-1;if(N>0){c.textContent=Re?Re.emptyScript:"";for(let v=0;v<N;v++)c.append(x[v],Le()),$t.nextNode(),y.push({type:2,index:++l});c.append(x[N],Le())}}}else if(c.nodeType===8)if(c.data===_r)y.push({type:2,index:l});else{let x=-1;for(;(x=c.data.indexOf(vt,x+1))!==-1;)y.push({type:7,index:l}),x+=vt.length-1}l++}}static createElement(o,a){let i=Bt.createElement("template");return i.innerHTML=o,i}};function Ft(e,o,a=e,i){if(o===le)return o;let c=i!==void 0?a._$Co?.[i]:a._$Cl,l=ce(o)?void 0:o._$litDirective$;return c?.constructor!==l&&(c?._$AO?.(!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,a,i)),i!==void 0?(a._$Co??=[])[i]=c:a._$Cl=c),c!==void 0&&(o=Ft(e,c._$AS(e,o.values),c,i)),o}var je=class{constructor(o,a){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=a}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:a},parts:i}=this._$AD,c=(o?.creationScope??Bt).importNode(a,!0);$t.currentNode=c;let l=$t.nextNode(),s=0,p=0,y=i[0];for(;y!==void 0;){if(s===y.index){let h;y.type===2?h=new Ae(l,l.nextSibling,this,o):y.type===1?h=new y.ctor(l,y.name,y.strings,this,o):y.type===6&&(h=new Qe(l,this,o)),this._$AV.push(h),y=i[++p]}s!==y?.index&&(l=$t.nextNode(),s++)}return $t.currentNode=Bt,c}p(o){let a=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(o,i,a),a+=i.strings.length-2):i._$AI(o[a])),a++}},Ae=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,a,i,c){this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=o,this._$AB=a,this._$AM=i,this.options=c,this._$Cv=c?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,a=this._$AM;return a!==void 0&&o?.nodeType===11&&(o=a.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,a=this){o=Ft(this,o,a),ce(o)?o===M||o==null||o===""?(this._$AH!==M&&this._$AR(),this._$AH=M):o!==this._$AH&&o!==le&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):tn(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==M&&ce(this._$AH)?this._$AA.nextSibling.data=o:this.T(Bt.createTextNode(o)),this._$AH=o}$(o){let{values:a,_$litType$:i}=o,c=typeof i=="number"?this._$AC(o):(i.el===void 0&&(i.el=se.createElement(Zr(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===c)this._$AH.p(a);else{let l=new je(c,this),s=l.u(this.options);l.p(a),this.T(s),this._$AH=l}}_$AC(o){let a=Tr.get(o.strings);return a===void 0&&Tr.set(o.strings,a=new se(o)),a}k(o){to(this._$AH)||(this._$AH=[],this._$AR());let a=this._$AH,i,c=0;for(let l of o)c===a.length?a.push(i=new e(this.O(Le()),this.O(Le()),this,this.options)):i=a[c],i._$AI(l),c++;c<a.length&&(this._$AR(i&&i._$AB.nextSibling,c),a.length=c)}_$AR(o=this._$AA.nextSibling,a){for(this._$AP?.(!1,!0,a);o&&o!==this._$AB;){let i=o.nextSibling;o.remove(),o=i}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}},Kt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,a,i,c,l){this.type=1,this._$AH=M,this._$AN=void 0,this.element=o,this.name=a,this._$AM=c,this.options=l,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=M}_$AI(o,a=this,i,c){let l=this.strings,s=!1;if(l===void 0)o=Ft(this,o,a,0),s=!ce(o)||o!==this._$AH&&o!==le,s&&(this._$AH=o);else{let p=o,y,h;for(o=l[0],y=0;y<l.length-1;y++)h=Ft(this,p[i+y],a,y),h===le&&(h=this._$AH[y]),s||=!ce(h)||h!==this._$AH[y],h===M?o=M:o!==M&&(o+=(h??"")+l[y+1]),this._$AH[y]=h}s&&!c&&this.j(o)}j(o){o===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}},Ye=class extends Kt{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===M?void 0:o}},Xe=class extends Kt{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==M)}},qe=class extends Kt{constructor(o,a,i,c,l){super(o,a,i,c,l),this.type=5}_$AI(o,a=this){if((o=Ft(this,o,a,0)??M)===le)return;let i=this._$AH,c=o===M&&i!==M||o.capture!==i.capture||o.once!==i.once||o.passive!==i.passive,l=o!==M&&(i===M||c);c&&this.element.removeEventListener(this.name,this,i),l&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}},Qe=class{constructor(o,a,i){this.element=o,this.type=6,this._$AN=void 0,this._$AM=a,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(o){Ft(this,o)}};var on=Je.litHtmlPolyfillSupport;on?.(se,Ae),(Je.litHtmlVersions??=[]).push("3.3.0");var Kr=Symbol.for(""),rn=e=>{if(e?.r===Kr)return e?._$litStatic$},oo=e=>({_$litStatic$:e,r:Kr});var Fr=new Map,ro=e=>(o,...a)=>{let i=a.length,c,l,s=[],p=[],y,h=0,O=!1;for(;h<i;){for(y=o[h];h<i&&(l=a[h],(c=rn(l))!==void 0);)y+=c+o[++h],O=!0;h!==i&&p.push(l),s.push(y),h++}if(h===i&&s.push(o[i]),O){let x=s.join("$$lit$$");(o=Fr.get(x))===void 0&&(s.raw=s,Fr.set(x,o=s)),a=p}return e(o,...a)},ao=ro(Ur),cd=ro(Gr),ld=ro(Mr);var no=b(dt()),jr=b(E());var Nt;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button",e.display="display",e.title1="title-1",e.title2="title-2",e.title3="title-3",e.body1regular="body-1-regular",e.body1medium="body-1-medium",e.body1semibold="body-1-semibold",e.body2regular="body-2-regular",e.body2medium="body-2-medium",e.body2semibold="body-2-semibold",e.label1medium="label-1-medium",e.label1semibold="label-1-semibold",e.label1bold="label-1-bold",e.label2medium="label-2-medium",e.label2semibold="label-2-semibold",e.label2bold="label-2-bold",e.caption1medium="caption-1-medium",e.caption1semibold="caption-1-semibold",e.caption1bold="caption-1-bold",e.caption2medium="caption-2-medium",e.caption2semibold="caption-2-semibold",e.caption2bold="caption-2-bold"})(Nt||(Nt={}));var Vr=function(e,o,a,i){var c=arguments.length,l=c<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,a):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,o,a,i);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(l=(c<3?s(l):c>3?s(o,a,l):s(o,a))||l);return c>3&&l&&Object.defineProperty(o,a,l),l},Y=class extends jr.FtLitElement{constructor(){super(...arguments),this.variant=Nt.body1}render(){return this.element?ao`
517
517
  <${oo(this.element)}