@fluid-topics/ft-text-area 0.3.12 → 0.3.13
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.css.d.ts +14 -0
- package/build/ft-text-area.css.js +121 -0
- package/build/ft-text-area.d.ts +1 -20
- package/build/ft-text-area.js +7 -119
- package/build/ft-text-area.light.js +444 -444
- package/build/ft-text-area.min.js +447 -447
- package/build/ft-text-area.properties.d.ts +9 -0
- package/build/ft-text-area.properties.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +5 -5
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,s=new WeakMap,n=new WeakMap,a=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 a=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,a);const p={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,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,p),this._definitionsByClass.set(r,p);let h=i.call(o,t);h||(h=c(t),e.call(o,t,h)),this===window.customElements&&(n.set(r,p),p.standInClass=h);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),u(t,p,!0)}const x=this._whenDefinedPromises.get(t);return void 0!==x&&(x.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const p=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!p(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),p(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,r=o._getDefinition(e);return r?u(i,r):s.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.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)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,r),i.call(this,s,t,r)}else o.call(this,s,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!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.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},x=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=x.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,s=new WeakMap,n=new WeakMap,a=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 a=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,a);const p={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,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,p),this._definitionsByClass.set(r,p);let h=i.call(o,t);h||(h=c(t),e.call(o,t,h)),this===window.customElements&&(n.set(r,p),p.standInClass=h);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),u(t,p,!0)}const x=this._whenDefinedPromises.get(t);return void 0!==x&&(x.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const p=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!p(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),p(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,r=o._getDefinition(e);return r?u(i,r):s.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.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)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,r),i.call(this,s,t,r)}else o.call(this,s,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!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.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},x=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=x.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(Te){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -98,157 +98,175 @@ const yt=1,gt=2,vt=t=>(...e)=>({_$litDirective$:t,values:e});class bt{constructo
|
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright 2020 Google LLC
|
|
100
100
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
|
-
*/var Et
|
|
101
|
+
*/var Et;!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"}(Et||(Et={}));const kt=lt.extend("--ft-typography-font-family",ht.titleFont),Ct=lt.extend("--ft-typography-font-family",ht.contentFont),Rt={fontFamily:Ct,fontSize:lt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:lt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:lt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:lt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:lt.create("--ft-typography-text-transform","UNKNOWN","inherit")},zt=lt.extend("--ft-typography-title-font-family",kt),Mt=lt.extend("--ft-typography-title-font-size",Rt.fontSize,"20px"),Ut=lt.extend("--ft-typography-title-font-weight",Rt.fontWeight,"normal"),Ft=lt.extend("--ft-typography-title-letter-spacing",Rt.letterSpacing,"0.15px"),jt=lt.extend("--ft-typography-title-line-height",Rt.lineHeight,"1.2"),Dt=lt.extend("--ft-typography-title-text-transform",Rt.textTransform,"inherit"),Bt=lt.extend("--ft-typography-title-dense-font-family",kt),At=lt.extend("--ft-typography-title-dense-font-size",Rt.fontSize,"14px"),Lt=lt.extend("--ft-typography-title-dense-font-weight",Rt.fontWeight,"normal"),Tt=lt.extend("--ft-typography-title-dense-letter-spacing",Rt.letterSpacing,"0.105px"),Pt=lt.extend("--ft-typography-title-dense-line-height",Rt.lineHeight,"1.7"),_t=lt.extend("--ft-typography-title-dense-text-transform",Rt.textTransform,"inherit"),Wt=lt.extend("--ft-typography-subtitle1-font-family",Ct),It=lt.extend("--ft-typography-subtitle1-font-size",Rt.fontSize,"16px"),Ht=lt.extend("--ft-typography-subtitle1-font-weight",Rt.fontWeight,"600"),Kt=lt.extend("--ft-typography-subtitle1-letter-spacing",Rt.letterSpacing,"0.144px"),Zt=lt.extend("--ft-typography-subtitle1-line-height",Rt.lineHeight,"1.5"),Vt=lt.extend("--ft-typography-subtitle1-text-transform",Rt.textTransform,"inherit"),Jt=lt.extend("--ft-typography-subtitle2-font-family",Ct),qt=lt.extend("--ft-typography-subtitle2-font-size",Rt.fontSize,"14px"),Xt=lt.extend("--ft-typography-subtitle2-font-weight",Rt.fontWeight,"normal"),Yt=lt.extend("--ft-typography-subtitle2-letter-spacing",Rt.letterSpacing,"0.098px"),Gt=lt.extend("--ft-typography-subtitle2-line-height",Rt.lineHeight,"1.7"),Qt=lt.extend("--ft-typography-subtitle2-text-transform",Rt.textTransform,"inherit"),te={fontFamily:lt.extend("--ft-typography-body1-font-family",Ct),fontSize:lt.extend("--ft-typography-body1-font-size",Rt.fontSize,"16px"),fontWeight:lt.extend("--ft-typography-body1-font-weight",Rt.fontWeight,"normal"),letterSpacing:lt.extend("--ft-typography-body1-letter-spacing",Rt.letterSpacing,"0.496px"),lineHeight:lt.extend("--ft-typography-body1-line-height",Rt.lineHeight,"1.5"),textTransform:lt.extend("--ft-typography-body1-text-transform",Rt.textTransform,"inherit")},ee=lt.extend("--ft-typography-body2-font-family",Ct),ie=lt.extend("--ft-typography-body2-font-size",Rt.fontSize,"14px"),oe=lt.extend("--ft-typography-body2-font-weight",Rt.fontWeight,"normal"),re=lt.extend("--ft-typography-body2-letter-spacing",Rt.letterSpacing,"0.252px"),se=lt.extend("--ft-typography-body2-line-height",Rt.lineHeight,"1.4"),ne=lt.extend("--ft-typography-body2-text-transform",Rt.textTransform,"inherit"),ae={fontFamily:lt.extend("--ft-typography-caption-font-family",Ct),fontSize:lt.extend("--ft-typography-caption-font-size",Rt.fontSize,"12px"),fontWeight:lt.extend("--ft-typography-caption-font-weight",Rt.fontWeight,"normal"),letterSpacing:lt.extend("--ft-typography-caption-letter-spacing",Rt.letterSpacing,"0.396px"),lineHeight:lt.extend("--ft-typography-caption-line-height",Rt.lineHeight,"1.33"),textTransform:lt.extend("--ft-typography-caption-text-transform",Rt.textTransform,"inherit")},le=lt.extend("--ft-typography-breadcrumb-font-family",Ct),pe=lt.extend("--ft-typography-breadcrumb-font-size",Rt.fontSize,"10px"),he=lt.extend("--ft-typography-breadcrumb-font-weight",Rt.fontWeight,"normal"),ce=lt.extend("--ft-typography-breadcrumb-letter-spacing",Rt.letterSpacing,"0.33px"),fe=lt.extend("--ft-typography-breadcrumb-line-height",Rt.lineHeight,"1.6"),de=lt.extend("--ft-typography-breadcrumb-text-transform",Rt.textTransform,"inherit"),ue=lt.extend("--ft-typography-overline-font-family",Ct),xe=lt.extend("--ft-typography-overline-font-size",Rt.fontSize,"10px"),ye=lt.extend("--ft-typography-overline-font-weight",Rt.fontWeight,"normal"),ge=lt.extend("--ft-typography-overline-letter-spacing",Rt.letterSpacing,"1.5px"),ve=lt.extend("--ft-typography-overline-line-height",Rt.lineHeight,"1.6"),be=lt.extend("--ft-typography-overline-text-transform",Rt.textTransform,"uppercase"),me=lt.extend("--ft-typography-button-font-family",Ct),$e=lt.extend("--ft-typography-button-font-size",Rt.fontSize,"14px"),we=lt.extend("--ft-typography-button-font-weight",Rt.fontWeight,"600"),Oe=lt.extend("--ft-typography-button-letter-spacing",Rt.letterSpacing,"1.246px"),Se=lt.extend("--ft-typography-button-line-height",Rt.lineHeight,"1.15"),Ne=lt.extend("--ft-typography-button-text-transform",Rt.textTransform,"uppercase"),Ee=d`
|
|
102
102
|
.ft-typography--title {
|
|
103
|
-
font-family: ${
|
|
104
|
-
font-size: ${
|
|
105
|
-
font-weight: ${
|
|
106
|
-
letter-spacing: ${
|
|
107
|
-
line-height: ${
|
|
108
|
-
text-transform: ${
|
|
103
|
+
font-family: ${zt};
|
|
104
|
+
font-size: ${Mt};
|
|
105
|
+
font-weight: ${Ut};
|
|
106
|
+
letter-spacing: ${Ft};
|
|
107
|
+
line-height: ${jt};
|
|
108
|
+
text-transform: ${Dt};
|
|
109
109
|
}
|
|
110
|
-
`,
|
|
110
|
+
`,ke=d`
|
|
111
111
|
.ft-typography--title-dense {
|
|
112
|
-
font-family: ${
|
|
113
|
-
font-size: ${
|
|
114
|
-
font-weight: ${
|
|
115
|
-
letter-spacing: ${
|
|
116
|
-
line-height: ${
|
|
117
|
-
text-transform: ${
|
|
112
|
+
font-family: ${Bt};
|
|
113
|
+
font-size: ${At};
|
|
114
|
+
font-weight: ${Lt};
|
|
115
|
+
letter-spacing: ${Tt};
|
|
116
|
+
line-height: ${Pt};
|
|
117
|
+
text-transform: ${_t};
|
|
118
118
|
}
|
|
119
|
-
`,
|
|
119
|
+
`,Ce=d`
|
|
120
120
|
.ft-typography--subtitle1 {
|
|
121
|
-
font-family: ${
|
|
122
|
-
font-size: ${
|
|
123
|
-
font-weight: ${
|
|
124
|
-
letter-spacing: ${
|
|
125
|
-
line-height: ${
|
|
126
|
-
text-transform: ${
|
|
121
|
+
font-family: ${Wt};
|
|
122
|
+
font-size: ${It};
|
|
123
|
+
font-weight: ${Ht};
|
|
124
|
+
letter-spacing: ${Kt};
|
|
125
|
+
line-height: ${Zt};
|
|
126
|
+
text-transform: ${Vt};
|
|
127
127
|
}
|
|
128
|
-
`,
|
|
128
|
+
`,Re=d`
|
|
129
129
|
.ft-typography--subtitle2 {
|
|
130
|
-
font-family: ${
|
|
131
|
-
font-size: ${
|
|
132
|
-
font-weight: ${
|
|
133
|
-
letter-spacing: ${
|
|
134
|
-
line-height: ${
|
|
135
|
-
text-transform: ${
|
|
130
|
+
font-family: ${Jt};
|
|
131
|
+
font-size: ${qt};
|
|
132
|
+
font-weight: ${Xt};
|
|
133
|
+
letter-spacing: ${Yt};
|
|
134
|
+
line-height: ${Gt};
|
|
135
|
+
text-transform: ${Qt};
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
`,
|
|
138
|
+
`,ze=d`
|
|
139
139
|
.ft-typography--body1 {
|
|
140
|
-
font-family: ${
|
|
141
|
-
font-size: ${
|
|
142
|
-
font-weight: ${
|
|
143
|
-
letter-spacing: ${
|
|
144
|
-
line-height: ${
|
|
145
|
-
text-transform: ${
|
|
140
|
+
font-family: ${te.fontFamily};
|
|
141
|
+
font-size: ${te.fontSize};
|
|
142
|
+
font-weight: ${te.fontWeight};
|
|
143
|
+
letter-spacing: ${te.letterSpacing};
|
|
144
|
+
line-height: ${te.lineHeight};
|
|
145
|
+
text-transform: ${te.textTransform};
|
|
146
146
|
}
|
|
147
|
-
`,
|
|
147
|
+
`,Me=d`
|
|
148
148
|
.ft-typography--body2 {
|
|
149
|
-
font-family: ${
|
|
150
|
-
font-size: ${
|
|
151
|
-
font-weight: ${
|
|
152
|
-
letter-spacing: ${
|
|
153
|
-
line-height: ${
|
|
154
|
-
text-transform: ${
|
|
149
|
+
font-family: ${ee};
|
|
150
|
+
font-size: ${ie};
|
|
151
|
+
font-weight: ${oe};
|
|
152
|
+
letter-spacing: ${re};
|
|
153
|
+
line-height: ${se};
|
|
154
|
+
text-transform: ${ne};
|
|
155
155
|
}
|
|
156
|
-
`,
|
|
156
|
+
`,Ue=d`
|
|
157
157
|
.ft-typography--caption {
|
|
158
|
-
font-family: ${
|
|
159
|
-
font-size: ${
|
|
160
|
-
font-weight: ${
|
|
161
|
-
letter-spacing: ${
|
|
162
|
-
line-height: ${
|
|
163
|
-
text-transform: ${
|
|
158
|
+
font-family: ${ae.fontFamily};
|
|
159
|
+
font-size: ${ae.fontSize};
|
|
160
|
+
font-weight: ${ae.fontWeight};
|
|
161
|
+
letter-spacing: ${ae.letterSpacing};
|
|
162
|
+
line-height: ${ae.lineHeight};
|
|
163
|
+
text-transform: ${ae.textTransform};
|
|
164
164
|
}
|
|
165
|
-
`,
|
|
165
|
+
`,Fe=d`
|
|
166
166
|
.ft-typography--breadcrumb {
|
|
167
|
-
font-family: ${
|
|
168
|
-
font-size: ${
|
|
169
|
-
font-weight: ${
|
|
170
|
-
letter-spacing: ${
|
|
171
|
-
line-height: ${
|
|
172
|
-
text-transform: ${
|
|
167
|
+
font-family: ${le};
|
|
168
|
+
font-size: ${pe};
|
|
169
|
+
font-weight: ${he};
|
|
170
|
+
letter-spacing: ${ce};
|
|
171
|
+
line-height: ${fe};
|
|
172
|
+
text-transform: ${de};
|
|
173
173
|
}
|
|
174
|
-
`,
|
|
174
|
+
`,je=d`
|
|
175
175
|
.ft-typography--overline {
|
|
176
|
-
font-family: ${
|
|
177
|
-
font-size: ${
|
|
178
|
-
font-weight: ${
|
|
179
|
-
letter-spacing: ${
|
|
180
|
-
line-height: ${
|
|
181
|
-
text-transform: ${
|
|
176
|
+
font-family: ${ue};
|
|
177
|
+
font-size: ${xe};
|
|
178
|
+
font-weight: ${ye};
|
|
179
|
+
letter-spacing: ${ge};
|
|
180
|
+
line-height: ${ve};
|
|
181
|
+
text-transform: ${be};
|
|
182
182
|
}
|
|
183
|
-
`,
|
|
183
|
+
`,De=d`
|
|
184
184
|
.ft-typography--button {
|
|
185
|
-
font-family: ${
|
|
186
|
-
font-size: ${
|
|
187
|
-
font-weight: ${
|
|
188
|
-
letter-spacing: ${
|
|
189
|
-
line-height: ${
|
|
190
|
-
text-transform: ${
|
|
191
|
-
}
|
|
192
|
-
|
|
185
|
+
font-family: ${me};
|
|
186
|
+
font-size: ${$e};
|
|
187
|
+
font-weight: ${we};
|
|
188
|
+
letter-spacing: ${Oe};
|
|
189
|
+
line-height: ${Se};
|
|
190
|
+
text-transform: ${Ne};
|
|
191
|
+
}
|
|
192
|
+
`,Be=d`
|
|
193
|
+
.ft-typography {
|
|
194
|
+
vertical-align: inherit;
|
|
195
|
+
}
|
|
196
|
+
`;var Ae=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class Le extends ft{constructor(){super(...arguments),this.variant=Et.body1}render(){return this.element?Nt`
|
|
193
197
|
<${Ot(this.element)}
|
|
194
198
|
class="ft-typography ft-typography--${this.variant}">
|
|
195
199
|
<slot></slot>
|
|
196
200
|
</${Ot(this.element)}>
|
|
197
201
|
`:Nt`
|
|
198
202
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
199
|
-
`}}
|
|
200
|
-
.ft-typography {
|
|
201
|
-
vertical-align: inherit;
|
|
202
|
-
}
|
|
203
|
-
`],kt([o()],Ae.prototype,"element",void 0),kt([o()],Ae.prototype,"variant",void 0),a("ft-typography")(Ae);
|
|
203
|
+
`}}Le.styles=[Ee,ke,Ce,Re,ze,Me,Ue,Fe,je,De,Be],Ae([o()],Le.prototype,"element",void 0),Ae([o()],Le.prototype,"variant",void 0),a("ft-typography")(Le);
|
|
204
204
|
/**
|
|
205
205
|
* @license
|
|
206
206
|
* Copyright 2017 Google LLC
|
|
207
207
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
208
208
|
*/
|
|
209
|
-
class
|
|
209
|
+
class Te extends bt{constructor(t){if(super(t),this.it=I,t.type!==gt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===I||null==t)return this._t=void 0,this.it=t;if(t===W)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Te.directiveName="unsafeHTML",Te.resultType=1;const Pe=vt(Te);var _e,We;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(_e||(_e={})),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=""}(We||(We={})),new Map([...["abw"].map((t=>[t,We.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,We.AUDIO])),...["avi"].map((t=>[t,We.AVI])),...["chm","xhs"].map((t=>[t,We.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,We.CODE])),...["csv"].map((t=>[t,We.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,We.DITA])),...["epub"].map((t=>[t,We.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,We.EXCEL])),...["flac"].map((t=>[t,We.FLAC])),...["gif"].map((t=>[t,We.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,We.GZIP])),...["html","htm","xhtml"].map((t=>[t,We.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,We.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,We.JPEG])),...["json"].map((t=>[t,We.JSON])),...["m4a","m4p"].map((t=>[t,We.M4A])),...["mov","qt"].map((t=>[t,We.MOV])),...["mp3"].map((t=>[t,We.MP3])),...["mp4","m4v"].map((t=>[t,We.MP4])),...["ogg","oga"].map((t=>[t,We.OGG])),...["pdf","ps"].map((t=>[t,We.PDF])),...["png"].map((t=>[t,We.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,We.POWERPOINT])),...["rar"].map((t=>[t,We.RAR])),...["stp"].map((t=>[t,We.STP])),...["txt","rtf","md","mdown"].map((t=>[t,We.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,We.VIDEO])),...["wav"].map((t=>[t,We.WAV])),...["wma"].map((t=>[t,We.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,We.WORD])),...["xml","xsl","rdf"].map((t=>[t,We.XML])),...["yaml","yml","x-yaml"].map((t=>[t,We.YAML])),...["zip"].map((t=>[t,We.ZIP]))]);const Ie=lt.create("--ft-icon-font-size","SIZE","24px"),He=lt.extend("--ft-icon-fluid-topics-font-family",lt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Ke=lt.extend("--ft-icon-file-format-font-family",lt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Ze=lt.extend("--ft-icon-material-font-family",lt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Ve=lt.create("--ft-icon-vertical-align","UNKNOWN","unset"),Je=d`
|
|
210
|
+
:host {
|
|
211
|
+
display: inline-block;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host, i.ft-icon {
|
|
215
|
+
width: ${Ie};
|
|
216
|
+
height: ${Ie};
|
|
217
|
+
text-align: center;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
i.ft-icon {
|
|
221
|
+
font-size: ${Ie};
|
|
222
|
+
line-height: 1;
|
|
223
|
+
font-weight: normal;
|
|
224
|
+
text-transform: none;
|
|
225
|
+
font-style: normal;
|
|
226
|
+
font-variant: normal;
|
|
227
|
+
speak: none;
|
|
228
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
229
|
+
text-rendering: auto;
|
|
230
|
+
-webkit-font-smoothing: antialiased;
|
|
231
|
+
-moz-osx-font-smoothing: grayscale;
|
|
232
|
+
vertical-align: ${Ve};
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ft-icon--fluid-topics {
|
|
236
|
+
font-family: ${He}, ft-icons, fticons, sans-serif;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.ft-icon--file-format {
|
|
240
|
+
font-family: ${Ke}, ft-mime, sans-serif;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.ft-icon--material {
|
|
244
|
+
font-family: ${Ze}, "Material Icons", sans-serif;
|
|
245
|
+
}
|
|
246
|
+
`;var qe;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(qe||(qe={}));var Xe=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class Ye extends ft{constructor(){super(...arguments),this.variant=qe.fluid_topics,this.resolvedIcon=I}render(){const t="material"!==this.variant||this.value;return _`
|
|
210
247
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
211
|
-
${
|
|
248
|
+
${Pe(this.resolvedIcon)}
|
|
212
249
|
<slot ?hidden=${t}></slot>
|
|
213
250
|
</i>
|
|
214
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
234
|
-
text-rendering: auto;
|
|
235
|
-
-webkit-font-smoothing: antialiased;
|
|
236
|
-
-moz-osx-font-smoothing: grayscale;
|
|
237
|
-
vertical-align: ${Je};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.ft-icon--fluid-topics {
|
|
241
|
-
font-family: ${Ke}, ft-icons, fticons, sans-serif;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.ft-icon--file-format {
|
|
245
|
-
font-family: ${Ze}, ft-mime, sans-serif;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.ft-icon--material {
|
|
249
|
-
font-family: ${Ve}, "Material Icons", sans-serif;
|
|
250
|
-
}
|
|
251
|
-
`,Ie([o()],qe.prototype,"variant",void 0),Ie([o()],qe.prototype,"value",void 0),Ie([r()],qe.prototype,"resolvedIcon",void 0),Ie([s("slot")],qe.prototype,"slottedContent",void 0),a("ft-icon")(qe);var Xe=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class Ye extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}const Ge=lt.external(ht.colorOutline,"Design system"),Qe=lt.external(ht.colorOnSurfaceMedium,"Design system");class ti extends ft{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",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 _`
|
|
251
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case qe.file_format:this.resolvedIcon=null!==(t=We[i.toUpperCase()])&&void 0!==t?t:i;break;case qe.fluid_topics:this.resolvedIcon=null!==(e=_e[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||I}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Ye.elementDefinitions={},Ye.styles=Je,Xe([o()],Ye.prototype,"variant",void 0),Xe([o()],Ye.prototype,"value",void 0),Xe([r()],Ye.prototype,"resolvedIcon",void 0),Xe([s("slot")],Ye.prototype,"slottedContent",void 0),a("ft-icon")(Ye);const Ge=lt.external(ht.colorOutline,"Design system"),Qe=lt.external(ht.colorOnSurfaceMedium,"Design system"),ti=d`
|
|
252
|
+
:host {
|
|
253
|
+
display: block;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ft-resizer {
|
|
257
|
+
display: flex;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
ft-icon {
|
|
261
|
+
transform: rotate(-45deg);
|
|
262
|
+
color: ${Ge};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.ft-resizer--dragging ft-icon,
|
|
266
|
+
.ft-resizer:hover ft-icon {
|
|
267
|
+
color: ${Qe};
|
|
268
|
+
}
|
|
269
|
+
`;var ei=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class ii extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class oi extends ft{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",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 _`
|
|
252
270
|
<style>
|
|
253
271
|
.ft-resizer {
|
|
254
272
|
cursor: ${f(this.cursor)}
|
|
@@ -259,25 +277,123 @@ class Le extends bt{constructor(t){if(super(t),this.it=I,t.type!==gt)throw Error
|
|
|
259
277
|
@touchstart=${this.initDragFromTouch}>
|
|
260
278
|
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
261
279
|
</div>
|
|
262
|
-
`}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 i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
`}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 i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new ii(i,o))}}oi.elementDefinitions={"ft-icon":Ye},oi.styles=[dt,ti],ei([o({type:Number})],oi.prototype,"initialWidth",void 0),ei([o({type:Number})],oi.prototype,"initialHeight",void 0),ei([o()],oi.prototype,"icon",void 0),ei([o()],oi.prototype,"cursor",void 0),ei([r()],oi.prototype,"dragging",void 0),a("ft-resizer")(oi);const ri={fontSize:lt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:lt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:lt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:lt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:lt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:lt.extend("--ft-input-label-border-color",ht.colorOutline),textColor:lt.extend("--ft-input-label-text-color",ht.colorOnSurfaceMedium),disabledTextColor:lt.extend("--ft-input-label-disabled-text-color",ht.colorOnSurfaceDisabled),colorSurface:lt.external(ht.colorSurface,"Design system"),borderRadiusS:lt.external(ht.borderRadiusS,"Design system"),colorError:lt.external(ht.colorError,"Design system")},si=d`
|
|
281
|
+
.ft-input-label {
|
|
282
|
+
position: absolute;
|
|
283
|
+
inset: 0;
|
|
284
|
+
display: flex;
|
|
285
|
+
background-color: ${ri.colorSurface};
|
|
286
|
+
border-radius: ${ri.borderRadiusS} ${ri.borderRadiusS} 0 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.ft-input-label--outlined {
|
|
290
|
+
border-radius: ${ri.borderRadiusS};
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ft-input-label {
|
|
294
|
+
border-color: ${ri.borderColor};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.ft-input-label.ft-input-label--in-error {
|
|
298
|
+
border-color: ${ri.colorError}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.ft-input-label:before,
|
|
302
|
+
.ft-input-label:after {
|
|
303
|
+
content: "";
|
|
304
|
+
display: flex;
|
|
305
|
+
border-bottom-width: 1px;
|
|
306
|
+
border-bottom-style: solid;
|
|
307
|
+
border-color: inherit;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ft-input-label:before {
|
|
311
|
+
width: ${ri.horizontalSpacing};
|
|
312
|
+
flex-shrink: 0;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.ft-input-label:after {
|
|
316
|
+
flex-grow: 1;
|
|
317
|
+
flex-shrink: 1;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.ft-input-label--text {
|
|
321
|
+
display: flex;
|
|
322
|
+
flex-shrink: 1;
|
|
323
|
+
position: relative;
|
|
324
|
+
border-bottom-width: 1px;
|
|
325
|
+
border-bottom-style: solid;
|
|
326
|
+
border-color: inherit;
|
|
327
|
+
color: ${ri.textColor};
|
|
328
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
329
|
+
${pt(ae.fontSize,ri.fontSize)};
|
|
330
|
+
${pt(ae.lineHeight,ri.fontSize)};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
334
|
+
color: ${ri.colorError}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
338
|
+
color: ${ri.disabledTextColor};
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.ft-input-label--hidden-text {
|
|
342
|
+
padding: 0 4px;
|
|
343
|
+
opacity: 0;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.ft-input-label--floating-text {
|
|
347
|
+
position: absolute;
|
|
348
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
349
|
+
transition: top 250ms;
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
white-space: nowrap;
|
|
352
|
+
text-overflow: ellipsis;
|
|
353
|
+
padding: ${ri.verticalSpacing} 4px;
|
|
354
|
+
margin: calc(${ri.verticalSpacing} * -1) 0;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
358
|
+
${pt(ae.fontSize,ri.raisedFontSize)};
|
|
359
|
+
${pt(ae.lineHeight,ri.raisedFontSize)};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
363
|
+
top: ${ri.verticalSpacing};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
367
|
+
.ft-input-label--outlined:before,
|
|
368
|
+
.ft-input-label--outlined:after {
|
|
369
|
+
border-top-width: 1px;
|
|
370
|
+
border-top-style: solid;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.ft-input-label--outlined:before {
|
|
374
|
+
border-left-width: 1px;
|
|
375
|
+
border-left-style: solid;
|
|
376
|
+
border-radius: ${ri.borderRadiusS} 0 0 ${ri.borderRadiusS};
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.ft-input-label--outlined:after {
|
|
380
|
+
border-right-width: 1px;
|
|
381
|
+
border-right-style: solid;
|
|
382
|
+
border-radius: 0 ${ri.borderRadiusS} ${ri.borderRadiusS} 0;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
386
|
+
padding: 2px 4px;
|
|
387
|
+
z-index: ${ri.raisedZIndex};
|
|
388
|
+
background-color: ${ri.colorSurface};
|
|
389
|
+
border-radius: ${ri.borderRadiusS};
|
|
390
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
394
|
+
border-top: none;
|
|
395
|
+
}
|
|
396
|
+
`;var ni=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class ai extends ft{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 _`
|
|
281
397
|
<div class="${mt(t)}">
|
|
282
398
|
${this.text?_`
|
|
283
399
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -286,123 +402,96 @@ class Le extends bt{constructor(t){if(super(t),this.it=I,t.type!==gt)throw Error
|
|
|
286
402
|
</div>
|
|
287
403
|
`:null}
|
|
288
404
|
</div>
|
|
289
|
-
`}}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
border-top-style: solid;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.ft-input-label--outlined:before {
|
|
383
|
-
border-left-width: 1px;
|
|
384
|
-
border-left-style: solid;
|
|
385
|
-
border-radius: ${ii.borderRadiusS} 0 0 ${ii.borderRadiusS};
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.ft-input-label--outlined:after {
|
|
389
|
-
border-right-width: 1px;
|
|
390
|
-
border-right-style: solid;
|
|
391
|
-
border-radius: 0 ${ii.borderRadiusS} ${ii.borderRadiusS} 0;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
395
|
-
padding: 2px 4px;
|
|
396
|
-
z-index: ${ii.raisedZIndex};
|
|
397
|
-
background-color: ${ii.colorSurface};
|
|
398
|
-
border-radius: ${ii.borderRadiusS};
|
|
399
|
-
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
403
|
-
border-top: none;
|
|
404
|
-
}
|
|
405
|
-
`],ei([o({type:String})],oi.prototype,"text",void 0),ei([o({type:Boolean})],oi.prototype,"raised",void 0),ei([o({type:Boolean})],oi.prototype,"outlined",void 0),ei([o({type:Boolean})],oi.prototype,"disabled",void 0),ei([o({type:Boolean})],oi.prototype,"error",void 0),a("ft-input-label")(oi);var ri=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const si=lt.extend("--ft-ripple-color",ht.colorContent),ni={color:si,backgroundColor:lt.extend("--ft-ripple-background-color",si),opacityContentOnSurfacePressed:lt.external(ht.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:lt.external(ht.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:lt.external(ht.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:lt.external(ht.opacityContentOnSurfaceSelected,"Design system")},ai=lt.extend("--ft-ripple-color",ht.colorPrimary),li=ai,pi=lt.extend("--ft-ripple-background-color",ai),hi=lt.extend("--ft-ripple-color",ht.colorSecondary),ci=hi,fi=lt.extend("--ft-ripple-background-color",hi);class di extends ft{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:r}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=r?r-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return _`
|
|
405
|
+
`}}ai.elementDefinitions={},ai.styles=[Ue,si],ni([o({type:String})],ai.prototype,"text",void 0),ni([o({type:Boolean})],ai.prototype,"raised",void 0),ni([o({type:Boolean})],ai.prototype,"outlined",void 0),ni([o({type:Boolean})],ai.prototype,"disabled",void 0),ni([o({type:Boolean})],ai.prototype,"error",void 0),a("ft-input-label")(ai);const li=lt.extend("--ft-ripple-color",ht.colorContent),pi={color:li,backgroundColor:lt.extend("--ft-ripple-background-color",li),opacityContentOnSurfacePressed:lt.external(ht.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:lt.external(ht.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:lt.external(ht.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:lt.external(ht.opacityContentOnSurfaceSelected,"Design system")},hi=lt.extend("--ft-ripple-color",ht.colorPrimary),ci=hi,fi=lt.extend("--ft-ripple-background-color",hi),di=lt.extend("--ft-ripple-color",ht.colorSecondary),ui=di,xi=lt.extend("--ft-ripple-background-color",di),yi=d`
|
|
406
|
+
:host {
|
|
407
|
+
display: contents;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.ft-ripple {
|
|
411
|
+
position: absolute;
|
|
412
|
+
inset: 0;
|
|
413
|
+
pointer-events: none;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
417
|
+
overflow: hidden;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.ft-ripple .ft-ripple--background,
|
|
421
|
+
.ft-ripple .ft-ripple--effect {
|
|
422
|
+
position: absolute;
|
|
423
|
+
opacity: 0;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.ft-ripple .ft-ripple--background {
|
|
427
|
+
background-color: ${pi.backgroundColor};
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.ft-ripple .ft-ripple--effect {
|
|
431
|
+
background-color: ${pi.color};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
435
|
+
background-color: ${xi};
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
439
|
+
background-color: ${ui};
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
443
|
+
background-color: ${fi};
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
447
|
+
background-color: ${ci};
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.ft-ripple .ft-ripple--background {
|
|
451
|
+
top: 0;
|
|
452
|
+
left: 0;
|
|
453
|
+
height: 100%;
|
|
454
|
+
width: 100%;
|
|
455
|
+
transition: opacity 75ms linear;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.ft-ripple .ft-ripple--effect,
|
|
459
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
460
|
+
border-radius: 50%;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.ft-ripple .ft-ripple--effect {
|
|
464
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
465
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
469
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
470
|
+
left: 50%;
|
|
471
|
+
top: 50%;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
475
|
+
transform: translate(-50%, -50%);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
479
|
+
opacity: ${pi.opacityContentOnSurfaceHover};
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
483
|
+
opacity: ${pi.opacityContentOnSurfaceSelected};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
487
|
+
opacity: ${pi.opacityContentOnSurfaceFocused};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
491
|
+
opacity: ${pi.opacityContentOnSurfacePressed};
|
|
492
|
+
transform: translate(-50%, -50%) scale(1);
|
|
493
|
+
}
|
|
494
|
+
`;var gi=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class vi extends ft{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:r}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=r?r-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return _`
|
|
406
495
|
<style>
|
|
407
496
|
.ft-ripple .ft-ripple--effect,
|
|
408
497
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -419,99 +508,111 @@ class Le extends bt{constructor(t){if(super(t),this.it=I,t.type!==gt)throw Error
|
|
|
419
508
|
<div class="ft-ripple--background"></div>
|
|
420
509
|
<div class="ft-ripple--effect"></div>
|
|
421
510
|
</div>
|
|
422
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),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",i),t.addEventListener("touchstart",o),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",i),t.removeEventListener("touchstart",o),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}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
.
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
.
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
}
|
|
511
|
-
|
|
511
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),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",i),t.addEventListener("touchstart",o),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",i),t.removeEventListener("touchstart",o),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}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}vi.elementDefinitions={},vi.styles=yi,gi([o({type:Boolean})],vi.prototype,"primary",void 0),gi([o({type:Boolean})],vi.prototype,"secondary",void 0),gi([o({type:Boolean})],vi.prototype,"unbounded",void 0),gi([o({type:Boolean})],vi.prototype,"activated",void 0),gi([o({type:Boolean})],vi.prototype,"selected",void 0),gi([o({type:Boolean})],vi.prototype,"disabled",void 0),gi([r()],vi.prototype,"hovered",void 0),gi([r()],vi.prototype,"focused",void 0),gi([r()],vi.prototype,"pressed",void 0),gi([r()],vi.prototype,"rippling",void 0),gi([r()],vi.prototype,"rippleSize",void 0),gi([r()],vi.prototype,"originX",void 0),gi([r()],vi.prototype,"originY",void 0),gi([s(".ft-ripple")],vi.prototype,"ripple",void 0),gi([s(".ft-ripple--effect")],vi.prototype,"rippleEffect",void 0),a("ft-ripple")(vi);const bi={fontSize:lt.create("--ft-text-area-font-size","SIZE","14px"),labelSize:lt.create("--ft-text-area-label-size","SIZE","11px"),verticalSpacing:lt.create("--ft-text-area-vertical-spacing","SIZE","4px"),horizontalSpacing:lt.create("--ft-text-area-horizontal-spacing","SIZE","16px"),helperColor:lt.extend("--ft-text-area-helper-color",ht.colorOnSurfaceMedium),colorPrimary:lt.external(ht.colorPrimary,"Design system"),colorOnSurface:lt.external(ht.colorOnSurface,"Design system"),colorOnSurfaceDisabled:lt.external(ht.colorOnSurfaceDisabled,"Design system"),borderRadiusS:lt.external(ht.borderRadiusS,"Design system"),colorError:lt.external(ht.colorError,"Design system")},mi=d`
|
|
512
|
+
*:focus {
|
|
513
|
+
outline: none;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.ft-text-area {
|
|
517
|
+
display: flex;
|
|
518
|
+
flex-direction: column;
|
|
519
|
+
align-items: stretch;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
ft-input-label {
|
|
523
|
+
${pt(ri.fontSize,bi.fontSize)};
|
|
524
|
+
${pt(ri.raisedFontSize,bi.labelSize)};
|
|
525
|
+
${pt(ri.verticalSpacing,bi.verticalSpacing)};
|
|
526
|
+
${pt(ri.horizontalSpacing,d`calc(${bi.horizontalSpacing} - 4px)`)};
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.ft-text-area--main-panel {
|
|
530
|
+
position: relative;
|
|
531
|
+
display: flex;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.ft-text-area--input-panel {
|
|
535
|
+
flex-grow: 1;
|
|
536
|
+
position: relative;
|
|
537
|
+
display: flex;
|
|
538
|
+
align-items: center;
|
|
539
|
+
overflow: hidden;
|
|
540
|
+
gap: 8px;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.ft-text-area--input-panel ft-ripple {
|
|
544
|
+
${pt(pi.opacityContentOnSurfaceHover,"0.08")};
|
|
545
|
+
${pt(pi.opacityContentOnSurfacePressed,"0.04")};
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.ft-text-area--input {
|
|
549
|
+
display: block;
|
|
550
|
+
position: relative;
|
|
551
|
+
flex-grow: 1;
|
|
552
|
+
flex-shrink: 1;
|
|
553
|
+
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
554
|
+
align-self: stretch;
|
|
555
|
+
resize: none;
|
|
556
|
+
|
|
557
|
+
${pt(te.fontSize,bi.fontSize)};
|
|
558
|
+
${pt(te.lineHeight,bi.fontSize)};
|
|
559
|
+
color: ${bi.colorOnSurface};
|
|
560
|
+
|
|
561
|
+
padding: 0 ${bi.horizontalSpacing};
|
|
562
|
+
margin: calc(${bi.verticalSpacing} + ${bi.labelSize} / 2) 0 ${bi.verticalSpacing} 0;
|
|
563
|
+
|
|
564
|
+
border: none;
|
|
565
|
+
background: none;
|
|
566
|
+
|
|
567
|
+
line-height: 1.4;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.ft-text-area--disabled .ft-text-area--input {
|
|
571
|
+
color: ${bi.colorOnSurfaceDisabled};
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
575
|
+
cursor: pointer;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
579
|
+
${pt(ri.borderColor,bi.colorPrimary)};
|
|
580
|
+
${pt(ri.textColor,bi.colorPrimary)};
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.ft-text-area--filled .ft-text-area--input-panel {
|
|
584
|
+
border-radius: ${bi.borderRadiusS} ${bi.borderRadiusS} 0 0;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
588
|
+
align-self: stretch;
|
|
589
|
+
margin-bottom: ${bi.verticalSpacing};
|
|
590
|
+
margin-top: calc(${bi.labelSize} + 2 * ${bi.verticalSpacing});
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
594
|
+
border-radius: ${bi.borderRadiusS};
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.ft-text-area--helper-text {
|
|
598
|
+
padding: 0 12px 0 ${bi.horizontalSpacing};
|
|
599
|
+
color: ${bi.helperColor};
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.ft-text-area--in-error .ft-text-area--input,
|
|
603
|
+
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
604
|
+
color: ${bi.colorError};
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
ft-resizer {
|
|
608
|
+
position: absolute;
|
|
609
|
+
right: 0;
|
|
610
|
+
bottom: 0;
|
|
611
|
+
}
|
|
612
|
+
`;var $i=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class wi extends ft{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 _`
|
|
512
613
|
<style>
|
|
513
614
|
.ft-text-area--main-panel {
|
|
514
|
-
height: calc(4 * ${
|
|
615
|
+
height: calc(4 * ${bi.verticalSpacing} + ${bi.labelSize} + ${bi.fontSize} + ${this.height}px);
|
|
515
616
|
}
|
|
516
617
|
</style>
|
|
517
618
|
<div class="${mt(t)}">
|
|
@@ -546,105 +647,4 @@ class Le extends bt{constructor(t){if(super(t),this.it=I,t.type!==gt)throw Error
|
|
|
546
647
|
${this.helper}
|
|
547
648
|
</ft-typography>`:void 0}
|
|
548
649
|
</div>
|
|
549
|
-
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}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)||""}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}
|
|
550
|
-
*:focus {
|
|
551
|
-
outline: none;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
.ft-text-area {
|
|
555
|
-
display: flex;
|
|
556
|
-
flex-direction: column;
|
|
557
|
-
align-items: stretch;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
ft-input-label {
|
|
561
|
-
${pt(ii.fontSize,xi.fontSize)};
|
|
562
|
-
${pt(ii.raisedFontSize,xi.labelSize)};
|
|
563
|
-
${pt(ii.verticalSpacing,xi.verticalSpacing)};
|
|
564
|
-
${pt(ii.horizontalSpacing,d`calc(${xi.horizontalSpacing} - 4px)`)};
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
.ft-text-area--main-panel {
|
|
568
|
-
position: relative;
|
|
569
|
-
display: flex;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.ft-text-area--input-panel {
|
|
573
|
-
flex-grow: 1;
|
|
574
|
-
position: relative;
|
|
575
|
-
display: flex;
|
|
576
|
-
align-items: center;
|
|
577
|
-
overflow: hidden;
|
|
578
|
-
gap: 8px;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.ft-text-area--input-panel ft-ripple {
|
|
582
|
-
${pt(ni.opacityContentOnSurfaceHover,"0.08")};
|
|
583
|
-
${pt(ni.opacityContentOnSurfacePressed,"0.04")};
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
.ft-text-area--input {
|
|
587
|
-
display: block;
|
|
588
|
-
position: relative;
|
|
589
|
-
flex-grow: 1;
|
|
590
|
-
flex-shrink: 1;
|
|
591
|
-
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
592
|
-
align-self: stretch;
|
|
593
|
-
resize: none;
|
|
594
|
-
|
|
595
|
-
${pt(ee.fontSize,xi.fontSize)};
|
|
596
|
-
${pt(ee.lineHeight,xi.fontSize)};
|
|
597
|
-
color: ${xi.colorOnSurface};
|
|
598
|
-
|
|
599
|
-
padding: 0 ${xi.horizontalSpacing};
|
|
600
|
-
margin: calc(${xi.verticalSpacing} + ${xi.labelSize} / 2) 0 ${xi.verticalSpacing} 0;
|
|
601
|
-
|
|
602
|
-
border: none;
|
|
603
|
-
background: none;
|
|
604
|
-
|
|
605
|
-
line-height: 1.4;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
.ft-text-area--disabled .ft-text-area--input {
|
|
609
|
-
color: ${xi.colorOnSurfaceDisabled};
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
613
|
-
cursor: pointer;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
617
|
-
${pt(ii.borderColor,xi.colorPrimary)};
|
|
618
|
-
${pt(ii.textColor,xi.colorPrimary)};
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
.ft-text-area--filled .ft-text-area--input-panel {
|
|
622
|
-
border-radius: ${xi.borderRadiusS} ${xi.borderRadiusS} 0 0;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
626
|
-
align-self: stretch;
|
|
627
|
-
margin-bottom: ${xi.verticalSpacing};
|
|
628
|
-
margin-top: calc(${xi.labelSize} + 2 * ${xi.verticalSpacing});
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
632
|
-
border-radius: ${xi.borderRadiusS};
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
.ft-text-area--helper-text {
|
|
636
|
-
padding: 0 12px 0 ${xi.horizontalSpacing};
|
|
637
|
-
color: ${xi.helperColor};
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
.ft-text-area--in-error .ft-text-area--input,
|
|
641
|
-
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
642
|
-
color: ${xi.colorError};
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
ft-resizer {
|
|
646
|
-
position: absolute;
|
|
647
|
-
right: 0;
|
|
648
|
-
bottom: 0;
|
|
649
|
-
}
|
|
650
|
-
`],ui([o({type:String})],yi.prototype,"label",void 0),ui([o({reflect:!0})],yi.prototype,"value",void 0),ui([o({type:String})],yi.prototype,"helper",void 0),ui([o({type:Boolean})],yi.prototype,"outlined",void 0),ui([o({type:Boolean})],yi.prototype,"disabled",void 0),ui([o({type:Boolean})],yi.prototype,"error",void 0),ui([o({type:Number,reflect:!0})],yi.prototype,"height",void 0),ui([s("textarea")],yi.prototype,"textarea",void 0),ui([r()],yi.prototype,"focused",void 0),a("ft-text-area")(yi),t.FtTextArea=yi,t.FtTextAreaCssVariables=xi,Object.defineProperty(t,"i",{value:!0})}({});
|
|
650
|
+
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}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)||""}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}wi.elementDefinitions={"ft-input-label":ai,"ft-resizer":oi,"ft-ripple":vi,"ft-typography":Le},wi.styles=[ze,mi],$i([o({type:String})],wi.prototype,"label",void 0),$i([o({reflect:!0})],wi.prototype,"value",void 0),$i([o({type:String})],wi.prototype,"helper",void 0),$i([o({type:Boolean})],wi.prototype,"outlined",void 0),$i([o({type:Boolean})],wi.prototype,"disabled",void 0),$i([o({type:Boolean})],wi.prototype,"error",void 0),$i([o({type:Number,reflect:!0})],wi.prototype,"height",void 0),$i([s("textarea")],wi.prototype,"textarea",void 0),$i([r()],wi.prototype,"focused",void 0),a("ft-text-area")(wi),t.FtTextArea=wi,t.FtTextAreaCssVariables=bi,t.styles=mi,Object.defineProperty(t,"i",{value:!0})}({});
|