@fluid-topics/ft-in-product-help 1.1.0 → 1.1.2
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-in-product-help.min.js +216 -212
- package/package.json +3 -3
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,o=window.customElements.define,e=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=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,r){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(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let p=e.call(i,t);p||(p=h(t),o.call(i,t,p)),this===window.customElements&&(a.set(r,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),u(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),i.upgrade.apply(i,arguments),g.pop()}get(t){const o=this._definitionsByTag.get(t);return o?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const o=this._getDefinition(t);if(void 0!==o)return Promise.resolve(o.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,o,e){let i=this._awaitingUpgrade.get(o);i||this._awaitingUpgrade.set(o,i=new Set),e?i.add(t):i.delete(t)}},window.HTMLElement=function(){let o=l;if(o)return l=void 0,o;const e=a.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return o=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(o,this.constructor.prototype),r.set(o,e),o},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,p=t=>{let o=t.getRootNode();if(!c(o)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;o=t.getRootNode(),c(o)||(o=s.get(o)?.getRootNode()||document)}return o.customElements},h=o=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const i=p(e)||window.customElements,r=i._getDefinition(o);return r?u(e,r):n.set(e,i),e}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,o,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,o,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,o,e)=>{if(0===o.size||void 0===e)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(o.has(n)){const t=this.getAttribute(n);i.call(this,n,r),e.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(o.has(i)){const t=this.getAttribute(i);r.call(this,i),e.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(o.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const o=this.getAttribute(r);e.call(this,r,t,o)}else n.call(this,r,i)})},d=o=>{const e=Object.getPrototypeOf(o);if(e!==window.HTMLElement)return e===t?Object.setPrototypeOf(o,window.HTMLElement):d(e)},u=(t,o,e=!1)=>{Object.setPrototypeOf(t,o.elementClass.prototype),r.set(t,o),l=t;try{new o.elementClass}catch(t){d(o.elementClass),new o.elementClass}o.attributeChangedCallback&&o.observedAttributes.forEach((e=>{t.hasAttribute(e)&&o.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&o.connectedCallback&&t.isConnected&&o.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const o=y.apply(this,arguments);return t.customElements&&(o.customElements=t.customElements),o};let g=[document];const b=(t,o,e=void 0)=>{const i=(e?Object.getPrototypeOf(e):t.prototype)[o];t.prototype[o]=function(){g.push(this);const t=i.apply(e||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,o)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,o);Object.defineProperty(t.prototype,o,{...e,set(t){g.push(this),e.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,o=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const i=o.call(this,...e);return t.set(i,this),i},e.forEach((o=>{const e=window.ElementInternals.prototype,i=e[o];e[o]=function(...o){const e=t.get(this);if(!0===r.get(e).formAssociated)return i?.call(this,...o);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const o=new Map;t.forEach(((t,e)=>{const i=t.getAttribute("name"),r=o.get(i)||[];this[+e]=t,r.push(t),o.set(i,r)})),this.length=t.length,o.forEach(((t,o)=>{t&&(1===t.length?this[o]=t[0]:this[o]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),o=[];for(const e of t){const t=r.get(e);t&&!0!==t.formAssociated||o.push(e)}return new n(o)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,o=window.customElements.define,e=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=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,r){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(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let p=e.call(i,t);p||(p=h(t),o.call(i,t,p)),this===window.customElements&&(a.set(r,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),u(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),i.upgrade.apply(i,arguments),g.pop()}get(t){const o=this._definitionsByTag.get(t);return o?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const o=this._getDefinition(t);if(void 0!==o)return Promise.resolve(o.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,o,e){let i=this._awaitingUpgrade.get(o);i||this._awaitingUpgrade.set(o,i=new Set),e?i.add(t):i.delete(t)}},window.HTMLElement=function(){let o=l;if(o)return l=void 0,o;const e=a.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return o=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(o,this.constructor.prototype),r.set(o,e),o},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,p=t=>{let o=t.getRootNode();if(!c(o)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;o=t.getRootNode(),c(o)||(o=s.get(o)?.getRootNode()||document)}return o.customElements},h=o=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const i=p(e)||window.customElements,r=i._getDefinition(o);return r?u(e,r):n.set(e,i),e}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,o,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,o,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,o,e)=>{if(0===o.size||void 0===e)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(o.has(n)){const t=this.getAttribute(n);i.call(this,n,r),e.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(o.has(i)){const t=this.getAttribute(i);r.call(this,i),e.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(o.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const o=this.getAttribute(r);e.call(this,r,t,o)}else n.call(this,r,i)})},d=o=>{const e=Object.getPrototypeOf(o);if(e!==window.HTMLElement)return e===t?Object.setPrototypeOf(o,window.HTMLElement):d(e)},u=(t,o,e=!1)=>{Object.setPrototypeOf(t,o.elementClass.prototype),r.set(t,o),l=t;try{new o.elementClass}catch(t){d(o.elementClass),new o.elementClass}o.attributeChangedCallback&&o.observedAttributes.forEach((e=>{t.hasAttribute(e)&&o.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&o.connectedCallback&&t.isConnected&&o.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const o=y.apply(this,arguments);return t.customElements&&(o.customElements=t.customElements),o};let g=[document];const b=(t,o,e=void 0)=>{const i=(e?Object.getPrototypeOf(e):t.prototype)[o];t.prototype[o]=function(){g.push(this);const t=i.apply(e||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,o)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,o);Object.defineProperty(t.prototype,o,{...e,set(t){g.push(this),e.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,o=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const i=o.call(this,...e);return t.set(i,this),i},e.forEach((o=>{const e=window.ElementInternals.prototype,i=e[o];e[o]=function(...o){const e=t.get(this);if(!0===r.get(e).formAssociated)return i?.call(this,...o);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const o=new Map;t.forEach(((t,e)=>{const i=t.getAttribute("name"),r=o.get(i)||[];this[+e]=t,r.push(t),o.set(i,r)})),this.length=t.length,o.forEach(((t,o)=>{t&&(1===t.length?this[o]=t[0]:this[o]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),o=[];for(const e of t){const t=r.get(e);t&&!0!==t.formAssociated||o.push(e)}return new n(o)}})}}try{window.customElements.define("custom-element",null)}catch(ji){const t=window.customElements.define;window.customElements.define=(o,e,i)=>{if(null!==e)try{t.bind(window.customElements)(o,e,i)}catch(t){console.info(o,e,i,t)}}}class o{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,o)=>{this.resolvePromise=t,this.rejectPromise=o}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,o;const e=[...this.callbacks];this.callbacks=[];const i=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(o=this.resolvePromise)&&void 0!==o?o:()=>null;this.clearPromise();for(let t of e)try{await t()}catch(t){return void i(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
@@ -82,7 +82,11 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2019 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
85
|
-
*/class Ro extends go{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Eo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),i=$o.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var Uo,Io=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};const ko=Symbol("constructorPrototype"),Wo=Symbol("constructorName"),Lo=Symbol("exportpartsDebouncer");class zo extends Ro{constructor(){super(),this[Uo]=new o(5),this[Wo]=this.constructor.name,this[ko]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Wo]&&Object.setPrototypeOf(this,this[ko])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Lo].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,i,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(r=null===(i=t.getAttribute("part"))||void 0===i?void 0:i.split(" "))&&void 0!==r?r:[],e=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...o,...e).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const p=[...c.values()].flatMap((t=>l.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}Uo=Lo,Io([C()],zo.prototype,"exportpartsPrefix",void 0),Io([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!U(t,o),...null!=o?o:{}})}([])],zo.prototype,"exportpartsPrefixes",void 0),Io([C()],zo.prototype,"customStylesheet",void 0);const Zo=bt`
|
|
85
|
+
*/class Ro extends go{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Eo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),i=$o.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var Uo,Io=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};const ko=Symbol("constructorPrototype"),Wo=Symbol("constructorName"),Lo=Symbol("exportpartsDebouncer");class zo extends Ro{constructor(){super(),this[Uo]=new o(5),this[Wo]=this.constructor.name,this[ko]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Wo]&&Object.setPrototypeOf(this,this[ko])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Lo].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,i,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(r=null===(i=t.getAttribute("part"))||void 0===i?void 0:i.split(" "))&&void 0!==r?r:[],e=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...o,...e).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const p=[...c.values()].flatMap((t=>l.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}Uo=Lo,Io([C()],zo.prototype,"exportpartsPrefix",void 0),Io([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!U(t,o),...null!=o?o:{}})}([])],zo.prototype,"exportpartsPrefixes",void 0),Io([C()],zo.prototype,"customStylesheet",void 0);const Zo=xo.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");bt`
|
|
86
|
+
.highlight-html-match {
|
|
87
|
+
background: ${Zo};
|
|
88
|
+
}
|
|
89
|
+
`;const Ko=bt`
|
|
86
90
|
.ft-no-text-select {
|
|
87
91
|
-webkit-touch-callout: none;
|
|
88
92
|
-webkit-user-select: none;
|
|
@@ -103,7 +107,7 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
103
107
|
-webkit-hyphens: auto;
|
|
104
108
|
hyphens: auto
|
|
105
109
|
}
|
|
106
|
-
`;const
|
|
110
|
+
`;const Fo=bt`
|
|
107
111
|
.ft-safari-ellipsis-fix {
|
|
108
112
|
margin-right: 0;
|
|
109
113
|
|
|
@@ -114,29 +118,29 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
114
118
|
display: inline-block;
|
|
115
119
|
width: 0;
|
|
116
120
|
}
|
|
117
|
-
`;window.ftReduxStores||(window.ftReduxStores={});const
|
|
121
|
+
`;window.ftReduxStores||(window.ftReduxStores={});const Bo=Symbol("elementInternals");var Mo,Do,Ao;const Po=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ao=null===(Do=null===(Mo=window.safari)||void 0===Mo?void 0:Mo.pushNotification)||void 0===Do?void 0:Do.toString())&&void 0!==Ao?Ao:"");var Ho;t.FtInProductHelpMode=void 0,(Ho=t.FtInProductHelpMode||(t.FtInProductHelpMode={})).STANDARD="standard",Ho.THEATER="theater",Ho.FULLSCREEN="fullscreen";class To extends CustomEvent{constructor(t,o){super("visibility-change",{detail:{opened:t,displayMode:o}})}}const jo={standardSizeWidth:xo.create("--ft-in-product-help-standard-width","","SIZE","400px"),standardSizeHeight:xo.create("--ft-in-product-help-standard-height","","SIZE","630px"),topPosition:xo.create("--ft-in-product-help-top","","SIZE","unset"),rightPosition:xo.create("--ft-in-product-help-right","","SIZE","1rem"),bottomPosition:xo.create("--ft-in-product-help-bottom","","SIZE","1rem"),leftPosition:xo.create("--ft-in-product-help-left","","SIZE","unset"),zIndex:xo.create("--ft-in-product-help-zindex","","NUMBER","10"),theaterSizeWidth:xo.create("--ft-in-product-help-theater-width","","SIZE","90%"),theaterSizeHeight:xo.create("--ft-in-product-help-theater-height","","SIZE","60%"),fullscreenSizeWidth:xo.create("--ft-in-product-help-fullscreen-width","","SIZE","100%"),fullscreenSizeHeight:xo.create("--ft-in-product-help-fullscreen-height","","SIZE","100%"),borderStyle:xo.create("--ft-in-product-help-border-style","","BORDER-STYLE","solid"),borderWidth:xo.create("--ft-in-product-help-border-width","","SIZE","0"),borderColor:xo.extend("--ft-in-product-help-border-color","",Co.colorPrimary),borderRadius:xo.extend("--ft-in-product-help-border-radius","",Co.borderRadiusM),shadow:xo.extend("--ft-in-product-help-shadow","",Co.elevation02),topBarHeight:xo.create("--ft-in-product-help-top-bar-height","","SIZE","28px"),iconColor:xo.extend("--ft-in-product-help-icon-color","",Co.colorOnSurface),iconGap:xo.create("--ft-in-product-help-icon-gap","","SIZE","8px"),tabletBreakpoint:xo.create("--ft-in-product-help-tablet-breakpoint","","SIZE","768px"),desktopBreakpoint:xo.create("--ft-in-product-help-desktop-breakpoint","","SIZE","1280px"),colorSurface:xo.external(Co.colorSurface,"Design system"),colorPrimary:xo.external(Co.colorPrimary,"Design system")},_o=bt`
|
|
118
122
|
.ft-in-product-help {
|
|
119
123
|
display: none;
|
|
120
124
|
position: fixed;
|
|
121
|
-
width: ${
|
|
122
|
-
height: ${
|
|
123
|
-
top: ${
|
|
124
|
-
right: ${
|
|
125
|
-
bottom: ${
|
|
126
|
-
left: ${
|
|
127
|
-
z-index: ${
|
|
128
|
-
|
|
129
|
-
border-style: ${
|
|
130
|
-
border-width: ${
|
|
131
|
-
border-color: ${
|
|
132
|
-
border-radius: ${
|
|
133
|
-
box-shadow: ${
|
|
125
|
+
width: ${jo.standardSizeWidth};
|
|
126
|
+
height: ${jo.standardSizeHeight};
|
|
127
|
+
top: ${jo.topPosition};
|
|
128
|
+
right: ${jo.rightPosition};
|
|
129
|
+
bottom: ${jo.bottomPosition};
|
|
130
|
+
left: ${jo.leftPosition};
|
|
131
|
+
z-index: ${jo.zIndex};
|
|
132
|
+
|
|
133
|
+
border-style: ${jo.borderStyle};
|
|
134
|
+
border-width: ${jo.borderWidth};
|
|
135
|
+
border-color: ${jo.borderColor};
|
|
136
|
+
border-radius: ${jo.borderRadius};
|
|
137
|
+
box-shadow: ${jo.shadow};
|
|
134
138
|
overflow: hidden;
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
.ft-in-product-help.ft-in-product-help--theater {
|
|
138
|
-
width: ${
|
|
139
|
-
height: ${
|
|
142
|
+
width: ${jo.theaterSizeWidth};
|
|
143
|
+
height: ${jo.theaterSizeHeight};
|
|
140
144
|
}
|
|
141
145
|
|
|
142
146
|
.ft-in-product-help.ft-in-product-help--fullscreen {
|
|
@@ -152,15 +156,15 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
.ft-in-product-help--top-bar {
|
|
155
|
-
height: ${
|
|
156
|
-
background-color: ${
|
|
159
|
+
height: ${jo.topBarHeight};
|
|
160
|
+
background-color: ${jo.colorSurface};
|
|
157
161
|
display: flex;
|
|
158
162
|
justify-content: flex-end;
|
|
159
|
-
gap: ${
|
|
163
|
+
gap: ${jo.iconGap};
|
|
160
164
|
}
|
|
161
165
|
|
|
162
166
|
.ft-in-product-help--top-bar ft-button:not(.ft-in-product-help--active-mode) {
|
|
163
|
-
--ft-button-color: ${
|
|
167
|
+
--ft-button-color: ${jo.iconColor};
|
|
164
168
|
}
|
|
165
169
|
|
|
166
170
|
.ft-in-product-help--home-button {
|
|
@@ -169,7 +173,7 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
169
173
|
|
|
170
174
|
iframe {
|
|
171
175
|
width: 100%;
|
|
172
|
-
height: calc(100% - ${
|
|
176
|
+
height: calc(100% - ${jo.topBarHeight});
|
|
173
177
|
border: none;
|
|
174
178
|
}
|
|
175
179
|
`
|
|
@@ -177,12 +181,12 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
177
181
|
* @license
|
|
178
182
|
* Copyright 2017 Google LLC
|
|
179
183
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
180
|
-
*/,
|
|
184
|
+
*/,Go=1,Vo=2,Yo=t=>(...o)=>({_$litDirective$:t,values:o});let Jo=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e){this._$Ct=t,this._$AM=o,this._$Ci=e}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}},Xo=class extends Jo{constructor(t){if(super(t),this.et=q,t.type!==Vo)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this.vt=void 0,this.et=t;if(t===X)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const o=[t];return o.raw=o,this.vt={_$litType$:this.constructor.resultType,strings:o,values:[]}}};
|
|
181
185
|
/**
|
|
182
186
|
* @license
|
|
183
187
|
* Copyright 2017 Google LLC
|
|
184
188
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
185
|
-
*/
|
|
189
|
+
*/Xo.directiveName="unsafeHTML",Xo.resultType=1;const qo=Yo(Xo);var Qo,te;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Qo||(Qo={})),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=""}(te||(te={})),new Map([...["abw"].map((t=>[t,te.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,te.AUDIO])),...["avi"].map((t=>[t,te.AVI])),...["chm","xhs"].map((t=>[t,te.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,te.CODE])),...["csv"].map((t=>[t,te.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,te.DITA])),...["epub"].map((t=>[t,te.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,te.EXCEL])),...["flac"].map((t=>[t,te.FLAC])),...["gif"].map((t=>[t,te.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,te.GZIP])),...["html","htm","xhtml"].map((t=>[t,te.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,te.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,te.JPEG])),...["json"].map((t=>[t,te.JSON])),...["m4a","m4p"].map((t=>[t,te.M4A])),...["mov","qt"].map((t=>[t,te.MOV])),...["mp3"].map((t=>[t,te.MP3])),...["mp4","m4v"].map((t=>[t,te.MP4])),...["ogg","oga"].map((t=>[t,te.OGG])),...["pdf","ps"].map((t=>[t,te.PDF])),...["png"].map((t=>[t,te.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,te.POWERPOINT])),...["rar"].map((t=>[t,te.RAR])),...["stp"].map((t=>[t,te.STP])),...["txt","rtf","md","mdown"].map((t=>[t,te.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,te.VIDEO])),...["wav"].map((t=>[t,te.WAV])),...["wma"].map((t=>[t,te.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,te.WORD])),...["xml","xsl","rdf"].map((t=>[t,te.XML])),...["yaml","yml","x-yaml"].map((t=>[t,te.YAML])),...["zip"].map((t=>[t,te.ZIP]))]);const oe={size:xo.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:xo.extend("--ft-icon-fluid-topics-font-family","",xo.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:xo.extend("--ft-icon-file-format-font-family","",xo.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:xo.extend("--ft-icon-material-font-family","",xo.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:xo.create("--ft-icon-vertical-align","","UNKNOWN","unset")},ee=bt`
|
|
186
190
|
:host, i.ft-icon {
|
|
187
191
|
display: inline-flex;
|
|
188
192
|
align-items: center;
|
|
@@ -191,14 +195,14 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
:host {
|
|
194
|
-
width: ${
|
|
195
|
-
height: ${
|
|
198
|
+
width: ${oe.size};
|
|
199
|
+
height: ${oe.size};
|
|
196
200
|
}
|
|
197
201
|
|
|
198
202
|
i.ft-icon {
|
|
199
203
|
width: 100%;
|
|
200
204
|
height: 100%;
|
|
201
|
-
font-size: ${
|
|
205
|
+
font-size: ${oe.size};
|
|
202
206
|
line-height: 1;
|
|
203
207
|
font-weight: normal;
|
|
204
208
|
text-transform: none;
|
|
@@ -209,39 +213,39 @@ class go extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
209
213
|
text-rendering: auto;
|
|
210
214
|
-webkit-font-smoothing: antialiased;
|
|
211
215
|
-moz-osx-font-smoothing: grayscale;
|
|
212
|
-
vertical-align: ${
|
|
216
|
+
vertical-align: ${oe.verticalAlign};
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
i.ft-icon.ft-icon--fluid-topics {
|
|
216
|
-
font-family: ${
|
|
220
|
+
font-family: ${oe.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
217
221
|
|
|
218
222
|
/* Ugly fix because font is broken */
|
|
219
|
-
font-size: calc(0.75 * ${
|
|
220
|
-
line-height: ${
|
|
223
|
+
font-size: calc(0.75 * ${oe.size});
|
|
224
|
+
line-height: ${oe.size};
|
|
221
225
|
position: relative;
|
|
222
226
|
top: -4%;
|
|
223
227
|
justify-content: center;
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
.ft-icon--file-format {
|
|
227
|
-
font-family: ${
|
|
231
|
+
font-family: ${oe.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
.ft-icon--material {
|
|
231
|
-
font-family: ${
|
|
235
|
+
font-family: ${oe.materialFontFamily}, "Material Icons", sans-serif;
|
|
232
236
|
}
|
|
233
|
-
`;var
|
|
237
|
+
`;var ie;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ie||(ie={}));var re=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ne extends zo{constructor(){super(...arguments),this.resolvedIcon=oo}render(){const t=this.variant&&Object.values(ie).includes(this.variant)?this.variant:ie.fluid_topics,o=t!==ie.material||!!this.value;return Qt`
|
|
234
238
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
235
|
-
${
|
|
239
|
+
${qo(this.resolvedIcon)}
|
|
236
240
|
<slot ?hidden=${o}></slot>
|
|
237
241
|
</i>
|
|
238
|
-
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var t,o;let e=this.value||this.textContent;switch(this.variant){case
|
|
242
|
+
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var t,o;let e=this.value||this.textContent;switch(this.variant){case ie.file_format:this.resolvedIcon=null!==(t=te[e.replace("-","_").toUpperCase()])&&void 0!==t?t:e;break;case ie.material:this.resolvedIcon=this.value||oo;break;default:this.resolvedIcon=null!==(o=Qo[e.replace("-","_").toUpperCase()])&&void 0!==o?o:e}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}ne.elementDefinitions={},ne.styles=ee,re([C()],ne.prototype,"variant",void 0),re([C()],ne.prototype,"value",void 0),re([$()],ne.prototype,"resolvedIcon",void 0),re([R("slot")],ne.prototype,"slottedContent",void 0),I("ft-icon")(ne);
|
|
239
243
|
/**
|
|
240
244
|
* @license
|
|
241
245
|
* Copyright 2018 Google LLC
|
|
242
246
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
243
247
|
*/
|
|
244
|
-
const
|
|
248
|
+
const ae=Yo(class extends Jo{constructor(t){if(super(t),t.type!==Go||"class"!==t.name||t.strings?.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((o=>t[o])).join(" ")+" "}update(t,[o]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in o)o[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(o)}const e=t.element.classList;for(const t of this.it)t in o||(e.remove(t),this.it.delete(t));for(const t in o){const i=!!o[t];i===this.it.has(t)||this.st?.has(t)||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)))}return X}}),se=xo.extend("--ft-ripple-color","",Co.colorContent),le={color:se,backgroundColor:xo.extend("--ft-ripple-background-color","",se),opacityContentOnSurfacePressed:xo.external(Co.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xo.external(Co.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xo.external(Co.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xo.external(Co.opacityContentOnSurfaceSelected,"Design system"),borderRadius:xo.create("--ft-ripple-border-radius","","SIZE","0px")},ce=xo.extend("--ft-ripple-color","",Co.colorPrimary),pe=ce,he=xo.extend("--ft-ripple-background-color","",ce),fe=xo.extend("--ft-ripple-color","",Co.colorSecondary),de=fe,ue=xo.extend("--ft-ripple-background-color","",fe),ye=bt`
|
|
245
249
|
:host {
|
|
246
250
|
display: contents;
|
|
247
251
|
}
|
|
@@ -254,7 +258,7 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
254
258
|
|
|
255
259
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
256
260
|
overflow: hidden;
|
|
257
|
-
border-radius: ${
|
|
261
|
+
border-radius: ${le.borderRadius};
|
|
258
262
|
}
|
|
259
263
|
|
|
260
264
|
.ft-ripple .ft-ripple--background,
|
|
@@ -288,27 +292,27 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
288
292
|
}
|
|
289
293
|
|
|
290
294
|
.ft-ripple .ft-ripple--background {
|
|
291
|
-
background-color: ${
|
|
295
|
+
background-color: ${le.backgroundColor};
|
|
292
296
|
}
|
|
293
297
|
|
|
294
298
|
.ft-ripple .ft-ripple--effect {
|
|
295
|
-
background-color: ${
|
|
299
|
+
background-color: ${le.color};
|
|
296
300
|
}
|
|
297
301
|
|
|
298
302
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
299
|
-
background-color: ${
|
|
303
|
+
background-color: ${ue};
|
|
300
304
|
}
|
|
301
305
|
|
|
302
306
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
303
|
-
background-color: ${
|
|
307
|
+
background-color: ${de};
|
|
304
308
|
}
|
|
305
309
|
|
|
306
310
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
307
|
-
background-color: ${
|
|
311
|
+
background-color: ${he};
|
|
308
312
|
}
|
|
309
313
|
|
|
310
314
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
311
|
-
background-color: ${
|
|
315
|
+
background-color: ${pe};
|
|
312
316
|
}
|
|
313
317
|
|
|
314
318
|
.ft-ripple .ft-ripple--background {
|
|
@@ -338,117 +342,117 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
338
342
|
}
|
|
339
343
|
|
|
340
344
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
341
|
-
opacity: ${
|
|
345
|
+
opacity: ${le.opacityContentOnSurfaceHover};
|
|
342
346
|
}
|
|
343
347
|
|
|
344
348
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
345
|
-
opacity: ${
|
|
349
|
+
opacity: ${le.opacityContentOnSurfaceSelected};
|
|
346
350
|
}
|
|
347
351
|
|
|
348
352
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
349
|
-
opacity: ${
|
|
353
|
+
opacity: ${le.opacityContentOnSurfaceFocused};
|
|
350
354
|
}
|
|
351
355
|
|
|
352
356
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
353
|
-
opacity: ${
|
|
357
|
+
opacity: ${le.opacityContentOnSurfacePressed};
|
|
354
358
|
transform: translate(-50%, -50%) scale(1);
|
|
355
359
|
}
|
|
356
|
-
`;const
|
|
360
|
+
`;const ge=xo.extend("--ft-typography-font-family","",Co.titleFont),be=xo.extend("--ft-typography-font-family","",Co.contentFont),me={fontFamily:be,fontSize:xo.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:xo.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:xo.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:xo.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:xo.create("--ft-typography-text-transform","","UNKNOWN","inherit")},xe=xo.extend("--ft-typography-title-font-family","",ge),Oe=xo.extend("--ft-typography-title-font-size","",me.fontSize,"20px"),ve=xo.extend("--ft-typography-title-font-weight","",me.fontWeight,"normal"),Se=xo.extend("--ft-typography-title-letter-spacing","",me.letterSpacing,"0.15px"),Ne=xo.extend("--ft-typography-title-line-height","",me.lineHeight,"1.2"),we=xo.extend("--ft-typography-title-text-transform","",me.textTransform,"inherit"),Ce=xo.extend("--ft-typography-title-dense-font-family","",ge),$e=xo.extend("--ft-typography-title-dense-font-size","",me.fontSize,"14px"),Ee=xo.extend("--ft-typography-title-dense-font-weight","",me.fontWeight,"normal"),Re=xo.extend("--ft-typography-title-dense-letter-spacing","",me.letterSpacing,"0.105px"),Ue=xo.extend("--ft-typography-title-dense-line-height","",me.lineHeight,"1.7"),Ie=xo.extend("--ft-typography-title-dense-text-transform","",me.textTransform,"inherit"),ke=xo.extend("--ft-typography-subtitle1-font-family","",be),We=xo.extend("--ft-typography-subtitle1-font-size","",me.fontSize,"16px"),Le=xo.extend("--ft-typography-subtitle1-font-weight","",me.fontWeight,"600"),ze=xo.extend("--ft-typography-subtitle1-letter-spacing","",me.letterSpacing,"0.144px"),Ze=xo.extend("--ft-typography-subtitle1-line-height","",me.lineHeight,"1.5"),Ke=xo.extend("--ft-typography-subtitle1-text-transform","",me.textTransform,"inherit"),Fe=xo.extend("--ft-typography-subtitle2-font-family","",be),Be=xo.extend("--ft-typography-subtitle2-font-size","",me.fontSize,"14px"),Me=xo.extend("--ft-typography-subtitle2-font-weight","",me.fontWeight,"normal"),De=xo.extend("--ft-typography-subtitle2-letter-spacing","",me.letterSpacing,"0.098px"),Ae=xo.extend("--ft-typography-subtitle2-line-height","",me.lineHeight,"1.7"),Pe=xo.extend("--ft-typography-subtitle2-text-transform","",me.textTransform,"inherit"),He=xo.extend("--ft-typography-body1-font-family","",be),Te=xo.extend("--ft-typography-body1-font-size","",me.fontSize,"16px"),je=xo.extend("--ft-typography-body1-font-weight","",me.fontWeight,"normal"),_e=xo.extend("--ft-typography-body1-letter-spacing","",me.letterSpacing,"0.496px"),Ge=xo.extend("--ft-typography-body1-line-height","",me.lineHeight,"1.5"),Ve=xo.extend("--ft-typography-body1-text-transform","",me.textTransform,"inherit"),Ye=xo.extend("--ft-typography-body2-font-family","",be),Je=xo.extend("--ft-typography-body2-font-size","",me.fontSize,"14px"),Xe=xo.extend("--ft-typography-body2-font-weight","",me.fontWeight,"normal"),qe=xo.extend("--ft-typography-body2-letter-spacing","",me.letterSpacing,"0.252px"),Qe=xo.extend("--ft-typography-body2-line-height","",me.lineHeight,"1.4"),ti=xo.extend("--ft-typography-body2-text-transform","",me.textTransform,"inherit"),oi=xo.extend("--ft-typography-caption-font-family","",be),ei=xo.extend("--ft-typography-caption-font-size","",me.fontSize,"12px"),ii=xo.extend("--ft-typography-caption-font-weight","",me.fontWeight,"normal"),ri=xo.extend("--ft-typography-caption-letter-spacing","",me.letterSpacing,"0.396px"),ni=xo.extend("--ft-typography-caption-line-height","",me.lineHeight,"1.33"),ai=xo.extend("--ft-typography-caption-text-transform","",me.textTransform,"inherit"),si=xo.extend("--ft-typography-breadcrumb-font-family","",be),li=xo.extend("--ft-typography-breadcrumb-font-size","",me.fontSize,"10px"),ci=xo.extend("--ft-typography-breadcrumb-font-weight","",me.fontWeight,"normal"),pi=xo.extend("--ft-typography-breadcrumb-letter-spacing","",me.letterSpacing,"0.33px"),hi=xo.extend("--ft-typography-breadcrumb-line-height","",me.lineHeight,"1.6"),fi=xo.extend("--ft-typography-breadcrumb-text-transform","",me.textTransform,"inherit"),di=xo.extend("--ft-typography-overline-font-family","",be),ui=xo.extend("--ft-typography-overline-font-size","",me.fontSize,"10px"),yi=xo.extend("--ft-typography-overline-font-weight","",me.fontWeight,"normal"),gi=xo.extend("--ft-typography-overline-letter-spacing","",me.letterSpacing,"1.5px"),bi=xo.extend("--ft-typography-overline-line-height","",me.lineHeight,"1.6"),mi=xo.extend("--ft-typography-overline-text-transform","",me.textTransform,"uppercase"),xi={fontFamily:xo.extend("--ft-typography-button-font-family","",be),fontSize:xo.extend("--ft-typography-button-font-size","",me.fontSize,"14px"),fontWeight:xo.extend("--ft-typography-button-font-weight","",me.fontWeight,"600"),letterSpacing:xo.extend("--ft-typography-button-letter-spacing","",me.letterSpacing,"1.246px"),lineHeight:xo.extend("--ft-typography-button-line-height","",me.lineHeight,"1.15"),textTransform:xo.extend("--ft-typography-button-text-transform","",me.textTransform,"uppercase")},Oi=bt`
|
|
357
361
|
.ft-typography--title {
|
|
358
|
-
font-family: ${
|
|
359
|
-
font-size: ${
|
|
360
|
-
font-weight: ${
|
|
361
|
-
letter-spacing: ${
|
|
362
|
-
line-height: ${
|
|
363
|
-
text-transform: ${
|
|
364
|
-
}
|
|
365
|
-
`,Oi=bt`
|
|
366
|
-
.ft-typography--title-dense {
|
|
367
|
-
font-family: ${we};
|
|
368
|
-
font-size: ${Ce};
|
|
369
|
-
font-weight: ${$e};
|
|
370
|
-
letter-spacing: ${Ee};
|
|
371
|
-
line-height: ${Re};
|
|
372
|
-
text-transform: ${Ue};
|
|
362
|
+
font-family: ${xe};
|
|
363
|
+
font-size: ${Oe};
|
|
364
|
+
font-weight: ${ve};
|
|
365
|
+
letter-spacing: ${Se};
|
|
366
|
+
line-height: ${Ne};
|
|
367
|
+
text-transform: ${we};
|
|
373
368
|
}
|
|
374
369
|
`,vi=bt`
|
|
375
|
-
.ft-typography--
|
|
376
|
-
font-family: ${
|
|
377
|
-
font-size: ${
|
|
378
|
-
font-weight: ${
|
|
379
|
-
letter-spacing: ${
|
|
380
|
-
line-height: ${
|
|
381
|
-
text-transform: ${
|
|
370
|
+
.ft-typography--title-dense {
|
|
371
|
+
font-family: ${Ce};
|
|
372
|
+
font-size: ${$e};
|
|
373
|
+
font-weight: ${Ee};
|
|
374
|
+
letter-spacing: ${Re};
|
|
375
|
+
line-height: ${Ue};
|
|
376
|
+
text-transform: ${Ie};
|
|
382
377
|
}
|
|
383
378
|
`,Si=bt`
|
|
384
|
-
.ft-typography--
|
|
385
|
-
font-family: ${
|
|
386
|
-
font-size: ${
|
|
387
|
-
font-weight: ${
|
|
388
|
-
letter-spacing: ${
|
|
389
|
-
line-height: ${
|
|
390
|
-
text-transform: ${
|
|
379
|
+
.ft-typography--subtitle1 {
|
|
380
|
+
font-family: ${ke};
|
|
381
|
+
font-size: ${We};
|
|
382
|
+
font-weight: ${Le};
|
|
383
|
+
letter-spacing: ${ze};
|
|
384
|
+
line-height: ${Ze};
|
|
385
|
+
text-transform: ${Ke};
|
|
391
386
|
}
|
|
392
|
-
|
|
393
387
|
`,Ni=bt`
|
|
394
|
-
.ft-typography--
|
|
395
|
-
font-family: ${
|
|
396
|
-
font-size: ${
|
|
397
|
-
font-weight: ${
|
|
398
|
-
letter-spacing: ${
|
|
399
|
-
line-height: ${
|
|
400
|
-
text-transform: ${
|
|
388
|
+
.ft-typography--subtitle2 {
|
|
389
|
+
font-family: ${Fe};
|
|
390
|
+
font-size: ${Be};
|
|
391
|
+
font-weight: ${Me};
|
|
392
|
+
letter-spacing: ${De};
|
|
393
|
+
line-height: ${Ae};
|
|
394
|
+
text-transform: ${Pe};
|
|
401
395
|
}
|
|
396
|
+
|
|
402
397
|
`,wi=bt`
|
|
403
|
-
.ft-typography--
|
|
404
|
-
font-family: ${
|
|
405
|
-
font-size: ${
|
|
406
|
-
font-weight: ${
|
|
407
|
-
letter-spacing: ${
|
|
408
|
-
line-height: ${
|
|
409
|
-
text-transform: ${
|
|
398
|
+
.ft-typography--body1 {
|
|
399
|
+
font-family: ${He};
|
|
400
|
+
font-size: ${Te};
|
|
401
|
+
font-weight: ${je};
|
|
402
|
+
letter-spacing: ${_e};
|
|
403
|
+
line-height: ${Ge};
|
|
404
|
+
text-transform: ${Ve};
|
|
410
405
|
}
|
|
411
406
|
`,Ci=bt`
|
|
412
|
-
.ft-typography--
|
|
413
|
-
font-family: ${
|
|
414
|
-
font-size: ${
|
|
415
|
-
font-weight: ${
|
|
416
|
-
letter-spacing: ${
|
|
417
|
-
line-height: ${
|
|
418
|
-
text-transform: ${
|
|
407
|
+
.ft-typography--body2 {
|
|
408
|
+
font-family: ${Ye};
|
|
409
|
+
font-size: ${Je};
|
|
410
|
+
font-weight: ${Xe};
|
|
411
|
+
letter-spacing: ${qe};
|
|
412
|
+
line-height: ${Qe};
|
|
413
|
+
text-transform: ${ti};
|
|
419
414
|
}
|
|
420
415
|
`,$i=bt`
|
|
421
|
-
.ft-typography--
|
|
422
|
-
font-family: ${
|
|
423
|
-
font-size: ${
|
|
424
|
-
font-weight: ${
|
|
425
|
-
letter-spacing: ${
|
|
426
|
-
line-height: ${
|
|
427
|
-
text-transform: ${
|
|
416
|
+
.ft-typography--caption {
|
|
417
|
+
font-family: ${oi};
|
|
418
|
+
font-size: ${ei};
|
|
419
|
+
font-weight: ${ii};
|
|
420
|
+
letter-spacing: ${ri};
|
|
421
|
+
line-height: ${ni};
|
|
422
|
+
text-transform: ${ai};
|
|
428
423
|
}
|
|
429
424
|
`,Ei=bt`
|
|
430
|
-
.ft-typography--
|
|
431
|
-
font-family: ${
|
|
432
|
-
font-size: ${
|
|
433
|
-
font-weight: ${
|
|
434
|
-
letter-spacing: ${
|
|
435
|
-
line-height: ${
|
|
436
|
-
text-transform: ${
|
|
425
|
+
.ft-typography--breadcrumb {
|
|
426
|
+
font-family: ${si};
|
|
427
|
+
font-size: ${li};
|
|
428
|
+
font-weight: ${ci};
|
|
429
|
+
letter-spacing: ${pi};
|
|
430
|
+
line-height: ${hi};
|
|
431
|
+
text-transform: ${fi};
|
|
437
432
|
}
|
|
438
433
|
`,Ri=bt`
|
|
439
|
-
.ft-typography--
|
|
440
|
-
font-family: ${
|
|
441
|
-
font-size: ${
|
|
442
|
-
font-weight: ${
|
|
443
|
-
letter-spacing: ${
|
|
444
|
-
line-height: ${
|
|
445
|
-
text-transform: ${mi
|
|
434
|
+
.ft-typography--overline {
|
|
435
|
+
font-family: ${di};
|
|
436
|
+
font-size: ${ui};
|
|
437
|
+
font-weight: ${yi};
|
|
438
|
+
letter-spacing: ${gi};
|
|
439
|
+
line-height: ${bi};
|
|
440
|
+
text-transform: ${mi};
|
|
446
441
|
}
|
|
447
442
|
`,Ui=bt`
|
|
443
|
+
.ft-typography--button {
|
|
444
|
+
font-family: ${xi.fontFamily};
|
|
445
|
+
font-size: ${xi.fontSize};
|
|
446
|
+
font-weight: ${xi.fontWeight};
|
|
447
|
+
letter-spacing: ${xi.letterSpacing};
|
|
448
|
+
line-height: ${xi.lineHeight};
|
|
449
|
+
text-transform: ${xi.textTransform};
|
|
450
|
+
}
|
|
451
|
+
`,Ii=bt`
|
|
448
452
|
.ft-typography {
|
|
449
453
|
vertical-align: inherit;
|
|
450
454
|
}
|
|
451
|
-
`,
|
|
455
|
+
`,ki=[Object.keys(So).map((t=>function(t){const o=So[t];return bt`
|
|
452
456
|
.ft-typography--${gt(t)} {
|
|
453
457
|
font-family: ${o.fontFamily};
|
|
454
458
|
font-size: ${o.fontSize};
|
|
@@ -457,7 +461,7 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
457
461
|
line-height: ${o.lineHeight};
|
|
458
462
|
text-transform: ${o.textCase};
|
|
459
463
|
}
|
|
460
|
-
`}(t)))],
|
|
464
|
+
`}(t)))],Wi={color:xo.extend("--ft-loader-color","",Co.colorPrimary),size:xo.create("--ft-loader-size","","SIZE","80px")},Li=bt`
|
|
461
465
|
:host {
|
|
462
466
|
line-height: 0;
|
|
463
467
|
}
|
|
@@ -466,8 +470,8 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
466
470
|
display: inline-block;
|
|
467
471
|
position: relative;
|
|
468
472
|
|
|
469
|
-
width: ${
|
|
470
|
-
height: ${
|
|
473
|
+
width: ${Wi.size};
|
|
474
|
+
height: ${Wi.size};
|
|
471
475
|
}
|
|
472
476
|
|
|
473
477
|
.ft-loader div {
|
|
@@ -476,7 +480,7 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
476
480
|
width: 25%;
|
|
477
481
|
height: 25%;
|
|
478
482
|
border-radius: 50%;
|
|
479
|
-
background: ${
|
|
483
|
+
background: ${Wi.color};
|
|
480
484
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
481
485
|
}
|
|
482
486
|
|
|
@@ -523,10 +527,10 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
523
527
|
transform: translate(0, 0);
|
|
524
528
|
}
|
|
525
529
|
100% {
|
|
526
|
-
transform: translate(calc(0.35 * ${
|
|
530
|
+
transform: translate(calc(0.35 * ${Wi.size}), 0);
|
|
527
531
|
}
|
|
528
532
|
}
|
|
529
|
-
`,
|
|
533
|
+
`,zi=xo.extend("--ft-button-color","",Co.colorPrimary),Zi={backgroundColor:xo.extend("--ft-button-background-color","",Co.colorSurface),borderRadius:xo.extend("--ft-button-border-radius","",Co.borderRadiusL),color:zi,fontSize:xo.extend("--ft-button-font-size","",xi.fontSize),iconSize:xo.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:xo.extend("--ft-button-ripple-color","",zi),verticalPadding:xo.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:xo.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:xo.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:xo.external(Co.colorOpacityDisabled,"Design system")},Ki=xo.extend("--ft-button-primary-color","",xo.extend("--ft-button-color","",Co.colorOnPrimary)),Fi={backgroundColor:xo.extend("--ft-button-primary-background-color","",xo.extend("--ft-button-background-color","",Co.colorPrimary)),color:Ki,rippleColor:xo.extend("--ft-button-primary-ripple-color","",Ki)},Bi=xo.extend("--ft-button-dense-border-radius","",xo.extend("--ft-button-border-radius","",Co.borderRadiusM)),Mi=xo.create("--ft-button-dense-vertical-padding","","SIZE","2px"),Di=xo.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),Ai=xo.create("--ft-button-dense-icon-padding","","SIZE","4px"),Pi=[bt`
|
|
530
534
|
:host {
|
|
531
535
|
display: inline-block;
|
|
532
536
|
max-width: 100%;
|
|
@@ -537,7 +541,7 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
537
541
|
box-shadow: 0px 0px 0px transparent;
|
|
538
542
|
border: 0px solid transparent;
|
|
539
543
|
text-shadow: 0px 0px 0px transparent;
|
|
540
|
-
font-size: ${
|
|
544
|
+
font-size: ${Zi.fontSize};
|
|
541
545
|
}
|
|
542
546
|
|
|
543
547
|
button:hover {
|
|
@@ -566,31 +570,31 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
566
570
|
border: none;
|
|
567
571
|
pointer-events: auto;
|
|
568
572
|
|
|
569
|
-
--ft-button-internal-line-height: max(calc(${
|
|
570
|
-
--ft-button-internal-color: ${
|
|
571
|
-
${Oo(
|
|
572
|
-
${Oo(
|
|
573
|
+
--ft-button-internal-line-height: max(calc(${Zi.fontSize} + 2px), ${Zi.iconSize});
|
|
574
|
+
--ft-button-internal-color: ${Zi.color};
|
|
575
|
+
${Oo(oe.size,Zi.iconSize)};
|
|
576
|
+
${Oo(le.color,Zi.rippleColor)};
|
|
573
577
|
|
|
574
|
-
border-radius: ${
|
|
575
|
-
padding: ${
|
|
576
|
-
background-color: ${
|
|
578
|
+
border-radius: ${Zi.borderRadius};
|
|
579
|
+
padding: ${Zi.verticalPadding} ${Zi.horizontalPadding};
|
|
580
|
+
background-color: ${Zi.backgroundColor};
|
|
577
581
|
color: var(--ft-button-internal-color);
|
|
578
582
|
-webkit-mask-image: radial-gradient(white, black);
|
|
579
583
|
}
|
|
580
584
|
|
|
581
585
|
.ft-button.ft-button--outlined {
|
|
582
586
|
border: 1px solid var(--ft-button-internal-color);
|
|
583
|
-
padding: calc(${
|
|
587
|
+
padding: calc(${Zi.verticalPadding} - 1px) calc(${Zi.horizontalPadding} - 1px);
|
|
584
588
|
}
|
|
585
589
|
|
|
586
590
|
.ft-button.ft-button--dense {
|
|
587
|
-
padding: ${
|
|
588
|
-
border-radius: ${
|
|
589
|
-
gap: ${
|
|
591
|
+
padding: ${Mi} ${Di};
|
|
592
|
+
border-radius: ${Bi};
|
|
593
|
+
gap: ${Ai};
|
|
590
594
|
}
|
|
591
595
|
|
|
592
596
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
593
|
-
padding: calc(${
|
|
597
|
+
padding: calc(${Mi} - 1px) calc(${Di} - 1px);
|
|
594
598
|
}
|
|
595
599
|
|
|
596
600
|
.ft-button:not([disabled]):hover {
|
|
@@ -598,22 +602,22 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
598
602
|
}
|
|
599
603
|
|
|
600
604
|
.ft-button--round {
|
|
601
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
605
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Zi.verticalPadding});
|
|
602
606
|
}
|
|
603
607
|
|
|
604
608
|
.ft-button--round.ft-button--dense {
|
|
605
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
609
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Mi});
|
|
606
610
|
}
|
|
607
611
|
|
|
608
612
|
.ft-button[disabled] {
|
|
609
613
|
filter: grayscale(1);
|
|
610
|
-
opacity: ${
|
|
614
|
+
opacity: ${Zi.opacityDisabled};
|
|
611
615
|
}
|
|
612
616
|
|
|
613
617
|
.ft-button.ft-button--primary {
|
|
614
|
-
background-color: ${
|
|
615
|
-
--ft-button-internal-color: ${
|
|
616
|
-
${Oo(
|
|
618
|
+
background-color: ${Fi.backgroundColor};
|
|
619
|
+
--ft-button-internal-color: ${Fi.color};
|
|
620
|
+
${Oo(le.color,Fi.rippleColor)};
|
|
617
621
|
}
|
|
618
622
|
|
|
619
623
|
.ft-button:focus {
|
|
@@ -626,13 +630,13 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
626
630
|
white-space: nowrap;
|
|
627
631
|
text-overflow: ellipsis;
|
|
628
632
|
display: block;
|
|
629
|
-
margin: 0 ${
|
|
630
|
-
${Oo(
|
|
631
|
-
${Oo(
|
|
633
|
+
margin: 0 ${Zi.iconPadding};
|
|
634
|
+
${Oo(xi.fontSize,"1em")};
|
|
635
|
+
${Oo(xi.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
632
636
|
}
|
|
633
637
|
|
|
634
638
|
.ft-button--dense .ft-button--label {
|
|
635
|
-
margin: 0 ${
|
|
639
|
+
margin: 0 ${Ai};
|
|
636
640
|
}
|
|
637
641
|
|
|
638
642
|
.ft-button--label[hidden] {
|
|
@@ -645,13 +649,13 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
645
649
|
}
|
|
646
650
|
|
|
647
651
|
.ft-button--label[hidden] + ft-icon {
|
|
648
|
-
margin: 0 calc(${
|
|
649
|
-
padding: 0 ${
|
|
652
|
+
margin: 0 calc(${Zi.horizontalPadding} * -1);
|
|
653
|
+
padding: 0 ${Zi.verticalPadding};
|
|
650
654
|
}
|
|
651
655
|
|
|
652
656
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
653
|
-
margin: 0 calc(${
|
|
654
|
-
padding: 0 ${
|
|
657
|
+
margin: 0 calc(${Di} * -1);
|
|
658
|
+
padding: 0 ${Mi};
|
|
655
659
|
}
|
|
656
660
|
|
|
657
661
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -660,34 +664,34 @@ const ne=Vo(class extends Yo{constructor(t){if(super(t),t.type!==_o||"class"!==t
|
|
|
660
664
|
}
|
|
661
665
|
|
|
662
666
|
ft-loader {
|
|
663
|
-
${Oo(
|
|
664
|
-
${Oo(
|
|
667
|
+
${Oo(Wi.size,Zi.iconSize)};
|
|
668
|
+
${Oo(Wi.color,"var(--ft-button-internal-color)")};
|
|
665
669
|
}
|
|
666
|
-
`,
|
|
670
|
+
`,Ko];var Hi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Ti extends zo{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new o(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 o(10),this.moveRipple=t=>{var o,e;let{x:i,y:r}=this.getCoordinates(t),n=null!==(e=null===(o=this.ripple)||void 0===o?void 0:o.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=i?i-n.x:n.width/2),this.originY=Math.round(null!=r?r-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.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return Qt`
|
|
667
671
|
<style>
|
|
668
672
|
.ft-ripple .ft-ripple--effect {
|
|
669
673
|
left: ${this.originX}px;
|
|
670
674
|
top: ${this.originY}px;
|
|
671
675
|
}
|
|
672
676
|
</style>
|
|
673
|
-
<div class="${
|
|
677
|
+
<div class="${ae(t)}">
|
|
674
678
|
<div class="ft-ripple--background"></div>
|
|
675
679
|
<div class="ft-ripple--effect"></div>
|
|
676
680
|
</div>
|
|
677
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var o,e;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(o=this.target)||void 0===o||o.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,o;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(o=this.target)&&void 0!==o?o:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const o=(...t)=>o=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(o)},e=o("mouseup","contextmenu"),i=o("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&o("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),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",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),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 o=t,e=t;let i,r;return null!=o.x?({x:i,y:r}=o):null!=e.touches&&(i=e.touches[0].clientX,r=e.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let o of t.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}
|
|
681
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var o,e;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(o=this.target)||void 0===o||o.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,o;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(o=this.target)&&void 0!==o?o:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const o=(...t)=>o=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(o)},e=o("mouseup","contextmenu"),i=o("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&o("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),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",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),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 o=t,e=t;let i,r;return null!=o.x?({x:i,y:r}=o):null!=e.touches&&(i=e.touches[0].clientX,r=e.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let o of t.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Ti.elementDefinitions={},Ti.styles=ye,Hi([C({type:Boolean})],Ti.prototype,"primary",void 0),Hi([C({type:Boolean})],Ti.prototype,"secondary",void 0),Hi([C({type:Boolean})],Ti.prototype,"unbounded",void 0),Hi([C({type:Boolean})],Ti.prototype,"activated",void 0),Hi([C({type:Boolean})],Ti.prototype,"selected",void 0),Hi([C({type:Boolean})],Ti.prototype,"disabled",void 0),Hi([$()],Ti.prototype,"hovered",void 0),Hi([$()],Ti.prototype,"focused",void 0),Hi([$()],Ti.prototype,"pressed",void 0),Hi([$()],Ti.prototype,"rippling",void 0),Hi([$()],Ti.prototype,"originX",void 0),Hi([$()],Ti.prototype,"originY",void 0),Hi([R(".ft-ripple")],Ti.prototype,"ripple",void 0),Hi([R(".ft-ripple--effect")],Ti.prototype,"rippleEffect",void 0),I("ft-ripple")(Ti);
|
|
678
682
|
/**
|
|
679
683
|
* @license
|
|
680
684
|
* Copyright 2020 Google LLC
|
|
681
685
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
682
686
|
*/
|
|
683
|
-
const
|
|
684
|
-
<${
|
|
687
|
+
const ji=Symbol.for(""),_i=t=>{if(t?.r===ji)return t?._$litStatic$},Gi=t=>({_$litStatic$:t,r:ji}),Vi=new Map,Yi=(t=>(o,...e)=>{const i=e.length;let r,n;const a=[],s=[];let l,c=0,p=!1;for(;c<i;){for(l=o[c];c<i&&void 0!==(n=e[c],r=_i(n));)l+=r+o[++c],p=!0;c!==i&&s.push(n),a.push(l),c++}if(c===i&&a.push(o[i]),p){const t=a.join("$$lit$$");void 0===(o=Vi.get(t))&&(a.raw=a,Vi.set(t,o=a)),e=s}return t(o,...e)})(J);var Ji;!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",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(Ji||(Ji={}));var Xi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class qi extends zo{constructor(){super(...arguments),this.variant=Ji.body1}render(){return this.element?Yi`
|
|
688
|
+
<${Gi(this.element)}
|
|
685
689
|
class="ft-typography ft-typography--${this.variant}">
|
|
686
690
|
<slot></slot>
|
|
687
|
-
</${
|
|
688
|
-
`:
|
|
691
|
+
</${Gi(this.element)}>
|
|
692
|
+
`:Yi`
|
|
689
693
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
690
|
-
`}}
|
|
694
|
+
`}}qi.styles=[Oi,vi,Si,Ni,wi,Ci,$i,Ei,Ri,Ui,Ii,...ki],Xi([C()],qi.prototype,"element",void 0),Xi([C()],qi.prototype,"variant",void 0),I("ft-typography")(qi);const Qi=xo.create("--ft-tooltip-distance","","SIZE","4px"),tr=xo.create("--ft-tooltip-color","","COLOR","#FFFFFF"),or=xo.create("--ft-tooltip-background-color","","COLOR","#666666"),er=xo.create("--ft-tooltip-z-index","","NUMBER","100"),ir=xo.external(Co.borderRadiusS,"Design system"),rr=xo.create("--ft-tooltip-max-width","","SIZE","150px"),nr=bt`
|
|
691
695
|
.ft-tooltip--container {
|
|
692
696
|
display: block;
|
|
693
697
|
}
|
|
@@ -702,21 +706,21 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
702
706
|
box-sizing: border-box;
|
|
703
707
|
overflow: hidden;
|
|
704
708
|
width: max-content;
|
|
705
|
-
max-width: ${
|
|
709
|
+
max-width: ${rr};
|
|
706
710
|
text-align: center;
|
|
707
|
-
padding: ${
|
|
708
|
-
z-index: ${
|
|
711
|
+
padding: ${Qi};
|
|
712
|
+
z-index: ${er};
|
|
709
713
|
}
|
|
710
714
|
|
|
711
715
|
.ft-tooltip--content {
|
|
712
716
|
padding: 4px 8px;
|
|
713
|
-
border-radius: ${
|
|
714
|
-
background-color: ${
|
|
715
|
-
color: ${
|
|
717
|
+
border-radius: ${ir};
|
|
718
|
+
background-color: ${or};
|
|
719
|
+
color: ${tr};
|
|
716
720
|
position: relative;
|
|
717
721
|
word-break: break-word;
|
|
718
722
|
}
|
|
719
|
-
`;var
|
|
723
|
+
`;var ar=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class sr extends zo{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 o,this.revealDebouncer=new o}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return Qt`
|
|
720
724
|
<div part="container"
|
|
721
725
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
722
726
|
@mouseenter=${this.onHover}
|
|
@@ -734,23 +738,23 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
734
738
|
</div>
|
|
735
739
|
</div>
|
|
736
740
|
</div>
|
|
737
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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 o=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,i=(t.offsetHeight-e)/2,r=(t.offsetWidth-o)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-e-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft-o-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,p=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,p))+"px";let h=-l.y,f=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(h,f))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${
|
|
741
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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 o=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,i=(t.offsetHeight-e)/2,r=(t.offsetWidth-o)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-e-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft-o-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,p=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,p))+"px";let h=-l.y,f=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(h,f))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${rr})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}sr.elementDefinitions={"ft-typography":qi},sr.styles=nr,ar([C()],sr.prototype,"text",void 0),ar([C({type:Boolean})],sr.prototype,"manual",void 0),ar([C({type:Boolean})],sr.prototype,"inline",void 0),ar([C({type:Number})],sr.prototype,"delay",void 0),ar([C()],sr.prototype,"position",void 0),ar([function(t){return(o,e)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const o=this.renderRoot?.querySelector(r);return o?.assignedNodes(t)??[]}})}}()],sr.prototype,"slotNodes",void 0),ar([R(".ft-tooltip--container")],sr.prototype,"container",void 0),ar([R(".ft-tooltip")],sr.prototype,"tooltip",void 0),ar([R(".ft-tooltip--content")],sr.prototype,"tooltipContent",void 0),ar([$()],sr.prototype,"visible",void 0),I("ft-tooltip")(sr);class lr extends zo{render(){return Qt`
|
|
738
742
|
<div class="ft-loader">
|
|
739
743
|
<div></div>
|
|
740
744
|
<div></div>
|
|
741
745
|
<div></div>
|
|
742
746
|
<div></div>
|
|
743
747
|
</div>
|
|
744
|
-
`}}
|
|
748
|
+
`}}lr.styles=Li,I("ft-loader")(lr);var cr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class pr extends(function(t,o){return class extends t{static get formAssociated(){return!0}get form(){return this[Bo].form}constructor(...t){super(t),this[Bo]=this.attachInternals(),this[Bo].role=o}setFormValue(t){this[Bo].setFormValue(t)}}}(zo,"button")){constructor(){super(...arguments),this.role="button",this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{var o;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(o=this.form)||void 0===o||o.requestSubmit())}}render(){return this.addTooltipIfNeeded(Qt`
|
|
745
749
|
<button part="button"
|
|
746
|
-
class="${
|
|
750
|
+
class="${ae(this.buttonClasses)}"
|
|
747
751
|
aria-label="${this.getLabel()}"
|
|
748
752
|
?disabled=${this.isDisabled()}>
|
|
749
753
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
750
754
|
<ft-typography part="label"
|
|
751
755
|
variant=${this.typographyVariant}
|
|
752
756
|
element="span"
|
|
753
|
-
class="ft-button--label ${
|
|
757
|
+
class="ft-button--label ${Po?"ft-safari-ellipsis-fix":""}"
|
|
754
758
|
?hidden=${!this.hasTextContent()}>
|
|
755
759
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
756
760
|
</ft-typography>
|
|
@@ -764,7 +768,7 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
764
768
|
</ft-tooltip>
|
|
765
769
|
`:t}resolveIcon(){return this.loading?Qt`
|
|
766
770
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?Qt`
|
|
767
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:oo}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
771
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:oo}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}pr.elementDefinitions={"ft-ripple":Ti,"ft-tooltip":sr,"ft-typography":qi,"ft-icon":ne,"ft-loader":lr},cr([C({type:String,reflect:!0})],pr.prototype,"role",void 0),cr([C()],pr.prototype,"type",void 0),cr([C({type:Boolean})],pr.prototype,"disabled",void 0),cr([C()],pr.prototype,"label",void 0),cr([C()],pr.prototype,"icon",void 0),cr([C()],pr.prototype,"iconVariant",void 0),cr([C({type:Boolean})],pr.prototype,"trailingIcon",void 0),cr([C({type:Boolean})],pr.prototype,"loading",void 0),cr([C()],pr.prototype,"tooltipPosition",void 0),cr([C({type:Boolean})],pr.prototype,"hideTooltip",void 0),cr([C({type:Boolean})],pr.prototype,"forceTooltip",void 0),cr([R(".ft-button")],pr.prototype,"button",void 0),cr([R(".ft-button--label slot")],pr.prototype,"slottedContent",void 0);var hr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class fr extends pr{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}fr.styles=[Fo,Pi],hr([C({type:Boolean})],fr.prototype,"primary",void 0),hr([C({type:Boolean})],fr.prototype,"outlined",void 0),hr([C({type:Boolean})],fr.prototype,"dense",void 0),hr([C({type:Boolean})],fr.prototype,"round",void 0);const dr=[bt`
|
|
768
772
|
:host {
|
|
769
773
|
display: inline-block;
|
|
770
774
|
max-width: 100%;
|
|
@@ -843,13 +847,13 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
843
847
|
/** Primary styles **/
|
|
844
848
|
|
|
845
849
|
.ft-button--primary {
|
|
846
|
-
${Oo(
|
|
850
|
+
${Oo(Wi.color,wo.primaryIconColor)};
|
|
847
851
|
|
|
848
|
-
${Oo(
|
|
849
|
-
${Oo(
|
|
850
|
-
${Oo(
|
|
851
|
-
${Oo(
|
|
852
|
-
${Oo(
|
|
852
|
+
${Oo(le.color,wo.primaryStateLayerColor)};
|
|
853
|
+
${Oo(le.opacityContentOnSurfaceHover,wo.primaryStateLayerOpacityHover)};
|
|
854
|
+
${Oo(le.opacityContentOnSurfaceFocused,wo.primaryStateLayerOpacityFocus)};
|
|
855
|
+
${Oo(le.opacityContentOnSurfaceSelected,wo.primaryStateLayerOpacityActive)};
|
|
856
|
+
${Oo(le.opacityContentOnSurfacePressed,wo.primaryStateLayerOpacityActive)};
|
|
853
857
|
|
|
854
858
|
background-color: ${wo.primaryBackgroundColor};
|
|
855
859
|
color: ${wo.primaryColor};
|
|
@@ -867,13 +871,13 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
867
871
|
/** Secondary styles **/
|
|
868
872
|
|
|
869
873
|
.ft-button--secondary {
|
|
870
|
-
${Oo(
|
|
874
|
+
${Oo(Wi.color,wo.secondaryIconColor)};
|
|
871
875
|
|
|
872
|
-
${Oo(
|
|
873
|
-
${Oo(
|
|
874
|
-
${Oo(
|
|
875
|
-
${Oo(
|
|
876
|
-
${Oo(
|
|
876
|
+
${Oo(le.color,wo.secondaryStateLayerColor)};
|
|
877
|
+
${Oo(le.opacityContentOnSurfaceHover,wo.secondaryStateLayerOpacityHover)};
|
|
878
|
+
${Oo(le.opacityContentOnSurfaceFocused,wo.secondaryStateLayerOpacityFocus)};
|
|
879
|
+
${Oo(le.opacityContentOnSurfaceSelected,wo.secondaryStateLayerOpacityActive)};
|
|
880
|
+
${Oo(le.opacityContentOnSurfacePressed,wo.secondaryStateLayerOpacityActive)};
|
|
877
881
|
|
|
878
882
|
background-color: ${wo.secondaryBackgroundColor};
|
|
879
883
|
color: ${wo.secondaryColor};
|
|
@@ -892,13 +896,13 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
892
896
|
/** Tertiary styles **/
|
|
893
897
|
|
|
894
898
|
.ft-button--tertiary {
|
|
895
|
-
${Oo(
|
|
899
|
+
${Oo(Wi.color,wo.tertiaryIconColor)};
|
|
896
900
|
|
|
897
|
-
${Oo(
|
|
898
|
-
${Oo(
|
|
899
|
-
${Oo(
|
|
900
|
-
${Oo(
|
|
901
|
-
${Oo(
|
|
901
|
+
${Oo(le.color,wo.tertiaryStateLayerColor)};
|
|
902
|
+
${Oo(le.opacityContentOnSurfaceHover,wo.tertiaryStateLayerOpacityHover)};
|
|
903
|
+
${Oo(le.opacityContentOnSurfaceFocused,wo.tertiaryStateLayerOpacityFocus)};
|
|
904
|
+
${Oo(le.opacityContentOnSurfaceSelected,wo.tertiaryStateLayerOpacityActive)};
|
|
905
|
+
${Oo(le.opacityContentOnSurfacePressed,wo.tertiaryStateLayerOpacityActive)};
|
|
902
906
|
|
|
903
907
|
background-color: ${wo.tertiaryBackgroundColor};
|
|
904
908
|
color: ${wo.tertiaryColor};
|
|
@@ -916,13 +920,13 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
916
920
|
/** Neutral styles **/
|
|
917
921
|
|
|
918
922
|
.ft-button--neutral {
|
|
919
|
-
${Oo(
|
|
923
|
+
${Oo(Wi.color,wo.neutralIconColor)};
|
|
920
924
|
|
|
921
|
-
${Oo(
|
|
922
|
-
${Oo(
|
|
923
|
-
${Oo(
|
|
924
|
-
${Oo(
|
|
925
|
-
${Oo(
|
|
925
|
+
${Oo(le.backgroundColor,wo.neutralStateLayerColor)};
|
|
926
|
+
${Oo(le.opacityContentOnSurfaceHover,wo.neutralStateLayerOpacityHover)};
|
|
927
|
+
${Oo(le.opacityContentOnSurfaceFocused,wo.neutralStateLayerOpacityFocus)};
|
|
928
|
+
${Oo(le.opacityContentOnSurfaceSelected,wo.neutralStateLayerOpacityActive)};
|
|
929
|
+
${Oo(le.opacityContentOnSurfacePressed,wo.neutralStateLayerOpacityActive)};
|
|
926
930
|
|
|
927
931
|
background-color: ${wo.neutralBackgroundColor};
|
|
928
932
|
color: ${wo.neutralColor};
|
|
@@ -940,8 +944,8 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
940
944
|
/** Large styles **/
|
|
941
945
|
|
|
942
946
|
.ft-button--large {
|
|
943
|
-
${Oo(
|
|
944
|
-
${Oo(
|
|
947
|
+
${Oo(oe.size,wo.largeIconSize)};
|
|
948
|
+
${Oo(Wi.size,wo.largeIconSize)};
|
|
945
949
|
|
|
946
950
|
height: ${wo.largeHeight};
|
|
947
951
|
padding: 0 ${wo.largeHorizontalPadding};
|
|
@@ -963,8 +967,8 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
963
967
|
/** Small styles **/
|
|
964
968
|
|
|
965
969
|
.ft-button--small {
|
|
966
|
-
${Oo(
|
|
967
|
-
${Oo(
|
|
970
|
+
${Oo(oe.size,wo.smallIconSize)};
|
|
971
|
+
${Oo(Wi.size,wo.smallIconSize)};
|
|
968
972
|
|
|
969
973
|
height: ${wo.smallHeight};
|
|
970
974
|
padding: 0 ${wo.smallHorizontalPadding};
|
|
@@ -982,7 +986,7 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
982
986
|
width: ${wo.smallIconOnlyWidth};
|
|
983
987
|
padding: unset;
|
|
984
988
|
}
|
|
985
|
-
`,
|
|
989
|
+
`,Ko];var ur,yr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class gr extends pr{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?Ji.caption1medium:Ji.body2medium}}gr.styles=[Fo,dr],yr([C({type:Boolean})],gr.prototype,"primary",void 0),yr([C({type:Boolean})],gr.prototype,"secondary",void 0),yr([C({type:Boolean})],gr.prototype,"tertiary",void 0),yr([C({type:Boolean})],gr.prototype,"neutral",void 0),yr([C({type:Boolean})],gr.prototype,"small",void 0),I("ft-button")(fr),I("ftds-button")(gr),function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(ur||(ur={}));const br=bt`
|
|
986
990
|
.ft-size-watcher--pixel {
|
|
987
991
|
width: 0;
|
|
988
992
|
height: 0;
|
|
@@ -1001,13 +1005,13 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
1001
1005
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
1002
1006
|
width: 100%;
|
|
1003
1007
|
}
|
|
1004
|
-
`;var
|
|
1008
|
+
`;var mr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class xr extends CustomEvent{constructor(t,o){super("change",{detail:{size:t,category:o}})}}class Or extends zo{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=ur.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new o}render(){return Qt`
|
|
1005
1009
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
1006
1010
|
<div class="ft-size-watcher--watcher"></div>
|
|
1007
1011
|
</div>
|
|
1008
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=
|
|
1012
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=ur.S:this.size<976?this.category=ur.M:this.size<1024?this.category=ur.L:this.size<1440?this.category=ur.XL:this.category=ur.XXL,this.dispatchEvent(new xr(this.size,this.category)))}),this.debounceTimeout)}}Or.elementDefinitions={},Or.styles=br,mr([C({type:Number})],Or.prototype,"debounceTimeout",void 0),mr([C({type:Boolean})],Or.prototype,"local",void 0),mr([C({type:Number,reflect:!0})],Or.prototype,"size",void 0),mr([C({type:String,reflect:!0})],Or.prototype,"category",void 0),mr([R(".ft-size-watcher--watcher")],Or.prototype,"watcher",void 0),I("ft-size-watcher")(Or);var vr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Sr extends zo{constructor(){super(...arguments),this.portalUrl="",this.opened=!1,this.displayMode=t.FtInProductHelpMode.STANDARD,this.closeIcon=Qo.X_MARK,this.standardModeIcon=Qo.PIP,this.disableStandardMode=!1,this.theaterModeIcon=Qo.PIP_WIDE,this.disableTheaterMode=!1,this.fullscreenModeIcon=Qo.EXPAND_WIDE,this.disableFullscreenMode=!1,this.enableHomeButton=!1,this.homeIcon=Qo.HOME,this.enableOpenTabButton=!1,this.openTabIcon=Qo.EXTLINK_LIGHT,this.allowStandardMode=!0,this.allowTheaterMode=!0,this.allowFullscreenMode=!0}render(){const o={"ft-in-product-help":!0,"ft-in-product-help--opened":this.opened,"ft-in-product-help--standard":this.displayMode==t.FtInProductHelpMode.STANDARD,"ft-in-product-help--theater":this.displayMode==t.FtInProductHelpMode.THEATER,"ft-in-product-help--fullscreen":this.displayMode==t.FtInProductHelpMode.FULLSCREEN},e=this.allowStandardMode&&(this.allowTheaterMode||this.allowFullscreenMode),i=this.allowTheaterMode&&(this.allowStandardMode||this.allowFullscreenMode),r=this.allowFullscreenMode&&(this.allowStandardMode||this.allowTheaterMode);return Qt`
|
|
1009
1013
|
<ft-size-watcher @change=${this.onViewportChange}></ft-size-watcher>
|
|
1010
|
-
<div class="${
|
|
1014
|
+
<div class="${ae(o)}" part="container">
|
|
1011
1015
|
<div class="ft-in-product-help--top-bar" part="top-bar">
|
|
1012
1016
|
${this.enableHomeButton?Qt`
|
|
1013
1017
|
<ft-button icon="${this.homeIcon}"
|
|
@@ -1074,4 +1078,4 @@ const Ti=Symbol.for(""),ji=t=>{if(t?.r===Ti)return t?._$litStatic$},_i=t=>({_$li
|
|
|
1074
1078
|
</div>
|
|
1075
1079
|
<iframe src="${this.portalUrl}" part="iframe"/>
|
|
1076
1080
|
</div>
|
|
1077
|
-
`}update(t){super.update(t),(t.has("disableStandardMode")||t.has("disableTheaterMode")||t.has("disableFullscreenMode"))&&this.computeAllowedModes(),t.has("opened")&&this.updateModeOnOpen()}updateModeOnOpen(){this.allowStandardMode?this.displayMode=t.FtInProductHelpMode.STANDARD:this.allowTheaterMode?this.displayMode=t.FtInProductHelpMode.THEATER:this.displayMode=t.FtInProductHelpMode.FULLSCREEN}computeAllowedModes(){this.allowStandardMode=!this.disableStandardMode&&(this.isTablet()||this.isDesktop()),this.allowTheaterMode=!this.disableTheaterMode&&this.isDesktop(),this.allowFullscreenMode=!this.disableFullscreenMode}onViewportChange(){this.computeAllowedModes(),this.allowStandardMode||this.displayMode!=t.FtInProductHelpMode.STANDARD||(this.displayMode=t.FtInProductHelpMode.THEATER),this.allowTheaterMode||this.displayMode!=t.FtInProductHelpMode.THEATER||(this.displayMode=t.FtInProductHelpMode.FULLSCREEN)}setMode(t){this.displayMode=t,this.dispatchVisibilityChange()}open(){this.opened=!0}close(){this.opened=!1,this.displayMode=t.FtInProductHelpMode.STANDARD,this.dispatchVisibilityChange()}dispatchVisibilityChange(){this.dispatchEvent(new
|
|
1081
|
+
`}update(t){super.update(t),(t.has("disableStandardMode")||t.has("disableTheaterMode")||t.has("disableFullscreenMode"))&&this.computeAllowedModes(),t.has("opened")&&this.updateModeOnOpen()}updateModeOnOpen(){this.allowStandardMode?this.displayMode=t.FtInProductHelpMode.STANDARD:this.allowTheaterMode?this.displayMode=t.FtInProductHelpMode.THEATER:this.displayMode=t.FtInProductHelpMode.FULLSCREEN}computeAllowedModes(){this.allowStandardMode=!this.disableStandardMode&&(this.isTablet()||this.isDesktop()),this.allowTheaterMode=!this.disableTheaterMode&&this.isDesktop(),this.allowFullscreenMode=!this.disableFullscreenMode}onViewportChange(){this.computeAllowedModes(),this.allowStandardMode||this.displayMode!=t.FtInProductHelpMode.STANDARD||(this.displayMode=t.FtInProductHelpMode.THEATER),this.allowTheaterMode||this.displayMode!=t.FtInProductHelpMode.THEATER||(this.displayMode=t.FtInProductHelpMode.FULLSCREEN)}setMode(t){this.displayMode=t,this.dispatchVisibilityChange()}open(){this.opened=!0}close(){this.opened=!1,this.displayMode=t.FtInProductHelpMode.STANDARD,this.dispatchVisibilityChange()}dispatchVisibilityChange(){this.dispatchEvent(new To(this.opened,this.displayMode))}isTablet(){const t=getComputedStyle(this).getPropertyValue(jo.tabletBreakpoint.name)||jo.tabletBreakpoint.defaultValue;return window.matchMedia(`(min-width: ${t})`).matches}isDesktop(){const t=getComputedStyle(this).getPropertyValue(jo.desktopBreakpoint.name)||jo.desktopBreakpoint.defaultValue;return window.matchMedia(`(min-width: ${t})`).matches}navigateTo(t){this.iframe.contentWindow.postMessage({navigateTo:t},this.portalUrl)}openTab(){this.iframe.contentWindow.postMessage({openTabToCurrentUrl:!0},this.portalUrl)}}Sr.elementDefinitions={"ft-button":fr,"ft-size-watcher":Or},Sr.styles=_o,vr([C()],Sr.prototype,"portalUrl",void 0),vr([C({reflect:!0,type:Boolean})],Sr.prototype,"opened",void 0),vr([C({reflect:!0})],Sr.prototype,"displayMode",void 0),vr([C()],Sr.prototype,"closeIcon",void 0),vr([C()],Sr.prototype,"standardModeIcon",void 0),vr([C({type:Boolean})],Sr.prototype,"disableStandardMode",void 0),vr([C()],Sr.prototype,"theaterModeIcon",void 0),vr([C({type:Boolean})],Sr.prototype,"disableTheaterMode",void 0),vr([C()],Sr.prototype,"fullscreenModeIcon",void 0),vr([C({type:Boolean})],Sr.prototype,"disableFullscreenMode",void 0),vr([C({type:Boolean})],Sr.prototype,"enableHomeButton",void 0),vr([C()],Sr.prototype,"homeIcon",void 0),vr([C({type:Boolean})],Sr.prototype,"enableOpenTabButton",void 0),vr([C()],Sr.prototype,"openTabIcon",void 0),vr([C()],Sr.prototype,"iconVariant",void 0),vr([$()],Sr.prototype,"allowStandardMode",void 0),vr([$()],Sr.prototype,"allowTheaterMode",void 0),vr([$()],Sr.prototype,"allowFullscreenMode",void 0),vr([R("iframe")],Sr.prototype,"iframe",void 0),I("ft-in-product-help")(Sr),t.FtInProductHelp=Sr,t.FtInProductHelpCssVariables=jo,t.FtInProductHelpVisibilityChange=To,t.styles=_o}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-in-product-help",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Embeddable fluid-topics iframe",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.1.2",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "53ce99f657872582bca43cbb7ad691b239b22823"
|
|
26
26
|
}
|