@fluid-topics/ft-search-bar 0.2.4 → 0.2.6
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.d.ts +3 -1
- package/build/ft-search-bar.inline-styles.js +307 -307
- package/build/ft-search-bar.js +12 -2
- package/build/ft-search-bar.light.js +298 -298
- package/build/ft-search-bar.min.js +304 -304
- package/package.json +15 -15
|
@@ -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,n=new WeakMap,r=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&&(r.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.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=r.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):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.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 n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,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 n{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 r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(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,n=new WeakMap,r=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&&(r.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.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=r.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):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.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 n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,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 n{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 r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(vi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class t{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -60,19 +60,19 @@ var r;const l=null!=(null===(r=window.HTMLSlotElement)||void 0===r?void 0:r.prot
|
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/;var y;const m=window.trustedTypes,$=m?m.emptyScript:"",w=window.reactiveElementPolyfillSupport,k={toAttribute(t,e){switch(e){case Boolean:t=t?$: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}},S=(t,e)=>e!==t&&(e==e||t==t),O={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:S};class C extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Eh(i,e);void 0!==o&&(this._$Eu.set(o,i),t.push(o))})),t}static createProperty(t,e=O){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)||O}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._$Eu=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(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).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._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.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 g(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||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._$Eg)||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)}_$ES(t,e,i=O){var o,s;const n=this.constructor._$Eh(t,i);if(void 0!==n&&!0===i.reflect){const r=(null!==(s=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==s?s:k.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,e){var i,o,s;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(s=null!==(o=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==s?s:k.fromAttribute;this._$Ei=r,this[r]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||S)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$
|
|
63
|
+
*/;var y;const m=window.trustedTypes,$=m?m.emptyScript:"",w=window.reactiveElementPolyfillSupport,k={toAttribute(t,e){switch(e){case Boolean:t=t?$: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}},S=(t,e)=>e!==t&&(e==e||t==t),O={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:S};class C extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Eh(i,e);void 0!==o&&(this._$Eu.set(o,i),t.push(o))})),t}static createProperty(t,e=O){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)||O}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._$Eu=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(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).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._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.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 g(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||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._$Eg)||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)}_$ES(t,e,i=O){var o,s;const n=this.constructor._$Eh(t,i);if(void 0!==n&&!0===i.reflect){const r=(null!==(s=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==s?s:k.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,e){var i,o,s;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(s=null!==(o=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==s?s:k.fromAttribute;this._$Ei=r,this[r]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||S)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}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._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||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._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}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 z;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.
|
|
69
|
+
var z;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.3.2");const E=globalThis.trustedTypes,B=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,M=`lit$${(Math.random()+"").slice(9)}$`,N="?"+M,F=`<${N}>`,R=document,L=(t="")=>R.createComment(t),D=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>{var e;return j(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,P=/>/g,A=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,_=/'/g,H=/"/g,Z=/^(?:script|style|textarea|title)$/i,K=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),W=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),q=new WeakMap,J=R.createTreeWalker(R,129,null,!1),X=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=U;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===U?"!--"===a[1]?r=T:void 0!==a[1]?r=P:void 0!==a[2]?(Z.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=A):void 0!==a[3]&&(r=A):r===A?">"===a[0]?(r=null!=s?s:U,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?A:'"'===a[3]?H:_):r===H||r===_?r=A:r===T||r===P?r=U:(r=A,s=void 0);const p=r===A&&t[e+1].startsWith("/>")?" ":"";n+=r===U?i+F:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+M+p):i+M+(-2===c?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==B?B.createHTML(l):l,o]};class Y{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,c]=X(t,e);if(this.el=Y.createElement(a,i),J.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=J.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(M)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(M),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?it:"?"===e[1]?st:"@"===e[1]?nt:et})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Z.test(o.tagName)){const t=o.textContent.split(M),e=t.length-1;if(e>0){o.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),J.nextNode(),l.push({type:2,index:++s});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===N)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(M,t+1));)l.push({type:7,index:s}),t+=M.length-1}s++}}static createElement(t,e){const i=R.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){var s,n,r,l;if(e===W)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=D(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=Q(t,a._$AS(t,e.values),a,o)),e}class G{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:R).importNode(i,!0);J.currentNode=s;let n=J.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new tt(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new rt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=J.nextNode(),r++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{constructor(t,e,i,o){var s;this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=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._$Cg}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=Q(this,t,e),D(t)?t===V||null==t||""===t?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==W&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):I(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==V&&D(this._$AH)?this._$AA.nextSibling.data=t:this.k(R.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Y.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new G(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new Y(t)),e}S(t){j(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 tt(this.M(L()),this.M(L()),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._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class et{constructor(t,e,i,o,s){this.type=1,this._$AH=V,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=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=Q(this,t,e,0),n=!D(t)||t!==this._$AH&&t!==W,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Q(this,o[i+r],e,r),l===W&&(l=this._$AH[r]),n||(n=!D(l)||l!==this._$AH[r]),l===V?t=V:t!==V&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.C(t)}C(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class it extends et{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===V?void 0:t}}const ot=E?E.emptyScript:"";class st extends et{constructor(){super(...arguments),this.type=4}C(t){t&&t!==V?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class nt extends et{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=Q(this,t,e,0))&&void 0!==i?i:V)===W)return;const o=this._$AH,s=t===V&&o!==V||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==V&&(o===V||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 rt{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){Q(this,t)}}const lt={L:"$lit$",P:M,V:N,I:1,N:X,R:G,j:I,D:Q,H:tt,F:et,O:st,W:nt,B:it,Z:rt},at=window.litHtmlPolyfillSupport;
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
74
|
*/
|
|
75
|
-
var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?z:globalThis.litHtmlVersions=[]).push("2.
|
|
75
|
+
var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?z:globalThis.litHtmlVersions=[]).push("2.2.4");class pt extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=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._$Dt=((t,e,i)=>{var o,s;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new tt(e.insertBefore(L(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return W}}pt.finalized=!0,pt._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:pt});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:pt}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.2.0");class ft{constructor(t,e,i,o,s){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=o,this.context=s,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,i){return new ft(t,e,void 0,i)}static extend(t,e,i){return new ft(t,e.category,e,i)}static external(t,e){return new ft(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return v`var(${b(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):b(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function ut(t,e){return b(`${t.name}: ${e}`)}const bt={colorPrimary:ft.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:ft.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:ft.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:ft.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:ft.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:ft.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:ft.create("--ft-color-error","COLOR","#B00020"),colorOutline:ft.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:ft.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:ft.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:ft.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:ft.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:ft.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:ft.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:ft.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:ft.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:ft.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:ft.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:ft.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:ft.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:ft.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:ft.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:ft.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:ft.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:ft.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:ft.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:ft.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:ft.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:ft.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:ft.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:ft.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:ft.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:ft.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:ft.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:ft.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:ft.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:ft.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:ft.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:ft.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:ft.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:ft.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:ft.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:ft.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:ft.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:ft.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:ft.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:ft.create("--ft-border-radius-XL","SIZE","16px"),titleFont:ft.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:ft.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:ft.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:ft.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2021 Google LLC
|
|
@@ -101,7 +101,7 @@ var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?
|
|
|
101
101
|
* @license
|
|
102
102
|
* Copyright 2020 Google LLC
|
|
103
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
|
-
*/const{H:zt}=lt,Et=()=>document.createComment(""),Bt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Et(),n),o=s.insertBefore(Et(),n);i=new zt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==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)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Mt=(t,e,i=t)=>(t._$AI(e,i),t),Nt={},Ft=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}},Rt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Lt=Ot(class extends Ct{constructor(t){if(super(t),t.type!==St)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.
|
|
104
|
+
*/const{H:zt}=lt,Et=()=>document.createComment(""),Bt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Et(),n),o=s.insertBefore(Et(),n);i=new zt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==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)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Mt=(t,e,i=t)=>(t._$AI(e,i),t),Nt={},Ft=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}},Rt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Lt=Ot(class extends Ct{constructor(t){if(super(t),t.type!==St)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.ut=l,r;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let h,p,d=0,f=n.length-1,u=0,b=r.length-1;for(;d<=f&&u<=b;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])c[u]=Mt(n[d],r[u]),d++,u++;else if(a[f]===l[b])c[b]=Mt(n[f],r[b]),f--,b--;else if(a[d]===l[b])c[b]=Mt(n[d],r[b]),Bt(t,c[b+1],n[d]),d++,b--;else if(a[f]===l[u])c[u]=Mt(n[f],r[u]),Bt(t,n[d],n[f]),f--,u++;else if(void 0===h&&(h=Rt(l,u,b),p=Rt(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=Bt(t,n[d]);Mt(e,r[u]),c[u]=e}else c[u]=Mt(i,r[u]),Bt(t,n[d],i),n[e]=null;u++}else Ft(n[f]),f--;else Ft(n[d]),d++;for(;u<=b;){const e=Bt(t,c[b+1]);Mt(e,r[u]),c[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Ft(t)}return this.ut=l,((t,e=Nt)=>{t._$AH=e})(t,c),W}}),Dt=Ot(class extends Ct{constructor(t){var e;if(super(t),t.type!==kt||"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.et){this.et=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.et.add(t);return this.render(e)}const s=t.element.classList;this.et.forEach((t=>{t in e||(s.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return W}});
|
|
105
105
|
/**
|
|
106
106
|
* @license
|
|
107
107
|
* Copyright 2017 Google LLC
|
|
@@ -135,63 +135,45 @@ var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?
|
|
|
135
135
|
* Copyright 2020 Google LLC
|
|
136
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
137
|
*/
|
|
138
|
-
const At=t=>({_$litStatic$:t}),
|
|
138
|
+
const Pt=Symbol.for(""),At=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===Pt)return null===(i=t)||void 0===i?void 0:i._$litStatic$},_t=t=>({_$litStatic$:t,r:Pt}),Ht=new Map,Zt=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(n=i[c],s=At(n));)a+=s+e[++c],h=!0;l.push(n),r.push(a),c++}if(c===o&&r.push(e[o]),h){const t=r.join("$$lit$$");void 0===(e=Ht.get(t))&&(r.raw=r,Ht.set(t,e=r)),i=l}return t(e,...i)})(K);var Kt,Wt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!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"}(Kt||(Kt={}));const Vt=ft.extend("--ft-typography-font-family",bt.titleFont),qt=ft.extend("--ft-typography-font-family",bt.contentFont),Jt={fontFamily:qt,fontSize:ft.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ft.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ft.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ft.create("--ft-typography-line-height","SIZE","24px"),textTransform:ft.create("--ft-typography-text-transform","UNKNOWN","inherit")},Xt=ft.extend("--ft-typography-title-font-family",Vt),Yt=ft.extend("--ft-typography-title-font-size",Jt.fontSize,"20px"),Qt=ft.extend("--ft-typography-title-font-weight",Jt.fontWeight,"normal"),Gt=ft.extend("--ft-typography-title-letter-spacing",Jt.letterSpacing,"0.15px"),te=ft.extend("--ft-typography-title-line-height",Jt.lineHeight,"24px"),ee=ft.extend("--ft-typography-title-text-transform",Jt.textTransform,"inherit"),ie=ft.extend("--ft-typography-title-dense-font-family",Vt),oe=ft.extend("--ft-typography-title-dense-font-size",Jt.fontSize,"14px"),se=ft.extend("--ft-typography-title-dense-font-weight",Jt.fontWeight,"normal"),ne=ft.extend("--ft-typography-title-dense-letter-spacing",Jt.letterSpacing,"0.105px"),re=ft.extend("--ft-typography-title-dense-line-height",Jt.lineHeight,"24px"),le=ft.extend("--ft-typography-title-dense-text-transform",Jt.textTransform,"inherit"),ae=ft.extend("--ft-typography-subtitle1-font-family",qt),ce=ft.extend("--ft-typography-subtitle1-font-size",Jt.fontSize,"16px"),he=ft.extend("--ft-typography-subtitle1-font-weight",Jt.fontWeight,"600"),pe=ft.extend("--ft-typography-subtitle1-letter-spacing",Jt.letterSpacing,"0.144px"),de=ft.extend("--ft-typography-subtitle1-line-height",Jt.lineHeight,"24px"),fe=ft.extend("--ft-typography-subtitle1-text-transform",Jt.textTransform,"inherit"),ue=ft.extend("--ft-typography-subtitle2-font-family",qt),be=ft.extend("--ft-typography-subtitle2-font-size",Jt.fontSize,"14px"),ve=ft.extend("--ft-typography-subtitle2-font-weight",Jt.fontWeight,"normal"),ge=ft.extend("--ft-typography-subtitle2-letter-spacing",Jt.letterSpacing,"0.098px"),xe=ft.extend("--ft-typography-subtitle2-line-height",Jt.lineHeight,"24px"),ye=ft.extend("--ft-typography-subtitle2-text-transform",Jt.textTransform,"inherit"),me={fontFamily:ft.extend("--ft-typography-body1-font-family",qt),fontSize:ft.extend("--ft-typography-body1-font-size",Jt.fontSize,"16px"),fontWeight:ft.extend("--ft-typography-body1-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body1-letter-spacing",Jt.letterSpacing,"0.496px"),lineHeight:ft.extend("--ft-typography-body1-line-height",Jt.lineHeight,"24px"),textTransform:ft.extend("--ft-typography-body1-text-transform",Jt.textTransform,"inherit")},$e={fontFamily:ft.extend("--ft-typography-body2-font-family",qt),fontSize:ft.extend("--ft-typography-body2-font-size",Jt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-body2-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body2-letter-spacing",Jt.letterSpacing,"0.252px"),lineHeight:ft.extend("--ft-typography-body2-line-height",Jt.lineHeight,"20px"),textTransform:ft.extend("--ft-typography-body2-text-transform",Jt.textTransform,"inherit")},we={fontFamily:ft.extend("--ft-typography-caption-font-family",qt),fontSize:ft.extend("--ft-typography-caption-font-size",Jt.fontSize,"12px"),fontWeight:ft.extend("--ft-typography-caption-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-caption-letter-spacing",Jt.letterSpacing,"0.396px"),lineHeight:ft.extend("--ft-typography-caption-line-height",Jt.lineHeight,"16px"),textTransform:ft.extend("--ft-typography-caption-text-transform",Jt.textTransform,"inherit")},ke=ft.extend("--ft-typography-breadcrumb-font-family",qt),Se=ft.extend("--ft-typography-breadcrumb-font-size",Jt.fontSize,"10px"),Oe=ft.extend("--ft-typography-breadcrumb-font-weight",Jt.fontWeight,"normal"),Ce=ft.extend("--ft-typography-breadcrumb-letter-spacing",Jt.letterSpacing,"0.33px"),ze=ft.extend("--ft-typography-breadcrumb-line-height",Jt.lineHeight,"16px"),Ee=ft.extend("--ft-typography-breadcrumb-text-transform",Jt.textTransform,"inherit"),Be=ft.extend("--ft-typography-overline-font-family",qt),Me=ft.extend("--ft-typography-overline-font-size",Jt.fontSize,"10px"),Ne=ft.extend("--ft-typography-overline-font-weight",Jt.fontWeight,"normal"),Fe=ft.extend("--ft-typography-overline-letter-spacing",Jt.letterSpacing,"1.5px"),Re=ft.extend("--ft-typography-overline-line-height",Jt.lineHeight,"16px"),Le=ft.extend("--ft-typography-overline-text-transform",Jt.textTransform,"uppercase"),De={fontFamily:ft.extend("--ft-typography-button-font-family",qt),fontSize:ft.extend("--ft-typography-button-font-size",Jt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-button-font-weight",Jt.fontWeight,"600"),letterSpacing:ft.extend("--ft-typography-button-letter-spacing",Jt.letterSpacing,"1.246px"),lineHeight:ft.extend("--ft-typography-button-line-height",Jt.lineHeight,"16px"),textTransform:ft.extend("--ft-typography-button-text-transform",Jt.textTransform,"uppercase")},je=v`
|
|
139
139
|
.ft-typography--title {
|
|
140
|
-
font-family: ${
|
|
141
|
-
font-size: ${
|
|
142
|
-
font-weight: ${
|
|
143
|
-
letter-spacing: ${
|
|
144
|
-
line-height: ${
|
|
145
|
-
text-transform: ${
|
|
146
|
-
}
|
|
147
|
-
`,De=v`
|
|
148
|
-
.ft-typography--title-dense {
|
|
149
|
-
font-family: ${te};
|
|
150
|
-
font-size: ${ee};
|
|
151
|
-
font-weight: ${ie};
|
|
152
|
-
letter-spacing: ${oe};
|
|
153
|
-
line-height: ${se};
|
|
154
|
-
text-transform: ${ne};
|
|
155
|
-
}
|
|
156
|
-
`,je=v`
|
|
157
|
-
.ft-typography--subtitle1 {
|
|
158
|
-
font-family: ${re};
|
|
159
|
-
font-size: ${le};
|
|
160
|
-
font-weight: ${ae};
|
|
161
|
-
letter-spacing: ${ce};
|
|
162
|
-
line-height: ${he};
|
|
163
|
-
text-transform: ${pe};
|
|
140
|
+
font-family: ${Xt};
|
|
141
|
+
font-size: ${Yt};
|
|
142
|
+
font-weight: ${Qt};
|
|
143
|
+
letter-spacing: ${Gt};
|
|
144
|
+
line-height: ${te};
|
|
145
|
+
text-transform: ${ee};
|
|
164
146
|
}
|
|
165
147
|
`,Ie=v`
|
|
166
|
-
.ft-typography--
|
|
167
|
-
font-family: ${
|
|
168
|
-
font-size: ${
|
|
169
|
-
font-weight: ${
|
|
170
|
-
letter-spacing: ${
|
|
171
|
-
line-height: ${
|
|
172
|
-
text-transform: ${
|
|
148
|
+
.ft-typography--title-dense {
|
|
149
|
+
font-family: ${ie};
|
|
150
|
+
font-size: ${oe};
|
|
151
|
+
font-weight: ${se};
|
|
152
|
+
letter-spacing: ${ne};
|
|
153
|
+
line-height: ${re};
|
|
154
|
+
text-transform: ${le};
|
|
173
155
|
}
|
|
174
|
-
|
|
175
156
|
`,Ue=v`
|
|
176
|
-
.ft-typography--
|
|
177
|
-
font-family: ${
|
|
178
|
-
font-size: ${
|
|
179
|
-
font-weight: ${
|
|
180
|
-
letter-spacing: ${
|
|
181
|
-
line-height: ${
|
|
182
|
-
text-transform: ${
|
|
157
|
+
.ft-typography--subtitle1 {
|
|
158
|
+
font-family: ${ae};
|
|
159
|
+
font-size: ${ce};
|
|
160
|
+
font-weight: ${he};
|
|
161
|
+
letter-spacing: ${pe};
|
|
162
|
+
line-height: ${de};
|
|
163
|
+
text-transform: ${fe};
|
|
183
164
|
}
|
|
184
165
|
`,Te=v`
|
|
185
|
-
.ft-typography--
|
|
186
|
-
font-family: ${
|
|
187
|
-
font-size: ${
|
|
188
|
-
font-weight: ${
|
|
189
|
-
letter-spacing: ${
|
|
190
|
-
line-height: ${
|
|
191
|
-
text-transform: ${ye
|
|
166
|
+
.ft-typography--subtitle2 {
|
|
167
|
+
font-family: ${ue};
|
|
168
|
+
font-size: ${be};
|
|
169
|
+
font-weight: ${ve};
|
|
170
|
+
letter-spacing: ${ge};
|
|
171
|
+
line-height: ${xe};
|
|
172
|
+
text-transform: ${ye};
|
|
192
173
|
}
|
|
193
|
-
|
|
194
|
-
|
|
174
|
+
|
|
175
|
+
`,Pe=v`
|
|
176
|
+
.ft-typography--body1 {
|
|
195
177
|
font-family: ${me.fontFamily};
|
|
196
178
|
font-size: ${me.fontSize};
|
|
197
179
|
font-weight: ${me.fontWeight};
|
|
@@ -199,45 +181,63 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
199
181
|
line-height: ${me.lineHeight};
|
|
200
182
|
text-transform: ${me.textTransform};
|
|
201
183
|
}
|
|
202
|
-
`,
|
|
203
|
-
.ft-typography--
|
|
204
|
-
font-family: ${$e};
|
|
205
|
-
font-size: ${
|
|
206
|
-
font-weight: ${
|
|
207
|
-
letter-spacing: ${
|
|
208
|
-
line-height: ${
|
|
209
|
-
text-transform: ${
|
|
184
|
+
`,Ae=v`
|
|
185
|
+
.ft-typography--body2 {
|
|
186
|
+
font-family: ${$e.fontFamily};
|
|
187
|
+
font-size: ${$e.fontSize};
|
|
188
|
+
font-weight: ${$e.fontWeight};
|
|
189
|
+
letter-spacing: ${$e.letterSpacing};
|
|
190
|
+
line-height: ${$e.lineHeight};
|
|
191
|
+
text-transform: ${$e.textTransform};
|
|
210
192
|
}
|
|
211
193
|
`,_e=v`
|
|
212
|
-
.ft-typography--
|
|
213
|
-
font-family: ${
|
|
214
|
-
font-size: ${
|
|
215
|
-
font-weight: ${
|
|
216
|
-
letter-spacing: ${
|
|
217
|
-
line-height: ${
|
|
218
|
-
text-transform: ${
|
|
194
|
+
.ft-typography--caption {
|
|
195
|
+
font-family: ${we.fontFamily};
|
|
196
|
+
font-size: ${we.fontSize};
|
|
197
|
+
font-weight: ${we.fontWeight};
|
|
198
|
+
letter-spacing: ${we.letterSpacing};
|
|
199
|
+
line-height: ${we.lineHeight};
|
|
200
|
+
text-transform: ${we.textTransform};
|
|
219
201
|
}
|
|
220
202
|
`,He=v`
|
|
203
|
+
.ft-typography--breadcrumb {
|
|
204
|
+
font-family: ${ke};
|
|
205
|
+
font-size: ${Se};
|
|
206
|
+
font-weight: ${Oe};
|
|
207
|
+
letter-spacing: ${Ce};
|
|
208
|
+
line-height: ${ze};
|
|
209
|
+
text-transform: ${Ee};
|
|
210
|
+
}
|
|
211
|
+
`,Ze=v`
|
|
212
|
+
.ft-typography--overline {
|
|
213
|
+
font-family: ${Be};
|
|
214
|
+
font-size: ${Me};
|
|
215
|
+
font-weight: ${Ne};
|
|
216
|
+
letter-spacing: ${Fe};
|
|
217
|
+
line-height: ${Re};
|
|
218
|
+
text-transform: ${Le};
|
|
219
|
+
}
|
|
220
|
+
`,Ke=v`
|
|
221
221
|
.ft-typography--button {
|
|
222
|
-
font-family: ${
|
|
223
|
-
font-size: ${
|
|
224
|
-
font-weight: ${
|
|
225
|
-
letter-spacing: ${
|
|
226
|
-
line-height: ${
|
|
227
|
-
text-transform: ${
|
|
228
|
-
}
|
|
229
|
-
`;class
|
|
230
|
-
<${
|
|
222
|
+
font-family: ${De.fontFamily};
|
|
223
|
+
font-size: ${De.fontSize};
|
|
224
|
+
font-weight: ${De.fontWeight};
|
|
225
|
+
letter-spacing: ${De.letterSpacing};
|
|
226
|
+
line-height: ${De.lineHeight};
|
|
227
|
+
text-transform: ${De.textTransform};
|
|
228
|
+
}
|
|
229
|
+
`;class We extends vt{constructor(){super(...arguments),this.variant=Kt.body1}render(){return this.element?Zt`
|
|
230
|
+
<${_t(this.element)}
|
|
231
231
|
class="ft-typography ft-typography--${this.variant}">
|
|
232
232
|
<slot></slot>
|
|
233
|
-
</${
|
|
234
|
-
`:
|
|
233
|
+
</${_t(this.element)}>
|
|
234
|
+
`:Zt`
|
|
235
235
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
236
|
-
`}}function
|
|
236
|
+
`}}function Ve(t,e){return t.flatMap((t=>[t,...Ve(e(t),e)]))}function qe(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Je(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>Je(e,t.selected))),value:t.value}}function Xe(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>Je(t,!1)))}}We.styles=[je,Ie,Ue,Te,Pe,Ae,_e,He,Ze,Ke,v`
|
|
237
237
|
.ft-typography {
|
|
238
238
|
vertical-align: inherit;
|
|
239
239
|
}
|
|
240
|
-
`],
|
|
240
|
+
`],Wt([i()],We.prototype,"element",void 0),Wt([i()],We.prototype,"variant",void 0),c("ft-typography")(We);var Ye=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Qe=ft.extend("--ft-ripple-color",bt.colorContent),Ge={color:Qe,backgroundColor:ft.extend("--ft-ripple-background-color",Qe),opacityContentOnSurfacePressed:ft.external(bt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ft.external(bt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ft.external(bt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ft.external(bt.opacityContentOnSurfaceSelected,"Design system")},ti=ft.extend("--ft-ripple-color",bt.colorPrimary),ei=ti,ii=ft.extend("--ft-ripple-background-color",ti),oi=ft.extend("--ft-ripple-color",bt.colorSecondary),si=oi,ni=ft.extend("--ft-ripple-background-color",oi);class ri extends vt{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 t(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),n=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-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return K`
|
|
241
241
|
<style>
|
|
242
242
|
.ft-ripple .ft-ripple--effect,
|
|
243
243
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -254,7 +254,7 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
254
254
|
<div class="ft-ripple--background"></div>
|
|
255
255
|
<div class="ft-ripple--effect"></div>
|
|
256
256
|
</div>
|
|
257
|
-
`}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()}}
|
|
257
|
+
`}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()}}ri.elementDefinitions={},ri.styles=v`
|
|
258
258
|
:host {
|
|
259
259
|
display: contents;
|
|
260
260
|
}
|
|
@@ -276,27 +276,27 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
.ft-ripple .ft-ripple--background {
|
|
279
|
-
background-color: ${
|
|
279
|
+
background-color: ${Ge.backgroundColor};
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
.ft-ripple .ft-ripple--effect {
|
|
283
|
-
background-color: ${
|
|
283
|
+
background-color: ${Ge.color};
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
287
|
-
background-color: ${
|
|
287
|
+
background-color: ${ni};
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
291
|
-
background-color: ${
|
|
291
|
+
background-color: ${si};
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
295
|
-
background-color: ${
|
|
295
|
+
background-color: ${ii};
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
299
|
-
background-color: ${
|
|
299
|
+
background-color: ${ei};
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
.ft-ripple .ft-ripple--background {
|
|
@@ -328,22 +328,22 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
331
|
-
opacity: ${
|
|
331
|
+
opacity: ${Ge.opacityContentOnSurfaceHover};
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
335
|
-
opacity: ${
|
|
335
|
+
opacity: ${Ge.opacityContentOnSurfaceSelected};
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
339
|
-
opacity: ${
|
|
339
|
+
opacity: ${Ge.opacityContentOnSurfaceFocused};
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
343
|
-
opacity: ${
|
|
343
|
+
opacity: ${Ge.opacityContentOnSurfacePressed};
|
|
344
344
|
transform: translate(-50%, -50%) scale(1);
|
|
345
345
|
}
|
|
346
|
-
`,
|
|
346
|
+
`,Ye([i({type:Boolean})],ri.prototype,"primary",void 0),Ye([i({type:Boolean})],ri.prototype,"secondary",void 0),Ye([i({type:Boolean})],ri.prototype,"unbounded",void 0),Ye([i({type:Boolean})],ri.prototype,"activated",void 0),Ye([i({type:Boolean})],ri.prototype,"selected",void 0),Ye([i({type:Boolean})],ri.prototype,"disabled",void 0),Ye([o()],ri.prototype,"hovered",void 0),Ye([o()],ri.prototype,"focused",void 0),Ye([o()],ri.prototype,"pressed",void 0),Ye([o()],ri.prototype,"rippling",void 0),Ye([o()],ri.prototype,"rippleSize",void 0),Ye([o()],ri.prototype,"originX",void 0),Ye([o()],ri.prototype,"originY",void 0),Ye([n(".ft-ripple")],ri.prototype,"ripple",void 0),Ye([n(".ft-ripple--effect")],ri.prototype,"rippleEffect",void 0),c("ft-ripple")(ri);var li=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ai=ft.create("--ft-tooltip-distance","SIZE","4px"),ci=ft.create("--ft-tooltip-color","COLOR","#FFFFFF"),hi=ft.create("--ft-tooltip-background-color","COLOR","#666666"),pi=ft.create("--ft-tooltip-z-index","NUMBER","1"),di=ft.external(bt.borderRadiusS,"Design system");class fi extends vt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new t,this.revealDebouncer=new t}render(){return K`
|
|
347
347
|
<div part="container"
|
|
348
348
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
349
349
|
@mouseenter=${this.onHover}
|
|
@@ -358,7 +358,7 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
358
358
|
</div>
|
|
359
359
|
<slot></slot>
|
|
360
360
|
</div>
|
|
361
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&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,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}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())}}
|
|
361
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&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,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}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())}}fi.elementDefinitions={"ft-typography":We},fi.styles=v`
|
|
362
362
|
.ft-tooltip--container {
|
|
363
363
|
display: block;
|
|
364
364
|
position: relative;
|
|
@@ -376,21 +376,21 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
376
376
|
width: max-content;
|
|
377
377
|
max-width: 150px;
|
|
378
378
|
text-align: center;
|
|
379
|
-
padding: ${
|
|
380
|
-
z-index: ${
|
|
379
|
+
padding: ${ai};
|
|
380
|
+
z-index: ${pi};
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
.ft-tooltip--content {
|
|
384
384
|
padding: 4px 8px;
|
|
385
|
-
border-radius: ${
|
|
386
|
-
background-color: ${
|
|
387
|
-
color: ${
|
|
385
|
+
border-radius: ${di};
|
|
386
|
+
background-color: ${hi};
|
|
387
|
+
color: ${ci};
|
|
388
388
|
top: -500px;
|
|
389
389
|
left: -500px;
|
|
390
390
|
position: relative;
|
|
391
391
|
word-break: break-word;
|
|
392
392
|
}
|
|
393
|
-
`,
|
|
393
|
+
`,li([i()],fi.prototype,"text",void 0),li([i({type:Boolean})],fi.prototype,"manual",void 0),li([i({type:Boolean})],fi.prototype,"inline",void 0),li([i({type:Number})],fi.prototype,"delay",void 0),li([i()],fi.prototype,"position",void 0),li([function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?a({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],fi.prototype,"slotNodes",void 0),li([n(".ft-tooltip--container")],fi.prototype,"container",void 0),li([n("slot")],fi.prototype,"target",void 0),li([n(".ft-tooltip")],fi.prototype,"tooltip",void 0),li([n(".ft-tooltip--content")],fi.prototype,"tooltipContent",void 0),li([o()],fi.prototype,"visible",void 0),c("ft-tooltip")(fi);const ui={color:ft.extend("--ft-loader-color",bt.colorPrimary),size:ft.create("--ft-loader-size","SIZE","80px")};class bi extends vt{static get styles(){return v`
|
|
394
394
|
:host {
|
|
395
395
|
line-height: 0;
|
|
396
396
|
}
|
|
@@ -399,8 +399,8 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
399
399
|
display: inline-block;
|
|
400
400
|
position: relative;
|
|
401
401
|
|
|
402
|
-
width: ${
|
|
403
|
-
height: ${
|
|
402
|
+
width: ${ui.size};
|
|
403
|
+
height: ${ui.size};
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
.ft-loader div {
|
|
@@ -409,7 +409,7 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
409
409
|
width: 25%;
|
|
410
410
|
height: 25%;
|
|
411
411
|
border-radius: 50%;
|
|
412
|
-
background: ${
|
|
412
|
+
background: ${ui.color};
|
|
413
413
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
414
414
|
}
|
|
415
415
|
|
|
@@ -456,7 +456,7 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
456
456
|
transform: translate(0, 0);
|
|
457
457
|
}
|
|
458
458
|
100% {
|
|
459
|
-
transform: translate(calc(0.35 * ${
|
|
459
|
+
transform: translate(calc(0.35 * ${ui.size}), 0);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
`}render(){return K`
|
|
@@ -466,27 +466,27 @@ const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.leng
|
|
|
466
466
|
<div></div>
|
|
467
467
|
<div></div>
|
|
468
468
|
</div>
|
|
469
|
-
`}}c("ft-loader")(
|
|
469
|
+
`}}c("ft-loader")(bi);
|
|
470
470
|
/**
|
|
471
471
|
* @license
|
|
472
472
|
* Copyright 2017 Google LLC
|
|
473
473
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
474
474
|
*/
|
|
475
|
-
class
|
|
475
|
+
class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===V||null==t)return this.ft=void 0,this.it=t;if(t===W)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}vi.directiveName="unsafeHTML",vi.resultType=1;const gi=Ot(vi);var xi,yi;!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=""}(xi||(xi={})),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=""}(yi||(yi={}));const mi=new Map([...["abw"].map((t=>[t,yi.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,yi.AUDIO])),...["avi"].map((t=>[t,yi.AVI])),...["chm","xhs"].map((t=>[t,yi.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,yi.CODE])),...["csv"].map((t=>[t,yi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,yi.DITA])),...["epub"].map((t=>[t,yi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,yi.EXCEL])),...["flac"].map((t=>[t,yi.FLAC])),...["gif"].map((t=>[t,yi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,yi.GZIP])),...["html","htm","xhtml"].map((t=>[t,yi.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,yi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,yi.JPEG])),...["json"].map((t=>[t,yi.JSON])),...["m4a","m4p"].map((t=>[t,yi.M4A])),...["mov","qt"].map((t=>[t,yi.MOV])),...["mp3"].map((t=>[t,yi.MP3])),...["mp4","m4v"].map((t=>[t,yi.MP4])),...["ogg","oga"].map((t=>[t,yi.OGG])),...["pdf","ps"].map((t=>[t,yi.PDF])),...["png"].map((t=>[t,yi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,yi.POWERPOINT])),...["rar"].map((t=>[t,yi.RAR])),...["stp"].map((t=>[t,yi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,yi.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,yi.VIDEO])),...["wav"].map((t=>[t,yi.WAV])),...["wma"].map((t=>[t,yi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,yi.WORD])),...["xml","xsl","rdf"].map((t=>[t,yi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,yi.YAML])),...["zip"].map((t=>[t,yi.ZIP]))]),$i=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"]]);var wi,ki=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(wi||(wi={}));const Si={size:ft.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ft.extend("--ft-icon-fluid-topics-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ft.extend("--ft-icon-file-format-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ft.extend("--ft-icon-material-font-family",ft.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class Oi extends vt{constructor(){super(...arguments),this.variant=wi.fluid_topics}render(){return K`
|
|
476
476
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
477
|
-
${
|
|
477
|
+
${gi(this.getIcon())}
|
|
478
478
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
479
479
|
</i>
|
|
480
|
-
`}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:""}getIcon(){var t,e;let i=this.textContent;return this.variant===
|
|
480
|
+
`}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:""}getIcon(){var t,e;let i=this.textContent;return this.variant===wi.file_format?null!==(t=yi[i.toUpperCase()])&&void 0!==t?t:i:this.variant===wi.fluid_topics?null!==(e=xi[i.toUpperCase()])&&void 0!==e?e:i:V}}Oi.elementDefinitions={},Oi.styles=v`
|
|
481
481
|
:host, i.ft-icon {
|
|
482
482
|
display: inline-block;
|
|
483
|
-
width: ${
|
|
484
|
-
height: ${
|
|
483
|
+
width: ${Si.size};
|
|
484
|
+
height: ${Si.size};
|
|
485
485
|
text-align: center;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
i.ft-icon {
|
|
489
|
-
font-size: ${
|
|
489
|
+
font-size: ${Si.size};
|
|
490
490
|
line-height: 1;
|
|
491
491
|
font-weight: normal;
|
|
492
492
|
text-transform: none;
|
|
@@ -500,17 +500,17 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
.ft-icon--fluid-topics {
|
|
503
|
-
font-family: ${
|
|
503
|
+
font-family: ${Si.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
.ft-icon--file-format {
|
|
507
|
-
font-family: ${
|
|
507
|
+
font-family: ${Si.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
.ft-icon--material {
|
|
511
|
-
font-family: ${
|
|
511
|
+
font-family: ${Si.materialFontFamily}, "Material Icons", sans-serif;
|
|
512
512
|
}
|
|
513
|
-
|
|
513
|
+
`,ki([i()],Oi.prototype,"variant",void 0),ki([n("slot")],Oi.prototype,"slottedContent",void 0),c("ft-icon")(Oi);var Ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const zi=ft.extend("--ft-button-color",bt.colorPrimary),Ei={backgroundColor:ft.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ft.extend("--ft-button-border-radius",bt.borderRadiusL),color:zi,fontSize:ft.extend("--ft-button-font-size",De.fontSize),iconSize:ft.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ft.extend("--ft-button-ripple-color",zi),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Bi=ft.extend("--ft-button-primary-color",ft.extend("--ft-button-color",bt.colorOnPrimary)),Mi={backgroundColor:ft.extend("--ft-button-primary-background-color",ft.extend("--ft-button-background-color",bt.colorPrimary)),color:Bi,rippleColor:ft.extend("--ft-button-primary-ripple-color",Bi)},Ni=ft.extend("--ft-button-dense-border-radius",ft.extend("--ft-button-border-radius",bt.borderRadiusM));class Fi extends vt{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.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[gt,v`
|
|
514
514
|
:host {
|
|
515
515
|
display: inline-block;
|
|
516
516
|
max-width: 100%;
|
|
@@ -549,18 +549,18 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
549
549
|
border: none;
|
|
550
550
|
pointer-events: auto;
|
|
551
551
|
|
|
552
|
-
--ft-button-internal-font-size: ${
|
|
552
|
+
--ft-button-internal-font-size: ${Ei.fontSize};
|
|
553
553
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
554
|
-
--ft-button-internal-color: ${
|
|
555
|
-
${ut(
|
|
554
|
+
--ft-button-internal-color: ${Ei.color};
|
|
555
|
+
${ut(Si.size,Ei.iconSize)};
|
|
556
556
|
--ft-button-internal-vertical-padding: 6px;
|
|
557
557
|
--ft-button-internal-horizontal-padding: 8px;
|
|
558
|
-
${ut(
|
|
559
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
558
|
+
${ut(Ge.color,Ei.rippleColor)};
|
|
559
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ei.iconSize});
|
|
560
560
|
|
|
561
|
-
border-radius: ${
|
|
561
|
+
border-radius: ${Ei.borderRadius};
|
|
562
562
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
563
|
-
background-color: ${
|
|
563
|
+
background-color: ${Ei.backgroundColor};
|
|
564
564
|
color: var(--ft-button-internal-color);
|
|
565
565
|
-webkit-mask-image: radial-gradient(white, black);
|
|
566
566
|
}
|
|
@@ -572,7 +572,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
572
572
|
.ft-button--dense {
|
|
573
573
|
--ft-button-internal-vertical-padding: 2px;
|
|
574
574
|
--ft-button-internal-horizontal-padding: 4px;
|
|
575
|
-
border-radius: ${
|
|
575
|
+
border-radius: ${Ni};
|
|
576
576
|
}
|
|
577
577
|
|
|
578
578
|
.ft-button--round {
|
|
@@ -581,13 +581,13 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
581
581
|
|
|
582
582
|
.ft-button[disabled] {
|
|
583
583
|
filter: grayscale(1);
|
|
584
|
-
opacity: ${
|
|
584
|
+
opacity: ${Ei.opacityDisabled};
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
.ft-button.ft-button--primary {
|
|
588
|
-
background-color: ${
|
|
589
|
-
--ft-button-internal-color: ${
|
|
590
|
-
${ut(
|
|
588
|
+
background-color: ${Mi.backgroundColor};
|
|
589
|
+
--ft-button-internal-color: ${Mi.color};
|
|
590
|
+
${ut(Ge.color,Mi.rippleColor)};
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
.ft-button.ft-button--outlined {
|
|
@@ -606,8 +606,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
606
606
|
text-overflow: ellipsis;
|
|
607
607
|
display: block;
|
|
608
608
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
609
|
-
${ut(
|
|
610
|
-
${ut(
|
|
609
|
+
${ut(De.fontSize,"var(--ft-button-internal-font-size)")};
|
|
610
|
+
${ut(De.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -640,8 +640,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
ft-loader {
|
|
643
|
-
${ut(
|
|
644
|
-
${ut(
|
|
643
|
+
${ut(ui.size,Ei.iconSize)};
|
|
644
|
+
${ut(ui.color,"var(--ft-button-internal-color)")};
|
|
645
645
|
}
|
|
646
646
|
`]}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":wt,"ft-no-text-select":!0};return this.addTooltip(K`
|
|
647
647
|
<button part="button"
|
|
@@ -665,7 +665,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
665
665
|
</ft-tooltip>
|
|
666
666
|
`}resolveIcon(){return this.loading?K`
|
|
667
667
|
<ft-loader></ft-loader> `:this.icon?K`
|
|
668
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:V}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}}
|
|
668
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:V}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}}Fi.elementDefinitions={"ft-ripple":ri,"ft-tooltip":fi,"ft-typography":We,"ft-icon":Oi,"ft-loader":bi},Ci([i({type:Boolean})],Fi.prototype,"primary",void 0),Ci([i({type:Boolean})],Fi.prototype,"outlined",void 0),Ci([i({type:Boolean})],Fi.prototype,"disabled",void 0),Ci([i({type:Boolean})],Fi.prototype,"dense",void 0),Ci([i({type:Boolean})],Fi.prototype,"round",void 0),Ci([i({type:String})],Fi.prototype,"label",void 0),Ci([i({type:String})],Fi.prototype,"icon",void 0),Ci([i({type:Boolean})],Fi.prototype,"trailingIcon",void 0),Ci([i({type:Boolean})],Fi.prototype,"loading",void 0),Ci([i({type:String})],Fi.prototype,"tooltipPosition",void 0),Ci([n(".ft-button")],Fi.prototype,"button",void 0),Ci([n(".ft-button--label slot")],Fi.prototype,"slottedContent",void 0),c("ft-button")(Fi);var Ri=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Li=ft.extend("--ft-checkbox-text-color",bt.colorOnSurfaceHigh),Di=ft.external(bt.colorPrimary,"Design system"),ji=ft.external(bt.colorOnPrimary,"Design system"),Ii=ft.extend("--ft-checkbox-border-color",bt.colorOnSurfaceMedium),Ui=ft.external(bt.colorOnSurfaceDisabled,"Design system");class Ti extends vt{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 K`
|
|
669
669
|
<label class="${Dt(t)}">
|
|
670
670
|
<div class="ft-checkbox--box-container">
|
|
671
671
|
<input type="checkbox"
|
|
@@ -690,14 +690,14 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
690
690
|
<slot></slot>
|
|
691
691
|
</ft-typography>
|
|
692
692
|
</label>
|
|
693
|
-
`}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)}}
|
|
693
|
+
`}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)}}Ti.elementDefinitions={"ft-ripple":ri,"ft-typography":We},Ti.styles=v`
|
|
694
694
|
* {
|
|
695
695
|
box-sizing: border-box;
|
|
696
696
|
}
|
|
697
697
|
|
|
698
698
|
.ft-checkbox {
|
|
699
699
|
box-sizing: border-box;
|
|
700
|
-
color: ${
|
|
700
|
+
color: ${Li};
|
|
701
701
|
|
|
702
702
|
display: inline-flex;
|
|
703
703
|
align-items: center;
|
|
@@ -705,7 +705,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
.ft-checkbox--disabled {
|
|
708
|
-
color: ${
|
|
708
|
+
color: ${Ui};
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
input {
|
|
@@ -728,26 +728,26 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
.ft-checkbox--box {
|
|
731
|
-
border: 2px solid ${
|
|
731
|
+
border: 2px solid ${Ii};
|
|
732
732
|
border-radius: 2px;
|
|
733
733
|
|
|
734
734
|
width: 18px;
|
|
735
735
|
height: 18px;
|
|
736
736
|
|
|
737
|
-
color: ${
|
|
737
|
+
color: ${ji};
|
|
738
738
|
}
|
|
739
739
|
|
|
740
740
|
|
|
741
741
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
742
742
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
743
|
-
border-color: ${
|
|
744
|
-
background-color: ${
|
|
743
|
+
border-color: ${Di};
|
|
744
|
+
background-color: ${Di};
|
|
745
745
|
}
|
|
746
746
|
|
|
747
747
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
748
|
-
border-color: ${
|
|
748
|
+
border-color: ${Ui};
|
|
749
749
|
background-color: transparent;
|
|
750
|
-
color: ${
|
|
750
|
+
color: ${Ui};
|
|
751
751
|
}
|
|
752
752
|
|
|
753
753
|
.ft-checkbox--checkmark {
|
|
@@ -766,7 +766,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
766
766
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
767
767
|
opacity: 1;
|
|
768
768
|
}
|
|
769
|
-
`,
|
|
769
|
+
`,Ri([i()],Ti.prototype,"name",void 0),Ri([i({type:Boolean})],Ti.prototype,"checked",void 0),Ri([i({type:Boolean})],Ti.prototype,"indeterminate",void 0),Ri([i({type:Boolean})],Ti.prototype,"disabled",void 0),Ri([n(".ft-checkbox")],Ti.prototype,"container",void 0),Ri([n("ft-ripple")],Ti.prototype,"ripple",void 0),c("ft-checkbox")(Ti);var Pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ai=ft.extend("--ft-radio-text-color",bt.colorOnSurfaceHigh),_i=ft.external(bt.colorPrimary,"Design system"),Hi=(ft.external(bt.colorOnPrimary,"Design system"),ft.extend("--ft-radio-border-color",bt.colorOnSurfaceMedium)),Zi=ft.external(bt.colorOnSurfaceDisabled,"Design system");class Ki extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Wi extends vt{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 K`
|
|
770
770
|
<div class="${Dt(t)}">
|
|
771
771
|
<div class="ft-radio--box-container">
|
|
772
772
|
<input id="radio-button"
|
|
@@ -791,14 +791,14 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
791
791
|
</ft-typography>
|
|
792
792
|
</label>
|
|
793
793
|
</div>
|
|
794
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
794
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ki(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 Ki(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Wi.elementDefinitions={"ft-ripple":ri,"ft-typography":We},Wi.styles=v`
|
|
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: ${Ai};
|
|
802
802
|
|
|
803
803
|
display: inline-flex;
|
|
804
804
|
align-items: center;
|
|
@@ -806,7 +806,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
.ft-radio--disabled {
|
|
809
|
-
color: ${
|
|
809
|
+
color: ${Zi};
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
input {
|
|
@@ -829,7 +829,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
829
829
|
}
|
|
830
830
|
|
|
831
831
|
.ft-radio--box {
|
|
832
|
-
border: 2px solid ${
|
|
832
|
+
border: 2px solid ${Hi};
|
|
833
833
|
border-radius: 50%;
|
|
834
834
|
|
|
835
835
|
display: flex;
|
|
@@ -842,7 +842,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
842
842
|
|
|
843
843
|
.ft-radio--box:after {
|
|
844
844
|
content: " ";
|
|
845
|
-
background-color: ${
|
|
845
|
+
background-color: ${_i};
|
|
846
846
|
|
|
847
847
|
border-radius: 50%;
|
|
848
848
|
|
|
@@ -854,7 +854,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
854
854
|
}
|
|
855
855
|
|
|
856
856
|
.ft-radio--checked .ft-radio--box {
|
|
857
|
-
border-color: ${
|
|
857
|
+
border-color: ${_i};
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
|
|
@@ -863,24 +863,24 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
.ft-radio--disabled .ft-radio--box {
|
|
866
|
-
border-color: ${
|
|
866
|
+
border-color: ${Zi};
|
|
867
867
|
background-color: transparent;
|
|
868
868
|
}
|
|
869
869
|
|
|
870
870
|
.ft-radio--disabled .ft-radio--box:after {
|
|
871
|
-
background-color: ${
|
|
871
|
+
background-color: ${Zi};
|
|
872
872
|
}
|
|
873
|
-
`,
|
|
873
|
+
`,Pi([i()],Wi.prototype,"value",void 0),Pi([i()],Wi.prototype,"name",void 0),Pi([i({type:Boolean})],Wi.prototype,"checked",void 0),Pi([i({type:Boolean})],Wi.prototype,"disabled",void 0),Pi([n(".ft-radio")],Wi.prototype,"container",void 0),Pi([n("ft-ripple")],Wi.prototype,"ripple",void 0),Pi([n("input")],Wi.prototype,"input",void 0);var Vi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class qi extends vt{constructor(){super(...arguments),this.name=""}render(){return K`
|
|
874
874
|
<slot @slotchange=${this.onSlotChange}
|
|
875
875
|
@change=${this.onChange}
|
|
876
876
|
@keydown=${this.onKeyDown}
|
|
877
877
|
@focusin=${this.onFocusIn}
|
|
878
878
|
></slot>
|
|
879
|
-
`}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}))}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))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
879
|
+
`}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}))}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))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}qi.elementDefinitions={},qi.styles=v`
|
|
880
880
|
:host {
|
|
881
881
|
display: contents;
|
|
882
882
|
}
|
|
883
|
-
`,
|
|
883
|
+
`,Vi([i()],qi.prototype,"name",void 0),Vi([a()],qi.prototype,"radioButtons",void 0),c("ft-radio")(Wi),c("ft-radio-group")(qi);var Ji=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Xi={borderRadiusM:ft.external(bt.borderRadiusM,"Design system"),colorOutline:ft.external(bt.colorOutline,"Design system"),colorOnSurface:ft.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(bt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ft.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),colorOnPrimary:ft.external(bt.colorOnPrimary,"Design system"),fontFamily:ft.external($e.fontFamily,"Body2 typography"),fontSize:ft.external($e.fontSize,"Body2 typography"),fontWeight:ft.external($e.fontWeight,"Body2 typography"),letterSpacing:ft.external($e.letterSpacing,"Body2 typography"),lineHeight:ft.external($e.lineHeight,"Body2 typography"),textTransform:ft.external($e.textTransform,"Body2 typography")};class Yi extends vt{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 K`
|
|
884
884
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
885
885
|
${null==this.parent?null:K`
|
|
886
886
|
<div tabindex="0"
|
|
@@ -919,7 +919,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
919
919
|
<ft-checkbox name="${this.id}"
|
|
920
920
|
.checked=${t.selected}
|
|
921
921
|
.disabled=${this.disabled}
|
|
922
|
-
.indeterminate=${
|
|
922
|
+
.indeterminate=${Ve(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
923
923
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
924
924
|
${t.label}
|
|
925
925
|
</ft-checkbox>
|
|
@@ -933,7 +933,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
933
933
|
|
|
934
934
|
${t.label}
|
|
935
935
|
</ft-radio>
|
|
936
|
-
`}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}))}}
|
|
936
|
+
`}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}))}}Yi.elementDefinitions={"ft-button":Fi,"ft-ripple":ri,"ft-typography":We,"ft-checkbox":Ti,"ft-icon":Oi,"ft-radio":Wi},Yi.styles=[v`
|
|
937
937
|
.ft-filter-level--container {
|
|
938
938
|
display: flex;
|
|
939
939
|
flex-direction: column;
|
|
@@ -947,14 +947,14 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
947
947
|
flex-shrink: 0;
|
|
948
948
|
text-decoration: none;
|
|
949
949
|
position: relative;
|
|
950
|
-
border-radius: ${
|
|
950
|
+
border-radius: ${Xi.borderRadiusM};
|
|
951
951
|
overflow: hidden;
|
|
952
952
|
display: flex;
|
|
953
953
|
align-items: center;
|
|
954
954
|
padding: 4px 4px;
|
|
955
955
|
gap: 4px;
|
|
956
956
|
cursor: pointer;
|
|
957
|
-
color: ${
|
|
957
|
+
color: ${Xi.colorOnSurface};
|
|
958
958
|
}
|
|
959
959
|
|
|
960
960
|
.ft-filter-level--go-back:focus {
|
|
@@ -983,7 +983,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
983
983
|
}
|
|
984
984
|
|
|
985
985
|
ft-button {
|
|
986
|
-
${ut(
|
|
986
|
+
${ut(Ei.color,Xi.colorOnSurface)};
|
|
987
987
|
}
|
|
988
988
|
|
|
989
989
|
ft-radio, ft-checkbox {
|
|
@@ -994,7 +994,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
994
994
|
margin-left: -10px;
|
|
995
995
|
word-break: break-word;
|
|
996
996
|
}
|
|
997
|
-
`],
|
|
997
|
+
`],Ji([i({type:String})],Yi.prototype,"id",void 0),Ji([i({type:Object})],Yi.prototype,"parent",void 0),Ji([i({type:Array})],Yi.prototype,"options",void 0),Ji([i({type:Boolean})],Yi.prototype,"multivalued",void 0),Ji([i({type:Boolean})],Yi.prototype,"disabled",void 0),Ji([i({type:Boolean})],Yi.prototype,"hideSelectedOptions",void 0),Ji([i({type:Boolean})],Yi.prototype,"preventNavigation",void 0),Ji([i({type:String})],Yi.prototype,"filter",void 0),Ji([i({type:String})],Yi.prototype,"moreValuesButtonLabel",void 0),Ji([i({type:Number})],Yi.prototype,"displayedValuesLimit",void 0),Ji([n(".ft-filter-level--container")],Yi.prototype,"container",void 0),Ji([o()],Yi.prototype,"displayedPages",void 0);var Qi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Gi={buttonsColor:ft.extend("--ft-snap-scroll-buttons-color",bt.colorPrimary),buttonsZIndex:ft.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ft.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ft.external(bt.colorSurface,"Design system")};class to extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class eo extends vt{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 t(200),this.updateScrollDebouncer=new t(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=Dt({"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":wt}),e=this.controls&&this.withScroll;return K`
|
|
998
998
|
<div part="container" class="${t}">
|
|
999
999
|
<ft-button
|
|
1000
1000
|
class="ft-snap-scroll--previous"
|
|
@@ -1018,7 +1018,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1018
1018
|
@click=${this.next}
|
|
1019
1019
|
></ft-button>
|
|
1020
1020
|
</div>
|
|
1021
|
-
`}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
|
|
1021
|
+
`}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 to(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)}}eo.elementDefinitions={"ft-button":Fi},eo.styles=v`
|
|
1022
1022
|
.ft-snap-scroll {
|
|
1023
1023
|
box-sizing: border-box;
|
|
1024
1024
|
position: relative;
|
|
@@ -1053,7 +1053,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1053
1053
|
flex-wrap: nowrap;
|
|
1054
1054
|
align-items: flex-start;
|
|
1055
1055
|
justify-content: flex-start;
|
|
1056
|
-
gap: ${
|
|
1056
|
+
gap: ${Gi.gap};
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
1059
1059
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1096,11 +1096,11 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1096
1096
|
.ft-snap-scroll--next {
|
|
1097
1097
|
position: absolute;
|
|
1098
1098
|
display: flex;
|
|
1099
|
-
z-index: ${
|
|
1099
|
+
z-index: ${Gi.buttonsZIndex};
|
|
1100
1100
|
opacity: 1;
|
|
1101
1101
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1102
|
-
${ut(
|
|
1103
|
-
${ut(
|
|
1102
|
+
${ut(Ei.backgroundColor,"transparent")};
|
|
1103
|
+
${ut(Ei.color,Gi.buttonsColor)};
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
1106
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1113,37 +1113,37 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1113
1113
|
top: 0;
|
|
1114
1114
|
left: -1px;
|
|
1115
1115
|
bottom: 0;
|
|
1116
|
-
background: linear-gradient(to right, ${
|
|
1116
|
+
background: linear-gradient(to right, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
1119
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1120
1120
|
top: -1px;
|
|
1121
1121
|
left: 0;
|
|
1122
1122
|
right: 0;
|
|
1123
|
-
background: linear-gradient(to bottom, ${
|
|
1123
|
+
background: linear-gradient(to bottom, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
1126
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1127
1127
|
top: 0;
|
|
1128
1128
|
right: -1px;
|
|
1129
1129
|
bottom: 0;
|
|
1130
|
-
background: linear-gradient(to left, ${
|
|
1130
|
+
background: linear-gradient(to left, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1131
1131
|
}
|
|
1132
1132
|
|
|
1133
1133
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1134
1134
|
left: 0;
|
|
1135
1135
|
right: 0;
|
|
1136
1136
|
bottom: -1px;
|
|
1137
|
-
background: linear-gradient(to top, ${
|
|
1137
|
+
background: linear-gradient(to top, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1138
1138
|
}
|
|
1139
1139
|
|
|
1140
1140
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1141
1141
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1142
1142
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1143
1143
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1144
|
-
background-color: ${
|
|
1144
|
+
background-color: ${Gi.colorSurface};
|
|
1145
1145
|
}
|
|
1146
|
-
`,
|
|
1146
|
+
`,Qi([i({type:Boolean})],eo.prototype,"horizontal",void 0),Qi([i({type:Boolean})],eo.prototype,"hideScrollbar",void 0),Qi([i({type:Boolean})],eo.prototype,"controls",void 0),Qi([i({type:Boolean})],eo.prototype,"limitSize",void 0),Qi([o()],eo.prototype,"elements",void 0),Qi([o()],eo.prototype,"currentElement",void 0),Qi([o()],eo.prototype,"withScroll",void 0),Qi([o()],eo.prototype,"startReached",void 0),Qi([o()],eo.prototype,"endReached",void 0),Qi([n(".ft-snap-scroll--content")],eo.prototype,"contentSlot",void 0),c("ft-snap-scroll")(eo);var io=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const oo=ft.external(bt.colorOutline,"Design system"),so=ft.external(bt.colorOnSurface,"Design system"),no=ft.external(bt.colorOnSurfaceMedium,"Design system"),ro=ft.external(bt.colorPrimary,"Design system"),lo=ft.external(bt.colorSurface,"Design system"),ao=ft.external(bt.transitionDuration,"Design system"),co=ft.external(bt.transitionTimingFunction,"Design system");class ho extends CustomEvent{constructor(t){super("change",{detail:t})}}class po extends vt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new t(300),this.changeDebouncer=new t(10)}get flatOptions(){return Ve(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 K`
|
|
1147
1147
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1148
1148
|
part="container">
|
|
1149
1149
|
${this.label||i?K`
|
|
@@ -1208,7 +1208,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1208
1208
|
@display-level=${this.onDisplayLevel}
|
|
1209
1209
|
part="values"
|
|
1210
1210
|
></ft-filter-level>
|
|
1211
|
-
`}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
|
|
1211
|
+
`}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 ho(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(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}po.elementDefinitions={"ft-button":Fi,"ft-filter-level":Yi,"ft-snap-scroll":eo,"ft-typography":We},po.styles=[_e,v`
|
|
1212
1212
|
:host {
|
|
1213
1213
|
display: flex;
|
|
1214
1214
|
max-height: 100%;
|
|
@@ -1221,8 +1221,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1221
1221
|
flex-direction: column;
|
|
1222
1222
|
max-height: 100%;
|
|
1223
1223
|
max-width: 100%;
|
|
1224
|
-
color: ${
|
|
1225
|
-
background: ${
|
|
1224
|
+
color: ${so};
|
|
1225
|
+
background: ${lo};
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
.ft-filter--header {
|
|
@@ -1232,13 +1232,13 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1232
1232
|
flex-shrink: 0;
|
|
1233
1233
|
padding: 0 10px;
|
|
1234
1234
|
margin-bottom: 8px;
|
|
1235
|
-
${ut(
|
|
1235
|
+
${ut(Jt.fontSize,"14px")};
|
|
1236
1236
|
}
|
|
1237
1237
|
|
|
1238
1238
|
.ft-filter--header ft-button {
|
|
1239
1239
|
flex-shrink: 0;
|
|
1240
1240
|
margin-left: auto;
|
|
1241
|
-
${ut(
|
|
1241
|
+
${ut(Ei.iconSize,"18px")};
|
|
1242
1242
|
}
|
|
1243
1243
|
|
|
1244
1244
|
.ft-filter--label {
|
|
@@ -1246,8 +1246,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1246
1246
|
flex-shrink: 1;
|
|
1247
1247
|
flex-grow: 1;
|
|
1248
1248
|
word-break: break-word;
|
|
1249
|
-
${ut(
|
|
1250
|
-
${ut(
|
|
1249
|
+
${ut(Jt.lineHeight,"22px")};
|
|
1250
|
+
${ut(Jt.fontWeight,"bold")};
|
|
1251
1251
|
}
|
|
1252
1252
|
|
|
1253
1253
|
.ft-filter--filter {
|
|
@@ -1258,8 +1258,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1258
1258
|
padding: 0 10px;
|
|
1259
1259
|
overflow: hidden;
|
|
1260
1260
|
height: 32px;
|
|
1261
|
-
transition: height ${
|
|
1262
|
-
margin ${
|
|
1261
|
+
transition: height ${ao} ${co},
|
|
1262
|
+
margin ${ao} ${co};
|
|
1263
1263
|
transition-delay: 500ms;
|
|
1264
1264
|
}
|
|
1265
1265
|
|
|
@@ -1272,11 +1272,11 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1272
1272
|
display: block;
|
|
1273
1273
|
width: 100%;
|
|
1274
1274
|
border-radius: 4px;
|
|
1275
|
-
border: 1px solid ${
|
|
1275
|
+
border: 1px solid ${oo};
|
|
1276
1276
|
padding: 4px;
|
|
1277
|
-
background-color: ${
|
|
1278
|
-
color: ${
|
|
1279
|
-
outline-color: ${
|
|
1277
|
+
background-color: ${lo};
|
|
1278
|
+
color: ${no};
|
|
1279
|
+
outline-color: ${ro};
|
|
1280
1280
|
}
|
|
1281
1281
|
|
|
1282
1282
|
.ft-filter--values {
|
|
@@ -1288,7 +1288,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1288
1288
|
}
|
|
1289
1289
|
|
|
1290
1290
|
.ft-filter--separator {
|
|
1291
|
-
border-top: 1px solid ${
|
|
1291
|
+
border-top: 1px solid ${oo};
|
|
1292
1292
|
margin: 4px 10px;
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
@@ -1313,17 +1313,17 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1313
1313
|
slot {
|
|
1314
1314
|
display: none;
|
|
1315
1315
|
}
|
|
1316
|
-
`],
|
|
1316
|
+
`],io([i({type:String})],po.prototype,"id",void 0),io([i({type:String})],po.prototype,"label",void 0),io([i({type:String})],po.prototype,"filterPlaceHolder",void 0),io([i({type:String})],po.prototype,"clearButtonLabel",void 0),io([i({type:String})],po.prototype,"moreValuesButtonLabel",void 0),io([h([])],po.prototype,"options",void 0),io([i({type:Boolean})],po.prototype,"multivalued",void 0),io([i({type:Boolean})],po.prototype,"disabled",void 0),io([i({type:Boolean})],po.prototype,"raiseSelectedOptions",void 0),io([i({type:Number})],po.prototype,"displayedValuesLimit",void 0),io([n(".ft-filter--slot")],po.prototype,"slotElement",void 0),io([n(".ft-filter--container")],po.prototype,"container",void 0),io([n(".ft-filter--values")],po.prototype,"valuesContainer",void 0),io([n(".ft-filter--levels")],po.prototype,"levelsContainer",void 0),io([n(".ft-filter--levels ft-filter-level:last-child")],po.prototype,"lastLevel",void 0),io([function(t){return s({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")],po.prototype,"levels",void 0),io([o()],po.prototype,"withScroll",void 0),io([o()],po.prototype,"filter",void 0),io([o()],po.prototype,"slideIn",void 0),io([o()],po.prototype,"slideOut",void 0);var fo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class uo extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return K`
|
|
1317
1317
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1318
|
-
`}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}))}}
|
|
1318
|
+
`}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}))}}uo.elementDefinitions={},fo([i({type:String})],uo.prototype,"label",void 0),fo([i({type:Object,converter:t=>t})],uo.prototype,"value",void 0),fo([i({type:Boolean,reflect:!0})],uo.prototype,"selected",void 0),fo([i({type:Object})],uo.prototype,"subOptions",void 0),fo([n(".ft-filter-option--slot")],uo.prototype,"slotElement",void 0),c("ft-filter")(po),c("ft-filter-option")(uo);var bo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class vo extends vt{constructor(){super(...arguments),this.multi=!1}render(){return K`
|
|
1319
1319
|
<div class="ft-accordion">
|
|
1320
1320
|
<slot @activated=${this.onChange}></slot>
|
|
1321
1321
|
</div>
|
|
1322
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}
|
|
1322
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}vo.elementDefinitions={},vo.styles=v`
|
|
1323
1323
|
.ft-accordion {
|
|
1324
1324
|
box-sizing: border-box;
|
|
1325
1325
|
}
|
|
1326
|
-
`,
|
|
1326
|
+
`,bo([i({type:Boolean})],vo.prototype,"multi",void 0),bo([n("slot")],vo.prototype,"content",void 0);var go=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const xo=ft.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),yo=ft.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),mo=ft.external(bt.colorOutline,"Design system");class $o extends vt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return K`
|
|
1327
1327
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1328
1328
|
<div class="ft-accordion-item--toggle"
|
|
1329
1329
|
part="toggle"
|
|
@@ -1347,7 +1347,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1347
1347
|
</div>
|
|
1348
1348
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1349
1349
|
</div>
|
|
1350
|
-
`}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)}}
|
|
1350
|
+
`}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)}}$o.elementDefinitions={"ft-ripple":ri,"ft-typography":We,"ft-icon":Oi},$o.styles=v`
|
|
1351
1351
|
.ft-accordion-item {
|
|
1352
1352
|
display: flex;
|
|
1353
1353
|
flex-direction: column;
|
|
@@ -1360,8 +1360,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1360
1360
|
display: flex;
|
|
1361
1361
|
align-items: center;
|
|
1362
1362
|
cursor: pointer;
|
|
1363
|
-
padding: ${
|
|
1364
|
-
gap: calc(${
|
|
1363
|
+
padding: ${yo} ${xo};
|
|
1364
|
+
gap: calc(${xo} / 2);
|
|
1365
1365
|
outline: none;
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
@@ -1386,13 +1386,13 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1386
1386
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1387
1387
|
height: initial;
|
|
1388
1388
|
overflow: visible;
|
|
1389
|
-
padding: ${
|
|
1389
|
+
padding: ${yo} ${xo};
|
|
1390
1390
|
}
|
|
1391
1391
|
|
|
1392
1392
|
.ft-accordion-item--separator {
|
|
1393
|
-
border-bottom: 1px solid ${
|
|
1393
|
+
border-bottom: 1px solid ${mo};
|
|
1394
1394
|
}
|
|
1395
|
-
`,
|
|
1395
|
+
`,go([i({type:String})],$o.prototype,"icon",void 0),go([i({type:String})],$o.prototype,"label",void 0),go([i({type:Boolean,reflect:!0})],$o.prototype,"active",void 0),c("ft-accordion")(vo),c("ft-accordion-item")($o);var wo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ko=ft.extend("--ft-chip-color",bt.colorOnSurface),So={backgroundColor:ft.extend("--ft-chip-background-color",bt.colorSurface),color:ko,fontSize:ft.extend("--ft-chip-font-size",$e.fontSize),iconSize:ft.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ft.extend("--ft-chip-ripple-color",ko),horizontalPadding:ft.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ft.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ft.external(bt.colorOutline,"Design system"),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Oo=ft.extend("--ft-chip-highlighted-color",ft.extend("--ft-chip-color",bt.colorOnPrimary)),Co={backgroundColor:ft.extend("--ft-chip-highlighted-background-color",ft.extend("--ft-chip-background-color",bt.colorPrimary)),color:Oo,rippleColor:ft.extend("--ft-chip-highlighted-ripple-color",Oo)},zo=ft.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Eo=ft.create("--ft-chip-dense-vertical-padding","SIZE","4px");class Bo extends CustomEvent{constructor(){super("icon-click")}}class Mo extends vt{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}static get styles(){return[gt,v`
|
|
1396
1396
|
:host {
|
|
1397
1397
|
display: inline-block;
|
|
1398
1398
|
max-width: 100%;
|
|
@@ -1409,20 +1409,20 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1409
1409
|
box-sizing: border-box;
|
|
1410
1410
|
pointer-events: auto;
|
|
1411
1411
|
|
|
1412
|
-
--ft-chip-internal-font-size: ${
|
|
1412
|
+
--ft-chip-internal-font-size: ${So.fontSize};
|
|
1413
1413
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1414
|
-
${ut(
|
|
1415
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1416
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1414
|
+
${ut(Si.size,So.iconSize)};
|
|
1415
|
+
--ft-chip-internal-vertical-padding: ${So.verticalPadding};
|
|
1416
|
+
--ft-chip-internal-horizontal-padding: ${So.horizontalPadding};
|
|
1417
1417
|
--ft-chip-internal-icon-padding: 3px;
|
|
1418
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
1418
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${So.iconSize});
|
|
1419
1419
|
|
|
1420
|
-
border: 1px solid ${
|
|
1421
|
-
color: ${
|
|
1422
|
-
${ut(
|
|
1420
|
+
border: 1px solid ${So.colorOutline};
|
|
1421
|
+
color: ${So.color};
|
|
1422
|
+
${ut(Ge.color,So.rippleColor)};
|
|
1423
1423
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1424
1424
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1425
|
-
background-color: ${
|
|
1425
|
+
background-color: ${So.backgroundColor};
|
|
1426
1426
|
line-height: var(--ft-chip-internal-content-height);
|
|
1427
1427
|
}
|
|
1428
1428
|
|
|
@@ -1432,8 +1432,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1432
1432
|
|
|
1433
1433
|
.ft-chip--dense {
|
|
1434
1434
|
--ft-chip-internal-icon-padding: 3px;
|
|
1435
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1436
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1435
|
+
--ft-chip-internal-vertical-padding: ${Eo};
|
|
1436
|
+
--ft-chip-internal-horizontal-padding: ${zo};
|
|
1437
1437
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1438
1438
|
}
|
|
1439
1439
|
|
|
@@ -1445,15 +1445,15 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1445
1445
|
cursor: default;
|
|
1446
1446
|
pointer-events: none;
|
|
1447
1447
|
filter: grayscale(1);
|
|
1448
|
-
opacity: ${
|
|
1448
|
+
opacity: ${So.opacityDisabled};
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
1451
|
.ft-chip--highlighted {
|
|
1452
1452
|
border: none;
|
|
1453
1453
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1454
|
-
background-color: ${
|
|
1455
|
-
${ut(
|
|
1456
|
-
color: ${
|
|
1454
|
+
background-color: ${Co.backgroundColor};
|
|
1455
|
+
${ut(Ge.color,Co.rippleColor)};
|
|
1456
|
+
color: ${Co.color};
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
1459
|
.ft-chip--clickable {
|
|
@@ -1486,8 +1486,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1486
1486
|
vertical-align: bottom;
|
|
1487
1487
|
display: block;
|
|
1488
1488
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1489
|
-
${ut(
|
|
1490
|
-
${ut(
|
|
1489
|
+
${ut($e.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1490
|
+
${ut($e.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1491
1491
|
}
|
|
1492
1492
|
|
|
1493
1493
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1541,7 +1541,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1541
1541
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1542
1542
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1543
1543
|
</div>
|
|
1544
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1544
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Bo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Bo))}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)}}Mo.elementDefinitions={"ft-ripple":ri,"ft-typography":We,"ft-icon":Oi},wo([i({type:Boolean})],Mo.prototype,"highlighted",void 0),wo([i({type:Boolean})],Mo.prototype,"removable",void 0),wo([i({type:Boolean})],Mo.prototype,"disabled",void 0),wo([i({type:Boolean})],Mo.prototype,"clickable",void 0),wo([i({type:Boolean})],Mo.prototype,"iconClickable",void 0),wo([i({type:Boolean})],Mo.prototype,"dense",void 0),wo([i({type:Boolean})],Mo.prototype,"multiLine",void 0),wo([i({type:String})],Mo.prototype,"label",void 0),wo([i({type:String})],Mo.prototype,"icon",void 0),wo([i({type:Boolean})],Mo.prototype,"trailingIcon",void 0),wo([n("ft-typography slot")],Mo.prototype,"slottedContent",void 0),c("ft-chip")(Mo);var No=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Fo={fontSize:ft.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:ft.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:ft.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:ft.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:ft.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:ft.extend("--ft-input-label-border-color",bt.colorOutline),textColor:ft.extend("--ft-input-label-text-color",bt.colorOnSurfaceMedium),disabledTextColor:ft.extend("--ft-input-label-disabled-text-color",bt.colorOnSurfaceDisabled),colorSurface:ft.external(bt.colorSurface,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system"),colorError:ft.external(bt.colorError,"Design system")};class Ro extends vt{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 K`
|
|
1545
1545
|
<div class="${Dt(t)}">
|
|
1546
1546
|
${this.text?K`
|
|
1547
1547
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -1550,7 +1550,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1550
1550
|
</div>
|
|
1551
1551
|
`:null}
|
|
1552
1552
|
</div>
|
|
1553
|
-
`}}
|
|
1553
|
+
`}}Ro.elementDefinitions={},Ro.styles=[_e,v`
|
|
1554
1554
|
.ft-input-label {
|
|
1555
1555
|
position: absolute;
|
|
1556
1556
|
inset: 0;
|
|
@@ -1558,11 +1558,11 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1558
1558
|
}
|
|
1559
1559
|
|
|
1560
1560
|
.ft-input-label {
|
|
1561
|
-
border-color: ${
|
|
1561
|
+
border-color: ${Fo.borderColor};
|
|
1562
1562
|
}
|
|
1563
1563
|
|
|
1564
1564
|
.ft-input-label.ft-input-label--in-error {
|
|
1565
|
-
border-color: ${
|
|
1565
|
+
border-color: ${Fo.colorError}
|
|
1566
1566
|
}
|
|
1567
1567
|
|
|
1568
1568
|
.ft-input-label:before,
|
|
@@ -1575,7 +1575,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1575
1575
|
}
|
|
1576
1576
|
|
|
1577
1577
|
.ft-input-label:before {
|
|
1578
|
-
width: ${
|
|
1578
|
+
width: ${Fo.horizontalSpacing};
|
|
1579
1579
|
flex-shrink: 0;
|
|
1580
1580
|
}
|
|
1581
1581
|
|
|
@@ -1591,18 +1591,18 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1591
1591
|
border-bottom-width: 1px;
|
|
1592
1592
|
border-bottom-style: solid;
|
|
1593
1593
|
border-color: inherit;
|
|
1594
|
-
color: ${
|
|
1594
|
+
color: ${Fo.textColor};
|
|
1595
1595
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1596
|
-
${ut(
|
|
1597
|
-
${ut(
|
|
1596
|
+
${ut(we.fontSize,Fo.fontSize)};
|
|
1597
|
+
${ut(we.lineHeight,Fo.fontSize)};
|
|
1598
1598
|
}
|
|
1599
1599
|
|
|
1600
1600
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1601
|
-
color: ${
|
|
1601
|
+
color: ${Fo.colorError}
|
|
1602
1602
|
}
|
|
1603
1603
|
|
|
1604
1604
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1605
|
-
color: ${
|
|
1605
|
+
color: ${Fo.disabledTextColor};
|
|
1606
1606
|
}
|
|
1607
1607
|
|
|
1608
1608
|
.ft-input-label--hidden-text {
|
|
@@ -1618,17 +1618,17 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1618
1618
|
overflow: hidden;
|
|
1619
1619
|
white-space: nowrap;
|
|
1620
1620
|
text-overflow: ellipsis;
|
|
1621
|
-
padding: ${
|
|
1622
|
-
margin: calc(${
|
|
1621
|
+
padding: ${Fo.verticalSpacing} 4px;
|
|
1622
|
+
margin: calc(${Fo.verticalSpacing} * -1) 0;
|
|
1623
1623
|
}
|
|
1624
1624
|
|
|
1625
1625
|
.ft-input-label--raised .ft-input-label--text {
|
|
1626
|
-
${ut(
|
|
1627
|
-
${ut(
|
|
1626
|
+
${ut(we.fontSize,Fo.raisedFontSize)};
|
|
1627
|
+
${ut(we.lineHeight,Fo.raisedFontSize)};
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
1630
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1631
|
-
top: ${
|
|
1631
|
+
top: ${Fo.verticalSpacing};
|
|
1632
1632
|
}
|
|
1633
1633
|
|
|
1634
1634
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1641,27 +1641,27 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1641
1641
|
.ft-input-label--outlined:before {
|
|
1642
1642
|
border-left-width: 1px;
|
|
1643
1643
|
border-left-style: solid;
|
|
1644
|
-
border-radius: ${
|
|
1644
|
+
border-radius: ${Fo.borderRadiusS} 0 0 ${Fo.borderRadiusS};
|
|
1645
1645
|
}
|
|
1646
1646
|
|
|
1647
1647
|
.ft-input-label--outlined:after {
|
|
1648
1648
|
border-right-width: 1px;
|
|
1649
1649
|
border-right-style: solid;
|
|
1650
|
-
border-radius: 0 ${
|
|
1650
|
+
border-radius: 0 ${Fo.borderRadiusS} ${Fo.borderRadiusS} 0;
|
|
1651
1651
|
}
|
|
1652
1652
|
|
|
1653
1653
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1654
1654
|
padding: 2px 4px;
|
|
1655
|
-
z-index: ${
|
|
1656
|
-
background-color: ${
|
|
1657
|
-
border-radius: ${
|
|
1655
|
+
z-index: ${Fo.raisedZIndex};
|
|
1656
|
+
background-color: ${Fo.colorSurface};
|
|
1657
|
+
border-radius: ${Fo.borderRadiusS};
|
|
1658
1658
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1659
1659
|
}
|
|
1660
1660
|
|
|
1661
1661
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1662
1662
|
border-top: none;
|
|
1663
1663
|
}
|
|
1664
|
-
`],
|
|
1664
|
+
`],No([i({type:String})],Ro.prototype,"text",void 0),No([i({type:Boolean})],Ro.prototype,"raised",void 0),No([i({type:Boolean})],Ro.prototype,"outlined",void 0),No([i({type:Boolean})],Ro.prototype,"disabled",void 0),No([i({type:Boolean})],Ro.prototype,"error",void 0),c("ft-input-label")(Ro);var Lo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Do extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return K``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Do.elementDefinitions={},Lo([i({type:String})],Do.prototype,"label",void 0),Lo([i({type:Object,converter:t=>t})],Do.prototype,"value",void 0),Lo([i({type:Boolean,reflect:!0})],Do.prototype,"selected",void 0);const jo={labelSize:ft.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:ft.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:ft.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:ft.extend("--ft-select-selected-option-color",bt.colorOnSurface),helperColor:ft.extend("--ft-select-helper-color",bt.colorOnSurfaceMedium),optionsColor:ft.extend("--ft-select-options-color",bt.colorOnSurface),optionsZIndex:ft.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:ft.external(bt.colorSurface,"Design system"),colorOnSurfaceDisabled:ft.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system"),elevation02:ft.external(bt.elevation02,"Design system"),colorError:ft.external(bt.colorError,"Design system")};class Io extends vt{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 n=this.hasOptionsMenuOpen,r=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":r,"ft-select--options-displayed":n,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return K`
|
|
1665
1665
|
<div class="${Dt(a)}" part="container">
|
|
1666
1666
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1667
1667
|
<ft-input-label text="${this.label}"
|
|
@@ -1708,7 +1708,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1708
1708
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1709
1709
|
${t.label}
|
|
1710
1710
|
</div>
|
|
1711
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),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.minWidth=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,n;let r;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(),r=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(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.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){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
1711
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),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.minWidth=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,n;let r;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(),r=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(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.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){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Io.elementDefinitions={"ft-input-label":Ro,"ft-typography":We,"ft-ripple":ri,"ft-icon":Oi},Io.styles=[Ae,_e,v`
|
|
1712
1712
|
*:focus {
|
|
1713
1713
|
outline: none;
|
|
1714
1714
|
}
|
|
@@ -1722,7 +1722,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1722
1722
|
.ft-select--main-panel {
|
|
1723
1723
|
position: relative;
|
|
1724
1724
|
display: flex;
|
|
1725
|
-
height: calc(4 * ${
|
|
1725
|
+
height: calc(4 * ${jo.verticalSpacing} + ${jo.labelSize} + ${jo.selectedOptionSize});
|
|
1726
1726
|
}
|
|
1727
1727
|
|
|
1728
1728
|
.ft-select--input-panel {
|
|
@@ -1734,14 +1734,14 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1734
1734
|
padding-left: 16px;
|
|
1735
1735
|
padding-right: 8px;
|
|
1736
1736
|
gap: 8px;
|
|
1737
|
-
color: ${
|
|
1738
|
-
${ut(
|
|
1737
|
+
color: ${jo.selectedOptionColor};
|
|
1738
|
+
${ut(Ge.color,jo.selectedOptionColor)};
|
|
1739
1739
|
}
|
|
1740
1740
|
|
|
1741
1741
|
.ft-select--input-panel,
|
|
1742
1742
|
.ft-select--option {
|
|
1743
|
-
${ut(
|
|
1744
|
-
${ut(
|
|
1743
|
+
${ut(Ge.opacityContentOnSurfaceHover,"0.08")};
|
|
1744
|
+
${ut(Ge.opacityContentOnSurfacePressed,"0.04")};
|
|
1745
1745
|
}
|
|
1746
1746
|
|
|
1747
1747
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -1751,7 +1751,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1751
1751
|
|
|
1752
1752
|
.ft-select--disabled .ft-select--input-panel,
|
|
1753
1753
|
.ft-select--disabled .ft-select--option {
|
|
1754
|
-
color: ${
|
|
1754
|
+
color: ${jo.colorOnSurfaceDisabled};
|
|
1755
1755
|
}
|
|
1756
1756
|
|
|
1757
1757
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -1760,18 +1760,18 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1760
1760
|
}
|
|
1761
1761
|
|
|
1762
1762
|
ft-input-label {
|
|
1763
|
-
${ut(
|
|
1764
|
-
${ut(
|
|
1765
|
-
${ut(
|
|
1763
|
+
${ut(Fo.fontSize,jo.selectedOptionSize)};
|
|
1764
|
+
${ut(Fo.raisedFontSize,jo.labelSize)};
|
|
1765
|
+
${ut(Fo.verticalSpacing,jo.verticalSpacing)};
|
|
1766
1766
|
}
|
|
1767
1767
|
|
|
1768
1768
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1769
|
-
color: ${
|
|
1769
|
+
color: ${jo.colorPrimary};
|
|
1770
1770
|
}
|
|
1771
1771
|
|
|
1772
1772
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1773
|
-
${ut(
|
|
1774
|
-
${ut(
|
|
1773
|
+
${ut(Fo.borderColor,jo.colorPrimary)};
|
|
1774
|
+
${ut(Fo.textColor,jo.colorPrimary)};
|
|
1775
1775
|
}
|
|
1776
1776
|
|
|
1777
1777
|
.ft-select--selected-option {
|
|
@@ -1781,12 +1781,12 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1781
1781
|
overflow: hidden;
|
|
1782
1782
|
white-space: nowrap;
|
|
1783
1783
|
text-overflow: ellipsis;
|
|
1784
|
-
${ut(
|
|
1785
|
-
${ut(
|
|
1784
|
+
${ut(me.fontSize,jo.selectedOptionSize)};
|
|
1785
|
+
${ut(me.lineHeight,jo.selectedOptionSize)};
|
|
1786
1786
|
}
|
|
1787
1787
|
|
|
1788
1788
|
.ft-select--in-error .ft-select--selected-option {
|
|
1789
|
-
color: ${
|
|
1789
|
+
color: ${jo.colorError};
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
1792
1792
|
ft-icon {
|
|
@@ -1798,16 +1798,16 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1798
1798
|
}
|
|
1799
1799
|
|
|
1800
1800
|
.ft-select--filled .ft-select--input-panel {
|
|
1801
|
-
border-radius: ${
|
|
1801
|
+
border-radius: ${jo.borderRadiusS} ${jo.borderRadiusS} 0 0;
|
|
1802
1802
|
}
|
|
1803
1803
|
|
|
1804
1804
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1805
1805
|
align-self: stretch;
|
|
1806
|
-
padding-top: calc(${
|
|
1806
|
+
padding-top: calc(${jo.labelSize} + 2 * ${jo.verticalSpacing});
|
|
1807
1807
|
}
|
|
1808
1808
|
|
|
1809
1809
|
.ft-select--outlined .ft-select--input-panel {
|
|
1810
|
-
border-radius: ${
|
|
1810
|
+
border-radius: ${jo.borderRadiusS};
|
|
1811
1811
|
}
|
|
1812
1812
|
|
|
1813
1813
|
.ft-select--options {
|
|
@@ -1816,10 +1816,10 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1816
1816
|
top: 100%;
|
|
1817
1817
|
left: 0;
|
|
1818
1818
|
right: 0;
|
|
1819
|
-
color: ${
|
|
1820
|
-
background: ${
|
|
1821
|
-
z-index: ${
|
|
1822
|
-
box-shadow: ${
|
|
1819
|
+
color: ${jo.optionsColor};
|
|
1820
|
+
background: ${jo.colorSurface};
|
|
1821
|
+
z-index: ${jo.optionsZIndex};
|
|
1822
|
+
box-shadow: ${jo.elevation02};
|
|
1823
1823
|
}
|
|
1824
1824
|
|
|
1825
1825
|
.ft-select--fixed .ft-select--options {
|
|
@@ -1842,13 +1842,13 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1842
1842
|
|
|
1843
1843
|
.ft-select--helper-text {
|
|
1844
1844
|
padding: 0 12px 0 16px;
|
|
1845
|
-
color: ${
|
|
1845
|
+
color: ${jo.helperColor};
|
|
1846
1846
|
}
|
|
1847
1847
|
|
|
1848
1848
|
.ft-select--in-error .ft-select--helper-text {
|
|
1849
|
-
color: ${
|
|
1849
|
+
color: ${jo.colorError};
|
|
1850
1850
|
}
|
|
1851
|
-
`],
|
|
1851
|
+
`],Lo([i({type:String})],Io.prototype,"label",void 0),Lo([i({type:String})],Io.prototype,"helper",void 0),Lo([i({type:Boolean})],Io.prototype,"outlined",void 0),Lo([i({type:Boolean})],Io.prototype,"disabled",void 0),Lo([i({type:Boolean})],Io.prototype,"error",void 0),Lo([i({type:Boolean})],Io.prototype,"fixedMenuPosition",void 0),Lo([i({type:Array})],Io.prototype,"options",void 0),Lo([o()],Io.prototype,"selectedOption",void 0),Lo([o()],Io.prototype,"optionsDisplayed",void 0),Lo([o()],Io.prototype,"focusOptions",void 0),Lo([n(".ft-select")],Io.prototype,"container",void 0),Lo([n(".ft-select--options")],Io.prototype,"optionsMenu",void 0),Lo([n(".ft-select--input-panel")],Io.prototype,"mainPanel",void 0),Lo([n(".ft-select--option:first-child")],Io.prototype,"firstOption",void 0),Lo([n(".ft-select--option:focus")],Io.prototype,"focusedOption",void 0),Lo([n(".ft-select--option.ft-select--option-selected")],Io.prototype,"selectedOptionElement",void 0),Lo([n(".ft-select--option:last-child")],Io.prototype,"lastOption",void 0),Lo([n("slot")],Io.prototype,"optionsSlot",void 0),c("ft-select")(Io),c("ft-select-option")(Do);const Uo={height:ft.create("--ft-search-bar-height","SIZE","38px"),borderRadius:ft.extend("--ft-search-bar-border-radius",bt.borderRadiusS),mobileOpenPosition:ft.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:ft.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:ft.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:ft.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:ft.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:ft.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:ft.external(bt.colorSurface,"Design system"),colorOnSurface:ft.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(bt.colorOnSurfaceMedium,"Design system"),colorOutline:ft.external(bt.colorOutline,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),elevation02:ft.external(bt.elevation02,"Design system"),buttonColor:ft.external(Ei.color,"Button"),buttonRippleColor:ft.external(Ei.rippleColor,"Button")},To=v`
|
|
1852
1852
|
* {
|
|
1853
1853
|
box-sizing: border-box;
|
|
1854
1854
|
}
|
|
@@ -1857,7 +1857,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1857
1857
|
display: flex;
|
|
1858
1858
|
flex-direction: column;
|
|
1859
1859
|
gap: 8px;
|
|
1860
|
-
color: ${
|
|
1860
|
+
color: ${Uo.colorOnSurface};
|
|
1861
1861
|
outline: none;
|
|
1862
1862
|
}
|
|
1863
1863
|
|
|
@@ -1866,14 +1866,14 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1866
1866
|
}
|
|
1867
1867
|
|
|
1868
1868
|
.ft-search-bar--mobile-menu-open {
|
|
1869
|
-
position: ${
|
|
1870
|
-
top: ${
|
|
1871
|
-
bottom: ${
|
|
1872
|
-
left: ${
|
|
1873
|
-
right: ${
|
|
1874
|
-
z-index: ${
|
|
1869
|
+
position: ${Uo.mobileOpenPosition};
|
|
1870
|
+
top: ${Uo.mobileOpenTop};
|
|
1871
|
+
bottom: ${Uo.mobileOpenBottom};
|
|
1872
|
+
left: ${Uo.mobileOpenLeft};
|
|
1873
|
+
right: ${Uo.mobileOpenRight};
|
|
1874
|
+
z-index: ${Uo.floatingZIndex};
|
|
1875
1875
|
padding: 16px;
|
|
1876
|
-
background: ${
|
|
1876
|
+
background: ${Uo.colorSurface};
|
|
1877
1877
|
}
|
|
1878
1878
|
|
|
1879
1879
|
.ft-search-bar {
|
|
@@ -1881,15 +1881,15 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1881
1881
|
display: flex;
|
|
1882
1882
|
flex-direction: row;
|
|
1883
1883
|
align-items: center;
|
|
1884
|
-
height: ${
|
|
1884
|
+
height: ${Uo.height};
|
|
1885
1885
|
|
|
1886
|
-
background: ${
|
|
1887
|
-
border: 1px solid ${
|
|
1888
|
-
border-radius: ${
|
|
1886
|
+
background: ${Uo.colorSurface};
|
|
1887
|
+
border: 1px solid ${Uo.colorOutline};
|
|
1888
|
+
border-radius: ${Uo.borderRadius};
|
|
1889
1889
|
}
|
|
1890
1890
|
|
|
1891
1891
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1892
|
-
border-radius: ${
|
|
1892
|
+
border-radius: ${Uo.borderRadius} ${Uo.borderRadius} 0 0;
|
|
1893
1893
|
}
|
|
1894
1894
|
|
|
1895
1895
|
.ft-search-bar--input-container {
|
|
@@ -1907,7 +1907,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1907
1907
|
align-self: stretch;
|
|
1908
1908
|
display: grid;
|
|
1909
1909
|
padding: 0 8px;
|
|
1910
|
-
border-radius: ${
|
|
1910
|
+
border-radius: ${Uo.borderRadius};
|
|
1911
1911
|
}
|
|
1912
1912
|
|
|
1913
1913
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -1916,7 +1916,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1916
1916
|
}
|
|
1917
1917
|
|
|
1918
1918
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1919
|
-
outline: 2px solid ${
|
|
1919
|
+
outline: 2px solid ${Uo.colorPrimary};
|
|
1920
1920
|
}
|
|
1921
1921
|
|
|
1922
1922
|
.ft-search-bar--input {
|
|
@@ -1948,8 +1948,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1948
1948
|
}
|
|
1949
1949
|
|
|
1950
1950
|
.ft-search-bar--left-action {
|
|
1951
|
-
${ut(
|
|
1952
|
-
border-right: 1px solid ${
|
|
1951
|
+
${ut(Ei.borderRadius,v`calc(${Uo.borderRadius} - 1px) 0 0 calc(${Uo.borderRadius} - 1px)`)};
|
|
1952
|
+
border-right: 1px solid ${Uo.colorOutline};
|
|
1953
1953
|
height: 100%;
|
|
1954
1954
|
}
|
|
1955
1955
|
|
|
@@ -1958,7 +1958,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1958
1958
|
}
|
|
1959
1959
|
|
|
1960
1960
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1961
|
-
${ut(
|
|
1961
|
+
${ut(Ei.borderRadius,v`calc(${Uo.borderRadius} - 1px) 0 0 0`)};
|
|
1962
1962
|
}
|
|
1963
1963
|
|
|
1964
1964
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -1968,13 +1968,13 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1968
1968
|
|
|
1969
1969
|
.ft-search-bar--separator {
|
|
1970
1970
|
height: 20px;
|
|
1971
|
-
border-right: 1px solid ${
|
|
1971
|
+
border-right: 1px solid ${Uo.colorOutline};
|
|
1972
1972
|
}
|
|
1973
1973
|
|
|
1974
1974
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
1975
|
-
${ut(
|
|
1976
|
-
${ut(
|
|
1977
|
-
${ut(
|
|
1975
|
+
${ut(Fo.borderColor,"transparent")};
|
|
1976
|
+
${ut(Fo.borderRadiusS,v`calc(${Uo.borderRadius} - 1px)`)};
|
|
1977
|
+
${ut(jo.selectedOptionColor,Uo.buttonColor)};
|
|
1978
1978
|
}
|
|
1979
1979
|
|
|
1980
1980
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -1991,17 +1991,17 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1991
1991
|
}
|
|
1992
1992
|
|
|
1993
1993
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
1994
|
-
border-radius: calc(${
|
|
1994
|
+
border-radius: calc(${Uo.borderRadius} - 1px) 0 0 calc(${Uo.borderRadius} - 1px);
|
|
1995
1995
|
}
|
|
1996
1996
|
|
|
1997
|
-
`,
|
|
1997
|
+
`,Po=v`
|
|
1998
1998
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
1999
1999
|
margin-right: auto;
|
|
2000
2000
|
}
|
|
2001
2001
|
|
|
2002
2002
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
2003
2003
|
min-width: 250px;
|
|
2004
|
-
${ut(
|
|
2004
|
+
${ut(jo.optionsZIndex,"2")};
|
|
2005
2005
|
}
|
|
2006
2006
|
|
|
2007
2007
|
.ft-search-bar--floating-panel {
|
|
@@ -2093,7 +2093,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2093
2093
|
|
|
2094
2094
|
.ft-search-bar--filter-label > :last-child {
|
|
2095
2095
|
flex-shrink: 1;
|
|
2096
|
-
color: ${
|
|
2096
|
+
color: ${Uo.colorOnSurfaceMedium};
|
|
2097
2097
|
}
|
|
2098
2098
|
|
|
2099
2099
|
ft-accordion-item::part(toggle) {
|
|
@@ -2113,7 +2113,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2113
2113
|
.ft-search-bar--floating-panel .ft-search-bar--launch-search {
|
|
2114
2114
|
margin: 0;
|
|
2115
2115
|
}
|
|
2116
|
-
`,
|
|
2116
|
+
`,Ao=v`
|
|
2117
2117
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2118
2118
|
flex-shrink: 0;
|
|
2119
2119
|
display: flex;
|
|
@@ -2124,7 +2124,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2124
2124
|
|
|
2125
2125
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2126
2126
|
overflow: hidden;
|
|
2127
|
-
${ut(
|
|
2127
|
+
${ut(Gi.gap,"4px")};
|
|
2128
2128
|
}
|
|
2129
2129
|
|
|
2130
2130
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -2132,8 +2132,8 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2132
2132
|
}
|
|
2133
2133
|
|
|
2134
2134
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2135
|
-
${ut(
|
|
2136
|
-
${ut(
|
|
2135
|
+
${ut(So.iconSize,"17px")};
|
|
2136
|
+
${ut(So.fontSize,"12px")};
|
|
2137
2137
|
}
|
|
2138
2138
|
|
|
2139
2139
|
.ft-search-bar--selected-filters * {
|
|
@@ -2143,7 +2143,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2143
2143
|
.ft-search-bar--selected-filters ft-chip {
|
|
2144
2144
|
flex-grow: 0;
|
|
2145
2145
|
}
|
|
2146
|
-
`,
|
|
2146
|
+
`,_o=v`
|
|
2147
2147
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2148
2148
|
flex-grow: 1;
|
|
2149
2149
|
flex-shrink: 1;
|
|
@@ -2152,7 +2152,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2152
2152
|
}
|
|
2153
2153
|
|
|
2154
2154
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2155
|
-
border-top: 1px solid ${
|
|
2155
|
+
border-top: 1px solid ${Uo.colorOutline};
|
|
2156
2156
|
}
|
|
2157
2157
|
|
|
2158
2158
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2167,10 +2167,10 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2167
2167
|
left: -1px;
|
|
2168
2168
|
right: -1px;
|
|
2169
2169
|
display: none;
|
|
2170
|
-
background: ${
|
|
2171
|
-
border: 1px solid ${
|
|
2172
|
-
border-radius: 0 0 ${
|
|
2173
|
-
box-shadow: ${
|
|
2170
|
+
background: ${Uo.colorSurface};
|
|
2171
|
+
border: 1px solid ${Uo.colorOutline};
|
|
2172
|
+
border-radius: 0 0 ${Uo.borderRadius} ${Uo.borderRadius};
|
|
2173
|
+
box-shadow: ${Uo.elevation02};
|
|
2174
2174
|
outline: none;
|
|
2175
2175
|
}
|
|
2176
2176
|
|
|
@@ -2185,7 +2185,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2185
2185
|
.ft-search-bar--no-suggestions {
|
|
2186
2186
|
text-align: center;
|
|
2187
2187
|
padding: 8px;
|
|
2188
|
-
color: ${
|
|
2188
|
+
color: ${Uo.colorOnSurface};
|
|
2189
2189
|
}
|
|
2190
2190
|
|
|
2191
2191
|
.ft-search-bar--suggestion {
|
|
@@ -2196,7 +2196,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2196
2196
|
padding: 8px;
|
|
2197
2197
|
gap: 8px;
|
|
2198
2198
|
cursor: pointer;
|
|
2199
|
-
color: ${
|
|
2199
|
+
color: ${Uo.colorOnSurface};
|
|
2200
2200
|
min-height: 52px;
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
@@ -2213,7 +2213,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2213
2213
|
}
|
|
2214
2214
|
|
|
2215
2215
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2216
|
-
border-top: 1px solid ${
|
|
2216
|
+
border-top: 1px solid ${Uo.colorOutline};
|
|
2217
2217
|
}
|
|
2218
2218
|
|
|
2219
2219
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2221,7 +2221,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2221
2221
|
flex-grow: 1;
|
|
2222
2222
|
flex-shrink: 1;
|
|
2223
2223
|
}
|
|
2224
|
-
`;var
|
|
2224
|
+
`;var Ho=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};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 Zo={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class Ko extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class Wo extends CustomEvent{constructor(t){super("change",{detail:t})}}class Vo extends vt{constructor(){super(...arguments),this.dense=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new xt(Zo,{}),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=jt.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new t(500),this.suggestDebouncer=new t(300),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)))))}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.priors.length>0?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!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,priors:this.priors.length>0?this.priors:void 0,sort:[]}}get isMobile(){return this.sizeCategory===jt.S}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return K`
|
|
2225
2225
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2226
2226
|
<div class="${Dt(t)}" part="container" tabindex="-1">
|
|
2227
2227
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
@@ -2293,12 +2293,12 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2293
2293
|
></ft-filter>
|
|
2294
2294
|
</ft-accordion-item>
|
|
2295
2295
|
`:null}
|
|
2296
|
-
${Lt(this.facets,(t=>t.key),(t=>{const e=
|
|
2296
|
+
${Lt(this.facets,(t=>t.key),(t=>{const e=Xe(t);return K`
|
|
2297
2297
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2298
2298
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2299
2299
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2300
2300
|
<ft-typography variant="body2">
|
|
2301
|
-
${function(t){return
|
|
2301
|
+
${function(t){return Ve(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2302
2302
|
</ft-typography>
|
|
2303
2303
|
</div>
|
|
2304
2304
|
<ft-filter
|
|
@@ -2427,7 +2427,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2427
2427
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2428
2428
|
></ft-filter>
|
|
2429
2429
|
`:V}
|
|
2430
|
-
${Lt(this.facets,(t=>t.key),(t=>{const e=
|
|
2430
|
+
${Lt(this.facets,(t=>t.key),(t=>{const e=Xe(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}));return K`
|
|
2431
2431
|
<ft-filter
|
|
2432
2432
|
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2433
2433
|
part="filters"
|
|
@@ -2453,7 +2453,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2453
2453
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2454
2454
|
</ft-chip>
|
|
2455
2455
|
`:null}
|
|
2456
|
-
${Lt(this.facets,(t=>t.key),(e=>{const i=function(t){return
|
|
2456
|
+
${Lt(this.facets,(t=>t.key),(e=>{const i=function(t){return Ve(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return Lt(i,(o=>{let s=e.label+": "+function(t){return qe(t).split("|").join(" > ")}(o);const n=K`
|
|
2457
2457
|
<ft-chip
|
|
2458
2458
|
part="selected-filters"
|
|
2459
2459
|
?dense=${this.dense&&!this.isMobile}
|
|
@@ -2464,7 +2464,7 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2464
2464
|
title=${t?s:V}
|
|
2465
2465
|
@click=${()=>this.openMobileFilters(e.key)}
|
|
2466
2466
|
@icon-click=${()=>this.setFilter(e.key,i.filter((t=>t!==o)))}>
|
|
2467
|
-
${function(t){return
|
|
2467
|
+
${function(t){return qe(t).split("|").pop()}(o)}
|
|
2468
2468
|
</ft-chip>
|
|
2469
2469
|
`;return t?n:K`
|
|
2470
2470
|
<ft-tooltip inline text="${s}">
|
|
@@ -2527,13 +2527,13 @@ class ui extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2527
2527
|
</ft-typography>
|
|
2528
2528
|
`:null}
|
|
2529
2529
|
</div>
|
|
2530
|
-
`}getIcon(t){const e="DOCUMENT"===t.type?
|
|
2530
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?wi.file_format:wi.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?xi.BOOK:xi.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[r,l]=((null!==(i=$i.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=mi.get(l))&&void 0!==o?o:mi.get(e))&&void 0!==s?s:mi.get(r))&&void 0!==n?n:yi.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=xi.TOPICS}return K`
|
|
2531
2531
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2532
2532
|
${i}
|
|
2533
2533
|
</ft-icon>
|
|
2534
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,o;if(t.has("labels")&&(this.labelResolver=new xt(
|
|
2534
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,o;if(t.has("labels")&&(this.labelResolver=new xt(Zo,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.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("selectedPreset")){const t=this.presets.find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(o=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===o?void 0:o.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Wo(this.request))}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.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}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}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}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 Ko(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}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}getLocaleLabel(t){var e;return null!==(e=this.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}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Ve(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=>Ve(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}removeRecentSearch(t,e){var i,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}}Vo.elementDefinitions={"ft-accordion":vo,"ft-accordion-item":$o,"ft-button":Fi,"ft-chip":Mo,"ft-filter":po,"ft-filter-option":uo,"ft-icon":Oi,"ft-ripple":ri,"ft-select":Io,"ft-select-option":Do,"ft-size-watcher":Tt,"ft-snap-scroll":eo,"ft-tooltip":fi,"ft-typography":We},Vo.styles=[Ae,To,Po,Ao,_o],Ho([i({type:Boolean})],Vo.prototype,"dense",void 0),Ho([i({type:String})],Vo.prototype,"baseUrl",void 0),Ho([i({type:String})],Vo.prototype,"apiIntegrationIdentifier",void 0),Ho([i({type:String})],Vo.prototype,"contentLocale",void 0),Ho([o()],Vo.prototype,"availableContentLocales",void 0),Ho([i({type:String})],Vo.prototype,"uiLocale",void 0),Ho([h({})],Vo.prototype,"labels",void 0),Ho([h([])],Vo.prototype,"displayedFilters",void 0),Ho([h([])],Vo.prototype,"presets",void 0),Ho([h([])],Vo.prototype,"priors",void 0),Ho([i({type:String,reflect:!0})],Vo.prototype,"selectedPreset",void 0),Ho([i()],Vo.prototype,"searchRequestSerializer",void 0),Ho([o()],Vo.prototype,"searchFilters",void 0),Ho([o()],Vo.prototype,"sizeCategory",void 0),Ho([o()],Vo.prototype,"displayFacets",void 0),Ho([o()],Vo.prototype,"mobileMenuOpen",void 0),Ho([o()],Vo.prototype,"facets",void 0),Ho([n(".ft-search-bar--container")],Vo.prototype,"container",void 0),Ho([n(".ft-search-bar--filters-opener")],Vo.prototype,"filtersOpener",void 0),Ho([n(".ft-search-bar--floating-panel")],Vo.prototype,"floatingContainer",void 0),Ho([n("ft-snap-scroll.ft-search-bar--filters-container")],Vo.prototype,"scrollingFiltersContainer",void 0),Ho([n(".ft-search-bar--input")],Vo.prototype,"input",void 0),Ho([o()],Vo.prototype,"query",void 0),Ho([o()],Vo.prototype,"suggestions",void 0),Ho([o()],Vo.prototype,"suggestionsLoaded",void 0),Ho([o()],Vo.prototype,"recentSearches",void 0),Ho([o()],Vo.prototype,"scrollToFacet",void 0),Ho([n(".ft-search-bar--suggestion:first-child")],Vo.prototype,"firstSuggestion",void 0),Ho([n(".ft-search-bar--suggestion:focus-within")],Vo.prototype,"focusedSuggestion",void 0),Ho([n(".ft-search-bar--suggestion:last-child")],Vo.prototype,"lastSuggestion",void 0),Ho([o()],Vo.prototype,"api",void 0),c("ft-search-bar")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),K`
|
|
2535
2535
|
${i.map((t=>K`
|
|
2536
2536
|
<style>${t}</style>
|
|
2537
2537
|
`))}
|
|
2538
2538
|
${super.render()}
|
|
2539
|
-
`}},i.styles=void 0,i.elementDefinitions=o,i}(
|
|
2539
|
+
`}},i.styles=void 0,i.elementDefinitions=o,i}(Vo))}();
|