@fluid-topics/ft-switch 0.3.19 → 0.3.21
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-switch.light.js +120 -120
- package/build/ft-switch.min.js +162 -162
- package/package.json +7 -7
package/build/ft-switch.light.js
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
opacity: ${l.opacityContentOnSurfacePressed};
|
|
88
88
|
transform: translate(-50%, -50%) scale(1);
|
|
89
89
|
}
|
|
90
|
-
`;var y,
|
|
90
|
+
`;var y,x=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class g extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(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.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
91
91
|
<style>
|
|
92
92
|
.ft-ripple .ft-ripple--effect,
|
|
93
93
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -104,115 +104,115 @@
|
|
|
104
104
|
<div class="ft-ripple--background"></div>
|
|
105
105
|
<div class="ft-ripple--effect"></div>
|
|
106
106
|
</div>
|
|
107
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}x.elementDefinitions={},x.styles=u,g([o.property({type:Boolean})],x.prototype,"primary",void 0),g([o.property({type:Boolean})],x.prototype,"secondary",void 0),g([o.property({type:Boolean})],x.prototype,"unbounded",void 0),g([o.property({type:Boolean})],x.prototype,"activated",void 0),g([o.property({type:Boolean})],x.prototype,"selected",void 0),g([o.property({type:Boolean})],x.prototype,"disabled",void 0),g([o.state()],x.prototype,"hovered",void 0),g([o.state()],x.prototype,"focused",void 0),g([o.state()],x.prototype,"pressed",void 0),g([o.state()],x.prototype,"rippling",void 0),g([o.state()],x.prototype,"rippleSize",void 0),g([o.state()],x.prototype,"originX",void 0),g([o.state()],x.prototype,"originY",void 0),g([o.query(".ft-ripple")],x.prototype,"ripple",void 0),g([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const v=globalThis.trustedTypes,b=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,$="?"+m,w=`<${$}>`,k=document,z=(t="")=>k.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,j=/>/g,A=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),E=/'/g,I=/"/g,T=/^(?:script|style|textarea|title)$/i,F=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),U=new WeakMap,B=k.createTreeWalker(k,129,null,!1),M=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=O;for(let i=0;i<e;i++){const e=t[i];let l,p,h=-1,a=0;for(;a<e.length&&(r.lastIndex=a,p=r.exec(e),null!==p);)a=r.lastIndex,r===O?"!--"===p[1]?r=N:void 0!==p[1]?r=j:void 0!==p[2]?(T.test(p[2])&&(s=RegExp("</"+p[2],"g")),r=A):void 0!==p[3]&&(r=A):r===A?">"===p[0]?(r=null!=s?s:O,h=-1):void 0===p[1]?h=-2:(h=r.lastIndex-p[2].length,l=p[1],r=void 0===p[3]?A:'"'===p[3]?I:E):r===I||r===E?r=A:r===N||r===j?r=O:(r=A,s=void 0);const f=r===A&&t[i+1].startsWith("/>")?" ":"";n+=r===O?e+w:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+m+f):e+m+(-2===h?(o.push(void 0),i):f)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(l):l,o]};class W{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[p,h]=M(t,i);if(this.el=W.createElement(p,e),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=B.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(m)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(m),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?G:"?"===i[1]?P:"@"===i[1]?q:L})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(T.test(o.tagName)){const t=o.textContent.split(m),i=t.length-1;if(i>0){o.textContent=v?v.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],z()),B.nextNode(),l.push({type:2,index:++s});o.append(t[i],z())}}}else if(8===o.nodeType)if(o.data===$)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(m,t+1));)l.push({type:7,index:s}),t+=m.length-1}s++}}static createElement(t,i){const e=k.createElement("template");return e.innerHTML=t,e}}function Z(t,i,e=t,o){var s,n,r,l;if(i===R)return i;let p=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const h=S(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==h&&(null===(n=null==p?void 0:p._$AO)||void 0===n||n.call(p,!1),void 0===h?p=void 0:(p=new h(t),p._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=p:e._$Cu=p),void 0!==p&&(i=Z(t,p._$AS(t,i.values),p,o)),i}class D{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:k).importNode(e,!0);B.currentNode=s;let n=B.nextNode(),r=0,l=0,p=o[0];for(;void 0!==p;){if(r===p.index){let i;2===p.type?i=new K(n,n.nextSibling,this,t):1===p.type?i=new p.ctor(n,p.name,p.strings,this,t):6===p.type&&(i=new V(n,this,t)),this.v.push(i),p=o[++l]}r!==(null==p?void 0:p.index)&&(n=B.nextNode(),r++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class K{constructor(t,i,e,o){var s;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$C_=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$C_}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Z(this,t,i),S(t)?t===_||null==t||""===t?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==R&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>C(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==_&&S(this._$AH)?this._$AA.nextSibling.data=t:this.k(k.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=W.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new D(s,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=U.get(t.strings);return void 0===i&&U.set(t.strings,i=new W(t)),i}S(t){C(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new K(this.j(z()),this.j(z()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class L{constructor(t,i,e,o,s){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=Z(this,t,i,0),n=!S(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Z(this,o[e+r],i,r),l===R&&(l=this._$AH[r]),n||(n=!S(l)||l!==this._$AH[r]),l===_?t=_:t!==_&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.P(t)}P(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends L{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===_?void 0:t}}const H=v?v.emptyScript:"";class P extends L{constructor(){super(...arguments),this.type=4}P(t){t&&t!==_?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class q extends L{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=Z(this,t,i,0))&&void 0!==e?e:_)===R)return;const o=this._$AH,s=t===_&&o!==_||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==_&&(o===_||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class V{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){Z(this,t)}}const X=window.litHtmlPolyfillSupport;null==X||X(W,K),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.2.7");
|
|
107
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}g.elementDefinitions={},g.styles=u,x([o.property({type:Boolean})],g.prototype,"primary",void 0),x([o.property({type:Boolean})],g.prototype,"secondary",void 0),x([o.property({type:Boolean})],g.prototype,"unbounded",void 0),x([o.property({type:Boolean})],g.prototype,"activated",void 0),x([o.property({type:Boolean})],g.prototype,"selected",void 0),x([o.property({type:Boolean})],g.prototype,"disabled",void 0),x([o.state()],g.prototype,"hovered",void 0),x([o.state()],g.prototype,"focused",void 0),x([o.state()],g.prototype,"pressed",void 0),x([o.state()],g.prototype,"rippling",void 0),x([o.state()],g.prototype,"rippleSize",void 0),x([o.state()],g.prototype,"originX",void 0),x([o.state()],g.prototype,"originY",void 0),x([o.query(".ft-ripple")],g.prototype,"ripple",void 0),x([o.query(".ft-ripple--effect")],g.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(g);const v=window,m=v.trustedTypes,b=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,k=`<${w}>`,z=document,C=(t="")=>z.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,A=/>/g,E=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),I=/'/g,F=/"/g,R=/^(?:script|style|textarea|title)$/i,T=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),_=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),B=new WeakMap,M=z.createTreeWalker(z,129,null,!1),W=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=j;for(let i=0;i<e;i++){const e=t[i];let l,p,h=-1,a=0;for(;a<e.length&&(r.lastIndex=a,p=r.exec(e),null!==p);)a=r.lastIndex,r===j?"!--"===p[1]?r=N:void 0!==p[1]?r=A:void 0!==p[2]?(R.test(p[2])&&(s=RegExp("</"+p[2],"g")),r=E):void 0!==p[3]&&(r=E):r===E?">"===p[0]?(r=null!=s?s:j,h=-1):void 0===p[1]?h=-2:(h=r.lastIndex-p[2].length,l=p[1],r=void 0===p[3]?E:'"'===p[3]?F:I):r===F||r===I?r=E:r===N||r===A?r=j:(r=E,s=void 0);const f=r===E&&t[i+1].startsWith("/>")?" ":"";n+=r===j?e+k:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+$+f):e+$+(-2===h?(o.push(void 0),i):f)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(l):l,o]};class Z{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[p,h]=W(t,i);if(this.el=Z.createElement(p,e),M.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=M.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith($)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split($),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?H:"?"===i[1]?P:"@"===i[1]?V:G})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(R.test(o.tagName)){const t=o.textContent.split($),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],C()),M.nextNode(),l.push({type:2,index:++s});o.append(t[i],C())}}}else if(8===o.nodeType)if(o.data===w)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf($,t+1));)l.push({type:7,index:s}),t+=$.length-1}s++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var s,n,r,l;if(i===_)return i;let p=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=O(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==h&&(null===(n=null==p?void 0:p._$AO)||void 0===n||n.call(p,!1),void 0===h?p=void 0:(p=new h(t),p._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=p:e._$Cl=p),void 0!==p&&(i=D(t,p._$AS(t,i.values),p,o)),i}class K{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);M.currentNode=s;let n=M.nextNode(),r=0,l=0,p=o[0];for(;void 0!==p;){if(r===p.index){let i;2===p.type?i=new L(n,n.nextSibling,this,t):1===p.type?i=new p.ctor(n,p.name,p.strings,this,t):6===p.type&&(i=new X(n,this,t)),this.u.push(i),p=o[++l]}r!==(null==p?void 0:p.index)&&(n=M.nextNode(),r++)}return s}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class L{constructor(t,i,e,o){var s;this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=D(this,t,i),O(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==_&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>S(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==U&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Z.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.p(e);else{const t=new K(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=B.get(t.strings);return void 0===i&&B.set(t.strings,i=new Z(t)),i}k(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new L(this.O(C()),this.O(C()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class G{constructor(t,i,e,o,s){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=U}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=D(this,t,i,0),n=!O(t)||t!==this._$AH&&t!==_,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=D(this,o[e+r],i,r),l===_&&(l=this._$AH[r]),n||(n=!O(l)||l!==this._$AH[r]),l===U?t=U:t!==U&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class H extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}const q=m?m.emptyScript:"";class P extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==U?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class V extends G{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=D(this,t,i,0))&&void 0!==e?e:U)===_)return;const o=this._$AH,s=t===U&&o!==U||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==U&&(o===U||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class X{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){D(this,t)}}const Y=v.litHtmlPolyfillSupport;null==Y||Y(Z,L),(null!==(y=v.litHtmlVersions)&&void 0!==y?y:v.litHtmlVersions=[]).push("2.4.0");
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
112
|
*/
|
|
113
|
-
const
|
|
113
|
+
const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t._$litStatic$},tt=t=>({_$litStatic$:t,r:J}),it=new Map,et=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let p,h=0,a=!1;for(;h<o;){for(p=i[h];h<o&&void 0!==(n=e[h],s=Q(n));)p+=s+i[++h],a=!0;l.push(n),r.push(p),h++}if(h===o&&r.push(i[o]),a){const t=r.join("$$lit$$");void 0===(i=it.get(t))&&(r.raw=r,it.set(t,i=r)),e=l}return t(i,...e)})(T);var ot;!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"}(ot||(ot={}));const st=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),nt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),rt={fontFamily:nt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},lt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",st),pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",rt.fontSize,"20px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",rt.fontWeight,"normal"),at=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",rt.letterSpacing,"0.15px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",rt.lineHeight,"1.2"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",rt.textTransform,"inherit"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",st),ut=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",rt.fontSize,"14px"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",rt.fontWeight,"normal"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",rt.letterSpacing,"0.105px"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",rt.lineHeight,"1.7"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",rt.textTransform,"inherit"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",nt),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",rt.fontSize,"16px"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",rt.fontWeight,"600"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",rt.letterSpacing,"0.144px"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",rt.lineHeight,"1.5"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",rt.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",nt),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",rt.fontSize,"14px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",rt.fontWeight,"normal"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",rt.letterSpacing,"0.098px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",rt.lineHeight,"1.7"),At=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",rt.textTransform,"inherit"),Et=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",nt),It=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",rt.fontSize,"16px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",rt.fontWeight,"normal"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",rt.letterSpacing,"0.496px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",rt.lineHeight,"1.5"),_t=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",rt.textTransform,"inherit"),Ut=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",nt),Bt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",rt.fontSize,"14px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",rt.fontWeight,"normal"),Wt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",rt.letterSpacing,"0.252px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",rt.lineHeight,"1.4"),Dt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",rt.textTransform,"inherit"),Kt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",nt),Lt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",rt.fontSize,"12px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",rt.fontWeight,"normal"),Ht=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",rt.letterSpacing,"0.396px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",rt.lineHeight,"1.33"),Pt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",rt.textTransform,"inherit"),Vt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",nt),Xt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",rt.fontSize,"10px"),Yt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",rt.fontWeight,"normal"),Jt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",rt.letterSpacing,"0.33px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",rt.lineHeight,"1.6"),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",rt.textTransform,"inherit"),ii=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",nt),ei=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",rt.fontSize,"10px"),oi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",rt.fontWeight,"normal"),si=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",rt.letterSpacing,"1.5px"),ni=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",rt.lineHeight,"1.6"),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",rt.textTransform,"uppercase"),li={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",nt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",rt.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",rt.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",rt.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",rt.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",rt.textTransform,"uppercase")},pi=e.css`
|
|
114
114
|
.ft-typography--title {
|
|
115
|
-
font-family: ${
|
|
116
|
-
font-size: ${
|
|
117
|
-
font-weight: ${
|
|
118
|
-
letter-spacing: ${
|
|
119
|
-
line-height: ${
|
|
120
|
-
text-transform: ${
|
|
121
|
-
}
|
|
122
|
-
`,
|
|
115
|
+
font-family: ${lt};
|
|
116
|
+
font-size: ${pt};
|
|
117
|
+
font-weight: ${ht};
|
|
118
|
+
letter-spacing: ${at};
|
|
119
|
+
line-height: ${ft};
|
|
120
|
+
text-transform: ${ct};
|
|
121
|
+
}
|
|
122
|
+
`,hi=e.css`
|
|
123
123
|
.ft-typography--title-dense {
|
|
124
|
-
font-family: ${
|
|
125
|
-
font-size: ${
|
|
126
|
-
font-weight: ${
|
|
127
|
-
letter-spacing: ${
|
|
124
|
+
font-family: ${dt};
|
|
125
|
+
font-size: ${ut};
|
|
126
|
+
font-weight: ${yt};
|
|
127
|
+
letter-spacing: ${xt};
|
|
128
128
|
line-height: ${gt};
|
|
129
|
-
text-transform: ${
|
|
129
|
+
text-transform: ${vt};
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`,ai=e.css`
|
|
132
132
|
.ft-typography--subtitle1 {
|
|
133
|
-
font-family: ${
|
|
133
|
+
font-family: ${mt};
|
|
134
134
|
font-size: ${bt};
|
|
135
|
-
font-weight: ${
|
|
136
|
-
letter-spacing: ${
|
|
137
|
-
line-height: ${
|
|
138
|
-
text-transform: ${
|
|
135
|
+
font-weight: ${$t};
|
|
136
|
+
letter-spacing: ${wt};
|
|
137
|
+
line-height: ${kt};
|
|
138
|
+
text-transform: ${zt};
|
|
139
139
|
}
|
|
140
|
-
`,
|
|
140
|
+
`,fi=e.css`
|
|
141
141
|
.ft-typography--subtitle2 {
|
|
142
|
-
font-family: ${
|
|
143
|
-
font-size: ${
|
|
144
|
-
font-weight: ${
|
|
145
|
-
letter-spacing: ${
|
|
142
|
+
font-family: ${Ct};
|
|
143
|
+
font-size: ${Ot};
|
|
144
|
+
font-weight: ${St};
|
|
145
|
+
letter-spacing: ${jt};
|
|
146
146
|
line-height: ${Nt};
|
|
147
|
-
text-transform: ${
|
|
147
|
+
text-transform: ${At};
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
`,
|
|
150
|
+
`,ci=e.css`
|
|
151
151
|
.ft-typography--body1 {
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
152
|
+
font-family: ${Et};
|
|
153
|
+
font-size: ${It};
|
|
154
|
+
font-weight: ${Ft};
|
|
155
|
+
letter-spacing: ${Rt};
|
|
156
|
+
line-height: ${Tt};
|
|
157
|
+
text-transform: ${_t};
|
|
158
158
|
}
|
|
159
|
-
`,
|
|
159
|
+
`,di=e.css`
|
|
160
160
|
.ft-typography--body2 {
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
161
|
+
font-family: ${Ut};
|
|
162
|
+
font-size: ${Bt};
|
|
163
|
+
font-weight: ${Mt};
|
|
164
|
+
letter-spacing: ${Wt};
|
|
165
|
+
line-height: ${Zt};
|
|
166
|
+
text-transform: ${Dt};
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,ui=e.css`
|
|
169
169
|
.ft-typography--caption {
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
170
|
+
font-family: ${Kt};
|
|
171
|
+
font-size: ${Lt};
|
|
172
|
+
font-weight: ${Gt};
|
|
173
|
+
letter-spacing: ${Ht};
|
|
174
|
+
line-height: ${qt};
|
|
175
175
|
text-transform: ${Pt};
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,yi=e.css`
|
|
178
178
|
.ft-typography--breadcrumb {
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
179
|
+
font-family: ${Vt};
|
|
180
|
+
font-size: ${Xt};
|
|
181
|
+
font-weight: ${Yt};
|
|
182
|
+
letter-spacing: ${Jt};
|
|
183
|
+
line-height: ${Qt};
|
|
184
|
+
text-transform: ${ti};
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`,xi=e.css`
|
|
187
187
|
.ft-typography--overline {
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
192
|
-
line-height: ${
|
|
193
|
-
text-transform: ${
|
|
188
|
+
font-family: ${ii};
|
|
189
|
+
font-size: ${ei};
|
|
190
|
+
font-weight: ${oi};
|
|
191
|
+
letter-spacing: ${si};
|
|
192
|
+
line-height: ${ni};
|
|
193
|
+
text-transform: ${ri};
|
|
194
194
|
}
|
|
195
195
|
`,gi=e.css`
|
|
196
196
|
.ft-typography--button {
|
|
197
|
-
font-family: ${
|
|
198
|
-
font-size: ${
|
|
199
|
-
font-weight: ${
|
|
200
|
-
letter-spacing: ${
|
|
201
|
-
line-height: ${
|
|
202
|
-
text-transform: ${
|
|
203
|
-
}
|
|
204
|
-
`,
|
|
197
|
+
font-family: ${li.fontFamily};
|
|
198
|
+
font-size: ${li.fontSize};
|
|
199
|
+
font-weight: ${li.fontWeight};
|
|
200
|
+
letter-spacing: ${li.letterSpacing};
|
|
201
|
+
line-height: ${li.lineHeight};
|
|
202
|
+
text-transform: ${li.textTransform};
|
|
203
|
+
}
|
|
204
|
+
`,vi=e.css`
|
|
205
205
|
.ft-typography {
|
|
206
206
|
vertical-align: inherit;
|
|
207
207
|
}
|
|
208
|
-
`;var
|
|
209
|
-
<${
|
|
208
|
+
`;var mi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class bi extends i.FtLitElement{constructor(){super(...arguments),this.variant=ot.body1}render(){return this.element?et`
|
|
209
|
+
<${tt(this.element)}
|
|
210
210
|
class="ft-typography ft-typography--${this.variant}">
|
|
211
211
|
<slot></slot>
|
|
212
|
-
</${
|
|
213
|
-
`:
|
|
212
|
+
</${tt(this.element)}>
|
|
213
|
+
`:et`
|
|
214
214
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
215
|
-
`}}bi.styles=[
|
|
215
|
+
`}}bi.styles=[pi,hi,ai,fi,ci,di,ui,yi,xi,gi,vi],mi([o.property()],bi.prototype,"element",void 0),mi([o.property()],bi.prototype,"variant",void 0),i.customElement("ft-typography")(bi);const $i=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),wi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),ki=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),zi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Ci=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),Oi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Si=e.css`
|
|
216
216
|
.ft-tooltip--container {
|
|
217
217
|
display: block;
|
|
218
218
|
position: relative;
|
|
@@ -228,23 +228,23 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
228
228
|
box-sizing: border-box;
|
|
229
229
|
overflow: hidden;
|
|
230
230
|
width: max-content;
|
|
231
|
-
max-width: ${
|
|
231
|
+
max-width: ${Oi};
|
|
232
232
|
text-align: center;
|
|
233
|
-
padding: ${
|
|
234
|
-
z-index: ${
|
|
233
|
+
padding: ${$i};
|
|
234
|
+
z-index: ${zi};
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
.ft-tooltip--content {
|
|
238
238
|
padding: 4px 8px;
|
|
239
|
-
border-radius: ${
|
|
240
|
-
background-color: ${
|
|
241
|
-
color: ${
|
|
239
|
+
border-radius: ${Ci};
|
|
240
|
+
background-color: ${ki};
|
|
241
|
+
color: ${wi};
|
|
242
242
|
top: -500px;
|
|
243
243
|
left: -500px;
|
|
244
244
|
position: relative;
|
|
245
245
|
word-break: break-word;
|
|
246
246
|
}
|
|
247
|
-
`;var
|
|
247
|
+
`;var ji,Ni,Ai=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ei extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
248
248
|
<div part="container"
|
|
249
249
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
250
250
|
@mouseenter=${this.onHover}
|
|
@@ -260,19 +260,19 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
260
260
|
</div>
|
|
261
261
|
<slot></slot>
|
|
262
262
|
</div>
|
|
263
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has(
|
|
263
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.position){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${Oi})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Ei.elementDefinitions={"ft-typography":bi},Ei.styles=Si,Ai([o.property()],Ei.prototype,"text",void 0),Ai([o.property({type:Boolean})],Ei.prototype,"manual",void 0),Ai([o.property({type:Boolean})],Ei.prototype,"inline",void 0),Ai([o.property({type:Number})],Ei.prototype,"delay",void 0),Ai([o.property()],Ei.prototype,"position",void 0),Ai([o.queryAssignedNodes("",!0)],Ei.prototype,"slotNodes",void 0),Ai([o.query(".ft-tooltip--container")],Ei.prototype,"container",void 0),Ai([o.query("slot")],Ei.prototype,"target",void 0),Ai([o.query(".ft-tooltip")],Ei.prototype,"tooltip",void 0),Ai([o.query(".ft-tooltip--content")],Ei.prototype,"tooltipContent",void 0),Ai([o.state()],Ei.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ei),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ji||(ji={})),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=""}(Ni||(Ni={})),new Map([...["abw"].map((t=>[t,Ni.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,Ni.AUDIO])),...["avi"].map((t=>[t,Ni.AVI])),...["chm","xhs"].map((t=>[t,Ni.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,Ni.CODE])),...["csv"].map((t=>[t,Ni.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ni.DITA])),...["epub"].map((t=>[t,Ni.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ni.EXCEL])),...["flac"].map((t=>[t,Ni.FLAC])),...["gif"].map((t=>[t,Ni.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ni.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ni.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,Ni.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ni.JPEG])),...["json"].map((t=>[t,Ni.JSON])),...["m4a","m4p"].map((t=>[t,Ni.M4A])),...["mov","qt"].map((t=>[t,Ni.MOV])),...["mp3"].map((t=>[t,Ni.MP3])),...["mp4","m4v"].map((t=>[t,Ni.MP4])),...["ogg","oga"].map((t=>[t,Ni.OGG])),...["pdf","ps"].map((t=>[t,Ni.PDF])),...["png"].map((t=>[t,Ni.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ni.POWERPOINT])),...["rar"].map((t=>[t,Ni.RAR])),...["stp"].map((t=>[t,Ni.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ni.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,Ni.VIDEO])),...["wav"].map((t=>[t,Ni.WAV])),...["wma"].map((t=>[t,Ni.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ni.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ni.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ni.YAML])),...["zip"].map((t=>[t,Ni.ZIP]))]);const Ii={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")},Fi=e.css`
|
|
264
264
|
:host {
|
|
265
265
|
display: inline-block;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
:host, i.ft-icon {
|
|
269
|
-
width: ${
|
|
270
|
-
height: ${
|
|
269
|
+
width: ${Ii.size};
|
|
270
|
+
height: ${Ii.size};
|
|
271
271
|
text-align: center;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
i.ft-icon {
|
|
275
|
-
font-size: ${
|
|
275
|
+
font-size: ${Ii.size};
|
|
276
276
|
line-height: 1;
|
|
277
277
|
font-weight: normal;
|
|
278
278
|
text-transform: none;
|
|
@@ -283,26 +283,26 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
283
283
|
text-rendering: auto;
|
|
284
284
|
-webkit-font-smoothing: antialiased;
|
|
285
285
|
-moz-osx-font-smoothing: grayscale;
|
|
286
|
-
vertical-align: ${
|
|
286
|
+
vertical-align: ${Ii.verticalAlign};
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
.ft-icon--fluid-topics {
|
|
290
|
-
font-family: ${
|
|
290
|
+
font-family: ${Ii.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
.ft-icon--file-format {
|
|
294
|
-
font-family: ${
|
|
294
|
+
font-family: ${Ii.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
.ft-icon--material {
|
|
298
|
-
font-family: ${
|
|
298
|
+
font-family: ${Ii.materialFontFamily}, "Material Icons", sans-serif;
|
|
299
299
|
}
|
|
300
|
-
`;var
|
|
300
|
+
`;var Ri;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ri||(Ri={}));var Ti=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class _i extends i.FtLitElement{constructor(){super(...arguments),this.variant=Ri.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
|
|
301
301
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
302
302
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
303
303
|
<slot ?hidden=${t}></slot>
|
|
304
304
|
</i>
|
|
305
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case
|
|
305
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ri.file_format:this.resolvedIcon=null!==(t=Ni[o.toUpperCase()])&&void 0!==t?t:o;break;case Ri.fluid_topics:this.resolvedIcon=null!==(i=ji[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}_i.elementDefinitions={},_i.styles=Fi,Ti([o.property()],_i.prototype,"variant",void 0),Ti([o.property()],_i.prototype,"value",void 0),Ti([o.state()],_i.prototype,"resolvedIcon",void 0),Ti([o.query("slot")],_i.prototype,"slottedContent",void 0),i.customElement("ft-icon")(_i);const Ui={textColor:i.FtCssVariableFactory.extend("--ft-switch-text-color",i.designSystemVariables.colorOnSurfaceHigh),backgroundColor:i.FtCssVariableFactory.extend("--ft-switch-background-color",i.designSystemVariables.colorSurface),selectedTextColor:i.FtCssVariableFactory.extend("--ft-switch-selected-text-color",i.designSystemVariables.colorPrimary),selectedBackgroundColor:i.FtCssVariableFactory.extend("--ft-switch-selected-background-color",i.designSystemVariables.colorPrimary),borderColor:i.FtCssVariableFactory.extend("--ft-switch-border-color",i.designSystemVariables.colorOutline),borderRadius:i.FtCssVariableFactory.extend("--ft-switch-border-radius",i.designSystemVariables.borderRadiusL),fontSize:i.FtCssVariableFactory.extend("--ft-switch-font-size",li.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-switch-icon-size","SIZE","24px"),iconColor:i.FtCssVariableFactory.extend("--ft-switch-text-color",i.designSystemVariables.colorOnSurfaceMedium),rippleColor:i.FtCssVariableFactory.extend("--ft-switch-ripple-color",i.designSystemVariables.colorPrimary),outlineColor:i.FtCssVariableFactory.extend("--ft-switch-outline-color",i.designSystemVariables.colorPrimary)},Bi={borderRadiusLeft:i.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left",i.designSystemVariables.borderRadiusL),borderRadiusRight:i.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right",i.designSystemVariables.borderRadiusL),borderWidthLeft:i.FtCssVariableFactory.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:i.FtCssVariableFactory.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:i.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","SIZE","1px")},Mi=e.css`
|
|
306
306
|
.ft-switch-option {
|
|
307
307
|
position: relative;
|
|
308
308
|
display: inline-block;
|
|
@@ -316,21 +316,21 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
.ft-switch-option--content {
|
|
319
|
-
--ft-switch-option-internal-line-height: calc(${
|
|
320
|
-
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${
|
|
319
|
+
--ft-switch-option-internal-line-height: calc(${Ui.fontSize} + 2px);
|
|
320
|
+
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${Ui.iconSize});
|
|
321
321
|
|
|
322
322
|
border-style: solid;
|
|
323
|
-
border-color: ${
|
|
324
|
-
border-width: ${
|
|
325
|
-
border-radius: ${
|
|
323
|
+
border-color: ${Ui.borderColor};
|
|
324
|
+
border-width: ${Bi.borderWidthVertical} ${Bi.borderWidthRight} ${Bi.borderWidthVertical} ${Bi.borderWidthLeft};
|
|
325
|
+
border-radius: ${Bi.borderRadiusLeft} ${Bi.borderRadiusRight} ${Bi.borderRadiusRight} ${Bi.borderRadiusLeft};
|
|
326
326
|
display: flex;
|
|
327
327
|
align-items: center;
|
|
328
328
|
justify-content: center;
|
|
329
329
|
overflow: hidden;
|
|
330
330
|
|
|
331
|
-
${i.setVariable(
|
|
331
|
+
${i.setVariable(Ii.size,Ui.iconSize)};
|
|
332
332
|
padding: 6px 8px;
|
|
333
|
-
background-color: ${
|
|
333
|
+
background-color: ${Ui.backgroundColor};
|
|
334
334
|
-webkit-mask-image: radial-gradient(white, black);
|
|
335
335
|
}
|
|
336
336
|
|
|
@@ -339,8 +339,8 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
.ft-switch-option--input:checked + .ft-switch-option--content:before {
|
|
342
|
-
background-color: ${
|
|
343
|
-
border-radius: ${
|
|
342
|
+
background-color: ${Ui.selectedBackgroundColor};
|
|
343
|
+
border-radius: ${Bi.borderRadiusLeft} ${Bi.borderRadiusRight} ${Bi.borderRadiusRight} ${Bi.borderRadiusLeft};
|
|
344
344
|
position: absolute;
|
|
345
345
|
inset: 0;
|
|
346
346
|
content: "";
|
|
@@ -349,18 +349,18 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
.ft-switch-option--label {
|
|
352
|
-
color: ${
|
|
352
|
+
color: ${Ui.textColor};
|
|
353
353
|
overflow: hidden;
|
|
354
354
|
white-space: nowrap;
|
|
355
355
|
text-overflow: ellipsis;
|
|
356
356
|
display: block;
|
|
357
357
|
margin: 0 8px;
|
|
358
|
-
${i.setVariable(
|
|
359
|
-
${i.setVariable(
|
|
358
|
+
${i.setVariable(li.fontSize,Ui.fontSize)};
|
|
359
|
+
${i.setVariable(li.lineHeight,"var(--ft-switch-option-internal-content-height)")}
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
.ft-switch-option--input:checked + .ft-switch-option--content .ft-switch-option--label {
|
|
363
|
-
color: ${
|
|
363
|
+
color: ${Ui.selectedTextColor};
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
.ft-switch-option--label[hidden] {
|
|
@@ -368,7 +368,7 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
.ft-switch-option--ripple {
|
|
371
|
-
${i.setVariable(l.color,
|
|
371
|
+
${i.setVariable(l.color,Ui.rippleColor)};
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -381,13 +381,13 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
381
381
|
|
|
382
382
|
ft-icon {
|
|
383
383
|
flex-shrink: 0;
|
|
384
|
-
color: ${
|
|
384
|
+
color: ${Ui.iconColor};
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
.ft-switch-option--input:checked + .ft-switch-option--content ft-icon {
|
|
388
|
-
color: ${
|
|
388
|
+
color: ${Ui.selectedTextColor};
|
|
389
389
|
}
|
|
390
|
-
`;var
|
|
390
|
+
`;var Wi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Zi extends CustomEvent{constructor(){super("option-change",{bubbles:!0})}}class Di extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Zi)}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon};return this.addTooltip(e.html`
|
|
391
391
|
<label for="input" class=${s.classMap(t)}>
|
|
392
392
|
<input id="input" type="radio" class="ft-switch-option--input"
|
|
393
393
|
.checked=${this.selected}
|
|
@@ -408,19 +408,19 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
408
408
|
${t}
|
|
409
409
|
</ft-tooltip>
|
|
410
410
|
`}onChange(){this.selected=!0}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?e.html`
|
|
411
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:e.nothing}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()}}
|
|
411
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:e.nothing}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()}}Di.elementDefinitions={"ft-ripple":g,"ft-typography":bi,"ft-tooltip":Ei,"ft-icon":_i},Di.styles=Mi,Wi([o.property({type:String})],Di.prototype,"value",void 0),Wi([o.property({type:String})],Di.prototype,"icon",void 0),Wi([o.property({type:String})],Di.prototype,"label",void 0),Wi([o.property({type:String})],Di.prototype,"tooltipPosition",void 0),Wi([o.property({type:Boolean,reflect:!0})],Di.prototype,"selected",void 0),Wi([o.property({type:Boolean})],Di.prototype,"trailingIcon",void 0),Wi([o.query(".ft-switch-option--content slot")],Di.prototype,"slottedContent",void 0),Wi([o.query(".ft-switch-option--input")],Di.prototype,"input",void 0);var Ki=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Li extends CustomEvent{constructor(t){super("change",{detail:t})}}class Gi extends i.FtLitElement{constructor(){super(...arguments),this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){var i;super.updated(t),t.has("selectedOption")&&(this.updateOptions(),this.dispatchEvent(new Li(null===(i=this.selectedOption)||void 0===i?void 0:i.value)))}render(){return e.html`
|
|
412
412
|
<div class="ft-switch" @keydown=${this.onKeyDown} tabindex="0">
|
|
413
413
|
<slot @slotchange=${this.onSlotchange}
|
|
414
414
|
@option-change=${this.onOptionChange}></slot>
|
|
415
415
|
</div>
|
|
416
|
-
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof
|
|
416
|
+
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof Di&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),this.options.push(t)}onOptionChange(t){let i=t.target;i.selected?this.selectedOption=i:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t==this.selectedOption}))}}Gi.elementDefinitions={},Gi.styles=e.css`
|
|
417
417
|
:host {
|
|
418
418
|
display: inline-block;
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
.ft-switch {
|
|
422
|
-
border-radius: ${
|
|
423
|
-
outline-color: ${
|
|
422
|
+
border-radius: ${Ui.borderRadius};
|
|
423
|
+
outline-color: ${Ui.outlineColor};
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
.ft-switch slot {
|
|
@@ -429,17 +429,17 @@ const Y=Symbol.for(""),J=t=>{if((null==t?void 0:t.r)===Y)return null==t?void 0:t
|
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
432
|
-
${i.setVariable(
|
|
433
|
-
${i.setVariable(
|
|
434
|
-
${i.setVariable(
|
|
432
|
+
${i.setVariable(Bi.borderRadiusLeft,"0")};
|
|
433
|
+
${i.setVariable(Bi.borderRadiusRight,"0")};
|
|
434
|
+
${i.setVariable(Bi.borderWidthLeft,"0")};
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
438
|
-
${i.setVariable(
|
|
439
|
-
${i.setVariable(
|
|
438
|
+
${i.setVariable(Bi.borderRadiusLeft,Ui.borderRadius)};
|
|
439
|
+
${i.setVariable(Bi.borderWidthLeft,"1px")};
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
443
|
-
${i.setVariable(
|
|
443
|
+
${i.setVariable(Bi.borderRadiusRight,Ui.borderRadius)};
|
|
444
444
|
}
|
|
445
|
-
`,
|
|
445
|
+
`,Ki([o.query(".ft-switch slot")],Gi.prototype,"slottedContent",void 0),Ki([o.state()],Gi.prototype,"selectedOption",void 0),Ki([o.query(".ft-switch")],Gi.prototype,"ftSwitchDiv",void 0),i.customElement("ft-switch")(Gi),i.customElement("ft-switch-option")(Di),t.FtSwitch=Gi,t.FtSwitchChange=Li,t.FtSwitchCssVariables=Ui,t.FtSwitchOption=Di,t.FtSwitchOptionCssVariables=Bi,t.SwitchOptionChange=Zi,t.optionStyles=Mi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|