@fluid-topics/ft-text-area 1.1.1 → 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-text-area.min.js +169 -165
- package/package.json +5 -5
|
@@ -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,r=window.customElements,i=new WeakMap,a=new WeakMap,n=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,i){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(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=i.prototype.attributeChangedCallback,l=new Set(i.observedAttributes||[]);h(i,l,s);const c={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(i,c);let p=o.call(r,t);p||(p=f(t),e.call(r,t,p)),this===window.customElements&&(n.set(i,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)a.delete(t),y(t,c,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){u.push(this),r.upgrade.apply(r,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 r=this._awaitingUpgrade.get(e);r||this._awaitingUpgrade.set(e,r=new Set),o?r.add(t):r.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=n.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),i.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 r=p(o)||window.customElements,i=r._getDefinition(e);return i?y(o,i):a.set(o,r),o}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=i.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=i.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=i.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=i.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=i.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,o)=>{if(0===e.size||void 0===o)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const a=t.toLowerCase();if(e.has(a)){const t=this.getAttribute(a);r.call(this,a,i),o.call(this,a,t,i)}else r.call(this,a,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);i.call(this,r),o.call(this,r,t,null)}else i.call(this,r)});const a=t.prototype.toggleAttribute;a&&(t.prototype.toggleAttribute=function(t,r){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);a.call(this,i,r);const e=this.getAttribute(i);o.call(this,i,t,e)}else a.call(this,i,r)})},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),i.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 r=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){u.push(this);const t=r.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 r=e.call(this,...o);return t.set(r,this),r},o.forEach((e=>{const o=window.ElementInternals.prototype,r=o[e];o[e]=function(...e){const o=t.get(this);if(!0===i.get(o).formAssociated)return r?.call(this,...e);throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class a{constructor(t){const e=new Map;t.forEach(((t,o)=>{const r=t.getAttribute("name"),i=e.get(r)||[];this[+o]=t,i.push(t),e.set(r,i)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new r(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const o of t){const t=i.get(o);t&&!0!==t.formAssociated||e.push(o)}return new a(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,r=window.customElements,i=new WeakMap,a=new WeakMap,n=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,i){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(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=i.prototype.attributeChangedCallback,l=new Set(i.observedAttributes||[]);h(i,l,s);const c={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(i,c);let p=o.call(r,t);p||(p=f(t),e.call(r,t,p)),this===window.customElements&&(n.set(i,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)a.delete(t),y(t,c,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){u.push(this),r.upgrade.apply(r,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 r=this._awaitingUpgrade.get(e);r||this._awaitingUpgrade.set(e,r=new Set),o?r.add(t):r.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=n.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),i.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 r=p(o)||window.customElements,i=r._getDefinition(e);return i?y(o,i):a.set(o,r),o}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=i.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=i.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=i.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=i.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=i.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,o)=>{if(0===e.size||void 0===o)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const a=t.toLowerCase();if(e.has(a)){const t=this.getAttribute(a);r.call(this,a,i),o.call(this,a,t,i)}else r.call(this,a,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);i.call(this,r),o.call(this,r,t,null)}else i.call(this,r)});const a=t.prototype.toggleAttribute;a&&(t.prototype.toggleAttribute=function(t,r){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);a.call(this,i,r);const e=this.getAttribute(i);o.call(this,i,t,e)}else a.call(this,i,r)})},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),i.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 r=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){u.push(this);const t=r.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 r=e.call(this,...o);return t.set(r,this),r},o.forEach((e=>{const o=window.ElementInternals.prototype,r=o[e];o[e]=function(...e){const o=t.get(this);if(!0===i.get(o).formAssociated)return r?.call(this,...e);throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class a{constructor(t){const e=new Map;t.forEach(((t,o)=>{const r=t.getAttribute("name"),i=e.get(r)||[];this[+o]=t,i.push(t),e.set(r,i)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new r(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const o of t){const t=i.get(o);t&&!0!==t.formAssociated||e.push(o)}return new a(e)}})}}try{window.customElements.define("custom-element",null)}catch(cr){const t=window.customElements.define;window.customElements.define=(e,o,r)=>{if(null!==o)try{t.bind(window.customElements)(e,o,r)}catch(t){console.info(e,o,r,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 r=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,i=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of o)try{await t()}catch(t){return void r(t)}i(!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 @@ class ge extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2019 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/class $e extends ge{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)=>{Ce?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),r=we.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Ee,Re=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};const Ue=Symbol("constructorPrototype"),Ie=Symbol("constructorName"),We=Symbol("exportpartsDebouncer");class ke extends $e{constructor(){super(),this[Ee]=new e(5),this[Ie]=this.constructor.name,this[Ue]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ie]&&Object.setPrototypeOf(this,this[Ue])}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[We].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,r,i,a,n;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!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],o=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];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(", "))}}Ee=We,Re([C()],ke.prototype,"exportpartsPrefix",void 0),Re([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:{}})}([])],ke.prototype,"exportpartsPrefixes",void 0),Re([C()],ke.prototype,"customStylesheet",void 0);const Le=bt`
|
|
80
|
+
*/class $e extends ge{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)=>{Ce?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),r=we.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Ee,Re=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};const Ue=Symbol("constructorPrototype"),Ie=Symbol("constructorName"),We=Symbol("exportpartsDebouncer");class ke extends $e{constructor(){super(),this[Ee]=new e(5),this[Ie]=this.constructor.name,this[Ue]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ie]&&Object.setPrototypeOf(this,this[Ue])}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[We].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,r,i,a,n;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!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],o=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];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(", "))}}Ee=We,Re([C()],ke.prototype,"exportpartsPrefix",void 0),Re([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:{}})}([])],ke.prototype,"exportpartsPrefixes",void 0),Re([C()],ke.prototype,"customStylesheet",void 0);const Le=me.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");bt`
|
|
81
|
+
.highlight-html-match {
|
|
82
|
+
background: ${Le};
|
|
83
|
+
}
|
|
84
|
+
`;const ze=bt`
|
|
81
85
|
.ft-no-text-select {
|
|
82
86
|
-webkit-touch-callout: none;
|
|
83
87
|
-webkit-user-select: none;
|
|
@@ -109,118 +113,118 @@ class ge extends Lt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
109
113
|
display: inline-block;
|
|
110
114
|
width: 0;
|
|
111
115
|
}
|
|
112
|
-
`,window.ftReduxStores||(window.ftReduxStores={});const
|
|
116
|
+
`,window.ftReduxStores||(window.ftReduxStores={});const Ke=Symbol("elementInternals");var Ze,Fe;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Fe=null===(Ze=window.safari)||void 0===Ze?void 0:Ze.pushNotification)||void 0===Fe||Fe.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 De=1,Me=2,Ae=t=>(...e)=>({_$litDirective$:t,values:e});let Be=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 Pe=Ae(class extends Be{constructor(t){if(super(t),t.type!==De||"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 r=!!e[t];r===this.it.has(t)||this.st?.has(t)||(r?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return q}}),He=Symbol.for(""),je=t=>{if(t?.r===He)return t?._$litStatic$},_e=t=>({_$litStatic$:t,r:He}),Te=new Map,Ge=(t=>(e,...o)=>{const r=o.length;let i,a;const n=[],s=[];let l,c=0,p=!1;for(;c<r;){for(l=e[c];c<r&&void 0!==(a=o[c],i=je(a));)l+=i+e[++c],p=!0;c!==r&&s.push(a),n.push(l),c++}if(c===r&&n.push(e[r]),p){const t=n.join("$$lit$$");void 0===(e=Te.get(t))&&(n.raw=n,Te.set(t,e=n)),o=s}return t(e,...o)})(J);
|
|
124
128
|
/**
|
|
125
129
|
* @license
|
|
126
130
|
* Copyright 2020 Google LLC
|
|
127
131
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
128
|
-
*/var
|
|
132
|
+
*/var Ye;!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"}(Ye||(Ye={}));const Ve=me.extend("--ft-typography-font-family","",Se.titleFont),Je=me.extend("--ft-typography-font-family","",Se.contentFont),qe={fontFamily:Je,fontSize:me.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:me.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:me.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:me.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:me.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Xe=me.extend("--ft-typography-title-font-family","",Ve),Qe=me.extend("--ft-typography-title-font-size","",qe.fontSize,"20px"),to=me.extend("--ft-typography-title-font-weight","",qe.fontWeight,"normal"),eo=me.extend("--ft-typography-title-letter-spacing","",qe.letterSpacing,"0.15px"),oo=me.extend("--ft-typography-title-line-height","",qe.lineHeight,"1.2"),ro=me.extend("--ft-typography-title-text-transform","",qe.textTransform,"inherit"),io=me.extend("--ft-typography-title-dense-font-family","",Ve),ao=me.extend("--ft-typography-title-dense-font-size","",qe.fontSize,"14px"),no=me.extend("--ft-typography-title-dense-font-weight","",qe.fontWeight,"normal"),so=me.extend("--ft-typography-title-dense-letter-spacing","",qe.letterSpacing,"0.105px"),lo=me.extend("--ft-typography-title-dense-line-height","",qe.lineHeight,"1.7"),co=me.extend("--ft-typography-title-dense-text-transform","",qe.textTransform,"inherit"),po=me.extend("--ft-typography-subtitle1-font-family","",Je),fo=me.extend("--ft-typography-subtitle1-font-size","",qe.fontSize,"16px"),ho=me.extend("--ft-typography-subtitle1-font-weight","",qe.fontWeight,"600"),yo=me.extend("--ft-typography-subtitle1-letter-spacing","",qe.letterSpacing,"0.144px"),go=me.extend("--ft-typography-subtitle1-line-height","",qe.lineHeight,"1.5"),uo=me.extend("--ft-typography-subtitle1-text-transform","",qe.textTransform,"inherit"),bo=me.extend("--ft-typography-subtitle2-font-family","",Je),mo=me.extend("--ft-typography-subtitle2-font-size","",qe.fontSize,"14px"),xo=me.extend("--ft-typography-subtitle2-font-weight","",qe.fontWeight,"normal"),Oo=me.extend("--ft-typography-subtitle2-letter-spacing","",qe.letterSpacing,"0.098px"),No=me.extend("--ft-typography-subtitle2-line-height","",qe.lineHeight,"1.7"),vo=me.extend("--ft-typography-subtitle2-text-transform","",qe.textTransform,"inherit"),So={fontFamily:me.extend("--ft-typography-body1-font-family","",Je),fontSize:me.extend("--ft-typography-body1-font-size","",qe.fontSize,"16px"),fontWeight:me.extend("--ft-typography-body1-font-weight","",qe.fontWeight,"normal"),letterSpacing:me.extend("--ft-typography-body1-letter-spacing","",qe.letterSpacing,"0.496px"),lineHeight:me.extend("--ft-typography-body1-line-height","",qe.lineHeight,"1.5"),textTransform:me.extend("--ft-typography-body1-text-transform","",qe.textTransform,"inherit")},wo=me.extend("--ft-typography-body2-font-family","",Je),Co=me.extend("--ft-typography-body2-font-size","",qe.fontSize,"14px"),$o=me.extend("--ft-typography-body2-font-weight","",qe.fontWeight,"normal"),Eo=me.extend("--ft-typography-body2-letter-spacing","",qe.letterSpacing,"0.252px"),Ro=me.extend("--ft-typography-body2-line-height","",qe.lineHeight,"1.4"),Uo=me.extend("--ft-typography-body2-text-transform","",qe.textTransform,"inherit"),Io={fontFamily:me.extend("--ft-typography-caption-font-family","",Je),fontSize:me.extend("--ft-typography-caption-font-size","",qe.fontSize,"12px"),fontWeight:me.extend("--ft-typography-caption-font-weight","",qe.fontWeight,"normal"),letterSpacing:me.extend("--ft-typography-caption-letter-spacing","",qe.letterSpacing,"0.396px"),lineHeight:me.extend("--ft-typography-caption-line-height","",qe.lineHeight,"1.33"),textTransform:me.extend("--ft-typography-caption-text-transform","",qe.textTransform,"inherit")},Wo=me.extend("--ft-typography-breadcrumb-font-family","",Je),ko=me.extend("--ft-typography-breadcrumb-font-size","",qe.fontSize,"10px"),Lo=me.extend("--ft-typography-breadcrumb-font-weight","",qe.fontWeight,"normal"),zo=me.extend("--ft-typography-breadcrumb-letter-spacing","",qe.letterSpacing,"0.33px"),Ko=me.extend("--ft-typography-breadcrumb-line-height","",qe.lineHeight,"1.6"),Zo=me.extend("--ft-typography-breadcrumb-text-transform","",qe.textTransform,"inherit"),Fo=me.extend("--ft-typography-overline-font-family","",Je),Do=me.extend("--ft-typography-overline-font-size","",qe.fontSize,"10px"),Mo=me.extend("--ft-typography-overline-font-weight","",qe.fontWeight,"normal"),Ao=me.extend("--ft-typography-overline-letter-spacing","",qe.letterSpacing,"1.5px"),Bo=me.extend("--ft-typography-overline-line-height","",qe.lineHeight,"1.6"),Po=me.extend("--ft-typography-overline-text-transform","",qe.textTransform,"uppercase"),Ho=me.extend("--ft-typography-button-font-family","",Je),jo=me.extend("--ft-typography-button-font-size","",qe.fontSize,"14px"),_o=me.extend("--ft-typography-button-font-weight","",qe.fontWeight,"600"),To=me.extend("--ft-typography-button-letter-spacing","",qe.letterSpacing,"1.246px"),Go=me.extend("--ft-typography-button-line-height","",qe.lineHeight,"1.15"),Yo=me.extend("--ft-typography-button-text-transform","",qe.textTransform,"uppercase"),Vo=bt`
|
|
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
|
-
`,Vo=bt`
|
|
138
|
-
.ft-typography--title-dense {
|
|
139
|
-
font-family: ${ro};
|
|
140
|
-
font-size: ${io};
|
|
141
|
-
font-weight: ${ao};
|
|
142
|
-
letter-spacing: ${no};
|
|
143
|
-
line-height: ${so};
|
|
144
|
-
text-transform: ${lo};
|
|
134
|
+
font-family: ${Xe};
|
|
135
|
+
font-size: ${Qe};
|
|
136
|
+
font-weight: ${to};
|
|
137
|
+
letter-spacing: ${eo};
|
|
138
|
+
line-height: ${oo};
|
|
139
|
+
text-transform: ${ro};
|
|
145
140
|
}
|
|
146
141
|
`,Jo=bt`
|
|
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: ${io};
|
|
144
|
+
font-size: ${ao};
|
|
145
|
+
font-weight: ${no};
|
|
146
|
+
letter-spacing: ${so};
|
|
147
|
+
line-height: ${lo};
|
|
148
|
+
text-transform: ${co};
|
|
154
149
|
}
|
|
155
150
|
`,qo=bt`
|
|
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: ${po};
|
|
153
|
+
font-size: ${fo};
|
|
154
|
+
font-weight: ${ho};
|
|
155
|
+
letter-spacing: ${yo};
|
|
156
|
+
line-height: ${go};
|
|
157
|
+
text-transform: ${uo};
|
|
163
158
|
}
|
|
164
|
-
|
|
165
159
|
`,Xo=bt`
|
|
166
|
-
.ft-typography--
|
|
167
|
-
font-family: ${
|
|
168
|
-
font-size: ${
|
|
169
|
-
font-weight: ${
|
|
170
|
-
letter-spacing: ${
|
|
171
|
-
line-height: ${
|
|
172
|
-
text-transform: ${vo
|
|
160
|
+
.ft-typography--subtitle2 {
|
|
161
|
+
font-family: ${bo};
|
|
162
|
+
font-size: ${mo};
|
|
163
|
+
font-weight: ${xo};
|
|
164
|
+
letter-spacing: ${Oo};
|
|
165
|
+
line-height: ${No};
|
|
166
|
+
text-transform: ${vo};
|
|
173
167
|
}
|
|
168
|
+
|
|
174
169
|
`,Qo=bt`
|
|
175
|
-
.ft-typography--
|
|
176
|
-
font-family: ${So};
|
|
177
|
-
font-size: ${
|
|
178
|
-
font-weight: ${
|
|
179
|
-
letter-spacing: ${
|
|
180
|
-
line-height: ${
|
|
181
|
-
text-transform: ${
|
|
170
|
+
.ft-typography--body1 {
|
|
171
|
+
font-family: ${So.fontFamily};
|
|
172
|
+
font-size: ${So.fontSize};
|
|
173
|
+
font-weight: ${So.fontWeight};
|
|
174
|
+
letter-spacing: ${So.letterSpacing};
|
|
175
|
+
line-height: ${So.lineHeight};
|
|
176
|
+
text-transform: ${So.textTransform};
|
|
182
177
|
}
|
|
183
178
|
`,tr=bt`
|
|
184
|
-
.ft-typography--
|
|
185
|
-
font-family: ${
|
|
186
|
-
font-size: ${
|
|
187
|
-
font-weight: ${
|
|
188
|
-
letter-spacing: ${
|
|
189
|
-
line-height: ${
|
|
190
|
-
text-transform: ${Uo
|
|
179
|
+
.ft-typography--body2 {
|
|
180
|
+
font-family: ${wo};
|
|
181
|
+
font-size: ${Co};
|
|
182
|
+
font-weight: ${$o};
|
|
183
|
+
letter-spacing: ${Eo};
|
|
184
|
+
line-height: ${Ro};
|
|
185
|
+
text-transform: ${Uo};
|
|
191
186
|
}
|
|
192
187
|
`,er=bt`
|
|
193
|
-
.ft-typography--
|
|
194
|
-
font-family: ${Io};
|
|
195
|
-
font-size: ${
|
|
196
|
-
font-weight: ${
|
|
197
|
-
letter-spacing: ${
|
|
198
|
-
line-height: ${
|
|
199
|
-
text-transform: ${
|
|
188
|
+
.ft-typography--caption {
|
|
189
|
+
font-family: ${Io.fontFamily};
|
|
190
|
+
font-size: ${Io.fontSize};
|
|
191
|
+
font-weight: ${Io.fontWeight};
|
|
192
|
+
letter-spacing: ${Io.letterSpacing};
|
|
193
|
+
line-height: ${Io.lineHeight};
|
|
194
|
+
text-transform: ${Io.textTransform};
|
|
200
195
|
}
|
|
201
196
|
`,or=bt`
|
|
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: ${Wo};
|
|
199
|
+
font-size: ${ko};
|
|
200
|
+
font-weight: ${Lo};
|
|
201
|
+
letter-spacing: ${zo};
|
|
202
|
+
line-height: ${Ko};
|
|
203
|
+
text-transform: ${Zo};
|
|
209
204
|
}
|
|
210
205
|
`,rr=bt`
|
|
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: ${Fo};
|
|
208
|
+
font-size: ${Do};
|
|
209
|
+
font-weight: ${Mo};
|
|
210
|
+
letter-spacing: ${Ao};
|
|
211
|
+
line-height: ${Bo};
|
|
212
|
+
text-transform: ${Po};
|
|
218
213
|
}
|
|
219
214
|
`,ir=bt`
|
|
215
|
+
.ft-typography--button {
|
|
216
|
+
font-family: ${Ho};
|
|
217
|
+
font-size: ${jo};
|
|
218
|
+
font-weight: ${_o};
|
|
219
|
+
letter-spacing: ${To};
|
|
220
|
+
line-height: ${Go};
|
|
221
|
+
text-transform: ${Yo};
|
|
222
|
+
}
|
|
223
|
+
`,ar=bt`
|
|
220
224
|
.ft-typography {
|
|
221
225
|
vertical-align: inherit;
|
|
222
226
|
}
|
|
223
|
-
`,
|
|
227
|
+
`,nr=[Object.keys(Ne).map((t=>function(t){const e=Ne[t];return bt`
|
|
224
228
|
.ft-typography--${ut(t)} {
|
|
225
229
|
font-family: ${e.fontFamily};
|
|
226
230
|
font-size: ${e.fontSize};
|
|
@@ -229,20 +233,20 @@ const Fe=1,De=2,Me=t=>(...e)=>({_$litDirective$:t,values:e});let Ae=class{constr
|
|
|
229
233
|
line-height: ${e.lineHeight};
|
|
230
234
|
text-transform: ${e.textCase};
|
|
231
235
|
}
|
|
232
|
-
`}(t)))];var
|
|
233
|
-
<${
|
|
236
|
+
`}(t)))];var sr=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};class lr extends ke{constructor(){super(...arguments),this.variant=Ye.body1}render(){return this.element?Ge`
|
|
237
|
+
<${_e(this.element)}
|
|
234
238
|
class="ft-typography ft-typography--${this.variant}">
|
|
235
239
|
<slot></slot>
|
|
236
|
-
</${
|
|
237
|
-
`:
|
|
240
|
+
</${_e(this.element)}>
|
|
241
|
+
`:Ge`
|
|
238
242
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
239
|
-
`}}
|
|
243
|
+
`}}lr.styles=[Vo,Jo,qo,Xo,Qo,tr,er,or,rr,ir,ar,...nr],sr([C()],lr.prototype,"element",void 0),sr([C()],lr.prototype,"variant",void 0),I("ft-typography")(lr);
|
|
240
244
|
/**
|
|
241
245
|
* @license
|
|
242
246
|
* Copyright 2017 Google LLC
|
|
243
247
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
244
248
|
*/
|
|
245
|
-
class
|
|
249
|
+
class cr extends Be{constructor(t){if(super(t),this.et=X,t.type!==Me)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===X||null==t)return this.vt=void 0,this.et=t;if(t===q)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:[]}}}cr.directiveName="unsafeHTML",cr.resultType=1;const pr=Ae(cr);var fr,hr;!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=""}(fr||(fr={})),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=""}(hr||(hr={})),new Map([...["abw"].map((t=>[t,hr.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,hr.AUDIO])),...["avi"].map((t=>[t,hr.AVI])),...["chm","xhs"].map((t=>[t,hr.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,hr.CODE])),...["csv"].map((t=>[t,hr.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,hr.DITA])),...["epub"].map((t=>[t,hr.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,hr.EXCEL])),...["flac"].map((t=>[t,hr.FLAC])),...["gif"].map((t=>[t,hr.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,hr.GZIP])),...["html","htm","xhtml"].map((t=>[t,hr.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,hr.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,hr.JPEG])),...["json"].map((t=>[t,hr.JSON])),...["m4a","m4p"].map((t=>[t,hr.M4A])),...["mov","qt"].map((t=>[t,hr.MOV])),...["mp3"].map((t=>[t,hr.MP3])),...["mp4","m4v"].map((t=>[t,hr.MP4])),...["ogg","oga"].map((t=>[t,hr.OGG])),...["pdf","ps"].map((t=>[t,hr.PDF])),...["png"].map((t=>[t,hr.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,hr.POWERPOINT])),...["rar"].map((t=>[t,hr.RAR])),...["stp"].map((t=>[t,hr.STP])),...["txt","rtf","md","mdown"].map((t=>[t,hr.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,hr.VIDEO])),...["wav"].map((t=>[t,hr.WAV])),...["wma"].map((t=>[t,hr.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,hr.WORD])),...["xml","xsl","rdf"].map((t=>[t,hr.XML])),...["yaml","yml","x-yaml"].map((t=>[t,hr.YAML])),...["zip"].map((t=>[t,hr.ZIP]))]);const dr=me.create("--ft-icon-font-size","","SIZE","24px"),yr=me.extend("--ft-icon-fluid-topics-font-family","",me.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),gr=me.extend("--ft-icon-file-format-font-family","",me.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),ur=me.extend("--ft-icon-material-font-family","",me.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),br=me.create("--ft-icon-vertical-align","","UNKNOWN","unset"),mr=bt`
|
|
246
250
|
:host, i.ft-icon {
|
|
247
251
|
display: inline-flex;
|
|
248
252
|
align-items: center;
|
|
@@ -251,14 +255,14 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
251
255
|
}
|
|
252
256
|
|
|
253
257
|
:host {
|
|
254
|
-
width: ${
|
|
255
|
-
height: ${
|
|
258
|
+
width: ${dr};
|
|
259
|
+
height: ${dr};
|
|
256
260
|
}
|
|
257
261
|
|
|
258
262
|
i.ft-icon {
|
|
259
263
|
width: 100%;
|
|
260
264
|
height: 100%;
|
|
261
|
-
font-size: ${
|
|
265
|
+
font-size: ${dr};
|
|
262
266
|
line-height: 1;
|
|
263
267
|
font-weight: normal;
|
|
264
268
|
text-transform: none;
|
|
@@ -269,33 +273,33 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
269
273
|
text-rendering: auto;
|
|
270
274
|
-webkit-font-smoothing: antialiased;
|
|
271
275
|
-moz-osx-font-smoothing: grayscale;
|
|
272
|
-
vertical-align: ${
|
|
276
|
+
vertical-align: ${br};
|
|
273
277
|
}
|
|
274
278
|
|
|
275
279
|
i.ft-icon.ft-icon--fluid-topics {
|
|
276
|
-
font-family: ${
|
|
280
|
+
font-family: ${yr}, ft-icons, fticons, sans-serif;
|
|
277
281
|
|
|
278
282
|
/* Ugly fix because font is broken */
|
|
279
|
-
font-size: calc(0.75 * ${
|
|
280
|
-
line-height: ${
|
|
283
|
+
font-size: calc(0.75 * ${dr});
|
|
284
|
+
line-height: ${dr};
|
|
281
285
|
position: relative;
|
|
282
286
|
top: -4%;
|
|
283
287
|
justify-content: center;
|
|
284
288
|
}
|
|
285
289
|
|
|
286
290
|
.ft-icon--file-format {
|
|
287
|
-
font-family: ${
|
|
291
|
+
font-family: ${gr}, ft-mime, sans-serif;
|
|
288
292
|
}
|
|
289
293
|
|
|
290
294
|
.ft-icon--material {
|
|
291
|
-
font-family: ${
|
|
295
|
+
font-family: ${ur}, "Material Icons", sans-serif;
|
|
292
296
|
}
|
|
293
|
-
`;var
|
|
297
|
+
`;var xr;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(xr||(xr={}));var Or=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};class Nr extends ke{constructor(){super(...arguments),this.resolvedIcon=ee}render(){const t=this.variant&&Object.values(xr).includes(this.variant)?this.variant:xr.fluid_topics,e=t!==xr.material||!!this.value;return Qt`
|
|
294
298
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
295
|
-
${
|
|
299
|
+
${pr(this.resolvedIcon)}
|
|
296
300
|
<slot ?hidden=${e}></slot>
|
|
297
301
|
</i>
|
|
298
|
-
`}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
|
|
302
|
+
`}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 xr.file_format:this.resolvedIcon=null!==(t=hr[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case xr.material:this.resolvedIcon=this.value||ee;break;default:this.resolvedIcon=null!==(e=fr[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Nr.elementDefinitions={},Nr.styles=mr,Or([C()],Nr.prototype,"variant",void 0),Or([C()],Nr.prototype,"value",void 0),Or([$()],Nr.prototype,"resolvedIcon",void 0),Or([R("slot")],Nr.prototype,"slottedContent",void 0),I("ft-icon")(Nr);const vr=me.external(Se.colorOutline,"Design system"),Sr=me.external(Se.colorOnSurfaceMedium,"Design system"),wr=bt`
|
|
299
303
|
:host {
|
|
300
304
|
display: block;
|
|
301
305
|
}
|
|
@@ -306,14 +310,14 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
306
310
|
|
|
307
311
|
ft-icon {
|
|
308
312
|
transform: rotate(-45deg);
|
|
309
|
-
color: ${
|
|
313
|
+
color: ${vr};
|
|
310
314
|
}
|
|
311
315
|
|
|
312
316
|
.ft-resizer--dragging ft-icon,
|
|
313
317
|
.ft-resizer:hover ft-icon {
|
|
314
|
-
color: ${
|
|
318
|
+
color: ${Sr};
|
|
315
319
|
}
|
|
316
|
-
`;var
|
|
320
|
+
`;var Cr=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};class $r extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class Er extends ke{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=xr.material,this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return Qt`
|
|
317
321
|
<style>
|
|
318
322
|
.ft-resizer {
|
|
319
323
|
cursor: ${ut(this.cursor)}
|
|
@@ -324,25 +328,25 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
324
328
|
@touchstart=${this.initDragFromTouch}>
|
|
325
329
|
<ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
326
330
|
</div>
|
|
327
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let o=this.fixedWidth+t-this.startX,r=this.fixedHeight+e-this.startY;this.dispatchEvent(new
|
|
331
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let o=this.fixedWidth+t-this.startX,r=this.fixedHeight+e-this.startY;this.dispatchEvent(new $r(o,r))}}Er.elementDefinitions={"ft-icon":Nr},Er.styles=[ze,wr],Cr([C({type:Number})],Er.prototype,"initialWidth",void 0),Cr([C({type:Number})],Er.prototype,"initialHeight",void 0),Cr([C()],Er.prototype,"icon",void 0),Cr([C()],Er.prototype,"iconVariant",void 0),Cr([C()],Er.prototype,"cursor",void 0),Cr([$()],Er.prototype,"dragging",void 0),I("ft-resizer")(Er);const Rr={fontSize:me.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:me.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:me.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:me.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:me.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:me.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:me.extend("--ft-input-label-border-color","",Se.colorOutline),textColor:me.extend("--ft-input-label-text-color","",Se.colorOnSurfaceMedium),disabledTextColor:me.extend("--ft-input-label-disabled-text-color","",Se.colorOnSurfaceDisabled),colorSurface:me.external(Se.colorSurface,"Design system"),borderRadiusS:me.external(Se.borderRadiusS,"Design system"),colorError:me.external(Se.colorError,"Design system")},Ur=bt`
|
|
328
332
|
.ft-input-label {
|
|
329
333
|
position: absolute;
|
|
330
334
|
inset: 0;
|
|
331
335
|
display: flex;
|
|
332
|
-
background-color: ${
|
|
333
|
-
border-radius: ${
|
|
336
|
+
background-color: ${Rr.colorSurface};
|
|
337
|
+
border-radius: ${Rr.borderRadiusS} ${Rr.borderRadiusS} 0 0;
|
|
334
338
|
}
|
|
335
339
|
|
|
336
340
|
.ft-input-label--outlined {
|
|
337
|
-
border-radius: ${
|
|
341
|
+
border-radius: ${Rr.borderRadiusS};
|
|
338
342
|
}
|
|
339
343
|
|
|
340
344
|
.ft-input-label {
|
|
341
|
-
border-color: ${
|
|
345
|
+
border-color: ${Rr.borderColor};
|
|
342
346
|
}
|
|
343
347
|
|
|
344
348
|
.ft-input-label.ft-input-label--in-error {
|
|
345
|
-
border-color: ${
|
|
349
|
+
border-color: ${Rr.colorError}
|
|
346
350
|
}
|
|
347
351
|
|
|
348
352
|
.ft-input-label:before,
|
|
@@ -355,7 +359,7 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
355
359
|
}
|
|
356
360
|
|
|
357
361
|
.ft-input-label:before {
|
|
358
|
-
width: calc(${
|
|
362
|
+
width: calc(${Rr.horizontalSpacing} - 4px);
|
|
359
363
|
flex-shrink: 0;
|
|
360
364
|
}
|
|
361
365
|
|
|
@@ -371,20 +375,20 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
371
375
|
border-bottom-width: 1px;
|
|
372
376
|
border-bottom-style: solid;
|
|
373
377
|
border-color: inherit;
|
|
374
|
-
color: ${
|
|
378
|
+
color: ${Rr.textColor};
|
|
375
379
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
376
|
-
max-width: calc(${
|
|
380
|
+
max-width: calc(${Rr.labelMaxWidth} - 2 * (${Rr.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
377
381
|
text-overflow: ellipsis;
|
|
378
|
-
${xe(
|
|
379
|
-
${xe(
|
|
382
|
+
${xe(Io.fontSize,Rr.fontSize)};
|
|
383
|
+
${xe(Io.lineHeight,Rr.fontSize)};
|
|
380
384
|
}
|
|
381
385
|
|
|
382
386
|
.ft-input-label--in-error .ft-input-label--text {
|
|
383
|
-
color: ${
|
|
387
|
+
color: ${Rr.colorError}
|
|
384
388
|
}
|
|
385
389
|
|
|
386
390
|
.ft-input-label--disabled .ft-input-label--text {
|
|
387
|
-
color: ${
|
|
391
|
+
color: ${Rr.disabledTextColor};
|
|
388
392
|
}
|
|
389
393
|
|
|
390
394
|
.ft-input-label--hidden-text {
|
|
@@ -401,19 +405,19 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
401
405
|
overflow: hidden;
|
|
402
406
|
white-space: nowrap;
|
|
403
407
|
text-overflow: ellipsis;
|
|
404
|
-
padding: ${
|
|
405
|
-
margin: calc(${
|
|
408
|
+
padding: ${Rr.verticalSpacing} 4px;
|
|
409
|
+
margin: calc(${Rr.verticalSpacing} * -1) 0;
|
|
406
410
|
max-width: 100%;
|
|
407
411
|
box-sizing: border-box;
|
|
408
412
|
}
|
|
409
413
|
|
|
410
414
|
.ft-input-label--raised .ft-input-label--text {
|
|
411
|
-
${xe(
|
|
412
|
-
${xe(
|
|
415
|
+
${xe(Io.fontSize,Rr.raisedFontSize)};
|
|
416
|
+
${xe(Io.lineHeight,Rr.raisedFontSize)};
|
|
413
417
|
}
|
|
414
418
|
|
|
415
419
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
416
|
-
top: ${
|
|
420
|
+
top: ${Rr.verticalSpacing};
|
|
417
421
|
}
|
|
418
422
|
|
|
419
423
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -426,28 +430,28 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
426
430
|
.ft-input-label--outlined:before {
|
|
427
431
|
border-left-width: 1px;
|
|
428
432
|
border-left-style: solid;
|
|
429
|
-
border-radius: ${
|
|
433
|
+
border-radius: ${Rr.borderRadiusS} 0 0 ${Rr.borderRadiusS};
|
|
430
434
|
}
|
|
431
435
|
|
|
432
436
|
.ft-input-label--outlined:after {
|
|
433
437
|
border-right-width: 1px;
|
|
434
438
|
border-right-style: solid;
|
|
435
|
-
border-radius: 0 ${
|
|
439
|
+
border-radius: 0 ${Rr.borderRadiusS} ${Rr.borderRadiusS} 0;
|
|
436
440
|
}
|
|
437
441
|
|
|
438
442
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
439
443
|
padding: 2px 4px;
|
|
440
|
-
z-index: ${
|
|
441
|
-
background-color: ${
|
|
442
|
-
border-radius: ${
|
|
444
|
+
z-index: ${Rr.raisedZIndex};
|
|
445
|
+
background-color: ${Rr.colorSurface};
|
|
446
|
+
border-radius: ${Rr.borderRadiusS};
|
|
443
447
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
444
448
|
}
|
|
445
449
|
|
|
446
450
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
447
451
|
border-top: none;
|
|
448
452
|
}
|
|
449
|
-
`;var
|
|
450
|
-
<div class="${
|
|
453
|
+
`;var Ir=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};class Wr extends ke{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 Qt`
|
|
454
|
+
<div class="${Pe(t)}">
|
|
451
455
|
${this.text?Qt`
|
|
452
456
|
<div class="ft-input-label--text ft-typography--caption">
|
|
453
457
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -455,7 +459,7 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
455
459
|
</div>
|
|
456
460
|
`:null}
|
|
457
461
|
</div>
|
|
458
|
-
`}}
|
|
462
|
+
`}}Wr.elementDefinitions={},Wr.styles=[er,Ur],Ir([C({type:String})],Wr.prototype,"text",void 0),Ir([C({type:Boolean})],Wr.prototype,"raised",void 0),Ir([C({type:Boolean})],Wr.prototype,"outlined",void 0),Ir([C({type:Boolean})],Wr.prototype,"disabled",void 0),Ir([C({type:Boolean})],Wr.prototype,"error",void 0),I("ft-input-label")(Wr);const kr=me.extend("--ft-ripple-color","",Se.colorContent),Lr={color:kr,backgroundColor:me.extend("--ft-ripple-background-color","",kr),opacityContentOnSurfacePressed:me.external(Se.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:me.external(Se.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:me.external(Se.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:me.external(Se.opacityContentOnSurfaceSelected,"Design system"),borderRadius:me.create("--ft-ripple-border-radius","","SIZE","0px")},zr=me.extend("--ft-ripple-color","",Se.colorPrimary),Kr=zr,Zr=me.extend("--ft-ripple-background-color","",zr),Fr=me.extend("--ft-ripple-color","",Se.colorSecondary),Dr=Fr,Mr=me.extend("--ft-ripple-background-color","",Fr),Ar=bt`
|
|
459
463
|
:host {
|
|
460
464
|
display: contents;
|
|
461
465
|
}
|
|
@@ -468,7 +472,7 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
468
472
|
|
|
469
473
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
470
474
|
overflow: hidden;
|
|
471
|
-
border-radius: ${
|
|
475
|
+
border-radius: ${Lr.borderRadius};
|
|
472
476
|
}
|
|
473
477
|
|
|
474
478
|
.ft-ripple .ft-ripple--background,
|
|
@@ -502,27 +506,27 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
502
506
|
}
|
|
503
507
|
|
|
504
508
|
.ft-ripple .ft-ripple--background {
|
|
505
|
-
background-color: ${
|
|
509
|
+
background-color: ${Lr.backgroundColor};
|
|
506
510
|
}
|
|
507
511
|
|
|
508
512
|
.ft-ripple .ft-ripple--effect {
|
|
509
|
-
background-color: ${
|
|
513
|
+
background-color: ${Lr.color};
|
|
510
514
|
}
|
|
511
515
|
|
|
512
516
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
513
|
-
background-color: ${
|
|
517
|
+
background-color: ${Mr};
|
|
514
518
|
}
|
|
515
519
|
|
|
516
520
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
517
|
-
background-color: ${
|
|
521
|
+
background-color: ${Dr};
|
|
518
522
|
}
|
|
519
523
|
|
|
520
524
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
521
|
-
background-color: ${
|
|
525
|
+
background-color: ${Zr};
|
|
522
526
|
}
|
|
523
527
|
|
|
524
528
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
525
|
-
background-color: ${
|
|
529
|
+
background-color: ${Kr};
|
|
526
530
|
}
|
|
527
531
|
|
|
528
532
|
.ft-ripple .ft-ripple--background {
|
|
@@ -552,33 +556,33 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
552
556
|
}
|
|
553
557
|
|
|
554
558
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
555
|
-
opacity: ${
|
|
559
|
+
opacity: ${Lr.opacityContentOnSurfaceHover};
|
|
556
560
|
}
|
|
557
561
|
|
|
558
562
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
559
|
-
opacity: ${
|
|
563
|
+
opacity: ${Lr.opacityContentOnSurfaceSelected};
|
|
560
564
|
}
|
|
561
565
|
|
|
562
566
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
563
|
-
opacity: ${
|
|
567
|
+
opacity: ${Lr.opacityContentOnSurfaceFocused};
|
|
564
568
|
}
|
|
565
569
|
|
|
566
570
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
567
|
-
opacity: ${
|
|
571
|
+
opacity: ${Lr.opacityContentOnSurfacePressed};
|
|
568
572
|
transform: translate(-50%, -50%) scale(1);
|
|
569
573
|
}
|
|
570
|
-
`;var
|
|
574
|
+
`;var Br=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};class Pr extends ke{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:r,y:i}=this.getCoordinates(t),a=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!=r?r-a.x:a.width/2),this.originY=Math.round(null!=i?i-a.y:a.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 Qt`
|
|
571
575
|
<style>
|
|
572
576
|
.ft-ripple .ft-ripple--effect {
|
|
573
577
|
left: ${this.originX}px;
|
|
574
578
|
top: ${this.originY}px;
|
|
575
579
|
}
|
|
576
580
|
</style>
|
|
577
|
-
<div class="${
|
|
581
|
+
<div class="${Pe(t)}">
|
|
578
582
|
<div class="ft-ripple--background"></div>
|
|
579
583
|
<div class="ft-ripple--effect"></div>
|
|
580
584
|
</div>
|
|
581
|
-
`}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"),r=e("touchend","touchcancel"),i=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",r),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",i),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",r),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",i),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 r,i;return null!=e.x?({x:r,y:i}=e):null!=o.touches&&(r=o.touches[0].clientX,i=o.touches[0].clientY),{x:r,y:i}}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()}}
|
|
585
|
+
`}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"),r=e("touchend","touchcancel"),i=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",r),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",i),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",r),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",i),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 r,i;return null!=e.x?({x:r,y:i}=e):null!=o.touches&&(r=o.touches[0].clientX,i=o.touches[0].clientY),{x:r,y:i}}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()}}Pr.elementDefinitions={},Pr.styles=Ar,Br([C({type:Boolean})],Pr.prototype,"primary",void 0),Br([C({type:Boolean})],Pr.prototype,"secondary",void 0),Br([C({type:Boolean})],Pr.prototype,"unbounded",void 0),Br([C({type:Boolean})],Pr.prototype,"activated",void 0),Br([C({type:Boolean})],Pr.prototype,"selected",void 0),Br([C({type:Boolean})],Pr.prototype,"disabled",void 0),Br([$()],Pr.prototype,"hovered",void 0),Br([$()],Pr.prototype,"focused",void 0),Br([$()],Pr.prototype,"pressed",void 0),Br([$()],Pr.prototype,"rippling",void 0),Br([$()],Pr.prototype,"originX",void 0),Br([$()],Pr.prototype,"originY",void 0),Br([R(".ft-ripple")],Pr.prototype,"ripple",void 0),Br([R(".ft-ripple--effect")],Pr.prototype,"rippleEffect",void 0),I("ft-ripple")(Pr);const Hr={fontSize:me.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:me.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:me.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:me.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:me.extend("--ft-text-area-helper-color","",Se.colorOnSurfaceMedium),colorPrimary:me.external(Se.colorPrimary,"Design system"),colorOnSurface:me.external(Se.colorOnSurface,"Design system"),colorOnSurfaceDisabled:me.external(Se.colorOnSurfaceDisabled,"Design system"),borderRadiusS:me.external(Se.borderRadiusS,"Design system"),colorError:me.external(Se.colorError,"Design system")},jr=bt`
|
|
582
586
|
*:focus {
|
|
583
587
|
outline: none;
|
|
584
588
|
}
|
|
@@ -590,10 +594,10 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
590
594
|
}
|
|
591
595
|
|
|
592
596
|
ft-input-label {
|
|
593
|
-
${xe(
|
|
594
|
-
${xe(
|
|
595
|
-
${xe(
|
|
596
|
-
${xe(
|
|
597
|
+
${xe(Rr.fontSize,Hr.fontSize)};
|
|
598
|
+
${xe(Rr.raisedFontSize,Hr.labelSize)};
|
|
599
|
+
${xe(Rr.verticalSpacing,Hr.verticalSpacing)};
|
|
600
|
+
${xe(Rr.horizontalSpacing,Hr.horizontalSpacing)};
|
|
597
601
|
}
|
|
598
602
|
|
|
599
603
|
.ft-text-area--main-panel {
|
|
@@ -611,8 +615,8 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
611
615
|
}
|
|
612
616
|
|
|
613
617
|
.ft-text-area--input-panel ft-ripple {
|
|
614
|
-
${xe(
|
|
615
|
-
${xe(
|
|
618
|
+
${xe(Lr.opacityContentOnSurfaceHover,"0.08")};
|
|
619
|
+
${xe(Lr.opacityContentOnSurfacePressed,"0.04")};
|
|
616
620
|
}
|
|
617
621
|
|
|
618
622
|
.ft-text-area--input {
|
|
@@ -624,12 +628,12 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
624
628
|
align-self: stretch;
|
|
625
629
|
resize: none;
|
|
626
630
|
|
|
627
|
-
${xe(
|
|
628
|
-
${xe(
|
|
629
|
-
color: ${
|
|
631
|
+
${xe(So.fontSize,Hr.fontSize)};
|
|
632
|
+
${xe(So.lineHeight,Hr.fontSize)};
|
|
633
|
+
color: ${Hr.colorOnSurface};
|
|
630
634
|
|
|
631
|
-
padding: 0 ${
|
|
632
|
-
margin: calc(${
|
|
635
|
+
padding: 0 ${Hr.horizontalSpacing};
|
|
636
|
+
margin: calc(${Hr.verticalSpacing} + ${Hr.labelSize} / 2) 0 ${Hr.verticalSpacing} 0;
|
|
633
637
|
|
|
634
638
|
border: none;
|
|
635
639
|
background: none;
|
|
@@ -638,7 +642,7 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
638
642
|
}
|
|
639
643
|
|
|
640
644
|
.ft-text-area--disabled .ft-text-area--input {
|
|
641
|
-
color: ${
|
|
645
|
+
color: ${Hr.colorOnSurfaceDisabled};
|
|
642
646
|
}
|
|
643
647
|
|
|
644
648
|
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
@@ -646,49 +650,49 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
646
650
|
}
|
|
647
651
|
|
|
648
652
|
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
649
|
-
${xe(
|
|
650
|
-
${xe(
|
|
653
|
+
${xe(Rr.borderColor,Hr.colorPrimary)};
|
|
654
|
+
${xe(Rr.textColor,Hr.colorPrimary)};
|
|
651
655
|
}
|
|
652
656
|
|
|
653
657
|
.ft-text-area--filled .ft-text-area--input-panel {
|
|
654
|
-
border-radius: ${
|
|
658
|
+
border-radius: ${Hr.borderRadiusS} ${Hr.borderRadiusS} 0 0;
|
|
655
659
|
}
|
|
656
660
|
|
|
657
661
|
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
658
662
|
align-self: stretch;
|
|
659
|
-
margin-bottom: ${
|
|
660
|
-
margin-top: calc(${
|
|
663
|
+
margin-bottom: ${Hr.verticalSpacing};
|
|
664
|
+
margin-top: calc(${Hr.labelSize} + 2 * ${Hr.verticalSpacing});
|
|
661
665
|
}
|
|
662
666
|
|
|
663
667
|
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
664
|
-
border-radius: ${
|
|
668
|
+
border-radius: ${Hr.borderRadiusS};
|
|
665
669
|
}
|
|
666
670
|
|
|
667
671
|
.ft-text-area--helper-text {
|
|
668
|
-
padding: 0 12px 0 ${
|
|
669
|
-
color: ${
|
|
672
|
+
padding: 0 12px 0 ${Hr.horizontalSpacing};
|
|
673
|
+
color: ${Hr.helperColor};
|
|
670
674
|
}
|
|
671
675
|
|
|
672
676
|
.ft-text-area--in-error .ft-text-area--input,
|
|
673
677
|
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
674
|
-
color: ${
|
|
678
|
+
color: ${Hr.colorError};
|
|
675
679
|
}
|
|
676
680
|
|
|
677
681
|
ft-resizer {
|
|
678
682
|
position: absolute;
|
|
679
683
|
bottom: 0;
|
|
680
684
|
}
|
|
681
|
-
`;var
|
|
685
|
+
`;var _r=function(t,e,o,r){for(var i,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(e,o,n):i(e,o))||n);return a>3&&n&&Object.defineProperty(e,o,n),n};class Tr extends(function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Ke].form}constructor(...t){super(t),this[Ke]=this.attachInternals(),this[Ke].role=e}setFormValue(t){this[Ke].setFormValue(t)}}}(ke,"textbox")){constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){const t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return Qt`
|
|
682
686
|
<style>
|
|
683
687
|
.ft-text-area--main-panel {
|
|
684
|
-
height: calc(4 * ${
|
|
688
|
+
height: calc(4 * ${Hr.verticalSpacing} + ${Hr.labelSize} + ${Hr.fontSize} + ${this.height}px);
|
|
685
689
|
}
|
|
686
690
|
|
|
687
691
|
ft-resizer {
|
|
688
692
|
right: ${null!=this.textarea?this.textarea.offsetWidth-this.textarea.clientWidth:0}px;
|
|
689
693
|
}
|
|
690
694
|
</style>
|
|
691
|
-
<div class="${
|
|
695
|
+
<div class="${Pe(t)}">
|
|
692
696
|
<div class="ft-text-area--main-panel">
|
|
693
697
|
<ft-input-label text="${this.label}"
|
|
694
698
|
?disabled=${this.disabled}
|
|
@@ -720,4 +724,4 @@ class lr extends Ae{constructor(t){if(super(t),this.et=X,t.type!==De)throw Error
|
|
|
720
724
|
${this.helper}
|
|
721
725
|
</ft-typography>`:void 0}
|
|
722
726
|
</div>
|
|
723
|
-
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.requestUpdate()}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}
|
|
727
|
+
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.requestUpdate()}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}Tr.elementDefinitions={"ft-input-label":Wr,"ft-resizer":Er,"ft-ripple":Pr,"ft-typography":lr},Tr.styles=[Qo,jr],_r([C({type:String})],Tr.prototype,"label",void 0),_r([C({reflect:!0})],Tr.prototype,"value",void 0),_r([C({type:String})],Tr.prototype,"helper",void 0),_r([C({type:Boolean})],Tr.prototype,"outlined",void 0),_r([C({type:Boolean})],Tr.prototype,"disabled",void 0),_r([C({type:Boolean})],Tr.prototype,"error",void 0),_r([C({type:Number,reflect:!0})],Tr.prototype,"height",void 0),_r([R("textarea")],Tr.prototype,"textarea",void 0),_r([$()],Tr.prototype,"focused",void 0),I("ft-text-area")(Tr),t.FtTextArea=Tr,t.FtTextAreaCssVariables=Hr,t.styles=jr}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-text-area",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "A fluidtopics text field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-resizer": "1.1.
|
|
23
|
-
"@fluid-topics/ft-ripple": "1.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-resizer": "1.1.2",
|
|
23
|
+
"@fluid-topics/ft-ripple": "1.1.2",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.1.2",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "53ce99f657872582bca43cbb7ad691b239b22823"
|
|
28
28
|
}
|