@fluid-topics/ft-floating-menu 0.3.22 → 0.3.24
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-item.js +2 -2
- package/build/ft-floating-menu.css.js +13 -1
- package/build/ft-floating-menu.d.ts +10 -1
- package/build/ft-floating-menu.js +57 -9
- package/build/ft-floating-menu.light.js +38 -24
- package/build/ft-floating-menu.min.js +179 -165
- package/build/ft-floating-menu.properties.d.ts +8 -0
- package/package.json +7 -7
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html } from "lit";
|
|
7
|
+
import { html, nothing } from "lit";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
9
|
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { itemStyles } from "./ft-floating-menu-item.css";
|
|
@@ -26,7 +26,7 @@ export class FtFloatingMenuItem extends FtLitElement {
|
|
|
26
26
|
<div class="ft-floating-menu-item"
|
|
27
27
|
@click=${this.onClick}>
|
|
28
28
|
<ft-ripple></ft-ripple>
|
|
29
|
-
|
|
29
|
+
${this.icon ? html `<ft-icon variant="material">${this.icon}</ft-icon>` : nothing}
|
|
30
30
|
<ft-typography variant="body2">
|
|
31
31
|
<slot></slot>
|
|
32
32
|
</ft-typography>
|
|
@@ -11,6 +11,7 @@ export const styles = css `
|
|
|
11
11
|
.ft-floating-menu {
|
|
12
12
|
color: ${FtFloatingMenuCssVariables.textColor};
|
|
13
13
|
position: relative;
|
|
14
|
+
display: inline-block;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.ft-floating-menu--options {
|
|
@@ -20,7 +21,6 @@ export const styles = css `
|
|
|
20
21
|
color: ${FtFloatingMenuCssVariables.textColor};
|
|
21
22
|
display: none;
|
|
22
23
|
list-style: none;
|
|
23
|
-
left: 0;
|
|
24
24
|
max-width: calc(100vw - 32px);
|
|
25
25
|
max-height: calc(100vh - 32px);
|
|
26
26
|
margin: 0;
|
|
@@ -40,5 +40,17 @@ export const styles = css `
|
|
|
40
40
|
display: inline-block;
|
|
41
41
|
opacity: 1;
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
.ft-floating-menu--left .ft-floating-menu--options {
|
|
45
|
+
left: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ft-floating-menu--right .ft-floating-menu--options {
|
|
49
|
+
right: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ft-floating-menu--bottom .ft-floating-menu--options {
|
|
53
|
+
top: 100%;
|
|
54
|
+
}
|
|
43
55
|
`;
|
|
44
56
|
//# sourceMappingURL=ft-floating-menu.css.js.map
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
+
import { PropertyValues } from "lit";
|
|
1
2
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
import { FtFloatingMenuProperties } from "./ft-floating-menu.properties";
|
|
3
|
+
import { FtFloatingMenuProperties, FtHorizontalAlignment, FtVerticalAlignment } from "./ft-floating-menu.properties";
|
|
3
4
|
export declare class FtFloatingMenu extends FtLitElement implements FtFloatingMenuProperties {
|
|
4
5
|
static elementDefinitions: ElementDefinitionsMap;
|
|
5
6
|
static styles: import("lit").CSSResult;
|
|
6
7
|
private menuOpen;
|
|
7
8
|
private container;
|
|
8
9
|
private menuContainer;
|
|
10
|
+
private button;
|
|
11
|
+
label: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
text?: string;
|
|
14
|
+
horizontalAlignment: FtHorizontalAlignment;
|
|
15
|
+
verticalAlignment: FtVerticalAlignment;
|
|
16
|
+
disabled: boolean;
|
|
9
17
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
10
18
|
private onClick;
|
|
11
19
|
private onClickItem;
|
|
12
20
|
private hideOptions;
|
|
13
21
|
disconnectedCallback(): void;
|
|
22
|
+
protected contentAvailableCallback(props: PropertyValues): void;
|
|
14
23
|
}
|
|
15
24
|
//# sourceMappingURL=ft-floating-menu.d.ts.map
|
|
@@ -4,9 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html } from "lit";
|
|
8
|
-
import { query, state } from "lit/decorators.js";
|
|
9
|
-
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
7
|
+
import { html, nothing } from "lit";
|
|
8
|
+
import { property, query, state } from "lit/decorators.js";
|
|
9
|
+
import { Aligner, FtLitElement, } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { styles } from "./ft-floating-menu.css";
|
|
11
11
|
import { FtButton } from "@fluid-topics/ft-button";
|
|
12
12
|
import { classMap } from "lit/directives/class-map.js";
|
|
@@ -15,8 +15,14 @@ export class FtFloatingMenu extends FtLitElement {
|
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this.menuOpen = false;
|
|
18
|
+
this.label = "";
|
|
19
|
+
this.icon = "more_vert";
|
|
20
|
+
this.text = undefined;
|
|
21
|
+
this.horizontalAlignment = "left";
|
|
22
|
+
this.verticalAlignment = "bottom";
|
|
23
|
+
this.disabled = false;
|
|
18
24
|
this.hideOptions = (e) => {
|
|
19
|
-
this.menuOpen = this.menuOpen && e.composedPath().includes(this.
|
|
25
|
+
this.menuOpen = this.menuOpen && e.composedPath().includes(this.container);
|
|
20
26
|
if (!this.menuOpen) {
|
|
21
27
|
document.removeEventListener("click", this.hideOptions);
|
|
22
28
|
}
|
|
@@ -26,15 +32,20 @@ export class FtFloatingMenu extends FtLitElement {
|
|
|
26
32
|
const classes = {
|
|
27
33
|
"ft-floating-menu": true,
|
|
28
34
|
"ft-floating-menu--open": this.menuOpen,
|
|
35
|
+
"ft-floating-menu--right": this.horizontalAlignment == "right",
|
|
36
|
+
"ft-floating-menu--left": this.horizontalAlignment == "left",
|
|
37
|
+
"ft-floating-menu--bottom": this.verticalAlignment == "bottom"
|
|
29
38
|
};
|
|
30
39
|
return html `
|
|
31
40
|
<div class="${classMap(classes)}">
|
|
32
41
|
<ft-button part="button"
|
|
33
42
|
dense round
|
|
34
|
-
icon="
|
|
43
|
+
icon="${this.icon}"
|
|
35
44
|
id="actions-button"
|
|
36
45
|
@click=${this.onClick}
|
|
37
|
-
label
|
|
46
|
+
.label=${this.label}
|
|
47
|
+
?disabled=${this.disabled}>
|
|
48
|
+
${this.text ? html `<span>${this.text}</span>` : nothing}
|
|
38
49
|
</ft-button>
|
|
39
50
|
<div class="ft-floating-menu--options"
|
|
40
51
|
@select="${this.onClickItem}">
|
|
@@ -44,18 +55,34 @@ export class FtFloatingMenu extends FtLitElement {
|
|
|
44
55
|
`;
|
|
45
56
|
}
|
|
46
57
|
onClick(event) {
|
|
47
|
-
|
|
48
|
-
this.menuOpen = true;
|
|
58
|
+
this.menuOpen = !this.menuOpen;
|
|
49
59
|
setTimeout(() => document.addEventListener("click", this.hideOptions));
|
|
50
60
|
}
|
|
51
61
|
onClickItem(event) {
|
|
52
|
-
console.log("close");
|
|
53
62
|
this.menuOpen = false;
|
|
54
63
|
}
|
|
55
64
|
disconnectedCallback() {
|
|
56
65
|
super.disconnectedCallback();
|
|
57
66
|
document.removeEventListener("click", this.hideOptions);
|
|
58
67
|
}
|
|
68
|
+
contentAvailableCallback(props) {
|
|
69
|
+
super.contentAvailableCallback(props);
|
|
70
|
+
if (this.menuOpen) {
|
|
71
|
+
if (this.horizontalAlignment == "center") {
|
|
72
|
+
const offset = Aligner.computeCenterLeftOffset(this.button, this.menuContainer);
|
|
73
|
+
this.menuContainer.style.left = `${offset}px`;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this.menuContainer.style.removeProperty("left");
|
|
77
|
+
}
|
|
78
|
+
if (this.verticalAlignment == "top") {
|
|
79
|
+
this.menuContainer.style.top = `-${this.menuContainer.getBoundingClientRect().height}px`;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
this.menuContainer.style.removeProperty("top");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
59
86
|
}
|
|
60
87
|
FtFloatingMenu.elementDefinitions = {
|
|
61
88
|
"ft-button": FtButton,
|
|
@@ -72,4 +99,25 @@ __decorate([
|
|
|
72
99
|
__decorate([
|
|
73
100
|
query(".ft-floating-menu--options")
|
|
74
101
|
], FtFloatingMenu.prototype, "menuContainer", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
query("ft-button")
|
|
104
|
+
], FtFloatingMenu.prototype, "button", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
property()
|
|
107
|
+
], FtFloatingMenu.prototype, "label", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
property()
|
|
110
|
+
], FtFloatingMenu.prototype, "icon", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
property()
|
|
113
|
+
], FtFloatingMenu.prototype, "text", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
property()
|
|
116
|
+
], FtFloatingMenu.prototype, "horizontalAlignment", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
property()
|
|
119
|
+
], FtFloatingMenu.prototype, "verticalAlignment", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
property({ type: Boolean })
|
|
122
|
+
], FtFloatingMenu.prototype, "disabled", void 0);
|
|
75
123
|
//# sourceMappingURL=ft-floating-menu.js.map
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
.ft-floating-menu {
|
|
3
3
|
color: ${r.textColor};
|
|
4
4
|
position: relative;
|
|
5
|
+
display: inline-block;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
.ft-floating-menu--options {
|
|
@@ -11,7 +12,6 @@
|
|
|
11
12
|
color: ${r.textColor};
|
|
12
13
|
display: none;
|
|
13
14
|
list-style: none;
|
|
14
|
-
left: 0;
|
|
15
15
|
max-width: calc(100vw - 32px);
|
|
16
16
|
max-height: calc(100vh - 32px);
|
|
17
17
|
margin: 0;
|
|
@@ -31,6 +31,18 @@
|
|
|
31
31
|
display: inline-block;
|
|
32
32
|
opacity: 1;
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
.ft-floating-menu--left .ft-floating-menu--options {
|
|
36
|
+
left: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ft-floating-menu--right .ft-floating-menu--options {
|
|
40
|
+
right: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ft-floating-menu--bottom .ft-floating-menu--options {
|
|
44
|
+
top: 100%;
|
|
45
|
+
}
|
|
34
46
|
`,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")},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,g=i.FtCssVariableFactory.extend("--ft-ripple-background-color",c),y=e.css`
|
|
35
47
|
:host {
|
|
36
48
|
display: contents;
|
|
@@ -137,13 +149,13 @@
|
|
|
137
149
|
<div class="ft-ripple--background"></div>
|
|
138
150
|
<div class="ft-ripple--effect"></div>
|
|
139
151
|
</div>
|
|
140
|
-
`}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(){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"),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}}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}}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=y,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$${(Math.random()+"").slice(9)}$`,z="?"+k,S=`<${z}>`,C=document,O=(t="")=>C.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,T=/>/g,A=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),B=/'/g,F=/"/g,_=/^(?:script|style|textarea|title)$/i,M=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),D=new WeakMap,W=C.createTreeWalker(C,129,null,!1),Z=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=E;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===E?"!--"===a[1]?r=I: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:E,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]?F:B):r===F||r===B?r=A:r===I||r===T?r=E:(r=A,n=void 0);const h=r===A&&t[i+1].startsWith("/>")?" ":"";s+=r===E?e+S:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+k+h):e+k+(-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 H{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]=Z(t,i);if(this.el=H.createElement(a,e),W.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=W.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(k)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(k),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?P:"?"===i[1]?X:"@"===i[1]?Y: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(k),i=t.length-1;if(i>0){o.textContent=$?$.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),W.nextNode(),l.push({type:2,index:++n});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===z)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)l.push({type:7,index:n}),t+=k.length-1}n++}}static createElement(t,i){const e=C.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,o){var n,s,r,l;if(i===U)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 G{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:C).importNode(e,!0);W.currentNode=n;let s=W.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new L(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new J(s,this,t)),this.u.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=W.nextNode(),r++)}return n}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class L{constructor(t,i,e,o){var n;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=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._$Cm}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=K(this,t,i),j(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==U&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==R&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=H.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.p(e);else{const t=new G(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new H(t)),i}k(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 L(this.O(O()),this.O(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._$Cm=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=R,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=R}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!==U,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===U&&(l=this._$AH[r]),s||(s=!j(l)||l!==this._$AH[r]),l===R?t=R:t!==R&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const V=$?$.emptyScript:"";class X extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class Y 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:R)===U)return;const o=this._$AH,n=t===R&&o!==R||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==R&&(o===R||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 J{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 Q=m.litHtmlPolyfillSupport;null==Q||Q(H,L),(null!==(x=m.litHtmlVersions)&&void 0!==x?x:m.litHtmlVersions=[]).push("2.4.0");
|
|
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(){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"),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}}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}}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=y,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$${(Math.random()+"").slice(9)}$`,z="?"+k,S=`<${z}>`,C=document,O=(t="")=>C.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,E=/>/g,I=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),T=/'/g,F=/"/g,_=/^(?:script|style|textarea|title)$/i,M=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),D=new WeakMap,W=C.createTreeWalker(C,129,null,!1),Z=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=A;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===A?"!--"===a[1]?r=B:void 0!==a[1]?r=E:void 0!==a[2]?(_.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=I):void 0!==a[3]&&(r=I):r===I?">"===a[0]?(r=null!=n?n:A,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?I:'"'===a[3]?F:T):r===F||r===T?r=I:r===B||r===E?r=A:(r=I,n=void 0);const h=r===I&&t[i+1].startsWith("/>")?" ":"";s+=r===A?e+S:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+k+h):e+k+(-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 H{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]=Z(t,i);if(this.el=H.createElement(a,e),W.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=W.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(k)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(k),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?P:"?"===i[1]?X:"@"===i[1]?Y: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(k),i=t.length-1;if(i>0){o.textContent=$?$.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),W.nextNode(),l.push({type:2,index:++n});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===z)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)l.push({type:7,index:n}),t+=k.length-1}n++}}static createElement(t,i){const e=C.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,o){var n,s,r,l;if(i===U)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 G{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:C).importNode(e,!0);W.currentNode=n;let s=W.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new L(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new J(s,this,t)),this.u.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=W.nextNode(),r++)}return n}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class L{constructor(t,i,e,o){var n;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=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._$Cm}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=K(this,t,i),j(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==U&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==R&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=H.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.p(e);else{const t=new G(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new H(t)),i}k(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 L(this.O(O()),this.O(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._$Cm=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=R,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=R}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!==U,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===U&&(l=this._$AH[r]),s||(s=!j(l)||l!==this._$AH[r]),l===R?t=R:t!==R&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const V=$?$.emptyScript:"";class X extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class Y 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:R)===U)return;const o=this._$AH,n=t===R&&o!==R||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==R&&(o===R||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 J{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 Q=m.litHtmlPolyfillSupport;null==Q||Q(H,L),(null!==(x=m.litHtmlVersions)&&void 0!==x?x:m.litHtmlVersions=[]).push("2.4.0");
|
|
141
153
|
/**
|
|
142
154
|
* @license
|
|
143
155
|
* Copyright 2020 Google LLC
|
|
144
156
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
145
157
|
*/
|
|
146
|
-
const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void 0:t._$litStatic$},et=t=>({_$litStatic$:t,r:tt}),ot=new Map,nt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],l=[];let a,p=0,f=!1;for(;p<o;){for(a=i[p];p<o&&void 0!==(s=e[p],n=it(s));)a+=n+i[++p],f=!0;l.push(s),r.push(a),p++}if(p===o&&r.push(i[o]),f){const t=r.join("$$lit$$");void 0===(i=ot.get(t))&&(r.raw=r,ot.set(t,i=r)),e=l}return t(i,...e)})(M);var st;!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"}(st||(st={}));const rt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),at={fontFamily:lt,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")},pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",rt),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",at.fontSize,"20px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",at.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",at.letterSpacing,"0.15px"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",at.lineHeight,"1.2"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",at.textTransform,"inherit"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",rt),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",at.fontSize,"14px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",at.fontWeight,"normal"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",at.letterSpacing,"0.105px"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",at.lineHeight,"1.7"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",at.textTransform,"inherit"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",at.fontSize,"16px"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",at.fontWeight,"600"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",at.letterSpacing,"0.144px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",at.lineHeight,"1.5"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",at.textTransform,"inherit"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",lt),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",at.fontSize,"14px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",at.fontWeight,"normal"),
|
|
158
|
+
const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void 0:t._$litStatic$},et=t=>({_$litStatic$:t,r:tt}),ot=new Map,nt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],l=[];let a,p=0,f=!1;for(;p<o;){for(a=i[p];p<o&&void 0!==(s=e[p],n=it(s));)a+=n+i[++p],f=!0;l.push(s),r.push(a),p++}if(p===o&&r.push(i[o]),f){const t=r.join("$$lit$$");void 0===(i=ot.get(t))&&(r.raw=r,ot.set(t,i=r)),e=l}return t(i,...e)})(M);var st;!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"}(st||(st={}));const rt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),at={fontFamily:lt,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")},pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",rt),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",at.fontSize,"20px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",at.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",at.letterSpacing,"0.15px"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",at.lineHeight,"1.2"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",at.textTransform,"inherit"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",rt),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",at.fontSize,"14px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",at.fontWeight,"normal"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",at.letterSpacing,"0.105px"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",at.lineHeight,"1.7"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",at.textTransform,"inherit"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",at.fontSize,"16px"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",at.fontWeight,"600"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",at.letterSpacing,"0.144px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",at.lineHeight,"1.5"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",at.textTransform,"inherit"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",lt),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",at.fontSize,"14px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",at.fontWeight,"normal"),At=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",at.letterSpacing,"0.098px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",at.lineHeight,"1.7"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",at.textTransform,"inherit"),It=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",lt),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",at.fontSize,"16px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",at.fontWeight,"normal"),_t=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",at.letterSpacing,"0.496px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",at.lineHeight,"1.5"),Ut=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",at.textTransform,"inherit"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",lt),Dt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",at.fontSize,"14px"),Wt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",at.fontWeight,"normal"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",at.letterSpacing,"0.252px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",at.lineHeight,"1.4"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",at.textTransform,"inherit"),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",lt),Lt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",at.fontSize,"12px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",at.fontWeight,"normal"),Pt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",at.letterSpacing,"0.396px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",at.lineHeight,"1.33"),Xt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",at.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",lt),Jt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",at.fontSize,"10px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",at.fontWeight,"normal"),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",at.letterSpacing,"0.33px"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",at.lineHeight,"1.6"),ei=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",at.textTransform,"inherit"),oi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",lt),ni=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",at.fontSize,"10px"),si=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",at.fontWeight,"normal"),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",at.letterSpacing,"1.5px"),li=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",at.lineHeight,"1.6"),ai=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",at.textTransform,"uppercase"),pi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",lt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",at.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",at.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",at.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",at.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",at.textTransform,"uppercase")},fi=e.css`
|
|
147
159
|
.ft-typography--title {
|
|
148
160
|
font-family: ${pt};
|
|
149
161
|
font-size: ${ft};
|
|
@@ -175,15 +187,15 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
175
187
|
font-family: ${Ot};
|
|
176
188
|
font-size: ${jt};
|
|
177
189
|
font-weight: ${Nt};
|
|
178
|
-
letter-spacing: ${
|
|
179
|
-
line-height: ${
|
|
180
|
-
text-transform: ${
|
|
190
|
+
letter-spacing: ${At};
|
|
191
|
+
line-height: ${Bt};
|
|
192
|
+
text-transform: ${Et};
|
|
181
193
|
}
|
|
182
194
|
|
|
183
195
|
`,ui=e.css`
|
|
184
196
|
.ft-typography--body1 {
|
|
185
|
-
font-family: ${
|
|
186
|
-
font-size: ${
|
|
197
|
+
font-family: ${It};
|
|
198
|
+
font-size: ${Tt};
|
|
187
199
|
font-weight: ${Ft};
|
|
188
200
|
letter-spacing: ${_t};
|
|
189
201
|
line-height: ${Mt};
|
|
@@ -277,7 +289,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
277
289
|
position: relative;
|
|
278
290
|
word-break: break-word;
|
|
279
291
|
}
|
|
280
|
-
`;var
|
|
292
|
+
`;var Ai=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.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
281
293
|
<div part="container"
|
|
282
294
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
283
295
|
@mouseenter=${this.onHover}
|
|
@@ -293,7 +305,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
293
305
|
</div>
|
|
294
306
|
<slot></slot>
|
|
295
307
|
</div>
|
|
296
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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.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;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${ji})`}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())}}
|
|
308
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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.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;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${ji})`}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())}}Bi.elementDefinitions={"ft-typography":wi},Bi.styles=Ni,Ai([o.property()],Bi.prototype,"text",void 0),Ai([o.property({type:Boolean})],Bi.prototype,"manual",void 0),Ai([o.property({type:Boolean})],Bi.prototype,"inline",void 0),Ai([o.property({type:Number})],Bi.prototype,"delay",void 0),Ai([o.property()],Bi.prototype,"position",void 0),Ai([o.queryAssignedNodes("",!0)],Bi.prototype,"slotNodes",void 0),Ai([o.query(".ft-tooltip--container")],Bi.prototype,"container",void 0),Ai([o.query("slot")],Bi.prototype,"target",void 0),Ai([o.query(".ft-tooltip")],Bi.prototype,"tooltip",void 0),Ai([o.query(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),Ai([o.state()],Bi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Bi);const Ei={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ii=e.css`
|
|
297
309
|
:host {
|
|
298
310
|
line-height: 0;
|
|
299
311
|
}
|
|
@@ -302,8 +314,8 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
302
314
|
display: inline-block;
|
|
303
315
|
position: relative;
|
|
304
316
|
|
|
305
|
-
width: ${
|
|
306
|
-
height: ${
|
|
317
|
+
width: ${Ei.size};
|
|
318
|
+
height: ${Ei.size};
|
|
307
319
|
}
|
|
308
320
|
|
|
309
321
|
.ft-loader div {
|
|
@@ -312,7 +324,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
312
324
|
width: 25%;
|
|
313
325
|
height: 25%;
|
|
314
326
|
border-radius: 50%;
|
|
315
|
-
background: ${
|
|
327
|
+
background: ${Ei.color};
|
|
316
328
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
317
329
|
}
|
|
318
330
|
|
|
@@ -359,17 +371,17 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
359
371
|
transform: translate(0, 0);
|
|
360
372
|
}
|
|
361
373
|
100% {
|
|
362
|
-
transform: translate(calc(0.35 * ${
|
|
374
|
+
transform: translate(calc(0.35 * ${Ei.size}), 0);
|
|
363
375
|
}
|
|
364
376
|
}
|
|
365
|
-
`;class
|
|
377
|
+
`;class Ti extends i.FtLitElement{render(){return e.html`
|
|
366
378
|
<div class="ft-loader">
|
|
367
379
|
<div></div>
|
|
368
380
|
<div></div>
|
|
369
381
|
<div></div>
|
|
370
382
|
<div></div>
|
|
371
383
|
</div>
|
|
372
|
-
`}}var Fi,_i;
|
|
384
|
+
`}}var Fi,_i;Ti.styles=Ii,i.customElement("ft-loader")(Ti),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=""}(Fi||(Fi={})),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 Mi={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")},Ui=e.css`
|
|
373
385
|
:host {
|
|
374
386
|
display: inline-block;
|
|
375
387
|
}
|
|
@@ -541,8 +553,8 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
541
553
|
}
|
|
542
554
|
|
|
543
555
|
ft-loader {
|
|
544
|
-
${i.setVariable(
|
|
545
|
-
${i.setVariable(
|
|
556
|
+
${i.setVariable(Ei.size,Hi.iconSize)};
|
|
557
|
+
${i.setVariable(Ei.color,"var(--ft-button-internal-color)")};
|
|
546
558
|
}
|
|
547
559
|
`];var Pi=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 Vi 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.iconVariant=Ri.material,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-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
548
560
|
<button part="button"
|
|
@@ -566,7 +578,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
566
578
|
</ft-tooltip>
|
|
567
579
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
568
580
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
569
|
-
<ft-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}}Vi.elementDefinitions={"ft-ripple":v,"ft-tooltip":
|
|
581
|
+
<ft-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}}Vi.elementDefinitions={"ft-ripple":v,"ft-tooltip":Bi,"ft-typography":wi,"ft-icon":Wi,"ft-loader":Ti},Vi.styles=qi,Pi([o.property({type:Boolean})],Vi.prototype,"primary",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"outlined",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"disabled",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"dense",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"round",void 0),Pi([o.property({type:String})],Vi.prototype,"label",void 0),Pi([o.property({type:String})],Vi.prototype,"icon",void 0),Pi([o.property({type:String})],Vi.prototype,"iconVariant",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"trailingIcon",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"loading",void 0),Pi([o.property({type:String})],Vi.prototype,"tooltipPosition",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"hideTooltip",void 0),Pi([o.property({type:Boolean})],Vi.prototype,"forceTooltip",void 0),Pi([o.query(".ft-button")],Vi.prototype,"button",void 0),Pi([o.query(".ft-button--label slot")],Vi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Vi);const Xi={iconColor:i.FtCssVariableFactory.extend("--ft-floating-menu-icon-color",i.designSystemVariables.colorOnSurfaceMedium)},Yi=e.css`
|
|
570
582
|
.ft-floating-menu-item {
|
|
571
583
|
cursor: pointer;
|
|
572
584
|
display: flex;
|
|
@@ -593,23 +605,25 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
593
605
|
<div class="ft-floating-menu-item"
|
|
594
606
|
@click=${this.onClick}>
|
|
595
607
|
<ft-ripple></ft-ripple>
|
|
596
|
-
|
|
608
|
+
${this.icon?e.html`<ft-icon variant="material">${this.icon}</ft-icon>`:e.nothing}
|
|
597
609
|
<ft-typography variant="body2">
|
|
598
610
|
<slot></slot>
|
|
599
611
|
</ft-typography>
|
|
600
612
|
</div>
|
|
601
|
-
`}onClick(t){this.dispatchEvent(new Qi(this.value))}}te.elementDefinitions={"ft-icon":Wi,"ft-ripple":v,"ft-typography":wi},te.styles=Yi,Ji([o.property({type:String})],te.prototype,"icon",void 0),Ji([o.property({type:String})],te.prototype,"value",void 0);var ie=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 ee extends i.FtLitElement{constructor(){super(...arguments),this.menuOpen=!1,this.hideOptions=t=>{this.menuOpen=this.menuOpen&&t.composedPath().includes(this.
|
|
613
|
+
`}onClick(t){this.dispatchEvent(new Qi(this.value))}}te.elementDefinitions={"ft-icon":Wi,"ft-ripple":v,"ft-typography":wi},te.styles=Yi,Ji([o.property({type:String})],te.prototype,"icon",void 0),Ji([o.property({type:String})],te.prototype,"value",void 0);var ie=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 ee extends i.FtLitElement{constructor(){super(...arguments),this.menuOpen=!1,this.label="",this.icon="more_vert",this.text=void 0,this.horizontalAlignment="left",this.verticalAlignment="bottom",this.disabled=!1,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.menuOpen,"ft-floating-menu--right":"right"==this.horizontalAlignment,"ft-floating-menu--left":"left"==this.horizontalAlignment,"ft-floating-menu--bottom":"bottom"==this.verticalAlignment};return e.html`
|
|
602
614
|
<div class="${n.classMap(t)}">
|
|
603
615
|
<ft-button part="button"
|
|
604
616
|
dense round
|
|
605
|
-
icon="
|
|
617
|
+
icon="${this.icon}"
|
|
606
618
|
id="actions-button"
|
|
607
619
|
@click=${this.onClick}
|
|
608
|
-
label
|
|
620
|
+
.label=${this.label}
|
|
621
|
+
?disabled=${this.disabled}>
|
|
622
|
+
${this.text?e.html`<span>${this.text}</span>`:e.nothing}
|
|
609
623
|
</ft-button>
|
|
610
624
|
<div class="ft-floating-menu--options"
|
|
611
625
|
@select="${this.onClickItem}">
|
|
612
626
|
<slot></slot>
|
|
613
627
|
</div>
|
|
614
628
|
</div>
|
|
615
|
-
`}onClick(t){
|
|
629
|
+
`}onClick(t){this.menuOpen=!this.menuOpen,setTimeout((()=>document.addEventListener("click",this.hideOptions)))}onClickItem(t){this.menuOpen=!1}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}contentAvailableCallback(t){if(super.contentAvailableCallback(t),this.menuOpen){if("center"==this.horizontalAlignment){const t=i.Aligner.computeCenterLeftOffset(this.button,this.menuContainer);this.menuContainer.style.left=`${t}px`}else this.menuContainer.style.removeProperty("left");"top"==this.verticalAlignment?this.menuContainer.style.top=`-${this.menuContainer.getBoundingClientRect().height}px`:this.menuContainer.style.removeProperty("top")}}}ee.elementDefinitions={"ft-button":Vi,"ft-floating-menu-item":te},ee.styles=l,ie([o.state()],ee.prototype,"menuOpen",void 0),ie([o.query(".ft-floating-menu")],ee.prototype,"container",void 0),ie([o.query(".ft-floating-menu--options")],ee.prototype,"menuContainer",void 0),ie([o.query("ft-button")],ee.prototype,"button",void 0),ie([o.property()],ee.prototype,"label",void 0),ie([o.property()],ee.prototype,"icon",void 0),ie([o.property()],ee.prototype,"text",void 0),ie([o.property()],ee.prototype,"horizontalAlignment",void 0),ie([o.property()],ee.prototype,"verticalAlignment",void 0),ie([o.property({type:Boolean})],ee.prototype,"disabled",void 0),i.customElement("ft-floating-menu")(ee),i.customElement("ft-floating-menu-item")(te),t.FtFloatingMenu=ee,t.FtFloatingMenuCssVariables=r,t.FtFloatingMenuItem=te,t.FtFloatingMenuItemCssVariables=Xi,t.FtFloatingMenuItemSelect=Qi,t.itemStyles=Yi,t.styles=l,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|