@fluid-topics/ft-search-bar 0.3.53 → 0.3.55
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/README.md +6 -2
- package/build/ft-search-bar.light.js +4 -14
- package/build/ft-search-bar.min.js +378 -377
- package/package.json +16 -16
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(n.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(n.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Oi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,s=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}s(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
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 N;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==C||C({ReactiveElement:M}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.4.1");const F=window,R=F.trustedTypes,L=R?R.createPolicy("lit-html",{createHTML:t=>t}):void 0,
|
|
69
|
+
var N;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==C||C({ReactiveElement:M}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.4.1");const F=window,R=F.trustedTypes,L=R?R.createPolicy("lit-html",{createHTML:t=>t}):void 0,D=`lit$${(Math.random()+"").slice(9)}$`,j="?"+D,I=`<${j}>`,U=document,P=(t="")=>U.createComment(t),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,_=t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,K=/>/g,W=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),V=/'/g,q=/"/g,J=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Y=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),G=new WeakMap,tt=U.createTreeWalker(U,129,null,!1),et=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=H;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===H?"!--"===a[1]?n=Z:void 0!==a[1]?n=K:void 0!==a[2]?(J.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=W):void 0!==a[3]&&(n=W):n===W?">"===a[0]?(n=null!=s?s:H,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?W:'"'===a[3]?q:V):n===q||n===V?n=W:n===Z||n===K?n=H:(n=W,s=void 0);const p=n===W&&t[e+1].startsWith("/>")?" ":"";r+=n===H?i+I:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+D+p):i+D+(-2===c?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==L?L.createHTML(l):l,o]};class it{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,c]=et(t,e);if(this.el=it.createElement(a,i),tt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=tt.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(D)){const i=c[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(D),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?lt:"?"===e[1]?ct:"@"===e[1]?ht:nt})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(J.test(o.tagName)){const t=o.textContent.split(D),e=t.length-1;if(e>0){o.textContent=R?R.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],P()),tt.nextNode(),l.push({type:2,index:++s});o.append(t[e],P())}}}else if(8===o.nodeType)if(o.data===j)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(D,t+1));)l.push({type:7,index:s}),t+=D.length-1}s++}}static createElement(t,e){const i=U.createElement("template");return i.innerHTML=t,i}}function ot(t,e,i=t,o){var s,r,n,l;if(e===Y)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const c=A(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=ot(t,a._$AS(t,e.values),a,o)),e}class st{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:U).importNode(i,!0);tt.currentNode=s;let r=tt.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new rt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new pt(r,this,t)),this.u.push(e),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=tt.nextNode(),n++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class rt{constructor(t,e,i,o){var s;this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ot(this,t,e),A(t)?t===Q||null==t||""===t?(this._$AH!==Q&&this._$AR(),this._$AH=Q):t!==this._$AH&&t!==Y&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):_(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==Q&&A(this._$AH)?this._$AA.nextSibling.data=t:this.T(U.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=it.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new st(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new it(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new rt(this.O(P()),this.O(P()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class nt{constructor(t,e,i,o,s){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=ot(this,t,e,0),r=!A(t)||t!==this._$AH&&t!==Y,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=ot(this,o[i+n],e,n),l===Y&&(l=this._$AH[n]),r||(r=!A(l)||l!==this._$AH[n]),l===Q?t=Q:t!==Q&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class lt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Q?void 0:t}}const at=R?R.emptyScript:"";class ct extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Q?this.element.setAttribute(this.name,at):this.element.removeAttribute(this.name)}}class ht extends nt{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=ot(this,t,e,0))&&void 0!==i?i:Q)===Y)return;const o=this._$AH,s=t===Q&&o!==Q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==Q&&(o===Q||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ot(this,t)}}const dt={P:"$lit$",A:D,M:j,C:1,L:et,R:st,D:_,V:ot,I:rt,H:nt,N:ct,U:ht,B:lt,F:pt},ft=F.litHtmlPolyfillSupport;null==ft||ft(it,rt),(null!==(N=F.litHtmlVersions)&&void 0!==N?N:F.litHtmlVersions=[]).push("2.4.0");
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
@@ -103,22 +103,33 @@ var ut,bt;class vt extends M{constructor(){super(...arguments),this.renderOption
|
|
|
103
103
|
-webkit-hyphens: auto;
|
|
104
104
|
hyphens: auto
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
`,Ot=y`
|
|
107
|
+
.ft-safari-ellipsis-fix {
|
|
108
|
+
margin-right: 0;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ft-safari-ellipsis-fix:after {
|
|
113
|
+
content: "\\0000a0";
|
|
114
|
+
display: inline-block;
|
|
115
|
+
width: 0;
|
|
116
|
+
}
|
|
117
|
+
`;class Ct{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);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"),((e,i)=>this.formatValue(t,i))))),s}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):t}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}var Et,zt,Bt;const Mt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Bt=null===(zt=null===(Et=window.safari)||void 0===Et?void 0:Et.pushNotification)||void 0===zt?void 0:zt.toString())&&void 0!==Bt?Bt:""),Nt=1,Ft=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
107
118
|
/**
|
|
108
119
|
* @license
|
|
109
120
|
* Copyright 2017 Google LLC
|
|
110
121
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
111
|
-
*/class
|
|
122
|
+
*/class Lt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
112
123
|
/**
|
|
113
124
|
* @license
|
|
114
125
|
* Copyright 2020 Google LLC
|
|
115
126
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
116
|
-
*/const{I:
|
|
127
|
+
*/const{I:Dt}=dt,jt=()=>document.createComment(""),It=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(jt(),r),o=s.insertBefore(jt(),r);i=new Dt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,l=n!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},Ut=(t,e,i=t)=>(t._$AI(e,i),t),Pt={},At=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}},Tt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},_t=Rt(class extends Lt{constructor(t){if(super(t),t.type!==Ft)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:l}=this.ht(e,i,o);if(!Array.isArray(r))return this.ut=l,n;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let h,p,d=0,f=r.length-1,u=0,b=n.length-1;for(;d<=f&&u<=b;)if(null===r[d])d++;else if(null===r[f])f--;else if(a[d]===l[u])c[u]=Ut(r[d],n[u]),d++,u++;else if(a[f]===l[b])c[b]=Ut(r[f],n[b]),f--,b--;else if(a[d]===l[b])c[b]=Ut(r[d],n[b]),It(t,c[b+1],r[d]),d++,b--;else if(a[f]===l[u])c[u]=Ut(r[f],n[u]),It(t,r[d],r[f]),f--,u++;else if(void 0===h&&(h=Tt(l,u,b),p=Tt(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?r[e]:null;if(null===i){const e=It(t,r[d]);Ut(e,n[u]),c[u]=e}else c[u]=Ut(i,n[u]),It(t,r[d],i),r[e]=null;u++}else At(r[f]),f--;else At(r[d]),d++;for(;u<=b;){const e=It(t,c[b+1]);Ut(e,n[u]),c[u++]=e}for(;d<=f;){const t=r[d++];null!==t&&At(t)}return this.ut=l,((t,e=Pt)=>{t._$AH=e})(t,c),Y}});
|
|
117
128
|
/**
|
|
118
129
|
* @license
|
|
119
130
|
* Copyright 2017 Google LLC
|
|
120
131
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
121
|
-
*/var
|
|
132
|
+
*/var Ht;!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(Ht||(Ht={}));const Zt=y`
|
|
122
133
|
.ft-size-watcher--pixel {
|
|
123
134
|
width: 0;
|
|
124
135
|
height: 0;
|
|
@@ -137,64 +148,55 @@ var ut,bt;class vt extends M{constructor(){super(...arguments),this.renderOption
|
|
|
137
148
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
138
149
|
width: 100%;
|
|
139
150
|
}
|
|
140
|
-
`;var
|
|
151
|
+
`;var Kt=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Wt extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class Vt extends wt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=Ht.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e}render(){return X`
|
|
141
152
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
142
153
|
<div class="ft-size-watcher--watcher"></div>
|
|
143
154
|
</div>
|
|
144
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=
|
|
155
|
+
`}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=Ht.S:this.size<976?this.category=Ht.M:this.size<1024?this.category=Ht.L:this.size<1440?this.category=Ht.XL:this.category=Ht.XXL,this.dispatchEvent(new Wt(this.size,this.category)))}),this.debounceTimeout)}}Vt.elementDefinitions={},Vt.styles=Zt,Kt([o({type:Number})],Vt.prototype,"debounceTimeout",void 0),Kt([o({type:Boolean})],Vt.prototype,"local",void 0),Kt([o({type:Number,reflect:!0})],Vt.prototype,"size",void 0),Kt([o({type:String,reflect:!0})],Vt.prototype,"category",void 0),Kt([n(".ft-size-watcher--watcher")],Vt.prototype,"watcher",void 0),h("ft-size-watcher")(Vt);
|
|
145
156
|
/**
|
|
146
157
|
* @license
|
|
147
158
|
* Copyright 2020 Google LLC
|
|
148
159
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
149
160
|
*/
|
|
150
|
-
const
|
|
161
|
+
const qt=Symbol.for(""),Jt=t=>{if((null==t?void 0:t.r)===qt)return null==t?void 0:t._$litStatic$},Xt=t=>({_$litStatic$:t,r:qt}),Yt=new Map,Qt=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(r=i[c],s=Jt(r));)a+=s+e[++c],h=!0;l.push(r),n.push(a),c++}if(c===o&&n.push(e[o]),h){const t=n.join("$$lit$$");void 0===(e=Yt.get(t))&&(n.raw=n,Yt.set(t,e=n)),i=l}return t(e,...i)})(X);var Gt;!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"}(Gt||(Gt={}));const te=xt.extend("--ft-typography-font-family",mt.titleFont),ee=xt.extend("--ft-typography-font-family",mt.contentFont),ie={fontFamily:ee,fontSize:xt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:xt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:xt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:xt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:xt.create("--ft-typography-text-transform","UNKNOWN","inherit")},oe=xt.extend("--ft-typography-title-font-family",te),se=xt.extend("--ft-typography-title-font-size",ie.fontSize,"20px"),re=xt.extend("--ft-typography-title-font-weight",ie.fontWeight,"normal"),ne=xt.extend("--ft-typography-title-letter-spacing",ie.letterSpacing,"0.15px"),le=xt.extend("--ft-typography-title-line-height",ie.lineHeight,"1.2"),ae=xt.extend("--ft-typography-title-text-transform",ie.textTransform,"inherit"),ce=xt.extend("--ft-typography-title-dense-font-family",te),he=xt.extend("--ft-typography-title-dense-font-size",ie.fontSize,"14px"),pe=xt.extend("--ft-typography-title-dense-font-weight",ie.fontWeight,"normal"),de=xt.extend("--ft-typography-title-dense-letter-spacing",ie.letterSpacing,"0.105px"),fe=xt.extend("--ft-typography-title-dense-line-height",ie.lineHeight,"1.7"),ue=xt.extend("--ft-typography-title-dense-text-transform",ie.textTransform,"inherit"),be=xt.extend("--ft-typography-subtitle1-font-family",ee),ve=xt.extend("--ft-typography-subtitle1-font-size",ie.fontSize,"16px"),ge=xt.extend("--ft-typography-subtitle1-font-weight",ie.fontWeight,"600"),xe=xt.extend("--ft-typography-subtitle1-letter-spacing",ie.letterSpacing,"0.144px"),ye=xt.extend("--ft-typography-subtitle1-line-height",ie.lineHeight,"1.5"),me=xt.extend("--ft-typography-subtitle1-text-transform",ie.textTransform,"inherit"),$e=xt.extend("--ft-typography-subtitle2-font-family",ee),we=xt.extend("--ft-typography-subtitle2-font-size",ie.fontSize,"14px"),ke=xt.extend("--ft-typography-subtitle2-font-weight",ie.fontWeight,"normal"),Se=xt.extend("--ft-typography-subtitle2-letter-spacing",ie.letterSpacing,"0.098px"),Oe=xt.extend("--ft-typography-subtitle2-line-height",ie.lineHeight,"1.7"),Ce=xt.extend("--ft-typography-subtitle2-text-transform",ie.textTransform,"inherit"),Ee={fontFamily:xt.extend("--ft-typography-body1-font-family",ee),fontSize:xt.extend("--ft-typography-body1-font-size",ie.fontSize,"16px"),fontWeight:xt.extend("--ft-typography-body1-font-weight",ie.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-body1-letter-spacing",ie.letterSpacing,"0.496px"),lineHeight:xt.extend("--ft-typography-body1-line-height",ie.lineHeight,"1.5"),textTransform:xt.extend("--ft-typography-body1-text-transform",ie.textTransform,"inherit")},ze={fontFamily:xt.extend("--ft-typography-body2-font-family",ee),fontSize:xt.extend("--ft-typography-body2-font-size",ie.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-body2-font-weight",ie.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-body2-letter-spacing",ie.letterSpacing,"0.252px"),lineHeight:xt.extend("--ft-typography-body2-line-height",ie.lineHeight,"1.4"),textTransform:xt.extend("--ft-typography-body2-text-transform",ie.textTransform,"inherit")},Be={fontFamily:xt.extend("--ft-typography-caption-font-family",ee),fontSize:xt.extend("--ft-typography-caption-font-size",ie.fontSize,"12px"),fontWeight:xt.extend("--ft-typography-caption-font-weight",ie.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-caption-letter-spacing",ie.letterSpacing,"0.396px"),lineHeight:xt.extend("--ft-typography-caption-line-height",ie.lineHeight,"1.33"),textTransform:xt.extend("--ft-typography-caption-text-transform",ie.textTransform,"inherit")},Me=xt.extend("--ft-typography-breadcrumb-font-family",ee),Ne=xt.extend("--ft-typography-breadcrumb-font-size",ie.fontSize,"10px"),Fe=xt.extend("--ft-typography-breadcrumb-font-weight",ie.fontWeight,"normal"),Re=xt.extend("--ft-typography-breadcrumb-letter-spacing",ie.letterSpacing,"0.33px"),Le=xt.extend("--ft-typography-breadcrumb-line-height",ie.lineHeight,"1.6"),De=xt.extend("--ft-typography-breadcrumb-text-transform",ie.textTransform,"inherit"),je=xt.extend("--ft-typography-overline-font-family",ee),Ie=xt.extend("--ft-typography-overline-font-size",ie.fontSize,"10px"),Ue=xt.extend("--ft-typography-overline-font-weight",ie.fontWeight,"normal"),Pe=xt.extend("--ft-typography-overline-letter-spacing",ie.letterSpacing,"1.5px"),Ae=xt.extend("--ft-typography-overline-line-height",ie.lineHeight,"1.6"),Te=xt.extend("--ft-typography-overline-text-transform",ie.textTransform,"uppercase"),_e={fontFamily:xt.extend("--ft-typography-button-font-family",ee),fontSize:xt.extend("--ft-typography-button-font-size",ie.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-button-font-weight",ie.fontWeight,"600"),letterSpacing:xt.extend("--ft-typography-button-letter-spacing",ie.letterSpacing,"1.246px"),lineHeight:xt.extend("--ft-typography-button-line-height",ie.lineHeight,"1.15"),textTransform:xt.extend("--ft-typography-button-text-transform",ie.textTransform,"uppercase")},He=y`
|
|
151
162
|
.ft-typography--title {
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
158
|
-
}
|
|
159
|
-
`,He=y`
|
|
160
|
-
.ft-typography--title-dense {
|
|
161
|
-
font-family: ${ae};
|
|
162
|
-
font-size: ${ce};
|
|
163
|
-
font-weight: ${he};
|
|
164
|
-
letter-spacing: ${pe};
|
|
165
|
-
line-height: ${de};
|
|
166
|
-
text-transform: ${fe};
|
|
163
|
+
font-family: ${oe};
|
|
164
|
+
font-size: ${se};
|
|
165
|
+
font-weight: ${re};
|
|
166
|
+
letter-spacing: ${ne};
|
|
167
|
+
line-height: ${le};
|
|
168
|
+
text-transform: ${ae};
|
|
167
169
|
}
|
|
168
170
|
`,Ze=y`
|
|
169
|
-
.ft-typography--
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
171
|
+
.ft-typography--title-dense {
|
|
172
|
+
font-family: ${ce};
|
|
173
|
+
font-size: ${he};
|
|
174
|
+
font-weight: ${pe};
|
|
175
|
+
letter-spacing: ${de};
|
|
176
|
+
line-height: ${fe};
|
|
177
|
+
text-transform: ${ue};
|
|
176
178
|
}
|
|
177
179
|
`,Ke=y`
|
|
178
|
-
.ft-typography--
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
180
|
+
.ft-typography--subtitle1 {
|
|
181
|
+
font-family: ${be};
|
|
182
|
+
font-size: ${ve};
|
|
183
|
+
font-weight: ${ge};
|
|
184
|
+
letter-spacing: ${xe};
|
|
185
|
+
line-height: ${ye};
|
|
186
|
+
text-transform: ${me};
|
|
185
187
|
}
|
|
186
|
-
|
|
187
188
|
`,We=y`
|
|
188
|
-
.ft-typography--
|
|
189
|
-
font-family: ${
|
|
190
|
-
font-size: ${
|
|
191
|
-
font-weight: ${
|
|
192
|
-
letter-spacing: ${
|
|
193
|
-
line-height: ${
|
|
194
|
-
text-transform: ${Ce
|
|
189
|
+
.ft-typography--subtitle2 {
|
|
190
|
+
font-family: ${$e};
|
|
191
|
+
font-size: ${we};
|
|
192
|
+
font-weight: ${ke};
|
|
193
|
+
letter-spacing: ${Se};
|
|
194
|
+
line-height: ${Oe};
|
|
195
|
+
text-transform: ${Ce};
|
|
195
196
|
}
|
|
197
|
+
|
|
196
198
|
`,Ve=y`
|
|
197
|
-
.ft-typography--
|
|
199
|
+
.ft-typography--body1 {
|
|
198
200
|
font-family: ${Ee.fontFamily};
|
|
199
201
|
font-size: ${Ee.fontSize};
|
|
200
202
|
font-weight: ${Ee.fontWeight};
|
|
@@ -203,7 +205,7 @@ const Vt=Symbol.for(""),qt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void
|
|
|
203
205
|
text-transform: ${Ee.textTransform};
|
|
204
206
|
}
|
|
205
207
|
`,qe=y`
|
|
206
|
-
.ft-typography--
|
|
208
|
+
.ft-typography--body2 {
|
|
207
209
|
font-family: ${ze.fontFamily};
|
|
208
210
|
font-size: ${ze.fontSize};
|
|
209
211
|
font-weight: ${ze.fontWeight};
|
|
@@ -212,50 +214,59 @@ const Vt=Symbol.for(""),qt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void
|
|
|
212
214
|
text-transform: ${ze.textTransform};
|
|
213
215
|
}
|
|
214
216
|
`,Je=y`
|
|
215
|
-
.ft-typography--
|
|
216
|
-
font-family: ${Be};
|
|
217
|
-
font-size: ${
|
|
218
|
-
font-weight: ${
|
|
219
|
-
letter-spacing: ${
|
|
220
|
-
line-height: ${
|
|
221
|
-
text-transform: ${
|
|
217
|
+
.ft-typography--caption {
|
|
218
|
+
font-family: ${Be.fontFamily};
|
|
219
|
+
font-size: ${Be.fontSize};
|
|
220
|
+
font-weight: ${Be.fontWeight};
|
|
221
|
+
letter-spacing: ${Be.letterSpacing};
|
|
222
|
+
line-height: ${Be.lineHeight};
|
|
223
|
+
text-transform: ${Be.textTransform};
|
|
222
224
|
}
|
|
223
225
|
`,Xe=y`
|
|
224
|
-
.ft-typography--
|
|
225
|
-
font-family: ${
|
|
226
|
-
font-size: ${
|
|
227
|
-
font-weight: ${
|
|
228
|
-
letter-spacing: ${
|
|
229
|
-
line-height: ${
|
|
230
|
-
text-transform: ${
|
|
226
|
+
.ft-typography--breadcrumb {
|
|
227
|
+
font-family: ${Me};
|
|
228
|
+
font-size: ${Ne};
|
|
229
|
+
font-weight: ${Fe};
|
|
230
|
+
letter-spacing: ${Re};
|
|
231
|
+
line-height: ${Le};
|
|
232
|
+
text-transform: ${De};
|
|
231
233
|
}
|
|
232
234
|
`,Ye=y`
|
|
233
|
-
.ft-typography--
|
|
234
|
-
font-family: ${
|
|
235
|
-
font-size: ${
|
|
236
|
-
font-weight: ${
|
|
237
|
-
letter-spacing: ${
|
|
238
|
-
line-height: ${
|
|
239
|
-
text-transform: ${Te
|
|
235
|
+
.ft-typography--overline {
|
|
236
|
+
font-family: ${je};
|
|
237
|
+
font-size: ${Ie};
|
|
238
|
+
font-weight: ${Ue};
|
|
239
|
+
letter-spacing: ${Pe};
|
|
240
|
+
line-height: ${Ae};
|
|
241
|
+
text-transform: ${Te};
|
|
240
242
|
}
|
|
241
243
|
`,Qe=y`
|
|
244
|
+
.ft-typography--button {
|
|
245
|
+
font-family: ${_e.fontFamily};
|
|
246
|
+
font-size: ${_e.fontSize};
|
|
247
|
+
font-weight: ${_e.fontWeight};
|
|
248
|
+
letter-spacing: ${_e.letterSpacing};
|
|
249
|
+
line-height: ${_e.lineHeight};
|
|
250
|
+
text-transform: ${_e.textTransform};
|
|
251
|
+
}
|
|
252
|
+
`,Ge=y`
|
|
242
253
|
.ft-typography {
|
|
243
254
|
vertical-align: inherit;
|
|
244
255
|
}
|
|
245
|
-
`;var
|
|
246
|
-
<${
|
|
256
|
+
`;var ti=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ei extends wt{constructor(){super(...arguments),this.variant=Gt.body1}render(){return this.element?Qt`
|
|
257
|
+
<${Xt(this.element)}
|
|
247
258
|
class="ft-typography ft-typography--${this.variant}">
|
|
248
259
|
<slot></slot>
|
|
249
|
-
</${
|
|
250
|
-
`:
|
|
260
|
+
</${Xt(this.element)}>
|
|
261
|
+
`:Qt`
|
|
251
262
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
252
|
-
`}}function
|
|
263
|
+
`}}function ii(t,e){return t.flatMap((t=>[t,...ii(e(t),e)]))}function oi(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function si(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>si(e,t.selected))),value:t.value}}function ri(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>si(t,!1)))}}ei.styles=[He,Ze,Ke,We,Ve,qe,Je,Xe,Ye,Qe,Ge],ti([o()],ei.prototype,"element",void 0),ti([o()],ei.prototype,"variant",void 0),h("ft-typography")(ei);
|
|
253
264
|
/**
|
|
254
265
|
* @license
|
|
255
266
|
* Copyright 2018 Google LLC
|
|
256
267
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
257
268
|
*/
|
|
258
|
-
const
|
|
269
|
+
const ni=Rt(class extends Lt{constructor(t){var e;if(super(t),t.type!==Nt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const s=t.element.classList;this.nt.forEach((t=>{t in e||(s.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.nt.add(t)):(s.remove(t),this.nt.delete(t)))}return Y}}),li=xt.extend("--ft-ripple-color",mt.colorContent),ai={color:li,backgroundColor:xt.extend("--ft-ripple-background-color",li),opacityContentOnSurfacePressed:xt.external(mt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xt.external(mt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xt.external(mt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xt.external(mt.opacityContentOnSurfaceSelected,"Design system")},ci=xt.extend("--ft-ripple-color",mt.colorPrimary),hi=ci,pi=xt.extend("--ft-ripple-background-color",ci),di=xt.extend("--ft-ripple-color",mt.colorSecondary),fi=di,ui=xt.extend("--ft-ripple-background-color",di),bi=y`
|
|
259
270
|
:host {
|
|
260
271
|
display: contents;
|
|
261
272
|
}
|
|
@@ -277,27 +288,27 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
277
288
|
}
|
|
278
289
|
|
|
279
290
|
.ft-ripple .ft-ripple--background {
|
|
280
|
-
background-color: ${
|
|
291
|
+
background-color: ${ai.backgroundColor};
|
|
281
292
|
}
|
|
282
293
|
|
|
283
294
|
.ft-ripple .ft-ripple--effect {
|
|
284
|
-
background-color: ${
|
|
295
|
+
background-color: ${ai.color};
|
|
285
296
|
}
|
|
286
297
|
|
|
287
298
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
288
|
-
background-color: ${
|
|
299
|
+
background-color: ${ui};
|
|
289
300
|
}
|
|
290
301
|
|
|
291
302
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
292
|
-
background-color: ${
|
|
303
|
+
background-color: ${fi};
|
|
293
304
|
}
|
|
294
305
|
|
|
295
306
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
296
|
-
background-color: ${
|
|
307
|
+
background-color: ${pi};
|
|
297
308
|
}
|
|
298
309
|
|
|
299
310
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
300
|
-
background-color: ${
|
|
311
|
+
background-color: ${hi};
|
|
301
312
|
}
|
|
302
313
|
|
|
303
314
|
.ft-ripple .ft-ripple--background {
|
|
@@ -329,22 +340,22 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
329
340
|
}
|
|
330
341
|
|
|
331
342
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
332
|
-
opacity: ${
|
|
343
|
+
opacity: ${ai.opacityContentOnSurfaceHover};
|
|
333
344
|
}
|
|
334
345
|
|
|
335
346
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
336
|
-
opacity: ${
|
|
347
|
+
opacity: ${ai.opacityContentOnSurfaceSelected};
|
|
337
348
|
}
|
|
338
349
|
|
|
339
350
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
340
|
-
opacity: ${
|
|
351
|
+
opacity: ${ai.opacityContentOnSurfaceFocused};
|
|
341
352
|
}
|
|
342
353
|
|
|
343
354
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
344
|
-
opacity: ${
|
|
355
|
+
opacity: ${ai.opacityContentOnSurfacePressed};
|
|
345
356
|
transform: translate(-50%, -50%) scale(1);
|
|
346
357
|
}
|
|
347
|
-
`;var
|
|
358
|
+
`;var vi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class gi extends wt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return X`
|
|
348
359
|
<style>
|
|
349
360
|
.ft-ripple .ft-ripple--effect,
|
|
350
361
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -357,11 +368,11 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
357
368
|
top: ${this.originY}px;
|
|
358
369
|
}
|
|
359
370
|
</style>
|
|
360
|
-
<div class="${
|
|
371
|
+
<div class="${ni(t)}">
|
|
361
372
|
<div class="ft-ripple--background"></div>
|
|
362
373
|
<div class="ft-ripple--effect"></div>
|
|
363
374
|
</div>
|
|
364
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
375
|
+
`}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()}}gi.elementDefinitions={},gi.styles=bi,vi([o({type:Boolean})],gi.prototype,"primary",void 0),vi([o({type:Boolean})],gi.prototype,"secondary",void 0),vi([o({type:Boolean})],gi.prototype,"unbounded",void 0),vi([o({type:Boolean})],gi.prototype,"activated",void 0),vi([o({type:Boolean})],gi.prototype,"selected",void 0),vi([o({type:Boolean})],gi.prototype,"disabled",void 0),vi([s()],gi.prototype,"hovered",void 0),vi([s()],gi.prototype,"focused",void 0),vi([s()],gi.prototype,"pressed",void 0),vi([s()],gi.prototype,"rippling",void 0),vi([s()],gi.prototype,"rippleSize",void 0),vi([s()],gi.prototype,"originX",void 0),vi([s()],gi.prototype,"originY",void 0),vi([n(".ft-ripple")],gi.prototype,"ripple",void 0),vi([n(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),h("ft-ripple")(gi);const xi={distance:xt.create("--ft-tooltip-distance","SIZE","4px"),color:xt.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:xt.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:xt.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:xt.external(mt.borderRadiusS,"Design system"),maxWidth:xt.create("--ft-tooltip-max-width","SIZE","150px")},yi=y`
|
|
365
376
|
.ft-tooltip--container {
|
|
366
377
|
display: block;
|
|
367
378
|
position: relative;
|
|
@@ -377,23 +388,23 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
377
388
|
box-sizing: border-box;
|
|
378
389
|
overflow: hidden;
|
|
379
390
|
width: max-content;
|
|
380
|
-
max-width: ${
|
|
391
|
+
max-width: ${xi.maxWidth};
|
|
381
392
|
text-align: center;
|
|
382
|
-
padding: ${
|
|
383
|
-
z-index: ${
|
|
393
|
+
padding: ${xi.distance};
|
|
394
|
+
z-index: ${xi.zIndex};
|
|
384
395
|
}
|
|
385
396
|
|
|
386
397
|
.ft-tooltip--content {
|
|
387
398
|
padding: 4px 8px;
|
|
388
|
-
border-radius: ${
|
|
389
|
-
background-color: ${
|
|
390
|
-
color: ${
|
|
399
|
+
border-radius: ${xi.borderRadiusS};
|
|
400
|
+
background-color: ${xi.backgroundColor};
|
|
401
|
+
color: ${xi.color};
|
|
391
402
|
top: -500px;
|
|
392
403
|
left: -500px;
|
|
393
404
|
position: relative;
|
|
394
405
|
word-break: break-word;
|
|
395
406
|
}
|
|
396
|
-
`;var
|
|
407
|
+
`;var mi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class $i extends wt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return X`
|
|
397
408
|
<div part="container"
|
|
398
409
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
399
410
|
@mouseenter=${this.onHover}
|
|
@@ -411,7 +422,7 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
411
422
|
</div>
|
|
412
423
|
</div>
|
|
413
424
|
</div>
|
|
414
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${
|
|
425
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${xi.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}$i.elementDefinitions={"ft-typography":ei},$i.styles=yi,mi([o()],$i.prototype,"text",void 0),mi([o({type:Boolean})],$i.prototype,"manual",void 0),mi([o({type:Boolean})],$i.prototype,"inline",void 0),mi([o({type:Number})],$i.prototype,"delay",void 0),mi([o()],$i.prototype,"position",void 0),mi([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],$i.prototype,"slotNodes",void 0),mi([n(".ft-tooltip--container")],$i.prototype,"container",void 0),mi([n("slot")],$i.prototype,"target",void 0),mi([n(".ft-tooltip")],$i.prototype,"tooltip",void 0),mi([n(".ft-tooltip--content")],$i.prototype,"tooltipContent",void 0),mi([s()],$i.prototype,"visible",void 0),h("ft-tooltip")($i);const wi={color:xt.extend("--ft-loader-color",mt.colorPrimary),size:xt.create("--ft-loader-size","SIZE","80px")},ki=y`
|
|
415
426
|
:host {
|
|
416
427
|
line-height: 0;
|
|
417
428
|
}
|
|
@@ -420,8 +431,8 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
420
431
|
display: inline-block;
|
|
421
432
|
position: relative;
|
|
422
433
|
|
|
423
|
-
width: ${
|
|
424
|
-
height: ${
|
|
434
|
+
width: ${wi.size};
|
|
435
|
+
height: ${wi.size};
|
|
425
436
|
}
|
|
426
437
|
|
|
427
438
|
.ft-loader div {
|
|
@@ -430,7 +441,7 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
430
441
|
width: 25%;
|
|
431
442
|
height: 25%;
|
|
432
443
|
border-radius: 50%;
|
|
433
|
-
background: ${
|
|
444
|
+
background: ${wi.color};
|
|
434
445
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
435
446
|
}
|
|
436
447
|
|
|
@@ -477,23 +488,23 @@ const ri=Ft(class extends Rt{constructor(t){var e;if(super(t),t.type!==Mt||"clas
|
|
|
477
488
|
transform: translate(0, 0);
|
|
478
489
|
}
|
|
479
490
|
100% {
|
|
480
|
-
transform: translate(calc(0.35 * ${
|
|
491
|
+
transform: translate(calc(0.35 * ${wi.size}), 0);
|
|
481
492
|
}
|
|
482
493
|
}
|
|
483
|
-
`;class
|
|
494
|
+
`;class Si extends wt{render(){return X`
|
|
484
495
|
<div class="ft-loader">
|
|
485
496
|
<div></div>
|
|
486
497
|
<div></div>
|
|
487
498
|
<div></div>
|
|
488
499
|
<div></div>
|
|
489
500
|
</div>
|
|
490
|
-
`}}
|
|
501
|
+
`}}Si.styles=ki,h("ft-loader")(Si);
|
|
491
502
|
/**
|
|
492
503
|
* @license
|
|
493
504
|
* Copyright 2017 Google LLC
|
|
494
505
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
495
506
|
*/
|
|
496
|
-
class
|
|
507
|
+
class Oi extends Lt{constructor(t){if(super(t),this.it=Q,t.type!==Ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Q||null==t)return this._t=void 0,this.it=t;if(t===Y)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Oi.directiveName="unsafeHTML",Oi.resultType=1;const Ci=Rt(Oi);var Ei,zi;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",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.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="",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=""}(Ei||(Ei={})),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=""}(zi||(zi={}));const Bi=new Map([...["abw"].map((t=>[t,zi.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,zi.AUDIO])),...["avi"].map((t=>[t,zi.AVI])),...["chm","xhs"].map((t=>[t,zi.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,zi.CODE])),...["csv"].map((t=>[t,zi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,zi.DITA])),...["epub"].map((t=>[t,zi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,zi.EXCEL])),...["flac"].map((t=>[t,zi.FLAC])),...["gif"].map((t=>[t,zi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,zi.GZIP])),...["html","htm","xhtml"].map((t=>[t,zi.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,zi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,zi.JPEG])),...["json"].map((t=>[t,zi.JSON])),...["m4a","m4p"].map((t=>[t,zi.M4A])),...["mov","qt"].map((t=>[t,zi.MOV])),...["mp3"].map((t=>[t,zi.MP3])),...["mp4","m4v"].map((t=>[t,zi.MP4])),...["ogg","oga"].map((t=>[t,zi.OGG])),...["pdf","ps"].map((t=>[t,zi.PDF])),...["png"].map((t=>[t,zi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,zi.POWERPOINT])),...["rar"].map((t=>[t,zi.RAR])),...["stp"].map((t=>[t,zi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,zi.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,zi.VIDEO])),...["wav"].map((t=>[t,zi.WAV])),...["wma"].map((t=>[t,zi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,zi.WORD])),...["xml","xsl","rdf"].map((t=>[t,zi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,zi.YAML])),...["zip"].map((t=>[t,zi.ZIP]))]),Mi=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);const Ni={size:xt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:xt.extend("--ft-icon-fluid-topics-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:xt.extend("--ft-icon-file-format-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:xt.extend("--ft-icon-material-font-family",xt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:xt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Fi=y`
|
|
497
508
|
:host, i.ft-icon {
|
|
498
509
|
display: inline-flex;
|
|
499
510
|
align-items: center;
|
|
@@ -502,14 +513,14 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
502
513
|
}
|
|
503
514
|
|
|
504
515
|
:host {
|
|
505
|
-
width: ${
|
|
506
|
-
height: ${
|
|
516
|
+
width: ${Ni.size};
|
|
517
|
+
height: ${Ni.size};
|
|
507
518
|
}
|
|
508
519
|
|
|
509
520
|
i.ft-icon {
|
|
510
521
|
width: 100%;
|
|
511
522
|
height: 100%;
|
|
512
|
-
font-size: ${
|
|
523
|
+
font-size: ${Ni.size};
|
|
513
524
|
line-height: 1;
|
|
514
525
|
font-weight: normal;
|
|
515
526
|
text-transform: none;
|
|
@@ -520,32 +531,32 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
520
531
|
text-rendering: auto;
|
|
521
532
|
-webkit-font-smoothing: antialiased;
|
|
522
533
|
-moz-osx-font-smoothing: grayscale;
|
|
523
|
-
vertical-align: ${
|
|
534
|
+
vertical-align: ${Ni.verticalAlign};
|
|
524
535
|
}
|
|
525
536
|
|
|
526
537
|
i.ft-icon.ft-icon--fluid-topics {
|
|
527
|
-
font-family: ${
|
|
538
|
+
font-family: ${Ni.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
528
539
|
|
|
529
540
|
/* Ugly fix because font is broken */
|
|
530
|
-
font-size: calc(0.9 * ${
|
|
541
|
+
font-size: calc(0.9 * ${Ni.size});
|
|
531
542
|
position: relative;
|
|
532
543
|
top: -5%;
|
|
533
544
|
justify-content: center;
|
|
534
545
|
}
|
|
535
546
|
|
|
536
547
|
.ft-icon--file-format {
|
|
537
|
-
font-family: ${
|
|
548
|
+
font-family: ${Ni.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
538
549
|
}
|
|
539
550
|
|
|
540
551
|
.ft-icon--material {
|
|
541
|
-
font-family: ${
|
|
552
|
+
font-family: ${Ni.materialFontFamily}, "Material Icons", sans-serif;
|
|
542
553
|
}
|
|
543
|
-
`;var
|
|
554
|
+
`;var Ri;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ri||(Ri={}));var Li=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Di extends wt{constructor(){super(...arguments),this.variant=Ri.fluid_topics,this.resolvedIcon=Q}render(){const t="material"!==this.variant||this.value;return X`
|
|
544
555
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
545
|
-
${
|
|
556
|
+
${Ci(this.resolvedIcon)}
|
|
546
557
|
<slot ?hidden=${t}></slot>
|
|
547
558
|
</i>
|
|
548
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
559
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Ri.file_format:this.resolvedIcon=null!==(t=zi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Ri.fluid_topics:this.resolvedIcon=null!==(e=Ei[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||Q}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Di.elementDefinitions={},Di.styles=Fi,Li([o()],Di.prototype,"variant",void 0),Li([o()],Di.prototype,"value",void 0),Li([s()],Di.prototype,"resolvedIcon",void 0),Li([n("slot")],Di.prototype,"slottedContent",void 0),h("ft-icon")(Di);const ji=xt.extend("--ft-button-color",mt.colorPrimary),Ii={backgroundColor:xt.extend("--ft-button-background-color",mt.colorSurface),borderRadius:xt.extend("--ft-button-border-radius",mt.borderRadiusL),color:ji,fontSize:xt.extend("--ft-button-font-size",_e.fontSize),iconSize:xt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:xt.extend("--ft-button-ripple-color",ji),opacityDisabled:xt.external(mt.colorOpacityDisabled,"Design system")},Ui=xt.extend("--ft-button-primary-color",xt.extend("--ft-button-color",mt.colorOnPrimary)),Pi={backgroundColor:xt.extend("--ft-button-primary-background-color",xt.extend("--ft-button-background-color",mt.colorPrimary)),color:Ui,rippleColor:xt.extend("--ft-button-primary-ripple-color",Ui)},Ai=xt.extend("--ft-button-dense-border-radius",xt.extend("--ft-button-border-radius",mt.borderRadiusM)),Ti=[kt,y`
|
|
549
560
|
:host {
|
|
550
561
|
display: inline-block;
|
|
551
562
|
max-width: 100%;
|
|
@@ -556,7 +567,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
556
567
|
box-shadow: 0px 0px 0px transparent;
|
|
557
568
|
border: 0px solid transparent;
|
|
558
569
|
text-shadow: 0px 0px 0px transparent;
|
|
559
|
-
font-size: ${
|
|
570
|
+
font-size: ${Ii.fontSize};
|
|
560
571
|
}
|
|
561
572
|
|
|
562
573
|
button:hover {
|
|
@@ -585,17 +596,17 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
585
596
|
border: none;
|
|
586
597
|
pointer-events: auto;
|
|
587
598
|
|
|
588
|
-
--ft-button-internal-line-height: calc(${
|
|
589
|
-
--ft-button-internal-color: ${
|
|
590
|
-
${yt(
|
|
599
|
+
--ft-button-internal-line-height: calc(${Ii.fontSize} + 2px);
|
|
600
|
+
--ft-button-internal-color: ${Ii.color};
|
|
601
|
+
${yt(Ni.size,Ii.iconSize)};
|
|
591
602
|
--ft-button-internal-vertical-padding: 6px;
|
|
592
603
|
--ft-button-internal-horizontal-padding: 8px;
|
|
593
|
-
${yt(
|
|
594
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
604
|
+
${yt(ai.color,Ii.rippleColor)};
|
|
605
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ii.iconSize});
|
|
595
606
|
|
|
596
|
-
border-radius: ${
|
|
607
|
+
border-radius: ${Ii.borderRadius};
|
|
597
608
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
598
|
-
background-color: ${
|
|
609
|
+
background-color: ${Ii.backgroundColor};
|
|
599
610
|
color: var(--ft-button-internal-color);
|
|
600
611
|
-webkit-mask-image: radial-gradient(white, black);
|
|
601
612
|
}
|
|
@@ -607,7 +618,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
607
618
|
.ft-button--dense {
|
|
608
619
|
--ft-button-internal-vertical-padding: 2px;
|
|
609
620
|
--ft-button-internal-horizontal-padding: 4px;
|
|
610
|
-
border-radius: ${
|
|
621
|
+
border-radius: ${Ai};
|
|
611
622
|
}
|
|
612
623
|
|
|
613
624
|
.ft-button--round {
|
|
@@ -616,13 +627,13 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
616
627
|
|
|
617
628
|
.ft-button[disabled] {
|
|
618
629
|
filter: grayscale(1);
|
|
619
|
-
opacity: ${
|
|
630
|
+
opacity: ${Ii.opacityDisabled};
|
|
620
631
|
}
|
|
621
632
|
|
|
622
633
|
.ft-button.ft-button--primary {
|
|
623
|
-
background-color: ${
|
|
624
|
-
--ft-button-internal-color: ${
|
|
625
|
-
${yt(
|
|
634
|
+
background-color: ${Pi.backgroundColor};
|
|
635
|
+
--ft-button-internal-color: ${Pi.color};
|
|
636
|
+
${yt(ai.color,Pi.rippleColor)};
|
|
626
637
|
}
|
|
627
638
|
|
|
628
639
|
.ft-button.ft-button--outlined {
|
|
@@ -641,20 +652,10 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
641
652
|
text-overflow: ellipsis;
|
|
642
653
|
display: block;
|
|
643
654
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
644
|
-
${yt(
|
|
645
|
-
${yt(
|
|
655
|
+
${yt(_e.fontSize,"1em")};
|
|
656
|
+
${yt(_e.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
646
657
|
}
|
|
647
|
-
|
|
648
|
-
.ft-button--safari-fix .ft-button--label {
|
|
649
|
-
margin-right: 0;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
653
|
-
content: "\\0000a0";
|
|
654
|
-
display: inline-block;
|
|
655
|
-
width: 0;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
+
|
|
658
659
|
.ft-button--label[hidden] {
|
|
659
660
|
display: none;
|
|
660
661
|
}
|
|
@@ -675,19 +676,19 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
675
676
|
}
|
|
676
677
|
|
|
677
678
|
ft-loader {
|
|
678
|
-
${yt(
|
|
679
|
-
${yt(
|
|
679
|
+
${yt(wi.size,Ii.iconSize)};
|
|
680
|
+
${yt(wi.color,"var(--ft-button-internal-color)")};
|
|
680
681
|
}
|
|
681
|
-
`];var
|
|
682
|
+
`];var _i=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Hi extends wt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Ri.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(X`
|
|
682
683
|
<button part="button"
|
|
683
|
-
class="${
|
|
684
|
+
class="${ni(t)}"
|
|
684
685
|
aria-label="${this.getLabel()}"
|
|
685
686
|
?disabled=${this.isDisabled()}>
|
|
686
687
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
687
688
|
<ft-typography part="label"
|
|
688
689
|
variant="button"
|
|
689
690
|
element="span"
|
|
690
|
-
class="ft-button--label"
|
|
691
|
+
class="ft-button--label ${Mt?"ft-safari-ellipsis-fix":""}"
|
|
691
692
|
?hidden=${!this.hasTextContent()}>
|
|
692
693
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
693
694
|
</ft-typography>
|
|
@@ -701,14 +702,14 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
701
702
|
</ft-tooltip>
|
|
702
703
|
`:t}resolveIcon(){return this.loading?X`
|
|
703
704
|
<ft-loader></ft-loader> `:this.icon?X`
|
|
704
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Q}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
705
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Q}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Hi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":$i,"ft-typography":ei,"ft-icon":Di,"ft-loader":Si},Hi.styles=[Ot,Ti],_i([o({type:Boolean})],Hi.prototype,"primary",void 0),_i([o({type:Boolean})],Hi.prototype,"outlined",void 0),_i([o({type:Boolean})],Hi.prototype,"disabled",void 0),_i([o({type:Boolean})],Hi.prototype,"dense",void 0),_i([o({type:Boolean})],Hi.prototype,"round",void 0),_i([o({type:String})],Hi.prototype,"label",void 0),_i([o({type:String})],Hi.prototype,"icon",void 0),_i([o({type:String})],Hi.prototype,"iconVariant",void 0),_i([o({type:Boolean})],Hi.prototype,"trailingIcon",void 0),_i([o({type:Boolean})],Hi.prototype,"loading",void 0),_i([o({type:String})],Hi.prototype,"tooltipPosition",void 0),_i([o({type:Boolean})],Hi.prototype,"hideTooltip",void 0),_i([o({type:Boolean})],Hi.prototype,"forceTooltip",void 0),_i([n(".ft-button")],Hi.prototype,"button",void 0),_i([n(".ft-button--label slot")],Hi.prototype,"slottedContent",void 0),h("ft-button")(Hi);const Zi=xt.extend("--ft-checkbox-text-color",mt.colorOnSurfaceHigh),Ki=xt.external(mt.colorPrimary,"Design system"),Wi=xt.external(mt.colorOnPrimary,"Design system"),Vi=xt.extend("--ft-checkbox-border-color",mt.colorOnSurfaceMedium),qi=xt.external(mt.colorOnSurfaceDisabled,"Design system"),Ji=y`
|
|
705
706
|
* {
|
|
706
707
|
box-sizing: border-box;
|
|
707
708
|
}
|
|
708
709
|
|
|
709
710
|
.ft-checkbox {
|
|
710
711
|
box-sizing: border-box;
|
|
711
|
-
color: ${
|
|
712
|
+
color: ${Zi};
|
|
712
713
|
|
|
713
714
|
display: inline-flex;
|
|
714
715
|
align-items: center;
|
|
@@ -716,7 +717,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
716
717
|
}
|
|
717
718
|
|
|
718
719
|
.ft-checkbox--disabled {
|
|
719
|
-
color: ${
|
|
720
|
+
color: ${qi};
|
|
720
721
|
}
|
|
721
722
|
|
|
722
723
|
input {
|
|
@@ -740,26 +741,26 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
740
741
|
|
|
741
742
|
.ft-checkbox--box {
|
|
742
743
|
display: flex;
|
|
743
|
-
border: 2px solid ${
|
|
744
|
+
border: 2px solid ${Vi};
|
|
744
745
|
border-radius: 2px;
|
|
745
746
|
|
|
746
747
|
width: 18px;
|
|
747
748
|
height: 18px;
|
|
748
749
|
|
|
749
|
-
color: ${
|
|
750
|
+
color: ${Wi};
|
|
750
751
|
}
|
|
751
752
|
|
|
752
753
|
|
|
753
754
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
754
755
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
755
|
-
border-color: ${
|
|
756
|
-
background-color: ${
|
|
756
|
+
border-color: ${Ki};
|
|
757
|
+
background-color: ${Ki};
|
|
757
758
|
}
|
|
758
759
|
|
|
759
760
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
760
|
-
border-color: ${
|
|
761
|
+
border-color: ${qi};
|
|
761
762
|
background-color: transparent;
|
|
762
|
-
color: ${
|
|
763
|
+
color: ${qi};
|
|
763
764
|
}
|
|
764
765
|
|
|
765
766
|
.ft-checkbox--checkmark {
|
|
@@ -778,8 +779,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
778
779
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
779
780
|
opacity: 1;
|
|
780
781
|
}
|
|
781
|
-
`;var
|
|
782
|
-
<label class="${
|
|
782
|
+
`;var Xi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Yi extends wt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return X`
|
|
783
|
+
<label class="${ni(t)}" for="checkbox-input">
|
|
783
784
|
<div class="ft-checkbox--box-container">
|
|
784
785
|
<ft-ripple
|
|
785
786
|
?disabled=${this.disabled}
|
|
@@ -804,14 +805,14 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
804
805
|
<slot></slot>
|
|
805
806
|
</ft-typography>
|
|
806
807
|
</label>
|
|
807
|
-
`}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)}}
|
|
808
|
+
`}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)}}Yi.elementDefinitions={"ft-ripple":gi,"ft-typography":ei},Yi.styles=Ji,Xi([o()],Yi.prototype,"name",void 0),Xi([o({type:Boolean,reflect:!0})],Yi.prototype,"checked",void 0),Xi([o({type:Boolean})],Yi.prototype,"indeterminate",void 0),Xi([o({type:Boolean})],Yi.prototype,"disabled",void 0),Xi([n(".ft-checkbox")],Yi.prototype,"container",void 0),Xi([n("ft-ripple")],Yi.prototype,"ripple",void 0),h("ft-checkbox")(Yi);const Qi=xt.extend("--ft-radio-text-color",mt.colorOnSurfaceHigh),Gi=xt.external(mt.colorPrimary,"Design system"),to=(xt.external(mt.colorOnPrimary,"Design system"),xt.extend("--ft-radio-border-color",mt.colorOnSurfaceMedium)),eo=xt.external(mt.colorOnSurfaceDisabled,"Design system"),io=y`
|
|
808
809
|
* {
|
|
809
810
|
box-sizing: border-box;
|
|
810
811
|
}
|
|
811
812
|
|
|
812
813
|
.ft-radio {
|
|
813
814
|
box-sizing: border-box;
|
|
814
|
-
color: ${
|
|
815
|
+
color: ${Qi};
|
|
815
816
|
|
|
816
817
|
display: inline-flex;
|
|
817
818
|
align-items: center;
|
|
@@ -819,7 +820,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
819
820
|
}
|
|
820
821
|
|
|
821
822
|
.ft-radio--disabled {
|
|
822
|
-
color: ${
|
|
823
|
+
color: ${eo};
|
|
823
824
|
}
|
|
824
825
|
|
|
825
826
|
input {
|
|
@@ -842,7 +843,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
842
843
|
}
|
|
843
844
|
|
|
844
845
|
.ft-radio--box {
|
|
845
|
-
border: 2px solid ${
|
|
846
|
+
border: 2px solid ${to};
|
|
846
847
|
border-radius: 50%;
|
|
847
848
|
|
|
848
849
|
display: flex;
|
|
@@ -855,7 +856,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
855
856
|
|
|
856
857
|
.ft-radio--box:after {
|
|
857
858
|
content: " ";
|
|
858
|
-
background-color: ${
|
|
859
|
+
background-color: ${Gi};
|
|
859
860
|
|
|
860
861
|
border-radius: 50%;
|
|
861
862
|
|
|
@@ -867,7 +868,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
867
868
|
}
|
|
868
869
|
|
|
869
870
|
.ft-radio--checked .ft-radio--box {
|
|
870
|
-
border-color: ${
|
|
871
|
+
border-color: ${Gi};
|
|
871
872
|
}
|
|
872
873
|
|
|
873
874
|
|
|
@@ -876,15 +877,15 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
876
877
|
}
|
|
877
878
|
|
|
878
879
|
.ft-radio--disabled .ft-radio--box {
|
|
879
|
-
border-color: ${
|
|
880
|
+
border-color: ${eo};
|
|
880
881
|
background-color: transparent;
|
|
881
882
|
}
|
|
882
883
|
|
|
883
884
|
.ft-radio--disabled .ft-radio--box:after {
|
|
884
|
-
background-color: ${
|
|
885
|
+
background-color: ${eo};
|
|
885
886
|
}
|
|
886
|
-
`;var
|
|
887
|
-
<div class="${
|
|
887
|
+
`;var oo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class so extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class ro extends wt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return X`
|
|
888
|
+
<div class="${ni(t)}">
|
|
888
889
|
<div class="ft-radio--box-container">
|
|
889
890
|
<ft-ripple
|
|
890
891
|
?disabled=${this.disabled}
|
|
@@ -908,17 +909,17 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
908
909
|
</ft-typography>
|
|
909
910
|
</label>
|
|
910
911
|
</div>
|
|
911
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
912
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new so(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 so(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}ro.elementDefinitions={"ft-ripple":gi,"ft-typography":ei},ro.styles=io,oo([o()],ro.prototype,"value",void 0),oo([o()],ro.prototype,"name",void 0),oo([o({type:Boolean,reflect:!0})],ro.prototype,"checked",void 0),oo([o({type:Boolean})],ro.prototype,"disabled",void 0),oo([n(".ft-radio")],ro.prototype,"container",void 0),oo([n("ft-ripple")],ro.prototype,"ripple",void 0),oo([n("input")],ro.prototype,"input",void 0);const no=y`
|
|
912
913
|
:host {
|
|
913
914
|
display: contents;
|
|
914
915
|
}
|
|
915
|
-
`;var
|
|
916
|
+
`;var lo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ao extends wt{constructor(){super(...arguments),this.name=""}render(){return X`
|
|
916
917
|
<slot @slotchange=${this.onSlotChange}
|
|
917
918
|
@change=${this.onChange}
|
|
918
919
|
@keydown=${this.onKeyDown}
|
|
919
920
|
@focusin=${this.focusCurrentValue}
|
|
920
921
|
></slot>
|
|
921
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
922
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}ao.elementDefinitions={},ao.styles=no,lo([o()],ao.prototype,"name",void 0),lo([c()],ao.prototype,"radioButtons",void 0),h("ft-radio")(ro),h("ft-radio-group")(ao);const co={borderRadiusM:xt.external(mt.borderRadiusM,"Design system"),colorOutline:xt.external(mt.colorOutline,"Design system"),colorOnSurface:xt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:xt.external(mt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:xt.external(mt.colorOnSurfaceDisabled,"Design system"),colorPrimary:xt.external(mt.colorPrimary,"Design system"),colorOnPrimary:xt.external(mt.colorOnPrimary,"Design system"),fontFamily:xt.external(ze.fontFamily,"Body2 typography"),fontSize:xt.external(ze.fontSize,"Body2 typography"),fontWeight:xt.external(ze.fontWeight,"Body2 typography"),letterSpacing:xt.external(ze.letterSpacing,"Body2 typography"),lineHeight:xt.external(ze.lineHeight,"Body2 typography"),textTransform:xt.external(ze.textTransform,"Body2 typography")},ho=y`
|
|
922
923
|
.ft-filter-level--container {
|
|
923
924
|
display: flex;
|
|
924
925
|
flex-direction: column;
|
|
@@ -932,14 +933,14 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
932
933
|
flex-shrink: 0;
|
|
933
934
|
text-decoration: none;
|
|
934
935
|
position: relative;
|
|
935
|
-
border-radius: ${
|
|
936
|
+
border-radius: ${co.borderRadiusM};
|
|
936
937
|
overflow: hidden;
|
|
937
938
|
display: flex;
|
|
938
939
|
align-items: center;
|
|
939
940
|
padding: 4px 4px;
|
|
940
941
|
gap: 4px;
|
|
941
942
|
cursor: pointer;
|
|
942
|
-
color: ${
|
|
943
|
+
color: ${co.colorOnSurface};
|
|
943
944
|
}
|
|
944
945
|
|
|
945
946
|
.ft-filter-level--go-back:focus {
|
|
@@ -968,7 +969,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
968
969
|
}
|
|
969
970
|
|
|
970
971
|
ft-button {
|
|
971
|
-
${yt(
|
|
972
|
+
${yt(Ii.color,co.colorOnSurface)};
|
|
972
973
|
}
|
|
973
974
|
|
|
974
975
|
ft-radio, ft-checkbox {
|
|
@@ -982,9 +983,9 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
982
983
|
|
|
983
984
|
.ft-filter-level--no-values {
|
|
984
985
|
margin: 10px 0;
|
|
985
|
-
color: ${
|
|
986
|
+
color: ${co.colorOnSurfaceMedium};
|
|
986
987
|
}
|
|
987
|
-
`;var
|
|
988
|
+
`;var po=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class fo extends wt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return X`
|
|
988
989
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
989
990
|
${null==this.parent?null:X`
|
|
990
991
|
<div tabindex="0"
|
|
@@ -1003,7 +1004,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1003
1004
|
${this.noValuesLabel}
|
|
1004
1005
|
</ft-typography>
|
|
1005
1006
|
`:Q}
|
|
1006
|
-
${
|
|
1007
|
+
${_t(e,(t=>t.value),(t=>{var e;return X`
|
|
1007
1008
|
<div class="ft-filter-level--option" part="options">
|
|
1008
1009
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
1009
1010
|
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?Q:X`
|
|
@@ -1033,7 +1034,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1033
1034
|
data-value="${t.value}"
|
|
1034
1035
|
.checked=${t.selected}
|
|
1035
1036
|
.disabled=${this.disabled}
|
|
1036
|
-
.indeterminate=${
|
|
1037
|
+
.indeterminate=${ii(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
1037
1038
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
1038
1039
|
${t.renderOption?t.renderOption:t.label}
|
|
1039
1040
|
</ft-checkbox>
|
|
@@ -1048,7 +1049,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1048
1049
|
@change=${t=>t.stopPropagation()}>
|
|
1049
1050
|
${t.renderOption?t.renderOption:t.label}
|
|
1050
1051
|
</ft-radio>
|
|
1051
|
-
`}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}))}}
|
|
1052
|
+
`}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}))}}fo.elementDefinitions={"ft-button":Hi,"ft-ripple":gi,"ft-typography":ei,"ft-checkbox":Yi,"ft-icon":Di,"ft-radio":ro},fo.styles=ho,po([o({type:String})],fo.prototype,"id",void 0),po([o({type:Object})],fo.prototype,"parent",void 0),po([o({type:Array})],fo.prototype,"options",void 0),po([o({type:Boolean})],fo.prototype,"multivalued",void 0),po([o({type:Boolean})],fo.prototype,"disabled",void 0),po([o({type:Boolean})],fo.prototype,"hideSelectedOptions",void 0),po([o({type:Boolean})],fo.prototype,"preventNavigation",void 0),po([o({type:String})],fo.prototype,"filter",void 0),po([o({type:String})],fo.prototype,"moreValuesButtonLabel",void 0),po([o({type:String})],fo.prototype,"noValuesLabel",void 0),po([o({type:Number})],fo.prototype,"displayedValuesLimit",void 0),po([n(".ft-filter-level--container")],fo.prototype,"container",void 0),po([s()],fo.prototype,"displayedPages",void 0);const uo={buttonsColor:xt.extend("--ft-snap-scroll-buttons-color",mt.colorPrimary),buttonsZIndex:xt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:xt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:xt.external(mt.colorSurface,"Design system")},bo=y`
|
|
1052
1053
|
.ft-snap-scroll {
|
|
1053
1054
|
box-sizing: border-box;
|
|
1054
1055
|
position: relative;
|
|
@@ -1083,7 +1084,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1083
1084
|
flex-wrap: nowrap;
|
|
1084
1085
|
align-items: flex-start;
|
|
1085
1086
|
justify-content: flex-start;
|
|
1086
|
-
gap: ${
|
|
1087
|
+
gap: ${uo.gap};
|
|
1087
1088
|
}
|
|
1088
1089
|
|
|
1089
1090
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1126,11 +1127,11 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1126
1127
|
.ft-snap-scroll--next {
|
|
1127
1128
|
position: absolute;
|
|
1128
1129
|
display: flex;
|
|
1129
|
-
z-index: ${
|
|
1130
|
+
z-index: ${uo.buttonsZIndex};
|
|
1130
1131
|
opacity: 1;
|
|
1131
1132
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1132
|
-
${yt(
|
|
1133
|
-
${yt(
|
|
1133
|
+
${yt(Ii.backgroundColor,"transparent")};
|
|
1134
|
+
${yt(Ii.color,uo.buttonsColor)};
|
|
1134
1135
|
}
|
|
1135
1136
|
|
|
1136
1137
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1143,37 +1144,37 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1143
1144
|
top: 0;
|
|
1144
1145
|
left: -1px;
|
|
1145
1146
|
bottom: 0;
|
|
1146
|
-
background: linear-gradient(to right, ${
|
|
1147
|
+
background: linear-gradient(to right, ${uo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1147
1148
|
}
|
|
1148
1149
|
|
|
1149
1150
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1150
1151
|
top: -1px;
|
|
1151
1152
|
left: 0;
|
|
1152
1153
|
right: 0;
|
|
1153
|
-
background: linear-gradient(to bottom, ${
|
|
1154
|
+
background: linear-gradient(to bottom, ${uo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1154
1155
|
}
|
|
1155
1156
|
|
|
1156
1157
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1157
1158
|
top: 0;
|
|
1158
1159
|
right: -1px;
|
|
1159
1160
|
bottom: 0;
|
|
1160
|
-
background: linear-gradient(to left, ${
|
|
1161
|
+
background: linear-gradient(to left, ${uo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1161
1162
|
}
|
|
1162
1163
|
|
|
1163
1164
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1164
1165
|
left: 0;
|
|
1165
1166
|
right: 0;
|
|
1166
1167
|
bottom: -1px;
|
|
1167
|
-
background: linear-gradient(to top, ${
|
|
1168
|
+
background: linear-gradient(to top, ${uo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1168
1169
|
}
|
|
1169
1170
|
|
|
1170
1171
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1171
1172
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1172
1173
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1173
1174
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1174
|
-
background-color: ${
|
|
1175
|
+
background-color: ${uo.colorSurface};
|
|
1175
1176
|
}
|
|
1176
|
-
`;var
|
|
1177
|
+
`;var vo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class go extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class xo extends wt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=ni({"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":Mt}),e=this.controls&&this.withScroll;return X`
|
|
1177
1178
|
<div part="container" class="${t}">
|
|
1178
1179
|
<ft-button
|
|
1179
1180
|
class="ft-snap-scroll--previous"
|
|
@@ -1197,7 +1198,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1197
1198
|
@click=${this.next}
|
|
1198
1199
|
></ft-button>
|
|
1199
1200
|
</div>
|
|
1200
|
-
`}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
|
|
1201
|
+
`}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 go(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)}}xo.elementDefinitions={"ft-button":Hi},xo.styles=bo,vo([o({type:Boolean})],xo.prototype,"horizontal",void 0),vo([o({type:Boolean})],xo.prototype,"hideScrollbar",void 0),vo([o({type:Boolean})],xo.prototype,"controls",void 0),vo([o({type:Boolean})],xo.prototype,"limitSize",void 0),vo([s()],xo.prototype,"elements",void 0),vo([s()],xo.prototype,"currentElement",void 0),vo([s()],xo.prototype,"withScroll",void 0),vo([s()],xo.prototype,"startReached",void 0),vo([s()],xo.prototype,"endReached",void 0),vo([n(".ft-snap-scroll--content")],xo.prototype,"contentSlot",void 0),h("ft-snap-scroll")(xo);const yo=xt.external(mt.colorOutline,"Design system"),mo=xt.external(mt.colorOnSurface,"Design system"),$o=xt.external(mt.colorOnSurfaceMedium,"Design system"),wo=xt.external(mt.colorPrimary,"Design system"),ko=xt.external(mt.colorSurface,"Design system"),So=xt.external(mt.transitionDuration,"Design system"),Oo=xt.external(mt.transitionTimingFunction,"Design system"),Co=[Je,y`
|
|
1201
1202
|
:host {
|
|
1202
1203
|
display: flex;
|
|
1203
1204
|
max-height: 100%;
|
|
@@ -1210,7 +1211,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1210
1211
|
flex-direction: column;
|
|
1211
1212
|
max-height: 100%;
|
|
1212
1213
|
max-width: 100%;
|
|
1213
|
-
color: ${
|
|
1214
|
+
color: ${mo};
|
|
1214
1215
|
}
|
|
1215
1216
|
|
|
1216
1217
|
.ft-filter--header {
|
|
@@ -1220,13 +1221,13 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1220
1221
|
flex-shrink: 0;
|
|
1221
1222
|
padding: 0 10px;
|
|
1222
1223
|
margin-bottom: 8px;
|
|
1223
|
-
${yt(
|
|
1224
|
+
${yt(ie.fontSize,"14px")};
|
|
1224
1225
|
}
|
|
1225
1226
|
|
|
1226
1227
|
.ft-filter--header ft-button {
|
|
1227
1228
|
flex-shrink: 0;
|
|
1228
1229
|
margin-left: auto;
|
|
1229
|
-
${yt(
|
|
1230
|
+
${yt(Ii.iconSize,"18px")};
|
|
1230
1231
|
}
|
|
1231
1232
|
|
|
1232
1233
|
.ft-filter--label {
|
|
@@ -1234,8 +1235,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1234
1235
|
flex-shrink: 1;
|
|
1235
1236
|
flex-grow: 1;
|
|
1236
1237
|
word-break: break-word;
|
|
1237
|
-
${yt(
|
|
1238
|
-
${yt(
|
|
1238
|
+
${yt(ie.lineHeight,"22px")};
|
|
1239
|
+
${yt(ie.fontWeight,"bold")};
|
|
1239
1240
|
}
|
|
1240
1241
|
|
|
1241
1242
|
.ft-filter--filter {
|
|
@@ -1246,8 +1247,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1246
1247
|
padding: 0 10px;
|
|
1247
1248
|
overflow: hidden;
|
|
1248
1249
|
height: 32px;
|
|
1249
|
-
transition: height ${
|
|
1250
|
-
margin ${
|
|
1250
|
+
transition: height ${So} ${Oo},
|
|
1251
|
+
margin ${So} ${Oo};
|
|
1251
1252
|
transition-delay: 500ms;
|
|
1252
1253
|
}
|
|
1253
1254
|
|
|
@@ -1260,15 +1261,15 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1260
1261
|
display: block;
|
|
1261
1262
|
width: 100%;
|
|
1262
1263
|
border-radius: 4px;
|
|
1263
|
-
border: 1px solid ${
|
|
1264
|
+
border: 1px solid ${yo};
|
|
1264
1265
|
padding: 4px;
|
|
1265
|
-
background-color: ${
|
|
1266
|
-
color: ${
|
|
1267
|
-
outline-color: ${
|
|
1266
|
+
background-color: ${ko};
|
|
1267
|
+
color: ${mo};
|
|
1268
|
+
outline-color: ${wo};
|
|
1268
1269
|
}
|
|
1269
1270
|
|
|
1270
1271
|
input::placeholder {
|
|
1271
|
-
color: ${
|
|
1272
|
+
color: ${$o};
|
|
1272
1273
|
}
|
|
1273
1274
|
|
|
1274
1275
|
input:placeholder-shown {
|
|
@@ -1284,7 +1285,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1284
1285
|
}
|
|
1285
1286
|
|
|
1286
1287
|
.ft-filter--separator {
|
|
1287
|
-
border-top: 1px solid ${
|
|
1288
|
+
border-top: 1px solid ${yo};
|
|
1288
1289
|
margin: 4px 10px;
|
|
1289
1290
|
}
|
|
1290
1291
|
|
|
@@ -1309,7 +1310,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1309
1310
|
slot {
|
|
1310
1311
|
display: none;
|
|
1311
1312
|
}
|
|
1312
|
-
`];var
|
|
1313
|
+
`];var Eo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class zo extends CustomEvent{constructor(t){super("change",{detail:t})}}class Bo extends wt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return ii(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e,s=this.filterPlaceHolder.replace("{0}",this.label);return X`
|
|
1313
1314
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1314
1315
|
part="container">
|
|
1315
1316
|
${this.label||i?X`
|
|
@@ -1379,17 +1380,17 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1379
1380
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1380
1381
|
noValuesLabel="${this.noValuesLabel}"
|
|
1381
1382
|
></ft-filter-level>
|
|
1382
|
-
`}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;this.dispatchEvent(new
|
|
1383
|
+
`}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;this.dispatchEvent(new zo(this.selectedValues)),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)}}Bo.elementDefinitions={"ft-button":Hi,"ft-filter-level":fo,"ft-snap-scroll":xo,"ft-typography":ei},Bo.styles=Co,Eo([o({type:String})],Bo.prototype,"id",void 0),Eo([o({type:String})],Bo.prototype,"label",void 0),Eo([o({type:String})],Bo.prototype,"filterPlaceHolder",void 0),Eo([o({type:String})],Bo.prototype,"clearButtonLabel",void 0),Eo([o({type:String})],Bo.prototype,"moreValuesButtonLabel",void 0),Eo([o({type:String})],Bo.prototype,"noValuesLabel",void 0),Eo([p([])],Bo.prototype,"options",void 0),Eo([o({type:Boolean})],Bo.prototype,"multivalued",void 0),Eo([o({type:Boolean})],Bo.prototype,"disabled",void 0),Eo([o({type:Boolean})],Bo.prototype,"raiseSelectedOptions",void 0),Eo([o({type:Number})],Bo.prototype,"displayedValuesLimit",void 0),Eo([o({type:Boolean})],Bo.prototype,"hideClearButton",void 0),Eo([n(".ft-filter--slot")],Bo.prototype,"slotElement",void 0),Eo([n(".ft-filter--container")],Bo.prototype,"container",void 0),Eo([n(".ft-filter--values")],Bo.prototype,"valuesContainer",void 0),Eo([n(".ft-filter--levels")],Bo.prototype,"levelsContainer",void 0),Eo([n(".ft-filter--levels ft-filter-level:last-child")],Bo.prototype,"lastLevel",void 0),Eo([n(".ft-filter--filter input")],Bo.prototype,"filterInput",void 0),Eo([function(t){return r({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],Bo.prototype,"levels",void 0),Eo([s()],Bo.prototype,"withScroll",void 0),Eo([s()],Bo.prototype,"filter",void 0),Eo([s()],Bo.prototype,"slideIn",void 0),Eo([s()],Bo.prototype,"slideOut",void 0);var Mo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class No extends wt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return X`
|
|
1383
1384
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1384
|
-
`}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}))}}
|
|
1385
|
+
`}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}))}}No.elementDefinitions={},Mo([o({type:String})],No.prototype,"label",void 0),Mo([o({type:Object,converter:t=>t})],No.prototype,"value",void 0),Mo([o({type:Boolean,reflect:!0})],No.prototype,"selected",void 0),Mo([o({type:Object})],No.prototype,"subOptions",void 0),Mo([p({})],No.prototype,"renderOption",void 0),Mo([n(".ft-filter-option--slot")],No.prototype,"slotElement",void 0),h("ft-filter")(Bo),h("ft-filter-option")(No);const Fo=y`
|
|
1385
1386
|
.ft-accordion {
|
|
1386
1387
|
box-sizing: border-box;
|
|
1387
1388
|
}
|
|
1388
|
-
`;var
|
|
1389
|
+
`;var Ro=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Lo extends wt{constructor(){super(...arguments),this.multi=!1}render(){return X`
|
|
1389
1390
|
<div class="ft-accordion">
|
|
1390
1391
|
<slot @activated=${this.onChange}></slot>
|
|
1391
1392
|
</div>
|
|
1392
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}
|
|
1393
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}Lo.elementDefinitions={},Lo.styles=Fo,Ro([o({type:Boolean})],Lo.prototype,"multi",void 0),Ro([n("slot")],Lo.prototype,"content",void 0);const Do=xt.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),jo=xt.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),Io=xt.external(mt.colorOutline,"Design system"),Uo=y`
|
|
1393
1394
|
.ft-accordion-item {
|
|
1394
1395
|
display: flex;
|
|
1395
1396
|
flex-direction: column;
|
|
@@ -1402,8 +1403,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1402
1403
|
display: flex;
|
|
1403
1404
|
align-items: center;
|
|
1404
1405
|
cursor: pointer;
|
|
1405
|
-
padding: ${jo} ${
|
|
1406
|
-
gap: calc(${
|
|
1406
|
+
padding: ${jo} ${Do};
|
|
1407
|
+
gap: calc(${Do} / 2);
|
|
1407
1408
|
outline: none;
|
|
1408
1409
|
}
|
|
1409
1410
|
|
|
@@ -1428,13 +1429,13 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1428
1429
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1429
1430
|
height: initial;
|
|
1430
1431
|
overflow: visible;
|
|
1431
|
-
padding: ${jo} ${
|
|
1432
|
+
padding: ${jo} ${Do};
|
|
1432
1433
|
}
|
|
1433
1434
|
|
|
1434
1435
|
.ft-accordion-item--separator {
|
|
1435
|
-
border-bottom: 1px solid ${
|
|
1436
|
+
border-bottom: 1px solid ${Io};
|
|
1436
1437
|
}
|
|
1437
|
-
`;var
|
|
1438
|
+
`;var Po=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ao extends wt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return X`
|
|
1438
1439
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1439
1440
|
<div class="ft-accordion-item--toggle"
|
|
1440
1441
|
part="toggle"
|
|
@@ -1458,7 +1459,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1458
1459
|
</div>
|
|
1459
1460
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1460
1461
|
</div>
|
|
1461
|
-
`}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)}}
|
|
1462
|
+
`}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)}}Ao.elementDefinitions={"ft-ripple":gi,"ft-typography":ei,"ft-icon":Di},Ao.styles=Uo,Po([o({type:String})],Ao.prototype,"icon",void 0),Po([o({type:String})],Ao.prototype,"label",void 0),Po([o({type:Boolean,reflect:!0})],Ao.prototype,"active",void 0),h("ft-accordion")(Lo),h("ft-accordion-item")(Ao);const To=xt.extend("--ft-chip-color",mt.colorOnSurface),_o={backgroundColor:xt.extend("--ft-chip-background-color",mt.colorSurface),color:To,fontSize:xt.extend("--ft-chip-font-size",ze.fontSize),iconSize:xt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:xt.extend("--ft-chip-ripple-color",To),horizontalPadding:xt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:xt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:xt.external(mt.colorOutline,"Design system"),opacityDisabled:xt.external(mt.colorOpacityDisabled,"Design system")},Ho=xt.extend("--ft-chip-highlighted-color",xt.extend("--ft-chip-color",mt.colorOnPrimary)),Zo={backgroundColor:xt.extend("--ft-chip-highlighted-background-color",xt.extend("--ft-chip-background-color",mt.colorPrimary)),color:Ho,rippleColor:xt.extend("--ft-chip-highlighted-ripple-color",Ho)},Ko=xt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Wo=xt.create("--ft-chip-dense-vertical-padding","SIZE","4px"),Vo=[kt,y`
|
|
1462
1463
|
:host {
|
|
1463
1464
|
display: inline-block;
|
|
1464
1465
|
max-width: 100%;
|
|
@@ -1475,20 +1476,20 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1475
1476
|
box-sizing: border-box;
|
|
1476
1477
|
pointer-events: auto;
|
|
1477
1478
|
|
|
1478
|
-
--ft-chip-internal-font-size: ${
|
|
1479
|
+
--ft-chip-internal-font-size: ${_o.fontSize};
|
|
1479
1480
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1480
|
-
${yt(
|
|
1481
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1482
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1481
|
+
${yt(Ni.size,_o.iconSize)};
|
|
1482
|
+
--ft-chip-internal-vertical-padding: ${_o.verticalPadding};
|
|
1483
|
+
--ft-chip-internal-horizontal-padding: ${_o.horizontalPadding};
|
|
1483
1484
|
--ft-chip-internal-icon-padding: 3px;
|
|
1484
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
1485
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${_o.iconSize});
|
|
1485
1486
|
|
|
1486
|
-
border: 1px solid ${
|
|
1487
|
-
color: ${
|
|
1488
|
-
${yt(
|
|
1487
|
+
border: 1px solid ${_o.colorOutline};
|
|
1488
|
+
color: ${_o.color};
|
|
1489
|
+
${yt(ai.color,_o.rippleColor)};
|
|
1489
1490
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1490
1491
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1491
|
-
background-color: ${
|
|
1492
|
+
background-color: ${_o.backgroundColor};
|
|
1492
1493
|
line-height: var(--ft-chip-internal-content-height);
|
|
1493
1494
|
}
|
|
1494
1495
|
|
|
@@ -1498,8 +1499,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1498
1499
|
|
|
1499
1500
|
.ft-chip--dense {
|
|
1500
1501
|
--ft-chip-internal-icon-padding: 3px;
|
|
1501
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1502
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1502
|
+
--ft-chip-internal-vertical-padding: ${Wo};
|
|
1503
|
+
--ft-chip-internal-horizontal-padding: ${Ko};
|
|
1503
1504
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1504
1505
|
}
|
|
1505
1506
|
|
|
@@ -1511,15 +1512,15 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1511
1512
|
cursor: default;
|
|
1512
1513
|
pointer-events: none;
|
|
1513
1514
|
filter: grayscale(1);
|
|
1514
|
-
opacity: ${
|
|
1515
|
+
opacity: ${_o.opacityDisabled};
|
|
1515
1516
|
}
|
|
1516
1517
|
|
|
1517
1518
|
.ft-chip--highlighted {
|
|
1518
1519
|
border: none;
|
|
1519
1520
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1520
|
-
background-color: ${
|
|
1521
|
-
${yt(
|
|
1522
|
-
color: ${
|
|
1521
|
+
background-color: ${Zo.backgroundColor};
|
|
1522
|
+
${yt(ai.color,Zo.rippleColor)};
|
|
1523
|
+
color: ${Zo.color};
|
|
1523
1524
|
}
|
|
1524
1525
|
|
|
1525
1526
|
.ft-chip--clickable {
|
|
@@ -1552,8 +1553,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1552
1553
|
vertical-align: bottom;
|
|
1553
1554
|
display: block;
|
|
1554
1555
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1555
|
-
${yt(
|
|
1556
|
-
${yt(
|
|
1556
|
+
${yt(ze.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1557
|
+
${yt(ze.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1557
1558
|
}
|
|
1558
1559
|
|
|
1559
1560
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1588,8 +1589,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1588
1589
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
1589
1590
|
order: -1;
|
|
1590
1591
|
}
|
|
1591
|
-
`];var
|
|
1592
|
-
<div class="${
|
|
1592
|
+
`];var qo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Jo extends CustomEvent{constructor(){super("icon-click")}}class Xo extends wt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Mt};return X`
|
|
1593
|
+
<div class="${ni(t)}"
|
|
1593
1594
|
aria-label="${this.getLabel()}"
|
|
1594
1595
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1595
1596
|
@keyup=${this.onKeyUp}>
|
|
@@ -1607,25 +1608,25 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1607
1608
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1608
1609
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1609
1610
|
</div>
|
|
1610
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1611
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Jo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Jo))}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)}}Xo.elementDefinitions={"ft-ripple":gi,"ft-typography":ei,"ft-icon":Di},Xo.styles=Vo,qo([o({type:Boolean})],Xo.prototype,"highlighted",void 0),qo([o({type:Boolean})],Xo.prototype,"removable",void 0),qo([o({type:Boolean})],Xo.prototype,"disabled",void 0),qo([o({type:Boolean})],Xo.prototype,"clickable",void 0),qo([o({type:Boolean})],Xo.prototype,"iconClickable",void 0),qo([o({type:Boolean})],Xo.prototype,"dense",void 0),qo([o({type:Boolean})],Xo.prototype,"multiLine",void 0),qo([o({type:String})],Xo.prototype,"label",void 0),qo([o({type:String})],Xo.prototype,"icon",void 0),qo([o({type:Boolean})],Xo.prototype,"trailingIcon",void 0),qo([n("ft-typography slot")],Xo.prototype,"slottedContent",void 0),h("ft-chip")(Xo);const Yo={fontSize:xt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:xt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:xt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:xt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:xt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:xt.create("--ft-input-label-max-width","SIZE","100%"),borderColor:xt.extend("--ft-input-label-border-color",mt.colorOutline),textColor:xt.extend("--ft-input-label-text-color",mt.colorOnSurfaceMedium),disabledTextColor:xt.extend("--ft-input-label-disabled-text-color",mt.colorOnSurfaceDisabled),colorSurface:xt.external(mt.colorSurface,"Design system"),borderRadiusS:xt.external(mt.borderRadiusS,"Design system"),colorError:xt.external(mt.colorError,"Design system")},Qo=y`
|
|
1611
1612
|
.ft-input-label {
|
|
1612
1613
|
position: absolute;
|
|
1613
1614
|
inset: 0;
|
|
1614
1615
|
display: flex;
|
|
1615
|
-
background-color: ${
|
|
1616
|
-
border-radius: ${
|
|
1616
|
+
background-color: ${Yo.colorSurface};
|
|
1617
|
+
border-radius: ${Yo.borderRadiusS} ${Yo.borderRadiusS} 0 0;
|
|
1617
1618
|
}
|
|
1618
1619
|
|
|
1619
1620
|
.ft-input-label--outlined {
|
|
1620
|
-
border-radius: ${
|
|
1621
|
+
border-radius: ${Yo.borderRadiusS};
|
|
1621
1622
|
}
|
|
1622
1623
|
|
|
1623
1624
|
.ft-input-label {
|
|
1624
|
-
border-color: ${
|
|
1625
|
+
border-color: ${Yo.borderColor};
|
|
1625
1626
|
}
|
|
1626
1627
|
|
|
1627
1628
|
.ft-input-label.ft-input-label--in-error {
|
|
1628
|
-
border-color: ${
|
|
1629
|
+
border-color: ${Yo.colorError}
|
|
1629
1630
|
}
|
|
1630
1631
|
|
|
1631
1632
|
.ft-input-label:before,
|
|
@@ -1638,7 +1639,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1638
1639
|
}
|
|
1639
1640
|
|
|
1640
1641
|
.ft-input-label:before {
|
|
1641
|
-
width: calc(${
|
|
1642
|
+
width: calc(${Yo.horizontalSpacing} - 4px);
|
|
1642
1643
|
flex-shrink: 0;
|
|
1643
1644
|
}
|
|
1644
1645
|
|
|
@@ -1654,20 +1655,20 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1654
1655
|
border-bottom-width: 1px;
|
|
1655
1656
|
border-bottom-style: solid;
|
|
1656
1657
|
border-color: inherit;
|
|
1657
|
-
color: ${
|
|
1658
|
+
color: ${Yo.textColor};
|
|
1658
1659
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1659
|
-
max-width: calc(${
|
|
1660
|
+
max-width: calc(${Yo.labelMaxWidth} - 2 * (${Yo.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
1660
1661
|
text-overflow: ellipsis;
|
|
1661
|
-
${yt(
|
|
1662
|
-
${yt(
|
|
1662
|
+
${yt(Be.fontSize,Yo.fontSize)};
|
|
1663
|
+
${yt(Be.lineHeight,Yo.fontSize)};
|
|
1663
1664
|
}
|
|
1664
1665
|
|
|
1665
1666
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1666
|
-
color: ${
|
|
1667
|
+
color: ${Yo.colorError}
|
|
1667
1668
|
}
|
|
1668
1669
|
|
|
1669
1670
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1670
|
-
color: ${
|
|
1671
|
+
color: ${Yo.disabledTextColor};
|
|
1671
1672
|
}
|
|
1672
1673
|
|
|
1673
1674
|
.ft-input-label--hidden-text {
|
|
@@ -1684,19 +1685,19 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1684
1685
|
overflow: hidden;
|
|
1685
1686
|
white-space: nowrap;
|
|
1686
1687
|
text-overflow: ellipsis;
|
|
1687
|
-
padding: ${
|
|
1688
|
-
margin: calc(${
|
|
1688
|
+
padding: ${Yo.verticalSpacing} 4px;
|
|
1689
|
+
margin: calc(${Yo.verticalSpacing} * -1) 0;
|
|
1689
1690
|
max-width: 100%;
|
|
1690
1691
|
box-sizing: border-box;
|
|
1691
1692
|
}
|
|
1692
1693
|
|
|
1693
1694
|
.ft-input-label--raised .ft-input-label--text {
|
|
1694
|
-
${yt(
|
|
1695
|
-
${yt(
|
|
1695
|
+
${yt(Be.fontSize,Yo.raisedFontSize)};
|
|
1696
|
+
${yt(Be.lineHeight,Yo.raisedFontSize)};
|
|
1696
1697
|
}
|
|
1697
1698
|
|
|
1698
1699
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1699
|
-
top: ${
|
|
1700
|
+
top: ${Yo.verticalSpacing};
|
|
1700
1701
|
}
|
|
1701
1702
|
|
|
1702
1703
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1709,28 +1710,28 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1709
1710
|
.ft-input-label--outlined:before {
|
|
1710
1711
|
border-left-width: 1px;
|
|
1711
1712
|
border-left-style: solid;
|
|
1712
|
-
border-radius: ${
|
|
1713
|
+
border-radius: ${Yo.borderRadiusS} 0 0 ${Yo.borderRadiusS};
|
|
1713
1714
|
}
|
|
1714
1715
|
|
|
1715
1716
|
.ft-input-label--outlined:after {
|
|
1716
1717
|
border-right-width: 1px;
|
|
1717
1718
|
border-right-style: solid;
|
|
1718
|
-
border-radius: 0 ${
|
|
1719
|
+
border-radius: 0 ${Yo.borderRadiusS} ${Yo.borderRadiusS} 0;
|
|
1719
1720
|
}
|
|
1720
1721
|
|
|
1721
1722
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1722
1723
|
padding: 2px 4px;
|
|
1723
|
-
z-index: ${
|
|
1724
|
-
background-color: ${
|
|
1725
|
-
border-radius: ${
|
|
1724
|
+
z-index: ${Yo.raisedZIndex};
|
|
1725
|
+
background-color: ${Yo.colorSurface};
|
|
1726
|
+
border-radius: ${Yo.borderRadiusS};
|
|
1726
1727
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1727
1728
|
}
|
|
1728
1729
|
|
|
1729
1730
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1730
1731
|
border-top: none;
|
|
1731
1732
|
}
|
|
1732
|
-
`;var
|
|
1733
|
-
<div class="${
|
|
1733
|
+
`;var Go=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ts extends wt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return X`
|
|
1734
|
+
<div class="${ni(t)}">
|
|
1734
1735
|
${this.text?X`
|
|
1735
1736
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1736
1737
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -1738,7 +1739,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1738
1739
|
</div>
|
|
1739
1740
|
`:null}
|
|
1740
1741
|
</div>
|
|
1741
|
-
`}}
|
|
1742
|
+
`}}ts.elementDefinitions={},ts.styles=[Je,Qo],Go([o({type:String})],ts.prototype,"text",void 0),Go([o({type:Boolean})],ts.prototype,"raised",void 0),Go([o({type:Boolean})],ts.prototype,"outlined",void 0),Go([o({type:Boolean})],ts.prototype,"disabled",void 0),Go([o({type:Boolean})],ts.prototype,"error",void 0),h("ft-input-label")(ts);const es={labelSize:xt.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:xt.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:xt.create("--ft-select-vertical-spacing","SIZE","4px"),horizontalSpacing:xt.create("--ft-select-horizontal-spacing","SIZE","16px"),optionsHeight:xt.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:xt.extend("--ft-select-selected-option-color",mt.colorOnSurface),helperColor:xt.extend("--ft-select-helper-color",mt.colorOnSurfaceMedium),optionsColor:xt.extend("--ft-select-options-color",mt.colorOnSurface),optionsZIndex:xt.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:xt.external(mt.colorSurface,"Design system"),colorOnSurfaceDisabled:xt.external(mt.colorOnSurfaceDisabled,"Design system"),colorPrimary:xt.external(mt.colorPrimary,"Design system"),borderRadiusS:xt.external(mt.borderRadiusS,"Design system"),elevation02:xt.external(mt.elevation02,"Design system"),colorError:xt.external(mt.colorError,"Design system")},is=y`
|
|
1742
1743
|
*:focus {
|
|
1743
1744
|
outline: none;
|
|
1744
1745
|
}
|
|
@@ -1752,7 +1753,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1752
1753
|
.ft-select--main-panel {
|
|
1753
1754
|
position: relative;
|
|
1754
1755
|
display: flex;
|
|
1755
|
-
height: calc(4 * ${
|
|
1756
|
+
height: calc(4 * ${es.verticalSpacing} + ${es.labelSize} + ${es.selectedOptionSize});
|
|
1756
1757
|
}
|
|
1757
1758
|
|
|
1758
1759
|
.ft-select--input-panel {
|
|
@@ -1761,17 +1762,17 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1761
1762
|
display: flex;
|
|
1762
1763
|
align-items: center;
|
|
1763
1764
|
overflow: hidden;
|
|
1764
|
-
padding-left: ${
|
|
1765
|
-
padding-right: ${
|
|
1765
|
+
padding-left: ${es.horizontalSpacing};
|
|
1766
|
+
padding-right: ${es.horizontalSpacing};
|
|
1766
1767
|
gap: 8px;
|
|
1767
|
-
color: ${
|
|
1768
|
-
${yt(
|
|
1768
|
+
color: ${es.selectedOptionColor};
|
|
1769
|
+
${yt(ai.color,es.selectedOptionColor)};
|
|
1769
1770
|
}
|
|
1770
1771
|
|
|
1771
1772
|
.ft-select--input-panel,
|
|
1772
1773
|
.ft-select--option {
|
|
1773
|
-
${yt(
|
|
1774
|
-
${yt(
|
|
1774
|
+
${yt(ai.opacityContentOnSurfaceHover,"0.08")};
|
|
1775
|
+
${yt(ai.opacityContentOnSurfacePressed,"0.04")};
|
|
1775
1776
|
}
|
|
1776
1777
|
|
|
1777
1778
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -1781,7 +1782,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1781
1782
|
|
|
1782
1783
|
.ft-select--disabled .ft-select--input-panel,
|
|
1783
1784
|
.ft-select--disabled .ft-select--option {
|
|
1784
|
-
color: ${
|
|
1785
|
+
color: ${es.colorOnSurfaceDisabled};
|
|
1785
1786
|
}
|
|
1786
1787
|
|
|
1787
1788
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -1790,20 +1791,20 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1790
1791
|
}
|
|
1791
1792
|
|
|
1792
1793
|
ft-input-label {
|
|
1793
|
-
${yt(
|
|
1794
|
-
${yt(
|
|
1795
|
-
${yt(
|
|
1796
|
-
${yt(
|
|
1797
|
-
${yt(
|
|
1794
|
+
${yt(Yo.fontSize,es.selectedOptionSize)};
|
|
1795
|
+
${yt(Yo.raisedFontSize,es.labelSize)};
|
|
1796
|
+
${yt(Yo.verticalSpacing,es.verticalSpacing)};
|
|
1797
|
+
${yt(Yo.horizontalSpacing,es.horizontalSpacing)};
|
|
1798
|
+
${yt(Yo.labelMaxWidth,`calc(100% - ${Ni.size} - 8px)`)};
|
|
1798
1799
|
}
|
|
1799
1800
|
|
|
1800
1801
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1801
|
-
color: ${
|
|
1802
|
+
color: ${es.colorPrimary};
|
|
1802
1803
|
}
|
|
1803
1804
|
|
|
1804
1805
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1805
|
-
${yt(
|
|
1806
|
-
${yt(
|
|
1806
|
+
${yt(Yo.borderColor,es.colorPrimary)};
|
|
1807
|
+
${yt(Yo.textColor,es.colorPrimary)};
|
|
1807
1808
|
}
|
|
1808
1809
|
|
|
1809
1810
|
.ft-select--selected-option {
|
|
@@ -1813,12 +1814,12 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1813
1814
|
overflow: hidden;
|
|
1814
1815
|
white-space: nowrap;
|
|
1815
1816
|
text-overflow: ellipsis;
|
|
1816
|
-
${yt(
|
|
1817
|
-
${yt(
|
|
1817
|
+
${yt(Ee.fontSize,es.selectedOptionSize)};
|
|
1818
|
+
${yt(Ee.lineHeight,es.selectedOptionSize)};
|
|
1818
1819
|
}
|
|
1819
1820
|
|
|
1820
1821
|
.ft-select--in-error .ft-select--selected-option {
|
|
1821
|
-
color: ${
|
|
1822
|
+
color: ${es.colorError};
|
|
1822
1823
|
}
|
|
1823
1824
|
|
|
1824
1825
|
ft-icon {
|
|
@@ -1830,16 +1831,16 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1830
1831
|
}
|
|
1831
1832
|
|
|
1832
1833
|
.ft-select--filled .ft-select--input-panel {
|
|
1833
|
-
border-radius: ${
|
|
1834
|
+
border-radius: ${es.borderRadiusS} ${es.borderRadiusS} 0 0;
|
|
1834
1835
|
}
|
|
1835
1836
|
|
|
1836
1837
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1837
1838
|
align-self: stretch;
|
|
1838
|
-
padding-top: calc(${
|
|
1839
|
+
padding-top: calc(${es.labelSize} + 2 * ${es.verticalSpacing});
|
|
1839
1840
|
}
|
|
1840
1841
|
|
|
1841
1842
|
.ft-select--outlined .ft-select--input-panel {
|
|
1842
|
-
border-radius: ${
|
|
1843
|
+
border-radius: ${es.borderRadiusS};
|
|
1843
1844
|
}
|
|
1844
1845
|
|
|
1845
1846
|
.ft-select--options {
|
|
@@ -1848,10 +1849,10 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1848
1849
|
top: 100%;
|
|
1849
1850
|
left: 0;
|
|
1850
1851
|
right: 0;
|
|
1851
|
-
color: ${
|
|
1852
|
-
background: ${
|
|
1853
|
-
z-index: ${
|
|
1854
|
-
box-shadow: ${
|
|
1852
|
+
color: ${es.optionsColor};
|
|
1853
|
+
background: ${es.colorSurface};
|
|
1854
|
+
z-index: ${es.optionsZIndex};
|
|
1855
|
+
box-shadow: ${es.elevation02};
|
|
1855
1856
|
}
|
|
1856
1857
|
|
|
1857
1858
|
.ft-select--fixed .ft-select--options {
|
|
@@ -1862,13 +1863,13 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1862
1863
|
|
|
1863
1864
|
.ft-select--options-displayed .ft-select--options {
|
|
1864
1865
|
display: block;
|
|
1865
|
-
max-height: ${
|
|
1866
|
+
max-height: ${es.optionsHeight};
|
|
1866
1867
|
overflow-y: auto;
|
|
1867
1868
|
}
|
|
1868
1869
|
|
|
1869
1870
|
.ft-select--option {
|
|
1870
1871
|
position: relative;
|
|
1871
|
-
padding: 4px ${
|
|
1872
|
+
padding: 4px ${es.horizontalSpacing};
|
|
1872
1873
|
min-height: 32px;
|
|
1873
1874
|
display: flex;
|
|
1874
1875
|
align-items: center;
|
|
@@ -1880,15 +1881,15 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1880
1881
|
}
|
|
1881
1882
|
|
|
1882
1883
|
.ft-select--helper-text {
|
|
1883
|
-
padding: 0 ${
|
|
1884
|
-
color: ${
|
|
1884
|
+
padding: 0 ${es.horizontalSpacing};
|
|
1885
|
+
color: ${es.helperColor};
|
|
1885
1886
|
}
|
|
1886
1887
|
|
|
1887
1888
|
.ft-select--in-error .ft-select--helper-text {
|
|
1888
|
-
color: ${
|
|
1889
|
+
color: ${es.colorError};
|
|
1889
1890
|
}
|
|
1890
|
-
`;var
|
|
1891
|
-
<div class="${
|
|
1891
|
+
`;var os=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ss extends wt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return X``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}ss.elementDefinitions={},os([o({type:String})],ss.prototype,"label",void 0),os([o({type:Object,converter:t=>t})],ss.prototype,"value",void 0),os([o({type:Boolean,reflect:!0})],ss.prototype,"selected",void 0);class rs extends wt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,s;let r=this.hasOptionsMenuOpen,n=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":n,"ft-select--options-displayed":r,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return X`
|
|
1892
|
+
<div class="${ni(a)}" part="container">
|
|
1892
1893
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1893
1894
|
<ft-input-label text="${this.label}"
|
|
1894
1895
|
part="label"
|
|
@@ -1915,7 +1916,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1915
1916
|
part="options"
|
|
1916
1917
|
@keydown=${this.onOptionsKeyDown}
|
|
1917
1918
|
innerrole="listbox">
|
|
1918
|
-
${
|
|
1919
|
+
${_t(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
1919
1920
|
</div>
|
|
1920
1921
|
</div>
|
|
1921
1922
|
${this.helper?X`
|
|
@@ -1926,7 +1927,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1926
1927
|
@option-change=${this.updateOptionsFromSlot}
|
|
1927
1928
|
></slot>
|
|
1928
1929
|
`}renderOption(t){let e=this.selectedOption===t;return X`
|
|
1929
|
-
<div class="${
|
|
1930
|
+
<div class="${ni({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
1930
1931
|
part="option"
|
|
1931
1932
|
tabindex="0"
|
|
1932
1933
|
data-value="${t.value}"
|
|
@@ -1935,34 +1936,34 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1935
1936
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1936
1937
|
<span>${t.label}</span>
|
|
1937
1938
|
</div>
|
|
1938
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,r;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var e,i;if(!d(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(i=this.selectedOption)||void 0===i?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
1939
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,r;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var e,i;if(!d(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(i=this.selectedOption)||void 0===i?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}rs.elementDefinitions={"ft-input-label":ts,"ft-typography":ei,"ft-ripple":gi,"ft-icon":Di},rs.styles=[qe,Je,is],os([o({type:String})],rs.prototype,"label",void 0),os([o({type:String})],rs.prototype,"helper",void 0),os([o({type:Boolean})],rs.prototype,"outlined",void 0),os([o({type:Boolean})],rs.prototype,"disabled",void 0),os([o({type:Boolean})],rs.prototype,"error",void 0),os([o({type:Boolean})],rs.prototype,"fixedMenuPosition",void 0),os([o({type:Array})],rs.prototype,"options",void 0),os([s()],rs.prototype,"selectedOption",void 0),os([s()],rs.prototype,"optionsDisplayed",void 0),os([s()],rs.prototype,"focusOptions",void 0),os([n(".ft-select")],rs.prototype,"container",void 0),os([n(".ft-select--options")],rs.prototype,"optionsMenu",void 0),os([n(".ft-select--input-panel")],rs.prototype,"mainPanel",void 0),os([n(".ft-select--option:first-child")],rs.prototype,"firstOption",void 0),os([n(".ft-select--option:focus")],rs.prototype,"focusedOption",void 0),os([n(".ft-select--option.ft-select--option-selected")],rs.prototype,"selectedOptionElement",void 0),os([n(".ft-select--option:last-child")],rs.prototype,"lastOption",void 0),os([n("slot")],rs.prototype,"optionsSlot",void 0),h("ft-select")(rs),h("ft-select-option")(ss);const ns={display:xt.create("--ft-skeleton--display","DISPLAY","block"),width:xt.create("--ft-skeleton--width","SIZE","100%"),height:xt.create("--ft-skeleton--height","SIZE","20px"),backgroundColor:xt.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),glareWidth:xt.create("--ft-skeleton--glare-width","SIZE","200px"),glareColor:xt.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),animationDuration:xt.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),borderRadiusM:xt.external(mt.borderRadiusM,"Design system")},ls=y`
|
|
1939
1940
|
:host {
|
|
1940
|
-
width: ${
|
|
1941
|
-
height: ${
|
|
1942
|
-
display: ${
|
|
1941
|
+
width: ${ns.width};
|
|
1942
|
+
height: ${ns.height};
|
|
1943
|
+
display: ${ns.display};
|
|
1943
1944
|
overflow: hidden;
|
|
1944
|
-
border-radius: ${
|
|
1945
|
+
border-radius: ${ns.borderRadiusM};
|
|
1945
1946
|
background: linear-gradient(
|
|
1946
1947
|
90deg,
|
|
1947
1948
|
transparent,
|
|
1948
|
-
${
|
|
1949
|
-
${
|
|
1950
|
-
transparent ${
|
|
1951
|
-
), ${
|
|
1949
|
+
${ns.glareColor} calc(0.45 * ${ns.glareWidth}),
|
|
1950
|
+
${ns.glareColor} calc(0.55 * ${ns.glareWidth}),
|
|
1951
|
+
transparent ${ns.glareWidth}
|
|
1952
|
+
), ${ns.backgroundColor};
|
|
1952
1953
|
background-repeat: repeat-y;
|
|
1953
1954
|
background-size: 100vw 100vh;
|
|
1954
1955
|
background-attachment: fixed;
|
|
1955
|
-
background-position: calc(${
|
|
1956
|
-
animation: shine ${
|
|
1956
|
+
background-position: calc(${ns.glareWidth} * -1) 0;
|
|
1957
|
+
animation: shine ${ns.animationDuration} infinite;
|
|
1957
1958
|
animation-timing-function: linear;
|
|
1958
1959
|
}
|
|
1959
1960
|
|
|
1960
1961
|
@keyframes shine {
|
|
1961
1962
|
to {
|
|
1962
|
-
background-position: calc(100vw + ${
|
|
1963
|
+
background-position: calc(100vw + ${ns.glareWidth}) 0, calc(${ns.glareWidth} * -1) 0;
|
|
1963
1964
|
}
|
|
1964
1965
|
}
|
|
1965
|
-
`,
|
|
1966
|
+
`,as={height:xt.create("--ft-search-bar-height","SIZE","38px"),borderRadius:xt.extend("--ft-search-bar-border-radius",mt.borderRadiusS),mobileOpenPosition:xt.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:xt.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:xt.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:xt.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:xt.create("--ft-search-bar-mobile-open-right","SIZE","0"),desktopFiltersHeight:xt.create("--ft-search-bar-desktop-filters-height","SIZE","350px"),floatingZIndex:xt.create("--ft-search-bar-floating-components-z-index","NUMBER","3"),colorSurface:xt.external(mt.colorSurface,"Design system"),colorOnSurface:xt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:xt.external(mt.colorOnSurfaceMedium,"Design system"),colorOutline:xt.external(mt.colorOutline,"Design system"),colorPrimary:xt.external(mt.colorPrimary,"Design system"),elevation02:xt.external(mt.elevation02,"Design system"),buttonColor:xt.external(Ii.color,"Button"),buttonRippleColor:xt.external(Ii.rippleColor,"Button")},cs=y`
|
|
1966
1967
|
* {
|
|
1967
1968
|
box-sizing: border-box;
|
|
1968
1969
|
}
|
|
@@ -1971,7 +1972,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1971
1972
|
display: flex;
|
|
1972
1973
|
flex-direction: column;
|
|
1973
1974
|
gap: 8px;
|
|
1974
|
-
color: ${
|
|
1975
|
+
color: ${as.colorOnSurface};
|
|
1975
1976
|
outline: none;
|
|
1976
1977
|
}
|
|
1977
1978
|
|
|
@@ -1980,21 +1981,21 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
1980
1981
|
}
|
|
1981
1982
|
|
|
1982
1983
|
.ft-search-bar--mobile-menu-open {
|
|
1983
|
-
position: ${
|
|
1984
|
-
top: ${
|
|
1985
|
-
bottom: ${
|
|
1986
|
-
left: ${
|
|
1987
|
-
right: ${
|
|
1988
|
-
z-index: ${
|
|
1984
|
+
position: ${as.mobileOpenPosition};
|
|
1985
|
+
top: ${as.mobileOpenTop};
|
|
1986
|
+
bottom: ${as.mobileOpenBottom};
|
|
1987
|
+
left: ${as.mobileOpenLeft};
|
|
1988
|
+
right: ${as.mobileOpenRight};
|
|
1989
|
+
z-index: ${as.floatingZIndex};
|
|
1989
1990
|
padding: 16px;
|
|
1990
1991
|
}
|
|
1991
1992
|
|
|
1992
1993
|
.ft-search-bar--mobile-menu-open:not(.ft-search-bar--forced-open) {
|
|
1993
|
-
background: ${
|
|
1994
|
+
background: ${as.colorSurface};
|
|
1994
1995
|
}
|
|
1995
1996
|
|
|
1996
1997
|
.ft-search-bar--mobile-menu-open.ft-search-bar--forced-open {
|
|
1997
|
-
position: ${
|
|
1998
|
+
position: ${as.mobileOpenPosition.get("static")};
|
|
1998
1999
|
}
|
|
1999
2000
|
|
|
2000
2001
|
.ft-search-bar {
|
|
@@ -2002,20 +2003,20 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2002
2003
|
display: flex;
|
|
2003
2004
|
flex-direction: row;
|
|
2004
2005
|
align-items: center;
|
|
2005
|
-
height: ${
|
|
2006
|
+
height: ${as.height};
|
|
2006
2007
|
|
|
2007
|
-
background: ${
|
|
2008
|
-
border: 1px solid ${
|
|
2009
|
-
border-radius: ${
|
|
2008
|
+
background: ${as.colorSurface};
|
|
2009
|
+
border: 1px solid ${as.colorOutline};
|
|
2010
|
+
border-radius: ${as.borderRadius};
|
|
2010
2011
|
}
|
|
2011
2012
|
|
|
2012
2013
|
.ft-search-bar--skeleton {
|
|
2013
|
-
${yt(
|
|
2014
|
-
${yt(
|
|
2014
|
+
${yt(ns.height,as.height)};
|
|
2015
|
+
${yt(ns.borderRadiusM,as.borderRadius)};
|
|
2015
2016
|
}
|
|
2016
2017
|
|
|
2017
2018
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
2018
|
-
border-radius: ${
|
|
2019
|
+
border-radius: ${as.borderRadius} ${as.borderRadius} 0 0;
|
|
2019
2020
|
}
|
|
2020
2021
|
|
|
2021
2022
|
.ft-search-bar--input-container {
|
|
@@ -2033,7 +2034,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2033
2034
|
align-self: stretch;
|
|
2034
2035
|
display: grid;
|
|
2035
2036
|
padding: 0 8px;
|
|
2036
|
-
border-radius: ${
|
|
2037
|
+
border-radius: ${as.borderRadius};
|
|
2037
2038
|
}
|
|
2038
2039
|
|
|
2039
2040
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -2042,7 +2043,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2042
2043
|
}
|
|
2043
2044
|
|
|
2044
2045
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
2045
|
-
outline: 2px solid ${
|
|
2046
|
+
outline: 2px solid ${as.colorPrimary};
|
|
2046
2047
|
}
|
|
2047
2048
|
|
|
2048
2049
|
.ft-search-bar--input {
|
|
@@ -2050,12 +2051,12 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2050
2051
|
flex-grow: 1;
|
|
2051
2052
|
border: none;
|
|
2052
2053
|
background-color: transparent;
|
|
2053
|
-
color: ${
|
|
2054
|
+
color: ${as.colorOnSurface};
|
|
2054
2055
|
outline: none;
|
|
2055
2056
|
}
|
|
2056
2057
|
|
|
2057
2058
|
.ft-search-bar--input::placeholder {
|
|
2058
|
-
color: ${
|
|
2059
|
+
color: ${as.colorOnSurfaceMedium};
|
|
2059
2060
|
}
|
|
2060
2061
|
|
|
2061
2062
|
.ft-search-bar--actions {
|
|
@@ -2065,18 +2066,18 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2065
2066
|
align-items: center;
|
|
2066
2067
|
height: 100%;
|
|
2067
2068
|
|
|
2068
|
-
${yt(
|
|
2069
|
+
${yt(xi.zIndex,`calc(${as.floatingZIndex} + 1)`)};
|
|
2069
2070
|
}
|
|
2070
2071
|
|
|
2071
2072
|
.ft-search-bar > ft-button,
|
|
2072
2073
|
.ft-search-bar--actions ft-button {
|
|
2073
2074
|
flex-shrink: 0;
|
|
2074
|
-
${yt(
|
|
2075
|
+
${yt(Ii.backgroundColor,"transparent")};
|
|
2075
2076
|
}
|
|
2076
2077
|
|
|
2077
2078
|
.ft-search-bar--left-action {
|
|
2078
|
-
${yt(
|
|
2079
|
-
border-right: 1px solid ${
|
|
2079
|
+
${yt(Ii.borderRadius,`calc(${as.borderRadius} - 1px) 0 0 calc(${as.borderRadius} - 1px)`)};
|
|
2080
|
+
border-right: 1px solid ${as.colorOutline};
|
|
2080
2081
|
height: 100%;
|
|
2081
2082
|
}
|
|
2082
2083
|
|
|
@@ -2085,7 +2086,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2085
2086
|
}
|
|
2086
2087
|
|
|
2087
2088
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
2088
|
-
${yt(
|
|
2089
|
+
${yt(Ii.borderRadius,`calc(${as.borderRadius} - 1px) 0 0 0`)};
|
|
2089
2090
|
}
|
|
2090
2091
|
|
|
2091
2092
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -2095,13 +2096,13 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2095
2096
|
|
|
2096
2097
|
.ft-search-bar--separator {
|
|
2097
2098
|
height: 20px;
|
|
2098
|
-
border-right: 1px solid ${
|
|
2099
|
+
border-right: 1px solid ${as.colorOutline};
|
|
2099
2100
|
}
|
|
2100
2101
|
|
|
2101
2102
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
2102
|
-
${yt(
|
|
2103
|
-
${yt(
|
|
2104
|
-
${yt(
|
|
2103
|
+
${yt(Yo.borderColor,"transparent")};
|
|
2104
|
+
${yt(Yo.borderRadiusS,`calc(${as.borderRadius} - 1px)`)};
|
|
2105
|
+
${yt(es.selectedOptionColor,as.buttonColor)};
|
|
2105
2106
|
}
|
|
2106
2107
|
|
|
2107
2108
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -2118,17 +2119,17 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2118
2119
|
}
|
|
2119
2120
|
|
|
2120
2121
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
2121
|
-
border-radius: calc(${
|
|
2122
|
+
border-radius: calc(${as.borderRadius} - 1px) 0 0 calc(${as.borderRadius} - 1px);
|
|
2122
2123
|
}
|
|
2123
2124
|
|
|
2124
|
-
`,
|
|
2125
|
+
`,hs=y`
|
|
2125
2126
|
.ft-search-bar--presets {
|
|
2126
2127
|
min-width: 200px;
|
|
2127
2128
|
}
|
|
2128
2129
|
|
|
2129
2130
|
.ft-search-bar--desktop-menu .ft-search-bar--presets {
|
|
2130
2131
|
margin-right: auto;
|
|
2131
|
-
${yt(
|
|
2132
|
+
${yt(es.optionsZIndex,"2")};
|
|
2132
2133
|
}
|
|
2133
2134
|
|
|
2134
2135
|
.ft-search-bar--desktop-menu {
|
|
@@ -2181,8 +2182,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2181
2182
|
|
|
2182
2183
|
.ft-search-bar--desktop-menu .ft-search-bar--filters-container {
|
|
2183
2184
|
display: block;
|
|
2184
|
-
height: ${
|
|
2185
|
-
${yt(
|
|
2185
|
+
height: ${as.desktopFiltersHeight};
|
|
2186
|
+
${yt(uo.gap,"16px")};
|
|
2186
2187
|
}
|
|
2187
2188
|
|
|
2188
2189
|
.ft-search-bar--desktop-menu ft-filter {
|
|
@@ -2197,15 +2198,15 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2197
2198
|
}
|
|
2198
2199
|
|
|
2199
2200
|
.ft-search-bar--desktop-menu [data-filters-count="2"] ft-filter {
|
|
2200
|
-
max-width: calc(50% - ${
|
|
2201
|
+
max-width: calc(50% - ${uo.gap} / 2);
|
|
2201
2202
|
}
|
|
2202
2203
|
|
|
2203
2204
|
.ft-search-bar--desktop-menu [data-filters-count="3"] ft-filter {
|
|
2204
|
-
max-width: max(250px, calc(33% - 2 * ${
|
|
2205
|
+
max-width: max(250px, calc(33% - 2 * ${uo.gap} / 3));
|
|
2205
2206
|
}
|
|
2206
2207
|
|
|
2207
2208
|
.ft-search-bar--desktop-menu [data-filters-count="4"] ft-filter {
|
|
2208
|
-
max-width: max(250px, calc(25% - 3 * ${
|
|
2209
|
+
max-width: max(250px, calc(25% - 3 * ${uo.gap} / 4));
|
|
2209
2210
|
}
|
|
2210
2211
|
|
|
2211
2212
|
.ft-search-bar--hierarchical-filter {
|
|
@@ -2262,7 +2263,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2262
2263
|
.ft-search-bar--filter-label-values {
|
|
2263
2264
|
flex-grow: 0;
|
|
2264
2265
|
flex-shrink: 1;
|
|
2265
|
-
color: ${
|
|
2266
|
+
color: ${as.colorOnSurfaceMedium};
|
|
2266
2267
|
}
|
|
2267
2268
|
|
|
2268
2269
|
ft-accordion-item::part(toggle) {
|
|
@@ -2282,12 +2283,12 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2282
2283
|
.ft-search-bar--desktop-menu .ft-search-bar--launch-search {
|
|
2283
2284
|
margin: 0;
|
|
2284
2285
|
}
|
|
2285
|
-
`;class
|
|
2286
|
-
`}}
|
|
2286
|
+
`;class ps extends wt{render(){return X`
|
|
2287
|
+
`}}ps.elementDefinitions={},ps.styles=ls,h("ft-skeleton")(ps);class ds{constructor(t,i=300){this.searchBar=t,this.updateDebouncer=new e(i)}render(){const t=this.searchBar.recentSearches.filter((t=>t.toLowerCase().includes(this.searchBar.query.toLowerCase()))),e=this.searchBar.suggestions.length>0||t.length>0;return X`
|
|
2287
2288
|
<div class="ft-search-bar--suggestions ft-word-wrap ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2288
2289
|
part="suggestions-container"
|
|
2289
2290
|
@keydown=${t=>this.onSuggestKeyDown(t)}>
|
|
2290
|
-
${
|
|
2291
|
+
${_t(t.slice(0,5),(t=>t),(t=>X`
|
|
2291
2292
|
<a href="${this.searchBar.searchRequestSerializer({...this.searchBar.request,query:t})}"
|
|
2292
2293
|
part="suggestions"
|
|
2293
2294
|
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
@@ -2305,7 +2306,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2305
2306
|
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2306
2307
|
</a>
|
|
2307
2308
|
`))}
|
|
2308
|
-
${
|
|
2309
|
+
${_t(this.searchBar.suggestions,(t=>t.value),(t=>X`
|
|
2309
2310
|
<a href="${this.searchBar.searchRequestSerializer({...this.searchBar.request,query:t.value})}"
|
|
2310
2311
|
part="suggestions"
|
|
2311
2312
|
class="ft-search-bar--suggestion"
|
|
@@ -2317,11 +2318,11 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2317
2318
|
</a>
|
|
2318
2319
|
`))}
|
|
2319
2320
|
</div>
|
|
2320
|
-
`}update(){return new Promise(((t,e)=>{this.updateDebouncer.run((async()=>{this.searchBar.suggestions=this.searchBar.api&&this.searchBar.query.length>2?await this.searchBar.api.getSuggestions(this.searchBar.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],t()}))}))}onSuggestKeyDown(t){var e,i,o,s,r,n;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(r=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.searchBar.setQuery(e),this.searchBar.launchSearch()}removeRecentSearch(t,e){var i,o;t.preventDefault(),t.stopPropagation();let s=t.target.closest(".ft-search-bar--suggestion");const r=null!==(o=null!==(i=null==s?void 0:s.previousElementSibling)&&void 0!==i?i:null==s?void 0:s.nextElementSibling)&&void 0!==o?o:this.searchBar.input;null==r||r.focus(),this.searchBar.recentSearches=this.searchBar.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.searchBar.saveRecentSearches()}getIcon(t){const e="DOCUMENT"===t.type?
|
|
2321
|
+
`}update(){return new Promise(((t,e)=>{this.updateDebouncer.run((async()=>{this.searchBar.suggestions=this.searchBar.api&&this.searchBar.query.length>2?await this.searchBar.api.getSuggestions(this.searchBar.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],t()}))}))}onSuggestKeyDown(t){var e,i,o,s,r,n;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(r=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.searchBar.setQuery(e),this.searchBar.launchSearch()}removeRecentSearch(t,e){var i,o;t.preventDefault(),t.stopPropagation();let s=t.target.closest(".ft-search-bar--suggestion");const r=null!==(o=null!==(i=null==s?void 0:s.previousElementSibling)&&void 0!==i?i:null==s?void 0:s.nextElementSibling)&&void 0!==o?o:this.searchBar.input;null==r||r.focus(),this.searchBar.recentSearches=this.searchBar.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.searchBar.saveRecentSearches()}getIcon(t){const e="DOCUMENT"===t.type?Ri.file_format:Ri.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?Ei.BOOK:Ei.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,r;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[n,l]=((null!==(i=Mi.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(r=null!==(s=null!==(o=Bi.get(l))&&void 0!==o?o:Bi.get(e))&&void 0!==s?s:Bi.get(n))&&void 0!==r?r:zi.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=Ei.TOPICS}return X`
|
|
2321
2322
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2322
2323
|
${i}
|
|
2323
2324
|
</ft-icon>
|
|
2324
|
-
`}getFocusedSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion:focus-within")}getLastSuggestionElement(){let t=this.searchBar.querySelectorAll(".ft-search-bar--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}}
|
|
2325
|
+
`}getFocusedSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion:focus-within")}getLastSuggestionElement(){let t=this.searchBar.querySelectorAll(".ft-search-bar--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}}ds.styles=[St,y`
|
|
2325
2326
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2326
2327
|
flex-grow: 1;
|
|
2327
2328
|
flex-shrink: 1;
|
|
@@ -2330,7 +2331,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2330
2331
|
}
|
|
2331
2332
|
|
|
2332
2333
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2333
|
-
border-top: 1px solid ${
|
|
2334
|
+
border-top: 1px solid ${as.colorOutline};
|
|
2334
2335
|
}
|
|
2335
2336
|
|
|
2336
2337
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2340,15 +2341,15 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2340
2341
|
.ft-search-bar--floating-panel,
|
|
2341
2342
|
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2342
2343
|
position: absolute;
|
|
2343
|
-
z-index: ${
|
|
2344
|
+
z-index: ${as.floatingZIndex};
|
|
2344
2345
|
top: 100%;
|
|
2345
2346
|
left: -1px;
|
|
2346
2347
|
right: -1px;
|
|
2347
2348
|
display: none;
|
|
2348
|
-
background: ${
|
|
2349
|
-
border: 1px solid ${
|
|
2350
|
-
border-radius: 0 0 ${
|
|
2351
|
-
box-shadow: ${
|
|
2349
|
+
background: ${as.colorSurface};
|
|
2350
|
+
border: 1px solid ${as.colorOutline};
|
|
2351
|
+
border-radius: 0 0 ${as.borderRadius} ${as.borderRadius};
|
|
2352
|
+
box-shadow: ${as.elevation02};
|
|
2352
2353
|
outline: none;
|
|
2353
2354
|
}
|
|
2354
2355
|
|
|
@@ -2368,7 +2369,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2368
2369
|
padding: 8px;
|
|
2369
2370
|
gap: 8px;
|
|
2370
2371
|
cursor: pointer;
|
|
2371
|
-
color: ${
|
|
2372
|
+
color: ${as.colorOnSurface};
|
|
2372
2373
|
min-height: 52px;
|
|
2373
2374
|
}
|
|
2374
2375
|
|
|
@@ -2385,7 +2386,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2385
2386
|
}
|
|
2386
2387
|
|
|
2387
2388
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2388
|
-
border-top: 1px solid ${
|
|
2389
|
+
border-top: 1px solid ${as.colorOutline};
|
|
2389
2390
|
}
|
|
2390
2391
|
|
|
2391
2392
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2393,7 +2394,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2393
2394
|
flex-grow: 1;
|
|
2394
2395
|
flex-shrink: 1;
|
|
2395
2396
|
}
|
|
2396
|
-
`];class
|
|
2397
|
+
`];class fs{constructor(t){this.searchBar=t}render(){if(!this.searchBar.hasLocaleSelector()&&!this.searchBar.hasFacets())return X``;const t=this.searchBar.isMobile(),e=!t&&this.searchBar.dense||t&&this.searchBar.isMobileMenuOpen(),i=X`
|
|
2397
2398
|
${this.searchBar.hasLocaleSelector()&&(this.searchBar.hasFacets()||t)?X`
|
|
2398
2399
|
<ft-chip part="selected-filters selected-filter-ft-locale"
|
|
2399
2400
|
?dense=${this.searchBar.dense&&!t}
|
|
@@ -2404,7 +2405,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2404
2405
|
${this.getLocaleLabel(this.searchBar.contentLocale)}
|
|
2405
2406
|
</ft-chip>
|
|
2406
2407
|
`:null}
|
|
2407
|
-
${
|
|
2408
|
+
${_t(this.searchBar.facets,(t=>t.key),(i=>{const o=function(t){return ii(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(i);return _t(o,(s=>{let r=i.label+": "+function(t){return oi(t).split("|").join(" > ")}(s);const n=i.key.replace(":","-"),l=X`
|
|
2408
2409
|
<ft-chip
|
|
2409
2410
|
part="selected-filters selected-filter-${n}"
|
|
2410
2411
|
?dense=${this.searchBar.dense&&!t}
|
|
@@ -2417,7 +2418,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2417
2418
|
@icon-click=${()=>this.searchBar.setFilter(i.key,o.filter((t=>t!==s)))}
|
|
2418
2419
|
data-key="${i.key}"
|
|
2419
2420
|
data-value="${s}">
|
|
2420
|
-
${function(t){return
|
|
2421
|
+
${function(t){return oi(t).split("|").pop()}(s)}
|
|
2421
2422
|
</ft-chip>
|
|
2422
2423
|
`;return e?l:X`
|
|
2423
2424
|
<ft-tooltip inline text="${r}">
|
|
@@ -2443,7 +2444,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2443
2444
|
<div class="ft-search-bar--selected-filters" part="selected-filters-container">
|
|
2444
2445
|
${i}
|
|
2445
2446
|
</div>
|
|
2446
|
-
`}openMobileFilters(t){this.searchBar.isMobile()&&(this.searchBar.mobileMenuOpen=!0,this.searchBar.displayFacets=!0,this.searchBar.scrollToFacet=t)}getLocaleLabel(t){var e;return null!==(e=this.searchBar.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}}
|
|
2447
|
+
`}openMobileFilters(t){this.searchBar.isMobile()&&(this.searchBar.mobileMenuOpen=!0,this.searchBar.displayFacets=!0,this.searchBar.scrollToFacet=t)}getLocaleLabel(t){var e;return null!==(e=this.searchBar.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}}fs.styles=y`
|
|
2447
2448
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2448
2449
|
flex-shrink: 0;
|
|
2449
2450
|
display: flex;
|
|
@@ -2454,7 +2455,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2454
2455
|
|
|
2455
2456
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2456
2457
|
overflow: hidden;
|
|
2457
|
-
${yt(
|
|
2458
|
+
${yt(uo.gap,"4px")};
|
|
2458
2459
|
}
|
|
2459
2460
|
|
|
2460
2461
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -2462,8 +2463,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2462
2463
|
}
|
|
2463
2464
|
|
|
2464
2465
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2465
|
-
${yt(
|
|
2466
|
-
${yt(
|
|
2466
|
+
${yt(_o.iconSize,"17px")};
|
|
2467
|
+
${yt(_o.fontSize,"12px")};
|
|
2467
2468
|
}
|
|
2468
2469
|
|
|
2469
2470
|
.ft-search-bar--selected-filters * {
|
|
@@ -2473,8 +2474,8 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2473
2474
|
.ft-search-bar--selected-filters ft-chip {
|
|
2474
2475
|
flex-grow: 0;
|
|
2475
2476
|
}
|
|
2476
|
-
`;class
|
|
2477
|
-
<div class="${
|
|
2477
|
+
`;class us{constructor(t,e,i){this.searchBar=t,this.selectedFacetsManager=null!=e?e:new fs(t),this.suggestManager=null!=i?i:new ds(t)}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--mobile":!0,"ft-search-bar--mobile-menu-open":this.searchBar.isMobileMenuOpen(),"ft-search-bar--forced-open":this.searchBar.forceMobileMenuOpen};return X`
|
|
2478
|
+
<div class="${ni(t)}" part="container" tabindex="-1">
|
|
2478
2479
|
<div class="ft-search-bar">
|
|
2479
2480
|
<div class="ft-search-bar--input-container" part="input-container">
|
|
2480
2481
|
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
@@ -2522,10 +2523,10 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2522
2523
|
@click=${()=>{var t;return this.searchBar.isMobileMenuOpen()?this.searchBar.launchSearch():null===(t=this.searchBar.input)||void 0===t?void 0:t.focus()}}
|
|
2523
2524
|
></ft-button>
|
|
2524
2525
|
</div>
|
|
2525
|
-
`}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}
|
|
2526
|
+
`}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}us.styles=y`
|
|
2526
2527
|
|
|
2527
|
-
`;class
|
|
2528
|
-
<div class="${
|
|
2528
|
+
`;class bs{constructor(t,e,i){this.searchBar=t,this.selectedFacetsManager=null!=e?e:new fs(t),this.suggestManager=null!=i?i:new ds(t)}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":this.searchBar.dense,"ft-search-bar--desktop":!0,"ft-search-bar--floating-panel-open":this.searchBar.displayFacets&&!this.searchBar.forceMenuOpen,"ft-search-bar--forced-open":this.searchBar.forceMenuOpen};return X`
|
|
2529
|
+
<div class="${ni(t)}" part="container" tabindex="-1">
|
|
2529
2530
|
<div class="ft-search-bar" part="search-bar">
|
|
2530
2531
|
${this.renderSearchBarLeftAction()}
|
|
2531
2532
|
<div class="ft-search-bar--input-container" part="input-container" tabindex="-1">
|
|
@@ -2561,7 +2562,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2561
2562
|
part="content-locale select-ft-locale"
|
|
2562
2563
|
.exportpartsPrefixes=${["content-locale","select-ft-locale"]}
|
|
2563
2564
|
@change=${t=>this.searchBar.contentLocale=null==t.detail?void 0:t.detail}>
|
|
2564
|
-
${
|
|
2565
|
+
${_t(this.searchBar.availableContentLocales,(t=>t.lang),(t=>X`
|
|
2565
2566
|
<ft-select-option .value=${t.lang}
|
|
2566
2567
|
label="${t.label}"
|
|
2567
2568
|
?selected=${t.lang===this.searchBar.contentLocale}>
|
|
@@ -2589,9 +2590,9 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2589
2590
|
@click=${()=>this.searchBar.launchSearch()}
|
|
2590
2591
|
></ft-button>
|
|
2591
2592
|
</div>
|
|
2592
|
-
`}onSearchBarKeyDown(t){var e;switch(t.key){case"Escape":this.searchBar.mobileMenuOpen=!1,null===(e=this.searchBar.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.suggestManager.focusFirstSuggestion()}}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}
|
|
2593
|
+
`}onSearchBarKeyDown(t){var e;switch(t.key){case"Escape":this.searchBar.mobileMenuOpen=!1,null===(e=this.searchBar.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.suggestManager.focusFirstSuggestion()}}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.searchBar.query=e.value,"Enter"===t.key&&this.searchBar.launchSearch()}}bs.styles=y`
|
|
2593
2594
|
|
|
2594
|
-
`;var
|
|
2595
|
+
`;var vs=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const gs={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove",back:"Back"};class xs extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class ys extends CustomEvent{constructor(t){super("change",{detail:t})}}const ms=()=>{};class $s extends wt{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new Ct(gs,{}),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=Ht.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.suggestManager=new ds(this),this.selectedFacetsManager=new fs(this),this.desktopSearchBarManager=new bs(this),this.mobileSearchBarManager=new us(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new e(10),this.updateLocalesDebouncer=new e(10),this.facetsLoaded=!1,this.updateFacetsDebouncer=new e(500),this.closeFloatingContainer=t=>{this.isMobile()||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>t.values.length>0&&!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===Ht.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return null!=this.presets&&this.presets.length>0}get hasPriors(){return null!=this.priors&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}focusInput(){this.input?this.input.focus():setTimeout((()=>this.focusInput()),50)}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return X`
|
|
2595
2596
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2596
2597
|
${this.renderSearchBar()}
|
|
2597
2598
|
`}renderSearchBar(){return this.facetsInitialized&&this.availableContentLocalesInitialized?this.isMobile()?this.mobileSearchBarManager.render():this.desktopSearchBarManager.render():X`
|
|
@@ -2621,7 +2622,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2621
2622
|
></ft-filter>
|
|
2622
2623
|
</ft-accordion-item>
|
|
2623
2624
|
`:null}
|
|
2624
|
-
${
|
|
2625
|
+
${_t(this.facets,(t=>t.key),(t=>{const e=ri(t),i=t.key.replace(":","-"),o=function(t){return ii(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e);return t.rootNodes.length>0?X`
|
|
2625
2626
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2626
2627
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2627
2628
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
@@ -2671,7 +2672,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2671
2672
|
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2672
2673
|
outlined
|
|
2673
2674
|
@change=${t=>this.selectedPreset=t.detail}>
|
|
2674
|
-
${
|
|
2675
|
+
${_t(null!==(t=this.presets)&&void 0!==t?t:[],(t=>t.name),(t=>X`
|
|
2675
2676
|
<ft-select-option value="${t.name}"
|
|
2676
2677
|
label="${t.name}"
|
|
2677
2678
|
?selected=${t.name===this.selectedPreset}>
|
|
@@ -2705,7 +2706,7 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2705
2706
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2706
2707
|
></ft-filter>
|
|
2707
2708
|
`:Q}
|
|
2708
|
-
${
|
|
2709
|
+
${_t(this.facets,(t=>t.key),(t=>{const e=ri(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0})),o=t.key.replace(":","-");return X`
|
|
2709
2710
|
<ft-filter
|
|
2710
2711
|
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2711
2712
|
part="filters filter filter-${o}"
|
|
@@ -2724,10 +2725,10 @@ class Si extends Rt{constructor(t){if(super(t),this.it=Q,t.type!==Nt)throw Error
|
|
|
2724
2725
|
></ft-filter>
|
|
2725
2726
|
`}))}
|
|
2726
2727
|
</ft-snap-scroll>
|
|
2727
|
-
`:Q}async firstUpdated(t){super.firstUpdated(t),this.initApi(),window.addEventListener("storage",(t=>{t.key===this.recentSearchesStorageKey&&this.initRecentSearches()}))}update(t){var e,i,o,s,r;if(t.has("labels")&&(this.labelResolver=new
|
|
2728
|
+
`:Q}async firstUpdated(t){super.firstUpdated(t),this.initApi(),window.addEventListener("storage",(t=>{t.key===this.recentSearchesStorageKey&&this.initRecentSearches()}))}update(t){var e,i,o,s,r;if(t.has("labels")&&(this.labelResolver=new Ct(gs,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),t.has("presets")&&(null!==(i=this.presets)&&void 0!==i?i:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>oi(t))))))),t.has("presets")||t.has("selectedPreset")){const t=(null!==(o=this.presets)&&void 0!==o?o:[]).find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}t.has("contentLocale")&&null!=this.contentLocale&&(this.knownFacetLabels=new Map),["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(r=(null!==(s=this.presets)&&void 0!==s?s:[]).find((t=>this.compareRequests(t,this.request))))||void 0===r?void 0:r.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi()),t.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","searchFilters","displayedFilters"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.suggestManager.update(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run((()=>this.dispatchEvent(new ys(this.request))))}initSearchData(){this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run((()=>{var t;null===(t=this.api)||void 0===t||t.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[])).then((t=>{this.availableContentLocales=t,this.availableContentLocalesInitialized=!0}))})),this.updateFacetsDebouncer.run((()=>{this.retrieveFacetsFromSearch().then((()=>{this.facetsLoaded=!0,this.facetsInitialized=!0}))}),this.facetsInitialized?500:10)}updateFacets(){this.api&&(this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{await this.retrieveFacetsFromSearch(),this.facetsLoaded=!0,this.facetsInitialized=!0}),this.facetsInitialized?500:10)):this.facets=[])}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout((()=>this.initApi()),10))}async retrieveFacetsFromSearch(){var t;const e=new Map;await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets.forEach((t=>{this.knownFacetLabels.set(t.key,t.label),e.set(t.key,t)})))).catch(ms)),this.facets=[];for(let t of this.facetsRequest)e.has(t.id)?this.facets.push(e.get(t.id)):this.knownFacetLabels.has(t.id)&&this.facets.push({key:t.id,label:this.knownFacetLabels.get(t.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1})}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new xs(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var t;this.recentSearches=JSON.parse(null!==(t=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==t?t:"[]")}saveRecentSearches(){const t=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,t),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:t,storageArea:window.localStorage,url:window.location.href}))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&ii(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=>ii(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}querySelector(t){return this.shadowRoot.querySelector(t)}querySelectorAll(t){return this.shadowRoot.querySelectorAll(t)}renderDesktopFloatingMenu(){return this.forceMenuOpen?Q:X`
|
|
2728
2729
|
<div class="ft-search-bar--floating-panel"
|
|
2729
2730
|
@keyup=${this.onFloatingContainerKeyUp}
|
|
2730
2731
|
part="floating-panel"
|
|
2731
2732
|
tabindex="-1">
|
|
2732
2733
|
${this.renderDesktopMenu()}
|
|
2733
|
-
</div>`}}
|
|
2734
|
+
</div>`}}$s.elementDefinitions={"ft-accordion":Lo,"ft-accordion-item":Ao,"ft-button":Hi,"ft-chip":Xo,"ft-filter":Bo,"ft-filter-option":No,"ft-icon":Di,"ft-ripple":gi,"ft-select":rs,"ft-select-option":ss,"ft-size-watcher":Vt,"ft-skeleton":ps,"ft-snap-scroll":xo,"ft-tooltip":$i,"ft-typography":ei},$s.styles=[qe,cs,hs,fs.styles,ds.styles],vs([o({type:Boolean})],$s.prototype,"dense",void 0),vs([o()],$s.prototype,"mode",void 0),vs([o({type:Boolean})],$s.prototype,"forceMobileMenuOpen",void 0),vs([o({type:Boolean})],$s.prototype,"forceMenuOpen",void 0),vs([o()],$s.prototype,"baseUrl",void 0),vs([o()],$s.prototype,"apiIntegrationIdentifier",void 0),vs([o()],$s.prototype,"contentLocale",void 0),vs([s()],$s.prototype,"availableContentLocales",void 0),vs([s()],$s.prototype,"availableContentLocalesInitialized",void 0),vs([o()],$s.prototype,"uiLocale",void 0),vs([p({})],$s.prototype,"labels",void 0),vs([p([])],$s.prototype,"displayedFilters",void 0),vs([p([])],$s.prototype,"presets",void 0),vs([o({type:String,reflect:!0})],$s.prototype,"selectedPreset",void 0),vs([p([])],$s.prototype,"priors",void 0),vs([o()],$s.prototype,"searchRequestSerializer",void 0),vs([s()],$s.prototype,"searchFilters",void 0),vs([s()],$s.prototype,"sizeCategory",void 0),vs([s()],$s.prototype,"displayFacets",void 0),vs([s()],$s.prototype,"mobileMenuOpen",void 0),vs([s()],$s.prototype,"facets",void 0),vs([s()],$s.prototype,"facetsInitialized",void 0),vs([n(".ft-search-bar--container")],$s.prototype,"container",void 0),vs([n(".ft-search-bar--filters-opener")],$s.prototype,"filtersOpener",void 0),vs([n(".ft-search-bar--floating-panel")],$s.prototype,"floatingContainer",void 0),vs([n("ft-snap-scroll.ft-search-bar--filters-container")],$s.prototype,"scrollingFiltersContainer",void 0),vs([n(".ft-search-bar--input")],$s.prototype,"input",void 0),vs([s()],$s.prototype,"query",void 0),vs([s()],$s.prototype,"suggestions",void 0),vs([s()],$s.prototype,"recentSearches",void 0),vs([s()],$s.prototype,"scrollToFacet",void 0),vs([s()],$s.prototype,"api",void 0),vs([s()],$s.prototype,"facetsLoaded",void 0),h("ft-search-bar")($s),t.DEFAULT_LABELS=gs,t.FtSearchBar=$s,t.FtSearchBarCssVariables=as,t.LaunchSearchEvent=xs,t.SearchStateChangeEvent=ys,t.facetsCss=hs,t.searchBarCss=cs,Object.defineProperty(t,"i",{value:!0})}({});
|