@fluid-topics/ft-snap-scroll 0.1.18 → 0.2.0
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/build/ft-snap-scroll.inline-styles.js +187 -176
- package/build/ft-snap-scroll.light.js +156 -145
- package/build/ft-snap-scroll.min.js +194 -183
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,i,o,
|
|
1
|
+
!function(t,i,e,o,s,n){var r=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const l={color:i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),primaryColor:i.FtCssVariable.extend("--ft-ripple-primary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary)),secondaryColor:i.FtCssVariable.extend("--ft-ripple-secondary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class a extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
2
2
|
<style>
|
|
3
3
|
.ft-ripple .ft-ripple--effect,
|
|
4
4
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
<div class="ft-ripple--background"></div>
|
|
16
16
|
<div class="ft-ripple--effect"></div>
|
|
17
17
|
</div>
|
|
18
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},
|
|
18
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
var a
|
|
24
|
+
var p;a.elementDefinitions={},a.styles=e.css`
|
|
25
25
|
:host {
|
|
26
26
|
display: contents;
|
|
27
27
|
}
|
|
@@ -40,17 +40,17 @@ var a;l.elementDefinitions={},l.styles=o.css`
|
|
|
40
40
|
.ft-ripple .ft-ripple--effect {
|
|
41
41
|
position: absolute;
|
|
42
42
|
opacity: 0;
|
|
43
|
-
background-color: ${
|
|
43
|
+
background-color: ${l.color};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
47
47
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
48
|
-
background-color: ${
|
|
48
|
+
background-color: ${l.secondaryColor};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
52
52
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
53
|
-
background-color: ${
|
|
53
|
+
background-color: ${l.primaryColor};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.ft-ripple .ft-ripple--background {
|
|
@@ -81,57 +81,57 @@ var a;l.elementDefinitions={},l.styles=o.css`
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
84
|
-
opacity: ${
|
|
84
|
+
opacity: ${l.opacityContentOnSurfaceHover};
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
88
|
-
opacity: ${
|
|
88
|
+
opacity: ${l.opacityContentOnSurfaceSelected};
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
92
|
-
opacity: ${
|
|
92
|
+
opacity: ${l.opacityContentOnSurfaceFocused};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
96
|
-
opacity: ${
|
|
96
|
+
opacity: ${l.opacityContentOnSurfacePressed};
|
|
97
97
|
transform: translate(-50%, -50%) scale(1);
|
|
98
98
|
}
|
|
99
|
-
`,
|
|
99
|
+
`,r([o.property({type:Boolean})],a.prototype,"primary",void 0),r([o.property({type:Boolean})],a.prototype,"secondary",void 0),r([o.property({type:Boolean})],a.prototype,"unbounded",void 0),r([o.property({type:Boolean})],a.prototype,"activated",void 0),r([o.property({type:Boolean})],a.prototype,"selected",void 0),r([o.property({type:Boolean})],a.prototype,"disabled",void 0),r([o.state()],a.prototype,"hovered",void 0),r([o.state()],a.prototype,"focused",void 0),r([o.state()],a.prototype,"pressed",void 0),r([o.state()],a.prototype,"rippling",void 0),r([o.state()],a.prototype,"rippleSize",void 0),r([o.state()],a.prototype,"originX",void 0),r([o.state()],a.prototype,"originY",void 0),r([o.query(".ft-ripple")],a.prototype,"ripple",void 0),r([o.query(".ft-ripple--effect")],a.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(a);const h=globalThis.trustedTypes,f=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,c=`lit$${(Math.random()+"").slice(9)}$`,d="?"+c,u=`<${d}>`,x=document,g=(t="")=>x.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,$=/>/g,w=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,z=/'/g,k=/"/g,S=/^(?:script|style|textarea|title)$/i,O=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),C=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),T=new WeakMap,E=x.createTreeWalker(x,129,null,!1),N=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=v;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===v?"!--"===a[1]?r=m:void 0!==a[1]?r=$:void 0!==a[2]?(S.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=w):void 0!==a[3]&&(r=w):r===w?">"===a[0]?(r=null!=s?s:v,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?w:'"'===a[3]?k:z):r===k||r===z?r=w:r===m||r===$?r=v:(r=w,s=void 0);const f=r===w&&t[i+1].startsWith("/>")?" ":"";n+=r===v?e+u:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+c+f):e+c+(-2===p?(o.push(void 0),i):f)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(l):l,o]};class I{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,p]=N(t,i);if(this.el=I.createElement(a,e),E.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=E.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(c)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(c),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?U:"@"===i[1]?Z:A})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(S.test(o.tagName)){const t=o.textContent.split(c),i=t.length-1;if(i>0){o.textContent=h?h.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],g()),E.nextNode(),l.push({type:2,index:++s});o.append(t[i],g())}}}else if(8===o.nodeType)if(o.data===d)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(c,t+1));)l.push({type:7,index:s}),t+=c.length-1}s++}}static createElement(t,i){const e=x.createElement("template");return e.innerHTML=t,e}}function _(t,i,e=t,o){var s,n,r,l;if(i===C)return i;let a=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const p=y(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=_(t,a._$AS(t,i.values),a,o)),i}class B{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:x).importNode(e,!0);E.currentNode=s;let n=E.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new F(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new D(n,this,t)),this.v.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=E.nextNode(),r++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class F{constructor(t,i,e,o){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=_(this,t,i),y(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==C&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return b(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==j&&y(this._$AH)?this._$AA.nextSibling.data=t:this.S(x.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=I.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new B(s,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new I(t)),i}A(t){b(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new F(this.M(g()),this.M(g()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class A{constructor(t,i,e,o,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=_(this,t,i,0),n=!y(t)||t!==this._$AH&&t!==C,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=_(this,o[e+r],i,r),l===C&&(l=this._$AH[r]),n||(n=!y(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.k(t)}k(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends A{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===j?void 0:t}}const R=h?h.emptyScript:"";class U extends A{constructor(){super(...arguments),this.type=4}k(t){t&&t!==j?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class Z extends A{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=_(this,t,i,0))&&void 0!==e?e:j)===C)return;const o=this._$AH,s=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==j&&(o===j||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class D{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){_(this,t)}}const H=window.litHtmlPolyfillSupport;null==H||H(I,F),(null!==(p=globalThis.litHtmlVersions)&&void 0!==p?p:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
100
100
|
/**
|
|
101
101
|
* @license
|
|
102
102
|
* Copyright 2020 Google LLC
|
|
103
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
104
|
*/
|
|
105
|
-
const
|
|
105
|
+
const W=t=>({_$litStatic$:t}),L=new Map,G=(t=>(i,...e)=>{var o;const s=e.length;let n,r;const l=[],a=[];let p,h=0,f=!1;for(;h<s;){for(p=i[h];h<s&&void 0!==(r=e[h],n=null===(o=r)||void 0===o?void 0:o._$litStatic$);)p+=n+i[++h],f=!0;a.push(r),l.push(p),h++}if(h===s&&l.push(i[s]),f){const t=l.join("$$lit$$");void 0===(i=L.get(t))&&(l.raw=l,L.set(t,i=l)),e=a}return t(i,...e)})(O);var K,q=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(K||(K={}));const P=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),V=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),X={fontFamily:V,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=i.FtCssVariable.extend("--ft-typography-title-font-family",P),J=i.FtCssVariable.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=i.FtCssVariable.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),it=i.FtCssVariable.extend("--ft-typography-title-line-height",X.lineHeight,"24px"),et=i.FtCssVariable.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",P),st=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),nt=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),rt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),lt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",X.lineHeight,"24px"),at=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",V),ht=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),ft=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ct=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),dt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"24px"),ut=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",V),gt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),yt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),bt=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),vt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"24px"),mt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t=i.FtCssVariable.extend("--ft-typography-body1-font-family",V),wt=i.FtCssVariable.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),zt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),kt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),St=i.FtCssVariable.extend("--ft-typography-body1-line-height",X.lineHeight,"24px"),Ot=i.FtCssVariable.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit"),Ct=i.FtCssVariable.extend("--ft-typography-body2-font-family",V),jt=i.FtCssVariable.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),Tt=i.FtCssVariable.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),Et=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Nt=i.FtCssVariable.extend("--ft-typography-body2-line-height",X.lineHeight,"20px"),It=i.FtCssVariable.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),_t=i.FtCssVariable.extend("--ft-typography-caption-font-family",V),Bt=i.FtCssVariable.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),Ft=i.FtCssVariable.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),At=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),Mt=i.FtCssVariable.extend("--ft-typography-caption-line-height",X.lineHeight,"16px"),Rt=i.FtCssVariable.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit"),Ut=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",V),Zt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Dt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),Ht=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),Wt=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"16px"),Lt=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),Gt=i.FtCssVariable.extend("--ft-typography-overline-font-family",V),Kt=i.FtCssVariable.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),qt=i.FtCssVariable.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Pt=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Vt=i.FtCssVariable.extend("--ft-typography-overline-line-height",X.lineHeight,"16px"),Xt=i.FtCssVariable.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Yt={fontFamily:i.FtCssVariable.extend("--ft-typography-button-font-family",V),fontSize:i.FtCssVariable.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:i.FtCssVariable.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:i.FtCssVariable.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:i.FtCssVariable.extend("--ft-typography-button-line-height",X.lineHeight,"16px"),textTransform:i.FtCssVariable.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Jt=e.css`
|
|
106
106
|
.ft-typography--title {
|
|
107
107
|
font-family: ${Y};
|
|
108
|
-
font-size: ${
|
|
109
|
-
font-weight: ${
|
|
110
|
-
letter-spacing: ${
|
|
111
|
-
line-height: ${
|
|
112
|
-
text-transform: ${
|
|
108
|
+
font-size: ${J};
|
|
109
|
+
font-weight: ${Q};
|
|
110
|
+
letter-spacing: ${tt};
|
|
111
|
+
line-height: ${it};
|
|
112
|
+
text-transform: ${et};
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`,Qt=e.css`
|
|
115
115
|
.ft-typography--title-dense {
|
|
116
116
|
font-family: ${ot};
|
|
117
|
-
font-size: ${
|
|
118
|
-
font-weight: ${
|
|
119
|
-
letter-spacing: ${
|
|
120
|
-
line-height: ${
|
|
121
|
-
text-transform: ${
|
|
117
|
+
font-size: ${st};
|
|
118
|
+
font-weight: ${nt};
|
|
119
|
+
letter-spacing: ${rt};
|
|
120
|
+
line-height: ${lt};
|
|
121
|
+
text-transform: ${at};
|
|
122
122
|
}
|
|
123
|
-
`,
|
|
123
|
+
`,ti=e.css`
|
|
124
124
|
.ft-typography--subtitle1 {
|
|
125
|
-
font-family: ${
|
|
125
|
+
font-family: ${pt};
|
|
126
126
|
font-size: ${ht};
|
|
127
|
-
font-weight: ${
|
|
128
|
-
letter-spacing: ${
|
|
129
|
-
line-height: ${
|
|
130
|
-
text-transform: ${
|
|
127
|
+
font-weight: ${ft};
|
|
128
|
+
letter-spacing: ${ct};
|
|
129
|
+
line-height: ${dt};
|
|
130
|
+
text-transform: ${ut};
|
|
131
131
|
}
|
|
132
|
-
`,
|
|
132
|
+
`,ii=e.css`
|
|
133
133
|
.ft-typography--subtitle2 {
|
|
134
|
-
font-family: ${
|
|
134
|
+
font-family: ${xt};
|
|
135
135
|
font-size: ${gt};
|
|
136
136
|
font-weight: ${yt};
|
|
137
137
|
letter-spacing: ${bt};
|
|
@@ -139,52 +139,52 @@ const L=t=>({_$litStatic$:t}),U=new Map,W=(t=>(i,...o)=>{var e;const s=o.length;
|
|
|
139
139
|
text-transform: ${mt};
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
`,
|
|
142
|
+
`,ei=e.css`
|
|
143
143
|
.ft-typography--body1 {
|
|
144
|
-
font-family: ${
|
|
145
|
-
font-size: ${
|
|
146
|
-
font-weight: ${
|
|
147
|
-
letter-spacing: ${
|
|
148
|
-
line-height: ${
|
|
149
|
-
text-transform: ${
|
|
144
|
+
font-family: ${$t};
|
|
145
|
+
font-size: ${wt};
|
|
146
|
+
font-weight: ${zt};
|
|
147
|
+
letter-spacing: ${kt};
|
|
148
|
+
line-height: ${St};
|
|
149
|
+
text-transform: ${Ot};
|
|
150
150
|
}
|
|
151
|
-
`,oi=
|
|
151
|
+
`,oi=e.css`
|
|
152
152
|
.ft-typography--body2 {
|
|
153
|
-
font-family: ${
|
|
154
|
-
font-size: ${
|
|
153
|
+
font-family: ${Ct};
|
|
154
|
+
font-size: ${jt};
|
|
155
155
|
font-weight: ${Tt};
|
|
156
156
|
letter-spacing: ${Et};
|
|
157
|
-
line-height: ${
|
|
158
|
-
text-transform: ${
|
|
157
|
+
line-height: ${Nt};
|
|
158
|
+
text-transform: ${It};
|
|
159
159
|
}
|
|
160
|
-
`,
|
|
160
|
+
`,si=e.css`
|
|
161
161
|
.ft-typography--caption {
|
|
162
|
-
font-family: ${
|
|
163
|
-
font-size: ${
|
|
164
|
-
font-weight: ${
|
|
165
|
-
letter-spacing: ${
|
|
166
|
-
line-height: ${
|
|
167
|
-
text-transform: ${
|
|
162
|
+
font-family: ${_t};
|
|
163
|
+
font-size: ${Bt};
|
|
164
|
+
font-weight: ${Ft};
|
|
165
|
+
letter-spacing: ${At};
|
|
166
|
+
line-height: ${Mt};
|
|
167
|
+
text-transform: ${Rt};
|
|
168
168
|
}
|
|
169
|
-
`,
|
|
169
|
+
`,ni=e.css`
|
|
170
170
|
.ft-typography--breadcrumb {
|
|
171
|
-
font-family: ${
|
|
172
|
-
font-size: ${
|
|
173
|
-
font-weight: ${
|
|
174
|
-
letter-spacing: ${
|
|
175
|
-
line-height: ${
|
|
176
|
-
text-transform: ${
|
|
171
|
+
font-family: ${Ut};
|
|
172
|
+
font-size: ${Zt};
|
|
173
|
+
font-weight: ${Dt};
|
|
174
|
+
letter-spacing: ${Ht};
|
|
175
|
+
line-height: ${Wt};
|
|
176
|
+
text-transform: ${Lt};
|
|
177
177
|
}
|
|
178
|
-
`,
|
|
178
|
+
`,ri=e.css`
|
|
179
179
|
.ft-typography--overline {
|
|
180
|
-
font-family: ${
|
|
181
|
-
font-size: ${
|
|
182
|
-
font-weight: ${
|
|
180
|
+
font-family: ${Gt};
|
|
181
|
+
font-size: ${Kt};
|
|
182
|
+
font-weight: ${qt};
|
|
183
183
|
letter-spacing: ${Pt};
|
|
184
184
|
line-height: ${Vt};
|
|
185
185
|
text-transform: ${Xt};
|
|
186
186
|
}
|
|
187
|
-
`,
|
|
187
|
+
`,li=e.css`
|
|
188
188
|
.ft-typography--button {
|
|
189
189
|
font-family: ${Yt.fontFamily};
|
|
190
190
|
font-size: ${Yt.fontSize};
|
|
@@ -193,44 +193,18 @@ const L=t=>({_$litStatic$:t}),U=new Map,W=(t=>(i,...o)=>{var e;const s=o.length;
|
|
|
193
193
|
line-height: ${Yt.lineHeight};
|
|
194
194
|
text-transform: ${Yt.textTransform};
|
|
195
195
|
}
|
|
196
|
-
`;class
|
|
197
|
-
<${
|
|
196
|
+
`;class ai extends i.FtLitElement{constructor(){super(...arguments),this.variant=K.body1}render(){return this.element?G`
|
|
197
|
+
<${W(this.element)}
|
|
198
198
|
class="ft-typography ft-typography--${this.variant}">
|
|
199
199
|
<slot></slot>
|
|
200
|
-
</${
|
|
201
|
-
`:
|
|
200
|
+
</${W(this.element)}>
|
|
201
|
+
`:G`
|
|
202
202
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
203
|
-
`}}
|
|
203
|
+
`}}ai.styles=[Jt,Qt,ti,ii,ei,oi,si,ni,ri,li,e.css`
|
|
204
204
|
.ft-typography {
|
|
205
205
|
vertical-align: inherit;
|
|
206
206
|
}
|
|
207
|
-
`],
|
|
208
|
-
/**
|
|
209
|
-
* @license
|
|
210
|
-
* Copyright 2021 Google LLC
|
|
211
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
212
|
-
*/
|
|
213
|
-
const ai=o.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
214
|
-
/**
|
|
215
|
-
* @license
|
|
216
|
-
* Copyright 2018 Google LLC
|
|
217
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
218
|
-
*/;let hi=class extends o.LitElement{render(){return o.html`<span><slot></slot></span>`}};hi.styles=[ai],hi=
|
|
219
|
-
/*! *****************************************************************************
|
|
220
|
-
Copyright (c) Microsoft Corporation.
|
|
221
|
-
|
|
222
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
223
|
-
purpose with or without fee is hereby granted.
|
|
224
|
-
|
|
225
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
226
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
227
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
228
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
229
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
230
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
231
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
232
|
-
***************************************************************************** */
|
|
233
|
-
function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,o,r):s(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r}([e.customElement("mwc-icon")],hi);var pi=function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,o,r):s(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};const fi=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),ci=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),di=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),ui=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),gi=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class yi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return o.html`
|
|
207
|
+
`],q([o.property()],ai.prototype,"element",void 0),q([o.property()],ai.prototype,"variant",void 0),i.customElement("ft-typography")(ai);var pi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const hi=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),fi=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),ci=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),di=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),ui=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class xi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
234
208
|
<div part="container"
|
|
235
209
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
236
210
|
@mouseenter=${this.onHover}
|
|
@@ -245,7 +219,7 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
245
219
|
</div>
|
|
246
220
|
<slot></slot>
|
|
247
221
|
</div>
|
|
248
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),
|
|
222
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=i.height+"px",s.left=o+"px";break;case"left":s.top=e+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=e+"px",s.left=i.width+"px"}s.maxWidth=Math.max(i.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}xi.elementDefinitions={"ft-typography":ai},xi.styles=e.css`
|
|
249
223
|
.ft-tooltip--container {
|
|
250
224
|
display: block;
|
|
251
225
|
position: relative;
|
|
@@ -263,21 +237,21 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
263
237
|
width: max-content;
|
|
264
238
|
max-width: 150px;
|
|
265
239
|
text-align: center;
|
|
266
|
-
padding: ${
|
|
267
|
-
z-index: ${
|
|
240
|
+
padding: ${hi};
|
|
241
|
+
z-index: ${di};
|
|
268
242
|
}
|
|
269
243
|
|
|
270
244
|
.ft-tooltip--content {
|
|
271
245
|
padding: 4px 8px;
|
|
272
|
-
border-radius: ${
|
|
273
|
-
background-color: ${
|
|
274
|
-
color: ${
|
|
246
|
+
border-radius: ${ui};
|
|
247
|
+
background-color: ${ci};
|
|
248
|
+
color: ${fi};
|
|
275
249
|
top: -500px;
|
|
276
250
|
left: -500px;
|
|
277
251
|
position: relative;
|
|
278
252
|
word-break: break-word;
|
|
279
253
|
}
|
|
280
|
-
`,pi([
|
|
254
|
+
`,pi([o.property()],xi.prototype,"text",void 0),pi([o.property({type:Boolean})],xi.prototype,"manual",void 0),pi([o.property({type:Boolean})],xi.prototype,"inline",void 0),pi([o.property({type:Number})],xi.prototype,"delay",void 0),pi([o.property()],xi.prototype,"position",void 0),pi([o.queryAssignedNodes("",!0)],xi.prototype,"slotNodes",void 0),pi([o.query(".ft-tooltip--container")],xi.prototype,"container",void 0),pi([o.query("slot")],xi.prototype,"target",void 0),pi([o.query(".ft-tooltip")],xi.prototype,"tooltip",void 0),pi([o.query(".ft-tooltip--content")],xi.prototype,"tooltipContent",void 0),pi([o.state()],xi.prototype,"visible",void 0),i.customElement("ft-tooltip")(xi);const gi={color:i.FtCssVariable.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class yi extends i.FtLitElement{static get styles(){return e.css`
|
|
281
255
|
:host {
|
|
282
256
|
line-height: 0;
|
|
283
257
|
}
|
|
@@ -286,8 +260,8 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
286
260
|
display: inline-block;
|
|
287
261
|
position: relative;
|
|
288
262
|
|
|
289
|
-
width: ${
|
|
290
|
-
height: ${
|
|
263
|
+
width: ${gi.size};
|
|
264
|
+
height: ${gi.size};
|
|
291
265
|
}
|
|
292
266
|
|
|
293
267
|
.ft-loader div {
|
|
@@ -296,7 +270,7 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
296
270
|
width: 25%;
|
|
297
271
|
height: 25%;
|
|
298
272
|
border-radius: 50%;
|
|
299
|
-
background: ${
|
|
273
|
+
background: ${gi.color};
|
|
300
274
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
301
275
|
}
|
|
302
276
|
|
|
@@ -343,17 +317,55 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
343
317
|
transform: translate(0, 0);
|
|
344
318
|
}
|
|
345
319
|
100% {
|
|
346
|
-
transform: translate(calc(0.35 * ${
|
|
320
|
+
transform: translate(calc(0.35 * ${gi.size}), 0);
|
|
347
321
|
}
|
|
348
322
|
}
|
|
349
|
-
`}render(){return
|
|
323
|
+
`}render(){return e.html`
|
|
350
324
|
<div class="ft-loader">
|
|
351
325
|
<div></div>
|
|
352
326
|
<div></div>
|
|
353
327
|
<div></div>
|
|
354
328
|
<div></div>
|
|
355
329
|
</div>
|
|
356
|
-
`}}i.customElement("ft-loader")(vi);var mi=function(t,i,o
|
|
330
|
+
`}}var bi,vi;i.customElement("ft-loader")(yi),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(bi||(bi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(vi||(vi={})),new Map([...["abw"].map((t=>[t,vi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,vi.AUDIO])),...["avi"].map((t=>[t,vi.AVI])),...["chm","xhs"].map((t=>[t,vi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,vi.CODE])),...["csv"].map((t=>[t,vi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,vi.DITA])),...["epub"].map((t=>[t,vi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,vi.EXCEL])),...["flac"].map((t=>[t,vi.FLAC])),...["gif"].map((t=>[t,vi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,vi.GZIP])),...["html","htm","xhtml"].map((t=>[t,vi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,vi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,vi.JPEG])),...["json"].map((t=>[t,vi.JSON])),...["m4a","m4p"].map((t=>[t,vi.M4A])),...["mov","qt"].map((t=>[t,vi.MOV])),...["mp3"].map((t=>[t,vi.MP3])),...["mp4","m4v"].map((t=>[t,vi.MP4])),...["ogg","oga"].map((t=>[t,vi.OGG])),...["pdf","ps"].map((t=>[t,vi.PDF])),...["png"].map((t=>[t,vi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,vi.POWERPOINT])),...["rar"].map((t=>[t,vi.RAR])),...["stp"].map((t=>[t,vi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,vi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,vi.VIDEO])),...["wav"].map((t=>[t,vi.WAV])),...["wma"].map((t=>[t,vi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,vi.WORD])),...["xml","xsl","rdf"].map((t=>[t,vi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,vi.YAML])),...["zip"].map((t=>[t,vi.ZIP]))]);var mi,$i=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(mi||(mi={}));const wi={size:i.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariable.extend("--ft-icon-file-format-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariable.extend("--ft-icon-material-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class zi extends i.FtLitElement{constructor(){super(...arguments),this.variant=mi.fluid_topics}render(){return e.html`
|
|
331
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
332
|
+
${n.unsafeHTML(this.getIcon())}
|
|
333
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
334
|
+
</i>
|
|
335
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}getIcon(){var t,i;let o=this.textContent;return this.variant===mi.file_format?null!==(t=vi[o.toUpperCase()])&&void 0!==t?t:o:this.variant===mi.fluid_topics?null!==(i=bi[o.toUpperCase()])&&void 0!==i?i:o:e.nothing}}zi.elementDefinitions={},zi.styles=e.css`
|
|
336
|
+
:host, i.ft-icon {
|
|
337
|
+
display: inline-block;
|
|
338
|
+
width: ${wi.size};
|
|
339
|
+
height: ${wi.size};
|
|
340
|
+
text-align: center;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
i.ft-icon {
|
|
344
|
+
font-size: ${wi.size};
|
|
345
|
+
line-height: 1;
|
|
346
|
+
font-weight: normal;
|
|
347
|
+
text-transform: none;
|
|
348
|
+
font-style: normal;
|
|
349
|
+
font-variant: normal;
|
|
350
|
+
speak: none;
|
|
351
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
352
|
+
text-rendering: auto;
|
|
353
|
+
-webkit-font-smoothing: antialiased;
|
|
354
|
+
-moz-osx-font-smoothing: grayscale;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.ft-icon--fluid-topics {
|
|
358
|
+
font-family: ${wi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.ft-icon--file-format {
|
|
362
|
+
font-family: ${wi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.ft-icon--material {
|
|
366
|
+
font-family: ${wi.materialFontFamily}, "Material Icons", sans-serif;
|
|
367
|
+
}
|
|
368
|
+
`,$i([o.property()],zi.prototype,"variant",void 0),$i([o.query("slot")],zi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(zi);var ki=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const Si=i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Oi={backgroundColor:i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Si,fontSize:i.FtCssVariable.extend("--ft-button-font-size",Yt.fontSize),iconSize:i.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariable.extend("--ft-button-ripple-color",Si),opacityDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Ci=i.FtCssVariable.extend("--ft-button-primary-color",i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),ji={backgroundColor:i.FtCssVariable.extend("--ft-button-primary-background-color",i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Ci,rippleColor:i.FtCssVariable.extend("--ft-button-primary-ripple-color",Ci)},Ti=i.FtCssVariable.extend("--ft-button-dense-border-radius",i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Ei extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[i.noTextSelect,e.css`
|
|
357
369
|
:host {
|
|
358
370
|
display: inline-block;
|
|
359
371
|
max-width: 100%;
|
|
@@ -392,18 +404,18 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
392
404
|
border: none;
|
|
393
405
|
pointer-events: auto;
|
|
394
406
|
|
|
395
|
-
--ft-button-internal-font-size: ${
|
|
407
|
+
--ft-button-internal-font-size: ${Oi.fontSize};
|
|
396
408
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
397
|
-
--ft-button-internal-color: ${
|
|
398
|
-
|
|
409
|
+
--ft-button-internal-color: ${Oi.color};
|
|
410
|
+
${i.setVariable(wi.size,Oi.iconSize)};
|
|
399
411
|
--ft-button-internal-vertical-padding: 6px;
|
|
400
412
|
--ft-button-internal-horizontal-padding: 8px;
|
|
401
|
-
${i.setVariable(
|
|
402
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height),
|
|
413
|
+
${i.setVariable(l.color,Oi.rippleColor)};
|
|
414
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Oi.iconSize});
|
|
403
415
|
|
|
404
|
-
border-radius: ${
|
|
416
|
+
border-radius: ${Oi.borderRadius};
|
|
405
417
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
406
|
-
background-color: ${
|
|
418
|
+
background-color: ${Oi.backgroundColor};
|
|
407
419
|
color: var(--ft-button-internal-color);
|
|
408
420
|
-webkit-mask-image: radial-gradient(white, black);
|
|
409
421
|
}
|
|
@@ -415,7 +427,7 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
415
427
|
.ft-button--dense {
|
|
416
428
|
--ft-button-internal-vertical-padding: 2px;
|
|
417
429
|
--ft-button-internal-horizontal-padding: 4px;
|
|
418
|
-
border-radius: ${
|
|
430
|
+
border-radius: ${Ti};
|
|
419
431
|
}
|
|
420
432
|
|
|
421
433
|
.ft-button--round {
|
|
@@ -424,13 +436,13 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
424
436
|
|
|
425
437
|
.ft-button[disabled] {
|
|
426
438
|
filter: grayscale(1);
|
|
427
|
-
opacity: ${
|
|
439
|
+
opacity: ${Oi.opacityDisabled};
|
|
428
440
|
}
|
|
429
441
|
|
|
430
442
|
.ft-button.ft-button--primary {
|
|
431
|
-
background-color: ${
|
|
432
|
-
--ft-button-internal-color: ${
|
|
433
|
-
${i.setVariable(
|
|
443
|
+
background-color: ${ji.backgroundColor};
|
|
444
|
+
--ft-button-internal-color: ${ji.color};
|
|
445
|
+
${i.setVariable(l.color,ji.rippleColor)};
|
|
434
446
|
}
|
|
435
447
|
|
|
436
448
|
.ft-button.ft-button--outlined {
|
|
@@ -466,26 +478,25 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
466
478
|
display: none;
|
|
467
479
|
}
|
|
468
480
|
|
|
469
|
-
|
|
481
|
+
ft-icon {
|
|
470
482
|
flex-shrink: 0;
|
|
471
|
-
width: var(--mdc-icon-size);
|
|
472
483
|
}
|
|
473
484
|
|
|
474
|
-
.ft-button--label[hidden] +
|
|
485
|
+
.ft-button--label[hidden] + ft-icon {
|
|
475
486
|
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
476
487
|
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
477
488
|
}
|
|
478
489
|
|
|
479
|
-
.ft-button:not(.ft-button--trailing-icon)
|
|
490
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
480
491
|
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
481
492
|
order: -1;
|
|
482
493
|
}
|
|
483
494
|
|
|
484
495
|
ft-loader {
|
|
485
|
-
${i.setVariable(
|
|
486
|
-
${i.setVariable(
|
|
496
|
+
${i.setVariable(gi.size,Oi.iconSize)};
|
|
497
|
+
${i.setVariable(gi.color,"var(--ft-button-internal-color)")};
|
|
487
498
|
}
|
|
488
|
-
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltip(
|
|
499
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltip(e.html`
|
|
489
500
|
<button part="button"
|
|
490
501
|
class="${s.classMap(t)}"
|
|
491
502
|
aria-label="${this.getLabel()}"
|
|
@@ -499,23 +510,23 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
499
510
|
</ft-typography>
|
|
500
511
|
${this.resolveIcon()}
|
|
501
512
|
</button>
|
|
502
|
-
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:
|
|
513
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:e.html`
|
|
503
514
|
<ft-tooltip part="tooltip"
|
|
504
515
|
text="${this.getLabel()}"
|
|
505
516
|
position="${this.tooltipPosition}">
|
|
506
517
|
${t}
|
|
507
518
|
</ft-tooltip>
|
|
508
|
-
`}resolveIcon(){return this.loading?
|
|
509
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
510
|
-
<
|
|
519
|
+
`}resolveIcon(){return this.loading?e.html`
|
|
520
|
+
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
521
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ei.elementDefinitions={"ft-ripple":a,"ft-tooltip":xi,"ft-typography":ai,"ft-icon":zi,"ft-loader":yi},ki([o.property({type:Boolean})],Ei.prototype,"primary",void 0),ki([o.property({type:Boolean})],Ei.prototype,"outlined",void 0),ki([o.property({type:Boolean})],Ei.prototype,"disabled",void 0),ki([o.property({type:Boolean})],Ei.prototype,"dense",void 0),ki([o.property({type:Boolean})],Ei.prototype,"round",void 0),ki([o.property({type:String})],Ei.prototype,"label",void 0),ki([o.property({type:String})],Ei.prototype,"icon",void 0),ki([o.property({type:Boolean})],Ei.prototype,"trailingIcon",void 0),ki([o.property({type:Boolean})],Ei.prototype,"loading",void 0),ki([o.property({type:String})],Ei.prototype,"tooltipPosition",void 0),ki([o.query(".ft-button")],Ei.prototype,"button",void 0),ki([o.query(".ft-button--label slot")],Ei.prototype,"slottedContent",void 0),i.customElement("ft-button")(Ei);var Ni=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const Ii={buttonsColor:i.FtCssVariable.extend("--ft-snap-scroll-buttons-color",i.designSystemVariables.colorPrimary),buttonsZIndex:i.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:i.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:i.FtCssVariable.external(i.designSystemVariables.colorSurface,"Design system")};class _i extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class Bi extends i.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new i.Debouncer(200),this.updateScrollDebouncer=new i.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let i=this.elements[t];if(i){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(i[this.offsetAttribute]<e||i[this.offsetAttribute]+i[this.sizeAttribute]>t)&&this.scrollToElement(i)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=s.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":i.isSafari}),o=this.controls&&this.withScroll;return e.html`
|
|
511
522
|
<div part="container" class="${t}">
|
|
512
523
|
<ft-button
|
|
513
524
|
class="ft-snap-scroll--previous"
|
|
514
525
|
part="controls"
|
|
515
526
|
primary
|
|
516
527
|
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
517
|
-
?hidden=${!
|
|
518
|
-
?disabled=${!
|
|
528
|
+
?hidden=${!o||this.startReached}
|
|
529
|
+
?disabled=${!o||this.startReached}
|
|
519
530
|
@click=${this.previous}
|
|
520
531
|
></ft-button>
|
|
521
532
|
<slot class="ft-snap-scroll--content"
|
|
@@ -526,12 +537,12 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
526
537
|
part="controls"
|
|
527
538
|
primary
|
|
528
539
|
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
529
|
-
?hidden=${!
|
|
530
|
-
?disabled=${!
|
|
540
|
+
?hidden=${!o||this.endReached}
|
|
541
|
+
?disabled=${!o||this.endReached}
|
|
531
542
|
@click=${this.next}
|
|
532
543
|
></ft-button>
|
|
533
544
|
</div>
|
|
534
|
-
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
545
|
+
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new _i(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const i=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<i&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var i,e;t&&(this.horizontal?null===(i=this.contentSlot)||void 0===i||i.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(e=this.contentSlot)||void 0===e||e.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,i;this.elements=null!==(i=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==i?i:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let i=0;i<this.elements.length;i++)(t<0||this.getDistanceFromStart(this.elements[i])<this.getDistanceFromStart(this.elements[t]))&&(t=i);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const i=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-i)}}Bi.elementDefinitions={"ft-button":Ei},Bi.styles=e.css`
|
|
535
546
|
.ft-snap-scroll {
|
|
536
547
|
box-sizing: border-box;
|
|
537
548
|
position: relative;
|
|
@@ -566,7 +577,7 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
566
577
|
flex-wrap: nowrap;
|
|
567
578
|
align-items: flex-start;
|
|
568
579
|
justify-content: flex-start;
|
|
569
|
-
gap: ${
|
|
580
|
+
gap: ${Ii.gap};
|
|
570
581
|
}
|
|
571
582
|
|
|
572
583
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -609,11 +620,11 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
609
620
|
.ft-snap-scroll--next {
|
|
610
621
|
position: absolute;
|
|
611
622
|
display: flex;
|
|
612
|
-
z-index: ${
|
|
623
|
+
z-index: ${Ii.buttonsZIndex};
|
|
613
624
|
opacity: 1;
|
|
614
625
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
615
|
-
${i.setVariable(
|
|
616
|
-
${i.setVariable(
|
|
626
|
+
${i.setVariable(Oi.backgroundColor,"transparent")};
|
|
627
|
+
${i.setVariable(Oi.color,Ii.buttonsColor)};
|
|
617
628
|
}
|
|
618
629
|
|
|
619
630
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -626,34 +637,34 @@ function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnP
|
|
|
626
637
|
top: 0;
|
|
627
638
|
left: -1px;
|
|
628
639
|
bottom: 0;
|
|
629
|
-
background: linear-gradient(to right, ${
|
|
640
|
+
background: linear-gradient(to right, ${Ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
630
641
|
}
|
|
631
642
|
|
|
632
643
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
633
644
|
top: -1px;
|
|
634
645
|
left: 0;
|
|
635
646
|
right: 0;
|
|
636
|
-
background: linear-gradient(to bottom, ${
|
|
647
|
+
background: linear-gradient(to bottom, ${Ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
637
648
|
}
|
|
638
649
|
|
|
639
650
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
640
651
|
top: 0;
|
|
641
652
|
right: -1px;
|
|
642
653
|
bottom: 0;
|
|
643
|
-
background: linear-gradient(to left, ${
|
|
654
|
+
background: linear-gradient(to left, ${Ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
644
655
|
}
|
|
645
656
|
|
|
646
657
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
647
658
|
left: 0;
|
|
648
659
|
right: 0;
|
|
649
660
|
bottom: -1px;
|
|
650
|
-
background: linear-gradient(to top, ${
|
|
661
|
+
background: linear-gradient(to top, ${Ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
651
662
|
}
|
|
652
663
|
|
|
653
664
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
654
665
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
655
666
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
656
667
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
657
|
-
background-color: ${
|
|
668
|
+
background-color: ${Ii.colorSurface};
|
|
658
669
|
}
|
|
659
|
-
`,
|
|
670
|
+
`,Ni([o.property({type:Boolean})],Bi.prototype,"horizontal",void 0),Ni([o.property({type:Boolean})],Bi.prototype,"hideScrollbar",void 0),Ni([o.property({type:Boolean})],Bi.prototype,"controls",void 0),Ni([o.property({type:Boolean})],Bi.prototype,"limitSize",void 0),Ni([o.state()],Bi.prototype,"elements",void 0),Ni([o.state()],Bi.prototype,"currentElement",void 0),Ni([o.state()],Bi.prototype,"withScroll",void 0),Ni([o.state()],Bi.prototype,"startReached",void 0),Ni([o.state()],Bi.prototype,"endReached",void 0),Ni([o.query(".ft-snap-scroll--content")],Bi.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(Bi),t.CurrentElementChange=_i,t.FtSnapScroll=Bi,t.FtSnapScrollCssVariables=Ii,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|