@fluid-topics/ft-file-drop 1.0.58 → 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-file-drop.light.js +9 -9
- package/build/ft-file-drop.min.js +194 -194
- package/package.json +4 -4
|
@@ -229,7 +229,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
229
229
|
</${et(this.element)}>
|
|
230
230
|
`:nt`
|
|
231
231
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
232
|
-
`}}yi.styles=[ri,si,li,ai,pi,hi,fi,ci,di,ui,gi],bi([o.property()],yi.prototype,"element",void 0),bi([o.property()],yi.prototype,"variant",void 0),i.customElement("ft-typography")(yi),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=""}(xi||(xi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(vi||(vi={})),new Map([...["abw"].map((t=>[t,vi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,vi.AUDIO])),...["avi"].map((t=>[t,vi.AVI])),...["chm","xhs"].map((t=>[t,vi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,vi.CODE])),...["csv"].map((t=>[t,vi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,vi.DITA])),...["epub"].map((t=>[t,vi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,vi.EXCEL])),...["flac"].map((t=>[t,vi.FLAC])),...["gif"].map((t=>[t,vi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,vi.GZIP])),...["html","htm","xhtml"].map((t=>[t,vi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,vi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,vi.JPEG])),...["json"].map((t=>[t,vi.JSON])),...["m4a","m4p"].map((t=>[t,vi.M4A])),...["mov","qt"].map((t=>[t,vi.MOV])),...["mp3"].map((t=>[t,vi.MP3])),...["mp4","m4v"].map((t=>[t,vi.MP4])),...["ogg","oga"].map((t=>[t,vi.OGG])),...["pdf","ps"].map((t=>[t,vi.PDF])),...["png"].map((t=>[t,vi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,vi.POWERPOINT])),...["rar"].map((t=>[t,vi.RAR])),...["stp"].map((t=>[t,vi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,vi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,vi.VIDEO])),...["wav"].map((t=>[t,vi.WAV])),...["wma"].map((t=>[t,vi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,vi.WORD])),...["xml","xsl","rdf"].map((t=>[t,vi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,vi.YAML])),...["zip"].map((t=>[t,vi.ZIP]))]);const mi={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},$i=e.css`
|
|
232
|
+
`}}yi.styles=[ri,si,li,ai,pi,hi,fi,ci,di,ui,gi],bi([o.property()],yi.prototype,"element",void 0),bi([o.property()],yi.prototype,"variant",void 0),i.customElement("ft-typography")(yi),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=""}(xi||(xi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(vi||(vi={})),new Map([...["abw"].map((t=>[t,vi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,vi.AUDIO])),...["avi"].map((t=>[t,vi.AVI])),...["chm","xhs"].map((t=>[t,vi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,vi.CODE])),...["csv"].map((t=>[t,vi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,vi.DITA])),...["epub"].map((t=>[t,vi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,vi.EXCEL])),...["flac"].map((t=>[t,vi.FLAC])),...["gif"].map((t=>[t,vi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,vi.GZIP])),...["html","htm","xhtml"].map((t=>[t,vi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,vi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,vi.JPEG])),...["json"].map((t=>[t,vi.JSON])),...["m4a","m4p"].map((t=>[t,vi.M4A])),...["mov","qt"].map((t=>[t,vi.MOV])),...["mp3"].map((t=>[t,vi.MP3])),...["mp4","m4v"].map((t=>[t,vi.MP4])),...["ogg","oga"].map((t=>[t,vi.OGG])),...["pdf","ps"].map((t=>[t,vi.PDF])),...["png"].map((t=>[t,vi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,vi.POWERPOINT])),...["rar"].map((t=>[t,vi.RAR])),...["stp"].map((t=>[t,vi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,vi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,vi.VIDEO])),...["wav"].map((t=>[t,vi.WAV])),...["wma"].map((t=>[t,vi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,vi.WORD])),...["xml","xsl","rdf"].map((t=>[t,vi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,vi.YAML])),...["zip"].map((t=>[t,vi.ZIP]))]);const mi={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},$i=e.css`
|
|
233
233
|
:host, i.ft-icon {
|
|
234
234
|
display: inline-flex;
|
|
235
235
|
align-items: center;
|
|
@@ -329,7 +329,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
329
329
|
</div>
|
|
330
330
|
</div>
|
|
331
331
|
</div>
|
|
332
|
-
`}
|
|
332
|
+
`}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 r=0,s=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":s=t.offsetTop-e-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-i-this.tooltip.offsetLeft;break;case"right":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=r+"px",l.top=s+"px";const a=this.tooltip.getBoundingClientRect();let p=-a.x,h=a.x+a.width-window.innerWidth;l.left=r+Math.round(this.correctOutOfWindowPixels(p,h))+"px";let f=-a.y,c=a.y+a.height-window.innerHeight;l.top=s+Math.round(this.correctOutOfWindowPixels(f,c))+"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))}}Ti.elementDefinitions={"ft-typography":yi},Ti.styles=Bi,Ni([o.property()],Ti.prototype,"text",void 0),Ni([o.property({type:Boolean})],Ti.prototype,"manual",void 0),Ni([o.property({type:Boolean})],Ti.prototype,"inline",void 0),Ni([o.property({type:Number})],Ti.prototype,"delay",void 0),Ni([o.property()],Ti.prototype,"position",void 0),Ni([o.queryAssignedNodes("",!0)],Ti.prototype,"slotNodes",void 0),Ni([o.query(".ft-tooltip--container")],Ti.prototype,"container",void 0),Ni([o.query(".ft-tooltip")],Ti.prototype,"tooltip",void 0),Ni([o.query(".ft-tooltip--content")],Ti.prototype,"tooltipContent",void 0),Ni([o.state()],Ti.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ti);const Zi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ai=e.css`
|
|
333
333
|
:host {
|
|
334
334
|
line-height: 0;
|
|
335
335
|
}
|
|
@@ -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(Zi.size,Ui.iconSize)};
|
|
543
543
|
${i.setVariable(Zi.color,"var(--ft-button-internal-color)")};
|
|
544
544
|
}
|
|
545
|
-
`,i.noTextSelect];var Ki=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Gi extends
|
|
545
|
+
`,i.noTextSelect];var Ki=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Gi 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,14 +558,14 @@ 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}}Gi.elementDefinitions={"ft-ripple":v,"ft-tooltip":Ti,"ft-typography":yi,"ft-icon":zi,"ft-loader":Fi},Gi.styles=[i.safariEllipsisFix,Pi],Ki([o.property({type:String,reflect:!0})],Gi.prototype,"role",void 0),Ki([o.property()],Gi.prototype,"type",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"primary",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"outlined",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"disabled",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"round",void 0),Ki([o.property()],Gi.prototype,"label",void 0),Ki([o.property()],Gi.prototype,"icon",void 0),Ki([o.property()],Gi.prototype,"iconVariant",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"loading",void 0),Ki([o.property()],Gi.prototype,"tooltipPosition",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"forceTooltip",void 0),Ki([o.query(".ft-button")],Gi.prototype,"button",void 0),Ki([o.query(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Gi);const Vi=i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnSurface),qi={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorSurface),color:Vi,fontSize:i.FtCssVariableFactory.extend("--ft-chip-font-size",_t.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:i.FtCssVariableFactory.extend("--ft-chip-ripple-color",Vi),horizontalPadding:i.FtCssVariableFactory.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:i.FtCssVariableFactory.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Xi=i.FtCssVariableFactory.extend("--ft-chip-highlighted-color",i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnPrimary)),Yi={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color",i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorPrimary)),color:Xi,rippleColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color",Xi)},Ji=i.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Qi=i.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","SIZE","4px"),te=[i.noTextSelect,e.css`
|
|
569
569
|
:host {
|
|
570
570
|
display: inline-block;
|
|
571
571
|
max-width: 100%;
|
|
@@ -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,i=window.customElements.define,e=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||[]);d(n,l,a);const c={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,c),this._definitionsByClass.set(n,c);let h=e.call(o,t);h||(h=p(t),i.call(o,t,h)),this===window.customElements&&(s.set(n,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){const i=this._definitionsByTag.get(t);return i?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let o=this._awaitingUpgrade.get(i);o||this._awaitingUpgrade.set(i,o=new Set),e?o.add(t):o.delete(t)}},window.HTMLElement=function(){let i=l;if(i)return l=void 0,i;const e=s.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let i=t.getRootNode();if(!c(i)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},p=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=h(e)||window.customElements,n=o._getDefinition(i);return n?u(e,n):r.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!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)}},d=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(i.has(r)){const t=this.getAttribute(r);o.call(this,r,n),e.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(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},f=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):f(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){f(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let b=[document];const g=(t,i,e=void 0)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){b.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),b.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const y=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){b.push(this),e.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const o=i.call(this,...e);return t.set(o,this),o},e.forEach((i=>{const e=window.ElementInternals.prototype,o=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...i)}}));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 i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),n=i.get(o)||[];this[+e]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=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,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new r(i)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=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||[]);d(n,l,a);const c={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,c),this._definitionsByClass.set(n,c);let h=e.call(o,t);h||(h=p(t),i.call(o,t,h)),this===window.customElements&&(s.set(n,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){const i=this._definitionsByTag.get(t);return i?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let o=this._awaitingUpgrade.get(i);o||this._awaitingUpgrade.set(i,o=new Set),e?o.add(t):o.delete(t)}},window.HTMLElement=function(){let i=l;if(i)return l=void 0,i;const e=s.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let i=t.getRootNode();if(!c(i)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},p=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=h(e)||window.customElements,n=o._getDefinition(i);return n?u(e,n):r.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!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)}},d=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(i.has(r)){const t=this.getAttribute(r);o.call(this,r,n),e.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(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},f=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):f(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){f(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let b=[document];const g=(t,i,e=void 0)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){b.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),b.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const y=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){b.push(this),e.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const o=i.call(this,...e);return t.set(o,this),o},e.forEach((i=>{const e=window.ElementInternals.prototype,o=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...i)}}));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 i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),n=i.get(o)||[];this[+e]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=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,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new r(i)}})}}try{window.customElements.define("custom-element",null)}catch(fe){const t=window.customElements.define;window.customElements.define=(i,e,o)=>{if(null!==e)try{t.bind(window.customElements)(i,e,o)}catch(t){console.info(i,e,o,t)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){return this.callbacks=[t],this.debounce(i)}queue(t,i){return this.callbacks.push(t),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,i)=>{this.resolvePromise=t,this.rejectPromise=i}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,i;const e=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(i=this.resolvePromise)&&void 0!==i?i:()=>null;this.clearPromise();for(let t of e)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 p=window,d=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"
|
|
|
56
56
|
* Copyright 2017 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
58
|
*/
|
|
59
|
-
var R;N.finalized=!0,N.elementProperties=new Map,N.elementStyles=[],N.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:N}),(null!==(m=$.reactiveElementVersions)&&void 0!==m?m:$.reactiveElementVersions=[]).push("1.6.1");const z=window,M=z.trustedTypes,U=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",F=`lit$${(Math.random()+"").slice(9)}$`,B="?"+F,
|
|
59
|
+
var R;N.finalized=!0,N.elementProperties=new Map,N.elementStyles=[],N.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:N}),(null!==(m=$.reactiveElementVersions)&&void 0!==m?m:$.reactiveElementVersions=[]).push("1.6.1");const z=window,M=z.trustedTypes,U=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",F=`lit$${(Math.random()+"").slice(9)}$`,B="?"+F,I=`<${B}>`,L=document,T=()=>L.createComment(""),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,D="[ \t\n\f\r]",_=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,H=/>/g,Z=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,V=/"/g,J=/^(?:script|style|textarea|title)$/i,q=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),X=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),G=new WeakMap,Q=L.createTreeWalker(L,129,null,!1),tt=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",s=_;for(let i=0;i<e;i++){const e=t[i];let a,l,c=-1,h=0;for(;h<e.length&&(s.lastIndex=h,l=s.exec(e),null!==l);)h=s.lastIndex,s===_?"!--"===l[1]?s=W:void 0!==l[1]?s=H:void 0!==l[2]?(J.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=Z):void 0!==l[3]&&(s=Z):s===Z?">"===l[0]?(s=null!=n?n:_,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?Z:'"'===l[3]?V:K):s===V||s===K?s=Z:s===W||s===H?s=_:(s=Z,n=void 0);const p=s===Z&&t[i+1].startsWith("/>")?" ":"";r+=s===_?e+I:c>=0?(o.push(a),e.slice(0,c)+j+e.slice(c)+F+p):e+F+(-2===c?(o.push(void 0),i):p)}const a=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(a):a,o]};class it{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,a=this.parts,[l,c]=tt(t,i);if(this.el=it.createElement(l,e),Q.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Q.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(j)||i.startsWith(F)){const e=c[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+j).split(F),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?st:"?"===i[1]?lt:"@"===i[1]?ct:rt})}else a.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(J.test(o.tagName)){const t=o.textContent.split(F),i=t.length-1;if(i>0){o.textContent=M?M.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],T()),Q.nextNode(),a.push({type:2,index:++n});o.append(t[i],T())}}}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(F,t+1));)a.push({type:7,index:n}),t+=F.length-1}n++}}static createElement(t,i){const e=L.createElement("template");return e.innerHTML=t,e}}function et(t,i,e=t,o){var n,r,s,a;if(i===X)return i;let l=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const c=A(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,e,o)),void 0!==o?(null!==(s=(a=e)._$Co)&&void 0!==s?s:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=et(t,l._$AS(t,i.values),l,o)),i}class ot{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:L).importNode(e,!0);Q.currentNode=n;let r=Q.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let i;2===l.type?i=new nt(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new ht(r,this,t)),this._$AV.push(i),l=o[++a]}s!==(null==l?void 0:l.index)&&(r=Q.nextNode(),s++)}return n}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class nt{constructor(t,i,e,o){var n;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=et(this,t,i),A(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=>P(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&&A(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=it.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new ot(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=G.get(t.strings);return void 0===i&&G.set(t.strings,i=new it(t)),i}T(t){P(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new nt(this.k(T()),this.k(T()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class rt{constructor(t,i,e,o,n){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=et(this,t,i,0),r=!A(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=et(this,o[e+s],i,s),a===X&&(a=this._$AH[s]),r||(r=!A(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=M?M.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 ct extends rt{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=et(this,t,i,0))&&void 0!==e?e: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 i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class ht{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){et(this,t)}}const pt=z.litHtmlPolyfillSupport;null==pt||pt(it,nt),(null!==(R=z.litHtmlVersions)&&void 0!==R?R:z.litHtmlVersions=[]).push("2.7.3");
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
@@ -94,17 +94,17 @@ var dt,ft;let ut=class extends N{constructor(){super(...arguments),this.renderOp
|
|
|
94
94
|
display: inline-block;
|
|
95
95
|
width: 0;
|
|
96
96
|
}
|
|
97
|
-
`;
|
|
97
|
+
`;window.ftReduxStores||(window.ftReduxStores={});const Nt=Symbol("elementInternals");var Rt,zt,Mt;const Ut=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Mt=null===(zt=null===(Rt=window.safari)||void 0===Rt?void 0:Rt.pushNotification)||void 0===zt?void 0:zt.toString())&&void 0!==Mt?Mt:""),jt=1,Ft=2,Bt=t=>(...i)=>({_$litDirective$:t,values:i});
|
|
98
98
|
/**
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright 2017 Google LLC
|
|
101
101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
-
*/class
|
|
102
|
+
*/class It{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}
|
|
103
103
|
/**
|
|
104
104
|
* @license
|
|
105
105
|
* Copyright 2018 Google LLC
|
|
106
106
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
-
*/const Lt=
|
|
107
|
+
*/const Lt=Bt(class extends It{constructor(t){var i;if(super(t),t.type!==jt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.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((i=>t[i])).join(" ")+" "}update(t,[i]){var e,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 i)i[t]&&!(null===(e=this.nt)||void 0===e?void 0:e.has(t))&&this.it.add(t);return this.render(i)}const n=t.element.classList;this.it.forEach((t=>{t in i||(n.remove(t),this.it.delete(t))}));for(const t in i){const e=!!i[t];e===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(e?(n.add(t),this.it.add(t)):(n.remove(t),this.it.delete(t)))}return X}});const Tt=bt.extend("--ft-ripple-color",yt.colorContent),At={color:Tt,backgroundColor:bt.extend("--ft-ripple-background-color",Tt),opacityContentOnSurfacePressed:bt.external(yt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:bt.external(yt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:bt.external(yt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:bt.external(yt.opacityContentOnSurfaceSelected,"Design system"),borderRadius:bt.create("--ft-ripple-border-radius","SIZE","0px")},Pt=bt.extend("--ft-ripple-color",yt.colorPrimary),Dt=Pt,_t=bt.extend("--ft-ripple-background-color",Pt),Wt=bt.extend("--ft-ripple-color",yt.colorSecondary),Ht=Wt,Zt=bt.extend("--ft-ripple-background-color",Wt),Kt=g`
|
|
108
108
|
:host {
|
|
109
109
|
display: contents;
|
|
110
110
|
}
|
|
@@ -117,7 +117,7 @@ var dt,ft;let ut=class extends N{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: ${At.borderRadius};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.ft-ripple .ft-ripple--background,
|
|
@@ -151,27 +151,27 @@ var dt,ft;let ut=class extends N{constructor(){super(...arguments),this.renderOp
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.ft-ripple .ft-ripple--background {
|
|
154
|
-
background-color: ${
|
|
154
|
+
background-color: ${At.backgroundColor};
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.ft-ripple .ft-ripple--effect {
|
|
158
|
-
background-color: ${
|
|
158
|
+
background-color: ${At.color};
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
162
|
-
background-color: ${
|
|
162
|
+
background-color: ${Zt};
|
|
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: ${_t};
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
174
|
-
background-color: ${
|
|
174
|
+
background-color: ${Dt};
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
.ft-ripple .ft-ripple--background {
|
|
@@ -201,22 +201,22 @@ var dt,ft;let ut=class extends N{constructor(){super(...arguments),this.renderOp
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
204
|
-
opacity: ${
|
|
204
|
+
opacity: ${At.opacityContentOnSurfaceHover};
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
208
|
-
opacity: ${
|
|
208
|
+
opacity: ${At.opacityContentOnSurfaceSelected};
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
212
|
-
opacity: ${
|
|
212
|
+
opacity: ${At.opacityContentOnSurfaceFocused};
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
216
|
-
opacity: ${
|
|
216
|
+
opacity: ${At.opacityContentOnSurfacePressed};
|
|
217
217
|
transform: translate(-50%, -50%) scale(1);
|
|
218
218
|
}
|
|
219
|
-
`;var
|
|
219
|
+
`;var Vt=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Jt extends St{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 i(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 i(10),this.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),r=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-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,121 +227,121 @@ var dt,ft;let ut=class extends N{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 i,e;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.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 i,e;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Jt.elementDefinitions={},Jt.styles=Kt,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),h("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=>(i,...e)=>{const o=e.length;let n,r;const s=[],a=[];let l,c=0,h=!1;for(;c<o;){for(l=i[c];c<o&&void 0!==(r=e[c],n=Xt(r));)l+=n+i[++c],h=!0;c!==o&&a.push(r),s.push(l),c++}if(c===o&&s.push(i[o]),h){const t=s.join("$$lit$$");void 0===(i=Gt.get(t))&&(s.raw=s,Gt.set(t,i=s)),e=a}return t(i,...e)})(q);var ti;!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"}(ti||(ti={}));const ii=bt.extend("--ft-typography-font-family",yt.titleFont),ei=bt.extend("--ft-typography-font-family",yt.contentFont),oi={fontFamily:ei,fontSize:bt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:bt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:bt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:bt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:bt.create("--ft-typography-text-transform","UNKNOWN","inherit")},ni=bt.extend("--ft-typography-title-font-family",ii),ri=bt.extend("--ft-typography-title-font-size",oi.fontSize,"20px"),si=bt.extend("--ft-typography-title-font-weight",oi.fontWeight,"normal"),ai=bt.extend("--ft-typography-title-letter-spacing",oi.letterSpacing,"0.15px"),li=bt.extend("--ft-typography-title-line-height",oi.lineHeight,"1.2"),ci=bt.extend("--ft-typography-title-text-transform",oi.textTransform,"inherit"),hi=bt.extend("--ft-typography-title-dense-font-family",ii),pi=bt.extend("--ft-typography-title-dense-font-size",oi.fontSize,"14px"),di=bt.extend("--ft-typography-title-dense-font-weight",oi.fontWeight,"normal"),fi=bt.extend("--ft-typography-title-dense-letter-spacing",oi.letterSpacing,"0.105px"),ui=bt.extend("--ft-typography-title-dense-line-height",oi.lineHeight,"1.7"),vi=bt.extend("--ft-typography-title-dense-text-transform",oi.textTransform,"inherit"),bi=bt.extend("--ft-typography-subtitle1-font-family",ei),gi=bt.extend("--ft-typography-subtitle1-font-size",oi.fontSize,"16px"),yi=bt.extend("--ft-typography-subtitle1-font-weight",oi.fontWeight,"600"),xi=bt.extend("--ft-typography-subtitle1-letter-spacing",oi.letterSpacing,"0.144px"),mi=bt.extend("--ft-typography-subtitle1-line-height",oi.lineHeight,"1.5"),$i=bt.extend("--ft-typography-subtitle1-text-transform",oi.textTransform,"inherit"),wi=bt.extend("--ft-typography-subtitle2-font-family",ei),Oi=bt.extend("--ft-typography-subtitle2-font-size",oi.fontSize,"14px"),ki=bt.extend("--ft-typography-subtitle2-font-weight",oi.fontWeight,"normal"),Si=bt.extend("--ft-typography-subtitle2-letter-spacing",oi.letterSpacing,"0.098px"),Ci=bt.extend("--ft-typography-subtitle2-line-height",oi.lineHeight,"1.7"),Ei=bt.extend("--ft-typography-subtitle2-text-transform",oi.textTransform,"inherit"),Ni=bt.extend("--ft-typography-body1-font-family",ei),Ri=bt.extend("--ft-typography-body1-font-size",oi.fontSize,"16px"),zi=bt.extend("--ft-typography-body1-font-weight",oi.fontWeight,"normal"),Mi=bt.extend("--ft-typography-body1-letter-spacing",oi.letterSpacing,"0.496px"),Ui=bt.extend("--ft-typography-body1-line-height",oi.lineHeight,"1.5"),ji=bt.extend("--ft-typography-body1-text-transform",oi.textTransform,"inherit"),Fi={fontFamily:bt.extend("--ft-typography-body2-font-family",ei),fontSize:bt.extend("--ft-typography-body2-font-size",oi.fontSize,"14px"),fontWeight:bt.extend("--ft-typography-body2-font-weight",oi.fontWeight,"normal"),letterSpacing:bt.extend("--ft-typography-body2-letter-spacing",oi.letterSpacing,"0.252px"),lineHeight:bt.extend("--ft-typography-body2-line-height",oi.lineHeight,"1.4"),textTransform:bt.extend("--ft-typography-body2-text-transform",oi.textTransform,"inherit")},Bi=bt.extend("--ft-typography-caption-font-family",ei),Ii=bt.extend("--ft-typography-caption-font-size",oi.fontSize,"12px"),Li=bt.extend("--ft-typography-caption-font-weight",oi.fontWeight,"normal"),Ti=bt.extend("--ft-typography-caption-letter-spacing",oi.letterSpacing,"0.396px"),Ai=bt.extend("--ft-typography-caption-line-height",oi.lineHeight,"1.33"),Pi=bt.extend("--ft-typography-caption-text-transform",oi.textTransform,"inherit"),Di=bt.extend("--ft-typography-breadcrumb-font-family",ei),_i=bt.extend("--ft-typography-breadcrumb-font-size",oi.fontSize,"10px"),Wi=bt.extend("--ft-typography-breadcrumb-font-weight",oi.fontWeight,"normal"),Hi=bt.extend("--ft-typography-breadcrumb-letter-spacing",oi.letterSpacing,"0.33px"),Zi=bt.extend("--ft-typography-breadcrumb-line-height",oi.lineHeight,"1.6"),Ki=bt.extend("--ft-typography-breadcrumb-text-transform",oi.textTransform,"inherit"),Vi=bt.extend("--ft-typography-overline-font-family",ei),Ji=bt.extend("--ft-typography-overline-font-size",oi.fontSize,"10px"),qi=bt.extend("--ft-typography-overline-font-weight",oi.fontWeight,"normal"),Xi=bt.extend("--ft-typography-overline-letter-spacing",oi.letterSpacing,"1.5px"),Yi=bt.extend("--ft-typography-overline-line-height",oi.lineHeight,"1.6"),Gi=bt.extend("--ft-typography-overline-text-transform",oi.textTransform,"uppercase"),Qi={fontFamily:bt.extend("--ft-typography-button-font-family",ei),fontSize:bt.extend("--ft-typography-button-font-size",oi.fontSize,"14px"),fontWeight:bt.extend("--ft-typography-button-font-weight",oi.fontWeight,"600"),letterSpacing:bt.extend("--ft-typography-button-letter-spacing",oi.letterSpacing,"1.246px"),lineHeight:bt.extend("--ft-typography-button-line-height",oi.lineHeight,"1.15"),textTransform:bt.extend("--ft-typography-button-text-transform",oi.textTransform,"uppercase")},te=g`
|
|
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
|
-
`,te=g`
|
|
246
|
-
.ft-typography--title-dense {
|
|
247
|
-
font-family: ${ci};
|
|
248
|
-
font-size: ${hi};
|
|
249
|
-
font-weight: ${pi};
|
|
250
|
-
letter-spacing: ${di};
|
|
251
|
-
line-height: ${fi};
|
|
252
|
-
text-transform: ${ui};
|
|
238
|
+
font-family: ${ni};
|
|
239
|
+
font-size: ${ri};
|
|
240
|
+
font-weight: ${si};
|
|
241
|
+
letter-spacing: ${ai};
|
|
242
|
+
line-height: ${li};
|
|
243
|
+
text-transform: ${ci};
|
|
253
244
|
}
|
|
254
245
|
`,ie=g`
|
|
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: ${hi};
|
|
248
|
+
font-size: ${pi};
|
|
249
|
+
font-weight: ${di};
|
|
250
|
+
letter-spacing: ${fi};
|
|
251
|
+
line-height: ${ui};
|
|
252
|
+
text-transform: ${vi};
|
|
262
253
|
}
|
|
263
254
|
`,ee=g`
|
|
255
|
+
.ft-typography--subtitle1 {
|
|
256
|
+
font-family: ${bi};
|
|
257
|
+
font-size: ${gi};
|
|
258
|
+
font-weight: ${yi};
|
|
259
|
+
letter-spacing: ${xi};
|
|
260
|
+
line-height: ${mi};
|
|
261
|
+
text-transform: ${$i};
|
|
262
|
+
}
|
|
263
|
+
`,oe=g`
|
|
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: ${wi};
|
|
266
|
+
font-size: ${Oi};
|
|
267
|
+
font-weight: ${ki};
|
|
268
|
+
letter-spacing: ${Si};
|
|
269
|
+
line-height: ${Ci};
|
|
270
|
+
text-transform: ${Ei};
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
`,
|
|
273
|
+
`,ne=g`
|
|
274
274
|
.ft-typography--body1 {
|
|
275
|
-
font-family: ${
|
|
276
|
-
font-size: ${
|
|
277
|
-
font-weight: ${
|
|
278
|
-
letter-spacing: ${
|
|
279
|
-
line-height: ${
|
|
280
|
-
text-transform: ${
|
|
275
|
+
font-family: ${Ni};
|
|
276
|
+
font-size: ${Ri};
|
|
277
|
+
font-weight: ${zi};
|
|
278
|
+
letter-spacing: ${Mi};
|
|
279
|
+
line-height: ${Ui};
|
|
280
|
+
text-transform: ${ji};
|
|
281
281
|
}
|
|
282
|
-
`,
|
|
282
|
+
`,re=g`
|
|
283
283
|
.ft-typography--body2 {
|
|
284
|
-
font-family: ${
|
|
285
|
-
font-size: ${
|
|
286
|
-
font-weight: ${
|
|
287
|
-
letter-spacing: ${
|
|
288
|
-
line-height: ${
|
|
289
|
-
text-transform: ${
|
|
284
|
+
font-family: ${Fi.fontFamily};
|
|
285
|
+
font-size: ${Fi.fontSize};
|
|
286
|
+
font-weight: ${Fi.fontWeight};
|
|
287
|
+
letter-spacing: ${Fi.letterSpacing};
|
|
288
|
+
line-height: ${Fi.lineHeight};
|
|
289
|
+
text-transform: ${Fi.textTransform};
|
|
290
290
|
}
|
|
291
|
-
`,
|
|
291
|
+
`,se=g`
|
|
292
292
|
.ft-typography--caption {
|
|
293
|
-
font-family: ${
|
|
294
|
-
font-size: ${
|
|
293
|
+
font-family: ${Bi};
|
|
294
|
+
font-size: ${Ii};
|
|
295
295
|
font-weight: ${Li};
|
|
296
|
-
letter-spacing: ${
|
|
297
|
-
line-height: ${
|
|
298
|
-
text-transform: ${
|
|
299
|
-
}
|
|
300
|
-
`,se=g`
|
|
301
|
-
.ft-typography--breadcrumb {
|
|
302
|
-
font-family: ${Pi};
|
|
303
|
-
font-size: ${Di};
|
|
304
|
-
font-weight: ${_i};
|
|
305
|
-
letter-spacing: ${Wi};
|
|
306
|
-
line-height: ${Hi};
|
|
307
|
-
text-transform: ${Zi};
|
|
296
|
+
letter-spacing: ${Ti};
|
|
297
|
+
line-height: ${Ai};
|
|
298
|
+
text-transform: ${Pi};
|
|
308
299
|
}
|
|
309
300
|
`,ae=g`
|
|
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: ${Di};
|
|
303
|
+
font-size: ${_i};
|
|
304
|
+
font-weight: ${Wi};
|
|
305
|
+
letter-spacing: ${Hi};
|
|
306
|
+
line-height: ${Zi};
|
|
307
|
+
text-transform: ${Ki};
|
|
317
308
|
}
|
|
318
309
|
`,le=g`
|
|
319
|
-
.ft-typography--
|
|
320
|
-
font-family: ${
|
|
321
|
-
font-size: ${
|
|
322
|
-
font-weight: ${
|
|
323
|
-
letter-spacing: ${
|
|
324
|
-
line-height: ${
|
|
325
|
-
text-transform: ${Gi
|
|
310
|
+
.ft-typography--overline {
|
|
311
|
+
font-family: ${Vi};
|
|
312
|
+
font-size: ${Ji};
|
|
313
|
+
font-weight: ${qi};
|
|
314
|
+
letter-spacing: ${Xi};
|
|
315
|
+
line-height: ${Yi};
|
|
316
|
+
text-transform: ${Gi};
|
|
326
317
|
}
|
|
327
318
|
`,ce=g`
|
|
319
|
+
.ft-typography--button {
|
|
320
|
+
font-family: ${Qi.fontFamily};
|
|
321
|
+
font-size: ${Qi.fontSize};
|
|
322
|
+
font-weight: ${Qi.fontWeight};
|
|
323
|
+
letter-spacing: ${Qi.letterSpacing};
|
|
324
|
+
line-height: ${Qi.lineHeight};
|
|
325
|
+
text-transform: ${Qi.textTransform};
|
|
326
|
+
}
|
|
327
|
+
`,he=g`
|
|
328
328
|
.ft-typography {
|
|
329
329
|
vertical-align: inherit;
|
|
330
330
|
}
|
|
331
|
-
`;var
|
|
332
|
-
<${
|
|
331
|
+
`;var pe=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class de extends St{constructor(){super(...arguments),this.variant=ti.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
|
+
`}}de.styles=[te,ie,ee,oe,ne,re,se,ae,le,ce,he],pe([o()],de.prototype,"element",void 0),pe([o()],de.prototype,"variant",void 0),h("ft-typography")(de);
|
|
339
339
|
/**
|
|
340
340
|
* @license
|
|
341
341
|
* Copyright 2017 Google LLC
|
|
342
342
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
343
343
|
*/
|
|
344
|
-
class
|
|
344
|
+
class fe extends It{constructor(t){if(super(t),this.et=Y,t.type!==Ft)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 i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}}fe.directiveName="unsafeHTML",fe.resultType=1;const ue=Bt(fe);var ve,be;!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=""}(ve||(ve={})),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=""}(be||(be={})),new Map([...["abw"].map((t=>[t,be.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,be.AUDIO])),...["avi"].map((t=>[t,be.AVI])),...["chm","xhs"].map((t=>[t,be.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,be.CODE])),...["csv"].map((t=>[t,be.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,be.DITA])),...["epub"].map((t=>[t,be.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,be.EXCEL])),...["flac"].map((t=>[t,be.FLAC])),...["gif"].map((t=>[t,be.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,be.GZIP])),...["html","htm","xhtml"].map((t=>[t,be.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,be.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,be.JPEG])),...["json"].map((t=>[t,be.JSON])),...["m4a","m4p"].map((t=>[t,be.M4A])),...["mov","qt"].map((t=>[t,be.MOV])),...["mp3"].map((t=>[t,be.MP3])),...["mp4","m4v"].map((t=>[t,be.MP4])),...["ogg","oga"].map((t=>[t,be.OGG])),...["pdf","ps"].map((t=>[t,be.PDF])),...["png"].map((t=>[t,be.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,be.POWERPOINT])),...["rar"].map((t=>[t,be.RAR])),...["stp"].map((t=>[t,be.STP])),...["txt","rtf","md","mdown"].map((t=>[t,be.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,be.VIDEO])),...["wav"].map((t=>[t,be.WAV])),...["wma"].map((t=>[t,be.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,be.WORD])),...["xml","xsl","rdf"].map((t=>[t,be.XML])),...["yaml","yml","x-yaml"].map((t=>[t,be.YAML])),...["zip"].map((t=>[t,be.ZIP]))]);const ge={size:bt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:bt.extend("--ft-icon-fluid-topics-font-family",bt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:bt.extend("--ft-icon-file-format-font-family",bt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:bt.extend("--ft-icon-material-font-family",bt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:bt.create("--ft-icon-vertical-align","UNKNOWN","unset")},ye=g`
|
|
345
345
|
:host, i.ft-icon {
|
|
346
346
|
display: inline-flex;
|
|
347
347
|
align-items: center;
|
|
@@ -350,14 +350,14 @@ class de extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
:host {
|
|
353
|
-
width: ${
|
|
354
|
-
height: ${
|
|
353
|
+
width: ${ge.size};
|
|
354
|
+
height: ${ge.size};
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
i.ft-icon {
|
|
358
358
|
width: 100%;
|
|
359
359
|
height: 100%;
|
|
360
|
-
font-size: ${
|
|
360
|
+
font-size: ${ge.size};
|
|
361
361
|
line-height: 1;
|
|
362
362
|
font-weight: normal;
|
|
363
363
|
text-transform: none;
|
|
@@ -368,33 +368,33 @@ class de extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
368
368
|
text-rendering: auto;
|
|
369
369
|
-webkit-font-smoothing: antialiased;
|
|
370
370
|
-moz-osx-font-smoothing: grayscale;
|
|
371
|
-
vertical-align: ${
|
|
371
|
+
vertical-align: ${ge.verticalAlign};
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
i.ft-icon.ft-icon--fluid-topics {
|
|
375
|
-
font-family: ${
|
|
375
|
+
font-family: ${ge.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
376
376
|
|
|
377
377
|
/* Ugly fix because font is broken */
|
|
378
|
-
font-size: calc(0.75 * ${
|
|
379
|
-
line-height: ${
|
|
378
|
+
font-size: calc(0.75 * ${ge.size});
|
|
379
|
+
line-height: ${ge.size};
|
|
380
380
|
position: relative;
|
|
381
381
|
top: -4%;
|
|
382
382
|
justify-content: center;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
.ft-icon--file-format {
|
|
386
|
-
font-family: ${
|
|
386
|
+
font-family: ${ge.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
.ft-icon--material {
|
|
390
|
-
font-family: ${
|
|
390
|
+
font-family: ${ge.materialFontFamily}, "Material Icons", sans-serif;
|
|
391
391
|
}
|
|
392
|
-
`;var
|
|
392
|
+
`;var xe;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(xe||(xe={}));var me=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class $e extends St{constructor(){super(...arguments),this.resolvedIcon=Y}render(){const t=this.variant&&Object.values(xe).includes(this.variant)?this.variant:xe.fluid_topics,i=t!==xe.material||!!this.value;return q`
|
|
393
393
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
394
|
-
${
|
|
394
|
+
${ue(this.resolvedIcon)}
|
|
395
395
|
<slot ?hidden=${i}></slot>
|
|
396
396
|
</i>
|
|
397
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let e=this.value||this.textContent;switch(this.variant){case
|
|
397
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let e=this.value||this.textContent;switch(this.variant){case xe.file_format:this.resolvedIcon=null!==(t=be[e.replace("-","_").toUpperCase()])&&void 0!==t?t:e;break;case xe.material:this.resolvedIcon=this.value||Y;break;default:this.resolvedIcon=null!==(i=ve[e.replace("-","_").toUpperCase()])&&void 0!==i?i:e}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}$e.elementDefinitions={},$e.styles=ye,me([o()],$e.prototype,"variant",void 0),me([o()],$e.prototype,"value",void 0),me([n()],$e.prototype,"resolvedIcon",void 0),me([s("slot")],$e.prototype,"slottedContent",void 0),h("ft-icon")($e);const we=bt.create("--ft-tooltip-distance","SIZE","4px"),Oe=bt.create("--ft-tooltip-color","COLOR","#FFFFFF"),ke=bt.create("--ft-tooltip-background-color","COLOR","#666666"),Se=bt.create("--ft-tooltip-z-index","NUMBER","100"),Ce=bt.external(yt.borderRadiusS,"Design system"),Ee=bt.create("--ft-tooltip-max-width","SIZE","150px"),Ne=g`
|
|
398
398
|
.ft-tooltip--container {
|
|
399
399
|
display: block;
|
|
400
400
|
}
|
|
@@ -409,21 +409,21 @@ class de extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
409
409
|
box-sizing: border-box;
|
|
410
410
|
overflow: hidden;
|
|
411
411
|
width: max-content;
|
|
412
|
-
max-width: ${
|
|
412
|
+
max-width: ${Ee};
|
|
413
413
|
text-align: center;
|
|
414
|
-
padding: ${
|
|
415
|
-
z-index: ${
|
|
414
|
+
padding: ${we};
|
|
415
|
+
z-index: ${Se};
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
.ft-tooltip--content {
|
|
419
419
|
padding: 4px 8px;
|
|
420
|
-
border-radius: ${
|
|
421
|
-
background-color: ${
|
|
422
|
-
color: ${
|
|
420
|
+
border-radius: ${Ce};
|
|
421
|
+
background-color: ${ke};
|
|
422
|
+
color: ${Oe};
|
|
423
423
|
position: relative;
|
|
424
424
|
word-break: break-word;
|
|
425
425
|
}
|
|
426
|
-
`;var
|
|
426
|
+
`;var Re=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class ze extends St{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i,this.revealDebouncer=new i}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return q`
|
|
427
427
|
<div part="container"
|
|
428
428
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
429
429
|
@mouseenter=${this.onHover}
|
|
@@ -441,13 +441,13 @@ class de extends Bt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
441
441
|
</div>
|
|
442
442
|
</div>
|
|
443
443
|
</div>
|
|
444
|
-
`}
|
|
444
|
+
`}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 r=0,s=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":s=t.offsetTop-e-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-i-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 c=-l.x,h=l.x+l.width-window.innerWidth;a.left=r+Math.round(this.correctOutOfWindowPixels(c,h))+"px";let p=-l.y,d=l.y+l.height-window.innerHeight;a.top=s+Math.round(this.correctOutOfWindowPixels(p,d))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${Ee})`}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))}}ze.elementDefinitions={"ft-typography":de},ze.styles=Ne,Re([o()],ze.prototype,"text",void 0),Re([o({type:Boolean})],ze.prototype,"manual",void 0),Re([o({type:Boolean})],ze.prototype,"inline",void 0),Re([o({type:Number})],ze.prototype,"delay",void 0),Re([o()],ze.prototype,"position",void 0),Re([
|
|
445
445
|
/**
|
|
446
446
|
* @license
|
|
447
447
|
* Copyright 2017 Google LLC
|
|
448
448
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
449
449
|
*/
|
|
450
|
-
function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(i?`[name=${i}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return e?s.filter((t=>t.matches(e))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:i,selector:e}):r({descriptor:t=>({get(){var t,i;const e="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==r?void 0:r.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
450
|
+
function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(i?`[name=${i}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return e?s.filter((t=>t.matches(e))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:i,selector:e}):r({descriptor:t=>({get(){var t,i;const e="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==r?void 0:r.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],ze.prototype,"slotNodes",void 0),Re([s(".ft-tooltip--container")],ze.prototype,"container",void 0),Re([s(".ft-tooltip")],ze.prototype,"tooltip",void 0),Re([s(".ft-tooltip--content")],ze.prototype,"tooltipContent",void 0),Re([n()],ze.prototype,"visible",void 0),h("ft-tooltip")(ze);const Me={color:bt.extend("--ft-loader-color",yt.colorPrimary),size:bt.create("--ft-loader-size","SIZE","80px")},Ue=g`
|
|
451
451
|
:host {
|
|
452
452
|
line-height: 0;
|
|
453
453
|
}
|
|
@@ -456,8 +456,8 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
456
456
|
display: inline-block;
|
|
457
457
|
position: relative;
|
|
458
458
|
|
|
459
|
-
width: ${
|
|
460
|
-
height: ${
|
|
459
|
+
width: ${Me.size};
|
|
460
|
+
height: ${Me.size};
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
.ft-loader div {
|
|
@@ -466,7 +466,7 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
466
466
|
width: 25%;
|
|
467
467
|
height: 25%;
|
|
468
468
|
border-radius: 50%;
|
|
469
|
-
background: ${
|
|
469
|
+
background: ${Me.color};
|
|
470
470
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
471
471
|
}
|
|
472
472
|
|
|
@@ -513,17 +513,17 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
513
513
|
transform: translate(0, 0);
|
|
514
514
|
}
|
|
515
515
|
100% {
|
|
516
|
-
transform: translate(calc(0.35 * ${
|
|
516
|
+
transform: translate(calc(0.35 * ${Me.size}), 0);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
`;class
|
|
519
|
+
`;class je extends St{render(){return q`
|
|
520
520
|
<div class="ft-loader">
|
|
521
521
|
<div></div>
|
|
522
522
|
<div></div>
|
|
523
523
|
<div></div>
|
|
524
524
|
<div></div>
|
|
525
525
|
</div>
|
|
526
|
-
`}}
|
|
526
|
+
`}}je.styles=Ue,h("ft-loader")(je);const Fe=bt.extend("--ft-button-color",yt.colorPrimary),Be={backgroundColor:bt.extend("--ft-button-background-color",yt.colorSurface),borderRadius:bt.extend("--ft-button-border-radius",yt.borderRadiusL),color:Fe,fontSize:bt.extend("--ft-button-font-size",Qi.fontSize),iconSize:bt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:bt.extend("--ft-button-ripple-color",Fe),verticalPadding:bt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:bt.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:bt.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:bt.external(yt.colorOpacityDisabled,"Design system")},Ie=bt.extend("--ft-button-primary-color",bt.extend("--ft-button-color",yt.colorOnPrimary)),Le={backgroundColor:bt.extend("--ft-button-primary-background-color",bt.extend("--ft-button-background-color",yt.colorPrimary)),color:Ie,rippleColor:bt.extend("--ft-button-primary-ripple-color",Ie)},Te=bt.extend("--ft-button-dense-border-radius",bt.extend("--ft-button-border-radius",yt.borderRadiusM)),Ae=bt.create("--ft-button-dense-vertical-padding","SIZE","2px"),Pe=bt.create("--ft-button-dense-horizontal-padding","SIZE","4px"),De=bt.create("--ft-button-dense-icon-padding","SIZE","4px"),_e=[g`
|
|
527
527
|
:host {
|
|
528
528
|
display: inline-block;
|
|
529
529
|
max-width: 100%;
|
|
@@ -534,7 +534,7 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
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: ${Be.fontSize};
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
button:hover {
|
|
@@ -563,31 +563,31 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
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
|
-
${gt(
|
|
569
|
-
${gt(
|
|
566
|
+
--ft-button-internal-line-height: max(calc(${Be.fontSize} + 2px), ${Be.iconSize});
|
|
567
|
+
--ft-button-internal-color: ${Be.color};
|
|
568
|
+
${gt(ge.size,Be.iconSize)};
|
|
569
|
+
${gt(At.color,Be.rippleColor)};
|
|
570
570
|
|
|
571
|
-
border-radius: ${
|
|
572
|
-
padding: ${
|
|
573
|
-
background-color: ${
|
|
571
|
+
border-radius: ${Be.borderRadius};
|
|
572
|
+
padding: ${Be.verticalPadding} ${Be.horizontalPadding};
|
|
573
|
+
background-color: ${Be.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(${Be.verticalPadding} - 1px) calc(${Be.horizontalPadding} - 1px);
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
.ft-button.ft-button--dense {
|
|
584
|
-
padding: ${
|
|
585
|
-
border-radius: ${
|
|
586
|
-
gap: ${
|
|
584
|
+
padding: ${Ae} ${Pe};
|
|
585
|
+
border-radius: ${Te};
|
|
586
|
+
gap: ${De};
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
590
|
-
padding: calc(${
|
|
590
|
+
padding: calc(${Ae} - 1px) calc(${Pe} - 1px);
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
.ft-button:not([disabled]):hover {
|
|
@@ -595,22 +595,22 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
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 + ${Be.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 + ${Ae});
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
.ft-button[disabled] {
|
|
606
606
|
filter: grayscale(1);
|
|
607
|
-
opacity: ${
|
|
607
|
+
opacity: ${Be.opacityDisabled};
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
.ft-button.ft-button--primary {
|
|
611
611
|
background-color: ${Le.backgroundColor};
|
|
612
612
|
--ft-button-internal-color: ${Le.color};
|
|
613
|
-
${gt(
|
|
613
|
+
${gt(At.color,Le.rippleColor)};
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
.ft-button:focus {
|
|
@@ -623,13 +623,13 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
623
623
|
white-space: nowrap;
|
|
624
624
|
text-overflow: ellipsis;
|
|
625
625
|
display: block;
|
|
626
|
-
margin: 0 ${
|
|
627
|
-
${gt(
|
|
628
|
-
${gt(
|
|
626
|
+
margin: 0 ${Be.iconPadding};
|
|
627
|
+
${gt(Qi.fontSize,"1em")};
|
|
628
|
+
${gt(Qi.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 ${De};
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
.ft-button--label[hidden] {
|
|
@@ -642,13 +642,13 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
.ft-button--label[hidden] + ft-icon {
|
|
645
|
-
margin: 0 calc(${
|
|
646
|
-
padding: 0 ${
|
|
645
|
+
margin: 0 calc(${Be.horizontalPadding} * -1);
|
|
646
|
+
padding: 0 ${Be.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(${Pe} * -1);
|
|
651
|
+
padding: 0 ${Ae};
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -657,10 +657,10 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
ft-loader {
|
|
660
|
-
${gt(
|
|
661
|
-
${gt(
|
|
660
|
+
${gt(Me.size,Be.iconSize)};
|
|
661
|
+
${gt(Me.color,"var(--ft-button-internal-color)")};
|
|
662
662
|
}
|
|
663
|
-
`,Ct];var
|
|
663
|
+
`,Ct];var We=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class He extends(function(t,i){return class extends t{static get formAssociated(){return!0}get form(){return this[Nt].form}constructor(...t){super(t),this[Nt]=this.attachInternals(),this[Nt].role=i}setFormValue(t){this[Nt].setFormValue(t)}}}(St,"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(q`
|
|
664
664
|
<button part="button"
|
|
665
665
|
class="${Lt(t)}"
|
|
666
666
|
aria-label="${this.getLabel()}"
|
|
@@ -669,21 +669,21 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
669
669
|
<ft-typography part="label"
|
|
670
670
|
variant="button"
|
|
671
671
|
element="span"
|
|
672
|
-
class="ft-button--label ${
|
|
672
|
+
class="ft-button--label ${Ut?"ft-safari-ellipsis-fix":""}"
|
|
673
673
|
?hidden=${!this.hasTextContent()}>
|
|
674
674
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
675
675
|
</ft-typography>
|
|
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}}He.elementDefinitions={"ft-ripple":Jt,"ft-tooltip":ze,"ft-typography":de,"ft-icon":$e,"ft-loader":je},He.styles=[Et,_e],We([o({type:String,reflect:!0})],He.prototype,"role",void 0),We([o()],He.prototype,"type",void 0),We([o({type:Boolean})],He.prototype,"primary",void 0),We([o({type:Boolean})],He.prototype,"outlined",void 0),We([o({type:Boolean})],He.prototype,"disabled",void 0),We([o({type:Boolean})],He.prototype,"dense",void 0),We([o({type:Boolean})],He.prototype,"round",void 0),We([o()],He.prototype,"label",void 0),We([o()],He.prototype,"icon",void 0),We([o()],He.prototype,"iconVariant",void 0),We([o({type:Boolean})],He.prototype,"trailingIcon",void 0),We([o({type:Boolean})],He.prototype,"loading",void 0),We([o()],He.prototype,"tooltipPosition",void 0),We([o({type:Boolean})],He.prototype,"hideTooltip",void 0),We([o({type:Boolean})],He.prototype,"forceTooltip",void 0),We([s(".ft-button")],He.prototype,"button",void 0),We([s(".ft-button--label slot")],He.prototype,"slottedContent",void 0),h("ft-button")(He);const Ze=bt.extend("--ft-chip-color",yt.colorOnSurface),Ke={backgroundColor:bt.extend("--ft-chip-background-color",yt.colorSurface),color:Ze,fontSize:bt.extend("--ft-chip-font-size",Fi.fontSize),iconSize:bt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:bt.extend("--ft-chip-ripple-color",Ze),horizontalPadding:bt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:bt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:bt.external(yt.colorOutline,"Design system"),opacityDisabled:bt.external(yt.colorOpacityDisabled,"Design system")},Ve=bt.extend("--ft-chip-highlighted-color",bt.extend("--ft-chip-color",yt.colorOnPrimary)),Je={backgroundColor:bt.extend("--ft-chip-highlighted-background-color",bt.extend("--ft-chip-background-color",yt.colorPrimary)),color:Ve,rippleColor:bt.extend("--ft-chip-highlighted-ripple-color",Ve)},qe=bt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Xe=bt.create("--ft-chip-dense-vertical-padding","SIZE","4px"),Ye=[Ct,g`
|
|
687
687
|
:host {
|
|
688
688
|
display: inline-block;
|
|
689
689
|
max-width: 100%;
|
|
@@ -699,20 +699,20 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
699
699
|
box-sizing: border-box;
|
|
700
700
|
pointer-events: auto;
|
|
701
701
|
|
|
702
|
-
--ft-chip-internal-font-size: ${
|
|
702
|
+
--ft-chip-internal-font-size: ${Ke.fontSize};
|
|
703
703
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
704
|
-
${gt(
|
|
705
|
-
--ft-chip-internal-vertical-padding: ${
|
|
706
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
704
|
+
${gt(ge.size,Ke.iconSize)};
|
|
705
|
+
--ft-chip-internal-vertical-padding: ${Ke.verticalPadding};
|
|
706
|
+
--ft-chip-internal-horizontal-padding: ${Ke.horizontalPadding};
|
|
707
707
|
--ft-chip-internal-icon-padding: 3px;
|
|
708
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
708
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${Ke.iconSize});
|
|
709
709
|
|
|
710
|
-
border: 1px solid ${
|
|
711
|
-
color: ${
|
|
712
|
-
${gt(
|
|
710
|
+
border: 1px solid ${Ke.colorOutline};
|
|
711
|
+
color: ${Ke.color};
|
|
712
|
+
${gt(At.color,Ke.rippleColor)};
|
|
713
713
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
714
714
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
715
|
-
background-color: ${
|
|
715
|
+
background-color: ${Ke.backgroundColor};
|
|
716
716
|
line-height: var(--ft-chip-internal-content-height);
|
|
717
717
|
}
|
|
718
718
|
|
|
@@ -722,8 +722,8 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
722
722
|
|
|
723
723
|
.ft-chip--dense {
|
|
724
724
|
--ft-chip-internal-icon-padding: 3px;
|
|
725
|
-
--ft-chip-internal-vertical-padding: ${
|
|
726
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
725
|
+
--ft-chip-internal-vertical-padding: ${Xe};
|
|
726
|
+
--ft-chip-internal-horizontal-padding: ${qe};
|
|
727
727
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
728
728
|
}
|
|
729
729
|
|
|
@@ -735,15 +735,15 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
735
735
|
cursor: default;
|
|
736
736
|
pointer-events: none;
|
|
737
737
|
filter: grayscale(1);
|
|
738
|
-
opacity: ${
|
|
738
|
+
opacity: ${Ke.opacityDisabled};
|
|
739
739
|
}
|
|
740
740
|
|
|
741
741
|
.ft-chip--highlighted {
|
|
742
742
|
border: none;
|
|
743
743
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
744
|
-
background-color: ${
|
|
745
|
-
${gt(
|
|
746
|
-
color: ${
|
|
744
|
+
background-color: ${Je.backgroundColor};
|
|
745
|
+
${gt(At.color,Je.rippleColor)};
|
|
746
|
+
color: ${Je.color};
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
.ft-chip--clickable {
|
|
@@ -773,9 +773,9 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
773
773
|
}
|
|
774
774
|
|
|
775
775
|
.ft-chip--icon-button {
|
|
776
|
-
${gt(
|
|
777
|
-
${gt(
|
|
778
|
-
${gt(
|
|
776
|
+
${gt(Be.iconSize,Ke.iconSize)};
|
|
777
|
+
${gt(Be.horizontalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
778
|
+
${gt(Be.verticalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
779
779
|
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
780
780
|
}
|
|
781
781
|
|
|
@@ -783,8 +783,8 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
783
783
|
vertical-align: bottom;
|
|
784
784
|
display: block;
|
|
785
785
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
786
|
-
${gt(
|
|
787
|
-
${gt(
|
|
786
|
+
${gt(Fi.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
787
|
+
${gt(Fi.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
788
788
|
}
|
|
789
789
|
|
|
790
790
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -820,7 +820,7 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
820
820
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
|
|
821
821
|
order: -1;
|
|
822
822
|
}
|
|
823
|
-
`];var
|
|
823
|
+
`];var Ge=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Qe extends CustomEvent{constructor(){super("icon-click")}}class to extends St{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.icon=void 0,this.trailingIcon=!1}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Ut};return q`
|
|
824
824
|
<div class="${Lt(t)}"
|
|
825
825
|
aria-label="${this.getLabel()}"
|
|
826
826
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -843,7 +843,7 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
843
843
|
<div class="ft-chip--icon-container ft-no-text-select">
|
|
844
844
|
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}"></ft-icon>
|
|
845
845
|
</div>
|
|
846
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
846
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Qe))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Qe))}getLabel(){return this.label||this.textContent}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}}to.elementDefinitions={"ft-ripple":Jt,"ft-typography":de,"ft-icon":$e,"ft-button":He},to.styles=Ye,Ge([o({type:Boolean})],to.prototype,"highlighted",void 0),Ge([o({type:Boolean})],to.prototype,"removable",void 0),Ge([o({type:Boolean})],to.prototype,"disabled",void 0),Ge([o({type:Boolean})],to.prototype,"clickable",void 0),Ge([o({type:Boolean})],to.prototype,"iconClickable",void 0),Ge([o({type:Boolean})],to.prototype,"dense",void 0),Ge([o({type:Boolean})],to.prototype,"multiLine",void 0),Ge([o()],to.prototype,"label",void 0),Ge([o()],to.prototype,"iconLabel",void 0),Ge([o()],to.prototype,"icon",void 0),Ge([o()],to.prototype,"iconVariant",void 0),Ge([o({type:Boolean})],to.prototype,"trailingIcon",void 0),Ge([s("ft-typography slot")],to.prototype,"slottedContent",void 0),h("ft-chip")(to);const io={zIndex:bt.create("--ft-file-drop-z-index","NUMBER","10"),hintBackgroundColor:bt.extend("--ft-file-drop-hint-background-color",yt.colorSurface),hintColor:bt.extend("--ft-file-drop-hint-color",yt.colorPrimary),errorColor:bt.extend("--ft-file-drop-error-color",yt.colorError),borderRadius:bt.extend("--ft-file-drop-border-radius",yt.borderRadiusL),borderWidth:bt.create("--ft-file-drop-border-width","SIZE","4px"),borderColor:bt.create("--ft-file-drop-border-color","COLOR","transparent"),visibleBorderColor:bt.extend("--ft-file-drop-visible-border-color",yt.colorOutline),activeBorderColor:bt.extend("--ft-file-drop-active-border-color",yt.colorPrimary)},eo=g`
|
|
847
847
|
:host {
|
|
848
848
|
display: block;
|
|
849
849
|
position: relative;
|
|
@@ -852,16 +852,16 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
852
852
|
#container {
|
|
853
853
|
position: absolute;
|
|
854
854
|
inset: 0;
|
|
855
|
-
border: dashed ${
|
|
856
|
-
border-radius: ${
|
|
855
|
+
border: dashed ${io.borderWidth} ${io.borderColor};
|
|
856
|
+
border-radius: ${io.borderRadius};
|
|
857
857
|
}
|
|
858
858
|
|
|
859
859
|
#container.visible {
|
|
860
|
-
border-color: ${
|
|
860
|
+
border-color: ${io.visibleBorderColor}
|
|
861
861
|
}
|
|
862
862
|
|
|
863
863
|
#container.dragging {
|
|
864
|
-
border-color: ${
|
|
864
|
+
border-color: ${io.activeBorderColor}
|
|
865
865
|
}
|
|
866
866
|
|
|
867
867
|
slot {
|
|
@@ -875,7 +875,7 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
875
875
|
display: none;
|
|
876
876
|
position: absolute;
|
|
877
877
|
inset: 0;
|
|
878
|
-
z-index: ${
|
|
878
|
+
z-index: ${io.zIndex};
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
#container.dragging #overlay {
|
|
@@ -886,9 +886,9 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
886
886
|
z-index: 1;
|
|
887
887
|
position: absolute;
|
|
888
888
|
inset: 0;
|
|
889
|
-
background-color: ${
|
|
889
|
+
background-color: ${io.activeBorderColor};
|
|
890
890
|
opacity: 0.20;
|
|
891
|
-
border-radius: ${
|
|
891
|
+
border-radius: ${io.borderRadius};
|
|
892
892
|
}
|
|
893
893
|
|
|
894
894
|
#overlay-drop {
|
|
@@ -908,20 +908,20 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
908
908
|
|
|
909
909
|
#overlay-content ft-chip {
|
|
910
910
|
margin-bottom: 10%;
|
|
911
|
-
${gt(
|
|
912
|
-
${gt(
|
|
913
|
-
${gt(
|
|
911
|
+
${gt(Ke.color,io.hintColor)};
|
|
912
|
+
${gt(Ke.iconSize,"32px")};
|
|
913
|
+
${gt(Ke.colorOutline,"transparent")};
|
|
914
914
|
}
|
|
915
915
|
|
|
916
916
|
#overlay-content xft-chip[icon=error] {
|
|
917
|
-
${gt(
|
|
918
|
-
${gt(
|
|
917
|
+
${gt(Ke.color,io.errorColor)};
|
|
918
|
+
${gt(Ke.backgroundColor,io.hintBackgroundColor)};
|
|
919
919
|
}
|
|
920
920
|
|
|
921
921
|
[hidden] {
|
|
922
922
|
display: none;
|
|
923
923
|
}
|
|
924
|
-
`;var
|
|
924
|
+
`;var oo=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class no extends CustomEvent{constructor(t){super("file-drop",{detail:{file:t}})}}class ro extends St{constructor(){super(...arguments),this.dropHint="Drop your file here",this.accept="",this.fileTypeError="Unsupported file type",this.visible=!1,this.dragging=!1,this.fileError=!1}render(){let t={dragging:this.dragging,visible:this.visible};return q`
|
|
925
925
|
<div id="container"
|
|
926
926
|
class="${Lt(t)}"
|
|
927
927
|
@dragenter=${this.onDragEnter}
|
|
@@ -939,4 +939,4 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
939
939
|
</div>
|
|
940
940
|
<slot></slot>
|
|
941
941
|
</div>
|
|
942
|
-
`}onDragEnter(t){this.dragging=!0,t.preventDefault()}onDragOver(t){t.preventDefault()}onDragLeave(t){this.dragging=!1,t.preventDefault()}async onDrop(t){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.files){let i=t.dataTransfer.files[0];!function(t,i,e){if(0==t.length)return!0;let o=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"|"),n=new RegExp(o),r=i.includes(".")?"."+i.split(".").pop():void 0;return!(!r||!n.test(r))||n.test(e)}(this.accept,i.name,i.type)?(this.fileError=!0,setTimeout((()=>{this.dragging=!1,this.fileError=!1}),2e3)):(this.dragging=!1,this.dispatchEvent(new
|
|
942
|
+
`}onDragEnter(t){this.dragging=!0,t.preventDefault()}onDragOver(t){t.preventDefault()}onDragLeave(t){this.dragging=!1,t.preventDefault()}async onDrop(t){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.files){let i=t.dataTransfer.files[0];!function(t,i,e){if(0==t.length)return!0;let o=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"|"),n=new RegExp(o),r=i.includes(".")?"."+i.split(".").pop():void 0;return!(!r||!n.test(r))||n.test(e)}(this.accept,i.name,i.type)?(this.fileError=!0,setTimeout((()=>{this.dragging=!1,this.fileError=!1}),2e3)):(this.dragging=!1,this.dispatchEvent(new no(i)))}}}ro.elementDefinitions={"ft-chip":to},ro.styles=eo,oo([o()],ro.prototype,"dropHint",void 0),oo([o()],ro.prototype,"accept",void 0),oo([o()],ro.prototype,"fileTypeError",void 0),oo([o({type:Boolean})],ro.prototype,"visible",void 0),oo([n()],ro.prototype,"dragging",void 0),oo([n()],ro.prototype,"fileError",void 0),h("ft-file-drop")(ro),t.FileDropEvent=no,t.FtFileDrop=ro,t.FtFileDropCssVariables=io,t.styles=eo}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-file-drop",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59",
|
|
4
4
|
"description": "Container that accepts dropping files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "1.0.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.0.59",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.0.59",
|
|
24
24
|
"lit": "2.7.2"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "9412dc7c29ebc722b1b133bba63b1744f4bfdf60"
|
|
27
27
|
}
|