@fluid-topics/ft-filter 0.2.3 → 0.2.4
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-filter.inline-styles.js +117 -101
- package/build/ft-filter.light.js +113 -97
- package/build/ft-filter.min.js +116 -100
- package/package.json +10 -10
package/build/ft-filter.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){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(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const h={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,h),this._definitionsByClass.set(s,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(r.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){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(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const h={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,h),this._definitionsByClass.set(s,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(r.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(bi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -214,7 +214,7 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
214
214
|
* @license
|
|
215
215
|
* Copyright 2017 Google LLC
|
|
216
216
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
217
|
-
*/var Ye=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ge=
|
|
217
|
+
*/var Ye=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ge=ft.extend("--ft-ripple-color",vt.colorContent),Qe={color:Ge,backgroundColor:ft.extend("--ft-ripple-background-color",Ge),opacityContentOnSurfacePressed:ft.external(vt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ft.external(vt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ft.external(vt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ft.external(vt.opacityContentOnSurfaceSelected,"Design system")},ti=ft.extend("--ft-ripple-color",vt.colorPrimary),ei=ti,ii=ft.extend("--ft-ripple-background-color",ti),oi=ft.extend("--ft-ripple-color",vt.colorSecondary),si=oi,ni=ft.extend("--ft-ripple-background-color",oi);class ri extends bt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-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.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 K`
|
|
218
218
|
<style>
|
|
219
219
|
.ft-ripple .ft-ripple--effect,
|
|
220
220
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -231,7 +231,7 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
231
231
|
<div class="ft-ripple--background"></div>
|
|
232
232
|
<div class="ft-ripple--effect"></div>
|
|
233
233
|
</div>
|
|
234
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled
|
|
234
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ri.elementDefinitions={},ri.styles=b`
|
|
235
235
|
:host {
|
|
236
236
|
display: contents;
|
|
237
237
|
}
|
|
@@ -250,17 +250,30 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
250
250
|
.ft-ripple .ft-ripple--effect {
|
|
251
251
|
position: absolute;
|
|
252
252
|
opacity: 0;
|
|
253
|
-
background-color: ${Ge.color};
|
|
254
253
|
}
|
|
255
254
|
|
|
256
|
-
.ft-ripple
|
|
255
|
+
.ft-ripple .ft-ripple--background {
|
|
256
|
+
background-color: ${Qe.backgroundColor};
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.ft-ripple .ft-ripple--effect {
|
|
260
|
+
background-color: ${Qe.color};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
264
|
+
background-color: ${ni};
|
|
265
|
+
}
|
|
266
|
+
|
|
257
267
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
258
|
-
background-color: ${
|
|
268
|
+
background-color: ${si};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
272
|
+
background-color: ${ii};
|
|
259
273
|
}
|
|
260
274
|
|
|
261
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
262
275
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
263
|
-
background-color: ${
|
|
276
|
+
background-color: ${ei};
|
|
264
277
|
}
|
|
265
278
|
|
|
266
279
|
.ft-ripple .ft-ripple--background {
|
|
@@ -268,6 +281,7 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
268
281
|
left: 0;
|
|
269
282
|
height: 100%;
|
|
270
283
|
width: 100%;
|
|
284
|
+
transition: opacity 75ms linear;
|
|
271
285
|
}
|
|
272
286
|
|
|
273
287
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -291,22 +305,22 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
291
305
|
}
|
|
292
306
|
|
|
293
307
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
294
|
-
opacity: ${
|
|
308
|
+
opacity: ${Qe.opacityContentOnSurfaceHover};
|
|
295
309
|
}
|
|
296
310
|
|
|
297
311
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
298
|
-
opacity: ${
|
|
312
|
+
opacity: ${Qe.opacityContentOnSurfaceSelected};
|
|
299
313
|
}
|
|
300
314
|
|
|
301
315
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
302
|
-
opacity: ${
|
|
316
|
+
opacity: ${Qe.opacityContentOnSurfaceFocused};
|
|
303
317
|
}
|
|
304
318
|
|
|
305
319
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
306
|
-
opacity: ${
|
|
320
|
+
opacity: ${Qe.opacityContentOnSurfacePressed};
|
|
307
321
|
transform: translate(-50%, -50%) scale(1);
|
|
308
322
|
}
|
|
309
|
-
`,Ye([o({type:Boolean})],
|
|
323
|
+
`,Ye([o({type:Boolean})],ri.prototype,"primary",void 0),Ye([o({type:Boolean})],ri.prototype,"secondary",void 0),Ye([o({type:Boolean})],ri.prototype,"unbounded",void 0),Ye([o({type:Boolean})],ri.prototype,"activated",void 0),Ye([o({type:Boolean})],ri.prototype,"selected",void 0),Ye([o({type:Boolean})],ri.prototype,"disabled",void 0),Ye([s()],ri.prototype,"hovered",void 0),Ye([s()],ri.prototype,"focused",void 0),Ye([s()],ri.prototype,"pressed",void 0),Ye([s()],ri.prototype,"rippling",void 0),Ye([s()],ri.prototype,"rippleSize",void 0),Ye([s()],ri.prototype,"originX",void 0),Ye([s()],ri.prototype,"originY",void 0),Ye([r(".ft-ripple")],ri.prototype,"ripple",void 0),Ye([r(".ft-ripple--effect")],ri.prototype,"rippleEffect",void 0),c("ft-ripple")(ri);var li=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ai=ft.create("--ft-tooltip-distance","SIZE","4px"),hi=ft.create("--ft-tooltip-color","COLOR","#FFFFFF"),ci=ft.create("--ft-tooltip-background-color","COLOR","#666666"),pi=ft.create("--ft-tooltip-z-index","NUMBER","1"),di=ft.external(vt.borderRadiusS,"Design system");class fi extends bt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e,this.revealDebouncer=new e}render(){return K`
|
|
310
324
|
<div part="container"
|
|
311
325
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
312
326
|
@mouseenter=${this.onHover}
|
|
@@ -321,7 +335,7 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
321
335
|
</div>
|
|
322
336
|
<slot></slot>
|
|
323
337
|
</div>
|
|
324
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&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.position){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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"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())}}
|
|
338
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&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.position){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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"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())}}fi.elementDefinitions={"ft-typography":De},fi.styles=b`
|
|
325
339
|
.ft-tooltip--container {
|
|
326
340
|
display: block;
|
|
327
341
|
position: relative;
|
|
@@ -339,21 +353,21 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
339
353
|
width: max-content;
|
|
340
354
|
max-width: 150px;
|
|
341
355
|
text-align: center;
|
|
342
|
-
padding: ${
|
|
343
|
-
z-index: ${
|
|
356
|
+
padding: ${ai};
|
|
357
|
+
z-index: ${pi};
|
|
344
358
|
}
|
|
345
359
|
|
|
346
360
|
.ft-tooltip--content {
|
|
347
361
|
padding: 4px 8px;
|
|
348
|
-
border-radius: ${
|
|
349
|
-
background-color: ${
|
|
350
|
-
color: ${
|
|
362
|
+
border-radius: ${di};
|
|
363
|
+
background-color: ${ci};
|
|
364
|
+
color: ${hi};
|
|
351
365
|
top: -500px;
|
|
352
366
|
left: -500px;
|
|
353
367
|
position: relative;
|
|
354
368
|
word-break: break-word;
|
|
355
369
|
}
|
|
356
|
-
`,
|
|
370
|
+
`,li([o()],fi.prototype,"text",void 0),li([o({type:Boolean})],fi.prototype,"manual",void 0),li([o({type:Boolean})],fi.prototype,"inline",void 0),li([o({type:Number})],fi.prototype,"delay",void 0),li([o()],fi.prototype,"position",void 0),li([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?h({slot:s,flatten:e,selector:i}):n({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],fi.prototype,"slotNodes",void 0),li([r(".ft-tooltip--container")],fi.prototype,"container",void 0),li([r("slot")],fi.prototype,"target",void 0),li([r(".ft-tooltip")],fi.prototype,"tooltip",void 0),li([r(".ft-tooltip--content")],fi.prototype,"tooltipContent",void 0),li([s()],fi.prototype,"visible",void 0),c("ft-tooltip")(fi);const ui={color:ft.extend("--ft-loader-color",vt.colorPrimary),size:ft.create("--ft-loader-size","SIZE","80px")};class vi extends bt{static get styles(){return b`
|
|
357
371
|
:host {
|
|
358
372
|
line-height: 0;
|
|
359
373
|
}
|
|
@@ -362,8 +376,8 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
362
376
|
display: inline-block;
|
|
363
377
|
position: relative;
|
|
364
378
|
|
|
365
|
-
width: ${
|
|
366
|
-
height: ${
|
|
379
|
+
width: ${ui.size};
|
|
380
|
+
height: ${ui.size};
|
|
367
381
|
}
|
|
368
382
|
|
|
369
383
|
.ft-loader div {
|
|
@@ -372,7 +386,7 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
372
386
|
width: 25%;
|
|
373
387
|
height: 25%;
|
|
374
388
|
border-radius: 50%;
|
|
375
|
-
background: ${
|
|
389
|
+
background: ${ui.color};
|
|
376
390
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
377
391
|
}
|
|
378
392
|
|
|
@@ -419,7 +433,7 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
419
433
|
transform: translate(0, 0);
|
|
420
434
|
}
|
|
421
435
|
100% {
|
|
422
|
-
transform: translate(calc(0.35 * ${
|
|
436
|
+
transform: translate(calc(0.35 * ${ui.size}), 0);
|
|
423
437
|
}
|
|
424
438
|
}
|
|
425
439
|
`}render(){return K`
|
|
@@ -429,27 +443,27 @@ var ht,ct;null==at||at(Y,tt),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
429
443
|
<div></div>
|
|
430
444
|
<div></div>
|
|
431
445
|
</div>
|
|
432
|
-
`}}c("ft-loader")(
|
|
446
|
+
`}}c("ft-loader")(vi);
|
|
433
447
|
/**
|
|
434
448
|
* @license
|
|
435
449
|
* Copyright 2017 Google LLC
|
|
436
450
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
437
451
|
*/
|
|
438
|
-
class
|
|
452
|
+
class bi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Z||null==t)return this.vt=void 0,this.it=t;if(t===V)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}bi.directiveName="unsafeHTML",bi.resultType=1;const xi=_e(bi);var yi,gi;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(yi||(yi={})),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]))]);var mi,$i=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(mi||(mi={}));const wi={size:ft.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ft.extend("--ft-icon-fluid-topics-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ft.extend("--ft-icon-file-format-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ft.extend("--ft-icon-material-font-family",ft.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class ki extends bt{constructor(){super(...arguments),this.variant=mi.fluid_topics}render(){return K`
|
|
439
453
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
440
|
-
${
|
|
454
|
+
${xi(this.getIcon())}
|
|
441
455
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
442
456
|
</i>
|
|
443
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===
|
|
457
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===mi.file_format?null!==(t=gi[i.toUpperCase()])&&void 0!==t?t:i:this.variant===mi.fluid_topics?null!==(e=yi[i.toUpperCase()])&&void 0!==e?e:i:Z}}ki.elementDefinitions={},ki.styles=b`
|
|
444
458
|
:host, i.ft-icon {
|
|
445
459
|
display: inline-block;
|
|
446
|
-
width: ${
|
|
447
|
-
height: ${
|
|
460
|
+
width: ${wi.size};
|
|
461
|
+
height: ${wi.size};
|
|
448
462
|
text-align: center;
|
|
449
463
|
}
|
|
450
464
|
|
|
451
465
|
i.ft-icon {
|
|
452
|
-
font-size: ${
|
|
466
|
+
font-size: ${wi.size};
|
|
453
467
|
line-height: 1;
|
|
454
468
|
font-weight: normal;
|
|
455
469
|
text-transform: none;
|
|
@@ -463,17 +477,17 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
463
477
|
}
|
|
464
478
|
|
|
465
479
|
.ft-icon--fluid-topics {
|
|
466
|
-
font-family: ${
|
|
480
|
+
font-family: ${wi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
467
481
|
}
|
|
468
482
|
|
|
469
483
|
.ft-icon--file-format {
|
|
470
|
-
font-family: ${
|
|
484
|
+
font-family: ${wi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
471
485
|
}
|
|
472
486
|
|
|
473
487
|
.ft-icon--material {
|
|
474
|
-
font-family: ${
|
|
488
|
+
font-family: ${wi.materialFontFamily}, "Material Icons", sans-serif;
|
|
475
489
|
}
|
|
476
|
-
|
|
490
|
+
`,$i([o()],ki.prototype,"variant",void 0),$i([r("slot")],ki.prototype,"slottedContent",void 0),c("ft-icon")(ki);var Oi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Si=ft.extend("--ft-button-color",vt.colorPrimary),Ci={backgroundColor:ft.extend("--ft-button-background-color",vt.colorSurface),borderRadius:ft.extend("--ft-button-border-radius",vt.borderRadiusL),color:Si,fontSize:ft.extend("--ft-button-font-size",Se.fontSize),iconSize:ft.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ft.extend("--ft-button-ripple-color",Si),opacityDisabled:ft.external(vt.colorOpacityDisabled,"Design system")},Ei=ft.extend("--ft-button-primary-color",ft.extend("--ft-button-color",vt.colorOnPrimary)),Ni={backgroundColor:ft.extend("--ft-button-primary-background-color",ft.extend("--ft-button-background-color",vt.colorPrimary)),color:Ei,rippleColor:ft.extend("--ft-button-primary-ripple-color",Ei)},zi=ft.extend("--ft-button-dense-border-radius",ft.extend("--ft-button-border-radius",vt.borderRadiusM));class Mi extends bt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[xt,b`
|
|
477
491
|
:host {
|
|
478
492
|
display: inline-block;
|
|
479
493
|
max-width: 100%;
|
|
@@ -512,18 +526,18 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
512
526
|
border: none;
|
|
513
527
|
pointer-events: auto;
|
|
514
528
|
|
|
515
|
-
--ft-button-internal-font-size: ${
|
|
529
|
+
--ft-button-internal-font-size: ${Ci.fontSize};
|
|
516
530
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
517
|
-
--ft-button-internal-color: ${
|
|
518
|
-
${ut(
|
|
531
|
+
--ft-button-internal-color: ${Ci.color};
|
|
532
|
+
${ut(wi.size,Ci.iconSize)};
|
|
519
533
|
--ft-button-internal-vertical-padding: 6px;
|
|
520
534
|
--ft-button-internal-horizontal-padding: 8px;
|
|
521
|
-
${ut(
|
|
522
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
535
|
+
${ut(Qe.color,Ci.rippleColor)};
|
|
536
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ci.iconSize});
|
|
523
537
|
|
|
524
|
-
border-radius: ${
|
|
538
|
+
border-radius: ${Ci.borderRadius};
|
|
525
539
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
526
|
-
background-color: ${
|
|
540
|
+
background-color: ${Ci.backgroundColor};
|
|
527
541
|
color: var(--ft-button-internal-color);
|
|
528
542
|
-webkit-mask-image: radial-gradient(white, black);
|
|
529
543
|
}
|
|
@@ -535,7 +549,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
535
549
|
.ft-button--dense {
|
|
536
550
|
--ft-button-internal-vertical-padding: 2px;
|
|
537
551
|
--ft-button-internal-horizontal-padding: 4px;
|
|
538
|
-
border-radius: ${
|
|
552
|
+
border-radius: ${zi};
|
|
539
553
|
}
|
|
540
554
|
|
|
541
555
|
.ft-button--round {
|
|
@@ -544,13 +558,13 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
544
558
|
|
|
545
559
|
.ft-button[disabled] {
|
|
546
560
|
filter: grayscale(1);
|
|
547
|
-
opacity: ${
|
|
561
|
+
opacity: ${Ci.opacityDisabled};
|
|
548
562
|
}
|
|
549
563
|
|
|
550
564
|
.ft-button.ft-button--primary {
|
|
551
|
-
background-color: ${
|
|
552
|
-
--ft-button-internal-color: ${
|
|
553
|
-
${ut(
|
|
565
|
+
background-color: ${Ni.backgroundColor};
|
|
566
|
+
--ft-button-internal-color: ${Ni.color};
|
|
567
|
+
${ut(Qe.color,Ni.rippleColor)};
|
|
554
568
|
}
|
|
555
569
|
|
|
556
570
|
.ft-button.ft-button--outlined {
|
|
@@ -563,6 +577,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
563
577
|
}
|
|
564
578
|
|
|
565
579
|
.ft-button--label {
|
|
580
|
+
position: relative;
|
|
566
581
|
overflow: hidden;
|
|
567
582
|
white-space: nowrap;
|
|
568
583
|
text-overflow: ellipsis;
|
|
@@ -588,6 +603,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
588
603
|
|
|
589
604
|
ft-icon {
|
|
590
605
|
flex-shrink: 0;
|
|
606
|
+
position: relative;
|
|
591
607
|
}
|
|
592
608
|
|
|
593
609
|
.ft-button--label[hidden] + ft-icon {
|
|
@@ -601,8 +617,8 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
601
617
|
}
|
|
602
618
|
|
|
603
619
|
ft-loader {
|
|
604
|
-
${ut(
|
|
605
|
-
${ut(
|
|
620
|
+
${ut(ui.size,Ci.iconSize)};
|
|
621
|
+
${ut(ui.color,"var(--ft-button-internal-color)")};
|
|
606
622
|
}
|
|
607
623
|
`]}render(){const t={"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-button--safari-fix":$t,"ft-no-text-select":!0};return this.addTooltip(K`
|
|
608
624
|
<button part="button"
|
|
@@ -626,7 +642,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
626
642
|
</ft-tooltip>
|
|
627
643
|
`}resolveIcon(){return this.loading?K`
|
|
628
644
|
<ft-loader></ft-loader> `:this.icon?K`
|
|
629
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:Z}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}}
|
|
645
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:Z}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}}Mi.elementDefinitions={"ft-ripple":ri,"ft-tooltip":fi,"ft-typography":De,"ft-icon":ki,"ft-loader":vi},Oi([o({type:Boolean})],Mi.prototype,"primary",void 0),Oi([o({type:Boolean})],Mi.prototype,"outlined",void 0),Oi([o({type:Boolean})],Mi.prototype,"disabled",void 0),Oi([o({type:Boolean})],Mi.prototype,"dense",void 0),Oi([o({type:Boolean})],Mi.prototype,"round",void 0),Oi([o({type:String})],Mi.prototype,"label",void 0),Oi([o({type:String})],Mi.prototype,"icon",void 0),Oi([o({type:Boolean})],Mi.prototype,"trailingIcon",void 0),Oi([o({type:Boolean})],Mi.prototype,"loading",void 0),Oi([o({type:String})],Mi.prototype,"tooltipPosition",void 0),Oi([r(".ft-button")],Mi.prototype,"button",void 0),Oi([r(".ft-button--label slot")],Mi.prototype,"slottedContent",void 0),c("ft-button")(Mi);var Ri=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Fi=ft.extend("--ft-checkbox-text-color",vt.colorOnSurfaceHigh),Bi=ft.external(vt.colorPrimary,"Design system"),ji=ft.external(vt.colorOnPrimary,"Design system"),Ui=ft.extend("--ft-checkbox-border-color",vt.colorOnSurfaceMedium),Di=ft.external(vt.colorOnSurfaceDisabled,"Design system");class Li extends bt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return K`
|
|
630
646
|
<label class="${Xe(t)}">
|
|
631
647
|
<div class="ft-checkbox--box-container">
|
|
632
648
|
<input type="checkbox"
|
|
@@ -651,14 +667,14 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
651
667
|
<slot></slot>
|
|
652
668
|
</ft-typography>
|
|
653
669
|
</label>
|
|
654
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
670
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Li.elementDefinitions={"ft-ripple":ri,"ft-typography":De},Li.styles=b`
|
|
655
671
|
* {
|
|
656
672
|
box-sizing: border-box;
|
|
657
673
|
}
|
|
658
674
|
|
|
659
675
|
.ft-checkbox {
|
|
660
676
|
box-sizing: border-box;
|
|
661
|
-
color: ${
|
|
677
|
+
color: ${Fi};
|
|
662
678
|
|
|
663
679
|
display: inline-flex;
|
|
664
680
|
align-items: center;
|
|
@@ -666,7 +682,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
666
682
|
}
|
|
667
683
|
|
|
668
684
|
.ft-checkbox--disabled {
|
|
669
|
-
color: ${
|
|
685
|
+
color: ${Di};
|
|
670
686
|
}
|
|
671
687
|
|
|
672
688
|
input {
|
|
@@ -689,26 +705,26 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
689
705
|
}
|
|
690
706
|
|
|
691
707
|
.ft-checkbox--box {
|
|
692
|
-
border: 2px solid ${
|
|
708
|
+
border: 2px solid ${Ui};
|
|
693
709
|
border-radius: 2px;
|
|
694
710
|
|
|
695
711
|
width: 18px;
|
|
696
712
|
height: 18px;
|
|
697
713
|
|
|
698
|
-
color: ${
|
|
714
|
+
color: ${ji};
|
|
699
715
|
}
|
|
700
716
|
|
|
701
717
|
|
|
702
718
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
703
719
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
704
|
-
border-color: ${
|
|
705
|
-
background-color: ${
|
|
720
|
+
border-color: ${Bi};
|
|
721
|
+
background-color: ${Bi};
|
|
706
722
|
}
|
|
707
723
|
|
|
708
724
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
709
|
-
border-color: ${
|
|
725
|
+
border-color: ${Di};
|
|
710
726
|
background-color: transparent;
|
|
711
|
-
color: ${
|
|
727
|
+
color: ${Di};
|
|
712
728
|
}
|
|
713
729
|
|
|
714
730
|
.ft-checkbox--checkmark {
|
|
@@ -727,7 +743,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
727
743
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
728
744
|
opacity: 1;
|
|
729
745
|
}
|
|
730
|
-
`,
|
|
746
|
+
`,Ri([o()],Li.prototype,"name",void 0),Ri([o({type:Boolean})],Li.prototype,"checked",void 0),Ri([o({type:Boolean})],Li.prototype,"indeterminate",void 0),Ri([o({type:Boolean})],Li.prototype,"disabled",void 0),Ri([r(".ft-checkbox")],Li.prototype,"container",void 0),Ri([r("ft-ripple")],Li.prototype,"ripple",void 0),c("ft-checkbox")(Li);var Ti=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ai=ft.extend("--ft-radio-text-color",vt.colorOnSurfaceHigh),_i=ft.external(vt.colorPrimary,"Design system"),Pi=(ft.external(vt.colorOnPrimary,"Design system"),ft.extend("--ft-radio-border-color",vt.colorOnSurfaceMedium)),Ii=ft.external(vt.colorOnSurfaceDisabled,"Design system");class Hi extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Wi extends bt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return K`
|
|
731
747
|
<div class="${Xe(t)}">
|
|
732
748
|
<div class="ft-radio--box-container">
|
|
733
749
|
<input id="radio-button"
|
|
@@ -752,14 +768,14 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
752
768
|
</ft-typography>
|
|
753
769
|
</label>
|
|
754
770
|
</div>
|
|
755
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
771
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Hi(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Hi(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Wi.elementDefinitions={"ft-ripple":ri,"ft-typography":De},Wi.styles=b`
|
|
756
772
|
* {
|
|
757
773
|
box-sizing: border-box;
|
|
758
774
|
}
|
|
759
775
|
|
|
760
776
|
.ft-radio {
|
|
761
777
|
box-sizing: border-box;
|
|
762
|
-
color: ${
|
|
778
|
+
color: ${Ai};
|
|
763
779
|
|
|
764
780
|
display: inline-flex;
|
|
765
781
|
align-items: center;
|
|
@@ -767,7 +783,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
767
783
|
}
|
|
768
784
|
|
|
769
785
|
.ft-radio--disabled {
|
|
770
|
-
color: ${
|
|
786
|
+
color: ${Ii};
|
|
771
787
|
}
|
|
772
788
|
|
|
773
789
|
input {
|
|
@@ -790,7 +806,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
790
806
|
}
|
|
791
807
|
|
|
792
808
|
.ft-radio--box {
|
|
793
|
-
border: 2px solid ${
|
|
809
|
+
border: 2px solid ${Pi};
|
|
794
810
|
border-radius: 50%;
|
|
795
811
|
|
|
796
812
|
display: flex;
|
|
@@ -803,7 +819,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
803
819
|
|
|
804
820
|
.ft-radio--box:after {
|
|
805
821
|
content: " ";
|
|
806
|
-
background-color: ${
|
|
822
|
+
background-color: ${_i};
|
|
807
823
|
|
|
808
824
|
border-radius: 50%;
|
|
809
825
|
|
|
@@ -815,7 +831,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
815
831
|
}
|
|
816
832
|
|
|
817
833
|
.ft-radio--checked .ft-radio--box {
|
|
818
|
-
border-color: ${
|
|
834
|
+
border-color: ${_i};
|
|
819
835
|
}
|
|
820
836
|
|
|
821
837
|
|
|
@@ -824,24 +840,24 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
824
840
|
}
|
|
825
841
|
|
|
826
842
|
.ft-radio--disabled .ft-radio--box {
|
|
827
|
-
border-color: ${
|
|
843
|
+
border-color: ${Ii};
|
|
828
844
|
background-color: transparent;
|
|
829
845
|
}
|
|
830
846
|
|
|
831
847
|
.ft-radio--disabled .ft-radio--box:after {
|
|
832
|
-
background-color: ${
|
|
848
|
+
background-color: ${Ii};
|
|
833
849
|
}
|
|
834
|
-
`,
|
|
850
|
+
`,Ti([o()],Wi.prototype,"value",void 0),Ti([o()],Wi.prototype,"name",void 0),Ti([o({type:Boolean})],Wi.prototype,"checked",void 0),Ti([o({type:Boolean})],Wi.prototype,"disabled",void 0),Ti([r(".ft-radio")],Wi.prototype,"container",void 0),Ti([r("ft-ripple")],Wi.prototype,"ripple",void 0),Ti([r("input")],Wi.prototype,"input",void 0);var Ki=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Vi extends bt{constructor(){super(...arguments),this.name=""}render(){return K`
|
|
835
851
|
<slot @slotchange=${this.onSlotChange}
|
|
836
852
|
@change=${this.onChange}
|
|
837
853
|
@keydown=${this.onKeyDown}
|
|
838
854
|
@focusin=${this.onFocusIn}
|
|
839
855
|
></slot>
|
|
840
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
856
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Vi.elementDefinitions={},Vi.styles=b`
|
|
841
857
|
:host {
|
|
842
858
|
display: contents;
|
|
843
859
|
}
|
|
844
|
-
`,
|
|
860
|
+
`,Ki([o()],Vi.prototype,"name",void 0),Ki([h()],Vi.prototype,"radioButtons",void 0),c("ft-radio")(Wi),c("ft-radio-group")(Vi);var Zi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ji={borderRadiusM:ft.external(vt.borderRadiusM,"Design system"),colorOutline:ft.external(vt.colorOutline,"Design system"),colorOnSurface:ft.external(vt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(vt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ft.external(vt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(vt.colorPrimary,"Design system"),colorOnPrimary:ft.external(vt.colorOnPrimary,"Design system"),fontFamily:ft.external(re.fontFamily,"Body2 typography"),fontSize:ft.external(re.fontSize,"Body2 typography"),fontWeight:ft.external(re.fontWeight,"Body2 typography"),letterSpacing:ft.external(re.letterSpacing,"Body2 typography"),lineHeight:ft.external(re.lineHeight,"Body2 typography"),textTransform:ft.external(re.textTransform,"Body2 typography")};class qi extends bt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return K`
|
|
845
861
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
846
862
|
${null==this.parent?null:K`
|
|
847
863
|
<div tabindex="0"
|
|
@@ -894,7 +910,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
894
910
|
|
|
895
911
|
${t.label}
|
|
896
912
|
</ft-radio>
|
|
897
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
913
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}qi.elementDefinitions={"ft-button":Mi,"ft-ripple":ri,"ft-typography":De,"ft-checkbox":Li,"ft-icon":ki,"ft-radio":Wi},qi.styles=[b`
|
|
898
914
|
.ft-filter-level--container {
|
|
899
915
|
display: flex;
|
|
900
916
|
flex-direction: column;
|
|
@@ -908,14 +924,14 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
908
924
|
flex-shrink: 0;
|
|
909
925
|
text-decoration: none;
|
|
910
926
|
position: relative;
|
|
911
|
-
border-radius: ${
|
|
927
|
+
border-radius: ${Ji.borderRadiusM};
|
|
912
928
|
overflow: hidden;
|
|
913
929
|
display: flex;
|
|
914
930
|
align-items: center;
|
|
915
931
|
padding: 4px 4px;
|
|
916
932
|
gap: 4px;
|
|
917
933
|
cursor: pointer;
|
|
918
|
-
color: ${
|
|
934
|
+
color: ${Ji.colorOnSurface};
|
|
919
935
|
}
|
|
920
936
|
|
|
921
937
|
.ft-filter-level--go-back:focus {
|
|
@@ -944,7 +960,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
944
960
|
}
|
|
945
961
|
|
|
946
962
|
ft-button {
|
|
947
|
-
${ut(
|
|
963
|
+
${ut(Ci.color,Ji.colorOnSurface)};
|
|
948
964
|
}
|
|
949
965
|
|
|
950
966
|
ft-radio, ft-checkbox {
|
|
@@ -955,7 +971,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
955
971
|
margin-left: -10px;
|
|
956
972
|
word-break: break-word;
|
|
957
973
|
}
|
|
958
|
-
`],
|
|
974
|
+
`],Zi([o({type:String})],qi.prototype,"id",void 0),Zi([o({type:Object})],qi.prototype,"parent",void 0),Zi([o({type:Array})],qi.prototype,"options",void 0),Zi([o({type:Boolean})],qi.prototype,"multivalued",void 0),Zi([o({type:Boolean})],qi.prototype,"disabled",void 0),Zi([o({type:Boolean})],qi.prototype,"hideSelectedOptions",void 0),Zi([o({type:Boolean})],qi.prototype,"preventNavigation",void 0),Zi([o({type:String})],qi.prototype,"filter",void 0),Zi([o({type:String})],qi.prototype,"moreValuesButtonLabel",void 0),Zi([o({type:Number})],qi.prototype,"displayedValuesLimit",void 0),Zi([r(".ft-filter-level--container")],qi.prototype,"container",void 0),Zi([s()],qi.prototype,"displayedPages",void 0);var Xi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Yi={buttonsColor:ft.extend("--ft-snap-scroll-buttons-color",vt.colorPrimary),buttonsZIndex:ft.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ft.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ft.external(vt.colorSurface,"Design system")};class Gi extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Qi extends bt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=Xe({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":$t}),e=this.controls&&this.withScroll;return K`
|
|
959
975
|
<div part="container" class="${t}">
|
|
960
976
|
<ft-button
|
|
961
977
|
class="ft-snap-scroll--previous"
|
|
@@ -979,7 +995,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
979
995
|
@click=${this.next}
|
|
980
996
|
></ft-button>
|
|
981
997
|
</div>
|
|
982
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
998
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new Gi(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}Qi.elementDefinitions={"ft-button":Mi},Qi.styles=b`
|
|
983
999
|
.ft-snap-scroll {
|
|
984
1000
|
box-sizing: border-box;
|
|
985
1001
|
position: relative;
|
|
@@ -1014,7 +1030,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1014
1030
|
flex-wrap: nowrap;
|
|
1015
1031
|
align-items: flex-start;
|
|
1016
1032
|
justify-content: flex-start;
|
|
1017
|
-
gap: ${
|
|
1033
|
+
gap: ${Yi.gap};
|
|
1018
1034
|
}
|
|
1019
1035
|
|
|
1020
1036
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1057,11 +1073,11 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1057
1073
|
.ft-snap-scroll--next {
|
|
1058
1074
|
position: absolute;
|
|
1059
1075
|
display: flex;
|
|
1060
|
-
z-index: ${
|
|
1076
|
+
z-index: ${Yi.buttonsZIndex};
|
|
1061
1077
|
opacity: 1;
|
|
1062
1078
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1063
|
-
${ut(
|
|
1064
|
-
${ut(
|
|
1079
|
+
${ut(Ci.backgroundColor,"transparent")};
|
|
1080
|
+
${ut(Ci.color,Yi.buttonsColor)};
|
|
1065
1081
|
}
|
|
1066
1082
|
|
|
1067
1083
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1074,37 +1090,37 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1074
1090
|
top: 0;
|
|
1075
1091
|
left: -1px;
|
|
1076
1092
|
bottom: 0;
|
|
1077
|
-
background: linear-gradient(to right, ${
|
|
1093
|
+
background: linear-gradient(to right, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1078
1094
|
}
|
|
1079
1095
|
|
|
1080
1096
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1081
1097
|
top: -1px;
|
|
1082
1098
|
left: 0;
|
|
1083
1099
|
right: 0;
|
|
1084
|
-
background: linear-gradient(to bottom, ${
|
|
1100
|
+
background: linear-gradient(to bottom, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1085
1101
|
}
|
|
1086
1102
|
|
|
1087
1103
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1088
1104
|
top: 0;
|
|
1089
1105
|
right: -1px;
|
|
1090
1106
|
bottom: 0;
|
|
1091
|
-
background: linear-gradient(to left, ${
|
|
1107
|
+
background: linear-gradient(to left, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1092
1108
|
}
|
|
1093
1109
|
|
|
1094
1110
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1095
1111
|
left: 0;
|
|
1096
1112
|
right: 0;
|
|
1097
1113
|
bottom: -1px;
|
|
1098
|
-
background: linear-gradient(to top, ${
|
|
1114
|
+
background: linear-gradient(to top, ${Yi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1099
1115
|
}
|
|
1100
1116
|
|
|
1101
1117
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1102
1118
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1103
1119
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1104
1120
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1105
|
-
background-color: ${
|
|
1121
|
+
background-color: ${Yi.colorSurface};
|
|
1106
1122
|
}
|
|
1107
|
-
`,
|
|
1123
|
+
`,Xi([o({type:Boolean})],Qi.prototype,"horizontal",void 0),Xi([o({type:Boolean})],Qi.prototype,"hideScrollbar",void 0),Xi([o({type:Boolean})],Qi.prototype,"controls",void 0),Xi([o({type:Boolean})],Qi.prototype,"limitSize",void 0),Xi([s()],Qi.prototype,"elements",void 0),Xi([s()],Qi.prototype,"currentElement",void 0),Xi([s()],Qi.prototype,"withScroll",void 0),Xi([s()],Qi.prototype,"startReached",void 0),Xi([s()],Qi.prototype,"endReached",void 0),Xi([r(".ft-snap-scroll--content")],Qi.prototype,"contentSlot",void 0),c("ft-snap-scroll")(Qi);var to=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const eo={colorOutline:ft.external(vt.colorOutline,"Design system"),colorOnSurface:ft.external(vt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(vt.colorOnSurfaceMedium,"Design system"),colorPrimary:ft.external(vt.colorPrimary,"Design system"),colorSurface:ft.external(vt.colorSurface,"Design system"),transitionDuration:ft.external(vt.transitionDuration,"Design system"),transitionTimingFunction:ft.external(vt.transitionTimingFunction,"Design system")};class io extends CustomEvent{constructor(t){super("change",{detail:t})}}class oo extends bt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return Le(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return K`
|
|
1108
1124
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1109
1125
|
part="container">
|
|
1110
1126
|
${this.label||i?K`
|
|
@@ -1169,7 +1185,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1169
1185
|
@display-level=${this.onDisplayLevel}
|
|
1170
1186
|
part="values"
|
|
1171
1187
|
></ft-filter-level>
|
|
1172
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new
|
|
1188
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new io(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}oo.elementDefinitions={"ft-button":Mi,"ft-filter-level":qi,"ft-snap-scroll":Qi,"ft-typography":De},oo.styles=[Fe,b`
|
|
1173
1189
|
:host {
|
|
1174
1190
|
display: flex;
|
|
1175
1191
|
max-height: 100%;
|
|
@@ -1182,8 +1198,8 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1182
1198
|
flex-direction: column;
|
|
1183
1199
|
max-height: 100%;
|
|
1184
1200
|
max-width: 100%;
|
|
1185
|
-
color: ${
|
|
1186
|
-
background: ${
|
|
1201
|
+
color: ${eo.colorOnSurface};
|
|
1202
|
+
background: ${eo.colorSurface};
|
|
1187
1203
|
}
|
|
1188
1204
|
|
|
1189
1205
|
.ft-filter--header {
|
|
@@ -1199,7 +1215,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1199
1215
|
.ft-filter--header ft-button {
|
|
1200
1216
|
flex-shrink: 0;
|
|
1201
1217
|
margin-left: auto;
|
|
1202
|
-
${ut(
|
|
1218
|
+
${ut(Ci.iconSize,"18px")};
|
|
1203
1219
|
}
|
|
1204
1220
|
|
|
1205
1221
|
.ft-filter--label {
|
|
@@ -1219,8 +1235,8 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1219
1235
|
padding: 0 10px;
|
|
1220
1236
|
overflow: hidden;
|
|
1221
1237
|
height: 32px;
|
|
1222
|
-
transition: height ${
|
|
1223
|
-
margin ${
|
|
1238
|
+
transition: height ${eo.transitionDuration} ${eo.transitionTimingFunction},
|
|
1239
|
+
margin ${eo.transitionDuration} ${eo.transitionTimingFunction};
|
|
1224
1240
|
transition-delay: 500ms;
|
|
1225
1241
|
}
|
|
1226
1242
|
|
|
@@ -1233,11 +1249,11 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1233
1249
|
display: block;
|
|
1234
1250
|
width: 100%;
|
|
1235
1251
|
border-radius: 4px;
|
|
1236
|
-
border: 1px solid ${
|
|
1252
|
+
border: 1px solid ${eo.colorOutline};
|
|
1237
1253
|
padding: 4px;
|
|
1238
|
-
background-color: ${
|
|
1239
|
-
color: ${
|
|
1240
|
-
outline-color: ${
|
|
1254
|
+
background-color: ${eo.colorSurface};
|
|
1255
|
+
color: ${eo.colorOnSurfaceMedium};
|
|
1256
|
+
outline-color: ${eo.colorPrimary};
|
|
1241
1257
|
}
|
|
1242
1258
|
|
|
1243
1259
|
.ft-filter--values {
|
|
@@ -1249,7 +1265,7 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1249
1265
|
}
|
|
1250
1266
|
|
|
1251
1267
|
.ft-filter--separator {
|
|
1252
|
-
border-top: 1px solid ${
|
|
1268
|
+
border-top: 1px solid ${eo.colorOutline};
|
|
1253
1269
|
margin: 4px 10px;
|
|
1254
1270
|
}
|
|
1255
1271
|
|
|
@@ -1274,6 +1290,6 @@ class hi extends Pe{constructor(t){if(super(t),this.it=Z,t.type!==Ae)throw Error
|
|
|
1274
1290
|
slot {
|
|
1275
1291
|
display: none;
|
|
1276
1292
|
}
|
|
1277
|
-
`],
|
|
1293
|
+
`],to([o({type:String})],oo.prototype,"id",void 0),to([o({type:String})],oo.prototype,"label",void 0),to([o({type:String})],oo.prototype,"filterPlaceHolder",void 0),to([o({type:String})],oo.prototype,"clearButtonLabel",void 0),to([o({type:String})],oo.prototype,"moreValuesButtonLabel",void 0),to([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],oo.prototype,"options",void 0),to([o({type:Boolean})],oo.prototype,"multivalued",void 0),to([o({type:Boolean})],oo.prototype,"disabled",void 0),to([o({type:Boolean})],oo.prototype,"raiseSelectedOptions",void 0),to([o({type:Number})],oo.prototype,"displayedValuesLimit",void 0),to([r(".ft-filter--slot")],oo.prototype,"slotElement",void 0),to([r(".ft-filter--container")],oo.prototype,"container",void 0),to([r(".ft-filter--values")],oo.prototype,"valuesContainer",void 0),to([r(".ft-filter--levels")],oo.prototype,"levelsContainer",void 0),to([r(".ft-filter--levels ft-filter-level:last-child")],oo.prototype,"lastLevel",void 0),to([function(t){return n({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],oo.prototype,"levels",void 0),to([s()],oo.prototype,"withScroll",void 0),to([s()],oo.prototype,"filter",void 0),to([s()],oo.prototype,"slideIn",void 0),to([s()],oo.prototype,"slideOut",void 0);var so=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class no extends bt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return K`
|
|
1278
1294
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1279
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1295
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}no.elementDefinitions={},so([o({type:String})],no.prototype,"label",void 0),so([o({type:Object,converter:t=>t})],no.prototype,"value",void 0),so([o({type:Boolean,reflect:!0})],no.prototype,"selected",void 0),so([o({type:Object})],no.prototype,"subOptions",void 0),so([r(".ft-filter-option--slot")],no.prototype,"slotElement",void 0),c("ft-filter")(oo),c("ft-filter-option")(no),t.FtFilter=oo,t.FtFilterChangeEvent=io,t.FtFilterCssVariables=eo,t.FtFilterOption=no,Object.defineProperty(t,"t",{value:!0})}({});
|