@fluid-topics/ft-search-bar 0.3.31 → 0.3.32
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-search-bar.light.js +9 -9
- package/build/ft-search-bar.min.js +417 -417
- package/package.json +14 -14
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(n.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(n.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Si){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.reject()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,s=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){o(t)}s()}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}reject(){this.rejectPromise&&(this.rejectPromise(),this.clearPromise())}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -50,39 +50,39 @@ var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prot
|
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/const h=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function p(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}
|
|
53
|
+
*/const h=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function p(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}function d(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,o,s;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!d(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!d(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(s=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,s[o]))return!1;for(o=i;0!=o--;){var r=s[o];if(!d(t[r],e[r]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}
|
|
54
54
|
/**
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright 2019 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
-
*/const
|
|
58
|
+
*/const f=window,u=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,b=Symbol(),v=new WeakMap;class g{constructor(t,e,i){if(this._$cssResult$=!0,i!==b)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(u&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=v.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&v.set(e,t))}return t}toString(){return this.cssText}}const x=t=>new g("string"==typeof t?t:t+"",void 0,b),y=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new g(i,t,b)},m=(t,e)=>{u?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=f.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},$=u?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return x(e)})(t):t
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/;var
|
|
63
|
+
*/;var w;const k=window,S=k.trustedTypes,O=S?S.emptyScript:"",C=k.reactiveElementPolyfillSupport,E={toAttribute(t,e){switch(e){case Boolean:t=t?O:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},z=(t,e)=>e!==t&&(e==e||t==t),B={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:z};class M extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=B){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const s=this[t];this[e]=o,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||B}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift($(t))}else void 0!==t&&e.push($(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return m(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=B){var o;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:E).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,s=o._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=o.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:E;this._$El=s,this[s]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||z)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var M
|
|
69
|
+
var N;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==C||C({ReactiveElement:M}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.4.1");const F=window,R=F.trustedTypes,L=R?R.createPolicy("lit-html",{createHTML:t=>t}):void 0,j=`lit$${(Math.random()+"").slice(9)}$`,D="?"+j,I=`<${D}>`,U=document,P=(t="")=>U.createComment(t),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,_=t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,K=/>/g,W=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),V=/'/g,q=/"/g,J=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Y=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),G=new WeakMap,tt=U.createTreeWalker(U,129,null,!1),et=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=H;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===H?"!--"===a[1]?n=Z:void 0!==a[1]?n=K:void 0!==a[2]?(J.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=W):void 0!==a[3]&&(n=W):n===W?">"===a[0]?(n=null!=s?s:H,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?W:'"'===a[3]?q:V):n===q||n===V?n=W:n===Z||n===K?n=H:(n=W,s=void 0);const p=n===W&&t[e+1].startsWith("/>")?" ":"";r+=n===H?i+I:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+j+p):i+j+(-2===c?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==L?L.createHTML(l):l,o]};class it{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,c]=et(t,e);if(this.el=it.createElement(a,i),tt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=tt.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(j)){const i=c[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(j),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?lt:"?"===e[1]?ct:"@"===e[1]?ht:nt})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(J.test(o.tagName)){const t=o.textContent.split(j),e=t.length-1;if(e>0){o.textContent=R?R.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],P()),tt.nextNode(),l.push({type:2,index:++s});o.append(t[e],P())}}}else if(8===o.nodeType)if(o.data===D)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(j,t+1));)l.push({type:7,index:s}),t+=j.length-1}s++}}static createElement(t,e){const i=U.createElement("template");return i.innerHTML=t,i}}function ot(t,e,i=t,o){var s,r,n,l;if(e===Y)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const c=A(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=ot(t,a._$AS(t,e.values),a,o)),e}class st{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:U).importNode(i,!0);tt.currentNode=s;let r=tt.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new rt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new pt(r,this,t)),this.u.push(e),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=tt.nextNode(),n++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class rt{constructor(t,e,i,o){var s;this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ot(this,t,e),A(t)?t===Q||null==t||""===t?(this._$AH!==Q&&this._$AR(),this._$AH=Q):t!==this._$AH&&t!==Y&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):_(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==Q&&A(this._$AH)?this._$AA.nextSibling.data=t:this.T(U.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=it.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new st(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new it(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new rt(this.O(P()),this.O(P()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class nt{constructor(t,e,i,o,s){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=ot(this,t,e,0),r=!A(t)||t!==this._$AH&&t!==Y,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=ot(this,o[i+n],e,n),l===Y&&(l=this._$AH[n]),r||(r=!A(l)||l!==this._$AH[n]),l===Q?t=Q:t!==Q&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class lt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Q?void 0:t}}const at=R?R.emptyScript:"";class ct extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Q?this.element.setAttribute(this.name,at):this.element.removeAttribute(this.name)}}class ht extends nt{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=ot(this,t,e,0))&&void 0!==i?i:Q)===Y)return;const o=this._$AH,s=t===Q&&o!==Q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==Q&&(o===Q||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ot(this,t)}}const dt={P:"$lit$",A:j,M:D,C:1,L:et,R:st,D:_,V:ot,I:rt,H:nt,N:ct,U:ht,B:lt,F:pt},ft=F.litHtmlPolyfillSupport;null==ft||ft(it,rt),(null!==(N=F.litHtmlVersions)&&void 0!==N?N:F.litHtmlVersions=[]).push("2.4.0");
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
74
|
*/
|
|
75
|
-
var
|
|
75
|
+
var ut,bt;class vt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,s;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=r._$litPart$;if(void 0===n){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;r._$litPart$=n=new rt(e.insertBefore(P(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Y}}vt.finalized=!0,vt._$litElement$=!0,null===(ut=globalThis.litElementHydrateSupport)||void 0===ut||ut.call(globalThis,{LitElement:vt});const gt=globalThis.litElementPolyfillSupport;null==gt||gt({LitElement:vt}),(null!==(bt=globalThis.litElementVersions)&&void 0!==bt?bt:globalThis.litElementVersions=[]).push("3.2.2");class xt{static create(t,e,i){let o=t=>x(null!=t?t:i),s=y`var(${x(t)}, ${o(i)})`;return s.name=t,s.category=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>y`var(${x(t)}, ${o(e)})`,s.breadcrumb=()=>[],s.lastResortDefaultValue=()=>i,s}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),s=y`var(${x(t)}, ${o(i)})`;return s.name=t,s.category=e.category,s.fallbackVariable=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>y`var(${x(t)}, ${o(e)})`,s.breadcrumb=()=>[e.name,...e.breadcrumb()],s.lastResortDefaultValue=()=>i,s}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):x(null!=e?e:t.defaultValue),o=y`var(${x(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>y`var(${x(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function yt(t,e){return x(`${t.name}: ${e}`)}const mt={colorPrimary:xt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:xt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:xt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:xt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:xt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:xt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:xt.create("--ft-color-error","COLOR","#B00020"),colorOutline:xt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:xt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:xt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:xt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:xt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:xt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:xt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:xt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:xt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:xt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:xt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:xt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:xt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:xt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:xt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:xt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:xt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:xt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:xt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:xt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:xt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:xt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:xt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:xt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:xt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:xt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:xt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:xt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:xt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:xt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:xt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:xt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:xt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:xt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:xt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:xt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:xt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:xt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:xt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:xt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:xt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:xt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:xt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:xt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:xt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:xt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:xt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:xt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:xt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:xt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:xt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:xt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:xt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:xt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:xt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2021 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/var
|
|
81
|
-
${t.map((t=>
|
|
80
|
+
*/var $t=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class wt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return m(s,this.constructor.elementStyles),s}}}(vt)){constructor(){super(),this.exportpartsDebouncer=new e(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),X`
|
|
81
|
+
${t.map((t=>X`
|
|
82
82
|
<style>${t}</style>
|
|
83
83
|
`))}
|
|
84
84
|
${this.getTemplate()}
|
|
85
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){}scheduleExportpartsUpdate(){this.exportpartsDebouncer.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 e,i,o,s,r,n;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(n=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const h=[...c.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}}
|
|
85
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){}scheduleExportpartsUpdate(){this.exportpartsDebouncer.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 e,i,o,s,r,n;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(n=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const h=[...c.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}}$t([o()],wt.prototype,"exportpartsPrefix",void 0),$t([p([])],wt.prototype,"exportpartsPrefixes",void 0);const kt=y`
|
|
86
86
|
.ft-no-text-select {
|
|
87
87
|
-webkit-touch-callout: none;
|
|
88
88
|
-webkit-user-select: none;
|
|
@@ -91,7 +91,7 @@ var ft,ut;class bt extends B{constructor(){super(...arguments),this.renderOption
|
|
|
91
91
|
-ms-user-select: none;
|
|
92
92
|
user-select: none;
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,St=y`
|
|
95
95
|
.ft-word-wrap {
|
|
96
96
|
white-space: normal;
|
|
97
97
|
word-wrap: break-word;
|
|
@@ -103,22 +103,22 @@ var ft,ut;class bt extends B{constructor(){super(...arguments),this.renderOption
|
|
|
103
103
|
-webkit-hyphens: auto;
|
|
104
104
|
hyphens: auto
|
|
105
105
|
}
|
|
106
|
-
`;class
|
|
106
|
+
`;class Ot{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;let s=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>s=s.replace(new RegExp(`\\{${e}\\}`,"g"),t))),s}}var Ct,Et,zt;const Bt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(zt=null===(Et=null===(Ct=window.safari)||void 0===Ct?void 0:Ct.pushNotification)||void 0===Et?void 0:Et.toString())&&void 0!==zt?zt:""),Mt=1,Nt=2,Ft=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
107
107
|
/**
|
|
108
108
|
* @license
|
|
109
109
|
* Copyright 2017 Google LLC
|
|
110
110
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
111
|
-
*/class
|
|
111
|
+
*/class Rt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
112
112
|
/**
|
|
113
113
|
* @license
|
|
114
114
|
* Copyright 2020 Google LLC
|
|
115
115
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
116
|
-
*/const{I:
|
|
116
|
+
*/const{I:Lt}=dt,jt=()=>document.createComment(""),Dt=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(jt(),r),o=s.insertBefore(jt(),r);i=new Lt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,l=n!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},It=(t,e,i=t)=>(t._$AI(e,i),t),Ut={},Pt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},At=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Tt=Ft(class extends Rt{constructor(t){if(super(t),t.type!==Nt)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:l}=this.ht(e,i,o);if(!Array.isArray(r))return this.ut=l,n;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let h,p,d=0,f=r.length-1,u=0,b=n.length-1;for(;d<=f&&u<=b;)if(null===r[d])d++;else if(null===r[f])f--;else if(a[d]===l[u])c[u]=It(r[d],n[u]),d++,u++;else if(a[f]===l[b])c[b]=It(r[f],n[b]),f--,b--;else if(a[d]===l[b])c[b]=It(r[d],n[b]),Dt(t,c[b+1],r[d]),d++,b--;else if(a[f]===l[u])c[u]=It(r[f],n[u]),Dt(t,r[d],r[f]),f--,u++;else if(void 0===h&&(h=At(l,u,b),p=At(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?r[e]:null;if(null===i){const e=Dt(t,r[d]);It(e,n[u]),c[u]=e}else c[u]=It(i,n[u]),Dt(t,r[d],i),r[e]=null;u++}else Pt(r[f]),f--;else Pt(r[d]),d++;for(;u<=b;){const e=Dt(t,c[b+1]);It(e,n[u]),c[u++]=e}for(;d<=f;){const t=r[d++];null!==t&&Pt(t)}return this.ut=l,((t,e=Ut)=>{t._$AH=e})(t,c),Y}});
|
|
117
117
|
/**
|
|
118
118
|
* @license
|
|
119
119
|
* Copyright 2017 Google LLC
|
|
120
120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
121
|
-
*/var
|
|
121
|
+
*/var _t;!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(_t||(_t={}));const Ht=y`
|
|
122
122
|
.ft-size-watcher--pixel {
|
|
123
123
|
width: 0;
|
|
124
124
|
height: 0;
|
|
@@ -137,64 +137,55 @@ var ft,ut;class bt extends B{constructor(){super(...arguments),this.renderOption
|
|
|
137
137
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
138
138
|
width: 100%;
|
|
139
139
|
}
|
|
140
|
-
`;var
|
|
140
|
+
`;var Zt=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Kt extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class Wt extends wt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=_t.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e}render(){return X`
|
|
141
141
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
142
142
|
<div class="ft-size-watcher--watcher"></div>
|
|
143
143
|
</div>
|
|
144
|
-
`}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=
|
|
144
|
+
`}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=_t.S:this.size<976?this.category=_t.M:this.size<1024?this.category=_t.L:this.size<1440?this.category=_t.XL:this.category=_t.XXL,this.dispatchEvent(new Kt(this.size,this.category)))}),this.debounceTimeout)}}Wt.elementDefinitions={},Wt.styles=Ht,Zt([o({type:Number})],Wt.prototype,"debounceTimeout",void 0),Zt([o({type:Boolean})],Wt.prototype,"local",void 0),Zt([o({type:Number,reflect:!0})],Wt.prototype,"size",void 0),Zt([o({type:String,reflect:!0})],Wt.prototype,"category",void 0),Zt([n(".ft-size-watcher--watcher")],Wt.prototype,"watcher",void 0),h("ft-size-watcher")(Wt);
|
|
145
145
|
/**
|
|
146
146
|
* @license
|
|
147
147
|
* Copyright 2020 Google LLC
|
|
148
148
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
149
149
|
*/
|
|
150
|
-
const
|
|
150
|
+
const Vt=Symbol.for(""),qt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void 0:t._$litStatic$},Jt=t=>({_$litStatic$:t,r:Vt}),Xt=new Map,Yt=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(r=i[c],s=qt(r));)a+=s+e[++c],h=!0;l.push(r),n.push(a),c++}if(c===o&&n.push(e[o]),h){const t=n.join("$$lit$$");void 0===(e=Xt.get(t))&&(n.raw=n,Xt.set(t,e=n)),i=l}return t(e,...i)})(X);var Qt;!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"}(Qt||(Qt={}));const Gt=xt.extend("--ft-typography-font-family",mt.titleFont),te=xt.extend("--ft-typography-font-family",mt.contentFont),ee={fontFamily:te,fontSize:xt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:xt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:xt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:xt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:xt.create("--ft-typography-text-transform","UNKNOWN","inherit")},ie=xt.extend("--ft-typography-title-font-family",Gt),oe=xt.extend("--ft-typography-title-font-size",ee.fontSize,"20px"),se=xt.extend("--ft-typography-title-font-weight",ee.fontWeight,"normal"),re=xt.extend("--ft-typography-title-letter-spacing",ee.letterSpacing,"0.15px"),ne=xt.extend("--ft-typography-title-line-height",ee.lineHeight,"1.2"),le=xt.extend("--ft-typography-title-text-transform",ee.textTransform,"inherit"),ae=xt.extend("--ft-typography-title-dense-font-family",Gt),ce=xt.extend("--ft-typography-title-dense-font-size",ee.fontSize,"14px"),he=xt.extend("--ft-typography-title-dense-font-weight",ee.fontWeight,"normal"),pe=xt.extend("--ft-typography-title-dense-letter-spacing",ee.letterSpacing,"0.105px"),de=xt.extend("--ft-typography-title-dense-line-height",ee.lineHeight,"1.7"),fe=xt.extend("--ft-typography-title-dense-text-transform",ee.textTransform,"inherit"),ue=xt.extend("--ft-typography-subtitle1-font-family",te),be=xt.extend("--ft-typography-subtitle1-font-size",ee.fontSize,"16px"),ve=xt.extend("--ft-typography-subtitle1-font-weight",ee.fontWeight,"600"),ge=xt.extend("--ft-typography-subtitle1-letter-spacing",ee.letterSpacing,"0.144px"),xe=xt.extend("--ft-typography-subtitle1-line-height",ee.lineHeight,"1.5"),ye=xt.extend("--ft-typography-subtitle1-text-transform",ee.textTransform,"inherit"),me=xt.extend("--ft-typography-subtitle2-font-family",te),$e=xt.extend("--ft-typography-subtitle2-font-size",ee.fontSize,"14px"),we=xt.extend("--ft-typography-subtitle2-font-weight",ee.fontWeight,"normal"),ke=xt.extend("--ft-typography-subtitle2-letter-spacing",ee.letterSpacing,"0.098px"),Se=xt.extend("--ft-typography-subtitle2-line-height",ee.lineHeight,"1.7"),Oe=xt.extend("--ft-typography-subtitle2-text-transform",ee.textTransform,"inherit"),Ce={fontFamily:xt.extend("--ft-typography-body1-font-family",te),fontSize:xt.extend("--ft-typography-body1-font-size",ee.fontSize,"16px"),fontWeight:xt.extend("--ft-typography-body1-font-weight",ee.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-body1-letter-spacing",ee.letterSpacing,"0.496px"),lineHeight:xt.extend("--ft-typography-body1-line-height",ee.lineHeight,"1.5"),textTransform:xt.extend("--ft-typography-body1-text-transform",ee.textTransform,"inherit")},Ee={fontFamily:xt.extend("--ft-typography-body2-font-family",te),fontSize:xt.extend("--ft-typography-body2-font-size",ee.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-body2-font-weight",ee.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-body2-letter-spacing",ee.letterSpacing,"0.252px"),lineHeight:xt.extend("--ft-typography-body2-line-height",ee.lineHeight,"1.4"),textTransform:xt.extend("--ft-typography-body2-text-transform",ee.textTransform,"inherit")},ze={fontFamily:xt.extend("--ft-typography-caption-font-family",te),fontSize:xt.extend("--ft-typography-caption-font-size",ee.fontSize,"12px"),fontWeight:xt.extend("--ft-typography-caption-font-weight",ee.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-caption-letter-spacing",ee.letterSpacing,"0.396px"),lineHeight:xt.extend("--ft-typography-caption-line-height",ee.lineHeight,"1.33"),textTransform:xt.extend("--ft-typography-caption-text-transform",ee.textTransform,"inherit")},Be=xt.extend("--ft-typography-breadcrumb-font-family",te),Me=xt.extend("--ft-typography-breadcrumb-font-size",ee.fontSize,"10px"),Ne=xt.extend("--ft-typography-breadcrumb-font-weight",ee.fontWeight,"normal"),Fe=xt.extend("--ft-typography-breadcrumb-letter-spacing",ee.letterSpacing,"0.33px"),Re=xt.extend("--ft-typography-breadcrumb-line-height",ee.lineHeight,"1.6"),Le=xt.extend("--ft-typography-breadcrumb-text-transform",ee.textTransform,"inherit"),je=xt.extend("--ft-typography-overline-font-family",te),De=xt.extend("--ft-typography-overline-font-size",ee.fontSize,"10px"),Ie=xt.extend("--ft-typography-overline-font-weight",ee.fontWeight,"normal"),Ue=xt.extend("--ft-typography-overline-letter-spacing",ee.letterSpacing,"1.5px"),Pe=xt.extend("--ft-typography-overline-line-height",ee.lineHeight,"1.6"),Ae=xt.extend("--ft-typography-overline-text-transform",ee.textTransform,"uppercase"),Te={fontFamily:xt.extend("--ft-typography-button-font-family",te),fontSize:xt.extend("--ft-typography-button-font-size",ee.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-button-font-weight",ee.fontWeight,"600"),letterSpacing:xt.extend("--ft-typography-button-letter-spacing",ee.letterSpacing,"1.246px"),lineHeight:xt.extend("--ft-typography-button-line-height",ee.lineHeight,"1.15"),textTransform:xt.extend("--ft-typography-button-text-transform",ee.textTransform,"uppercase")},_e=y`
|
|
151
151
|
.ft-typography--title {
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
158
|
-
}
|
|
159
|
-
`,
|
|
152
|
+
font-family: ${ie};
|
|
153
|
+
font-size: ${oe};
|
|
154
|
+
font-weight: ${se};
|
|
155
|
+
letter-spacing: ${re};
|
|
156
|
+
line-height: ${ne};
|
|
157
|
+
text-transform: ${le};
|
|
158
|
+
}
|
|
159
|
+
`,He=y`
|
|
160
160
|
.ft-typography--title-dense {
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
167
|
-
}
|
|
168
|
-
`,
|
|
161
|
+
font-family: ${ae};
|
|
162
|
+
font-size: ${ce};
|
|
163
|
+
font-weight: ${he};
|
|
164
|
+
letter-spacing: ${pe};
|
|
165
|
+
line-height: ${de};
|
|
166
|
+
text-transform: ${fe};
|
|
167
|
+
}
|
|
168
|
+
`,Ze=y`
|
|
169
169
|
.ft-typography--subtitle1 {
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
176
|
-
}
|
|
177
|
-
`,
|
|
170
|
+
font-family: ${ue};
|
|
171
|
+
font-size: ${be};
|
|
172
|
+
font-weight: ${ve};
|
|
173
|
+
letter-spacing: ${ge};
|
|
174
|
+
line-height: ${xe};
|
|
175
|
+
text-transform: ${ye};
|
|
176
|
+
}
|
|
177
|
+
`,Ke=y`
|
|
178
178
|
.ft-typography--subtitle2 {
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
179
|
+
font-family: ${me};
|
|
180
|
+
font-size: ${$e};
|
|
181
|
+
font-weight: ${we};
|
|
182
|
+
letter-spacing: ${ke};
|
|
183
|
+
line-height: ${Se};
|
|
184
|
+
text-transform: ${Oe};
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
`,
|
|
187
|
+
`,We=y`
|
|
188
188
|
.ft-typography--body1 {
|
|
189
|
-
font-family: ${Oe.fontFamily};
|
|
190
|
-
font-size: ${Oe.fontSize};
|
|
191
|
-
font-weight: ${Oe.fontWeight};
|
|
192
|
-
letter-spacing: ${Oe.letterSpacing};
|
|
193
|
-
line-height: ${Oe.lineHeight};
|
|
194
|
-
text-transform: ${Oe.textTransform};
|
|
195
|
-
}
|
|
196
|
-
`,We=x`
|
|
197
|
-
.ft-typography--body2 {
|
|
198
189
|
font-family: ${Ce.fontFamily};
|
|
199
190
|
font-size: ${Ce.fontSize};
|
|
200
191
|
font-weight: ${Ce.fontWeight};
|
|
@@ -202,8 +193,8 @@ const Wt=Symbol.for(""),Vt=t=>{if((null==t?void 0:t.r)===Wt)return null==t?void
|
|
|
202
193
|
line-height: ${Ce.lineHeight};
|
|
203
194
|
text-transform: ${Ce.textTransform};
|
|
204
195
|
}
|
|
205
|
-
`,Ve=
|
|
206
|
-
.ft-typography--
|
|
196
|
+
`,Ve=y`
|
|
197
|
+
.ft-typography--body2 {
|
|
207
198
|
font-family: ${Ee.fontFamily};
|
|
208
199
|
font-size: ${Ee.fontSize};
|
|
209
200
|
font-weight: ${Ee.fontWeight};
|
|
@@ -211,51 +202,60 @@ const Wt=Symbol.for(""),Vt=t=>{if((null==t?void 0:t.r)===Wt)return null==t?void
|
|
|
211
202
|
line-height: ${Ee.lineHeight};
|
|
212
203
|
text-transform: ${Ee.textTransform};
|
|
213
204
|
}
|
|
214
|
-
`,qe=
|
|
205
|
+
`,qe=y`
|
|
206
|
+
.ft-typography--caption {
|
|
207
|
+
font-family: ${ze.fontFamily};
|
|
208
|
+
font-size: ${ze.fontSize};
|
|
209
|
+
font-weight: ${ze.fontWeight};
|
|
210
|
+
letter-spacing: ${ze.letterSpacing};
|
|
211
|
+
line-height: ${ze.lineHeight};
|
|
212
|
+
text-transform: ${ze.textTransform};
|
|
213
|
+
}
|
|
214
|
+
`,Je=y`
|
|
215
215
|
.ft-typography--breadcrumb {
|
|
216
|
-
font-family: ${
|
|
217
|
-
font-size: ${
|
|
218
|
-
font-weight: ${
|
|
219
|
-
letter-spacing: ${
|
|
220
|
-
line-height: ${
|
|
221
|
-
text-transform: ${
|
|
222
|
-
}
|
|
223
|
-
`,
|
|
216
|
+
font-family: ${Be};
|
|
217
|
+
font-size: ${Me};
|
|
218
|
+
font-weight: ${Ne};
|
|
219
|
+
letter-spacing: ${Fe};
|
|
220
|
+
line-height: ${Re};
|
|
221
|
+
text-transform: ${Le};
|
|
222
|
+
}
|
|
223
|
+
`,Xe=y`
|
|
224
224
|
.ft-typography--overline {
|
|
225
|
-
font-family: ${
|
|
225
|
+
font-family: ${je};
|
|
226
226
|
font-size: ${De};
|
|
227
|
-
font-weight: ${
|
|
228
|
-
letter-spacing: ${
|
|
229
|
-
line-height: ${
|
|
230
|
-
text-transform: ${
|
|
227
|
+
font-weight: ${Ie};
|
|
228
|
+
letter-spacing: ${Ue};
|
|
229
|
+
line-height: ${Pe};
|
|
230
|
+
text-transform: ${Ae};
|
|
231
231
|
}
|
|
232
|
-
`,
|
|
232
|
+
`,Ye=y`
|
|
233
233
|
.ft-typography--button {
|
|
234
|
-
font-family: ${
|
|
235
|
-
font-size: ${
|
|
236
|
-
font-weight: ${
|
|
237
|
-
letter-spacing: ${
|
|
238
|
-
line-height: ${
|
|
239
|
-
text-transform: ${
|
|
240
|
-
}
|
|
241
|
-
`,
|
|
234
|
+
font-family: ${Te.fontFamily};
|
|
235
|
+
font-size: ${Te.fontSize};
|
|
236
|
+
font-weight: ${Te.fontWeight};
|
|
237
|
+
letter-spacing: ${Te.letterSpacing};
|
|
238
|
+
line-height: ${Te.lineHeight};
|
|
239
|
+
text-transform: ${Te.textTransform};
|
|
240
|
+
}
|
|
241
|
+
`,Qe=y`
|
|
242
242
|
.ft-typography {
|
|
243
243
|
vertical-align: inherit;
|
|
244
244
|
}
|
|
245
|
-
`;var
|
|
246
|
-
<${
|
|
245
|
+
`;var Ge=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ti extends wt{constructor(){super(...arguments),this.variant=Qt.body1}render(){return this.element?Yt`
|
|
246
|
+
<${Jt(this.element)}
|
|
247
247
|
class="ft-typography ft-typography--${this.variant}">
|
|
248
248
|
<slot></slot>
|
|
249
|
-
</${
|
|
250
|
-
`:
|
|
249
|
+
</${Jt(this.element)}>
|
|
250
|
+
`:Yt`
|
|
251
251
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
252
|
-
`}}function
|
|
252
|
+
`}}function ei(t,e){return t.flatMap((t=>[t,...ei(e(t),e)]))}function ii(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function oi(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>oi(e,t.selected))),value:t.value}}function si(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>oi(t,!1)))}}ti.styles=[_e,He,Ze,Ke,We,Ve,qe,Je,Xe,Ye,Qe],Ge([o()],ti.prototype,"element",void 0),Ge([o()],ti.prototype,"variant",void 0),h("ft-typography")(ti);
|
|
253
253
|
/**
|
|
254
254
|
* @license
|
|
255
255
|
* Copyright 2018 Google LLC
|
|
256
256
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
257
257
|
*/
|
|
258
|
-
const
|
|
258
|
+
const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const s=t.element.classList;this.nt.forEach((t=>{t in e||(s.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.nt.add(t)):(s.remove(t),this.nt.delete(t)))}return Y}}),ni=xt.extend("--ft-ripple-color",mt.colorContent),li={color:ni,backgroundColor:xt.extend("--ft-ripple-background-color",ni),opacityContentOnSurfacePressed:xt.external(mt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xt.external(mt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xt.external(mt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xt.external(mt.opacityContentOnSurfaceSelected,"Design system")},ai=xt.extend("--ft-ripple-color",mt.colorPrimary),ci=ai,hi=xt.extend("--ft-ripple-background-color",ai),pi=xt.extend("--ft-ripple-color",mt.colorSecondary),di=pi,fi=xt.extend("--ft-ripple-background-color",pi),ui=y`
|
|
259
259
|
:host {
|
|
260
260
|
display: contents;
|
|
261
261
|
}
|
|
@@ -277,27 +277,27 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
.ft-ripple .ft-ripple--background {
|
|
280
|
-
background-color: ${
|
|
280
|
+
background-color: ${li.backgroundColor};
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
.ft-ripple .ft-ripple--effect {
|
|
284
|
-
background-color: ${
|
|
284
|
+
background-color: ${li.color};
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
288
|
-
background-color: ${
|
|
288
|
+
background-color: ${fi};
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
292
|
-
background-color: ${
|
|
292
|
+
background-color: ${di};
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
296
|
-
background-color: ${
|
|
296
|
+
background-color: ${hi};
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
300
|
-
background-color: ${
|
|
300
|
+
background-color: ${ci};
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
.ft-ripple .ft-ripple--background {
|
|
@@ -329,22 +329,22 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
332
|
-
opacity: ${
|
|
332
|
+
opacity: ${li.opacityContentOnSurfaceHover};
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
336
|
-
opacity: ${
|
|
336
|
+
opacity: ${li.opacityContentOnSurfaceSelected};
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
340
|
-
opacity: ${
|
|
340
|
+
opacity: ${li.opacityContentOnSurfaceFocused};
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
344
|
-
opacity: ${
|
|
344
|
+
opacity: ${li.opacityContentOnSurfacePressed};
|
|
345
345
|
transform: translate(-50%, -50%) scale(1);
|
|
346
346
|
}
|
|
347
|
-
`;var
|
|
347
|
+
`;var bi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class vi extends wt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return X`
|
|
348
348
|
<style>
|
|
349
349
|
.ft-ripple .ft-ripple--effect,
|
|
350
350
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -357,11 +357,11 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
357
357
|
top: ${this.originY}px;
|
|
358
358
|
}
|
|
359
359
|
</style>
|
|
360
|
-
<div class="${
|
|
360
|
+
<div class="${ri(t)}">
|
|
361
361
|
<div class="ft-ripple--background"></div>
|
|
362
362
|
<div class="ft-ripple--effect"></div>
|
|
363
363
|
</div>
|
|
364
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
364
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}vi.elementDefinitions={},vi.styles=ui,bi([o({type:Boolean})],vi.prototype,"primary",void 0),bi([o({type:Boolean})],vi.prototype,"secondary",void 0),bi([o({type:Boolean})],vi.prototype,"unbounded",void 0),bi([o({type:Boolean})],vi.prototype,"activated",void 0),bi([o({type:Boolean})],vi.prototype,"selected",void 0),bi([o({type:Boolean})],vi.prototype,"disabled",void 0),bi([s()],vi.prototype,"hovered",void 0),bi([s()],vi.prototype,"focused",void 0),bi([s()],vi.prototype,"pressed",void 0),bi([s()],vi.prototype,"rippling",void 0),bi([s()],vi.prototype,"rippleSize",void 0),bi([s()],vi.prototype,"originX",void 0),bi([s()],vi.prototype,"originY",void 0),bi([n(".ft-ripple")],vi.prototype,"ripple",void 0),bi([n(".ft-ripple--effect")],vi.prototype,"rippleEffect",void 0),h("ft-ripple")(vi);const gi={distance:xt.create("--ft-tooltip-distance","SIZE","4px"),color:xt.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:xt.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:xt.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:xt.external(mt.borderRadiusS,"Design system"),maxWidth:xt.create("--ft-tooltip-max-width","SIZE","150px")},xi=y`
|
|
365
365
|
.ft-tooltip--container {
|
|
366
366
|
display: block;
|
|
367
367
|
position: relative;
|
|
@@ -377,23 +377,23 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
377
377
|
box-sizing: border-box;
|
|
378
378
|
overflow: hidden;
|
|
379
379
|
width: max-content;
|
|
380
|
-
max-width: ${
|
|
380
|
+
max-width: ${gi.maxWidth};
|
|
381
381
|
text-align: center;
|
|
382
|
-
padding: ${
|
|
383
|
-
z-index: ${
|
|
382
|
+
padding: ${gi.distance};
|
|
383
|
+
z-index: ${gi.zIndex};
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
.ft-tooltip--content {
|
|
387
387
|
padding: 4px 8px;
|
|
388
|
-
border-radius: ${
|
|
389
|
-
background-color: ${
|
|
390
|
-
color: ${
|
|
388
|
+
border-radius: ${gi.borderRadiusS};
|
|
389
|
+
background-color: ${gi.backgroundColor};
|
|
390
|
+
color: ${gi.color};
|
|
391
391
|
top: -500px;
|
|
392
392
|
left: -500px;
|
|
393
393
|
position: relative;
|
|
394
394
|
word-break: break-word;
|
|
395
395
|
}
|
|
396
|
-
`;var
|
|
396
|
+
`;var yi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class mi extends wt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e,this.revealDebouncer=new e}render(){return X`
|
|
397
397
|
<div part="container"
|
|
398
398
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
399
399
|
@mouseenter=${this.onHover}
|
|
@@ -409,7 +409,7 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
409
409
|
</div>
|
|
410
410
|
<slot></slot>
|
|
411
411
|
</div>
|
|
412
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${
|
|
412
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${gi.maxWidth})`}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())}}mi.elementDefinitions={"ft-typography":ti},mi.styles=xi,yi([o()],mi.prototype,"text",void 0),yi([o({type:Boolean})],mi.prototype,"manual",void 0),yi([o({type:Boolean})],mi.prototype,"inline",void 0),yi([o({type:Number})],mi.prototype,"delay",void 0),yi([o()],mi.prototype,"position",void 0),yi([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],mi.prototype,"slotNodes",void 0),yi([n(".ft-tooltip--container")],mi.prototype,"container",void 0),yi([n("slot")],mi.prototype,"target",void 0),yi([n(".ft-tooltip")],mi.prototype,"tooltip",void 0),yi([n(".ft-tooltip--content")],mi.prototype,"tooltipContent",void 0),yi([s()],mi.prototype,"visible",void 0),h("ft-tooltip")(mi);const $i={color:xt.extend("--ft-loader-color",mt.colorPrimary),size:xt.create("--ft-loader-size","SIZE","80px")},wi=y`
|
|
413
413
|
:host {
|
|
414
414
|
line-height: 0;
|
|
415
415
|
}
|
|
@@ -418,8 +418,8 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
418
418
|
display: inline-block;
|
|
419
419
|
position: relative;
|
|
420
420
|
|
|
421
|
-
width: ${
|
|
422
|
-
height: ${
|
|
421
|
+
width: ${$i.size};
|
|
422
|
+
height: ${$i.size};
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
.ft-loader div {
|
|
@@ -428,7 +428,7 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
428
428
|
width: 25%;
|
|
429
429
|
height: 25%;
|
|
430
430
|
border-radius: 50%;
|
|
431
|
-
background: ${
|
|
431
|
+
background: ${$i.color};
|
|
432
432
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
433
433
|
}
|
|
434
434
|
|
|
@@ -475,35 +475,35 @@ const si=Nt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Bt||"clas
|
|
|
475
475
|
transform: translate(0, 0);
|
|
476
476
|
}
|
|
477
477
|
100% {
|
|
478
|
-
transform: translate(calc(0.35 * ${
|
|
478
|
+
transform: translate(calc(0.35 * ${$i.size}), 0);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
`;class
|
|
481
|
+
`;class ki extends wt{render(){return X`
|
|
482
482
|
<div class="ft-loader">
|
|
483
483
|
<div></div>
|
|
484
484
|
<div></div>
|
|
485
485
|
<div></div>
|
|
486
486
|
<div></div>
|
|
487
487
|
</div>
|
|
488
|
-
`}}
|
|
488
|
+
`}}ki.styles=wi,h("ft-loader")(ki);
|
|
489
489
|
/**
|
|
490
490
|
* @license
|
|
491
491
|
* Copyright 2017 Google LLC
|
|
492
492
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
493
493
|
*/
|
|
494
|
-
class
|
|
494
|
+
class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Q||null==t)return this._t=void 0,this.it=t;if(t===Y)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Si.directiveName="unsafeHTML",Si.resultType=1;const Oi=Ft(Si);var Ci,Ei;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Ci||(Ci={})),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=""}(Ei||(Ei={}));const zi=new Map([...["abw"].map((t=>[t,Ei.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,Ei.AUDIO])),...["avi"].map((t=>[t,Ei.AVI])),...["chm","xhs"].map((t=>[t,Ei.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,Ei.CODE])),...["csv"].map((t=>[t,Ei.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ei.DITA])),...["epub"].map((t=>[t,Ei.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ei.EXCEL])),...["flac"].map((t=>[t,Ei.FLAC])),...["gif"].map((t=>[t,Ei.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ei.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ei.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,Ei.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ei.JPEG])),...["json"].map((t=>[t,Ei.JSON])),...["m4a","m4p"].map((t=>[t,Ei.M4A])),...["mov","qt"].map((t=>[t,Ei.MOV])),...["mp3"].map((t=>[t,Ei.MP3])),...["mp4","m4v"].map((t=>[t,Ei.MP4])),...["ogg","oga"].map((t=>[t,Ei.OGG])),...["pdf","ps"].map((t=>[t,Ei.PDF])),...["png"].map((t=>[t,Ei.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ei.POWERPOINT])),...["rar"].map((t=>[t,Ei.RAR])),...["stp"].map((t=>[t,Ei.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ei.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,Ei.VIDEO])),...["wav"].map((t=>[t,Ei.WAV])),...["wma"].map((t=>[t,Ei.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ei.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ei.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ei.YAML])),...["zip"].map((t=>[t,Ei.ZIP]))]),Bi=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);const Mi={size:xt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:xt.extend("--ft-icon-fluid-topics-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:xt.extend("--ft-icon-file-format-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:xt.extend("--ft-icon-material-font-family",xt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:xt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ni=y`
|
|
495
495
|
:host {
|
|
496
496
|
display: inline-block;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
:host, i.ft-icon {
|
|
500
|
-
width: ${
|
|
501
|
-
height: ${
|
|
500
|
+
width: ${Mi.size};
|
|
501
|
+
height: ${Mi.size};
|
|
502
502
|
text-align: center;
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
i.ft-icon {
|
|
506
|
-
font-size: ${
|
|
506
|
+
font-size: ${Mi.size};
|
|
507
507
|
line-height: 1;
|
|
508
508
|
font-weight: normal;
|
|
509
509
|
text-transform: none;
|
|
@@ -514,26 +514,26 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
514
514
|
text-rendering: auto;
|
|
515
515
|
-webkit-font-smoothing: antialiased;
|
|
516
516
|
-moz-osx-font-smoothing: grayscale;
|
|
517
|
-
vertical-align: ${
|
|
517
|
+
vertical-align: ${Mi.verticalAlign};
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
.ft-icon--fluid-topics {
|
|
521
|
-
font-family: ${
|
|
521
|
+
font-family: ${Mi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
.ft-icon--file-format {
|
|
525
|
-
font-family: ${
|
|
525
|
+
font-family: ${Mi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
.ft-icon--material {
|
|
529
|
-
font-family: ${
|
|
529
|
+
font-family: ${Mi.materialFontFamily}, "Material Icons", sans-serif;
|
|
530
530
|
}
|
|
531
|
-
`;var
|
|
531
|
+
`;var Fi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Fi||(Fi={}));var Ri=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Li extends wt{constructor(){super(...arguments),this.variant=Fi.fluid_topics,this.resolvedIcon=Q}render(){const t="material"!==this.variant||this.value;return X`
|
|
532
532
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
533
|
-
${
|
|
533
|
+
${Oi(this.resolvedIcon)}
|
|
534
534
|
<slot ?hidden=${t}></slot>
|
|
535
535
|
</i>
|
|
536
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
536
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Fi.file_format:this.resolvedIcon=null!==(t=Ei[i.toUpperCase()])&&void 0!==t?t:i;break;case Fi.fluid_topics:this.resolvedIcon=null!==(e=Ci[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||Q}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Li.elementDefinitions={},Li.styles=Ni,Ri([o()],Li.prototype,"variant",void 0),Ri([o()],Li.prototype,"value",void 0),Ri([s()],Li.prototype,"resolvedIcon",void 0),Ri([n("slot")],Li.prototype,"slottedContent",void 0),h("ft-icon")(Li);const ji=xt.extend("--ft-button-color",mt.colorPrimary),Di={backgroundColor:xt.extend("--ft-button-background-color",mt.colorSurface),borderRadius:xt.extend("--ft-button-border-radius",mt.borderRadiusL),color:ji,fontSize:xt.extend("--ft-button-font-size",Te.fontSize),iconSize:xt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:xt.extend("--ft-button-ripple-color",ji),opacityDisabled:xt.external(mt.colorOpacityDisabled,"Design system")},Ii=xt.extend("--ft-button-primary-color",xt.extend("--ft-button-color",mt.colorOnPrimary)),Ui={backgroundColor:xt.extend("--ft-button-primary-background-color",xt.extend("--ft-button-background-color",mt.colorPrimary)),color:Ii,rippleColor:xt.extend("--ft-button-primary-ripple-color",Ii)},Pi=xt.extend("--ft-button-dense-border-radius",xt.extend("--ft-button-border-radius",mt.borderRadiusM)),Ai=[kt,y`
|
|
537
537
|
:host {
|
|
538
538
|
display: inline-block;
|
|
539
539
|
max-width: 100%;
|
|
@@ -575,10 +575,10 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
575
575
|
|
|
576
576
|
--ft-button-internal-line-height: calc(${Di.fontSize} + 2px);
|
|
577
577
|
--ft-button-internal-color: ${Di.color};
|
|
578
|
-
${
|
|
578
|
+
${yt(Mi.size,Di.iconSize)};
|
|
579
579
|
--ft-button-internal-vertical-padding: 6px;
|
|
580
580
|
--ft-button-internal-horizontal-padding: 8px;
|
|
581
|
-
${
|
|
581
|
+
${yt(li.color,Di.rippleColor)};
|
|
582
582
|
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Di.iconSize});
|
|
583
583
|
|
|
584
584
|
border-radius: ${Di.borderRadius};
|
|
@@ -595,7 +595,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
595
595
|
.ft-button--dense {
|
|
596
596
|
--ft-button-internal-vertical-padding: 2px;
|
|
597
597
|
--ft-button-internal-horizontal-padding: 4px;
|
|
598
|
-
border-radius: ${
|
|
598
|
+
border-radius: ${Pi};
|
|
599
599
|
}
|
|
600
600
|
|
|
601
601
|
.ft-button--round {
|
|
@@ -608,9 +608,9 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
.ft-button.ft-button--primary {
|
|
611
|
-
background-color: ${
|
|
612
|
-
--ft-button-internal-color: ${
|
|
613
|
-
${
|
|
611
|
+
background-color: ${Ui.backgroundColor};
|
|
612
|
+
--ft-button-internal-color: ${Ui.color};
|
|
613
|
+
${yt(li.color,Ui.rippleColor)};
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
.ft-button.ft-button--outlined {
|
|
@@ -629,8 +629,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
629
629
|
text-overflow: ellipsis;
|
|
630
630
|
display: block;
|
|
631
631
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
632
|
-
${
|
|
633
|
-
${
|
|
632
|
+
${yt(Te.fontSize,"1em")};
|
|
633
|
+
${yt(Te.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
634
634
|
}
|
|
635
635
|
|
|
636
636
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -663,12 +663,12 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
ft-loader {
|
|
666
|
-
${
|
|
667
|
-
${
|
|
666
|
+
${yt($i.size,Di.iconSize)};
|
|
667
|
+
${yt($i.color,"var(--ft-button-internal-color)")};
|
|
668
668
|
}
|
|
669
|
-
`];var
|
|
669
|
+
`];var Ti=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class _i extends wt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Fi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":Bt,"ft-no-text-select":!0};return this.addTooltipIfNeeded(X`
|
|
670
670
|
<button part="button"
|
|
671
|
-
class="${
|
|
671
|
+
class="${ri(t)}"
|
|
672
672
|
aria-label="${this.getLabel()}"
|
|
673
673
|
?disabled=${this.isDisabled()}>
|
|
674
674
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -680,22 +680,22 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
680
680
|
</ft-typography>
|
|
681
681
|
${this.resolveIcon()}
|
|
682
682
|
</button>
|
|
683
|
-
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?
|
|
683
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?X`
|
|
684
684
|
<ft-tooltip part="tooltip"
|
|
685
685
|
text="${this.getLabel()}"
|
|
686
686
|
position="${this.tooltipPosition}">
|
|
687
687
|
${t}
|
|
688
688
|
</ft-tooltip>
|
|
689
|
-
`:t}resolveIcon(){return this.loading?
|
|
690
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
691
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:
|
|
689
|
+
`:t}resolveIcon(){return this.loading?X`
|
|
690
|
+
<ft-loader></ft-loader> `:this.icon?X`
|
|
691
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Q}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}}_i.elementDefinitions={"ft-ripple":vi,"ft-tooltip":mi,"ft-typography":ti,"ft-icon":Li,"ft-loader":ki},_i.styles=Ai,Ti([o({type:Boolean})],_i.prototype,"primary",void 0),Ti([o({type:Boolean})],_i.prototype,"outlined",void 0),Ti([o({type:Boolean})],_i.prototype,"disabled",void 0),Ti([o({type:Boolean})],_i.prototype,"dense",void 0),Ti([o({type:Boolean})],_i.prototype,"round",void 0),Ti([o({type:String})],_i.prototype,"label",void 0),Ti([o({type:String})],_i.prototype,"icon",void 0),Ti([o({type:String})],_i.prototype,"iconVariant",void 0),Ti([o({type:Boolean})],_i.prototype,"trailingIcon",void 0),Ti([o({type:Boolean})],_i.prototype,"loading",void 0),Ti([o({type:String})],_i.prototype,"tooltipPosition",void 0),Ti([o({type:Boolean})],_i.prototype,"hideTooltip",void 0),Ti([o({type:Boolean})],_i.prototype,"forceTooltip",void 0),Ti([n(".ft-button")],_i.prototype,"button",void 0),Ti([n(".ft-button--label slot")],_i.prototype,"slottedContent",void 0),h("ft-button")(_i);const Hi=xt.extend("--ft-checkbox-text-color",mt.colorOnSurfaceHigh),Zi=xt.external(mt.colorPrimary,"Design system"),Ki=xt.external(mt.colorOnPrimary,"Design system"),Wi=xt.extend("--ft-checkbox-border-color",mt.colorOnSurfaceMedium),Vi=xt.external(mt.colorOnSurfaceDisabled,"Design system"),qi=y`
|
|
692
692
|
* {
|
|
693
693
|
box-sizing: border-box;
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
.ft-checkbox {
|
|
697
697
|
box-sizing: border-box;
|
|
698
|
-
color: ${
|
|
698
|
+
color: ${Hi};
|
|
699
699
|
|
|
700
700
|
display: inline-flex;
|
|
701
701
|
align-items: center;
|
|
@@ -703,7 +703,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
703
703
|
}
|
|
704
704
|
|
|
705
705
|
.ft-checkbox--disabled {
|
|
706
|
-
color: ${
|
|
706
|
+
color: ${Vi};
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
input {
|
|
@@ -727,26 +727,26 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
727
727
|
|
|
728
728
|
.ft-checkbox--box {
|
|
729
729
|
display: flex;
|
|
730
|
-
border: 2px solid ${
|
|
730
|
+
border: 2px solid ${Wi};
|
|
731
731
|
border-radius: 2px;
|
|
732
732
|
|
|
733
733
|
width: 18px;
|
|
734
734
|
height: 18px;
|
|
735
735
|
|
|
736
|
-
color: ${
|
|
736
|
+
color: ${Ki};
|
|
737
737
|
}
|
|
738
738
|
|
|
739
739
|
|
|
740
740
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
741
741
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
742
|
-
border-color: ${
|
|
743
|
-
background-color: ${
|
|
742
|
+
border-color: ${Zi};
|
|
743
|
+
background-color: ${Zi};
|
|
744
744
|
}
|
|
745
745
|
|
|
746
746
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
747
|
-
border-color: ${
|
|
747
|
+
border-color: ${Vi};
|
|
748
748
|
background-color: transparent;
|
|
749
|
-
color: ${
|
|
749
|
+
color: ${Vi};
|
|
750
750
|
}
|
|
751
751
|
|
|
752
752
|
.ft-checkbox--checkmark {
|
|
@@ -765,8 +765,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
765
765
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
766
766
|
opacity: 1;
|
|
767
767
|
}
|
|
768
|
-
`;var
|
|
769
|
-
<label class="${
|
|
768
|
+
`;var Ji=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Xi extends wt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return X`
|
|
769
|
+
<label class="${ri(t)}" for="checkbox-input">
|
|
770
770
|
<div class="ft-checkbox--box-container">
|
|
771
771
|
<ft-ripple
|
|
772
772
|
?disabled=${this.disabled}
|
|
@@ -791,14 +791,14 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
791
791
|
<slot></slot>
|
|
792
792
|
</ft-typography>
|
|
793
793
|
</label>
|
|
794
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
794
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Xi.elementDefinitions={"ft-ripple":vi,"ft-typography":ti},Xi.styles=qi,Ji([o()],Xi.prototype,"name",void 0),Ji([o({type:Boolean,reflect:!0})],Xi.prototype,"checked",void 0),Ji([o({type:Boolean})],Xi.prototype,"indeterminate",void 0),Ji([o({type:Boolean})],Xi.prototype,"disabled",void 0),Ji([n(".ft-checkbox")],Xi.prototype,"container",void 0),Ji([n("ft-ripple")],Xi.prototype,"ripple",void 0),h("ft-checkbox")(Xi);const Yi=xt.extend("--ft-radio-text-color",mt.colorOnSurfaceHigh),Qi=xt.external(mt.colorPrimary,"Design system"),Gi=(xt.external(mt.colorOnPrimary,"Design system"),xt.extend("--ft-radio-border-color",mt.colorOnSurfaceMedium)),to=xt.external(mt.colorOnSurfaceDisabled,"Design system"),eo=y`
|
|
795
795
|
* {
|
|
796
796
|
box-sizing: border-box;
|
|
797
797
|
}
|
|
798
798
|
|
|
799
799
|
.ft-radio {
|
|
800
800
|
box-sizing: border-box;
|
|
801
|
-
color: ${
|
|
801
|
+
color: ${Yi};
|
|
802
802
|
|
|
803
803
|
display: inline-flex;
|
|
804
804
|
align-items: center;
|
|
@@ -806,7 +806,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
.ft-radio--disabled {
|
|
809
|
-
color: ${
|
|
809
|
+
color: ${to};
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
input {
|
|
@@ -829,7 +829,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
829
829
|
}
|
|
830
830
|
|
|
831
831
|
.ft-radio--box {
|
|
832
|
-
border: 2px solid ${
|
|
832
|
+
border: 2px solid ${Gi};
|
|
833
833
|
border-radius: 50%;
|
|
834
834
|
|
|
835
835
|
display: flex;
|
|
@@ -842,7 +842,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
842
842
|
|
|
843
843
|
.ft-radio--box:after {
|
|
844
844
|
content: " ";
|
|
845
|
-
background-color: ${
|
|
845
|
+
background-color: ${Qi};
|
|
846
846
|
|
|
847
847
|
border-radius: 50%;
|
|
848
848
|
|
|
@@ -854,7 +854,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
854
854
|
}
|
|
855
855
|
|
|
856
856
|
.ft-radio--checked .ft-radio--box {
|
|
857
|
-
border-color: ${
|
|
857
|
+
border-color: ${Qi};
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
|
|
@@ -863,15 +863,15 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
.ft-radio--disabled .ft-radio--box {
|
|
866
|
-
border-color: ${
|
|
866
|
+
border-color: ${to};
|
|
867
867
|
background-color: transparent;
|
|
868
868
|
}
|
|
869
869
|
|
|
870
870
|
.ft-radio--disabled .ft-radio--box:after {
|
|
871
|
-
background-color: ${
|
|
871
|
+
background-color: ${to};
|
|
872
872
|
}
|
|
873
|
-
`;var
|
|
874
|
-
<div class="${
|
|
873
|
+
`;var io=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class oo extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class so extends wt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return X`
|
|
874
|
+
<div class="${ri(t)}">
|
|
875
875
|
<div class="ft-radio--box-container">
|
|
876
876
|
<ft-ripple
|
|
877
877
|
?disabled=${this.disabled}
|
|
@@ -895,17 +895,17 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
895
895
|
</ft-typography>
|
|
896
896
|
</label>
|
|
897
897
|
</div>
|
|
898
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
898
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new oo(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new oo(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}so.elementDefinitions={"ft-ripple":vi,"ft-typography":ti},so.styles=eo,io([o()],so.prototype,"value",void 0),io([o()],so.prototype,"name",void 0),io([o({type:Boolean,reflect:!0})],so.prototype,"checked",void 0),io([o({type:Boolean})],so.prototype,"disabled",void 0),io([n(".ft-radio")],so.prototype,"container",void 0),io([n("ft-ripple")],so.prototype,"ripple",void 0),io([n("input")],so.prototype,"input",void 0);const ro=y`
|
|
899
899
|
:host {
|
|
900
900
|
display: contents;
|
|
901
901
|
}
|
|
902
|
-
`;var
|
|
902
|
+
`;var no=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class lo extends wt{constructor(){super(...arguments),this.name=""}render(){return X`
|
|
903
903
|
<slot @slotchange=${this.onSlotChange}
|
|
904
904
|
@change=${this.onChange}
|
|
905
905
|
@keydown=${this.onKeyDown}
|
|
906
906
|
@focusin=${this.focusCurrentValue}
|
|
907
907
|
></slot>
|
|
908
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
908
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}lo.elementDefinitions={},lo.styles=ro,no([o()],lo.prototype,"name",void 0),no([c()],lo.prototype,"radioButtons",void 0),h("ft-radio")(so),h("ft-radio-group")(lo);const ao={borderRadiusM:xt.external(mt.borderRadiusM,"Design system"),colorOutline:xt.external(mt.colorOutline,"Design system"),colorOnSurface:xt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:xt.external(mt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:xt.external(mt.colorOnSurfaceDisabled,"Design system"),colorPrimary:xt.external(mt.colorPrimary,"Design system"),colorOnPrimary:xt.external(mt.colorOnPrimary,"Design system"),fontFamily:xt.external(Ee.fontFamily,"Body2 typography"),fontSize:xt.external(Ee.fontSize,"Body2 typography"),fontWeight:xt.external(Ee.fontWeight,"Body2 typography"),letterSpacing:xt.external(Ee.letterSpacing,"Body2 typography"),lineHeight:xt.external(Ee.lineHeight,"Body2 typography"),textTransform:xt.external(Ee.textTransform,"Body2 typography")},co=y`
|
|
909
909
|
.ft-filter-level--container {
|
|
910
910
|
display: flex;
|
|
911
911
|
flex-direction: column;
|
|
@@ -919,14 +919,14 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
919
919
|
flex-shrink: 0;
|
|
920
920
|
text-decoration: none;
|
|
921
921
|
position: relative;
|
|
922
|
-
border-radius: ${
|
|
922
|
+
border-radius: ${ao.borderRadiusM};
|
|
923
923
|
overflow: hidden;
|
|
924
924
|
display: flex;
|
|
925
925
|
align-items: center;
|
|
926
926
|
padding: 4px 4px;
|
|
927
927
|
gap: 4px;
|
|
928
928
|
cursor: pointer;
|
|
929
|
-
color: ${
|
|
929
|
+
color: ${ao.colorOnSurface};
|
|
930
930
|
}
|
|
931
931
|
|
|
932
932
|
.ft-filter-level--go-back:focus {
|
|
@@ -955,7 +955,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
955
955
|
}
|
|
956
956
|
|
|
957
957
|
ft-button {
|
|
958
|
-
${
|
|
958
|
+
${yt(Di.color,ao.colorOnSurface)};
|
|
959
959
|
}
|
|
960
960
|
|
|
961
961
|
ft-radio, ft-checkbox {
|
|
@@ -969,11 +969,11 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
969
969
|
|
|
970
970
|
.ft-filter-level--no-values {
|
|
971
971
|
margin: 10px 0;
|
|
972
|
-
color: ${
|
|
972
|
+
color: ${ao.colorOnSurfaceMedium};
|
|
973
973
|
}
|
|
974
|
-
`;var
|
|
974
|
+
`;var ho=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class po extends wt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return X`
|
|
975
975
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
976
|
-
${null==this.parent?null:
|
|
976
|
+
${null==this.parent?null:X`
|
|
977
977
|
<div tabindex="0"
|
|
978
978
|
part="controls go-back"
|
|
979
979
|
class="ft-filter-level--go-back"
|
|
@@ -985,15 +985,15 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
985
985
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
986
986
|
</div>
|
|
987
987
|
`}
|
|
988
|
-
${0===this.options.length&&this.noValuesLabel?
|
|
988
|
+
${0===this.options.length&&this.noValuesLabel?X`
|
|
989
989
|
<ft-typography class="ft-filter-level--no-values" element="span" variant="body2">
|
|
990
990
|
${this.noValuesLabel}
|
|
991
991
|
</ft-typography>
|
|
992
|
-
`:
|
|
993
|
-
${
|
|
992
|
+
`:Q}
|
|
993
|
+
${Tt(e,(t=>t.value),(t=>{var e;return X`
|
|
994
994
|
<div class="ft-filter-level--option" part="options">
|
|
995
995
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
996
|
-
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?
|
|
996
|
+
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?Q:X`
|
|
997
997
|
<ft-button icon="chevron_right"
|
|
998
998
|
part="controls navigate-hierarchy"
|
|
999
999
|
label="${t.label}"
|
|
@@ -1003,7 +1003,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1003
1003
|
`}
|
|
1004
1004
|
</div>
|
|
1005
1005
|
`}))}
|
|
1006
|
-
${e.length<t.length?
|
|
1006
|
+
${e.length<t.length?X`
|
|
1007
1007
|
<ft-button
|
|
1008
1008
|
class="ft-filter-level--display-more"
|
|
1009
1009
|
icon="expand_more"
|
|
@@ -1012,19 +1012,19 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1012
1012
|
@click=${this.displayMore}>
|
|
1013
1013
|
${this.moreValuesButtonLabel}
|
|
1014
1014
|
</ft-button>
|
|
1015
|
-
`:
|
|
1015
|
+
`:Q}
|
|
1016
1016
|
</div>
|
|
1017
|
-
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return
|
|
1017
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return X`
|
|
1018
1018
|
<ft-checkbox name="${this.id}"
|
|
1019
1019
|
part="multivalued-option"
|
|
1020
1020
|
data-value="${t.value}"
|
|
1021
1021
|
.checked=${t.selected}
|
|
1022
1022
|
.disabled=${this.disabled}
|
|
1023
|
-
.indeterminate=${
|
|
1023
|
+
.indeterminate=${ei(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
1024
1024
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
1025
|
-
${t.label}
|
|
1025
|
+
${t.renderOption?t.renderOption:t.label}
|
|
1026
1026
|
</ft-checkbox>
|
|
1027
|
-
`}buildMonoValuedOption(t){return
|
|
1027
|
+
`}buildMonoValuedOption(t){return X`
|
|
1028
1028
|
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
1029
1029
|
part="monovalued-option"
|
|
1030
1030
|
data-value="${t.value}"
|
|
@@ -1033,9 +1033,9 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1033
1033
|
@click=${e=>this.optionsChanged(e,t)}
|
|
1034
1034
|
@keyup=${e=>this.onRadioKeyUp(e,t)}
|
|
1035
1035
|
@change=${t=>t.stopPropagation()}>
|
|
1036
|
-
${t.label}
|
|
1036
|
+
${t.renderOption?t.renderOption:t.label}
|
|
1037
1037
|
</ft-radio>
|
|
1038
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
1038
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}po.elementDefinitions={"ft-button":_i,"ft-ripple":vi,"ft-typography":ti,"ft-checkbox":Xi,"ft-icon":Li,"ft-radio":so},po.styles=co,ho([o({type:String})],po.prototype,"id",void 0),ho([o({type:Object})],po.prototype,"parent",void 0),ho([o({type:Array})],po.prototype,"options",void 0),ho([o({type:Boolean})],po.prototype,"multivalued",void 0),ho([o({type:Boolean})],po.prototype,"disabled",void 0),ho([o({type:Boolean})],po.prototype,"hideSelectedOptions",void 0),ho([o({type:Boolean})],po.prototype,"preventNavigation",void 0),ho([o({type:String})],po.prototype,"filter",void 0),ho([o({type:String})],po.prototype,"moreValuesButtonLabel",void 0),ho([o({type:String})],po.prototype,"noValuesLabel",void 0),ho([o({type:Number})],po.prototype,"displayedValuesLimit",void 0),ho([n(".ft-filter-level--container")],po.prototype,"container",void 0),ho([s()],po.prototype,"displayedPages",void 0);const fo={buttonsColor:xt.extend("--ft-snap-scroll-buttons-color",mt.colorPrimary),buttonsZIndex:xt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:xt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:xt.external(mt.colorSurface,"Design system")},uo=y`
|
|
1039
1039
|
.ft-snap-scroll {
|
|
1040
1040
|
box-sizing: border-box;
|
|
1041
1041
|
position: relative;
|
|
@@ -1070,7 +1070,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1070
1070
|
flex-wrap: nowrap;
|
|
1071
1071
|
align-items: flex-start;
|
|
1072
1072
|
justify-content: flex-start;
|
|
1073
|
-
gap: ${
|
|
1073
|
+
gap: ${fo.gap};
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
1076
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1113,11 +1113,11 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1113
1113
|
.ft-snap-scroll--next {
|
|
1114
1114
|
position: absolute;
|
|
1115
1115
|
display: flex;
|
|
1116
|
-
z-index: ${
|
|
1116
|
+
z-index: ${fo.buttonsZIndex};
|
|
1117
1117
|
opacity: 1;
|
|
1118
1118
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1119
|
-
${
|
|
1120
|
-
${
|
|
1119
|
+
${yt(Di.backgroundColor,"transparent")};
|
|
1120
|
+
${yt(Di.color,fo.buttonsColor)};
|
|
1121
1121
|
}
|
|
1122
1122
|
|
|
1123
1123
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1130,37 +1130,37 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1130
1130
|
top: 0;
|
|
1131
1131
|
left: -1px;
|
|
1132
1132
|
bottom: 0;
|
|
1133
|
-
background: linear-gradient(to right, ${
|
|
1133
|
+
background: linear-gradient(to right, ${fo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1134
1134
|
}
|
|
1135
1135
|
|
|
1136
1136
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1137
1137
|
top: -1px;
|
|
1138
1138
|
left: 0;
|
|
1139
1139
|
right: 0;
|
|
1140
|
-
background: linear-gradient(to bottom, ${
|
|
1140
|
+
background: linear-gradient(to bottom, ${fo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
1143
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1144
1144
|
top: 0;
|
|
1145
1145
|
right: -1px;
|
|
1146
1146
|
bottom: 0;
|
|
1147
|
-
background: linear-gradient(to left, ${
|
|
1147
|
+
background: linear-gradient(to left, ${fo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1148
1148
|
}
|
|
1149
1149
|
|
|
1150
1150
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1151
1151
|
left: 0;
|
|
1152
1152
|
right: 0;
|
|
1153
1153
|
bottom: -1px;
|
|
1154
|
-
background: linear-gradient(to top, ${
|
|
1154
|
+
background: linear-gradient(to top, ${fo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
1157
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1158
1158
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1159
1159
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1160
1160
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1161
|
-
background-color: ${
|
|
1161
|
+
background-color: ${fo.colorSurface};
|
|
1162
1162
|
}
|
|
1163
|
-
`;var
|
|
1163
|
+
`;var bo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class vo extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class go extends wt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=ri({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":Bt}),e=this.controls&&this.withScroll;return X`
|
|
1164
1164
|
<div part="container" class="${t}">
|
|
1165
1165
|
<ft-button
|
|
1166
1166
|
class="ft-snap-scroll--previous"
|
|
@@ -1184,7 +1184,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1184
1184
|
@click=${this.next}
|
|
1185
1185
|
></ft-button>
|
|
1186
1186
|
</div>
|
|
1187
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1187
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new vo(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}go.elementDefinitions={"ft-button":_i},go.styles=uo,bo([o({type:Boolean})],go.prototype,"horizontal",void 0),bo([o({type:Boolean})],go.prototype,"hideScrollbar",void 0),bo([o({type:Boolean})],go.prototype,"controls",void 0),bo([o({type:Boolean})],go.prototype,"limitSize",void 0),bo([s()],go.prototype,"elements",void 0),bo([s()],go.prototype,"currentElement",void 0),bo([s()],go.prototype,"withScroll",void 0),bo([s()],go.prototype,"startReached",void 0),bo([s()],go.prototype,"endReached",void 0),bo([n(".ft-snap-scroll--content")],go.prototype,"contentSlot",void 0),h("ft-snap-scroll")(go);const xo=xt.external(mt.colorOutline,"Design system"),yo=xt.external(mt.colorOnSurface,"Design system"),mo=xt.external(mt.colorOnSurfaceMedium,"Design system"),$o=xt.external(mt.colorPrimary,"Design system"),wo=xt.external(mt.colorSurface,"Design system"),ko=xt.external(mt.transitionDuration,"Design system"),So=xt.external(mt.transitionTimingFunction,"Design system"),Oo=[qe,y`
|
|
1188
1188
|
:host {
|
|
1189
1189
|
display: flex;
|
|
1190
1190
|
max-height: 100%;
|
|
@@ -1197,7 +1197,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1197
1197
|
flex-direction: column;
|
|
1198
1198
|
max-height: 100%;
|
|
1199
1199
|
max-width: 100%;
|
|
1200
|
-
color: ${
|
|
1200
|
+
color: ${yo};
|
|
1201
1201
|
}
|
|
1202
1202
|
|
|
1203
1203
|
.ft-filter--header {
|
|
@@ -1207,13 +1207,13 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1207
1207
|
flex-shrink: 0;
|
|
1208
1208
|
padding: 0 10px;
|
|
1209
1209
|
margin-bottom: 8px;
|
|
1210
|
-
${
|
|
1210
|
+
${yt(ee.fontSize,"14px")};
|
|
1211
1211
|
}
|
|
1212
1212
|
|
|
1213
1213
|
.ft-filter--header ft-button {
|
|
1214
1214
|
flex-shrink: 0;
|
|
1215
1215
|
margin-left: auto;
|
|
1216
|
-
${
|
|
1216
|
+
${yt(Di.iconSize,"18px")};
|
|
1217
1217
|
}
|
|
1218
1218
|
|
|
1219
1219
|
.ft-filter--label {
|
|
@@ -1221,8 +1221,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1221
1221
|
flex-shrink: 1;
|
|
1222
1222
|
flex-grow: 1;
|
|
1223
1223
|
word-break: break-word;
|
|
1224
|
-
${
|
|
1225
|
-
${
|
|
1224
|
+
${yt(ee.lineHeight,"22px")};
|
|
1225
|
+
${yt(ee.fontWeight,"bold")};
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
.ft-filter--filter {
|
|
@@ -1233,8 +1233,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1233
1233
|
padding: 0 10px;
|
|
1234
1234
|
overflow: hidden;
|
|
1235
1235
|
height: 32px;
|
|
1236
|
-
transition: height ${
|
|
1237
|
-
margin ${
|
|
1236
|
+
transition: height ${ko} ${So},
|
|
1237
|
+
margin ${ko} ${So};
|
|
1238
1238
|
transition-delay: 500ms;
|
|
1239
1239
|
}
|
|
1240
1240
|
|
|
@@ -1247,15 +1247,15 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1247
1247
|
display: block;
|
|
1248
1248
|
width: 100%;
|
|
1249
1249
|
border-radius: 4px;
|
|
1250
|
-
border: 1px solid ${
|
|
1250
|
+
border: 1px solid ${xo};
|
|
1251
1251
|
padding: 4px;
|
|
1252
|
-
background-color: ${
|
|
1253
|
-
color: ${
|
|
1254
|
-
outline-color: ${
|
|
1252
|
+
background-color: ${wo};
|
|
1253
|
+
color: ${yo};
|
|
1254
|
+
outline-color: ${$o};
|
|
1255
1255
|
}
|
|
1256
1256
|
|
|
1257
1257
|
input::placeholder {
|
|
1258
|
-
color: ${
|
|
1258
|
+
color: ${mo};
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
1261
|
.ft-filter--values {
|
|
@@ -1267,7 +1267,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1267
1267
|
}
|
|
1268
1268
|
|
|
1269
1269
|
.ft-filter--separator {
|
|
1270
|
-
border-top: 1px solid ${
|
|
1270
|
+
border-top: 1px solid ${xo};
|
|
1271
1271
|
margin: 4px 10px;
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
@@ -1292,14 +1292,14 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1292
1292
|
slot {
|
|
1293
1293
|
display: none;
|
|
1294
1294
|
}
|
|
1295
|
-
`];var
|
|
1295
|
+
`];var Co=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Eo extends CustomEvent{constructor(t){super("change",{detail:t})}}class zo extends wt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return ei(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return X`
|
|
1296
1296
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1297
1297
|
part="container">
|
|
1298
|
-
${this.label||i?
|
|
1298
|
+
${this.label||i?X`
|
|
1299
1299
|
<div class="ft-filter--header" part="header">
|
|
1300
1300
|
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1301
1301
|
</ft-typography>
|
|
1302
|
-
${i?
|
|
1302
|
+
${i&&!this.hideClearButton?X`
|
|
1303
1303
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1304
1304
|
${this.clearButtonLabel}
|
|
1305
1305
|
</ft-button>
|
|
@@ -1322,8 +1322,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1322
1322
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1323
1323
|
@option-change=${this.optionsChanged}></slot>
|
|
1324
1324
|
</div>
|
|
1325
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return
|
|
1326
|
-
${this.raiseSelectedOptions&&e.length>0?
|
|
1325
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return X`
|
|
1326
|
+
${this.raiseSelectedOptions&&e.length>0?X`
|
|
1327
1327
|
<ft-filter-level
|
|
1328
1328
|
id="${this.id}"
|
|
1329
1329
|
?multivalued=${this.multivalued}
|
|
@@ -1342,11 +1342,11 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1342
1342
|
${this.renderLevel(o,this.options)}
|
|
1343
1343
|
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
|
|
1344
1344
|
</ft-snap-scroll>
|
|
1345
|
-
`}renderLevel(t,e,i){return
|
|
1345
|
+
`}renderLevel(t,e,i){return X`
|
|
1346
1346
|
<ft-filter-level
|
|
1347
1347
|
class="${t}"
|
|
1348
1348
|
id="${this.id}"
|
|
1349
|
-
filter="${this.filter}"
|
|
1349
|
+
.filter="${this.filter}"
|
|
1350
1350
|
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1351
1351
|
?multivalued=${this.multivalued}
|
|
1352
1352
|
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
@@ -1361,17 +1361,17 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1361
1361
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1362
1362
|
noValuesLabel="${this.noValuesLabel}"
|
|
1363
1363
|
></ft-filter-level>
|
|
1364
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new
|
|
1364
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new Eo(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}zo.elementDefinitions={"ft-button":_i,"ft-filter-level":po,"ft-snap-scroll":go,"ft-typography":ti},zo.styles=Oo,Co([o({type:String})],zo.prototype,"id",void 0),Co([o({type:String})],zo.prototype,"label",void 0),Co([o({type:String})],zo.prototype,"filterPlaceHolder",void 0),Co([o({type:String})],zo.prototype,"clearButtonLabel",void 0),Co([o({type:String})],zo.prototype,"moreValuesButtonLabel",void 0),Co([o({type:String})],zo.prototype,"noValuesLabel",void 0),Co([p([])],zo.prototype,"options",void 0),Co([o({type:Boolean})],zo.prototype,"multivalued",void 0),Co([o({type:Boolean})],zo.prototype,"disabled",void 0),Co([o({type:Boolean})],zo.prototype,"raiseSelectedOptions",void 0),Co([o({type:Number})],zo.prototype,"displayedValuesLimit",void 0),Co([o({type:Boolean})],zo.prototype,"hideClearButton",void 0),Co([n(".ft-filter--slot")],zo.prototype,"slotElement",void 0),Co([n(".ft-filter--container")],zo.prototype,"container",void 0),Co([n(".ft-filter--values")],zo.prototype,"valuesContainer",void 0),Co([n(".ft-filter--levels")],zo.prototype,"levelsContainer",void 0),Co([n(".ft-filter--levels ft-filter-level:last-child")],zo.prototype,"lastLevel",void 0),Co([n(".ft-filter--filter input")],zo.prototype,"filterInput",void 0),Co([function(t){return r({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],zo.prototype,"levels",void 0),Co([s()],zo.prototype,"withScroll",void 0),Co([s()],zo.prototype,"filter",void 0),Co([s()],zo.prototype,"slideIn",void 0),Co([s()],zo.prototype,"slideOut",void 0);var Bo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Mo extends wt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return X`
|
|
1365
1365
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1366
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1366
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Mo.elementDefinitions={},Bo([o({type:String})],Mo.prototype,"label",void 0),Bo([o({type:Object,converter:t=>t})],Mo.prototype,"value",void 0),Bo([o({type:Boolean,reflect:!0})],Mo.prototype,"selected",void 0),Bo([o({type:Object})],Mo.prototype,"subOptions",void 0),Bo([p({})],Mo.prototype,"renderOption",void 0),Bo([n(".ft-filter-option--slot")],Mo.prototype,"slotElement",void 0),h("ft-filter")(zo),h("ft-filter-option")(Mo);const No=y`
|
|
1367
1367
|
.ft-accordion {
|
|
1368
1368
|
box-sizing: border-box;
|
|
1369
1369
|
}
|
|
1370
|
-
`;var
|
|
1370
|
+
`;var Fo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ro extends wt{constructor(){super(...arguments),this.multi=!1}render(){return X`
|
|
1371
1371
|
<div class="ft-accordion">
|
|
1372
1372
|
<slot @activated=${this.onChange}></slot>
|
|
1373
1373
|
</div>
|
|
1374
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}
|
|
1374
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}Ro.elementDefinitions={},Ro.styles=No,Fo([o({type:Boolean})],Ro.prototype,"multi",void 0),Fo([n("slot")],Ro.prototype,"content",void 0);const Lo=xt.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),jo=xt.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),Do=xt.external(mt.colorOutline,"Design system"),Io=y`
|
|
1375
1375
|
.ft-accordion-item {
|
|
1376
1376
|
display: flex;
|
|
1377
1377
|
flex-direction: column;
|
|
@@ -1384,8 +1384,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1384
1384
|
display: flex;
|
|
1385
1385
|
align-items: center;
|
|
1386
1386
|
cursor: pointer;
|
|
1387
|
-
padding: ${
|
|
1388
|
-
gap: calc(${
|
|
1387
|
+
padding: ${jo} ${Lo};
|
|
1388
|
+
gap: calc(${Lo} / 2);
|
|
1389
1389
|
outline: none;
|
|
1390
1390
|
}
|
|
1391
1391
|
|
|
@@ -1410,13 +1410,13 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1410
1410
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1411
1411
|
height: initial;
|
|
1412
1412
|
overflow: visible;
|
|
1413
|
-
padding: ${
|
|
1413
|
+
padding: ${jo} ${Lo};
|
|
1414
1414
|
}
|
|
1415
1415
|
|
|
1416
1416
|
.ft-accordion-item--separator {
|
|
1417
1417
|
border-bottom: 1px solid ${Do};
|
|
1418
1418
|
}
|
|
1419
|
-
`;var
|
|
1419
|
+
`;var Uo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Po extends wt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return X`
|
|
1420
1420
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1421
1421
|
<div class="ft-accordion-item--toggle"
|
|
1422
1422
|
part="toggle"
|
|
@@ -1424,13 +1424,13 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1424
1424
|
@keydown=${this.onToggleKeyDown}
|
|
1425
1425
|
tabindex="0">
|
|
1426
1426
|
<ft-ripple part="toggle-ripple"></ft-ripple>
|
|
1427
|
-
${this.icon?
|
|
1427
|
+
${this.icon?X`
|
|
1428
1428
|
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
1429
1429
|
`:null}
|
|
1430
|
-
${this.label?
|
|
1430
|
+
${this.label?X`
|
|
1431
1431
|
<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}
|
|
1432
1432
|
</ft-typography>
|
|
1433
|
-
`:
|
|
1433
|
+
`:X`
|
|
1434
1434
|
<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>
|
|
1435
1435
|
`}
|
|
1436
1436
|
<ft-icon variant="material">${this.active?"expand_less":"expand_more"}</ft-icon>
|
|
@@ -1440,7 +1440,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1440
1440
|
</div>
|
|
1441
1441
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1442
1442
|
</div>
|
|
1443
|
-
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}
|
|
1443
|
+
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}Po.elementDefinitions={"ft-ripple":vi,"ft-typography":ti,"ft-icon":Li},Po.styles=Io,Uo([o({type:String})],Po.prototype,"icon",void 0),Uo([o({type:String})],Po.prototype,"label",void 0),Uo([o({type:Boolean,reflect:!0})],Po.prototype,"active",void 0),h("ft-accordion")(Ro),h("ft-accordion-item")(Po);const Ao=xt.extend("--ft-chip-color",mt.colorOnSurface),To={backgroundColor:xt.extend("--ft-chip-background-color",mt.colorSurface),color:Ao,fontSize:xt.extend("--ft-chip-font-size",Ee.fontSize),iconSize:xt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:xt.extend("--ft-chip-ripple-color",Ao),horizontalPadding:xt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:xt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:xt.external(mt.colorOutline,"Design system"),opacityDisabled:xt.external(mt.colorOpacityDisabled,"Design system")},_o=xt.extend("--ft-chip-highlighted-color",xt.extend("--ft-chip-color",mt.colorOnPrimary)),Ho={backgroundColor:xt.extend("--ft-chip-highlighted-background-color",xt.extend("--ft-chip-background-color",mt.colorPrimary)),color:_o,rippleColor:xt.extend("--ft-chip-highlighted-ripple-color",_o)},Zo=xt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Ko=xt.create("--ft-chip-dense-vertical-padding","SIZE","4px"),Wo=[kt,y`
|
|
1444
1444
|
:host {
|
|
1445
1445
|
display: inline-block;
|
|
1446
1446
|
max-width: 100%;
|
|
@@ -1457,20 +1457,20 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1457
1457
|
box-sizing: border-box;
|
|
1458
1458
|
pointer-events: auto;
|
|
1459
1459
|
|
|
1460
|
-
--ft-chip-internal-font-size: ${
|
|
1460
|
+
--ft-chip-internal-font-size: ${To.fontSize};
|
|
1461
1461
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1462
|
-
${
|
|
1463
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1464
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1462
|
+
${yt(Mi.size,To.iconSize)};
|
|
1463
|
+
--ft-chip-internal-vertical-padding: ${To.verticalPadding};
|
|
1464
|
+
--ft-chip-internal-horizontal-padding: ${To.horizontalPadding};
|
|
1465
1465
|
--ft-chip-internal-icon-padding: 3px;
|
|
1466
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
1466
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${To.iconSize});
|
|
1467
1467
|
|
|
1468
|
-
border: 1px solid ${
|
|
1469
|
-
color: ${
|
|
1470
|
-
${
|
|
1468
|
+
border: 1px solid ${To.colorOutline};
|
|
1469
|
+
color: ${To.color};
|
|
1470
|
+
${yt(li.color,To.rippleColor)};
|
|
1471
1471
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1472
1472
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1473
|
-
background-color: ${
|
|
1473
|
+
background-color: ${To.backgroundColor};
|
|
1474
1474
|
line-height: var(--ft-chip-internal-content-height);
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
@@ -1480,8 +1480,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1480
1480
|
|
|
1481
1481
|
.ft-chip--dense {
|
|
1482
1482
|
--ft-chip-internal-icon-padding: 3px;
|
|
1483
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1484
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1483
|
+
--ft-chip-internal-vertical-padding: ${Ko};
|
|
1484
|
+
--ft-chip-internal-horizontal-padding: ${Zo};
|
|
1485
1485
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1486
1486
|
}
|
|
1487
1487
|
|
|
@@ -1493,15 +1493,15 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1493
1493
|
cursor: default;
|
|
1494
1494
|
pointer-events: none;
|
|
1495
1495
|
filter: grayscale(1);
|
|
1496
|
-
opacity: ${
|
|
1496
|
+
opacity: ${To.opacityDisabled};
|
|
1497
1497
|
}
|
|
1498
1498
|
|
|
1499
1499
|
.ft-chip--highlighted {
|
|
1500
1500
|
border: none;
|
|
1501
1501
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1502
|
-
background-color: ${
|
|
1503
|
-
${
|
|
1504
|
-
color: ${
|
|
1502
|
+
background-color: ${Ho.backgroundColor};
|
|
1503
|
+
${yt(li.color,Ho.rippleColor)};
|
|
1504
|
+
color: ${Ho.color};
|
|
1505
1505
|
}
|
|
1506
1506
|
|
|
1507
1507
|
.ft-chip--clickable {
|
|
@@ -1534,8 +1534,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1534
1534
|
vertical-align: bottom;
|
|
1535
1535
|
display: block;
|
|
1536
1536
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1537
|
-
${
|
|
1538
|
-
${
|
|
1537
|
+
${yt(Ee.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1538
|
+
${yt(Ee.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
1541
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1570,8 +1570,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1570
1570
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
1571
1571
|
order: -1;
|
|
1572
1572
|
}
|
|
1573
|
-
`];var
|
|
1574
|
-
<div class="${
|
|
1573
|
+
`];var Vo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class qo extends CustomEvent{constructor(){super("icon-click")}}class Jo extends wt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Bt};return X`
|
|
1574
|
+
<div class="${ri(t)}"
|
|
1575
1575
|
aria-label="${this.getLabel()}"
|
|
1576
1576
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1577
1577
|
@keyup=${this.onKeyUp}>
|
|
@@ -1581,7 +1581,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1581
1581
|
</ft-typography>
|
|
1582
1582
|
${this.internalIcon?this.renderIcon():null}
|
|
1583
1583
|
</div>
|
|
1584
|
-
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return
|
|
1584
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return X`
|
|
1585
1585
|
<div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}"
|
|
1586
1586
|
tabindex="${this.interactionsOnIcon?0:-1}"
|
|
1587
1587
|
@click=${this.onIconClick}
|
|
@@ -1589,25 +1589,25 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1589
1589
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1590
1590
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1591
1591
|
</div>
|
|
1592
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1592
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new qo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new qo))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}Jo.elementDefinitions={"ft-ripple":vi,"ft-typography":ti,"ft-icon":Li},Jo.styles=Wo,Vo([o({type:Boolean})],Jo.prototype,"highlighted",void 0),Vo([o({type:Boolean})],Jo.prototype,"removable",void 0),Vo([o({type:Boolean})],Jo.prototype,"disabled",void 0),Vo([o({type:Boolean})],Jo.prototype,"clickable",void 0),Vo([o({type:Boolean})],Jo.prototype,"iconClickable",void 0),Vo([o({type:Boolean})],Jo.prototype,"dense",void 0),Vo([o({type:Boolean})],Jo.prototype,"multiLine",void 0),Vo([o({type:String})],Jo.prototype,"label",void 0),Vo([o({type:String})],Jo.prototype,"icon",void 0),Vo([o({type:Boolean})],Jo.prototype,"trailingIcon",void 0),Vo([n("ft-typography slot")],Jo.prototype,"slottedContent",void 0),h("ft-chip")(Jo);const Xo={fontSize:xt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:xt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:xt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:xt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:xt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:xt.extend("--ft-input-label-border-color",mt.colorOutline),textColor:xt.extend("--ft-input-label-text-color",mt.colorOnSurfaceMedium),disabledTextColor:xt.extend("--ft-input-label-disabled-text-color",mt.colorOnSurfaceDisabled),colorSurface:xt.external(mt.colorSurface,"Design system"),borderRadiusS:xt.external(mt.borderRadiusS,"Design system"),colorError:xt.external(mt.colorError,"Design system")},Yo=y`
|
|
1593
1593
|
.ft-input-label {
|
|
1594
1594
|
position: absolute;
|
|
1595
1595
|
inset: 0;
|
|
1596
1596
|
display: flex;
|
|
1597
|
-
background-color: ${
|
|
1598
|
-
border-radius: ${
|
|
1597
|
+
background-color: ${Xo.colorSurface};
|
|
1598
|
+
border-radius: ${Xo.borderRadiusS} ${Xo.borderRadiusS} 0 0;
|
|
1599
1599
|
}
|
|
1600
1600
|
|
|
1601
1601
|
.ft-input-label--outlined {
|
|
1602
|
-
border-radius: ${
|
|
1602
|
+
border-radius: ${Xo.borderRadiusS};
|
|
1603
1603
|
}
|
|
1604
1604
|
|
|
1605
1605
|
.ft-input-label {
|
|
1606
|
-
border-color: ${
|
|
1606
|
+
border-color: ${Xo.borderColor};
|
|
1607
1607
|
}
|
|
1608
1608
|
|
|
1609
1609
|
.ft-input-label.ft-input-label--in-error {
|
|
1610
|
-
border-color: ${
|
|
1610
|
+
border-color: ${Xo.colorError}
|
|
1611
1611
|
}
|
|
1612
1612
|
|
|
1613
1613
|
.ft-input-label:before,
|
|
@@ -1620,7 +1620,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1620
1620
|
}
|
|
1621
1621
|
|
|
1622
1622
|
.ft-input-label:before {
|
|
1623
|
-
width: ${
|
|
1623
|
+
width: ${Xo.horizontalSpacing};
|
|
1624
1624
|
flex-shrink: 0;
|
|
1625
1625
|
}
|
|
1626
1626
|
|
|
@@ -1636,18 +1636,18 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1636
1636
|
border-bottom-width: 1px;
|
|
1637
1637
|
border-bottom-style: solid;
|
|
1638
1638
|
border-color: inherit;
|
|
1639
|
-
color: ${
|
|
1639
|
+
color: ${Xo.textColor};
|
|
1640
1640
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1641
|
-
${
|
|
1642
|
-
${
|
|
1641
|
+
${yt(ze.fontSize,Xo.fontSize)};
|
|
1642
|
+
${yt(ze.lineHeight,Xo.fontSize)};
|
|
1643
1643
|
}
|
|
1644
1644
|
|
|
1645
1645
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1646
|
-
color: ${
|
|
1646
|
+
color: ${Xo.colorError}
|
|
1647
1647
|
}
|
|
1648
1648
|
|
|
1649
1649
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1650
|
-
color: ${
|
|
1650
|
+
color: ${Xo.disabledTextColor};
|
|
1651
1651
|
}
|
|
1652
1652
|
|
|
1653
1653
|
.ft-input-label--hidden-text {
|
|
@@ -1662,17 +1662,17 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1662
1662
|
overflow: hidden;
|
|
1663
1663
|
white-space: nowrap;
|
|
1664
1664
|
text-overflow: ellipsis;
|
|
1665
|
-
padding: ${
|
|
1666
|
-
margin: calc(${
|
|
1665
|
+
padding: ${Xo.verticalSpacing} 4px;
|
|
1666
|
+
margin: calc(${Xo.verticalSpacing} * -1) 0;
|
|
1667
1667
|
}
|
|
1668
1668
|
|
|
1669
1669
|
.ft-input-label--raised .ft-input-label--text {
|
|
1670
|
-
${
|
|
1671
|
-
${
|
|
1670
|
+
${yt(ze.fontSize,Xo.raisedFontSize)};
|
|
1671
|
+
${yt(ze.lineHeight,Xo.raisedFontSize)};
|
|
1672
1672
|
}
|
|
1673
1673
|
|
|
1674
1674
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1675
|
-
top: ${
|
|
1675
|
+
top: ${Xo.verticalSpacing};
|
|
1676
1676
|
}
|
|
1677
1677
|
|
|
1678
1678
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1685,36 +1685,36 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1685
1685
|
.ft-input-label--outlined:before {
|
|
1686
1686
|
border-left-width: 1px;
|
|
1687
1687
|
border-left-style: solid;
|
|
1688
|
-
border-radius: ${
|
|
1688
|
+
border-radius: ${Xo.borderRadiusS} 0 0 ${Xo.borderRadiusS};
|
|
1689
1689
|
}
|
|
1690
1690
|
|
|
1691
1691
|
.ft-input-label--outlined:after {
|
|
1692
1692
|
border-right-width: 1px;
|
|
1693
1693
|
border-right-style: solid;
|
|
1694
|
-
border-radius: 0 ${
|
|
1694
|
+
border-radius: 0 ${Xo.borderRadiusS} ${Xo.borderRadiusS} 0;
|
|
1695
1695
|
}
|
|
1696
1696
|
|
|
1697
1697
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1698
1698
|
padding: 2px 4px;
|
|
1699
|
-
z-index: ${
|
|
1700
|
-
background-color: ${
|
|
1701
|
-
border-radius: ${
|
|
1699
|
+
z-index: ${Xo.raisedZIndex};
|
|
1700
|
+
background-color: ${Xo.colorSurface};
|
|
1701
|
+
border-radius: ${Xo.borderRadiusS};
|
|
1702
1702
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1703
1703
|
}
|
|
1704
1704
|
|
|
1705
1705
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1706
1706
|
border-top: none;
|
|
1707
1707
|
}
|
|
1708
|
-
`;var
|
|
1709
|
-
<div class="${
|
|
1710
|
-
${this.text?
|
|
1708
|
+
`;var Qo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Go extends wt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return X`
|
|
1709
|
+
<div class="${ri(t)}">
|
|
1710
|
+
${this.text?X`
|
|
1711
1711
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1712
1712
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
1713
1713
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
1714
1714
|
</div>
|
|
1715
1715
|
`:null}
|
|
1716
1716
|
</div>
|
|
1717
|
-
`}}
|
|
1717
|
+
`}}Go.elementDefinitions={},Go.styles=[qe,Yo],Qo([o({type:String})],Go.prototype,"text",void 0),Qo([o({type:Boolean})],Go.prototype,"raised",void 0),Qo([o({type:Boolean})],Go.prototype,"outlined",void 0),Qo([o({type:Boolean})],Go.prototype,"disabled",void 0),Qo([o({type:Boolean})],Go.prototype,"error",void 0),h("ft-input-label")(Go);const ts={labelSize:xt.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:xt.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:xt.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:xt.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:xt.extend("--ft-select-selected-option-color",mt.colorOnSurface),helperColor:xt.extend("--ft-select-helper-color",mt.colorOnSurfaceMedium),optionsColor:xt.extend("--ft-select-options-color",mt.colorOnSurface),optionsZIndex:xt.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:xt.external(mt.colorSurface,"Design system"),colorOnSurfaceDisabled:xt.external(mt.colorOnSurfaceDisabled,"Design system"),colorPrimary:xt.external(mt.colorPrimary,"Design system"),borderRadiusS:xt.external(mt.borderRadiusS,"Design system"),elevation02:xt.external(mt.elevation02,"Design system"),colorError:xt.external(mt.colorError,"Design system")},es=y`
|
|
1718
1718
|
*:focus {
|
|
1719
1719
|
outline: none;
|
|
1720
1720
|
}
|
|
@@ -1728,7 +1728,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1728
1728
|
.ft-select--main-panel {
|
|
1729
1729
|
position: relative;
|
|
1730
1730
|
display: flex;
|
|
1731
|
-
height: calc(4 * ${
|
|
1731
|
+
height: calc(4 * ${ts.verticalSpacing} + ${ts.labelSize} + ${ts.selectedOptionSize});
|
|
1732
1732
|
}
|
|
1733
1733
|
|
|
1734
1734
|
.ft-select--input-panel {
|
|
@@ -1740,14 +1740,14 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1740
1740
|
padding-left: 16px;
|
|
1741
1741
|
padding-right: 8px;
|
|
1742
1742
|
gap: 8px;
|
|
1743
|
-
color: ${
|
|
1744
|
-
${
|
|
1743
|
+
color: ${ts.selectedOptionColor};
|
|
1744
|
+
${yt(li.color,ts.selectedOptionColor)};
|
|
1745
1745
|
}
|
|
1746
1746
|
|
|
1747
1747
|
.ft-select--input-panel,
|
|
1748
1748
|
.ft-select--option {
|
|
1749
|
-
${
|
|
1750
|
-
${
|
|
1749
|
+
${yt(li.opacityContentOnSurfaceHover,"0.08")};
|
|
1750
|
+
${yt(li.opacityContentOnSurfacePressed,"0.04")};
|
|
1751
1751
|
}
|
|
1752
1752
|
|
|
1753
1753
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -1757,7 +1757,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1757
1757
|
|
|
1758
1758
|
.ft-select--disabled .ft-select--input-panel,
|
|
1759
1759
|
.ft-select--disabled .ft-select--option {
|
|
1760
|
-
color: ${
|
|
1760
|
+
color: ${ts.colorOnSurfaceDisabled};
|
|
1761
1761
|
}
|
|
1762
1762
|
|
|
1763
1763
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -1766,18 +1766,18 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1766
1766
|
}
|
|
1767
1767
|
|
|
1768
1768
|
ft-input-label {
|
|
1769
|
-
${
|
|
1770
|
-
${
|
|
1771
|
-
${
|
|
1769
|
+
${yt(Xo.fontSize,ts.selectedOptionSize)};
|
|
1770
|
+
${yt(Xo.raisedFontSize,ts.labelSize)};
|
|
1771
|
+
${yt(Xo.verticalSpacing,ts.verticalSpacing)};
|
|
1772
1772
|
}
|
|
1773
1773
|
|
|
1774
1774
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1775
|
-
color: ${
|
|
1775
|
+
color: ${ts.colorPrimary};
|
|
1776
1776
|
}
|
|
1777
1777
|
|
|
1778
1778
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1779
|
-
${
|
|
1780
|
-
${
|
|
1779
|
+
${yt(Xo.borderColor,ts.colorPrimary)};
|
|
1780
|
+
${yt(Xo.textColor,ts.colorPrimary)};
|
|
1781
1781
|
}
|
|
1782
1782
|
|
|
1783
1783
|
.ft-select--selected-option {
|
|
@@ -1787,12 +1787,12 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1787
1787
|
overflow: hidden;
|
|
1788
1788
|
white-space: nowrap;
|
|
1789
1789
|
text-overflow: ellipsis;
|
|
1790
|
-
${
|
|
1791
|
-
${
|
|
1790
|
+
${yt(Ce.fontSize,ts.selectedOptionSize)};
|
|
1791
|
+
${yt(Ce.lineHeight,ts.selectedOptionSize)};
|
|
1792
1792
|
}
|
|
1793
1793
|
|
|
1794
1794
|
.ft-select--in-error .ft-select--selected-option {
|
|
1795
|
-
color: ${
|
|
1795
|
+
color: ${ts.colorError};
|
|
1796
1796
|
}
|
|
1797
1797
|
|
|
1798
1798
|
ft-icon {
|
|
@@ -1804,16 +1804,16 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1804
1804
|
}
|
|
1805
1805
|
|
|
1806
1806
|
.ft-select--filled .ft-select--input-panel {
|
|
1807
|
-
border-radius: ${
|
|
1807
|
+
border-radius: ${ts.borderRadiusS} ${ts.borderRadiusS} 0 0;
|
|
1808
1808
|
}
|
|
1809
1809
|
|
|
1810
1810
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1811
1811
|
align-self: stretch;
|
|
1812
|
-
padding-top: calc(${
|
|
1812
|
+
padding-top: calc(${ts.labelSize} + 2 * ${ts.verticalSpacing});
|
|
1813
1813
|
}
|
|
1814
1814
|
|
|
1815
1815
|
.ft-select--outlined .ft-select--input-panel {
|
|
1816
|
-
border-radius: ${
|
|
1816
|
+
border-radius: ${ts.borderRadiusS};
|
|
1817
1817
|
}
|
|
1818
1818
|
|
|
1819
1819
|
.ft-select--options {
|
|
@@ -1822,10 +1822,10 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1822
1822
|
top: 100%;
|
|
1823
1823
|
left: 0;
|
|
1824
1824
|
right: 0;
|
|
1825
|
-
color: ${
|
|
1826
|
-
background: ${
|
|
1827
|
-
z-index: ${
|
|
1828
|
-
box-shadow: ${
|
|
1825
|
+
color: ${ts.optionsColor};
|
|
1826
|
+
background: ${ts.colorSurface};
|
|
1827
|
+
z-index: ${ts.optionsZIndex};
|
|
1828
|
+
box-shadow: ${ts.elevation02};
|
|
1829
1829
|
}
|
|
1830
1830
|
|
|
1831
1831
|
.ft-select--fixed .ft-select--options {
|
|
@@ -1836,7 +1836,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1836
1836
|
|
|
1837
1837
|
.ft-select--options-displayed .ft-select--options {
|
|
1838
1838
|
display: block;
|
|
1839
|
-
max-height: ${
|
|
1839
|
+
max-height: ${ts.optionsHeight};
|
|
1840
1840
|
overflow-y: auto;
|
|
1841
1841
|
}
|
|
1842
1842
|
|
|
@@ -1855,14 +1855,14 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1855
1855
|
|
|
1856
1856
|
.ft-select--helper-text {
|
|
1857
1857
|
padding: 0 12px 0 16px;
|
|
1858
|
-
color: ${
|
|
1858
|
+
color: ${ts.helperColor};
|
|
1859
1859
|
}
|
|
1860
1860
|
|
|
1861
1861
|
.ft-select--in-error .ft-select--helper-text {
|
|
1862
|
-
color: ${
|
|
1862
|
+
color: ${ts.colorError};
|
|
1863
1863
|
}
|
|
1864
|
-
`;var
|
|
1865
|
-
<div class="${
|
|
1864
|
+
`;var is=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class os extends wt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return X``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}os.elementDefinitions={},is([o({type:String})],os.prototype,"label",void 0),is([o({type:Object,converter:t=>t})],os.prototype,"value",void 0),is([o({type:Boolean,reflect:!0})],os.prototype,"selected",void 0);class ss extends wt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,s;let r=this.hasOptionsMenuOpen,n=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":n,"ft-select--options-displayed":r,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return X`
|
|
1865
|
+
<div class="${ri(a)}" part="container">
|
|
1866
1866
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1867
1867
|
<ft-input-label text="${this.label}"
|
|
1868
1868
|
part="label"
|
|
@@ -1889,18 +1889,18 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1889
1889
|
part="options"
|
|
1890
1890
|
@keydown=${this.onOptionsKeyDown}
|
|
1891
1891
|
innerrole="listbox">
|
|
1892
|
-
${
|
|
1892
|
+
${Tt(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
1893
1893
|
</div>
|
|
1894
1894
|
</div>
|
|
1895
|
-
${this.helper?
|
|
1895
|
+
${this.helper?X`
|
|
1896
1896
|
<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
|
|
1897
1897
|
</ft-typography>`:void 0}
|
|
1898
1898
|
</div>
|
|
1899
1899
|
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1900
1900
|
@option-change=${this.updateOptionsFromSlot}
|
|
1901
1901
|
></slot>
|
|
1902
|
-
`}renderOption(t){let e=this.selectedOption===t;return
|
|
1903
|
-
<div class="${
|
|
1902
|
+
`}renderOption(t){let e=this.selectedOption===t;return X`
|
|
1903
|
+
<div class="${ri({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
1904
1904
|
part="option"
|
|
1905
1905
|
tabindex="0"
|
|
1906
1906
|
data-value="${t.value}"
|
|
@@ -1909,34 +1909,34 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1909
1909
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1910
1910
|
<span>${t.label}</span>
|
|
1911
1911
|
</div>
|
|
1912
|
-
`}updated(t){
|
|
1912
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,r;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var e,i;if(!d(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(i=this.selectedOption)||void 0===i?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}ss.elementDefinitions={"ft-input-label":Go,"ft-typography":ti,"ft-ripple":vi,"ft-icon":Li},ss.styles=[Ve,qe,es],is([o({type:String})],ss.prototype,"label",void 0),is([o({type:String})],ss.prototype,"helper",void 0),is([o({type:Boolean})],ss.prototype,"outlined",void 0),is([o({type:Boolean})],ss.prototype,"disabled",void 0),is([o({type:Boolean})],ss.prototype,"error",void 0),is([o({type:Boolean})],ss.prototype,"fixedMenuPosition",void 0),is([o({type:Array})],ss.prototype,"options",void 0),is([s()],ss.prototype,"selectedOption",void 0),is([s()],ss.prototype,"optionsDisplayed",void 0),is([s()],ss.prototype,"focusOptions",void 0),is([n(".ft-select")],ss.prototype,"container",void 0),is([n(".ft-select--options")],ss.prototype,"optionsMenu",void 0),is([n(".ft-select--input-panel")],ss.prototype,"mainPanel",void 0),is([n(".ft-select--option:first-child")],ss.prototype,"firstOption",void 0),is([n(".ft-select--option:focus")],ss.prototype,"focusedOption",void 0),is([n(".ft-select--option.ft-select--option-selected")],ss.prototype,"selectedOptionElement",void 0),is([n(".ft-select--option:last-child")],ss.prototype,"lastOption",void 0),is([n("slot")],ss.prototype,"optionsSlot",void 0),h("ft-select")(ss),h("ft-select-option")(os);const rs={display:xt.create("--ft-skeleton--display","DISPLAY","block"),width:xt.create("--ft-skeleton--width","SIZE","100%"),height:xt.create("--ft-skeleton--height","SIZE","20px"),backgroundColor:xt.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),glareWidth:xt.create("--ft-skeleton--glare-width","SIZE","200px"),glareColor:xt.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),animationDuration:xt.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),borderRadiusM:xt.external(mt.borderRadiusM,"Design system")},ns=y`
|
|
1913
1913
|
:host {
|
|
1914
|
-
width: ${
|
|
1915
|
-
height: ${
|
|
1916
|
-
display: ${
|
|
1914
|
+
width: ${rs.width};
|
|
1915
|
+
height: ${rs.height};
|
|
1916
|
+
display: ${rs.display};
|
|
1917
1917
|
overflow: hidden;
|
|
1918
|
-
border-radius: ${
|
|
1918
|
+
border-radius: ${rs.borderRadiusM};
|
|
1919
1919
|
background: linear-gradient(
|
|
1920
1920
|
90deg,
|
|
1921
1921
|
transparent,
|
|
1922
|
-
${
|
|
1923
|
-
${
|
|
1924
|
-
transparent ${
|
|
1925
|
-
), ${
|
|
1922
|
+
${rs.glareColor} calc(0.45 * ${rs.glareWidth}),
|
|
1923
|
+
${rs.glareColor} calc(0.55 * ${rs.glareWidth}),
|
|
1924
|
+
transparent ${rs.glareWidth}
|
|
1925
|
+
), ${rs.backgroundColor};
|
|
1926
1926
|
background-repeat: repeat-y;
|
|
1927
1927
|
background-size: 100vw 100vh;
|
|
1928
1928
|
background-attachment: fixed;
|
|
1929
|
-
background-position: calc(${
|
|
1930
|
-
animation: shine ${
|
|
1929
|
+
background-position: calc(${rs.glareWidth} * -1) 0;
|
|
1930
|
+
animation: shine ${rs.animationDuration} infinite;
|
|
1931
1931
|
animation-timing-function: linear;
|
|
1932
1932
|
}
|
|
1933
1933
|
|
|
1934
1934
|
@keyframes shine {
|
|
1935
1935
|
to {
|
|
1936
|
-
background-position: calc(100vw + ${
|
|
1936
|
+
background-position: calc(100vw + ${rs.glareWidth}) 0, calc(${rs.glareWidth} * -1) 0;
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
`,
|
|
1939
|
+
`,ls={height:xt.create("--ft-search-bar-height","SIZE","38px"),borderRadius:xt.extend("--ft-search-bar-border-radius",mt.borderRadiusS),mobileOpenPosition:xt.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:xt.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:xt.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:xt.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:xt.create("--ft-search-bar-mobile-open-right","SIZE","0"),desktopFiltersHeight:xt.create("--ft-search-bar-desktop-filters-height","SIZE","350px"),floatingZIndex:xt.create("--ft-search-bar-floating-components-z-index","NUMBER","3"),colorSurface:xt.external(mt.colorSurface,"Design system"),colorOnSurface:xt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:xt.external(mt.colorOnSurfaceMedium,"Design system"),colorOutline:xt.external(mt.colorOutline,"Design system"),colorPrimary:xt.external(mt.colorPrimary,"Design system"),elevation02:xt.external(mt.elevation02,"Design system"),buttonColor:xt.external(Di.color,"Button"),buttonRippleColor:xt.external(Di.rippleColor,"Button")},as=y`
|
|
1940
1940
|
* {
|
|
1941
1941
|
box-sizing: border-box;
|
|
1942
1942
|
}
|
|
@@ -1945,7 +1945,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1945
1945
|
display: flex;
|
|
1946
1946
|
flex-direction: column;
|
|
1947
1947
|
gap: 8px;
|
|
1948
|
-
color: ${
|
|
1948
|
+
color: ${ls.colorOnSurface};
|
|
1949
1949
|
outline: none;
|
|
1950
1950
|
}
|
|
1951
1951
|
|
|
@@ -1954,21 +1954,21 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1954
1954
|
}
|
|
1955
1955
|
|
|
1956
1956
|
.ft-search-bar--mobile-menu-open {
|
|
1957
|
-
position: ${
|
|
1958
|
-
top: ${
|
|
1959
|
-
bottom: ${
|
|
1960
|
-
left: ${
|
|
1961
|
-
right: ${
|
|
1962
|
-
z-index: ${
|
|
1957
|
+
position: ${ls.mobileOpenPosition};
|
|
1958
|
+
top: ${ls.mobileOpenTop};
|
|
1959
|
+
bottom: ${ls.mobileOpenBottom};
|
|
1960
|
+
left: ${ls.mobileOpenLeft};
|
|
1961
|
+
right: ${ls.mobileOpenRight};
|
|
1962
|
+
z-index: ${ls.floatingZIndex};
|
|
1963
1963
|
padding: 16px;
|
|
1964
1964
|
}
|
|
1965
1965
|
|
|
1966
1966
|
.ft-search-bar--mobile-menu-open:not(.ft-search-bar--forced-open) {
|
|
1967
|
-
background: ${
|
|
1967
|
+
background: ${ls.colorSurface};
|
|
1968
1968
|
}
|
|
1969
1969
|
|
|
1970
1970
|
.ft-search-bar--mobile-menu-open.ft-search-bar--forced-open {
|
|
1971
|
-
position: ${
|
|
1971
|
+
position: ${ls.mobileOpenPosition.get("static")};
|
|
1972
1972
|
}
|
|
1973
1973
|
|
|
1974
1974
|
.ft-search-bar {
|
|
@@ -1976,20 +1976,20 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
1976
1976
|
display: flex;
|
|
1977
1977
|
flex-direction: row;
|
|
1978
1978
|
align-items: center;
|
|
1979
|
-
height: ${
|
|
1979
|
+
height: ${ls.height};
|
|
1980
1980
|
|
|
1981
|
-
background: ${
|
|
1982
|
-
border: 1px solid ${
|
|
1983
|
-
border-radius: ${
|
|
1981
|
+
background: ${ls.colorSurface};
|
|
1982
|
+
border: 1px solid ${ls.colorOutline};
|
|
1983
|
+
border-radius: ${ls.borderRadius};
|
|
1984
1984
|
}
|
|
1985
1985
|
|
|
1986
1986
|
.ft-search-bar--skeleton {
|
|
1987
|
-
${
|
|
1988
|
-
${
|
|
1987
|
+
${yt(rs.height,ls.height)};
|
|
1988
|
+
${yt(rs.borderRadiusM,ls.borderRadius)};
|
|
1989
1989
|
}
|
|
1990
1990
|
|
|
1991
1991
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1992
|
-
border-radius: ${
|
|
1992
|
+
border-radius: ${ls.borderRadius} ${ls.borderRadius} 0 0;
|
|
1993
1993
|
}
|
|
1994
1994
|
|
|
1995
1995
|
.ft-search-bar--input-container {
|
|
@@ -2007,7 +2007,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2007
2007
|
align-self: stretch;
|
|
2008
2008
|
display: grid;
|
|
2009
2009
|
padding: 0 8px;
|
|
2010
|
-
border-radius: ${
|
|
2010
|
+
border-radius: ${ls.borderRadius};
|
|
2011
2011
|
}
|
|
2012
2012
|
|
|
2013
2013
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -2016,7 +2016,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2016
2016
|
}
|
|
2017
2017
|
|
|
2018
2018
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
2019
|
-
outline: 2px solid ${
|
|
2019
|
+
outline: 2px solid ${ls.colorPrimary};
|
|
2020
2020
|
}
|
|
2021
2021
|
|
|
2022
2022
|
.ft-search-bar--input {
|
|
@@ -2024,12 +2024,12 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2024
2024
|
flex-grow: 1;
|
|
2025
2025
|
border: none;
|
|
2026
2026
|
background-color: transparent;
|
|
2027
|
-
color: ${
|
|
2027
|
+
color: ${ls.colorOnSurface};
|
|
2028
2028
|
outline: none;
|
|
2029
2029
|
}
|
|
2030
2030
|
|
|
2031
2031
|
.ft-search-bar--input::placeholder {
|
|
2032
|
-
color: ${
|
|
2032
|
+
color: ${ls.colorOnSurfaceMedium};
|
|
2033
2033
|
}
|
|
2034
2034
|
|
|
2035
2035
|
.ft-search-bar--actions {
|
|
@@ -2039,7 +2039,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2039
2039
|
align-items: center;
|
|
2040
2040
|
height: 100%;
|
|
2041
2041
|
|
|
2042
|
-
${
|
|
2042
|
+
${yt(gi.zIndex,`calc(${ls.floatingZIndex} + 1)`)};
|
|
2043
2043
|
}
|
|
2044
2044
|
|
|
2045
2045
|
.ft-search-bar > ft-button,
|
|
@@ -2048,8 +2048,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2048
2048
|
}
|
|
2049
2049
|
|
|
2050
2050
|
.ft-search-bar--left-action {
|
|
2051
|
-
${
|
|
2052
|
-
border-right: 1px solid ${
|
|
2051
|
+
${yt(Di.borderRadius,y`calc(${ls.borderRadius} - 1px) 0 0 calc(${ls.borderRadius} - 1px)`)};
|
|
2052
|
+
border-right: 1px solid ${ls.colorOutline};
|
|
2053
2053
|
height: 100%;
|
|
2054
2054
|
}
|
|
2055
2055
|
|
|
@@ -2058,7 +2058,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2058
2058
|
}
|
|
2059
2059
|
|
|
2060
2060
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
2061
|
-
${
|
|
2061
|
+
${yt(Di.borderRadius,y`calc(${ls.borderRadius} - 1px) 0 0 0`)};
|
|
2062
2062
|
}
|
|
2063
2063
|
|
|
2064
2064
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -2068,13 +2068,13 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2068
2068
|
|
|
2069
2069
|
.ft-search-bar--separator {
|
|
2070
2070
|
height: 20px;
|
|
2071
|
-
border-right: 1px solid ${
|
|
2071
|
+
border-right: 1px solid ${ls.colorOutline};
|
|
2072
2072
|
}
|
|
2073
2073
|
|
|
2074
2074
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
2075
|
-
${
|
|
2076
|
-
${
|
|
2077
|
-
${
|
|
2075
|
+
${yt(Xo.borderColor,"transparent")};
|
|
2076
|
+
${yt(Xo.borderRadiusS,y`calc(${ls.borderRadius} - 1px)`)};
|
|
2077
|
+
${yt(ts.selectedOptionColor,ls.buttonColor)};
|
|
2078
2078
|
}
|
|
2079
2079
|
|
|
2080
2080
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -2091,17 +2091,17 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2091
2091
|
}
|
|
2092
2092
|
|
|
2093
2093
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
2094
|
-
border-radius: calc(${
|
|
2094
|
+
border-radius: calc(${ls.borderRadius} - 1px) 0 0 calc(${ls.borderRadius} - 1px);
|
|
2095
2095
|
}
|
|
2096
2096
|
|
|
2097
|
-
`,
|
|
2097
|
+
`,cs=y`
|
|
2098
2098
|
.ft-search-bar--desktop-menu .ft-search-bar--presets {
|
|
2099
2099
|
margin-right: auto;
|
|
2100
2100
|
}
|
|
2101
2101
|
|
|
2102
2102
|
.ft-search-bar--desktop-menu .ft-search-bar--presets {
|
|
2103
2103
|
min-width: 250px;
|
|
2104
|
-
${
|
|
2104
|
+
${yt(ts.optionsZIndex,"2")};
|
|
2105
2105
|
}
|
|
2106
2106
|
|
|
2107
2107
|
.ft-search-bar--desktop-menu {
|
|
@@ -2153,7 +2153,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2153
2153
|
|
|
2154
2154
|
.ft-search-bar--desktop-menu .ft-search-bar--filters-container {
|
|
2155
2155
|
display: block;
|
|
2156
|
-
height: ${
|
|
2156
|
+
height: ${ls.desktopFiltersHeight};
|
|
2157
2157
|
--ft-snap-scroll-gap: 16px;
|
|
2158
2158
|
}
|
|
2159
2159
|
|
|
@@ -2204,7 +2204,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2204
2204
|
|
|
2205
2205
|
.ft-search-bar--filter-label > :last-child {
|
|
2206
2206
|
flex-shrink: 1;
|
|
2207
|
-
color: ${
|
|
2207
|
+
color: ${ls.colorOnSurfaceMedium};
|
|
2208
2208
|
}
|
|
2209
2209
|
|
|
2210
2210
|
ft-accordion-item::part(toggle) {
|
|
@@ -2224,12 +2224,12 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2224
2224
|
.ft-search-bar--desktop-menu .ft-search-bar--launch-search {
|
|
2225
2225
|
margin: 0;
|
|
2226
2226
|
}
|
|
2227
|
-
`;class
|
|
2228
|
-
`}}
|
|
2227
|
+
`;class hs extends wt{render(){return X`
|
|
2228
|
+
`}}hs.elementDefinitions={},hs.styles=ns,h("ft-skeleton")(hs);class ps{constructor(t,i=300){this.searchBar=t,this.updateDebouncer=new e(i)}render(){const t=this.searchBar.recentSearches.filter((t=>t.toLowerCase().includes(this.searchBar.query.toLowerCase()))),e=this.searchBar.suggestions.length>0||t.length>0;return X`
|
|
2229
2229
|
<div class="ft-search-bar--suggestions ft-word-wrap ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2230
2230
|
part="suggestions-container"
|
|
2231
2231
|
@keydown=${t=>this.onSuggestKeyDown(t)}>
|
|
2232
|
-
${
|
|
2232
|
+
${Tt(t.slice(0,5),(t=>t),(t=>X`
|
|
2233
2233
|
<a href="${this.searchBar.searchRequestSerializer({...this.searchBar.request,query:t})}"
|
|
2234
2234
|
part="suggestions"
|
|
2235
2235
|
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
@@ -2247,7 +2247,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2247
2247
|
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2248
2248
|
</a>
|
|
2249
2249
|
`))}
|
|
2250
|
-
${
|
|
2250
|
+
${Tt(this.searchBar.suggestions,(t=>t.value),(t=>X`
|
|
2251
2251
|
<a href="${this.searchBar.searchRequestSerializer({...this.searchBar.request,query:t.value})}"
|
|
2252
2252
|
part="suggestions"
|
|
2253
2253
|
class="ft-search-bar--suggestion"
|
|
@@ -2259,11 +2259,11 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2259
2259
|
</a>
|
|
2260
2260
|
`))}
|
|
2261
2261
|
</div>
|
|
2262
|
-
`}update(){return new Promise(((t,e)=>{this.updateDebouncer.run((async()=>{this.searchBar.suggestions=this.searchBar.api&&this.searchBar.query.length>2?await this.searchBar.api.getSuggestions(this.searchBar.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],t()}))}))}onSuggestKeyDown(t){var e,i,o,s,r,n;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(r=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.searchBar.setQuery(e),this.searchBar.launchSearch()}removeRecentSearch(t,e){var i,o;t.preventDefault(),t.stopPropagation();let s=t.target.closest(".ft-search-bar--suggestion");const r=null!==(o=null!==(i=null==s?void 0:s.previousElementSibling)&&void 0!==i?i:null==s?void 0:s.nextElementSibling)&&void 0!==o?o:this.searchBar.input;null==r||r.focus(),this.searchBar.recentSearches=this.searchBar.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.searchBar.saveRecentSearches()}getIcon(t){const e="DOCUMENT"===t.type?
|
|
2262
|
+
`}update(){return new Promise(((t,e)=>{this.updateDebouncer.run((async()=>{this.searchBar.suggestions=this.searchBar.api&&this.searchBar.query.length>2?await this.searchBar.api.getSuggestions(this.searchBar.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],t()}))}))}onSuggestKeyDown(t){var e,i,o,s,r,n;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(r=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.searchBar.setQuery(e),this.searchBar.launchSearch()}removeRecentSearch(t,e){var i,o;t.preventDefault(),t.stopPropagation();let s=t.target.closest(".ft-search-bar--suggestion");const r=null!==(o=null!==(i=null==s?void 0:s.previousElementSibling)&&void 0!==i?i:null==s?void 0:s.nextElementSibling)&&void 0!==o?o:this.searchBar.input;null==r||r.focus(),this.searchBar.recentSearches=this.searchBar.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.searchBar.saveRecentSearches()}getIcon(t){const e="DOCUMENT"===t.type?Fi.file_format:Fi.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?Ci.BOOK:Ci.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,r;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[n,l]=((null!==(i=Bi.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(r=null!==(s=null!==(o=zi.get(l))&&void 0!==o?o:zi.get(e))&&void 0!==s?s:zi.get(n))&&void 0!==r?r:Ei.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=Ci.TOPICS}return X`
|
|
2263
2263
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2264
2264
|
${i}
|
|
2265
2265
|
</ft-icon>
|
|
2266
|
-
`}getFocusedSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion:focus-within")}getLastSuggestionElement(){let t=this.searchBar.querySelectorAll(".ft-search-bar--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}}
|
|
2266
|
+
`}getFocusedSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion:focus-within")}getLastSuggestionElement(){let t=this.searchBar.querySelectorAll(".ft-search-bar--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}}ps.styles=[St,y`
|
|
2267
2267
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2268
2268
|
flex-grow: 1;
|
|
2269
2269
|
flex-shrink: 1;
|
|
@@ -2272,7 +2272,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2272
2272
|
}
|
|
2273
2273
|
|
|
2274
2274
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2275
|
-
border-top: 1px solid ${
|
|
2275
|
+
border-top: 1px solid ${ls.colorOutline};
|
|
2276
2276
|
}
|
|
2277
2277
|
|
|
2278
2278
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2282,15 +2282,15 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2282
2282
|
.ft-search-bar--floating-panel,
|
|
2283
2283
|
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2284
2284
|
position: absolute;
|
|
2285
|
-
z-index: ${
|
|
2285
|
+
z-index: ${ls.floatingZIndex};
|
|
2286
2286
|
top: 100%;
|
|
2287
2287
|
left: -1px;
|
|
2288
2288
|
right: -1px;
|
|
2289
2289
|
display: none;
|
|
2290
|
-
background: ${
|
|
2291
|
-
border: 1px solid ${
|
|
2292
|
-
border-radius: 0 0 ${
|
|
2293
|
-
box-shadow: ${
|
|
2290
|
+
background: ${ls.colorSurface};
|
|
2291
|
+
border: 1px solid ${ls.colorOutline};
|
|
2292
|
+
border-radius: 0 0 ${ls.borderRadius} ${ls.borderRadius};
|
|
2293
|
+
box-shadow: ${ls.elevation02};
|
|
2294
2294
|
outline: none;
|
|
2295
2295
|
}
|
|
2296
2296
|
|
|
@@ -2310,7 +2310,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2310
2310
|
padding: 8px;
|
|
2311
2311
|
gap: 8px;
|
|
2312
2312
|
cursor: pointer;
|
|
2313
|
-
color: ${
|
|
2313
|
+
color: ${ls.colorOnSurface};
|
|
2314
2314
|
min-height: 52px;
|
|
2315
2315
|
}
|
|
2316
2316
|
|
|
@@ -2327,7 +2327,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2327
2327
|
}
|
|
2328
2328
|
|
|
2329
2329
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2330
|
-
border-top: 1px solid ${
|
|
2330
|
+
border-top: 1px solid ${ls.colorOutline};
|
|
2331
2331
|
}
|
|
2332
2332
|
|
|
2333
2333
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2335,8 +2335,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2335
2335
|
flex-grow: 1;
|
|
2336
2336
|
flex-shrink: 1;
|
|
2337
2337
|
}
|
|
2338
|
-
`];class
|
|
2339
|
-
${this.searchBar.hasLocaleSelector()&&(this.searchBar.hasFacets()||t)?
|
|
2338
|
+
`];class ds{constructor(t){this.searchBar=t}render(){if(!this.searchBar.hasLocaleSelector()&&!this.searchBar.hasFacets())return X``;const t=this.searchBar.isMobile(),e=!t&&this.searchBar.dense||t&&this.searchBar.isMobileMenuOpen(),i=X`
|
|
2339
|
+
${this.searchBar.hasLocaleSelector()&&(this.searchBar.hasFacets()||t)?X`
|
|
2340
2340
|
<ft-chip part="selected-filters selected-filter-ft-locale"
|
|
2341
2341
|
?dense=${this.searchBar.dense&&!t}
|
|
2342
2342
|
?clickable=${t}
|
|
@@ -2346,46 +2346,46 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2346
2346
|
${this.getLocaleLabel(this.searchBar.contentLocale)}
|
|
2347
2347
|
</ft-chip>
|
|
2348
2348
|
`:null}
|
|
2349
|
-
${
|
|
2349
|
+
${Tt(this.searchBar.facets,(t=>t.key),(i=>{const o=function(t){return ei(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(i);return Tt(o,(s=>{let r=i.label+": "+function(t){return ii(t).split("|").join(" > ")}(s);const n=i.key.replace(":","-"),l=X`
|
|
2350
2350
|
<ft-chip
|
|
2351
2351
|
part="selected-filters selected-filter-${n}"
|
|
2352
2352
|
?dense=${this.searchBar.dense&&!t}
|
|
2353
2353
|
?clickable=${t}
|
|
2354
2354
|
?removable=${!t}
|
|
2355
|
-
icon=${t?
|
|
2355
|
+
icon=${t?Q:"close"}
|
|
2356
2356
|
label="${r}"
|
|
2357
|
-
title=${e?r:
|
|
2357
|
+
title=${e?r:Q}
|
|
2358
2358
|
@click=${()=>this.openMobileFilters(i.key)}
|
|
2359
2359
|
@icon-click=${()=>this.searchBar.setFilter(i.key,o.filter((t=>t!==s)))}
|
|
2360
2360
|
data-key="${i.key}"
|
|
2361
2361
|
data-value="${s}">
|
|
2362
|
-
${function(t){return
|
|
2362
|
+
${function(t){return ii(t).split("|").pop()}(s)}
|
|
2363
2363
|
</ft-chip>
|
|
2364
|
-
`;return e?l:
|
|
2364
|
+
`;return e?l:X`
|
|
2365
2365
|
<ft-tooltip inline text="${r}">
|
|
2366
2366
|
${l}
|
|
2367
2367
|
</ft-tooltip>
|
|
2368
2368
|
`}))}))}
|
|
2369
|
-
${t?
|
|
2369
|
+
${t?X`
|
|
2370
2370
|
<ft-chip part="selected-filters mobile-filters-opener"
|
|
2371
2371
|
icon="add"
|
|
2372
2372
|
clickable
|
|
2373
2373
|
@click=${()=>{this.searchBar.mobileMenuOpen=!0,this.searchBar.displayFacets=!0}}>
|
|
2374
2374
|
${this.searchBar.labelResolver.resolve("filtersButton")}
|
|
2375
2375
|
</ft-chip>
|
|
2376
|
-
`:
|
|
2377
|
-
`;return e?
|
|
2376
|
+
`:Q}
|
|
2377
|
+
`;return e?X`
|
|
2378
2378
|
<ft-snap-scroll horizontal controls hideScrollbar limitSize
|
|
2379
2379
|
class="ft-search-bar--selected-filters"
|
|
2380
2380
|
part="selected-filters-container"
|
|
2381
2381
|
exportpartsPrefix="selected-filters-container">
|
|
2382
2382
|
${i}
|
|
2383
2383
|
</ft-snap-scroll>
|
|
2384
|
-
`:
|
|
2384
|
+
`:X`
|
|
2385
2385
|
<div class="ft-search-bar--selected-filters" part="selected-filters-container">
|
|
2386
2386
|
${i}
|
|
2387
2387
|
</div>
|
|
2388
|
-
`}openMobileFilters(t){this.searchBar.isMobile()&&(this.searchBar.mobileMenuOpen=!0,this.searchBar.displayFacets=!0,this.searchBar.scrollToFacet=t)}getLocaleLabel(t){var e;return null!==(e=this.searchBar.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}}
|
|
2388
|
+
`}openMobileFilters(t){this.searchBar.isMobile()&&(this.searchBar.mobileMenuOpen=!0,this.searchBar.displayFacets=!0,this.searchBar.scrollToFacet=t)}getLocaleLabel(t){var e;return null!==(e=this.searchBar.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}}ds.styles=y`
|
|
2389
2389
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2390
2390
|
flex-shrink: 0;
|
|
2391
2391
|
display: flex;
|
|
@@ -2396,7 +2396,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2396
2396
|
|
|
2397
2397
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2398
2398
|
overflow: hidden;
|
|
2399
|
-
${
|
|
2399
|
+
${yt(fo.gap,"4px")};
|
|
2400
2400
|
}
|
|
2401
2401
|
|
|
2402
2402
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -2404,8 +2404,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2404
2404
|
}
|
|
2405
2405
|
|
|
2406
2406
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2407
|
-
${
|
|
2408
|
-
${
|
|
2407
|
+
${yt(To.iconSize,"17px")};
|
|
2408
|
+
${yt(To.fontSize,"12px")};
|
|
2409
2409
|
}
|
|
2410
2410
|
|
|
2411
2411
|
.ft-search-bar--selected-filters * {
|
|
@@ -2415,8 +2415,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2415
2415
|
.ft-search-bar--selected-filters ft-chip {
|
|
2416
2416
|
flex-grow: 0;
|
|
2417
2417
|
}
|
|
2418
|
-
`;class
|
|
2419
|
-
<div class="${
|
|
2418
|
+
`;class fs{constructor(t,e,i){this.searchBar=t,this.selectedFacetsManager=null!=e?e:new ds(t),this.suggestManager=null!=i?i:new ps(t)}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--mobile":!0,"ft-search-bar--mobile-menu-open":this.searchBar.isMobileMenuOpen(),"ft-search-bar--forced-open":this.searchBar.forceMobileMenuOpen};return X`
|
|
2419
|
+
<div class="${ri(t)}" part="container" tabindex="-1">
|
|
2420
2420
|
<div class="ft-search-bar">
|
|
2421
2421
|
<div class="ft-search-bar--input-container" part="input-container">
|
|
2422
2422
|
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
@@ -2433,18 +2433,18 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2433
2433
|
</div>
|
|
2434
2434
|
${this.searchBar.displayFacets?this.searchBar.renderFacetsActions():this.selectedFacetsManager.render()}
|
|
2435
2435
|
${this.searchBar.displayFacets?this.searchBar.renderMobileFacets():this.suggestManager.render()}
|
|
2436
|
-
${this.searchBar.isMobileMenuOpen()||this.searchBar.displayFacets?
|
|
2436
|
+
${this.searchBar.isMobileMenuOpen()||this.searchBar.displayFacets?X`
|
|
2437
2437
|
<ft-button class="ft-search-bar--launch-search"
|
|
2438
2438
|
part="launch-search-in-panel"
|
|
2439
2439
|
icon="search"
|
|
2440
2440
|
@click=${this.searchBar.launchSearch}>
|
|
2441
2441
|
${this.searchBar.labelResolver.resolve("searchButton")}
|
|
2442
2442
|
</ft-button>
|
|
2443
|
-
`:
|
|
2443
|
+
`:Q}
|
|
2444
2444
|
</div>
|
|
2445
|
-
`}renderMobileSearchBarButtons(){const t=this.searchBar.query||this.searchBar.isMobileMenuOpen()&&!this.searchBar.forceMobileMenuOpen;return
|
|
2445
|
+
`}renderMobileSearchBarButtons(){const t=this.searchBar.query||this.searchBar.isMobileMenuOpen()&&!this.searchBar.forceMobileMenuOpen;return X`
|
|
2446
2446
|
<div class="ft-search-bar--actions" part="search-bar-actions">
|
|
2447
|
-
${t?
|
|
2447
|
+
${t?X`
|
|
2448
2448
|
<ft-button class="ft-search-bar--clear-query"
|
|
2449
2449
|
part="clear-query"
|
|
2450
2450
|
icon="close"
|
|
@@ -2454,7 +2454,7 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2454
2454
|
@click=${()=>{this.searchBar.setQuery(""),this.searchBar.mobileMenuOpen=!1,this.searchBar.displayFacets=!1}}
|
|
2455
2455
|
></ft-button>
|
|
2456
2456
|
<div class="ft-search-bar--separator"></div>
|
|
2457
|
-
`:
|
|
2457
|
+
`:Q}
|
|
2458
2458
|
<ft-button class="ft-search-bar--launch-search"
|
|
2459
2459
|
part="launch-search-in-bar"
|
|
2460
2460
|
icon="search"
|
|
@@ -2464,15 +2464,15 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2464
2464
|
@click=${()=>{var t;return this.searchBar.isMobileMenuOpen()?this.searchBar.launchSearch():null===(t=this.searchBar.input)||void 0===t?void 0:t.focus()}}
|
|
2465
2465
|
></ft-button>
|
|
2466
2466
|
</div>
|
|
2467
|
-
`}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}
|
|
2467
|
+
`}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}fs.styles=y`
|
|
2468
2468
|
|
|
2469
|
-
`;class
|
|
2470
|
-
<div class="${
|
|
2469
|
+
`;class us{constructor(t,e,i){this.searchBar=t,this.selectedFacetsManager=null!=e?e:new ds(t),this.suggestManager=null!=i?i:new ps(t)}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":this.searchBar.dense,"ft-search-bar--desktop":!0,"ft-search-bar--floating-panel-open":this.searchBar.displayFacets&&!this.searchBar.forceMenuOpen,"ft-search-bar--forced-open":this.searchBar.forceMenuOpen};return X`
|
|
2470
|
+
<div class="${ri(t)}" part="container" tabindex="-1">
|
|
2471
2471
|
<div class="ft-search-bar" part="search-bar">
|
|
2472
2472
|
${this.renderSearchBarLeftAction()}
|
|
2473
2473
|
<div class="ft-search-bar--input-container" part="input-container" tabindex="-1">
|
|
2474
2474
|
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
2475
|
-
${this.searchBar.dense?this.selectedFacetsManager.render():
|
|
2475
|
+
${this.searchBar.dense?this.selectedFacetsManager.render():Q}
|
|
2476
2476
|
<input class="ft-search-bar--input ft-typography--body2"
|
|
2477
2477
|
part="input"
|
|
2478
2478
|
type="text"
|
|
@@ -2486,9 +2486,9 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2486
2486
|
${this.renderDesktopSearchBarButtons()}
|
|
2487
2487
|
${this.searchBar.renderDesktopFloatingMenu()}
|
|
2488
2488
|
</div>
|
|
2489
|
-
${this.searchBar.dense?
|
|
2489
|
+
${this.searchBar.dense?Q:this.searchBar.forceMenuOpen?this.searchBar.renderDesktopMenu():this.selectedFacetsManager.render()}
|
|
2490
2490
|
</div>
|
|
2491
|
-
`}renderSearchBarLeftAction(){return this.searchBar.hasFacets()?this.searchBar.forceMenuOpen?
|
|
2491
|
+
`}renderSearchBarLeftAction(){return this.searchBar.hasFacets()?this.searchBar.forceMenuOpen?Q:X`
|
|
2492
2492
|
<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action"
|
|
2493
2493
|
part="filters-opener"
|
|
2494
2494
|
trailingIcon
|
|
@@ -2497,23 +2497,23 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2497
2497
|
@focusin=${t=>t.stopPropagation()}>
|
|
2498
2498
|
${this.searchBar.labelResolver.resolve("filtersButton")}
|
|
2499
2499
|
</ft-button>
|
|
2500
|
-
`:this.searchBar.hasLocaleSelector()?
|
|
2500
|
+
`:this.searchBar.hasLocaleSelector()?X`
|
|
2501
2501
|
<ft-select outlined
|
|
2502
2502
|
class="ft-search-bar--content-locale ft-search-bar--left-action"
|
|
2503
2503
|
part="content-locale select-ft-locale"
|
|
2504
2504
|
.exportpartsPrefixes=${["content-locale","select-ft-locale"]}
|
|
2505
2505
|
@change=${t=>this.searchBar.contentLocale=null==t.detail?void 0:t.detail}>
|
|
2506
|
-
${
|
|
2506
|
+
${Tt(this.searchBar.availableContentLocales,(t=>t.lang),(t=>X`
|
|
2507
2507
|
<ft-select-option .value=${t.lang}
|
|
2508
2508
|
label="${t.label}"
|
|
2509
2509
|
?selected=${t.lang===this.searchBar.contentLocale}>
|
|
2510
2510
|
</ft-select-option>
|
|
2511
2511
|
`))}
|
|
2512
2512
|
</ft-select>
|
|
2513
|
-
`:
|
|
2513
|
+
`:Q}renderDesktopSearchBarButtons(){return X`
|
|
2514
2514
|
<div class="ft-search-bar--actions"
|
|
2515
2515
|
part="search-bar-actions">
|
|
2516
|
-
${this.searchBar.query?
|
|
2516
|
+
${this.searchBar.query?X`
|
|
2517
2517
|
<ft-button class="ft-search-bar--clear-query"
|
|
2518
2518
|
part="clear-query"
|
|
2519
2519
|
icon="close"
|
|
@@ -2531,17 +2531,17 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2531
2531
|
@click=${()=>this.searchBar.launchSearch()}
|
|
2532
2532
|
></ft-button>
|
|
2533
2533
|
</div>
|
|
2534
|
-
`}onSearchBarKeyDown(t){var e;switch(t.key){case"Escape":this.searchBar.mobileMenuOpen=!1,null===(e=this.searchBar.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.suggestManager.focusFirstSuggestion()}}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}
|
|
2534
|
+
`}onSearchBarKeyDown(t){var e;switch(t.key){case"Escape":this.searchBar.mobileMenuOpen=!1,null===(e=this.searchBar.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.suggestManager.focusFirstSuggestion()}}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}us.styles=y`
|
|
2535
2535
|
|
|
2536
|
-
`;var
|
|
2536
|
+
`;var bs=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const vs={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove",back:"Back"};class gs extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class xs extends CustomEvent{constructor(t){super("change",{detail:t})}}const ys=()=>{};class ms extends wt{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new Ot(vs,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=_t.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.updateFacetsDebouncer=new e(500),this.suggestManager=new ps(this),this.selectedFacetsManager=new ds(this),this.desktopSearchBarManager=new us(this),this.mobileSearchBarManager=new fs(this),this.initDataDebouncer=new e(10),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile()||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>t.values.length>0&&!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===_t.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return null!=this.presets&&this.presets.length>0}get hasPriors(){return null!=this.priors&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}focusInput(){this.input?this.input.focus():setTimeout((()=>this.focusInput()),50)}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return X`
|
|
2537
2537
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2538
2538
|
${this.renderSearchBar()}
|
|
2539
|
-
`}renderSearchBar(){return this.facetsInitialized&&this.availableContentLocalesInitialized?this.isMobile()?this.mobileSearchBarManager.render():this.desktopSearchBarManager.render():
|
|
2539
|
+
`}renderSearchBar(){return this.facetsInitialized&&this.availableContentLocalesInitialized?this.isMobile()?this.mobileSearchBarManager.render():this.desktopSearchBarManager.render():X`
|
|
2540
2540
|
<ft-skeleton class="ft-search-bar--container ft-search-bar--skeleton" part="loader"
|
|
2541
2541
|
tabindex="-1"></ft-skeleton>
|
|
2542
|
-
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return
|
|
2542
|
+
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return X`
|
|
2543
2543
|
<ft-accordion class="ft-search-bar--filters-container">
|
|
2544
|
-
${this.hasLocaleSelector()?
|
|
2544
|
+
${this.hasLocaleSelector()?X`
|
|
2545
2545
|
<ft-accordion-item data-facet-key="ft:locale">
|
|
2546
2546
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2547
2547
|
<ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}
|
|
@@ -2561,12 +2561,12 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2561
2561
|
></ft-filter>
|
|
2562
2562
|
</ft-accordion-item>
|
|
2563
2563
|
`:null}
|
|
2564
|
-
${
|
|
2564
|
+
${Tt(this.facets,(t=>t.key),(t=>{const e=si(t),i=t.key.replace(":","-");return t.rootNodes.length>0?X`
|
|
2565
2565
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2566
2566
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2567
2567
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2568
2568
|
<ft-typography variant="body2">
|
|
2569
|
-
${function(t){return
|
|
2569
|
+
${function(t){return ei(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2570
2570
|
</ft-typography>
|
|
2571
2571
|
</div>
|
|
2572
2572
|
<ft-filter
|
|
@@ -2584,14 +2584,14 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2584
2584
|
@change=${t=>this.setFilter(e.id,t.detail)}
|
|
2585
2585
|
></ft-filter>
|
|
2586
2586
|
</ft-accordion-item>
|
|
2587
|
-
`:
|
|
2587
|
+
`:Q}))}
|
|
2588
2588
|
</ft-accordion>
|
|
2589
|
-
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopMenu(){return this.hasFacets()?
|
|
2589
|
+
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopMenu(){return this.hasFacets()?X`
|
|
2590
2590
|
<div class="ft-search-bar--desktop-menu">
|
|
2591
2591
|
${this.renderFacetsActions()}
|
|
2592
2592
|
${this.renderDesktopFacets()}
|
|
2593
2593
|
<div class="ft-search-bar--facets-actions">
|
|
2594
|
-
${this.forceMenuOpen?this.renderDesktopClearFilters():
|
|
2594
|
+
${this.forceMenuOpen?this.renderDesktopClearFilters():Q}
|
|
2595
2595
|
<ft-button class="ft-search-bar--launch-search"
|
|
2596
2596
|
part="launch-search-in-panel"
|
|
2597
2597
|
icon="search"
|
|
@@ -2600,37 +2600,37 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2600
2600
|
</ft-button>
|
|
2601
2601
|
</div>
|
|
2602
2602
|
</div>
|
|
2603
|
-
`:
|
|
2603
|
+
`:Q}renderFacetsActions(){var t;return X`
|
|
2604
2604
|
<div class="ft-search-bar--facets-actions">
|
|
2605
|
-
${this.hasPresets?
|
|
2605
|
+
${this.hasPresets?X`
|
|
2606
2606
|
<ft-select
|
|
2607
2607
|
class="ft-search-bar--presets"
|
|
2608
2608
|
part="presets"
|
|
2609
2609
|
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2610
2610
|
outlined
|
|
2611
2611
|
@change=${t=>this.selectedPreset=t.detail}>
|
|
2612
|
-
${
|
|
2612
|
+
${Tt(null!==(t=this.presets)&&void 0!==t?t:[],(t=>t.name),(t=>X`
|
|
2613
2613
|
<ft-select-option value="${t.name}"
|
|
2614
2614
|
label="${t.name}"
|
|
2615
2615
|
?selected=${t.name===this.selectedPreset}>
|
|
2616
2616
|
</ft-select-option>
|
|
2617
2617
|
`))}
|
|
2618
2618
|
</ft-select>
|
|
2619
|
-
`:
|
|
2619
|
+
`:Q}
|
|
2620
2620
|
<slot name="facets-actions"></slot>
|
|
2621
|
-
${this.forceMenuOpen&&!this.isMobile()?
|
|
2621
|
+
${this.forceMenuOpen&&!this.isMobile()?Q:this.renderDesktopClearFilters()}
|
|
2622
2622
|
</div>
|
|
2623
|
-
`}renderDesktopClearFilters(){return this.searchFilters.length>0?
|
|
2623
|
+
`}renderDesktopClearFilters(){return this.searchFilters.length>0?X`
|
|
2624
2624
|
<ft-button part="facets-actions"
|
|
2625
2625
|
@click=${this.clearFilters}>
|
|
2626
2626
|
${this.labelResolver.resolve("clearFilters")}
|
|
2627
2627
|
</ft-button>
|
|
2628
|
-
`:
|
|
2628
|
+
`:Q}renderDesktopFacets(){return this.hasFacets()?X`
|
|
2629
2629
|
<ft-snap-scroll horizontal limitSize controls
|
|
2630
2630
|
class="ft-search-bar--filters-container"
|
|
2631
2631
|
part="filters-container"
|
|
2632
2632
|
exportpartsPrefix="filters-container">
|
|
2633
|
-
${this.hasLocaleSelector()?
|
|
2633
|
+
${this.hasLocaleSelector()?X`
|
|
2634
2634
|
<ft-filter
|
|
2635
2635
|
id="ft:locale"
|
|
2636
2636
|
class="ft-search-bar--content-locale"
|
|
@@ -2641,8 +2641,8 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2641
2641
|
.options=${this.contentLocalesAsFilterOptions()}
|
|
2642
2642
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2643
2643
|
></ft-filter>
|
|
2644
|
-
`:
|
|
2645
|
-
${
|
|
2644
|
+
`:Q}
|
|
2645
|
+
${Tt(this.facets,(t=>t.key),(t=>{const e=si(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0})),o=t.key.replace(":","-");return X`
|
|
2646
2646
|
<ft-filter
|
|
2647
2647
|
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2648
2648
|
part="filters filter filter-${o}"
|
|
@@ -2661,10 +2661,10 @@ class ki extends Ft{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
2661
2661
|
></ft-filter>
|
|
2662
2662
|
`}))}
|
|
2663
2663
|
</ft-snap-scroll>
|
|
2664
|
-
`:
|
|
2664
|
+
`:Q}async firstUpdated(t){super.firstUpdated(t),this.initApi(),window.addEventListener("storage",(t=>{t.key===this.recentSearchesStorageKey&&this.initRecentSearches()}))}update(t){var e,i,o,s,r;if(t.has("labels")&&(this.labelResolver=new Ot(vs,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),t.has("presets")&&(null!==(i=this.presets)&&void 0!==i?i:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>ii(t))))))),t.has("selectedPreset")){const t=(null!==(o=this.presets)&&void 0!==o?o:[]).find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}t.has("contentLocale")&&null!=this.contentLocale&&(this.knownFacetLabels=new Map),["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(r=(null!==(s=this.presets)&&void 0!==s?s:[]).find((t=>this.compareRequests(t,this.request))))||void 0===r?void 0:r.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi()),t.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","searchFilters","displayedFilters"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.suggestManager.update(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new xs(this.request))}initSearchData(){this.availableContentLocalesInitialized=!1,this.facetsInitialized=!1,this.initDataDebouncer.run((()=>{var t;null===(t=this.api)||void 0===t||t.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[])).then((t=>{this.availableContentLocales=t,this.availableContentLocalesInitialized=!0})),this.retrieveFacetsFromSearch().then((()=>this.facetsInitialized=!0))}))}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout((()=>this.initApi()),10))}updateFacets(){this.api&&this.facetsInitialized&&(this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{await this.retrieveFacetsFromSearch(),this.facetsLoaded=!0}))):this.facets=[])}async retrieveFacetsFromSearch(){var t;const e=new Map;await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets.forEach((t=>{this.knownFacetLabels.set(t.key,t.label),e.set(t.key,t)})))).catch(ys)),this.facets=[];for(let t of this.facetsRequest)e.has(t.id)?this.facets.push(e.get(t.id)):this.knownFacetLabels.has(t.id)&&this.facets.push({key:t.id,label:this.knownFacetLabels.get(t.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1})}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new gs(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var t;this.recentSearches=JSON.parse(null!==(t=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==t?t:"[]")}saveRecentSearches(){const t=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,t),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:t,storageArea:window.localStorage,url:window.location.href}))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&ei(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>ei(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}querySelector(t){return this.shadowRoot.querySelector(t)}querySelectorAll(t){return this.shadowRoot.querySelectorAll(t)}renderDesktopFloatingMenu(){return this.forceMenuOpen?Q:X`
|
|
2665
2665
|
<div class="ft-search-bar--floating-panel"
|
|
2666
2666
|
@keyup=${this.onFloatingContainerKeyUp}
|
|
2667
2667
|
part="floating-panel"
|
|
2668
2668
|
tabindex="-1">
|
|
2669
2669
|
${this.renderDesktopMenu()}
|
|
2670
|
-
</div>`}}
|
|
2670
|
+
</div>`}}ms.elementDefinitions={"ft-accordion":Ro,"ft-accordion-item":Po,"ft-button":_i,"ft-chip":Jo,"ft-filter":zo,"ft-filter-option":Mo,"ft-icon":Li,"ft-ripple":vi,"ft-select":ss,"ft-select-option":os,"ft-size-watcher":Wt,"ft-skeleton":hs,"ft-snap-scroll":go,"ft-tooltip":mi,"ft-typography":ti},ms.styles=[Ve,as,cs,ds.styles,ps.styles],bs([o({type:Boolean})],ms.prototype,"dense",void 0),bs([o()],ms.prototype,"mode",void 0),bs([o({type:Boolean})],ms.prototype,"forceMobileMenuOpen",void 0),bs([o({type:Boolean})],ms.prototype,"forceMenuOpen",void 0),bs([o()],ms.prototype,"baseUrl",void 0),bs([o()],ms.prototype,"apiIntegrationIdentifier",void 0),bs([o()],ms.prototype,"contentLocale",void 0),bs([s()],ms.prototype,"availableContentLocales",void 0),bs([s()],ms.prototype,"availableContentLocalesInitialized",void 0),bs([o()],ms.prototype,"uiLocale",void 0),bs([p({})],ms.prototype,"labels",void 0),bs([p([])],ms.prototype,"displayedFilters",void 0),bs([p([])],ms.prototype,"presets",void 0),bs([o({type:String,reflect:!0})],ms.prototype,"selectedPreset",void 0),bs([p([])],ms.prototype,"priors",void 0),bs([o()],ms.prototype,"searchRequestSerializer",void 0),bs([s()],ms.prototype,"searchFilters",void 0),bs([s()],ms.prototype,"sizeCategory",void 0),bs([s()],ms.prototype,"displayFacets",void 0),bs([s()],ms.prototype,"mobileMenuOpen",void 0),bs([s()],ms.prototype,"facets",void 0),bs([s()],ms.prototype,"facetsInitialized",void 0),bs([n(".ft-search-bar--container")],ms.prototype,"container",void 0),bs([n(".ft-search-bar--filters-opener")],ms.prototype,"filtersOpener",void 0),bs([n(".ft-search-bar--floating-panel")],ms.prototype,"floatingContainer",void 0),bs([n("ft-snap-scroll.ft-search-bar--filters-container")],ms.prototype,"scrollingFiltersContainer",void 0),bs([n(".ft-search-bar--input")],ms.prototype,"input",void 0),bs([s()],ms.prototype,"query",void 0),bs([s()],ms.prototype,"suggestions",void 0),bs([s()],ms.prototype,"recentSearches",void 0),bs([s()],ms.prototype,"scrollToFacet",void 0),bs([s()],ms.prototype,"api",void 0),h("ft-search-bar")(ms),t.DEFAULT_LABELS=vs,t.FtSearchBar=ms,t.FtSearchBarCssVariables=ls,t.LaunchSearchEvent=gs,t.SearchStateChangeEvent=xs,t.facetsCss=cs,t.searchBarCss=as,Object.defineProperty(t,"i",{value:!0})}({});
|