@fluid-topics/ft-floating-menu 1.0.51 → 1.0.52
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-floating-menu.css.js +10 -23
- package/build/ft-floating-menu.d.ts +9 -4
- package/build/ft-floating-menu.js +61 -14
- package/build/ft-floating-menu.light.js +81 -95
- package/build/ft-floating-menu.min.js +53 -67
- package/build/ft-floating-menu.properties.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
!function(t,i,e,o,n,s){const r={zIndex:i.FtCssVariableFactory.create("--ft-floating-menu-z-index","NUMBER","8"),maxWidth:i.FtCssVariableFactory.create("--ft-floating-menu-max-width","SIZE","300px"),maxHeight:i.FtCssVariableFactory.create("--ft-floating-menu-max-height","SIZE","500px"),textColor:i.FtCssVariableFactory.extend("--ft-floating-menu-text-color",i.designSystemVariables.colorOnSurfaceHigh),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),menuElevation:i.FtCssVariableFactory.external(i.designSystemVariables.elevation02,"Design system"),borderRadiusS:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system")},l=e.css`
|
|
2
2
|
.ft-floating-menu {
|
|
3
3
|
color: ${r.textColor};
|
|
4
|
-
position: relative;
|
|
5
4
|
display: inline-block;
|
|
6
5
|
}
|
|
7
6
|
|
|
7
|
+
.ft-floating-menu--wrapper {
|
|
8
|
+
position: absolute;
|
|
9
|
+
visibility: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ft-floating-menu--wrapper.ft-floating-menu--wrapper-positioned {
|
|
13
|
+
visibility: visible;
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
.ft-floating-menu--options {
|
|
9
17
|
display: none;
|
|
10
|
-
position:
|
|
18
|
+
position: relative;
|
|
11
19
|
overflow: auto;
|
|
12
20
|
max-width: ${r.maxWidth};
|
|
13
21
|
max-height: ${r.maxHeight};
|
|
@@ -21,28 +29,7 @@
|
|
|
21
29
|
.ft-floating-menu--open .ft-floating-menu--options {
|
|
22
30
|
display: block;
|
|
23
31
|
}
|
|
24
|
-
|
|
25
|
-
.ft-floating-menu--left .ft-floating-menu--options {
|
|
26
|
-
left: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.ft-floating-menu--right .ft-floating-menu--options {
|
|
30
|
-
right: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.ft-floating-menu--center .ft-floating-menu--options {
|
|
34
|
-
left: 50%;
|
|
35
|
-
transform: translateX(-50%);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.ft-floating-menu--top .ft-floating-menu--options {
|
|
39
|
-
bottom: calc(100% + 4px);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ft-floating-menu--bottom .ft-floating-menu--options {
|
|
43
|
-
top: calc(100% + 4px);
|
|
44
|
-
}
|
|
45
|
-
`,a=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),p={color:a,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",a),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},f=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),h=f,d=i.FtCssVariableFactory.extend("--ft-ripple-background-color",f),c=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),u=c,x=i.FtCssVariableFactory.extend("--ft-ripple-background-color",c),g=e.css`
|
|
32
|
+
`,a=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),p={color:a,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",a),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},h=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),f=h,d=i.FtCssVariableFactory.extend("--ft-ripple-background-color",h),c=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),u=c,x=i.FtCssVariableFactory.extend("--ft-ripple-background-color",c),g=e.css`
|
|
46
33
|
:host {
|
|
47
34
|
display: contents;
|
|
48
35
|
}
|
|
@@ -85,7 +72,7 @@
|
|
|
85
72
|
}
|
|
86
73
|
|
|
87
74
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
88
|
-
background-color: ${
|
|
75
|
+
background-color: ${f};
|
|
89
76
|
}
|
|
90
77
|
|
|
91
78
|
.ft-ripple .ft-ripple--background {
|
|
@@ -149,15 +136,15 @@
|
|
|
149
136
|
<div class="ft-ripple--background"></div>
|
|
150
137
|
<div class="ft-ripple--effect"></div>
|
|
151
138
|
</div>
|
|
152
|
-
`}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){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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"),n=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",n),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",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}v.elementDefinitions={},v.styles=g,b([o.property({type:Boolean})],v.prototype,"primary",void 0),b([o.property({type:Boolean})],v.prototype,"secondary",void 0),b([o.property({type:Boolean})],v.prototype,"unbounded",void 0),b([o.property({type:Boolean})],v.prototype,"activated",void 0),b([o.property({type:Boolean})],v.prototype,"selected",void 0),b([o.property({type:Boolean})],v.prototype,"disabled",void 0),b([o.state()],v.prototype,"hovered",void 0),b([o.state()],v.prototype,"focused",void 0),b([o.state()],v.prototype,"pressed",void 0),b([o.state()],v.prototype,"rippling",void 0),b([o.state()],v.prototype,"rippleSize",void 0),b([o.state()],v.prototype,"originX",void 0),b([o.state()],v.prototype,"originY",void 0),b([o.query(".ft-ripple")],v.prototype,"ripple",void 0),b([o.query(".ft-ripple--effect")],v.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(v);const m=window,$=m.trustedTypes,w=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,k="$lit$",z=`lit$${(Math.random()+"").slice(9)}$`,S="?"+z,C=`<${S}>`,E=document,O=()=>E.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,I="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,B=/>/g,M=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,Z=/"/g,_=/^(?:script|style|textarea|title)$/i,U=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),W=new WeakMap,H=E.createTreeWalker(E,129,null,!1),P=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=T;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,f=0;for(;f<e.length&&(r.lastIndex=f,a=r.exec(e),null!==a);)f=r.lastIndex,r===T?"!--"===a[1]?r=A:void 0!==a[1]?r=B:void 0!==a[2]?(_.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=M):void 0!==a[3]&&(r=M):r===M?">"===a[0]?(r=null!=n?n:T,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?M:'"'===a[3]?Z:F):r===Z||r===F?r=M:r===A||r===B?r=T:(r=M,n=void 0);const h=r===M&&t[i+1].startsWith("/>")?" ":"";s+=r===T?e+C:p>=0?(o.push(l),e.slice(0,p)+k+e.slice(p)+z+h):e+z+(-2===p?(o.push(void 0),i):h)}const l=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(l):l,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,p]=P(t,i);if(this.el=K.createElement(a,e),H.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=H.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(k)||i.startsWith(z)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+k).split(z),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?X:"?"===i[1]?J:"@"===i[1]?Q:q})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(_.test(o.tagName)){const t=o.textContent.split(z),i=t.length-1;if(i>0){o.textContent=$?$.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),H.nextNode(),l.push({type:2,index:++n});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===S)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(z,t+1));)l.push({type:7,index:n}),t+=z.length-1}n++}}static createElement(t,i){const e=E.createElement("template");return e.innerHTML=t,e}}function L(t,i,e=t,o){var n,s,r,l;if(i===R)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=j(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.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)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=L(t,a._$AS(t,i.values),a,o)),i}class G{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:E).importNode(e,!0);H.currentNode=n;let s=H.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new V(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new tt(s,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=H.nextNode(),r++)}return n}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class V{constructor(t,i,e,o){var n;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=L(this,t,i),j(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==D&&j(this._$AH)?this._$AA.nextSibling.data=t:this.$(E.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new G(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=W.get(t.strings);return void 0===i&&W.set(t.strings,i=new K(t)),i}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new V(this.k(O()),this.k(O()),this,this.options)):e=i[o],e._$AI(n),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class q{constructor(t,i,e,o,n){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=L(this,t,i,0),s=!j(t)||t!==this._$AH&&t!==R,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=L(this,o[e+r],i,r),l===R&&(l=this._$AH[r]),s||(s=!j(l)||l!==this._$AH[r]),l===D?t=D:t!==D&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const Y=$?$.emptyScript:"";class J extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class Q extends q{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=L(this,t,i,0))&&void 0!==e?e:D)===R)return;const o=this._$AH,n=t===D&&o!==D||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==D&&(o===D||n);n&&this.element.removeEventListener(this.name,this,o),s&&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 tt{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){L(this,t)}}const it=m.litHtmlPolyfillSupport;null==it||it(K,V),(null!==(y=m.litHtmlVersions)&&void 0!==y?y:m.litHtmlVersions=[]).push("2.7.3");
|
|
139
|
+
`}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){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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"),n=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",n),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",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}v.elementDefinitions={},v.styles=g,b([o.property({type:Boolean})],v.prototype,"primary",void 0),b([o.property({type:Boolean})],v.prototype,"secondary",void 0),b([o.property({type:Boolean})],v.prototype,"unbounded",void 0),b([o.property({type:Boolean})],v.prototype,"activated",void 0),b([o.property({type:Boolean})],v.prototype,"selected",void 0),b([o.property({type:Boolean})],v.prototype,"disabled",void 0),b([o.state()],v.prototype,"hovered",void 0),b([o.state()],v.prototype,"focused",void 0),b([o.state()],v.prototype,"pressed",void 0),b([o.state()],v.prototype,"rippling",void 0),b([o.state()],v.prototype,"rippleSize",void 0),b([o.state()],v.prototype,"originX",void 0),b([o.state()],v.prototype,"originY",void 0),b([o.query(".ft-ripple")],v.prototype,"ripple",void 0),b([o.query(".ft-ripple--effect")],v.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(v);const m=window,$=m.trustedTypes,w=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,k="$lit$",z=`lit$${(Math.random()+"").slice(9)}$`,S="?"+z,C=`<${S}>`,O=document,E=()=>O.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,I="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,T=/>/g,A=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,Z=/"/g,_=/^(?:script|style|textarea|title)$/i,U=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),D=new WeakMap,H=O.createTreeWalker(O,129,null,!1),P=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=M;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===M?"!--"===a[1]?r=B:void 0!==a[1]?r=T:void 0!==a[2]?(_.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=A):void 0!==a[3]&&(r=A):r===A?">"===a[0]?(r=null!=n?n:M,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?A:'"'===a[3]?Z:F):r===Z||r===F?r=A:r===B||r===T?r=M:(r=A,n=void 0);const f=r===A&&t[i+1].startsWith("/>")?" ":"";s+=r===M?e+C:p>=0?(o.push(l),e.slice(0,p)+k+e.slice(p)+z+f):e+z+(-2===p?(o.push(void 0),i):f)}const l=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(l):l,o]};class V{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,p]=P(t,i);if(this.el=V.createElement(a,e),H.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=H.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(k)||i.startsWith(z)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+k).split(z),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?X:"?"===i[1]?J:"@"===i[1]?Q:q})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(_.test(o.tagName)){const t=o.textContent.split(z),i=t.length-1;if(i>0){o.textContent=$?$.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],E()),H.nextNode(),l.push({type:2,index:++n});o.append(t[i],E())}}}else if(8===o.nodeType)if(o.data===S)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(z,t+1));)l.push({type:7,index:n}),t+=z.length-1}n++}}static createElement(t,i){const e=O.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,o){var n,s,r,l;if(i===R)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=j(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.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)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=K(t,a._$AS(t,i.values),a,o)),i}class L{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:O).importNode(e,!0);H.currentNode=n;let s=H.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new G(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new tt(s,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=H.nextNode(),r++)}return n}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var n;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=K(this,t,i),j(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==W&&j(this._$AH)?this._$AA.nextSibling.data=t:this.$(O.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=V.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new L(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new V(t)),i}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new G(this.k(E()),this.k(E()),this,this.options)):e=i[o],e._$AI(n),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class q{constructor(t,i,e,o,n){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=K(this,t,i,0),s=!j(t)||t!==this._$AH&&t!==R,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=K(this,o[e+r],i,r),l===R&&(l=this._$AH[r]),s||(s=!j(l)||l!==this._$AH[r]),l===W?t=W:t!==W&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}const Y=$?$.emptyScript:"";class J extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==W?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class Q extends q{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=K(this,t,i,0))&&void 0!==e?e:W)===R)return;const o=this._$AH,n=t===W&&o!==W||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==W&&(o===W||n);n&&this.element.removeEventListener(this.name,this,o),s&&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 tt{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){K(this,t)}}const it=m.litHtmlPolyfillSupport;null==it||it(V,G),(null!==(y=m.litHtmlVersions)&&void 0!==y?y:m.litHtmlVersions=[]).push("2.7.3");
|
|
153
140
|
/**
|
|
154
141
|
* @license
|
|
155
142
|
* Copyright 2020 Google LLC
|
|
156
143
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
157
144
|
*/
|
|
158
|
-
const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void 0:t._$litStatic$},nt=t=>({_$litStatic$:t,r:et}),st=new Map,rt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],l=[];let a,p=0,
|
|
145
|
+
const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void 0:t._$litStatic$},nt=t=>({_$litStatic$:t,r:et}),st=new Map,rt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],l=[];let a,p=0,h=!1;for(;p<o;){for(a=i[p];p<o&&void 0!==(s=e[p],n=ot(s));)a+=n+i[++p],h=!0;p!==o&&l.push(s),r.push(a),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=st.get(t))&&(r.raw=r,st.set(t,i=r)),e=l}return t(i,...e)})(U);var lt;!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"}(lt||(lt={}));const at=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),pt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),ht={fontFamily:pt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",at),dt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",ht.fontSize,"20px"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",ht.fontWeight,"normal"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",ht.letterSpacing,"0.15px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",ht.lineHeight,"1.2"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",ht.textTransform,"inherit"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",at),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",ht.fontSize,"14px"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",ht.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",ht.letterSpacing,"0.105px"),$t=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",ht.lineHeight,"1.7"),wt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",ht.textTransform,"inherit"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",pt),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",ht.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",ht.fontWeight,"600"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",ht.letterSpacing,"0.144px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",ht.lineHeight,"1.5"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",ht.textTransform,"inherit"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",pt),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",ht.fontSize,"14px"),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",ht.fontWeight,"normal"),Mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",ht.letterSpacing,"0.098px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",ht.lineHeight,"1.7"),Tt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",ht.textTransform,"inherit"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",pt),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",ht.fontSize,"16px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",ht.fontWeight,"normal"),_t=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",ht.letterSpacing,"0.496px"),Ut=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",ht.lineHeight,"1.5"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",ht.textTransform,"inherit"),Wt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",pt),Dt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",ht.fontSize,"14px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",ht.fontWeight,"normal"),Pt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",ht.letterSpacing,"0.252px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",ht.lineHeight,"1.4"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",ht.textTransform,"inherit"),Lt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",pt),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",ht.fontSize,"12px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",ht.fontWeight,"normal"),Xt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",ht.letterSpacing,"0.396px"),Yt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",ht.lineHeight,"1.33"),Jt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",ht.textTransform,"inherit"),Qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",pt),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",ht.fontSize,"10px"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",ht.fontWeight,"normal"),ei=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",ht.letterSpacing,"0.33px"),oi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",ht.lineHeight,"1.6"),ni=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",ht.textTransform,"inherit"),si=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",pt),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",ht.fontSize,"10px"),li=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",ht.fontWeight,"normal"),ai=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",ht.letterSpacing,"1.5px"),pi=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",ht.lineHeight,"1.6"),hi=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",ht.textTransform,"uppercase"),fi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",pt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",ht.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",ht.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",ht.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",ht.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",ht.textTransform,"uppercase")},di=e.css`
|
|
159
146
|
.ft-typography--title {
|
|
160
|
-
font-family: ${
|
|
147
|
+
font-family: ${ft};
|
|
161
148
|
font-size: ${dt};
|
|
162
149
|
font-weight: ${ct};
|
|
163
150
|
letter-spacing: ${ut};
|
|
@@ -179,22 +166,22 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
179
166
|
font-size: ${zt};
|
|
180
167
|
font-weight: ${St};
|
|
181
168
|
letter-spacing: ${Ct};
|
|
182
|
-
line-height: ${
|
|
183
|
-
text-transform: ${
|
|
169
|
+
line-height: ${Ot};
|
|
170
|
+
text-transform: ${Et};
|
|
184
171
|
}
|
|
185
172
|
`,xi=e.css`
|
|
186
173
|
.ft-typography--subtitle2 {
|
|
187
174
|
font-family: ${jt};
|
|
188
175
|
font-size: ${Nt};
|
|
189
176
|
font-weight: ${It};
|
|
190
|
-
letter-spacing: ${
|
|
191
|
-
line-height: ${
|
|
192
|
-
text-transform: ${
|
|
177
|
+
letter-spacing: ${Mt};
|
|
178
|
+
line-height: ${Bt};
|
|
179
|
+
text-transform: ${Tt};
|
|
193
180
|
}
|
|
194
181
|
|
|
195
182
|
`,gi=e.css`
|
|
196
183
|
.ft-typography--body1 {
|
|
197
|
-
font-family: ${
|
|
184
|
+
font-family: ${At};
|
|
198
185
|
font-size: ${Ft};
|
|
199
186
|
font-weight: ${Zt};
|
|
200
187
|
letter-spacing: ${_t};
|
|
@@ -203,17 +190,17 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
203
190
|
}
|
|
204
191
|
`,yi=e.css`
|
|
205
192
|
.ft-typography--body2 {
|
|
206
|
-
font-family: ${
|
|
207
|
-
font-size: ${
|
|
193
|
+
font-family: ${Wt};
|
|
194
|
+
font-size: ${Dt};
|
|
208
195
|
font-weight: ${Ht};
|
|
209
196
|
letter-spacing: ${Pt};
|
|
210
|
-
line-height: ${
|
|
211
|
-
text-transform: ${
|
|
197
|
+
line-height: ${Vt};
|
|
198
|
+
text-transform: ${Kt};
|
|
212
199
|
}
|
|
213
200
|
`,bi=e.css`
|
|
214
201
|
.ft-typography--caption {
|
|
215
|
-
font-family: ${
|
|
216
|
-
font-size: ${
|
|
202
|
+
font-family: ${Lt};
|
|
203
|
+
font-size: ${Gt};
|
|
217
204
|
font-weight: ${qt};
|
|
218
205
|
letter-spacing: ${Xt};
|
|
219
206
|
line-height: ${Yt};
|
|
@@ -235,16 +222,16 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
235
222
|
font-weight: ${li};
|
|
236
223
|
letter-spacing: ${ai};
|
|
237
224
|
line-height: ${pi};
|
|
238
|
-
text-transform: ${
|
|
225
|
+
text-transform: ${hi};
|
|
239
226
|
}
|
|
240
227
|
`,$i=e.css`
|
|
241
228
|
.ft-typography--button {
|
|
242
|
-
font-family: ${
|
|
243
|
-
font-size: ${
|
|
244
|
-
font-weight: ${
|
|
245
|
-
letter-spacing: ${
|
|
246
|
-
line-height: ${
|
|
247
|
-
text-transform: ${
|
|
229
|
+
font-family: ${fi.fontFamily};
|
|
230
|
+
font-size: ${fi.fontSize};
|
|
231
|
+
font-weight: ${fi.fontWeight};
|
|
232
|
+
letter-spacing: ${fi.letterSpacing};
|
|
233
|
+
line-height: ${fi.lineHeight};
|
|
234
|
+
text-transform: ${fi.textTransform};
|
|
248
235
|
}
|
|
249
236
|
`,wi=e.css`
|
|
250
237
|
.ft-typography {
|
|
@@ -257,10 +244,9 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
257
244
|
</${nt(this.element)}>
|
|
258
245
|
`:rt`
|
|
259
246
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
260
|
-
`}}zi.styles=[di,ci,ui,xi,gi,yi,bi,vi,mi,$i,wi],ki([o.property()],zi.prototype,"element",void 0),ki([o.property()],zi.prototype,"variant",void 0),i.customElement("ft-typography")(zi);const Si=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ci=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),
|
|
247
|
+
`}}zi.styles=[di,ci,ui,xi,gi,yi,bi,vi,mi,$i,wi],ki([o.property()],zi.prototype,"element",void 0),ki([o.property()],zi.prototype,"variant",void 0),i.customElement("ft-typography")(zi);const Si=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ci=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Oi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Ei=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),ji=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),Ni=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Ii=e.css`
|
|
261
248
|
.ft-tooltip--container {
|
|
262
249
|
display: block;
|
|
263
|
-
position: relative;
|
|
264
250
|
}
|
|
265
251
|
|
|
266
252
|
.ft-tooltip--inline {
|
|
@@ -276,20 +262,18 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
276
262
|
max-width: ${Ni};
|
|
277
263
|
text-align: center;
|
|
278
264
|
padding: ${Si};
|
|
279
|
-
z-index: ${
|
|
265
|
+
z-index: ${Ei};
|
|
280
266
|
}
|
|
281
267
|
|
|
282
268
|
.ft-tooltip--content {
|
|
283
269
|
padding: 4px 8px;
|
|
284
270
|
border-radius: ${ji};
|
|
285
|
-
background-color: ${
|
|
271
|
+
background-color: ${Oi};
|
|
286
272
|
color: ${Ci};
|
|
287
|
-
top: -500px;
|
|
288
|
-
left: -500px;
|
|
289
273
|
position: relative;
|
|
290
274
|
word-break: break-word;
|
|
291
275
|
}
|
|
292
|
-
`;var
|
|
276
|
+
`;var Mi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Bi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
293
277
|
<div part="container"
|
|
294
278
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
295
279
|
@mouseenter=${this.onHover}
|
|
@@ -307,7 +291,7 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
307
291
|
</div>
|
|
308
292
|
</div>
|
|
309
293
|
</div>
|
|
310
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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.validPosition){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=
|
|
294
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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.validPosition){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=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,o=(t.offsetHeight-e)/2,n=(t.offsetWidth-i)/2;let s=0,r=0;switch(this.validPosition){case"top":r=t.offsetTop-e,s=t.offsetLeft+n;break;case"bottom":r=t.offsetTop+t.offsetHeight,s=t.offsetLeft+n;break;case"left":r=t.offsetTop+o,s=t.offsetLeft-i;break;case"right":r=t.offsetTop+o,s=t.offsetLeft+t.offsetWidth}const l=this.tooltip.style;l.left=this.limitValueBetween(s,0,window.innerWidth-i)+"px",l.top=this.limitValueBetween(r,0,window.innerHeight-e)+"px",l.maxWidth=`max(${t.offsetWidth}px, ${Ni})`}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())}limitValueBetween(t,i,e){return Math.max(i,Math.min(t,e))}}Bi.elementDefinitions={"ft-typography":zi},Bi.styles=Ii,Mi([o.property()],Bi.prototype,"text",void 0),Mi([o.property({type:Boolean})],Bi.prototype,"manual",void 0),Mi([o.property({type:Boolean})],Bi.prototype,"inline",void 0),Mi([o.property({type:Number})],Bi.prototype,"delay",void 0),Mi([o.property()],Bi.prototype,"position",void 0),Mi([o.queryAssignedNodes("",!0)],Bi.prototype,"slotNodes",void 0),Mi([o.query(".ft-tooltip--container")],Bi.prototype,"container",void 0),Mi([o.query(".ft-tooltip")],Bi.prototype,"tooltip",void 0),Mi([o.query(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),Mi([o.state()],Bi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Bi);const Ti={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ai=e.css`
|
|
311
295
|
:host {
|
|
312
296
|
line-height: 0;
|
|
313
297
|
}
|
|
@@ -316,8 +300,8 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
316
300
|
display: inline-block;
|
|
317
301
|
position: relative;
|
|
318
302
|
|
|
319
|
-
width: ${
|
|
320
|
-
height: ${
|
|
303
|
+
width: ${Ti.size};
|
|
304
|
+
height: ${Ti.size};
|
|
321
305
|
}
|
|
322
306
|
|
|
323
307
|
.ft-loader div {
|
|
@@ -326,7 +310,7 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
326
310
|
width: 25%;
|
|
327
311
|
height: 25%;
|
|
328
312
|
border-radius: 50%;
|
|
329
|
-
background: ${
|
|
313
|
+
background: ${Ti.color};
|
|
330
314
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
331
315
|
}
|
|
332
316
|
|
|
@@ -373,7 +357,7 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
373
357
|
transform: translate(0, 0);
|
|
374
358
|
}
|
|
375
359
|
100% {
|
|
376
|
-
transform: translate(calc(0.35 * ${
|
|
360
|
+
transform: translate(calc(0.35 * ${Ti.size}), 0);
|
|
377
361
|
}
|
|
378
362
|
}
|
|
379
363
|
`;class Fi extends i.FtLitElement{render(){return e.html`
|
|
@@ -383,7 +367,7 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
383
367
|
<div></div>
|
|
384
368
|
<div></div>
|
|
385
369
|
</div>
|
|
386
|
-
`}}var Zi,_i;Fi.styles=
|
|
370
|
+
`}}var Zi,_i;Fi.styles=Ai,i.customElement("ft-loader")(Fi),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",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.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="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Zi||(Zi={})),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=""}(_i||(_i={})),new Map([...["abw"].map((t=>[t,_i.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,_i.AUDIO])),...["avi"].map((t=>[t,_i.AVI])),...["chm","xhs"].map((t=>[t,_i.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,_i.CODE])),...["csv"].map((t=>[t,_i.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,_i.DITA])),...["epub"].map((t=>[t,_i.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,_i.EXCEL])),...["flac"].map((t=>[t,_i.FLAC])),...["gif"].map((t=>[t,_i.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,_i.GZIP])),...["html","htm","xhtml"].map((t=>[t,_i.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,_i.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,_i.JPEG])),...["json"].map((t=>[t,_i.JSON])),...["m4a","m4p"].map((t=>[t,_i.M4A])),...["mov","qt"].map((t=>[t,_i.MOV])),...["mp3"].map((t=>[t,_i.MP3])),...["mp4","m4v"].map((t=>[t,_i.MP4])),...["ogg","oga"].map((t=>[t,_i.OGG])),...["pdf","ps"].map((t=>[t,_i.PDF])),...["png"].map((t=>[t,_i.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,_i.POWERPOINT])),...["rar"].map((t=>[t,_i.RAR])),...["stp"].map((t=>[t,_i.STP])),...["txt","rtf","md","mdown"].map((t=>[t,_i.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,_i.VIDEO])),...["wav"].map((t=>[t,_i.WAV])),...["wma"].map((t=>[t,_i.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,_i.WORD])),...["xml","xsl","rdf"].map((t=>[t,_i.XML])),...["yaml","yml","x-yaml"].map((t=>[t,_i.YAML])),...["zip"].map((t=>[t,_i.ZIP]))]);const Ui={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ri=e.css`
|
|
387
371
|
:host, i.ft-icon {
|
|
388
372
|
display: inline-flex;
|
|
389
373
|
align-items: center;
|
|
@@ -431,12 +415,12 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
431
415
|
.ft-icon--material {
|
|
432
416
|
font-family: ${Ui.materialFontFamily}, "Material Icons", sans-serif;
|
|
433
417
|
}
|
|
434
|
-
`;var
|
|
418
|
+
`;var Wi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Wi||(Wi={}));var Di=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Hi extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Wi).includes(this.variant)?this.variant:Wi.fluid_topics,i=t!==Wi.material||!!this.value;return e.html`
|
|
435
419
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
436
420
|
${s.unsafeHTML(this.resolvedIcon)}
|
|
437
421
|
<slot ?hidden=${i}></slot>
|
|
438
422
|
</i>
|
|
439
|
-
`}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:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case
|
|
423
|
+
`}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:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Wi.file_format:this.resolvedIcon=null!==(t=_i[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Wi.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Zi[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Hi.elementDefinitions={},Hi.styles=Ri,Di([o.property()],Hi.prototype,"variant",void 0),Di([o.property()],Hi.prototype,"value",void 0),Di([o.state()],Hi.prototype,"resolvedIcon",void 0),Di([o.query("slot")],Hi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Hi);const Pi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Vi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Pi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",fi.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Pi),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Ki=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Li={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Ki,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Ki)},Gi=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),qi=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Xi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Yi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Ji=[e.css`
|
|
440
424
|
:host {
|
|
441
425
|
display: inline-block;
|
|
442
426
|
max-width: 100%;
|
|
@@ -447,7 +431,7 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
447
431
|
box-shadow: 0px 0px 0px transparent;
|
|
448
432
|
border: 0px solid transparent;
|
|
449
433
|
text-shadow: 0px 0px 0px transparent;
|
|
450
|
-
font-size: ${
|
|
434
|
+
font-size: ${Vi.fontSize};
|
|
451
435
|
}
|
|
452
436
|
|
|
453
437
|
button:hover {
|
|
@@ -476,26 +460,26 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
476
460
|
border: none;
|
|
477
461
|
pointer-events: auto;
|
|
478
462
|
|
|
479
|
-
--ft-button-internal-line-height: max(calc(${
|
|
480
|
-
--ft-button-internal-color: ${
|
|
481
|
-
${i.setVariable(Ui.size,
|
|
482
|
-
${i.setVariable(p.color,
|
|
463
|
+
--ft-button-internal-line-height: max(calc(${Vi.fontSize} + 2px), ${Vi.iconSize});
|
|
464
|
+
--ft-button-internal-color: ${Vi.color};
|
|
465
|
+
${i.setVariable(Ui.size,Vi.iconSize)};
|
|
466
|
+
${i.setVariable(p.color,Vi.rippleColor)};
|
|
483
467
|
|
|
484
|
-
border-radius: ${
|
|
485
|
-
padding: ${
|
|
486
|
-
background-color: ${
|
|
468
|
+
border-radius: ${Vi.borderRadius};
|
|
469
|
+
padding: ${Vi.verticalPadding} ${Vi.horizontalPadding};
|
|
470
|
+
background-color: ${Vi.backgroundColor};
|
|
487
471
|
color: var(--ft-button-internal-color);
|
|
488
472
|
-webkit-mask-image: radial-gradient(white, black);
|
|
489
473
|
}
|
|
490
474
|
|
|
491
475
|
.ft-button.ft-button--outlined {
|
|
492
476
|
border: 1px solid var(--ft-button-internal-color);
|
|
493
|
-
padding: calc(${
|
|
477
|
+
padding: calc(${Vi.verticalPadding} - 1px) calc(${Vi.horizontalPadding} - 1px);
|
|
494
478
|
}
|
|
495
479
|
|
|
496
480
|
.ft-button.ft-button--dense {
|
|
497
481
|
padding: ${qi} ${Xi};
|
|
498
|
-
border-radius: ${
|
|
482
|
+
border-radius: ${Gi};
|
|
499
483
|
gap: ${Yi};
|
|
500
484
|
}
|
|
501
485
|
|
|
@@ -508,7 +492,7 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
508
492
|
}
|
|
509
493
|
|
|
510
494
|
.ft-button--round {
|
|
511
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
495
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Vi.verticalPadding});
|
|
512
496
|
}
|
|
513
497
|
|
|
514
498
|
.ft-button--round.ft-button--dense {
|
|
@@ -517,13 +501,13 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
517
501
|
|
|
518
502
|
.ft-button[disabled] {
|
|
519
503
|
filter: grayscale(1);
|
|
520
|
-
opacity: ${
|
|
504
|
+
opacity: ${Vi.opacityDisabled};
|
|
521
505
|
}
|
|
522
506
|
|
|
523
507
|
.ft-button.ft-button--primary {
|
|
524
|
-
background-color: ${
|
|
525
|
-
--ft-button-internal-color: ${
|
|
526
|
-
${i.setVariable(p.color,
|
|
508
|
+
background-color: ${Li.backgroundColor};
|
|
509
|
+
--ft-button-internal-color: ${Li.color};
|
|
510
|
+
${i.setVariable(p.color,Li.rippleColor)};
|
|
527
511
|
}
|
|
528
512
|
|
|
529
513
|
.ft-button:focus {
|
|
@@ -536,9 +520,9 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
536
520
|
white-space: nowrap;
|
|
537
521
|
text-overflow: ellipsis;
|
|
538
522
|
display: block;
|
|
539
|
-
margin: 0 ${
|
|
540
|
-
${i.setVariable(
|
|
541
|
-
${i.setVariable(
|
|
523
|
+
margin: 0 ${Vi.iconPadding};
|
|
524
|
+
${i.setVariable(fi.fontSize,"1em")};
|
|
525
|
+
${i.setVariable(fi.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
542
526
|
}
|
|
543
527
|
|
|
544
528
|
.ft-button--dense .ft-button--label {
|
|
@@ -555,8 +539,8 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
555
539
|
}
|
|
556
540
|
|
|
557
541
|
.ft-button--label[hidden] + ft-icon {
|
|
558
|
-
margin: 0 calc(${
|
|
559
|
-
padding: 0 ${
|
|
542
|
+
margin: 0 calc(${Vi.horizontalPadding} * -1);
|
|
543
|
+
padding: 0 ${Vi.verticalPadding};
|
|
560
544
|
}
|
|
561
545
|
|
|
562
546
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
@@ -570,8 +554,8 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
570
554
|
}
|
|
571
555
|
|
|
572
556
|
ft-loader {
|
|
573
|
-
${i.setVariable(
|
|
574
|
-
${i.setVariable(
|
|
557
|
+
${i.setVariable(Ti.size,Vi.iconSize)};
|
|
558
|
+
${i.setVariable(Ti.color,"var(--ft-button-internal-color)")};
|
|
575
559
|
}
|
|
576
560
|
`,i.noTextSelect];var Qi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class te extends i.FtLitElement{constructor(){super(...arguments),this.role="button",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.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
577
561
|
<button part="button"
|
|
@@ -596,7 +580,7 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
596
580
|
</ft-tooltip>
|
|
597
581
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
598
582
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
599
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${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}}te.elementDefinitions={"ft-ripple":v,"ft-tooltip":
|
|
583
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${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}}te.elementDefinitions={"ft-ripple":v,"ft-tooltip":Bi,"ft-typography":zi,"ft-icon":Hi,"ft-loader":Fi},te.styles=[i.safariEllipsisFix,Ji],Qi([o.property({type:String,reflect:!0})],te.prototype,"role",void 0),Qi([o.property({type:Boolean})],te.prototype,"primary",void 0),Qi([o.property({type:Boolean})],te.prototype,"outlined",void 0),Qi([o.property({type:Boolean})],te.prototype,"disabled",void 0),Qi([o.property({type:Boolean})],te.prototype,"dense",void 0),Qi([o.property({type:Boolean})],te.prototype,"round",void 0),Qi([o.property()],te.prototype,"label",void 0),Qi([o.property()],te.prototype,"icon",void 0),Qi([o.property()],te.prototype,"iconVariant",void 0),Qi([o.property({type:Boolean})],te.prototype,"trailingIcon",void 0),Qi([o.property({type:Boolean})],te.prototype,"loading",void 0),Qi([o.property()],te.prototype,"tooltipPosition",void 0),Qi([o.property({type:Boolean})],te.prototype,"hideTooltip",void 0),Qi([o.property({type:Boolean})],te.prototype,"forceTooltip",void 0),Qi([o.query(".ft-button")],te.prototype,"button",void 0),Qi([o.query(".ft-button--label slot")],te.prototype,"slottedContent",void 0),i.customElement("ft-button")(te);const ie={iconColor:i.FtCssVariableFactory.extend("--ft-floating-menu-icon-color",i.designSystemVariables.colorOnSurfaceMedium)},ee=e.css`
|
|
600
584
|
.ft-floating-menu-item {
|
|
601
585
|
cursor: pointer;
|
|
602
586
|
display: flex;
|
|
@@ -637,8 +621,8 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
637
621
|
<slot></slot>
|
|
638
622
|
</ft-typography>
|
|
639
623
|
</div>
|
|
640
|
-
`}onClick(t){this.dispatchEvent(new ne(this.value))}}se.elementDefinitions={"ft-icon":Hi,"ft-ripple":v,"ft-typography":zi},se.styles=ee,oe([o.property()],se.prototype,"iconVariant",void 0),oe([o.property()],se.prototype,"icon",void 0),oe([o.property()],se.prototype,"value",void 0);var re=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class le extends CustomEvent{constructor(){super("close-ft-floating-menu")}}class ae extends i.FtLitElement{constructor(){super(...arguments),this.menuOpen=!1,this.forceMenuOpen=!1,this.iconVariant=
|
|
641
|
-
<div class="${n.classMap(
|
|
624
|
+
`}onClick(t){this.dispatchEvent(new ne(this.value))}}se.elementDefinitions={"ft-icon":Hi,"ft-ripple":v,"ft-typography":zi},se.styles=ee,oe([o.property()],se.prototype,"iconVariant",void 0),oe([o.property()],se.prototype,"icon",void 0),oe([o.property()],se.prototype,"value",void 0);var re=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class le extends CustomEvent{constructor(){super("close-ft-floating-menu")}}class ae extends i.FtLitElement{constructor(){super(...arguments),this.menuOpen=!1,this.forceMenuOpen=!1,this.iconVariant=Wi.fluid_topics,this.icon="SHORTCUT_MENU",this.horizontalAlignment="left",this.verticalAlignment="bottom",this.disabled=!1,this.closeMenuMatchers=[],this.hideOptions=t=>{this.menuOpen=this.menuOpen&&t.composedPath().includes(this.container),this.menuOpen||document.removeEventListener("click",this.hideOptions)}}render(){const t={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return e.html`
|
|
625
|
+
<div class="${n.classMap(t)}">
|
|
642
626
|
<ft-button id="actions-button"
|
|
643
627
|
part="button"
|
|
644
628
|
dense round
|
|
@@ -652,13 +636,15 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
652
636
|
aria-expanded="${this.forceMenuOpen||this.menuOpen}">
|
|
653
637
|
${this.text}
|
|
654
638
|
</ft-button>
|
|
655
|
-
<div
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
639
|
+
<div class="ft-floating-menu--wrapper">
|
|
640
|
+
<div id="ft-floating-menu-options"
|
|
641
|
+
class="ft-floating-menu--options"
|
|
642
|
+
part="options"
|
|
643
|
+
@select="${this.onClickItem}">
|
|
644
|
+
<slot @click=${this.onContentClick}
|
|
645
|
+
@close-ft-floating-menu=${this.onCloseEvent}
|
|
646
|
+
></slot>
|
|
647
|
+
</div>
|
|
662
648
|
</div>
|
|
663
649
|
</div>
|
|
664
|
-
`}onClick(){this.menuOpen=!this.menuOpen,setTimeout((()=>document.addEventListener("click",this.hideOptions)))}onClickItem(){this.closeMenu()}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onContentClick(t){i.eventPathContainsMatchingElement(t,this.closeMenuMatchers,this)&&(this.closeMenu(),t.stopPropagation())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}ae.elementDefinitions={"ft-button":te,"ft-floating-menu-item":se},ae.styles=l,re([o.state()],ae.prototype,"menuOpen",void 0),re([o.state()],ae.prototype,"forceMenuOpen",void 0),re([o.query(".ft-floating-menu")],ae.prototype,"container",void 0),re([o.query(".ft-floating-menu--
|
|
650
|
+
`}onClick(){this.menuOpen=!this.menuOpen,setTimeout((()=>document.addEventListener("click",this.hideOptions)))}onClickItem(){this.closeMenu()}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onContentClick(t){i.eventPathContainsMatchingElement(t,this.closeMenuMatchers,this)&&(this.closeMenu(),t.stopPropagation())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}contentAvailableCallback(t){super.contentAvailableCallback(t),["menuOpen"].some((i=>t.has(i)))&&this.menuOpen&&(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper())}positionMenuWrapper(){const t=this.menuContent.offsetWidth,i=this.menuContent.offsetHeight,e=this.actionButton.offsetWidth,o=this.actionButton.offsetHeight;let n=0,s=0;switch(this.horizontalAlignment){case"left":n=this.actionButton.offsetLeft;break;case"right":n=this.actionButton.offsetLeft+e-t;break;case"center":n=this.actionButton.offsetLeft+e/2-t/2}switch(this.verticalAlignment){case"bottom":s=this.actionButton.offsetTop+o+4;break;case"top":s=this.actionButton.offsetTop-i-4}const r=this.menuWrapper.style;r.left=this.limitValueBetween(n,0,window.innerWidth-t)+"px",r.top=this.limitValueBetween(s,0,window.innerHeight-i)+"px",this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}limitValueBetween(t,i,e){return Math.max(i,Math.min(t,e))}}ae.elementDefinitions={"ft-button":te,"ft-floating-menu-item":se},ae.styles=l,re([o.state()],ae.prototype,"menuOpen",void 0),re([o.state()],ae.prototype,"forceMenuOpen",void 0),re([o.query(".ft-floating-menu")],ae.prototype,"container",void 0),re([o.query(".ft-floating-menu--wrapper")],ae.prototype,"menuWrapper",void 0),re([o.query("#ft-floating-menu-options")],ae.prototype,"menuContent",void 0),re([o.query("#actions-button")],ae.prototype,"actionButton",void 0),re([o.property()],ae.prototype,"label",void 0),re([o.property()],ae.prototype,"tooltipPosition",void 0),re([o.property()],ae.prototype,"iconVariant",void 0),re([o.property()],ae.prototype,"icon",void 0),re([o.property()],ae.prototype,"text",void 0),re([o.property()],ae.prototype,"horizontalAlignment",void 0),re([o.property()],ae.prototype,"verticalAlignment",void 0),re([o.property({type:Boolean})],ae.prototype,"disabled",void 0),re([i.jsonProperty([])],ae.prototype,"closeMenuMatchers",void 0),i.customElement("ft-floating-menu")(ae),i.customElement("ft-floating-menu-item")(se),t.FloatingMenuCloseEvent=le,t.FtFloatingMenu=ae,t.FtFloatingMenuCssVariables=r,t.FtFloatingMenuItem=se,t.FtFloatingMenuItemCssVariables=ie,t.FtFloatingMenuItemSelect=ne,t.itemStyles=ee,t.styles=l}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|