@fluid-topics/ft-search-bar 1.1.2 → 1.1.3
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.min.js +39 -39
- package/package.json +14 -14
|
@@ -12,43 +12,43 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let h=o.call(i,t);h||(h=p(t),e.call(i,t,h)),this===window.customElements&&(a.set(r,c),c.standInClass=h);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),i.upgrade.apply(i,arguments),g.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),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=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=h(o)||window.customElements,r=i._getDefinition(e);return r?u(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},d=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):d(o)},u=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&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 g=[document];const y=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){g.push(this),o.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(or){const t=window.customElements.define;window.customElements.define=(e,o,i)=>{if(null!==o)try{t.bind(window.customElements)(e,o,i)}catch(t){console.info(e,o,i,t)}}}
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let h=o.call(i,t);h||(h=p(t),e.call(i,t,h)),this===window.customElements&&(a.set(r,c),c.standInClass=h);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),i.upgrade.apply(i,arguments),g.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),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=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=h(o)||window.customElements,r=i._getDefinition(e);return r?u(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},d=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):d(o)},u=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&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 g=[document];const y=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){g.push(this),o.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(or){const t=window.customElements.define;window.customElements.define=(e,o,i)=>{if(null!==o)try{t.bind(window.customElements)(e,o,i)}catch(t){console.info(e,o,i,t)}}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/const
|
|
20
|
+
*/const e=globalThis,o=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),r=new WeakMap;const n=t=>new class{constructor(t,e,o){if(this._$cssResult$=!0,o!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&r.set(e,t))}return t}toString(){return this.cssText}}("string"==typeof t?t:t+"",void 0,i),a=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return n(e)})(t):t
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/,{is:
|
|
25
|
+
*/,{is:s,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:p,getPrototypeOf:f}=Object,d=globalThis,u=d.trustedTypes,b=u?u.emptyScript:"",g=d.reactiveElementPolyfillSupport,y=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},v=(t,e)=>!s(t,e),x={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:v};Symbol.metadata??=Symbol("metadata"),d.litPropertyMetadata??=new WeakMap;let $=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&l(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const n=i?.call(this);r.call(this,e),this.requestUpdate(t,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??x}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=f(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...h(t),...p(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{if(o)t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of i){const i=document.createElement("style"),r=e.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=o.cssText,t.appendChild(i)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const r=(void 0!==o.converter?.toAttribute?o.converter:m).toAttribute(e,o.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o,i=!1,r){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??v)(i?r:this[t],e))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[y("elementProperties")]=new Map,$[y("finalized")]=new Map,g?.({ReactiveElement:$}),(d.reactiveElementVersions??=[]).push("2.0.2");
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
30
|
*/
|
|
31
|
-
const
|
|
31
|
+
const O={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:v},w=(t=O,e,o)=>{const{kind:i,metadata:r}=o;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const r=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.C(i,void 0,t),e}}}if("setter"===i){const{name:i}=o;return function(o){const r=this[i];e.call(this,o),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};function S(t){return(e,o)=>"object"==typeof o?w(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)
|
|
32
32
|
/**
|
|
33
33
|
* @license
|
|
34
34
|
* Copyright 2017 Google LLC
|
|
35
35
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
36
|
-
*/}function
|
|
36
|
+
*/}function k(t){return S({...t,state:!0,attribute:!1})}
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/const
|
|
41
|
+
*/const N=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,o)
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright 2017 Google LLC
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/;function
|
|
46
|
+
*/;function C(t,e){return(o,i,r)=>{const n=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?o:r??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return N(0,0,{get(){let o=t.call(this);return void 0===o&&(o=n(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return N(0,0,{get(){return n(this)}})}}
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/let R;function I(t,e){return t.flatMap((t=>[t,...I(e(t),e)]))}function U(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var o,i,r;if(Array.isArray(t)){if((o=t.length)!=e.length)return!1;for(i=o;0!=i--;)if(!U(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!U(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((o=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(i=o;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,r[i]))return!1;for(i=o;0!=i--;){var n=r[i];if(!U(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const L=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function z(t,e){const o=()=>JSON.parse(JSON.stringify(t));return
|
|
51
|
+
*/let E;class R{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const o=[...this.callbacks];this.callbacks=[];const i=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of o)try{await t()}catch(t){return void i(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}function I(t,e){return t.flatMap((t=>[t,...I(e(t),e)]))}function U(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var o,i,r;if(Array.isArray(t)){if((o=t.length)!=e.length)return!1;for(i=o;0!=i--;)if(!U(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!U(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((o=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(i=o;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,r[i]))return!1;for(i=o;0!=i--;){var n=r[i];if(!U(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const L=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function z(t,e){const o=()=>JSON.parse(JSON.stringify(t));return S({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!U(t,e),...null!=e?e:{}})}
|
|
52
52
|
/**
|
|
53
53
|
* @license
|
|
54
54
|
* Copyright 2017 Google LLC
|
|
@@ -81,7 +81,7 @@ let Oe=class extends Mt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright 2019 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
|
-
*/class We extends Oe{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{ze?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=Le.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Be,Fe=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const De=Symbol("constructorPrototype"),Ke=Symbol("constructorName"),Ze=Symbol("exportpartsDebouncer");class Me extends We{constructor(){super(),this[Be]=new
|
|
84
|
+
*/class We extends Oe{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{ze?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=Le.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Be,Fe=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const De=Symbol("constructorPrototype"),Ke=Symbol("constructorName"),Ze=Symbol("exportpartsDebouncer");class Me extends We{constructor(){super(),this[Be]=new R(5),this[Ke]=this.constructor.name,this[De]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ke]&&Object.setPrototypeOf(this,this[De])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,o;if((null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==o?o:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Ze].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,o,i,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==o?o:[]){const e=null!==(r=null===(i=t.getAttribute("part"))||void 0===i?void 0:i.split(" "))&&void 0!==r?r:[],o=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...o).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const h=[...c.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}}Be=Ze,Fe([S()],Me.prototype,"exportpartsPrefix",void 0),Fe([z([])],Me.prototype,"exportpartsPrefixes",void 0),Fe([S()],Me.prototype,"customStylesheet",void 0);const Ae=ke.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");St`
|
|
85
85
|
.highlight-html-match {
|
|
86
86
|
background: ${Ae};
|
|
87
87
|
}
|
|
@@ -151,11 +151,11 @@ let Oe=class extends Mt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
151
151
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
152
152
|
width: 100%;
|
|
153
153
|
}
|
|
154
|
-
`;var po=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class fo extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class uo extends Me{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=co.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new
|
|
154
|
+
`;var po=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class fo extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class uo extends Me{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=co.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new R}render(){return ae`
|
|
155
155
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
156
156
|
<div class="ft-size-watcher--watcher"></div>
|
|
157
157
|
</div>
|
|
158
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=co.S:this.size<976?this.category=co.M:this.size<1024?this.category=co.L:this.size<1440?this.category=co.XL:this.category=co.XXL,this.dispatchEvent(new fo(this.size,this.category)))}),this.debounceTimeout)}}uo.elementDefinitions={},uo.styles=ho,po([
|
|
158
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=co.S:this.size<976?this.category=co.M:this.size<1024?this.category=co.L:this.size<1440?this.category=co.XL:this.category=co.XXL,this.dispatchEvent(new fo(this.size,this.category)))}),this.debounceTimeout)}}uo.elementDefinitions={},uo.styles=ho,po([S({type:Number})],uo.prototype,"debounceTimeout",void 0),po([S({type:Boolean})],uo.prototype,"local",void 0),po([S({type:Number,reflect:!0})],uo.prototype,"size",void 0),po([S({type:String,reflect:!0})],uo.prototype,"category",void 0),po([C(".ft-size-watcher--watcher")],uo.prototype,"watcher",void 0),L("ft-size-watcher")(uo);
|
|
159
159
|
/**
|
|
160
160
|
* @license
|
|
161
161
|
* Copyright 2020 Google LLC
|
|
@@ -272,7 +272,7 @@ const bo=Symbol.for(""),go=t=>{if(t?.r===bo)return t?._$litStatic$},yo=t=>({_$li
|
|
|
272
272
|
</${yo(this.element)}>
|
|
273
273
|
`:vo`
|
|
274
274
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
275
|
-
`}}function Si(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function ki(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>ki(e,t.selected))),value:t.value}}function Ni(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>ki(t,!1)))}}wi.styles=[hi,pi,fi,di,ui,bi,gi,yi,mi,vi,xi,...$i],Oi([
|
|
275
|
+
`}}function Si(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function ki(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>ki(e,t.selected))),value:t.value}}function Ni(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>ki(t,!1)))}}wi.styles=[hi,pi,fi,di,ui,bi,gi,yi,mi,vi,xi,...$i],Oi([S()],wi.prototype,"element",void 0),Oi([S()],wi.prototype,"variant",void 0),L("ft-typography")(wi);const Ci=ke.extend("--ft-ripple-color","",Ue.colorContent),Ei={color:Ci,backgroundColor:ke.extend("--ft-ripple-background-color","",Ci),opacityContentOnSurfacePressed:ke.external(Ue.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ke.external(Ue.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ke.external(Ue.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ke.external(Ue.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ke.create("--ft-ripple-border-radius","","SIZE","0px")},Ri=ke.extend("--ft-ripple-color","",Ue.colorPrimary),Ii=Ri,Ui=ke.extend("--ft-ripple-background-color","",Ri),Li=ke.extend("--ft-ripple-color","",Ue.colorSecondary),zi=Li,Wi=ke.extend("--ft-ripple-background-color","",Li),Bi=St`
|
|
276
276
|
:host {
|
|
277
277
|
display: contents;
|
|
278
278
|
}
|
|
@@ -638,7 +638,7 @@ const bo=Symbol.for(""),go=t=>{if(t?.r===bo)return t?._$litStatic$},yo=t=>({_$li
|
|
|
638
638
|
${Ne(Fi.size,Ai.iconSize)};
|
|
639
639
|
${Ne(Fi.color,"var(--ft-button-internal-color)")};
|
|
640
640
|
}
|
|
641
|
-
`,Pe],qi=Qe(class extends to{constructor(t){if(super(t),t.type!==Je||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return et}});var Yi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ji extends Me{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new
|
|
641
|
+
`,Pe],qi=Qe(class extends to{constructor(t){if(super(t),t.type!==Je||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return et}});var Yi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ji extends Me{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new R(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new R(10),this.moveRipple=t=>{var e,o;let{x:i,y:r}=this.getCoordinates(t),n=null!==(o=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==o?o:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=i?i-n.x:n.width/2),this.originY=Math.round(null!=r?r-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return ae`
|
|
642
642
|
<style>
|
|
643
643
|
.ft-ripple .ft-ripple--effect {
|
|
644
644
|
left: ${this.originX}px;
|
|
@@ -649,7 +649,7 @@ const bo=Symbol.for(""),go=t=>{if(t?.r===bo)return t?._$litStatic$},yo=t=>({_$li
|
|
|
649
649
|
<div class="ft-ripple--background"></div>
|
|
650
650
|
<div class="ft-ripple--effect"></div>
|
|
651
651
|
</div>
|
|
652
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=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",o),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",o),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let 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.endRipple()}}Ji.elementDefinitions={},Ji.styles=Bi,Yi([
|
|
652
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=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",o),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",o),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let 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.endRipple()}}Ji.elementDefinitions={},Ji.styles=Bi,Yi([S({type:Boolean})],Ji.prototype,"primary",void 0),Yi([S({type:Boolean})],Ji.prototype,"secondary",void 0),Yi([S({type:Boolean})],Ji.prototype,"unbounded",void 0),Yi([S({type:Boolean})],Ji.prototype,"activated",void 0),Yi([S({type:Boolean})],Ji.prototype,"selected",void 0),Yi([S({type:Boolean})],Ji.prototype,"disabled",void 0),Yi([k()],Ji.prototype,"hovered",void 0),Yi([k()],Ji.prototype,"focused",void 0),Yi([k()],Ji.prototype,"pressed",void 0),Yi([k()],Ji.prototype,"rippling",void 0),Yi([k()],Ji.prototype,"originX",void 0),Yi([k()],Ji.prototype,"originY",void 0),Yi([C(".ft-ripple")],Ji.prototype,"ripple",void 0),Yi([C(".ft-ripple--effect")],Ji.prototype,"rippleEffect",void 0),L("ft-ripple")(Ji);const Xi={distance:ke.create("--ft-tooltip-distance","","SIZE","4px"),color:ke.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:ke.create("--ft-tooltip-background-color","","COLOR","#666666"),zIndex:ke.create("--ft-tooltip-z-index","","NUMBER","100"),borderRadiusS:ke.external(Ue.borderRadiusS,"Design system"),maxWidth:ke.create("--ft-tooltip-max-width","","SIZE","150px")},Qi=St`
|
|
653
653
|
.ft-tooltip--container {
|
|
654
654
|
display: block;
|
|
655
655
|
}
|
|
@@ -678,7 +678,7 @@ const bo=Symbol.for(""),go=t=>{if(t?.r===bo)return t?._$litStatic$},yo=t=>({_$li
|
|
|
678
678
|
position: relative;
|
|
679
679
|
word-break: break-word;
|
|
680
680
|
}
|
|
681
|
-
`;var tr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class er extends Me{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new
|
|
681
|
+
`;var tr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class er extends Me{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new R,this.revealDebouncer=new R}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return ae`
|
|
682
682
|
<div part="container"
|
|
683
683
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
684
684
|
@mouseenter=${this.onHover}
|
|
@@ -696,13 +696,13 @@ const bo=Symbol.for(""),go=t=>{if(t?.r===bo)return t?._$litStatic$},yo=t=>({_$li
|
|
|
696
696
|
</div>
|
|
697
697
|
</div>
|
|
698
698
|
</div>
|
|
699
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,o=this.tooltip.offsetHeight,i=(t.offsetHeight-o)/2,r=(t.offsetWidth-e)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-o-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,h=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,h))+"px";let p=-l.y,f=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(p,f))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${Xi.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}er.elementDefinitions={"ft-typography":wi},er.styles=Qi,tr([
|
|
699
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,o=this.tooltip.offsetHeight,i=(t.offsetHeight-o)/2,r=(t.offsetWidth-e)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-o-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,h=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,h))+"px";let p=-l.y,f=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(p,f))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${Xi.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}er.elementDefinitions={"ft-typography":wi},er.styles=Qi,tr([S()],er.prototype,"text",void 0),tr([S({type:Boolean})],er.prototype,"manual",void 0),tr([S({type:Boolean})],er.prototype,"inline",void 0),tr([S({type:Number})],er.prototype,"delay",void 0),tr([S()],er.prototype,"position",void 0),tr([
|
|
700
700
|
/**
|
|
701
701
|
* @license
|
|
702
702
|
* Copyright 2017 Google LLC
|
|
703
703
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
704
704
|
*/
|
|
705
|
-
function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return
|
|
705
|
+
function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return N(0,0,{get(){const e=this.renderRoot?.querySelector(r);return e?.assignedNodes(t)??[]}})}}()],er.prototype,"slotNodes",void 0),tr([C(".ft-tooltip--container")],er.prototype,"container",void 0),tr([C(".ft-tooltip")],er.prototype,"tooltip",void 0),tr([C(".ft-tooltip--content")],er.prototype,"tooltipContent",void 0),tr([k()],er.prototype,"visible",void 0),L("ft-tooltip")(er);
|
|
706
706
|
/**
|
|
707
707
|
* @license
|
|
708
708
|
* Copyright 2017 Google LLC
|
|
@@ -713,7 +713,7 @@ class or extends to{constructor(t){if(super(t),this.et=ot,t.type!==Xe)throw Erro
|
|
|
713
713
|
${ir(this.resolvedIcon)}
|
|
714
714
|
<slot ?hidden=${e}></slot>
|
|
715
715
|
</i>
|
|
716
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case lr.file_format:this.resolvedIcon=null!==(t=nr[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case lr.material:this.resolvedIcon=this.value||le;break;default:this.resolvedIcon=null!==(e=rr[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}hr.elementDefinitions={},hr.styles=Zi,cr([
|
|
716
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case lr.file_format:this.resolvedIcon=null!==(t=nr[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case lr.material:this.resolvedIcon=this.value||le;break;default:this.resolvedIcon=null!==(e=rr[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}hr.elementDefinitions={},hr.styles=Zi,cr([S()],hr.prototype,"variant",void 0),cr([S()],hr.prototype,"value",void 0),cr([k()],hr.prototype,"resolvedIcon",void 0),cr([C("slot")],hr.prototype,"slottedContent",void 0),L("ft-icon")(hr);class pr extends Me{render(){return ae`
|
|
717
717
|
<div class="ft-loader">
|
|
718
718
|
<div></div>
|
|
719
719
|
<div></div>
|
|
@@ -743,7 +743,7 @@ class or extends to{constructor(t){if(super(t),this.et=ot,t.type!==Xe)throw Erro
|
|
|
743
743
|
</ft-tooltip>
|
|
744
744
|
`:t}resolveIcon(){return this.loading?ae`
|
|
745
745
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?ae`
|
|
746
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:le}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}}dr.elementDefinitions={"ft-ripple":Ji,"ft-tooltip":er,"ft-typography":wi,"ft-icon":hr,"ft-loader":pr},fr([
|
|
746
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:le}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}}dr.elementDefinitions={"ft-ripple":Ji,"ft-tooltip":er,"ft-typography":wi,"ft-icon":hr,"ft-loader":pr},fr([S({type:String,reflect:!0})],dr.prototype,"role",void 0),fr([S()],dr.prototype,"type",void 0),fr([S({type:Boolean})],dr.prototype,"disabled",void 0),fr([S()],dr.prototype,"label",void 0),fr([S()],dr.prototype,"icon",void 0),fr([S()],dr.prototype,"iconVariant",void 0),fr([S({type:Boolean})],dr.prototype,"trailingIcon",void 0),fr([S({type:Boolean})],dr.prototype,"loading",void 0),fr([S()],dr.prototype,"tooltipPosition",void 0),fr([S({type:Boolean})],dr.prototype,"hideTooltip",void 0),fr([S({type:Boolean})],dr.prototype,"forceTooltip",void 0),fr([C(".ft-button")],dr.prototype,"button",void 0),fr([C(".ft-button--label slot")],dr.prototype,"slottedContent",void 0);var ur=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class br extends dr{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}br.styles=[He,Gi],ur([S({type:Boolean})],br.prototype,"primary",void 0),ur([S({type:Boolean})],br.prototype,"outlined",void 0),ur([S({type:Boolean})],br.prototype,"dense",void 0),ur([S({type:Boolean})],br.prototype,"round",void 0);const gr=[St`
|
|
747
747
|
:host {
|
|
748
748
|
display: inline-block;
|
|
749
749
|
max-width: 100%;
|
|
@@ -961,7 +961,7 @@ class or extends to{constructor(t){if(super(t),this.et=ot,t.type!==Xe)throw Erro
|
|
|
961
961
|
width: ${Ie.smallIconOnlyWidth};
|
|
962
962
|
padding: unset;
|
|
963
963
|
}
|
|
964
|
-
`,Pe];var yr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class mr extends dr{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?xo.caption1medium:xo.body2medium}}mr.styles=[He,gr],yr([
|
|
964
|
+
`,Pe];var yr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class mr extends dr{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?xo.caption1medium:xo.body2medium}}mr.styles=[He,gr],yr([S({type:Boolean})],mr.prototype,"primary",void 0),yr([S({type:Boolean})],mr.prototype,"secondary",void 0),yr([S({type:Boolean})],mr.prototype,"tertiary",void 0),yr([S({type:Boolean})],mr.prototype,"neutral",void 0),yr([S({type:Boolean})],mr.prototype,"small",void 0),L("ft-button")(br),L("ftds-button")(mr);const vr=ke.extend("--ft-checkbox-text-color","",Ue.colorOnSurfaceHigh),xr=ke.external(Ue.colorPrimary,"Design system"),$r=ke.external(Ue.colorOnPrimary,"Design system"),Or=ke.extend("--ft-checkbox-border-color","",Ue.colorOnSurfaceMedium),wr=ke.external(Ue.colorOnSurfaceDisabled,"Design system"),Sr=St`
|
|
965
965
|
* {
|
|
966
966
|
box-sizing: border-box;
|
|
967
967
|
}
|
|
@@ -1064,7 +1064,7 @@ class or extends to{constructor(t){if(super(t),this.et=ot,t.type!==Xe)throw Erro
|
|
|
1064
1064
|
<slot></slot>
|
|
1065
1065
|
</ft-typography>
|
|
1066
1066
|
</label>
|
|
1067
|
-
`}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)}}Nr.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi},Nr.styles=Sr,kr([
|
|
1067
|
+
`}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)}}Nr.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi},Nr.styles=Sr,kr([S()],Nr.prototype,"name",void 0),kr([S({type:Boolean,reflect:!0})],Nr.prototype,"checked",void 0),kr([S({type:Boolean})],Nr.prototype,"indeterminate",void 0),kr([S({type:Boolean})],Nr.prototype,"disabled",void 0),kr([C(".ft-checkbox")],Nr.prototype,"container",void 0),kr([C("ft-ripple")],Nr.prototype,"ripple",void 0),L("ft-checkbox")(Nr);const Cr=ke.extend("--ft-radio-text-color","",Ue.colorOnSurfaceHigh),Er=ke.external(Ue.colorPrimary,"Design system"),Rr=(ke.external(Ue.colorOnPrimary,"Design system"),ke.extend("--ft-radio-border-color","",Ue.colorOnSurfaceMedium)),Ir=ke.external(Ue.colorOnSurfaceDisabled,"Design system"),Ur=St`
|
|
1068
1068
|
* {
|
|
1069
1069
|
box-sizing: border-box;
|
|
1070
1070
|
}
|
|
@@ -1168,7 +1168,7 @@ class or extends to{constructor(t){if(super(t),this.et=ot,t.type!==Xe)throw Erro
|
|
|
1168
1168
|
</ft-typography>
|
|
1169
1169
|
</label>
|
|
1170
1170
|
</div>
|
|
1171
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new zr(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 zr(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Wr.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi},Wr.styles=Ur,Lr([
|
|
1171
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new zr(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 zr(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Wr.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi},Wr.styles=Ur,Lr([S()],Wr.prototype,"value",void 0),Lr([S()],Wr.prototype,"name",void 0),Lr([S({type:Boolean,reflect:!0})],Wr.prototype,"checked",void 0),Lr([S({type:Boolean})],Wr.prototype,"disabled",void 0),Lr([C(".ft-radio")],Wr.prototype,"container",void 0),Lr([C("ft-ripple")],Wr.prototype,"ripple",void 0),Lr([C("input")],Wr.prototype,"input",void 0);const Br=St`
|
|
1172
1172
|
:host {
|
|
1173
1173
|
display: contents;
|
|
1174
1174
|
}
|
|
@@ -1177,13 +1177,13 @@ class or extends to{constructor(t){if(super(t),this.et=ot,t.type!==Xe)throw Erro
|
|
|
1177
1177
|
@change=${this.onChange}
|
|
1178
1178
|
@keydown=${this.onKeyDown}
|
|
1179
1179
|
></slot>
|
|
1180
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),o=this.radioButtons.indexOf(e)-1;this.radioButtons[o<0?this.radioButtons.length-1:o].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Dr.elementDefinitions={},Dr.styles=Br,Fr([
|
|
1180
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),o=this.radioButtons.indexOf(e)-1;this.radioButtons[o<0?this.radioButtons.length-1:o].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Dr.elementDefinitions={},Dr.styles=Br,Fr([S()],Dr.prototype,"name",void 0),Fr([
|
|
1181
1181
|
/**
|
|
1182
1182
|
* @license
|
|
1183
1183
|
* Copyright 2021 Google LLC
|
|
1184
1184
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1185
1185
|
*/
|
|
1186
|
-
function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return
|
|
1186
|
+
function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return N(0,0,{get(){const e=this.renderRoot?.querySelector(n),o=e?.assignedElements(t)??[];return void 0===r?o:o.filter((t=>t.matches(r)))}})}}()],Dr.prototype,"radioButtons",void 0),L("ft-radio")(Wr),L("ft-radio-group")(Dr);const Kr={borderRadiusM:ke.external(Ue.borderRadiusM,"Design system"),colorOutline:ke.external(Ue.colorOutline,"Design system"),colorOnSurface:ke.external(Ue.colorOnSurface,"Design system"),colorOnSurfaceMedium:ke.external(Ue.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ke.external(Ue.colorOnSurfaceDisabled,"Design system"),colorPrimary:ke.external(Ue.colorPrimary,"Design system"),colorOnPrimary:ke.external(Ue.colorOnPrimary,"Design system"),fontFamily:ke.external(qo.fontFamily,"Body2 typography"),fontSize:ke.external(qo.fontSize,"Body2 typography"),fontWeight:ke.external(qo.fontWeight,"Body2 typography"),letterSpacing:ke.external(qo.letterSpacing,"Body2 typography"),lineHeight:ke.external(qo.lineHeight,"Body2 typography"),textTransform:ke.external(qo.textTransform,"Body2 typography")},Zr=St`
|
|
1187
1187
|
.ft-filter-level--container {
|
|
1188
1188
|
display: flex;
|
|
1189
1189
|
flex-direction: column;
|
|
@@ -1313,7 +1313,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1313
1313
|
@change=${t=>t.stopPropagation()}>
|
|
1314
1314
|
${t.renderOption?t.renderOption:t.label}
|
|
1315
1315
|
</ft-radio>
|
|
1316
|
-
`}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}))}}Ar.elementDefinitions={"ft-button":br,"ft-ripple":Ji,"ft-typography":wi,"ft-checkbox":Nr,"ft-icon":hr,"ft-radio":Wr},Ar.styles=Zr,Mr([
|
|
1316
|
+
`}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}))}}Ar.elementDefinitions={"ft-button":br,"ft-ripple":Ji,"ft-typography":wi,"ft-checkbox":Nr,"ft-icon":hr,"ft-radio":Wr},Ar.styles=Zr,Mr([S({type:String})],Ar.prototype,"filterId",void 0),Mr([S({type:Object})],Ar.prototype,"parent",void 0),Mr([S({type:Array})],Ar.prototype,"options",void 0),Mr([S({type:Boolean})],Ar.prototype,"multivalued",void 0),Mr([S({type:Boolean})],Ar.prototype,"disabled",void 0),Mr([S({type:Boolean})],Ar.prototype,"hideSelectedOptions",void 0),Mr([S({type:Boolean})],Ar.prototype,"preventNavigation",void 0),Mr([S({type:String})],Ar.prototype,"filter",void 0),Mr([S({type:String})],Ar.prototype,"moreValuesButtonLabel",void 0),Mr([S({type:String})],Ar.prototype,"noValuesLabel",void 0),Mr([S({type:Number})],Ar.prototype,"displayedValuesLimit",void 0),Mr([C(".ft-filter-level--container")],Ar.prototype,"container",void 0),Mr([k()],Ar.prototype,"displayedPages",void 0);const Pr={buttonsColor:ke.extend("--ft-snap-scroll-buttons-color","",Ue.colorPrimary),buttonsZIndex:ke.create("--ft-snap-scroll-buttons-z-index","","COLOR","1"),gap:ke.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:ke.external(Ue.colorSurface,"Design system")},jr=St`
|
|
1317
1317
|
.ft-snap-scroll {
|
|
1318
1318
|
box-sizing: border-box;
|
|
1319
1319
|
position: relative;
|
|
@@ -1438,7 +1438,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1438
1438
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1439
1439
|
background-color: ${Pr.colorSurface};
|
|
1440
1440
|
}
|
|
1441
|
-
`;var Hr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Tr extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class _r extends Me{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
|
|
1441
|
+
`;var Hr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Tr extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class _r extends Me{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 R(200),this.updateScrollDebouncer=new R(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,o=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<o||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=qi({"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":Ye}),e=this.controls&&this.withScroll;return ae`
|
|
1442
1442
|
<div part="container" class="${t}">
|
|
1443
1443
|
<ft-button
|
|
1444
1444
|
class="ft-snap-scroll--previous"
|
|
@@ -1462,7 +1462,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1462
1462
|
@click=${this.next}
|
|
1463
1463
|
></ft-button>
|
|
1464
1464
|
</div>
|
|
1465
|
-
`}update(t){super.update(t),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 Tr(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(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))}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,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.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)}}_r.elementDefinitions={"ft-button":br},_r.styles=jr,Hr([
|
|
1465
|
+
`}update(t){super.update(t),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 Tr(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(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))}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,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.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)}}_r.elementDefinitions={"ft-button":br},_r.styles=jr,Hr([S({type:Boolean})],_r.prototype,"horizontal",void 0),Hr([S({type:Boolean})],_r.prototype,"hideScrollbar",void 0),Hr([S({type:Boolean})],_r.prototype,"controls",void 0),Hr([S({type:Boolean})],_r.prototype,"limitSize",void 0),Hr([k()],_r.prototype,"elements",void 0),Hr([k()],_r.prototype,"currentElement",void 0),Hr([k()],_r.prototype,"withScroll",void 0),Hr([k()],_r.prototype,"startReached",void 0),Hr([k()],_r.prototype,"endReached",void 0),Hr([C(".ft-snap-scroll--content")],_r.prototype,"contentSlot",void 0),L("ft-snap-scroll")(_r);const Vr=ke.external(Ue.colorOutline,"Design system"),Gr=ke.external(Ue.colorOnSurface,"Design system"),qr=ke.external(Ue.colorOnSurfaceMedium,"Design system"),Yr=ke.external(Ue.colorPrimary,"Design system"),Jr=ke.external(Ue.colorSurface,"Design system"),Xr=ke.external(Ue.transitionDuration,"Design system"),Qr=ke.external(Ue.transitionTimingFunction,"Design system"),tn=[gi,St`
|
|
1466
1466
|
:host {
|
|
1467
1467
|
display: flex;
|
|
1468
1468
|
max-height: 100%;
|
|
@@ -1574,7 +1574,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1574
1574
|
slot:not([name]) {
|
|
1575
1575
|
display: none;
|
|
1576
1576
|
}
|
|
1577
|
-
`];var en=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class on extends CustomEvent{constructor(t){super("change",{detail:t})}}class rn extends Me{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new
|
|
1577
|
+
`];var en=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class on extends CustomEvent{constructor(t){super("change",{detail:t})}}class rn extends Me{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new R(300),this.changeDebouncer=new R(10),this.lastDispatchedValues=[]}get flatOptions(){return I(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),e=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,o=this.filterPlaceHolder.replace("{0}",this.label);return ae`
|
|
1578
1578
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1579
1579
|
part="container">
|
|
1580
1580
|
${this.label||t?ae`
|
|
@@ -1646,9 +1646,9 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1646
1646
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1647
1647
|
noValuesLabel="${this.noValuesLabel}"
|
|
1648
1648
|
></ft-filter-level>
|
|
1649
|
-
`}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 o=this.flatOptions.find((e=>e.value===t.detail.value));o.selected=!o.selected;const i=t=>{var e;t!==o&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(i)};this.multivalued?null===(e=o.subOptions)||void 0===e||e.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;U(this.lastDispatchedValues,t)||(this.dispatchEvent(new on(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}rn.elementDefinitions={"ft-button":br,"ft-filter-level":Ar,"ft-snap-scroll":_r,"ft-typography":wi},rn.styles=tn,en([
|
|
1649
|
+
`}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 o=this.flatOptions.find((e=>e.value===t.detail.value));o.selected=!o.selected;const i=t=>{var e;t!==o&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(i)};this.multivalued?null===(e=o.subOptions)||void 0===e||e.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;U(this.lastDispatchedValues,t)||(this.dispatchEvent(new on(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}rn.elementDefinitions={"ft-button":br,"ft-filter-level":Ar,"ft-snap-scroll":_r,"ft-typography":wi},rn.styles=tn,en([S({type:String})],rn.prototype,"id",void 0),en([S({type:String})],rn.prototype,"label",void 0),en([S({type:String})],rn.prototype,"filterPlaceHolder",void 0),en([S({type:String})],rn.prototype,"clearButtonLabel",void 0),en([S({type:String})],rn.prototype,"moreValuesButtonLabel",void 0),en([S({type:String})],rn.prototype,"noValuesLabel",void 0),en([z([])],rn.prototype,"options",void 0),en([S({type:Boolean})],rn.prototype,"multivalued",void 0),en([S({type:Boolean})],rn.prototype,"disabled",void 0),en([S({type:Boolean})],rn.prototype,"raiseSelectedOptions",void 0),en([S({type:Number})],rn.prototype,"displayedValuesLimit",void 0),en([S({type:Boolean})],rn.prototype,"hideClearButton",void 0),en([C(".ft-filter--slot")],rn.prototype,"slotElement",void 0),en([C(".ft-filter--container")],rn.prototype,"container",void 0),en([C(".ft-filter--values")],rn.prototype,"valuesContainer",void 0),en([C(".ft-filter--levels")],rn.prototype,"levelsContainer",void 0),en([k()],rn.prototype,"lastLevelHasHiddenvalues",void 0),en([C(".ft-filter--filter input")],rn.prototype,"filterInput",void 0),en([function(t){return(e,o)=>N(0,0,{get(){return(this.renderRoot??(E??=document.createDocumentFragment())).querySelectorAll(t)}})}(".ft-filter--levels ft-filter-level")],rn.prototype,"levels",void 0),en([k()],rn.prototype,"withScroll",void 0),en([k()],rn.prototype,"filter",void 0),en([k()],rn.prototype,"slideIn",void 0),en([k()],rn.prototype,"slideOut",void 0);var nn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class an extends Me{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return ae`
|
|
1650
1650
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1651
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}an.elementDefinitions={},nn([
|
|
1651
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}an.elementDefinitions={},nn([S({type:String})],an.prototype,"label",void 0),nn([S({type:Object,converter:t=>t})],an.prototype,"value",void 0),nn([S({type:Boolean,reflect:!0})],an.prototype,"selected",void 0),nn([S({type:Object})],an.prototype,"subOptions",void 0),nn([z({})],an.prototype,"renderOption",void 0),nn([C(".ft-filter-option--slot")],an.prototype,"slotElement",void 0),L("ft-filter")(rn),L("ft-filter-option")(an);const sn=St`
|
|
1652
1652
|
.ft-accordion {
|
|
1653
1653
|
box-sizing: border-box;
|
|
1654
1654
|
}
|
|
@@ -1656,7 +1656,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1656
1656
|
<div class="ft-accordion">
|
|
1657
1657
|
<slot @activated=${this.onChange}></slot>
|
|
1658
1658
|
</div>
|
|
1659
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}cn.elementDefinitions={},cn.styles=sn,ln([
|
|
1659
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}cn.elementDefinitions={},cn.styles=sn,ln([S({type:Boolean})],cn.prototype,"multi",void 0),ln([C("slot")],cn.prototype,"content",void 0);const hn=ke.create("--ft-accordion-toggle-horizontal-spacing","","SIZE","16px"),pn=ke.create("--ft-accordion-toggle-vertical-spacing","","SIZE","16px"),fn=ke.external(Ue.colorOutline,"Design system"),dn=St`
|
|
1660
1660
|
.ft-accordion-item {
|
|
1661
1661
|
display: flex;
|
|
1662
1662
|
flex-direction: column;
|
|
@@ -1731,7 +1731,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1731
1731
|
</div>
|
|
1732
1732
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1733
1733
|
</div>
|
|
1734
|
-
`}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)}}bn.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi,"ft-icon":hr},bn.styles=dn,un([
|
|
1734
|
+
`}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)}}bn.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi,"ft-icon":hr},bn.styles=dn,un([S()],bn.prototype,"icon",void 0),un([S()],bn.prototype,"iconVariant",void 0),un([S()],bn.prototype,"label",void 0),un([S({type:Boolean,reflect:!0})],bn.prototype,"active",void 0),L("ft-accordion")(cn),L("ft-accordion-item")(bn);const gn=ke.extend("--ft-chip-color","",Ue.colorOnSurface),yn={backgroundColor:ke.extend("--ft-chip-background-color","",Ue.colorSurface),color:gn,fontSize:ke.extend("--ft-chip-font-size","",qo.fontSize),iconSize:ke.create("--ft-chip-icon-size","","SIZE","18px"),rippleColor:ke.extend("--ft-chip-ripple-color","",gn),horizontalPadding:ke.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:ke.create("--ft-chip-vertical-padding","","SIZE","6px"),colorOutline:ke.external(Ue.colorOutline,"Design system"),opacityDisabled:ke.external(Ue.colorOpacityDisabled,"Design system")},mn=ke.extend("--ft-chip-highlighted-color","",ke.extend("--ft-chip-color","",Ue.colorOnPrimary)),vn={backgroundColor:ke.extend("--ft-chip-highlighted-background-color","",ke.extend("--ft-chip-background-color","",Ue.colorPrimary)),color:mn,rippleColor:ke.extend("--ft-chip-highlighted-ripple-color","",mn)},xn=ke.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),$n=ke.create("--ft-chip-dense-vertical-padding","","SIZE","4px"),On=[Pe,St`
|
|
1735
1735
|
:host {
|
|
1736
1736
|
display: inline-block;
|
|
1737
1737
|
max-width: 100%;
|
|
@@ -1891,7 +1891,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1891
1891
|
<div class="ft-chip--icon-container ft-no-text-select">
|
|
1892
1892
|
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}"></ft-icon>
|
|
1893
1893
|
</div>
|
|
1894
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Sn))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Sn))}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?"close":void 0)}}kn.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi,"ft-icon":hr,"ft-button":br},kn.styles=On,wn([
|
|
1894
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Sn))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Sn))}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?"close":void 0)}}kn.elementDefinitions={"ft-ripple":Ji,"ft-typography":wi,"ft-icon":hr,"ft-button":br},kn.styles=On,wn([S({type:Boolean})],kn.prototype,"highlighted",void 0),wn([S({type:Boolean})],kn.prototype,"removable",void 0),wn([S({type:Boolean})],kn.prototype,"disabled",void 0),wn([S({type:Boolean})],kn.prototype,"clickable",void 0),wn([S({type:Boolean})],kn.prototype,"iconClickable",void 0),wn([S({type:Boolean})],kn.prototype,"dense",void 0),wn([S({type:Boolean})],kn.prototype,"multiLine",void 0),wn([S()],kn.prototype,"label",void 0),wn([S()],kn.prototype,"iconLabel",void 0),wn([S()],kn.prototype,"icon",void 0),wn([S()],kn.prototype,"iconVariant",void 0),wn([S({type:Boolean})],kn.prototype,"trailingIcon",void 0),wn([C("ft-typography slot")],kn.prototype,"slottedContent",void 0),L("ft-chip")(kn);const Nn={fontSize:ke.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:ke.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:ke.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:ke.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:ke.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:ke.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:ke.extend("--ft-input-label-border-color","",Ue.colorOutline),textColor:ke.extend("--ft-input-label-text-color","",Ue.colorOnSurfaceMedium),disabledTextColor:ke.extend("--ft-input-label-disabled-text-color","",Ue.colorOnSurfaceDisabled),colorSurface:ke.external(Ue.colorSurface,"Design system"),borderRadiusS:ke.external(Ue.borderRadiusS,"Design system"),colorError:ke.external(Ue.colorError,"Design system")},Cn=St`
|
|
1895
1895
|
.ft-input-label {
|
|
1896
1896
|
position: absolute;
|
|
1897
1897
|
inset: 0;
|
|
@@ -2022,7 +2022,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
2022
2022
|
</div>
|
|
2023
2023
|
`:null}
|
|
2024
2024
|
</div>
|
|
2025
|
-
`}}Rn.elementDefinitions={},Rn.styles=[gi,Cn],En([
|
|
2025
|
+
`}}Rn.elementDefinitions={},Rn.styles=[gi,Cn],En([S({type:String})],Rn.prototype,"text",void 0),En([S({type:Boolean})],Rn.prototype,"raised",void 0),En([S({type:Boolean})],Rn.prototype,"outlined",void 0),En([S({type:Boolean})],Rn.prototype,"disabled",void 0),En([S({type:Boolean})],Rn.prototype,"error",void 0),L("ft-input-label")(Rn);const In={labelSize:ke.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:ke.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:ke.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:ke.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:ke.create("--ft-select-options-height","","SIZE","unset"),selectedOptionColor:ke.extend("--ft-select-selected-option-color","",Ue.colorOnSurface),helperColor:ke.extend("--ft-select-helper-color","",Ue.colorOnSurfaceMedium),optionsColor:ke.extend("--ft-select-options-color","",Ue.colorOnSurface),optionsZIndex:ke.create("--ft-select-options-z-index","","NUMBER","3"),colorSurface:ke.external(Ue.colorSurface,"Design system"),colorOnSurfaceDisabled:ke.external(Ue.colorOnSurfaceDisabled,"Design system"),colorPrimary:ke.external(Ue.colorPrimary,"Design system"),borderRadiusS:ke.external(Ue.borderRadiusS,"Design system"),elevation02:ke.external(Ue.elevation02,"Design system"),colorError:ke.external(Ue.colorError,"Design system")},Un=St`
|
|
2026
2026
|
*:focus {
|
|
2027
2027
|
outline: none;
|
|
2028
2028
|
}
|
|
@@ -2171,7 +2171,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
2171
2171
|
.ft-select--in-error .ft-select--helper-text {
|
|
2172
2172
|
color: ${In.colorError};
|
|
2173
2173
|
}
|
|
2174
|
-
`;var Ln=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class zn extends Me{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return ae``}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}zn.elementDefinitions={},Ln([
|
|
2174
|
+
`;var Ln=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class zn extends Me{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return ae``}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}zn.elementDefinitions={},Ln([S({type:String})],zn.prototype,"label",void 0),Ln([S({type:Object,converter:t=>t})],zn.prototype,"value",void 0),Ln([S({type:Boolean,reflect:!0})],zn.prototype,"selected",void 0);class Wn extends Me{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,o,i,r;let n=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions;const s=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,l={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":n,"ft-select--has-option-selected":s,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return ae`
|
|
2175
2175
|
<div class="${qi(l)}" part="container">
|
|
2176
2176
|
<div class="ft-select--main-panel" part="main-panel">
|
|
2177
2177
|
<ft-input-label text="${this.label}"
|
|
@@ -2219,7 +2219,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
2219
2219
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
2220
2220
|
<span>${t.label}</span>
|
|
2221
2221
|
</div>
|
|
2222
|
-
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.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 o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}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,o,i,r,n;let a;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(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!U(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Wn.elementDefinitions={"ft-input-label":Rn,"ft-typography":wi,"ft-ripple":Ji,"ft-icon":hr},Wn.styles=[bi,gi,Un],Ln([
|
|
2222
|
+
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.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 o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}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,o,i,r,n;let a;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(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!U(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Wn.elementDefinitions={"ft-input-label":Rn,"ft-typography":wi,"ft-ripple":Ji,"ft-icon":hr},Wn.styles=[bi,gi,Un],Ln([S({type:String})],Wn.prototype,"label",void 0),Ln([S({type:String})],Wn.prototype,"helper",void 0),Ln([S({type:Boolean})],Wn.prototype,"outlined",void 0),Ln([S({type:Boolean})],Wn.prototype,"disabled",void 0),Ln([S({type:Boolean})],Wn.prototype,"error",void 0),Ln([S({type:Boolean})],Wn.prototype,"fixedMenuPosition",void 0),Ln([S({type:Array})],Wn.prototype,"options",void 0),Ln([k()],Wn.prototype,"selectedOption",void 0),Ln([k()],Wn.prototype,"optionsDisplayed",void 0),Ln([k()],Wn.prototype,"focusOptions",void 0),Ln([C(".ft-select")],Wn.prototype,"container",void 0),Ln([C(".ft-select--options")],Wn.prototype,"optionsMenu",void 0),Ln([C(".ft-select--input-panel")],Wn.prototype,"mainPanel",void 0),Ln([C(".ft-select--option:first-child")],Wn.prototype,"firstOption",void 0),Ln([C(".ft-select--option:focus")],Wn.prototype,"focusedOption",void 0),Ln([C(".ft-select--option.ft-select--option-selected")],Wn.prototype,"selectedOptionElement",void 0),Ln([C(".ft-select--option:last-child")],Wn.prototype,"lastOption",void 0),Ln([C("slot")],Wn.prototype,"optionsSlot",void 0),L("ft-select")(Wn),L("ft-select-option")(zn);const Bn={display:ke.create("--ft-skeleton--display","","DISPLAY","block"),width:ke.create("--ft-skeleton--width","","SIZE","100%"),height:ke.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:ke.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:ke.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:ke.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:ke.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:ke.external(Ue.borderRadiusM,"Design system")},Fn=St`
|
|
2223
2223
|
:host {
|
|
2224
2224
|
width: ${Bn.width};
|
|
2225
2225
|
height: ${Bn.height};
|
|
@@ -2603,7 +2603,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
2603
2603
|
margin: 0;
|
|
2604
2604
|
}
|
|
2605
2605
|
`;class Mn extends Me{render(){return ae`
|
|
2606
|
-
`}}Mn.elementDefinitions={},Mn.styles=Fn,L("ft-skeleton")(Mn);class An{constructor(t,
|
|
2606
|
+
`}}Mn.elementDefinitions={},Mn.styles=Fn,L("ft-skeleton")(Mn);class An{constructor(t,e=300){this.searchBar=t,this.updateDebouncer=new R(e)}render(){const t=this.searchBar.recentSearches.filter((t=>t.toLowerCase().includes(this.searchBar.query.toLowerCase()))),e=this.searchBar.suggestions.length>0||t.length>0;return ae`
|
|
2607
2607
|
<div class="ft-search-bar--suggestions ft-word-wrap ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2608
2608
|
part="suggestions-container"
|
|
2609
2609
|
@keydown=${t=>this.onSuggestKeyDown(t)}>
|
|
@@ -2911,7 +2911,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
2911
2911
|
</div>
|
|
2912
2912
|
`}onSearchBarKeyDown(t){var e;switch(t.key){case"Escape":this.searchBar.mobileMenuOpen=!1,null===(e=this.searchBar.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.suggestManager.focusFirstSuggestion()}}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}Hn.styles=St`
|
|
2913
2913
|
|
|
2914
|
-
`;var Tn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};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 _n={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove",back:"Back"};class Vn extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class Gn extends CustomEvent{constructor(t){super("change",{detail:t})}}const qn=()=>{};class Yn extends Me{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new Te(_n,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var o;const i=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"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("*");i.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${i.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=co.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.suggestManager=new An(this),this.selectedFacetsManager=new Pn(this),this.desktopSearchBarManager=new Hn(this),this.mobileSearchBarManager=new jn(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new
|
|
2914
|
+
`;var Tn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};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 _n={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove",back:"Back"};class Vn extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class Gn extends CustomEvent{constructor(t){super("change",{detail:t})}}const qn=()=>{};class Yn extends Me{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new Te(_n,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var o;const i=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"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("*");i.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${i.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=co.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.suggestManager=new An(this),this.selectedFacetsManager=new Pn(this),this.desktopSearchBarManager=new Hn(this),this.mobileSearchBarManager=new jn(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new R(10),this.updateLocalesDebouncer=new R(10),this.facetsLoaded=!1,this.updateFacetsDebouncer=new R(500),this.closeFloatingContainer=t=>{this.isMobile()||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>t.values.length>0&&!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===co.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return null!=this.presets&&this.presets.length>0}get hasPriors(){return null!=this.priors&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}focusInput(){this.input?this.input.focus():setTimeout((()=>this.focusInput()),50)}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return ae`
|
|
2915
2915
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2916
2916
|
${this.renderSearchBar()}
|
|
2917
2917
|
`}renderSearchBar(){return this.facetsInitialized&&this.availableContentLocalesInitialized?this.isMobile()?this.mobileSearchBarManager.render():this.desktopSearchBarManager.render():ae`
|
|
@@ -3054,4 +3054,4 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
3054
3054
|
part="floating-panel"
|
|
3055
3055
|
tabindex="-1">
|
|
3056
3056
|
${this.renderDesktopMenu()}
|
|
3057
|
-
</div>`}}Yn.elementDefinitions={"ft-accordion":cn,"ft-accordion-item":bn,"ft-button":br,"ft-chip":kn,"ft-filter":rn,"ft-filter-option":an,"ft-icon":hr,"ft-ripple":Ji,"ft-select":Wn,"ft-select-option":zn,"ft-size-watcher":uo,"ft-skeleton":Mn,"ft-snap-scroll":_r,"ft-tooltip":er,"ft-typography":wi,"ft-radio-group":Dr,"ft-radio":Wr},Yn.styles=[bi,Kn,Zn,Pn.styles,An.styles],Tn([
|
|
3057
|
+
</div>`}}Yn.elementDefinitions={"ft-accordion":cn,"ft-accordion-item":bn,"ft-button":br,"ft-chip":kn,"ft-filter":rn,"ft-filter-option":an,"ft-icon":hr,"ft-ripple":Ji,"ft-select":Wn,"ft-select-option":zn,"ft-size-watcher":uo,"ft-skeleton":Mn,"ft-snap-scroll":_r,"ft-tooltip":er,"ft-typography":wi,"ft-radio-group":Dr,"ft-radio":Wr},Yn.styles=[bi,Kn,Zn,Pn.styles,An.styles],Tn([S({type:Boolean})],Yn.prototype,"dense",void 0),Tn([S()],Yn.prototype,"mode",void 0),Tn([S({type:Boolean})],Yn.prototype,"forceMobileMenuOpen",void 0),Tn([S({type:Boolean})],Yn.prototype,"forceMenuOpen",void 0),Tn([S()],Yn.prototype,"baseUrl",void 0),Tn([S()],Yn.prototype,"apiIntegrationIdentifier",void 0),Tn([S()],Yn.prototype,"contentLocale",void 0),Tn([k()],Yn.prototype,"availableContentLocales",void 0),Tn([k()],Yn.prototype,"availableContentLocalesInitialized",void 0),Tn([S()],Yn.prototype,"uiLocale",void 0),Tn([z({})],Yn.prototype,"labels",void 0),Tn([z([])],Yn.prototype,"displayedFilters",void 0),Tn([z([])],Yn.prototype,"presets",void 0),Tn([S({type:String,reflect:!0})],Yn.prototype,"selectedPreset",void 0),Tn([z([])],Yn.prototype,"priors",void 0),Tn([S()],Yn.prototype,"searchRequestSerializer",void 0),Tn([k()],Yn.prototype,"searchFilters",void 0),Tn([k()],Yn.prototype,"sizeCategory",void 0),Tn([k()],Yn.prototype,"displayFacets",void 0),Tn([k()],Yn.prototype,"mobileMenuOpen",void 0),Tn([k()],Yn.prototype,"facets",void 0),Tn([k()],Yn.prototype,"facetsInitialized",void 0),Tn([C(".ft-search-bar--container")],Yn.prototype,"container",void 0),Tn([C(".ft-search-bar--filters-opener")],Yn.prototype,"filtersOpener",void 0),Tn([C(".ft-search-bar--floating-panel")],Yn.prototype,"floatingContainer",void 0),Tn([C("ft-snap-scroll.ft-search-bar--filters-container")],Yn.prototype,"scrollingFiltersContainer",void 0),Tn([C(".ft-search-bar--input")],Yn.prototype,"input",void 0),Tn([k()],Yn.prototype,"query",void 0),Tn([k()],Yn.prototype,"suggestions",void 0),Tn([k()],Yn.prototype,"recentSearches",void 0),Tn([k()],Yn.prototype,"scrollToFacet",void 0),Tn([k()],Yn.prototype,"api",void 0),Tn([k()],Yn.prototype,"facetsLoaded",void 0),L("ft-search-bar")(Yn),t.DEFAULT_LABELS=_n,t.FtSearchBar=Yn,t.FtSearchBarCssVariables=Dn,t.LaunchSearchEvent=Vn,t.SearchStateChangeEvent=Gn,t.facetsCss=Zn,t.searchBarCss=Kn}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-bar",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Search bar component using Fluid Topics public API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-accordion": "1.1.
|
|
23
|
-
"@fluid-topics/ft-button": "1.1.
|
|
24
|
-
"@fluid-topics/ft-chip": "1.1.
|
|
25
|
-
"@fluid-topics/ft-filter": "1.1.
|
|
26
|
-
"@fluid-topics/ft-icon": "1.1.
|
|
27
|
-
"@fluid-topics/ft-select": "1.1.
|
|
28
|
-
"@fluid-topics/ft-size-watcher": "1.1.
|
|
29
|
-
"@fluid-topics/ft-skeleton": "1.1.
|
|
30
|
-
"@fluid-topics/ft-snap-scroll": "1.1.
|
|
31
|
-
"@fluid-topics/ft-tooltip": "1.1.
|
|
32
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
33
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-accordion": "1.1.3",
|
|
23
|
+
"@fluid-topics/ft-button": "1.1.3",
|
|
24
|
+
"@fluid-topics/ft-chip": "1.1.3",
|
|
25
|
+
"@fluid-topics/ft-filter": "1.1.3",
|
|
26
|
+
"@fluid-topics/ft-icon": "1.1.3",
|
|
27
|
+
"@fluid-topics/ft-select": "1.1.3",
|
|
28
|
+
"@fluid-topics/ft-size-watcher": "1.1.3",
|
|
29
|
+
"@fluid-topics/ft-skeleton": "1.1.3",
|
|
30
|
+
"@fluid-topics/ft-snap-scroll": "1.1.3",
|
|
31
|
+
"@fluid-topics/ft-tooltip": "1.1.3",
|
|
32
|
+
"@fluid-topics/ft-typography": "1.1.3",
|
|
33
|
+
"@fluid-topics/ft-wc-utils": "1.1.3",
|
|
34
34
|
"lit": "3.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@fluid-topics/public-api": "1.0.51"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "0d44a470e710f185c37e42ee87be4481a3bdf793"
|
|
40
40
|
}
|