@fluid-topics/ft-select 1.1.0 → 1.1.2
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-select.min.js +176 -172
- package/package.json +7 -7
package/build/ft-select.min.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);h(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let p=o.call(i,t);p||(p=f(t),e.call(i,t,p)),this===window.customElements&&(a.set(r,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),y(t,c,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){u.push(this),i.upgrade.apply(i,arguments),u.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!c(e)){const t=u[u.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=p(o)||window.customElements,r=i._getDefinition(e);return r?y(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},d=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):d(o)},y=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},g=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=g.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let u=[document];const b=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){u.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),u.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){u.push(this),o.set.call(this,t),u.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);h(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let p=o.call(i,t);p||(p=f(t),e.call(i,t,p)),this===window.customElements&&(a.set(r,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),y(t,c,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){u.push(this),i.upgrade.apply(i,arguments),u.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!c(e)){const t=u[u.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=p(o)||window.customElements,r=i._getDefinition(e);return r?y(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},d=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):d(o)},y=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},g=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=g.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let u=[document];const b=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){u.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),u.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){u.push(this),o.set.call(this,t),u.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(Ki){const t=window.customElements.define;window.customElements.define=(e,o,i)=>{if(null!==o)try{t.bind(window.customElements)(e,o,i)}catch(t){console.info(e,o,i,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const o=[...this.callbacks];this.callbacks=[];const i=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of o)try{await t()}catch(t){return void i(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
@@ -77,7 +77,11 @@ let xe=class extends Ft{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2019 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/class Ie extends xe{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{Ue?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=Re.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var ke,We=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Le=Symbol("constructorPrototype"),Ke=Symbol("constructorName"),ze=Symbol("exportpartsDebouncer");class Ze extends Ie{constructor(){super(),this[ke]=new e(5),this[Ke]=this.constructor.name,this[Le]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ke]&&Object.setPrototypeOf(this,this[Le])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,o;if((null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==o?o:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[ze].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,o,i,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==o?o:[]){const e=null!==(r=null===(i=t.getAttribute("part"))||void 0===i?void 0:i.split(" "))&&void 0!==r?r:[],o=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...o).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const p=[...c.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}
|
|
80
|
+
*/class Ie extends xe{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{Ue?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=Re.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var ke,We=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Le=Symbol("constructorPrototype"),Ke=Symbol("constructorName"),ze=Symbol("exportpartsDebouncer");class Ze extends Ie{constructor(){super(),this[ke]=new e(5),this[Ke]=this.constructor.name,this[Le]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ke]&&Object.setPrototypeOf(this,this[Le])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,o;if((null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==o?o:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[ze].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,o,i,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==o?o:[]){const e=null!==(r=null===(i=t.getAttribute("part"))||void 0===i?void 0:i.split(" "))&&void 0!==r?r:[],o=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...o).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const p=[...c.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}ke=ze,We([C()],Ze.prototype,"exportpartsPrefix",void 0),We([function(t,e){const o=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!U(t,e),...null!=e?e:{}})}([])],Ze.prototype,"exportpartsPrefixes",void 0),We([C()],Ze.prototype,"customStylesheet",void 0);const Fe=Ne.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");var De,Me;vt`
|
|
81
|
+
.highlight-html-match {
|
|
82
|
+
background: ${Fe};
|
|
83
|
+
}
|
|
84
|
+
`,vt`
|
|
81
85
|
.ft-no-text-select {
|
|
82
86
|
-webkit-touch-callout: none;
|
|
83
87
|
-webkit-user-select: none;
|
|
@@ -109,118 +113,118 @@ let xe=class extends Ft{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
109
113
|
display: inline-block;
|
|
110
114
|
width: 0;
|
|
111
115
|
}
|
|
112
|
-
`,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(
|
|
116
|
+
`,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Me=null===(De=window.safari)||void 0===De?void 0:De.pushNotification)||void 0===Me||Me.toString());
|
|
113
117
|
/**
|
|
114
118
|
* @license
|
|
115
119
|
* Copyright 2017 Google LLC
|
|
116
120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
117
121
|
*/
|
|
118
|
-
const
|
|
122
|
+
const Ae=1,Be=2,Pe=t=>(...e)=>({_$litDirective$:t,values:e});let He=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
119
123
|
/**
|
|
120
124
|
* @license
|
|
121
125
|
* Copyright 2018 Google LLC
|
|
122
126
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
123
|
-
*/const
|
|
127
|
+
*/const je=Pe(class extends He{constructor(t){if(super(t),t.type!==Ae||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return X}}),{D:_e}=dt,Te=()=>document.createComment(""),Ge=(t,e,o)=>{const i=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===o){const e=i.insertBefore(Te(),r),n=i.insertBefore(Te(),r);o=new _e(e,n,t,t.options)}else{const e=o._$AB.nextSibling,n=o._$AM,a=n!==t;if(a){let e;o._$AQ?.(t),o._$AM=t,void 0!==o._$AP&&(e=t._$AU)!==n._$AU&&o._$AP(e)}if(e!==r||a){let t=o._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,r),t=e}}}return o},Ye=(t,e,o=t)=>(t._$AI(e,o),t),Ve={},Je=t=>{t._$AP?.(!1,!0);let e=t._$AA;const o=t._$AB.nextSibling;for(;e!==o;){const t=e.nextSibling;e.remove(),e=t}},qe=(t,e,o)=>{const i=new Map;for(let r=e;r<=o;r++)i.set(t[r],r);return i},Xe=Pe(class extends He{constructor(t){if(super(t),t.type!==Be)throw Error("repeat() can only be used in text expressions")}ht(t,e,o){let i;void 0===o?o=e:void 0!==e&&(i=e);const r=[],n=[];let a=0;for(const e of t)r[a]=i?i(e,a):a,n[a]=o(e,a),a++;return{values:n,keys:r}}render(t,e,o){return this.ht(t,e,o).values}update(t,[e,o,i]){const r=(t=>t._$AH)(t),{values:n,keys:a}=this.ht(e,o,i);if(!Array.isArray(r))return this.dt=a,n;const s=this.dt??=[],l=[];let c,p,f=0,h=r.length-1,d=0,y=n.length-1;for(;f<=h&&d<=y;)if(null===r[f])f++;else if(null===r[h])h--;else if(s[f]===a[d])l[d]=Ye(r[f],n[d]),f++,d++;else if(s[h]===a[y])l[y]=Ye(r[h],n[y]),h--,y--;else if(s[f]===a[y])l[y]=Ye(r[f],n[y]),Ge(t,l[y+1],r[f]),f++,y--;else if(s[h]===a[d])l[d]=Ye(r[h],n[d]),Ge(t,r[f],r[h]),h--,d++;else if(void 0===c&&(c=qe(a,d,y),p=qe(s,f,h)),c.has(s[f]))if(c.has(s[h])){const e=p.get(a[d]),o=void 0!==e?r[e]:null;if(null===o){const e=Ge(t,r[f]);Ye(e,n[d]),l[d]=e}else l[d]=Ye(o,n[d]),Ge(t,r[f],o),r[e]=null;d++}else Je(r[h]),h--;else Je(r[f]),f++;for(;d<=y;){const e=Ge(t,l[y+1]);Ye(e,n[d]),l[d++]=e}for(;f<=h;){const t=r[f++];null!==t&&Je(t)}return this.dt=a,((t,e=Ve)=>{t._$AH=e})(t,l),X}}),Qe=Symbol.for(""),to=t=>{if(t?.r===Qe)return t?._$litStatic$},eo=t=>({_$litStatic$:t,r:Qe}),oo=new Map,io=(t=>(e,...o)=>{const i=o.length;let r,n;const a=[],s=[];let l,c=0,p=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(n=o[c],r=to(n));)l+=r+e[++c],p=!0;c!==i&&s.push(n),a.push(l),c++}if(c===i&&a.push(e[i]),p){const t=a.join("$$lit$$");void 0===(e=oo.get(t))&&(a.raw=a,oo.set(t,e=a)),o=s}return t(e,...o)})(q);
|
|
124
128
|
/**
|
|
125
129
|
* @license
|
|
126
130
|
* Copyright 2020 Google LLC
|
|
127
131
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
128
|
-
*/var
|
|
132
|
+
*/var ro;!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",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(ro||(ro={}));const no=Ne.extend("--ft-typography-font-family","",Ee.titleFont),ao=Ne.extend("--ft-typography-font-family","",Ee.contentFont),so={fontFamily:ao,fontSize:Ne.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:Ne.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:Ne.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:Ne.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:Ne.create("--ft-typography-text-transform","","UNKNOWN","inherit")},lo=Ne.extend("--ft-typography-title-font-family","",no),co=Ne.extend("--ft-typography-title-font-size","",so.fontSize,"20px"),po=Ne.extend("--ft-typography-title-font-weight","",so.fontWeight,"normal"),fo=Ne.extend("--ft-typography-title-letter-spacing","",so.letterSpacing,"0.15px"),ho=Ne.extend("--ft-typography-title-line-height","",so.lineHeight,"1.2"),yo=Ne.extend("--ft-typography-title-text-transform","",so.textTransform,"inherit"),go=Ne.extend("--ft-typography-title-dense-font-family","",no),uo=Ne.extend("--ft-typography-title-dense-font-size","",so.fontSize,"14px"),bo=Ne.extend("--ft-typography-title-dense-font-weight","",so.fontWeight,"normal"),mo=Ne.extend("--ft-typography-title-dense-letter-spacing","",so.letterSpacing,"0.105px"),xo=Ne.extend("--ft-typography-title-dense-line-height","",so.lineHeight,"1.7"),Oo=Ne.extend("--ft-typography-title-dense-text-transform","",so.textTransform,"inherit"),vo=Ne.extend("--ft-typography-subtitle1-font-family","",ao),No=Ne.extend("--ft-typography-subtitle1-font-size","",so.fontSize,"16px"),So=Ne.extend("--ft-typography-subtitle1-font-weight","",so.fontWeight,"600"),wo=Ne.extend("--ft-typography-subtitle1-letter-spacing","",so.letterSpacing,"0.144px"),Co=Ne.extend("--ft-typography-subtitle1-line-height","",so.lineHeight,"1.5"),$o=Ne.extend("--ft-typography-subtitle1-text-transform","",so.textTransform,"inherit"),Eo=Ne.extend("--ft-typography-subtitle2-font-family","",ao),Ro=Ne.extend("--ft-typography-subtitle2-font-size","",so.fontSize,"14px"),Uo=Ne.extend("--ft-typography-subtitle2-font-weight","",so.fontWeight,"normal"),Io=Ne.extend("--ft-typography-subtitle2-letter-spacing","",so.letterSpacing,"0.098px"),ko=Ne.extend("--ft-typography-subtitle2-line-height","",so.lineHeight,"1.7"),Wo=Ne.extend("--ft-typography-subtitle2-text-transform","",so.textTransform,"inherit"),Lo={fontFamily:Ne.extend("--ft-typography-body1-font-family","",ao),fontSize:Ne.extend("--ft-typography-body1-font-size","",so.fontSize,"16px"),fontWeight:Ne.extend("--ft-typography-body1-font-weight","",so.fontWeight,"normal"),letterSpacing:Ne.extend("--ft-typography-body1-letter-spacing","",so.letterSpacing,"0.496px"),lineHeight:Ne.extend("--ft-typography-body1-line-height","",so.lineHeight,"1.5"),textTransform:Ne.extend("--ft-typography-body1-text-transform","",so.textTransform,"inherit")},Ko=Ne.extend("--ft-typography-body2-font-family","",ao),zo=Ne.extend("--ft-typography-body2-font-size","",so.fontSize,"14px"),Zo=Ne.extend("--ft-typography-body2-font-weight","",so.fontWeight,"normal"),Fo=Ne.extend("--ft-typography-body2-letter-spacing","",so.letterSpacing,"0.252px"),Do=Ne.extend("--ft-typography-body2-line-height","",so.lineHeight,"1.4"),Mo=Ne.extend("--ft-typography-body2-text-transform","",so.textTransform,"inherit"),Ao={fontFamily:Ne.extend("--ft-typography-caption-font-family","",ao),fontSize:Ne.extend("--ft-typography-caption-font-size","",so.fontSize,"12px"),fontWeight:Ne.extend("--ft-typography-caption-font-weight","",so.fontWeight,"normal"),letterSpacing:Ne.extend("--ft-typography-caption-letter-spacing","",so.letterSpacing,"0.396px"),lineHeight:Ne.extend("--ft-typography-caption-line-height","",so.lineHeight,"1.33"),textTransform:Ne.extend("--ft-typography-caption-text-transform","",so.textTransform,"inherit")},Bo=Ne.extend("--ft-typography-breadcrumb-font-family","",ao),Po=Ne.extend("--ft-typography-breadcrumb-font-size","",so.fontSize,"10px"),Ho=Ne.extend("--ft-typography-breadcrumb-font-weight","",so.fontWeight,"normal"),jo=Ne.extend("--ft-typography-breadcrumb-letter-spacing","",so.letterSpacing,"0.33px"),_o=Ne.extend("--ft-typography-breadcrumb-line-height","",so.lineHeight,"1.6"),To=Ne.extend("--ft-typography-breadcrumb-text-transform","",so.textTransform,"inherit"),Go=Ne.extend("--ft-typography-overline-font-family","",ao),Yo=Ne.extend("--ft-typography-overline-font-size","",so.fontSize,"10px"),Vo=Ne.extend("--ft-typography-overline-font-weight","",so.fontWeight,"normal"),Jo=Ne.extend("--ft-typography-overline-letter-spacing","",so.letterSpacing,"1.5px"),qo=Ne.extend("--ft-typography-overline-line-height","",so.lineHeight,"1.6"),Xo=Ne.extend("--ft-typography-overline-text-transform","",so.textTransform,"uppercase"),Qo=Ne.extend("--ft-typography-button-font-family","",ao),ti=Ne.extend("--ft-typography-button-font-size","",so.fontSize,"14px"),ei=Ne.extend("--ft-typography-button-font-weight","",so.fontWeight,"600"),oi=Ne.extend("--ft-typography-button-letter-spacing","",so.letterSpacing,"1.246px"),ii=Ne.extend("--ft-typography-button-line-height","",so.lineHeight,"1.15"),ri=Ne.extend("--ft-typography-button-text-transform","",so.textTransform,"uppercase"),ni=vt`
|
|
129
133
|
.ft-typography--title {
|
|
130
|
-
font-family: ${
|
|
131
|
-
font-size: ${
|
|
132
|
-
font-weight: ${
|
|
133
|
-
letter-spacing: ${
|
|
134
|
-
line-height: ${
|
|
135
|
-
text-transform: ${
|
|
136
|
-
}
|
|
137
|
-
`,ni=vt`
|
|
138
|
-
.ft-typography--title-dense {
|
|
139
|
-
font-family: ${yo};
|
|
140
|
-
font-size: ${go};
|
|
141
|
-
font-weight: ${uo};
|
|
142
|
-
letter-spacing: ${bo};
|
|
143
|
-
line-height: ${mo};
|
|
144
|
-
text-transform: ${xo};
|
|
134
|
+
font-family: ${lo};
|
|
135
|
+
font-size: ${co};
|
|
136
|
+
font-weight: ${po};
|
|
137
|
+
letter-spacing: ${fo};
|
|
138
|
+
line-height: ${ho};
|
|
139
|
+
text-transform: ${yo};
|
|
145
140
|
}
|
|
146
141
|
`,ai=vt`
|
|
147
|
-
.ft-typography--
|
|
148
|
-
font-family: ${
|
|
149
|
-
font-size: ${
|
|
150
|
-
font-weight: ${
|
|
151
|
-
letter-spacing: ${
|
|
152
|
-
line-height: ${
|
|
153
|
-
text-transform: ${
|
|
142
|
+
.ft-typography--title-dense {
|
|
143
|
+
font-family: ${go};
|
|
144
|
+
font-size: ${uo};
|
|
145
|
+
font-weight: ${bo};
|
|
146
|
+
letter-spacing: ${mo};
|
|
147
|
+
line-height: ${xo};
|
|
148
|
+
text-transform: ${Oo};
|
|
154
149
|
}
|
|
155
150
|
`,si=vt`
|
|
156
|
-
.ft-typography--
|
|
157
|
-
font-family: ${
|
|
158
|
-
font-size: ${
|
|
159
|
-
font-weight: ${
|
|
160
|
-
letter-spacing: ${
|
|
161
|
-
line-height: ${
|
|
162
|
-
text-transform: ${
|
|
151
|
+
.ft-typography--subtitle1 {
|
|
152
|
+
font-family: ${vo};
|
|
153
|
+
font-size: ${No};
|
|
154
|
+
font-weight: ${So};
|
|
155
|
+
letter-spacing: ${wo};
|
|
156
|
+
line-height: ${Co};
|
|
157
|
+
text-transform: ${$o};
|
|
163
158
|
}
|
|
164
|
-
|
|
165
159
|
`,li=vt`
|
|
166
|
-
.ft-typography--
|
|
167
|
-
font-family: ${
|
|
168
|
-
font-size: ${
|
|
169
|
-
font-weight: ${
|
|
170
|
-
letter-spacing: ${
|
|
171
|
-
line-height: ${
|
|
172
|
-
text-transform: ${Wo
|
|
160
|
+
.ft-typography--subtitle2 {
|
|
161
|
+
font-family: ${Eo};
|
|
162
|
+
font-size: ${Ro};
|
|
163
|
+
font-weight: ${Uo};
|
|
164
|
+
letter-spacing: ${Io};
|
|
165
|
+
line-height: ${ko};
|
|
166
|
+
text-transform: ${Wo};
|
|
173
167
|
}
|
|
168
|
+
|
|
174
169
|
`,ci=vt`
|
|
175
|
-
.ft-typography--
|
|
176
|
-
font-family: ${Lo};
|
|
177
|
-
font-size: ${
|
|
178
|
-
font-weight: ${
|
|
179
|
-
letter-spacing: ${
|
|
180
|
-
line-height: ${
|
|
181
|
-
text-transform: ${
|
|
170
|
+
.ft-typography--body1 {
|
|
171
|
+
font-family: ${Lo.fontFamily};
|
|
172
|
+
font-size: ${Lo.fontSize};
|
|
173
|
+
font-weight: ${Lo.fontWeight};
|
|
174
|
+
letter-spacing: ${Lo.letterSpacing};
|
|
175
|
+
line-height: ${Lo.lineHeight};
|
|
176
|
+
text-transform: ${Lo.textTransform};
|
|
182
177
|
}
|
|
183
178
|
`,pi=vt`
|
|
184
|
-
.ft-typography--
|
|
185
|
-
font-family: ${
|
|
186
|
-
font-size: ${
|
|
187
|
-
font-weight: ${
|
|
188
|
-
letter-spacing: ${
|
|
189
|
-
line-height: ${
|
|
190
|
-
text-transform: ${Mo
|
|
179
|
+
.ft-typography--body2 {
|
|
180
|
+
font-family: ${Ko};
|
|
181
|
+
font-size: ${zo};
|
|
182
|
+
font-weight: ${Zo};
|
|
183
|
+
letter-spacing: ${Fo};
|
|
184
|
+
line-height: ${Do};
|
|
185
|
+
text-transform: ${Mo};
|
|
191
186
|
}
|
|
192
187
|
`,fi=vt`
|
|
193
|
-
.ft-typography--
|
|
194
|
-
font-family: ${Ao};
|
|
195
|
-
font-size: ${
|
|
196
|
-
font-weight: ${
|
|
197
|
-
letter-spacing: ${
|
|
198
|
-
line-height: ${
|
|
199
|
-
text-transform: ${
|
|
188
|
+
.ft-typography--caption {
|
|
189
|
+
font-family: ${Ao.fontFamily};
|
|
190
|
+
font-size: ${Ao.fontSize};
|
|
191
|
+
font-weight: ${Ao.fontWeight};
|
|
192
|
+
letter-spacing: ${Ao.letterSpacing};
|
|
193
|
+
line-height: ${Ao.lineHeight};
|
|
194
|
+
text-transform: ${Ao.textTransform};
|
|
200
195
|
}
|
|
201
196
|
`,hi=vt`
|
|
202
|
-
.ft-typography--
|
|
203
|
-
font-family: ${
|
|
204
|
-
font-size: ${
|
|
205
|
-
font-weight: ${
|
|
206
|
-
letter-spacing: ${
|
|
207
|
-
line-height: ${
|
|
208
|
-
text-transform: ${
|
|
197
|
+
.ft-typography--breadcrumb {
|
|
198
|
+
font-family: ${Bo};
|
|
199
|
+
font-size: ${Po};
|
|
200
|
+
font-weight: ${Ho};
|
|
201
|
+
letter-spacing: ${jo};
|
|
202
|
+
line-height: ${_o};
|
|
203
|
+
text-transform: ${To};
|
|
209
204
|
}
|
|
210
205
|
`,di=vt`
|
|
211
|
-
.ft-typography--
|
|
212
|
-
font-family: ${
|
|
213
|
-
font-size: ${
|
|
214
|
-
font-weight: ${
|
|
215
|
-
letter-spacing: ${
|
|
216
|
-
line-height: ${
|
|
217
|
-
text-transform: ${
|
|
206
|
+
.ft-typography--overline {
|
|
207
|
+
font-family: ${Go};
|
|
208
|
+
font-size: ${Yo};
|
|
209
|
+
font-weight: ${Vo};
|
|
210
|
+
letter-spacing: ${Jo};
|
|
211
|
+
line-height: ${qo};
|
|
212
|
+
text-transform: ${Xo};
|
|
218
213
|
}
|
|
219
214
|
`,yi=vt`
|
|
215
|
+
.ft-typography--button {
|
|
216
|
+
font-family: ${Qo};
|
|
217
|
+
font-size: ${ti};
|
|
218
|
+
font-weight: ${ei};
|
|
219
|
+
letter-spacing: ${oi};
|
|
220
|
+
line-height: ${ii};
|
|
221
|
+
text-transform: ${ri};
|
|
222
|
+
}
|
|
223
|
+
`,gi=vt`
|
|
220
224
|
.ft-typography {
|
|
221
225
|
vertical-align: inherit;
|
|
222
226
|
}
|
|
223
|
-
`,
|
|
227
|
+
`,ui=[Object.keys(Ce).map((t=>function(t){const e=Ce[t];return vt`
|
|
224
228
|
.ft-typography--${Ot(t)} {
|
|
225
229
|
font-family: ${e.fontFamily};
|
|
226
230
|
font-size: ${e.fontSize};
|
|
@@ -229,32 +233,32 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
229
233
|
line-height: ${e.lineHeight};
|
|
230
234
|
text-transform: ${e.textCase};
|
|
231
235
|
}
|
|
232
|
-
`}(t)))];var
|
|
233
|
-
<${
|
|
236
|
+
`}(t)))];var bi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class mi extends Ze{constructor(){super(...arguments),this.variant=ro.body1}render(){return this.element?io`
|
|
237
|
+
<${eo(this.element)}
|
|
234
238
|
class="ft-typography ft-typography--${this.variant}">
|
|
235
239
|
<slot></slot>
|
|
236
|
-
</${
|
|
237
|
-
`:
|
|
240
|
+
</${eo(this.element)}>
|
|
241
|
+
`:io`
|
|
238
242
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
239
|
-
`}}
|
|
243
|
+
`}}mi.styles=[ni,ai,si,li,ci,pi,fi,hi,di,yi,gi,...ui],bi([C()],mi.prototype,"element",void 0),bi([C()],mi.prototype,"variant",void 0),I("ft-typography")(mi);const xi={fontSize:Ne.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:Ne.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:Ne.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:Ne.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:Ne.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:Ne.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:Ne.extend("--ft-input-label-border-color","",Ee.colorOutline),textColor:Ne.extend("--ft-input-label-text-color","",Ee.colorOnSurfaceMedium),disabledTextColor:Ne.extend("--ft-input-label-disabled-text-color","",Ee.colorOnSurfaceDisabled),colorSurface:Ne.external(Ee.colorSurface,"Design system"),borderRadiusS:Ne.external(Ee.borderRadiusS,"Design system"),colorError:Ne.external(Ee.colorError,"Design system")},Oi=vt`
|
|
240
244
|
.ft-input-label {
|
|
241
245
|
position: absolute;
|
|
242
246
|
inset: 0;
|
|
243
247
|
display: flex;
|
|
244
|
-
background-color: ${
|
|
245
|
-
border-radius: ${
|
|
248
|
+
background-color: ${xi.colorSurface};
|
|
249
|
+
border-radius: ${xi.borderRadiusS} ${xi.borderRadiusS} 0 0;
|
|
246
250
|
}
|
|
247
251
|
|
|
248
252
|
.ft-input-label--outlined {
|
|
249
|
-
border-radius: ${
|
|
253
|
+
border-radius: ${xi.borderRadiusS};
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
.ft-input-label {
|
|
253
|
-
border-color: ${
|
|
257
|
+
border-color: ${xi.borderColor};
|
|
254
258
|
}
|
|
255
259
|
|
|
256
260
|
.ft-input-label.ft-input-label--in-error {
|
|
257
|
-
border-color: ${
|
|
261
|
+
border-color: ${xi.colorError}
|
|
258
262
|
}
|
|
259
263
|
|
|
260
264
|
.ft-input-label:before,
|
|
@@ -267,7 +271,7 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
267
271
|
}
|
|
268
272
|
|
|
269
273
|
.ft-input-label:before {
|
|
270
|
-
width: calc(${
|
|
274
|
+
width: calc(${xi.horizontalSpacing} - 4px);
|
|
271
275
|
flex-shrink: 0;
|
|
272
276
|
}
|
|
273
277
|
|
|
@@ -283,20 +287,20 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
283
287
|
border-bottom-width: 1px;
|
|
284
288
|
border-bottom-style: solid;
|
|
285
289
|
border-color: inherit;
|
|
286
|
-
color: ${
|
|
290
|
+
color: ${xi.textColor};
|
|
287
291
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
288
|
-
max-width: calc(${
|
|
292
|
+
max-width: calc(${xi.labelMaxWidth} - 2 * (${xi.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
289
293
|
text-overflow: ellipsis;
|
|
290
|
-
${Se(
|
|
291
|
-
${Se(
|
|
294
|
+
${Se(Ao.fontSize,xi.fontSize)};
|
|
295
|
+
${Se(Ao.lineHeight,xi.fontSize)};
|
|
292
296
|
}
|
|
293
297
|
|
|
294
298
|
.ft-input-label--in-error .ft-input-label--text {
|
|
295
|
-
color: ${
|
|
299
|
+
color: ${xi.colorError}
|
|
296
300
|
}
|
|
297
301
|
|
|
298
302
|
.ft-input-label--disabled .ft-input-label--text {
|
|
299
|
-
color: ${
|
|
303
|
+
color: ${xi.disabledTextColor};
|
|
300
304
|
}
|
|
301
305
|
|
|
302
306
|
.ft-input-label--hidden-text {
|
|
@@ -313,19 +317,19 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
313
317
|
overflow: hidden;
|
|
314
318
|
white-space: nowrap;
|
|
315
319
|
text-overflow: ellipsis;
|
|
316
|
-
padding: ${
|
|
317
|
-
margin: calc(${
|
|
320
|
+
padding: ${xi.verticalSpacing} 4px;
|
|
321
|
+
margin: calc(${xi.verticalSpacing} * -1) 0;
|
|
318
322
|
max-width: 100%;
|
|
319
323
|
box-sizing: border-box;
|
|
320
324
|
}
|
|
321
325
|
|
|
322
326
|
.ft-input-label--raised .ft-input-label--text {
|
|
323
|
-
${Se(
|
|
324
|
-
${Se(
|
|
327
|
+
${Se(Ao.fontSize,xi.raisedFontSize)};
|
|
328
|
+
${Se(Ao.lineHeight,xi.raisedFontSize)};
|
|
325
329
|
}
|
|
326
330
|
|
|
327
331
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
328
|
-
top: ${
|
|
332
|
+
top: ${xi.verticalSpacing};
|
|
329
333
|
}
|
|
330
334
|
|
|
331
335
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -338,28 +342,28 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
338
342
|
.ft-input-label--outlined:before {
|
|
339
343
|
border-left-width: 1px;
|
|
340
344
|
border-left-style: solid;
|
|
341
|
-
border-radius: ${
|
|
345
|
+
border-radius: ${xi.borderRadiusS} 0 0 ${xi.borderRadiusS};
|
|
342
346
|
}
|
|
343
347
|
|
|
344
348
|
.ft-input-label--outlined:after {
|
|
345
349
|
border-right-width: 1px;
|
|
346
350
|
border-right-style: solid;
|
|
347
|
-
border-radius: 0 ${
|
|
351
|
+
border-radius: 0 ${xi.borderRadiusS} ${xi.borderRadiusS} 0;
|
|
348
352
|
}
|
|
349
353
|
|
|
350
354
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
351
355
|
padding: 2px 4px;
|
|
352
|
-
z-index: ${
|
|
353
|
-
background-color: ${
|
|
354
|
-
border-radius: ${
|
|
356
|
+
z-index: ${xi.raisedZIndex};
|
|
357
|
+
background-color: ${xi.colorSurface};
|
|
358
|
+
border-radius: ${xi.borderRadiusS};
|
|
355
359
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
356
360
|
}
|
|
357
361
|
|
|
358
362
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
359
363
|
border-top: none;
|
|
360
364
|
}
|
|
361
|
-
`;var
|
|
362
|
-
<div class="${
|
|
365
|
+
`;var vi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ni extends Ze{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return ie`
|
|
366
|
+
<div class="${je(t)}">
|
|
363
367
|
${this.text?ie`
|
|
364
368
|
<div class="ft-input-label--text ft-typography--caption">
|
|
365
369
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -367,7 +371,7 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
367
371
|
</div>
|
|
368
372
|
`:null}
|
|
369
373
|
</div>
|
|
370
|
-
`}}
|
|
374
|
+
`}}Ni.elementDefinitions={},Ni.styles=[fi,Oi],vi([C({type:String})],Ni.prototype,"text",void 0),vi([C({type:Boolean})],Ni.prototype,"raised",void 0),vi([C({type:Boolean})],Ni.prototype,"outlined",void 0),vi([C({type:Boolean})],Ni.prototype,"disabled",void 0),vi([C({type:Boolean})],Ni.prototype,"error",void 0),I("ft-input-label")(Ni);const Si=Ne.extend("--ft-ripple-color","",Ee.colorContent),wi={color:Si,backgroundColor:Ne.extend("--ft-ripple-background-color","",Si),opacityContentOnSurfacePressed:Ne.external(Ee.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Ne.external(Ee.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Ne.external(Ee.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Ne.external(Ee.opacityContentOnSurfaceSelected,"Design system"),borderRadius:Ne.create("--ft-ripple-border-radius","","SIZE","0px")},Ci=Ne.extend("--ft-ripple-color","",Ee.colorPrimary),$i=Ci,Ei=Ne.extend("--ft-ripple-background-color","",Ci),Ri=Ne.extend("--ft-ripple-color","",Ee.colorSecondary),Ui=Ri,Ii=Ne.extend("--ft-ripple-background-color","",Ri),ki=vt`
|
|
371
375
|
:host {
|
|
372
376
|
display: contents;
|
|
373
377
|
}
|
|
@@ -380,7 +384,7 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
380
384
|
|
|
381
385
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
382
386
|
overflow: hidden;
|
|
383
|
-
border-radius: ${
|
|
387
|
+
border-radius: ${wi.borderRadius};
|
|
384
388
|
}
|
|
385
389
|
|
|
386
390
|
.ft-ripple .ft-ripple--background,
|
|
@@ -414,27 +418,27 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
414
418
|
}
|
|
415
419
|
|
|
416
420
|
.ft-ripple .ft-ripple--background {
|
|
417
|
-
background-color: ${
|
|
421
|
+
background-color: ${wi.backgroundColor};
|
|
418
422
|
}
|
|
419
423
|
|
|
420
424
|
.ft-ripple .ft-ripple--effect {
|
|
421
|
-
background-color: ${
|
|
425
|
+
background-color: ${wi.color};
|
|
422
426
|
}
|
|
423
427
|
|
|
424
428
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
425
|
-
background-color: ${
|
|
429
|
+
background-color: ${Ii};
|
|
426
430
|
}
|
|
427
431
|
|
|
428
432
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
429
|
-
background-color: ${
|
|
433
|
+
background-color: ${Ui};
|
|
430
434
|
}
|
|
431
435
|
|
|
432
436
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
433
|
-
background-color: ${
|
|
437
|
+
background-color: ${Ei};
|
|
434
438
|
}
|
|
435
439
|
|
|
436
440
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
437
|
-
background-color: ${
|
|
441
|
+
background-color: ${$i};
|
|
438
442
|
}
|
|
439
443
|
|
|
440
444
|
.ft-ripple .ft-ripple--background {
|
|
@@ -464,39 +468,39 @@ const Me=1,Ae=2,Be=t=>(...e)=>({_$litDirective$:t,values:e});let Pe=class{constr
|
|
|
464
468
|
}
|
|
465
469
|
|
|
466
470
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
467
|
-
opacity: ${
|
|
471
|
+
opacity: ${wi.opacityContentOnSurfaceHover};
|
|
468
472
|
}
|
|
469
473
|
|
|
470
474
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
471
|
-
opacity: ${
|
|
475
|
+
opacity: ${wi.opacityContentOnSurfaceSelected};
|
|
472
476
|
}
|
|
473
477
|
|
|
474
478
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
475
|
-
opacity: ${
|
|
479
|
+
opacity: ${wi.opacityContentOnSurfaceFocused};
|
|
476
480
|
}
|
|
477
481
|
|
|
478
482
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
479
|
-
opacity: ${
|
|
483
|
+
opacity: ${wi.opacityContentOnSurfacePressed};
|
|
480
484
|
transform: translate(-50%, -50%) scale(1);
|
|
481
485
|
}
|
|
482
|
-
`;var
|
|
486
|
+
`;var Wi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Li extends Ze{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,o;let{x:i,y:r}=this.getCoordinates(t),n=null!==(o=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==o?o:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=i?i-n.x:n.width/2),this.originY=Math.round(null!=r?r-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return ie`
|
|
483
487
|
<style>
|
|
484
488
|
.ft-ripple .ft-ripple--effect {
|
|
485
489
|
left: ${this.originX}px;
|
|
486
490
|
top: ${this.originY}px;
|
|
487
491
|
}
|
|
488
492
|
</style>
|
|
489
|
-
<div class="${
|
|
493
|
+
<div class="${je(t)}">
|
|
490
494
|
<div class="ft-ripple--background"></div>
|
|
491
495
|
<div class="ft-ripple--effect"></div>
|
|
492
496
|
</div>
|
|
493
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",o),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",o),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}
|
|
497
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",o),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",o),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Li.elementDefinitions={},Li.styles=ki,Wi([C({type:Boolean})],Li.prototype,"primary",void 0),Wi([C({type:Boolean})],Li.prototype,"secondary",void 0),Wi([C({type:Boolean})],Li.prototype,"unbounded",void 0),Wi([C({type:Boolean})],Li.prototype,"activated",void 0),Wi([C({type:Boolean})],Li.prototype,"selected",void 0),Wi([C({type:Boolean})],Li.prototype,"disabled",void 0),Wi([$()],Li.prototype,"hovered",void 0),Wi([$()],Li.prototype,"focused",void 0),Wi([$()],Li.prototype,"pressed",void 0),Wi([$()],Li.prototype,"rippling",void 0),Wi([$()],Li.prototype,"originX",void 0),Wi([$()],Li.prototype,"originY",void 0),Wi([R(".ft-ripple")],Li.prototype,"ripple",void 0),Wi([R(".ft-ripple--effect")],Li.prototype,"rippleEffect",void 0),I("ft-ripple")(Li);
|
|
494
498
|
/**
|
|
495
499
|
* @license
|
|
496
500
|
* Copyright 2017 Google LLC
|
|
497
501
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
498
502
|
*/
|
|
499
|
-
class
|
|
503
|
+
class Ki extends He{constructor(t){if(super(t),this.et=Q,t.type!==Be)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Q||null==t)return this.vt=void 0,this.et=t;if(t===X)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Ki.directiveName="unsafeHTML",Ki.resultType=1;const zi=Pe(Ki);var Zi,Fi;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Zi||(Zi={})),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=""}(Fi||(Fi={})),new Map([...["abw"].map((t=>[t,Fi.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,Fi.AUDIO])),...["avi"].map((t=>[t,Fi.AVI])),...["chm","xhs"].map((t=>[t,Fi.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,Fi.CODE])),...["csv"].map((t=>[t,Fi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Fi.DITA])),...["epub"].map((t=>[t,Fi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Fi.EXCEL])),...["flac"].map((t=>[t,Fi.FLAC])),...["gif"].map((t=>[t,Fi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Fi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Fi.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,Fi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Fi.JPEG])),...["json"].map((t=>[t,Fi.JSON])),...["m4a","m4p"].map((t=>[t,Fi.M4A])),...["mov","qt"].map((t=>[t,Fi.MOV])),...["mp3"].map((t=>[t,Fi.MP3])),...["mp4","m4v"].map((t=>[t,Fi.MP4])),...["ogg","oga"].map((t=>[t,Fi.OGG])),...["pdf","ps"].map((t=>[t,Fi.PDF])),...["png"].map((t=>[t,Fi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Fi.POWERPOINT])),...["rar"].map((t=>[t,Fi.RAR])),...["stp"].map((t=>[t,Fi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Fi.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,Fi.VIDEO])),...["wav"].map((t=>[t,Fi.WAV])),...["wma"].map((t=>[t,Fi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Fi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Fi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Fi.YAML])),...["zip"].map((t=>[t,Fi.ZIP]))]);const Di=Ne.create("--ft-icon-font-size","","SIZE","24px"),Mi=Ne.extend("--ft-icon-fluid-topics-font-family","",Ne.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),Ai=Ne.extend("--ft-icon-file-format-font-family","",Ne.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),Bi=Ne.extend("--ft-icon-material-font-family","",Ne.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),Pi=Ne.create("--ft-icon-vertical-align","","UNKNOWN","unset"),Hi=vt`
|
|
500
504
|
:host, i.ft-icon {
|
|
501
505
|
display: inline-flex;
|
|
502
506
|
align-items: center;
|
|
@@ -505,14 +509,14 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
505
509
|
}
|
|
506
510
|
|
|
507
511
|
:host {
|
|
508
|
-
width: ${
|
|
509
|
-
height: ${
|
|
512
|
+
width: ${Di};
|
|
513
|
+
height: ${Di};
|
|
510
514
|
}
|
|
511
515
|
|
|
512
516
|
i.ft-icon {
|
|
513
517
|
width: 100%;
|
|
514
518
|
height: 100%;
|
|
515
|
-
font-size: ${
|
|
519
|
+
font-size: ${Di};
|
|
516
520
|
line-height: 1;
|
|
517
521
|
font-weight: normal;
|
|
518
522
|
text-transform: none;
|
|
@@ -523,33 +527,33 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
523
527
|
text-rendering: auto;
|
|
524
528
|
-webkit-font-smoothing: antialiased;
|
|
525
529
|
-moz-osx-font-smoothing: grayscale;
|
|
526
|
-
vertical-align: ${
|
|
530
|
+
vertical-align: ${Pi};
|
|
527
531
|
}
|
|
528
532
|
|
|
529
533
|
i.ft-icon.ft-icon--fluid-topics {
|
|
530
|
-
font-family: ${
|
|
534
|
+
font-family: ${Mi}, ft-icons, fticons, sans-serif;
|
|
531
535
|
|
|
532
536
|
/* Ugly fix because font is broken */
|
|
533
|
-
font-size: calc(0.75 * ${
|
|
534
|
-
line-height: ${
|
|
537
|
+
font-size: calc(0.75 * ${Di});
|
|
538
|
+
line-height: ${Di};
|
|
535
539
|
position: relative;
|
|
536
540
|
top: -4%;
|
|
537
541
|
justify-content: center;
|
|
538
542
|
}
|
|
539
543
|
|
|
540
544
|
.ft-icon--file-format {
|
|
541
|
-
font-family: ${
|
|
545
|
+
font-family: ${Ai}, ft-mime, sans-serif;
|
|
542
546
|
}
|
|
543
547
|
|
|
544
548
|
.ft-icon--material {
|
|
545
|
-
font-family: ${
|
|
549
|
+
font-family: ${Bi}, "Material Icons", sans-serif;
|
|
546
550
|
}
|
|
547
|
-
`;var
|
|
551
|
+
`;var ji;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ji||(ji={}));var _i=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ti extends Ze{constructor(){super(...arguments),this.resolvedIcon=ne}render(){const t=this.variant&&Object.values(ji).includes(this.variant)?this.variant:ji.fluid_topics,e=t!==ji.material||!!this.value;return ie`
|
|
548
552
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
549
|
-
${
|
|
553
|
+
${zi(this.resolvedIcon)}
|
|
550
554
|
<slot ?hidden=${e}></slot>
|
|
551
555
|
</i>
|
|
552
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
556
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case ji.file_format:this.resolvedIcon=null!==(t=Fi[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case ji.material:this.resolvedIcon=this.value||ne;break;default:this.resolvedIcon=null!==(e=Zi[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ti.elementDefinitions={},Ti.styles=Hi,_i([C()],Ti.prototype,"variant",void 0),_i([C()],Ti.prototype,"value",void 0),_i([$()],Ti.prototype,"resolvedIcon",void 0),_i([R("slot")],Ti.prototype,"slottedContent",void 0),I("ft-icon")(Ti);const Gi={labelSize:Ne.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:Ne.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:Ne.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:Ne.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:Ne.create("--ft-select-options-height","","SIZE","unset"),selectedOptionColor:Ne.extend("--ft-select-selected-option-color","",Ee.colorOnSurface),helperColor:Ne.extend("--ft-select-helper-color","",Ee.colorOnSurfaceMedium),optionsColor:Ne.extend("--ft-select-options-color","",Ee.colorOnSurface),optionsZIndex:Ne.create("--ft-select-options-z-index","","NUMBER","3"),colorSurface:Ne.external(Ee.colorSurface,"Design system"),colorOnSurfaceDisabled:Ne.external(Ee.colorOnSurfaceDisabled,"Design system"),colorPrimary:Ne.external(Ee.colorPrimary,"Design system"),borderRadiusS:Ne.external(Ee.borderRadiusS,"Design system"),elevation02:Ne.external(Ee.elevation02,"Design system"),colorError:Ne.external(Ee.colorError,"Design system")},Yi=vt`
|
|
553
557
|
*:focus {
|
|
554
558
|
outline: none;
|
|
555
559
|
}
|
|
@@ -563,7 +567,7 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
563
567
|
.ft-select--main-panel {
|
|
564
568
|
position: relative;
|
|
565
569
|
display: flex;
|
|
566
|
-
height: calc(4 * ${
|
|
570
|
+
height: calc(4 * ${Gi.verticalSpacing} + ${Gi.labelSize} + ${Gi.selectedOptionSize});
|
|
567
571
|
}
|
|
568
572
|
|
|
569
573
|
.ft-select--input-panel {
|
|
@@ -572,17 +576,17 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
572
576
|
display: flex;
|
|
573
577
|
align-items: center;
|
|
574
578
|
overflow: hidden;
|
|
575
|
-
padding-left: ${
|
|
576
|
-
padding-right: ${
|
|
579
|
+
padding-left: ${Gi.horizontalSpacing};
|
|
580
|
+
padding-right: ${Gi.horizontalSpacing};
|
|
577
581
|
gap: 8px;
|
|
578
|
-
color: ${
|
|
579
|
-
${Se(
|
|
582
|
+
color: ${Gi.selectedOptionColor};
|
|
583
|
+
${Se(wi.color,Gi.selectedOptionColor)};
|
|
580
584
|
}
|
|
581
585
|
|
|
582
586
|
.ft-select--input-panel,
|
|
583
587
|
.ft-select--option {
|
|
584
|
-
${Se(
|
|
585
|
-
${Se(
|
|
588
|
+
${Se(wi.opacityContentOnSurfaceHover,"0.08")};
|
|
589
|
+
${Se(wi.opacityContentOnSurfacePressed,"0.04")};
|
|
586
590
|
}
|
|
587
591
|
|
|
588
592
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -592,7 +596,7 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
592
596
|
|
|
593
597
|
.ft-select--disabled .ft-select--input-panel,
|
|
594
598
|
.ft-select--disabled .ft-select--option {
|
|
595
|
-
color: ${
|
|
599
|
+
color: ${Gi.colorOnSurfaceDisabled};
|
|
596
600
|
}
|
|
597
601
|
|
|
598
602
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -601,20 +605,20 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
601
605
|
}
|
|
602
606
|
|
|
603
607
|
ft-input-label {
|
|
604
|
-
${Se(
|
|
605
|
-
${Se(
|
|
606
|
-
${Se(
|
|
607
|
-
${Se(
|
|
608
|
-
${Se(
|
|
608
|
+
${Se(xi.fontSize,Gi.selectedOptionSize)};
|
|
609
|
+
${Se(xi.raisedFontSize,Gi.labelSize)};
|
|
610
|
+
${Se(xi.verticalSpacing,Gi.verticalSpacing)};
|
|
611
|
+
${Se(xi.horizontalSpacing,Gi.horizontalSpacing)};
|
|
612
|
+
${Se(xi.labelMaxWidth,`calc(100% - ${Di} - 8px)`)};
|
|
609
613
|
}
|
|
610
614
|
|
|
611
615
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
612
|
-
color: ${
|
|
616
|
+
color: ${Gi.colorPrimary};
|
|
613
617
|
}
|
|
614
618
|
|
|
615
619
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
616
|
-
${Se(
|
|
617
|
-
${Se(
|
|
620
|
+
${Se(xi.borderColor,Gi.colorPrimary)};
|
|
621
|
+
${Se(xi.textColor,Gi.colorPrimary)};
|
|
618
622
|
}
|
|
619
623
|
|
|
620
624
|
.ft-select--selected-option {
|
|
@@ -624,12 +628,12 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
624
628
|
overflow: hidden;
|
|
625
629
|
white-space: nowrap;
|
|
626
630
|
text-overflow: ellipsis;
|
|
627
|
-
${Se(
|
|
628
|
-
${Se(
|
|
631
|
+
${Se(Lo.fontSize,Gi.selectedOptionSize)};
|
|
632
|
+
${Se(Lo.lineHeight,Gi.selectedOptionSize)};
|
|
629
633
|
}
|
|
630
634
|
|
|
631
635
|
.ft-select--in-error .ft-select--selected-option {
|
|
632
|
-
color: ${
|
|
636
|
+
color: ${Gi.colorError};
|
|
633
637
|
}
|
|
634
638
|
|
|
635
639
|
ft-icon {
|
|
@@ -641,16 +645,16 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
641
645
|
}
|
|
642
646
|
|
|
643
647
|
.ft-select--filled .ft-select--input-panel {
|
|
644
|
-
border-radius: ${
|
|
648
|
+
border-radius: ${Gi.borderRadiusS} ${Gi.borderRadiusS} 0 0;
|
|
645
649
|
}
|
|
646
650
|
|
|
647
651
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
648
652
|
align-self: stretch;
|
|
649
|
-
padding-top: calc(${
|
|
653
|
+
padding-top: calc(${Gi.labelSize} + 2 * ${Gi.verticalSpacing});
|
|
650
654
|
}
|
|
651
655
|
|
|
652
656
|
.ft-select--outlined .ft-select--input-panel {
|
|
653
|
-
border-radius: ${
|
|
657
|
+
border-radius: ${Gi.borderRadiusS};
|
|
654
658
|
}
|
|
655
659
|
|
|
656
660
|
.ft-select--options {
|
|
@@ -659,10 +663,10 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
659
663
|
top: 100%;
|
|
660
664
|
left: 0;
|
|
661
665
|
right: 0;
|
|
662
|
-
color: ${
|
|
663
|
-
background: ${
|
|
664
|
-
z-index: ${
|
|
665
|
-
box-shadow: ${
|
|
666
|
+
color: ${Gi.optionsColor};
|
|
667
|
+
background: ${Gi.colorSurface};
|
|
668
|
+
z-index: ${Gi.optionsZIndex};
|
|
669
|
+
box-shadow: ${Gi.elevation02};
|
|
666
670
|
}
|
|
667
671
|
|
|
668
672
|
.ft-select--fixed .ft-select--options {
|
|
@@ -673,13 +677,13 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
673
677
|
|
|
674
678
|
.ft-select--options-displayed .ft-select--options {
|
|
675
679
|
display: block;
|
|
676
|
-
max-height: ${
|
|
680
|
+
max-height: ${Gi.optionsHeight};
|
|
677
681
|
overflow-y: auto;
|
|
678
682
|
}
|
|
679
683
|
|
|
680
684
|
.ft-select--option {
|
|
681
685
|
position: relative;
|
|
682
|
-
padding: 4px ${
|
|
686
|
+
padding: 4px ${Gi.horizontalSpacing};
|
|
683
687
|
min-height: 32px;
|
|
684
688
|
display: flex;
|
|
685
689
|
align-items: center;
|
|
@@ -691,15 +695,15 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
691
695
|
}
|
|
692
696
|
|
|
693
697
|
.ft-select--helper-text {
|
|
694
|
-
padding: 0 ${
|
|
695
|
-
color: ${
|
|
698
|
+
padding: 0 ${Gi.horizontalSpacing};
|
|
699
|
+
color: ${Gi.helperColor};
|
|
696
700
|
}
|
|
697
701
|
|
|
698
702
|
.ft-select--in-error .ft-select--helper-text {
|
|
699
|
-
color: ${
|
|
703
|
+
color: ${Gi.colorError};
|
|
700
704
|
}
|
|
701
|
-
`;var
|
|
702
|
-
<div class="${
|
|
705
|
+
`;var Vi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ji extends Ze{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return ie``}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ji.elementDefinitions={},Vi([C({type:String})],Ji.prototype,"label",void 0),Vi([C({type:Object,converter:t=>t})],Ji.prototype,"value",void 0),Vi([C({type:Boolean,reflect:!0})],Ji.prototype,"selected",void 0);class qi extends Ze{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,i,r;let n=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions;const s=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,l={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":n,"ft-select--has-option-selected":s,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return ie`
|
|
706
|
+
<div class="${je(l)}" part="container">
|
|
703
707
|
<div class="ft-select--main-panel" part="main-panel">
|
|
704
708
|
<ft-input-label text="${this.label}"
|
|
705
709
|
part="label"
|
|
@@ -726,7 +730,7 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
726
730
|
part="options"
|
|
727
731
|
@keydown=${this.onOptionsKeyDown}
|
|
728
732
|
innerrole="listbox">
|
|
729
|
-
${
|
|
733
|
+
${Xe(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
730
734
|
</div>
|
|
731
735
|
</div>
|
|
732
736
|
${this.helper?ie`
|
|
@@ -737,7 +741,7 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
737
741
|
@option-change=${this.updateOptionsFromSlot}
|
|
738
742
|
></slot>
|
|
739
743
|
`}renderOption(t){let e=this.selectedOption===t;return ie`
|
|
740
|
-
<div class="${
|
|
744
|
+
<div class="${je({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
741
745
|
part="option"
|
|
742
746
|
tabindex="0"
|
|
743
747
|
data-value="${t.value}"
|
|
@@ -746,4 +750,4 @@ class Li extends Pe{constructor(t){if(super(t),this.et=Q,t.type!==Ae)throw Error
|
|
|
746
750
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
747
751
|
<span>${t.label}</span>
|
|
748
752
|
</div>
|
|
749
|
-
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,o,i,r,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!U(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
753
|
+
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,o,i,r,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!U(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}qi.elementDefinitions={"ft-input-label":Ni,"ft-typography":mi,"ft-ripple":Li,"ft-icon":Ti},qi.styles=[pi,fi,Yi],Vi([C({type:String})],qi.prototype,"label",void 0),Vi([C({type:String})],qi.prototype,"helper",void 0),Vi([C({type:Boolean})],qi.prototype,"outlined",void 0),Vi([C({type:Boolean})],qi.prototype,"disabled",void 0),Vi([C({type:Boolean})],qi.prototype,"error",void 0),Vi([C({type:Boolean})],qi.prototype,"fixedMenuPosition",void 0),Vi([C({type:Array})],qi.prototype,"options",void 0),Vi([$()],qi.prototype,"selectedOption",void 0),Vi([$()],qi.prototype,"optionsDisplayed",void 0),Vi([$()],qi.prototype,"focusOptions",void 0),Vi([R(".ft-select")],qi.prototype,"container",void 0),Vi([R(".ft-select--options")],qi.prototype,"optionsMenu",void 0),Vi([R(".ft-select--input-panel")],qi.prototype,"mainPanel",void 0),Vi([R(".ft-select--option:first-child")],qi.prototype,"firstOption",void 0),Vi([R(".ft-select--option:focus")],qi.prototype,"focusedOption",void 0),Vi([R(".ft-select--option.ft-select--option-selected")],qi.prototype,"selectedOptionElement",void 0),Vi([R(".ft-select--option:last-child")],qi.prototype,"lastOption",void 0),Vi([R("slot")],qi.prototype,"optionsSlot",void 0),I("ft-select")(qi),I("ft-select-option")(Ji),t.FtSelect=qi,t.FtSelectCssVariables=Gi,t.FtSelectOption=Ji,t.styles=Yi}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-select",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Value selector for a predefined list of choices",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.1.
|
|
23
|
-
"@fluid-topics/ft-input-label": "1.1.
|
|
24
|
-
"@fluid-topics/ft-ripple": "1.1.
|
|
25
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.1.2",
|
|
23
|
+
"@fluid-topics/ft-input-label": "1.1.2",
|
|
24
|
+
"@fluid-topics/ft-ripple": "1.1.2",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.1.2",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.1.2",
|
|
27
27
|
"lit": "3.1.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "53ce99f657872582bca43cbb7ad691b239b22823"
|
|
30
30
|
}
|