@fluid-topics/ft-tabs 0.3.71 → 1.0.0-alpha.0
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-tab.css.d.ts +0 -1
- package/build/ft-tab.css.js +0 -1
- package/build/ft-tab.d.ts +1 -2
- package/build/ft-tab.js +2 -4
- package/build/ft-tab.properties.d.ts +0 -1
- package/build/ft-tab.properties.js +0 -1
- package/build/ft-tabs.css.d.ts +0 -1
- package/build/ft-tabs.css.js +0 -1
- package/build/ft-tabs.d.ts +0 -1
- package/build/ft-tabs.js +7 -5
- package/build/ft-tabs.light.js +124 -124
- package/build/ft-tabs.min.js +97 -107
- package/build/ft-tabs.properties.d.ts +0 -1
- package/build/ft-tabs.properties.js +0 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/package.json +8 -8
package/build/ft-tabs.light.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
!function(t,i,e,o,s,n,r){var l
|
|
1
|
+
!function(t,i,e,o,s,n,r){var l=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 a extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.icon="",this.active=!1,this.disabled=!1,this.uniqueId=(""+Math.floor(1e5*Math.random())).padStart(5,"0")}render(){return e.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${e.unsafeCSS(this.active?"block":"none")};
|
|
5
5
|
}
|
|
6
6
|
</style>
|
|
7
7
|
<slot></slot>
|
|
8
|
-
`}updated(t){super.updated(t),this.id||(this.id="tab-"+this.uniqueId),this.ariaLabelledBy=this.id+"-control",this.dispatchEvent(new Event("updated"))}}
|
|
8
|
+
`}updated(t){super.updated(t),this.id||(this.id="tab-"+this.uniqueId),this.ariaLabelledBy=this.id+"-control",this.dispatchEvent(new Event("updated"))}}a.elementDefinitions={},l([o.property({type:String})],a.prototype,"label",void 0),l([o.property({type:String})],a.prototype,"icon",void 0),l([o.property()],a.prototype,"iconVariant",void 0),l([o.property({type:Boolean})],a.prototype,"active",void 0),l([o.property({type:Boolean})],a.prototype,"disabled",void 0),l([o.property({reflect:!0})],a.prototype,"id",void 0),l([o.property()],a.prototype,"color",void 0),l([o.property()],a.prototype,"rippleColor",void 0),l([o.property({reflect:!0,attribute:"aria-labelledby"})],a.prototype,"ariaLabelledBy",void 0);const p=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),h=p,f=i.FtCssVariableFactory.extend("--ft-ripple-background-color",p),c=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),d=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),u=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),x=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),y=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),g=y,b=i.FtCssVariableFactory.extend("--ft-ripple-background-color",y),v=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),m=v,$=i.FtCssVariableFactory.extend("--ft-ripple-background-color",v),w=e.css`
|
|
9
9
|
:host {
|
|
10
10
|
display: contents;
|
|
11
11
|
}
|
|
@@ -27,27 +27,27 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.ft-ripple .ft-ripple--background {
|
|
30
|
-
background-color: ${
|
|
30
|
+
background-color: ${f};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.ft-ripple .ft-ripple--effect {
|
|
34
|
-
background-color: ${
|
|
34
|
+
background-color: ${h};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
38
|
-
background-color: ${
|
|
38
|
+
background-color: ${$};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
42
|
-
background-color: ${
|
|
42
|
+
background-color: ${m};
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
46
|
-
background-color: ${
|
|
46
|
+
background-color: ${b};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
50
|
-
background-color: ${
|
|
50
|
+
background-color: ${g};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.ft-ripple .ft-ripple--background {
|
|
@@ -79,22 +79,22 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
82
|
-
opacity: ${
|
|
82
|
+
opacity: ${d};
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
86
|
-
opacity: ${
|
|
86
|
+
opacity: ${x};
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
90
|
-
opacity: ${
|
|
90
|
+
opacity: ${u};
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
94
|
-
opacity: ${
|
|
94
|
+
opacity: ${c};
|
|
95
95
|
transform: translate(-50%, -50%) scale(1);
|
|
96
96
|
}
|
|
97
|
-
`;var z
|
|
97
|
+
`;var k,z=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 j 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.setupDebouncer=new i.Debouncer(10),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`
|
|
98
98
|
<style>
|
|
99
99
|
.ft-ripple .ft-ripple--effect,
|
|
100
100
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -111,115 +111,115 @@
|
|
|
111
111
|
<div class="ft-ripple--background"></div>
|
|
112
112
|
<div class="ft-ripple--effect"></div>
|
|
113
113
|
</div>
|
|
114
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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()}}N.elementDefinitions={},N.styles=k,j([o.property({type:Boolean})],N.prototype,"primary",void 0),j([o.property({type:Boolean})],N.prototype,"secondary",void 0),j([o.property({type:Boolean})],N.prototype,"unbounded",void 0),j([o.property({type:Boolean})],N.prototype,"activated",void 0),j([o.property({type:Boolean})],N.prototype,"selected",void 0),j([o.property({type:Boolean})],N.prototype,"disabled",void 0),j([o.state()],N.prototype,"hovered",void 0),j([o.state()],N.prototype,"focused",void 0),j([o.state()],N.prototype,"pressed",void 0),j([o.state()],N.prototype,"rippling",void 0),j([o.state()],N.prototype,"rippleSize",void 0),j([o.state()],N.prototype,"originX",void 0),j([o.state()],N.prototype,"originY",void 0),j([o.query(".ft-ripple")],N.prototype,"ripple",void 0),j([o.query(".ft-ripple--effect")],N.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(N);const O=window,S=O.trustedTypes,C=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,I=`lit$${(Math.random()+"").slice(9)}$`,A="?"+I,_=`<${A}>`,E=document,T=(t="")=>E.createComment(t),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,D=/>/g,F=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),W=/'/g,Z=/"/g,G=/^(?:script|style|textarea|title)$/i,K=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),L=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),q=new WeakMap,P=E.createTreeWalker(E,129,null,!1),V=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=U;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===U?"!--"===a[1]?r=R:void 0!==a[1]?r=D:void 0!==a[2]?(G.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=F):void 0!==a[3]&&(r=F):r===F?">"===a[0]?(r=null!=s?s:U,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?F:'"'===a[3]?Z:W):r===Z||r===W?r=F:r===R||r===D?r=U:(r=F,s=void 0);const f=r===F&&t[i+1].startsWith("/>")?" ":"";n+=r===U?e+_:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+I+f):e+I+(-2===p?(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!==C?C.createHTML(l):l,o]};class X{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,p]=V(t,i);if(this.el=X.createElement(a,e),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=P.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(I)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(I),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?it:"?"===i[1]?ot:"@"===i[1]?st:tt})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(G.test(o.tagName)){const t=o.textContent.split(I),i=t.length-1;if(i>0){o.textContent=S?S.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],T()),P.nextNode(),l.push({type:2,index:++s});o.append(t[i],T())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(I,t+1));)l.push({type:7,index:s}),t+=I.length-1}s++}}static createElement(t,i){const e=E.createElement("template");return e.innerHTML=t,e}}function Y(t,i,e=t,o){var s,n,r,l;if(i===L)return i;let a=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=B(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=Y(t,a._$AS(t,i.values),a,o)),i}class J{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:E).importNode(e,!0);P.currentNode=s;let n=P.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new Q(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new nt(n,this,t)),this.u.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=P.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 Q{constructor(t,i,e,o){var s;this.type=2,this._$AH=H,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=Y(this,t,i),B(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==L&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>M(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!==H&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(E.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=X.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 J(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=q.get(t.strings);return void 0===i&&q.set(t.strings,i=new X(t)),i}k(t){M(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 Q(this.O(T()),this.O(T()),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 tt{constructor(t,i,e,o,s){this.type=1,this._$AH=H,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=H}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=Y(this,t,i,0),n=!B(t)||t!==this._$AH&&t!==L,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Y(this,o[e+r],i,r),l===L&&(l=this._$AH[r]),n||(n=!B(l)||l!==this._$AH[r]),l===H?t=H:t!==H&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class it extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}const et=S?S.emptyScript:"";class ot extends tt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==H?this.element.setAttribute(this.name,et):this.element.removeAttribute(this.name)}}class st extends tt{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=Y(this,t,i,0))&&void 0!==e?e:H)===L)return;const o=this._$AH,s=t===H&&o!==H||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==H&&(o===H||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 nt{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){Y(this,t)}}const rt=O.litHtmlPolyfillSupport;null==rt||rt(X,Q),(null!==(z=O.litHtmlVersions)&&void 0!==z?z:O.litHtmlVersions=[]).push("2.4.0");
|
|
114
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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()}}j.elementDefinitions={},j.styles=w,z([o.property({type:Boolean})],j.prototype,"primary",void 0),z([o.property({type:Boolean})],j.prototype,"secondary",void 0),z([o.property({type:Boolean})],j.prototype,"unbounded",void 0),z([o.property({type:Boolean})],j.prototype,"activated",void 0),z([o.property({type:Boolean})],j.prototype,"selected",void 0),z([o.property({type:Boolean})],j.prototype,"disabled",void 0),z([o.state()],j.prototype,"hovered",void 0),z([o.state()],j.prototype,"focused",void 0),z([o.state()],j.prototype,"pressed",void 0),z([o.state()],j.prototype,"rippling",void 0),z([o.state()],j.prototype,"rippleSize",void 0),z([o.state()],j.prototype,"originX",void 0),z([o.state()],j.prototype,"originY",void 0),z([o.query(".ft-ripple")],j.prototype,"ripple",void 0),z([o.query(".ft-ripple--effect")],j.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(j);const N=window,O=N.trustedTypes,S=O?O.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",I=`lit$${(Math.random()+"").slice(9)}$`,A="?"+I,T=`<${A}>`,E=document,_=()=>E.createComment(""),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,U="[ \t\n\f\r]",R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,F=/>/g,W=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,G=/"/g,K=/^(?:script|style|textarea|title)$/i,L=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),H=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),P=new WeakMap,V=E.createTreeWalker(E,129,null,!1),X=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=R;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===R?"!--"===a[1]?r=D:void 0!==a[1]?r=F:void 0!==a[2]?(K.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=W):void 0!==a[3]&&(r=W):r===W?">"===a[0]?(r=null!=s?s:R,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?W:'"'===a[3]?G:Z):r===G||r===Z?r=W:r===D||r===F?r=R:(r=W,s=void 0);const f=r===W&&t[i+1].startsWith("/>")?" ":"";n+=r===R?e+T:p>=0?(o.push(l),e.slice(0,p)+C+e.slice(p)+I+f):e+I+(-2===p?(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!==S?S.createHTML(l):l,o]};class Y{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,p]=X(t,i);if(this.el=Y.createElement(a,e),V.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=V.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(C)||i.startsWith(I)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+C).split(I),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?et:"?"===i[1]?st:"@"===i[1]?nt:it})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(K.test(o.tagName)){const t=o.textContent.split(I),i=t.length-1;if(i>0){o.textContent=O?O.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],_()),V.nextNode(),l.push({type:2,index:++s});o.append(t[i],_())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(I,t+1));)l.push({type:7,index:s}),t+=I.length-1}s++}}static createElement(t,i){const e=E.createElement("template");return e.innerHTML=t,e}}function J(t,i,e=t,o){var s,n,r,l;if(i===H)return i;let a=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=B(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=J(t,a._$AS(t,i.values),a,o)),i}class Q{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,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:E).importNode(e,!0);V.currentNode=s;let n=V.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new tt(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new rt(n,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=V.nextNode(),r++)}return s}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 tt{constructor(t,i,e,o){var s;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$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=J(this,t,i),B(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==H&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>M(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!==q&&B(this._$AH)?this._$AA.nextSibling.data=t:this.$(E.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Y.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new Q(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=P.get(t.strings);return void 0===i&&P.set(t.strings,i=new Y(t)),i}T(t){M(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 tt(this.k(_()),this.k(_()),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class it{constructor(t,i,e,o,s){this.type=1,this._$AH=q,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=q}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=J(this,t,i,0),n=!B(t)||t!==this._$AH&&t!==H,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=J(this,o[e+r],i,r),l===H&&(l=this._$AH[r]),n||(n=!B(l)||l!==this._$AH[r]),l===q?t=q:t!==q&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class et extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const ot=O?O.emptyScript:"";class st extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class nt extends it{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=J(this,t,i,0))&&void 0!==e?e:q)===H)return;const o=this._$AH,s=t===q&&o!==q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==q&&(o===q||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 rt{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){J(this,t)}}const lt=N.litHtmlPolyfillSupport;null==lt||lt(Y,tt),(null!==(k=N.litHtmlVersions)&&void 0!==k?k:N.litHtmlVersions=[]).push("2.7.3");
|
|
115
115
|
/**
|
|
116
116
|
* @license
|
|
117
117
|
* Copyright 2020 Google LLC
|
|
118
118
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
119
119
|
*/
|
|
120
|
-
const
|
|
120
|
+
const at=Symbol.for(""),pt=t=>{if((null==t?void 0:t.r)===at)return null==t?void 0:t._$litStatic$},ht=t=>({_$litStatic$:t,r:at}),ft=new Map,ct=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,p=0,h=!1;for(;p<o;){for(a=i[p];p<o&&void 0!==(n=e[p],s=pt(n));)a+=s+i[++p],h=!0;p!==o&&l.push(n),r.push(a),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=ft.get(t))&&(r.raw=r,ft.set(t,i=r)),e=l}return t(i,...e)})(L);var dt;!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"}(dt||(dt={}));const ut=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),xt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),yt={fontFamily:xt,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")},gt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",ut),bt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",yt.fontSize,"20px"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",yt.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",yt.letterSpacing,"0.15px"),$t=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",yt.lineHeight,"1.2"),wt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",yt.textTransform,"inherit"),kt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",ut),zt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",yt.fontSize,"14px"),jt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",yt.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",yt.letterSpacing,"0.105px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",yt.lineHeight,"1.7"),St=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",yt.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",xt),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",yt.fontSize,"16px"),At=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",yt.fontWeight,"600"),Tt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",yt.letterSpacing,"0.144px"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",yt.lineHeight,"1.5"),_t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",yt.textTransform,"inherit"),Bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",xt),Mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",yt.fontSize,"14px"),Ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",yt.fontWeight,"normal"),Rt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",yt.letterSpacing,"0.098px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",yt.lineHeight,"1.7"),Ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",yt.textTransform,"inherit"),Wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",xt),Zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",yt.fontSize,"16px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",yt.fontWeight,"normal"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",yt.letterSpacing,"0.496px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",yt.lineHeight,"1.5"),Ht=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",yt.textTransform,"inherit"),qt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",xt),Pt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",yt.fontSize,"14px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",yt.fontWeight,"normal"),Xt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",yt.letterSpacing,"0.252px"),Yt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",yt.lineHeight,"1.4"),Jt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",yt.textTransform,"inherit"),Qt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",xt),ti=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",yt.fontSize,"12px"),ii=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",yt.fontWeight,"normal"),ei=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",yt.letterSpacing,"0.396px"),oi=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",yt.lineHeight,"1.33"),si=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",yt.textTransform,"inherit"),ni=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",xt),ri=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",yt.fontSize,"10px"),li=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",yt.fontWeight,"normal"),ai=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",yt.letterSpacing,"0.33px"),pi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",yt.lineHeight,"1.6"),hi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",yt.textTransform,"inherit"),fi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",xt),ci=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",yt.fontSize,"10px"),di=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",yt.fontWeight,"normal"),ui=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",yt.letterSpacing,"1.5px"),xi=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",yt.lineHeight,"1.6"),yi=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",yt.textTransform,"uppercase"),gi=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",xt),bi=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",yt.fontSize,"14px"),vi=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",yt.fontWeight,"600"),mi=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",yt.letterSpacing,"1.246px"),$i=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",yt.lineHeight,"1.15"),wi=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",yt.textTransform,"uppercase"),ki=e.css`
|
|
121
121
|
.ft-typography--title {
|
|
122
|
-
font-family: ${
|
|
123
|
-
font-size: ${
|
|
124
|
-
font-weight: ${
|
|
125
|
-
letter-spacing: ${
|
|
126
|
-
line-height: ${
|
|
127
|
-
text-transform: ${
|
|
128
|
-
}
|
|
129
|
-
`,ki=e.css`
|
|
130
|
-
.ft-typography--title-dense {
|
|
131
|
-
font-family: ${wt};
|
|
132
|
-
font-size: ${kt};
|
|
133
|
-
font-weight: ${zt};
|
|
134
|
-
letter-spacing: ${jt};
|
|
135
|
-
line-height: ${Nt};
|
|
136
|
-
text-transform: ${Ot};
|
|
122
|
+
font-family: ${gt};
|
|
123
|
+
font-size: ${bt};
|
|
124
|
+
font-weight: ${vt};
|
|
125
|
+
letter-spacing: ${mt};
|
|
126
|
+
line-height: ${$t};
|
|
127
|
+
text-transform: ${wt};
|
|
137
128
|
}
|
|
138
129
|
`,zi=e.css`
|
|
139
|
-
.ft-typography--
|
|
140
|
-
font-family: ${
|
|
141
|
-
font-size: ${
|
|
142
|
-
font-weight: ${
|
|
143
|
-
letter-spacing: ${
|
|
144
|
-
line-height: ${
|
|
145
|
-
text-transform: ${
|
|
130
|
+
.ft-typography--title-dense {
|
|
131
|
+
font-family: ${kt};
|
|
132
|
+
font-size: ${zt};
|
|
133
|
+
font-weight: ${jt};
|
|
134
|
+
letter-spacing: ${Nt};
|
|
135
|
+
line-height: ${Ot};
|
|
136
|
+
text-transform: ${St};
|
|
146
137
|
}
|
|
147
138
|
`,ji=e.css`
|
|
148
|
-
.ft-typography--
|
|
149
|
-
font-family: ${
|
|
150
|
-
font-size: ${
|
|
151
|
-
font-weight: ${
|
|
152
|
-
letter-spacing: ${
|
|
153
|
-
line-height: ${
|
|
154
|
-
text-transform: ${
|
|
139
|
+
.ft-typography--subtitle1 {
|
|
140
|
+
font-family: ${Ct};
|
|
141
|
+
font-size: ${It};
|
|
142
|
+
font-weight: ${At};
|
|
143
|
+
letter-spacing: ${Tt};
|
|
144
|
+
line-height: ${Et};
|
|
145
|
+
text-transform: ${_t};
|
|
155
146
|
}
|
|
156
|
-
|
|
157
147
|
`,Ni=e.css`
|
|
158
|
-
.ft-typography--
|
|
159
|
-
font-family: ${
|
|
160
|
-
font-size: ${
|
|
161
|
-
font-weight: ${
|
|
162
|
-
letter-spacing: ${
|
|
163
|
-
line-height: ${
|
|
164
|
-
text-transform: ${
|
|
148
|
+
.ft-typography--subtitle2 {
|
|
149
|
+
font-family: ${Bt};
|
|
150
|
+
font-size: ${Mt};
|
|
151
|
+
font-weight: ${Ut};
|
|
152
|
+
letter-spacing: ${Rt};
|
|
153
|
+
line-height: ${Dt};
|
|
154
|
+
text-transform: ${Ft};
|
|
165
155
|
}
|
|
156
|
+
|
|
166
157
|
`,Oi=e.css`
|
|
167
|
-
.ft-typography--
|
|
168
|
-
font-family: ${
|
|
169
|
-
font-size: ${
|
|
170
|
-
font-weight: ${
|
|
171
|
-
letter-spacing: ${
|
|
172
|
-
line-height: ${
|
|
173
|
-
text-transform: ${
|
|
158
|
+
.ft-typography--body1 {
|
|
159
|
+
font-family: ${Wt};
|
|
160
|
+
font-size: ${Zt};
|
|
161
|
+
font-weight: ${Gt};
|
|
162
|
+
letter-spacing: ${Kt};
|
|
163
|
+
line-height: ${Lt};
|
|
164
|
+
text-transform: ${Ht};
|
|
174
165
|
}
|
|
175
166
|
`,Si=e.css`
|
|
176
|
-
.ft-typography--
|
|
177
|
-
font-family: ${
|
|
178
|
-
font-size: ${
|
|
179
|
-
font-weight: ${
|
|
180
|
-
letter-spacing: ${
|
|
181
|
-
line-height: ${
|
|
182
|
-
text-transform: ${
|
|
167
|
+
.ft-typography--body2 {
|
|
168
|
+
font-family: ${qt};
|
|
169
|
+
font-size: ${Pt};
|
|
170
|
+
font-weight: ${Vt};
|
|
171
|
+
letter-spacing: ${Xt};
|
|
172
|
+
line-height: ${Yt};
|
|
173
|
+
text-transform: ${Jt};
|
|
183
174
|
}
|
|
184
175
|
`,Ci=e.css`
|
|
185
|
-
.ft-typography--
|
|
186
|
-
font-family: ${
|
|
187
|
-
font-size: ${
|
|
188
|
-
font-weight: ${
|
|
189
|
-
letter-spacing: ${
|
|
190
|
-
line-height: ${
|
|
191
|
-
text-transform: ${
|
|
176
|
+
.ft-typography--caption {
|
|
177
|
+
font-family: ${Qt};
|
|
178
|
+
font-size: ${ti};
|
|
179
|
+
font-weight: ${ii};
|
|
180
|
+
letter-spacing: ${ei};
|
|
181
|
+
line-height: ${oi};
|
|
182
|
+
text-transform: ${si};
|
|
192
183
|
}
|
|
193
184
|
`,Ii=e.css`
|
|
194
|
-
.ft-typography--
|
|
195
|
-
font-family: ${
|
|
196
|
-
font-size: ${
|
|
197
|
-
font-weight: ${
|
|
198
|
-
letter-spacing: ${
|
|
199
|
-
line-height: ${
|
|
200
|
-
text-transform: ${
|
|
185
|
+
.ft-typography--breadcrumb {
|
|
186
|
+
font-family: ${ni};
|
|
187
|
+
font-size: ${ri};
|
|
188
|
+
font-weight: ${li};
|
|
189
|
+
letter-spacing: ${ai};
|
|
190
|
+
line-height: ${pi};
|
|
191
|
+
text-transform: ${hi};
|
|
201
192
|
}
|
|
202
193
|
`,Ai=e.css`
|
|
194
|
+
.ft-typography--overline {
|
|
195
|
+
font-family: ${fi};
|
|
196
|
+
font-size: ${ci};
|
|
197
|
+
font-weight: ${di};
|
|
198
|
+
letter-spacing: ${ui};
|
|
199
|
+
line-height: ${xi};
|
|
200
|
+
text-transform: ${yi};
|
|
201
|
+
}
|
|
202
|
+
`,Ti=e.css`
|
|
203
203
|
.ft-typography--button {
|
|
204
|
-
font-family: ${
|
|
205
|
-
font-size: ${
|
|
206
|
-
font-weight: ${
|
|
207
|
-
letter-spacing: ${
|
|
208
|
-
line-height: ${
|
|
209
|
-
text-transform: ${
|
|
210
|
-
}
|
|
211
|
-
`,
|
|
204
|
+
font-family: ${gi};
|
|
205
|
+
font-size: ${bi};
|
|
206
|
+
font-weight: ${vi};
|
|
207
|
+
letter-spacing: ${mi};
|
|
208
|
+
line-height: ${$i};
|
|
209
|
+
text-transform: ${wi};
|
|
210
|
+
}
|
|
211
|
+
`,Ei=e.css`
|
|
212
212
|
.ft-typography {
|
|
213
213
|
vertical-align: inherit;
|
|
214
214
|
}
|
|
215
|
-
`;var
|
|
216
|
-
<${
|
|
215
|
+
`;var _i,Bi,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 Ui extends i.FtLitElement{constructor(){super(...arguments),this.variant=dt.body1}render(){return this.element?ct`
|
|
216
|
+
<${ht(this.element)}
|
|
217
217
|
class="ft-typography ft-typography--${this.variant}">
|
|
218
218
|
<slot></slot>
|
|
219
|
-
</${
|
|
220
|
-
`:
|
|
219
|
+
</${ht(this.element)}>
|
|
220
|
+
`:ct`
|
|
221
221
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
222
|
-
`}}
|
|
222
|
+
`}}Ui.styles=[ki,zi,ji,Ni,Oi,Si,Ci,Ii,Ai,Ti,Ei],Mi([o.property()],Ui.prototype,"element",void 0),Mi([o.property()],Ui.prototype,"variant",void 0),i.customElement("ft-typography")(Ui),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",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.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=""}(_i||(_i={})),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=""}(Bi||(Bi={})),new Map([...["abw"].map((t=>[t,Bi.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,Bi.AUDIO])),...["avi"].map((t=>[t,Bi.AVI])),...["chm","xhs"].map((t=>[t,Bi.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,Bi.CODE])),...["csv"].map((t=>[t,Bi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Bi.DITA])),...["epub"].map((t=>[t,Bi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Bi.EXCEL])),...["flac"].map((t=>[t,Bi.FLAC])),...["gif"].map((t=>[t,Bi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Bi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Bi.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,Bi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Bi.JPEG])),...["json"].map((t=>[t,Bi.JSON])),...["m4a","m4p"].map((t=>[t,Bi.M4A])),...["mov","qt"].map((t=>[t,Bi.MOV])),...["mp3"].map((t=>[t,Bi.MP3])),...["mp4","m4v"].map((t=>[t,Bi.MP4])),...["ogg","oga"].map((t=>[t,Bi.OGG])),...["pdf","ps"].map((t=>[t,Bi.PDF])),...["png"].map((t=>[t,Bi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Bi.POWERPOINT])),...["rar"].map((t=>[t,Bi.RAR])),...["stp"].map((t=>[t,Bi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Bi.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,Bi.VIDEO])),...["wav"].map((t=>[t,Bi.WAV])),...["wma"].map((t=>[t,Bi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Bi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Bi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Bi.YAML])),...["zip"].map((t=>[t,Bi.ZIP]))]);const Ri=i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),Di=i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Fi=i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Wi=i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Zi=i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),Gi=e.css`
|
|
223
223
|
:host, i.ft-icon {
|
|
224
224
|
display: inline-flex;
|
|
225
225
|
align-items: center;
|
|
@@ -228,14 +228,14 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
:host {
|
|
231
|
-
width: ${
|
|
232
|
-
height: ${
|
|
231
|
+
width: ${Ri};
|
|
232
|
+
height: ${Ri};
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
i.ft-icon {
|
|
236
236
|
width: 100%;
|
|
237
237
|
height: 100%;
|
|
238
|
-
font-size: ${
|
|
238
|
+
font-size: ${Ri};
|
|
239
239
|
line-height: 1;
|
|
240
240
|
font-weight: normal;
|
|
241
241
|
text-transform: none;
|
|
@@ -246,36 +246,36 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
246
246
|
text-rendering: auto;
|
|
247
247
|
-webkit-font-smoothing: antialiased;
|
|
248
248
|
-moz-osx-font-smoothing: grayscale;
|
|
249
|
-
vertical-align: ${
|
|
249
|
+
vertical-align: ${Zi};
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
i.ft-icon.ft-icon--fluid-topics {
|
|
253
|
-
font-family: ${
|
|
253
|
+
font-family: ${Di}, ft-icons, fticons, sans-serif;
|
|
254
254
|
|
|
255
255
|
/* Ugly fix because font is broken */
|
|
256
|
-
font-size: calc(0.
|
|
256
|
+
font-size: calc(0.75 * ${Ri});
|
|
257
257
|
position: relative;
|
|
258
|
-
top: -
|
|
258
|
+
top: -4%;
|
|
259
259
|
justify-content: center;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
.ft-icon--file-format {
|
|
263
|
-
font-family: ${
|
|
263
|
+
font-family: ${Fi}, ft-mime, sans-serif;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
.ft-icon--material {
|
|
267
|
-
font-family: ${
|
|
267
|
+
font-family: ${Wi}, "Material Icons", sans-serif;
|
|
268
268
|
}
|
|
269
|
-
`;var
|
|
270
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
269
|
+
`;var Ki;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ki||(Ki={}));var Li,Hi=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 qi extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Ki).includes(this.variant)?this.variant:Ki.fluid_topics,i=t!==Ki.material||!!this.value;return e.html`
|
|
270
|
+
<i class="ft-icon ${"ft-icon--"+t}">
|
|
271
271
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
272
|
-
<slot ?hidden=${
|
|
272
|
+
<slot ?hidden=${i}></slot>
|
|
273
273
|
</i>
|
|
274
|
-
`}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
|
|
274
|
+
`}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 Ki.file_format:this.resolvedIcon=null!==(t=Bi[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ki.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=_i[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}qi.elementDefinitions={},qi.styles=Gi,Hi([o.property()],qi.prototype,"variant",void 0),Hi([o.property()],qi.prototype,"value",void 0),Hi([o.state()],qi.prototype,"resolvedIcon",void 0),Hi([o.query("slot")],qi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(qi),t.FtTabsAlignment=void 0,(Li=t.FtTabsAlignment||(t.FtTabsAlignment={})).left="left",Li.right="right",Li.justify="justify";const Pi={colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system")},Vi=e.css`
|
|
275
275
|
.ft-tabs {
|
|
276
276
|
display: flex;
|
|
277
277
|
flex-direction: column;
|
|
278
|
-
background-color: ${
|
|
278
|
+
background-color: ${Pi.colorSurface};
|
|
279
279
|
height: 100%;
|
|
280
280
|
}
|
|
281
281
|
|
|
@@ -315,15 +315,15 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
315
315
|
outline: none;
|
|
316
316
|
font-size: 16px;
|
|
317
317
|
line-height: 1;
|
|
318
|
-
color: ${
|
|
318
|
+
color: ${Pi.colorOnSurfaceMedium};
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
[role='tab'][aria-selected='true'] {
|
|
322
|
-
color: ${
|
|
322
|
+
color: ${Pi.colorPrimary};
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
[role='tab'][disabled] {
|
|
326
|
-
color: ${
|
|
326
|
+
color: ${Pi.colorOnSurfaceDisabled};
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
.ft-tabs--align-justify [role='tab'],
|
|
@@ -355,7 +355,7 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
355
355
|
position: absolute;
|
|
356
356
|
height: 3px;
|
|
357
357
|
border-radius: 2px;
|
|
358
|
-
background-color: ${
|
|
358
|
+
background-color: ${Pi.colorPrimary};
|
|
359
359
|
transition: width 200ms ease, left 200ms ease, top 200ms ease;
|
|
360
360
|
}
|
|
361
361
|
|
|
@@ -364,7 +364,7 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
364
364
|
flex-grow: 1;
|
|
365
365
|
overflow: auto;
|
|
366
366
|
}
|
|
367
|
-
`,
|
|
367
|
+
`,Xi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Yi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ji=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Qi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),te=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),ie=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),ee=e.css`
|
|
368
368
|
.ft-tooltip--container {
|
|
369
369
|
display: block;
|
|
370
370
|
position: relative;
|
|
@@ -380,23 +380,23 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
380
380
|
box-sizing: border-box;
|
|
381
381
|
overflow: hidden;
|
|
382
382
|
width: max-content;
|
|
383
|
-
max-width: ${
|
|
383
|
+
max-width: ${ie};
|
|
384
384
|
text-align: center;
|
|
385
|
-
padding: ${
|
|
386
|
-
z-index: ${
|
|
385
|
+
padding: ${Xi};
|
|
386
|
+
z-index: ${Qi};
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
.ft-tooltip--content {
|
|
390
390
|
padding: 4px 8px;
|
|
391
|
-
border-radius: ${
|
|
392
|
-
background-color: ${
|
|
393
|
-
color: ${
|
|
391
|
+
border-radius: ${te};
|
|
392
|
+
background-color: ${Ji};
|
|
393
|
+
color: ${Yi};
|
|
394
394
|
top: -500px;
|
|
395
395
|
left: -500px;
|
|
396
396
|
position: relative;
|
|
397
397
|
word-break: break-word;
|
|
398
398
|
}
|
|
399
|
-
`;var
|
|
399
|
+
`;var oe=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 se extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
400
400
|
<div part="container"
|
|
401
401
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
402
402
|
@mouseenter=${this.onHover}
|
|
@@ -414,7 +414,7 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
414
414
|
</div>
|
|
415
415
|
</div>
|
|
416
416
|
</div>
|
|
417
|
-
`}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.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=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){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, ${
|
|
417
|
+
`}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.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=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){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, ${ie})`}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())}}se.elementDefinitions={"ft-typography":Ui},se.styles=ee,oe([o.property()],se.prototype,"text",void 0),oe([o.property({type:Boolean})],se.prototype,"manual",void 0),oe([o.property({type:Boolean})],se.prototype,"inline",void 0),oe([o.property({type:Number})],se.prototype,"delay",void 0),oe([o.property()],se.prototype,"position",void 0),oe([o.queryAssignedNodes("",!0)],se.prototype,"slotNodes",void 0),oe([o.query(".ft-tooltip--container")],se.prototype,"container",void 0),oe([o.query("slot")],se.prototype,"target",void 0),oe([o.query(".ft-tooltip")],se.prototype,"tooltip",void 0),oe([o.query(".ft-tooltip--content")],se.prototype,"tooltipContent",void 0),oe([o.state()],se.prototype,"visible",void 0),i.customElement("ft-tooltip")(se);var ne=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 re extends CustomEvent{constructor(t){super("index-change",{detail:t})}}class le extends i.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.contentBefore=!1,this.alignTabs=t.FtTabsAlignment.justify,this.ftTabs=[],this.activeIndex=0,this.updateDebouncer=new i.Debouncer(20),this.scheduleRequestUpdate=()=>this.updateDebouncer.run((()=>{this.requestUpdate()})),this.resizeObserver=new ResizeObserver((()=>this.placeIndicator()))}render(){var t;const i={"ft-tabs":!0,"ft-tabs--reverse":this.contentBefore,"ft-tabs--dense":this.dense},o=null===(t=this.ftTabs[this.activeIndex])||void 0===t?void 0:t.color;return e.html`
|
|
418
418
|
<div class="${n.classMap(i)}" part="container">
|
|
419
419
|
<div class="ft-tabs--align-${this.alignTabs}" role="tablist" part="tablist">
|
|
420
420
|
${s.repeat(this.ftTabs,((t,i)=>this.addTooltipIfNecessary(t,e.html`
|
|
@@ -435,12 +435,12 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
435
435
|
style="${t.color||t.rippleColor?`--ft-ripple-color: ${t.color||t.rippleColor};`:""}"></ft-ripple>
|
|
436
436
|
<ft-icon class="ft-tabs--tab-icon"
|
|
437
437
|
part="tab-icon${t.active?" active-tab-icon":""}"
|
|
438
|
-
variant
|
|
438
|
+
.variant=${t.iconVariant}>
|
|
439
439
|
${t.icon}
|
|
440
440
|
</ft-icon>
|
|
441
441
|
<ft-typography class="ft-tabs--tab-label"
|
|
442
442
|
part="tab-label${t.active?" active-tab-label":""}"
|
|
443
|
-
variant="${
|
|
443
|
+
variant="${dt.body2}">
|
|
444
444
|
${t.label}
|
|
445
445
|
</ft-typography>
|
|
446
446
|
</button>
|
|
@@ -454,11 +454,11 @@ const lt=Symbol.for(""),at=t=>{if((null==t?void 0:t.r)===lt)return null==t?void
|
|
|
454
454
|
<slot @slotchange=${this.onContentChange}></slot>
|
|
455
455
|
</div>
|
|
456
456
|
</div>
|
|
457
|
-
`}onContentChange(t){const i=t.composedPath()[0];this.ftTabs=i.assignedElements().map((t=>t)),this.ftTabs.forEach((t=>{t.removeEventListener("updated",this.scheduleRequestUpdate),t.addEventListener("updated",this.scheduleRequestUpdate)})),this.updateTabs()}updated(t){super.updated(t),(t.has("
|
|
457
|
+
`}onContentChange(t){const i=t.composedPath()[0];this.ftTabs=i.assignedElements().map((t=>t)),this.ftTabs.forEach((t=>{t.removeEventListener("updated",this.scheduleRequestUpdate),t.addEventListener("updated",this.scheduleRequestUpdate)})),this.updateTabs()}updated(t){super.updated(t),(t.has("ftTabs")||t.has("activeIndex"))&&this.updateTabs(),t.has("activeIndex")&&this.dispatchEvent(new re(this.activeIndex))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.tabsContainer&&this.resizeObserver.observe(this.tabsContainer),this.placeIndicator()}placeIndicator(){var t,i,e,o,s,n,r;if(this.activeTabIndicator){const l=null!==(i=null===(t=this.activeTab)||void 0===t?void 0:t.closest(".ft-tabs--tab-tooltip"))&&void 0!==i?i:this.activeTab;this.activeTabIndicator.style.width=(null!==(e=null==l?void 0:l.clientWidth)&&void 0!==e?e:0)+"px",this.activeTabIndicator.style.left=(null!==(o=null==l?void 0:l.offsetLeft)&&void 0!==o?o:0)+"px",this.contentBefore?this.activeTabIndicator.style.top=(null!==(s=null==l?void 0:l.offsetTop)&&void 0!==s?s:0)+"px":this.activeTabIndicator.style.top=(null!==(n=null==l?void 0:l.offsetTop)&&void 0!==n?n:0)+(null!==(r=null==l?void 0:l.clientHeight)&&void 0!==r?r:0)-this.activeTabIndicator.clientHeight+"px"}}updateTabs(){this.ftTabs.forEach(((t,i)=>{t.active=i==this.activeIndex}))}addTooltipIfNecessary(t,i){return this.dense&&t.label&&t.icon?e.html`
|
|
458
458
|
<ft-tooltip class="ft-tabs--tab-tooltip"
|
|
459
459
|
part="tab-tooltip"
|
|
460
460
|
text="${t.label}"
|
|
461
461
|
position="${this.contentBefore?"top":"bottom"}">
|
|
462
462
|
${i}
|
|
463
463
|
</ft-tooltip>
|
|
464
|
-
`:i}}
|
|
464
|
+
`:i}}le.elementDefinitions={"ft-tab":a,"ft-ripple":j,"ft-tooltip":se,"ft-typography":Ui,"ft-icon":qi},le.styles=Vi,ne([o.property({type:Boolean})],le.prototype,"dense",void 0),ne([o.property({type:Boolean})],le.prototype,"contentBefore",void 0),ne([o.property()],le.prototype,"alignTabs",void 0),ne([o.state()],le.prototype,"ftTabs",void 0),ne([o.query("[role='tablist']")],le.prototype,"tabsContainer",void 0),ne([o.query("[aria-selected='true']")],le.prototype,"activeTab",void 0),ne([o.query(".ft-tabs--active-tab-indicator")],le.prototype,"activeTabIndicator",void 0),ne([o.property({type:Number,reflect:!0})],le.prototype,"activeIndex",void 0);i.customElement("ft-tab")(a),i.customElement("ft-tabs")(le),t.FtTab=a,t.FtTabCssVariables={},t.FtTabs=le,t.FtTabsCssVariables=Pi,t.IndexChangeEvent=re,t.styles=Vi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|