@fluid-topics/ft-filterable-table 1.1.7 → 1.1.9
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-filterable-table.min.js +315 -315
- package/package.json +6 -6
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let f=o.call(i,t);f||(f=p(t),e.call(i,t,f)),this===window.customElements&&(a.set(r,c),c.standInClass=f);const h=this._awaitingUpgrade.get(t);if(h){this._awaitingUpgrade.delete(t);for(const t of h)n.delete(t),u(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),i.upgrade.apply(i,arguments),g.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,f=t=>{let e=t.getRootNode();if(!c(e)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=f(o)||window.customElements,r=i._getDefinition(e);return r?u(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},h=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):h(o)},u=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){h(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let g=[document];const b=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){g.push(this),o.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let f=o.call(i,t);f||(f=p(t),e.call(i,t,f)),this===window.customElements&&(a.set(r,c),c.standInClass=f);const h=this._awaitingUpgrade.get(t);if(h){this._awaitingUpgrade.delete(t);for(const t of h)n.delete(t),u(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),i.upgrade.apply(i,arguments),g.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,f=t=>{let e=t.getRootNode();if(!c(e)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=f(o)||window.customElements,r=i._getDefinition(e);return r?u(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},h=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):h(o)},u=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){h(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let g=[document];const b=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){g.push(this),o.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(xo){const t=window.customElements.define;window.customElements.define=(e,o,i)=>{if(null!==o)try{t.bind(window.customElements)(e,o,i)}catch(t){console.info(e,o,i,t)}}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
@@ -129,17 +129,17 @@ let Oe=class extends Bt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
129
129
|
display: inline-block;
|
|
130
130
|
width: 0;
|
|
131
131
|
}
|
|
132
|
-
`;window.ftReduxStores||(window.ftReduxStores={});const
|
|
132
|
+
`;function He(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var je,Te,_e;const Ge=Symbol("internalReduxEventsUnsubscribers"),Ve=Symbol("internalStoresUnsubscribers"),Ye=Symbol("internalStores");class Je extends Be{constructor(){super(...arguments),this[je]=new Map,this[Te]=new Map,this[_e]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[Ye].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ye].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Ye].get(t)}addStore(t,e){var o;e=null!==(o=null!=e?e:He(t)?t.name:void 0)&&void 0!==o?o:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Ye].delete(e)}setupStore(t,e){this[Ye].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Ye].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,e)=>{const o=this.constructor.getPropertyOptions(e);if(!(null==o?void 0:o.attribute)||!this.hasAttribute("string"==typeof(null==o?void 0:o.attribute)?o.attribute:e)){const o=this.getStore(t.store);o&&(t.store?this[Ve].has(t.store):this[Ve].size>0)&&(this[e]=t.selector(o.getState(),this))}}))}subscribeToStore(t,e){var o;this[Ve].set(t,e.subscribe((()=>this.updateFromStores()))),He(e)&&e.eventBus&&(null===(o=this.reduxConstructor.reduxEventListeners)||void 0===o||o.forEach(((t,o)=>{if("function"==typeof this[o]&&(!t.store||e.name===t.store)){const i=t=>this[o](t);e.eventBus.addEventListener(t.eventName,i),this[Ge].push((()=>e.eventBus.removeEventListener(t.eventName,i)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Ve].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Ge].forEach((t=>t())),this[Ge]=[]}unsubscribeFromStore(t){this[Ve].has(t)&&this[Ve].get(t)(),this[Ve].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}je=Ve,Te=Ye,_e=Ge,Je.reduxProperties=new Map,Je.reduxReactiveProperties=new Set,Je.reduxEventListeners=new Map,window.ftReduxStores||(window.ftReduxStores={});const qe=Symbol("elementInternals");function Xe(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[qe].form}constructor(...t){super(t),this[qe]=this.attachInternals(),this[qe].role=e}setFormValue(t){this[qe].setFormValue(t)}}}var Qe,to,eo;const oo=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(eo=null===(to=null===(Qe=window.safari)||void 0===Qe?void 0:Qe.pushNotification)||void 0===to?void 0:to.toString())&&void 0!==eo?eo:""),io=1,ro=2,no=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
133
133
|
/**
|
|
134
134
|
* @license
|
|
135
135
|
* Copyright 2017 Google LLC
|
|
136
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
|
-
*/let
|
|
137
|
+
*/let ao=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
138
138
|
/**
|
|
139
139
|
* @license
|
|
140
140
|
* Copyright 2020 Google LLC
|
|
141
141
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
|
-
*/const{D:
|
|
142
|
+
*/const{D:so}=yt,lo=()=>document.createComment(""),co=(t,e,o)=>{const i=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===o){const e=i.insertBefore(lo(),r),n=i.insertBefore(lo(),r);o=new so(e,n,t,t.options)}else{const e=o._$AB.nextSibling,n=o._$AM,a=n!==t;if(a){let e;o._$AQ?.(t),o._$AM=t,void 0!==o._$AP&&(e=t._$AU)!==n._$AU&&o._$AP(e)}if(e!==r||a){let t=o._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,r),t=e}}}return o},fo=(t,e,o=t)=>(t._$AI(e,o),t),po={},ho=t=>{t._$AP?.(!1,!0);let e=t._$AA;const o=t._$AB.nextSibling;for(;e!==o;){const t=e.nextSibling;e.remove(),e=t}},uo=(t,e,o)=>{const i=new Map;for(let r=e;r<=o;r++)i.set(t[r],r);return i},yo=no(class extends ao{constructor(t){if(super(t),t.type!==ro)throw Error("repeat() can only be used in text expressions")}ht(t,e,o){let i;void 0===o?o=e:void 0!==e&&(i=e);const r=[],n=[];let a=0;for(const e of t)r[a]=i?i(e,a):a,n[a]=o(e,a),a++;return{values:n,keys:r}}render(t,e,o){return this.ht(t,e,o).values}update(t,[e,o,i]){const r=(t=>t._$AH)(t),{values:n,keys:a}=this.ht(e,o,i);if(!Array.isArray(r))return this.dt=a,n;const s=this.dt??=[],l=[];let c,f,p=0,d=r.length-1,h=0,u=n.length-1;for(;p<=d&&h<=u;)if(null===r[p])p++;else if(null===r[d])d--;else if(s[p]===a[h])l[h]=fo(r[p],n[h]),p++,h++;else if(s[d]===a[u])l[u]=fo(r[d],n[u]),d--,u--;else if(s[p]===a[u])l[u]=fo(r[p],n[u]),co(t,l[u+1],r[p]),p++,u--;else if(s[d]===a[h])l[h]=fo(r[d],n[h]),co(t,r[p],r[d]),d--,h++;else if(void 0===c&&(c=uo(a,h,u),f=uo(s,p,d)),c.has(s[p]))if(c.has(s[d])){const e=f.get(a[h]),o=void 0!==e?r[e]:null;if(null===o){const e=co(t,r[p]);fo(e,n[h]),l[h]=e}else l[h]=fo(o,n[h]),co(t,r[p],o),r[e]=null;h++}else ho(r[d]),d--;else ho(r[p]),p++;for(;h<=u;){const e=co(t,l[u+1]);fo(e,n[h]),l[h++]=e}for(;p<=d;){const t=r[p++];null!==t&&ho(t)}return this.dt=a,((t,e=po)=>{t._$AH=e})(t,l),tt}});
|
|
143
143
|
/**
|
|
144
144
|
* @license
|
|
145
145
|
* Copyright 2017 Google LLC
|
|
@@ -150,107 +150,107 @@ let Oe=class extends Bt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
150
150
|
* Copyright 2017 Google LLC
|
|
151
151
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
152
152
|
*/
|
|
153
|
-
let
|
|
153
|
+
let go=class extends ao{constructor(t){if(super(t),this.et=et,t.type!==ro)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===et||null==t)return this.vt=void 0,this.et=t;if(t===tt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}};go.directiveName="unsafeHTML",go.resultType=1;const bo=no(go),mo=no(class extends ao{constructor(t){if(super(t),t.type!==io||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return tt}}),xo=Symbol.for(""),vo=t=>{if(t?.r===xo)return t?._$litStatic$},Oo=t=>({_$litStatic$:t,r:xo}),wo=new Map,So=(t=>(e,...o)=>{const i=o.length;let r,n;const a=[],s=[];let l,c=0,f=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(n=o[c],r=vo(n));)l+=r+e[++c],f=!0;c!==i&&s.push(n),a.push(l),c++}if(c===i&&a.push(e[i]),f){const t=a.join("$$lit$$");void 0===(e=wo.get(t))&&(a.raw=a,wo.set(t,e=a)),o=s}return t(e,...o)})(Q);
|
|
154
154
|
/**
|
|
155
155
|
* @license
|
|
156
156
|
* Copyright 2018 Google LLC
|
|
157
157
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
158
|
-
*/var
|
|
158
|
+
*/var $o;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}($o||($o={}));const No=$e.extend("--ft-typography-font-family","",Ue.titleFont),Co=$e.extend("--ft-typography-font-family","",Ue.contentFont),Eo={fontFamily:Co,fontSize:$e.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:$e.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:$e.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:$e.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:$e.create("--ft-typography-text-transform","","UNKNOWN","inherit")},ko=$e.extend("--ft-typography-title-font-family","",No),Ro=$e.extend("--ft-typography-title-font-size","",Eo.fontSize,"20px"),Uo=$e.extend("--ft-typography-title-font-weight","",Eo.fontWeight,"normal"),Io=$e.extend("--ft-typography-title-letter-spacing","",Eo.letterSpacing,"0.15px"),Lo=$e.extend("--ft-typography-title-line-height","",Eo.lineHeight,"1.2"),Wo=$e.extend("--ft-typography-title-text-transform","",Eo.textTransform,"inherit"),zo=$e.extend("--ft-typography-title-dense-font-family","",No),Fo=$e.extend("--ft-typography-title-dense-font-size","",Eo.fontSize,"14px"),Zo=$e.extend("--ft-typography-title-dense-font-weight","",Eo.fontWeight,"normal"),Ko=$e.extend("--ft-typography-title-dense-letter-spacing","",Eo.letterSpacing,"0.105px"),Do=$e.extend("--ft-typography-title-dense-line-height","",Eo.lineHeight,"1.7"),Bo=$e.extend("--ft-typography-title-dense-text-transform","",Eo.textTransform,"inherit"),Ao=$e.extend("--ft-typography-subtitle1-font-family","",Co),Mo=$e.extend("--ft-typography-subtitle1-font-size","",Eo.fontSize,"16px"),Po=$e.extend("--ft-typography-subtitle1-font-weight","",Eo.fontWeight,"600"),Ho=$e.extend("--ft-typography-subtitle1-letter-spacing","",Eo.letterSpacing,"0.144px"),jo=$e.extend("--ft-typography-subtitle1-line-height","",Eo.lineHeight,"1.5"),To=$e.extend("--ft-typography-subtitle1-text-transform","",Eo.textTransform,"inherit"),_o=$e.extend("--ft-typography-subtitle2-font-family","",Co),Go=$e.extend("--ft-typography-subtitle2-font-size","",Eo.fontSize,"14px"),Vo=$e.extend("--ft-typography-subtitle2-font-weight","",Eo.fontWeight,"normal"),Yo=$e.extend("--ft-typography-subtitle2-letter-spacing","",Eo.letterSpacing,"0.098px"),Jo=$e.extend("--ft-typography-subtitle2-line-height","",Eo.lineHeight,"1.7"),qo=$e.extend("--ft-typography-subtitle2-text-transform","",Eo.textTransform,"inherit"),Xo={fontFamily:$e.extend("--ft-typography-body1-font-family","",Co),fontSize:$e.extend("--ft-typography-body1-font-size","",Eo.fontSize,"16px"),fontWeight:$e.extend("--ft-typography-body1-font-weight","",Eo.fontWeight,"normal"),letterSpacing:$e.extend("--ft-typography-body1-letter-spacing","",Eo.letterSpacing,"0.496px"),lineHeight:$e.extend("--ft-typography-body1-line-height","",Eo.lineHeight,"1.5"),textTransform:$e.extend("--ft-typography-body1-text-transform","",Eo.textTransform,"inherit")},Qo=$e.extend("--ft-typography-body2-font-family","",Co),ti=$e.extend("--ft-typography-body2-font-size","",Eo.fontSize,"14px"),ei=$e.extend("--ft-typography-body2-font-weight","",Eo.fontWeight,"normal"),oi=$e.extend("--ft-typography-body2-letter-spacing","",Eo.letterSpacing,"0.252px"),ii=$e.extend("--ft-typography-body2-line-height","",Eo.lineHeight,"1.4"),ri=$e.extend("--ft-typography-body2-text-transform","",Eo.textTransform,"inherit"),ni={fontFamily:$e.extend("--ft-typography-caption-font-family","",Co),fontSize:$e.extend("--ft-typography-caption-font-size","",Eo.fontSize,"12px"),fontWeight:$e.extend("--ft-typography-caption-font-weight","",Eo.fontWeight,"normal"),letterSpacing:$e.extend("--ft-typography-caption-letter-spacing","",Eo.letterSpacing,"0.396px"),lineHeight:$e.extend("--ft-typography-caption-line-height","",Eo.lineHeight,"1.33"),textTransform:$e.extend("--ft-typography-caption-text-transform","",Eo.textTransform,"inherit")},ai=$e.extend("--ft-typography-breadcrumb-font-family","",Co),si=$e.extend("--ft-typography-breadcrumb-font-size","",Eo.fontSize,"10px"),li=$e.extend("--ft-typography-breadcrumb-font-weight","",Eo.fontWeight,"normal"),ci=$e.extend("--ft-typography-breadcrumb-letter-spacing","",Eo.letterSpacing,"0.33px"),fi=$e.extend("--ft-typography-breadcrumb-line-height","",Eo.lineHeight,"1.6"),pi=$e.extend("--ft-typography-breadcrumb-text-transform","",Eo.textTransform,"inherit"),di=$e.extend("--ft-typography-overline-font-family","",Co),hi=$e.extend("--ft-typography-overline-font-size","",Eo.fontSize,"10px"),ui=$e.extend("--ft-typography-overline-font-weight","",Eo.fontWeight,"normal"),yi=$e.extend("--ft-typography-overline-letter-spacing","",Eo.letterSpacing,"1.5px"),gi=$e.extend("--ft-typography-overline-line-height","",Eo.lineHeight,"1.6"),bi=$e.extend("--ft-typography-overline-text-transform","",Eo.textTransform,"uppercase"),mi={fontFamily:$e.extend("--ft-typography-button-font-family","",Co),fontSize:$e.extend("--ft-typography-button-font-size","",Eo.fontSize,"14px"),fontWeight:$e.extend("--ft-typography-button-font-weight","",Eo.fontWeight,"600"),letterSpacing:$e.extend("--ft-typography-button-letter-spacing","",Eo.letterSpacing,"1.246px"),lineHeight:$e.extend("--ft-typography-button-line-height","",Eo.lineHeight,"1.15"),textTransform:$e.extend("--ft-typography-button-text-transform","",Eo.textTransform,"uppercase")},xi=St`
|
|
159
159
|
.ft-typography--title {
|
|
160
|
-
font-family: ${
|
|
161
|
-
font-size: ${
|
|
162
|
-
font-weight: ${
|
|
163
|
-
letter-spacing: ${
|
|
164
|
-
line-height: ${
|
|
165
|
-
text-transform: ${
|
|
166
|
-
}
|
|
167
|
-
`,
|
|
160
|
+
font-family: ${ko};
|
|
161
|
+
font-size: ${Ro};
|
|
162
|
+
font-weight: ${Uo};
|
|
163
|
+
letter-spacing: ${Io};
|
|
164
|
+
line-height: ${Lo};
|
|
165
|
+
text-transform: ${Wo};
|
|
166
|
+
}
|
|
167
|
+
`,vi=St`
|
|
168
168
|
.ft-typography--title-dense {
|
|
169
|
-
font-family: ${
|
|
170
|
-
font-size: ${
|
|
171
|
-
font-weight: ${
|
|
172
|
-
letter-spacing: ${
|
|
173
|
-
line-height: ${
|
|
174
|
-
text-transform: ${
|
|
175
|
-
}
|
|
176
|
-
`,
|
|
169
|
+
font-family: ${zo};
|
|
170
|
+
font-size: ${Fo};
|
|
171
|
+
font-weight: ${Zo};
|
|
172
|
+
letter-spacing: ${Ko};
|
|
173
|
+
line-height: ${Do};
|
|
174
|
+
text-transform: ${Bo};
|
|
175
|
+
}
|
|
176
|
+
`,Oi=St`
|
|
177
177
|
.ft-typography--subtitle1 {
|
|
178
|
-
font-family: ${
|
|
179
|
-
font-size: ${
|
|
180
|
-
font-weight: ${
|
|
181
|
-
letter-spacing: ${
|
|
182
|
-
line-height: ${
|
|
183
|
-
text-transform: ${
|
|
184
|
-
}
|
|
185
|
-
`,
|
|
178
|
+
font-family: ${Ao};
|
|
179
|
+
font-size: ${Mo};
|
|
180
|
+
font-weight: ${Po};
|
|
181
|
+
letter-spacing: ${Ho};
|
|
182
|
+
line-height: ${jo};
|
|
183
|
+
text-transform: ${To};
|
|
184
|
+
}
|
|
185
|
+
`,wi=St`
|
|
186
186
|
.ft-typography--subtitle2 {
|
|
187
|
-
font-family: ${
|
|
188
|
-
font-size: ${
|
|
189
|
-
font-weight: ${
|
|
190
|
-
letter-spacing: ${
|
|
191
|
-
line-height: ${
|
|
192
|
-
text-transform: ${
|
|
187
|
+
font-family: ${_o};
|
|
188
|
+
font-size: ${Go};
|
|
189
|
+
font-weight: ${Vo};
|
|
190
|
+
letter-spacing: ${Yo};
|
|
191
|
+
line-height: ${Jo};
|
|
192
|
+
text-transform: ${qo};
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
`,
|
|
195
|
+
`,Si=St`
|
|
196
196
|
.ft-typography--body1 {
|
|
197
|
-
font-family: ${
|
|
198
|
-
font-size: ${
|
|
199
|
-
font-weight: ${
|
|
200
|
-
letter-spacing: ${
|
|
201
|
-
line-height: ${
|
|
202
|
-
text-transform: ${
|
|
203
|
-
}
|
|
204
|
-
|
|
197
|
+
font-family: ${Xo.fontFamily};
|
|
198
|
+
font-size: ${Xo.fontSize};
|
|
199
|
+
font-weight: ${Xo.fontWeight};
|
|
200
|
+
letter-spacing: ${Xo.letterSpacing};
|
|
201
|
+
line-height: ${Xo.lineHeight};
|
|
202
|
+
text-transform: ${Xo.textTransform};
|
|
203
|
+
}
|
|
204
|
+
`,$i=St`
|
|
205
205
|
.ft-typography--body2 {
|
|
206
|
-
font-family: ${
|
|
207
|
-
font-size: ${
|
|
208
|
-
font-weight: ${
|
|
209
|
-
letter-spacing: ${
|
|
210
|
-
line-height: ${
|
|
211
|
-
text-transform: ${
|
|
212
|
-
}
|
|
213
|
-
`,
|
|
206
|
+
font-family: ${Qo};
|
|
207
|
+
font-size: ${ti};
|
|
208
|
+
font-weight: ${ei};
|
|
209
|
+
letter-spacing: ${oi};
|
|
210
|
+
line-height: ${ii};
|
|
211
|
+
text-transform: ${ri};
|
|
212
|
+
}
|
|
213
|
+
`,Ni=St`
|
|
214
214
|
.ft-typography--caption {
|
|
215
|
-
font-family: ${
|
|
216
|
-
font-size: ${
|
|
217
|
-
font-weight: ${
|
|
218
|
-
letter-spacing: ${
|
|
219
|
-
line-height: ${
|
|
220
|
-
text-transform: ${
|
|
221
|
-
}
|
|
222
|
-
`,
|
|
215
|
+
font-family: ${ni.fontFamily};
|
|
216
|
+
font-size: ${ni.fontSize};
|
|
217
|
+
font-weight: ${ni.fontWeight};
|
|
218
|
+
letter-spacing: ${ni.letterSpacing};
|
|
219
|
+
line-height: ${ni.lineHeight};
|
|
220
|
+
text-transform: ${ni.textTransform};
|
|
221
|
+
}
|
|
222
|
+
`,Ci=St`
|
|
223
223
|
.ft-typography--breadcrumb {
|
|
224
|
-
font-family: ${
|
|
225
|
-
font-size: ${
|
|
226
|
-
font-weight: ${
|
|
227
|
-
letter-spacing: ${
|
|
228
|
-
line-height: ${
|
|
229
|
-
text-transform: ${
|
|
230
|
-
}
|
|
231
|
-
`,
|
|
224
|
+
font-family: ${ai};
|
|
225
|
+
font-size: ${si};
|
|
226
|
+
font-weight: ${li};
|
|
227
|
+
letter-spacing: ${ci};
|
|
228
|
+
line-height: ${fi};
|
|
229
|
+
text-transform: ${pi};
|
|
230
|
+
}
|
|
231
|
+
`,Ei=St`
|
|
232
232
|
.ft-typography--overline {
|
|
233
|
-
font-family: ${
|
|
234
|
-
font-size: ${
|
|
235
|
-
font-weight: ${
|
|
236
|
-
letter-spacing: ${
|
|
237
|
-
line-height: ${
|
|
238
|
-
text-transform: ${
|
|
239
|
-
}
|
|
240
|
-
`,
|
|
233
|
+
font-family: ${di};
|
|
234
|
+
font-size: ${hi};
|
|
235
|
+
font-weight: ${ui};
|
|
236
|
+
letter-spacing: ${yi};
|
|
237
|
+
line-height: ${gi};
|
|
238
|
+
text-transform: ${bi};
|
|
239
|
+
}
|
|
240
|
+
`,ki=St`
|
|
241
241
|
.ft-typography--button {
|
|
242
|
-
font-family: ${
|
|
243
|
-
font-size: ${
|
|
244
|
-
font-weight: ${
|
|
245
|
-
letter-spacing: ${
|
|
246
|
-
line-height: ${
|
|
247
|
-
text-transform: ${
|
|
248
|
-
}
|
|
249
|
-
`,
|
|
242
|
+
font-family: ${mi.fontFamily};
|
|
243
|
+
font-size: ${mi.fontSize};
|
|
244
|
+
font-weight: ${mi.fontWeight};
|
|
245
|
+
letter-spacing: ${mi.letterSpacing};
|
|
246
|
+
line-height: ${mi.lineHeight};
|
|
247
|
+
text-transform: ${mi.textTransform};
|
|
248
|
+
}
|
|
249
|
+
`,Ri=St`
|
|
250
250
|
.ft-typography {
|
|
251
251
|
vertical-align: inherit;
|
|
252
252
|
}
|
|
253
|
-
`,
|
|
253
|
+
`,Ui=[Object.keys(Ee).map((t=>function(t){const e=Ee[t];return St`
|
|
254
254
|
.ft-typography--${wt(t)} {
|
|
255
255
|
font-family: ${e.fontFamily};
|
|
256
256
|
font-size: ${e.fontSize};
|
|
@@ -259,32 +259,32 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
259
259
|
line-height: ${e.lineHeight};
|
|
260
260
|
text-transform: ${e.textCase};
|
|
261
261
|
}
|
|
262
|
-
`}(t)))];var
|
|
263
|
-
<${
|
|
262
|
+
`}(t)))];var Ii=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Li extends Be{constructor(){super(...arguments),this.variant=$o.body1}render(){return this.element?So`
|
|
263
|
+
<${Oo(this.element)}
|
|
264
264
|
class="ft-typography ft-typography--${this.variant}">
|
|
265
265
|
<slot></slot>
|
|
266
|
-
</${
|
|
267
|
-
`:
|
|
266
|
+
</${Oo(this.element)}>
|
|
267
|
+
`:So`
|
|
268
268
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
269
|
-
`}}
|
|
269
|
+
`}}Li.styles=[xi,vi,Oi,wi,Si,$i,Ni,Ci,Ei,ki,Ri,...Ui],Ii([$()],Li.prototype,"element",void 0),Ii([$()],Li.prototype,"variant",void 0),L("ft-typography")(Li);const Wi={fontSize:$e.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:$e.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:$e.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:$e.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:$e.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:$e.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:$e.extend("--ft-input-label-border-color","",Ue.colorOutline),textColor:$e.extend("--ft-input-label-text-color","",Ue.colorOnSurfaceMedium),disabledTextColor:$e.extend("--ft-input-label-disabled-text-color","",Ue.colorOnSurfaceDisabled),colorSurface:$e.external(Ue.colorSurface,"Design system"),borderRadiusS:$e.external(Ue.borderRadiusS,"Design system"),colorError:$e.external(Ue.colorError,"Design system")},zi=St`
|
|
270
270
|
.ft-input-label {
|
|
271
271
|
position: absolute;
|
|
272
272
|
inset: 0;
|
|
273
273
|
display: flex;
|
|
274
|
-
background-color: ${
|
|
275
|
-
border-radius: ${
|
|
274
|
+
background-color: ${Wi.colorSurface};
|
|
275
|
+
border-radius: ${Wi.borderRadiusS} ${Wi.borderRadiusS} 0 0;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
.ft-input-label--outlined {
|
|
279
|
-
border-radius: ${
|
|
279
|
+
border-radius: ${Wi.borderRadiusS};
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
.ft-input-label {
|
|
283
|
-
border-color: ${
|
|
283
|
+
border-color: ${Wi.borderColor};
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
.ft-input-label.ft-input-label--in-error {
|
|
287
|
-
border-color: ${
|
|
287
|
+
border-color: ${Wi.colorError}
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
.ft-input-label:before,
|
|
@@ -297,7 +297,7 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
.ft-input-label:before {
|
|
300
|
-
width: calc(${
|
|
300
|
+
width: calc(${Wi.horizontalSpacing} - 4px);
|
|
301
301
|
flex-shrink: 0;
|
|
302
302
|
}
|
|
303
303
|
|
|
@@ -313,20 +313,20 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
313
313
|
border-bottom-width: 1px;
|
|
314
314
|
border-bottom-style: solid;
|
|
315
315
|
border-color: inherit;
|
|
316
|
-
color: ${
|
|
316
|
+
color: ${Wi.textColor};
|
|
317
317
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
318
|
-
max-width: calc(${
|
|
318
|
+
max-width: calc(${Wi.labelMaxWidth} - 2 * (${Wi.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
319
319
|
text-overflow: ellipsis;
|
|
320
|
-
${Ne(
|
|
321
|
-
${Ne(
|
|
320
|
+
${Ne(ni.fontSize,Wi.fontSize)};
|
|
321
|
+
${Ne(ni.lineHeight,Wi.fontSize)};
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
.ft-input-label--in-error .ft-input-label--text {
|
|
325
|
-
color: ${
|
|
325
|
+
color: ${Wi.colorError}
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
.ft-input-label--disabled .ft-input-label--text {
|
|
329
|
-
color: ${
|
|
329
|
+
color: ${Wi.disabledTextColor};
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
.ft-input-label--hidden-text {
|
|
@@ -343,19 +343,19 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
343
343
|
overflow: hidden;
|
|
344
344
|
white-space: nowrap;
|
|
345
345
|
text-overflow: ellipsis;
|
|
346
|
-
padding: ${
|
|
347
|
-
margin: calc(${
|
|
346
|
+
padding: ${Wi.verticalSpacing} 4px;
|
|
347
|
+
margin: calc(${Wi.verticalSpacing} * -1) 0;
|
|
348
348
|
max-width: 100%;
|
|
349
349
|
box-sizing: border-box;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
.ft-input-label--raised .ft-input-label--text {
|
|
353
|
-
${Ne(
|
|
354
|
-
${Ne(
|
|
353
|
+
${Ne(ni.fontSize,Wi.raisedFontSize)};
|
|
354
|
+
${Ne(ni.lineHeight,Wi.raisedFontSize)};
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
358
|
-
top: ${
|
|
358
|
+
top: ${Wi.verticalSpacing};
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -368,28 +368,28 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
368
368
|
.ft-input-label--outlined:before {
|
|
369
369
|
border-left-width: 1px;
|
|
370
370
|
border-left-style: solid;
|
|
371
|
-
border-radius: ${
|
|
371
|
+
border-radius: ${Wi.borderRadiusS} 0 0 ${Wi.borderRadiusS};
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
.ft-input-label--outlined:after {
|
|
375
375
|
border-right-width: 1px;
|
|
376
376
|
border-right-style: solid;
|
|
377
|
-
border-radius: 0 ${
|
|
377
|
+
border-radius: 0 ${Wi.borderRadiusS} ${Wi.borderRadiusS} 0;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
381
381
|
padding: 2px 4px;
|
|
382
|
-
z-index: ${
|
|
383
|
-
background-color: ${
|
|
384
|
-
border-radius: ${
|
|
382
|
+
z-index: ${Wi.raisedZIndex};
|
|
383
|
+
background-color: ${Wi.colorSurface};
|
|
384
|
+
border-radius: ${Wi.borderRadiusS};
|
|
385
385
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
389
389
|
border-top: none;
|
|
390
390
|
}
|
|
391
|
-
`;var
|
|
392
|
-
<div class="${
|
|
391
|
+
`;var Fi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Zi extends Be{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 ne`
|
|
392
|
+
<div class="${mo(t)}">
|
|
393
393
|
${this.text?ne`
|
|
394
394
|
<div class="ft-input-label--text ft-typography--caption">
|
|
395
395
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -397,7 +397,7 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
397
397
|
</div>
|
|
398
398
|
`:null}
|
|
399
399
|
</div>
|
|
400
|
-
`}}
|
|
400
|
+
`}}Zi.elementDefinitions={},Zi.styles=[Ni,zi],Fi([$({type:String})],Zi.prototype,"text",void 0),Fi([$({type:Boolean})],Zi.prototype,"raised",void 0),Fi([$({type:Boolean})],Zi.prototype,"outlined",void 0),Fi([$({type:Boolean})],Zi.prototype,"disabled",void 0),Fi([$({type:Boolean})],Zi.prototype,"error",void 0),L("ft-input-label")(Zi);const Ki=$e.extend("--ft-ripple-color","",Ue.colorContent),Di={color:Ki,backgroundColor:$e.extend("--ft-ripple-background-color","",Ki),opacityContentOnSurfacePressed:$e.external(Ue.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:$e.external(Ue.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:$e.external(Ue.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:$e.external(Ue.opacityContentOnSurfaceSelected,"Design system"),borderRadius:$e.create("--ft-ripple-border-radius","","SIZE","0px")},Bi=$e.extend("--ft-ripple-color","",Ue.colorPrimary),Ai=Bi,Mi=$e.extend("--ft-ripple-background-color","",Bi),Pi=$e.extend("--ft-ripple-color","",Ue.colorSecondary),Hi=Pi,ji=$e.extend("--ft-ripple-background-color","",Pi),Ti=St`
|
|
401
401
|
:host {
|
|
402
402
|
display: contents;
|
|
403
403
|
}
|
|
@@ -410,7 +410,7 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
410
410
|
|
|
411
411
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
412
412
|
overflow: hidden;
|
|
413
|
-
border-radius: ${
|
|
413
|
+
border-radius: ${Di.borderRadius};
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
.ft-ripple .ft-ripple--background,
|
|
@@ -444,27 +444,27 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
.ft-ripple .ft-ripple--background {
|
|
447
|
-
background-color: ${
|
|
447
|
+
background-color: ${Di.backgroundColor};
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
.ft-ripple .ft-ripple--effect {
|
|
451
|
-
background-color: ${
|
|
451
|
+
background-color: ${Di.color};
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
455
|
-
background-color: ${
|
|
455
|
+
background-color: ${ji};
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
459
|
-
background-color: ${
|
|
459
|
+
background-color: ${Hi};
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
463
|
-
background-color: ${
|
|
463
|
+
background-color: ${Mi};
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
467
|
-
background-color: ${
|
|
467
|
+
background-color: ${Ai};
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
.ft-ripple .ft-ripple--background {
|
|
@@ -494,33 +494,33 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
497
|
-
opacity: ${
|
|
497
|
+
opacity: ${Di.opacityContentOnSurfaceHover};
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
501
|
-
opacity: ${
|
|
501
|
+
opacity: ${Di.opacityContentOnSurfaceSelected};
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
505
|
-
opacity: ${
|
|
505
|
+
opacity: ${Di.opacityContentOnSurfaceFocused};
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
509
|
-
opacity: ${
|
|
509
|
+
opacity: ${Di.opacityContentOnSurfacePressed};
|
|
510
510
|
transform: translate(-50%, -50%) scale(1);
|
|
511
511
|
}
|
|
512
|
-
`;var
|
|
512
|
+
`;var _i,Gi,Vi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Yi extends Be{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new U(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new U(10),this.moveRipple=t=>{var e,o;let{x:i,y:r}=this.getCoordinates(t),n=null!==(o=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==o?o:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=i?i-n.x:n.width/2),this.originY=Math.round(null!=r?r-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return ne`
|
|
513
513
|
<style>
|
|
514
514
|
.ft-ripple .ft-ripple--effect {
|
|
515
515
|
left: ${this.originX}px;
|
|
516
516
|
top: ${this.originY}px;
|
|
517
517
|
}
|
|
518
518
|
</style>
|
|
519
|
-
<div class="${
|
|
519
|
+
<div class="${mo(t)}">
|
|
520
520
|
<div class="ft-ripple--background"></div>
|
|
521
521
|
<div class="ft-ripple--effect"></div>
|
|
522
522
|
</div>
|
|
523
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",o,n),t.addEventListener("touchstart",i,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",o,n),t.removeEventListener("touchstart",i,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Mi.elementDefinitions={},Mi.styles=Ki,Ai([$({type:Boolean})],Mi.prototype,"primary",void 0),Ai([$({type:Boolean})],Mi.prototype,"secondary",void 0),Ai([$({type:Boolean})],Mi.prototype,"unbounded",void 0),Ai([$({type:Boolean})],Mi.prototype,"activated",void 0),Ai([$({type:Boolean})],Mi.prototype,"selected",void 0),Ai([$({type:Boolean})],Mi.prototype,"disabled",void 0),Ai([N()],Mi.prototype,"hovered",void 0),Ai([N()],Mi.prototype,"focused",void 0),Ai([N()],Mi.prototype,"pressed",void 0),Ai([N()],Mi.prototype,"rippling",void 0),Ai([N()],Mi.prototype,"originX",void 0),Ai([N()],Mi.prototype,"originY",void 0),Ai([k(".ft-ripple")],Mi.prototype,"ripple",void 0),Ai([k(".ft-ripple--effect")],Mi.prototype,"rippleEffect",void 0),L("ft-ripple")(Mi),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Di||(Di={})),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=""}(Bi||(Bi={})),new Map([...["abw"].map((t=>[t,Bi.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,Bi.AUDIO])),...["avi"].map((t=>[t,Bi.AVI])),...["chm","xhs"].map((t=>[t,Bi.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,Bi.CODE])),...["csv"].map((t=>[t,Bi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Bi.DITA])),...["epub"].map((t=>[t,Bi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Bi.EXCEL])),...["flac"].map((t=>[t,Bi.FLAC])),...["gif"].map((t=>[t,Bi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Bi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Bi.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,Bi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Bi.JPEG])),...["json"].map((t=>[t,Bi.JSON])),...["m4a","m4p"].map((t=>[t,Bi.M4A])),...["mov","qt"].map((t=>[t,Bi.MOV])),...["mp3"].map((t=>[t,Bi.MP3])),...["mp4","m4v"].map((t=>[t,Bi.MP4])),...["ogg","oga"].map((t=>[t,Bi.OGG])),...["pdf","ps"].map((t=>[t,Bi.PDF])),...["png"].map((t=>[t,Bi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Bi.POWERPOINT])),...["rar"].map((t=>[t,Bi.RAR])),...["stp"].map((t=>[t,Bi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Bi.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,Bi.VIDEO])),...["wav"].map((t=>[t,Bi.WAV])),...["wma"].map((t=>[t,Bi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Bi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Bi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Bi.YAML])),...["zip"].map((t=>[t,Bi.ZIP]))]);const Pi={size:$e.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:$e.extend("--ft-icon-fluid-topics-font-family","",$e.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:$e.extend("--ft-icon-file-format-font-family","",$e.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:$e.extend("--ft-icon-material-font-family","",$e.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:$e.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Hi=St`
|
|
523
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",o,n),t.addEventListener("touchstart",i,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",o,n),t.removeEventListener("touchstart",i,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Yi.elementDefinitions={},Yi.styles=Ti,Vi([$({type:Boolean})],Yi.prototype,"primary",void 0),Vi([$({type:Boolean})],Yi.prototype,"secondary",void 0),Vi([$({type:Boolean})],Yi.prototype,"unbounded",void 0),Vi([$({type:Boolean})],Yi.prototype,"activated",void 0),Vi([$({type:Boolean})],Yi.prototype,"selected",void 0),Vi([$({type:Boolean})],Yi.prototype,"disabled",void 0),Vi([N()],Yi.prototype,"hovered",void 0),Vi([N()],Yi.prototype,"focused",void 0),Vi([N()],Yi.prototype,"pressed",void 0),Vi([N()],Yi.prototype,"rippling",void 0),Vi([N()],Yi.prototype,"originX",void 0),Vi([N()],Yi.prototype,"originY",void 0),Vi([k(".ft-ripple")],Yi.prototype,"ripple",void 0),Vi([k(".ft-ripple--effect")],Yi.prototype,"rippleEffect",void 0),L("ft-ripple")(Yi),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(_i||(_i={})),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=""}(Gi||(Gi={})),new Map([...["abw"].map((t=>[t,Gi.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,Gi.AUDIO])),...["avi"].map((t=>[t,Gi.AVI])),...["chm","xhs"].map((t=>[t,Gi.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,Gi.CODE])),...["csv"].map((t=>[t,Gi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Gi.DITA])),...["epub"].map((t=>[t,Gi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Gi.EXCEL])),...["flac"].map((t=>[t,Gi.FLAC])),...["gif"].map((t=>[t,Gi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Gi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Gi.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,Gi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Gi.JPEG])),...["json"].map((t=>[t,Gi.JSON])),...["m4a","m4p"].map((t=>[t,Gi.M4A])),...["mov","qt"].map((t=>[t,Gi.MOV])),...["mp3"].map((t=>[t,Gi.MP3])),...["mp4","m4v"].map((t=>[t,Gi.MP4])),...["ogg","oga"].map((t=>[t,Gi.OGG])),...["pdf","ps"].map((t=>[t,Gi.PDF])),...["png"].map((t=>[t,Gi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Gi.POWERPOINT])),...["rar"].map((t=>[t,Gi.RAR])),...["stp"].map((t=>[t,Gi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Gi.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,Gi.VIDEO])),...["wav"].map((t=>[t,Gi.WAV])),...["wma"].map((t=>[t,Gi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Gi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Gi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Gi.YAML])),...["zip"].map((t=>[t,Gi.ZIP]))]);const Ji={size:$e.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:$e.extend("--ft-icon-fluid-topics-font-family","",$e.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:$e.extend("--ft-icon-file-format-font-family","",$e.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:$e.extend("--ft-icon-material-font-family","",$e.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:$e.create("--ft-icon-vertical-align","","UNKNOWN","unset")},qi=St`
|
|
524
524
|
:host, i.ft-icon {
|
|
525
525
|
display: inline-flex;
|
|
526
526
|
align-items: center;
|
|
@@ -529,14 +529,14 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
:host {
|
|
532
|
-
width: ${
|
|
533
|
-
height: ${
|
|
532
|
+
width: ${Ji.size};
|
|
533
|
+
height: ${Ji.size};
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
i.ft-icon {
|
|
537
537
|
width: 100%;
|
|
538
538
|
height: 100%;
|
|
539
|
-
font-size: ${
|
|
539
|
+
font-size: ${Ji.size};
|
|
540
540
|
line-height: 1;
|
|
541
541
|
font-weight: normal;
|
|
542
542
|
text-transform: none;
|
|
@@ -547,33 +547,33 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
547
547
|
text-rendering: auto;
|
|
548
548
|
-webkit-font-smoothing: antialiased;
|
|
549
549
|
-moz-osx-font-smoothing: grayscale;
|
|
550
|
-
vertical-align: ${
|
|
550
|
+
vertical-align: ${Ji.verticalAlign};
|
|
551
551
|
}
|
|
552
552
|
|
|
553
553
|
i.ft-icon.ft-icon--fluid-topics {
|
|
554
|
-
font-family: ${
|
|
554
|
+
font-family: ${Ji.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
555
555
|
|
|
556
556
|
/* Ugly fix because font is broken */
|
|
557
|
-
font-size: calc(0.75 * ${
|
|
558
|
-
line-height: ${
|
|
557
|
+
font-size: calc(0.75 * ${Ji.size});
|
|
558
|
+
line-height: ${Ji.size};
|
|
559
559
|
position: relative;
|
|
560
560
|
top: -4%;
|
|
561
561
|
justify-content: center;
|
|
562
562
|
}
|
|
563
563
|
|
|
564
564
|
.ft-icon--file-format {
|
|
565
|
-
font-family: ${
|
|
565
|
+
font-family: ${Ji.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
.ft-icon--material {
|
|
569
|
-
font-family: ${
|
|
569
|
+
font-family: ${Ji.materialFontFamily}, "Material Icons", sans-serif;
|
|
570
570
|
}
|
|
571
|
-
`;var
|
|
571
|
+
`;var Xi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Xi||(Xi={}));var Qi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class tr extends Be{constructor(){super(...arguments),this.resolvedIcon=se}render(){const t=this.variant&&Object.values(Xi).includes(this.variant)?this.variant:Xi.fluid_topics,e=t!==Xi.material||!!this.value;return ne`
|
|
572
572
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
573
|
-
${
|
|
573
|
+
${bo(this.resolvedIcon)}
|
|
574
574
|
<slot ?hidden=${e}></slot>
|
|
575
575
|
</i>
|
|
576
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
576
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Xi.file_format:this.resolvedIcon=null!==(t=Gi[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Xi.material:this.resolvedIcon=this.value||se;break;default:this.resolvedIcon=null!==(e=_i[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}tr.elementDefinitions={},tr.styles=qi,Qi([$()],tr.prototype,"variant",void 0),Qi([$()],tr.prototype,"value",void 0),Qi([N()],tr.prototype,"resolvedIcon",void 0),Qi([k("slot")],tr.prototype,"slottedContent",void 0),L("ft-icon")(tr);const er={labelSize:$e.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:$e.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:$e.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:$e.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:$e.create("--ft-select-options-height","","SIZE","unset"),selectedOptionColor:$e.extend("--ft-select-selected-option-color","",Ue.colorOnSurface),helperColor:$e.extend("--ft-select-helper-color","",Ue.colorOnSurfaceMedium),optionsColor:$e.extend("--ft-select-options-color","",Ue.colorOnSurface),optionsZIndex:$e.create("--ft-select-options-z-index","","NUMBER","3"),colorSurface:$e.external(Ue.colorSurface,"Design system"),colorOnSurfaceDisabled:$e.external(Ue.colorOnSurfaceDisabled,"Design system"),colorPrimary:$e.external(Ue.colorPrimary,"Design system"),borderRadiusS:$e.external(Ue.borderRadiusS,"Design system"),elevation02:$e.external(Ue.elevation02,"Design system"),colorError:$e.external(Ue.colorError,"Design system")},or=St`
|
|
577
577
|
*:focus {
|
|
578
578
|
outline: none;
|
|
579
579
|
}
|
|
@@ -587,7 +587,7 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
587
587
|
.ft-select--main-panel {
|
|
588
588
|
position: relative;
|
|
589
589
|
display: flex;
|
|
590
|
-
height: calc(4 * ${
|
|
590
|
+
height: calc(4 * ${er.verticalSpacing} + ${er.labelSize} + ${er.selectedOptionSize});
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
.ft-select--input-panel {
|
|
@@ -596,17 +596,17 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
596
596
|
display: flex;
|
|
597
597
|
align-items: center;
|
|
598
598
|
overflow: hidden;
|
|
599
|
-
padding-left: ${
|
|
600
|
-
padding-right: ${
|
|
599
|
+
padding-left: ${er.horizontalSpacing};
|
|
600
|
+
padding-right: ${er.horizontalSpacing};
|
|
601
601
|
gap: 8px;
|
|
602
|
-
color: ${
|
|
603
|
-
${Ne(
|
|
602
|
+
color: ${er.selectedOptionColor};
|
|
603
|
+
${Ne(Di.color,er.selectedOptionColor)};
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
.ft-select--input-panel,
|
|
607
607
|
.ft-select--option {
|
|
608
|
-
${Ne(
|
|
609
|
-
${Ne(
|
|
608
|
+
${Ne(Di.opacityContentOnSurfaceHover,"0.08")};
|
|
609
|
+
${Ne(Di.opacityContentOnSurfacePressed,"0.04")};
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -616,7 +616,7 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
616
616
|
|
|
617
617
|
.ft-select--disabled .ft-select--input-panel,
|
|
618
618
|
.ft-select--disabled .ft-select--option {
|
|
619
|
-
color: ${
|
|
619
|
+
color: ${er.colorOnSurfaceDisabled};
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -625,20 +625,20 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
ft-input-label {
|
|
628
|
-
${Ne(
|
|
629
|
-
${Ne(
|
|
630
|
-
${Ne(
|
|
631
|
-
${Ne(
|
|
632
|
-
${Ne(
|
|
628
|
+
${Ne(Wi.fontSize,er.selectedOptionSize)};
|
|
629
|
+
${Ne(Wi.raisedFontSize,er.labelSize)};
|
|
630
|
+
${Ne(Wi.verticalSpacing,er.verticalSpacing)};
|
|
631
|
+
${Ne(Wi.horizontalSpacing,er.horizontalSpacing)};
|
|
632
|
+
${Ne(Wi.labelMaxWidth,`calc(100% - ${Ji.size} - 8px)`)};
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
636
|
-
color: ${
|
|
636
|
+
color: ${er.colorPrimary};
|
|
637
637
|
}
|
|
638
638
|
|
|
639
639
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
640
|
-
${Ne(
|
|
641
|
-
${Ne(
|
|
640
|
+
${Ne(Wi.borderColor,er.colorPrimary)};
|
|
641
|
+
${Ne(Wi.textColor,er.colorPrimary)};
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
.ft-select--selected-option {
|
|
@@ -648,12 +648,12 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
648
648
|
overflow: hidden;
|
|
649
649
|
white-space: nowrap;
|
|
650
650
|
text-overflow: ellipsis;
|
|
651
|
-
${Ne(
|
|
652
|
-
${Ne(
|
|
651
|
+
${Ne(Xo.fontSize,er.selectedOptionSize)};
|
|
652
|
+
${Ne(Xo.lineHeight,er.selectedOptionSize)};
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
.ft-select--in-error .ft-select--selected-option {
|
|
656
|
-
color: ${
|
|
656
|
+
color: ${er.colorError};
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
ft-icon {
|
|
@@ -665,16 +665,16 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
665
665
|
}
|
|
666
666
|
|
|
667
667
|
.ft-select--filled .ft-select--input-panel {
|
|
668
|
-
border-radius: ${
|
|
668
|
+
border-radius: ${er.borderRadiusS} ${er.borderRadiusS} 0 0;
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
672
672
|
align-self: stretch;
|
|
673
|
-
padding-top: calc(${
|
|
673
|
+
padding-top: calc(${er.labelSize} + 2 * ${er.verticalSpacing});
|
|
674
674
|
}
|
|
675
675
|
|
|
676
676
|
.ft-select--outlined .ft-select--input-panel {
|
|
677
|
-
border-radius: ${
|
|
677
|
+
border-radius: ${er.borderRadiusS};
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
.ft-select--options {
|
|
@@ -683,10 +683,10 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
683
683
|
top: 100%;
|
|
684
684
|
left: 0;
|
|
685
685
|
right: 0;
|
|
686
|
-
color: ${
|
|
687
|
-
background: ${
|
|
688
|
-
z-index: ${
|
|
689
|
-
box-shadow: ${
|
|
686
|
+
color: ${er.optionsColor};
|
|
687
|
+
background: ${er.colorSurface};
|
|
688
|
+
z-index: ${er.optionsZIndex};
|
|
689
|
+
box-shadow: ${er.elevation02};
|
|
690
690
|
}
|
|
691
691
|
|
|
692
692
|
.ft-select--fixed .ft-select--options {
|
|
@@ -697,13 +697,13 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
697
697
|
|
|
698
698
|
.ft-select--options-displayed .ft-select--options {
|
|
699
699
|
display: block;
|
|
700
|
-
max-height: ${
|
|
700
|
+
max-height: ${er.optionsHeight};
|
|
701
701
|
overflow-y: auto;
|
|
702
702
|
}
|
|
703
703
|
|
|
704
704
|
.ft-select--option {
|
|
705
705
|
position: relative;
|
|
706
|
-
padding: 4px ${
|
|
706
|
+
padding: 4px ${er.horizontalSpacing};
|
|
707
707
|
min-height: 32px;
|
|
708
708
|
display: flex;
|
|
709
709
|
align-items: center;
|
|
@@ -715,15 +715,15 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
715
715
|
}
|
|
716
716
|
|
|
717
717
|
.ft-select--helper-text {
|
|
718
|
-
padding: 0 ${
|
|
719
|
-
color: ${
|
|
718
|
+
padding: 0 ${er.horizontalSpacing};
|
|
719
|
+
color: ${er.helperColor};
|
|
720
720
|
}
|
|
721
721
|
|
|
722
722
|
.ft-select--in-error .ft-select--helper-text {
|
|
723
|
-
color: ${
|
|
723
|
+
color: ${er.colorError};
|
|
724
724
|
}
|
|
725
|
-
`;var
|
|
726
|
-
<div class="${
|
|
725
|
+
`;var ir=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class rr extends Be{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return ne``}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}rr.elementDefinitions={},ir([$({type:String})],rr.prototype,"label",void 0),ir([$({type:Object,converter:t=>t})],rr.prototype,"value",void 0),ir([$({type:Boolean,reflect:!0})],rr.prototype,"selected",void 0);class nr extends Be{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,i,r;let n=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions;const s=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,l={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":n,"ft-select--has-option-selected":s,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return ne`
|
|
726
|
+
<div class="${mo(l)}" part="container">
|
|
727
727
|
<div class="ft-select--main-panel" part="main-panel">
|
|
728
728
|
<ft-input-label text="${this.label}"
|
|
729
729
|
part="label"
|
|
@@ -750,7 +750,7 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
750
750
|
part="options"
|
|
751
751
|
@keydown=${this.onOptionsKeyDown}
|
|
752
752
|
innerrole="listbox">
|
|
753
|
-
${
|
|
753
|
+
${yo(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
754
754
|
</div>
|
|
755
755
|
</div>
|
|
756
756
|
${this.helper?ne`
|
|
@@ -761,7 +761,7 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
761
761
|
@option-change=${this.updateOptionsFromSlot}
|
|
762
762
|
></slot>
|
|
763
763
|
`}renderOption(t){let e=this.selectedOption===t;return ne`
|
|
764
|
-
<div class="${
|
|
764
|
+
<div class="${mo({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
765
765
|
part="option"
|
|
766
766
|
tabindex="0"
|
|
767
767
|
data-value="${t.value}"
|
|
@@ -770,13 +770,13 @@ let so=class extends Xe{constructor(t){if(super(t),this.et=et,t.type!==Je)throw
|
|
|
770
770
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
771
771
|
<span>${t.label}</span>
|
|
772
772
|
</div>
|
|
773
|
-
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,o,i,r,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!I(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
773
|
+
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,o,i,r,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!I(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}nr.elementDefinitions={"ft-input-label":Zi,"ft-typography":Li,"ft-ripple":Yi,"ft-icon":tr},nr.styles=[$i,Ni,or],ir([$({type:String})],nr.prototype,"label",void 0),ir([$({type:String})],nr.prototype,"helper",void 0),ir([$({type:Boolean})],nr.prototype,"outlined",void 0),ir([$({type:Boolean})],nr.prototype,"disabled",void 0),ir([$({type:Boolean})],nr.prototype,"error",void 0),ir([$({type:Boolean})],nr.prototype,"fixedMenuPosition",void 0),ir([$({type:Array})],nr.prototype,"options",void 0),ir([N()],nr.prototype,"selectedOption",void 0),ir([N()],nr.prototype,"optionsDisplayed",void 0),ir([N()],nr.prototype,"focusOptions",void 0),ir([k(".ft-select")],nr.prototype,"container",void 0),ir([k(".ft-select--options")],nr.prototype,"optionsMenu",void 0),ir([k(".ft-select--input-panel")],nr.prototype,"mainPanel",void 0),ir([k(".ft-select--option:first-child")],nr.prototype,"firstOption",void 0),ir([k(".ft-select--option:focus")],nr.prototype,"focusedOption",void 0),ir([k(".ft-select--option.ft-select--option-selected")],nr.prototype,"selectedOptionElement",void 0),ir([k(".ft-select--option:last-child")],nr.prototype,"lastOption",void 0),ir([k("slot")],nr.prototype,"optionsSlot",void 0),L("ft-select")(nr),L("ft-select-option")(rr);
|
|
774
774
|
/**
|
|
775
775
|
* @license
|
|
776
776
|
* Copyright 2018 Google LLC
|
|
777
777
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
778
778
|
*/
|
|
779
|
-
const
|
|
779
|
+
const ar={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:$e.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:$e.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:$e.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:$e.extend("--ft-text-field-helper-color","",Ue.colorOnSurfaceMedium),colorPrimary:$e.external(Ue.colorPrimary,"Design system"),colorOnSurface:$e.external(Ue.colorOnSurface,"Design system"),colorOnSurfaceDisabled:$e.external(Ue.colorOnSurfaceDisabled,"Design system"),borderRadiusS:$e.external(Ue.borderRadiusS,"Design system"),colorError:$e.external(Ue.colorError,"Design system"),prefixColor:$e.extend("--ft-text-field-prefix-color","",Ue.colorOnSurfaceMedium),iconColor:$e.extend("--ft-text-field-icon-color","",Ue.colorOnSurfaceMedium),floatingZIndex:$e.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),colorSurface:$e.external(Ue.colorSurface,"Design system"),colorOutline:$e.external(Ue.colorOutline,"Design system"),elevation02:$e.external(Ue.elevation02,"Design system"),suggestSize:$e.create("--ft-text-field-suggest-size","","SIZE","300px")},sr=St`
|
|
780
780
|
*:focus {
|
|
781
781
|
outline: none;
|
|
782
782
|
}
|
|
@@ -789,16 +789,16 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
789
789
|
}
|
|
790
790
|
|
|
791
791
|
ft-input-label {
|
|
792
|
-
${Ne(
|
|
793
|
-
${Ne(
|
|
794
|
-
${Ne(
|
|
795
|
-
${Ne(
|
|
792
|
+
${Ne(Wi.fontSize,ar.fontSize)};
|
|
793
|
+
${Ne(Wi.raisedFontSize,ar.labelSize)};
|
|
794
|
+
${Ne(Wi.verticalSpacing,ar.verticalSpacing)};
|
|
795
|
+
${Ne(Wi.horizontalSpacing,ar.horizontalSpacing)};
|
|
796
796
|
}
|
|
797
797
|
|
|
798
798
|
.ft-text-field--main-panel {
|
|
799
799
|
position: relative;
|
|
800
800
|
display: flex;
|
|
801
|
-
height: calc(4 * ${
|
|
801
|
+
height: calc(4 * ${ar.verticalSpacing} + ${ar.labelSize} + ${ar.fontSize});
|
|
802
802
|
}
|
|
803
803
|
|
|
804
804
|
.ft-text-field--input-panel {
|
|
@@ -807,24 +807,24 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
807
807
|
display: flex;
|
|
808
808
|
align-items: center;
|
|
809
809
|
overflow: hidden;
|
|
810
|
-
padding: 0 ${
|
|
810
|
+
padding: 0 ${ar.horizontalSpacing};
|
|
811
811
|
|
|
812
|
-
${Ne(
|
|
813
|
-
${Ne(
|
|
812
|
+
${Ne(Xo.fontSize,ar.fontSize)};
|
|
813
|
+
${Ne(Xo.lineHeight,ar.fontSize)};
|
|
814
814
|
}
|
|
815
815
|
|
|
816
816
|
.ft-text-field--input-panel ft-ripple {
|
|
817
|
-
${Ne(
|
|
818
|
-
${Ne(
|
|
817
|
+
${Ne(Di.opacityContentOnSurfaceHover,"0.08")};
|
|
818
|
+
${Ne(Di.opacityContentOnSurfacePressed,"0.04")};
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
822
822
|
align-items: flex-end;
|
|
823
|
-
padding: 0 ${
|
|
823
|
+
padding: 0 ${ar.horizontalSpacing} ${ar.verticalSpacing} ${ar.horizontalSpacing};
|
|
824
824
|
}
|
|
825
825
|
|
|
826
826
|
.ft-text-field--prefix {
|
|
827
|
-
color: ${
|
|
827
|
+
color: ${ar.prefixColor};
|
|
828
828
|
margin-right: 2px;
|
|
829
829
|
flex-shrink: 1;
|
|
830
830
|
overflow: hidden;
|
|
@@ -843,15 +843,15 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
843
843
|
flex-shrink: 1;
|
|
844
844
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
845
845
|
|
|
846
|
-
color: ${
|
|
847
|
-
padding: calc(2 * ${
|
|
846
|
+
color: ${ar.colorOnSurface};
|
|
847
|
+
padding: calc(2 * ${ar.verticalSpacing}) 0;
|
|
848
848
|
border: none;
|
|
849
849
|
background: none;
|
|
850
850
|
}
|
|
851
851
|
|
|
852
852
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
853
853
|
padding-bottom: 0;
|
|
854
|
-
padding-top: calc(${
|
|
854
|
+
padding-top: calc(${ar.labelSize} + 2 * ${ar.verticalSpacing});
|
|
855
855
|
}
|
|
856
856
|
|
|
857
857
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -860,37 +860,37 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
860
860
|
}
|
|
861
861
|
|
|
862
862
|
.ft-text-field--disabled .ft-text-field--input {
|
|
863
|
-
color: ${
|
|
863
|
+
color: ${ar.colorOnSurfaceDisabled};
|
|
864
864
|
}
|
|
865
865
|
|
|
866
866
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
867
|
-
${Ne(
|
|
868
|
-
${Ne(
|
|
867
|
+
${Ne(Wi.borderColor,ar.colorPrimary)};
|
|
868
|
+
${Ne(Wi.textColor,ar.colorPrimary)};
|
|
869
869
|
}
|
|
870
870
|
|
|
871
871
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
872
|
-
border-radius: ${
|
|
872
|
+
border-radius: ${ar.borderRadiusS} ${ar.borderRadiusS} 0 0;
|
|
873
873
|
}
|
|
874
874
|
|
|
875
875
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
876
|
-
border-radius: ${
|
|
876
|
+
border-radius: ${ar.borderRadiusS};
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
.ft-text-field--helper-text {
|
|
880
|
-
padding: 0 12px 0 ${
|
|
881
|
-
color: ${
|
|
880
|
+
padding: 0 12px 0 ${ar.horizontalSpacing};
|
|
881
|
+
color: ${ar.helperColor};
|
|
882
882
|
}
|
|
883
883
|
|
|
884
884
|
.ft-text-field--in-error .ft-text-field--input,
|
|
885
885
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
886
886
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
887
|
-
color: ${
|
|
887
|
+
color: ${ar.colorError};
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
.ft-text-field--icon {
|
|
891
891
|
align-self: center;
|
|
892
892
|
margin-left: 8px;
|
|
893
|
-
color: ${
|
|
893
|
+
color: ${ar.iconColor};
|
|
894
894
|
}
|
|
895
895
|
|
|
896
896
|
.ft-text-field--container {
|
|
@@ -903,13 +903,13 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
903
903
|
position: absolute;
|
|
904
904
|
left: 0;
|
|
905
905
|
right: 0;
|
|
906
|
-
z-index: ${
|
|
907
|
-
background: ${
|
|
908
|
-
border: 1px solid ${
|
|
909
|
-
border-radius: 0 0 ${
|
|
910
|
-
box-shadow: ${
|
|
906
|
+
z-index: ${ar.floatingZIndex};
|
|
907
|
+
background: ${ar.colorSurface};
|
|
908
|
+
border: 1px solid ${ar.colorOutline};
|
|
909
|
+
border-radius: 0 0 ${ar.borderRadiusS} ${ar.borderRadiusS};
|
|
910
|
+
box-shadow: ${ar.elevation02};
|
|
911
911
|
outline: none;
|
|
912
|
-
max-height: ${
|
|
912
|
+
max-height: ${ar.suggestSize};
|
|
913
913
|
overflow-y: auto;
|
|
914
914
|
}
|
|
915
915
|
|
|
@@ -926,14 +926,14 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
926
926
|
}
|
|
927
927
|
|
|
928
928
|
.ft-text-field--with-icon {
|
|
929
|
-
${Ne(
|
|
929
|
+
${Ne(Wi.labelMaxWidth,`calc(100% - ${Ji.size} - ${Wi.horizontalSpacing})`)};
|
|
930
930
|
}
|
|
931
931
|
|
|
932
932
|
.ft-text-field--with-password ft-icon:hover {
|
|
933
933
|
cursor: pointer;
|
|
934
934
|
}
|
|
935
|
-
`;var
|
|
936
|
-
<div class="${
|
|
935
|
+
`;var lr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class cr extends(Xe(Be,"textbox")){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.passwordHiddenIcon=_i.EYE_SLASH,this.passwordRevealedIcon=_i.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.hidePassword=!0,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",e)}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--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.password};return ne`
|
|
936
|
+
<div class="${mo(t)}">
|
|
937
937
|
<div class="ft-text-field--main-panel"
|
|
938
938
|
@keydown=${this.handleKeyboardNavigation}
|
|
939
939
|
@focusout=${this.onMainPanelBlur}>
|
|
@@ -983,7 +983,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
983
983
|
.variant=${this.iconVariant}
|
|
984
984
|
.value=${this.icon}
|
|
985
985
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
986
|
-
`:se}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,o;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),i=null===(o=this.suggestionsContainer)||void 0===o?void 0:o.getBoundingClientRect();t&&i&&(this.suggestionsOnTop=t.bottom+i.height>window.innerHeight&&t.top-i.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const o=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(o,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const o=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let i;i="ArrowDown"===t.key?o<this.visibleSuggestions.length-1?o+1:0:o>0?o-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[i])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}
|
|
986
|
+
`:se}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,o;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),i=null===(o=this.suggestionsContainer)||void 0===o?void 0:o.getBoundingClientRect();t&&i&&(this.suggestionsOnTop=t.bottom+i.height>window.innerHeight&&t.top-i.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const o=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(o,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const o=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let i;i="ArrowDown"===t.key?o<this.visibleSuggestions.length-1?o+1:0:o>0?o-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[i])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}cr.elementDefinitions={"ft-input-label":Zi,"ft-ripple":Yi,"ft-typography":Li,"ft-icon":tr},cr.styles=[Si,sr],lr([$()],cr.prototype,"label",void 0),lr([$({noAccessor:!0})],cr.prototype,"value",null),lr([N()],cr.prototype,"dispatchedValue",void 0),lr([$()],cr.prototype,"helper",void 0),lr([$({type:Boolean})],cr.prototype,"outlined",void 0),lr([$({type:Boolean})],cr.prototype,"disabled",void 0),lr([$({type:Boolean})],cr.prototype,"error",void 0),lr([$()],cr.prototype,"prefix",void 0),lr([$()],cr.prototype,"icon",void 0),lr([$()],cr.prototype,"passwordHiddenIcon",void 0),lr([$()],cr.prototype,"passwordRevealedIcon",void 0),lr([$()],cr.prototype,"iconVariant",void 0),lr([$({type:Boolean})],cr.prototype,"filterSuggestions",void 0),lr([$({type:Number})],cr.prototype,"maxLength",void 0),lr([$({type:Boolean})],cr.prototype,"password",void 0),lr([N()],cr.prototype,"focused",void 0),lr([N()],cr.prototype,"hidePassword",void 0),lr([N()],cr.prototype,"suggestionsOnTop",void 0),lr([N()],cr.prototype,"hideSuggestions",void 0),lr([N()],cr.prototype,"visibleSuggestions",void 0),lr([k(".ft-text-field--main-panel")],cr.prototype,"mainPanel",void 0),lr([k(".ft-text-field--input")],cr.prototype,"input",void 0),lr([k(".ft-text-field--suggestions")],cr.prototype,"suggestionsContainer",void 0),lr([function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const e=this.renderRoot?.querySelector(n),o=e?.assignedElements(t)??[];return void 0===r?o:o.filter((t=>t.matches(r)))}})}}({selector:"ft-text-field-suggestion"})],cr.prototype,"suggestions",void 0);const fr=St`
|
|
987
987
|
.ft-text-field-suggestion {
|
|
988
988
|
position: relative;
|
|
989
989
|
padding: 8px 16px;
|
|
@@ -1008,7 +1008,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1008
1008
|
slot {
|
|
1009
1009
|
pointer-events: none;
|
|
1010
1010
|
}
|
|
1011
|
-
`;var
|
|
1011
|
+
`;var pr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class dr extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class hr extends Be{render(){return ne`
|
|
1012
1012
|
<div class="ft-text-field-suggestion"
|
|
1013
1013
|
tabindex="-1"
|
|
1014
1014
|
@keydown=${this.onKeyDown}
|
|
@@ -1020,7 +1020,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1020
1020
|
<slot></slot>
|
|
1021
1021
|
</ft-typography>
|
|
1022
1022
|
</div>
|
|
1023
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new
|
|
1023
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new dr(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}hr.elementDefinitions={"ft-ripple":Yi,"ft-typography":Li,"ft-icon":tr},hr.styles=fr,pr([$()],hr.prototype,"value",void 0),pr([k(".ft-text-field-suggestion")],hr.prototype,"container",void 0),pr([R()],hr.prototype,"assignedNodes",void 0),L("ft-text-field")(cr),L("ft-text-field-suggestion")(hr);const ur={color:$e.extend("--ft-loader-color","",Ue.colorPrimary),size:$e.create("--ft-loader-size","","SIZE","80px")},yr=St`
|
|
1024
1024
|
:host {
|
|
1025
1025
|
line-height: 0;
|
|
1026
1026
|
}
|
|
@@ -1029,8 +1029,8 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1029
1029
|
display: inline-block;
|
|
1030
1030
|
position: relative;
|
|
1031
1031
|
|
|
1032
|
-
width: ${
|
|
1033
|
-
height: ${
|
|
1032
|
+
width: ${ur.size};
|
|
1033
|
+
height: ${ur.size};
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
1036
|
.ft-loader div {
|
|
@@ -1039,7 +1039,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1039
1039
|
width: 25%;
|
|
1040
1040
|
height: 25%;
|
|
1041
1041
|
border-radius: 50%;
|
|
1042
|
-
background: ${
|
|
1042
|
+
background: ${ur.color};
|
|
1043
1043
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
@@ -1086,10 +1086,10 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1086
1086
|
transform: translate(0, 0);
|
|
1087
1087
|
}
|
|
1088
1088
|
100% {
|
|
1089
|
-
transform: translate(calc(0.35 * ${
|
|
1089
|
+
transform: translate(calc(0.35 * ${ur.size}), 0);
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
|
-
`,
|
|
1092
|
+
`,gr=$e.extend("--ft-button-color","",Ue.colorPrimary),br={backgroundColor:$e.extend("--ft-button-background-color","",Ue.colorSurface),borderRadius:$e.extend("--ft-button-border-radius","",Ue.borderRadiusL),color:gr,fontSize:$e.extend("--ft-button-font-size","",mi.fontSize),iconSize:$e.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:$e.extend("--ft-button-ripple-color","",gr),verticalPadding:$e.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:$e.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:$e.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:$e.external(Ue.colorOpacityDisabled,"Design system")},mr=$e.extend("--ft-button-primary-color","",$e.extend("--ft-button-color","",Ue.colorOnPrimary)),xr={backgroundColor:$e.extend("--ft-button-primary-background-color","",$e.extend("--ft-button-background-color","",Ue.colorPrimary)),color:mr,rippleColor:$e.extend("--ft-button-primary-ripple-color","",mr)},vr=$e.extend("--ft-button-dense-border-radius","",$e.extend("--ft-button-border-radius","",Ue.borderRadiusM)),Or=$e.create("--ft-button-dense-vertical-padding","","SIZE","2px"),wr=$e.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),Sr=$e.create("--ft-button-dense-icon-padding","","SIZE","4px"),$r=[St`
|
|
1093
1093
|
:host {
|
|
1094
1094
|
display: inline-block;
|
|
1095
1095
|
max-width: 100%;
|
|
@@ -1100,7 +1100,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1100
1100
|
box-shadow: 0px 0px 0px transparent;
|
|
1101
1101
|
border: 0px solid transparent;
|
|
1102
1102
|
text-shadow: 0px 0px 0px transparent;
|
|
1103
|
-
font-size: ${
|
|
1103
|
+
font-size: ${br.fontSize};
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
1106
|
button:hover {
|
|
@@ -1129,31 +1129,31 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1129
1129
|
border: none;
|
|
1130
1130
|
pointer-events: auto;
|
|
1131
1131
|
|
|
1132
|
-
--ft-button-internal-line-height: max(calc(${
|
|
1133
|
-
--ft-button-internal-color: ${
|
|
1134
|
-
${Ne(
|
|
1135
|
-
${Ne(
|
|
1132
|
+
--ft-button-internal-line-height: max(calc(${br.fontSize} + 2px), ${br.iconSize});
|
|
1133
|
+
--ft-button-internal-color: ${br.color};
|
|
1134
|
+
${Ne(Ji.size,br.iconSize)};
|
|
1135
|
+
${Ne(Di.color,br.rippleColor)};
|
|
1136
1136
|
|
|
1137
|
-
border-radius: ${
|
|
1138
|
-
padding: ${
|
|
1139
|
-
background-color: ${
|
|
1137
|
+
border-radius: ${br.borderRadius};
|
|
1138
|
+
padding: ${br.verticalPadding} ${br.horizontalPadding};
|
|
1139
|
+
background-color: ${br.backgroundColor};
|
|
1140
1140
|
color: var(--ft-button-internal-color);
|
|
1141
1141
|
-webkit-mask-image: radial-gradient(white, black);
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
1144
1144
|
.ft-button.ft-button--outlined {
|
|
1145
1145
|
border: 1px solid var(--ft-button-internal-color);
|
|
1146
|
-
padding: calc(${
|
|
1146
|
+
padding: calc(${br.verticalPadding} - 1px) calc(${br.horizontalPadding} - 1px);
|
|
1147
1147
|
}
|
|
1148
1148
|
|
|
1149
1149
|
.ft-button.ft-button--dense {
|
|
1150
|
-
padding: ${
|
|
1151
|
-
border-radius: ${
|
|
1152
|
-
gap: ${
|
|
1150
|
+
padding: ${Or} ${wr};
|
|
1151
|
+
border-radius: ${vr};
|
|
1152
|
+
gap: ${Sr};
|
|
1153
1153
|
}
|
|
1154
1154
|
|
|
1155
1155
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
1156
|
-
padding: calc(${
|
|
1156
|
+
padding: calc(${Or} - 1px) calc(${wr} - 1px);
|
|
1157
1157
|
}
|
|
1158
1158
|
|
|
1159
1159
|
.ft-button:not([disabled]):hover {
|
|
@@ -1161,22 +1161,22 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1161
1161
|
}
|
|
1162
1162
|
|
|
1163
1163
|
.ft-button--round {
|
|
1164
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
1164
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${br.verticalPadding});
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
1167
|
.ft-button--round.ft-button--dense {
|
|
1168
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
1168
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Or});
|
|
1169
1169
|
}
|
|
1170
1170
|
|
|
1171
1171
|
.ft-button[disabled] {
|
|
1172
1172
|
filter: grayscale(1);
|
|
1173
|
-
opacity: ${
|
|
1173
|
+
opacity: ${br.opacityDisabled};
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
1176
|
.ft-button.ft-button--primary {
|
|
1177
|
-
background-color: ${
|
|
1178
|
-
--ft-button-internal-color: ${
|
|
1179
|
-
${Ne(
|
|
1177
|
+
background-color: ${xr.backgroundColor};
|
|
1178
|
+
--ft-button-internal-color: ${xr.color};
|
|
1179
|
+
${Ne(Di.color,xr.rippleColor)};
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
1182
|
.ft-button:focus {
|
|
@@ -1189,13 +1189,13 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1189
1189
|
white-space: nowrap;
|
|
1190
1190
|
text-overflow: ellipsis;
|
|
1191
1191
|
display: block;
|
|
1192
|
-
margin: 0 ${
|
|
1193
|
-
${Ne(
|
|
1194
|
-
${Ne(
|
|
1192
|
+
margin: 0 ${br.iconPadding};
|
|
1193
|
+
${Ne(mi.fontSize,"1em")};
|
|
1194
|
+
${Ne(mi.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
.ft-button--dense .ft-button--label {
|
|
1198
|
-
margin: 0 ${
|
|
1198
|
+
margin: 0 ${Sr};
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
1201
|
.ft-button--label[hidden] {
|
|
@@ -1208,13 +1208,13 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1208
1208
|
}
|
|
1209
1209
|
|
|
1210
1210
|
.ft-button--label[hidden] + ft-icon {
|
|
1211
|
-
margin: 0 calc(${
|
|
1212
|
-
padding: 0 ${
|
|
1211
|
+
margin: 0 calc(${br.horizontalPadding} * -1);
|
|
1212
|
+
padding: 0 ${br.verticalPadding};
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
1215
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
1216
|
-
margin: 0 calc(${
|
|
1217
|
-
padding: 0 ${
|
|
1216
|
+
margin: 0 calc(${wr} * -1);
|
|
1217
|
+
padding: 0 ${Or};
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
1220
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -1223,10 +1223,10 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1223
1223
|
}
|
|
1224
1224
|
|
|
1225
1225
|
ft-loader {
|
|
1226
|
-
${Ne(
|
|
1227
|
-
${Ne(
|
|
1226
|
+
${Ne(ur.size,br.iconSize)};
|
|
1227
|
+
${Ne(ur.color,"var(--ft-button-internal-color)")};
|
|
1228
1228
|
}
|
|
1229
|
-
`,Me],
|
|
1229
|
+
`,Me],Nr=$e.create("--ft-tooltip-distance","","SIZE","4px"),Cr=$e.create("--ft-tooltip-color","","COLOR","#FFFFFF"),Er=$e.create("--ft-tooltip-background-color","","COLOR","#666666"),kr=$e.create("--ft-tooltip-z-index","","NUMBER","100"),Rr=$e.external(Ue.borderRadiusS,"Design system"),Ur=$e.create("--ft-tooltip-max-width","","SIZE","150px"),Ir=St`
|
|
1230
1230
|
.ft-tooltip--container {
|
|
1231
1231
|
display: block;
|
|
1232
1232
|
}
|
|
@@ -1241,21 +1241,21 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1241
1241
|
box-sizing: border-box;
|
|
1242
1242
|
overflow: hidden;
|
|
1243
1243
|
width: max-content;
|
|
1244
|
-
max-width: ${
|
|
1244
|
+
max-width: ${Ur};
|
|
1245
1245
|
text-align: center;
|
|
1246
|
-
padding: ${
|
|
1247
|
-
z-index: ${
|
|
1246
|
+
padding: ${Nr};
|
|
1247
|
+
z-index: ${kr};
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
1250
|
.ft-tooltip--content {
|
|
1251
1251
|
padding: 4px 8px;
|
|
1252
|
-
border-radius: ${
|
|
1253
|
-
background-color: ${
|
|
1254
|
-
color: ${
|
|
1252
|
+
border-radius: ${Rr};
|
|
1253
|
+
background-color: ${Er};
|
|
1254
|
+
color: ${Cr};
|
|
1255
1255
|
position: relative;
|
|
1256
1256
|
word-break: break-word;
|
|
1257
1257
|
}
|
|
1258
|
-
`,$r=["start","end"],Nr=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+$r[0],e+"-"+$r[1])),[]),Cr=Math.min,Er=Math.max,kr=Math.round,Rr=t=>({x:t,y:t}),Ur={left:"right",right:"left",bottom:"top",top:"bottom"},Ir={start:"end",end:"start"};function Lr(t,e,o){return Er(t,Cr(e,o))}function Wr(t,e){return"function"==typeof t?t(e):t}function zr(t){return t.split("-")[0]}function Fr(t){return t.split("-")[1]}function Zr(t){return"x"===t?"y":"x"}function Kr(t){return"y"===t?"height":"width"}function Dr(t){return["top","bottom"].includes(zr(t))?"y":"x"}function Br(t){return Zr(Dr(t))}function Ar(t){return t.replace(/left|right|bottom|top/g,(t=>Ur[t]))}function Mr(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Pr(t,e,o){let{reference:i,floating:r}=t;const n=Dr(e),a=Br(e),s=Kr(a),l=zr(e),c="y"===n,f=i.x+i.width/2-r.width/2,p=i.y+i.height/2-r.height/2,d=i[s]/2-r[s]/2;let h;switch(l){case"top":h={x:f,y:i.y-r.height};break;case"bottom":h={x:f,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-r.width,y:p};break;default:h={x:i.x,y:i.y}}switch(Fr(e)){case"start":h[a]-=d*(o&&c?-1:1);break;case"end":h[a]+=d*(o&&c?-1:1)}return h}async function Hr(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:d=!1,padding:h=0}=Wr(e,t),u=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(h),y=s[d?"floating"===p?"reference":"floating":p],g=Mr(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(y)))||o?y:y.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:l})),b="floating"===p?{...a.floating,x:i,y:r}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),x=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},v=Mr(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:m,strategy:l}):b);return{top:(g.top-v.top+u.top)/x.y,bottom:(v.bottom-g.bottom+u.bottom)/x.y,left:(g.left-v.left+u.left)/x.x,right:(v.right-g.right+u.right)/x.x}}function jr(t,e,o){return(t?[...o.filter((e=>Fr(e)===t)),...o.filter((e=>Fr(e)!==t))]:o.filter((t=>zr(t)===t))).filter((o=>!t||(Fr(o)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>Ir[t]))}(o)!==o)))}const Tr=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,i,r;const{rects:n,middlewareData:a,placement:s,platform:l,elements:c}=e,{crossAxis:f=!1,alignment:p,allowedPlacements:d=Nr,autoAlignment:h=!0,...u}=Wr(t,e),y=void 0!==p||d===Nr?jr(p||null,h,d):d,g=await Hr(e,u),b=(null==(o=a.autoPlacement)?void 0:o.index)||0,m=y[b];if(null==m)return{};const x=function(t,e,o){void 0===o&&(o=!1);const i=Fr(t),r=Br(t),n=Kr(r);let a="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=Ar(a)),[a,Ar(a)]}(m,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(s!==m)return{reset:{placement:y[0]}};const v=[g[zr(m)],g[x[0]],g[x[1]]],O=[...(null==(i=a.autoPlacement)?void 0:i.overflows)||[],{placement:m,overflows:v}],w=y[b+1];if(w)return{data:{index:b+1,overflows:O},reset:{placement:w}};const S=O.map((t=>{const e=Fr(t.placement);return[t.placement,e&&f?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),$=S.filter((t=>t[2].slice(0,Fr(t[0])?2:3).every((t=>t<=0)))),N=(null==(r=$[0])?void 0:r[0])||S[0][0];return N!==s?{data:{index:b+1,overflows:O},reset:{placement:N}}:{}}}};function _r(t){return Yr(t)?(t.nodeName||"").toLowerCase():"#document"}function Gr(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Vr(t){var e;return null==(e=(Yr(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Yr(t){return t instanceof Node||t instanceof Gr(t).Node}function Jr(t){return t instanceof Element||t instanceof Gr(t).Element}function qr(t){return t instanceof HTMLElement||t instanceof Gr(t).HTMLElement}function Xr(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof Gr(t).ShadowRoot)}function Qr(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=nn(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function tn(t){return["table","td","th"].includes(_r(t))}function en(t){const e=on(),o=nn(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function on(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function rn(t){return["html","body","#document"].includes(_r(t))}function nn(t){return Gr(t).getComputedStyle(t)}function an(t){return Jr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function sn(t){if("html"===_r(t))return t;const e=t.assignedSlot||t.parentNode||Xr(t)&&t.host||Vr(t);return Xr(e)?e.host:e}function ln(t){const e=sn(t);return rn(e)?t.ownerDocument?t.ownerDocument.body:t.body:qr(e)&&Qr(e)?e:ln(e)}function cn(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=ln(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),a=Gr(r);return n?e.concat(a,a.visualViewport||[],Qr(r)?r:[],a.frameElement&&o?cn(a.frameElement):[]):e.concat(r,cn(r,[],o))}function fn(t){const e=nn(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=qr(t),n=r?t.offsetWidth:o,a=r?t.offsetHeight:i,s=kr(o)!==n||kr(i)!==a;return s&&(o=n,i=a),{width:o,height:i,$:s}}function pn(t){return Jr(t)?t:t.contextElement}function dn(t){const e=pn(t);if(!qr(e))return Rr(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=fn(e);let a=(n?kr(o.width):o.width)/i,s=(n?kr(o.height):o.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const hn=Rr(0);function un(t){const e=Gr(t);return on()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:hn}function yn(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=pn(t);let a=Rr(1);e&&(i?Jr(i)&&(a=dn(i)):a=dn(t));const s=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==Gr(t))&&e}(n,o,i)?un(n):Rr(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(n){const t=Gr(n),e=i&&Jr(i)?Gr(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=dn(o),e=o.getBoundingClientRect(),i=nn(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,f*=t.x,p*=t.y,l+=r,c+=n,o=Gr(o).frameElement}}return Mr({width:f,height:p,x:l,y:c})}function gn(t){return yn(Vr(t)).left+an(t).scrollLeft}function bn(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=Gr(t),i=Vr(t),r=o.visualViewport;let n=i.clientWidth,a=i.clientHeight,s=0,l=0;if(r){n=r.width,a=r.height;const t=on();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,o);else if("document"===e)i=function(t){const e=Vr(t),o=an(t),i=t.ownerDocument.body,r=Er(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=Er(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+gn(t);const s=-o.scrollTop;return"rtl"===nn(i).direction&&(a+=Er(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:a,y:s}}(Vr(t));else if(Jr(e))i=function(t,e){const o=yn(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=qr(t)?dn(t):Rr(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}(e,o);else{const o=un(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return Mr(i)}function mn(t,e){const o=sn(t);return!(o===e||!Jr(o)||rn(o))&&("fixed"===nn(o).position||mn(o,e))}function xn(t,e,o){const i=qr(e),r=Vr(e),n="fixed"===o,a=yn(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=Rr(0);if(i||!i&&!n)if(("body"!==_r(e)||Qr(r))&&(s=an(e)),i){const t=yn(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=gn(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function vn(t,e){return qr(t)&&"fixed"!==nn(t).position?e?e(t):t.offsetParent:null}function On(t,e){const o=Gr(t);if(!qr(t))return o;let i=vn(t,e);for(;i&&tn(i)&&"static"===nn(i).position;)i=vn(i,e);return i&&("html"===_r(i)||"body"===_r(i)&&"static"===nn(i).position&&!en(i))?o:i||function(t){let e=sn(t);for(;qr(e)&&!rn(e);){if(en(e))return e;e=sn(e)}return null}(t)||o}const wn={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=qr(o),n=Vr(o);if(o===n)return e;let a={scrollLeft:0,scrollTop:0},s=Rr(1);const l=Rr(0);if((r||!r&&"fixed"!==i)&&(("body"!==_r(o)||Qr(n))&&(a=an(o)),qr(o))){const t=yn(o);s=dn(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:Vr,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=cn(t,[],!1).filter((t=>Jr(t)&&"body"!==_r(t))),r=null;const n="fixed"===nn(t).position;let a=n?sn(t):t;for(;Jr(a)&&!rn(a);){const e=nn(a),o=en(a);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Qr(a)&&!o&&mn(t,a))?i=i.filter((t=>t!==a)):r=e,a=sn(a)}return e.set(t,i),i}(e,this._c):[].concat(o),i],a=n[0],s=n.reduce(((t,o)=>{const i=bn(e,o,r);return t.top=Er(i.top,t.top),t.right=Cr(i.right,t.right),t.bottom=Cr(i.bottom,t.bottom),t.left=Er(i.left,t.left),t}),bn(e,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:On,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||On,n=this.getDimensions;return{reference:xn(e,await r(o),i),floating:{x:0,y:0,...await n(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return fn(t)},getScale:dn,isElement:Jr,isRTL:function(t){return"rtl"===nn(t).direction}},Sn=(t,e,o)=>{const i=new Map,r={platform:wn,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:a}=o,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:p}=Pr(c,i,l),d=i,h={},u=0;for(let o=0;o<s.length;o++){const{name:n,fn:y}=s[o],{x:g,y:b,data:m,reset:x}=await y({x:f,y:p,initialPlacement:i,placement:d,strategy:r,middlewareData:h,rects:c,platform:a,elements:{reference:t,floating:e}});f=null!=g?g:f,p=null!=b?b:p,h={...h,[n]:{...h[n],...m}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:f,y:p}=Pr(c,d,l))),o=-1)}return{x:f,y:p,placement:d,strategy:r,middlewareData:h}})(t,e,{...r,platform:n})};var $n=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Nn extends Be{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new U,this.revealDebouncer=new U}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return ne`
|
|
1258
|
+
`,Lr=["start","end"],Wr=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+Lr[0],e+"-"+Lr[1])),[]),zr=Math.min,Fr=Math.max,Zr=Math.round,Kr=t=>({x:t,y:t}),Dr={left:"right",right:"left",bottom:"top",top:"bottom"},Br={start:"end",end:"start"};function Ar(t,e,o){return Fr(t,zr(e,o))}function Mr(t,e){return"function"==typeof t?t(e):t}function Pr(t){return t.split("-")[0]}function Hr(t){return t.split("-")[1]}function jr(t){return"x"===t?"y":"x"}function Tr(t){return"y"===t?"height":"width"}function _r(t){return["top","bottom"].includes(Pr(t))?"y":"x"}function Gr(t){return jr(_r(t))}function Vr(t){return t.replace(/left|right|bottom|top/g,(t=>Dr[t]))}function Yr(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Jr(t,e,o){let{reference:i,floating:r}=t;const n=_r(e),a=Gr(e),s=Tr(a),l=Pr(e),c="y"===n,f=i.x+i.width/2-r.width/2,p=i.y+i.height/2-r.height/2,d=i[s]/2-r[s]/2;let h;switch(l){case"top":h={x:f,y:i.y-r.height};break;case"bottom":h={x:f,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-r.width,y:p};break;default:h={x:i.x,y:i.y}}switch(Hr(e)){case"start":h[a]-=d*(o&&c?-1:1);break;case"end":h[a]+=d*(o&&c?-1:1)}return h}async function qr(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:d=!1,padding:h=0}=Mr(e,t),u=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(h),y=s[d?"floating"===p?"reference":"floating":p],g=Yr(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(y)))||o?y:y.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:l})),b="floating"===p?{...a.floating,x:i,y:r}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),x=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},v=Yr(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:m,strategy:l}):b);return{top:(g.top-v.top+u.top)/x.y,bottom:(v.bottom-g.bottom+u.bottom)/x.y,left:(g.left-v.left+u.left)/x.x,right:(v.right-g.right+u.right)/x.x}}function Xr(t,e,o){return(t?[...o.filter((e=>Hr(e)===t)),...o.filter((e=>Hr(e)!==t))]:o.filter((t=>Pr(t)===t))).filter((o=>!t||(Hr(o)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>Br[t]))}(o)!==o)))}const Qr=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,i,r;const{rects:n,middlewareData:a,placement:s,platform:l,elements:c}=e,{crossAxis:f=!1,alignment:p,allowedPlacements:d=Wr,autoAlignment:h=!0,...u}=Mr(t,e),y=void 0!==p||d===Wr?Xr(p||null,h,d):d,g=await qr(e,u),b=(null==(o=a.autoPlacement)?void 0:o.index)||0,m=y[b];if(null==m)return{};const x=function(t,e,o){void 0===o&&(o=!1);const i=Hr(t),r=Gr(t),n=Tr(r);let a="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=Vr(a)),[a,Vr(a)]}(m,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(s!==m)return{reset:{placement:y[0]}};const v=[g[Pr(m)],g[x[0]],g[x[1]]],O=[...(null==(i=a.autoPlacement)?void 0:i.overflows)||[],{placement:m,overflows:v}],w=y[b+1];if(w)return{data:{index:b+1,overflows:O},reset:{placement:w}};const S=O.map((t=>{const e=Hr(t.placement);return[t.placement,e&&f?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),$=S.filter((t=>t[2].slice(0,Hr(t[0])?2:3).every((t=>t<=0)))),N=(null==(r=$[0])?void 0:r[0])||S[0][0];return N!==s?{data:{index:b+1,overflows:O},reset:{placement:N}}:{}}}};function tn(t){return rn(t)?(t.nodeName||"").toLowerCase():"#document"}function en(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function on(t){var e;return null==(e=(rn(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function rn(t){return t instanceof Node||t instanceof en(t).Node}function nn(t){return t instanceof Element||t instanceof en(t).Element}function an(t){return t instanceof HTMLElement||t instanceof en(t).HTMLElement}function sn(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof en(t).ShadowRoot)}function ln(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=hn(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function cn(t){return["table","td","th"].includes(tn(t))}function fn(t){const e=pn(),o=hn(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function pn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function dn(t){return["html","body","#document"].includes(tn(t))}function hn(t){return en(t).getComputedStyle(t)}function un(t){return nn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function yn(t){if("html"===tn(t))return t;const e=t.assignedSlot||t.parentNode||sn(t)&&t.host||on(t);return sn(e)?e.host:e}function gn(t){const e=yn(t);return dn(e)?t.ownerDocument?t.ownerDocument.body:t.body:an(e)&&ln(e)?e:gn(e)}function bn(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=gn(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),a=en(r);return n?e.concat(a,a.visualViewport||[],ln(r)?r:[],a.frameElement&&o?bn(a.frameElement):[]):e.concat(r,bn(r,[],o))}function mn(t){const e=hn(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=an(t),n=r?t.offsetWidth:o,a=r?t.offsetHeight:i,s=Zr(o)!==n||Zr(i)!==a;return s&&(o=n,i=a),{width:o,height:i,$:s}}function xn(t){return nn(t)?t:t.contextElement}function vn(t){const e=xn(t);if(!an(e))return Kr(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=mn(e);let a=(n?Zr(o.width):o.width)/i,s=(n?Zr(o.height):o.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const On=Kr(0);function wn(t){const e=en(t);return pn()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:On}function Sn(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=xn(t);let a=Kr(1);e&&(i?nn(i)&&(a=vn(i)):a=vn(t));const s=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==en(t))&&e}(n,o,i)?wn(n):Kr(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(n){const t=en(n),e=i&&nn(i)?en(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=vn(o),e=o.getBoundingClientRect(),i=hn(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,f*=t.x,p*=t.y,l+=r,c+=n,o=en(o).frameElement}}return Yr({width:f,height:p,x:l,y:c})}function $n(t){return Sn(on(t)).left+un(t).scrollLeft}function Nn(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=en(t),i=on(t),r=o.visualViewport;let n=i.clientWidth,a=i.clientHeight,s=0,l=0;if(r){n=r.width,a=r.height;const t=pn();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,o);else if("document"===e)i=function(t){const e=on(t),o=un(t),i=t.ownerDocument.body,r=Fr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=Fr(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+$n(t);const s=-o.scrollTop;return"rtl"===hn(i).direction&&(a+=Fr(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:a,y:s}}(on(t));else if(nn(e))i=function(t,e){const o=Sn(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=an(t)?vn(t):Kr(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}(e,o);else{const o=wn(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return Yr(i)}function Cn(t,e){const o=yn(t);return!(o===e||!nn(o)||dn(o))&&("fixed"===hn(o).position||Cn(o,e))}function En(t,e,o){const i=an(e),r=on(e),n="fixed"===o,a=Sn(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=Kr(0);if(i||!i&&!n)if(("body"!==tn(e)||ln(r))&&(s=un(e)),i){const t=Sn(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=$n(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function kn(t,e){return an(t)&&"fixed"!==hn(t).position?e?e(t):t.offsetParent:null}function Rn(t,e){const o=en(t);if(!an(t))return o;let i=kn(t,e);for(;i&&cn(i)&&"static"===hn(i).position;)i=kn(i,e);return i&&("html"===tn(i)||"body"===tn(i)&&"static"===hn(i).position&&!fn(i))?o:i||function(t){let e=yn(t);for(;an(e)&&!dn(e);){if(fn(e))return e;e=yn(e)}return null}(t)||o}const Un={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=an(o),n=on(o);if(o===n)return e;let a={scrollLeft:0,scrollTop:0},s=Kr(1);const l=Kr(0);if((r||!r&&"fixed"!==i)&&(("body"!==tn(o)||ln(n))&&(a=un(o)),an(o))){const t=Sn(o);s=vn(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:on,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n=[..."clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=bn(t,[],!1).filter((t=>nn(t)&&"body"!==tn(t))),r=null;const n="fixed"===hn(t).position;let a=n?yn(t):t;for(;nn(a)&&!dn(a);){const e=hn(a),o=fn(a);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||ln(a)&&!o&&Cn(t,a))?i=i.filter((t=>t!==a)):r=e,a=yn(a)}return e.set(t,i),i}(e,this._c):[].concat(o),i],a=n[0],s=n.reduce(((t,o)=>{const i=Nn(e,o,r);return t.top=Fr(i.top,t.top),t.right=zr(i.right,t.right),t.bottom=zr(i.bottom,t.bottom),t.left=Fr(i.left,t.left),t}),Nn(e,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Rn,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||Rn,n=this.getDimensions;return{reference:En(e,await r(o),i),floating:{x:0,y:0,...await n(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return mn(t)},getScale:vn,isElement:nn,isRTL:function(t){return"rtl"===hn(t).direction}},In=(t,e,o)=>{const i=new Map,r={platform:Un,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:a}=o,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:p}=Jr(c,i,l),d=i,h={},u=0;for(let o=0;o<s.length;o++){const{name:n,fn:y}=s[o],{x:g,y:b,data:m,reset:x}=await y({x:f,y:p,initialPlacement:i,placement:d,strategy:r,middlewareData:h,rects:c,platform:a,elements:{reference:t,floating:e}});f=null!=g?g:f,p=null!=b?b:p,h={...h,[n]:{...h[n],...m}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:f,y:p}=Jr(c,d,l))),o=-1)}return{x:f,y:p,placement:d,strategy:r,middlewareData:h}})(t,e,{...r,platform:n})};var Ln=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Wn extends Be{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new U,this.revealDebouncer=new U}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return ne`
|
|
1259
1259
|
<div part="container"
|
|
1260
1260
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
1261
1261
|
@mouseenter=${this.onHover}
|
|
@@ -1273,23 +1273,23 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1273
1273
|
</div>
|
|
1274
1274
|
</div>
|
|
1275
1275
|
</div>
|
|
1276
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",
|
|
1276
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",In(this.slottedElement,this.tooltip,{middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=Mr(t,e),c={x:o,y:i},f=await qr(e,l),p=_r(Pr(r)),d=jr(p);let h=c[d],u=c[p];if(n){const t="y"===d?"bottom":"right";h=Ar(h+f["y"===d?"top":"left"],h,h-f[t])}if(a){const t="y"===p?"bottom":"right";u=Ar(u+f["y"===p?"top":"left"],u,u-f[t])}const y=s.fn({...e,[d]:h,[p]:u});return{...y,data:{x:y.x-o,y:y.y-i}}}}),Qr({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Wn.elementDefinitions={"ft-typography":Li},Wn.styles=Ir,Ln([$()],Wn.prototype,"text",void 0),Ln([$({type:Boolean})],Wn.prototype,"manual",void 0),Ln([$({type:Boolean})],Wn.prototype,"inline",void 0),Ln([$({type:Number})],Wn.prototype,"delay",void 0),Ln([$()],Wn.prototype,"position",void 0),Ln([R()],Wn.prototype,"slotNodes",void 0),Ln([k(".ft-tooltip--container")],Wn.prototype,"container",void 0),Ln([k(".ft-tooltip")],Wn.prototype,"tooltip",void 0),Ln([k(".ft-tooltip--content")],Wn.prototype,"tooltipContent",void 0),Ln([N()],Wn.prototype,"visible",void 0),Ln([C({passive:!0})],Wn.prototype,"onTouch",null),Ln([C({passive:!0})],Wn.prototype,"onHover",null),Ln([C({passive:!0})],Wn.prototype,"onOut",null),L("ft-tooltip")(Wn);class zn extends Be{render(){return ne`
|
|
1277
1277
|
<div class="ft-loader">
|
|
1278
1278
|
<div></div>
|
|
1279
1279
|
<div></div>
|
|
1280
1280
|
<div></div>
|
|
1281
1281
|
<div></div>
|
|
1282
1282
|
</div>
|
|
1283
|
-
`}}
|
|
1283
|
+
`}}zn.styles=yr,L("ft-loader")(zn);var Fn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Zn extends(Xe(Be,"button")){constructor(){super(...arguments),this.role="button",this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{var e;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit())}}render(){return this.addTooltipIfNeeded(ne`
|
|
1284
1284
|
<button part="button"
|
|
1285
|
-
class="${
|
|
1285
|
+
class="${mo(this.buttonClasses)}"
|
|
1286
1286
|
aria-label="${this.getLabel()}"
|
|
1287
1287
|
?disabled=${this.isDisabled()}>
|
|
1288
1288
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
1289
1289
|
<ft-typography part="label"
|
|
1290
1290
|
variant=${this.typographyVariant}
|
|
1291
1291
|
element="span"
|
|
1292
|
-
class="ft-button--label ${
|
|
1292
|
+
class="ft-button--label ${oo?"ft-safari-ellipsis-fix":""}"
|
|
1293
1293
|
?hidden=${!this.hasTextContent()}>
|
|
1294
1294
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
1295
1295
|
</ft-typography>
|
|
@@ -1303,7 +1303,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1303
1303
|
</ft-tooltip>
|
|
1304
1304
|
`:t}resolveIcon(){return this.loading?ne`
|
|
1305
1305
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?ne`
|
|
1306
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:se}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
1306
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:se}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Zn.elementDefinitions={"ft-ripple":Yi,"ft-tooltip":Wn,"ft-typography":Li,"ft-icon":tr,"ft-loader":zn},Fn([$({type:String,reflect:!0})],Zn.prototype,"role",void 0),Fn([$()],Zn.prototype,"type",void 0),Fn([$({type:Boolean})],Zn.prototype,"disabled",void 0),Fn([$()],Zn.prototype,"label",void 0),Fn([$()],Zn.prototype,"icon",void 0),Fn([$()],Zn.prototype,"iconVariant",void 0),Fn([$({type:Boolean})],Zn.prototype,"trailingIcon",void 0),Fn([$({type:Boolean})],Zn.prototype,"loading",void 0),Fn([$()],Zn.prototype,"tooltipPosition",void 0),Fn([$({type:Boolean})],Zn.prototype,"hideTooltip",void 0),Fn([$({type:Boolean})],Zn.prototype,"forceTooltip",void 0),Fn([k(".ft-button")],Zn.prototype,"button",void 0),Fn([k(".ft-button--label slot")],Zn.prototype,"slottedContent",void 0);var Kn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Dn extends Zn{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}Dn.styles=[Pe,$r],Kn([$({type:Boolean})],Dn.prototype,"primary",void 0),Kn([$({type:Boolean})],Dn.prototype,"outlined",void 0),Kn([$({type:Boolean})],Dn.prototype,"dense",void 0),Kn([$({type:Boolean})],Dn.prototype,"round",void 0);const Bn=[St`
|
|
1307
1307
|
:host {
|
|
1308
1308
|
display: inline-block;
|
|
1309
1309
|
max-width: 100%;
|
|
@@ -1382,13 +1382,13 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1382
1382
|
/** Primary styles **/
|
|
1383
1383
|
|
|
1384
1384
|
.ft-button--primary {
|
|
1385
|
-
${Ne(
|
|
1385
|
+
${Ne(ur.color,Re.primaryIconColor)};
|
|
1386
1386
|
|
|
1387
|
-
${Ne(
|
|
1388
|
-
${Ne(
|
|
1389
|
-
${Ne(
|
|
1390
|
-
${Ne(
|
|
1391
|
-
${Ne(
|
|
1387
|
+
${Ne(Di.color,Re.primaryStateLayerColor)};
|
|
1388
|
+
${Ne(Di.opacityContentOnSurfaceHover,Re.primaryStateLayerOpacityHover)};
|
|
1389
|
+
${Ne(Di.opacityContentOnSurfaceFocused,Re.primaryStateLayerOpacityFocus)};
|
|
1390
|
+
${Ne(Di.opacityContentOnSurfaceSelected,Re.primaryStateLayerOpacityActive)};
|
|
1391
|
+
${Ne(Di.opacityContentOnSurfacePressed,Re.primaryStateLayerOpacityActive)};
|
|
1392
1392
|
|
|
1393
1393
|
background-color: ${Re.primaryBackgroundColor};
|
|
1394
1394
|
color: ${Re.primaryColor};
|
|
@@ -1406,13 +1406,13 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1406
1406
|
/** Secondary styles **/
|
|
1407
1407
|
|
|
1408
1408
|
.ft-button--secondary {
|
|
1409
|
-
${Ne(
|
|
1409
|
+
${Ne(ur.color,Re.secondaryIconColor)};
|
|
1410
1410
|
|
|
1411
|
-
${Ne(
|
|
1412
|
-
${Ne(
|
|
1413
|
-
${Ne(
|
|
1414
|
-
${Ne(
|
|
1415
|
-
${Ne(
|
|
1411
|
+
${Ne(Di.color,Re.secondaryStateLayerColor)};
|
|
1412
|
+
${Ne(Di.opacityContentOnSurfaceHover,Re.secondaryStateLayerOpacityHover)};
|
|
1413
|
+
${Ne(Di.opacityContentOnSurfaceFocused,Re.secondaryStateLayerOpacityFocus)};
|
|
1414
|
+
${Ne(Di.opacityContentOnSurfaceSelected,Re.secondaryStateLayerOpacityActive)};
|
|
1415
|
+
${Ne(Di.opacityContentOnSurfacePressed,Re.secondaryStateLayerOpacityActive)};
|
|
1416
1416
|
|
|
1417
1417
|
background-color: ${Re.secondaryBackgroundColor};
|
|
1418
1418
|
color: ${Re.secondaryColor};
|
|
@@ -1431,13 +1431,13 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1431
1431
|
/** Tertiary styles **/
|
|
1432
1432
|
|
|
1433
1433
|
.ft-button--tertiary {
|
|
1434
|
-
${Ne(
|
|
1434
|
+
${Ne(ur.color,Re.tertiaryIconColor)};
|
|
1435
1435
|
|
|
1436
|
-
${Ne(
|
|
1437
|
-
${Ne(
|
|
1438
|
-
${Ne(
|
|
1439
|
-
${Ne(
|
|
1440
|
-
${Ne(
|
|
1436
|
+
${Ne(Di.color,Re.tertiaryStateLayerColor)};
|
|
1437
|
+
${Ne(Di.opacityContentOnSurfaceHover,Re.tertiaryStateLayerOpacityHover)};
|
|
1438
|
+
${Ne(Di.opacityContentOnSurfaceFocused,Re.tertiaryStateLayerOpacityFocus)};
|
|
1439
|
+
${Ne(Di.opacityContentOnSurfaceSelected,Re.tertiaryStateLayerOpacityActive)};
|
|
1440
|
+
${Ne(Di.opacityContentOnSurfacePressed,Re.tertiaryStateLayerOpacityActive)};
|
|
1441
1441
|
|
|
1442
1442
|
background-color: ${Re.tertiaryBackgroundColor};
|
|
1443
1443
|
color: ${Re.tertiaryColor};
|
|
@@ -1455,13 +1455,13 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1455
1455
|
/** Neutral styles **/
|
|
1456
1456
|
|
|
1457
1457
|
.ft-button--neutral {
|
|
1458
|
-
${Ne(
|
|
1458
|
+
${Ne(ur.color,Re.neutralIconColor)};
|
|
1459
1459
|
|
|
1460
|
-
${Ne(
|
|
1461
|
-
${Ne(
|
|
1462
|
-
${Ne(
|
|
1463
|
-
${Ne(
|
|
1464
|
-
${Ne(
|
|
1460
|
+
${Ne(Di.backgroundColor,Re.neutralStateLayerColor)};
|
|
1461
|
+
${Ne(Di.opacityContentOnSurfaceHover,Re.neutralStateLayerOpacityHover)};
|
|
1462
|
+
${Ne(Di.opacityContentOnSurfaceFocused,Re.neutralStateLayerOpacityFocus)};
|
|
1463
|
+
${Ne(Di.opacityContentOnSurfaceSelected,Re.neutralStateLayerOpacityActive)};
|
|
1464
|
+
${Ne(Di.opacityContentOnSurfacePressed,Re.neutralStateLayerOpacityActive)};
|
|
1465
1465
|
|
|
1466
1466
|
background-color: ${Re.neutralBackgroundColor};
|
|
1467
1467
|
color: ${Re.neutralColor};
|
|
@@ -1479,8 +1479,8 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1479
1479
|
/** Large styles **/
|
|
1480
1480
|
|
|
1481
1481
|
.ft-button--large {
|
|
1482
|
-
${Ne(
|
|
1483
|
-
${Ne(
|
|
1482
|
+
${Ne(Ji.size,Re.largeIconSize)};
|
|
1483
|
+
${Ne(ur.size,Re.largeIconSize)};
|
|
1484
1484
|
|
|
1485
1485
|
height: ${Re.largeHeight};
|
|
1486
1486
|
padding: 0 ${Re.largeHorizontalPadding};
|
|
@@ -1502,8 +1502,8 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1502
1502
|
/** Small styles **/
|
|
1503
1503
|
|
|
1504
1504
|
.ft-button--small {
|
|
1505
|
-
${Ne(
|
|
1506
|
-
${Ne(
|
|
1505
|
+
${Ne(Ji.size,Re.smallIconSize)};
|
|
1506
|
+
${Ne(ur.size,Re.smallIconSize)};
|
|
1507
1507
|
|
|
1508
1508
|
height: ${Re.smallHeight};
|
|
1509
1509
|
padding: 0 ${Re.smallHorizontalPadding};
|
|
@@ -1521,7 +1521,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1521
1521
|
width: ${Re.smallIconOnlyWidth};
|
|
1522
1522
|
padding: unset;
|
|
1523
1523
|
}
|
|
1524
|
-
`,Me];var
|
|
1524
|
+
`,Me];var An=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Mn extends Zn{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?$o.caption1medium:$o.body2medium}}Mn.styles=[Pe,Bn],An([$({type:Boolean})],Mn.prototype,"primary",void 0),An([$({type:Boolean})],Mn.prototype,"secondary",void 0),An([$({type:Boolean})],Mn.prototype,"tertiary",void 0),An([$({type:Boolean})],Mn.prototype,"neutral",void 0),An([$({type:Boolean})],Mn.prototype,"small",void 0),L("ft-button")(Dn),L("ftds-button")(Mn);class Pn extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Hn={headerBackground:$e.create("--ft-filterable-table-header-background","","COLOR","whitesmoke"),oddRowBackground:$e.create("--ft-filterable-table-odd-row-background","","COLOR","#FFFFFF"),evenRowBackground:$e.create("--ft-filterable-table-even-row-background","","COLOR","#fdfdfd"),rowHoverBackground:$e.create("--ft-filterable-table-row-hover-background","","COLOR","#fafafa"),stickyHeaderZIndex:$e.create("--ft-filterable-table-sticky-header-zindex","","NUMBER","100"),cellVerticalBorderWidth:$e.create("--ft-filterable-table-cell-vertical-border-width","","SIZE","1px"),colorOnSurfaceHigh:$e.external(Ue.colorOnSurfaceHigh,"Design system"),titleFont:$e.external(Ue.titleFont,"Design system"),contentFont:$e.external(Ue.contentFont,"Design system")},jn=St`
|
|
1525
1525
|
:host {
|
|
1526
1526
|
display: block;
|
|
1527
1527
|
}
|
|
@@ -1537,15 +1537,15 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1537
1537
|
.header-cell {
|
|
1538
1538
|
display: flex;
|
|
1539
1539
|
flex-direction: column;
|
|
1540
|
-
background: ${
|
|
1541
|
-
color: ${
|
|
1540
|
+
background: ${Hn.headerBackground};
|
|
1541
|
+
color: ${Hn.colorOnSurfaceHigh};
|
|
1542
1542
|
padding: .5rem 1rem;
|
|
1543
|
-
font-family: ${
|
|
1543
|
+
font-family: ${Hn.titleFont};
|
|
1544
1544
|
}
|
|
1545
1545
|
|
|
1546
1546
|
.header-cell--sticky {
|
|
1547
1547
|
top: 0;
|
|
1548
|
-
z-index: ${
|
|
1548
|
+
z-index: ${Hn.stickyHeaderZIndex};
|
|
1549
1549
|
position: sticky;
|
|
1550
1550
|
}
|
|
1551
1551
|
|
|
@@ -1563,8 +1563,8 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1563
1563
|
}
|
|
1564
1564
|
|
|
1565
1565
|
.column-title-container ft-button {
|
|
1566
|
-
${Ne(
|
|
1567
|
-
${Ne(
|
|
1566
|
+
${Ne(br.backgroundColor,Hn.headerBackground)};
|
|
1567
|
+
${Ne(br.color,Hn.colorOnSurfaceHigh)};
|
|
1568
1568
|
}
|
|
1569
1569
|
|
|
1570
1570
|
.column-title {
|
|
@@ -1593,31 +1593,31 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1593
1593
|
|
|
1594
1594
|
.cell {
|
|
1595
1595
|
padding: 1rem;
|
|
1596
|
-
border-left-color: ${
|
|
1596
|
+
border-left-color: ${Hn.headerBackground};
|
|
1597
1597
|
border-left-style: solid;
|
|
1598
|
-
border-left-width: ${
|
|
1599
|
-
border-bottom: 1px solid ${
|
|
1598
|
+
border-left-width: ${Hn.cellVerticalBorderWidth};
|
|
1599
|
+
border-bottom: 1px solid ${Hn.headerBackground};
|
|
1600
1600
|
overflow-x: auto;
|
|
1601
1601
|
display: flex;
|
|
1602
1602
|
align-items: center;
|
|
1603
|
-
font-family: ${
|
|
1603
|
+
font-family: ${Hn.contentFont};
|
|
1604
1604
|
}
|
|
1605
1605
|
|
|
1606
1606
|
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1607
1607
|
.row:nth-child(2n) > .cell {
|
|
1608
|
-
background: ${
|
|
1608
|
+
background: ${Hn.oddRowBackground};
|
|
1609
1609
|
}
|
|
1610
1610
|
|
|
1611
1611
|
.row:nth-child(2n + 1) > .cell {
|
|
1612
|
-
background: ${
|
|
1612
|
+
background: ${Hn.evenRowBackground};
|
|
1613
1613
|
}
|
|
1614
1614
|
|
|
1615
1615
|
.row:hover > .cell {
|
|
1616
|
-
background: ${
|
|
1616
|
+
background: ${Hn.rowHoverBackground};
|
|
1617
1617
|
}
|
|
1618
1618
|
|
|
1619
1619
|
.cell:last-of-type {
|
|
1620
|
-
border-right: 1px solid ${
|
|
1620
|
+
border-right: 1px solid ${Hn.headerBackground};
|
|
1621
1621
|
}
|
|
1622
1622
|
|
|
1623
1623
|
.row:last-of-type .cell:first-of-type {
|
|
@@ -1631,7 +1631,7 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1631
1631
|
.hidden {
|
|
1632
1632
|
visibility: hidden;
|
|
1633
1633
|
}
|
|
1634
|
-
`;var
|
|
1634
|
+
`;var Tn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const _n=t=>ne`${t}`,Gn=(t,e)=>t-e;class Vn extends Be{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.filters=[],this.selectData=[]}init(t,e,o){this.data=t,this.columns=e,this.sort=o}render(){let t=this.sortData(this.filterData());return ne`
|
|
1635
1635
|
<style>
|
|
1636
1636
|
.table {
|
|
1637
1637
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1639,17 +1639,17 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1639
1639
|
</style>
|
|
1640
1640
|
<div class="table">
|
|
1641
1641
|
<div class="header">
|
|
1642
|
-
${
|
|
1642
|
+
${yo(this.columns,((t,e)=>"header-cell-"+e),((t,e)=>this.renderHeader(t,e)))}
|
|
1643
1643
|
</div>
|
|
1644
|
-
${
|
|
1644
|
+
${yo(t,((t,e)=>"row-"+e),((t,e)=>ne`
|
|
1645
1645
|
<div class="row"
|
|
1646
|
-
@click=${()=>this.dispatchEvent(new
|
|
1647
|
-
${
|
|
1646
|
+
@click=${()=>this.dispatchEvent(new Pn(t))}>
|
|
1647
|
+
${yo(this.columns,((t,o)=>"cell-"+o+"-"+e),((o,i)=>this.renderCell(o,i,t,e)))}
|
|
1648
1648
|
</div>
|
|
1649
1649
|
`))}
|
|
1650
1650
|
</div>
|
|
1651
|
-
`}filterData(){return this.filters.reduce(((t,e,o)=>{var i;const r=this.columns[o];if(e&&e.value)switch(null!==(i=r.filter)&&void 0!==i?i:"text"){case"text":return t.filter((t=>this.getValueAsString(r,t,o).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(r,t,o)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const o=this.columns[this.currentSort.column],i=null!==(e=o.comparator)&&void 0!==e?e:
|
|
1652
|
-
<div class="${
|
|
1651
|
+
`}filterData(){return this.filters.reduce(((t,e,o)=>{var i;const r=this.columns[o];if(e&&e.value)switch(null!==(i=r.filter)&&void 0!==i?i:"text"){case"text":return t.filter((t=>this.getValueAsString(r,t,o).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(r,t,o)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const o=this.columns[this.currentSort.column],i=null!==(e=o.comparator)&&void 0!==e?e:Gn,r="asc"===this.currentSort.order?i:(t,e)=>-i(t,e);return[...t].sort(((t,e)=>r(this.getValue(o,t),this.getValue(o,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let o in e){const i=e[o];"select"===i.filter&&(this.selectData[o]=[...new Set(t.map(((t,e)=>this.getValueAsString(i,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){const o={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return ne`
|
|
1652
|
+
<div class="${mo(o)}"
|
|
1653
1653
|
part="${this.columnPart("header-cell",e)}">
|
|
1654
1654
|
<div class="column-title-container">
|
|
1655
1655
|
<span class="column-title"
|
|
@@ -1690,9 +1690,9 @@ const Xi={fontSize:$e.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1690
1690
|
`))}
|
|
1691
1691
|
</ft-select>
|
|
1692
1692
|
</div>
|
|
1693
|
-
`:se}return se}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,i){var r;const n=null!==(r=t.render)&&void 0!==r?r:
|
|
1693
|
+
`:se}return se}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,i){var r;const n=null!==(r=t.render)&&void 0!==r?r:_n;return ne`
|
|
1694
1694
|
<div class="cell"
|
|
1695
1695
|
part="${this.columnPart("cell",e)} cell-row-${i} cell-column-${e}-row-${i}">
|
|
1696
|
-
${(t=>{const e=n(t,i);return"string"==typeof e?
|
|
1696
|
+
${(t=>{const e=n(t,i);return"string"==typeof e?bo(e):e})(this.getValue(t,o))}
|
|
1697
1697
|
</div>
|
|
1698
|
-
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,o){const i=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(i,o):(t=>""+t)(i)}}
|
|
1698
|
+
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,o){const i=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(i,o):(t=>""+t)(i)}}Vn.styles=jn,Tn([$({attribute:!1})],Vn.prototype,"data",void 0),Tn([$({attribute:!1})],Vn.prototype,"columns",void 0),Tn([$({attribute:!1})],Vn.prototype,"sort",void 0),Tn([$()],Vn.prototype,"stickyHeaders",void 0),Tn([N()],Vn.prototype,"currentSort",void 0),L("ft-filterable-table")(Vn),t.FtFilterableTable=Vn,t.FtFilterableTableCssVariables=Hn,t.RowClickEvent=Pn,t.styles=jn}({});
|