@fluid-topics/ft-snap-scroll 1.2.48 → 1.2.50
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.
|
@@ -480,7 +480,7 @@ Also for action icons.`,r.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
480
480
|
<div class="ft-ripple--background"></div>
|
|
481
481
|
<div class="ft-ripple--effect"></div>
|
|
482
482
|
</div>
|
|
483
|
-
`}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(m=>window.addEventListener(m,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=So;V([(0,U.property)({type:Boolean})],A.prototype,"primary",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"secondary",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"unbounded",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"activated",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"selected",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"disabled",void 0);V([(0,U.state)()],A.prototype,"hovered",void 0);V([(0,U.state)()],A.prototype,"focused",void 0);V([(0,U.state)()],A.prototype,"pressed",void 0);V([(0,U.state)()],A.prototype,"rippling",void 0);V([(0,U.state)()],A.prototype,"originX",void 0);V([(0,U.state)()],A.prototype,"originY",void 0);V([(0,U.query)(".ft-ripple")],A.prototype,"ripple",void 0);V([(0,U.query)(".ft-ripple--effect")],A.prototype,"rippleEffect",void 0);(0,mr.customElement)("ft-ripple")(A);var da=x(E());var sa=x(D()),T=x(pt()),de=x(E());var zr=x(E());var _e=globalThis,xe=_e.trustedTypes,br=xe?xe.createPolicy("lit-html",{createHTML:e=>e}):void 0,Nr="$lit$",Ot=`lit$${Math.random().toFixed(9).slice(2)}$`,wr="?"+Ot,ka=`<${wr}>`,Bt=document,Se=()=>Bt.createComment(""),re=e=>e===null||typeof e!="object"&&typeof e!="function",De=Array.isArray,Ta=e=>De(e)||typeof e?.[Symbol.iterator]=="function",Pe=`[
|
|
483
|
+
`}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(m=>window.addEventListener(m,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=So;V([(0,U.property)({type:Boolean})],A.prototype,"primary",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"secondary",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"unbounded",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"activated",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"selected",void 0);V([(0,U.property)({type:Boolean})],A.prototype,"disabled",void 0);V([(0,U.state)()],A.prototype,"hovered",void 0);V([(0,U.state)()],A.prototype,"focused",void 0);V([(0,U.state)()],A.prototype,"pressed",void 0);V([(0,U.state)()],A.prototype,"rippling",void 0);V([(0,U.state)()],A.prototype,"originX",void 0);V([(0,U.state)()],A.prototype,"originY",void 0);V([(0,U.query)(".ft-ripple")],A.prototype,"ripple",void 0);V([(0,U.query)(".ft-ripple--effect")],A.prototype,"rippleEffect",void 0);(0,mr.customElement)("ft-ripple")(A);var da=x(E());var sa=x(D()),T=x(pt()),de=x(E());var zr=x(E());var _e=globalThis,xe=_e.trustedTypes,br=xe?xe.createPolicy("lit-html",{createHTML:e=>e}):void 0,Nr="$lit$",Ot=`lit$${Math.random().toFixed(9).slice(2)}$`,wr="?"+Ot,ka=`<${wr}>`,Bt=document,Se=()=>Bt.createComment(""),re=e=>e===null||typeof e!="object"&&typeof e!="function",De=Array.isArray,Ta=e=>De(e)||typeof e?.[Symbol.iterator]=="function",Pe=`[
|
|
484
484
|
\f\r]`,oe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xr=/-->/g,Sr=/>/g,Lt=RegExp(`>|${Pe}(?:([^\\s"'>=/]+)(${Pe}*=${Pe}*(?:[^
|
|
485
485
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),Or=/'/g,Cr=/"/g,Er=/^(?:script|style|textarea|title)$/i,Ue=e=>(o,...a)=>({_$litType$:e,strings:o,values:a}),Rr=Ue(1),Lr=Ue(2),Ar=Ue(3),ae=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),vr=new WeakMap,At=Bt.createTreeWalker(Bt,129);function Br(e,o){if(!De(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return br!==void 0?br.createHTML(o):o}var Ha=(e,o)=>{let a=e.length-1,i=[],c,l=o===2?"<svg>":o===3?"<math>":"",s=oe;for(let p=0;p<a;p++){let y=e[p],m,O,b=-1,N=0;for(;N<y.length&&(s.lastIndex=N,O=s.exec(y),O!==null);)N=s.lastIndex,s===oe?O[1]==="!--"?s=xr:O[1]!==void 0?s=Sr:O[2]!==void 0?(Er.test(O[2])&&(c=RegExp("</"+O[2],"g")),s=Lt):O[3]!==void 0&&(s=Lt):s===Lt?O[0]===">"?(s=c??oe,b=-1):O[1]===void 0?b=-2:(b=s.lastIndex-O[2].length,m=O[1],s=O[3]===void 0?Lt:O[3]==='"'?Cr:Or):s===Cr||s===Or?s=Lt:s===xr||s===Sr?s=oe:(s=Lt,c=void 0);let v=s===Lt&&e[p+1].startsWith("/>")?" ":"";l+=s===oe?y+ka:b>=0?(i.push(m),y.slice(0,b)+Nr+y.slice(b)+Ot+v):y+Ot+(b===-2?p:v)}return[Br(e,l+(e[a]||"<?>")+(o===2?"</svg>":o===3?"</math>":"")),i]},ne=class e{constructor({strings:o,_$litType$:a},i){let c;this.parts=[];let l=0,s=0,p=o.length-1,y=this.parts,[m,O]=Ha(o,a);if(this.el=e.createElement(m,i),At.currentNode=this.el.content,a===2||a===3){let b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(c=At.nextNode())!==null&&y.length<p;){if(c.nodeType===1){if(c.hasAttributes())for(let b of c.getAttributeNames())if(b.endsWith(Nr)){let N=O[s++],v=c.getAttribute(b).split(Ot),w=/([.?@])?(.*)/.exec(N);y.push({type:1,index:l,name:w[2],strings:v,ctor:w[1]==="."?ze:w[1]==="?"?ke:w[1]==="@"?Te:Kt}),c.removeAttribute(b)}else b.startsWith(Ot)&&(y.push({type:6,index:l}),c.removeAttribute(b));if(Er.test(c.tagName)){let b=c.textContent.split(Ot),N=b.length-1;if(N>0){c.textContent=xe?xe.emptyScript:"";for(let v=0;v<N;v++)c.append(b[v],Se()),At.nextNode(),y.push({type:2,index:++l});c.append(b[N],Se())}}}else if(c.nodeType===8)if(c.data===wr)y.push({type:2,index:l});else{let b=-1;for(;(b=c.data.indexOf(Ot,b+1))!==-1;)y.push({type:7,index:l}),b+=Ot.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===ae)return o;let c=i!==void 0?a._$Co?.[i]:a._$Cl,l=re(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 We=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);At.currentNode=c;let l=At.nextNode(),s=0,p=0,y=i[0];for(;y!==void 0;){if(s===y.index){let m;y.type===2?m=new Oe(l,l.nextSibling,this,o):y.type===1?m=new y.ctor(l,y.name,y.strings,this,o):y.type===6&&(m=new He(l,this,o)),this._$AV.push(m),y=i[++p]}s!==y?.index&&(l=At.nextNode(),s++)}return At.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++}},Oe=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,a,i,c){this.type=2,this._$AH=_,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),re(o)?o===_||o==null||o===""?(this._$AH!==_&&this._$AR(),this._$AH=_):o!==this._$AH&&o!==ae&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):Ta(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!==_&&re(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=ne.createElement(Br(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===c)this._$AH.p(a);else{let l=new We(c,this),s=l.u(this.options);l.p(a),this.T(s),this._$AH=l}}_$AC(o){let a=vr.get(o.strings);return a===void 0&&vr.set(o.strings,a=new ne(o)),a}k(o){De(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(Se()),this.O(Se()),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=_,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=_}_$AI(o,a=this,i,c){let l=this.strings,s=!1;if(l===void 0)o=Ft(this,o,a,0),s=!re(o)||o!==this._$AH&&o!==ae,s&&(this._$AH=o);else{let p=o,y,m;for(o=l[0],y=0;y<l.length-1;y++)m=Ft(this,p[i+y],a,y),m===ae&&(m=this._$AH[y]),s||=!re(m)||m!==this._$AH[y],m===_?o=_:o!==_&&(o+=(m??"")+l[y+1]),this._$AH[y]=m}s&&!c&&this.j(o)}j(o){o===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}},ze=class extends Kt{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===_?void 0:o}},ke=class extends Kt{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==_)}},Te=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)??_)===ae)return;let i=this._$AH,c=o===_&&i!==_||o.capture!==i.capture||o.once!==i.once||o.passive!==i.passive,l=o!==_&&(i===_||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)}},He=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 _a=_e.litHtmlPolyfillSupport;_a?.(ne,Oe),(_e.litHtmlVersions??=[]).push("3.3.0");var $r=Symbol.for(""),Da=e=>{if(e?.r===$r)return e?._$litStatic$},Ge=e=>({_$litStatic$:e,r:$r});var Ir=new Map,Ze=e=>(o,...a)=>{let i=a.length,c,l,s=[],p=[],y,m=0,O=!1;for(;m<i;){for(y=o[m];m<i&&(l=a[m],(c=Da(l))!==void 0);)y+=c+o[++m],O=!0;m!==i&&p.push(l),s.push(y),m++}if(m===i&&s.push(o[i]),O){let b=s.join("$$lit$$");(o=Ir.get(b))===void 0&&(s.raw=s,Ir.set(b,o=s)),a=p}return e(o,...a)},Me=Ze(Rr),Us=Ze(Lr),Gs=Ze(Ar);var Fe=x(pt()),Wr=x(E());var Ct;(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"})(Ct||(Ct={}));var Pr=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},et=class extends Wr.FtLitElement{constructor(){super(...arguments),this.variant=Ct.body1}render(){return this.element?Me`
|
|
486
486
|
<${Ge(this.element)}
|