@fluid-topics/ft-button 1.0.57 → 1.0.59
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-button.d.ts +4 -1
- package/build/ft-button.js +16 -8
- package/build/ft-button.light.js +9 -9
- package/build/ft-button.min.js +156 -156
- package/package.json +8 -8
package/build/ft-button.d.ts
CHANGED
|
@@ -4,9 +4,11 @@ import { Position } from "@fluid-topics/ft-tooltip";
|
|
|
4
4
|
import "@fluid-topics/ft-loader";
|
|
5
5
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
6
6
|
import { FtButtonProperties } from "./ft-button.properties";
|
|
7
|
-
|
|
7
|
+
declare const FtButton_base: import("@fluid-topics/ft-wc-utils").FtFormComponentType<typeof FtLitElement>;
|
|
8
|
+
export declare class FtButton extends FtButton_base implements FtButtonProperties {
|
|
8
9
|
static elementDefinitions: ElementDefinitionsMap;
|
|
9
10
|
role: string;
|
|
11
|
+
type: "button" | "submit" | "reset";
|
|
10
12
|
primary: boolean;
|
|
11
13
|
outlined: boolean;
|
|
12
14
|
disabled: boolean;
|
|
@@ -35,3 +37,4 @@ export declare class FtButton extends FtLitElement implements FtButtonProperties
|
|
|
35
37
|
private onSlotchange;
|
|
36
38
|
private isDisabled;
|
|
37
39
|
}
|
|
40
|
+
export {};
|
package/build/ft-button.js
CHANGED
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, nothing, } from "lit";
|
|
8
8
|
import { property, query } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
|
-
import { FtLitElement, isSafari, safariEllipsisFix } from "@fluid-topics/ft-wc-utils";
|
|
10
|
+
import { FtLitElement, isSafari, safariEllipsisFix, toFtFormComponent } from "@fluid-topics/ft-wc-utils";
|
|
11
11
|
import { FtRipple } from "@fluid-topics/ft-ripple";
|
|
12
12
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
13
13
|
import { FtTooltip } from "@fluid-topics/ft-tooltip";
|
|
@@ -15,10 +15,11 @@ import { FtLoader } from "@fluid-topics/ft-loader";
|
|
|
15
15
|
import "@fluid-topics/ft-loader";
|
|
16
16
|
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
17
17
|
import { styles } from "./ft-button.css";
|
|
18
|
-
class FtButton extends FtLitElement {
|
|
18
|
+
class FtButton extends toFtFormComponent(FtLitElement, "button") {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
this.role = "button";
|
|
22
|
+
this.type = "button";
|
|
22
23
|
this.primary = false;
|
|
23
24
|
this.outlined = false;
|
|
24
25
|
this.disabled = false;
|
|
@@ -32,11 +33,15 @@ class FtButton extends FtLitElement {
|
|
|
32
33
|
this.hideTooltip = false;
|
|
33
34
|
this.forceTooltip = false;
|
|
34
35
|
this.onclick = (e) => {
|
|
36
|
+
var _a;
|
|
35
37
|
if (this.isDisabled()) {
|
|
36
38
|
e.preventDefault();
|
|
37
39
|
e.stopPropagation();
|
|
38
40
|
e.stopImmediatePropagation();
|
|
39
41
|
}
|
|
42
|
+
else if (this.type == "submit") {
|
|
43
|
+
(_a = this.form) === null || _a === void 0 ? void 0 : _a.requestSubmit();
|
|
44
|
+
}
|
|
40
45
|
};
|
|
41
46
|
}
|
|
42
47
|
render() {
|
|
@@ -70,11 +75,11 @@ class FtButton extends FtLitElement {
|
|
|
70
75
|
addTooltipIfNeeded(button) {
|
|
71
76
|
return this.getLabel().trim().length > 0 && (this.forceTooltip || (!this.hasTextContent() && !this.hideTooltip))
|
|
72
77
|
? html `
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
<ft-tooltip part="tooltip"
|
|
79
|
+
text="${this.getLabel()}"
|
|
80
|
+
position="${this.tooltipPosition}">
|
|
81
|
+
${button}
|
|
82
|
+
</ft-tooltip>
|
|
78
83
|
`
|
|
79
84
|
: button;
|
|
80
85
|
}
|
|
@@ -86,7 +91,7 @@ class FtButton extends FtLitElement {
|
|
|
86
91
|
else {
|
|
87
92
|
return this.icon
|
|
88
93
|
? html `
|
|
89
|
-
|
|
94
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `
|
|
90
95
|
: nothing;
|
|
91
96
|
}
|
|
92
97
|
}
|
|
@@ -130,6 +135,9 @@ FtButton.styles = [
|
|
|
130
135
|
__decorate([
|
|
131
136
|
property({ type: String, reflect: true })
|
|
132
137
|
], FtButton.prototype, "role", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
property()
|
|
140
|
+
], FtButton.prototype, "type", void 0);
|
|
133
141
|
__decorate([
|
|
134
142
|
property({ type: Boolean })
|
|
135
143
|
], FtButton.prototype, "primary", void 0);
|
package/build/ft-button.light.js
CHANGED
|
@@ -276,7 +276,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
276
276
|
</div>
|
|
277
277
|
</div>
|
|
278
278
|
</div>
|
|
279
|
-
`}
|
|
279
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(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.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-e-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft-i-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=s+"px",l.top=r+"px";const a=this.tooltip.getBoundingClientRect();let p=-a.x,h=a.x+a.width-window.innerWidth;l.left=s+Math.round(this.correctOutOfWindowPixels(p,h))+"px";let f=-a.y,d=a.y+a.height-window.innerHeight;l.top=r+Math.round(this.correctOutOfWindowPixels(f,d))+"px",l.maxWidth=`max(${t.offsetWidth}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())}correctOutOfWindowPixels(t,i){return Math.max(t,Math.min(0,-i))}}Ii.elementDefinitions={"ft-typography":wi},Ii.styles=Ci,Ei([o.property()],Ii.prototype,"text",void 0),Ei([o.property({type:Boolean})],Ii.prototype,"manual",void 0),Ei([o.property({type:Boolean})],Ii.prototype,"inline",void 0),Ei([o.property({type:Number})],Ii.prototype,"delay",void 0),Ei([o.property()],Ii.prototype,"position",void 0),Ei([o.queryAssignedNodes("",!0)],Ii.prototype,"slotNodes",void 0),Ei([o.query(".ft-tooltip--container")],Ii.prototype,"container",void 0),Ei([o.query(".ft-tooltip")],Ii.prototype,"tooltip",void 0),Ei([o.query(".ft-tooltip--content")],Ii.prototype,"tooltipContent",void 0),Ei([o.state()],Ii.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ii);const Ti={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ai=e.css`
|
|
280
280
|
:host {
|
|
281
281
|
line-height: 0;
|
|
282
282
|
}
|
|
@@ -352,7 +352,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
352
352
|
<div></div>
|
|
353
353
|
<div></div>
|
|
354
354
|
</div>
|
|
355
|
-
`}}var Fi,Mi;Bi.styles=Ai,i.customElement("ft-loader")(Bi),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=""}(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=""}(Mi||(Mi={})),new Map([...["abw"].map((t=>[t,Mi.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,Mi.AUDIO])),...["avi"].map((t=>[t,Mi.AVI])),...["chm","xhs"].map((t=>[t,Mi.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,Mi.CODE])),...["csv"].map((t=>[t,Mi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Mi.DITA])),...["epub"].map((t=>[t,Mi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Mi.EXCEL])),...["flac"].map((t=>[t,Mi.FLAC])),...["gif"].map((t=>[t,Mi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Mi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Mi.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,Mi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Mi.JPEG])),...["json"].map((t=>[t,Mi.JSON])),...["m4a","m4p"].map((t=>[t,Mi.M4A])),...["mov","qt"].map((t=>[t,Mi.MOV])),...["mp3"].map((t=>[t,Mi.MP3])),...["mp4","m4v"].map((t=>[t,Mi.MP4])),...["ogg","oga"].map((t=>[t,Mi.OGG])),...["pdf","ps"].map((t=>[t,Mi.PDF])),...["png"].map((t=>[t,Mi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Mi.POWERPOINT])),...["rar"].map((t=>[t,Mi.RAR])),...["stp"].map((t=>[t,Mi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Mi.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,Mi.VIDEO])),...["wav"].map((t=>[t,Mi.WAV])),...["wma"].map((t=>[t,Mi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Mi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Mi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Mi.YAML])),...["zip"].map((t=>[t,Mi.ZIP]))]);const _i={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")},Zi=e.css`
|
|
355
|
+
`}}var Fi,Mi;Bi.styles=Ai,i.customElement("ft-loader")(Bi),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.EXTLINK_LIGHT="",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=""}(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=""}(Mi||(Mi={})),new Map([...["abw"].map((t=>[t,Mi.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,Mi.AUDIO])),...["avi"].map((t=>[t,Mi.AVI])),...["chm","xhs"].map((t=>[t,Mi.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,Mi.CODE])),...["csv"].map((t=>[t,Mi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Mi.DITA])),...["epub"].map((t=>[t,Mi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Mi.EXCEL])),...["flac"].map((t=>[t,Mi.FLAC])),...["gif"].map((t=>[t,Mi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Mi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Mi.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,Mi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Mi.JPEG])),...["json"].map((t=>[t,Mi.JSON])),...["m4a","m4p"].map((t=>[t,Mi.M4A])),...["mov","qt"].map((t=>[t,Mi.MOV])),...["mp3"].map((t=>[t,Mi.MP3])),...["mp4","m4v"].map((t=>[t,Mi.MP4])),...["ogg","oga"].map((t=>[t,Mi.OGG])),...["pdf","ps"].map((t=>[t,Mi.PDF])),...["png"].map((t=>[t,Mi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Mi.POWERPOINT])),...["rar"].map((t=>[t,Mi.RAR])),...["stp"].map((t=>[t,Mi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Mi.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,Mi.VIDEO])),...["wav"].map((t=>[t,Mi.WAV])),...["wma"].map((t=>[t,Mi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Mi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Mi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Mi.YAML])),...["zip"].map((t=>[t,Mi.ZIP]))]);const _i={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")},Zi=e.css`
|
|
356
356
|
:host, i.ft-icon {
|
|
357
357
|
display: inline-flex;
|
|
358
358
|
align-items: center;
|
|
@@ -542,7 +542,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
542
542
|
${i.setVariable(Ti.size,Di.iconSize)};
|
|
543
543
|
${i.setVariable(Ti.color,"var(--ft-button-internal-color)")};
|
|
544
544
|
}
|
|
545
|
-
`,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 Vi extends
|
|
545
|
+
`,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 Vi extends(i.toFtFormComponent(i.FtLitElement,"button")){constructor(){super(...arguments),this.role="button",this.type="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=>{var i;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(i=this.form)||void 0===i||i.requestSubmit())}}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`
|
|
546
546
|
<button part="button"
|
|
547
547
|
class="${n.classMap(t)}"
|
|
548
548
|
aria-label="${this.getLabel()}"
|
|
@@ -558,11 +558,11 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
558
558
|
${this.resolveIcon()}
|
|
559
559
|
</button>
|
|
560
560
|
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?e.html`
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
561
|
+
<ft-tooltip part="tooltip"
|
|
562
|
+
text="${this.getLabel()}"
|
|
563
|
+
position="${this.tooltipPosition}">
|
|
564
|
+
${t}
|
|
565
|
+
</ft-tooltip>
|
|
566
566
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
567
567
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
568
|
-
|
|
568
|
+
<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}}Vi.elementDefinitions={"ft-ripple":y,"ft-tooltip":Ii,"ft-typography":wi,"ft-icon":Pi,"ft-loader":Bi},Vi.styles=[i.safariEllipsisFix,Gi],qi([o.property({type:String,reflect:!0})],Vi.prototype,"role",void 0),qi([o.property()],Vi.prototype,"type",void 0),qi([o.property({type:Boolean})],Vi.prototype,"primary",void 0),qi([o.property({type:Boolean})],Vi.prototype,"outlined",void 0),qi([o.property({type:Boolean})],Vi.prototype,"disabled",void 0),qi([o.property({type:Boolean})],Vi.prototype,"dense",void 0),qi([o.property({type:Boolean})],Vi.prototype,"round",void 0),qi([o.property()],Vi.prototype,"label",void 0),qi([o.property()],Vi.prototype,"icon",void 0),qi([o.property()],Vi.prototype,"iconVariant",void 0),qi([o.property({type:Boolean})],Vi.prototype,"trailingIcon",void 0),qi([o.property({type:Boolean})],Vi.prototype,"loading",void 0),qi([o.property()],Vi.prototype,"tooltipPosition",void 0),qi([o.property({type:Boolean})],Vi.prototype,"hideTooltip",void 0),qi([o.property({type:Boolean})],Vi.prototype,"forceTooltip",void 0),qi([o.query(".ft-button")],Vi.prototype,"button",void 0),qi([o.query(".ft-button--label slot")],Vi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Vi),t.FtButton=Vi,t.FtButtonCssVariables=Di,t.FtButtonDenseCssVariables=Li,t.FtButtonPrimaryCssVariables=Ki,t.styles=Gi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
package/build/ft-button.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);f(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let p=i.call(o,t);p||(p=c(t),e.call(o,t,p)),this===window.customElements&&(s.set(n,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,h,!0)}const x=this._whenDefinedPromises.get(t);return void 0!==x&&(x.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=p(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=n.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},x=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=x.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);f(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let p=i.call(o,t);p||(p=c(t),e.call(o,t,p)),this===window.customElements&&(s.set(n,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,h,!0)}const x=this._whenDefinedPromises.get(t);return void 0!==x&&(x.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=p(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=n.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},x=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=x.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Mi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{if(null!==i)try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -56,7 +56,7 @@ const c=window,f=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"
|
|
|
56
56
|
* Copyright 2017 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
58
|
*/
|
|
59
|
-
var R;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==S||S({ReactiveElement:E}),(null!==(m=w.reactiveElementVersions)&&void 0!==m?m:w.reactiveElementVersions=[]).push("1.6.1");const M=window,
|
|
59
|
+
var R;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==S||S({ReactiveElement:E}),(null!==(m=w.reactiveElementVersions)&&void 0!==m?m:w.reactiveElementVersions=[]).push("1.6.1");const M=window,F=M.trustedTypes,U=F?F.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",z=`lit$${(Math.random()+"").slice(9)}$`,B="?"+z,A=`<${B}>`,P=document,L=()=>P.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,_="[ \t\n\f\r]",D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,H=/>/g,K=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,V=/"/g,J=/^(?:script|style|textarea|title)$/i,q=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),X=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),G=new WeakMap,Q=P.createTreeWalker(P,129,null,!1),tt=(t,e)=>{const i=t.length-1,o=[];let n,r=2===e?"<svg>":"",s=D;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,p=0;for(;p<i.length&&(s.lastIndex=p,l=s.exec(i),null!==l);)p=s.lastIndex,s===D?"!--"===l[1]?s=W:void 0!==l[1]?s=H:void 0!==l[2]?(J.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=K):void 0!==l[3]&&(s=K):s===K?">"===l[0]?(s=null!=n?n:D,h=-1):void 0===l[1]?h=-2:(h=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?K:'"'===l[3]?V:Z):s===V||s===Z?s=K:s===W||s===H?s=D:(s=K,n=void 0);const c=s===K&&t[e+1].startsWith("/>")?" ":"";r+=s===D?i+A:h>=0?(o.push(a),i.slice(0,h)+j+i.slice(h)+z+c):i+z+(-2===h?(o.push(void 0),e):c)}const a=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(a):a,o]};class et{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,r=0;const s=t.length-1,a=this.parts,[l,h]=tt(t,e);if(this.el=et.createElement(l,i),Q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Q.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(j)||e.startsWith(z)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+j).split(z),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?st:"?"===e[1]?lt:"@"===e[1]?ht:rt})}else a.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(J.test(o.tagName)){const t=o.textContent.split(z),e=t.length-1;if(e>0){o.textContent=F?F.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),Q.nextNode(),a.push({type:2,index:++n});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===B)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(z,t+1));)a.push({type:7,index:n}),t+=z.length-1}n++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function it(t,e,i=t,o){var n,r,s,a;if(e===X)return e;let l=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=T(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(s=(a=i)._$Co)&&void 0!==s?s:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=it(t,l._$AS(t,e.values),l,o)),e}class ot{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);Q.currentNode=n;let r=Q.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new nt(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new pt(r,this,t)),this._$AV.push(e),l=o[++a]}s!==(null==l?void 0:l.index)&&(r=Q.nextNode(),s++)}return n}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class nt{constructor(t,e,i,o){var n;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=it(this,t,e),T(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(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!==Y&&T(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=et.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new ot(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new et(t)),e}T(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new nt(this.k(L()),this.k(L()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class rt{constructor(t,e,i,o,n){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let r=!1;if(void 0===n)t=it(this,t,e,0),r=!T(t)||t!==this._$AH&&t!==X,r&&(this._$AH=t);else{const o=t;let s,a;for(t=n[0],s=0;s<n.length-1;s++)a=it(this,o[i+s],e,s),a===X&&(a=this._$AH[s]),r||(r=!T(a)||a!==this._$AH[s]),a===Y?t=Y:t!==Y&&(t+=(null!=a?a:"")+n[s+1]),this._$AH[s]=a}r&&!o&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class st extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}const at=F?F.emptyScript:"";class lt extends rt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Y?this.element.setAttribute(this.name,at):this.element.removeAttribute(this.name)}}class ht extends rt{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=it(this,t,e,0))&&void 0!==i?i:Y)===X)return;const o=this._$AH,n=t===Y&&o!==Y||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==Y&&(o===Y||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){it(this,t)}}const ct=M.litHtmlPolyfillSupport;null==ct||ct(et,nt),(null!==(R=M.litHtmlVersions)&&void 0!==R?R:M.litHtmlVersions=[]).push("2.7.3");
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
@@ -94,17 +94,17 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
94
94
|
display: inline-block;
|
|
95
95
|
width: 0;
|
|
96
96
|
}
|
|
97
|
-
`;
|
|
97
|
+
`;window.ftReduxStores||(window.ftReduxStores={});const Et=Symbol("elementInternals");var Rt,Mt,Ft;const Ut=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ft=null===(Mt=null===(Rt=window.safari)||void 0===Rt?void 0:Rt.pushNotification)||void 0===Mt?void 0:Mt.toString())&&void 0!==Ft?Ft:""),jt=1,zt=2,Bt=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
98
98
|
/**
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright 2017 Google LLC
|
|
101
101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
-
*/class
|
|
102
|
+
*/class At{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
103
103
|
/**
|
|
104
104
|
* @license
|
|
105
105
|
* Copyright 2018 Google LLC
|
|
106
106
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
-
*/const Pt=
|
|
107
|
+
*/const Pt=Bt(class extends At{constructor(t){var e;if(super(t),t.type!==jt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const n=t.element.classList;this.it.forEach((t=>{t in e||(n.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.it.add(t)):(n.remove(t),this.it.delete(t)))}return X}}),Lt=yt.extend("--ft-ripple-color",vt.colorContent),Tt={color:Lt,backgroundColor:yt.extend("--ft-ripple-background-color",Lt),opacityContentOnSurfacePressed:yt.external(vt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:yt.external(vt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:yt.external(vt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:yt.external(vt.opacityContentOnSurfaceSelected,"Design system"),borderRadius:yt.create("--ft-ripple-border-radius","SIZE","0px")},It=yt.extend("--ft-ripple-color",vt.colorPrimary),_t=It,Dt=yt.extend("--ft-ripple-background-color",It),Wt=yt.extend("--ft-ripple-color",vt.colorSecondary),Ht=Wt,Kt=yt.extend("--ft-ripple-background-color",Wt),Zt=b`
|
|
108
108
|
:host {
|
|
109
109
|
display: contents;
|
|
110
110
|
}
|
|
@@ -117,7 +117,7 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
117
117
|
|
|
118
118
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
119
119
|
overflow: hidden;
|
|
120
|
-
border-radius: ${
|
|
120
|
+
border-radius: ${Tt.borderRadius};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.ft-ripple .ft-ripple--background,
|
|
@@ -151,23 +151,23 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.ft-ripple .ft-ripple--background {
|
|
154
|
-
background-color: ${
|
|
154
|
+
background-color: ${Tt.backgroundColor};
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.ft-ripple .ft-ripple--effect {
|
|
158
|
-
background-color: ${
|
|
158
|
+
background-color: ${Tt.color};
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
162
|
-
background-color: ${
|
|
162
|
+
background-color: ${Kt};
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
166
|
-
background-color: ${
|
|
166
|
+
background-color: ${Ht};
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
170
|
-
background-color: ${
|
|
170
|
+
background-color: ${Dt};
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
@@ -201,22 +201,22 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
204
|
-
opacity: ${
|
|
204
|
+
opacity: ${Tt.opacityContentOnSurfaceHover};
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
208
|
-
opacity: ${
|
|
208
|
+
opacity: ${Tt.opacityContentOnSurfaceSelected};
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
212
|
-
opacity: ${
|
|
212
|
+
opacity: ${Tt.opacityContentOnSurfaceFocused};
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
216
|
-
opacity: ${
|
|
216
|
+
opacity: ${Tt.opacityContentOnSurfacePressed};
|
|
217
217
|
transform: translate(-50%, -50%) scale(1);
|
|
218
218
|
}
|
|
219
|
-
`;var
|
|
219
|
+
`;var Vt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Jt extends kt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return q`
|
|
220
220
|
<style>
|
|
221
221
|
.ft-ripple .ft-ripple--effect {
|
|
222
222
|
left: ${this.originX}px;
|
|
@@ -227,115 +227,115 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
227
227
|
<div class="ft-ripple--background"></div>
|
|
228
228
|
<div class="ft-ripple--effect"></div>
|
|
229
229
|
</div>
|
|
230
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}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 e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),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",i),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 e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.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 e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}
|
|
230
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}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 e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),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",i),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 e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.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 e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Jt.elementDefinitions={},Jt.styles=Zt,Vt([o({type:Boolean})],Jt.prototype,"primary",void 0),Vt([o({type:Boolean})],Jt.prototype,"secondary",void 0),Vt([o({type:Boolean})],Jt.prototype,"unbounded",void 0),Vt([o({type:Boolean})],Jt.prototype,"activated",void 0),Vt([o({type:Boolean})],Jt.prototype,"selected",void 0),Vt([o({type:Boolean})],Jt.prototype,"disabled",void 0),Vt([n()],Jt.prototype,"hovered",void 0),Vt([n()],Jt.prototype,"focused",void 0),Vt([n()],Jt.prototype,"pressed",void 0),Vt([n()],Jt.prototype,"rippling",void 0),Vt([n()],Jt.prototype,"originX",void 0),Vt([n()],Jt.prototype,"originY",void 0),Vt([s(".ft-ripple")],Jt.prototype,"ripple",void 0),Vt([s(".ft-ripple--effect")],Jt.prototype,"rippleEffect",void 0),p("ft-ripple")(Jt);
|
|
231
231
|
/**
|
|
232
232
|
* @license
|
|
233
233
|
* Copyright 2020 Google LLC
|
|
234
234
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
235
235
|
*/
|
|
236
|
-
const
|
|
236
|
+
const qt=Symbol.for(""),Xt=t=>{if((null==t?void 0:t.r)===qt)return null==t?void 0:t._$litStatic$},Yt=t=>({_$litStatic$:t,r:qt}),Gt=new Map,Qt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],n=Xt(r));)l+=n+e[++h],p=!0;h!==o&&a.push(r),s.push(l),h++}if(h===o&&s.push(e[o]),p){const t=s.join("$$lit$$");void 0===(e=Gt.get(t))&&(s.raw=s,Gt.set(t,e=s)),i=a}return t(e,...i)})(q);var te;!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"}(te||(te={}));const ee=yt.extend("--ft-typography-font-family",vt.titleFont),ie=yt.extend("--ft-typography-font-family",vt.contentFont),oe={fontFamily:ie,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},ne=yt.extend("--ft-typography-title-font-family",ee),re=yt.extend("--ft-typography-title-font-size",oe.fontSize,"20px"),se=yt.extend("--ft-typography-title-font-weight",oe.fontWeight,"normal"),ae=yt.extend("--ft-typography-title-letter-spacing",oe.letterSpacing,"0.15px"),le=yt.extend("--ft-typography-title-line-height",oe.lineHeight,"1.2"),he=yt.extend("--ft-typography-title-text-transform",oe.textTransform,"inherit"),pe=yt.extend("--ft-typography-title-dense-font-family",ee),ce=yt.extend("--ft-typography-title-dense-font-size",oe.fontSize,"14px"),fe=yt.extend("--ft-typography-title-dense-font-weight",oe.fontWeight,"normal"),de=yt.extend("--ft-typography-title-dense-letter-spacing",oe.letterSpacing,"0.105px"),ue=yt.extend("--ft-typography-title-dense-line-height",oe.lineHeight,"1.7"),xe=yt.extend("--ft-typography-title-dense-text-transform",oe.textTransform,"inherit"),ye=yt.extend("--ft-typography-subtitle1-font-family",ie),be=yt.extend("--ft-typography-subtitle1-font-size",oe.fontSize,"16px"),ve=yt.extend("--ft-typography-subtitle1-font-weight",oe.fontWeight,"600"),ge=yt.extend("--ft-typography-subtitle1-letter-spacing",oe.letterSpacing,"0.144px"),me=yt.extend("--ft-typography-subtitle1-line-height",oe.lineHeight,"1.5"),we=yt.extend("--ft-typography-subtitle1-text-transform",oe.textTransform,"inherit"),$e=yt.extend("--ft-typography-subtitle2-font-family",ie),Oe=yt.extend("--ft-typography-subtitle2-font-size",oe.fontSize,"14px"),Se=yt.extend("--ft-typography-subtitle2-font-weight",oe.fontWeight,"normal"),ke=yt.extend("--ft-typography-subtitle2-letter-spacing",oe.letterSpacing,"0.098px"),Ne=yt.extend("--ft-typography-subtitle2-line-height",oe.lineHeight,"1.7"),Ce=yt.extend("--ft-typography-subtitle2-text-transform",oe.textTransform,"inherit"),Ee=yt.extend("--ft-typography-body1-font-family",ie),Re=yt.extend("--ft-typography-body1-font-size",oe.fontSize,"16px"),Me=yt.extend("--ft-typography-body1-font-weight",oe.fontWeight,"normal"),Fe=yt.extend("--ft-typography-body1-letter-spacing",oe.letterSpacing,"0.496px"),Ue=yt.extend("--ft-typography-body1-line-height",oe.lineHeight,"1.5"),je=yt.extend("--ft-typography-body1-text-transform",oe.textTransform,"inherit"),ze=yt.extend("--ft-typography-body2-font-family",ie),Be=yt.extend("--ft-typography-body2-font-size",oe.fontSize,"14px"),Ae=yt.extend("--ft-typography-body2-font-weight",oe.fontWeight,"normal"),Pe=yt.extend("--ft-typography-body2-letter-spacing",oe.letterSpacing,"0.252px"),Le=yt.extend("--ft-typography-body2-line-height",oe.lineHeight,"1.4"),Te=yt.extend("--ft-typography-body2-text-transform",oe.textTransform,"inherit"),Ie=yt.extend("--ft-typography-caption-font-family",ie),_e=yt.extend("--ft-typography-caption-font-size",oe.fontSize,"12px"),De=yt.extend("--ft-typography-caption-font-weight",oe.fontWeight,"normal"),We=yt.extend("--ft-typography-caption-letter-spacing",oe.letterSpacing,"0.396px"),He=yt.extend("--ft-typography-caption-line-height",oe.lineHeight,"1.33"),Ke=yt.extend("--ft-typography-caption-text-transform",oe.textTransform,"inherit"),Ze=yt.extend("--ft-typography-breadcrumb-font-family",ie),Ve=yt.extend("--ft-typography-breadcrumb-font-size",oe.fontSize,"10px"),Je=yt.extend("--ft-typography-breadcrumb-font-weight",oe.fontWeight,"normal"),qe=yt.extend("--ft-typography-breadcrumb-letter-spacing",oe.letterSpacing,"0.33px"),Xe=yt.extend("--ft-typography-breadcrumb-line-height",oe.lineHeight,"1.6"),Ye=yt.extend("--ft-typography-breadcrumb-text-transform",oe.textTransform,"inherit"),Ge=yt.extend("--ft-typography-overline-font-family",ie),Qe=yt.extend("--ft-typography-overline-font-size",oe.fontSize,"10px"),ti=yt.extend("--ft-typography-overline-font-weight",oe.fontWeight,"normal"),ei=yt.extend("--ft-typography-overline-letter-spacing",oe.letterSpacing,"1.5px"),ii=yt.extend("--ft-typography-overline-line-height",oe.lineHeight,"1.6"),oi=yt.extend("--ft-typography-overline-text-transform",oe.textTransform,"uppercase"),ni={fontFamily:yt.extend("--ft-typography-button-font-family",ie),fontSize:yt.extend("--ft-typography-button-font-size",oe.fontSize,"14px"),fontWeight:yt.extend("--ft-typography-button-font-weight",oe.fontWeight,"600"),letterSpacing:yt.extend("--ft-typography-button-letter-spacing",oe.letterSpacing,"1.246px"),lineHeight:yt.extend("--ft-typography-button-line-height",oe.lineHeight,"1.15"),textTransform:yt.extend("--ft-typography-button-text-transform",oe.textTransform,"uppercase")},ri=b`
|
|
237
237
|
.ft-typography--title {
|
|
238
|
-
font-family: ${
|
|
239
|
-
font-size: ${
|
|
240
|
-
font-weight: ${
|
|
241
|
-
letter-spacing: ${
|
|
242
|
-
line-height: ${
|
|
243
|
-
text-transform: ${
|
|
244
|
-
}
|
|
245
|
-
`,ri=b`
|
|
246
|
-
.ft-typography--title-dense {
|
|
247
|
-
font-family: ${he};
|
|
248
|
-
font-size: ${pe};
|
|
249
|
-
font-weight: ${ce};
|
|
250
|
-
letter-spacing: ${fe};
|
|
251
|
-
line-height: ${de};
|
|
252
|
-
text-transform: ${ue};
|
|
238
|
+
font-family: ${ne};
|
|
239
|
+
font-size: ${re};
|
|
240
|
+
font-weight: ${se};
|
|
241
|
+
letter-spacing: ${ae};
|
|
242
|
+
line-height: ${le};
|
|
243
|
+
text-transform: ${he};
|
|
253
244
|
}
|
|
254
245
|
`,si=b`
|
|
255
|
-
.ft-typography--
|
|
256
|
-
font-family: ${
|
|
257
|
-
font-size: ${
|
|
258
|
-
font-weight: ${
|
|
259
|
-
letter-spacing: ${
|
|
260
|
-
line-height: ${
|
|
261
|
-
text-transform: ${
|
|
246
|
+
.ft-typography--title-dense {
|
|
247
|
+
font-family: ${pe};
|
|
248
|
+
font-size: ${ce};
|
|
249
|
+
font-weight: ${fe};
|
|
250
|
+
letter-spacing: ${de};
|
|
251
|
+
line-height: ${ue};
|
|
252
|
+
text-transform: ${xe};
|
|
262
253
|
}
|
|
263
254
|
`,ai=b`
|
|
255
|
+
.ft-typography--subtitle1 {
|
|
256
|
+
font-family: ${ye};
|
|
257
|
+
font-size: ${be};
|
|
258
|
+
font-weight: ${ve};
|
|
259
|
+
letter-spacing: ${ge};
|
|
260
|
+
line-height: ${me};
|
|
261
|
+
text-transform: ${we};
|
|
262
|
+
}
|
|
263
|
+
`,li=b`
|
|
264
264
|
.ft-typography--subtitle2 {
|
|
265
|
-
font-family: ${
|
|
266
|
-
font-size: ${
|
|
267
|
-
font-weight: ${
|
|
268
|
-
letter-spacing: ${
|
|
269
|
-
line-height: ${
|
|
270
|
-
text-transform: ${
|
|
265
|
+
font-family: ${$e};
|
|
266
|
+
font-size: ${Oe};
|
|
267
|
+
font-weight: ${Se};
|
|
268
|
+
letter-spacing: ${ke};
|
|
269
|
+
line-height: ${Ne};
|
|
270
|
+
text-transform: ${Ce};
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
`,
|
|
273
|
+
`,hi=b`
|
|
274
274
|
.ft-typography--body1 {
|
|
275
|
-
font-family: ${
|
|
276
|
-
font-size: ${
|
|
277
|
-
font-weight: ${
|
|
278
|
-
letter-spacing: ${
|
|
275
|
+
font-family: ${Ee};
|
|
276
|
+
font-size: ${Re};
|
|
277
|
+
font-weight: ${Me};
|
|
278
|
+
letter-spacing: ${Fe};
|
|
279
279
|
line-height: ${Ue};
|
|
280
|
-
text-transform: ${
|
|
280
|
+
text-transform: ${je};
|
|
281
281
|
}
|
|
282
|
-
`,
|
|
282
|
+
`,pi=b`
|
|
283
283
|
.ft-typography--body2 {
|
|
284
|
-
font-family: ${
|
|
285
|
-
font-size: ${
|
|
286
|
-
font-weight: ${
|
|
284
|
+
font-family: ${ze};
|
|
285
|
+
font-size: ${Be};
|
|
286
|
+
font-weight: ${Ae};
|
|
287
287
|
letter-spacing: ${Pe};
|
|
288
|
-
line-height: ${
|
|
289
|
-
text-transform: ${
|
|
288
|
+
line-height: ${Le};
|
|
289
|
+
text-transform: ${Te};
|
|
290
290
|
}
|
|
291
|
-
`,
|
|
291
|
+
`,ci=b`
|
|
292
292
|
.ft-typography--caption {
|
|
293
|
-
font-family: ${
|
|
293
|
+
font-family: ${Ie};
|
|
294
294
|
font-size: ${_e};
|
|
295
|
-
font-weight: ${
|
|
296
|
-
letter-spacing: ${
|
|
297
|
-
line-height: ${
|
|
298
|
-
text-transform: ${
|
|
299
|
-
}
|
|
300
|
-
`,ci=b`
|
|
301
|
-
.ft-typography--breadcrumb {
|
|
302
|
-
font-family: ${Ke};
|
|
303
|
-
font-size: ${Ze};
|
|
304
|
-
font-weight: ${Ve};
|
|
305
|
-
letter-spacing: ${Je};
|
|
306
|
-
line-height: ${qe};
|
|
307
|
-
text-transform: ${Xe};
|
|
295
|
+
font-weight: ${De};
|
|
296
|
+
letter-spacing: ${We};
|
|
297
|
+
line-height: ${He};
|
|
298
|
+
text-transform: ${Ke};
|
|
308
299
|
}
|
|
309
300
|
`,fi=b`
|
|
310
|
-
.ft-typography--
|
|
311
|
-
font-family: ${
|
|
312
|
-
font-size: ${
|
|
313
|
-
font-weight: ${
|
|
314
|
-
letter-spacing: ${
|
|
315
|
-
line-height: ${
|
|
316
|
-
text-transform: ${
|
|
301
|
+
.ft-typography--breadcrumb {
|
|
302
|
+
font-family: ${Ze};
|
|
303
|
+
font-size: ${Ve};
|
|
304
|
+
font-weight: ${Je};
|
|
305
|
+
letter-spacing: ${qe};
|
|
306
|
+
line-height: ${Xe};
|
|
307
|
+
text-transform: ${Ye};
|
|
317
308
|
}
|
|
318
309
|
`,di=b`
|
|
319
|
-
.ft-typography--
|
|
320
|
-
font-family: ${
|
|
321
|
-
font-size: ${
|
|
322
|
-
font-weight: ${
|
|
323
|
-
letter-spacing: ${
|
|
324
|
-
line-height: ${
|
|
325
|
-
text-transform: ${oi
|
|
310
|
+
.ft-typography--overline {
|
|
311
|
+
font-family: ${Ge};
|
|
312
|
+
font-size: ${Qe};
|
|
313
|
+
font-weight: ${ti};
|
|
314
|
+
letter-spacing: ${ei};
|
|
315
|
+
line-height: ${ii};
|
|
316
|
+
text-transform: ${oi};
|
|
326
317
|
}
|
|
327
318
|
`,ui=b`
|
|
319
|
+
.ft-typography--button {
|
|
320
|
+
font-family: ${ni.fontFamily};
|
|
321
|
+
font-size: ${ni.fontSize};
|
|
322
|
+
font-weight: ${ni.fontWeight};
|
|
323
|
+
letter-spacing: ${ni.letterSpacing};
|
|
324
|
+
line-height: ${ni.lineHeight};
|
|
325
|
+
text-transform: ${ni.textTransform};
|
|
326
|
+
}
|
|
327
|
+
`,xi=b`
|
|
328
328
|
.ft-typography {
|
|
329
329
|
vertical-align: inherit;
|
|
330
330
|
}
|
|
331
|
-
`;var
|
|
332
|
-
<${
|
|
331
|
+
`;var yi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class bi extends kt{constructor(){super(...arguments),this.variant=te.body1}render(){return this.element?Qt`
|
|
332
|
+
<${Yt(this.element)}
|
|
333
333
|
class="ft-typography ft-typography--${this.variant}">
|
|
334
334
|
<slot></slot>
|
|
335
|
-
</${
|
|
336
|
-
`:
|
|
335
|
+
</${Yt(this.element)}>
|
|
336
|
+
`:Qt`
|
|
337
337
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
338
|
-
`}}
|
|
338
|
+
`}}bi.styles=[ri,si,ai,li,hi,pi,ci,fi,di,ui,xi],yi([o()],bi.prototype,"element",void 0),yi([o()],bi.prototype,"variant",void 0),p("ft-typography")(bi);const vi=yt.create("--ft-tooltip-distance","SIZE","4px"),gi=yt.create("--ft-tooltip-color","COLOR","#FFFFFF"),mi=yt.create("--ft-tooltip-background-color","COLOR","#666666"),wi=yt.create("--ft-tooltip-z-index","NUMBER","100"),$i=yt.external(vt.borderRadiusS,"Design system"),Oi=yt.create("--ft-tooltip-max-width","SIZE","150px"),Si=b`
|
|
339
339
|
.ft-tooltip--container {
|
|
340
340
|
display: block;
|
|
341
341
|
}
|
|
@@ -350,21 +350,21 @@ const Jt=Symbol.for(""),qt=t=>{if((null==t?void 0:t.r)===Jt)return null==t?void
|
|
|
350
350
|
box-sizing: border-box;
|
|
351
351
|
overflow: hidden;
|
|
352
352
|
width: max-content;
|
|
353
|
-
max-width: ${
|
|
353
|
+
max-width: ${Oi};
|
|
354
354
|
text-align: center;
|
|
355
|
-
padding: ${
|
|
356
|
-
z-index: ${
|
|
355
|
+
padding: ${vi};
|
|
356
|
+
z-index: ${wi};
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
.ft-tooltip--content {
|
|
360
360
|
padding: 4px 8px;
|
|
361
|
-
border-radius: ${
|
|
362
|
-
background-color: ${
|
|
363
|
-
color: ${
|
|
361
|
+
border-radius: ${$i};
|
|
362
|
+
background-color: ${mi};
|
|
363
|
+
color: ${gi};
|
|
364
364
|
position: relative;
|
|
365
365
|
word-break: break-word;
|
|
366
366
|
}
|
|
367
|
-
`;var
|
|
367
|
+
`;var ki=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ni extends kt{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 e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return q`
|
|
368
368
|
<div part="container"
|
|
369
369
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
370
370
|
@mouseenter=${this.onHover}
|
|
@@ -382,13 +382,13 @@ const Jt=Symbol.for(""),qt=t=>{if((null==t?void 0:t.r)===Jt)return null==t?void
|
|
|
382
382
|
</div>
|
|
383
383
|
</div>
|
|
384
384
|
</div>
|
|
385
|
-
`}
|
|
385
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&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 e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,n=(t.offsetWidth-e)/2;let r=0,s=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":s=t.offsetTop-i-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":s=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=r+"px",a.top=s+"px";const l=this.tooltip.getBoundingClientRect();let h=-l.x,p=l.x+l.width-window.innerWidth;a.left=r+Math.round(this.correctOutOfWindowPixels(h,p))+"px";let c=-l.y,f=l.y+l.height-window.innerHeight;a.top=s+Math.round(this.correctOutOfWindowPixels(c,f))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${Oi})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Ni.elementDefinitions={"ft-typography":bi},Ni.styles=Si,ki([o()],Ni.prototype,"text",void 0),ki([o({type:Boolean})],Ni.prototype,"manual",void 0),ki([o({type:Boolean})],Ni.prototype,"inline",void 0),ki([o({type:Number})],Ni.prototype,"delay",void 0),ki([o()],Ni.prototype,"position",void 0),ki([
|
|
386
386
|
/**
|
|
387
387
|
* @license
|
|
388
388
|
* Copyright 2017 Google LLC
|
|
389
389
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
390
390
|
*/
|
|
391
|
-
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
391
|
+
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Ni.prototype,"slotNodes",void 0),ki([s(".ft-tooltip--container")],Ni.prototype,"container",void 0),ki([s(".ft-tooltip")],Ni.prototype,"tooltip",void 0),ki([s(".ft-tooltip--content")],Ni.prototype,"tooltipContent",void 0),ki([n()],Ni.prototype,"visible",void 0),p("ft-tooltip")(Ni);const Ci={color:yt.extend("--ft-loader-color",vt.colorPrimary),size:yt.create("--ft-loader-size","SIZE","80px")},Ei=b`
|
|
392
392
|
:host {
|
|
393
393
|
line-height: 0;
|
|
394
394
|
}
|
|
@@ -397,8 +397,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
397
397
|
display: inline-block;
|
|
398
398
|
position: relative;
|
|
399
399
|
|
|
400
|
-
width: ${
|
|
401
|
-
height: ${
|
|
400
|
+
width: ${Ci.size};
|
|
401
|
+
height: ${Ci.size};
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
.ft-loader div {
|
|
@@ -407,7 +407,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
407
407
|
width: 25%;
|
|
408
408
|
height: 25%;
|
|
409
409
|
border-radius: 50%;
|
|
410
|
-
background: ${
|
|
410
|
+
background: ${Ci.color};
|
|
411
411
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
412
412
|
}
|
|
413
413
|
|
|
@@ -454,23 +454,23 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
454
454
|
transform: translate(0, 0);
|
|
455
455
|
}
|
|
456
456
|
100% {
|
|
457
|
-
transform: translate(calc(0.35 * ${
|
|
457
|
+
transform: translate(calc(0.35 * ${Ci.size}), 0);
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
`;class
|
|
460
|
+
`;class Ri extends kt{render(){return q`
|
|
461
461
|
<div class="ft-loader">
|
|
462
462
|
<div></div>
|
|
463
463
|
<div></div>
|
|
464
464
|
<div></div>
|
|
465
465
|
<div></div>
|
|
466
466
|
</div>
|
|
467
|
-
`}}
|
|
467
|
+
`}}Ri.styles=Ei,p("ft-loader")(Ri);
|
|
468
468
|
/**
|
|
469
469
|
* @license
|
|
470
470
|
* Copyright 2017 Google LLC
|
|
471
471
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
472
472
|
*/
|
|
473
|
-
class
|
|
473
|
+
class Mi extends At{constructor(t){if(super(t),this.et=Y,t.type!==zt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Y||null==t)return this.ft=void 0,this.et=t;if(t===X)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Mi.directiveName="unsafeHTML",Mi.resultType=1;const Fi=Bt(Mi);var Ui,ji;!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.EXTLINK_LIGHT="",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=""}(Ui||(Ui={})),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=""}(ji||(ji={})),new Map([...["abw"].map((t=>[t,ji.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,ji.AUDIO])),...["avi"].map((t=>[t,ji.AVI])),...["chm","xhs"].map((t=>[t,ji.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,ji.CODE])),...["csv"].map((t=>[t,ji.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ji.DITA])),...["epub"].map((t=>[t,ji.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ji.EXCEL])),...["flac"].map((t=>[t,ji.FLAC])),...["gif"].map((t=>[t,ji.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ji.GZIP])),...["html","htm","xhtml"].map((t=>[t,ji.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,ji.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ji.JPEG])),...["json"].map((t=>[t,ji.JSON])),...["m4a","m4p"].map((t=>[t,ji.M4A])),...["mov","qt"].map((t=>[t,ji.MOV])),...["mp3"].map((t=>[t,ji.MP3])),...["mp4","m4v"].map((t=>[t,ji.MP4])),...["ogg","oga"].map((t=>[t,ji.OGG])),...["pdf","ps"].map((t=>[t,ji.PDF])),...["png"].map((t=>[t,ji.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ji.POWERPOINT])),...["rar"].map((t=>[t,ji.RAR])),...["stp"].map((t=>[t,ji.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ji.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,ji.VIDEO])),...["wav"].map((t=>[t,ji.WAV])),...["wma"].map((t=>[t,ji.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ji.WORD])),...["xml","xsl","rdf"].map((t=>[t,ji.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ji.YAML])),...["zip"].map((t=>[t,ji.ZIP]))]);const zi={size:yt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:yt.extend("--ft-icon-fluid-topics-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:yt.extend("--ft-icon-file-format-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:yt.extend("--ft-icon-material-font-family",yt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:yt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Bi=b`
|
|
474
474
|
:host, i.ft-icon {
|
|
475
475
|
display: inline-flex;
|
|
476
476
|
align-items: center;
|
|
@@ -479,14 +479,14 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
:host {
|
|
482
|
-
width: ${
|
|
483
|
-
height: ${
|
|
482
|
+
width: ${zi.size};
|
|
483
|
+
height: ${zi.size};
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
i.ft-icon {
|
|
487
487
|
width: 100%;
|
|
488
488
|
height: 100%;
|
|
489
|
-
font-size: ${
|
|
489
|
+
font-size: ${zi.size};
|
|
490
490
|
line-height: 1;
|
|
491
491
|
font-weight: normal;
|
|
492
492
|
text-transform: none;
|
|
@@ -497,33 +497,33 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
497
497
|
text-rendering: auto;
|
|
498
498
|
-webkit-font-smoothing: antialiased;
|
|
499
499
|
-moz-osx-font-smoothing: grayscale;
|
|
500
|
-
vertical-align: ${
|
|
500
|
+
vertical-align: ${zi.verticalAlign};
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
i.ft-icon.ft-icon--fluid-topics {
|
|
504
|
-
font-family: ${
|
|
504
|
+
font-family: ${zi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
505
505
|
|
|
506
506
|
/* Ugly fix because font is broken */
|
|
507
|
-
font-size: calc(0.75 * ${
|
|
508
|
-
line-height: ${
|
|
507
|
+
font-size: calc(0.75 * ${zi.size});
|
|
508
|
+
line-height: ${zi.size};
|
|
509
509
|
position: relative;
|
|
510
510
|
top: -4%;
|
|
511
511
|
justify-content: center;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
.ft-icon--file-format {
|
|
515
|
-
font-family: ${
|
|
515
|
+
font-family: ${zi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
.ft-icon--material {
|
|
519
|
-
font-family: ${
|
|
519
|
+
font-family: ${zi.materialFontFamily}, "Material Icons", sans-serif;
|
|
520
520
|
}
|
|
521
|
-
`;var
|
|
521
|
+
`;var Ai;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ai||(Ai={}));var Pi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Li extends kt{constructor(){super(...arguments),this.resolvedIcon=Y}render(){const t=this.variant&&Object.values(Ai).includes(this.variant)?this.variant:Ai.fluid_topics,e=t!==Ai.material||!!this.value;return q`
|
|
522
522
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
523
|
-
${
|
|
523
|
+
${Fi(this.resolvedIcon)}
|
|
524
524
|
<slot ?hidden=${e}></slot>
|
|
525
525
|
</i>
|
|
526
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
526
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Ai.file_format:this.resolvedIcon=null!==(t=ji[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Ai.material:this.resolvedIcon=this.value||Y;break;default:this.resolvedIcon=null!==(e=Ui[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Li.elementDefinitions={},Li.styles=Bi,Pi([o()],Li.prototype,"variant",void 0),Pi([o()],Li.prototype,"value",void 0),Pi([n()],Li.prototype,"resolvedIcon",void 0),Pi([s("slot")],Li.prototype,"slottedContent",void 0),p("ft-icon")(Li);const Ti=yt.extend("--ft-button-color",vt.colorPrimary),Ii={backgroundColor:yt.extend("--ft-button-background-color",vt.colorSurface),borderRadius:yt.extend("--ft-button-border-radius",vt.borderRadiusL),color:Ti,fontSize:yt.extend("--ft-button-font-size",ni.fontSize),iconSize:yt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:yt.extend("--ft-button-ripple-color",Ti),verticalPadding:yt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:yt.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:yt.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:yt.external(vt.colorOpacityDisabled,"Design system")},_i=yt.extend("--ft-button-primary-color",yt.extend("--ft-button-color",vt.colorOnPrimary)),Di={backgroundColor:yt.extend("--ft-button-primary-background-color",yt.extend("--ft-button-background-color",vt.colorPrimary)),color:_i,rippleColor:yt.extend("--ft-button-primary-ripple-color",_i)},Wi={borderRadius:yt.extend("--ft-button-dense-border-radius",yt.extend("--ft-button-border-radius",vt.borderRadiusM)),verticalPadding:yt.create("--ft-button-dense-vertical-padding","SIZE","2px"),horizontalPadding:yt.create("--ft-button-dense-horizontal-padding","SIZE","4px"),iconPadding:yt.create("--ft-button-dense-icon-padding","SIZE","4px")},Hi=[b`
|
|
527
527
|
:host {
|
|
528
528
|
display: inline-block;
|
|
529
529
|
max-width: 100%;
|
|
@@ -534,7 +534,7 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
534
534
|
box-shadow: 0px 0px 0px transparent;
|
|
535
535
|
border: 0px solid transparent;
|
|
536
536
|
text-shadow: 0px 0px 0px transparent;
|
|
537
|
-
font-size: ${
|
|
537
|
+
font-size: ${Ii.fontSize};
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
button:hover {
|
|
@@ -563,31 +563,31 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
563
563
|
border: none;
|
|
564
564
|
pointer-events: auto;
|
|
565
565
|
|
|
566
|
-
--ft-button-internal-line-height: max(calc(${
|
|
567
|
-
--ft-button-internal-color: ${
|
|
568
|
-
${bt(
|
|
569
|
-
${bt(
|
|
566
|
+
--ft-button-internal-line-height: max(calc(${Ii.fontSize} + 2px), ${Ii.iconSize});
|
|
567
|
+
--ft-button-internal-color: ${Ii.color};
|
|
568
|
+
${bt(zi.size,Ii.iconSize)};
|
|
569
|
+
${bt(Tt.color,Ii.rippleColor)};
|
|
570
570
|
|
|
571
|
-
border-radius: ${
|
|
572
|
-
padding: ${
|
|
573
|
-
background-color: ${
|
|
571
|
+
border-radius: ${Ii.borderRadius};
|
|
572
|
+
padding: ${Ii.verticalPadding} ${Ii.horizontalPadding};
|
|
573
|
+
background-color: ${Ii.backgroundColor};
|
|
574
574
|
color: var(--ft-button-internal-color);
|
|
575
575
|
-webkit-mask-image: radial-gradient(white, black);
|
|
576
576
|
}
|
|
577
577
|
|
|
578
578
|
.ft-button.ft-button--outlined {
|
|
579
579
|
border: 1px solid var(--ft-button-internal-color);
|
|
580
|
-
padding: calc(${
|
|
580
|
+
padding: calc(${Ii.verticalPadding} - 1px) calc(${Ii.horizontalPadding} - 1px);
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
.ft-button.ft-button--dense {
|
|
584
|
-
padding: ${
|
|
585
|
-
border-radius: ${
|
|
586
|
-
gap: ${
|
|
584
|
+
padding: ${Wi.verticalPadding} ${Wi.horizontalPadding};
|
|
585
|
+
border-radius: ${Wi.borderRadius};
|
|
586
|
+
gap: ${Wi.iconPadding};
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
590
|
-
padding: calc(${
|
|
590
|
+
padding: calc(${Wi.verticalPadding} - 1px) calc(${Wi.horizontalPadding} - 1px);
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
.ft-button:not([disabled]):hover {
|
|
@@ -595,22 +595,22 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
.ft-button--round {
|
|
598
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
598
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Ii.verticalPadding});
|
|
599
599
|
}
|
|
600
600
|
|
|
601
601
|
.ft-button--round.ft-button--dense {
|
|
602
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
602
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Wi.verticalPadding});
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
.ft-button[disabled] {
|
|
606
606
|
filter: grayscale(1);
|
|
607
|
-
opacity: ${
|
|
607
|
+
opacity: ${Ii.opacityDisabled};
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
.ft-button.ft-button--primary {
|
|
611
|
-
background-color: ${
|
|
612
|
-
--ft-button-internal-color: ${
|
|
613
|
-
${bt(
|
|
611
|
+
background-color: ${Di.backgroundColor};
|
|
612
|
+
--ft-button-internal-color: ${Di.color};
|
|
613
|
+
${bt(Tt.color,Di.rippleColor)};
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
.ft-button:focus {
|
|
@@ -623,13 +623,13 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
623
623
|
white-space: nowrap;
|
|
624
624
|
text-overflow: ellipsis;
|
|
625
625
|
display: block;
|
|
626
|
-
margin: 0 ${
|
|
627
|
-
${bt(
|
|
628
|
-
${bt(
|
|
626
|
+
margin: 0 ${Ii.iconPadding};
|
|
627
|
+
${bt(ni.fontSize,"1em")};
|
|
628
|
+
${bt(ni.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
.ft-button--dense .ft-button--label {
|
|
632
|
-
margin: 0 ${
|
|
632
|
+
margin: 0 ${Wi.iconPadding};
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
.ft-button--label[hidden] {
|
|
@@ -642,13 +642,13 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
.ft-button--label[hidden] + ft-icon {
|
|
645
|
-
margin: 0 calc(${
|
|
646
|
-
padding: 0 ${
|
|
645
|
+
margin: 0 calc(${Ii.horizontalPadding} * -1);
|
|
646
|
+
padding: 0 ${Ii.verticalPadding};
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
650
|
-
margin: 0 calc(${
|
|
651
|
-
padding: 0 ${
|
|
650
|
+
margin: 0 calc(${Wi.horizontalPadding} * -1);
|
|
651
|
+
padding: 0 ${Wi.verticalPadding};
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -657,10 +657,10 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
ft-loader {
|
|
660
|
-
${bt(
|
|
661
|
-
${bt(
|
|
660
|
+
${bt(Ci.size,Ii.iconSize)};
|
|
661
|
+
${bt(Ci.color,"var(--ft-button-internal-color)")};
|
|
662
662
|
}
|
|
663
|
-
`,Nt];var
|
|
663
|
+
`,Nt];var Ki=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Zi extends(function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Et].form}constructor(...t){super(t),this[Et]=this.attachInternals(),this[Et].role=e}setFormValue(t){this[Et].setFormValue(t)}}}(kt,"button")){constructor(){super(...arguments),this.role="button",this.type="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=>{var e;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit())}}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(q`
|
|
664
664
|
<button part="button"
|
|
665
665
|
class="${Pt(t)}"
|
|
666
666
|
aria-label="${this.getLabel()}"
|
|
@@ -676,11 +676,11 @@ class Ri extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
676
676
|
${this.resolveIcon()}
|
|
677
677
|
</button>
|
|
678
678
|
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?q`
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
679
|
+
<ft-tooltip part="tooltip"
|
|
680
|
+
text="${this.getLabel()}"
|
|
681
|
+
position="${this.tooltipPosition}">
|
|
682
|
+
${t}
|
|
683
|
+
</ft-tooltip>
|
|
684
684
|
`:t}resolveIcon(){return this.loading?q`
|
|
685
685
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?q`
|
|
686
|
-
|
|
686
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:Y}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}}Zi.elementDefinitions={"ft-ripple":Jt,"ft-tooltip":Ni,"ft-typography":bi,"ft-icon":Li,"ft-loader":Ri},Zi.styles=[Ct,Hi],Ki([o({type:String,reflect:!0})],Zi.prototype,"role",void 0),Ki([o()],Zi.prototype,"type",void 0),Ki([o({type:Boolean})],Zi.prototype,"primary",void 0),Ki([o({type:Boolean})],Zi.prototype,"outlined",void 0),Ki([o({type:Boolean})],Zi.prototype,"disabled",void 0),Ki([o({type:Boolean})],Zi.prototype,"dense",void 0),Ki([o({type:Boolean})],Zi.prototype,"round",void 0),Ki([o()],Zi.prototype,"label",void 0),Ki([o()],Zi.prototype,"icon",void 0),Ki([o()],Zi.prototype,"iconVariant",void 0),Ki([o({type:Boolean})],Zi.prototype,"trailingIcon",void 0),Ki([o({type:Boolean})],Zi.prototype,"loading",void 0),Ki([o()],Zi.prototype,"tooltipPosition",void 0),Ki([o({type:Boolean})],Zi.prototype,"hideTooltip",void 0),Ki([o({type:Boolean})],Zi.prototype,"forceTooltip",void 0),Ki([s(".ft-button")],Zi.prototype,"button",void 0),Ki([s(".ft-button--label slot")],Zi.prototype,"slottedContent",void 0),p("ft-button")(Zi),t.FtButton=Zi,t.FtButtonCssVariables=Ii,t.FtButtonDenseCssVariables=Wi,t.FtButtonPrimaryCssVariables=Di,t.styles=Hi}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-button",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59",
|
|
4
4
|
"description": "A generic Fluid Topics tag",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
23
|
-
"@fluid-topics/ft-loader": "1.0.
|
|
24
|
-
"@fluid-topics/ft-ripple": "1.0.
|
|
25
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
26
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.0.59",
|
|
23
|
+
"@fluid-topics/ft-loader": "1.0.59",
|
|
24
|
+
"@fluid-topics/ft-ripple": "1.0.59",
|
|
25
|
+
"@fluid-topics/ft-tooltip": "1.0.59",
|
|
26
|
+
"@fluid-topics/ft-typography": "1.0.59",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "1.0.59",
|
|
28
28
|
"lit": "2.7.2"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "9412dc7c29ebc722b1b133bba63b1744f4bfdf60"
|
|
31
31
|
}
|