@fluid-topics/ft-text-field 0.2.2 → 0.2.6
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-field.d.ts +12 -2
- package/build/ft-text-field.inline-styles.js +264 -166
- package/build/ft-text-field.js +88 -31
- package/build/ft-text-field.light.js +249 -156
- package/build/ft-text-field.min.js +260 -162
- package/package.json +6 -6
|
@@ -14,17 +14,17 @@
|
|
|
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,n=new WeakMap,
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,a=new Set(n.observedAttributes||[]);c(n,a,l);const p={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,p),this._definitionsByClass.set(n,p);let f=i.call(o,t);f||(f=h(t),e.call(o,t,f)),this===window.customElements&&(s.set(n,p),p.standInClass=f);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,p,!0)}const x=this._whenDefinedPromises.get(t);return void 0!==x&&(x.resolve(n),this._whenDefinedPromises.delete(t)),n}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=a;if(e)return a=void 0,e;const i=s.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),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const p=t=>t===document||t instanceof ShadowRoot,f=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=l.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=f(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},c=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.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),n.set(t,e),a=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&&l.set(t,this),y.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const b=(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(b(Element,"innerHTML"),b(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!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),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 s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(qe){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class t{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/const
|
|
22
|
+
*/const e=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function i(t){return(i,o)=>void 0!==o?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,i,o):e(t,i)
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/}function
|
|
27
|
+
*/}function o(t){return i({...t,state:!0})}
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
@@ -35,40 +35,40 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
37
|
*/
|
|
38
|
-
function
|
|
38
|
+
function n(t,e){return(({finisher:t,descriptor:e})=>(i,o)=>{var n;if(void 0===o){const o=null!==(n=i.originalKey)&&void 0!==n?n:i.key,r=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(r.finisher=function(e){t(e,o)}),r}{const n=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(n,o)}})({descriptor:i=>{const o={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[e]&&(this[e]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null),this[e]}}return o}})}
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2021 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/var
|
|
43
|
+
*/var r;null===(r=window.HTMLSlotElement)||void 0===r||r.prototype.assignedElements;const s=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)}
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2019 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
-
*/,
|
|
48
|
+
*/,l=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),p=new Map;class f{constructor(t,e){if(this._$cssResult$=!0,e!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=p.get(this.cssText);return l&&void 0===t&&(p.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const h=t=>new f("string"==typeof t?t:t+"",a),c=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new f(i,a)},d=(t,e)=>{l?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=window.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},u=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return h(e)})(t):t
|
|
49
49
|
/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/;var
|
|
53
|
+
*/;var x;const y=window.trustedTypes,g=y?y.emptyScript:"",b=window.reactiveElementPolyfillSupport,v={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),$={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:m};class w extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Eh(i,e);void 0!==o&&(this._$Eu.set(o,i),t.push(o))})),t}static createProperty(t,e=$){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||$}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return d(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=$){var o,n;const r=this.constructor._$Eh(t,i);if(void 0!==r&&!0===i.reflect){const s=(null!==(n=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==n?n:v.toAttribute)(e,i.type);this._$Ei=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$Ei=null}}_$AK(t,e){var i,o,n;const r=this.constructor,s=r._$Eu.get(t);if(void 0!==s&&this._$Ei!==s){const t=r.getPropertyOptions(s),l=t.converter,a=null!==(n=null!==(o=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==n?n:v.fromAttribute;this._$Ei=s,this[s]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
54
54
|
/**
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright 2017 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
58
|
*/
|
|
59
|
-
var w
|
|
59
|
+
var S;w.finalized=!0,w.elementProperties=new Map,w.elementStyles=[],w.shadowRootOptions={mode:"open"},null==b||b({ReactiveElement:w}),(null!==(x=globalThis.reactiveElementVersions)&&void 0!==x?x:globalThis.reactiveElementVersions=[]).push("1.3.2");const O=globalThis.trustedTypes,C=O?O.createPolicy("lit-html",{createHTML:t=>t}):void 0,k=`lit$${(Math.random()+"").slice(9)}$`,E="?"+k,N=`<${E}>`,R=document,M=(t="")=>R.createComment(t),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,z=Array.isArray,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,B=/>/g,D=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,A=/'/g,L=/"/g,T=/^(?:script|style|textarea|title)$/i,_=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),P=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),W=new WeakMap,H=R.createTreeWalker(R,129,null,!1),K=(t,e)=>{const i=t.length-1,o=[];let n,r=2===e?"<svg>":"",s=F;for(let e=0;e<i;e++){const i=t[e];let l,a,p=-1,f=0;for(;f<i.length&&(s.lastIndex=f,a=s.exec(i),null!==a);)f=s.lastIndex,s===F?"!--"===a[1]?s=j:void 0!==a[1]?s=B:void 0!==a[2]?(T.test(a[2])&&(n=RegExp("</"+a[2],"g")),s=D):void 0!==a[3]&&(s=D):s===D?">"===a[0]?(s=null!=n?n:F,p=-1):void 0===a[1]?p=-2:(p=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?D:'"'===a[3]?L:A):s===L||s===A?s=D:s===j||s===B?s=F:(s=D,n=void 0);const h=s===D&&t[e+1].startsWith("/>")?" ":"";r+=s===F?i+N:p>=0?(o.push(l),i.slice(0,p)+"$lit$"+i.slice(p)+k+h):i+k+(-2===p?(o.push(void 0),e):h)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==C?C.createHTML(l):l,o]};class Z{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,r=0;const s=t.length-1,l=this.parts,[a,p]=K(t,e);if(this.el=Z.createElement(a,i),H.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=H.nextNode())&&l.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(k)){const i=p[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(k),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?Y:"?"===e[1]?Q:"@"===e[1]?tt:J})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(T.test(o.tagName)){const t=o.textContent.split(k),e=t.length-1;if(e>0){o.textContent=O?O.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],M()),H.nextNode(),l.push({type:2,index:++n});o.append(t[e],M())}}}else if(8===o.nodeType)if(o.data===E)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)l.push({type:7,index:n}),t+=k.length-1}n++}}static createElement(t,e){const i=R.createElement("template");return i.innerHTML=t,i}}function V(t,e,i=t,o){var n,r,s,l;if(e===P)return e;let a=void 0!==o?null===(n=i._$Cl)||void 0===n?void 0:n[o]:i._$Cu;const p=U(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(s=(l=i)._$Cl)&&void 0!==s?s:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=V(t,a._$AS(t,e.values),a,o)),e}class q{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:R).importNode(i,!0);H.currentNode=n;let r=H.nextNode(),s=0,l=0,a=o[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new X(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new et(r,this,t)),this.v.push(e),a=o[++l]}s!==(null==a?void 0:a.index)&&(r=H.nextNode(),s++)}return n}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class X{constructor(t,e,i,o){var n;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=V(this,t,e),U(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==P&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var e;return z(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==I&&U(this._$AH)?this._$AA.nextSibling.data=t:this.k(R.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Z.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(i);else{const t=new q(n,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new Z(t)),e}S(t){z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new X(this.M(M()),this.M(M()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class J{constructor(t,e,i,o,n){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let r=!1;if(void 0===n)t=V(this,t,e,0),r=!U(t)||t!==this._$AH&&t!==P,r&&(this._$AH=t);else{const o=t;let s,l;for(t=n[0],s=0;s<n.length-1;s++)l=V(this,o[i+s],e,s),l===P&&(l=this._$AH[s]),r||(r=!U(l)||l!==this._$AH[s]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+n[s+1]),this._$AH[s]=l}r&&!o&&this.C(t)}C(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Y extends J{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===I?void 0:t}}const G=O?O.emptyScript:"";class Q extends J{constructor(){super(...arguments),this.type=4}C(t){t&&t!==I?this.element.setAttribute(this.name,G):this.element.removeAttribute(this.name)}}class tt extends J{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=V(this,t,e,0))&&void 0!==i?i:I)===P)return;const o=this._$AH,n=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==I&&(o===I||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const it=window.litHtmlPolyfillSupport;
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
var
|
|
65
|
+
var ot,nt;null==it||it(Z,X),(null!==(S=globalThis.litHtmlVersions)&&void 0!==S?S:globalThis.litHtmlVersions=[]).push("2.2.4");class rt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var o,n;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let s=r._$litPart$;if(void 0===s){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=s=new X(e.insertBefore(M(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return P}}rt.finalized=!0,rt._$litElement$=!0,null===(ot=globalThis.litElementHydrateSupport)||void 0===ot||ot.call(globalThis,{LitElement:rt});const st=globalThis.litElementPolyfillSupport;null==st||st({LitElement:rt}),(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.2.0");class lt{constructor(t,e,i,o,n){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=o,this.context=n,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,i){return new lt(t,e,void 0,i)}static extend(t,e,i){return new lt(t,e.category,e,i)}static external(t,e){return new lt(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return c`var(${h(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):h(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function at(t,e){return h(`${t.name}: ${e}`)}const pt={colorPrimary:lt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:lt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:lt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:lt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:lt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:lt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:lt.create("--ft-color-error","COLOR","#B00020"),colorOutline:lt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:lt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:lt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:lt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:lt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:lt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:lt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:lt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:lt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:lt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:lt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:lt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:lt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:lt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:lt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:lt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:lt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:lt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:lt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:lt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:lt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:lt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:lt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:lt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:lt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:lt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:lt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:lt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:lt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:lt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:lt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:lt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:lt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:lt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:lt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:lt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:lt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:lt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:lt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:lt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:lt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:lt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:lt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:lt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:lt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:lt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:lt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:lt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:lt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:lt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:lt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:lt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:lt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:lt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:lt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/class
|
|
71
|
-
${t.map((t=>
|
|
70
|
+
*/class ft extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return d(n,this.constructor.elementStyles),n}}}(rt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),_`
|
|
71
|
+
${t.map((t=>_`
|
|
72
72
|
<style>${t}</style>
|
|
73
73
|
`))}
|
|
74
74
|
${this.getTemplate()}
|
|
@@ -87,129 +87,128 @@ var it,ot;null==et||et(K,X),(null!==(w=globalThis.litHtmlVersions)&&void 0!==w?w
|
|
|
87
87
|
* Copyright 2017 Google LLC
|
|
88
88
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
89
89
|
*/
|
|
90
|
-
const
|
|
90
|
+
const dt=1,ut=2,xt=t=>(...e)=>({_$litDirective$:t,values:e});class yt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
91
91
|
/**
|
|
92
92
|
* @license
|
|
93
93
|
* Copyright 2018 Google LLC
|
|
94
94
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
95
|
-
*/
|
|
96
|
-
const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){var e;if(super(t),t.type!==ft||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const n=t.element.classList;this.st.forEach((t=>{t in e||(n.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(o=this.et)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.st.add(t)):(n.remove(t),this.st.delete(t)))}return _}}),ut=t=>({_$litStatic$:t}),yt=new Map,gt=(t=>(e,...i)=>{var o;const n=i.length;let s,r;const l=[],a=[];let p,h=0,c=!1;for(;h<n;){for(p=e[h];h<n&&void 0!==(r=i[h],s=null===(o=r)||void 0===o?void 0:o._$litStatic$);)p+=s+e[++h],c=!0;a.push(r),l.push(p),h++}if(h===n&&l.push(e[n]),c){const t=l.join("$$lit$$");void 0===(e=yt.get(t))&&(l.raw=l,yt.set(t,e=l)),i=a}return t(e,...i)})(P);
|
|
95
|
+
*/const gt=xt(class extends yt{constructor(t){var e;if(super(t),t.type!==dt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const n=t.element.classList;this.et.forEach((t=>{t in e||(n.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.et.add(t)):(n.remove(t),this.et.delete(t)))}return P}}),bt=Symbol.for(""),vt=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===bt)return null===(i=t)||void 0===i?void 0:i._$litStatic$},mt=t=>({_$litStatic$:t,r:bt}),$t=new Map,wt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],l=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(r=i[p],n=vt(r));)a+=n+e[++p],f=!0;l.push(r),s.push(a),p++}if(p===o&&s.push(e[o]),f){const t=s.join("$$lit$$");void 0===(e=$t.get(t))&&(s.raw=s,$t.set(t,e=s)),i=l}return t(e,...i)})(_);
|
|
97
96
|
/**
|
|
98
97
|
* @license
|
|
99
98
|
* Copyright 2020 Google LLC
|
|
100
99
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
|
-
*/var
|
|
100
|
+
*/var St,Ot=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};!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"}(St||(St={}));const Ct=lt.extend("--ft-typography-font-family",pt.titleFont),kt=lt.extend("--ft-typography-font-family",pt.contentFont),Et={fontFamily:kt,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","SIZE","24px"),textTransform:lt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Nt=lt.extend("--ft-typography-title-font-family",Ct),Rt=lt.extend("--ft-typography-title-font-size",Et.fontSize,"20px"),Mt=lt.extend("--ft-typography-title-font-weight",Et.fontWeight,"normal"),Ut=lt.extend("--ft-typography-title-letter-spacing",Et.letterSpacing,"0.15px"),zt=lt.extend("--ft-typography-title-line-height",Et.lineHeight,"24px"),Ft=lt.extend("--ft-typography-title-text-transform",Et.textTransform,"inherit"),jt=lt.extend("--ft-typography-title-dense-font-family",Ct),Bt=lt.extend("--ft-typography-title-dense-font-size",Et.fontSize,"14px"),Dt=lt.extend("--ft-typography-title-dense-font-weight",Et.fontWeight,"normal"),At=lt.extend("--ft-typography-title-dense-letter-spacing",Et.letterSpacing,"0.105px"),Lt=lt.extend("--ft-typography-title-dense-line-height",Et.lineHeight,"24px"),Tt=lt.extend("--ft-typography-title-dense-text-transform",Et.textTransform,"inherit"),_t=lt.extend("--ft-typography-subtitle1-font-family",kt),Pt=lt.extend("--ft-typography-subtitle1-font-size",Et.fontSize,"16px"),It=lt.extend("--ft-typography-subtitle1-font-weight",Et.fontWeight,"600"),Wt=lt.extend("--ft-typography-subtitle1-letter-spacing",Et.letterSpacing,"0.144px"),Ht=lt.extend("--ft-typography-subtitle1-line-height",Et.lineHeight,"24px"),Kt=lt.extend("--ft-typography-subtitle1-text-transform",Et.textTransform,"inherit"),Zt=lt.extend("--ft-typography-subtitle2-font-family",kt),Vt=lt.extend("--ft-typography-subtitle2-font-size",Et.fontSize,"14px"),qt=lt.extend("--ft-typography-subtitle2-font-weight",Et.fontWeight,"normal"),Xt=lt.extend("--ft-typography-subtitle2-letter-spacing",Et.letterSpacing,"0.098px"),Jt=lt.extend("--ft-typography-subtitle2-line-height",Et.lineHeight,"24px"),Yt=lt.extend("--ft-typography-subtitle2-text-transform",Et.textTransform,"inherit"),Gt={fontFamily:lt.extend("--ft-typography-body1-font-family",kt),fontSize:lt.extend("--ft-typography-body1-font-size",Et.fontSize,"16px"),fontWeight:lt.extend("--ft-typography-body1-font-weight",Et.fontWeight,"normal"),letterSpacing:lt.extend("--ft-typography-body1-letter-spacing",Et.letterSpacing,"0.496px"),lineHeight:lt.extend("--ft-typography-body1-line-height",Et.lineHeight,"24px"),textTransform:lt.extend("--ft-typography-body1-text-transform",Et.textTransform,"inherit")},Qt=lt.extend("--ft-typography-body2-font-family",kt),te=lt.extend("--ft-typography-body2-font-size",Et.fontSize,"14px"),ee=lt.extend("--ft-typography-body2-font-weight",Et.fontWeight,"normal"),ie=lt.extend("--ft-typography-body2-letter-spacing",Et.letterSpacing,"0.252px"),oe=lt.extend("--ft-typography-body2-line-height",Et.lineHeight,"20px"),ne=lt.extend("--ft-typography-body2-text-transform",Et.textTransform,"inherit"),re={fontFamily:lt.extend("--ft-typography-caption-font-family",kt),fontSize:lt.extend("--ft-typography-caption-font-size",Et.fontSize,"12px"),fontWeight:lt.extend("--ft-typography-caption-font-weight",Et.fontWeight,"normal"),letterSpacing:lt.extend("--ft-typography-caption-letter-spacing",Et.letterSpacing,"0.396px"),lineHeight:lt.extend("--ft-typography-caption-line-height",Et.lineHeight,"16px"),textTransform:lt.extend("--ft-typography-caption-text-transform",Et.textTransform,"inherit")},se=lt.extend("--ft-typography-breadcrumb-font-family",kt),le=lt.extend("--ft-typography-breadcrumb-font-size",Et.fontSize,"10px"),ae=lt.extend("--ft-typography-breadcrumb-font-weight",Et.fontWeight,"normal"),pe=lt.extend("--ft-typography-breadcrumb-letter-spacing",Et.letterSpacing,"0.33px"),fe=lt.extend("--ft-typography-breadcrumb-line-height",Et.lineHeight,"16px"),he=lt.extend("--ft-typography-breadcrumb-text-transform",Et.textTransform,"inherit"),ce=lt.extend("--ft-typography-overline-font-family",kt),de=lt.extend("--ft-typography-overline-font-size",Et.fontSize,"10px"),ue=lt.extend("--ft-typography-overline-font-weight",Et.fontWeight,"normal"),xe=lt.extend("--ft-typography-overline-letter-spacing",Et.letterSpacing,"1.5px"),ye=lt.extend("--ft-typography-overline-line-height",Et.lineHeight,"16px"),ge=lt.extend("--ft-typography-overline-text-transform",Et.textTransform,"uppercase"),be=lt.extend("--ft-typography-button-font-family",kt),ve=lt.extend("--ft-typography-button-font-size",Et.fontSize,"14px"),me=lt.extend("--ft-typography-button-font-weight",Et.fontWeight,"600"),$e=lt.extend("--ft-typography-button-letter-spacing",Et.letterSpacing,"1.246px"),we=lt.extend("--ft-typography-button-line-height",Et.lineHeight,"16px"),Se=lt.extend("--ft-typography-button-text-transform",Et.textTransform,"uppercase"),Oe=c`
|
|
102
101
|
.ft-typography--title {
|
|
103
|
-
font-family: ${
|
|
104
|
-
font-size: ${
|
|
105
|
-
font-weight: ${Ot};
|
|
106
|
-
letter-spacing: ${Ct};
|
|
107
|
-
line-height: ${Et};
|
|
108
|
-
text-transform: ${Nt};
|
|
109
|
-
}
|
|
110
|
-
`,xe=c`
|
|
111
|
-
.ft-typography--title-dense {
|
|
112
|
-
font-family: ${Rt};
|
|
113
|
-
font-size: ${kt};
|
|
102
|
+
font-family: ${Nt};
|
|
103
|
+
font-size: ${Rt};
|
|
114
104
|
font-weight: ${Mt};
|
|
115
105
|
letter-spacing: ${Ut};
|
|
116
|
-
line-height: ${
|
|
117
|
-
text-transform: ${
|
|
106
|
+
line-height: ${zt};
|
|
107
|
+
text-transform: ${Ft};
|
|
118
108
|
}
|
|
119
|
-
`,
|
|
120
|
-
.ft-typography--
|
|
121
|
-
font-family: ${
|
|
109
|
+
`,Ce=c`
|
|
110
|
+
.ft-typography--title-dense {
|
|
111
|
+
font-family: ${jt};
|
|
122
112
|
font-size: ${Bt};
|
|
123
|
-
font-weight: ${
|
|
124
|
-
letter-spacing: ${
|
|
125
|
-
line-height: ${
|
|
126
|
-
text-transform: ${
|
|
113
|
+
font-weight: ${Dt};
|
|
114
|
+
letter-spacing: ${At};
|
|
115
|
+
line-height: ${Lt};
|
|
116
|
+
text-transform: ${Tt};
|
|
127
117
|
}
|
|
128
|
-
|
|
129
|
-
.ft-typography--
|
|
118
|
+
`,ke=c`
|
|
119
|
+
.ft-typography--subtitle1 {
|
|
130
120
|
font-family: ${_t};
|
|
131
|
-
font-size: ${
|
|
121
|
+
font-size: ${Pt};
|
|
132
122
|
font-weight: ${It};
|
|
133
123
|
letter-spacing: ${Wt};
|
|
134
124
|
line-height: ${Ht};
|
|
135
125
|
text-transform: ${Kt};
|
|
136
126
|
}
|
|
127
|
+
`,Ee=c`
|
|
128
|
+
.ft-typography--subtitle2 {
|
|
129
|
+
font-family: ${Zt};
|
|
130
|
+
font-size: ${Vt};
|
|
131
|
+
font-weight: ${qt};
|
|
132
|
+
letter-spacing: ${Xt};
|
|
133
|
+
line-height: ${Jt};
|
|
134
|
+
text-transform: ${Yt};
|
|
135
|
+
}
|
|
137
136
|
|
|
138
|
-
`,
|
|
137
|
+
`,Ne=c`
|
|
139
138
|
.ft-typography--body1 {
|
|
140
|
-
font-family: ${
|
|
141
|
-
font-size: ${
|
|
142
|
-
font-weight: ${
|
|
143
|
-
letter-spacing: ${
|
|
144
|
-
line-height: ${
|
|
145
|
-
text-transform: ${
|
|
139
|
+
font-family: ${Gt.fontFamily};
|
|
140
|
+
font-size: ${Gt.fontSize};
|
|
141
|
+
font-weight: ${Gt.fontWeight};
|
|
142
|
+
letter-spacing: ${Gt.letterSpacing};
|
|
143
|
+
line-height: ${Gt.lineHeight};
|
|
144
|
+
text-transform: ${Gt.textTransform};
|
|
146
145
|
}
|
|
147
|
-
`,
|
|
146
|
+
`,Re=c`
|
|
148
147
|
.ft-typography--body2 {
|
|
149
|
-
font-family: ${
|
|
150
|
-
font-size: ${
|
|
151
|
-
font-weight: ${
|
|
152
|
-
letter-spacing: ${
|
|
153
|
-
line-height: ${
|
|
154
|
-
text-transform: ${
|
|
148
|
+
font-family: ${Qt};
|
|
149
|
+
font-size: ${te};
|
|
150
|
+
font-weight: ${ee};
|
|
151
|
+
letter-spacing: ${ie};
|
|
152
|
+
line-height: ${oe};
|
|
153
|
+
text-transform: ${ne};
|
|
155
154
|
}
|
|
156
|
-
`,
|
|
155
|
+
`,Me=c`
|
|
157
156
|
.ft-typography--caption {
|
|
158
|
-
font-family: ${
|
|
159
|
-
font-size: ${
|
|
160
|
-
font-weight: ${
|
|
161
|
-
letter-spacing: ${
|
|
162
|
-
line-height: ${
|
|
163
|
-
text-transform: ${
|
|
157
|
+
font-family: ${re.fontFamily};
|
|
158
|
+
font-size: ${re.fontSize};
|
|
159
|
+
font-weight: ${re.fontWeight};
|
|
160
|
+
letter-spacing: ${re.letterSpacing};
|
|
161
|
+
line-height: ${re.lineHeight};
|
|
162
|
+
text-transform: ${re.textTransform};
|
|
164
163
|
}
|
|
165
|
-
`,
|
|
164
|
+
`,Ue=c`
|
|
166
165
|
.ft-typography--breadcrumb {
|
|
167
|
-
font-family: ${
|
|
168
|
-
font-size: ${ee};
|
|
169
|
-
font-weight: ${ie};
|
|
170
|
-
letter-spacing: ${oe};
|
|
171
|
-
line-height: ${ne};
|
|
172
|
-
text-transform: ${se};
|
|
173
|
-
}
|
|
174
|
-
`,Ee=c`
|
|
175
|
-
.ft-typography--overline {
|
|
176
|
-
font-family: ${re};
|
|
166
|
+
font-family: ${se};
|
|
177
167
|
font-size: ${le};
|
|
178
168
|
font-weight: ${ae};
|
|
179
169
|
letter-spacing: ${pe};
|
|
180
|
-
line-height: ${
|
|
181
|
-
text-transform: ${
|
|
170
|
+
line-height: ${fe};
|
|
171
|
+
text-transform: ${he};
|
|
182
172
|
}
|
|
183
|
-
`,
|
|
184
|
-
.ft-typography--
|
|
185
|
-
font-family: ${
|
|
173
|
+
`,ze=c`
|
|
174
|
+
.ft-typography--overline {
|
|
175
|
+
font-family: ${ce};
|
|
186
176
|
font-size: ${de};
|
|
187
177
|
font-weight: ${ue};
|
|
188
|
-
letter-spacing: ${
|
|
189
|
-
line-height: ${
|
|
190
|
-
text-transform: ${
|
|
178
|
+
letter-spacing: ${xe};
|
|
179
|
+
line-height: ${ye};
|
|
180
|
+
text-transform: ${ge};
|
|
181
|
+
}
|
|
182
|
+
`,Fe=c`
|
|
183
|
+
.ft-typography--button {
|
|
184
|
+
font-family: ${be};
|
|
185
|
+
font-size: ${ve};
|
|
186
|
+
font-weight: ${me};
|
|
187
|
+
letter-spacing: ${$e};
|
|
188
|
+
line-height: ${we};
|
|
189
|
+
text-transform: ${Se};
|
|
191
190
|
}
|
|
192
|
-
`;class
|
|
193
|
-
<${
|
|
191
|
+
`;class je extends ft{constructor(){super(...arguments),this.variant=St.body1}render(){return this.element?wt`
|
|
192
|
+
<${mt(this.element)}
|
|
194
193
|
class="ft-typography ft-typography--${this.variant}">
|
|
195
194
|
<slot></slot>
|
|
196
|
-
</${
|
|
197
|
-
`:
|
|
195
|
+
</${mt(this.element)}>
|
|
196
|
+
`:wt`
|
|
198
197
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
199
|
-
`}}
|
|
198
|
+
`}}je.styles=[Oe,Ce,ke,Ee,Ne,Re,Me,Ue,ze,Fe,c`
|
|
200
199
|
.ft-typography {
|
|
201
200
|
vertical-align: inherit;
|
|
202
201
|
}
|
|
203
|
-
`],
|
|
204
|
-
<div class="${
|
|
205
|
-
${this.text?
|
|
202
|
+
`],Ot([i()],je.prototype,"element",void 0),Ot([i()],je.prototype,"variant",void 0),s("ft-typography")(je);var Be=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const De={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",pt.colorOutline),textColor:lt.extend("--ft-input-label-text-color",pt.colorOnSurfaceMedium),disabledTextColor:lt.extend("--ft-input-label-disabled-text-color",pt.colorOnSurfaceDisabled),colorSurface:lt.external(pt.colorSurface,"Design system"),borderRadiusS:lt.external(pt.borderRadiusS,"Design system"),colorError:lt.external(pt.colorError,"Design system")};class Ae 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 _`
|
|
203
|
+
<div class="${gt(t)}">
|
|
204
|
+
${this.text?_`
|
|
206
205
|
<div class="ft-input-label--text ft-typography--caption">
|
|
207
206
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
208
207
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
209
208
|
</div>
|
|
210
209
|
`:null}
|
|
211
210
|
</div>
|
|
212
|
-
`}}
|
|
211
|
+
`}}Ae.elementDefinitions={},Ae.styles=[Me,c`
|
|
213
212
|
.ft-input-label {
|
|
214
213
|
position: absolute;
|
|
215
214
|
inset: 0;
|
|
@@ -217,7 +216,11 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
217
216
|
}
|
|
218
217
|
|
|
219
218
|
.ft-input-label {
|
|
220
|
-
border-color: ${
|
|
219
|
+
border-color: ${De.borderColor};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.ft-input-label.ft-input-label--in-error {
|
|
223
|
+
border-color: ${De.colorError}
|
|
221
224
|
}
|
|
222
225
|
|
|
223
226
|
.ft-input-label:before,
|
|
@@ -230,7 +233,7 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
230
233
|
}
|
|
231
234
|
|
|
232
235
|
.ft-input-label:before {
|
|
233
|
-
width: ${
|
|
236
|
+
width: ${De.horizontalSpacing};
|
|
234
237
|
flex-shrink: 0;
|
|
235
238
|
}
|
|
236
239
|
|
|
@@ -246,14 +249,18 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
246
249
|
border-bottom-width: 1px;
|
|
247
250
|
border-bottom-style: solid;
|
|
248
251
|
border-color: inherit;
|
|
249
|
-
color: ${
|
|
252
|
+
color: ${De.textColor};
|
|
250
253
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
251
|
-
${
|
|
252
|
-
${
|
|
254
|
+
${at(re.fontSize,De.fontSize)};
|
|
255
|
+
${at(re.lineHeight,De.fontSize)};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
259
|
+
color: ${De.colorError}
|
|
253
260
|
}
|
|
254
261
|
|
|
255
262
|
.ft-input-label--disabled .ft-input-label--text {
|
|
256
|
-
color: ${
|
|
263
|
+
color: ${De.disabledTextColor};
|
|
257
264
|
}
|
|
258
265
|
|
|
259
266
|
.ft-input-label--hidden-text {
|
|
@@ -269,17 +276,17 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
269
276
|
overflow: hidden;
|
|
270
277
|
white-space: nowrap;
|
|
271
278
|
text-overflow: ellipsis;
|
|
272
|
-
padding: ${
|
|
273
|
-
margin: calc(${
|
|
279
|
+
padding: ${De.verticalSpacing} 4px;
|
|
280
|
+
margin: calc(${De.verticalSpacing} * -1) 0;
|
|
274
281
|
}
|
|
275
282
|
|
|
276
283
|
.ft-input-label--raised .ft-input-label--text {
|
|
277
|
-
${
|
|
278
|
-
${
|
|
284
|
+
${at(re.fontSize,De.raisedFontSize)};
|
|
285
|
+
${at(re.lineHeight,De.raisedFontSize)};
|
|
279
286
|
}
|
|
280
287
|
|
|
281
288
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
282
|
-
top: ${
|
|
289
|
+
top: ${De.verticalSpacing};
|
|
283
290
|
}
|
|
284
291
|
|
|
285
292
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -292,27 +299,27 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
292
299
|
.ft-input-label--outlined:before {
|
|
293
300
|
border-left-width: 1px;
|
|
294
301
|
border-left-style: solid;
|
|
295
|
-
border-radius: ${
|
|
302
|
+
border-radius: ${De.borderRadiusS} 0 0 ${De.borderRadiusS};
|
|
296
303
|
}
|
|
297
304
|
|
|
298
305
|
.ft-input-label--outlined:after {
|
|
299
306
|
border-right-width: 1px;
|
|
300
307
|
border-right-style: solid;
|
|
301
|
-
border-radius: 0 ${
|
|
308
|
+
border-radius: 0 ${De.borderRadiusS} ${De.borderRadiusS} 0;
|
|
302
309
|
}
|
|
303
310
|
|
|
304
311
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
305
312
|
padding: 2px 4px;
|
|
306
|
-
z-index: ${
|
|
307
|
-
background-color: ${
|
|
308
|
-
border-radius: ${
|
|
313
|
+
z-index: ${De.raisedZIndex};
|
|
314
|
+
background-color: ${De.colorSurface};
|
|
315
|
+
border-radius: ${De.borderRadiusS};
|
|
309
316
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
310
317
|
}
|
|
311
318
|
|
|
312
319
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
313
320
|
border-top: none;
|
|
314
321
|
}
|
|
315
|
-
`],
|
|
322
|
+
`],Be([i({type:String})],Ae.prototype,"text",void 0),Be([i({type:Boolean})],Ae.prototype,"raised",void 0),Be([i({type:Boolean})],Ae.prototype,"outlined",void 0),Be([i({type:Boolean})],Ae.prototype,"disabled",void 0),Be([i({type:Boolean})],Ae.prototype,"error",void 0),s("ft-input-label")(Ae);var Le=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const Te=lt.extend("--ft-ripple-color",pt.colorContent),_e={color:Te,backgroundColor:lt.extend("--ft-ripple-background-color",Te),opacityContentOnSurfacePressed:lt.external(pt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:lt.external(pt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:lt.external(pt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:lt.external(pt.opacityContentOnSurfaceSelected,"Design system")},Pe=lt.extend("--ft-ripple-color",pt.colorPrimary),Ie=Pe,We=lt.extend("--ft-ripple-background-color",Pe),He=lt.extend("--ft-ripple-color",pt.colorSecondary),Ke=He,Ze=lt.extend("--ft-ripple-background-color",He);class Ve 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 t(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:n}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return _`
|
|
316
323
|
<style>
|
|
317
324
|
.ft-ripple .ft-ripple--effect,
|
|
318
325
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -325,11 +332,11 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
325
332
|
top: ${this.originY}px;
|
|
326
333
|
}
|
|
327
334
|
</style>
|
|
328
|
-
<div class="${
|
|
335
|
+
<div class="${gt(t)}">
|
|
329
336
|
<div class="ft-ripple--background"></div>
|
|
330
337
|
<div class="ft-ripple--effect"></div>
|
|
331
338
|
</div>
|
|
332
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled
|
|
339
|
+
`}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"),n=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",n),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",n),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,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}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()}}Ve.elementDefinitions={},Ve.styles=c`
|
|
333
340
|
:host {
|
|
334
341
|
display: contents;
|
|
335
342
|
}
|
|
@@ -348,17 +355,30 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
348
355
|
.ft-ripple .ft-ripple--effect {
|
|
349
356
|
position: absolute;
|
|
350
357
|
opacity: 0;
|
|
351
|
-
background-color: ${ze.color};
|
|
352
358
|
}
|
|
353
359
|
|
|
354
|
-
.ft-ripple
|
|
360
|
+
.ft-ripple .ft-ripple--background {
|
|
361
|
+
background-color: ${_e.backgroundColor};
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.ft-ripple .ft-ripple--effect {
|
|
365
|
+
background-color: ${_e.color};
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
369
|
+
background-color: ${Ze};
|
|
370
|
+
}
|
|
371
|
+
|
|
355
372
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
356
|
-
background-color: ${
|
|
373
|
+
background-color: ${Ke};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
377
|
+
background-color: ${We};
|
|
357
378
|
}
|
|
358
379
|
|
|
359
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
360
380
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
361
|
-
background-color: ${
|
|
381
|
+
background-color: ${Ie};
|
|
362
382
|
}
|
|
363
383
|
|
|
364
384
|
.ft-ripple .ft-ripple--background {
|
|
@@ -366,6 +386,7 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
366
386
|
left: 0;
|
|
367
387
|
height: 100%;
|
|
368
388
|
width: 100%;
|
|
389
|
+
transition: opacity 75ms linear;
|
|
369
390
|
}
|
|
370
391
|
|
|
371
392
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -389,57 +410,101 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
389
410
|
}
|
|
390
411
|
|
|
391
412
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
392
|
-
opacity: ${
|
|
413
|
+
opacity: ${_e.opacityContentOnSurfaceHover};
|
|
393
414
|
}
|
|
394
415
|
|
|
395
416
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
396
|
-
opacity: ${
|
|
417
|
+
opacity: ${_e.opacityContentOnSurfaceSelected};
|
|
397
418
|
}
|
|
398
419
|
|
|
399
420
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
400
|
-
opacity: ${
|
|
421
|
+
opacity: ${_e.opacityContentOnSurfaceFocused};
|
|
401
422
|
}
|
|
402
423
|
|
|
403
424
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
404
|
-
opacity: ${
|
|
425
|
+
opacity: ${_e.opacityContentOnSurfacePressed};
|
|
405
426
|
transform: translate(-50%, -50%) scale(1);
|
|
406
427
|
}
|
|
407
|
-
`,
|
|
408
|
-
|
|
428
|
+
`,Le([i({type:Boolean})],Ve.prototype,"primary",void 0),Le([i({type:Boolean})],Ve.prototype,"secondary",void 0),Le([i({type:Boolean})],Ve.prototype,"unbounded",void 0),Le([i({type:Boolean})],Ve.prototype,"activated",void 0),Le([i({type:Boolean})],Ve.prototype,"selected",void 0),Le([i({type:Boolean})],Ve.prototype,"disabled",void 0),Le([o()],Ve.prototype,"hovered",void 0),Le([o()],Ve.prototype,"focused",void 0),Le([o()],Ve.prototype,"pressed",void 0),Le([o()],Ve.prototype,"rippling",void 0),Le([o()],Ve.prototype,"rippleSize",void 0),Le([o()],Ve.prototype,"originX",void 0),Le([o()],Ve.prototype,"originY",void 0),Le([n(".ft-ripple")],Ve.prototype,"ripple",void 0),Le([n(".ft-ripple--effect")],Ve.prototype,"rippleEffect",void 0),s("ft-ripple")(Ve);
|
|
429
|
+
/**
|
|
430
|
+
* @license
|
|
431
|
+
* Copyright 2017 Google LLC
|
|
432
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
433
|
+
*/
|
|
434
|
+
class qe extends yt{constructor(t){if(super(t),this.it=I,t.type!==ut)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===I||null==t)return this.ft=void 0,this.it=t;if(t===P)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}qe.directiveName="unsafeHTML",qe.resultType=1;const Xe=xt(qe);var Je,Ye;!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=""}(Je||(Je={})),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=""}(Ye||(Ye={})),new Map([...["abw"].map((t=>[t,Ye.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,Ye.AUDIO])),...["avi"].map((t=>[t,Ye.AVI])),...["chm","xhs"].map((t=>[t,Ye.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,Ye.CODE])),...["csv"].map((t=>[t,Ye.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ye.DITA])),...["epub"].map((t=>[t,Ye.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ye.EXCEL])),...["flac"].map((t=>[t,Ye.FLAC])),...["gif"].map((t=>[t,Ye.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ye.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ye.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,Ye.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ye.JPEG])),...["json"].map((t=>[t,Ye.JSON])),...["m4a","m4p"].map((t=>[t,Ye.M4A])),...["mov","qt"].map((t=>[t,Ye.MOV])),...["mp3"].map((t=>[t,Ye.MP3])),...["mp4","m4v"].map((t=>[t,Ye.MP4])),...["ogg","oga"].map((t=>[t,Ye.OGG])),...["pdf","ps"].map((t=>[t,Ye.PDF])),...["png"].map((t=>[t,Ye.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ye.POWERPOINT])),...["rar"].map((t=>[t,Ye.RAR])),...["stp"].map((t=>[t,Ye.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ye.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,Ye.VIDEO])),...["wav"].map((t=>[t,Ye.WAV])),...["wma"].map((t=>[t,Ye.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ye.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ye.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ye.YAML])),...["zip"].map((t=>[t,Ye.ZIP]))]);var Ge,Qe=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ge||(Ge={}));const ti=lt.create("--ft-icon-font-size","SIZE","24px"),ei=lt.extend("--ft-icon-fluid-topics-font-family",lt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),ii=lt.extend("--ft-icon-file-format-font-family",lt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),oi=lt.extend("--ft-icon-material-font-family",lt.create("--ft-icon-font-family","UNKNOWN","Material Icons"));class ni extends ft{constructor(){super(...arguments),this.variant=Ge.fluid_topics}render(){return _`
|
|
435
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
436
|
+
${Xe(this.getIcon())}
|
|
437
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
438
|
+
</i>
|
|
439
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===Ge.file_format?null!==(t=Ye[i.toUpperCase()])&&void 0!==t?t:i:this.variant===Ge.fluid_topics?null!==(e=Je[i.toUpperCase()])&&void 0!==e?e:i:I}}ni.elementDefinitions={},ni.styles=c`
|
|
440
|
+
:host, i.ft-icon {
|
|
441
|
+
display: inline-block;
|
|
442
|
+
width: ${ti};
|
|
443
|
+
height: ${ti};
|
|
444
|
+
text-align: center;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
i.ft-icon {
|
|
448
|
+
font-size: ${ti};
|
|
449
|
+
line-height: 1;
|
|
450
|
+
font-weight: normal;
|
|
451
|
+
text-transform: none;
|
|
452
|
+
font-style: normal;
|
|
453
|
+
font-variant: normal;
|
|
454
|
+
speak: none;
|
|
455
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
456
|
+
text-rendering: auto;
|
|
457
|
+
-webkit-font-smoothing: antialiased;
|
|
458
|
+
-moz-osx-font-smoothing: grayscale;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.ft-icon--fluid-topics {
|
|
462
|
+
font-family: ${ei}, ft-icons, fticons, sans-serif;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ft-icon--file-format {
|
|
466
|
+
font-family: ${ii}, ft-mime, sans-serif;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.ft-icon--material {
|
|
470
|
+
font-family: ${oi}, "Material Icons", sans-serif;
|
|
471
|
+
}
|
|
472
|
+
`,Qe([i()],ni.prototype,"variant",void 0),Qe([n("slot")],ni.prototype,"slottedContent",void 0),s("ft-icon")(ni);var ri=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const si={fontSize:lt.create("--ft-text-field-font-size","SIZE","14px"),labelSize:lt.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:lt.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:lt.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:lt.extend("--ft-text-field-helper-color",pt.colorOnSurfaceMedium),colorPrimary:lt.external(pt.colorPrimary,"Design system"),colorOnSurface:lt.external(pt.colorOnSurface,"Design system"),colorOnSurfaceDisabled:lt.external(pt.colorOnSurfaceDisabled,"Design system"),borderRadiusS:lt.external(pt.borderRadiusS,"Design system"),colorError:lt.external(pt.colorError,"Design system"),prefixColor:lt.extend("--ft-text-field-prefix-color",pt.colorOnSurfaceMedium),iconColor:lt.extend("--ft-text-field-icon-color",pt.colorOnSurfaceMedium)};class li extends ft{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix="",this.icon="",this.iconVariant="",this.focused=!1}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--no-label":!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--raised-label":this.focused||""!=this.value};return _`
|
|
473
|
+
<div class="${gt(t)}">
|
|
409
474
|
<div class="ft-text-field--main-panel">
|
|
410
475
|
<ft-input-label text="${this.label}"
|
|
411
476
|
?disabled=${this.disabled}
|
|
412
477
|
?outlined=${this.outlined}
|
|
413
478
|
?raised=${this.focused||""!=this.value}
|
|
479
|
+
?error=${this.error}
|
|
414
480
|
></ft-input-label>
|
|
415
481
|
<div class="ft-text-field--input-panel"
|
|
416
482
|
aria-label="${this.label}">
|
|
417
|
-
${this.outlined?null:
|
|
483
|
+
${this.outlined?null:_`
|
|
418
484
|
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
419
485
|
`}
|
|
420
|
-
<
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
486
|
+
<div class="ft-text-field--input-wrapper">
|
|
487
|
+
<ft-typography class="ft-text-field--prefix" vaiant="body1">${this.prefix}</ft-typography>
|
|
488
|
+
<input type="text"
|
|
489
|
+
class="ft-typography--body1 ft-text-field--input"
|
|
490
|
+
?disabled=${this.disabled}
|
|
491
|
+
.value=${this.value}
|
|
492
|
+
@change=${this.updateValueFromInputField}
|
|
493
|
+
@keyup=${this.liveUpdateValueFromInputField}
|
|
494
|
+
@focus=${()=>this.focused=!0}
|
|
495
|
+
@focusout=${()=>this.focused=!1}
|
|
496
|
+
/>
|
|
497
|
+
</div>
|
|
498
|
+
${this.icon?_`
|
|
499
|
+
<ft-icon class="ft-text-field--icon" variant="${this.iconVariant}">${this.icon}
|
|
500
|
+
</ft-icon>`:void 0}
|
|
436
501
|
</div>
|
|
437
502
|
</div>
|
|
438
|
-
${this.helper?
|
|
503
|
+
${this.helper?_`
|
|
439
504
|
<ft-typography class="ft-text-field--helper-text" variant="caption">${this.helper}
|
|
440
505
|
</ft-typography>`:void 0}
|
|
441
506
|
</div>
|
|
442
|
-
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}updateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||""}}
|
|
507
|
+
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}updateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||""}}li.elementDefinitions={"ft-input-label":Ae,"ft-ripple":Ve,"ft-typography":je,"ft-icon":ni},li.styles=[Ne,c`
|
|
443
508
|
*:focus {
|
|
444
509
|
outline: none;
|
|
445
510
|
}
|
|
@@ -451,16 +516,16 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
451
516
|
}
|
|
452
517
|
|
|
453
518
|
ft-input-label {
|
|
454
|
-
${
|
|
455
|
-
${
|
|
456
|
-
${
|
|
457
|
-
${
|
|
519
|
+
${at(De.fontSize,si.fontSize)};
|
|
520
|
+
${at(De.raisedFontSize,si.labelSize)};
|
|
521
|
+
${at(De.verticalSpacing,si.verticalSpacing)};
|
|
522
|
+
${at(De.horizontalSpacing,c`calc(${si.horizontalSpacing} - 4px)`)};
|
|
458
523
|
}
|
|
459
524
|
|
|
460
525
|
.ft-text-field--main-panel {
|
|
461
526
|
position: relative;
|
|
462
527
|
display: flex;
|
|
463
|
-
height: calc(4 * ${
|
|
528
|
+
height: calc(4 * ${si.verticalSpacing} + ${si.labelSize} + ${si.fontSize});
|
|
464
529
|
}
|
|
465
530
|
|
|
466
531
|
.ft-text-field--input-panel {
|
|
@@ -469,37 +534,65 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
469
534
|
display: flex;
|
|
470
535
|
align-items: center;
|
|
471
536
|
overflow: hidden;
|
|
472
|
-
gap: 8px;
|
|
473
537
|
}
|
|
474
538
|
|
|
475
539
|
.ft-text-field--input-panel ft-ripple {
|
|
476
|
-
${
|
|
477
|
-
${
|
|
540
|
+
${at(_e.opacityContentOnSurfaceHover,"0.08")};
|
|
541
|
+
${at(_e.opacityContentOnSurfacePressed,"0.04")};
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.ft-text-field--input-wrapper {
|
|
545
|
+
flex-grow: 1;
|
|
546
|
+
flex-shrink: 1;
|
|
547
|
+
|
|
548
|
+
display: flex;
|
|
549
|
+
align-items: center;
|
|
550
|
+
|
|
551
|
+
${at(Gt.fontSize,si.fontSize)};
|
|
552
|
+
${at(Gt.lineHeight,si.fontSize)};
|
|
553
|
+
|
|
554
|
+
padding: 0 ${si.horizontalSpacing};
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input-wrapper {
|
|
558
|
+
align-items: flex-end;
|
|
559
|
+
padding: 0 ${si.horizontalSpacing} ${si.verticalSpacing} ${si.horizontalSpacing};
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.ft-text-field--prefix {
|
|
563
|
+
display: none;
|
|
564
|
+
color: ${si.prefixColor}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.ft-text-field--with-prefix.ft-text-field--raised-label .ft-text-field--prefix {
|
|
568
|
+
display: block;
|
|
478
569
|
}
|
|
479
570
|
|
|
480
571
|
.ft-text-field--input {
|
|
481
572
|
display: block;
|
|
573
|
+
position: relative;
|
|
482
574
|
flex-grow: 1;
|
|
483
575
|
flex-shrink: 1;
|
|
484
576
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
485
577
|
|
|
486
|
-
${
|
|
487
|
-
${
|
|
488
|
-
color: ${Le.colorOnSurface};
|
|
489
|
-
|
|
490
|
-
padding: 0 ${Le.horizontalSpacing};
|
|
491
|
-
|
|
578
|
+
color: ${si.colorOnSurface};
|
|
579
|
+
padding: calc(2 * ${si.verticalSpacing}) 0;
|
|
492
580
|
border: none;
|
|
493
581
|
background: none;
|
|
494
582
|
}
|
|
495
583
|
|
|
584
|
+
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
|
|
585
|
+
padding-bottom: 0;
|
|
586
|
+
padding-top: calc(${si.labelSize} + 2 * ${si.verticalSpacing});
|
|
587
|
+
}
|
|
588
|
+
|
|
496
589
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
497
590
|
.ft-text-field--input::-webkit-list-button {
|
|
498
591
|
display: none !important;
|
|
499
592
|
}
|
|
500
593
|
|
|
501
594
|
.ft-text-field--disabled .ft-text-field--input {
|
|
502
|
-
color: ${
|
|
595
|
+
color: ${si.colorOnSurfaceDisabled};
|
|
503
596
|
}
|
|
504
597
|
|
|
505
598
|
.ft-text-field:not(.ft-text-field--disabled) .ft-text-field--input-panel {
|
|
@@ -507,31 +600,36 @@ const dt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
507
600
|
}
|
|
508
601
|
|
|
509
602
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
510
|
-
${
|
|
511
|
-
${
|
|
603
|
+
${at(De.borderColor,si.colorPrimary)};
|
|
604
|
+
${at(De.textColor,si.colorPrimary)};
|
|
512
605
|
}
|
|
513
606
|
|
|
514
607
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
515
|
-
border-radius: ${
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
|
|
519
|
-
align-self: stretch;
|
|
520
|
-
padding-bottom: ${Le.verticalSpacing};
|
|
521
|
-
padding-top: calc(${Le.labelSize} + 2 * ${Le.verticalSpacing});
|
|
608
|
+
border-radius: ${si.borderRadiusS} ${si.borderRadiusS} 0 0;
|
|
522
609
|
}
|
|
523
610
|
|
|
524
611
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
525
|
-
border-radius: ${
|
|
612
|
+
border-radius: ${si.borderRadiusS};
|
|
526
613
|
}
|
|
527
614
|
|
|
528
615
|
.ft-text-field--helper-text {
|
|
529
|
-
padding: 0 12px 0 ${
|
|
530
|
-
color: ${
|
|
616
|
+
padding: 0 12px 0 ${si.horizontalSpacing};
|
|
617
|
+
color: ${si.helperColor};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.ft-text-field--in-error .ft-text-field--input,
|
|
621
|
+
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
622
|
+
.ft-text-field--in-error .ft-text-field--prefix {
|
|
623
|
+
color: ${si.colorError};
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.ft-text-field--icon {
|
|
627
|
+
padding-right: ${si.horizontalSpacing};
|
|
628
|
+
color: ${si.iconColor};
|
|
531
629
|
}
|
|
532
|
-
`],
|
|
533
|
-
${i.map((t=>
|
|
630
|
+
`],ri([i({type:String})],li.prototype,"label",void 0),ri([i({reflect:!0})],li.prototype,"value",void 0),ri([i({type:String})],li.prototype,"helper",void 0),ri([i({type:Boolean})],li.prototype,"outlined",void 0),ri([i({type:Boolean})],li.prototype,"disabled",void 0),ri([i({type:Boolean})],li.prototype,"error",void 0),ri([n(".ft-text-field--input")],li.prototype,"input",void 0),ri([i({type:String})],li.prototype,"prefix",void 0),ri([i({type:String})],li.prototype,"icon",void 0),ri([i({type:String})],li.prototype,"iconVariant",void 0),ri([o()],li.prototype,"focused",void 0),s("ft-text-field")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),_`
|
|
631
|
+
${i.map((t=>_`
|
|
534
632
|
<style>${t}</style>
|
|
535
633
|
`))}
|
|
536
634
|
${super.render()}
|
|
537
|
-
`}},i.styles=void 0,i.elementDefinitions=o,i}(
|
|
635
|
+
`}},i.styles=void 0,i.elementDefinitions=o,i}(li))}();
|