@fluid-topics/ft-tabs 1.0.0-alpha.1 → 1.0.1
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-tabs.light.js +111 -109
- package/build/ft-tabs.min.js +119 -117
- package/package.json +7 -7
package/build/ft-tabs.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=s.prototype.attributeChangedCallback,l=new Set(s.observedAttributes||[]);f(s,l,a);const h={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(s,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(n.set(s,h),h.standInClass=c);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=s.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const x=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=s.prototype.attributeChangedCallback,l=new Set(s.observedAttributes||[]);f(s,l,a);const h={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(s,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(n.set(s,h),h.standInClass=c);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=s.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const x=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Ai){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,s=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}s(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -112,7 +112,7 @@ const jt=1,Ut=2,Ft=t=>(...e)=>({_$litDirective$:t,values:e});class zt{constructo
|
|
|
112
112
|
* @license
|
|
113
113
|
* Copyright 2020 Google LLC
|
|
114
114
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
115
|
-
*/const{I:At}=ft,Bt=()=>document.createComment(""),Lt=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Bt(),r),o=s.insertBefore(Bt(),r);i=new At(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,a=n!==t;if(a){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},Tt=(t,e,i=t)=>(t._$AI(e,i),t),Pt={},Dt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},_t=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},It=Ft(class extends zt{constructor(t){if(super(t),t.type!==Ut)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:a}=this.dt(e,i,o);if(!Array.isArray(r))return this.ht=a,n;const l=null!==(s=this.ht)&&void 0!==s?s:this.ht=[],h=[];let c,p,f=0,d=r.length-1,u=0,v=n.length-1;for(;f<=d&&u<=v;)if(null===r[f])f++;else if(null===r[d])d--;else if(l[f]===a[u])h[u]=Tt(r[f],n[u]),f++,u++;else if(l[d]===a[v])h[v]=Tt(r[d],n[v]),d--,v--;else if(l[f]===a[v])h[v]=Tt(r[f],n[v]),Lt(t,h[v+1],r[f]),f++,v--;else if(l[d]===a[u])h[u]=Tt(r[d],n[u]),Lt(t,r[f],r[d]),d--,u++;else if(void 0===c&&(c=_t(a,u,v),p=_t(l,f,d)),c.has(l[f]))if(c.has(l[d])){const e=p.get(a[u]),i=void 0!==e?r[e]:null;if(null===i){const e=Lt(t,r[f]);Tt(e,n[u]),h[u]=e}else h[u]=Tt(i,n[u]),Lt(t,r[f],i),r[e]=null;u++}else Dt(r[d]),d--;else Dt(r[f]),f++;for(;u<=v;){const e=Lt(t,h[v+1]);Tt(e,n[u]),h[u++]=e}for(;f<=d;){const t=r[f++];null!==t&&Dt(t)}return this.ht=a,((t,e=Pt)=>{t._$AH=e})(t,h),Y}}),Wt=Ft(class extends zt{constructor(t){var e;if(super(t),t.type!==jt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const s=t.element.classList;this.it.forEach((t=>{t in e||(s.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return Y}}),Ht=bt.extend("--ft-ripple-color",gt.colorContent),Kt=Ht,Zt=bt.extend("--ft-ripple-background-color",Ht),Vt=bt.external(gt.opacityContentOnSurfacePressed,"Design system"),Jt=bt.external(gt.opacityContentOnSurfaceHover,"Design system"),qt=bt.external(gt.opacityContentOnSurfaceFocused,"Design system"),Xt=bt.external(gt.opacityContentOnSurfaceSelected,"Design system"),Yt=bt.extend("--ft-ripple-color",gt.colorPrimary),Gt
|
|
115
|
+
*/const{I:At}=ft,Bt=()=>document.createComment(""),Lt=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Bt(),r),o=s.insertBefore(Bt(),r);i=new At(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,a=n!==t;if(a){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},Tt=(t,e,i=t)=>(t._$AI(e,i),t),Pt={},Dt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},_t=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},It=Ft(class extends zt{constructor(t){if(super(t),t.type!==Ut)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:a}=this.dt(e,i,o);if(!Array.isArray(r))return this.ht=a,n;const l=null!==(s=this.ht)&&void 0!==s?s:this.ht=[],h=[];let c,p,f=0,d=r.length-1,u=0,v=n.length-1;for(;f<=d&&u<=v;)if(null===r[f])f++;else if(null===r[d])d--;else if(l[f]===a[u])h[u]=Tt(r[f],n[u]),f++,u++;else if(l[d]===a[v])h[v]=Tt(r[d],n[v]),d--,v--;else if(l[f]===a[v])h[v]=Tt(r[f],n[v]),Lt(t,h[v+1],r[f]),f++,v--;else if(l[d]===a[u])h[u]=Tt(r[d],n[u]),Lt(t,r[f],r[d]),d--,u++;else if(void 0===c&&(c=_t(a,u,v),p=_t(l,f,d)),c.has(l[f]))if(c.has(l[d])){const e=p.get(a[u]),i=void 0!==e?r[e]:null;if(null===i){const e=Lt(t,r[f]);Tt(e,n[u]),h[u]=e}else h[u]=Tt(i,n[u]),Lt(t,r[f],i),r[e]=null;u++}else Dt(r[d]),d--;else Dt(r[f]),f++;for(;u<=v;){const e=Lt(t,h[v+1]);Tt(e,n[u]),h[u++]=e}for(;f<=d;){const t=r[f++];null!==t&&Dt(t)}return this.ht=a,((t,e=Pt)=>{t._$AH=e})(t,h),Y}}),Wt=Ft(class extends zt{constructor(t){var e;if(super(t),t.type!==jt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const s=t.element.classList;this.it.forEach((t=>{t in e||(s.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return Y}}),Ht=bt.extend("--ft-ripple-color",gt.colorContent),Kt=Ht,Zt=bt.extend("--ft-ripple-background-color",Ht),Vt=bt.external(gt.opacityContentOnSurfacePressed,"Design system"),Jt=bt.external(gt.opacityContentOnSurfaceHover,"Design system"),qt=bt.external(gt.opacityContentOnSurfaceFocused,"Design system"),Xt=bt.external(gt.opacityContentOnSurfaceSelected,"Design system"),Yt=bt.create("--ft-ripple-border-radius","SIZE","0px"),Gt=bt.extend("--ft-ripple-color",gt.colorPrimary),Qt=Gt,te=bt.extend("--ft-ripple-background-color",Gt),ee=bt.extend("--ft-ripple-color",gt.colorSecondary),ie=ee,oe=bt.extend("--ft-ripple-background-color",ee),se=x`
|
|
116
116
|
:host {
|
|
117
117
|
display: contents;
|
|
118
118
|
}
|
|
@@ -125,6 +125,7 @@ const jt=1,Ut=2,Ft=t=>(...e)=>({_$litDirective$:t,values:e});class zt{constructo
|
|
|
125
125
|
|
|
126
126
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
127
127
|
overflow: hidden;
|
|
128
|
+
border-radius: ${Yt};
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
.ft-ripple .ft-ripple--background,
|
|
@@ -142,19 +143,19 @@ const jt=1,Ut=2,Ft=t=>(...e)=>({_$litDirective$:t,values:e});class zt{constructo
|
|
|
142
143
|
}
|
|
143
144
|
|
|
144
145
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
145
|
-
background-color: ${
|
|
146
|
+
background-color: ${oe};
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
149
|
-
background-color: ${
|
|
150
|
+
background-color: ${ie};
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
153
|
-
background-color: ${
|
|
154
|
+
background-color: ${te};
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
157
|
-
background-color: ${
|
|
158
|
+
background-color: ${Qt};
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
.ft-ripple .ft-ripple--background {
|
|
@@ -206,7 +207,7 @@ const jt=1,Ut=2,Ft=t=>(...e)=>({_$litDirective$:t,values:e});class zt{constructo
|
|
|
206
207
|
* @license
|
|
207
208
|
* Copyright 2017 Google LLC
|
|
208
209
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
209
|
-
*/var
|
|
210
|
+
*/var re=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ne extends Nt{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 e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.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 X`
|
|
210
211
|
<style>
|
|
211
212
|
.ft-ripple .ft-ripple--effect,
|
|
212
213
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -223,121 +224,121 @@ const jt=1,Ut=2,Ft=t=>(...e)=>({_$litDirective$:t,values:e});class zt{constructo
|
|
|
223
224
|
<div class="ft-ripple--background"></div>
|
|
224
225
|
<div class="ft-ripple--effect"></div>
|
|
225
226
|
</div>
|
|
226
|
-
`}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 e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),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 e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),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 e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",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",i),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 e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
227
|
+
`}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 e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),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 e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),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 e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",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",i),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 e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ne.elementDefinitions={},ne.styles=se,re([o({type:Boolean})],ne.prototype,"primary",void 0),re([o({type:Boolean})],ne.prototype,"secondary",void 0),re([o({type:Boolean})],ne.prototype,"unbounded",void 0),re([o({type:Boolean})],ne.prototype,"activated",void 0),re([o({type:Boolean})],ne.prototype,"selected",void 0),re([o({type:Boolean})],ne.prototype,"disabled",void 0),re([s()],ne.prototype,"hovered",void 0),re([s()],ne.prototype,"focused",void 0),re([s()],ne.prototype,"pressed",void 0),re([s()],ne.prototype,"rippling",void 0),re([s()],ne.prototype,"rippleSize",void 0),re([s()],ne.prototype,"originX",void 0),re([s()],ne.prototype,"originY",void 0),re([n(".ft-ripple")],ne.prototype,"ripple",void 0),re([n(".ft-ripple--effect")],ne.prototype,"rippleEffect",void 0),c("ft-ripple")(ne);
|
|
227
228
|
/**
|
|
228
229
|
* @license
|
|
229
230
|
* Copyright 2020 Google LLC
|
|
230
231
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
231
232
|
*/
|
|
232
|
-
const
|
|
233
|
+
const ae=Symbol.for(""),le=t=>{if((null==t?void 0:t.r)===ae)return null==t?void 0:t._$litStatic$},he=t=>({_$litStatic$:t,r:ae}),ce=new Map,pe=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],s=le(r));)l+=s+e[++h],c=!0;h!==o&&a.push(r),n.push(l),h++}if(h===o&&n.push(e[o]),c){const t=n.join("$$lit$$");void 0===(e=ce.get(t))&&(n.raw=n,ce.set(t,e=n)),i=a}return t(e,...i)})(X);var fe;!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"}(fe||(fe={}));const de=bt.extend("--ft-typography-font-family",gt.titleFont),ue=bt.extend("--ft-typography-font-family",gt.contentFont),ve={fontFamily:ue,fontSize:bt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:bt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:bt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:bt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:bt.create("--ft-typography-text-transform","UNKNOWN","inherit")},ye=bt.extend("--ft-typography-title-font-family",de),xe=bt.extend("--ft-typography-title-font-size",ve.fontSize,"20px"),be=bt.extend("--ft-typography-title-font-weight",ve.fontWeight,"normal"),ge=bt.extend("--ft-typography-title-letter-spacing",ve.letterSpacing,"0.15px"),me=bt.extend("--ft-typography-title-line-height",ve.lineHeight,"1.2"),we=bt.extend("--ft-typography-title-text-transform",ve.textTransform,"inherit"),$e=bt.extend("--ft-typography-title-dense-font-family",de),Oe=bt.extend("--ft-typography-title-dense-font-size",ve.fontSize,"14px"),Se=bt.extend("--ft-typography-title-dense-font-weight",ve.fontWeight,"normal"),ke=bt.extend("--ft-typography-title-dense-letter-spacing",ve.letterSpacing,"0.105px"),Ne=bt.extend("--ft-typography-title-dense-line-height",ve.lineHeight,"1.7"),Ce=bt.extend("--ft-typography-title-dense-text-transform",ve.textTransform,"inherit"),Ee=bt.extend("--ft-typography-subtitle1-font-family",ue),Re=bt.extend("--ft-typography-subtitle1-font-size",ve.fontSize,"16px"),Me=bt.extend("--ft-typography-subtitle1-font-weight",ve.fontWeight,"600"),je=bt.extend("--ft-typography-subtitle1-letter-spacing",ve.letterSpacing,"0.144px"),Ue=bt.extend("--ft-typography-subtitle1-line-height",ve.lineHeight,"1.5"),Fe=bt.extend("--ft-typography-subtitle1-text-transform",ve.textTransform,"inherit"),ze=bt.extend("--ft-typography-subtitle2-font-family",ue),Ae=bt.extend("--ft-typography-subtitle2-font-size",ve.fontSize,"14px"),Be=bt.extend("--ft-typography-subtitle2-font-weight",ve.fontWeight,"normal"),Le=bt.extend("--ft-typography-subtitle2-letter-spacing",ve.letterSpacing,"0.098px"),Te=bt.extend("--ft-typography-subtitle2-line-height",ve.lineHeight,"1.7"),Pe=bt.extend("--ft-typography-subtitle2-text-transform",ve.textTransform,"inherit"),De=bt.extend("--ft-typography-body1-font-family",ue),_e=bt.extend("--ft-typography-body1-font-size",ve.fontSize,"16px"),Ie=bt.extend("--ft-typography-body1-font-weight",ve.fontWeight,"normal"),We=bt.extend("--ft-typography-body1-letter-spacing",ve.letterSpacing,"0.496px"),He=bt.extend("--ft-typography-body1-line-height",ve.lineHeight,"1.5"),Ke=bt.extend("--ft-typography-body1-text-transform",ve.textTransform,"inherit"),Ze=bt.extend("--ft-typography-body2-font-family",ue),Ve=bt.extend("--ft-typography-body2-font-size",ve.fontSize,"14px"),Je=bt.extend("--ft-typography-body2-font-weight",ve.fontWeight,"normal"),qe=bt.extend("--ft-typography-body2-letter-spacing",ve.letterSpacing,"0.252px"),Xe=bt.extend("--ft-typography-body2-line-height",ve.lineHeight,"1.4"),Ye=bt.extend("--ft-typography-body2-text-transform",ve.textTransform,"inherit"),Ge=bt.extend("--ft-typography-caption-font-family",ue),Qe=bt.extend("--ft-typography-caption-font-size",ve.fontSize,"12px"),ti=bt.extend("--ft-typography-caption-font-weight",ve.fontWeight,"normal"),ei=bt.extend("--ft-typography-caption-letter-spacing",ve.letterSpacing,"0.396px"),ii=bt.extend("--ft-typography-caption-line-height",ve.lineHeight,"1.33"),oi=bt.extend("--ft-typography-caption-text-transform",ve.textTransform,"inherit"),si=bt.extend("--ft-typography-breadcrumb-font-family",ue),ri=bt.extend("--ft-typography-breadcrumb-font-size",ve.fontSize,"10px"),ni=bt.extend("--ft-typography-breadcrumb-font-weight",ve.fontWeight,"normal"),ai=bt.extend("--ft-typography-breadcrumb-letter-spacing",ve.letterSpacing,"0.33px"),li=bt.extend("--ft-typography-breadcrumb-line-height",ve.lineHeight,"1.6"),hi=bt.extend("--ft-typography-breadcrumb-text-transform",ve.textTransform,"inherit"),ci=bt.extend("--ft-typography-overline-font-family",ue),pi=bt.extend("--ft-typography-overline-font-size",ve.fontSize,"10px"),fi=bt.extend("--ft-typography-overline-font-weight",ve.fontWeight,"normal"),di=bt.extend("--ft-typography-overline-letter-spacing",ve.letterSpacing,"1.5px"),ui=bt.extend("--ft-typography-overline-line-height",ve.lineHeight,"1.6"),vi=bt.extend("--ft-typography-overline-text-transform",ve.textTransform,"uppercase"),yi=bt.extend("--ft-typography-button-font-family",ue),xi=bt.extend("--ft-typography-button-font-size",ve.fontSize,"14px"),bi=bt.extend("--ft-typography-button-font-weight",ve.fontWeight,"600"),gi=bt.extend("--ft-typography-button-letter-spacing",ve.letterSpacing,"1.246px"),mi=bt.extend("--ft-typography-button-line-height",ve.lineHeight,"1.15"),wi=bt.extend("--ft-typography-button-text-transform",ve.textTransform,"uppercase"),$i=x`
|
|
233
234
|
.ft-typography--title {
|
|
234
|
-
font-family: ${
|
|
235
|
-
font-size: ${
|
|
236
|
-
font-weight: ${
|
|
237
|
-
letter-spacing: ${
|
|
238
|
-
line-height: ${
|
|
239
|
-
text-transform: ${
|
|
240
|
-
}
|
|
241
|
-
`,$i=x`
|
|
242
|
-
.ft-typography--title-dense {
|
|
243
|
-
font-family: ${we};
|
|
244
|
-
font-size: ${$e};
|
|
245
|
-
font-weight: ${Oe};
|
|
246
|
-
letter-spacing: ${Se};
|
|
247
|
-
line-height: ${ke};
|
|
248
|
-
text-transform: ${Ne};
|
|
235
|
+
font-family: ${ye};
|
|
236
|
+
font-size: ${xe};
|
|
237
|
+
font-weight: ${be};
|
|
238
|
+
letter-spacing: ${ge};
|
|
239
|
+
line-height: ${me};
|
|
240
|
+
text-transform: ${we};
|
|
249
241
|
}
|
|
250
242
|
`,Oi=x`
|
|
251
|
-
.ft-typography--
|
|
252
|
-
font-family: ${
|
|
253
|
-
font-size: ${
|
|
254
|
-
font-weight: ${
|
|
255
|
-
letter-spacing: ${
|
|
256
|
-
line-height: ${
|
|
257
|
-
text-transform: ${
|
|
243
|
+
.ft-typography--title-dense {
|
|
244
|
+
font-family: ${$e};
|
|
245
|
+
font-size: ${Oe};
|
|
246
|
+
font-weight: ${Se};
|
|
247
|
+
letter-spacing: ${ke};
|
|
248
|
+
line-height: ${Ne};
|
|
249
|
+
text-transform: ${Ce};
|
|
258
250
|
}
|
|
259
251
|
`,Si=x`
|
|
260
|
-
.ft-typography--
|
|
261
|
-
font-family: ${
|
|
262
|
-
font-size: ${
|
|
263
|
-
font-weight: ${
|
|
264
|
-
letter-spacing: ${
|
|
265
|
-
line-height: ${
|
|
266
|
-
text-transform: ${
|
|
252
|
+
.ft-typography--subtitle1 {
|
|
253
|
+
font-family: ${Ee};
|
|
254
|
+
font-size: ${Re};
|
|
255
|
+
font-weight: ${Me};
|
|
256
|
+
letter-spacing: ${je};
|
|
257
|
+
line-height: ${Ue};
|
|
258
|
+
text-transform: ${Fe};
|
|
267
259
|
}
|
|
268
|
-
|
|
269
260
|
`,ki=x`
|
|
270
|
-
.ft-typography--
|
|
271
|
-
font-family: ${
|
|
272
|
-
font-size: ${
|
|
273
|
-
font-weight: ${
|
|
274
|
-
letter-spacing: ${
|
|
275
|
-
line-height: ${
|
|
276
|
-
text-transform: ${
|
|
261
|
+
.ft-typography--subtitle2 {
|
|
262
|
+
font-family: ${ze};
|
|
263
|
+
font-size: ${Ae};
|
|
264
|
+
font-weight: ${Be};
|
|
265
|
+
letter-spacing: ${Le};
|
|
266
|
+
line-height: ${Te};
|
|
267
|
+
text-transform: ${Pe};
|
|
277
268
|
}
|
|
269
|
+
|
|
278
270
|
`,Ni=x`
|
|
279
|
-
.ft-typography--
|
|
280
|
-
font-family: ${
|
|
281
|
-
font-size: ${
|
|
282
|
-
font-weight: ${
|
|
283
|
-
letter-spacing: ${
|
|
284
|
-
line-height: ${
|
|
285
|
-
text-transform: ${
|
|
271
|
+
.ft-typography--body1 {
|
|
272
|
+
font-family: ${De};
|
|
273
|
+
font-size: ${_e};
|
|
274
|
+
font-weight: ${Ie};
|
|
275
|
+
letter-spacing: ${We};
|
|
276
|
+
line-height: ${He};
|
|
277
|
+
text-transform: ${Ke};
|
|
286
278
|
}
|
|
287
279
|
`,Ci=x`
|
|
288
|
-
.ft-typography--
|
|
289
|
-
font-family: ${
|
|
290
|
-
font-size: ${
|
|
291
|
-
font-weight: ${
|
|
292
|
-
letter-spacing: ${
|
|
293
|
-
line-height: ${
|
|
294
|
-
text-transform: ${
|
|
280
|
+
.ft-typography--body2 {
|
|
281
|
+
font-family: ${Ze};
|
|
282
|
+
font-size: ${Ve};
|
|
283
|
+
font-weight: ${Je};
|
|
284
|
+
letter-spacing: ${qe};
|
|
285
|
+
line-height: ${Xe};
|
|
286
|
+
text-transform: ${Ye};
|
|
295
287
|
}
|
|
296
288
|
`,Ei=x`
|
|
297
|
-
.ft-typography--
|
|
298
|
-
font-family: ${
|
|
299
|
-
font-size: ${
|
|
300
|
-
font-weight: ${
|
|
301
|
-
letter-spacing: ${
|
|
302
|
-
line-height: ${
|
|
303
|
-
text-transform: ${
|
|
289
|
+
.ft-typography--caption {
|
|
290
|
+
font-family: ${Ge};
|
|
291
|
+
font-size: ${Qe};
|
|
292
|
+
font-weight: ${ti};
|
|
293
|
+
letter-spacing: ${ei};
|
|
294
|
+
line-height: ${ii};
|
|
295
|
+
text-transform: ${oi};
|
|
304
296
|
}
|
|
305
297
|
`,Ri=x`
|
|
306
|
-
.ft-typography--
|
|
307
|
-
font-family: ${
|
|
308
|
-
font-size: ${
|
|
309
|
-
font-weight: ${
|
|
310
|
-
letter-spacing: ${
|
|
311
|
-
line-height: ${
|
|
312
|
-
text-transform: ${
|
|
298
|
+
.ft-typography--breadcrumb {
|
|
299
|
+
font-family: ${si};
|
|
300
|
+
font-size: ${ri};
|
|
301
|
+
font-weight: ${ni};
|
|
302
|
+
letter-spacing: ${ai};
|
|
303
|
+
line-height: ${li};
|
|
304
|
+
text-transform: ${hi};
|
|
313
305
|
}
|
|
314
306
|
`,Mi=x`
|
|
315
|
-
.ft-typography--
|
|
316
|
-
font-family: ${
|
|
317
|
-
font-size: ${
|
|
318
|
-
font-weight: ${
|
|
319
|
-
letter-spacing: ${
|
|
320
|
-
line-height: ${
|
|
321
|
-
text-transform: ${
|
|
307
|
+
.ft-typography--overline {
|
|
308
|
+
font-family: ${ci};
|
|
309
|
+
font-size: ${pi};
|
|
310
|
+
font-weight: ${fi};
|
|
311
|
+
letter-spacing: ${di};
|
|
312
|
+
line-height: ${ui};
|
|
313
|
+
text-transform: ${vi};
|
|
322
314
|
}
|
|
323
315
|
`,ji=x`
|
|
316
|
+
.ft-typography--button {
|
|
317
|
+
font-family: ${yi};
|
|
318
|
+
font-size: ${xi};
|
|
319
|
+
font-weight: ${bi};
|
|
320
|
+
letter-spacing: ${gi};
|
|
321
|
+
line-height: ${mi};
|
|
322
|
+
text-transform: ${wi};
|
|
323
|
+
}
|
|
324
|
+
`,Ui=x`
|
|
324
325
|
.ft-typography {
|
|
325
326
|
vertical-align: inherit;
|
|
326
327
|
}
|
|
327
|
-
`;var
|
|
328
|
-
<${
|
|
328
|
+
`;var Fi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class zi extends Nt{constructor(){super(...arguments),this.variant=fe.body1}render(){return this.element?pe`
|
|
329
|
+
<${he(this.element)}
|
|
329
330
|
class="ft-typography ft-typography--${this.variant}">
|
|
330
331
|
<slot></slot>
|
|
331
|
-
</${
|
|
332
|
-
`:
|
|
332
|
+
</${he(this.element)}>
|
|
333
|
+
`:pe`
|
|
333
334
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
334
|
-
`}}
|
|
335
|
+
`}}zi.styles=[$i,Oi,Si,ki,Ni,Ci,Ei,Ri,Mi,ji,Ui],Fi([o()],zi.prototype,"element",void 0),Fi([o()],zi.prototype,"variant",void 0),c("ft-typography")(zi);
|
|
335
336
|
/**
|
|
336
337
|
* @license
|
|
337
338
|
* Copyright 2017 Google LLC
|
|
338
339
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
339
340
|
*/
|
|
340
|
-
class
|
|
341
|
+
class Ai extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===G||null==t)return this.ft=void 0,this.et=t;if(t===Y)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Ai.directiveName="unsafeHTML",Ai.resultType=1;const Bi=Ft(Ai);var Li,Ti;!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=""}(Li||(Li={})),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=""}(Ti||(Ti={})),new Map([...["abw"].map((t=>[t,Ti.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,Ti.AUDIO])),...["avi"].map((t=>[t,Ti.AVI])),...["chm","xhs"].map((t=>[t,Ti.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,Ti.CODE])),...["csv"].map((t=>[t,Ti.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ti.DITA])),...["epub"].map((t=>[t,Ti.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ti.EXCEL])),...["flac"].map((t=>[t,Ti.FLAC])),...["gif"].map((t=>[t,Ti.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ti.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ti.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,Ti.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ti.JPEG])),...["json"].map((t=>[t,Ti.JSON])),...["m4a","m4p"].map((t=>[t,Ti.M4A])),...["mov","qt"].map((t=>[t,Ti.MOV])),...["mp3"].map((t=>[t,Ti.MP3])),...["mp4","m4v"].map((t=>[t,Ti.MP4])),...["ogg","oga"].map((t=>[t,Ti.OGG])),...["pdf","ps"].map((t=>[t,Ti.PDF])),...["png"].map((t=>[t,Ti.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ti.POWERPOINT])),...["rar"].map((t=>[t,Ti.RAR])),...["stp"].map((t=>[t,Ti.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ti.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,Ti.VIDEO])),...["wav"].map((t=>[t,Ti.WAV])),...["wma"].map((t=>[t,Ti.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ti.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ti.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ti.YAML])),...["zip"].map((t=>[t,Ti.ZIP]))]);const Pi=bt.create("--ft-icon-font-size","SIZE","24px"),Di=bt.extend("--ft-icon-fluid-topics-font-family",bt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),_i=bt.extend("--ft-icon-file-format-font-family",bt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Ii=bt.extend("--ft-icon-material-font-family",bt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Wi=bt.create("--ft-icon-vertical-align","UNKNOWN","unset"),Hi=x`
|
|
341
342
|
:host, i.ft-icon {
|
|
342
343
|
display: inline-flex;
|
|
343
344
|
align-items: center;
|
|
@@ -346,14 +347,14 @@ class zi extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error
|
|
|
346
347
|
}
|
|
347
348
|
|
|
348
349
|
:host {
|
|
349
|
-
width: ${
|
|
350
|
-
height: ${
|
|
350
|
+
width: ${Pi};
|
|
351
|
+
height: ${Pi};
|
|
351
352
|
}
|
|
352
353
|
|
|
353
354
|
i.ft-icon {
|
|
354
355
|
width: 100%;
|
|
355
356
|
height: 100%;
|
|
356
|
-
font-size: ${
|
|
357
|
+
font-size: ${Pi};
|
|
357
358
|
line-height: 1;
|
|
358
359
|
font-weight: normal;
|
|
359
360
|
text-transform: none;
|
|
@@ -364,36 +365,37 @@ class zi extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error
|
|
|
364
365
|
text-rendering: auto;
|
|
365
366
|
-webkit-font-smoothing: antialiased;
|
|
366
367
|
-moz-osx-font-smoothing: grayscale;
|
|
367
|
-
vertical-align: ${
|
|
368
|
+
vertical-align: ${Wi};
|
|
368
369
|
}
|
|
369
370
|
|
|
370
371
|
i.ft-icon.ft-icon--fluid-topics {
|
|
371
|
-
font-family: ${
|
|
372
|
+
font-family: ${Di}, ft-icons, fticons, sans-serif;
|
|
372
373
|
|
|
373
374
|
/* Ugly fix because font is broken */
|
|
374
|
-
font-size: calc(0.75 * ${
|
|
375
|
+
font-size: calc(0.75 * ${Pi});
|
|
376
|
+
line-height: ${Pi};
|
|
375
377
|
position: relative;
|
|
376
378
|
top: -4%;
|
|
377
379
|
justify-content: center;
|
|
378
380
|
}
|
|
379
381
|
|
|
380
382
|
.ft-icon--file-format {
|
|
381
|
-
font-family: ${
|
|
383
|
+
font-family: ${_i}, ft-mime, sans-serif;
|
|
382
384
|
}
|
|
383
385
|
|
|
384
386
|
.ft-icon--material {
|
|
385
|
-
font-family: ${
|
|
387
|
+
font-family: ${Ii}, "Material Icons", sans-serif;
|
|
386
388
|
}
|
|
387
|
-
`;var
|
|
388
|
-
<i class="ft-icon
|
|
389
|
-
${
|
|
389
|
+
`;var Ki;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ki||(Ki={}));var Zi,Vi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ji extends Nt{constructor(){super(...arguments),this.resolvedIcon=G}render(){const t=this.variant&&Object.values(Ki).includes(this.variant)?this.variant:Ki.fluid_topics,e=t!==Ki.material||!!this.value;return X`
|
|
390
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
391
|
+
${Bi(this.resolvedIcon)}
|
|
390
392
|
<slot ?hidden=${e}></slot>
|
|
391
393
|
</i>
|
|
392
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
394
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Ki.file_format:this.resolvedIcon=null!==(t=Ti[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Ki.material:this.resolvedIcon=this.value||G;break;default:this.resolvedIcon=null!==(e=Li[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ji.elementDefinitions={},Ji.styles=Hi,Vi([o()],Ji.prototype,"variant",void 0),Vi([o()],Ji.prototype,"value",void 0),Vi([s()],Ji.prototype,"resolvedIcon",void 0),Vi([n("slot")],Ji.prototype,"slottedContent",void 0),c("ft-icon")(Ji),t.FtTabsAlignment=void 0,(Zi=t.FtTabsAlignment||(t.FtTabsAlignment={})).left="left",Zi.right="right",Zi.justify="justify";const qi={colorSurface:bt.external(gt.colorSurface,"Design system"),colorPrimary:bt.external(gt.colorPrimary,"Design system"),colorOnSurfaceMedium:bt.external(gt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:bt.external(gt.colorOnSurfaceDisabled,"Design system")},Xi=x`
|
|
393
395
|
.ft-tabs {
|
|
394
396
|
display: flex;
|
|
395
397
|
flex-direction: column;
|
|
396
|
-
background-color: ${
|
|
398
|
+
background-color: ${qi.colorSurface};
|
|
397
399
|
height: 100%;
|
|
398
400
|
}
|
|
399
401
|
|
|
@@ -433,15 +435,15 @@ class zi extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error
|
|
|
433
435
|
outline: none;
|
|
434
436
|
font-size: 16px;
|
|
435
437
|
line-height: 1;
|
|
436
|
-
color: ${
|
|
438
|
+
color: ${qi.colorOnSurfaceMedium};
|
|
437
439
|
}
|
|
438
440
|
|
|
439
441
|
[role='tab'][aria-selected='true'] {
|
|
440
|
-
color: ${
|
|
442
|
+
color: ${qi.colorPrimary};
|
|
441
443
|
}
|
|
442
444
|
|
|
443
445
|
[role='tab'][disabled] {
|
|
444
|
-
color: ${
|
|
446
|
+
color: ${qi.colorOnSurfaceDisabled};
|
|
445
447
|
}
|
|
446
448
|
|
|
447
449
|
.ft-tabs--align-justify [role='tab'],
|
|
@@ -473,7 +475,7 @@ class zi extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error
|
|
|
473
475
|
position: absolute;
|
|
474
476
|
height: 3px;
|
|
475
477
|
border-radius: 2px;
|
|
476
|
-
background-color: ${
|
|
478
|
+
background-color: ${qi.colorPrimary};
|
|
477
479
|
transition: width 200ms ease, left 200ms ease, top 200ms ease;
|
|
478
480
|
}
|
|
479
481
|
|
|
@@ -482,7 +484,7 @@ class zi extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error
|
|
|
482
484
|
flex-grow: 1;
|
|
483
485
|
overflow: auto;
|
|
484
486
|
}
|
|
485
|
-
`,
|
|
487
|
+
`,Yi=bt.create("--ft-tooltip-distance","SIZE","4px"),Gi=bt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Qi=bt.create("--ft-tooltip-background-color","COLOR","#666666"),to=bt.create("--ft-tooltip-z-index","NUMBER","1"),eo=bt.external(gt.borderRadiusS,"Design system"),io=bt.create("--ft-tooltip-max-width","SIZE","150px"),oo=x`
|
|
486
488
|
.ft-tooltip--container {
|
|
487
489
|
display: block;
|
|
488
490
|
position: relative;
|
|
@@ -498,23 +500,23 @@ class zi extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error
|
|
|
498
500
|
box-sizing: border-box;
|
|
499
501
|
overflow: hidden;
|
|
500
502
|
width: max-content;
|
|
501
|
-
max-width: ${
|
|
503
|
+
max-width: ${io};
|
|
502
504
|
text-align: center;
|
|
503
|
-
padding: ${
|
|
504
|
-
z-index: ${
|
|
505
|
+
padding: ${Yi};
|
|
506
|
+
z-index: ${to};
|
|
505
507
|
}
|
|
506
508
|
|
|
507
509
|
.ft-tooltip--content {
|
|
508
510
|
padding: 4px 8px;
|
|
509
|
-
border-radius: ${
|
|
510
|
-
background-color: ${
|
|
511
|
-
color: ${
|
|
511
|
+
border-radius: ${eo};
|
|
512
|
+
background-color: ${Qi};
|
|
513
|
+
color: ${Gi};
|
|
512
514
|
top: -500px;
|
|
513
515
|
left: -500px;
|
|
514
516
|
position: relative;
|
|
515
517
|
word-break: break-word;
|
|
516
518
|
}
|
|
517
|
-
`;var
|
|
519
|
+
`;var so=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ro extends Nt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return X`
|
|
518
520
|
<div part="container"
|
|
519
521
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
520
522
|
@mouseenter=${this.onHover}
|
|
@@ -532,13 +534,13 @@ class zi extends zt{constructor(t){if(super(t),this.et=G,t.type!==Ut)throw Error
|
|
|
532
534
|
</div>
|
|
533
535
|
</div>
|
|
534
536
|
</div>
|
|
535
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${
|
|
537
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${io})`}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())}}ro.elementDefinitions={"ft-typography":zi},ro.styles=oo,so([o()],ro.prototype,"text",void 0),so([o({type:Boolean})],ro.prototype,"manual",void 0),so([o({type:Boolean})],ro.prototype,"inline",void 0),so([o({type:Number})],ro.prototype,"delay",void 0),so([o()],ro.prototype,"position",void 0),so([
|
|
536
538
|
/**
|
|
537
539
|
* @license
|
|
538
540
|
* Copyright 2017 Google LLC
|
|
539
541
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
540
542
|
*/
|
|
541
|
-
function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const s="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(s),n=null!=r?l(r,t):[];return i?n.filter((t=>t.matches(i))):n},enumerable:!0,configurable:!0})})}({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
543
|
+
function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const s="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(s),n=null!=r?l(r,t):[];return i?n.filter((t=>t.matches(i))):n},enumerable:!0,configurable:!0})})}({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],ro.prototype,"slotNodes",void 0),so([n(".ft-tooltip--container")],ro.prototype,"container",void 0),so([n("slot")],ro.prototype,"target",void 0),so([n(".ft-tooltip")],ro.prototype,"tooltip",void 0),so([n(".ft-tooltip--content")],ro.prototype,"tooltipContent",void 0),so([s()],ro.prototype,"visible",void 0),c("ft-tooltip")(ro);var no=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ao extends CustomEvent{constructor(t){super("index-change",{detail:t})}}class lo extends Nt{constructor(){super(...arguments),this.dense=!1,this.contentBefore=!1,this.alignTabs=t.FtTabsAlignment.justify,this.ftTabs=[],this.activeIndex=0,this.updateDebouncer=new e(20),this.scheduleRequestUpdate=()=>this.updateDebouncer.run((()=>{this.requestUpdate()})),this.resizeObserver=new ResizeObserver((()=>this.placeIndicator()))}render(){var t;const e={"ft-tabs":!0,"ft-tabs--reverse":this.contentBefore,"ft-tabs--dense":this.dense},i=null===(t=this.ftTabs[this.activeIndex])||void 0===t?void 0:t.color;return X`
|
|
542
544
|
<div class="${Wt(e)}" part="container">
|
|
543
545
|
<div class="ft-tabs--align-${this.alignTabs}" role="tablist" part="tablist">
|
|
544
546
|
${It(this.ftTabs,((t,e)=>this.addTooltipIfNecessary(t,X`
|
|
@@ -564,7 +566,7 @@ function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},
|
|
|
564
566
|
</ft-icon>
|
|
565
567
|
<ft-typography class="ft-tabs--tab-label"
|
|
566
568
|
part="tab-label${t.active?" active-tab-label":""}"
|
|
567
|
-
variant="${
|
|
569
|
+
variant="${fe.body2}">
|
|
568
570
|
${t.label}
|
|
569
571
|
</ft-typography>
|
|
570
572
|
</button>
|
|
@@ -578,11 +580,11 @@ function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},
|
|
|
578
580
|
<slot @slotchange=${this.onContentChange}></slot>
|
|
579
581
|
</div>
|
|
580
582
|
</div>
|
|
581
|
-
`}onContentChange(t){const e=t.composedPath()[0];this.ftTabs=e.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
|
|
583
|
+
`}onContentChange(t){const e=t.composedPath()[0];this.ftTabs=e.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 ao(this.activeIndex))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.tabsContainer&&this.resizeObserver.observe(this.tabsContainer),this.placeIndicator()}placeIndicator(){var t,e,i,o,s,r,n;if(this.activeTabIndicator){const a=null!==(e=null===(t=this.activeTab)||void 0===t?void 0:t.closest(".ft-tabs--tab-tooltip"))&&void 0!==e?e:this.activeTab;this.activeTabIndicator.style.width=(null!==(i=null==a?void 0:a.clientWidth)&&void 0!==i?i:0)+"px",this.activeTabIndicator.style.left=(null!==(o=null==a?void 0:a.offsetLeft)&&void 0!==o?o:0)+"px",this.contentBefore?this.activeTabIndicator.style.top=(null!==(s=null==a?void 0:a.offsetTop)&&void 0!==s?s:0)+"px":this.activeTabIndicator.style.top=(null!==(r=null==a?void 0:a.offsetTop)&&void 0!==r?r:0)+(null!==(n=null==a?void 0:a.clientHeight)&&void 0!==n?n:0)-this.activeTabIndicator.clientHeight+"px"}}updateTabs(){this.ftTabs.forEach(((t,e)=>{t.active=e==this.activeIndex}))}addTooltipIfNecessary(t,e){return this.dense&&t.label&&t.icon?X`
|
|
582
584
|
<ft-tooltip class="ft-tabs--tab-tooltip"
|
|
583
585
|
part="tab-tooltip"
|
|
584
586
|
text="${t.label}"
|
|
585
587
|
position="${this.contentBefore?"top":"bottom"}">
|
|
586
588
|
${e}
|
|
587
589
|
</ft-tooltip>
|
|
588
|
-
`:e}}
|
|
590
|
+
`:e}}lo.elementDefinitions={"ft-tab":Mt,"ft-ripple":ne,"ft-tooltip":ro,"ft-typography":zi,"ft-icon":Ji},lo.styles=Xi,no([o({type:Boolean})],lo.prototype,"dense",void 0),no([o({type:Boolean})],lo.prototype,"contentBefore",void 0),no([o()],lo.prototype,"alignTabs",void 0),no([s()],lo.prototype,"ftTabs",void 0),no([n("[role='tablist']")],lo.prototype,"tabsContainer",void 0),no([n("[aria-selected='true']")],lo.prototype,"activeTab",void 0),no([n(".ft-tabs--active-tab-indicator")],lo.prototype,"activeTabIndicator",void 0),no([o({type:Number,reflect:!0})],lo.prototype,"activeIndex",void 0);c("ft-tab")(Mt),c("ft-tabs")(lo),t.FtTab=Mt,t.FtTabCssVariables={},t.FtTabs=lo,t.FtTabsCssVariables=qi,t.IndexChangeEvent=ao,t.styles=Xi}({});
|