@fluid-topics/ft-search-bar 0.2.16 → 0.2.17
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.css.d.ts +1 -0
- package/build/ft-search-bar.css.js +28 -11
- package/build/ft-search-bar.d.ts +5 -3
- package/build/ft-search-bar.inline-styles.js +422 -380
- package/build/ft-search-bar.js +85 -46
- package/build/ft-search-bar.light.js +328 -286
- package/build/ft-search-bar.min.js +421 -379
- package/package.json +14 -14
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(r.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(r.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(ui){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -66,7 +66,7 @@ var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prot
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var E;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:z}),(null!==(m=globalThis.reactiveElementVersions)&&void 0!==m?m:globalThis.reactiveElementVersions=[]).push("1.3.2");const B=globalThis.trustedTypes,M=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,N=`lit$${(Math.random()+"").slice(9)}$`,
|
|
69
|
+
var E;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:z}),(null!==(m=globalThis.reactiveElementVersions)&&void 0!==m?m:globalThis.reactiveElementVersions=[]).push("1.3.2");const B=globalThis.trustedTypes,M=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,N=`lit$${(Math.random()+"").slice(9)}$`,F="?"+N,R=`<${F}>`,L=document,D=(t="")=>L.createComment(t),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,U=t=>{var e;return j(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,T=/>/g,_=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,H=/'/g,Z=/"/g,K=/^(?:script|style|textarea|title)$/i,W=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),V=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),J=new WeakMap,X=L.createTreeWalker(L,129,null,!1),Y=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=P;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===P?"!--"===a[1]?r=A:void 0!==a[1]?r=T:void 0!==a[2]?(K.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=_):void 0!==a[3]&&(r=_):r===_?">"===a[0]?(r=null!=s?s:P,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?_:'"'===a[3]?Z:H):r===Z||r===H?r=_:r===A||r===T?r=P:(r=_,s=void 0);const p=r===_&&t[e+1].startsWith("/>")?" ":"";n+=r===P?i+R:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+N+p):i+N+(-2===c?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==M?M.createHTML(l):l,o]};class Q{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,c]=Y(t,e);if(this.el=Q.createElement(a,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=X.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(N)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(N),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?nt:"@"===e[1]?rt:it})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(K.test(o.tagName)){const t=o.textContent.split(N),e=t.length-1;if(e>0){o.textContent=B?B.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],D()),X.nextNode(),l.push({type:2,index:++s});o.append(t[e],D())}}}else if(8===o.nodeType)if(o.data===F)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(N,t+1));)l.push({type:7,index:s}),t+=N.length-1}s++}}static createElement(t,e){const i=L.createElement("template");return i.innerHTML=t,i}}function G(t,e,i=t,o){var s,n,r,l;if(e===V)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=I(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=G(t,a._$AS(t,e.values),a,o)),e}class tt{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:L).importNode(i,!0);X.currentNode=s;let n=X.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new et(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new lt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=X.nextNode(),r++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,o){var s;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),I(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==V&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):U(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==q&&I(this._$AH)?this._$AA.nextSibling.data=t:this.k(L.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Q.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new tt(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=J.get(t.strings);return void 0===e&&J.set(t.strings,e=new Q(t)),e}S(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new et(this.M(D()),this.M(D()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,o,s){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=G(this,t,e,0),n=!I(t)||t!==this._$AH&&t!==V,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=G(this,o[i+r],e,r),l===V&&(l=this._$AH[r]),n||(n=!I(l)||l!==this._$AH[r]),l===q?t=q:t!==q&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.C(t)}C(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ot extends it{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===q?void 0:t}}const st=B?B.emptyScript:"";class nt extends it{constructor(){super(...arguments),this.type=4}C(t){t&&t!==q?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class rt extends it{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=G(this,t,e,0))&&void 0!==i?i:q)===V)return;const o=this._$AH,s=t===q&&o!==q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==q&&(o===q||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class lt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const at={L:"$lit$",P:N,V:F,I:1,N:Y,R:tt,j:U,D:G,H:et,F:it,O:nt,W:rt,B:ot,Z:lt},ct=window.litHtmlPolyfillSupport;
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
@@ -77,12 +77,12 @@ var ht,pt;null==ct||ct(Q,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2021 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/
|
|
80
|
+
*/var gt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class xt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return x(s,this.constructor.elementStyles),s}}}(dt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),W`
|
|
81
81
|
${t.map((t=>W`
|
|
82
82
|
<style>${t}</style>
|
|
83
83
|
`))}
|
|
84
84
|
${this.getTemplate()}
|
|
85
|
-
`}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const
|
|
85
|
+
`}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,o,s,n,r;let l=[];for(let a of t){let t=null==a?void 0:a.trim();if(t)for(let a of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){let e=null!==(s=null===(o=a.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(r=null===(n=a.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];const c=[...new Set([...e,...i])].filter((t=>null!=t&&t.trim().length>0)).map((t=>t.trim())).map((e=>`${e}:${t}--${e}`));l.push(...c)}}this.setAttribute("exportparts",l.join(", "))}contentAvailableCallback(t){}}gt([o()],xt.prototype,"exportpartsPrefix",void 0),gt([p([])],xt.prototype,"exportpartsPrefixes",void 0);const yt=g`
|
|
86
86
|
.ft-no-text-select {
|
|
87
87
|
-webkit-touch-callout: none;
|
|
88
88
|
-webkit-user-select: none;
|
|
@@ -91,26 +91,26 @@ var ht,pt;null==ct||ct(Q,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
91
91
|
-ms-user-select: none;
|
|
92
92
|
user-select: none;
|
|
93
93
|
}
|
|
94
|
-
`;class
|
|
94
|
+
`;class mt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;let s=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>s=s.replace(new RegExp(`\\{${e}\\}`,"g"),t))),s}}var $t,wt,kt;const St=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(kt=null===(wt=null===($t=window.safari)||void 0===$t?void 0:$t.pushNotification)||void 0===wt?void 0:wt.toString())&&void 0!==kt?kt:""),Ot=1,Ct=2,zt=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
95
95
|
/**
|
|
96
96
|
* @license
|
|
97
97
|
* Copyright 2017 Google LLC
|
|
98
98
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
99
|
-
*/class
|
|
99
|
+
*/class Et{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
100
100
|
/**
|
|
101
101
|
* @license
|
|
102
102
|
* Copyright 2020 Google LLC
|
|
103
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
|
-
*/const{H:
|
|
104
|
+
*/const{H:Bt}=at,Mt=()=>document.createComment(""),Nt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Mt(),n),o=s.insertBefore(Mt(),n);i=new Bt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Ft=(t,e,i=t)=>(t._$AI(e,i),t),Rt={},Lt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Dt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},It=zt(class extends Et{constructor(t){if(super(t),t.type!==Ct)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.ut=l,r;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let h,p,d=0,f=n.length-1,u=0,b=r.length-1;for(;d<=f&&u<=b;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])c[u]=Ft(n[d],r[u]),d++,u++;else if(a[f]===l[b])c[b]=Ft(n[f],r[b]),f--,b--;else if(a[d]===l[b])c[b]=Ft(n[d],r[b]),Nt(t,c[b+1],n[d]),d++,b--;else if(a[f]===l[u])c[u]=Ft(n[f],r[u]),Nt(t,n[d],n[f]),f--,u++;else if(void 0===h&&(h=Dt(l,u,b),p=Dt(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=Nt(t,n[d]);Ft(e,r[u]),c[u]=e}else c[u]=Ft(i,r[u]),Nt(t,n[d],i),n[e]=null;u++}else Lt(n[f]),f--;else Lt(n[d]),d++;for(;u<=b;){const e=Nt(t,c[b+1]);Ft(e,r[u]),c[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Lt(t)}return this.ut=l,((t,e=Rt)=>{t._$AH=e})(t,c),V}}),jt=zt(class extends Et{constructor(t){var e;if(super(t),t.type!==Ot||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const s=t.element.classList;this.et.forEach((t=>{t in e||(s.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return V}});
|
|
105
105
|
/**
|
|
106
106
|
* @license
|
|
107
107
|
* Copyright 2017 Google LLC
|
|
108
108
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
109
|
-
*/var
|
|
109
|
+
*/var Ut,Pt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(Ut||(Ut={}));class At extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class Tt extends xt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=Ut.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e}render(){return W`
|
|
110
110
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
111
111
|
<div class="ft-size-watcher--watcher"></div>
|
|
112
112
|
</div>
|
|
113
|
-
`}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=
|
|
113
|
+
`}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=Ut.S:this.size<976?this.category=Ut.M:this.size<1024?this.category=Ut.L:this.size<1440?this.category=Ut.XL:this.category=Ut.XXL,this.dispatchEvent(new At(this.size,this.category)))}),this.debounceTimeout)}}Tt.elementDefinitions={},Tt.styles=g`
|
|
114
114
|
.ft-size-watcher--pixel {
|
|
115
115
|
width: 0;
|
|
116
116
|
height: 0;
|
|
@@ -129,60 +129,51 @@ var ht,pt;null==ct||ct(Q,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
129
129
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
130
130
|
width: 100%;
|
|
131
131
|
}
|
|
132
|
-
`,
|
|
132
|
+
`,Pt([o({type:Number})],Tt.prototype,"debounceTimeout",void 0),Pt([o({type:Boolean})],Tt.prototype,"local",void 0),Pt([o({type:Number,reflect:!0})],Tt.prototype,"size",void 0),Pt([o({type:String,reflect:!0})],Tt.prototype,"category",void 0),Pt([r(".ft-size-watcher--watcher")],Tt.prototype,"watcher",void 0),h("ft-size-watcher")(Tt);
|
|
133
133
|
/**
|
|
134
134
|
* @license
|
|
135
135
|
* Copyright 2020 Google LLC
|
|
136
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const _t=Symbol.for(""),Ht=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===_t)return null===(i=t)||void 0===i?void 0:i._$litStatic$},Zt=t=>({_$litStatic$:t,r:_t}),Kt=new Map,Wt=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(n=i[c],s=Ht(n));)a+=s+e[++c],h=!0;l.push(n),r.push(a),c++}if(c===o&&r.push(e[o]),h){const t=r.join("$$lit$$");void 0===(e=Kt.get(t))&&(r.raw=r,Kt.set(t,e=r)),i=l}return t(e,...i)})(W);var Vt,qt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Vt||(Vt={}));const Jt=ut.extend("--ft-typography-font-family",vt.titleFont),Xt=ut.extend("--ft-typography-font-family",vt.contentFont),Yt={fontFamily:Xt,fontSize:ut.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ut.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ut.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ut.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:ut.create("--ft-typography-text-transform","UNKNOWN","inherit")},Qt=ut.extend("--ft-typography-title-font-family",Jt),Gt=ut.extend("--ft-typography-title-font-size",Yt.fontSize,"20px"),te=ut.extend("--ft-typography-title-font-weight",Yt.fontWeight,"normal"),ee=ut.extend("--ft-typography-title-letter-spacing",Yt.letterSpacing,"0.15px"),ie=ut.extend("--ft-typography-title-line-height",Yt.lineHeight,"1.2"),oe=ut.extend("--ft-typography-title-text-transform",Yt.textTransform,"inherit"),se=ut.extend("--ft-typography-title-dense-font-family",Jt),ne=ut.extend("--ft-typography-title-dense-font-size",Yt.fontSize,"14px"),re=ut.extend("--ft-typography-title-dense-font-weight",Yt.fontWeight,"normal"),le=ut.extend("--ft-typography-title-dense-letter-spacing",Yt.letterSpacing,"0.105px"),ae=ut.extend("--ft-typography-title-dense-line-height",Yt.lineHeight,"1.7"),ce=ut.extend("--ft-typography-title-dense-text-transform",Yt.textTransform,"inherit"),he=ut.extend("--ft-typography-subtitle1-font-family",Xt),pe=ut.extend("--ft-typography-subtitle1-font-size",Yt.fontSize,"16px"),de=ut.extend("--ft-typography-subtitle1-font-weight",Yt.fontWeight,"600"),fe=ut.extend("--ft-typography-subtitle1-letter-spacing",Yt.letterSpacing,"0.144px"),ue=ut.extend("--ft-typography-subtitle1-line-height",Yt.lineHeight,"1.5"),be=ut.extend("--ft-typography-subtitle1-text-transform",Yt.textTransform,"inherit"),ve=ut.extend("--ft-typography-subtitle2-font-family",Xt),ge=ut.extend("--ft-typography-subtitle2-font-size",Yt.fontSize,"14px"),xe=ut.extend("--ft-typography-subtitle2-font-weight",Yt.fontWeight,"normal"),ye=ut.extend("--ft-typography-subtitle2-letter-spacing",Yt.letterSpacing,"0.098px"),me=ut.extend("--ft-typography-subtitle2-line-height",Yt.lineHeight,"1.7"),$e=ut.extend("--ft-typography-subtitle2-text-transform",Yt.textTransform,"inherit"),we={fontFamily:ut.extend("--ft-typography-body1-font-family",Xt),fontSize:ut.extend("--ft-typography-body1-font-size",Yt.fontSize,"16px"),fontWeight:ut.extend("--ft-typography-body1-font-weight",Yt.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-body1-letter-spacing",Yt.letterSpacing,"0.496px"),lineHeight:ut.extend("--ft-typography-body1-line-height",Yt.lineHeight,"1.5"),textTransform:ut.extend("--ft-typography-body1-text-transform",Yt.textTransform,"inherit")},ke={fontFamily:ut.extend("--ft-typography-body2-font-family",Xt),fontSize:ut.extend("--ft-typography-body2-font-size",Yt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-body2-font-weight",Yt.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-body2-letter-spacing",Yt.letterSpacing,"0.252px"),lineHeight:ut.extend("--ft-typography-body2-line-height",Yt.lineHeight,"1.4"),textTransform:ut.extend("--ft-typography-body2-text-transform",Yt.textTransform,"inherit")},Se={fontFamily:ut.extend("--ft-typography-caption-font-family",Xt),fontSize:ut.extend("--ft-typography-caption-font-size",Yt.fontSize,"12px"),fontWeight:ut.extend("--ft-typography-caption-font-weight",Yt.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-caption-letter-spacing",Yt.letterSpacing,"0.396px"),lineHeight:ut.extend("--ft-typography-caption-line-height",Yt.lineHeight,"1.33"),textTransform:ut.extend("--ft-typography-caption-text-transform",Yt.textTransform,"inherit")},Oe=ut.extend("--ft-typography-breadcrumb-font-family",Xt),Ce=ut.extend("--ft-typography-breadcrumb-font-size",Yt.fontSize,"10px"),ze=ut.extend("--ft-typography-breadcrumb-font-weight",Yt.fontWeight,"normal"),Ee=ut.extend("--ft-typography-breadcrumb-letter-spacing",Yt.letterSpacing,"0.33px"),Be=ut.extend("--ft-typography-breadcrumb-line-height",Yt.lineHeight,"1.6"),Me=ut.extend("--ft-typography-breadcrumb-text-transform",Yt.textTransform,"inherit"),Ne=ut.extend("--ft-typography-overline-font-family",Xt),Fe=ut.extend("--ft-typography-overline-font-size",Yt.fontSize,"10px"),Re=ut.extend("--ft-typography-overline-font-weight",Yt.fontWeight,"normal"),Le=ut.extend("--ft-typography-overline-letter-spacing",Yt.letterSpacing,"1.5px"),De=ut.extend("--ft-typography-overline-line-height",Yt.lineHeight,"1.6"),Ie=ut.extend("--ft-typography-overline-text-transform",Yt.textTransform,"uppercase"),je={fontFamily:ut.extend("--ft-typography-button-font-family",Xt),fontSize:ut.extend("--ft-typography-button-font-size",Yt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-button-font-weight",Yt.fontWeight,"600"),letterSpacing:ut.extend("--ft-typography-button-letter-spacing",Yt.letterSpacing,"1.246px"),lineHeight:ut.extend("--ft-typography-button-line-height",Yt.lineHeight,"1.15"),textTransform:ut.extend("--ft-typography-button-text-transform",Yt.textTransform,"uppercase")},Ue=g`
|
|
139
139
|
.ft-typography--title {
|
|
140
|
-
font-family: ${
|
|
141
|
-
font-size: ${
|
|
142
|
-
font-weight: ${
|
|
143
|
-
letter-spacing: ${
|
|
144
|
-
line-height: ${
|
|
145
|
-
text-transform: ${
|
|
146
|
-
}
|
|
147
|
-
`,Ue=g`
|
|
148
|
-
.ft-typography--title-dense {
|
|
149
|
-
font-family: ${oe};
|
|
150
|
-
font-size: ${se};
|
|
151
|
-
font-weight: ${ne};
|
|
152
|
-
letter-spacing: ${re};
|
|
153
|
-
line-height: ${le};
|
|
154
|
-
text-transform: ${ae};
|
|
140
|
+
font-family: ${Qt};
|
|
141
|
+
font-size: ${Gt};
|
|
142
|
+
font-weight: ${te};
|
|
143
|
+
letter-spacing: ${ee};
|
|
144
|
+
line-height: ${ie};
|
|
145
|
+
text-transform: ${oe};
|
|
155
146
|
}
|
|
156
147
|
`,Pe=g`
|
|
148
|
+
.ft-typography--title-dense {
|
|
149
|
+
font-family: ${se};
|
|
150
|
+
font-size: ${ne};
|
|
151
|
+
font-weight: ${re};
|
|
152
|
+
letter-spacing: ${le};
|
|
153
|
+
line-height: ${ae};
|
|
154
|
+
text-transform: ${ce};
|
|
155
|
+
}
|
|
156
|
+
`,Ae=g`
|
|
157
157
|
.ft-typography--subtitle1 {
|
|
158
|
-
font-family: ${
|
|
159
|
-
font-size: ${
|
|
160
|
-
font-weight: ${
|
|
161
|
-
letter-spacing: ${
|
|
162
|
-
line-height: ${
|
|
163
|
-
text-transform: ${
|
|
158
|
+
font-family: ${he};
|
|
159
|
+
font-size: ${pe};
|
|
160
|
+
font-weight: ${de};
|
|
161
|
+
letter-spacing: ${fe};
|
|
162
|
+
line-height: ${ue};
|
|
163
|
+
text-transform: ${be};
|
|
164
164
|
}
|
|
165
165
|
`,Te=g`
|
|
166
166
|
.ft-typography--subtitle2 {
|
|
167
|
-
font-family: ${
|
|
168
|
-
font-size: ${
|
|
169
|
-
font-weight: ${
|
|
170
|
-
letter-spacing: ${
|
|
171
|
-
line-height: ${
|
|
172
|
-
text-transform: ${
|
|
167
|
+
font-family: ${ve};
|
|
168
|
+
font-size: ${ge};
|
|
169
|
+
font-weight: ${xe};
|
|
170
|
+
letter-spacing: ${ye};
|
|
171
|
+
line-height: ${me};
|
|
172
|
+
text-transform: ${$e};
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
`,Ae=g`
|
|
176
|
-
.ft-typography--body1 {
|
|
177
|
-
font-family: ${$e.fontFamily};
|
|
178
|
-
font-size: ${$e.fontSize};
|
|
179
|
-
font-weight: ${$e.fontWeight};
|
|
180
|
-
letter-spacing: ${$e.letterSpacing};
|
|
181
|
-
line-height: ${$e.lineHeight};
|
|
182
|
-
text-transform: ${$e.textTransform};
|
|
183
|
-
}
|
|
184
175
|
`,_e=g`
|
|
185
|
-
.ft-typography--
|
|
176
|
+
.ft-typography--body1 {
|
|
186
177
|
font-family: ${we.fontFamily};
|
|
187
178
|
font-size: ${we.fontSize};
|
|
188
179
|
font-weight: ${we.fontWeight};
|
|
@@ -191,7 +182,7 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
191
182
|
text-transform: ${we.textTransform};
|
|
192
183
|
}
|
|
193
184
|
`,He=g`
|
|
194
|
-
.ft-typography--
|
|
185
|
+
.ft-typography--body2 {
|
|
195
186
|
font-family: ${ke.fontFamily};
|
|
196
187
|
font-size: ${ke.fontSize};
|
|
197
188
|
font-weight: ${ke.fontWeight};
|
|
@@ -200,44 +191,53 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
200
191
|
text-transform: ${ke.textTransform};
|
|
201
192
|
}
|
|
202
193
|
`,Ze=g`
|
|
203
|
-
.ft-typography--
|
|
204
|
-
font-family: ${Se};
|
|
205
|
-
font-size: ${
|
|
206
|
-
font-weight: ${
|
|
207
|
-
letter-spacing: ${
|
|
208
|
-
line-height: ${
|
|
209
|
-
text-transform: ${
|
|
194
|
+
.ft-typography--caption {
|
|
195
|
+
font-family: ${Se.fontFamily};
|
|
196
|
+
font-size: ${Se.fontSize};
|
|
197
|
+
font-weight: ${Se.fontWeight};
|
|
198
|
+
letter-spacing: ${Se.letterSpacing};
|
|
199
|
+
line-height: ${Se.lineHeight};
|
|
200
|
+
text-transform: ${Se.textTransform};
|
|
210
201
|
}
|
|
211
202
|
`,Ke=g`
|
|
203
|
+
.ft-typography--breadcrumb {
|
|
204
|
+
font-family: ${Oe};
|
|
205
|
+
font-size: ${Ce};
|
|
206
|
+
font-weight: ${ze};
|
|
207
|
+
letter-spacing: ${Ee};
|
|
208
|
+
line-height: ${Be};
|
|
209
|
+
text-transform: ${Me};
|
|
210
|
+
}
|
|
211
|
+
`,We=g`
|
|
212
212
|
.ft-typography--overline {
|
|
213
|
-
font-family: ${
|
|
214
|
-
font-size: ${
|
|
213
|
+
font-family: ${Ne};
|
|
214
|
+
font-size: ${Fe};
|
|
215
215
|
font-weight: ${Re};
|
|
216
|
-
letter-spacing: ${
|
|
217
|
-
line-height: ${
|
|
218
|
-
text-transform: ${
|
|
216
|
+
letter-spacing: ${Le};
|
|
217
|
+
line-height: ${De};
|
|
218
|
+
text-transform: ${Ie};
|
|
219
219
|
}
|
|
220
|
-
`,
|
|
220
|
+
`,Ve=g`
|
|
221
221
|
.ft-typography--button {
|
|
222
|
-
font-family: ${
|
|
223
|
-
font-size: ${
|
|
224
|
-
font-weight: ${
|
|
225
|
-
letter-spacing: ${
|
|
226
|
-
line-height: ${
|
|
227
|
-
text-transform: ${
|
|
228
|
-
}
|
|
229
|
-
`;class
|
|
230
|
-
<${
|
|
222
|
+
font-family: ${je.fontFamily};
|
|
223
|
+
font-size: ${je.fontSize};
|
|
224
|
+
font-weight: ${je.fontWeight};
|
|
225
|
+
letter-spacing: ${je.letterSpacing};
|
|
226
|
+
line-height: ${je.lineHeight};
|
|
227
|
+
text-transform: ${je.textTransform};
|
|
228
|
+
}
|
|
229
|
+
`;class qe extends xt{constructor(){super(...arguments),this.variant=Vt.body1}render(){return this.element?Wt`
|
|
230
|
+
<${Zt(this.element)}
|
|
231
231
|
class="ft-typography ft-typography--${this.variant}">
|
|
232
232
|
<slot></slot>
|
|
233
|
-
</${
|
|
234
|
-
`:
|
|
233
|
+
</${Zt(this.element)}>
|
|
234
|
+
`:Wt`
|
|
235
235
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
236
|
-
`}}function
|
|
236
|
+
`}}function Je(t,e){return t.flatMap((t=>[t,...Je(e(t),e)]))}function Xe(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Ye(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>Ye(e,t.selected))),value:t.value}}function Qe(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>Ye(t,!1)))}}qe.styles=[Ue,Pe,Ae,Te,_e,He,Ze,Ke,We,Ve,g`
|
|
237
237
|
.ft-typography {
|
|
238
238
|
vertical-align: inherit;
|
|
239
239
|
}
|
|
240
|
-
`],
|
|
240
|
+
`],qt([o()],qe.prototype,"element",void 0),qt([o()],qe.prototype,"variant",void 0),h("ft-typography")(qe);var Ge=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ti=ut.extend("--ft-ripple-color",vt.colorContent),ei={color:ti,backgroundColor:ut.extend("--ft-ripple-background-color",ti),opacityContentOnSurfacePressed:ut.external(vt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ut.external(vt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ut.external(vt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ut.external(vt.opacityContentOnSurfaceSelected,"Design system")},ii=ut.extend("--ft-ripple-color",vt.colorPrimary),oi=ii,si=ut.extend("--ft-ripple-background-color",ii),ni=ut.extend("--ft-ripple-color",vt.colorSecondary),ri=ni,li=ut.extend("--ft-ripple-background-color",ni);class ai extends xt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return W`
|
|
241
241
|
<style>
|
|
242
242
|
.ft-ripple .ft-ripple--effect,
|
|
243
243
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -250,11 +250,11 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
250
250
|
top: ${this.originY}px;
|
|
251
251
|
}
|
|
252
252
|
</style>
|
|
253
|
-
<div class="${
|
|
253
|
+
<div class="${jt(t)}">
|
|
254
254
|
<div class="ft-ripple--background"></div>
|
|
255
255
|
<div class="ft-ripple--effect"></div>
|
|
256
256
|
</div>
|
|
257
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
257
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ai.elementDefinitions={},ai.styles=g`
|
|
258
258
|
:host {
|
|
259
259
|
display: contents;
|
|
260
260
|
}
|
|
@@ -276,27 +276,27 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
.ft-ripple .ft-ripple--background {
|
|
279
|
-
background-color: ${
|
|
279
|
+
background-color: ${ei.backgroundColor};
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
.ft-ripple .ft-ripple--effect {
|
|
283
|
-
background-color: ${
|
|
283
|
+
background-color: ${ei.color};
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
287
|
-
background-color: ${
|
|
287
|
+
background-color: ${li};
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
291
|
-
background-color: ${
|
|
291
|
+
background-color: ${ri};
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
295
|
-
background-color: ${
|
|
295
|
+
background-color: ${si};
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
299
|
-
background-color: ${
|
|
299
|
+
background-color: ${oi};
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
.ft-ripple .ft-ripple--background {
|
|
@@ -328,22 +328,22 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
331
|
-
opacity: ${
|
|
331
|
+
opacity: ${ei.opacityContentOnSurfaceHover};
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
335
|
-
opacity: ${
|
|
335
|
+
opacity: ${ei.opacityContentOnSurfaceSelected};
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
339
|
-
opacity: ${
|
|
339
|
+
opacity: ${ei.opacityContentOnSurfaceFocused};
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
343
|
-
opacity: ${
|
|
343
|
+
opacity: ${ei.opacityContentOnSurfacePressed};
|
|
344
344
|
transform: translate(-50%, -50%) scale(1);
|
|
345
345
|
}
|
|
346
|
-
`,
|
|
346
|
+
`,Ge([o({type:Boolean})],ai.prototype,"primary",void 0),Ge([o({type:Boolean})],ai.prototype,"secondary",void 0),Ge([o({type:Boolean})],ai.prototype,"unbounded",void 0),Ge([o({type:Boolean})],ai.prototype,"activated",void 0),Ge([o({type:Boolean})],ai.prototype,"selected",void 0),Ge([o({type:Boolean})],ai.prototype,"disabled",void 0),Ge([s()],ai.prototype,"hovered",void 0),Ge([s()],ai.prototype,"focused",void 0),Ge([s()],ai.prototype,"pressed",void 0),Ge([s()],ai.prototype,"rippling",void 0),Ge([s()],ai.prototype,"rippleSize",void 0),Ge([s()],ai.prototype,"originX",void 0),Ge([s()],ai.prototype,"originY",void 0),Ge([r(".ft-ripple")],ai.prototype,"ripple",void 0),Ge([r(".ft-ripple--effect")],ai.prototype,"rippleEffect",void 0),h("ft-ripple")(ai);var ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const hi={distance:ut.create("--ft-tooltip-distance","SIZE","4px"),color:ut.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:ut.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:ut.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:ut.external(vt.borderRadiusS,"Design system")};class pi extends xt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e,this.revealDebouncer=new e}render(){return W`
|
|
347
347
|
<div part="container"
|
|
348
348
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
349
349
|
@mouseenter=${this.onHover}
|
|
@@ -358,7 +358,7 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
358
358
|
</div>
|
|
359
359
|
<slot></slot>
|
|
360
360
|
</div>
|
|
361
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}
|
|
361
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}pi.elementDefinitions={"ft-typography":qe},pi.styles=g`
|
|
362
362
|
.ft-tooltip--container {
|
|
363
363
|
display: block;
|
|
364
364
|
position: relative;
|
|
@@ -376,21 +376,21 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
376
376
|
width: max-content;
|
|
377
377
|
max-width: 150px;
|
|
378
378
|
text-align: center;
|
|
379
|
-
padding: ${
|
|
380
|
-
z-index: ${
|
|
379
|
+
padding: ${hi.distance};
|
|
380
|
+
z-index: ${hi.zIndex};
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
.ft-tooltip--content {
|
|
384
384
|
padding: 4px 8px;
|
|
385
|
-
border-radius: ${
|
|
386
|
-
background-color: ${
|
|
387
|
-
color: ${hi};
|
|
385
|
+
border-radius: ${hi.borderRadiusS};
|
|
386
|
+
background-color: ${hi.backgroundColor};
|
|
387
|
+
color: ${hi.color};
|
|
388
388
|
top: -500px;
|
|
389
389
|
left: -500px;
|
|
390
390
|
position: relative;
|
|
391
391
|
word-break: break-word;
|
|
392
392
|
}
|
|
393
|
-
`,
|
|
393
|
+
`,ci([o()],pi.prototype,"text",void 0),ci([o({type:Boolean})],pi.prototype,"manual",void 0),ci([o({type:Boolean})],pi.prototype,"inline",void 0),ci([o({type:Number})],pi.prototype,"delay",void 0),ci([o()],pi.prototype,"position",void 0),ci([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({slot:s,flatten:e,selector:i}):n({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],pi.prototype,"slotNodes",void 0),ci([r(".ft-tooltip--container")],pi.prototype,"container",void 0),ci([r("slot")],pi.prototype,"target",void 0),ci([r(".ft-tooltip")],pi.prototype,"tooltip",void 0),ci([r(".ft-tooltip--content")],pi.prototype,"tooltipContent",void 0),ci([s()],pi.prototype,"visible",void 0),h("ft-tooltip")(pi);const di={color:ut.extend("--ft-loader-color",vt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")};class fi extends xt{static get styles(){return g`
|
|
394
394
|
:host {
|
|
395
395
|
line-height: 0;
|
|
396
396
|
}
|
|
@@ -399,8 +399,8 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
399
399
|
display: inline-block;
|
|
400
400
|
position: relative;
|
|
401
401
|
|
|
402
|
-
width: ${
|
|
403
|
-
height: ${
|
|
402
|
+
width: ${di.size};
|
|
403
|
+
height: ${di.size};
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
.ft-loader div {
|
|
@@ -409,7 +409,7 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
409
409
|
width: 25%;
|
|
410
410
|
height: 25%;
|
|
411
411
|
border-radius: 50%;
|
|
412
|
-
background: ${
|
|
412
|
+
background: ${di.color};
|
|
413
413
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
414
414
|
}
|
|
415
415
|
|
|
@@ -456,7 +456,7 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
456
456
|
transform: translate(0, 0);
|
|
457
457
|
}
|
|
458
458
|
100% {
|
|
459
|
-
transform: translate(calc(0.35 * ${
|
|
459
|
+
transform: translate(calc(0.35 * ${di.size}), 0);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
`}render(){return W`
|
|
@@ -466,29 +466,29 @@ const At=Symbol.for(""),_t=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
466
466
|
<div></div>
|
|
467
467
|
<div></div>
|
|
468
468
|
</div>
|
|
469
|
-
`}}h("ft-loader")(
|
|
469
|
+
`}}h("ft-loader")(fi);
|
|
470
470
|
/**
|
|
471
471
|
* @license
|
|
472
472
|
* Copyright 2017 Google LLC
|
|
473
473
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
474
474
|
*/
|
|
475
|
-
class
|
|
475
|
+
class ui extends Et{constructor(t){if(super(t),this.it=q,t.type!==Ct)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this.ft=void 0,this.it=t;if(t===V)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ui.directiveName="unsafeHTML",ui.resultType=1;const bi=zt(ui);var vi,gi;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(vi||(vi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(gi||(gi={}));const xi=new Map([...["abw"].map((t=>[t,gi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,gi.AUDIO])),...["avi"].map((t=>[t,gi.AVI])),...["chm","xhs"].map((t=>[t,gi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,gi.CODE])),...["csv"].map((t=>[t,gi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,gi.DITA])),...["epub"].map((t=>[t,gi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,gi.EXCEL])),...["flac"].map((t=>[t,gi.FLAC])),...["gif"].map((t=>[t,gi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,gi.GZIP])),...["html","htm","xhtml"].map((t=>[t,gi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,gi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,gi.JPEG])),...["json"].map((t=>[t,gi.JSON])),...["m4a","m4p"].map((t=>[t,gi.M4A])),...["mov","qt"].map((t=>[t,gi.MOV])),...["mp3"].map((t=>[t,gi.MP3])),...["mp4","m4v"].map((t=>[t,gi.MP4])),...["ogg","oga"].map((t=>[t,gi.OGG])),...["pdf","ps"].map((t=>[t,gi.PDF])),...["png"].map((t=>[t,gi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,gi.POWERPOINT])),...["rar"].map((t=>[t,gi.RAR])),...["stp"].map((t=>[t,gi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,gi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,gi.VIDEO])),...["wav"].map((t=>[t,gi.WAV])),...["wma"].map((t=>[t,gi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,gi.WORD])),...["xml","xsl","rdf"].map((t=>[t,gi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,gi.YAML])),...["zip"].map((t=>[t,gi.ZIP]))]),yi=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var mi,$i=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(mi||(mi={}));const wi={size:ut.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ut.extend("--ft-icon-fluid-topics-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ut.extend("--ft-icon-file-format-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ut.extend("--ft-icon-material-font-family",ut.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class ki extends xt{constructor(){super(...arguments),this.variant=mi.fluid_topics}render(){return W`
|
|
476
476
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
477
|
-
${
|
|
477
|
+
${bi(this.getIcon())}
|
|
478
478
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
479
479
|
</i>
|
|
480
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===
|
|
480
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===mi.file_format?null!==(t=gi[i.toUpperCase()])&&void 0!==t?t:i:this.variant===mi.fluid_topics?null!==(e=vi[i.toUpperCase()])&&void 0!==e?e:i:q}}ki.elementDefinitions={},ki.styles=g`
|
|
481
481
|
:host {
|
|
482
482
|
display: inline-block;
|
|
483
483
|
}
|
|
484
484
|
:host, i.ft-icon {
|
|
485
|
-
width: ${
|
|
486
|
-
height: ${
|
|
485
|
+
width: ${wi.size};
|
|
486
|
+
height: ${wi.size};
|
|
487
487
|
text-align: center;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
i.ft-icon {
|
|
491
|
-
font-size: ${
|
|
491
|
+
font-size: ${wi.size};
|
|
492
492
|
line-height: 1;
|
|
493
493
|
font-weight: normal;
|
|
494
494
|
text-transform: none;
|
|
@@ -502,17 +502,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
.ft-icon--fluid-topics {
|
|
505
|
-
font-family: ${
|
|
505
|
+
font-family: ${wi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.ft-icon--file-format {
|
|
509
|
-
font-family: ${
|
|
509
|
+
font-family: ${wi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
.ft-icon--material {
|
|
513
|
-
font-family: ${
|
|
513
|
+
font-family: ${wi.materialFontFamily}, "Material Icons", sans-serif;
|
|
514
514
|
}
|
|
515
|
-
|
|
515
|
+
`,$i([o()],ki.prototype,"variant",void 0),$i([r("slot")],ki.prototype,"slottedContent",void 0),h("ft-icon")(ki);var Si=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Oi=ut.extend("--ft-button-color",vt.colorPrimary),Ci={backgroundColor:ut.extend("--ft-button-background-color",vt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",vt.borderRadiusL),color:Oi,fontSize:ut.extend("--ft-button-font-size",je.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",Oi),opacityDisabled:ut.external(vt.colorOpacityDisabled,"Design system")},zi=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",vt.colorOnPrimary)),Ei={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",vt.colorPrimary)),color:zi,rippleColor:ut.extend("--ft-button-primary-ripple-color",zi)},Bi=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",vt.borderRadiusM));class Mi extends xt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[yt,g`
|
|
516
516
|
:host {
|
|
517
517
|
display: inline-block;
|
|
518
518
|
max-width: 100%;
|
|
@@ -553,18 +553,18 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
553
553
|
pointer-events: auto;
|
|
554
554
|
line-height: 0;
|
|
555
555
|
|
|
556
|
-
--ft-button-internal-font-size: ${
|
|
556
|
+
--ft-button-internal-font-size: ${Ci.fontSize};
|
|
557
557
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
558
|
-
--ft-button-internal-color: ${
|
|
559
|
-
${bt(
|
|
558
|
+
--ft-button-internal-color: ${Ci.color};
|
|
559
|
+
${bt(wi.size,Ci.iconSize)};
|
|
560
560
|
--ft-button-internal-vertical-padding: 6px;
|
|
561
561
|
--ft-button-internal-horizontal-padding: 8px;
|
|
562
|
-
${bt(
|
|
563
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
562
|
+
${bt(ei.color,Ci.rippleColor)};
|
|
563
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ci.iconSize});
|
|
564
564
|
|
|
565
|
-
border-radius: ${
|
|
565
|
+
border-radius: ${Ci.borderRadius};
|
|
566
566
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
567
|
-
background-color: ${
|
|
567
|
+
background-color: ${Ci.backgroundColor};
|
|
568
568
|
color: var(--ft-button-internal-color);
|
|
569
569
|
-webkit-mask-image: radial-gradient(white, black);
|
|
570
570
|
}
|
|
@@ -576,7 +576,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
576
576
|
.ft-button--dense {
|
|
577
577
|
--ft-button-internal-vertical-padding: 2px;
|
|
578
578
|
--ft-button-internal-horizontal-padding: 4px;
|
|
579
|
-
border-radius: ${
|
|
579
|
+
border-radius: ${Bi};
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
.ft-button--round {
|
|
@@ -585,13 +585,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
585
585
|
|
|
586
586
|
.ft-button[disabled] {
|
|
587
587
|
filter: grayscale(1);
|
|
588
|
-
opacity: ${
|
|
588
|
+
opacity: ${Ci.opacityDisabled};
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
.ft-button.ft-button--primary {
|
|
592
|
-
background-color: ${
|
|
593
|
-
--ft-button-internal-color: ${
|
|
594
|
-
${bt(
|
|
592
|
+
background-color: ${Ei.backgroundColor};
|
|
593
|
+
--ft-button-internal-color: ${Ei.color};
|
|
594
|
+
${bt(ei.color,Ei.rippleColor)};
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
.ft-button.ft-button--outlined {
|
|
@@ -610,8 +610,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
610
610
|
text-overflow: ellipsis;
|
|
611
611
|
display: block;
|
|
612
612
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
613
|
-
${bt(
|
|
614
|
-
${bt(
|
|
613
|
+
${bt(je.fontSize,"var(--ft-button-internal-font-size)")};
|
|
614
|
+
${bt(je.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -644,12 +644,12 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
644
644
|
}
|
|
645
645
|
|
|
646
646
|
ft-loader {
|
|
647
|
-
${bt(
|
|
648
|
-
${bt(
|
|
647
|
+
${bt(di.size,Ci.iconSize)};
|
|
648
|
+
${bt(di.color,"var(--ft-button-internal-color)")};
|
|
649
649
|
}
|
|
650
|
-
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":
|
|
650
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":St,"ft-no-text-select":!0};return this.addTooltip(W`
|
|
651
651
|
<button part="button"
|
|
652
|
-
class="${
|
|
652
|
+
class="${jt(t)}"
|
|
653
653
|
aria-label="${this.getLabel()}"
|
|
654
654
|
?disabled=${this.isDisabled()}>
|
|
655
655
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -669,8 +669,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
669
669
|
</ft-tooltip>
|
|
670
670
|
`}resolveIcon(){return this.loading?W`
|
|
671
671
|
<ft-loader></ft-loader> `:this.icon?W`
|
|
672
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:q}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
673
|
-
<label class="${
|
|
672
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:q}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Mi.elementDefinitions={"ft-ripple":ai,"ft-tooltip":pi,"ft-typography":qe,"ft-icon":ki,"ft-loader":fi},Si([o({type:Boolean})],Mi.prototype,"primary",void 0),Si([o({type:Boolean})],Mi.prototype,"outlined",void 0),Si([o({type:Boolean})],Mi.prototype,"disabled",void 0),Si([o({type:Boolean})],Mi.prototype,"dense",void 0),Si([o({type:Boolean})],Mi.prototype,"round",void 0),Si([o({type:String})],Mi.prototype,"label",void 0),Si([o({type:String})],Mi.prototype,"icon",void 0),Si([o({type:Boolean})],Mi.prototype,"trailingIcon",void 0),Si([o({type:Boolean})],Mi.prototype,"loading",void 0),Si([o({type:String})],Mi.prototype,"tooltipPosition",void 0),Si([r(".ft-button")],Mi.prototype,"button",void 0),Si([r(".ft-button--label slot")],Mi.prototype,"slottedContent",void 0),h("ft-button")(Mi);var Ni=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Fi=ut.extend("--ft-checkbox-text-color",vt.colorOnSurfaceHigh),Ri=ut.external(vt.colorPrimary,"Design system"),Li=ut.external(vt.colorOnPrimary,"Design system"),Di=ut.extend("--ft-checkbox-border-color",vt.colorOnSurfaceMedium),Ii=ut.external(vt.colorOnSurfaceDisabled,"Design system");class ji extends xt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return W`
|
|
673
|
+
<label class="${jt(t)}">
|
|
674
674
|
<div class="ft-checkbox--box-container">
|
|
675
675
|
<input type="checkbox"
|
|
676
676
|
name=${this.name}
|
|
@@ -694,14 +694,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
694
694
|
<slot></slot>
|
|
695
695
|
</ft-typography>
|
|
696
696
|
</label>
|
|
697
|
-
`}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)}}
|
|
697
|
+
`}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)}}ji.elementDefinitions={"ft-ripple":ai,"ft-typography":qe},ji.styles=g`
|
|
698
698
|
* {
|
|
699
699
|
box-sizing: border-box;
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
.ft-checkbox {
|
|
703
703
|
box-sizing: border-box;
|
|
704
|
-
color: ${
|
|
704
|
+
color: ${Fi};
|
|
705
705
|
|
|
706
706
|
display: inline-flex;
|
|
707
707
|
align-items: center;
|
|
@@ -709,7 +709,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
.ft-checkbox--disabled {
|
|
712
|
-
color: ${
|
|
712
|
+
color: ${Ii};
|
|
713
713
|
}
|
|
714
714
|
|
|
715
715
|
input {
|
|
@@ -733,26 +733,26 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
733
733
|
|
|
734
734
|
.ft-checkbox--box {
|
|
735
735
|
display: flex;
|
|
736
|
-
border: 2px solid ${
|
|
736
|
+
border: 2px solid ${Di};
|
|
737
737
|
border-radius: 2px;
|
|
738
738
|
|
|
739
739
|
width: 18px;
|
|
740
740
|
height: 18px;
|
|
741
741
|
|
|
742
|
-
color: ${
|
|
742
|
+
color: ${Li};
|
|
743
743
|
}
|
|
744
744
|
|
|
745
745
|
|
|
746
746
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
747
747
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
748
|
-
border-color: ${
|
|
749
|
-
background-color: ${
|
|
748
|
+
border-color: ${Ri};
|
|
749
|
+
background-color: ${Ri};
|
|
750
750
|
}
|
|
751
751
|
|
|
752
752
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
753
|
-
border-color: ${
|
|
753
|
+
border-color: ${Ii};
|
|
754
754
|
background-color: transparent;
|
|
755
|
-
color: ${
|
|
755
|
+
color: ${Ii};
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
.ft-checkbox--checkmark {
|
|
@@ -771,8 +771,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
771
771
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
772
772
|
opacity: 1;
|
|
773
773
|
}
|
|
774
|
-
`,
|
|
775
|
-
<div class="${
|
|
774
|
+
`,Ni([o()],ji.prototype,"name",void 0),Ni([o({type:Boolean})],ji.prototype,"checked",void 0),Ni([o({type:Boolean})],ji.prototype,"indeterminate",void 0),Ni([o({type:Boolean})],ji.prototype,"disabled",void 0),Ni([r(".ft-checkbox")],ji.prototype,"container",void 0),Ni([r("ft-ripple")],ji.prototype,"ripple",void 0),h("ft-checkbox")(ji);var Ui=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Pi=ut.extend("--ft-radio-text-color",vt.colorOnSurfaceHigh),Ai=ut.external(vt.colorPrimary,"Design system"),Ti=(ut.external(vt.colorOnPrimary,"Design system"),ut.extend("--ft-radio-border-color",vt.colorOnSurfaceMedium)),_i=ut.external(vt.colorOnSurfaceDisabled,"Design system");class Hi extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Zi extends xt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return W`
|
|
775
|
+
<div class="${jt(t)}">
|
|
776
776
|
<div class="ft-radio--box-container">
|
|
777
777
|
<input id="radio-button"
|
|
778
778
|
type="radio"
|
|
@@ -796,14 +796,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
796
796
|
</ft-typography>
|
|
797
797
|
</label>
|
|
798
798
|
</div>
|
|
799
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
799
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Hi(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 Hi(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Zi.elementDefinitions={"ft-ripple":ai,"ft-typography":qe},Zi.styles=g`
|
|
800
800
|
* {
|
|
801
801
|
box-sizing: border-box;
|
|
802
802
|
}
|
|
803
803
|
|
|
804
804
|
.ft-radio {
|
|
805
805
|
box-sizing: border-box;
|
|
806
|
-
color: ${
|
|
806
|
+
color: ${Pi};
|
|
807
807
|
|
|
808
808
|
display: inline-flex;
|
|
809
809
|
align-items: center;
|
|
@@ -811,7 +811,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
811
811
|
}
|
|
812
812
|
|
|
813
813
|
.ft-radio--disabled {
|
|
814
|
-
color: ${
|
|
814
|
+
color: ${_i};
|
|
815
815
|
}
|
|
816
816
|
|
|
817
817
|
input {
|
|
@@ -834,7 +834,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
834
834
|
}
|
|
835
835
|
|
|
836
836
|
.ft-radio--box {
|
|
837
|
-
border: 2px solid ${
|
|
837
|
+
border: 2px solid ${Ti};
|
|
838
838
|
border-radius: 50%;
|
|
839
839
|
|
|
840
840
|
display: flex;
|
|
@@ -847,7 +847,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
847
847
|
|
|
848
848
|
.ft-radio--box:after {
|
|
849
849
|
content: " ";
|
|
850
|
-
background-color: ${
|
|
850
|
+
background-color: ${Ai};
|
|
851
851
|
|
|
852
852
|
border-radius: 50%;
|
|
853
853
|
|
|
@@ -859,7 +859,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
.ft-radio--checked .ft-radio--box {
|
|
862
|
-
border-color: ${
|
|
862
|
+
border-color: ${Ai};
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
|
|
@@ -868,27 +868,28 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
868
868
|
}
|
|
869
869
|
|
|
870
870
|
.ft-radio--disabled .ft-radio--box {
|
|
871
|
-
border-color: ${
|
|
871
|
+
border-color: ${_i};
|
|
872
872
|
background-color: transparent;
|
|
873
873
|
}
|
|
874
874
|
|
|
875
875
|
.ft-radio--disabled .ft-radio--box:after {
|
|
876
|
-
background-color: ${
|
|
876
|
+
background-color: ${_i};
|
|
877
877
|
}
|
|
878
|
-
`,
|
|
878
|
+
`,Ui([o()],Zi.prototype,"value",void 0),Ui([o()],Zi.prototype,"name",void 0),Ui([o({type:Boolean})],Zi.prototype,"checked",void 0),Ui([o({type:Boolean})],Zi.prototype,"disabled",void 0),Ui([r(".ft-radio")],Zi.prototype,"container",void 0),Ui([r("ft-ripple")],Zi.prototype,"ripple",void 0),Ui([r("input")],Zi.prototype,"input",void 0);var Ki=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Wi extends xt{constructor(){super(...arguments),this.name=""}render(){return W`
|
|
879
879
|
<slot @slotchange=${this.onSlotChange}
|
|
880
880
|
@change=${this.onChange}
|
|
881
881
|
@keydown=${this.onKeyDown}
|
|
882
882
|
@focusin=${this.onFocusIn}
|
|
883
883
|
></slot>
|
|
884
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
884
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Wi.elementDefinitions={},Wi.styles=g`
|
|
885
885
|
:host {
|
|
886
886
|
display: contents;
|
|
887
887
|
}
|
|
888
|
-
`,
|
|
888
|
+
`,Ki([o()],Wi.prototype,"name",void 0),Ki([c()],Wi.prototype,"radioButtons",void 0),h("ft-radio")(Zi),h("ft-radio-group")(Wi);var Vi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const qi={borderRadiusM:ut.external(vt.borderRadiusM,"Design system"),colorOutline:ut.external(vt.colorOutline,"Design system"),colorOnSurface:ut.external(vt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(vt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ut.external(vt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ut.external(vt.colorPrimary,"Design system"),colorOnPrimary:ut.external(vt.colorOnPrimary,"Design system"),fontFamily:ut.external(ke.fontFamily,"Body2 typography"),fontSize:ut.external(ke.fontSize,"Body2 typography"),fontWeight:ut.external(ke.fontWeight,"Body2 typography"),letterSpacing:ut.external(ke.letterSpacing,"Body2 typography"),lineHeight:ut.external(ke.lineHeight,"Body2 typography"),textTransform:ut.external(ke.textTransform,"Body2 typography")};class Ji extends xt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return W`
|
|
889
889
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
890
890
|
${null==this.parent?null:W`
|
|
891
891
|
<div tabindex="0"
|
|
892
|
+
part="controls go-back"
|
|
892
893
|
class="ft-filter-level--go-back"
|
|
893
894
|
?disabled=${this.disabled}
|
|
894
895
|
@keyup=${this.goBackOnKeyPress}
|
|
@@ -898,11 +899,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
898
899
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
899
900
|
</div>
|
|
900
901
|
`}
|
|
901
|
-
${
|
|
902
|
+
${0===this.options.length&&this.noValuesLabel?W`
|
|
903
|
+
<ft-typography class="ft-filter-level--no-values" element="span" variant="body2">
|
|
904
|
+
${this.noValuesLabel}
|
|
905
|
+
</ft-typography>
|
|
906
|
+
`:q}
|
|
907
|
+
${It(e,(t=>t.value),(t=>{var e;return W`
|
|
902
908
|
<div class="ft-filter-level--option" part="options">
|
|
903
909
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
904
910
|
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?q:W`
|
|
905
911
|
<ft-button icon="chevron_right"
|
|
912
|
+
part="controls navigate-hierarchy"
|
|
906
913
|
label="${t.label}"
|
|
907
914
|
?disabled=${this.disabled}
|
|
908
915
|
tooltipPosition="left"
|
|
@@ -915,6 +922,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
915
922
|
class="ft-filter-level--display-more"
|
|
916
923
|
icon="expand_more"
|
|
917
924
|
dense trailingIcon
|
|
925
|
+
part="controls display-more"
|
|
918
926
|
@click=${this.displayMore}>
|
|
919
927
|
${this.moreValuesButtonLabel}
|
|
920
928
|
</ft-button>
|
|
@@ -922,14 +930,16 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
922
930
|
</div>
|
|
923
931
|
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return W`
|
|
924
932
|
<ft-checkbox name="${this.id}"
|
|
933
|
+
part="multivalued-option"
|
|
925
934
|
.checked=${t.selected}
|
|
926
935
|
.disabled=${this.disabled}
|
|
927
|
-
.indeterminate=${
|
|
936
|
+
.indeterminate=${Je(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
928
937
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
929
938
|
${t.label}
|
|
930
939
|
</ft-checkbox>
|
|
931
940
|
`}buildMonoValuedOption(t){return W`
|
|
932
941
|
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
942
|
+
part="monovalued-option"
|
|
933
943
|
.checked=${t.selected}
|
|
934
944
|
?disabled=${this.disabled}
|
|
935
945
|
@click=${e=>this.optionsChanged(e,t)}
|
|
@@ -938,7 +948,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
938
948
|
|
|
939
949
|
${t.label}
|
|
940
950
|
</ft-radio>
|
|
941
|
-
`}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}))}}
|
|
951
|
+
`}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}))}}Ji.elementDefinitions={"ft-button":Mi,"ft-ripple":ai,"ft-typography":qe,"ft-checkbox":ji,"ft-icon":ki,"ft-radio":Zi},Ji.styles=[g`
|
|
942
952
|
.ft-filter-level--container {
|
|
943
953
|
display: flex;
|
|
944
954
|
flex-direction: column;
|
|
@@ -952,14 +962,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
952
962
|
flex-shrink: 0;
|
|
953
963
|
text-decoration: none;
|
|
954
964
|
position: relative;
|
|
955
|
-
border-radius: ${
|
|
965
|
+
border-radius: ${qi.borderRadiusM};
|
|
956
966
|
overflow: hidden;
|
|
957
967
|
display: flex;
|
|
958
968
|
align-items: center;
|
|
959
969
|
padding: 4px 4px;
|
|
960
970
|
gap: 4px;
|
|
961
971
|
cursor: pointer;
|
|
962
|
-
color: ${
|
|
972
|
+
color: ${qi.colorOnSurface};
|
|
963
973
|
}
|
|
964
974
|
|
|
965
975
|
.ft-filter-level--go-back:focus {
|
|
@@ -988,7 +998,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
988
998
|
}
|
|
989
999
|
|
|
990
1000
|
ft-button {
|
|
991
|
-
${bt(
|
|
1001
|
+
${bt(Ci.color,qi.colorOnSurface)};
|
|
992
1002
|
}
|
|
993
1003
|
|
|
994
1004
|
ft-radio, ft-checkbox {
|
|
@@ -999,7 +1009,12 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
999
1009
|
margin-left: -10px;
|
|
1000
1010
|
word-break: break-word;
|
|
1001
1011
|
}
|
|
1002
|
-
|
|
1012
|
+
|
|
1013
|
+
.ft-filter-level--no-values {
|
|
1014
|
+
margin: 10px 0;
|
|
1015
|
+
color: ${qi.colorOnSurfaceMedium};
|
|
1016
|
+
}
|
|
1017
|
+
`],Vi([o({type:String})],Ji.prototype,"id",void 0),Vi([o({type:Object})],Ji.prototype,"parent",void 0),Vi([o({type:Array})],Ji.prototype,"options",void 0),Vi([o({type:Boolean})],Ji.prototype,"multivalued",void 0),Vi([o({type:Boolean})],Ji.prototype,"disabled",void 0),Vi([o({type:Boolean})],Ji.prototype,"hideSelectedOptions",void 0),Vi([o({type:Boolean})],Ji.prototype,"preventNavigation",void 0),Vi([o({type:String})],Ji.prototype,"filter",void 0),Vi([o({type:String})],Ji.prototype,"moreValuesButtonLabel",void 0),Vi([o({type:String})],Ji.prototype,"noValuesLabel",void 0),Vi([o({type:Number})],Ji.prototype,"displayedValuesLimit",void 0),Vi([r(".ft-filter-level--container")],Ji.prototype,"container",void 0),Vi([s()],Ji.prototype,"displayedPages",void 0);var Xi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Yi={buttonsColor:ut.extend("--ft-snap-scroll-buttons-color",vt.colorPrimary),buttonsZIndex:ut.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ut.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ut.external(vt.colorSurface,"Design system")};class Qi extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Gi extends xt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=jt({"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":St}),e=this.controls&&this.withScroll;return W`
|
|
1003
1018
|
<div part="container" class="${t}">
|
|
1004
1019
|
<ft-button
|
|
1005
1020
|
class="ft-snap-scroll--previous"
|
|
@@ -1023,7 +1038,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1023
1038
|
@click=${this.next}
|
|
1024
1039
|
></ft-button>
|
|
1025
1040
|
</div>
|
|
1026
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1041
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new Qi(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}Gi.elementDefinitions={"ft-button":Mi},Gi.styles=g`
|
|
1027
1042
|
.ft-snap-scroll {
|
|
1028
1043
|
box-sizing: border-box;
|
|
1029
1044
|
position: relative;
|
|
@@ -1058,7 +1073,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1058
1073
|
flex-wrap: nowrap;
|
|
1059
1074
|
align-items: flex-start;
|
|
1060
1075
|
justify-content: flex-start;
|
|
1061
|
-
gap: ${
|
|
1076
|
+
gap: ${Yi.gap};
|
|
1062
1077
|
}
|
|
1063
1078
|
|
|
1064
1079
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1101,11 +1116,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1101
1116
|
.ft-snap-scroll--next {
|
|
1102
1117
|
position: absolute;
|
|
1103
1118
|
display: flex;
|
|
1104
|
-
z-index: ${
|
|
1119
|
+
z-index: ${Yi.buttonsZIndex};
|
|
1105
1120
|
opacity: 1;
|
|
1106
1121
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1107
|
-
${bt(
|
|
1108
|
-
${bt(
|
|
1122
|
+
${bt(Ci.backgroundColor,"transparent")};
|
|
1123
|
+
${bt(Ci.color,Yi.buttonsColor)};
|
|
1109
1124
|
}
|
|
1110
1125
|
|
|
1111
1126
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1118,37 +1133,37 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1118
1133
|
top: 0;
|
|
1119
1134
|
left: -1px;
|
|
1120
1135
|
bottom: 0;
|
|
1121
|
-
background: linear-gradient(to right, ${
|
|
1136
|
+
background: linear-gradient(to right, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1122
1137
|
}
|
|
1123
1138
|
|
|
1124
1139
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1125
1140
|
top: -1px;
|
|
1126
1141
|
left: 0;
|
|
1127
1142
|
right: 0;
|
|
1128
|
-
background: linear-gradient(to bottom, ${
|
|
1143
|
+
background: linear-gradient(to bottom, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1129
1144
|
}
|
|
1130
1145
|
|
|
1131
1146
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1132
1147
|
top: 0;
|
|
1133
1148
|
right: -1px;
|
|
1134
1149
|
bottom: 0;
|
|
1135
|
-
background: linear-gradient(to left, ${
|
|
1150
|
+
background: linear-gradient(to left, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1136
1151
|
}
|
|
1137
1152
|
|
|
1138
1153
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1139
1154
|
left: 0;
|
|
1140
1155
|
right: 0;
|
|
1141
1156
|
bottom: -1px;
|
|
1142
|
-
background: linear-gradient(to top, ${
|
|
1157
|
+
background: linear-gradient(to top, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1143
1158
|
}
|
|
1144
1159
|
|
|
1145
1160
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1146
1161
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1147
1162
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1148
1163
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1149
|
-
background-color: ${
|
|
1164
|
+
background-color: ${Yi.colorSurface};
|
|
1150
1165
|
}
|
|
1151
|
-
`,
|
|
1166
|
+
`,Xi([o({type:Boolean})],Gi.prototype,"horizontal",void 0),Xi([o({type:Boolean})],Gi.prototype,"hideScrollbar",void 0),Xi([o({type:Boolean})],Gi.prototype,"controls",void 0),Xi([o({type:Boolean})],Gi.prototype,"limitSize",void 0),Xi([s()],Gi.prototype,"elements",void 0),Xi([s()],Gi.prototype,"currentElement",void 0),Xi([s()],Gi.prototype,"withScroll",void 0),Xi([s()],Gi.prototype,"startReached",void 0),Xi([s()],Gi.prototype,"endReached",void 0),Xi([r(".ft-snap-scroll--content")],Gi.prototype,"contentSlot",void 0),h("ft-snap-scroll")(Gi);var to=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const eo=ut.external(vt.colorOutline,"Design system"),io=ut.external(vt.colorOnSurface,"Design system"),oo=ut.external(vt.colorOnSurfaceMedium,"Design system"),so=ut.external(vt.colorPrimary,"Design system"),no=ut.external(vt.colorSurface,"Design system"),ro=ut.external(vt.transitionDuration,"Design system"),lo=ut.external(vt.transitionTimingFunction,"Design system");class ao extends CustomEvent{constructor(t){super("change",{detail:t})}}class co extends xt{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.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return Je(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return W`
|
|
1152
1167
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1153
1168
|
part="container">
|
|
1154
1169
|
${this.label||i?W`
|
|
@@ -1187,7 +1202,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1187
1202
|
preventNavigation
|
|
1188
1203
|
.options=${e}
|
|
1189
1204
|
@change=${this.onChange}
|
|
1190
|
-
part="selected-values"
|
|
1205
|
+
part="values selected-values"
|
|
1206
|
+
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1191
1207
|
></ft-filter-level>
|
|
1192
1208
|
<div class="ft-filter--separator">
|
|
1193
1209
|
`:null}
|
|
@@ -1212,9 +1228,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1212
1228
|
@change=${this.onChange}
|
|
1213
1229
|
@go-back=${this.goBack}
|
|
1214
1230
|
@display-level=${this.onDisplayLevel}
|
|
1215
|
-
part="values"
|
|
1231
|
+
part="values available-values"
|
|
1232
|
+
.exportpartsPrefixes=${["values","available-values"]}
|
|
1233
|
+
noValuesLabel="${this.noValuesLabel}"
|
|
1216
1234
|
></ft-filter-level>
|
|
1217
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new
|
|
1235
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new ao(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}co.elementDefinitions={"ft-button":Mi,"ft-filter-level":Ji,"ft-snap-scroll":Gi,"ft-typography":qe},co.styles=[Ze,g`
|
|
1218
1236
|
:host {
|
|
1219
1237
|
display: flex;
|
|
1220
1238
|
max-height: 100%;
|
|
@@ -1227,8 +1245,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1227
1245
|
flex-direction: column;
|
|
1228
1246
|
max-height: 100%;
|
|
1229
1247
|
max-width: 100%;
|
|
1230
|
-
color: ${
|
|
1231
|
-
background: ${
|
|
1248
|
+
color: ${io};
|
|
1249
|
+
background: ${no};
|
|
1232
1250
|
}
|
|
1233
1251
|
|
|
1234
1252
|
.ft-filter--header {
|
|
@@ -1238,13 +1256,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1238
1256
|
flex-shrink: 0;
|
|
1239
1257
|
padding: 0 10px;
|
|
1240
1258
|
margin-bottom: 8px;
|
|
1241
|
-
${bt(
|
|
1259
|
+
${bt(Yt.fontSize,"14px")};
|
|
1242
1260
|
}
|
|
1243
1261
|
|
|
1244
1262
|
.ft-filter--header ft-button {
|
|
1245
1263
|
flex-shrink: 0;
|
|
1246
1264
|
margin-left: auto;
|
|
1247
|
-
${bt(
|
|
1265
|
+
${bt(Ci.iconSize,"18px")};
|
|
1248
1266
|
}
|
|
1249
1267
|
|
|
1250
1268
|
.ft-filter--label {
|
|
@@ -1252,8 +1270,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1252
1270
|
flex-shrink: 1;
|
|
1253
1271
|
flex-grow: 1;
|
|
1254
1272
|
word-break: break-word;
|
|
1255
|
-
${bt(
|
|
1256
|
-
${bt(
|
|
1273
|
+
${bt(Yt.lineHeight,"22px")};
|
|
1274
|
+
${bt(Yt.fontWeight,"bold")};
|
|
1257
1275
|
}
|
|
1258
1276
|
|
|
1259
1277
|
.ft-filter--filter {
|
|
@@ -1264,8 +1282,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1264
1282
|
padding: 0 10px;
|
|
1265
1283
|
overflow: hidden;
|
|
1266
1284
|
height: 32px;
|
|
1267
|
-
transition: height ${
|
|
1268
|
-
margin ${
|
|
1285
|
+
transition: height ${ro} ${lo},
|
|
1286
|
+
margin ${ro} ${lo};
|
|
1269
1287
|
transition-delay: 500ms;
|
|
1270
1288
|
}
|
|
1271
1289
|
|
|
@@ -1278,11 +1296,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1278
1296
|
display: block;
|
|
1279
1297
|
width: 100%;
|
|
1280
1298
|
border-radius: 4px;
|
|
1281
|
-
border: 1px solid ${
|
|
1299
|
+
border: 1px solid ${eo};
|
|
1282
1300
|
padding: 4px;
|
|
1283
|
-
background-color: ${
|
|
1284
|
-
color: ${
|
|
1285
|
-
outline-color: ${
|
|
1301
|
+
background-color: ${no};
|
|
1302
|
+
color: ${oo};
|
|
1303
|
+
outline-color: ${so};
|
|
1286
1304
|
}
|
|
1287
1305
|
|
|
1288
1306
|
.ft-filter--values {
|
|
@@ -1294,7 +1312,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1294
1312
|
}
|
|
1295
1313
|
|
|
1296
1314
|
.ft-filter--separator {
|
|
1297
|
-
border-top: 1px solid ${
|
|
1315
|
+
border-top: 1px solid ${eo};
|
|
1298
1316
|
margin: 4px 10px;
|
|
1299
1317
|
}
|
|
1300
1318
|
|
|
@@ -1319,17 +1337,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1319
1337
|
slot {
|
|
1320
1338
|
display: none;
|
|
1321
1339
|
}
|
|
1322
|
-
`],
|
|
1340
|
+
`],to([o({type:String})],co.prototype,"id",void 0),to([o({type:String})],co.prototype,"label",void 0),to([o({type:String})],co.prototype,"filterPlaceHolder",void 0),to([o({type:String})],co.prototype,"clearButtonLabel",void 0),to([o({type:String})],co.prototype,"moreValuesButtonLabel",void 0),to([o({type:String})],co.prototype,"noValuesLabel",void 0),to([p([])],co.prototype,"options",void 0),to([o({type:Boolean})],co.prototype,"multivalued",void 0),to([o({type:Boolean})],co.prototype,"disabled",void 0),to([o({type:Boolean})],co.prototype,"raiseSelectedOptions",void 0),to([o({type:Number})],co.prototype,"displayedValuesLimit",void 0),to([r(".ft-filter--slot")],co.prototype,"slotElement",void 0),to([r(".ft-filter--container")],co.prototype,"container",void 0),to([r(".ft-filter--values")],co.prototype,"valuesContainer",void 0),to([r(".ft-filter--levels")],co.prototype,"levelsContainer",void 0),to([r(".ft-filter--levels ft-filter-level:last-child")],co.prototype,"lastLevel",void 0),to([r(".ft-filter--filter input")],co.prototype,"filterInput",void 0),to([function(t){return n({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],co.prototype,"levels",void 0),to([s()],co.prototype,"withScroll",void 0),to([s()],co.prototype,"filter",void 0),to([s()],co.prototype,"slideIn",void 0),to([s()],co.prototype,"slideOut",void 0);var ho=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class po extends xt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return W`
|
|
1323
1341
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1324
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1342
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}po.elementDefinitions={},ho([o({type:String})],po.prototype,"label",void 0),ho([o({type:Object,converter:t=>t})],po.prototype,"value",void 0),ho([o({type:Boolean,reflect:!0})],po.prototype,"selected",void 0),ho([o({type:Object})],po.prototype,"subOptions",void 0),ho([r(".ft-filter-option--slot")],po.prototype,"slotElement",void 0),h("ft-filter")(co),h("ft-filter-option")(po);var fo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class uo extends xt{constructor(){super(...arguments),this.multi=!1}render(){return W`
|
|
1325
1343
|
<div class="ft-accordion">
|
|
1326
1344
|
<slot @activated=${this.onChange}></slot>
|
|
1327
1345
|
</div>
|
|
1328
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}
|
|
1346
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}uo.elementDefinitions={},uo.styles=g`
|
|
1329
1347
|
.ft-accordion {
|
|
1330
1348
|
box-sizing: border-box;
|
|
1331
1349
|
}
|
|
1332
|
-
`,
|
|
1350
|
+
`,fo([o({type:Boolean})],uo.prototype,"multi",void 0),fo([r("slot")],uo.prototype,"content",void 0);var bo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const vo=ut.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),go=ut.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),xo=ut.external(vt.colorOutline,"Design system");class yo extends xt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return W`
|
|
1333
1351
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1334
1352
|
<div class="ft-accordion-item--toggle"
|
|
1335
1353
|
part="toggle"
|
|
@@ -1353,7 +1371,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1353
1371
|
</div>
|
|
1354
1372
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1355
1373
|
</div>
|
|
1356
|
-
`}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)}}
|
|
1374
|
+
`}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)}}yo.elementDefinitions={"ft-ripple":ai,"ft-typography":qe,"ft-icon":ki},yo.styles=g`
|
|
1357
1375
|
.ft-accordion-item {
|
|
1358
1376
|
display: flex;
|
|
1359
1377
|
flex-direction: column;
|
|
@@ -1366,8 +1384,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1366
1384
|
display: flex;
|
|
1367
1385
|
align-items: center;
|
|
1368
1386
|
cursor: pointer;
|
|
1369
|
-
padding: ${
|
|
1370
|
-
gap: calc(${
|
|
1387
|
+
padding: ${go} ${vo};
|
|
1388
|
+
gap: calc(${vo} / 2);
|
|
1371
1389
|
outline: none;
|
|
1372
1390
|
}
|
|
1373
1391
|
|
|
@@ -1392,13 +1410,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1392
1410
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1393
1411
|
height: initial;
|
|
1394
1412
|
overflow: visible;
|
|
1395
|
-
padding: ${
|
|
1413
|
+
padding: ${go} ${vo};
|
|
1396
1414
|
}
|
|
1397
1415
|
|
|
1398
1416
|
.ft-accordion-item--separator {
|
|
1399
|
-
border-bottom: 1px solid ${
|
|
1417
|
+
border-bottom: 1px solid ${xo};
|
|
1400
1418
|
}
|
|
1401
|
-
`,
|
|
1419
|
+
`,bo([o({type:String})],yo.prototype,"icon",void 0),bo([o({type:String})],yo.prototype,"label",void 0),bo([o({type:Boolean,reflect:!0})],yo.prototype,"active",void 0),h("ft-accordion")(uo),h("ft-accordion-item")(yo);var mo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const $o=ut.extend("--ft-chip-color",vt.colorOnSurface),wo={backgroundColor:ut.extend("--ft-chip-background-color",vt.colorSurface),color:$o,fontSize:ut.extend("--ft-chip-font-size",ke.fontSize),iconSize:ut.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ut.extend("--ft-chip-ripple-color",$o),horizontalPadding:ut.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ut.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ut.external(vt.colorOutline,"Design system"),opacityDisabled:ut.external(vt.colorOpacityDisabled,"Design system")},ko=ut.extend("--ft-chip-highlighted-color",ut.extend("--ft-chip-color",vt.colorOnPrimary)),So={backgroundColor:ut.extend("--ft-chip-highlighted-background-color",ut.extend("--ft-chip-background-color",vt.colorPrimary)),color:ko,rippleColor:ut.extend("--ft-chip-highlighted-ripple-color",ko)},Oo=ut.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Co=ut.create("--ft-chip-dense-vertical-padding","SIZE","4px");class zo extends CustomEvent{constructor(){super("icon-click")}}class Eo extends xt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}static get styles(){return[yt,g`
|
|
1402
1420
|
:host {
|
|
1403
1421
|
display: inline-block;
|
|
1404
1422
|
max-width: 100%;
|
|
@@ -1415,20 +1433,20 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1415
1433
|
box-sizing: border-box;
|
|
1416
1434
|
pointer-events: auto;
|
|
1417
1435
|
|
|
1418
|
-
--ft-chip-internal-font-size: ${
|
|
1436
|
+
--ft-chip-internal-font-size: ${wo.fontSize};
|
|
1419
1437
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1420
|
-
${bt(
|
|
1421
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1422
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1438
|
+
${bt(wi.size,wo.iconSize)};
|
|
1439
|
+
--ft-chip-internal-vertical-padding: ${wo.verticalPadding};
|
|
1440
|
+
--ft-chip-internal-horizontal-padding: ${wo.horizontalPadding};
|
|
1423
1441
|
--ft-chip-internal-icon-padding: 3px;
|
|
1424
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
1442
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${wo.iconSize});
|
|
1425
1443
|
|
|
1426
|
-
border: 1px solid ${
|
|
1427
|
-
color: ${
|
|
1428
|
-
${bt(
|
|
1444
|
+
border: 1px solid ${wo.colorOutline};
|
|
1445
|
+
color: ${wo.color};
|
|
1446
|
+
${bt(ei.color,wo.rippleColor)};
|
|
1429
1447
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1430
1448
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1431
|
-
background-color: ${
|
|
1449
|
+
background-color: ${wo.backgroundColor};
|
|
1432
1450
|
line-height: var(--ft-chip-internal-content-height);
|
|
1433
1451
|
}
|
|
1434
1452
|
|
|
@@ -1438,8 +1456,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1438
1456
|
|
|
1439
1457
|
.ft-chip--dense {
|
|
1440
1458
|
--ft-chip-internal-icon-padding: 3px;
|
|
1441
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1442
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1459
|
+
--ft-chip-internal-vertical-padding: ${Co};
|
|
1460
|
+
--ft-chip-internal-horizontal-padding: ${Oo};
|
|
1443
1461
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1444
1462
|
}
|
|
1445
1463
|
|
|
@@ -1451,15 +1469,15 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1451
1469
|
cursor: default;
|
|
1452
1470
|
pointer-events: none;
|
|
1453
1471
|
filter: grayscale(1);
|
|
1454
|
-
opacity: ${
|
|
1472
|
+
opacity: ${wo.opacityDisabled};
|
|
1455
1473
|
}
|
|
1456
1474
|
|
|
1457
1475
|
.ft-chip--highlighted {
|
|
1458
1476
|
border: none;
|
|
1459
1477
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1460
|
-
background-color: ${
|
|
1461
|
-
${bt(
|
|
1462
|
-
color: ${
|
|
1478
|
+
background-color: ${So.backgroundColor};
|
|
1479
|
+
${bt(ei.color,So.rippleColor)};
|
|
1480
|
+
color: ${So.color};
|
|
1463
1481
|
}
|
|
1464
1482
|
|
|
1465
1483
|
.ft-chip--clickable {
|
|
@@ -1492,8 +1510,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1492
1510
|
vertical-align: bottom;
|
|
1493
1511
|
display: block;
|
|
1494
1512
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1495
|
-
${bt(
|
|
1496
|
-
${bt(
|
|
1513
|
+
${bt(ke.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1514
|
+
${bt(ke.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1497
1515
|
}
|
|
1498
1516
|
|
|
1499
1517
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1528,8 +1546,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1528
1546
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
1529
1547
|
order: -1;
|
|
1530
1548
|
}
|
|
1531
|
-
`]}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":
|
|
1532
|
-
<div class="${
|
|
1549
|
+
`]}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":St};return W`
|
|
1550
|
+
<div class="${jt(t)}"
|
|
1533
1551
|
aria-label="${this.getLabel()}"
|
|
1534
1552
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1535
1553
|
@keyup=${this.onKeyUp}>
|
|
@@ -1547,8 +1565,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1547
1565
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1548
1566
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1549
1567
|
</div>
|
|
1550
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1551
|
-
<div class="${
|
|
1568
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new zo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new zo))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}Eo.elementDefinitions={"ft-ripple":ai,"ft-typography":qe,"ft-icon":ki},mo([o({type:Boolean})],Eo.prototype,"highlighted",void 0),mo([o({type:Boolean})],Eo.prototype,"removable",void 0),mo([o({type:Boolean})],Eo.prototype,"disabled",void 0),mo([o({type:Boolean})],Eo.prototype,"clickable",void 0),mo([o({type:Boolean})],Eo.prototype,"iconClickable",void 0),mo([o({type:Boolean})],Eo.prototype,"dense",void 0),mo([o({type:Boolean})],Eo.prototype,"multiLine",void 0),mo([o({type:String})],Eo.prototype,"label",void 0),mo([o({type:String})],Eo.prototype,"icon",void 0),mo([o({type:Boolean})],Eo.prototype,"trailingIcon",void 0),mo([r("ft-typography slot")],Eo.prototype,"slottedContent",void 0),h("ft-chip")(Eo);var Bo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Mo={fontSize:ut.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:ut.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:ut.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:ut.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:ut.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:ut.extend("--ft-input-label-border-color",vt.colorOutline),textColor:ut.extend("--ft-input-label-text-color",vt.colorOnSurfaceMedium),disabledTextColor:ut.extend("--ft-input-label-disabled-text-color",vt.colorOnSurfaceDisabled),colorSurface:ut.external(vt.colorSurface,"Design system"),borderRadiusS:ut.external(vt.borderRadiusS,"Design system"),colorError:ut.external(vt.colorError,"Design system")};class No extends xt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return W`
|
|
1569
|
+
<div class="${jt(t)}">
|
|
1552
1570
|
${this.text?W`
|
|
1553
1571
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1554
1572
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -1556,7 +1574,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1556
1574
|
</div>
|
|
1557
1575
|
`:null}
|
|
1558
1576
|
</div>
|
|
1559
|
-
`}}
|
|
1577
|
+
`}}No.elementDefinitions={},No.styles=[Ze,g`
|
|
1560
1578
|
.ft-input-label {
|
|
1561
1579
|
position: absolute;
|
|
1562
1580
|
inset: 0;
|
|
@@ -1564,11 +1582,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1564
1582
|
}
|
|
1565
1583
|
|
|
1566
1584
|
.ft-input-label {
|
|
1567
|
-
border-color: ${
|
|
1585
|
+
border-color: ${Mo.borderColor};
|
|
1568
1586
|
}
|
|
1569
1587
|
|
|
1570
1588
|
.ft-input-label.ft-input-label--in-error {
|
|
1571
|
-
border-color: ${
|
|
1589
|
+
border-color: ${Mo.colorError}
|
|
1572
1590
|
}
|
|
1573
1591
|
|
|
1574
1592
|
.ft-input-label:before,
|
|
@@ -1581,7 +1599,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1581
1599
|
}
|
|
1582
1600
|
|
|
1583
1601
|
.ft-input-label:before {
|
|
1584
|
-
width: ${
|
|
1602
|
+
width: ${Mo.horizontalSpacing};
|
|
1585
1603
|
flex-shrink: 0;
|
|
1586
1604
|
}
|
|
1587
1605
|
|
|
@@ -1597,18 +1615,18 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1597
1615
|
border-bottom-width: 1px;
|
|
1598
1616
|
border-bottom-style: solid;
|
|
1599
1617
|
border-color: inherit;
|
|
1600
|
-
color: ${
|
|
1618
|
+
color: ${Mo.textColor};
|
|
1601
1619
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1602
|
-
${bt(
|
|
1603
|
-
${bt(
|
|
1620
|
+
${bt(Se.fontSize,Mo.fontSize)};
|
|
1621
|
+
${bt(Se.lineHeight,Mo.fontSize)};
|
|
1604
1622
|
}
|
|
1605
1623
|
|
|
1606
1624
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1607
|
-
color: ${
|
|
1625
|
+
color: ${Mo.colorError}
|
|
1608
1626
|
}
|
|
1609
1627
|
|
|
1610
1628
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1611
|
-
color: ${
|
|
1629
|
+
color: ${Mo.disabledTextColor};
|
|
1612
1630
|
}
|
|
1613
1631
|
|
|
1614
1632
|
.ft-input-label--hidden-text {
|
|
@@ -1624,17 +1642,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1624
1642
|
overflow: hidden;
|
|
1625
1643
|
white-space: nowrap;
|
|
1626
1644
|
text-overflow: ellipsis;
|
|
1627
|
-
padding: ${
|
|
1628
|
-
margin: calc(${
|
|
1645
|
+
padding: ${Mo.verticalSpacing} 4px;
|
|
1646
|
+
margin: calc(${Mo.verticalSpacing} * -1) 0;
|
|
1629
1647
|
}
|
|
1630
1648
|
|
|
1631
1649
|
.ft-input-label--raised .ft-input-label--text {
|
|
1632
|
-
${bt(
|
|
1633
|
-
${bt(
|
|
1650
|
+
${bt(Se.fontSize,Mo.raisedFontSize)};
|
|
1651
|
+
${bt(Se.lineHeight,Mo.raisedFontSize)};
|
|
1634
1652
|
}
|
|
1635
1653
|
|
|
1636
1654
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1637
|
-
top: ${
|
|
1655
|
+
top: ${Mo.verticalSpacing};
|
|
1638
1656
|
}
|
|
1639
1657
|
|
|
1640
1658
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1647,28 +1665,28 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1647
1665
|
.ft-input-label--outlined:before {
|
|
1648
1666
|
border-left-width: 1px;
|
|
1649
1667
|
border-left-style: solid;
|
|
1650
|
-
border-radius: ${
|
|
1668
|
+
border-radius: ${Mo.borderRadiusS} 0 0 ${Mo.borderRadiusS};
|
|
1651
1669
|
}
|
|
1652
1670
|
|
|
1653
1671
|
.ft-input-label--outlined:after {
|
|
1654
1672
|
border-right-width: 1px;
|
|
1655
1673
|
border-right-style: solid;
|
|
1656
|
-
border-radius: 0 ${
|
|
1674
|
+
border-radius: 0 ${Mo.borderRadiusS} ${Mo.borderRadiusS} 0;
|
|
1657
1675
|
}
|
|
1658
1676
|
|
|
1659
1677
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1660
1678
|
padding: 2px 4px;
|
|
1661
|
-
z-index: ${
|
|
1662
|
-
background-color: ${
|
|
1663
|
-
border-radius: ${
|
|
1679
|
+
z-index: ${Mo.raisedZIndex};
|
|
1680
|
+
background-color: ${Mo.colorSurface};
|
|
1681
|
+
border-radius: ${Mo.borderRadiusS};
|
|
1664
1682
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1665
1683
|
}
|
|
1666
1684
|
|
|
1667
1685
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1668
1686
|
border-top: none;
|
|
1669
1687
|
}
|
|
1670
|
-
`],
|
|
1671
|
-
<div class="${
|
|
1688
|
+
`],Bo([o({type:String})],No.prototype,"text",void 0),Bo([o({type:Boolean})],No.prototype,"raised",void 0),Bo([o({type:Boolean})],No.prototype,"outlined",void 0),Bo([o({type:Boolean})],No.prototype,"disabled",void 0),Bo([o({type:Boolean})],No.prototype,"error",void 0),h("ft-input-label")(No);var Fo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ro extends xt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return W``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ro.elementDefinitions={},Fo([o({type:String})],Ro.prototype,"label",void 0),Fo([o({type:Object,converter:t=>t})],Ro.prototype,"value",void 0),Fo([o({type:Boolean,reflect:!0})],Ro.prototype,"selected",void 0);const Lo={labelSize:ut.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:ut.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:ut.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:ut.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:ut.extend("--ft-select-selected-option-color",vt.colorOnSurface),helperColor:ut.extend("--ft-select-helper-color",vt.colorOnSurfaceMedium),optionsColor:ut.extend("--ft-select-options-color",vt.colorOnSurface),optionsZIndex:ut.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:ut.external(vt.colorSurface,"Design system"),colorOnSurfaceDisabled:ut.external(vt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ut.external(vt.colorPrimary,"Design system"),borderRadiusS:ut.external(vt.borderRadiusS,"Design system"),elevation02:ut.external(vt.elevation02,"Design system"),colorError:ut.external(vt.colorError,"Design system")};class Do extends xt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,s;let n=this.hasOptionsMenuOpen,r=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":r,"ft-select--options-displayed":n,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return W`
|
|
1689
|
+
<div class="${jt(a)}" part="container">
|
|
1672
1690
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1673
1691
|
<ft-input-label text="${this.label}"
|
|
1674
1692
|
part="label"
|
|
@@ -1695,7 +1713,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1695
1713
|
part="options"
|
|
1696
1714
|
@keydown=${this.onOptionsKeyDown}
|
|
1697
1715
|
innerrole="listbox">
|
|
1698
|
-
${
|
|
1716
|
+
${It(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
1699
1717
|
</div>
|
|
1700
1718
|
</div>
|
|
1701
1719
|
${this.helper?W`
|
|
@@ -1706,7 +1724,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1706
1724
|
@option-change=${this.updateOptionsFromSlot}
|
|
1707
1725
|
></slot>
|
|
1708
1726
|
`}renderOption(t){let e=this.selectedOption===t;return W`
|
|
1709
|
-
<div class="${
|
|
1727
|
+
<div class="${jt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
1710
1728
|
part="option"
|
|
1711
1729
|
tabindex="0"
|
|
1712
1730
|
data-value="${t.value}"
|
|
@@ -1715,7 +1733,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1715
1733
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1716
1734
|
${t.label}
|
|
1717
1735
|
</div>
|
|
1718
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
1736
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Do.elementDefinitions={"ft-input-label":No,"ft-typography":qe,"ft-ripple":ai,"ft-icon":ki},Do.styles=[He,Ze,g`
|
|
1719
1737
|
*:focus {
|
|
1720
1738
|
outline: none;
|
|
1721
1739
|
}
|
|
@@ -1729,7 +1747,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1729
1747
|
.ft-select--main-panel {
|
|
1730
1748
|
position: relative;
|
|
1731
1749
|
display: flex;
|
|
1732
|
-
height: calc(4 * ${
|
|
1750
|
+
height: calc(4 * ${Lo.verticalSpacing} + ${Lo.labelSize} + ${Lo.selectedOptionSize});
|
|
1733
1751
|
}
|
|
1734
1752
|
|
|
1735
1753
|
.ft-select--input-panel {
|
|
@@ -1741,14 +1759,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1741
1759
|
padding-left: 16px;
|
|
1742
1760
|
padding-right: 8px;
|
|
1743
1761
|
gap: 8px;
|
|
1744
|
-
color: ${
|
|
1745
|
-
${bt(
|
|
1762
|
+
color: ${Lo.selectedOptionColor};
|
|
1763
|
+
${bt(ei.color,Lo.selectedOptionColor)};
|
|
1746
1764
|
}
|
|
1747
1765
|
|
|
1748
1766
|
.ft-select--input-panel,
|
|
1749
1767
|
.ft-select--option {
|
|
1750
|
-
${bt(
|
|
1751
|
-
${bt(
|
|
1768
|
+
${bt(ei.opacityContentOnSurfaceHover,"0.08")};
|
|
1769
|
+
${bt(ei.opacityContentOnSurfacePressed,"0.04")};
|
|
1752
1770
|
}
|
|
1753
1771
|
|
|
1754
1772
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -1758,7 +1776,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1758
1776
|
|
|
1759
1777
|
.ft-select--disabled .ft-select--input-panel,
|
|
1760
1778
|
.ft-select--disabled .ft-select--option {
|
|
1761
|
-
color: ${
|
|
1779
|
+
color: ${Lo.colorOnSurfaceDisabled};
|
|
1762
1780
|
}
|
|
1763
1781
|
|
|
1764
1782
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -1767,18 +1785,18 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1767
1785
|
}
|
|
1768
1786
|
|
|
1769
1787
|
ft-input-label {
|
|
1770
|
-
${bt(
|
|
1771
|
-
${bt(
|
|
1772
|
-
${bt(
|
|
1788
|
+
${bt(Mo.fontSize,Lo.selectedOptionSize)};
|
|
1789
|
+
${bt(Mo.raisedFontSize,Lo.labelSize)};
|
|
1790
|
+
${bt(Mo.verticalSpacing,Lo.verticalSpacing)};
|
|
1773
1791
|
}
|
|
1774
1792
|
|
|
1775
1793
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1776
|
-
color: ${
|
|
1794
|
+
color: ${Lo.colorPrimary};
|
|
1777
1795
|
}
|
|
1778
1796
|
|
|
1779
1797
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1780
|
-
${bt(
|
|
1781
|
-
${bt(
|
|
1798
|
+
${bt(Mo.borderColor,Lo.colorPrimary)};
|
|
1799
|
+
${bt(Mo.textColor,Lo.colorPrimary)};
|
|
1782
1800
|
}
|
|
1783
1801
|
|
|
1784
1802
|
.ft-select--selected-option {
|
|
@@ -1788,12 +1806,12 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1788
1806
|
overflow: hidden;
|
|
1789
1807
|
white-space: nowrap;
|
|
1790
1808
|
text-overflow: ellipsis;
|
|
1791
|
-
${bt(
|
|
1792
|
-
${bt(
|
|
1809
|
+
${bt(we.fontSize,Lo.selectedOptionSize)};
|
|
1810
|
+
${bt(we.lineHeight,Lo.selectedOptionSize)};
|
|
1793
1811
|
}
|
|
1794
1812
|
|
|
1795
1813
|
.ft-select--in-error .ft-select--selected-option {
|
|
1796
|
-
color: ${
|
|
1814
|
+
color: ${Lo.colorError};
|
|
1797
1815
|
}
|
|
1798
1816
|
|
|
1799
1817
|
ft-icon {
|
|
@@ -1805,16 +1823,16 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1805
1823
|
}
|
|
1806
1824
|
|
|
1807
1825
|
.ft-select--filled .ft-select--input-panel {
|
|
1808
|
-
border-radius: ${
|
|
1826
|
+
border-radius: ${Lo.borderRadiusS} ${Lo.borderRadiusS} 0 0;
|
|
1809
1827
|
}
|
|
1810
1828
|
|
|
1811
1829
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1812
1830
|
align-self: stretch;
|
|
1813
|
-
padding-top: calc(${
|
|
1831
|
+
padding-top: calc(${Lo.labelSize} + 2 * ${Lo.verticalSpacing});
|
|
1814
1832
|
}
|
|
1815
1833
|
|
|
1816
1834
|
.ft-select--outlined .ft-select--input-panel {
|
|
1817
|
-
border-radius: ${
|
|
1835
|
+
border-radius: ${Lo.borderRadiusS};
|
|
1818
1836
|
}
|
|
1819
1837
|
|
|
1820
1838
|
.ft-select--options {
|
|
@@ -1823,10 +1841,10 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1823
1841
|
top: 100%;
|
|
1824
1842
|
left: 0;
|
|
1825
1843
|
right: 0;
|
|
1826
|
-
color: ${
|
|
1827
|
-
background: ${
|
|
1828
|
-
z-index: ${
|
|
1829
|
-
box-shadow: ${
|
|
1844
|
+
color: ${Lo.optionsColor};
|
|
1845
|
+
background: ${Lo.colorSurface};
|
|
1846
|
+
z-index: ${Lo.optionsZIndex};
|
|
1847
|
+
box-shadow: ${Lo.elevation02};
|
|
1830
1848
|
}
|
|
1831
1849
|
|
|
1832
1850
|
.ft-select--fixed .ft-select--options {
|
|
@@ -1837,7 +1855,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1837
1855
|
|
|
1838
1856
|
.ft-select--options-displayed .ft-select--options {
|
|
1839
1857
|
display: block;
|
|
1840
|
-
max-height: ${
|
|
1858
|
+
max-height: ${Lo.optionsHeight};
|
|
1841
1859
|
overflow-y: auto;
|
|
1842
1860
|
}
|
|
1843
1861
|
|
|
@@ -1851,41 +1869,41 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1851
1869
|
|
|
1852
1870
|
.ft-select--helper-text {
|
|
1853
1871
|
padding: 0 12px 0 16px;
|
|
1854
|
-
color: ${
|
|
1872
|
+
color: ${Lo.helperColor};
|
|
1855
1873
|
}
|
|
1856
1874
|
|
|
1857
1875
|
.ft-select--in-error .ft-select--helper-text {
|
|
1858
|
-
color: ${
|
|
1876
|
+
color: ${Lo.colorError};
|
|
1859
1877
|
}
|
|
1860
|
-
`],
|
|
1861
|
-
`}}
|
|
1878
|
+
`],Fo([o({type:String})],Do.prototype,"label",void 0),Fo([o({type:String})],Do.prototype,"helper",void 0),Fo([o({type:Boolean})],Do.prototype,"outlined",void 0),Fo([o({type:Boolean})],Do.prototype,"disabled",void 0),Fo([o({type:Boolean})],Do.prototype,"error",void 0),Fo([o({type:Boolean})],Do.prototype,"fixedMenuPosition",void 0),Fo([o({type:Array})],Do.prototype,"options",void 0),Fo([s()],Do.prototype,"selectedOption",void 0),Fo([s()],Do.prototype,"optionsDisplayed",void 0),Fo([s()],Do.prototype,"focusOptions",void 0),Fo([r(".ft-select")],Do.prototype,"container",void 0),Fo([r(".ft-select--options")],Do.prototype,"optionsMenu",void 0),Fo([r(".ft-select--input-panel")],Do.prototype,"mainPanel",void 0),Fo([r(".ft-select--option:first-child")],Do.prototype,"firstOption",void 0),Fo([r(".ft-select--option:focus")],Do.prototype,"focusedOption",void 0),Fo([r(".ft-select--option.ft-select--option-selected")],Do.prototype,"selectedOptionElement",void 0),Fo([r(".ft-select--option:last-child")],Do.prototype,"lastOption",void 0),Fo([r("slot")],Do.prototype,"optionsSlot",void 0),h("ft-select")(Do),h("ft-select-option")(Ro);const Io={display:ut.create("--ft-skeleton--display","DISPLAY","block"),width:ut.create("--ft-skeleton--width","SIZE","100%"),height:ut.create("--ft-skeleton--height","SIZE","20px"),backgroundColor:ut.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),glareWidth:ut.create("--ft-skeleton--glare-width","SIZE","200px"),glareColor:ut.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),animationDuration:ut.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),borderRadiusM:ut.external(vt.borderRadiusM,"Design system")};class jo extends xt{render(){return W`
|
|
1879
|
+
`}}jo.elementDefinitions={},jo.styles=g`
|
|
1862
1880
|
:host {
|
|
1863
|
-
width: ${
|
|
1864
|
-
height: ${
|
|
1865
|
-
display: ${
|
|
1881
|
+
width: ${Io.width};
|
|
1882
|
+
height: ${Io.height};
|
|
1883
|
+
display: ${Io.display};
|
|
1866
1884
|
overflow: hidden;
|
|
1867
|
-
border-radius: ${
|
|
1885
|
+
border-radius: ${Io.borderRadiusM};
|
|
1868
1886
|
background: linear-gradient(
|
|
1869
1887
|
90deg,
|
|
1870
1888
|
transparent,
|
|
1871
|
-
${
|
|
1872
|
-
${
|
|
1873
|
-
transparent ${
|
|
1874
|
-
), ${
|
|
1889
|
+
${Io.glareColor} calc(0.45 * ${Io.glareWidth}),
|
|
1890
|
+
${Io.glareColor} calc(0.55 * ${Io.glareWidth}),
|
|
1891
|
+
transparent ${Io.glareWidth}
|
|
1892
|
+
), ${Io.backgroundColor};
|
|
1875
1893
|
background-repeat: repeat-y;
|
|
1876
1894
|
background-size: 100vw 100vh;
|
|
1877
1895
|
background-attachment: fixed;
|
|
1878
|
-
background-position: calc(${
|
|
1879
|
-
animation: shine ${
|
|
1896
|
+
background-position: calc(${Io.glareWidth} * -1) 0;
|
|
1897
|
+
animation: shine ${Io.animationDuration} infinite;
|
|
1880
1898
|
animation-timing-function: linear;
|
|
1881
1899
|
}
|
|
1882
1900
|
|
|
1883
1901
|
@keyframes shine {
|
|
1884
1902
|
to {
|
|
1885
|
-
background-position: calc(100vw + ${
|
|
1903
|
+
background-position: calc(100vw + ${Io.glareWidth}) 0, calc(${Io.glareWidth} * -1) 0;
|
|
1886
1904
|
}
|
|
1887
1905
|
}
|
|
1888
|
-
`,h("ft-skeleton")(
|
|
1906
|
+
`,h("ft-skeleton")(jo);const Uo={height:ut.create("--ft-search-bar-height","SIZE","38px"),borderRadius:ut.extend("--ft-search-bar-border-radius",vt.borderRadiusS),mobileOpenPosition:ut.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:ut.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:ut.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:ut.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:ut.create("--ft-search-bar-mobile-open-right","SIZE","0"),desktopFiltersHeight:ut.create("--ft-search-bar-desktop-filters-height","SIZE","350px"),floatingZIndex:ut.create("--ft-search-bar-floating-components-z-index","NUMBER","3"),colorSurface:ut.external(vt.colorSurface,"Design system"),colorOnSurface:ut.external(vt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(vt.colorOnSurfaceMedium,"Design system"),colorOutline:ut.external(vt.colorOutline,"Design system"),colorPrimary:ut.external(vt.colorPrimary,"Design system"),elevation02:ut.external(vt.elevation02,"Design system"),buttonColor:ut.external(Ci.color,"Button"),buttonRippleColor:ut.external(Ci.rippleColor,"Button")},Po=g`
|
|
1889
1907
|
* {
|
|
1890
1908
|
box-sizing: border-box;
|
|
1891
1909
|
}
|
|
@@ -1894,7 +1912,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1894
1912
|
display: flex;
|
|
1895
1913
|
flex-direction: column;
|
|
1896
1914
|
gap: 8px;
|
|
1897
|
-
color: ${
|
|
1915
|
+
color: ${Uo.colorOnSurface};
|
|
1898
1916
|
outline: none;
|
|
1899
1917
|
}
|
|
1900
1918
|
|
|
@@ -1903,14 +1921,18 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1903
1921
|
}
|
|
1904
1922
|
|
|
1905
1923
|
.ft-search-bar--mobile-menu-open {
|
|
1906
|
-
position: ${
|
|
1907
|
-
top: ${
|
|
1908
|
-
bottom: ${
|
|
1909
|
-
left: ${
|
|
1910
|
-
right: ${
|
|
1911
|
-
z-index: ${
|
|
1924
|
+
position: ${Uo.mobileOpenPosition};
|
|
1925
|
+
top: ${Uo.mobileOpenTop};
|
|
1926
|
+
bottom: ${Uo.mobileOpenBottom};
|
|
1927
|
+
left: ${Uo.mobileOpenLeft};
|
|
1928
|
+
right: ${Uo.mobileOpenRight};
|
|
1929
|
+
z-index: ${Uo.floatingZIndex};
|
|
1912
1930
|
padding: 16px;
|
|
1913
|
-
background: ${
|
|
1931
|
+
background: ${Uo.colorSurface};
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
.ft-search-bar--mobile-menu-open.ft-search-bar--forced-open {
|
|
1935
|
+
position: ${Uo.mobileOpenPosition.get("static")};
|
|
1914
1936
|
}
|
|
1915
1937
|
|
|
1916
1938
|
.ft-search-bar {
|
|
@@ -1918,20 +1940,20 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1918
1940
|
display: flex;
|
|
1919
1941
|
flex-direction: row;
|
|
1920
1942
|
align-items: center;
|
|
1921
|
-
height: ${
|
|
1943
|
+
height: ${Uo.height};
|
|
1922
1944
|
|
|
1923
|
-
background: ${
|
|
1924
|
-
border: 1px solid ${
|
|
1925
|
-
border-radius: ${
|
|
1945
|
+
background: ${Uo.colorSurface};
|
|
1946
|
+
border: 1px solid ${Uo.colorOutline};
|
|
1947
|
+
border-radius: ${Uo.borderRadius};
|
|
1926
1948
|
}
|
|
1927
1949
|
|
|
1928
1950
|
.ft-search-bar--skeleton {
|
|
1929
|
-
${bt(
|
|
1930
|
-
${bt(
|
|
1951
|
+
${bt(Io.height,Uo.height)};
|
|
1952
|
+
${bt(Io.borderRadiusM,Uo.borderRadius)};
|
|
1931
1953
|
}
|
|
1932
1954
|
|
|
1933
1955
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1934
|
-
border-radius: ${
|
|
1956
|
+
border-radius: ${Uo.borderRadius} ${Uo.borderRadius} 0 0;
|
|
1935
1957
|
}
|
|
1936
1958
|
|
|
1937
1959
|
.ft-search-bar--input-container {
|
|
@@ -1949,7 +1971,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1949
1971
|
align-self: stretch;
|
|
1950
1972
|
display: grid;
|
|
1951
1973
|
padding: 0 8px;
|
|
1952
|
-
border-radius: ${
|
|
1974
|
+
border-radius: ${Uo.borderRadius};
|
|
1953
1975
|
}
|
|
1954
1976
|
|
|
1955
1977
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -1958,7 +1980,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1958
1980
|
}
|
|
1959
1981
|
|
|
1960
1982
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1961
|
-
outline: 2px solid ${
|
|
1983
|
+
outline: 2px solid ${Uo.colorPrimary};
|
|
1962
1984
|
}
|
|
1963
1985
|
|
|
1964
1986
|
.ft-search-bar--input {
|
|
@@ -1981,7 +2003,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1981
2003
|
align-items: center;
|
|
1982
2004
|
height: 100%;
|
|
1983
2005
|
|
|
1984
|
-
|
|
2006
|
+
${bt(hi.zIndex,`calc(${Uo.floatingZIndex} + 1)`)};
|
|
1985
2007
|
}
|
|
1986
2008
|
|
|
1987
2009
|
.ft-search-bar > ft-button,
|
|
@@ -1990,8 +2012,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1990
2012
|
}
|
|
1991
2013
|
|
|
1992
2014
|
.ft-search-bar--left-action {
|
|
1993
|
-
${bt(
|
|
1994
|
-
border-right: 1px solid ${
|
|
2015
|
+
${bt(Ci.borderRadius,g`calc(${Uo.borderRadius} - 1px) 0 0 calc(${Uo.borderRadius} - 1px)`)};
|
|
2016
|
+
border-right: 1px solid ${Uo.colorOutline};
|
|
1995
2017
|
height: 100%;
|
|
1996
2018
|
}
|
|
1997
2019
|
|
|
@@ -2000,7 +2022,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2000
2022
|
}
|
|
2001
2023
|
|
|
2002
2024
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
2003
|
-
${bt(
|
|
2025
|
+
${bt(Ci.borderRadius,g`calc(${Uo.borderRadius} - 1px) 0 0 0`)};
|
|
2004
2026
|
}
|
|
2005
2027
|
|
|
2006
2028
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -2010,13 +2032,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2010
2032
|
|
|
2011
2033
|
.ft-search-bar--separator {
|
|
2012
2034
|
height: 20px;
|
|
2013
|
-
border-right: 1px solid ${
|
|
2035
|
+
border-right: 1px solid ${Uo.colorOutline};
|
|
2014
2036
|
}
|
|
2015
2037
|
|
|
2016
2038
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
2017
|
-
${bt(
|
|
2018
|
-
${bt(
|
|
2019
|
-
${bt(
|
|
2039
|
+
${bt(Mo.borderColor,"transparent")};
|
|
2040
|
+
${bt(Mo.borderRadiusS,g`calc(${Uo.borderRadius} - 1px)`)};
|
|
2041
|
+
${bt(Lo.selectedOptionColor,Uo.buttonColor)};
|
|
2020
2042
|
}
|
|
2021
2043
|
|
|
2022
2044
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -2033,27 +2055,35 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2033
2055
|
}
|
|
2034
2056
|
|
|
2035
2057
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
2036
|
-
border-radius: calc(${
|
|
2058
|
+
border-radius: calc(${Uo.borderRadius} - 1px) 0 0 calc(${Uo.borderRadius} - 1px);
|
|
2037
2059
|
}
|
|
2038
2060
|
|
|
2039
|
-
`,
|
|
2040
|
-
.ft-search-bar--
|
|
2061
|
+
`,Ao=g`
|
|
2062
|
+
.ft-search-bar--desktop-menu .ft-search-bar--presets {
|
|
2041
2063
|
margin-right: auto;
|
|
2042
2064
|
}
|
|
2043
2065
|
|
|
2044
|
-
.ft-search-bar--
|
|
2066
|
+
.ft-search-bar--desktop-menu .ft-search-bar--presets {
|
|
2045
2067
|
min-width: 250px;
|
|
2046
|
-
${bt(
|
|
2068
|
+
${bt(Lo.optionsZIndex,"2")};
|
|
2047
2069
|
}
|
|
2048
2070
|
|
|
2049
|
-
.ft-search-bar--
|
|
2071
|
+
.ft-search-bar--desktop-menu {
|
|
2072
|
+
display: flex;
|
|
2050
2073
|
flex-direction: column;
|
|
2051
2074
|
gap: 16px;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
.ft-search-bar + .ft-search-bar--desktop-menu {
|
|
2078
|
+
margin-top: 8px;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
.ft-search-bar--floating-panel {
|
|
2052
2082
|
padding: 16px;
|
|
2053
2083
|
}
|
|
2054
2084
|
|
|
2055
2085
|
.ft-search-bar--floating-panel-open .ft-search-bar--floating-panel {
|
|
2056
|
-
display:
|
|
2086
|
+
display: block;
|
|
2057
2087
|
}
|
|
2058
2088
|
|
|
2059
2089
|
.ft-search-bar--desktop .ft-search-bar--facets-actions {
|
|
@@ -2061,6 +2091,9 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2061
2091
|
align-items: center;
|
|
2062
2092
|
justify-content: flex-end;
|
|
2063
2093
|
gap: 8px;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
.ft-search-bar--floating-panel .ft-search-bar--facets-actions {
|
|
2064
2097
|
padding: 0 10px;
|
|
2065
2098
|
}
|
|
2066
2099
|
|
|
@@ -2082,13 +2115,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2082
2115
|
display: none;
|
|
2083
2116
|
}
|
|
2084
2117
|
|
|
2085
|
-
.ft-search-bar--
|
|
2118
|
+
.ft-search-bar--desktop-menu .ft-search-bar--filters-container {
|
|
2086
2119
|
display: block;
|
|
2087
|
-
height:
|
|
2120
|
+
height: ${Uo.desktopFiltersHeight};
|
|
2088
2121
|
--ft-snap-scroll-gap: 16px;
|
|
2089
2122
|
}
|
|
2090
2123
|
|
|
2091
|
-
.ft-search-bar--
|
|
2124
|
+
.ft-search-bar--desktop-menu ft-filter {
|
|
2092
2125
|
display: flex;
|
|
2093
2126
|
flex-grow: 0;
|
|
2094
2127
|
max-height: 100%;
|
|
@@ -2135,7 +2168,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2135
2168
|
|
|
2136
2169
|
.ft-search-bar--filter-label > :last-child {
|
|
2137
2170
|
flex-shrink: 1;
|
|
2138
|
-
color: ${
|
|
2171
|
+
color: ${Uo.colorOnSurfaceMedium};
|
|
2139
2172
|
}
|
|
2140
2173
|
|
|
2141
2174
|
ft-accordion-item::part(toggle) {
|
|
@@ -2152,10 +2185,10 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2152
2185
|
padding-right: 0;
|
|
2153
2186
|
}
|
|
2154
2187
|
|
|
2155
|
-
.ft-search-bar--
|
|
2188
|
+
.ft-search-bar--desktop-menu .ft-search-bar--launch-search {
|
|
2156
2189
|
margin: 0;
|
|
2157
2190
|
}
|
|
2158
|
-
`,
|
|
2191
|
+
`,To=g`
|
|
2159
2192
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2160
2193
|
flex-shrink: 0;
|
|
2161
2194
|
display: flex;
|
|
@@ -2166,7 +2199,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2166
2199
|
|
|
2167
2200
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2168
2201
|
overflow: hidden;
|
|
2169
|
-
${bt(
|
|
2202
|
+
${bt(Yi.gap,"4px")};
|
|
2170
2203
|
}
|
|
2171
2204
|
|
|
2172
2205
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -2174,8 +2207,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2174
2207
|
}
|
|
2175
2208
|
|
|
2176
2209
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2177
|
-
${bt(
|
|
2178
|
-
${bt(
|
|
2210
|
+
${bt(wo.iconSize,"17px")};
|
|
2211
|
+
${bt(wo.fontSize,"12px")};
|
|
2179
2212
|
}
|
|
2180
2213
|
|
|
2181
2214
|
.ft-search-bar--selected-filters * {
|
|
@@ -2185,7 +2218,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2185
2218
|
.ft-search-bar--selected-filters ft-chip {
|
|
2186
2219
|
flex-grow: 0;
|
|
2187
2220
|
}
|
|
2188
|
-
`,
|
|
2221
|
+
`,_o=g`
|
|
2189
2222
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2190
2223
|
flex-grow: 1;
|
|
2191
2224
|
flex-shrink: 1;
|
|
@@ -2194,7 +2227,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2194
2227
|
}
|
|
2195
2228
|
|
|
2196
2229
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2197
|
-
border-top: 1px solid ${
|
|
2230
|
+
border-top: 1px solid ${Uo.colorOutline};
|
|
2198
2231
|
}
|
|
2199
2232
|
|
|
2200
2233
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2204,15 +2237,15 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2204
2237
|
.ft-search-bar--floating-panel,
|
|
2205
2238
|
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2206
2239
|
position: absolute;
|
|
2207
|
-
z-index:
|
|
2240
|
+
z-index: ${Uo.floatingZIndex};
|
|
2208
2241
|
top: 100%;
|
|
2209
2242
|
left: -1px;
|
|
2210
2243
|
right: -1px;
|
|
2211
2244
|
display: none;
|
|
2212
|
-
background: ${
|
|
2213
|
-
border: 1px solid ${
|
|
2214
|
-
border-radius: 0 0 ${
|
|
2215
|
-
box-shadow: ${
|
|
2245
|
+
background: ${Uo.colorSurface};
|
|
2246
|
+
border: 1px solid ${Uo.colorOutline};
|
|
2247
|
+
border-radius: 0 0 ${Uo.borderRadius} ${Uo.borderRadius};
|
|
2248
|
+
box-shadow: ${Uo.elevation02};
|
|
2216
2249
|
outline: none;
|
|
2217
2250
|
}
|
|
2218
2251
|
|
|
@@ -2227,7 +2260,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2227
2260
|
.ft-search-bar--no-suggestions {
|
|
2228
2261
|
text-align: center;
|
|
2229
2262
|
padding: 8px;
|
|
2230
|
-
color: ${
|
|
2263
|
+
color: ${Uo.colorOnSurface};
|
|
2231
2264
|
}
|
|
2232
2265
|
|
|
2233
2266
|
.ft-search-bar--suggestion {
|
|
@@ -2238,7 +2271,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2238
2271
|
padding: 8px;
|
|
2239
2272
|
gap: 8px;
|
|
2240
2273
|
cursor: pointer;
|
|
2241
|
-
color: ${
|
|
2274
|
+
color: ${Uo.colorOnSurface};
|
|
2242
2275
|
min-height: 52px;
|
|
2243
2276
|
}
|
|
2244
2277
|
|
|
@@ -2255,7 +2288,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2255
2288
|
}
|
|
2256
2289
|
|
|
2257
2290
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2258
|
-
border-top: 1px solid ${
|
|
2291
|
+
border-top: 1px solid ${Uo.colorOutline};
|
|
2259
2292
|
}
|
|
2260
2293
|
|
|
2261
2294
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2263,11 +2296,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2263
2296
|
flex-grow: 1;
|
|
2264
2297
|
flex-shrink: 1;
|
|
2265
2298
|
}
|
|
2266
|
-
`;var
|
|
2299
|
+
`;var Ho=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const Zo={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class Ko extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class Wo extends CustomEvent{constructor(t){super("change",{detail:t})}}const Vo=()=>{};class qo extends xt{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 mt(Zo,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=Ut.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new e(500),this.suggestDebouncer=new e(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}get isMobileMenuOpen(){return this.isMobile&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===Ut.S}}get 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}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return W`
|
|
2267
2300
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2268
2301
|
${this.renderSearchBar()}
|
|
2269
|
-
`}renderSearchBar(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.isMobileMenuOpen};return this.facetsInitialized&&this.availableContentLocalesInitialized?W`
|
|
2270
|
-
<div class="${
|
|
2302
|
+
`}renderSearchBar(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets&&!this.forceMenuOpen,"ft-search-bar--mobile-menu-open":this.isMobileMenuOpen,"ft-search-bar--forced-open":this.forceMenuOpen||this.forceMobileMenuOpen};return this.facetsInitialized&&this.availableContentLocalesInitialized?W`
|
|
2303
|
+
<div class="${jt(t)}" part="container" tabindex="-1">
|
|
2271
2304
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2272
2305
|
</div>
|
|
2273
2306
|
`:W`
|
|
@@ -2335,7 +2368,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2335
2368
|
</div>
|
|
2336
2369
|
<ft-filter
|
|
2337
2370
|
part="filters filter-ft-locale"
|
|
2338
|
-
|
|
2371
|
+
.exportpartsPrefixes=${["filter","filter-ft-locale"]}
|
|
2339
2372
|
class="ft-search-bar--content-locale"
|
|
2340
2373
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2341
2374
|
.options=${this.contentLocalesAsFilterOptions()}
|
|
@@ -2343,21 +2376,22 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2343
2376
|
></ft-filter>
|
|
2344
2377
|
</ft-accordion-item>
|
|
2345
2378
|
`:null}
|
|
2346
|
-
${
|
|
2379
|
+
${It(this.facets,(t=>t.key),(t=>{const e=Qe(t),i=t.key.replace(":","-");return t.rootNodes.length>0?W`
|
|
2347
2380
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2348
2381
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2349
2382
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2350
2383
|
<ft-typography variant="body2">
|
|
2351
|
-
${function(t){return
|
|
2384
|
+
${function(t){return Je(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2352
2385
|
</ft-typography>
|
|
2353
2386
|
</div>
|
|
2354
2387
|
<ft-filter
|
|
2355
|
-
part="filters filter-${i}"
|
|
2356
|
-
|
|
2388
|
+
part="filters filter filter-${i}"
|
|
2389
|
+
.exportpartsPrefixes=${["filter","filter-"+i]}
|
|
2357
2390
|
id="${e.id}"
|
|
2358
2391
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2359
2392
|
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2360
2393
|
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2394
|
+
noValuesLabel="${this.labelResolver.resolve("noFilterValuesAvailable")}"
|
|
2361
2395
|
?multivalued=${e.multivalued}
|
|
2362
2396
|
raiseSelectedOptions
|
|
2363
2397
|
.options=${e.options}
|
|
@@ -2365,7 +2399,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2365
2399
|
@change=${t=>this.setFilter(e.id,t.detail)}
|
|
2366
2400
|
></ft-filter>
|
|
2367
2401
|
</ft-accordion-item>
|
|
2368
|
-
|
|
2402
|
+
`:q}))}
|
|
2369
2403
|
</ft-accordion>
|
|
2370
2404
|
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return W`
|
|
2371
2405
|
<div class="ft-search-bar" part="search-bar">
|
|
@@ -2384,21 +2418,28 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2384
2418
|
${this.renderSuggestions()}
|
|
2385
2419
|
</div>
|
|
2386
2420
|
${this.renderDesktopSearchBarButtons()}
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2421
|
+
${this.forceMenuOpen?q:W`
|
|
2422
|
+
<div class="ft-search-bar--floating-panel" @keyup=${this.onFloatingContainerKeyUp}
|
|
2423
|
+
tabindex="-1">
|
|
2424
|
+
${this.renderDesktopMenu()}
|
|
2425
|
+
</div>`}
|
|
2426
|
+
</div>
|
|
2427
|
+
${this.dense||this.forceMenuOpen?this.forceMenuOpen?this.renderDesktopMenu():q:this.renderSelectedFacets()}
|
|
2428
|
+
`}renderDesktopMenu(){return this.hasFacets?W`
|
|
2429
|
+
<div class="ft-search-bar--desktop-menu">
|
|
2430
|
+
${this.renderFacetsActions()}
|
|
2431
|
+
${this.renderDesktopFacets()}
|
|
2432
|
+
<div class="ft-search-bar--facets-actions">
|
|
2433
|
+
${this.forceMenuOpen?this.renderDesktopClearFilters():q}
|
|
2434
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2435
|
+
part="launch-search-in-panel"
|
|
2436
|
+
icon="search"
|
|
2437
|
+
@click=${this.launchSearch}>
|
|
2438
|
+
${this.labelResolver.resolve("searchButton")}
|
|
2439
|
+
</ft-button>
|
|
2398
2440
|
</div>
|
|
2399
2441
|
</div>
|
|
2400
|
-
|
|
2401
|
-
`}renderSearchBarLeftAction(){return this.hasFacets?W`
|
|
2442
|
+
`:q}renderSearchBarLeftAction(){return this.hasFacets?this.forceMenuOpen?q:W`
|
|
2402
2443
|
<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action"
|
|
2403
2444
|
part="filters-opener"
|
|
2404
2445
|
trailingIcon
|
|
@@ -2412,7 +2453,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2412
2453
|
class="ft-search-bar--content-locale ft-search-bar--left-action"
|
|
2413
2454
|
part="content-locale"
|
|
2414
2455
|
@change=${t=>this.contentLocale=null==t.detail?void 0:t.detail}>
|
|
2415
|
-
${
|
|
2456
|
+
${It(this.availableContentLocales,(t=>t.lang),(t=>W`
|
|
2416
2457
|
<ft-select-option .value=${t.lang}
|
|
2417
2458
|
label="${t.label}"
|
|
2418
2459
|
?selected=${t.lang===this.contentLocale}>
|
|
@@ -2449,7 +2490,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2449
2490
|
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2450
2491
|
outlined
|
|
2451
2492
|
@change=${t=>this.selectedPreset=t.detail}>
|
|
2452
|
-
${
|
|
2493
|
+
${It(null!==(t=this.presets)&&void 0!==t?t:[],(t=>t.name),(t=>W`
|
|
2453
2494
|
<ft-select-option value="${t.name}"
|
|
2454
2495
|
label="${t.name}"
|
|
2455
2496
|
?selected=${t.name===this.selectedPreset}>
|
|
@@ -2457,39 +2498,40 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2457
2498
|
`))}
|
|
2458
2499
|
</ft-select>
|
|
2459
2500
|
`:q}
|
|
2460
|
-
${this.searchFilters.length>0?W`
|
|
2461
|
-
<ft-button part="facets-actions"
|
|
2462
|
-
@click=${this.clearFilters}>
|
|
2463
|
-
${this.labelResolver.resolve("clearFilters")}
|
|
2464
|
-
</ft-button>
|
|
2465
|
-
`:q}
|
|
2466
2501
|
<slot name="facets-actions"></slot>
|
|
2502
|
+
${this.forceMenuOpen&&!this.isMobile?q:this.renderDesktopClearFilters()}
|
|
2467
2503
|
</div>
|
|
2468
|
-
`}
|
|
2504
|
+
`}renderDesktopClearFilters(){return this.searchFilters.length>0?W`
|
|
2505
|
+
<ft-button part="facets-actions"
|
|
2506
|
+
@click=${this.clearFilters}>
|
|
2507
|
+
${this.labelResolver.resolve("clearFilters")}
|
|
2508
|
+
</ft-button>
|
|
2509
|
+
`:q}renderDesktopFacets(){return this.hasFacets?W`
|
|
2469
2510
|
<ft-snap-scroll horizontal limitSize controls
|
|
2470
2511
|
class="ft-search-bar--filters-container"
|
|
2471
2512
|
part="filters-container"
|
|
2472
|
-
|
|
2513
|
+
exportpartsPrefix="filters-container">
|
|
2473
2514
|
${this.hasLocaleSelector?W`
|
|
2474
2515
|
<ft-filter class="ft-search-bar--content-locale"
|
|
2475
2516
|
part="filters filter-ft-locale"
|
|
2476
|
-
|
|
2517
|
+
.exportpartsPrefixes=${["filter","filter-ft-locale"]}
|
|
2477
2518
|
label="${this.labelResolver.resolve("contentLocaleSelector")}"
|
|
2478
2519
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2479
2520
|
.options=${this.contentLocalesAsFilterOptions()}
|
|
2480
2521
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2481
2522
|
></ft-filter>
|
|
2482
2523
|
`:q}
|
|
2483
|
-
${
|
|
2524
|
+
${It(this.facets,(t=>t.key),(t=>{const e=Qe(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0})),o=t.key.replace(":","-");return W`
|
|
2484
2525
|
<ft-filter
|
|
2485
2526
|
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2486
|
-
part="filters filter-${o}"
|
|
2487
|
-
|
|
2527
|
+
part="filters filter filter-${o}"
|
|
2528
|
+
.exportpartsPrefixes=${["filter","filter-"+o]}
|
|
2488
2529
|
id="${e.id}"
|
|
2489
2530
|
label="${e.label}"
|
|
2490
2531
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2491
2532
|
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2492
2533
|
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2534
|
+
noValuesLabel="${this.labelResolver.resolve("noFilterValuesAvailable")}"
|
|
2493
2535
|
?multivalued=${e.multivalued}
|
|
2494
2536
|
raiseSelectedOptions
|
|
2495
2537
|
.options=${e.options}
|
|
@@ -2500,16 +2542,16 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2500
2542
|
</ft-snap-scroll>
|
|
2501
2543
|
`:q}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.isMobileMenuOpen,e=W`
|
|
2502
2544
|
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?W`
|
|
2503
|
-
<ft-chip part="selected-filters"
|
|
2545
|
+
<ft-chip part="selected-filters selected-filter-ft-locale"
|
|
2504
2546
|
?dense=${this.dense&&!this.isMobile}
|
|
2505
2547
|
?clickable=${this.isMobile}
|
|
2506
2548
|
@click=${()=>this.openMobileFilters("ft:contentLocale")}>
|
|
2507
2549
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2508
2550
|
</ft-chip>
|
|
2509
2551
|
`:null}
|
|
2510
|
-
${
|
|
2552
|
+
${It(this.facets,(t=>t.key),(e=>{const i=function(t){return Je(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return It(i,(o=>{let s=e.label+": "+function(t){return Xe(t).split("|").join(" > ")}(o);const n=e.key.replace(":","-"),r=W`
|
|
2511
2553
|
<ft-chip
|
|
2512
|
-
part="selected-filters"
|
|
2554
|
+
part="selected-filters selected-filter-${n}"
|
|
2513
2555
|
?dense=${this.dense&&!this.isMobile}
|
|
2514
2556
|
?clickable=${this.isMobile}
|
|
2515
2557
|
?removable=${!this.isMobile}
|
|
@@ -2518,15 +2560,15 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2518
2560
|
title=${t?s:q}
|
|
2519
2561
|
@click=${()=>this.openMobileFilters(e.key)}
|
|
2520
2562
|
@icon-click=${()=>this.setFilter(e.key,i.filter((t=>t!==o)))}>
|
|
2521
|
-
${function(t){return
|
|
2563
|
+
${function(t){return Xe(t).split("|").pop()}(o)}
|
|
2522
2564
|
</ft-chip>
|
|
2523
|
-
`;return t?
|
|
2565
|
+
`;return t?r:W`
|
|
2524
2566
|
<ft-tooltip inline text="${s}">
|
|
2525
|
-
${
|
|
2567
|
+
${r}
|
|
2526
2568
|
</ft-tooltip>
|
|
2527
2569
|
`}))}))}
|
|
2528
2570
|
${this.isMobile?W`
|
|
2529
|
-
<ft-chip part="selected-filters"
|
|
2571
|
+
<ft-chip part="selected-filters mobile-filters-opener"
|
|
2530
2572
|
icon="add"
|
|
2531
2573
|
clickable
|
|
2532
2574
|
@click=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!0}}>
|
|
@@ -2537,7 +2579,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2537
2579
|
<ft-snap-scroll horizontal controls hideScrollbar limitSize
|
|
2538
2580
|
class="ft-search-bar--selected-filters"
|
|
2539
2581
|
part="selected-filters-container"
|
|
2540
|
-
|
|
2582
|
+
exportpartsPrefix="selected-filters-container">
|
|
2541
2583
|
${e}
|
|
2542
2584
|
</ft-snap-scroll>
|
|
2543
2585
|
`:W`
|
|
@@ -2547,7 +2589,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2547
2589
|
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return W`
|
|
2548
2590
|
<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2549
2591
|
@keydown=${this.onSuggestKeyDown}>
|
|
2550
|
-
${
|
|
2592
|
+
${It(t.slice(0,5),(t=>t),(t=>W`
|
|
2551
2593
|
<a href="${this.searchRequestSerializer({...this.request,query:t})}"
|
|
2552
2594
|
part="suggestions"
|
|
2553
2595
|
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
@@ -2565,7 +2607,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2565
2607
|
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2566
2608
|
</a>
|
|
2567
2609
|
`))}
|
|
2568
|
-
${
|
|
2610
|
+
${It(this.suggestions,(t=>t.value),(t=>W`
|
|
2569
2611
|
<a href="${this.searchRequestSerializer({...this.request,query:t.value})}"
|
|
2570
2612
|
part="suggestions"
|
|
2571
2613
|
class="ft-search-bar--suggestion"
|
|
@@ -2583,8 +2625,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2583
2625
|
</ft-typography>
|
|
2584
2626
|
`:null}
|
|
2585
2627
|
</div>
|
|
2586
|
-
`}getIcon(t){const e="DOCUMENT"===t.type?
|
|
2628
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?mi.file_format:mi.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?vi.BOOK:vi.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[r,l]=((null!==(i=yi.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=xi.get(l))&&void 0!==o?o:xi.get(e))&&void 0!==s?s:xi.get(r))&&void 0!==n?n:gi.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=vi.TOPICS}return W`
|
|
2587
2629
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2588
2630
|
${i}
|
|
2589
2631
|
</ft-icon>
|
|
2590
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){super.firstUpdated(t),this.initApi()}update(t){var e,i,o,s,n,r;if(t.has("labels")&&(this.labelResolver=new
|
|
2632
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){super.firstUpdated(t),this.initApi()}update(t){var e,i,o,s,n,r;if(t.has("labels")&&(this.labelResolver=new mt(Zo,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("presets")&&(null!==(o=this.presets)&&void 0!==o?o:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>Xe(t))))))),t.has("selectedPreset")){const t=(null!==(s=this.presets)&&void 0!==s?s:[]).find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}t.has("contentLocale")&&null!=this.contentLocale&&(this.knownFacetLabels=new Map),["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(r=(null!==(n=this.presets)&&void 0!==n?n:[]).find((t=>this.compareRequests(t,this.request))))||void 0===r?void 0:r.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi(),this.availableContentLocalesInitialized=!1,this.facetsInitialized=!1),t.has("api")&&this.updateAvailableContentLocales(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Wo(this.request))}async updateAvailableContentLocales(){this.api&&(this.availableContentLocales=await this.api.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[])),this.availableContentLocalesInitialized=!0)}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout((()=>this.initApi()),100))}updateFacets(){this.api&&(this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t;const e=new Map;await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets.forEach((t=>{this.knownFacetLabels.set(t.key,t.label),e.set(t.key,t)})))).catch(Vo)),this.facets=[];for(let t of this.facetsRequest)e.has(t.id)?this.facets.push(e.get(t.id)):this.knownFacetLabels.has(t.id)&&this.facets.push({key:t.id,label:this.knownFacetLabels.get(t.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1});this.facetsLoaded=!0,this.facetsInitialized=!0}))):(this.facets=[],this.facetsInitialized=!0))}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new Ko(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Je(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>Je(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}}qo.elementDefinitions={"ft-accordion":uo,"ft-accordion-item":yo,"ft-button":Mi,"ft-chip":Eo,"ft-filter":co,"ft-filter-option":po,"ft-icon":ki,"ft-ripple":ai,"ft-select":Do,"ft-select-option":Ro,"ft-size-watcher":Tt,"ft-skeleton":jo,"ft-snap-scroll":Gi,"ft-tooltip":pi,"ft-typography":qe},qo.styles=[He,Po,Ao,To,_o],Ho([o({type:Boolean})],qo.prototype,"dense",void 0),Ho([o()],qo.prototype,"mode",void 0),Ho([o({type:Boolean})],qo.prototype,"forceMobileMenuOpen",void 0),Ho([o({type:Boolean})],qo.prototype,"forceMenuOpen",void 0),Ho([o()],qo.prototype,"baseUrl",void 0),Ho([o()],qo.prototype,"apiIntegrationIdentifier",void 0),Ho([o()],qo.prototype,"contentLocale",void 0),Ho([s()],qo.prototype,"availableContentLocales",void 0),Ho([s()],qo.prototype,"availableContentLocalesInitialized",void 0),Ho([o()],qo.prototype,"uiLocale",void 0),Ho([p({})],qo.prototype,"labels",void 0),Ho([p([])],qo.prototype,"displayedFilters",void 0),Ho([p([])],qo.prototype,"presets",void 0),Ho([o({type:String,reflect:!0})],qo.prototype,"selectedPreset",void 0),Ho([p([])],qo.prototype,"priors",void 0),Ho([o()],qo.prototype,"searchRequestSerializer",void 0),Ho([s()],qo.prototype,"searchFilters",void 0),Ho([s()],qo.prototype,"sizeCategory",void 0),Ho([s()],qo.prototype,"displayFacets",void 0),Ho([s()],qo.prototype,"mobileMenuOpen",void 0),Ho([s()],qo.prototype,"facets",void 0),Ho([s()],qo.prototype,"facetsInitialized",void 0),Ho([r(".ft-search-bar--container")],qo.prototype,"container",void 0),Ho([r(".ft-search-bar--filters-opener")],qo.prototype,"filtersOpener",void 0),Ho([r(".ft-search-bar--floating-panel")],qo.prototype,"floatingContainer",void 0),Ho([r("ft-snap-scroll.ft-search-bar--filters-container")],qo.prototype,"scrollingFiltersContainer",void 0),Ho([r(".ft-search-bar--input")],qo.prototype,"input",void 0),Ho([s()],qo.prototype,"query",void 0),Ho([s()],qo.prototype,"suggestions",void 0),Ho([s()],qo.prototype,"suggestionsLoaded",void 0),Ho([s()],qo.prototype,"recentSearches",void 0),Ho([s()],qo.prototype,"scrollToFacet",void 0),Ho([r(".ft-search-bar--suggestion:first-child")],qo.prototype,"firstSuggestion",void 0),Ho([r(".ft-search-bar--suggestion:focus-within")],qo.prototype,"focusedSuggestion",void 0),Ho([r(".ft-search-bar--suggestion:last-child")],qo.prototype,"lastSuggestion",void 0),Ho([s()],qo.prototype,"api",void 0),h("ft-search-bar")(qo),t.DEFAULT_LABELS=Zo,t.FtSearchBar=qo,t.FtSearchBarCssVariables=Uo,t.LaunchSearchEvent=Ko,t.SearchStateChangeEvent=Wo,Object.defineProperty(t,"t",{value:!0})}({});
|