@fluid-topics/ft-search-bar 0.1.16 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-bar.d.ts +2 -2
- package/build/ft-search-bar.inline-styles.js +2459 -0
- package/build/ft-search-bar.js +12 -20
- package/build/ft-search-bar.light.js +1207 -1299
- package/build/ft-search-bar.min.js +1242 -1335
- package/build/index.d.ts +2 -0
- package/build/index.js +5 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +4 -0
- package/package.json +15 -16
|
@@ -0,0 +1,2459 @@
|
|
|
1
|
+
!function(){
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
5
|
+
* This code may only be used under the BSD style license found at
|
|
6
|
+
* http://polymer.github.io/LICENSE.txt
|
|
7
|
+
* The complete set of authors may be found at
|
|
8
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
9
|
+
* The complete set of contributors may be found at
|
|
10
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
11
|
+
* Code distributed by Google as part of the polymer project is also
|
|
12
|
+
* subject to an additional IP rights grant found at
|
|
13
|
+
* http://polymer.github.io/PATENTS.txt
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
|
+
*/
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(r.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(li){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class t{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/const e=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function i(t){return(i,o)=>void 0!==o?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,i,o):e(t,i)
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/}function o(t){return i({...t,state:!0})}
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2017 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*/const s=({finisher:t,descriptor:e})=>(i,o)=>{var s;if(void 0===o){const o=null!==(s=i.originalKey)&&void 0!==s?s:i.key,n=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(n.finisher=function(e){t(e,o)}),n}{const s=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(s,o)}}
|
|
33
|
+
/**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright 2017 Google LLC
|
|
36
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
+
*/;function n(t,e){return s({descriptor:i=>{const o={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[e]&&(this[e]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null),this[e]}}return o}})}
|
|
38
|
+
/**
|
|
39
|
+
* @license
|
|
40
|
+
* Copyright 2017 Google LLC
|
|
41
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2021 Google LLC
|
|
46
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
+
*/
|
|
48
|
+
var r;const l=null!=(null===(r=window.HTMLSlotElement)||void 0===r?void 0:r.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function a(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const s="slot"+(e?`[name=${e}]`:":not([name])"),n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(s),r=null!=n?l(n,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}
|
|
49
|
+
/**
|
|
50
|
+
* @license
|
|
51
|
+
* Copyright 2017 Google LLC
|
|
52
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
+
*/const c=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function h(t,e){const o=()=>JSON.parse(JSON.stringify(t));return i({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}
|
|
54
|
+
/**
|
|
55
|
+
* @license
|
|
56
|
+
* Copyright 2019 Google LLC
|
|
57
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
+
*/const p=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),f=new Map;class u{constructor(t,e){if(this._$cssResult$=!0,e!==d)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=f.get(this.cssText);return p&&void 0===t&&(f.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const b=t=>new u("string"==typeof t?t:t+"",d),v=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new u(i,d)},g=(t,e)=>{p?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=window.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},x=p?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return b(e)})(t):t
|
|
59
|
+
/**
|
|
60
|
+
* @license
|
|
61
|
+
* Copyright 2017 Google LLC
|
|
62
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
+
*/;var y;const m=window.trustedTypes,$=m?m.emptyScript:"",w=window.reactiveElementPolyfillSupport,k={toAttribute(t,e){switch(e){case Boolean:t=t?$:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},S=(t,e)=>e!==t&&(e==e||t==t),O={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:S};class C extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Eh(i,e);void 0!==o&&(this._$Eu.set(o,i),t.push(o))})),t}static createProperty(t,e=O){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const s=this[t];this[e]=o,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||O}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return g(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=O){var o,s;const n=this.constructor._$Eh(t,i);if(void 0!==n&&!0===i.reflect){const r=(null!==(s=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==s?s:k.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,e){var i,o,s;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(s=null!==(o=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==s?s:k.fromAttribute;this._$Ei=r,this[r]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||S)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
64
|
+
/**
|
|
65
|
+
* @license
|
|
66
|
+
* Copyright 2017 Google LLC
|
|
67
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
|
+
*/
|
|
69
|
+
var z;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.2.2");const E=globalThis.trustedTypes,B=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,N=`lit$${(Math.random()+"").slice(9)}$`,F="?"+N,R=`<${F}>`,M=document,L=(t="")=>M.createComment(t),D=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>{var e;return j(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,A=/>/g,P=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,_=/'/g,H=/"/g,Z=/^(?:script|style|textarea|title)$/i,K=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),W=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),q=new WeakMap,J=M.createTreeWalker(M,129,null,!1),X=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=U;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===U?"!--"===a[1]?r=T:void 0!==a[1]?r=A:void 0!==a[2]?(Z.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=P):void 0!==a[3]&&(r=P):r===P?">"===a[0]?(r=null!=s?s:U,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?P:'"'===a[3]?H:_):r===H||r===_?r=P:r===T||r===A?r=U:(r=P,s=void 0);const p=r===P&&t[e+1].startsWith("/>")?" ":"";n+=r===U?i+R:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+N+p):i+N+(-2===c?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==B?B.createHTML(l):l,o]};class Y{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,c]=X(t,e);if(this.el=Y.createElement(a,i),J.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=J.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(N)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(N),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?it:"?"===e[1]?st:"@"===e[1]?nt:et})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Z.test(o.tagName)){const t=o.textContent.split(N),e=t.length-1;if(e>0){o.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),J.nextNode(),l.push({type:2,index:++s});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===F)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(N,t+1));)l.push({type:7,index:s}),t+=N.length-1}s++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){var s,n,r,l;if(e===W)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=D(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=Q(t,a._$AS(t,e.values),a,o)),e}class G{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:M).importNode(i,!0);J.currentNode=s;let n=J.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new tt(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new rt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=J.nextNode(),r++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{constructor(t,e,i,o){var s;this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),D(t)?t===V||null==t||""===t?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==W&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):I(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==V&&D(this._$AH)?this._$AA.nextSibling.data=t:this.S(M.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Y.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new G(s,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new Y(t)),e}A(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new tt(this.M(L()),this.M(L()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class et{constructor(t,e,i,o,s){this.type=1,this._$AH=V,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=Q(this,t,e,0),n=!D(t)||t!==this._$AH&&t!==W,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Q(this,o[i+r],e,r),l===W&&(l=this._$AH[r]),n||(n=!D(l)||l!==this._$AH[r]),l===V?t=V:t!==V&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.k(t)}k(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class it extends et{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===V?void 0:t}}const ot=E?E.emptyScript:"";class st extends et{constructor(){super(...arguments),this.type=4}k(t){t&&t!==V?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class nt extends et{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:V)===W)return;const o=this._$AH,s=t===V&&o!==V||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==V&&(o===V||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class rt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const lt={P:"$lit$",V:N,L:F,I:1,N:X,R:G,D:I,j:Q,H:tt,O:et,F:st,B:nt,W:it,Z:rt},at=window.litHtmlPolyfillSupport;
|
|
70
|
+
/**
|
|
71
|
+
* @license
|
|
72
|
+
* Copyright 2017 Google LLC
|
|
73
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
+
*/
|
|
75
|
+
var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?z:globalThis.litHtmlVersions=[]).push("2.1.3");class pt extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var o,s;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new tt(e.insertBefore(L(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return W}}pt.finalized=!0,pt._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:pt});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:pt}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.1.2");class ft{constructor(t,e,i,o,s){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=o,this.context=s,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,i){return new ft(t,e,void 0,i)}static extend(t,e,i){return new ft(t,e.category,e,i)}static external(t,e){return new ft(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return v`var(${b(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):b(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function ut(t,e){return b(`${t.name}: ${e}`)}const bt={colorPrimary:ft.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:ft.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:ft.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:ft.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:ft.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:ft.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:ft.create("--ft-color-error","COLOR","#B00020"),colorOutline:ft.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:ft.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:ft.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:ft.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:ft.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:ft.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:ft.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:ft.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:ft.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:ft.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:ft.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:ft.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:ft.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:ft.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:ft.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:ft.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:ft.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:ft.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:ft.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:ft.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:ft.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:ft.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:ft.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:ft.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:ft.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:ft.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:ft.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:ft.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:ft.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:ft.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:ft.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:ft.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:ft.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:ft.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:ft.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:ft.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:ft.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:ft.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:ft.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:ft.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:ft.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:ft.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:ft.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:ft.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:ft.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:ft.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:ft.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:ft.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:ft.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:ft.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:ft.create("--ft-border-radius-XL","SIZE","16px"),titleFont:ft.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:ft.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:ft.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:ft.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
76
|
+
/**
|
|
77
|
+
* @license
|
|
78
|
+
* Copyright 2021 Google LLC
|
|
79
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
+
*/class vt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return g(s,this.constructor.elementStyles),s}}}(pt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),K`
|
|
81
|
+
${t.map((t=>K`
|
|
82
|
+
<style>${t}</style>
|
|
83
|
+
`))}
|
|
84
|
+
${this.getTemplate()}
|
|
85
|
+
`}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const gt=v`
|
|
86
|
+
.ft-no-text-select {
|
|
87
|
+
-webkit-touch-callout: none;
|
|
88
|
+
-webkit-user-select: none;
|
|
89
|
+
-khtml-user-select: none;
|
|
90
|
+
-moz-user-select: none;
|
|
91
|
+
-ms-user-select: none;
|
|
92
|
+
user-select: none;
|
|
93
|
+
}
|
|
94
|
+
`;class xt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;let s=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>s=s.replace(new RegExp(`\\{${e}\\}`,"g"),t))),s}}var yt,mt,$t;const wt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==($t=null===(mt=null===(yt=window.safari)||void 0===yt?void 0:yt.pushNotification)||void 0===mt?void 0:mt.toString())&&void 0!==$t?$t:""),kt=1,St=2,Ot=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
95
|
+
/**
|
|
96
|
+
* @license
|
|
97
|
+
* Copyright 2017 Google LLC
|
|
98
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
99
|
+
*/class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
100
|
+
/**
|
|
101
|
+
* @license
|
|
102
|
+
* Copyright 2020 Google LLC
|
|
103
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
|
+
*/const{H:zt}=lt,Et=()=>document.createComment(""),Bt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Et(),n),o=s.insertBefore(Et(),n);i=new zt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Nt=(t,e,i=t)=>(t._$AI(e,i),t),Ft={},Rt=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}},Mt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Lt=Ot(class extends Ct{constructor(t){if(super(t),t.type!==St)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.at=l,r;const a=null!==(s=this.at)&&void 0!==s?s:this.at=[],c=[];let h,p,d=0,f=n.length-1,u=0,b=r.length-1;for(;d<=f&&u<=b;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])c[u]=Nt(n[d],r[u]),d++,u++;else if(a[f]===l[b])c[b]=Nt(n[f],r[b]),f--,b--;else if(a[d]===l[b])c[b]=Nt(n[d],r[b]),Bt(t,c[b+1],n[d]),d++,b--;else if(a[f]===l[u])c[u]=Nt(n[f],r[u]),Bt(t,n[d],n[f]),f--,u++;else if(void 0===h&&(h=Mt(l,u,b),p=Mt(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=Bt(t,n[d]);Nt(e,r[u]),c[u]=e}else c[u]=Nt(i,r[u]),Bt(t,n[d],i),n[e]=null;u++}else Rt(n[f]),f--;else Rt(n[d]),d++;for(;u<=b;){const e=Bt(t,c[b+1]);Nt(e,r[u]),c[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Rt(t)}return this.at=l,((t,e=Ft)=>{t._$AH=e})(t,c),W}}),Dt=Ot(class extends Ct{constructor(t){var e;if(super(t),t.type!==kt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const s=t.element.classList;this.st.forEach((t=>{t in e||(s.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(o=this.et)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return W}});
|
|
105
|
+
/**
|
|
106
|
+
* @license
|
|
107
|
+
* Copyright 2017 Google LLC
|
|
108
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
109
|
+
*/var jt,It=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(jt||(jt={}));class Ut extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class Tt extends vt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=jt.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new t}render(){return K`
|
|
110
|
+
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
111
|
+
<div class="ft-size-watcher--watcher"></div>
|
|
112
|
+
</div>
|
|
113
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=jt.S:this.size<976?this.category=jt.M:this.size<1024?this.category=jt.L:this.size<1440?this.category=jt.XL:this.category=jt.XXL,this.dispatchEvent(new Ut(this.size,this.category)))}),this.debounceTimeout)}}Tt.elementDefinitions={},Tt.styles=v`
|
|
114
|
+
.ft-size-watcher--pixel {
|
|
115
|
+
width: 0;
|
|
116
|
+
height: 0;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.ft-size-watcher--watcher {
|
|
125
|
+
height: 1px;
|
|
126
|
+
width: 100vw;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
130
|
+
width: 100%;
|
|
131
|
+
}
|
|
132
|
+
`,It([i({type:Number})],Tt.prototype,"debounceTimeout",void 0),It([i({type:Boolean})],Tt.prototype,"local",void 0),It([i({type:Number,reflect:!0})],Tt.prototype,"size",void 0),It([i({type:String,reflect:!0})],Tt.prototype,"category",void 0),It([n(".ft-size-watcher--watcher")],Tt.prototype,"watcher",void 0),c("ft-size-watcher")(Tt);
|
|
133
|
+
/**
|
|
134
|
+
* @license
|
|
135
|
+
* Copyright 2020 Google LLC
|
|
136
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
|
+
*/
|
|
138
|
+
const At=t=>({_$litStatic$:t}),Pt=new Map,_t=(t=>(e,...i)=>{var o;const s=i.length;let n,r;const l=[],a=[];let c,h=0,p=!1;for(;h<s;){for(c=e[h];h<s&&void 0!==(r=i[h],n=null===(o=r)||void 0===o?void 0:o._$litStatic$);)c+=n+e[++h],p=!0;a.push(r),l.push(c),h++}if(h===s&&l.push(e[s]),p){const t=l.join("$$lit$$");void 0===(e=Pt.get(t))&&(l.raw=l,Pt.set(t,e=l)),i=a}return t(e,...i)})(K);var Ht,Zt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Ht||(Ht={}));const Kt=ft.extend("--ft-typography-font-family",bt.titleFont),Wt=ft.extend("--ft-typography-font-family",bt.contentFont),Vt={fontFamily:Wt,fontSize:ft.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ft.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ft.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ft.create("--ft-typography-line-height","SIZE","24px"),textTransform:ft.create("--ft-typography-text-transform","UNKNOWN","inherit")},qt=ft.extend("--ft-typography-title-font-family",Kt),Jt=ft.extend("--ft-typography-title-font-size",Vt.fontSize,"20px"),Xt=ft.extend("--ft-typography-title-font-weight",Vt.fontWeight,"normal"),Yt=ft.extend("--ft-typography-title-letter-spacing",Vt.letterSpacing,"0.15px"),Qt=ft.extend("--ft-typography-title-line-height",Vt.lineHeight,"24px"),Gt=ft.extend("--ft-typography-title-text-transform",Vt.textTransform,"inherit"),te=ft.extend("--ft-typography-title-dense-font-family",Kt),ee=ft.extend("--ft-typography-title-dense-font-size",Vt.fontSize,"14px"),ie=ft.extend("--ft-typography-title-dense-font-weight",Vt.fontWeight,"normal"),oe=ft.extend("--ft-typography-title-dense-letter-spacing",Vt.letterSpacing,"0.105px"),se=ft.extend("--ft-typography-title-dense-line-height",Vt.lineHeight,"24px"),ne=ft.extend("--ft-typography-title-dense-text-transform",Vt.textTransform,"inherit"),re=ft.extend("--ft-typography-subtitle1-font-family",Wt),le=ft.extend("--ft-typography-subtitle1-font-size",Vt.fontSize,"16px"),ae=ft.extend("--ft-typography-subtitle1-font-weight",Vt.fontWeight,"600"),ce=ft.extend("--ft-typography-subtitle1-letter-spacing",Vt.letterSpacing,"0.144px"),he=ft.extend("--ft-typography-subtitle1-line-height",Vt.lineHeight,"24px"),pe=ft.extend("--ft-typography-subtitle1-text-transform",Vt.textTransform,"inherit"),de=ft.extend("--ft-typography-subtitle2-font-family",Wt),fe=ft.extend("--ft-typography-subtitle2-font-size",Vt.fontSize,"14px"),ue=ft.extend("--ft-typography-subtitle2-font-weight",Vt.fontWeight,"normal"),be=ft.extend("--ft-typography-subtitle2-letter-spacing",Vt.letterSpacing,"0.098px"),ve=ft.extend("--ft-typography-subtitle2-line-height",Vt.lineHeight,"24px"),ge=ft.extend("--ft-typography-subtitle2-text-transform",Vt.textTransform,"inherit"),xe={fontFamily:ft.extend("--ft-typography-body1-font-family",Wt),fontSize:ft.extend("--ft-typography-body1-font-size",Vt.fontSize,"16px"),fontWeight:ft.extend("--ft-typography-body1-font-weight",Vt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body1-letter-spacing",Vt.letterSpacing,"0.496px"),lineHeight:ft.extend("--ft-typography-body1-line-height",Vt.lineHeight,"24px"),textTransform:ft.extend("--ft-typography-body1-text-transform",Vt.textTransform,"inherit")},ye={fontFamily:ft.extend("--ft-typography-body2-font-family",Wt),fontSize:ft.extend("--ft-typography-body2-font-size",Vt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-body2-font-weight",Vt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body2-letter-spacing",Vt.letterSpacing,"0.252px"),lineHeight:ft.extend("--ft-typography-body2-line-height",Vt.lineHeight,"20px"),textTransform:ft.extend("--ft-typography-body2-text-transform",Vt.textTransform,"inherit")},me={fontFamily:ft.extend("--ft-typography-caption-font-family",Wt),fontSize:ft.extend("--ft-typography-caption-font-size",Vt.fontSize,"12px"),fontWeight:ft.extend("--ft-typography-caption-font-weight",Vt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-caption-letter-spacing",Vt.letterSpacing,"0.396px"),lineHeight:ft.extend("--ft-typography-caption-line-height",Vt.lineHeight,"16px"),textTransform:ft.extend("--ft-typography-caption-text-transform",Vt.textTransform,"inherit")},$e=ft.extend("--ft-typography-breadcrumb-font-family",Wt),we=ft.extend("--ft-typography-breadcrumb-font-size",Vt.fontSize,"10px"),ke=ft.extend("--ft-typography-breadcrumb-font-weight",Vt.fontWeight,"normal"),Se=ft.extend("--ft-typography-breadcrumb-letter-spacing",Vt.letterSpacing,"0.33px"),Oe=ft.extend("--ft-typography-breadcrumb-line-height",Vt.lineHeight,"16px"),Ce=ft.extend("--ft-typography-breadcrumb-text-transform",Vt.textTransform,"inherit"),ze=ft.extend("--ft-typography-overline-font-family",Wt),Ee=ft.extend("--ft-typography-overline-font-size",Vt.fontSize,"10px"),Be=ft.extend("--ft-typography-overline-font-weight",Vt.fontWeight,"normal"),Ne=ft.extend("--ft-typography-overline-letter-spacing",Vt.letterSpacing,"1.5px"),Fe=ft.extend("--ft-typography-overline-line-height",Vt.lineHeight,"16px"),Re=ft.extend("--ft-typography-overline-text-transform",Vt.textTransform,"uppercase"),Me={fontFamily:ft.extend("--ft-typography-button-font-family",Wt),fontSize:ft.extend("--ft-typography-button-font-size",Vt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-button-font-weight",Vt.fontWeight,"600"),letterSpacing:ft.extend("--ft-typography-button-letter-spacing",Vt.letterSpacing,"1.246px"),lineHeight:ft.extend("--ft-typography-button-line-height",Vt.lineHeight,"16px"),textTransform:ft.extend("--ft-typography-button-text-transform",Vt.textTransform,"uppercase")},Le=v`
|
|
139
|
+
.ft-typography--title {
|
|
140
|
+
font-family: ${qt};
|
|
141
|
+
font-size: ${Jt};
|
|
142
|
+
font-weight: ${Xt};
|
|
143
|
+
letter-spacing: ${Yt};
|
|
144
|
+
line-height: ${Qt};
|
|
145
|
+
text-transform: ${Gt};
|
|
146
|
+
}
|
|
147
|
+
`,De=v`
|
|
148
|
+
.ft-typography--title-dense {
|
|
149
|
+
font-family: ${te};
|
|
150
|
+
font-size: ${ee};
|
|
151
|
+
font-weight: ${ie};
|
|
152
|
+
letter-spacing: ${oe};
|
|
153
|
+
line-height: ${se};
|
|
154
|
+
text-transform: ${ne};
|
|
155
|
+
}
|
|
156
|
+
`,je=v`
|
|
157
|
+
.ft-typography--subtitle1 {
|
|
158
|
+
font-family: ${re};
|
|
159
|
+
font-size: ${le};
|
|
160
|
+
font-weight: ${ae};
|
|
161
|
+
letter-spacing: ${ce};
|
|
162
|
+
line-height: ${he};
|
|
163
|
+
text-transform: ${pe};
|
|
164
|
+
}
|
|
165
|
+
`,Ie=v`
|
|
166
|
+
.ft-typography--subtitle2 {
|
|
167
|
+
font-family: ${de};
|
|
168
|
+
font-size: ${fe};
|
|
169
|
+
font-weight: ${ue};
|
|
170
|
+
letter-spacing: ${be};
|
|
171
|
+
line-height: ${ve};
|
|
172
|
+
text-transform: ${ge};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
`,Ue=v`
|
|
176
|
+
.ft-typography--body1 {
|
|
177
|
+
font-family: ${xe.fontFamily};
|
|
178
|
+
font-size: ${xe.fontSize};
|
|
179
|
+
font-weight: ${xe.fontWeight};
|
|
180
|
+
letter-spacing: ${xe.letterSpacing};
|
|
181
|
+
line-height: ${xe.lineHeight};
|
|
182
|
+
text-transform: ${xe.textTransform};
|
|
183
|
+
}
|
|
184
|
+
`,Te=v`
|
|
185
|
+
.ft-typography--body2 {
|
|
186
|
+
font-family: ${ye.fontFamily};
|
|
187
|
+
font-size: ${ye.fontSize};
|
|
188
|
+
font-weight: ${ye.fontWeight};
|
|
189
|
+
letter-spacing: ${ye.letterSpacing};
|
|
190
|
+
line-height: ${ye.lineHeight};
|
|
191
|
+
text-transform: ${ye.textTransform};
|
|
192
|
+
}
|
|
193
|
+
`,Ae=v`
|
|
194
|
+
.ft-typography--caption {
|
|
195
|
+
font-family: ${me.fontFamily};
|
|
196
|
+
font-size: ${me.fontSize};
|
|
197
|
+
font-weight: ${me.fontWeight};
|
|
198
|
+
letter-spacing: ${me.letterSpacing};
|
|
199
|
+
line-height: ${me.lineHeight};
|
|
200
|
+
text-transform: ${me.textTransform};
|
|
201
|
+
}
|
|
202
|
+
`,Pe=v`
|
|
203
|
+
.ft-typography--breadcrumb {
|
|
204
|
+
font-family: ${$e};
|
|
205
|
+
font-size: ${we};
|
|
206
|
+
font-weight: ${ke};
|
|
207
|
+
letter-spacing: ${Se};
|
|
208
|
+
line-height: ${Oe};
|
|
209
|
+
text-transform: ${Ce};
|
|
210
|
+
}
|
|
211
|
+
`,_e=v`
|
|
212
|
+
.ft-typography--overline {
|
|
213
|
+
font-family: ${ze};
|
|
214
|
+
font-size: ${Ee};
|
|
215
|
+
font-weight: ${Be};
|
|
216
|
+
letter-spacing: ${Ne};
|
|
217
|
+
line-height: ${Fe};
|
|
218
|
+
text-transform: ${Re};
|
|
219
|
+
}
|
|
220
|
+
`,He=v`
|
|
221
|
+
.ft-typography--button {
|
|
222
|
+
font-family: ${Me.fontFamily};
|
|
223
|
+
font-size: ${Me.fontSize};
|
|
224
|
+
font-weight: ${Me.fontWeight};
|
|
225
|
+
letter-spacing: ${Me.letterSpacing};
|
|
226
|
+
line-height: ${Me.lineHeight};
|
|
227
|
+
text-transform: ${Me.textTransform};
|
|
228
|
+
}
|
|
229
|
+
`;class Ze extends vt{constructor(){super(...arguments),this.variant=Ht.body1}render(){return this.element?_t`
|
|
230
|
+
<${At(this.element)}
|
|
231
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
232
|
+
<slot></slot>
|
|
233
|
+
</${At(this.element)}>
|
|
234
|
+
`:_t`
|
|
235
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
236
|
+
`}}function Ke(t,e){return t.flatMap((t=>[t,...Ke(e(t),e)]))}function We(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Ve(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>Ve(e,t.selected))),value:t.value}}function qe(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>Ve(t,!1)))}}Ze.styles=[Le,De,je,Ie,Ue,Te,Ae,Pe,_e,He,v`
|
|
237
|
+
.ft-typography {
|
|
238
|
+
vertical-align: inherit;
|
|
239
|
+
}
|
|
240
|
+
`],Zt([i()],Ze.prototype,"element",void 0),Zt([i()],Ze.prototype,"variant",void 0),c("ft-typography")(Ze);var Je=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Xe={color:ft.extend("--ft-ripple-color",bt.colorContent),primaryColor:ft.extend("--ft-ripple-primary-color",ft.extend("--ft-ripple-color",bt.colorPrimary)),secondaryColor:ft.extend("--ft-ripple-secondary-color",ft.extend("--ft-ripple-color",bt.colorSecondary)),opacityContentOnSurfacePressed:ft.external(bt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ft.external(bt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ft.external(bt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ft.external(bt.opacityContentOnSurfaceSelected,"Design system")};class Ye extends vt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return K`
|
|
241
|
+
<style>
|
|
242
|
+
.ft-ripple .ft-ripple--effect,
|
|
243
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
244
|
+
width: ${this.rippleSize}px;
|
|
245
|
+
height: ${this.rippleSize}px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.ft-ripple .ft-ripple--effect {
|
|
249
|
+
left: ${this.originX}px;
|
|
250
|
+
top: ${this.originY}px;
|
|
251
|
+
}
|
|
252
|
+
</style>
|
|
253
|
+
<div class="${Dt(t)}">
|
|
254
|
+
<div class="ft-ripple--background"></div>
|
|
255
|
+
<div class="ft-ripple--effect"></div>
|
|
256
|
+
</div>
|
|
257
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),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()}}Ye.elementDefinitions={},Ye.styles=v`
|
|
258
|
+
:host {
|
|
259
|
+
display: contents;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.ft-ripple {
|
|
263
|
+
position: absolute;
|
|
264
|
+
inset: 0;
|
|
265
|
+
pointer-events: none;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
269
|
+
overflow: hidden;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ft-ripple .ft-ripple--background,
|
|
273
|
+
.ft-ripple .ft-ripple--effect {
|
|
274
|
+
position: absolute;
|
|
275
|
+
opacity: 0;
|
|
276
|
+
background-color: ${Xe.color};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
280
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
281
|
+
background-color: ${Xe.secondaryColor};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
285
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
286
|
+
background-color: ${Xe.primaryColor};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.ft-ripple .ft-ripple--background {
|
|
290
|
+
top: 0;
|
|
291
|
+
left: 0;
|
|
292
|
+
height: 100%;
|
|
293
|
+
width: 100%;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.ft-ripple .ft-ripple--effect,
|
|
297
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
298
|
+
border-radius: 50%;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.ft-ripple .ft-ripple--effect {
|
|
302
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
303
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
307
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
308
|
+
left: 50%;
|
|
309
|
+
top: 50%;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
313
|
+
transform: translate(-50%, -50%);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
317
|
+
opacity: ${Xe.opacityContentOnSurfaceHover};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
321
|
+
opacity: ${Xe.opacityContentOnSurfaceSelected};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
325
|
+
opacity: ${Xe.opacityContentOnSurfaceFocused};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
329
|
+
opacity: ${Xe.opacityContentOnSurfacePressed};
|
|
330
|
+
transform: translate(-50%, -50%) scale(1);
|
|
331
|
+
}
|
|
332
|
+
`,Je([i({type:Boolean})],Ye.prototype,"primary",void 0),Je([i({type:Boolean})],Ye.prototype,"secondary",void 0),Je([i({type:Boolean})],Ye.prototype,"unbounded",void 0),Je([i({type:Boolean})],Ye.prototype,"activated",void 0),Je([i({type:Boolean})],Ye.prototype,"selected",void 0),Je([i({type:Boolean})],Ye.prototype,"disabled",void 0),Je([o()],Ye.prototype,"hovered",void 0),Je([o()],Ye.prototype,"focused",void 0),Je([o()],Ye.prototype,"pressed",void 0),Je([o()],Ye.prototype,"rippling",void 0),Je([o()],Ye.prototype,"rippleSize",void 0),Je([o()],Ye.prototype,"originX",void 0),Je([o()],Ye.prototype,"originY",void 0),Je([n(".ft-ripple")],Ye.prototype,"ripple",void 0),Je([n(".ft-ripple--effect")],Ye.prototype,"rippleEffect",void 0),c("ft-ripple")(Ye);var Qe=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ge=ft.create("--ft-tooltip-distance","SIZE","4px"),ti=ft.create("--ft-tooltip-color","COLOR","#FFFFFF"),ei=ft.create("--ft-tooltip-background-color","COLOR","#666666"),ii=ft.create("--ft-tooltip-z-index","NUMBER","1"),oi=ft.external(bt.borderRadiusS,"Design system");class si extends vt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new t,this.revealDebouncer=new t}render(){return K`
|
|
333
|
+
<div part="container"
|
|
334
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
335
|
+
@mouseenter=${this.onHover}
|
|
336
|
+
@mouseleave=${this.onOut}
|
|
337
|
+
@focusin=${this.onHover}
|
|
338
|
+
@focusout=${this.onOut}
|
|
339
|
+
@touchstart=${this.onTouch}>
|
|
340
|
+
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
341
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
342
|
+
<ft-typography variant="caption">${this.text}</ft-typography>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
<slot></slot>
|
|
346
|
+
</div>
|
|
347
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}si.elementDefinitions={"ft-typography":Ze},si.styles=v`
|
|
348
|
+
.ft-tooltip--container {
|
|
349
|
+
display: block;
|
|
350
|
+
position: relative;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.ft-tooltip--inline {
|
|
354
|
+
display: inline-block;
|
|
355
|
+
max-width: 100%;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.ft-tooltip {
|
|
359
|
+
position: absolute;
|
|
360
|
+
box-sizing: border-box;
|
|
361
|
+
overflow: hidden;
|
|
362
|
+
width: max-content;
|
|
363
|
+
max-width: 150px;
|
|
364
|
+
text-align: center;
|
|
365
|
+
padding: ${Ge};
|
|
366
|
+
z-index: ${ii};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.ft-tooltip--content {
|
|
370
|
+
padding: 4px 8px;
|
|
371
|
+
border-radius: ${oi};
|
|
372
|
+
background-color: ${ei};
|
|
373
|
+
color: ${ti};
|
|
374
|
+
top: -500px;
|
|
375
|
+
left: -500px;
|
|
376
|
+
position: relative;
|
|
377
|
+
word-break: break-word;
|
|
378
|
+
}
|
|
379
|
+
`,Qe([i()],si.prototype,"text",void 0),Qe([i({type:Boolean})],si.prototype,"manual",void 0),Qe([i({type:Boolean})],si.prototype,"inline",void 0),Qe([i({type:Number})],si.prototype,"delay",void 0),Qe([i()],si.prototype,"position",void 0),Qe([function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?a({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],si.prototype,"slotNodes",void 0),Qe([n(".ft-tooltip--container")],si.prototype,"container",void 0),Qe([n("slot")],si.prototype,"target",void 0),Qe([n(".ft-tooltip")],si.prototype,"tooltip",void 0),Qe([n(".ft-tooltip--content")],si.prototype,"tooltipContent",void 0),Qe([o()],si.prototype,"visible",void 0),c("ft-tooltip")(si);const ni={color:ft.extend("--ft-loader-color",bt.colorPrimary),size:ft.create("--ft-loader-size","SIZE","80px")};class ri extends vt{static get styles(){return v`
|
|
380
|
+
:host {
|
|
381
|
+
line-height: 0;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.ft-loader {
|
|
385
|
+
display: inline-block;
|
|
386
|
+
position: relative;
|
|
387
|
+
|
|
388
|
+
width: ${ni.size};
|
|
389
|
+
height: ${ni.size};
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.ft-loader div {
|
|
393
|
+
position: absolute;
|
|
394
|
+
top: 37.5%;
|
|
395
|
+
width: 25%;
|
|
396
|
+
height: 25%;
|
|
397
|
+
border-radius: 50%;
|
|
398
|
+
background: ${ni.color};
|
|
399
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.ft-loader div:nth-child(1) {
|
|
403
|
+
left: 2.5%;
|
|
404
|
+
animation: appear 0.6s infinite;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.ft-loader div:nth-child(2) {
|
|
408
|
+
left: 2.5%;
|
|
409
|
+
animation: move 0.6s infinite;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.ft-loader div:nth-child(3) {
|
|
413
|
+
left: 37.5%;
|
|
414
|
+
animation: move 0.6s infinite;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.ft-loader div:nth-child(4) {
|
|
418
|
+
left: 72.5%;
|
|
419
|
+
animation: disappear 0.6s infinite;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
@keyframes appear {
|
|
423
|
+
0% {
|
|
424
|
+
transform: scale(0);
|
|
425
|
+
}
|
|
426
|
+
100% {
|
|
427
|
+
transform: scale(1);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
@keyframes disappear {
|
|
432
|
+
0% {
|
|
433
|
+
transform: scale(1);
|
|
434
|
+
}
|
|
435
|
+
100% {
|
|
436
|
+
transform: scale(0);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
@keyframes move {
|
|
441
|
+
0% {
|
|
442
|
+
transform: translate(0, 0);
|
|
443
|
+
}
|
|
444
|
+
100% {
|
|
445
|
+
transform: translate(calc(0.35 * ${ni.size}), 0);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
`}render(){return K`
|
|
449
|
+
<div class="ft-loader">
|
|
450
|
+
<div></div>
|
|
451
|
+
<div></div>
|
|
452
|
+
<div></div>
|
|
453
|
+
<div></div>
|
|
454
|
+
</div>
|
|
455
|
+
`}}c("ft-loader")(ri);
|
|
456
|
+
/**
|
|
457
|
+
* @license
|
|
458
|
+
* Copyright 2017 Google LLC
|
|
459
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
460
|
+
*/
|
|
461
|
+
class li extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===V||null==t)return this.vt=void 0,this.it=t;if(t===W)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}li.directiveName="unsafeHTML",li.resultType=1;const ai=Ot(li);var ci,hi;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ci||(ci={})),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=""}(hi||(hi={}));const pi=new Map([...["abw"].map((t=>[t,hi.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,hi.AUDIO])),...["avi"].map((t=>[t,hi.AVI])),...["chm","xhs"].map((t=>[t,hi.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,hi.CODE])),...["csv"].map((t=>[t,hi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,hi.DITA])),...["epub"].map((t=>[t,hi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,hi.EXCEL])),...["flac"].map((t=>[t,hi.FLAC])),...["gif"].map((t=>[t,hi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,hi.GZIP])),...["html","htm","xhtml"].map((t=>[t,hi.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,hi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,hi.JPEG])),...["json"].map((t=>[t,hi.JSON])),...["m4a","m4p"].map((t=>[t,hi.M4A])),...["mov","qt"].map((t=>[t,hi.MOV])),...["mp3"].map((t=>[t,hi.MP3])),...["mp4","m4v"].map((t=>[t,hi.MP4])),...["ogg","oga"].map((t=>[t,hi.OGG])),...["pdf","ps"].map((t=>[t,hi.PDF])),...["png"].map((t=>[t,hi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,hi.POWERPOINT])),...["rar"].map((t=>[t,hi.RAR])),...["stp"].map((t=>[t,hi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,hi.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,hi.VIDEO])),...["wav"].map((t=>[t,hi.WAV])),...["wma"].map((t=>[t,hi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,hi.WORD])),...["xml","xsl","rdf"].map((t=>[t,hi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,hi.YAML])),...["zip"].map((t=>[t,hi.ZIP]))]),di=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var fi,ui=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(fi||(fi={}));const bi={size:ft.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ft.extend("--ft-icon-fluid-topics-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ft.extend("--ft-icon-file-format-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ft.extend("--ft-icon-material-font-family",ft.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class vi extends vt{constructor(){super(...arguments),this.variant=fi.fluid_topics}render(){return K`
|
|
462
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
463
|
+
${ai(this.getIcon())}
|
|
464
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
465
|
+
</i>
|
|
466
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===fi.file_format?null!==(t=hi[i.toUpperCase()])&&void 0!==t?t:i:this.variant===fi.fluid_topics?null!==(e=ci[i.toUpperCase()])&&void 0!==e?e:i:V}}vi.elementDefinitions={},vi.styles=v`
|
|
467
|
+
:host, i.ft-icon {
|
|
468
|
+
display: inline-block;
|
|
469
|
+
width: ${bi.size};
|
|
470
|
+
height: ${bi.size};
|
|
471
|
+
text-align: center;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
i.ft-icon {
|
|
475
|
+
font-size: ${bi.size};
|
|
476
|
+
line-height: 1;
|
|
477
|
+
font-weight: normal;
|
|
478
|
+
text-transform: none;
|
|
479
|
+
font-style: normal;
|
|
480
|
+
font-variant: normal;
|
|
481
|
+
speak: none;
|
|
482
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
483
|
+
text-rendering: auto;
|
|
484
|
+
-webkit-font-smoothing: antialiased;
|
|
485
|
+
-moz-osx-font-smoothing: grayscale;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.ft-icon--fluid-topics {
|
|
489
|
+
font-family: ${bi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.ft-icon--file-format {
|
|
493
|
+
font-family: ${bi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.ft-icon--material {
|
|
497
|
+
font-family: ${bi.materialFontFamily}, "Material Icons", sans-serif;
|
|
498
|
+
}
|
|
499
|
+
`,ui([i()],vi.prototype,"variant",void 0),ui([n("slot")],vi.prototype,"slottedContent",void 0),c("ft-icon")(vi);var gi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const xi=ft.extend("--ft-button-color",bt.colorPrimary),yi={backgroundColor:ft.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ft.extend("--ft-button-border-radius",bt.borderRadiusL),color:xi,fontSize:ft.extend("--ft-button-font-size",Me.fontSize),iconSize:ft.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ft.extend("--ft-button-ripple-color",xi),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},mi=ft.extend("--ft-button-primary-color",ft.extend("--ft-button-color",bt.colorOnPrimary)),$i={backgroundColor:ft.extend("--ft-button-primary-background-color",ft.extend("--ft-button-background-color",bt.colorPrimary)),color:mi,rippleColor:ft.extend("--ft-button-primary-ripple-color",mi)},wi=ft.extend("--ft-button-dense-border-radius",ft.extend("--ft-button-border-radius",bt.borderRadiusM));class ki extends vt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[gt,v`
|
|
500
|
+
:host {
|
|
501
|
+
display: inline-block;
|
|
502
|
+
max-width: 100%;
|
|
503
|
+
pointer-events: none;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
button {
|
|
507
|
+
box-shadow: 0px 0px 0px transparent;
|
|
508
|
+
border: 0px solid transparent;
|
|
509
|
+
text-shadow: 0px 0px 0px transparent;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
button:hover {
|
|
513
|
+
box-shadow: 0px 0px 0px transparent;
|
|
514
|
+
border: 0px solid transparent;
|
|
515
|
+
text-shadow: 0px 0px 0px transparent;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
button:active {
|
|
519
|
+
outline: none;
|
|
520
|
+
border: none;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
button:focus {
|
|
524
|
+
outline: 0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.ft-button {
|
|
528
|
+
position: relative;
|
|
529
|
+
display: flex;
|
|
530
|
+
justify-content: center;
|
|
531
|
+
align-items: center;
|
|
532
|
+
width: 100%;
|
|
533
|
+
overflow: hidden;
|
|
534
|
+
box-sizing: border-box;
|
|
535
|
+
border: none;
|
|
536
|
+
pointer-events: auto;
|
|
537
|
+
|
|
538
|
+
--ft-button-internal-font-size: ${yi.fontSize};
|
|
539
|
+
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
540
|
+
--ft-button-internal-color: ${yi.color};
|
|
541
|
+
${ut(bi.size,yi.iconSize)};
|
|
542
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
543
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
544
|
+
${ut(Xe.color,yi.rippleColor)};
|
|
545
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${yi.iconSize});
|
|
546
|
+
|
|
547
|
+
border-radius: ${yi.borderRadius};
|
|
548
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
549
|
+
background-color: ${yi.backgroundColor};
|
|
550
|
+
color: var(--ft-button-internal-color);
|
|
551
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.ft-button:not([disabled]):hover {
|
|
555
|
+
cursor: pointer;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.ft-button--dense {
|
|
559
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
560
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
561
|
+
border-radius: ${wi};
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.ft-button--round {
|
|
565
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.ft-button[disabled] {
|
|
569
|
+
filter: grayscale(1);
|
|
570
|
+
opacity: ${yi.opacityDisabled};
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.ft-button.ft-button--primary {
|
|
574
|
+
background-color: ${$i.backgroundColor};
|
|
575
|
+
--ft-button-internal-color: ${$i.color};
|
|
576
|
+
${ut(Xe.color,$i.rippleColor)};
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.ft-button.ft-button--outlined {
|
|
580
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
581
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.ft-button:focus {
|
|
585
|
+
outline: none;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.ft-button--label {
|
|
589
|
+
overflow: hidden;
|
|
590
|
+
white-space: nowrap;
|
|
591
|
+
text-overflow: ellipsis;
|
|
592
|
+
display: block;
|
|
593
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
594
|
+
${ut(Me.fontSize,"var(--ft-button-internal-font-size)")};
|
|
595
|
+
${ut(Me.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.ft-button--safari-fix .ft-button--label {
|
|
599
|
+
margin-right: 0;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
603
|
+
content: "\\0000a0";
|
|
604
|
+
display: inline-block;
|
|
605
|
+
width: 0;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.ft-button--label[hidden] {
|
|
609
|
+
display: none;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
ft-icon {
|
|
613
|
+
flex-shrink: 0;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.ft-button--label[hidden] + ft-icon {
|
|
617
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
618
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
622
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
623
|
+
order: -1;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
ft-loader {
|
|
627
|
+
${ut(ni.size,yi.iconSize)};
|
|
628
|
+
${ut(ni.color,"var(--ft-button-internal-color)")};
|
|
629
|
+
}
|
|
630
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":wt,"ft-no-text-select":!0};return this.addTooltip(K`
|
|
631
|
+
<button part="button"
|
|
632
|
+
class="${Dt(t)}"
|
|
633
|
+
aria-label="${this.getLabel()}"
|
|
634
|
+
?disabled=${this.isDisabled()}>
|
|
635
|
+
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
636
|
+
<ft-typography part="label"
|
|
637
|
+
variant="button"
|
|
638
|
+
class="ft-button--label"
|
|
639
|
+
?hidden=${!this.hasTextContent()}>
|
|
640
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
641
|
+
</ft-typography>
|
|
642
|
+
${this.resolveIcon()}
|
|
643
|
+
</button>
|
|
644
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:K`
|
|
645
|
+
<ft-tooltip part="tooltip"
|
|
646
|
+
text="${this.getLabel()}"
|
|
647
|
+
position="${this.tooltipPosition}">
|
|
648
|
+
${t}
|
|
649
|
+
</ft-tooltip>
|
|
650
|
+
`}resolveIcon(){return this.loading?K`
|
|
651
|
+
<ft-loader></ft-loader> `:this.icon?K`
|
|
652
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:V}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ki.elementDefinitions={"ft-ripple":Ye,"ft-tooltip":si,"ft-typography":Ze,"ft-icon":vi,"ft-loader":ri},gi([i({type:Boolean})],ki.prototype,"primary",void 0),gi([i({type:Boolean})],ki.prototype,"outlined",void 0),gi([i({type:Boolean})],ki.prototype,"disabled",void 0),gi([i({type:Boolean})],ki.prototype,"dense",void 0),gi([i({type:Boolean})],ki.prototype,"round",void 0),gi([i({type:String})],ki.prototype,"label",void 0),gi([i({type:String})],ki.prototype,"icon",void 0),gi([i({type:Boolean})],ki.prototype,"trailingIcon",void 0),gi([i({type:Boolean})],ki.prototype,"loading",void 0),gi([i({type:String})],ki.prototype,"tooltipPosition",void 0),gi([n(".ft-button")],ki.prototype,"button",void 0),gi([n(".ft-button--label slot")],ki.prototype,"slottedContent",void 0),c("ft-button")(ki);var Si=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Oi=ft.extend("--ft-checkbox-text-color",bt.colorOnSurfaceHigh),Ci=ft.external(bt.colorPrimary,"Design system"),zi=ft.external(bt.colorOnPrimary,"Design system"),Ei=ft.extend("--ft-checkbox-border-color",bt.colorOnSurfaceMedium),Bi=ft.external(bt.colorOnSurfaceDisabled,"Design system");class Ni extends vt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return K`
|
|
653
|
+
<label class="${Dt(t)}">
|
|
654
|
+
<div class="ft-checkbox--box-container">
|
|
655
|
+
<input type="checkbox"
|
|
656
|
+
name=${this.name}
|
|
657
|
+
.checked=${this.checked}
|
|
658
|
+
.disabled=${this.disabled}
|
|
659
|
+
@change=${this.onChange}
|
|
660
|
+
>
|
|
661
|
+
<ft-ripple
|
|
662
|
+
?disabled=${this.disabled}
|
|
663
|
+
?primary=${this.checked||this.indeterminate}
|
|
664
|
+
unbounded>
|
|
665
|
+
</ft-ripple>
|
|
666
|
+
<div class="ft-checkbox--box">
|
|
667
|
+
<svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
|
|
668
|
+
<path class="ft-checkbox--checkmark-path" fill="none"
|
|
669
|
+
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
670
|
+
</svg>
|
|
671
|
+
</div>
|
|
672
|
+
</div>
|
|
673
|
+
<ft-typography variant="body2">
|
|
674
|
+
<slot></slot>
|
|
675
|
+
</ft-typography>
|
|
676
|
+
</label>
|
|
677
|
+
`}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)}}Ni.elementDefinitions={"ft-ripple":Ye,"ft-typography":Ze},Ni.styles=v`
|
|
678
|
+
* {
|
|
679
|
+
box-sizing: border-box;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.ft-checkbox {
|
|
683
|
+
box-sizing: border-box;
|
|
684
|
+
color: ${Oi};
|
|
685
|
+
|
|
686
|
+
display: inline-flex;
|
|
687
|
+
align-items: center;
|
|
688
|
+
gap: 4px;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.ft-checkbox--disabled {
|
|
692
|
+
color: ${Bi};
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
input {
|
|
696
|
+
opacity: 0;
|
|
697
|
+
position: absolute;
|
|
698
|
+
width: 40px;
|
|
699
|
+
height: 40px;
|
|
700
|
+
margin: 0;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.ft-checkbox--box-container {
|
|
704
|
+
position: relative;
|
|
705
|
+
width: 40px;
|
|
706
|
+
height: 40px;
|
|
707
|
+
|
|
708
|
+
display: flex;
|
|
709
|
+
justify-content: center;
|
|
710
|
+
align-items: center;
|
|
711
|
+
flex-shrink: 0;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.ft-checkbox--box {
|
|
715
|
+
border: 2px solid ${Ei};
|
|
716
|
+
border-radius: 2px;
|
|
717
|
+
|
|
718
|
+
width: 18px;
|
|
719
|
+
height: 18px;
|
|
720
|
+
|
|
721
|
+
color: ${zi};
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
726
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
727
|
+
border-color: ${Ci};
|
|
728
|
+
background-color: ${Ci};
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
732
|
+
border-color: ${Bi};
|
|
733
|
+
background-color: transparent;
|
|
734
|
+
color: ${Bi};
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.ft-checkbox--checkmark {
|
|
738
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
739
|
+
opacity: 0;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.ft-checkbox--checkmark-path {
|
|
743
|
+
stroke-dashoffset: 0;
|
|
744
|
+
stroke: currentcolor;
|
|
745
|
+
stroke-width: 3px;
|
|
746
|
+
stroke-dasharray: 30;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
750
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
751
|
+
opacity: 1;
|
|
752
|
+
}
|
|
753
|
+
`,Si([i()],Ni.prototype,"name",void 0),Si([i({type:Boolean})],Ni.prototype,"checked",void 0),Si([i({type:Boolean})],Ni.prototype,"indeterminate",void 0),Si([i({type:Boolean})],Ni.prototype,"disabled",void 0),Si([n(".ft-checkbox")],Ni.prototype,"container",void 0),Si([n("ft-ripple")],Ni.prototype,"ripple",void 0),c("ft-checkbox")(Ni);var Fi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ri=ft.extend("--ft-radio-text-color",bt.colorOnSurfaceHigh),Mi=ft.external(bt.colorPrimary,"Design system"),Li=(ft.external(bt.colorOnPrimary,"Design system"),ft.extend("--ft-radio-border-color",bt.colorOnSurfaceMedium)),Di=ft.external(bt.colorOnSurfaceDisabled,"Design system");class ji extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Ii extends vt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return K`
|
|
754
|
+
<div class="${Dt(t)}">
|
|
755
|
+
<div class="ft-radio--box-container">
|
|
756
|
+
<input id="radio-button"
|
|
757
|
+
type="radio"
|
|
758
|
+
name="${this.name}"
|
|
759
|
+
value="${this.value}"
|
|
760
|
+
.checked=${this.checked}
|
|
761
|
+
.disabled=${this.disabled}
|
|
762
|
+
@change=${this.onChange}
|
|
763
|
+
>
|
|
764
|
+
<ft-ripple
|
|
765
|
+
?disabled=${this.disabled}
|
|
766
|
+
?primary=${this.checked}
|
|
767
|
+
unbounded>
|
|
768
|
+
</ft-ripple>
|
|
769
|
+
<div class="ft-radio--box">
|
|
770
|
+
</div>
|
|
771
|
+
</div>
|
|
772
|
+
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
773
|
+
<ft-typography variant="body2">
|
|
774
|
+
<slot></slot>
|
|
775
|
+
</ft-typography>
|
|
776
|
+
</label>
|
|
777
|
+
</div>
|
|
778
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new ji(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 ji(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Ii.elementDefinitions={"ft-ripple":Ye,"ft-typography":Ze},Ii.styles=v`
|
|
779
|
+
* {
|
|
780
|
+
box-sizing: border-box;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.ft-radio {
|
|
784
|
+
box-sizing: border-box;
|
|
785
|
+
color: ${Ri};
|
|
786
|
+
|
|
787
|
+
display: inline-flex;
|
|
788
|
+
align-items: center;
|
|
789
|
+
gap: 4px;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.ft-radio--disabled {
|
|
793
|
+
color: ${Di};
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
input {
|
|
797
|
+
opacity: 0;
|
|
798
|
+
position: absolute;
|
|
799
|
+
width: 40px;
|
|
800
|
+
height: 40px;
|
|
801
|
+
margin: 0;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.ft-radio--box-container {
|
|
805
|
+
position: relative;
|
|
806
|
+
width: 40px;
|
|
807
|
+
height: 40px;
|
|
808
|
+
|
|
809
|
+
display: flex;
|
|
810
|
+
justify-content: center;
|
|
811
|
+
align-items: center;
|
|
812
|
+
flex-shrink: 0;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.ft-radio--box {
|
|
816
|
+
border: 2px solid ${Li};
|
|
817
|
+
border-radius: 50%;
|
|
818
|
+
|
|
819
|
+
display: flex;
|
|
820
|
+
justify-content: center;
|
|
821
|
+
align-items: center;
|
|
822
|
+
|
|
823
|
+
width: 20px;
|
|
824
|
+
height: 20px;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.ft-radio--box:after {
|
|
828
|
+
content: " ";
|
|
829
|
+
background-color: ${Mi};
|
|
830
|
+
|
|
831
|
+
border-radius: 50%;
|
|
832
|
+
|
|
833
|
+
width: 12px;
|
|
834
|
+
height: 12px;
|
|
835
|
+
|
|
836
|
+
transform: scale(0);
|
|
837
|
+
transition: transform 100ms ease;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.ft-radio--checked .ft-radio--box {
|
|
841
|
+
border-color: ${Mi};
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
846
|
+
transform: scale(1);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.ft-radio--disabled .ft-radio--box {
|
|
850
|
+
border-color: ${Di};
|
|
851
|
+
background-color: transparent;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
855
|
+
background-color: ${Di};
|
|
856
|
+
}
|
|
857
|
+
`,Fi([i()],Ii.prototype,"value",void 0),Fi([i()],Ii.prototype,"name",void 0),Fi([i({type:Boolean})],Ii.prototype,"checked",void 0),Fi([i({type:Boolean})],Ii.prototype,"disabled",void 0),Fi([n(".ft-radio")],Ii.prototype,"container",void 0),Fi([n("ft-ripple")],Ii.prototype,"ripple",void 0),Fi([n("input")],Ii.prototype,"input",void 0);var Ui=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ti extends vt{constructor(){super(...arguments),this.name=""}render(){return K`
|
|
858
|
+
<slot @slotchange=${this.onSlotChange}
|
|
859
|
+
@change=${this.onChange}
|
|
860
|
+
@keydown=${this.onKeyDown}
|
|
861
|
+
@focusin=${this.onFocusIn}
|
|
862
|
+
></slot>
|
|
863
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Ti.elementDefinitions={},Ti.styles=v`
|
|
864
|
+
:host {
|
|
865
|
+
display: contents;
|
|
866
|
+
}
|
|
867
|
+
`,Ui([i()],Ti.prototype,"name",void 0),Ui([a()],Ti.prototype,"radioButtons",void 0),c("ft-radio")(Ii),c("ft-radio-group")(Ti);var Ai=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Pi={borderRadiusM:ft.external(bt.borderRadiusM,"Design system"),colorOutline:ft.external(bt.colorOutline,"Design system"),colorOnSurface:ft.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(bt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ft.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),colorOnPrimary:ft.external(bt.colorOnPrimary,"Design system"),fontFamily:ft.external(ye.fontFamily,"Body2 typography"),fontSize:ft.external(ye.fontSize,"Body2 typography"),fontWeight:ft.external(ye.fontWeight,"Body2 typography"),letterSpacing:ft.external(ye.letterSpacing,"Body2 typography"),lineHeight:ft.external(ye.lineHeight,"Body2 typography"),textTransform:ft.external(ye.textTransform,"Body2 typography")};class _i extends vt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return K`
|
|
868
|
+
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
869
|
+
${null==this.parent?null:K`
|
|
870
|
+
<div tabindex="0"
|
|
871
|
+
class="ft-filter-level--go-back"
|
|
872
|
+
?disabled=${this.disabled}
|
|
873
|
+
@keyup=${this.goBackOnKeyPress}
|
|
874
|
+
@click=${this.goBackOnClick}>
|
|
875
|
+
<ft-ripple></ft-ripple>
|
|
876
|
+
<ft-icon variant="material">chevron_left</ft-icon>
|
|
877
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
878
|
+
</div>
|
|
879
|
+
`}
|
|
880
|
+
${Lt(e,(t=>t.value),(t=>{var e;return K`
|
|
881
|
+
<div class="ft-filter-level--option" part="options">
|
|
882
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
883
|
+
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?V:K`
|
|
884
|
+
<ft-button icon="chevron_right"
|
|
885
|
+
label="${t.label}"
|
|
886
|
+
?disabled=${this.disabled}
|
|
887
|
+
tooltipPosition="left"
|
|
888
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
889
|
+
`}
|
|
890
|
+
</div>
|
|
891
|
+
`}))}
|
|
892
|
+
${e.length<t.length?K`
|
|
893
|
+
<ft-button
|
|
894
|
+
class="ft-filter-level--display-more"
|
|
895
|
+
icon="expand_more"
|
|
896
|
+
dense trailingIcon
|
|
897
|
+
@click=${this.displayMore}>
|
|
898
|
+
${this.moreValuesButtonLabel}
|
|
899
|
+
</ft-button>
|
|
900
|
+
`:V}
|
|
901
|
+
</div>
|
|
902
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return K`
|
|
903
|
+
<ft-checkbox name="${this.id}"
|
|
904
|
+
.checked=${t.selected}
|
|
905
|
+
.disabled=${this.disabled}
|
|
906
|
+
.indeterminate=${Ke(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
907
|
+
@change=${e=>this.optionsChanged(e,t)}>
|
|
908
|
+
${t.label}
|
|
909
|
+
</ft-checkbox>
|
|
910
|
+
`}buildMonoValuedOption(t){return K`
|
|
911
|
+
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
912
|
+
.checked=${t.selected}
|
|
913
|
+
?disabled=${this.disabled}
|
|
914
|
+
@click=${e=>this.optionsChanged(e,t)}
|
|
915
|
+
@keyup=${e=>this.onRadioKeyUp(e,t)}
|
|
916
|
+
@change=${t=>t.stopPropagation()}>
|
|
917
|
+
|
|
918
|
+
${t.label}
|
|
919
|
+
</ft-radio>
|
|
920
|
+
`}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}))}}_i.elementDefinitions={"ft-button":ki,"ft-ripple":Ye,"ft-typography":Ze,"ft-checkbox":Ni,"ft-icon":vi,"ft-radio":Ii},_i.styles=[v`
|
|
921
|
+
.ft-filter-level--container {
|
|
922
|
+
display: flex;
|
|
923
|
+
flex-direction: column;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.ft-filter-level--container > * {
|
|
927
|
+
padding: 0 10px;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.ft-filter-level--go-back {
|
|
931
|
+
flex-shrink: 0;
|
|
932
|
+
text-decoration: none;
|
|
933
|
+
position: relative;
|
|
934
|
+
border-radius: ${Pi.borderRadiusM};
|
|
935
|
+
overflow: hidden;
|
|
936
|
+
display: flex;
|
|
937
|
+
align-items: center;
|
|
938
|
+
padding: 4px 4px;
|
|
939
|
+
gap: 4px;
|
|
940
|
+
cursor: pointer;
|
|
941
|
+
color: ${Pi.colorOnSurface};
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
.ft-filter-level--go-back:focus {
|
|
945
|
+
outline: none;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.ft-filter-level--go-back ft-icon {
|
|
949
|
+
flex-shrink: 0;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.ft-filter-level--go-back ft-typography {
|
|
953
|
+
display: block;
|
|
954
|
+
flex-grow: 1;
|
|
955
|
+
flex-shrink: 0;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.ft-filter-level--option {
|
|
959
|
+
display: flex;
|
|
960
|
+
align-items: center;
|
|
961
|
+
max-width: 100%;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
.ft-filter-level--option ft-button {
|
|
965
|
+
margin-right: -10px;
|
|
966
|
+
flex-shrink: 0;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
ft-button {
|
|
970
|
+
${ut(yi.color,Pi.colorOnSurface)};
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
ft-radio, ft-checkbox {
|
|
974
|
+
flex-shrink: 1;
|
|
975
|
+
flex-grow: 1;
|
|
976
|
+
display: block;
|
|
977
|
+
max-width: calc(100% + 10px);
|
|
978
|
+
margin-left: -10px;
|
|
979
|
+
word-break: break-word;
|
|
980
|
+
}
|
|
981
|
+
`],Ai([i({type:String})],_i.prototype,"id",void 0),Ai([i({type:Object})],_i.prototype,"parent",void 0),Ai([i({type:Array})],_i.prototype,"options",void 0),Ai([i({type:Boolean})],_i.prototype,"multivalued",void 0),Ai([i({type:Boolean})],_i.prototype,"disabled",void 0),Ai([i({type:Boolean})],_i.prototype,"hideSelectedOptions",void 0),Ai([i({type:Boolean})],_i.prototype,"preventNavigation",void 0),Ai([i({type:String})],_i.prototype,"filter",void 0),Ai([i({type:String})],_i.prototype,"moreValuesButtonLabel",void 0),Ai([i({type:Number})],_i.prototype,"displayedValuesLimit",void 0),Ai([n(".ft-filter-level--container")],_i.prototype,"container",void 0),Ai([o()],_i.prototype,"displayedPages",void 0);var Hi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Zi={buttonsColor:ft.extend("--ft-snap-scroll-buttons-color",bt.colorPrimary),buttonsZIndex:ft.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ft.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ft.external(bt.colorSurface,"Design system")};class Ki extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Wi extends vt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new t(200),this.updateScrollDebouncer=new t(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=Dt({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":wt}),e=this.controls&&this.withScroll;return K`
|
|
982
|
+
<div part="container" class="${t}">
|
|
983
|
+
<ft-button
|
|
984
|
+
class="ft-snap-scroll--previous"
|
|
985
|
+
part="controls"
|
|
986
|
+
primary
|
|
987
|
+
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
988
|
+
?hidden=${!e||this.startReached}
|
|
989
|
+
?disabled=${!e||this.startReached}
|
|
990
|
+
@click=${this.previous}
|
|
991
|
+
></ft-button>
|
|
992
|
+
<slot class="ft-snap-scroll--content"
|
|
993
|
+
part="content"
|
|
994
|
+
@slotchange=${this.onSlotChange}></slot>
|
|
995
|
+
<ft-button
|
|
996
|
+
class="ft-snap-scroll--next"
|
|
997
|
+
part="controls"
|
|
998
|
+
primary
|
|
999
|
+
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
1000
|
+
?hidden=${!e||this.endReached}
|
|
1001
|
+
?disabled=${!e||this.endReached}
|
|
1002
|
+
@click=${this.next}
|
|
1003
|
+
></ft-button>
|
|
1004
|
+
</div>
|
|
1005
|
+
`}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 Ki(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)}}Wi.elementDefinitions={"ft-button":ki},Wi.styles=v`
|
|
1006
|
+
.ft-snap-scroll {
|
|
1007
|
+
box-sizing: border-box;
|
|
1008
|
+
position: relative;
|
|
1009
|
+
display: flex;
|
|
1010
|
+
|
|
1011
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
1015
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
1016
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1017
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.ft-snap-scroll,
|
|
1021
|
+
.ft-snap-scroll--content {
|
|
1022
|
+
overflow: hidden;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.ft-snap-scroll--limit-size,
|
|
1026
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1027
|
+
width: 100%;
|
|
1028
|
+
height: 100%;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
.ft-snap-scroll--content {
|
|
1032
|
+
flex-grow: 1;
|
|
1033
|
+
flex-shrink: 1;
|
|
1034
|
+
box-sizing: border-box;
|
|
1035
|
+
scroll-snap-align: start;
|
|
1036
|
+
display: flex;
|
|
1037
|
+
flex-wrap: nowrap;
|
|
1038
|
+
align-items: flex-start;
|
|
1039
|
+
justify-content: flex-start;
|
|
1040
|
+
gap: ${Zi.gap};
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1044
|
+
display: none;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1048
|
+
-ms-overflow-style: none;
|
|
1049
|
+
scrollbar-width: none;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
1053
|
+
flex-shrink: 0;
|
|
1054
|
+
flex-grow: 1;
|
|
1055
|
+
max-height: 100%;
|
|
1056
|
+
max-width: 100%;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.ft-snap-scroll--horizontal,
|
|
1060
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1061
|
+
width: 100%;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.ft-snap-scroll--vertical,
|
|
1065
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1066
|
+
height: 100%;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1070
|
+
flex-direction: row;
|
|
1071
|
+
overflow-x: auto;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1075
|
+
flex-direction: column;
|
|
1076
|
+
overflow-y: auto;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.ft-snap-scroll--previous,
|
|
1080
|
+
.ft-snap-scroll--next {
|
|
1081
|
+
position: absolute;
|
|
1082
|
+
display: flex;
|
|
1083
|
+
z-index: ${Zi.buttonsZIndex};
|
|
1084
|
+
opacity: 1;
|
|
1085
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1086
|
+
${ut(yi.backgroundColor,"transparent")};
|
|
1087
|
+
${ut(yi.color,Zi.buttonsColor)};
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.ft-snap-scroll--previous[hidden],
|
|
1091
|
+
.ft-snap-scroll--next[hidden] {
|
|
1092
|
+
z-index: -1;
|
|
1093
|
+
opacity: 0;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1097
|
+
top: 0;
|
|
1098
|
+
left: -1px;
|
|
1099
|
+
bottom: 0;
|
|
1100
|
+
background: linear-gradient(to right, ${Zi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1104
|
+
top: -1px;
|
|
1105
|
+
left: 0;
|
|
1106
|
+
right: 0;
|
|
1107
|
+
background: linear-gradient(to bottom, ${Zi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1111
|
+
top: 0;
|
|
1112
|
+
right: -1px;
|
|
1113
|
+
bottom: 0;
|
|
1114
|
+
background: linear-gradient(to left, ${Zi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1118
|
+
left: 0;
|
|
1119
|
+
right: 0;
|
|
1120
|
+
bottom: -1px;
|
|
1121
|
+
background: linear-gradient(to top, ${Zi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1125
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1126
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1127
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1128
|
+
background-color: ${Zi.colorSurface};
|
|
1129
|
+
}
|
|
1130
|
+
`,Hi([i({type:Boolean})],Wi.prototype,"horizontal",void 0),Hi([i({type:Boolean})],Wi.prototype,"hideScrollbar",void 0),Hi([i({type:Boolean})],Wi.prototype,"controls",void 0),Hi([i({type:Boolean})],Wi.prototype,"limitSize",void 0),Hi([o()],Wi.prototype,"elements",void 0),Hi([o()],Wi.prototype,"currentElement",void 0),Hi([o()],Wi.prototype,"withScroll",void 0),Hi([o()],Wi.prototype,"startReached",void 0),Hi([o()],Wi.prototype,"endReached",void 0),Hi([n(".ft-snap-scroll--content")],Wi.prototype,"contentSlot",void 0),c("ft-snap-scroll")(Wi);var Vi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const qi=ft.external(bt.colorOutline,"Design system"),Ji=ft.external(bt.colorOnSurface,"Design system"),Xi=ft.external(bt.colorOnSurfaceMedium,"Design system"),Yi=ft.external(bt.colorPrimary,"Design system"),Qi=ft.external(bt.colorSurface,"Design system"),Gi=ft.external(bt.transitionDuration,"Design system"),to=ft.external(bt.transitionTimingFunction,"Design system");class eo extends CustomEvent{constructor(t){super("change",{detail:t})}}class io extends vt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new t(300),this.changeDebouncer=new t(10)}get flatOptions(){return Ke(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return K`
|
|
1131
|
+
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1132
|
+
part="container">
|
|
1133
|
+
${this.label||i?K`
|
|
1134
|
+
<div class="ft-filter--header" part="header">
|
|
1135
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1136
|
+
</ft-typography>
|
|
1137
|
+
${i?K`
|
|
1138
|
+
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1139
|
+
${this.clearButtonLabel}
|
|
1140
|
+
</ft-button>
|
|
1141
|
+
`:null}
|
|
1142
|
+
</div>
|
|
1143
|
+
`:null}
|
|
1144
|
+
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1145
|
+
<input type="search"
|
|
1146
|
+
part="input"
|
|
1147
|
+
class="ft-typography--caption"
|
|
1148
|
+
?disabled=${!o}
|
|
1149
|
+
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1150
|
+
@keyup=${this.onFilterChange}>
|
|
1151
|
+
</div>
|
|
1152
|
+
<div class="ft-filter--values">
|
|
1153
|
+
${this.renderLevels()}
|
|
1154
|
+
</div>
|
|
1155
|
+
<slot class="ft-filter--slot"
|
|
1156
|
+
@slotchange=${this.updateOptionsFromSlot}
|
|
1157
|
+
@option-change=${this.optionsChanged}></slot>
|
|
1158
|
+
</div>
|
|
1159
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return K`
|
|
1160
|
+
${this.raiseSelectedOptions&&e.length>0?K`
|
|
1161
|
+
<ft-filter-level
|
|
1162
|
+
id="${this.id}"
|
|
1163
|
+
?multivalued=${this.multivalued}
|
|
1164
|
+
?disabled=${this.disabled}
|
|
1165
|
+
preventNavigation
|
|
1166
|
+
.options=${e}
|
|
1167
|
+
@change=${this.onChange}
|
|
1168
|
+
part="selected-values"
|
|
1169
|
+
></ft-filter-level>
|
|
1170
|
+
<div class="ft-filter--separator">
|
|
1171
|
+
`:null}
|
|
1172
|
+
<ft-snap-scroll horizontal hideScrollbar
|
|
1173
|
+
class="ft-filter--levels"
|
|
1174
|
+
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1175
|
+
${this.renderLevel(o,this.options)}
|
|
1176
|
+
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
|
|
1177
|
+
</ft-snap-scroll>
|
|
1178
|
+
`}renderLevel(t,e,i){return K`
|
|
1179
|
+
<ft-filter-level
|
|
1180
|
+
class="${t}"
|
|
1181
|
+
id="${this.id}"
|
|
1182
|
+
filter="${this.filter}"
|
|
1183
|
+
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1184
|
+
?multivalued=${this.multivalued}
|
|
1185
|
+
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1186
|
+
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1187
|
+
.parent=${i}
|
|
1188
|
+
.options=${e}
|
|
1189
|
+
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1190
|
+
@change=${this.onChange}
|
|
1191
|
+
@go-back=${this.goBack}
|
|
1192
|
+
@display-level=${this.onDisplayLevel}
|
|
1193
|
+
part="values"
|
|
1194
|
+
></ft-filter-level>
|
|
1195
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new eo(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}io.elementDefinitions={"ft-button":ki,"ft-filter-level":_i,"ft-snap-scroll":Wi,"ft-typography":Ze},io.styles=[Ae,v`
|
|
1196
|
+
:host {
|
|
1197
|
+
display: flex;
|
|
1198
|
+
max-height: 100%;
|
|
1199
|
+
max-width: 100%;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
.ft-filter--container {
|
|
1203
|
+
flex-grow: 1;
|
|
1204
|
+
display: flex;
|
|
1205
|
+
flex-direction: column;
|
|
1206
|
+
max-height: 100%;
|
|
1207
|
+
max-width: 100%;
|
|
1208
|
+
color: ${Ji};
|
|
1209
|
+
background: ${Qi};
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
.ft-filter--header {
|
|
1213
|
+
display: flex;
|
|
1214
|
+
flex-wrap: wrap;
|
|
1215
|
+
gap: 4px;
|
|
1216
|
+
flex-shrink: 0;
|
|
1217
|
+
padding: 0 10px;
|
|
1218
|
+
margin-bottom: 8px;
|
|
1219
|
+
${ut(Vt.fontSize,"14px")};
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
.ft-filter--header ft-button {
|
|
1223
|
+
flex-shrink: 0;
|
|
1224
|
+
margin-left: auto;
|
|
1225
|
+
${ut(yi.iconSize,"18px")};
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
.ft-filter--label {
|
|
1229
|
+
display: block;
|
|
1230
|
+
flex-shrink: 1;
|
|
1231
|
+
flex-grow: 1;
|
|
1232
|
+
word-break: break-word;
|
|
1233
|
+
${ut(Vt.lineHeight,"22px")};
|
|
1234
|
+
${ut(Vt.fontWeight,"bold")};
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.ft-filter--filter {
|
|
1238
|
+
flex-shrink: 0;
|
|
1239
|
+
display: flex;
|
|
1240
|
+
margin: 0;
|
|
1241
|
+
margin-bottom: 8px;
|
|
1242
|
+
padding: 0 10px;
|
|
1243
|
+
overflow: hidden;
|
|
1244
|
+
height: 32px;
|
|
1245
|
+
transition: height ${Gi} ${to},
|
|
1246
|
+
margin ${Gi} ${to};
|
|
1247
|
+
transition-delay: 500ms;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.ft-filter--filter[hidden] {
|
|
1251
|
+
height: 0;
|
|
1252
|
+
margin-bottom: 0;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
input {
|
|
1256
|
+
display: block;
|
|
1257
|
+
width: 100%;
|
|
1258
|
+
border-radius: 4px;
|
|
1259
|
+
border: 1px solid ${qi};
|
|
1260
|
+
padding: 4px;
|
|
1261
|
+
background-color: ${Qi};
|
|
1262
|
+
color: ${Xi};
|
|
1263
|
+
outline-color: ${Yi};
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.ft-filter--values {
|
|
1267
|
+
flex-grow: 1;
|
|
1268
|
+
flex-shrink: 1;
|
|
1269
|
+
max-width: 100%;
|
|
1270
|
+
overflow-x: hidden;
|
|
1271
|
+
overflow-y: auto;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
.ft-filter--separator {
|
|
1275
|
+
border-top: 1px solid ${qi};
|
|
1276
|
+
margin: 4px 10px;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
.ft-filter--levels-container {
|
|
1280
|
+
position: relative;
|
|
1281
|
+
overflow: hidden;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
.ft-filter--levels {
|
|
1285
|
+
position: relative;
|
|
1286
|
+
overflow: hidden;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
ft-filter-level {
|
|
1290
|
+
width: 100%;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.ft-filter--level-left {
|
|
1294
|
+
height: 0;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
slot {
|
|
1298
|
+
display: none;
|
|
1299
|
+
}
|
|
1300
|
+
`],Vi([i({type:String})],io.prototype,"id",void 0),Vi([i({type:String})],io.prototype,"label",void 0),Vi([i({type:String})],io.prototype,"filterPlaceHolder",void 0),Vi([i({type:String})],io.prototype,"clearButtonLabel",void 0),Vi([i({type:String})],io.prototype,"moreValuesButtonLabel",void 0),Vi([h([])],io.prototype,"options",void 0),Vi([i({type:Boolean})],io.prototype,"multivalued",void 0),Vi([i({type:Boolean})],io.prototype,"disabled",void 0),Vi([i({type:Boolean})],io.prototype,"raiseSelectedOptions",void 0),Vi([i({type:Number})],io.prototype,"displayedValuesLimit",void 0),Vi([n(".ft-filter--slot")],io.prototype,"slotElement",void 0),Vi([n(".ft-filter--container")],io.prototype,"container",void 0),Vi([n(".ft-filter--values")],io.prototype,"valuesContainer",void 0),Vi([n(".ft-filter--levels")],io.prototype,"levelsContainer",void 0),Vi([n(".ft-filter--levels ft-filter-level:last-child")],io.prototype,"lastLevel",void 0),Vi([function(t){return s({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],io.prototype,"levels",void 0),Vi([o()],io.prototype,"withScroll",void 0),Vi([o()],io.prototype,"filter",void 0),Vi([o()],io.prototype,"slideIn",void 0),Vi([o()],io.prototype,"slideOut",void 0);var oo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class so extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return K`
|
|
1301
|
+
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1302
|
+
`}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}))}}so.elementDefinitions={},oo([i({type:String})],so.prototype,"label",void 0),oo([i({type:Object,converter:t=>t})],so.prototype,"value",void 0),oo([i({type:Boolean,reflect:!0})],so.prototype,"selected",void 0),oo([i({type:Object})],so.prototype,"subOptions",void 0),oo([n(".ft-filter-option--slot")],so.prototype,"slotElement",void 0),c("ft-filter")(io),c("ft-filter-option")(so);var no=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ro extends vt{constructor(){super(...arguments),this.multi=!1}render(){return K`
|
|
1303
|
+
<div class="ft-accordion">
|
|
1304
|
+
<slot @activated=${this.onChange}></slot>
|
|
1305
|
+
</div>
|
|
1306
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}ro.elementDefinitions={},ro.styles=v`
|
|
1307
|
+
.ft-accordion {
|
|
1308
|
+
box-sizing: border-box;
|
|
1309
|
+
}
|
|
1310
|
+
`,no([i({type:Boolean})],ro.prototype,"multi",void 0),no([n("slot")],ro.prototype,"content",void 0);var lo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ao=ft.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),co=ft.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),ho=ft.external(bt.colorOutline,"Design system");class po extends vt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return K`
|
|
1311
|
+
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1312
|
+
<div class="ft-accordion-item--toggle"
|
|
1313
|
+
part="toggle"
|
|
1314
|
+
@click=${()=>this.active=!this.active}
|
|
1315
|
+
@keydown=${this.onToggleKeyDown}
|
|
1316
|
+
tabindex="0">
|
|
1317
|
+
<ft-ripple part="toggle-ripple"></ft-ripple>
|
|
1318
|
+
${this.icon?K`
|
|
1319
|
+
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
1320
|
+
`:null}
|
|
1321
|
+
${this.label?K`
|
|
1322
|
+
<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}
|
|
1323
|
+
</ft-typography>
|
|
1324
|
+
`:K`
|
|
1325
|
+
<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>
|
|
1326
|
+
`}
|
|
1327
|
+
<ft-icon variant="material">${this.active?"expand_less":"expand_more"}</ft-icon>
|
|
1328
|
+
</div>
|
|
1329
|
+
<div class="ft-accordion-item--content" part="content" @focusin=${()=>this.active=!0}>
|
|
1330
|
+
<slot></slot>
|
|
1331
|
+
</div>
|
|
1332
|
+
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1333
|
+
</div>
|
|
1334
|
+
`}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)}}po.elementDefinitions={"ft-ripple":Ye,"ft-typography":Ze,"ft-icon":vi},po.styles=v`
|
|
1335
|
+
.ft-accordion-item {
|
|
1336
|
+
display: flex;
|
|
1337
|
+
flex-direction: column;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
.ft-accordion-item--toggle {
|
|
1341
|
+
flex-shrink: 0;
|
|
1342
|
+
flex-grow: 0;
|
|
1343
|
+
position: relative;
|
|
1344
|
+
display: flex;
|
|
1345
|
+
align-items: center;
|
|
1346
|
+
cursor: pointer;
|
|
1347
|
+
padding: ${co} ${ao};
|
|
1348
|
+
gap: calc(${ao} / 2);
|
|
1349
|
+
outline: none;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.ft-accordion-item--label {
|
|
1353
|
+
flex-grow: 1;
|
|
1354
|
+
flex-shrink: 1;
|
|
1355
|
+
display: block;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.ft-accordion-item--content {
|
|
1359
|
+
box-sizing: border-box;
|
|
1360
|
+
flex-shrink: 1;
|
|
1361
|
+
flex-grow: 1;
|
|
1362
|
+
overflow: hidden;
|
|
1363
|
+
height: 0;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1367
|
+
height: initial;
|
|
1368
|
+
overflow: visible;
|
|
1369
|
+
padding: ${co} ${ao};
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
.ft-accordion-item--separator {
|
|
1373
|
+
border-bottom: 1px solid ${ho};
|
|
1374
|
+
}
|
|
1375
|
+
`,lo([i({type:String})],po.prototype,"icon",void 0),lo([i({type:String})],po.prototype,"label",void 0),lo([i({type:Boolean,reflect:!0})],po.prototype,"active",void 0),c("ft-accordion")(ro),c("ft-accordion-item")(po);var fo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const uo=ft.extend("--ft-chip-color",bt.colorOnSurface),bo={backgroundColor:ft.extend("--ft-chip-background-color",bt.colorSurface),color:uo,fontSize:ft.extend("--ft-chip-font-size",ye.fontSize),iconSize:ft.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ft.extend("--ft-chip-ripple-color",uo),horizontalPadding:ft.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ft.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ft.external(bt.colorOutline,"Design system"),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},vo=ft.extend("--ft-chip-highlighted-color",ft.extend("--ft-chip-color",bt.colorOnPrimary)),go={backgroundColor:ft.extend("--ft-chip-highlighted-background-color",ft.extend("--ft-chip-background-color",bt.colorPrimary)),color:vo,rippleColor:ft.extend("--ft-chip-highlighted-ripple-color",vo)},xo=ft.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),yo=ft.create("--ft-chip-dense-vertical-padding","SIZE","4px");class mo extends CustomEvent{constructor(){super("icon-click")}}class $o extends vt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}static get styles(){return[gt,v`
|
|
1376
|
+
:host {
|
|
1377
|
+
display: inline-block;
|
|
1378
|
+
max-width: 100%;
|
|
1379
|
+
pointer-events: none;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.ft-chip {
|
|
1383
|
+
position: relative;
|
|
1384
|
+
display: flex;
|
|
1385
|
+
justify-content: center;
|
|
1386
|
+
align-items: center;
|
|
1387
|
+
width: 100%;
|
|
1388
|
+
overflow: hidden;
|
|
1389
|
+
box-sizing: border-box;
|
|
1390
|
+
pointer-events: auto;
|
|
1391
|
+
|
|
1392
|
+
--ft-chip-internal-font-size: ${bo.fontSize};
|
|
1393
|
+
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1394
|
+
${ut(bi.size,bo.iconSize)};
|
|
1395
|
+
--ft-chip-internal-vertical-padding: ${bo.verticalPadding};
|
|
1396
|
+
--ft-chip-internal-horizontal-padding: ${bo.horizontalPadding};
|
|
1397
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
1398
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${bo.iconSize});
|
|
1399
|
+
|
|
1400
|
+
border: 1px solid ${bo.colorOutline};
|
|
1401
|
+
color: ${bo.color};
|
|
1402
|
+
${ut(Xe.color,bo.rippleColor)};
|
|
1403
|
+
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1404
|
+
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1405
|
+
background-color: ${bo.backgroundColor};
|
|
1406
|
+
line-height: var(--ft-chip-internal-content-height);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
.ft-chip--dense {
|
|
1410
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
1411
|
+
--ft-chip-internal-vertical-padding: ${yo};
|
|
1412
|
+
--ft-chip-internal-horizontal-padding: ${xo};
|
|
1413
|
+
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.ft-chip--no-content {
|
|
1417
|
+
--ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
.ft-chip--disabled {
|
|
1421
|
+
cursor: default;
|
|
1422
|
+
pointer-events: none;
|
|
1423
|
+
filter: grayscale(1);
|
|
1424
|
+
opacity: ${bo.opacityDisabled};
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
.ft-chip--highlighted {
|
|
1428
|
+
border: none;
|
|
1429
|
+
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1430
|
+
background-color: ${go.backgroundColor};
|
|
1431
|
+
${ut(Xe.color,go.rippleColor)};
|
|
1432
|
+
color: ${go.color};
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
.ft-chip--clickable {
|
|
1436
|
+
cursor: pointer;
|
|
1437
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.ft-chip:focus {
|
|
1441
|
+
outline: none;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
.ft-chip--icon-container {
|
|
1445
|
+
display: inline-flex;
|
|
1446
|
+
position: relative;
|
|
1447
|
+
overflow: hidden;
|
|
1448
|
+
border-radius: 100%;
|
|
1449
|
+
justify-content: center;
|
|
1450
|
+
align-items: center;
|
|
1451
|
+
flex-shrink: 0;
|
|
1452
|
+
|
|
1453
|
+
padding: var(--ft-chip-internal-icon-padding);
|
|
1454
|
+
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.ft-chip--label {
|
|
1458
|
+
vertical-align: bottom;
|
|
1459
|
+
display: block;
|
|
1460
|
+
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1461
|
+
${ut(ye.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1462
|
+
${ut(ye.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
.ft-chip--safari-fix .ft-chip--label {
|
|
1466
|
+
margin-right: 0;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
|
|
1470
|
+
overflow: hidden;
|
|
1471
|
+
white-space: nowrap;
|
|
1472
|
+
text-overflow: ellipsis;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
|
|
1476
|
+
content: "\\0000a0";
|
|
1477
|
+
display: inline-block;
|
|
1478
|
+
width: 0;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
.ft-chip--no-content .ft-chip--label {
|
|
1482
|
+
display: none;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
.ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
|
|
1486
|
+
width: var(--ft-chip-internal-content-height);
|
|
1487
|
+
height: var(--ft-chip-internal-content-height);
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
.ft-chip--icon-container:focus {
|
|
1491
|
+
outline: none;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
1495
|
+
order: -1;
|
|
1496
|
+
}
|
|
1497
|
+
`]}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":wt};return K`
|
|
1498
|
+
<div class="${Dt(t)}"
|
|
1499
|
+
aria-label="${this.getLabel()}"
|
|
1500
|
+
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1501
|
+
@keyup=${this.onKeyUp}>
|
|
1502
|
+
<ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
|
|
1503
|
+
<ft-typography variant="body2" element="span" class="ft-chip--label">
|
|
1504
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
1505
|
+
</ft-typography>
|
|
1506
|
+
${this.internalIcon?this.renderIcon():null}
|
|
1507
|
+
</div>
|
|
1508
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return K`
|
|
1509
|
+
<div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}"
|
|
1510
|
+
tabindex="${this.interactionsOnIcon?0:-1}"
|
|
1511
|
+
@click=${this.onIconClick}
|
|
1512
|
+
@keyup=${this.onIconKeyUp}>
|
|
1513
|
+
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1514
|
+
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1515
|
+
</div>
|
|
1516
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new mo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new mo))}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)}}$o.elementDefinitions={"ft-ripple":Ye,"ft-typography":Ze,"ft-icon":vi},fo([i({type:Boolean})],$o.prototype,"highlighted",void 0),fo([i({type:Boolean})],$o.prototype,"removable",void 0),fo([i({type:Boolean})],$o.prototype,"disabled",void 0),fo([i({type:Boolean})],$o.prototype,"clickable",void 0),fo([i({type:Boolean})],$o.prototype,"iconClickable",void 0),fo([i({type:Boolean})],$o.prototype,"dense",void 0),fo([i({type:Boolean})],$o.prototype,"multiLine",void 0),fo([i({type:String})],$o.prototype,"label",void 0),fo([i({type:String})],$o.prototype,"icon",void 0),fo([i({type:Boolean})],$o.prototype,"trailingIcon",void 0),fo([n("ft-typography slot")],$o.prototype,"slottedContent",void 0),c("ft-chip")($o);var wo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ko={fontSize:ft.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:ft.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:ft.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:ft.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:ft.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:ft.extend("--ft-input-label-border-color",bt.colorOutline),textColor:ft.extend("--ft-input-label-text-color",bt.colorOnSurfaceMedium),disabledTextColor:ft.extend("--ft-input-label-disabled-text-color",bt.colorOnSurfaceDisabled),colorSurface:ft.external(bt.colorSurface,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system")};class So extends vt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!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};return K`
|
|
1517
|
+
<div class="${Dt(t)}">
|
|
1518
|
+
${this.text?K`
|
|
1519
|
+
<div class="ft-input-label--text ft-typography--caption">
|
|
1520
|
+
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
1521
|
+
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
1522
|
+
</div>
|
|
1523
|
+
`:null}
|
|
1524
|
+
</div>
|
|
1525
|
+
`}}So.elementDefinitions={},So.styles=[Ae,v`
|
|
1526
|
+
.ft-input-label {
|
|
1527
|
+
position: absolute;
|
|
1528
|
+
inset: 0;
|
|
1529
|
+
display: flex;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
.ft-input-label {
|
|
1533
|
+
border-color: ${ko.borderColor};
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
.ft-input-label:before,
|
|
1537
|
+
.ft-input-label:after {
|
|
1538
|
+
content: "";
|
|
1539
|
+
display: flex;
|
|
1540
|
+
border-bottom-width: 1px;
|
|
1541
|
+
border-bottom-style: solid;
|
|
1542
|
+
border-color: inherit;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.ft-input-label:before {
|
|
1546
|
+
width: ${ko.horizontalSpacing};
|
|
1547
|
+
flex-shrink: 0;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
.ft-input-label:after {
|
|
1551
|
+
flex-grow: 1;
|
|
1552
|
+
flex-shrink: 1;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
.ft-input-label--text {
|
|
1556
|
+
display: flex;
|
|
1557
|
+
flex-shrink: 1;
|
|
1558
|
+
position: relative;
|
|
1559
|
+
border-bottom-width: 1px;
|
|
1560
|
+
border-bottom-style: solid;
|
|
1561
|
+
border-color: inherit;
|
|
1562
|
+
color: ${ko.textColor};
|
|
1563
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1564
|
+
${ut(me.fontSize,ko.fontSize)};
|
|
1565
|
+
${ut(me.lineHeight,ko.fontSize)};
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
1569
|
+
color: ${ko.disabledTextColor};
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
.ft-input-label--hidden-text {
|
|
1573
|
+
padding: 0 4px;
|
|
1574
|
+
opacity: 0;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
.ft-input-label--floating-text {
|
|
1578
|
+
position: absolute;
|
|
1579
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
1580
|
+
transition: top 250ms;
|
|
1581
|
+
width: calc(100% - 8px);
|
|
1582
|
+
overflow: hidden;
|
|
1583
|
+
white-space: nowrap;
|
|
1584
|
+
text-overflow: ellipsis;
|
|
1585
|
+
padding: ${ko.verticalSpacing} 4px;
|
|
1586
|
+
margin: calc(${ko.verticalSpacing} * -1) 0;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
1590
|
+
${ut(me.fontSize,ko.raisedFontSize)};
|
|
1591
|
+
${ut(me.lineHeight,ko.raisedFontSize)};
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1595
|
+
top: ${ko.verticalSpacing};
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
1599
|
+
.ft-input-label--outlined:before,
|
|
1600
|
+
.ft-input-label--outlined:after {
|
|
1601
|
+
border-top-width: 1px;
|
|
1602
|
+
border-top-style: solid;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
.ft-input-label--outlined:before {
|
|
1606
|
+
border-left-width: 1px;
|
|
1607
|
+
border-left-style: solid;
|
|
1608
|
+
border-radius: ${ko.borderRadiusS} 0 0 ${ko.borderRadiusS};
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
.ft-input-label--outlined:after {
|
|
1612
|
+
border-right-width: 1px;
|
|
1613
|
+
border-right-style: solid;
|
|
1614
|
+
border-radius: 0 ${ko.borderRadiusS} ${ko.borderRadiusS} 0;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1618
|
+
padding: 2px 4px;
|
|
1619
|
+
z-index: ${ko.raisedZIndex};
|
|
1620
|
+
background-color: ${ko.colorSurface};
|
|
1621
|
+
border-radius: ${ko.borderRadiusS};
|
|
1622
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1626
|
+
border-top: none;
|
|
1627
|
+
}
|
|
1628
|
+
`],wo([i({type:String})],So.prototype,"text",void 0),wo([i({type:Boolean})],So.prototype,"raised",void 0),wo([i({type:Boolean})],So.prototype,"outlined",void 0),wo([i({type:Boolean})],So.prototype,"disabled",void 0),c("ft-input-label")(So);var Oo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Co extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return K``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Co.elementDefinitions={},Oo([i({type:String})],Co.prototype,"label",void 0),Oo([i({type:Object,converter:t=>t})],Co.prototype,"value",void 0),Oo([i({type:Boolean,reflect:!0})],Co.prototype,"selected",void 0);const zo={labelSize:ft.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:ft.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:ft.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:ft.extend("--ft-select-selected-option-color",bt.colorOnSurface),helperColor:ft.extend("--ft-select-helper-color",bt.colorOnSurfaceMedium),optionsColor:ft.extend("--ft-select-options-color",bt.colorOnSurface),optionsZIndex:ft.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:ft.external(bt.colorSurface,"Design system"),colorOnSurfaceDisabled:ft.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system"),elevation02:ft.external(bt.elevation02,"Design system")};class Eo extends vt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,s;let n=!this.disabled&&this.optionsDisplayed&&this.hasOptions,r=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":r,"ft-select--options-displayed":n,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label};return K`
|
|
1629
|
+
<div class="${Dt(a)}" part="container">
|
|
1630
|
+
<div class="ft-select--main-panel" part="main-panel">
|
|
1631
|
+
<ft-input-label text="${this.label}"
|
|
1632
|
+
part="label"
|
|
1633
|
+
?disabled=${r}
|
|
1634
|
+
?outlined=${this.outlined}
|
|
1635
|
+
?raised=${l||n}
|
|
1636
|
+
></ft-input-label>
|
|
1637
|
+
<div class="ft-select--input-panel"
|
|
1638
|
+
part="selected-value"
|
|
1639
|
+
tabindex="${r?"-1":"0"}"
|
|
1640
|
+
@click=${()=>{this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=this.optionsDisplayed}}
|
|
1641
|
+
@keydown=${this.onMainPanelKeyDown}
|
|
1642
|
+
aria-label="${this.label}"
|
|
1643
|
+
aria-haspopup="listbox"
|
|
1644
|
+
aria-expanded="${n}">
|
|
1645
|
+
<ft-ripple ?disabled=${r} ?activated=${!this.outlined}></ft-ripple>
|
|
1646
|
+
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
1647
|
+
${null!==(s=null===(o=this.selectedOption)||void 0===o?void 0:o.label)&&void 0!==s?s:""}
|
|
1648
|
+
</ft-typography>
|
|
1649
|
+
<ft-icon variant="material">${n?"expand_less":"expand_more"}</ft-icon>
|
|
1650
|
+
</div>
|
|
1651
|
+
<div class="ft-select--options"
|
|
1652
|
+
part="options"
|
|
1653
|
+
@keydown=${this.onOptionsKeyDown}
|
|
1654
|
+
innerrole="listbox">
|
|
1655
|
+
${Lt(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
1656
|
+
</div>
|
|
1657
|
+
</div>
|
|
1658
|
+
${this.helper?K`
|
|
1659
|
+
<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
|
|
1660
|
+
</ft-typography>`:void 0}
|
|
1661
|
+
</div>
|
|
1662
|
+
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1663
|
+
@option-change=${this.updateOptionsFromSlot}
|
|
1664
|
+
></slot>
|
|
1665
|
+
`}renderOption(t){let e=this.selectedOption===t;return K`
|
|
1666
|
+
<div class="${Dt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
1667
|
+
part="option"
|
|
1668
|
+
tabindex="0"
|
|
1669
|
+
@keydown=${e=>this.onOptionKeyDown(e,t)}
|
|
1670
|
+
@click=${()=>this.selectOption(t)}>
|
|
1671
|
+
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1672
|
+
${t.label}
|
|
1673
|
+
</div>
|
|
1674
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}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 hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Eo.elementDefinitions={"ft-input-label":So,"ft-typography":Ze,"ft-ripple":Ye,"ft-icon":vi},Eo.styles=[Te,Ae,v`
|
|
1675
|
+
*:focus {
|
|
1676
|
+
outline: none;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
.ft-select {
|
|
1680
|
+
display: flex;
|
|
1681
|
+
flex-direction: column;
|
|
1682
|
+
align-items: stretch;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
.ft-select--main-panel {
|
|
1686
|
+
position: relative;
|
|
1687
|
+
display: flex;
|
|
1688
|
+
height: calc(4 * ${zo.verticalSpacing} + ${zo.labelSize} + ${zo.selectedOptionSize});
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
.ft-select--input-panel {
|
|
1692
|
+
flex-grow: 1;
|
|
1693
|
+
position: relative;
|
|
1694
|
+
display: flex;
|
|
1695
|
+
align-items: center;
|
|
1696
|
+
overflow: hidden;
|
|
1697
|
+
padding-left: 16px;
|
|
1698
|
+
padding-right: 8px;
|
|
1699
|
+
gap: 8px;
|
|
1700
|
+
color: ${zo.selectedOptionColor};
|
|
1701
|
+
${ut(Xe.color,zo.selectedOptionColor)};
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.ft-select--input-panel,
|
|
1705
|
+
.ft-select--option {
|
|
1706
|
+
${ut(Xe.opacityContentOnSurfaceHover,"0.08")};
|
|
1707
|
+
${ut(Xe.opacityContentOnSurfacePressed,"0.04")};
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.ft-select--disabled .ft-select--input-panel,
|
|
1711
|
+
.ft-select--disabled .ft-select--option {
|
|
1712
|
+
color: ${zo.colorOnSurfaceDisabled};
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
1716
|
+
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
1717
|
+
cursor: pointer;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
ft-input-label {
|
|
1721
|
+
${ut(ko.fontSize,zo.selectedOptionSize)};
|
|
1722
|
+
${ut(ko.raisedFontSize,zo.labelSize)};
|
|
1723
|
+
${ut(ko.verticalSpacing,zo.verticalSpacing)};
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1727
|
+
color: ${zo.colorPrimary};
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1731
|
+
${ut(ko.borderColor,zo.colorPrimary)};
|
|
1732
|
+
${ut(ko.textColor,zo.colorPrimary)};
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
.ft-select--selected-option {
|
|
1736
|
+
display: block;
|
|
1737
|
+
flex-grow: 1;
|
|
1738
|
+
flex-shrink: 1;
|
|
1739
|
+
overflow: hidden;
|
|
1740
|
+
white-space: nowrap;
|
|
1741
|
+
text-overflow: ellipsis;
|
|
1742
|
+
${ut(xe.fontSize,zo.selectedOptionSize)};
|
|
1743
|
+
${ut(xe.lineHeight,zo.selectedOptionSize)};
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
ft-icon {
|
|
1747
|
+
flex-shrink: 0;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
slot {
|
|
1751
|
+
display: none;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.ft-select--filled .ft-select--input-panel {
|
|
1755
|
+
border-radius: ${zo.borderRadiusS} ${zo.borderRadiusS} 0 0;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1759
|
+
align-self: stretch;
|
|
1760
|
+
padding-top: calc(${zo.labelSize} + 2 * ${zo.verticalSpacing});
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
.ft-select--outlined .ft-select--input-panel {
|
|
1764
|
+
border-radius: ${zo.borderRadiusS};
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
.ft-select--options {
|
|
1768
|
+
display: none;
|
|
1769
|
+
position: absolute;
|
|
1770
|
+
top: 100%;
|
|
1771
|
+
left: 0;
|
|
1772
|
+
right: 0;
|
|
1773
|
+
color: ${zo.optionsColor};
|
|
1774
|
+
background: ${zo.colorSurface};
|
|
1775
|
+
z-index: ${zo.optionsZIndex};
|
|
1776
|
+
box-shadow: ${zo.elevation02};
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
.ft-select--options-displayed .ft-select--options {
|
|
1780
|
+
display: block;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
.ft-select--option {
|
|
1784
|
+
position: relative;
|
|
1785
|
+
padding: 4px 16px;
|
|
1786
|
+
min-height: 32px;
|
|
1787
|
+
display: flex;
|
|
1788
|
+
align-items: center;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
.ft-select--helper-text {
|
|
1792
|
+
padding: 0 12px 0 16px;
|
|
1793
|
+
color: ${zo.helperColor};
|
|
1794
|
+
}
|
|
1795
|
+
`],Oo([i({type:String})],Eo.prototype,"label",void 0),Oo([i({type:String})],Eo.prototype,"helper",void 0),Oo([i({type:Boolean})],Eo.prototype,"outlined",void 0),Oo([i({type:Boolean})],Eo.prototype,"disabled",void 0),Oo([i({type:Array})],Eo.prototype,"options",void 0),Oo([o()],Eo.prototype,"selectedOption",void 0),Oo([o()],Eo.prototype,"optionsDisplayed",void 0),Oo([o()],Eo.prototype,"focusOptions",void 0),Oo([n(".ft-select")],Eo.prototype,"container",void 0),Oo([n(".ft-select--input-panel")],Eo.prototype,"mainPanel",void 0),Oo([n(".ft-select--option:first-child")],Eo.prototype,"firstOption",void 0),Oo([n(".ft-select--option:focus")],Eo.prototype,"focusedOption",void 0),Oo([n(".ft-select--option.ft-select--option-selected")],Eo.prototype,"selectedOptionElement",void 0),Oo([n(".ft-select--option:last-child")],Eo.prototype,"lastOption",void 0),Oo([n("slot")],Eo.prototype,"optionsSlot",void 0),c("ft-select")(Eo),c("ft-select-option")(Co);const Bo={height:ft.create("--ft-search-bar-height","SIZE","38px"),borderRadius:ft.extend("--ft-search-bar-border-radius",bt.borderRadiusS),mobileOpenPosition:ft.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:ft.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:ft.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:ft.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:ft.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:ft.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:ft.external(bt.colorSurface,"Design system"),colorOnSurface:ft.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(bt.colorOnSurfaceMedium,"Design system"),colorOutline:ft.external(bt.colorOutline,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),elevation02:ft.external(bt.elevation02,"Design system"),buttonColor:ft.external(yi.color,"Button"),buttonRippleColor:ft.external(yi.rippleColor,"Button")},No=v`
|
|
1796
|
+
* {
|
|
1797
|
+
box-sizing: border-box;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
.ft-search-bar--container {
|
|
1801
|
+
display: flex;
|
|
1802
|
+
flex-direction: column;
|
|
1803
|
+
gap: 8px;
|
|
1804
|
+
color: ${Bo.colorOnSurface};
|
|
1805
|
+
outline: none;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
.ft-search-bar--container > * {
|
|
1809
|
+
flex-shrink: 0;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
.ft-search-bar--mobile-menu-open {
|
|
1813
|
+
position: ${Bo.mobileOpenPosition};
|
|
1814
|
+
top: ${Bo.mobileOpenTop};
|
|
1815
|
+
bottom: ${Bo.mobileOpenBottom};
|
|
1816
|
+
left: ${Bo.mobileOpenLeft};
|
|
1817
|
+
right: ${Bo.mobileOpenRight};
|
|
1818
|
+
z-index: ${Bo.floatingZIndex};
|
|
1819
|
+
padding: 16px;
|
|
1820
|
+
background: ${Bo.colorSurface};
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.ft-search-bar {
|
|
1824
|
+
position: relative;
|
|
1825
|
+
display: flex;
|
|
1826
|
+
flex-direction: row;
|
|
1827
|
+
align-items: center;
|
|
1828
|
+
height: ${Bo.height};
|
|
1829
|
+
|
|
1830
|
+
background: ${Bo.colorSurface};
|
|
1831
|
+
border: 1px solid ${Bo.colorOutline};
|
|
1832
|
+
border-radius: ${Bo.borderRadius};
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1836
|
+
border-radius: ${Bo.borderRadius} ${Bo.borderRadius} 0 0;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
.ft-search-bar--input-container {
|
|
1840
|
+
flex-grow: 1;
|
|
1841
|
+
flex-shrink: 1;
|
|
1842
|
+
position: relative;
|
|
1843
|
+
height: calc(100% - 2px);
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
.ft-search-bar--input-outline {
|
|
1847
|
+
flex-grow: 1;
|
|
1848
|
+
flex-shrink: 1;
|
|
1849
|
+
height: 100%;
|
|
1850
|
+
width: 100%;
|
|
1851
|
+
align-self: stretch;
|
|
1852
|
+
display: grid;
|
|
1853
|
+
padding: 0 8px;
|
|
1854
|
+
border-radius: ${Bo.borderRadius};
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
1858
|
+
grid-template-columns: auto minmax(200px, 1fr);
|
|
1859
|
+
gap: 8px;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1863
|
+
outline: 2px solid ${Bo.colorPrimary};
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
.ft-search-bar--input {
|
|
1867
|
+
height: 100%;
|
|
1868
|
+
flex-grow: 1;
|
|
1869
|
+
border: none;
|
|
1870
|
+
background-color: transparent;
|
|
1871
|
+
outline: none;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
.ft-search-bar--desktop .ft-search-bar--input {
|
|
1875
|
+
flex-shrink: 0;
|
|
1876
|
+
min-width: 250px;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
.ft-search-bar > ft-button {
|
|
1880
|
+
flex-shrink: 0;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.ft-search-bar--left-action {
|
|
1884
|
+
${ut(yi.borderRadius,v`calc(${Bo.borderRadius} - 1px) 0 0 calc(${Bo.borderRadius} - 1px)`)};
|
|
1885
|
+
border-right: 1px solid ${Bo.colorOutline};
|
|
1886
|
+
height: 100%;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
.ft-search-bar--left-action::part(button) {
|
|
1890
|
+
height: 100%;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1894
|
+
${ut(yi.borderRadius,v`calc(${Bo.borderRadius} - 1px) 0 0 0`)};
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
.ft-search-bar .ft-search-bar--launch-search,
|
|
1898
|
+
.ft-search-bar--clear-query {
|
|
1899
|
+
margin: 0 4px;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
.ft-search-bar--separator {
|
|
1903
|
+
height: 20px;
|
|
1904
|
+
border-right: 1px solid ${Bo.colorOutline};
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
1908
|
+
${ut(ko.borderColor,"transparent")};
|
|
1909
|
+
${ut(ko.borderRadiusS,v`calc(${Bo.borderRadius} - 1px)`)};
|
|
1910
|
+
${ut(zo.selectedOptionColor,Bo.buttonColor)};
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
1914
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(container),
|
|
1915
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(main-panel) {
|
|
1916
|
+
height: 100%;
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(options) {
|
|
1920
|
+
top: calc(100% + 1px);
|
|
1921
|
+
right: unset;
|
|
1922
|
+
width: max-content;
|
|
1923
|
+
min-width: 100%;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
1927
|
+
border-radius: calc(${Bo.borderRadius} - 1px) 0 0 calc(${Bo.borderRadius} - 1px);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
`,Fo=v`
|
|
1931
|
+
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
1932
|
+
margin-right: auto;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
1936
|
+
min-width: 250px;
|
|
1937
|
+
${ut(zo.optionsZIndex,"2")};
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
.ft-search-bar--floating-panel {
|
|
1941
|
+
flex-direction: column;
|
|
1942
|
+
gap: 16px;
|
|
1943
|
+
padding: 16px;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
.ft-search-bar--floating-panel-open .ft-search-bar--floating-panel {
|
|
1947
|
+
display: flex;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
.ft-search-bar--desktop .ft-search-bar--facets-actions {
|
|
1951
|
+
display: flex;
|
|
1952
|
+
align-items: center;
|
|
1953
|
+
justify-content: flex-end;
|
|
1954
|
+
gap: 8px;
|
|
1955
|
+
padding: 0 10px;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
.ft-search-bar--mobile .ft-search-bar--facets-actions {
|
|
1959
|
+
flex-shrink: 0;
|
|
1960
|
+
flex-grow: 0;
|
|
1961
|
+
display: flex;
|
|
1962
|
+
gap: 16px;
|
|
1963
|
+
align-items: center;
|
|
1964
|
+
justify-content: space-evenly;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
.ft-search-bar--mobile .ft-search-bar--facets-actions > * {
|
|
1968
|
+
flex-grow: 1;
|
|
1969
|
+
flex-basis: 0;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
.ft-search-bar--content-locale::part(clear-button) {
|
|
1973
|
+
display: none;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
.ft-search-bar--floating-panel .ft-search-bar--filters-container {
|
|
1977
|
+
display: block;
|
|
1978
|
+
height: 350px;
|
|
1979
|
+
--ft-snap-scroll-gap: 16px;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
.ft-search-bar--floating-panel ft-filter {
|
|
1983
|
+
display: flex;
|
|
1984
|
+
flex-grow: 0;
|
|
1985
|
+
max-height: 100%;
|
|
1986
|
+
max-width: 250px;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
.ft-search-bar--hierarchical-filter {
|
|
1990
|
+
width: 250px;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
.ft-search-bar--mobile .ft-search-bar--filters-container {
|
|
1994
|
+
flex-grow: 1;
|
|
1995
|
+
flex-shrink: 1;
|
|
1996
|
+
overflow-y: auto;
|
|
1997
|
+
margin: 0 -16px;
|
|
1998
|
+
padding: 0 16px;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
.ft-search-bar--mobile .ft-search-bar--filters-container ft-filter {
|
|
2002
|
+
display: flex;
|
|
2003
|
+
max-height: 60vh;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
.ft-search-bar--mobile ft-filter::part(container) {
|
|
2007
|
+
flex-grow: 1;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
.ft-search-bar--filter-label {
|
|
2011
|
+
display: flex;
|
|
2012
|
+
justify-content: space-between;
|
|
2013
|
+
align-items: baseline;
|
|
2014
|
+
gap: 8px;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
.ft-search-bar--filter-label > * {
|
|
2018
|
+
white-space: nowrap;
|
|
2019
|
+
overflow: hidden;
|
|
2020
|
+
text-overflow: ellipsis;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.ft-search-bar--filter-label > :first-child {
|
|
2024
|
+
flex-shrink: 0;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.ft-search-bar--filter-label > :last-child {
|
|
2028
|
+
flex-shrink: 1;
|
|
2029
|
+
color: ${Bo.colorOnSurfaceMedium};
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
ft-accordion-item::part(toggle) {
|
|
2033
|
+
margin-left: -16px;
|
|
2034
|
+
margin-right: -16px;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
ft-accordion-item::part(label) {
|
|
2038
|
+
overflow: hidden;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
ft-accordion-item::part(content) {
|
|
2042
|
+
padding-left: 0;
|
|
2043
|
+
padding-right: 0;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
.ft-search-bar--floating-panel .ft-search-bar--launch-search {
|
|
2047
|
+
margin: 0;
|
|
2048
|
+
}
|
|
2049
|
+
`,Ro=v`
|
|
2050
|
+
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2051
|
+
flex-shrink: 0;
|
|
2052
|
+
display: flex;
|
|
2053
|
+
flex-direction: row;
|
|
2054
|
+
flex-wrap: wrap;
|
|
2055
|
+
gap: 8px;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2059
|
+
overflow: hidden;
|
|
2060
|
+
${ut(Zi.gap,"4px")};
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
2064
|
+
align-items: center;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2068
|
+
${ut(bo.iconSize,"17px")};
|
|
2069
|
+
${ut(bo.fontSize,"12px")};
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
.ft-search-bar--selected-filters * {
|
|
2073
|
+
max-width: 100%;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
.ft-search-bar--selected-filters ft-chip {
|
|
2077
|
+
flex-grow: 0;
|
|
2078
|
+
}
|
|
2079
|
+
`,Mo=v`
|
|
2080
|
+
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2081
|
+
flex-grow: 1;
|
|
2082
|
+
flex-shrink: 1;
|
|
2083
|
+
overflow-y: auto;
|
|
2084
|
+
height: 0;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2088
|
+
border-top: 1px solid ${Bo.colorOutline};
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2092
|
+
height: initial;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
.ft-search-bar--floating-panel,
|
|
2096
|
+
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2097
|
+
position: absolute;
|
|
2098
|
+
z-index: var(--ft-search-bar-floating-components-z-index, 1);
|
|
2099
|
+
top: 100%;
|
|
2100
|
+
left: -1px;
|
|
2101
|
+
right: -1px;
|
|
2102
|
+
display: none;
|
|
2103
|
+
background: ${Bo.colorSurface};
|
|
2104
|
+
border: 1px solid ${Bo.colorOutline};
|
|
2105
|
+
border-radius: 0 0 ${Bo.borderRadius} ${Bo.borderRadius};
|
|
2106
|
+
box-shadow: ${Bo.elevation02};
|
|
2107
|
+
outline: none;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2111
|
+
top: calc(100% + 2px);
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
.ft-search-bar--input-container:focus-within .ft-search-bar--suggestions-not-empty {
|
|
2115
|
+
display: block;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
.ft-search-bar--no-suggestions {
|
|
2119
|
+
text-align: center;
|
|
2120
|
+
padding: 8px;
|
|
2121
|
+
color: ${Bo.colorOnSurface};
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
.ft-search-bar--suggestion {
|
|
2125
|
+
text-decoration: none;
|
|
2126
|
+
position: relative;
|
|
2127
|
+
display: flex;
|
|
2128
|
+
align-items: center;
|
|
2129
|
+
padding: 8px;
|
|
2130
|
+
gap: 8px;
|
|
2131
|
+
cursor: pointer;
|
|
2132
|
+
color: ${Bo.colorOnSurface};
|
|
2133
|
+
min-height: 52px;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
.ft-search-bar--desktop .ft-search-bar--suggestion {
|
|
2137
|
+
min-height: 44px;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
.ft-search-bar--suggestion:focus {
|
|
2141
|
+
outline: none;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2145
|
+
border-top: 1px solid ${Bo.colorOutline};
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
.ft-search-bar--suggestion ft-typography {
|
|
2149
|
+
display: block;
|
|
2150
|
+
flex-grow: 1;
|
|
2151
|
+
flex-shrink: 1;
|
|
2152
|
+
}
|
|
2153
|
+
`;var Lo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};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 Do={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class jo extends CustomEvent{constructor(t){super("launch-search",{detail:t})}}class Io extends CustomEvent{constructor(t){super("change",{detail:t})}}class Uo extends vt{constructor(){super(...arguments),this.dense=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new xt(Do,{}),this.displayedFilters=[],this.presets=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=jt.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new t(500),this.suggestDebouncer=new t(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){return this.sizeCategory===jt.S}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return K`
|
|
2154
|
+
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2155
|
+
<div class="${Dt(t)}" part="container" tabindex="-1">
|
|
2156
|
+
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2157
|
+
</div>
|
|
2158
|
+
`}renderMobileSearchBar(){return K`
|
|
2159
|
+
<div class="ft-search-bar">
|
|
2160
|
+
<div class="ft-search-bar--input-container" part="input-container">
|
|
2161
|
+
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
2162
|
+
<input class="ft-search-bar--input ft-typography--body2"
|
|
2163
|
+
part="input"
|
|
2164
|
+
type="text"
|
|
2165
|
+
placeholder="${this.labelResolver.resolve("inputPlaceHolder")}"
|
|
2166
|
+
value="${this.query}"
|
|
2167
|
+
@keyup=${this.onSearchBarKeyUp}
|
|
2168
|
+
@focus=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!1}}>
|
|
2169
|
+
</div>
|
|
2170
|
+
</div>
|
|
2171
|
+
${this.renderMobileSearchBarButtons()}
|
|
2172
|
+
</div>
|
|
2173
|
+
${this.displayFacets?this.renderFacetsActions():this.renderSelectedFacets()}
|
|
2174
|
+
${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}
|
|
2175
|
+
${this.mobileMenuOpen||this.displayFacets?K`
|
|
2176
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2177
|
+
part="search-bar-actions"
|
|
2178
|
+
icon="search"
|
|
2179
|
+
@click=${this.launchSearch}>
|
|
2180
|
+
${this.labelResolver.resolve("searchButton")}
|
|
2181
|
+
</ft-button>
|
|
2182
|
+
`:V}
|
|
2183
|
+
`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?K`
|
|
2184
|
+
<ft-button class="ft-search-bar--clear-query"
|
|
2185
|
+
part="search-bar-actions"
|
|
2186
|
+
icon="close"
|
|
2187
|
+
round
|
|
2188
|
+
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2189
|
+
@click=${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}
|
|
2190
|
+
></ft-button>
|
|
2191
|
+
`:K`
|
|
2192
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2193
|
+
part="search-bar-actions"
|
|
2194
|
+
icon="search"
|
|
2195
|
+
round
|
|
2196
|
+
label="${this.labelResolver.resolve("searchButton")}"
|
|
2197
|
+
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}
|
|
2198
|
+
></ft-button>
|
|
2199
|
+
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return K`
|
|
2200
|
+
<ft-accordion class="ft-search-bar--filters-container">
|
|
2201
|
+
${this.hasLocaleSelector?K`
|
|
2202
|
+
<ft-accordion-item data-facet-key="ft:contentLocale">
|
|
2203
|
+
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2204
|
+
<ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}
|
|
2205
|
+
</ft-typography>
|
|
2206
|
+
<ft-typography variant="body2">
|
|
2207
|
+
${null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""}
|
|
2208
|
+
</ft-typography>
|
|
2209
|
+
</div>
|
|
2210
|
+
<ft-filter
|
|
2211
|
+
part="filters"
|
|
2212
|
+
class="ft-search-bar--content-locale"
|
|
2213
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2214
|
+
.options=${this.contentLocalesAsFilterOptions()}
|
|
2215
|
+
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2216
|
+
></ft-filter>
|
|
2217
|
+
</ft-accordion-item>
|
|
2218
|
+
`:null}
|
|
2219
|
+
${Lt(this.facets,(t=>t.key),(t=>{const e=qe(t);return K`
|
|
2220
|
+
<ft-accordion-item data-facet-key="${t.key}">
|
|
2221
|
+
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2222
|
+
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2223
|
+
<ft-typography variant="body2">
|
|
2224
|
+
${function(t){return Ke(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2225
|
+
</ft-typography>
|
|
2226
|
+
</div>
|
|
2227
|
+
<ft-filter
|
|
2228
|
+
part="filters"
|
|
2229
|
+
id="${e.id}"
|
|
2230
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2231
|
+
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2232
|
+
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2233
|
+
?multivalued=${e.multivalued}
|
|
2234
|
+
raiseSelectedOptions
|
|
2235
|
+
.options=${e.options}
|
|
2236
|
+
.displayedValuesLimit=${10}
|
|
2237
|
+
@change=${t=>this.setFilter(e.id,t.detail)}
|
|
2238
|
+
></ft-filter>
|
|
2239
|
+
</ft-accordion-item>
|
|
2240
|
+
`}))}
|
|
2241
|
+
</ft-accordion>
|
|
2242
|
+
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return K`
|
|
2243
|
+
<div class="ft-search-bar" part="search-bar">
|
|
2244
|
+
${this.renderSearchBarLeftAction()}
|
|
2245
|
+
<div class="ft-search-bar--input-container" part="input-container">
|
|
2246
|
+
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
2247
|
+
${this.dense?this.renderSelectedFacets():V}
|
|
2248
|
+
<input class="ft-search-bar--input ft-typography--body2"
|
|
2249
|
+
part="input"
|
|
2250
|
+
type="text"
|
|
2251
|
+
placeholder="${this.labelResolver.resolve("inputPlaceHolder")}"
|
|
2252
|
+
value="${this.query}"
|
|
2253
|
+
@keydown=${this.onSearchBarKeyDown}
|
|
2254
|
+
@keyup=${this.onSearchBarKeyUp}>
|
|
2255
|
+
</div>
|
|
2256
|
+
${this.renderSuggestions()}
|
|
2257
|
+
</div>
|
|
2258
|
+
${this.renderDesktopSearchBarButtons()}
|
|
2259
|
+
<div class="ft-search-bar--floating-panel" @keyup=${this.onFloatingContainerKeyUp} tabindex="-1">
|
|
2260
|
+
${this.renderFacetsActions()}
|
|
2261
|
+
${this.renderDesktopFacets()}
|
|
2262
|
+
<div class="ft-search-bar--facets-actions">
|
|
2263
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2264
|
+
part="search-bar-actions"
|
|
2265
|
+
icon="search"
|
|
2266
|
+
@click=${this.launchSearch}>
|
|
2267
|
+
${this.labelResolver.resolve("searchButton")}
|
|
2268
|
+
</ft-button>
|
|
2269
|
+
</div>
|
|
2270
|
+
</div>
|
|
2271
|
+
</div>
|
|
2272
|
+
${this.dense?V:this.renderSelectedFacets()}
|
|
2273
|
+
`}renderSearchBarLeftAction(){return this.hasFacets?K`
|
|
2274
|
+
<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action"
|
|
2275
|
+
part="filters-opener"
|
|
2276
|
+
trailingIcon
|
|
2277
|
+
icon="${this.displayFacets?"expand_less":"expand_more"}"
|
|
2278
|
+
@click=${t=>{t.stopPropagation(),this.displayFacets=!this.displayFacets}}
|
|
2279
|
+
@focusin=${t=>t.stopPropagation()}>
|
|
2280
|
+
${this.labelResolver.resolve("filtersButton")}
|
|
2281
|
+
</ft-button>
|
|
2282
|
+
`:this.hasLocaleSelector?K`
|
|
2283
|
+
<ft-select outlined
|
|
2284
|
+
class="ft-search-bar--content-locale ft-search-bar--left-action"
|
|
2285
|
+
part="content-locale"
|
|
2286
|
+
@change=${t=>this.contentLocale=null==t.detail?void 0:t.detail}>
|
|
2287
|
+
${Lt(this.availableContentLocales,(t=>t.lang),(t=>K`
|
|
2288
|
+
<ft-select-option .value=${t.lang}
|
|
2289
|
+
label="${t.label}"
|
|
2290
|
+
?selected=${t.lang===this.contentLocale}>
|
|
2291
|
+
</ft-select-option>
|
|
2292
|
+
`))}
|
|
2293
|
+
</ft-select>
|
|
2294
|
+
`:V}renderDesktopSearchBarButtons(){return K`
|
|
2295
|
+
${this.query?K`
|
|
2296
|
+
<ft-button class="ft-search-bar--clear-query"
|
|
2297
|
+
part="search-bar-actions"
|
|
2298
|
+
icon="close"
|
|
2299
|
+
round dense
|
|
2300
|
+
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2301
|
+
@click=${()=>this.setQuery("")}
|
|
2302
|
+
></ft-button>
|
|
2303
|
+
<div class="ft-search-bar--separator"></div>
|
|
2304
|
+
`:null}
|
|
2305
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2306
|
+
part="search-bar-actions"
|
|
2307
|
+
icon="search"
|
|
2308
|
+
round dense
|
|
2309
|
+
label="${this.labelResolver.resolve("searchButton")}"
|
|
2310
|
+
@click=${this.launchSearch}
|
|
2311
|
+
></ft-button>
|
|
2312
|
+
`}renderFacetsActions(){return K`
|
|
2313
|
+
<div class="ft-search-bar--facets-actions">
|
|
2314
|
+
${this.hasPresets?K`
|
|
2315
|
+
<ft-select
|
|
2316
|
+
class="ft-search-bar--presets"
|
|
2317
|
+
part="presets"
|
|
2318
|
+
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2319
|
+
outlined
|
|
2320
|
+
@change=${t=>this.selectedPreset=t.detail}>
|
|
2321
|
+
${Lt(this.presets,(t=>t.name),(t=>K`
|
|
2322
|
+
<ft-select-option value="${t.name}"
|
|
2323
|
+
label="${t.name}"
|
|
2324
|
+
?selected=${t.name===this.selectedPreset}>
|
|
2325
|
+
</ft-select-option>
|
|
2326
|
+
`))}
|
|
2327
|
+
</ft-select>
|
|
2328
|
+
`:V}
|
|
2329
|
+
${this.searchFilters.length>0?K`
|
|
2330
|
+
<ft-button part="facets-actions"
|
|
2331
|
+
@click=${this.clearFilters}>
|
|
2332
|
+
${this.labelResolver.resolve("clearFilters")}
|
|
2333
|
+
</ft-button>
|
|
2334
|
+
`:V}
|
|
2335
|
+
<slot name="facets-actions"></slot>
|
|
2336
|
+
</div>
|
|
2337
|
+
`}renderDesktopFacets(){return this.hasFacets?K`
|
|
2338
|
+
<ft-snap-scroll horizontal limitSize controls
|
|
2339
|
+
class="ft-search-bar--filters-container"
|
|
2340
|
+
part="filters-container">
|
|
2341
|
+
${this.hasLocaleSelector?K`
|
|
2342
|
+
<ft-filter part="filters"
|
|
2343
|
+
class="ft-search-bar--content-locale"
|
|
2344
|
+
label="${this.labelResolver.resolve("contentLocaleSelector")}"
|
|
2345
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2346
|
+
.options=${this.contentLocalesAsFilterOptions()}
|
|
2347
|
+
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2348
|
+
></ft-filter>
|
|
2349
|
+
`:V}
|
|
2350
|
+
${Lt(this.facets,(t=>t.key),(t=>{const e=qe(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return K`
|
|
2351
|
+
<ft-filter
|
|
2352
|
+
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2353
|
+
part="filters"
|
|
2354
|
+
id="${e.id}"
|
|
2355
|
+
label="${e.label}"
|
|
2356
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2357
|
+
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2358
|
+
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2359
|
+
?multivalued=${e.multivalued}
|
|
2360
|
+
raiseSelectedOptions
|
|
2361
|
+
.options=${e.options}
|
|
2362
|
+
.displayedValuesLimit=${10}
|
|
2363
|
+
@change=${t=>this.setFilter(e.id,t.detail)}
|
|
2364
|
+
></ft-filter>
|
|
2365
|
+
`}))}
|
|
2366
|
+
</ft-snap-scroll>
|
|
2367
|
+
`:V}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.mobileMenuOpen,e=K`
|
|
2368
|
+
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?K`
|
|
2369
|
+
<ft-chip part="selected-filters"
|
|
2370
|
+
?dense=${this.dense&&!this.isMobile}
|
|
2371
|
+
?clickable=${this.isMobile}
|
|
2372
|
+
@click=${()=>this.openMobileFilters("ft:contentLocale")}>
|
|
2373
|
+
${this.getLocaleLabel(this.contentLocale)}
|
|
2374
|
+
</ft-chip>
|
|
2375
|
+
`:null}
|
|
2376
|
+
${Lt(this.facets,(t=>t.key),(e=>{const i=function(t){return Ke(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return Lt(i,(o=>{let s=e.label+": "+function(t){return We(t).split("|").join(" > ")}(o);const n=K`
|
|
2377
|
+
<ft-chip
|
|
2378
|
+
part="selected-filters"
|
|
2379
|
+
?dense=${this.dense&&!this.isMobile}
|
|
2380
|
+
?clickable=${this.isMobile}
|
|
2381
|
+
?removable=${!this.isMobile}
|
|
2382
|
+
icon=${this.isMobile?V:"close"}
|
|
2383
|
+
label="${s}"
|
|
2384
|
+
title=${t?s:V}
|
|
2385
|
+
@click=${()=>this.openMobileFilters(e.key)}
|
|
2386
|
+
@icon-click=${()=>this.setFilter(e.key,i.filter((t=>t!==o)))}>
|
|
2387
|
+
${function(t){return We(t).split("|").pop()}(o)}
|
|
2388
|
+
</ft-chip>
|
|
2389
|
+
`;return t?n:K`
|
|
2390
|
+
<ft-tooltip inline text="${s}">
|
|
2391
|
+
${n}
|
|
2392
|
+
</ft-tooltip>
|
|
2393
|
+
`}))}))}
|
|
2394
|
+
${this.isMobile?K`
|
|
2395
|
+
<ft-chip part="selected-filters"
|
|
2396
|
+
icon="add"
|
|
2397
|
+
clickable
|
|
2398
|
+
@click=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!0}}>
|
|
2399
|
+
${this.labelResolver.resolve("filtersButton")}
|
|
2400
|
+
</ft-chip>
|
|
2401
|
+
`:V}
|
|
2402
|
+
`;return t?K`
|
|
2403
|
+
<ft-snap-scroll horizontal controls hideScrollbar limitSize
|
|
2404
|
+
class="ft-search-bar--selected-filters"
|
|
2405
|
+
part="selected-filters-container">
|
|
2406
|
+
${e}
|
|
2407
|
+
</ft-snap-scroll>
|
|
2408
|
+
`:K`
|
|
2409
|
+
<div class="ft-search-bar--selected-filters" part="selected-filters-container">
|
|
2410
|
+
${e}
|
|
2411
|
+
</div>
|
|
2412
|
+
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return K`
|
|
2413
|
+
<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2414
|
+
@keydown=${this.onSuggestKeyDown}>
|
|
2415
|
+
${Lt(t.slice(0,5),(t=>t),(t=>K`
|
|
2416
|
+
<a href="${this.searchRequestSerializer({...this.request,query:t})}"
|
|
2417
|
+
part="suggestions"
|
|
2418
|
+
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
2419
|
+
@keyup=${e=>this.onSuggestKeyUp(e,t)}
|
|
2420
|
+
@click=${e=>this.onSuggestClick(e,t)}>
|
|
2421
|
+
<ft-ripple></ft-ripple>
|
|
2422
|
+
<ft-icon variant="material" part="suggestion-icon">history</ft-icon>
|
|
2423
|
+
<ft-typography variant="body1">${t}</ft-typography>
|
|
2424
|
+
<ft-button icon="close"
|
|
2425
|
+
round
|
|
2426
|
+
part="remove-suggestion"
|
|
2427
|
+
?dense=${!this.isMobile}
|
|
2428
|
+
label="${this.labelResolver.resolve("removeRecentSearch")}"
|
|
2429
|
+
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2430
|
+
</a>
|
|
2431
|
+
`))}
|
|
2432
|
+
${Lt(this.suggestions,(t=>t.value),(t=>K`
|
|
2433
|
+
<a href="${this.searchRequestSerializer({...this.request,query:t.value})}"
|
|
2434
|
+
part="suggestions"
|
|
2435
|
+
class="ft-search-bar--suggestion"
|
|
2436
|
+
@keyup=${e=>this.onSuggestKeyUp(e,t.value)}
|
|
2437
|
+
@click=${e=>this.onSuggestClick(e,t.value)}>
|
|
2438
|
+
<ft-ripple></ft-ripple>
|
|
2439
|
+
${this.getIcon(t)}
|
|
2440
|
+
<ft-typography variant="body1">${t.value}</ft-typography>
|
|
2441
|
+
</a>
|
|
2442
|
+
`))}
|
|
2443
|
+
${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?K`
|
|
2444
|
+
<ft-typography class="ft-search-bar--no-suggestions" element="p"
|
|
2445
|
+
variant="body2">
|
|
2446
|
+
${this.labelResolver.resolve("noSuggestions")}
|
|
2447
|
+
</ft-typography>
|
|
2448
|
+
`:null}
|
|
2449
|
+
</div>
|
|
2450
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?fi.file_format:fi.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?ci.BOOK:ci.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[r,l]=((null!==(i=di.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=pi.get(l))&&void 0!==o?o:pi.get(e))&&void 0!==s?s:pi.get(r))&&void 0!==n?n:hi.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=ci.TOPICS}return K`
|
|
2451
|
+
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2452
|
+
${i}
|
|
2453
|
+
</ft-icon>
|
|
2454
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,o;if(t.has("labels")&&(this.labelResolver=new xt(Do,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("selectedPreset")){const t=this.presets.find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(o=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===o?void 0:o.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Io(this.request))}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new jo(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Ke(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=>Ke(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}}Uo.elementDefinitions={"ft-accordion":ro,"ft-accordion-item":po,"ft-button":ki,"ft-chip":$o,"ft-filter":io,"ft-filter-option":so,"ft-icon":vi,"ft-ripple":Ye,"ft-select":Eo,"ft-select-option":Co,"ft-size-watcher":Tt,"ft-snap-scroll":Wi,"ft-tooltip":si,"ft-typography":Ze},Uo.styles=[Te,No,Fo,Ro,Mo],Lo([i({type:Boolean})],Uo.prototype,"dense",void 0),Lo([i({type:String})],Uo.prototype,"baseUrl",void 0),Lo([i({type:String})],Uo.prototype,"apiIntegrationIdentifier",void 0),Lo([i({type:String})],Uo.prototype,"contentLocale",void 0),Lo([o()],Uo.prototype,"availableContentLocales",void 0),Lo([i({type:String})],Uo.prototype,"uiLocale",void 0),Lo([h({})],Uo.prototype,"labels",void 0),Lo([h([])],Uo.prototype,"displayedFilters",void 0),Lo([h([])],Uo.prototype,"presets",void 0),Lo([i({type:String,reflect:!0})],Uo.prototype,"selectedPreset",void 0),Lo([i()],Uo.prototype,"searchRequestSerializer",void 0),Lo([o()],Uo.prototype,"searchFilters",void 0),Lo([o()],Uo.prototype,"sizeCategory",void 0),Lo([o()],Uo.prototype,"displayFacets",void 0),Lo([o()],Uo.prototype,"mobileMenuOpen",void 0),Lo([o()],Uo.prototype,"facets",void 0),Lo([n(".ft-search-bar--container")],Uo.prototype,"container",void 0),Lo([n(".ft-search-bar--filters-opener")],Uo.prototype,"filtersOpener",void 0),Lo([n(".ft-search-bar--floating-panel")],Uo.prototype,"floatingContainer",void 0),Lo([n("ft-snap-scroll.ft-search-bar--filters-container")],Uo.prototype,"scrollingFiltersContainer",void 0),Lo([n(".ft-search-bar--input")],Uo.prototype,"input",void 0),Lo([o()],Uo.prototype,"query",void 0),Lo([o()],Uo.prototype,"suggestions",void 0),Lo([o()],Uo.prototype,"suggestionsLoaded",void 0),Lo([o()],Uo.prototype,"recentSearches",void 0),Lo([o()],Uo.prototype,"scrollToFacet",void 0),Lo([n(".ft-search-bar--suggestion:first-child")],Uo.prototype,"firstSuggestion",void 0),Lo([n(".ft-search-bar--suggestion:focus-within")],Uo.prototype,"focusedSuggestion",void 0),Lo([n(".ft-search-bar--suggestion:last-child")],Uo.prototype,"lastSuggestion",void 0),Lo([o()],Uo.prototype,"api",void 0),c("ft-search-bar")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{constructor(...t){super(t),this._constructor=this.constructor}render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),K`
|
|
2455
|
+
${i.map((t=>K`
|
|
2456
|
+
<style>${t}</style>
|
|
2457
|
+
`))}
|
|
2458
|
+
${super.render()}
|
|
2459
|
+
`}},i.styles=void 0,i.elementDefinitions=o,i}(Uo))}();
|