@fluid-topics/ft-search-bar 0.2.14 → 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 -1
- package/build/ft-search-bar.inline-styles.js +439 -382
- package/build/ft-search-bar.js +104 -49
- package/build/ft-search-bar.light.js +334 -277
- package/build/ft-search-bar.min.js +438 -381
- 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,27 +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===
|
|
481
|
-
:host
|
|
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
|
+
:host {
|
|
482
482
|
display: inline-block;
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
}
|
|
484
|
+
:host, i.ft-icon {
|
|
485
|
+
width: ${wi.size};
|
|
486
|
+
height: ${wi.size};
|
|
485
487
|
text-align: center;
|
|
486
488
|
}
|
|
487
489
|
|
|
488
490
|
i.ft-icon {
|
|
489
|
-
font-size: ${
|
|
491
|
+
font-size: ${wi.size};
|
|
490
492
|
line-height: 1;
|
|
491
493
|
font-weight: normal;
|
|
492
494
|
text-transform: none;
|
|
@@ -500,17 +502,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
500
502
|
}
|
|
501
503
|
|
|
502
504
|
.ft-icon--fluid-topics {
|
|
503
|
-
font-family: ${
|
|
505
|
+
font-family: ${wi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
504
506
|
}
|
|
505
507
|
|
|
506
508
|
.ft-icon--file-format {
|
|
507
|
-
font-family: ${
|
|
509
|
+
font-family: ${wi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
508
510
|
}
|
|
509
511
|
|
|
510
512
|
.ft-icon--material {
|
|
511
|
-
font-family: ${
|
|
513
|
+
font-family: ${wi.materialFontFamily}, "Material Icons", sans-serif;
|
|
512
514
|
}
|
|
513
|
-
|
|
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`
|
|
514
516
|
:host {
|
|
515
517
|
display: inline-block;
|
|
516
518
|
max-width: 100%;
|
|
@@ -549,19 +551,20 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
549
551
|
box-sizing: border-box;
|
|
550
552
|
border: none;
|
|
551
553
|
pointer-events: auto;
|
|
554
|
+
line-height: 0;
|
|
552
555
|
|
|
553
|
-
--ft-button-internal-font-size: ${
|
|
556
|
+
--ft-button-internal-font-size: ${Ci.fontSize};
|
|
554
557
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
555
|
-
--ft-button-internal-color: ${
|
|
556
|
-
${bt(
|
|
558
|
+
--ft-button-internal-color: ${Ci.color};
|
|
559
|
+
${bt(wi.size,Ci.iconSize)};
|
|
557
560
|
--ft-button-internal-vertical-padding: 6px;
|
|
558
561
|
--ft-button-internal-horizontal-padding: 8px;
|
|
559
|
-
${bt(
|
|
560
|
-
--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});
|
|
561
564
|
|
|
562
|
-
border-radius: ${
|
|
565
|
+
border-radius: ${Ci.borderRadius};
|
|
563
566
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
564
|
-
background-color: ${
|
|
567
|
+
background-color: ${Ci.backgroundColor};
|
|
565
568
|
color: var(--ft-button-internal-color);
|
|
566
569
|
-webkit-mask-image: radial-gradient(white, black);
|
|
567
570
|
}
|
|
@@ -573,7 +576,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
573
576
|
.ft-button--dense {
|
|
574
577
|
--ft-button-internal-vertical-padding: 2px;
|
|
575
578
|
--ft-button-internal-horizontal-padding: 4px;
|
|
576
|
-
border-radius: ${
|
|
579
|
+
border-radius: ${Bi};
|
|
577
580
|
}
|
|
578
581
|
|
|
579
582
|
.ft-button--round {
|
|
@@ -582,13 +585,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
582
585
|
|
|
583
586
|
.ft-button[disabled] {
|
|
584
587
|
filter: grayscale(1);
|
|
585
|
-
opacity: ${
|
|
588
|
+
opacity: ${Ci.opacityDisabled};
|
|
586
589
|
}
|
|
587
590
|
|
|
588
591
|
.ft-button.ft-button--primary {
|
|
589
|
-
background-color: ${
|
|
590
|
-
--ft-button-internal-color: ${
|
|
591
|
-
${bt(
|
|
592
|
+
background-color: ${Ei.backgroundColor};
|
|
593
|
+
--ft-button-internal-color: ${Ei.color};
|
|
594
|
+
${bt(ei.color,Ei.rippleColor)};
|
|
592
595
|
}
|
|
593
596
|
|
|
594
597
|
.ft-button.ft-button--outlined {
|
|
@@ -607,8 +610,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
607
610
|
text-overflow: ellipsis;
|
|
608
611
|
display: block;
|
|
609
612
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
610
|
-
${bt(
|
|
611
|
-
${bt(
|
|
613
|
+
${bt(je.fontSize,"var(--ft-button-internal-font-size)")};
|
|
614
|
+
${bt(je.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
612
615
|
}
|
|
613
616
|
|
|
614
617
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -641,12 +644,12 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
641
644
|
}
|
|
642
645
|
|
|
643
646
|
ft-loader {
|
|
644
|
-
${bt(
|
|
645
|
-
${bt(
|
|
647
|
+
${bt(di.size,Ci.iconSize)};
|
|
648
|
+
${bt(di.color,"var(--ft-button-internal-color)")};
|
|
646
649
|
}
|
|
647
|
-
`]}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`
|
|
648
651
|
<button part="button"
|
|
649
|
-
class="${
|
|
652
|
+
class="${jt(t)}"
|
|
650
653
|
aria-label="${this.getLabel()}"
|
|
651
654
|
?disabled=${this.isDisabled()}>
|
|
652
655
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -666,8 +669,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
666
669
|
</ft-tooltip>
|
|
667
670
|
`}resolveIcon(){return this.loading?W`
|
|
668
671
|
<ft-loader></ft-loader> `:this.icon?W`
|
|
669
|
-
<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}}
|
|
670
|
-
<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)}">
|
|
671
674
|
<div class="ft-checkbox--box-container">
|
|
672
675
|
<input type="checkbox"
|
|
673
676
|
name=${this.name}
|
|
@@ -691,14 +694,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
691
694
|
<slot></slot>
|
|
692
695
|
</ft-typography>
|
|
693
696
|
</label>
|
|
694
|
-
`}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`
|
|
695
698
|
* {
|
|
696
699
|
box-sizing: border-box;
|
|
697
700
|
}
|
|
698
701
|
|
|
699
702
|
.ft-checkbox {
|
|
700
703
|
box-sizing: border-box;
|
|
701
|
-
color: ${
|
|
704
|
+
color: ${Fi};
|
|
702
705
|
|
|
703
706
|
display: inline-flex;
|
|
704
707
|
align-items: center;
|
|
@@ -706,7 +709,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
706
709
|
}
|
|
707
710
|
|
|
708
711
|
.ft-checkbox--disabled {
|
|
709
|
-
color: ${
|
|
712
|
+
color: ${Ii};
|
|
710
713
|
}
|
|
711
714
|
|
|
712
715
|
input {
|
|
@@ -730,26 +733,26 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
730
733
|
|
|
731
734
|
.ft-checkbox--box {
|
|
732
735
|
display: flex;
|
|
733
|
-
border: 2px solid ${
|
|
736
|
+
border: 2px solid ${Di};
|
|
734
737
|
border-radius: 2px;
|
|
735
738
|
|
|
736
739
|
width: 18px;
|
|
737
740
|
height: 18px;
|
|
738
741
|
|
|
739
|
-
color: ${
|
|
742
|
+
color: ${Li};
|
|
740
743
|
}
|
|
741
744
|
|
|
742
745
|
|
|
743
746
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
744
747
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
745
|
-
border-color: ${
|
|
746
|
-
background-color: ${
|
|
748
|
+
border-color: ${Ri};
|
|
749
|
+
background-color: ${Ri};
|
|
747
750
|
}
|
|
748
751
|
|
|
749
752
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
750
|
-
border-color: ${
|
|
753
|
+
border-color: ${Ii};
|
|
751
754
|
background-color: transparent;
|
|
752
|
-
color: ${
|
|
755
|
+
color: ${Ii};
|
|
753
756
|
}
|
|
754
757
|
|
|
755
758
|
.ft-checkbox--checkmark {
|
|
@@ -768,8 +771,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
768
771
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
769
772
|
opacity: 1;
|
|
770
773
|
}
|
|
771
|
-
`,
|
|
772
|
-
<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)}">
|
|
773
776
|
<div class="ft-radio--box-container">
|
|
774
777
|
<input id="radio-button"
|
|
775
778
|
type="radio"
|
|
@@ -793,14 +796,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
793
796
|
</ft-typography>
|
|
794
797
|
</label>
|
|
795
798
|
</div>
|
|
796
|
-
`}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`
|
|
797
800
|
* {
|
|
798
801
|
box-sizing: border-box;
|
|
799
802
|
}
|
|
800
803
|
|
|
801
804
|
.ft-radio {
|
|
802
805
|
box-sizing: border-box;
|
|
803
|
-
color: ${
|
|
806
|
+
color: ${Pi};
|
|
804
807
|
|
|
805
808
|
display: inline-flex;
|
|
806
809
|
align-items: center;
|
|
@@ -808,7 +811,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
808
811
|
}
|
|
809
812
|
|
|
810
813
|
.ft-radio--disabled {
|
|
811
|
-
color: ${
|
|
814
|
+
color: ${_i};
|
|
812
815
|
}
|
|
813
816
|
|
|
814
817
|
input {
|
|
@@ -831,7 +834,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
831
834
|
}
|
|
832
835
|
|
|
833
836
|
.ft-radio--box {
|
|
834
|
-
border: 2px solid ${
|
|
837
|
+
border: 2px solid ${Ti};
|
|
835
838
|
border-radius: 50%;
|
|
836
839
|
|
|
837
840
|
display: flex;
|
|
@@ -844,7 +847,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
844
847
|
|
|
845
848
|
.ft-radio--box:after {
|
|
846
849
|
content: " ";
|
|
847
|
-
background-color: ${
|
|
850
|
+
background-color: ${Ai};
|
|
848
851
|
|
|
849
852
|
border-radius: 50%;
|
|
850
853
|
|
|
@@ -856,7 +859,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
856
859
|
}
|
|
857
860
|
|
|
858
861
|
.ft-radio--checked .ft-radio--box {
|
|
859
|
-
border-color: ${
|
|
862
|
+
border-color: ${Ai};
|
|
860
863
|
}
|
|
861
864
|
|
|
862
865
|
|
|
@@ -865,27 +868,28 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
865
868
|
}
|
|
866
869
|
|
|
867
870
|
.ft-radio--disabled .ft-radio--box {
|
|
868
|
-
border-color: ${
|
|
871
|
+
border-color: ${_i};
|
|
869
872
|
background-color: transparent;
|
|
870
873
|
}
|
|
871
874
|
|
|
872
875
|
.ft-radio--disabled .ft-radio--box:after {
|
|
873
|
-
background-color: ${
|
|
876
|
+
background-color: ${_i};
|
|
874
877
|
}
|
|
875
|
-
`,
|
|
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`
|
|
876
879
|
<slot @slotchange=${this.onSlotChange}
|
|
877
880
|
@change=${this.onChange}
|
|
878
881
|
@keydown=${this.onKeyDown}
|
|
879
882
|
@focusin=${this.onFocusIn}
|
|
880
883
|
></slot>
|
|
881
|
-
`}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`
|
|
882
885
|
:host {
|
|
883
886
|
display: contents;
|
|
884
887
|
}
|
|
885
|
-
`,
|
|
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`
|
|
886
889
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
887
890
|
${null==this.parent?null:W`
|
|
888
891
|
<div tabindex="0"
|
|
892
|
+
part="controls go-back"
|
|
889
893
|
class="ft-filter-level--go-back"
|
|
890
894
|
?disabled=${this.disabled}
|
|
891
895
|
@keyup=${this.goBackOnKeyPress}
|
|
@@ -895,11 +899,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
895
899
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
896
900
|
</div>
|
|
897
901
|
`}
|
|
898
|
-
${
|
|
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`
|
|
899
908
|
<div class="ft-filter-level--option" part="options">
|
|
900
909
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
901
910
|
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?q:W`
|
|
902
911
|
<ft-button icon="chevron_right"
|
|
912
|
+
part="controls navigate-hierarchy"
|
|
903
913
|
label="${t.label}"
|
|
904
914
|
?disabled=${this.disabled}
|
|
905
915
|
tooltipPosition="left"
|
|
@@ -912,6 +922,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
912
922
|
class="ft-filter-level--display-more"
|
|
913
923
|
icon="expand_more"
|
|
914
924
|
dense trailingIcon
|
|
925
|
+
part="controls display-more"
|
|
915
926
|
@click=${this.displayMore}>
|
|
916
927
|
${this.moreValuesButtonLabel}
|
|
917
928
|
</ft-button>
|
|
@@ -919,14 +930,16 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
919
930
|
</div>
|
|
920
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`
|
|
921
932
|
<ft-checkbox name="${this.id}"
|
|
933
|
+
part="multivalued-option"
|
|
922
934
|
.checked=${t.selected}
|
|
923
935
|
.disabled=${this.disabled}
|
|
924
|
-
.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))}
|
|
925
937
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
926
938
|
${t.label}
|
|
927
939
|
</ft-checkbox>
|
|
928
940
|
`}buildMonoValuedOption(t){return W`
|
|
929
941
|
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
942
|
+
part="monovalued-option"
|
|
930
943
|
.checked=${t.selected}
|
|
931
944
|
?disabled=${this.disabled}
|
|
932
945
|
@click=${e=>this.optionsChanged(e,t)}
|
|
@@ -935,7 +948,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
935
948
|
|
|
936
949
|
${t.label}
|
|
937
950
|
</ft-radio>
|
|
938
|
-
`}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`
|
|
939
952
|
.ft-filter-level--container {
|
|
940
953
|
display: flex;
|
|
941
954
|
flex-direction: column;
|
|
@@ -949,14 +962,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
949
962
|
flex-shrink: 0;
|
|
950
963
|
text-decoration: none;
|
|
951
964
|
position: relative;
|
|
952
|
-
border-radius: ${
|
|
965
|
+
border-radius: ${qi.borderRadiusM};
|
|
953
966
|
overflow: hidden;
|
|
954
967
|
display: flex;
|
|
955
968
|
align-items: center;
|
|
956
969
|
padding: 4px 4px;
|
|
957
970
|
gap: 4px;
|
|
958
971
|
cursor: pointer;
|
|
959
|
-
color: ${
|
|
972
|
+
color: ${qi.colorOnSurface};
|
|
960
973
|
}
|
|
961
974
|
|
|
962
975
|
.ft-filter-level--go-back:focus {
|
|
@@ -985,7 +998,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
985
998
|
}
|
|
986
999
|
|
|
987
1000
|
ft-button {
|
|
988
|
-
${bt(
|
|
1001
|
+
${bt(Ci.color,qi.colorOnSurface)};
|
|
989
1002
|
}
|
|
990
1003
|
|
|
991
1004
|
ft-radio, ft-checkbox {
|
|
@@ -996,7 +1009,12 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
996
1009
|
margin-left: -10px;
|
|
997
1010
|
word-break: break-word;
|
|
998
1011
|
}
|
|
999
|
-
|
|
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`
|
|
1000
1018
|
<div part="container" class="${t}">
|
|
1001
1019
|
<ft-button
|
|
1002
1020
|
class="ft-snap-scroll--previous"
|
|
@@ -1020,7 +1038,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1020
1038
|
@click=${this.next}
|
|
1021
1039
|
></ft-button>
|
|
1022
1040
|
</div>
|
|
1023
|
-
`}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`
|
|
1024
1042
|
.ft-snap-scroll {
|
|
1025
1043
|
box-sizing: border-box;
|
|
1026
1044
|
position: relative;
|
|
@@ -1055,7 +1073,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1055
1073
|
flex-wrap: nowrap;
|
|
1056
1074
|
align-items: flex-start;
|
|
1057
1075
|
justify-content: flex-start;
|
|
1058
|
-
gap: ${
|
|
1076
|
+
gap: ${Yi.gap};
|
|
1059
1077
|
}
|
|
1060
1078
|
|
|
1061
1079
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1098,11 +1116,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1098
1116
|
.ft-snap-scroll--next {
|
|
1099
1117
|
position: absolute;
|
|
1100
1118
|
display: flex;
|
|
1101
|
-
z-index: ${
|
|
1119
|
+
z-index: ${Yi.buttonsZIndex};
|
|
1102
1120
|
opacity: 1;
|
|
1103
1121
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1104
|
-
${bt(
|
|
1105
|
-
${bt(
|
|
1122
|
+
${bt(Ci.backgroundColor,"transparent")};
|
|
1123
|
+
${bt(Ci.color,Yi.buttonsColor)};
|
|
1106
1124
|
}
|
|
1107
1125
|
|
|
1108
1126
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1115,37 +1133,37 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1115
1133
|
top: 0;
|
|
1116
1134
|
left: -1px;
|
|
1117
1135
|
bottom: 0;
|
|
1118
|
-
background: linear-gradient(to right, ${
|
|
1136
|
+
background: linear-gradient(to right, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1119
1137
|
}
|
|
1120
1138
|
|
|
1121
1139
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1122
1140
|
top: -1px;
|
|
1123
1141
|
left: 0;
|
|
1124
1142
|
right: 0;
|
|
1125
|
-
background: linear-gradient(to bottom, ${
|
|
1143
|
+
background: linear-gradient(to bottom, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1126
1144
|
}
|
|
1127
1145
|
|
|
1128
1146
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1129
1147
|
top: 0;
|
|
1130
1148
|
right: -1px;
|
|
1131
1149
|
bottom: 0;
|
|
1132
|
-
background: linear-gradient(to left, ${
|
|
1150
|
+
background: linear-gradient(to left, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1133
1151
|
}
|
|
1134
1152
|
|
|
1135
1153
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1136
1154
|
left: 0;
|
|
1137
1155
|
right: 0;
|
|
1138
1156
|
bottom: -1px;
|
|
1139
|
-
background: linear-gradient(to top, ${
|
|
1157
|
+
background: linear-gradient(to top, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1140
1158
|
}
|
|
1141
1159
|
|
|
1142
1160
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1143
1161
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1144
1162
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1145
1163
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1146
|
-
background-color: ${
|
|
1164
|
+
background-color: ${Yi.colorSurface};
|
|
1147
1165
|
}
|
|
1148
|
-
`,
|
|
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`
|
|
1149
1167
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1150
1168
|
part="container">
|
|
1151
1169
|
${this.label||i?W`
|
|
@@ -1184,7 +1202,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1184
1202
|
preventNavigation
|
|
1185
1203
|
.options=${e}
|
|
1186
1204
|
@change=${this.onChange}
|
|
1187
|
-
part="selected-values"
|
|
1205
|
+
part="values selected-values"
|
|
1206
|
+
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1188
1207
|
></ft-filter-level>
|
|
1189
1208
|
<div class="ft-filter--separator">
|
|
1190
1209
|
`:null}
|
|
@@ -1209,9 +1228,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1209
1228
|
@change=${this.onChange}
|
|
1210
1229
|
@go-back=${this.goBack}
|
|
1211
1230
|
@display-level=${this.onDisplayLevel}
|
|
1212
|
-
part="values"
|
|
1231
|
+
part="values available-values"
|
|
1232
|
+
.exportpartsPrefixes=${["values","available-values"]}
|
|
1233
|
+
noValuesLabel="${this.noValuesLabel}"
|
|
1213
1234
|
></ft-filter-level>
|
|
1214
|
-
`}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`
|
|
1215
1236
|
:host {
|
|
1216
1237
|
display: flex;
|
|
1217
1238
|
max-height: 100%;
|
|
@@ -1224,8 +1245,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1224
1245
|
flex-direction: column;
|
|
1225
1246
|
max-height: 100%;
|
|
1226
1247
|
max-width: 100%;
|
|
1227
|
-
color: ${
|
|
1228
|
-
background: ${
|
|
1248
|
+
color: ${io};
|
|
1249
|
+
background: ${no};
|
|
1229
1250
|
}
|
|
1230
1251
|
|
|
1231
1252
|
.ft-filter--header {
|
|
@@ -1235,13 +1256,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1235
1256
|
flex-shrink: 0;
|
|
1236
1257
|
padding: 0 10px;
|
|
1237
1258
|
margin-bottom: 8px;
|
|
1238
|
-
${bt(
|
|
1259
|
+
${bt(Yt.fontSize,"14px")};
|
|
1239
1260
|
}
|
|
1240
1261
|
|
|
1241
1262
|
.ft-filter--header ft-button {
|
|
1242
1263
|
flex-shrink: 0;
|
|
1243
1264
|
margin-left: auto;
|
|
1244
|
-
${bt(
|
|
1265
|
+
${bt(Ci.iconSize,"18px")};
|
|
1245
1266
|
}
|
|
1246
1267
|
|
|
1247
1268
|
.ft-filter--label {
|
|
@@ -1249,8 +1270,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1249
1270
|
flex-shrink: 1;
|
|
1250
1271
|
flex-grow: 1;
|
|
1251
1272
|
word-break: break-word;
|
|
1252
|
-
${bt(
|
|
1253
|
-
${bt(
|
|
1273
|
+
${bt(Yt.lineHeight,"22px")};
|
|
1274
|
+
${bt(Yt.fontWeight,"bold")};
|
|
1254
1275
|
}
|
|
1255
1276
|
|
|
1256
1277
|
.ft-filter--filter {
|
|
@@ -1261,8 +1282,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1261
1282
|
padding: 0 10px;
|
|
1262
1283
|
overflow: hidden;
|
|
1263
1284
|
height: 32px;
|
|
1264
|
-
transition: height ${
|
|
1265
|
-
margin ${
|
|
1285
|
+
transition: height ${ro} ${lo},
|
|
1286
|
+
margin ${ro} ${lo};
|
|
1266
1287
|
transition-delay: 500ms;
|
|
1267
1288
|
}
|
|
1268
1289
|
|
|
@@ -1275,11 +1296,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1275
1296
|
display: block;
|
|
1276
1297
|
width: 100%;
|
|
1277
1298
|
border-radius: 4px;
|
|
1278
|
-
border: 1px solid ${
|
|
1299
|
+
border: 1px solid ${eo};
|
|
1279
1300
|
padding: 4px;
|
|
1280
|
-
background-color: ${
|
|
1281
|
-
color: ${
|
|
1282
|
-
outline-color: ${
|
|
1301
|
+
background-color: ${no};
|
|
1302
|
+
color: ${oo};
|
|
1303
|
+
outline-color: ${so};
|
|
1283
1304
|
}
|
|
1284
1305
|
|
|
1285
1306
|
.ft-filter--values {
|
|
@@ -1291,7 +1312,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1291
1312
|
}
|
|
1292
1313
|
|
|
1293
1314
|
.ft-filter--separator {
|
|
1294
|
-
border-top: 1px solid ${
|
|
1315
|
+
border-top: 1px solid ${eo};
|
|
1295
1316
|
margin: 4px 10px;
|
|
1296
1317
|
}
|
|
1297
1318
|
|
|
@@ -1316,17 +1337,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1316
1337
|
slot {
|
|
1317
1338
|
display: none;
|
|
1318
1339
|
}
|
|
1319
|
-
`],
|
|
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`
|
|
1320
1341
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1321
|
-
`}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`
|
|
1322
1343
|
<div class="ft-accordion">
|
|
1323
1344
|
<slot @activated=${this.onChange}></slot>
|
|
1324
1345
|
</div>
|
|
1325
|
-
`}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`
|
|
1326
1347
|
.ft-accordion {
|
|
1327
1348
|
box-sizing: border-box;
|
|
1328
1349
|
}
|
|
1329
|
-
`,
|
|
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`
|
|
1330
1351
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1331
1352
|
<div class="ft-accordion-item--toggle"
|
|
1332
1353
|
part="toggle"
|
|
@@ -1350,7 +1371,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1350
1371
|
</div>
|
|
1351
1372
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1352
1373
|
</div>
|
|
1353
|
-
`}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`
|
|
1354
1375
|
.ft-accordion-item {
|
|
1355
1376
|
display: flex;
|
|
1356
1377
|
flex-direction: column;
|
|
@@ -1363,8 +1384,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1363
1384
|
display: flex;
|
|
1364
1385
|
align-items: center;
|
|
1365
1386
|
cursor: pointer;
|
|
1366
|
-
padding: ${
|
|
1367
|
-
gap: calc(${
|
|
1387
|
+
padding: ${go} ${vo};
|
|
1388
|
+
gap: calc(${vo} / 2);
|
|
1368
1389
|
outline: none;
|
|
1369
1390
|
}
|
|
1370
1391
|
|
|
@@ -1389,13 +1410,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1389
1410
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1390
1411
|
height: initial;
|
|
1391
1412
|
overflow: visible;
|
|
1392
|
-
padding: ${
|
|
1413
|
+
padding: ${go} ${vo};
|
|
1393
1414
|
}
|
|
1394
1415
|
|
|
1395
1416
|
.ft-accordion-item--separator {
|
|
1396
|
-
border-bottom: 1px solid ${
|
|
1417
|
+
border-bottom: 1px solid ${xo};
|
|
1397
1418
|
}
|
|
1398
|
-
`,
|
|
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`
|
|
1399
1420
|
:host {
|
|
1400
1421
|
display: inline-block;
|
|
1401
1422
|
max-width: 100%;
|
|
@@ -1412,20 +1433,20 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1412
1433
|
box-sizing: border-box;
|
|
1413
1434
|
pointer-events: auto;
|
|
1414
1435
|
|
|
1415
|
-
--ft-chip-internal-font-size: ${
|
|
1436
|
+
--ft-chip-internal-font-size: ${wo.fontSize};
|
|
1416
1437
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1417
|
-
${bt(
|
|
1418
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1419
|
-
--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};
|
|
1420
1441
|
--ft-chip-internal-icon-padding: 3px;
|
|
1421
|
-
--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});
|
|
1422
1443
|
|
|
1423
|
-
border: 1px solid ${
|
|
1424
|
-
color: ${
|
|
1425
|
-
${bt(
|
|
1444
|
+
border: 1px solid ${wo.colorOutline};
|
|
1445
|
+
color: ${wo.color};
|
|
1446
|
+
${bt(ei.color,wo.rippleColor)};
|
|
1426
1447
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1427
1448
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1428
|
-
background-color: ${
|
|
1449
|
+
background-color: ${wo.backgroundColor};
|
|
1429
1450
|
line-height: var(--ft-chip-internal-content-height);
|
|
1430
1451
|
}
|
|
1431
1452
|
|
|
@@ -1435,8 +1456,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1435
1456
|
|
|
1436
1457
|
.ft-chip--dense {
|
|
1437
1458
|
--ft-chip-internal-icon-padding: 3px;
|
|
1438
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1439
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1459
|
+
--ft-chip-internal-vertical-padding: ${Co};
|
|
1460
|
+
--ft-chip-internal-horizontal-padding: ${Oo};
|
|
1440
1461
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1441
1462
|
}
|
|
1442
1463
|
|
|
@@ -1448,15 +1469,15 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1448
1469
|
cursor: default;
|
|
1449
1470
|
pointer-events: none;
|
|
1450
1471
|
filter: grayscale(1);
|
|
1451
|
-
opacity: ${
|
|
1472
|
+
opacity: ${wo.opacityDisabled};
|
|
1452
1473
|
}
|
|
1453
1474
|
|
|
1454
1475
|
.ft-chip--highlighted {
|
|
1455
1476
|
border: none;
|
|
1456
1477
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1457
|
-
background-color: ${
|
|
1458
|
-
${bt(
|
|
1459
|
-
color: ${
|
|
1478
|
+
background-color: ${So.backgroundColor};
|
|
1479
|
+
${bt(ei.color,So.rippleColor)};
|
|
1480
|
+
color: ${So.color};
|
|
1460
1481
|
}
|
|
1461
1482
|
|
|
1462
1483
|
.ft-chip--clickable {
|
|
@@ -1489,8 +1510,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1489
1510
|
vertical-align: bottom;
|
|
1490
1511
|
display: block;
|
|
1491
1512
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1492
|
-
${bt(
|
|
1493
|
-
${bt(
|
|
1513
|
+
${bt(ke.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1514
|
+
${bt(ke.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1494
1515
|
}
|
|
1495
1516
|
|
|
1496
1517
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1525,8 +1546,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1525
1546
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
1526
1547
|
order: -1;
|
|
1527
1548
|
}
|
|
1528
|
-
`]}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":
|
|
1529
|
-
<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)}"
|
|
1530
1551
|
aria-label="${this.getLabel()}"
|
|
1531
1552
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1532
1553
|
@keyup=${this.onKeyUp}>
|
|
@@ -1544,8 +1565,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1544
1565
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1545
1566
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1546
1567
|
</div>
|
|
1547
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1548
|
-
<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)}">
|
|
1549
1570
|
${this.text?W`
|
|
1550
1571
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1551
1572
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -1553,7 +1574,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1553
1574
|
</div>
|
|
1554
1575
|
`:null}
|
|
1555
1576
|
</div>
|
|
1556
|
-
`}}
|
|
1577
|
+
`}}No.elementDefinitions={},No.styles=[Ze,g`
|
|
1557
1578
|
.ft-input-label {
|
|
1558
1579
|
position: absolute;
|
|
1559
1580
|
inset: 0;
|
|
@@ -1561,11 +1582,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1561
1582
|
}
|
|
1562
1583
|
|
|
1563
1584
|
.ft-input-label {
|
|
1564
|
-
border-color: ${
|
|
1585
|
+
border-color: ${Mo.borderColor};
|
|
1565
1586
|
}
|
|
1566
1587
|
|
|
1567
1588
|
.ft-input-label.ft-input-label--in-error {
|
|
1568
|
-
border-color: ${
|
|
1589
|
+
border-color: ${Mo.colorError}
|
|
1569
1590
|
}
|
|
1570
1591
|
|
|
1571
1592
|
.ft-input-label:before,
|
|
@@ -1578,7 +1599,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1578
1599
|
}
|
|
1579
1600
|
|
|
1580
1601
|
.ft-input-label:before {
|
|
1581
|
-
width: ${
|
|
1602
|
+
width: ${Mo.horizontalSpacing};
|
|
1582
1603
|
flex-shrink: 0;
|
|
1583
1604
|
}
|
|
1584
1605
|
|
|
@@ -1594,18 +1615,18 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1594
1615
|
border-bottom-width: 1px;
|
|
1595
1616
|
border-bottom-style: solid;
|
|
1596
1617
|
border-color: inherit;
|
|
1597
|
-
color: ${
|
|
1618
|
+
color: ${Mo.textColor};
|
|
1598
1619
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1599
|
-
${bt(
|
|
1600
|
-
${bt(
|
|
1620
|
+
${bt(Se.fontSize,Mo.fontSize)};
|
|
1621
|
+
${bt(Se.lineHeight,Mo.fontSize)};
|
|
1601
1622
|
}
|
|
1602
1623
|
|
|
1603
1624
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1604
|
-
color: ${
|
|
1625
|
+
color: ${Mo.colorError}
|
|
1605
1626
|
}
|
|
1606
1627
|
|
|
1607
1628
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1608
|
-
color: ${
|
|
1629
|
+
color: ${Mo.disabledTextColor};
|
|
1609
1630
|
}
|
|
1610
1631
|
|
|
1611
1632
|
.ft-input-label--hidden-text {
|
|
@@ -1621,17 +1642,17 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1621
1642
|
overflow: hidden;
|
|
1622
1643
|
white-space: nowrap;
|
|
1623
1644
|
text-overflow: ellipsis;
|
|
1624
|
-
padding: ${
|
|
1625
|
-
margin: calc(${
|
|
1645
|
+
padding: ${Mo.verticalSpacing} 4px;
|
|
1646
|
+
margin: calc(${Mo.verticalSpacing} * -1) 0;
|
|
1626
1647
|
}
|
|
1627
1648
|
|
|
1628
1649
|
.ft-input-label--raised .ft-input-label--text {
|
|
1629
|
-
${bt(
|
|
1630
|
-
${bt(
|
|
1650
|
+
${bt(Se.fontSize,Mo.raisedFontSize)};
|
|
1651
|
+
${bt(Se.lineHeight,Mo.raisedFontSize)};
|
|
1631
1652
|
}
|
|
1632
1653
|
|
|
1633
1654
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1634
|
-
top: ${
|
|
1655
|
+
top: ${Mo.verticalSpacing};
|
|
1635
1656
|
}
|
|
1636
1657
|
|
|
1637
1658
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1644,28 +1665,28 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1644
1665
|
.ft-input-label--outlined:before {
|
|
1645
1666
|
border-left-width: 1px;
|
|
1646
1667
|
border-left-style: solid;
|
|
1647
|
-
border-radius: ${
|
|
1668
|
+
border-radius: ${Mo.borderRadiusS} 0 0 ${Mo.borderRadiusS};
|
|
1648
1669
|
}
|
|
1649
1670
|
|
|
1650
1671
|
.ft-input-label--outlined:after {
|
|
1651
1672
|
border-right-width: 1px;
|
|
1652
1673
|
border-right-style: solid;
|
|
1653
|
-
border-radius: 0 ${
|
|
1674
|
+
border-radius: 0 ${Mo.borderRadiusS} ${Mo.borderRadiusS} 0;
|
|
1654
1675
|
}
|
|
1655
1676
|
|
|
1656
1677
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1657
1678
|
padding: 2px 4px;
|
|
1658
|
-
z-index: ${
|
|
1659
|
-
background-color: ${
|
|
1660
|
-
border-radius: ${
|
|
1679
|
+
z-index: ${Mo.raisedZIndex};
|
|
1680
|
+
background-color: ${Mo.colorSurface};
|
|
1681
|
+
border-radius: ${Mo.borderRadiusS};
|
|
1661
1682
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1662
1683
|
}
|
|
1663
1684
|
|
|
1664
1685
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1665
1686
|
border-top: none;
|
|
1666
1687
|
}
|
|
1667
|
-
`],
|
|
1668
|
-
<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">
|
|
1669
1690
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1670
1691
|
<ft-input-label text="${this.label}"
|
|
1671
1692
|
part="label"
|
|
@@ -1692,7 +1713,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1692
1713
|
part="options"
|
|
1693
1714
|
@keydown=${this.onOptionsKeyDown}
|
|
1694
1715
|
innerrole="listbox">
|
|
1695
|
-
${
|
|
1716
|
+
${It(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
1696
1717
|
</div>
|
|
1697
1718
|
</div>
|
|
1698
1719
|
${this.helper?W`
|
|
@@ -1703,7 +1724,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1703
1724
|
@option-change=${this.updateOptionsFromSlot}
|
|
1704
1725
|
></slot>
|
|
1705
1726
|
`}renderOption(t){let e=this.selectedOption===t;return W`
|
|
1706
|
-
<div class="${
|
|
1727
|
+
<div class="${jt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
1707
1728
|
part="option"
|
|
1708
1729
|
tabindex="0"
|
|
1709
1730
|
data-value="${t.value}"
|
|
@@ -1712,7 +1733,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1712
1733
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1713
1734
|
${t.label}
|
|
1714
1735
|
</div>
|
|
1715
|
-
`}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`
|
|
1716
1737
|
*:focus {
|
|
1717
1738
|
outline: none;
|
|
1718
1739
|
}
|
|
@@ -1726,7 +1747,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1726
1747
|
.ft-select--main-panel {
|
|
1727
1748
|
position: relative;
|
|
1728
1749
|
display: flex;
|
|
1729
|
-
height: calc(4 * ${
|
|
1750
|
+
height: calc(4 * ${Lo.verticalSpacing} + ${Lo.labelSize} + ${Lo.selectedOptionSize});
|
|
1730
1751
|
}
|
|
1731
1752
|
|
|
1732
1753
|
.ft-select--input-panel {
|
|
@@ -1738,14 +1759,14 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1738
1759
|
padding-left: 16px;
|
|
1739
1760
|
padding-right: 8px;
|
|
1740
1761
|
gap: 8px;
|
|
1741
|
-
color: ${
|
|
1742
|
-
${bt(
|
|
1762
|
+
color: ${Lo.selectedOptionColor};
|
|
1763
|
+
${bt(ei.color,Lo.selectedOptionColor)};
|
|
1743
1764
|
}
|
|
1744
1765
|
|
|
1745
1766
|
.ft-select--input-panel,
|
|
1746
1767
|
.ft-select--option {
|
|
1747
|
-
${bt(
|
|
1748
|
-
${bt(
|
|
1768
|
+
${bt(ei.opacityContentOnSurfaceHover,"0.08")};
|
|
1769
|
+
${bt(ei.opacityContentOnSurfacePressed,"0.04")};
|
|
1749
1770
|
}
|
|
1750
1771
|
|
|
1751
1772
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -1755,7 +1776,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1755
1776
|
|
|
1756
1777
|
.ft-select--disabled .ft-select--input-panel,
|
|
1757
1778
|
.ft-select--disabled .ft-select--option {
|
|
1758
|
-
color: ${
|
|
1779
|
+
color: ${Lo.colorOnSurfaceDisabled};
|
|
1759
1780
|
}
|
|
1760
1781
|
|
|
1761
1782
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -1764,18 +1785,18 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1764
1785
|
}
|
|
1765
1786
|
|
|
1766
1787
|
ft-input-label {
|
|
1767
|
-
${bt(
|
|
1768
|
-
${bt(
|
|
1769
|
-
${bt(
|
|
1788
|
+
${bt(Mo.fontSize,Lo.selectedOptionSize)};
|
|
1789
|
+
${bt(Mo.raisedFontSize,Lo.labelSize)};
|
|
1790
|
+
${bt(Mo.verticalSpacing,Lo.verticalSpacing)};
|
|
1770
1791
|
}
|
|
1771
1792
|
|
|
1772
1793
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1773
|
-
color: ${
|
|
1794
|
+
color: ${Lo.colorPrimary};
|
|
1774
1795
|
}
|
|
1775
1796
|
|
|
1776
1797
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1777
|
-
${bt(
|
|
1778
|
-
${bt(
|
|
1798
|
+
${bt(Mo.borderColor,Lo.colorPrimary)};
|
|
1799
|
+
${bt(Mo.textColor,Lo.colorPrimary)};
|
|
1779
1800
|
}
|
|
1780
1801
|
|
|
1781
1802
|
.ft-select--selected-option {
|
|
@@ -1785,12 +1806,12 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1785
1806
|
overflow: hidden;
|
|
1786
1807
|
white-space: nowrap;
|
|
1787
1808
|
text-overflow: ellipsis;
|
|
1788
|
-
${bt(
|
|
1789
|
-
${bt(
|
|
1809
|
+
${bt(we.fontSize,Lo.selectedOptionSize)};
|
|
1810
|
+
${bt(we.lineHeight,Lo.selectedOptionSize)};
|
|
1790
1811
|
}
|
|
1791
1812
|
|
|
1792
1813
|
.ft-select--in-error .ft-select--selected-option {
|
|
1793
|
-
color: ${
|
|
1814
|
+
color: ${Lo.colorError};
|
|
1794
1815
|
}
|
|
1795
1816
|
|
|
1796
1817
|
ft-icon {
|
|
@@ -1802,16 +1823,16 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1802
1823
|
}
|
|
1803
1824
|
|
|
1804
1825
|
.ft-select--filled .ft-select--input-panel {
|
|
1805
|
-
border-radius: ${
|
|
1826
|
+
border-radius: ${Lo.borderRadiusS} ${Lo.borderRadiusS} 0 0;
|
|
1806
1827
|
}
|
|
1807
1828
|
|
|
1808
1829
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1809
1830
|
align-self: stretch;
|
|
1810
|
-
padding-top: calc(${
|
|
1831
|
+
padding-top: calc(${Lo.labelSize} + 2 * ${Lo.verticalSpacing});
|
|
1811
1832
|
}
|
|
1812
1833
|
|
|
1813
1834
|
.ft-select--outlined .ft-select--input-panel {
|
|
1814
|
-
border-radius: ${
|
|
1835
|
+
border-radius: ${Lo.borderRadiusS};
|
|
1815
1836
|
}
|
|
1816
1837
|
|
|
1817
1838
|
.ft-select--options {
|
|
@@ -1820,10 +1841,10 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1820
1841
|
top: 100%;
|
|
1821
1842
|
left: 0;
|
|
1822
1843
|
right: 0;
|
|
1823
|
-
color: ${
|
|
1824
|
-
background: ${
|
|
1825
|
-
z-index: ${
|
|
1826
|
-
box-shadow: ${
|
|
1844
|
+
color: ${Lo.optionsColor};
|
|
1845
|
+
background: ${Lo.colorSurface};
|
|
1846
|
+
z-index: ${Lo.optionsZIndex};
|
|
1847
|
+
box-shadow: ${Lo.elevation02};
|
|
1827
1848
|
}
|
|
1828
1849
|
|
|
1829
1850
|
.ft-select--fixed .ft-select--options {
|
|
@@ -1834,6 +1855,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1834
1855
|
|
|
1835
1856
|
.ft-select--options-displayed .ft-select--options {
|
|
1836
1857
|
display: block;
|
|
1858
|
+
max-height: ${Lo.optionsHeight};
|
|
1859
|
+
overflow-y: auto;
|
|
1837
1860
|
}
|
|
1838
1861
|
|
|
1839
1862
|
.ft-select--option {
|
|
@@ -1846,41 +1869,41 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1846
1869
|
|
|
1847
1870
|
.ft-select--helper-text {
|
|
1848
1871
|
padding: 0 12px 0 16px;
|
|
1849
|
-
color: ${
|
|
1872
|
+
color: ${Lo.helperColor};
|
|
1850
1873
|
}
|
|
1851
1874
|
|
|
1852
1875
|
.ft-select--in-error .ft-select--helper-text {
|
|
1853
|
-
color: ${
|
|
1876
|
+
color: ${Lo.colorError};
|
|
1854
1877
|
}
|
|
1855
|
-
`],
|
|
1856
|
-
`}}
|
|
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`
|
|
1857
1880
|
:host {
|
|
1858
|
-
width: ${
|
|
1859
|
-
height: ${
|
|
1860
|
-
display: ${
|
|
1881
|
+
width: ${Io.width};
|
|
1882
|
+
height: ${Io.height};
|
|
1883
|
+
display: ${Io.display};
|
|
1861
1884
|
overflow: hidden;
|
|
1862
|
-
border-radius: ${
|
|
1885
|
+
border-radius: ${Io.borderRadiusM};
|
|
1863
1886
|
background: linear-gradient(
|
|
1864
1887
|
90deg,
|
|
1865
1888
|
transparent,
|
|
1866
|
-
${
|
|
1867
|
-
${
|
|
1868
|
-
transparent ${
|
|
1869
|
-
), ${
|
|
1889
|
+
${Io.glareColor} calc(0.45 * ${Io.glareWidth}),
|
|
1890
|
+
${Io.glareColor} calc(0.55 * ${Io.glareWidth}),
|
|
1891
|
+
transparent ${Io.glareWidth}
|
|
1892
|
+
), ${Io.backgroundColor};
|
|
1870
1893
|
background-repeat: repeat-y;
|
|
1871
1894
|
background-size: 100vw 100vh;
|
|
1872
1895
|
background-attachment: fixed;
|
|
1873
|
-
background-position: calc(${
|
|
1874
|
-
animation: shine ${
|
|
1896
|
+
background-position: calc(${Io.glareWidth} * -1) 0;
|
|
1897
|
+
animation: shine ${Io.animationDuration} infinite;
|
|
1875
1898
|
animation-timing-function: linear;
|
|
1876
1899
|
}
|
|
1877
1900
|
|
|
1878
1901
|
@keyframes shine {
|
|
1879
1902
|
to {
|
|
1880
|
-
background-position: calc(100vw + ${
|
|
1903
|
+
background-position: calc(100vw + ${Io.glareWidth}) 0, calc(${Io.glareWidth} * -1) 0;
|
|
1881
1904
|
}
|
|
1882
1905
|
}
|
|
1883
|
-
`,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`
|
|
1884
1907
|
* {
|
|
1885
1908
|
box-sizing: border-box;
|
|
1886
1909
|
}
|
|
@@ -1889,7 +1912,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1889
1912
|
display: flex;
|
|
1890
1913
|
flex-direction: column;
|
|
1891
1914
|
gap: 8px;
|
|
1892
|
-
color: ${
|
|
1915
|
+
color: ${Uo.colorOnSurface};
|
|
1893
1916
|
outline: none;
|
|
1894
1917
|
}
|
|
1895
1918
|
|
|
@@ -1898,14 +1921,18 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1898
1921
|
}
|
|
1899
1922
|
|
|
1900
1923
|
.ft-search-bar--mobile-menu-open {
|
|
1901
|
-
position: ${
|
|
1902
|
-
top: ${
|
|
1903
|
-
bottom: ${
|
|
1904
|
-
left: ${
|
|
1905
|
-
right: ${
|
|
1906
|
-
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};
|
|
1907
1930
|
padding: 16px;
|
|
1908
|
-
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")};
|
|
1909
1936
|
}
|
|
1910
1937
|
|
|
1911
1938
|
.ft-search-bar {
|
|
@@ -1913,20 +1940,20 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1913
1940
|
display: flex;
|
|
1914
1941
|
flex-direction: row;
|
|
1915
1942
|
align-items: center;
|
|
1916
|
-
height: ${
|
|
1943
|
+
height: ${Uo.height};
|
|
1917
1944
|
|
|
1918
|
-
background: ${
|
|
1919
|
-
border: 1px solid ${
|
|
1920
|
-
border-radius: ${
|
|
1945
|
+
background: ${Uo.colorSurface};
|
|
1946
|
+
border: 1px solid ${Uo.colorOutline};
|
|
1947
|
+
border-radius: ${Uo.borderRadius};
|
|
1921
1948
|
}
|
|
1922
1949
|
|
|
1923
1950
|
.ft-search-bar--skeleton {
|
|
1924
|
-
${bt(
|
|
1925
|
-
${bt(
|
|
1951
|
+
${bt(Io.height,Uo.height)};
|
|
1952
|
+
${bt(Io.borderRadiusM,Uo.borderRadius)};
|
|
1926
1953
|
}
|
|
1927
1954
|
|
|
1928
1955
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1929
|
-
border-radius: ${
|
|
1956
|
+
border-radius: ${Uo.borderRadius} ${Uo.borderRadius} 0 0;
|
|
1930
1957
|
}
|
|
1931
1958
|
|
|
1932
1959
|
.ft-search-bar--input-container {
|
|
@@ -1944,7 +1971,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1944
1971
|
align-self: stretch;
|
|
1945
1972
|
display: grid;
|
|
1946
1973
|
padding: 0 8px;
|
|
1947
|
-
border-radius: ${
|
|
1974
|
+
border-radius: ${Uo.borderRadius};
|
|
1948
1975
|
}
|
|
1949
1976
|
|
|
1950
1977
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -1953,7 +1980,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1953
1980
|
}
|
|
1954
1981
|
|
|
1955
1982
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1956
|
-
outline: 2px solid ${
|
|
1983
|
+
outline: 2px solid ${Uo.colorPrimary};
|
|
1957
1984
|
}
|
|
1958
1985
|
|
|
1959
1986
|
.ft-search-bar--input {
|
|
@@ -1976,7 +2003,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1976
2003
|
align-items: center;
|
|
1977
2004
|
height: 100%;
|
|
1978
2005
|
|
|
1979
|
-
|
|
2006
|
+
${bt(hi.zIndex,`calc(${Uo.floatingZIndex} + 1)`)};
|
|
1980
2007
|
}
|
|
1981
2008
|
|
|
1982
2009
|
.ft-search-bar > ft-button,
|
|
@@ -1985,8 +2012,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1985
2012
|
}
|
|
1986
2013
|
|
|
1987
2014
|
.ft-search-bar--left-action {
|
|
1988
|
-
${bt(
|
|
1989
|
-
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};
|
|
1990
2017
|
height: 100%;
|
|
1991
2018
|
}
|
|
1992
2019
|
|
|
@@ -1995,7 +2022,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
1995
2022
|
}
|
|
1996
2023
|
|
|
1997
2024
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1998
|
-
${bt(
|
|
2025
|
+
${bt(Ci.borderRadius,g`calc(${Uo.borderRadius} - 1px) 0 0 0`)};
|
|
1999
2026
|
}
|
|
2000
2027
|
|
|
2001
2028
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -2005,13 +2032,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2005
2032
|
|
|
2006
2033
|
.ft-search-bar--separator {
|
|
2007
2034
|
height: 20px;
|
|
2008
|
-
border-right: 1px solid ${
|
|
2035
|
+
border-right: 1px solid ${Uo.colorOutline};
|
|
2009
2036
|
}
|
|
2010
2037
|
|
|
2011
2038
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
2012
|
-
${bt(
|
|
2013
|
-
${bt(
|
|
2014
|
-
${bt(
|
|
2039
|
+
${bt(Mo.borderColor,"transparent")};
|
|
2040
|
+
${bt(Mo.borderRadiusS,g`calc(${Uo.borderRadius} - 1px)`)};
|
|
2041
|
+
${bt(Lo.selectedOptionColor,Uo.buttonColor)};
|
|
2015
2042
|
}
|
|
2016
2043
|
|
|
2017
2044
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -2028,27 +2055,35 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2028
2055
|
}
|
|
2029
2056
|
|
|
2030
2057
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
2031
|
-
border-radius: calc(${
|
|
2058
|
+
border-radius: calc(${Uo.borderRadius} - 1px) 0 0 calc(${Uo.borderRadius} - 1px);
|
|
2032
2059
|
}
|
|
2033
2060
|
|
|
2034
|
-
`,
|
|
2035
|
-
.ft-search-bar--
|
|
2061
|
+
`,Ao=g`
|
|
2062
|
+
.ft-search-bar--desktop-menu .ft-search-bar--presets {
|
|
2036
2063
|
margin-right: auto;
|
|
2037
2064
|
}
|
|
2038
2065
|
|
|
2039
|
-
.ft-search-bar--
|
|
2066
|
+
.ft-search-bar--desktop-menu .ft-search-bar--presets {
|
|
2040
2067
|
min-width: 250px;
|
|
2041
|
-
${bt(
|
|
2068
|
+
${bt(Lo.optionsZIndex,"2")};
|
|
2042
2069
|
}
|
|
2043
2070
|
|
|
2044
|
-
.ft-search-bar--
|
|
2071
|
+
.ft-search-bar--desktop-menu {
|
|
2072
|
+
display: flex;
|
|
2045
2073
|
flex-direction: column;
|
|
2046
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 {
|
|
2047
2082
|
padding: 16px;
|
|
2048
2083
|
}
|
|
2049
2084
|
|
|
2050
2085
|
.ft-search-bar--floating-panel-open .ft-search-bar--floating-panel {
|
|
2051
|
-
display:
|
|
2086
|
+
display: block;
|
|
2052
2087
|
}
|
|
2053
2088
|
|
|
2054
2089
|
.ft-search-bar--desktop .ft-search-bar--facets-actions {
|
|
@@ -2056,6 +2091,9 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2056
2091
|
align-items: center;
|
|
2057
2092
|
justify-content: flex-end;
|
|
2058
2093
|
gap: 8px;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
.ft-search-bar--floating-panel .ft-search-bar--facets-actions {
|
|
2059
2097
|
padding: 0 10px;
|
|
2060
2098
|
}
|
|
2061
2099
|
|
|
@@ -2077,13 +2115,13 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2077
2115
|
display: none;
|
|
2078
2116
|
}
|
|
2079
2117
|
|
|
2080
|
-
.ft-search-bar--
|
|
2118
|
+
.ft-search-bar--desktop-menu .ft-search-bar--filters-container {
|
|
2081
2119
|
display: block;
|
|
2082
|
-
height:
|
|
2120
|
+
height: ${Uo.desktopFiltersHeight};
|
|
2083
2121
|
--ft-snap-scroll-gap: 16px;
|
|
2084
2122
|
}
|
|
2085
2123
|
|
|
2086
|
-
.ft-search-bar--
|
|
2124
|
+
.ft-search-bar--desktop-menu ft-filter {
|
|
2087
2125
|
display: flex;
|
|
2088
2126
|
flex-grow: 0;
|
|
2089
2127
|
max-height: 100%;
|
|
@@ -2130,7 +2168,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2130
2168
|
|
|
2131
2169
|
.ft-search-bar--filter-label > :last-child {
|
|
2132
2170
|
flex-shrink: 1;
|
|
2133
|
-
color: ${
|
|
2171
|
+
color: ${Uo.colorOnSurfaceMedium};
|
|
2134
2172
|
}
|
|
2135
2173
|
|
|
2136
2174
|
ft-accordion-item::part(toggle) {
|
|
@@ -2147,10 +2185,10 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2147
2185
|
padding-right: 0;
|
|
2148
2186
|
}
|
|
2149
2187
|
|
|
2150
|
-
.ft-search-bar--
|
|
2188
|
+
.ft-search-bar--desktop-menu .ft-search-bar--launch-search {
|
|
2151
2189
|
margin: 0;
|
|
2152
2190
|
}
|
|
2153
|
-
`,
|
|
2191
|
+
`,To=g`
|
|
2154
2192
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2155
2193
|
flex-shrink: 0;
|
|
2156
2194
|
display: flex;
|
|
@@ -2161,7 +2199,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2161
2199
|
|
|
2162
2200
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2163
2201
|
overflow: hidden;
|
|
2164
|
-
${bt(
|
|
2202
|
+
${bt(Yi.gap,"4px")};
|
|
2165
2203
|
}
|
|
2166
2204
|
|
|
2167
2205
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -2169,8 +2207,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2169
2207
|
}
|
|
2170
2208
|
|
|
2171
2209
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2172
|
-
${bt(
|
|
2173
|
-
${bt(
|
|
2210
|
+
${bt(wo.iconSize,"17px")};
|
|
2211
|
+
${bt(wo.fontSize,"12px")};
|
|
2174
2212
|
}
|
|
2175
2213
|
|
|
2176
2214
|
.ft-search-bar--selected-filters * {
|
|
@@ -2180,7 +2218,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2180
2218
|
.ft-search-bar--selected-filters ft-chip {
|
|
2181
2219
|
flex-grow: 0;
|
|
2182
2220
|
}
|
|
2183
|
-
`,
|
|
2221
|
+
`,_o=g`
|
|
2184
2222
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2185
2223
|
flex-grow: 1;
|
|
2186
2224
|
flex-shrink: 1;
|
|
@@ -2189,7 +2227,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2189
2227
|
}
|
|
2190
2228
|
|
|
2191
2229
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2192
|
-
border-top: 1px solid ${
|
|
2230
|
+
border-top: 1px solid ${Uo.colorOutline};
|
|
2193
2231
|
}
|
|
2194
2232
|
|
|
2195
2233
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2199,15 +2237,15 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2199
2237
|
.ft-search-bar--floating-panel,
|
|
2200
2238
|
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2201
2239
|
position: absolute;
|
|
2202
|
-
z-index:
|
|
2240
|
+
z-index: ${Uo.floatingZIndex};
|
|
2203
2241
|
top: 100%;
|
|
2204
2242
|
left: -1px;
|
|
2205
2243
|
right: -1px;
|
|
2206
2244
|
display: none;
|
|
2207
|
-
background: ${
|
|
2208
|
-
border: 1px solid ${
|
|
2209
|
-
border-radius: 0 0 ${
|
|
2210
|
-
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};
|
|
2211
2249
|
outline: none;
|
|
2212
2250
|
}
|
|
2213
2251
|
|
|
@@ -2222,7 +2260,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2222
2260
|
.ft-search-bar--no-suggestions {
|
|
2223
2261
|
text-align: center;
|
|
2224
2262
|
padding: 8px;
|
|
2225
|
-
color: ${
|
|
2263
|
+
color: ${Uo.colorOnSurface};
|
|
2226
2264
|
}
|
|
2227
2265
|
|
|
2228
2266
|
.ft-search-bar--suggestion {
|
|
@@ -2233,7 +2271,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2233
2271
|
padding: 8px;
|
|
2234
2272
|
gap: 8px;
|
|
2235
2273
|
cursor: pointer;
|
|
2236
|
-
color: ${
|
|
2274
|
+
color: ${Uo.colorOnSurface};
|
|
2237
2275
|
min-height: 52px;
|
|
2238
2276
|
}
|
|
2239
2277
|
|
|
@@ -2250,7 +2288,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2250
2288
|
}
|
|
2251
2289
|
|
|
2252
2290
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2253
|
-
border-top: 1px solid ${
|
|
2291
|
+
border-top: 1px solid ${Uo.colorOutline};
|
|
2254
2292
|
}
|
|
2255
2293
|
|
|
2256
2294
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2258,11 +2296,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2258
2296
|
flex-grow: 1;
|
|
2259
2297
|
flex-shrink: 1;
|
|
2260
2298
|
}
|
|
2261
|
-
`;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`
|
|
2262
2300
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2263
2301
|
${this.renderSearchBar()}
|
|
2264
|
-
`}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`
|
|
2265
|
-
<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">
|
|
2266
2304
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2267
2305
|
</div>
|
|
2268
2306
|
`:W`
|
|
@@ -2292,7 +2330,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2292
2330
|
${this.labelResolver.resolve("searchButton")}
|
|
2293
2331
|
</ft-button>
|
|
2294
2332
|
`:q}
|
|
2295
|
-
`}renderMobileSearchBarButtons(){
|
|
2333
|
+
`}renderMobileSearchBarButtons(){const t=this.query||this.isMobileMenuOpen&&!this.forceMobileMenuOpen;return W`
|
|
2334
|
+
${t?W`
|
|
2296
2335
|
<div class="ft-search-bar--actions"
|
|
2297
2336
|
part="search-bar-actions">
|
|
2298
2337
|
<ft-button class="ft-search-bar--clear-query"
|
|
@@ -2300,10 +2339,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2300
2339
|
icon="close"
|
|
2301
2340
|
round
|
|
2302
2341
|
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2342
|
+
tooltipPosition="left"
|
|
2303
2343
|
@click=${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}
|
|
2304
2344
|
></ft-button>
|
|
2305
2345
|
</div>
|
|
2306
|
-
`:
|
|
2346
|
+
`:q}
|
|
2307
2347
|
<div class="ft-search-bar--actions"
|
|
2308
2348
|
part="search-bar-actions">
|
|
2309
2349
|
<ft-button class="ft-search-bar--launch-search"
|
|
@@ -2311,7 +2351,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2311
2351
|
icon="search"
|
|
2312
2352
|
round
|
|
2313
2353
|
label="${this.labelResolver.resolve("searchButton")}"
|
|
2314
|
-
|
|
2354
|
+
tooltipPosition="left"
|
|
2355
|
+
@click=${()=>{var t;return this.isMobileMenuOpen?this.launchSearch():null===(t=this.input)||void 0===t?void 0:t.focus()}}
|
|
2315
2356
|
></ft-button>
|
|
2316
2357
|
</div>
|
|
2317
2358
|
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return W`
|
|
@@ -2326,7 +2367,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2326
2367
|
</ft-typography>
|
|
2327
2368
|
</div>
|
|
2328
2369
|
<ft-filter
|
|
2329
|
-
part="filters"
|
|
2370
|
+
part="filters filter-ft-locale"
|
|
2371
|
+
.exportpartsPrefixes=${["filter","filter-ft-locale"]}
|
|
2330
2372
|
class="ft-search-bar--content-locale"
|
|
2331
2373
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2332
2374
|
.options=${this.contentLocalesAsFilterOptions()}
|
|
@@ -2334,20 +2376,22 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2334
2376
|
></ft-filter>
|
|
2335
2377
|
</ft-accordion-item>
|
|
2336
2378
|
`:null}
|
|
2337
|
-
${
|
|
2379
|
+
${It(this.facets,(t=>t.key),(t=>{const e=Qe(t),i=t.key.replace(":","-");return t.rootNodes.length>0?W`
|
|
2338
2380
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2339
2381
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2340
2382
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2341
2383
|
<ft-typography variant="body2">
|
|
2342
|
-
${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(", ")}
|
|
2343
2385
|
</ft-typography>
|
|
2344
2386
|
</div>
|
|
2345
2387
|
<ft-filter
|
|
2346
|
-
part="filters"
|
|
2388
|
+
part="filters filter filter-${i}"
|
|
2389
|
+
.exportpartsPrefixes=${["filter","filter-"+i]}
|
|
2347
2390
|
id="${e.id}"
|
|
2348
2391
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2349
2392
|
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2350
2393
|
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2394
|
+
noValuesLabel="${this.labelResolver.resolve("noFilterValuesAvailable")}"
|
|
2351
2395
|
?multivalued=${e.multivalued}
|
|
2352
2396
|
raiseSelectedOptions
|
|
2353
2397
|
.options=${e.options}
|
|
@@ -2355,7 +2399,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2355
2399
|
@change=${t=>this.setFilter(e.id,t.detail)}
|
|
2356
2400
|
></ft-filter>
|
|
2357
2401
|
</ft-accordion-item>
|
|
2358
|
-
|
|
2402
|
+
`:q}))}
|
|
2359
2403
|
</ft-accordion>
|
|
2360
2404
|
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return W`
|
|
2361
2405
|
<div class="ft-search-bar" part="search-bar">
|
|
@@ -2374,21 +2418,28 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2374
2418
|
${this.renderSuggestions()}
|
|
2375
2419
|
</div>
|
|
2376
2420
|
${this.renderDesktopSearchBarButtons()}
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
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>
|
|
2388
2440
|
</div>
|
|
2389
2441
|
</div>
|
|
2390
|
-
|
|
2391
|
-
`}renderSearchBarLeftAction(){return this.hasFacets?W`
|
|
2442
|
+
`:q}renderSearchBarLeftAction(){return this.hasFacets?this.forceMenuOpen?q:W`
|
|
2392
2443
|
<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action"
|
|
2393
2444
|
part="filters-opener"
|
|
2394
2445
|
trailingIcon
|
|
@@ -2402,7 +2453,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2402
2453
|
class="ft-search-bar--content-locale ft-search-bar--left-action"
|
|
2403
2454
|
part="content-locale"
|
|
2404
2455
|
@change=${t=>this.contentLocale=null==t.detail?void 0:t.detail}>
|
|
2405
|
-
${
|
|
2456
|
+
${It(this.availableContentLocales,(t=>t.lang),(t=>W`
|
|
2406
2457
|
<ft-select-option .value=${t.lang}
|
|
2407
2458
|
label="${t.label}"
|
|
2408
2459
|
?selected=${t.lang===this.contentLocale}>
|
|
@@ -2439,7 +2490,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2439
2490
|
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2440
2491
|
outlined
|
|
2441
2492
|
@change=${t=>this.selectedPreset=t.detail}>
|
|
2442
|
-
${
|
|
2493
|
+
${It(null!==(t=this.presets)&&void 0!==t?t:[],(t=>t.name),(t=>W`
|
|
2443
2494
|
<ft-select-option value="${t.name}"
|
|
2444
2495
|
label="${t.name}"
|
|
2445
2496
|
?selected=${t.name===this.selectedPreset}>
|
|
@@ -2447,36 +2498,40 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2447
2498
|
`))}
|
|
2448
2499
|
</ft-select>
|
|
2449
2500
|
`:q}
|
|
2450
|
-
${this.searchFilters.length>0?W`
|
|
2451
|
-
<ft-button part="facets-actions"
|
|
2452
|
-
@click=${this.clearFilters}>
|
|
2453
|
-
${this.labelResolver.resolve("clearFilters")}
|
|
2454
|
-
</ft-button>
|
|
2455
|
-
`:q}
|
|
2456
2501
|
<slot name="facets-actions"></slot>
|
|
2502
|
+
${this.forceMenuOpen&&!this.isMobile?q:this.renderDesktopClearFilters()}
|
|
2457
2503
|
</div>
|
|
2458
|
-
`}
|
|
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`
|
|
2459
2510
|
<ft-snap-scroll horizontal limitSize controls
|
|
2460
2511
|
class="ft-search-bar--filters-container"
|
|
2461
|
-
part="filters-container"
|
|
2512
|
+
part="filters-container"
|
|
2513
|
+
exportpartsPrefix="filters-container">
|
|
2462
2514
|
${this.hasLocaleSelector?W`
|
|
2463
|
-
<ft-filter
|
|
2464
|
-
|
|
2515
|
+
<ft-filter class="ft-search-bar--content-locale"
|
|
2516
|
+
part="filters filter-ft-locale"
|
|
2517
|
+
.exportpartsPrefixes=${["filter","filter-ft-locale"]}
|
|
2465
2518
|
label="${this.labelResolver.resolve("contentLocaleSelector")}"
|
|
2466
2519
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2467
2520
|
.options=${this.contentLocalesAsFilterOptions()}
|
|
2468
2521
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2469
2522
|
></ft-filter>
|
|
2470
2523
|
`:q}
|
|
2471
|
-
${
|
|
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`
|
|
2472
2525
|
<ft-filter
|
|
2473
2526
|
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2474
|
-
part="filters"
|
|
2527
|
+
part="filters filter filter-${o}"
|
|
2528
|
+
.exportpartsPrefixes=${["filter","filter-"+o]}
|
|
2475
2529
|
id="${e.id}"
|
|
2476
2530
|
label="${e.label}"
|
|
2477
2531
|
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2478
2532
|
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2479
2533
|
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2534
|
+
noValuesLabel="${this.labelResolver.resolve("noFilterValuesAvailable")}"
|
|
2480
2535
|
?multivalued=${e.multivalued}
|
|
2481
2536
|
raiseSelectedOptions
|
|
2482
2537
|
.options=${e.options}
|
|
@@ -2487,16 +2542,16 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2487
2542
|
</ft-snap-scroll>
|
|
2488
2543
|
`:q}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.isMobileMenuOpen,e=W`
|
|
2489
2544
|
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?W`
|
|
2490
|
-
<ft-chip part="selected-filters"
|
|
2545
|
+
<ft-chip part="selected-filters selected-filter-ft-locale"
|
|
2491
2546
|
?dense=${this.dense&&!this.isMobile}
|
|
2492
2547
|
?clickable=${this.isMobile}
|
|
2493
2548
|
@click=${()=>this.openMobileFilters("ft:contentLocale")}>
|
|
2494
2549
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2495
2550
|
</ft-chip>
|
|
2496
2551
|
`:null}
|
|
2497
|
-
${
|
|
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`
|
|
2498
2553
|
<ft-chip
|
|
2499
|
-
part="selected-filters"
|
|
2554
|
+
part="selected-filters selected-filter-${n}"
|
|
2500
2555
|
?dense=${this.dense&&!this.isMobile}
|
|
2501
2556
|
?clickable=${this.isMobile}
|
|
2502
2557
|
?removable=${!this.isMobile}
|
|
@@ -2505,15 +2560,15 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2505
2560
|
title=${t?s:q}
|
|
2506
2561
|
@click=${()=>this.openMobileFilters(e.key)}
|
|
2507
2562
|
@icon-click=${()=>this.setFilter(e.key,i.filter((t=>t!==o)))}>
|
|
2508
|
-
${function(t){return
|
|
2563
|
+
${function(t){return Xe(t).split("|").pop()}(o)}
|
|
2509
2564
|
</ft-chip>
|
|
2510
|
-
`;return t?
|
|
2565
|
+
`;return t?r:W`
|
|
2511
2566
|
<ft-tooltip inline text="${s}">
|
|
2512
|
-
${
|
|
2567
|
+
${r}
|
|
2513
2568
|
</ft-tooltip>
|
|
2514
2569
|
`}))}))}
|
|
2515
2570
|
${this.isMobile?W`
|
|
2516
|
-
<ft-chip part="selected-filters"
|
|
2571
|
+
<ft-chip part="selected-filters mobile-filters-opener"
|
|
2517
2572
|
icon="add"
|
|
2518
2573
|
clickable
|
|
2519
2574
|
@click=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!0}}>
|
|
@@ -2523,7 +2578,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2523
2578
|
`;return t?W`
|
|
2524
2579
|
<ft-snap-scroll horizontal controls hideScrollbar limitSize
|
|
2525
2580
|
class="ft-search-bar--selected-filters"
|
|
2526
|
-
part="selected-filters-container"
|
|
2581
|
+
part="selected-filters-container"
|
|
2582
|
+
exportpartsPrefix="selected-filters-container">
|
|
2527
2583
|
${e}
|
|
2528
2584
|
</ft-snap-scroll>
|
|
2529
2585
|
`:W`
|
|
@@ -2533,7 +2589,7 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2533
2589
|
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return W`
|
|
2534
2590
|
<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2535
2591
|
@keydown=${this.onSuggestKeyDown}>
|
|
2536
|
-
${
|
|
2592
|
+
${It(t.slice(0,5),(t=>t),(t=>W`
|
|
2537
2593
|
<a href="${this.searchRequestSerializer({...this.request,query:t})}"
|
|
2538
2594
|
part="suggestions"
|
|
2539
2595
|
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
@@ -2547,10 +2603,11 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2547
2603
|
part="remove-suggestion"
|
|
2548
2604
|
?dense=${!this.isMobile}
|
|
2549
2605
|
label="${this.labelResolver.resolve("removeRecentSearch")}"
|
|
2606
|
+
tooltipPosition="left"
|
|
2550
2607
|
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2551
2608
|
</a>
|
|
2552
2609
|
`))}
|
|
2553
|
-
${
|
|
2610
|
+
${It(this.suggestions,(t=>t.value),(t=>W`
|
|
2554
2611
|
<a href="${this.searchRequestSerializer({...this.request,query:t.value})}"
|
|
2555
2612
|
part="suggestions"
|
|
2556
2613
|
class="ft-search-bar--suggestion"
|
|
@@ -2568,8 +2625,8 @@ class gi extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ot)throw Error
|
|
|
2568
2625
|
</ft-typography>
|
|
2569
2626
|
`:null}
|
|
2570
2627
|
</div>
|
|
2571
|
-
`}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`
|
|
2572
2629
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2573
2630
|
${i}
|
|
2574
2631
|
</ft-icon>
|
|
2575
|
-
`}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})}({});
|