@fluid-topics/ft-filter 0.3.12 → 0.3.14
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-level.css.d.ts +17 -0
- package/build/ft-filter-level.css.js +88 -0
- package/build/ft-filter-level.d.ts +2 -17
- package/build/ft-filter-level.js +6 -88
- package/build/ft-filter-option.d.ts +1 -6
- package/build/ft-filter-option.properties.d.ts +7 -0
- package/build/ft-filter-option.properties.js +2 -0
- package/build/ft-filter.css.d.ts +11 -0
- package/build/ft-filter.css.js +126 -0
- package/build/ft-filter.d.ts +2 -23
- package/build/ft-filter.js +6 -125
- package/build/ft-filter.light.js +811 -811
- package/build/ft-filter.min.js +822 -822
- package/build/ft-filter.properties.d.ts +15 -0
- package/build/ft-filter.properties.js +2 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- 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(Si){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
|
|
@@ -96,124 +96,213 @@ var ct,pt;null==ht||ht(G,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
96
96
|
* @license
|
|
97
97
|
* Copyright 2020 Google LLC
|
|
98
98
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
99
|
-
*/var zt
|
|
99
|
+
*/var zt;!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"}(zt||(zt={}));const Rt=ut.extend("--ft-typography-font-family",bt.titleFont),Mt=ut.extend("--ft-typography-font-family",bt.contentFont),Bt={fontFamily:Mt,fontSize:ut.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ut.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ut.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ut.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:ut.create("--ft-typography-text-transform","UNKNOWN","inherit")},Ft=ut.extend("--ft-typography-title-font-family",Rt),jt=ut.extend("--ft-typography-title-font-size",Bt.fontSize,"20px"),Ut=ut.extend("--ft-typography-title-font-weight",Bt.fontWeight,"normal"),Lt=ut.extend("--ft-typography-title-letter-spacing",Bt.letterSpacing,"0.15px"),Dt=ut.extend("--ft-typography-title-line-height",Bt.lineHeight,"1.2"),Tt=ut.extend("--ft-typography-title-text-transform",Bt.textTransform,"inherit"),At=ut.extend("--ft-typography-title-dense-font-family",Rt),Pt=ut.extend("--ft-typography-title-dense-font-size",Bt.fontSize,"14px"),_t=ut.extend("--ft-typography-title-dense-font-weight",Bt.fontWeight,"normal"),It=ut.extend("--ft-typography-title-dense-letter-spacing",Bt.letterSpacing,"0.105px"),Wt=ut.extend("--ft-typography-title-dense-line-height",Bt.lineHeight,"1.7"),Ht=ut.extend("--ft-typography-title-dense-text-transform",Bt.textTransform,"inherit"),Kt=ut.extend("--ft-typography-subtitle1-font-family",Mt),Vt=ut.extend("--ft-typography-subtitle1-font-size",Bt.fontSize,"16px"),Zt=ut.extend("--ft-typography-subtitle1-font-weight",Bt.fontWeight,"600"),Jt=ut.extend("--ft-typography-subtitle1-letter-spacing",Bt.letterSpacing,"0.144px"),qt=ut.extend("--ft-typography-subtitle1-line-height",Bt.lineHeight,"1.5"),Xt=ut.extend("--ft-typography-subtitle1-text-transform",Bt.textTransform,"inherit"),Yt=ut.extend("--ft-typography-subtitle2-font-family",Mt),Gt=ut.extend("--ft-typography-subtitle2-font-size",Bt.fontSize,"14px"),Qt=ut.extend("--ft-typography-subtitle2-font-weight",Bt.fontWeight,"normal"),te=ut.extend("--ft-typography-subtitle2-letter-spacing",Bt.letterSpacing,"0.098px"),ee=ut.extend("--ft-typography-subtitle2-line-height",Bt.lineHeight,"1.7"),ie=ut.extend("--ft-typography-subtitle2-text-transform",Bt.textTransform,"inherit"),oe=ut.extend("--ft-typography-body1-font-family",Mt),se=ut.extend("--ft-typography-body1-font-size",Bt.fontSize,"16px"),ne=ut.extend("--ft-typography-body1-font-weight",Bt.fontWeight,"normal"),re=ut.extend("--ft-typography-body1-letter-spacing",Bt.letterSpacing,"0.496px"),le=ut.extend("--ft-typography-body1-line-height",Bt.lineHeight,"1.5"),ae=ut.extend("--ft-typography-body1-text-transform",Bt.textTransform,"inherit"),he={fontFamily:ut.extend("--ft-typography-body2-font-family",Mt),fontSize:ut.extend("--ft-typography-body2-font-size",Bt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-body2-font-weight",Bt.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-body2-letter-spacing",Bt.letterSpacing,"0.252px"),lineHeight:ut.extend("--ft-typography-body2-line-height",Bt.lineHeight,"1.4"),textTransform:ut.extend("--ft-typography-body2-text-transform",Bt.textTransform,"inherit")},ce=ut.extend("--ft-typography-caption-font-family",Mt),pe=ut.extend("--ft-typography-caption-font-size",Bt.fontSize,"12px"),de=ut.extend("--ft-typography-caption-font-weight",Bt.fontWeight,"normal"),fe=ut.extend("--ft-typography-caption-letter-spacing",Bt.letterSpacing,"0.396px"),ue=ut.extend("--ft-typography-caption-line-height",Bt.lineHeight,"1.33"),ve=ut.extend("--ft-typography-caption-text-transform",Bt.textTransform,"inherit"),be=ut.extend("--ft-typography-breadcrumb-font-family",Mt),xe=ut.extend("--ft-typography-breadcrumb-font-size",Bt.fontSize,"10px"),ye=ut.extend("--ft-typography-breadcrumb-font-weight",Bt.fontWeight,"normal"),ge=ut.extend("--ft-typography-breadcrumb-letter-spacing",Bt.letterSpacing,"0.33px"),me=ut.extend("--ft-typography-breadcrumb-line-height",Bt.lineHeight,"1.6"),$e=ut.extend("--ft-typography-breadcrumb-text-transform",Bt.textTransform,"inherit"),we=ut.extend("--ft-typography-overline-font-family",Mt),ke=ut.extend("--ft-typography-overline-font-size",Bt.fontSize,"10px"),Oe=ut.extend("--ft-typography-overline-font-weight",Bt.fontWeight,"normal"),Se=ut.extend("--ft-typography-overline-letter-spacing",Bt.letterSpacing,"1.5px"),Ce=ut.extend("--ft-typography-overline-line-height",Bt.lineHeight,"1.6"),Ne=ut.extend("--ft-typography-overline-text-transform",Bt.textTransform,"uppercase"),Ee={fontFamily:ut.extend("--ft-typography-button-font-family",Mt),fontSize:ut.extend("--ft-typography-button-font-size",Bt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-button-font-weight",Bt.fontWeight,"600"),letterSpacing:ut.extend("--ft-typography-button-letter-spacing",Bt.letterSpacing,"1.246px"),lineHeight:ut.extend("--ft-typography-button-line-height",Bt.lineHeight,"1.15"),textTransform:ut.extend("--ft-typography-button-text-transform",Bt.textTransform,"uppercase")},ze=x`
|
|
100
100
|
.ft-typography--title {
|
|
101
|
-
font-family: ${
|
|
102
|
-
font-size: ${
|
|
103
|
-
font-weight: ${
|
|
104
|
-
letter-spacing: ${
|
|
105
|
-
line-height: ${
|
|
106
|
-
text-transform: ${
|
|
101
|
+
font-family: ${Ft};
|
|
102
|
+
font-size: ${jt};
|
|
103
|
+
font-weight: ${Ut};
|
|
104
|
+
letter-spacing: ${Lt};
|
|
105
|
+
line-height: ${Dt};
|
|
106
|
+
text-transform: ${Tt};
|
|
107
107
|
}
|
|
108
|
-
`,
|
|
108
|
+
`,Re=x`
|
|
109
109
|
.ft-typography--title-dense {
|
|
110
|
-
font-family: ${
|
|
111
|
-
font-size: ${
|
|
112
|
-
font-weight: ${
|
|
113
|
-
letter-spacing: ${
|
|
114
|
-
line-height: ${
|
|
115
|
-
text-transform: ${
|
|
110
|
+
font-family: ${At};
|
|
111
|
+
font-size: ${Pt};
|
|
112
|
+
font-weight: ${_t};
|
|
113
|
+
letter-spacing: ${It};
|
|
114
|
+
line-height: ${Wt};
|
|
115
|
+
text-transform: ${Ht};
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`,Me=x`
|
|
118
118
|
.ft-typography--subtitle1 {
|
|
119
|
-
font-family: ${
|
|
120
|
-
font-size: ${
|
|
121
|
-
font-weight: ${
|
|
122
|
-
letter-spacing: ${
|
|
123
|
-
line-height: ${
|
|
124
|
-
text-transform: ${
|
|
119
|
+
font-family: ${Kt};
|
|
120
|
+
font-size: ${Vt};
|
|
121
|
+
font-weight: ${Zt};
|
|
122
|
+
letter-spacing: ${Jt};
|
|
123
|
+
line-height: ${qt};
|
|
124
|
+
text-transform: ${Xt};
|
|
125
125
|
}
|
|
126
|
-
`,
|
|
126
|
+
`,Be=x`
|
|
127
127
|
.ft-typography--subtitle2 {
|
|
128
|
-
font-family: ${
|
|
129
|
-
font-size: ${
|
|
130
|
-
font-weight: ${
|
|
131
|
-
letter-spacing: ${
|
|
132
|
-
line-height: ${
|
|
133
|
-
text-transform: ${
|
|
128
|
+
font-family: ${Yt};
|
|
129
|
+
font-size: ${Gt};
|
|
130
|
+
font-weight: ${Qt};
|
|
131
|
+
letter-spacing: ${te};
|
|
132
|
+
line-height: ${ee};
|
|
133
|
+
text-transform: ${ie};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
`,
|
|
136
|
+
`,Fe=x`
|
|
137
137
|
.ft-typography--body1 {
|
|
138
|
-
font-family: ${
|
|
139
|
-
font-size: ${
|
|
140
|
-
font-weight: ${
|
|
141
|
-
letter-spacing: ${
|
|
142
|
-
line-height: ${
|
|
143
|
-
text-transform: ${
|
|
138
|
+
font-family: ${oe};
|
|
139
|
+
font-size: ${se};
|
|
140
|
+
font-weight: ${ne};
|
|
141
|
+
letter-spacing: ${re};
|
|
142
|
+
line-height: ${le};
|
|
143
|
+
text-transform: ${ae};
|
|
144
144
|
}
|
|
145
|
-
`,
|
|
145
|
+
`,je=x`
|
|
146
146
|
.ft-typography--body2 {
|
|
147
|
-
font-family: ${
|
|
148
|
-
font-size: ${
|
|
149
|
-
font-weight: ${
|
|
150
|
-
letter-spacing: ${
|
|
151
|
-
line-height: ${
|
|
152
|
-
text-transform: ${
|
|
147
|
+
font-family: ${he.fontFamily};
|
|
148
|
+
font-size: ${he.fontSize};
|
|
149
|
+
font-weight: ${he.fontWeight};
|
|
150
|
+
letter-spacing: ${he.letterSpacing};
|
|
151
|
+
line-height: ${he.lineHeight};
|
|
152
|
+
text-transform: ${he.textTransform};
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`,Ue=x`
|
|
155
155
|
.ft-typography--caption {
|
|
156
|
-
font-family: ${
|
|
157
|
-
font-size: ${
|
|
158
|
-
font-weight: ${
|
|
159
|
-
letter-spacing: ${
|
|
160
|
-
line-height: ${
|
|
161
|
-
text-transform: ${
|
|
156
|
+
font-family: ${ce};
|
|
157
|
+
font-size: ${pe};
|
|
158
|
+
font-weight: ${de};
|
|
159
|
+
letter-spacing: ${fe};
|
|
160
|
+
line-height: ${ue};
|
|
161
|
+
text-transform: ${ve};
|
|
162
162
|
}
|
|
163
|
-
`,
|
|
163
|
+
`,Le=x`
|
|
164
164
|
.ft-typography--breadcrumb {
|
|
165
|
-
font-family: ${
|
|
166
|
-
font-size: ${
|
|
167
|
-
font-weight: ${
|
|
168
|
-
letter-spacing: ${
|
|
169
|
-
line-height: ${
|
|
170
|
-
text-transform: ${
|
|
165
|
+
font-family: ${be};
|
|
166
|
+
font-size: ${xe};
|
|
167
|
+
font-weight: ${ye};
|
|
168
|
+
letter-spacing: ${ge};
|
|
169
|
+
line-height: ${me};
|
|
170
|
+
text-transform: ${$e};
|
|
171
171
|
}
|
|
172
|
-
`,
|
|
172
|
+
`,De=x`
|
|
173
173
|
.ft-typography--overline {
|
|
174
|
-
font-family: ${
|
|
175
|
-
font-size: ${
|
|
176
|
-
font-weight: ${
|
|
177
|
-
letter-spacing: ${
|
|
178
|
-
line-height: ${
|
|
179
|
-
text-transform: ${
|
|
174
|
+
font-family: ${we};
|
|
175
|
+
font-size: ${ke};
|
|
176
|
+
font-weight: ${Oe};
|
|
177
|
+
letter-spacing: ${Se};
|
|
178
|
+
line-height: ${Ce};
|
|
179
|
+
text-transform: ${Ne};
|
|
180
180
|
}
|
|
181
|
-
`,
|
|
181
|
+
`,Te=x`
|
|
182
182
|
.ft-typography--button {
|
|
183
|
-
font-family: ${
|
|
184
|
-
font-size: ${
|
|
185
|
-
font-weight: ${
|
|
186
|
-
letter-spacing: ${
|
|
187
|
-
line-height: ${
|
|
188
|
-
text-transform: ${
|
|
189
|
-
}
|
|
190
|
-
|
|
183
|
+
font-family: ${Ee.fontFamily};
|
|
184
|
+
font-size: ${Ee.fontSize};
|
|
185
|
+
font-weight: ${Ee.fontWeight};
|
|
186
|
+
letter-spacing: ${Ee.letterSpacing};
|
|
187
|
+
line-height: ${Ee.lineHeight};
|
|
188
|
+
text-transform: ${Ee.textTransform};
|
|
189
|
+
}
|
|
190
|
+
`,Ae=x`
|
|
191
|
+
.ft-typography {
|
|
192
|
+
vertical-align: inherit;
|
|
193
|
+
}
|
|
194
|
+
`;var Pe=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 _e extends yt{constructor(){super(...arguments),this.variant=zt.body1}render(){return this.element?Et`
|
|
191
195
|
<${Ct(this.element)}
|
|
192
196
|
class="ft-typography ft-typography--${this.variant}">
|
|
193
197
|
<slot></slot>
|
|
194
198
|
</${Ct(this.element)}>
|
|
195
199
|
`:Et`
|
|
196
200
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
197
|
-
`}}function
|
|
201
|
+
`}}function Ie(t,e){return t.flatMap((t=>[t,...Ie(e(t),e)]))}
|
|
198
202
|
/**
|
|
199
203
|
* @license
|
|
200
204
|
* Copyright 2017 Google LLC
|
|
201
205
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
202
|
-
*/
|
|
203
|
-
.ft-typography {
|
|
204
|
-
vertical-align: inherit;
|
|
205
|
-
}
|
|
206
|
-
`],Rt([o()],Pe.prototype,"element",void 0),Rt([o()],Pe.prototype,"variant",void 0),c("ft-typography")(Pe);const Ie=1,We=2,He=t=>(...e)=>({_$litDirective$:t,values:e});class Ke{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
206
|
+
*/_e.styles=[ze,Re,Me,Be,Fe,je,Ue,Le,De,Te,Ae],Pe([o()],_e.prototype,"element",void 0),Pe([o()],_e.prototype,"variant",void 0),c("ft-typography")(_e);const We=1,He=2,Ke=t=>(...e)=>({_$litDirective$:t,values:e});class Ve{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
207
207
|
/**
|
|
208
208
|
* @license
|
|
209
209
|
* Copyright 2020 Google LLC
|
|
210
210
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
211
|
-
*/const{H:
|
|
211
|
+
*/const{H:Ze}=at,Je=()=>document.createComment(""),qe=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Je(),n),o=s.insertBefore(Je(),n);i=new Ze(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Xe=(t,e,i=t)=>(t._$AI(e,i),t),Ye={},Ge=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Qe=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},ti=Ke(class extends Ve{constructor(t){if(super(t),t.type!==He)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.ht(e,i,o);if(!Array.isArray(n))return this.ut=l,r;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],h=[];let c,p,d=0,f=n.length-1,u=0,v=r.length-1;for(;d<=f&&u<=v;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])h[u]=Xe(n[d],r[u]),d++,u++;else if(a[f]===l[v])h[v]=Xe(n[f],r[v]),f--,v--;else if(a[d]===l[v])h[v]=Xe(n[d],r[v]),qe(t,h[v+1],n[d]),d++,v--;else if(a[f]===l[u])h[u]=Xe(n[f],r[u]),qe(t,n[d],n[f]),f--,u++;else if(void 0===c&&(c=Qe(l,u,v),p=Qe(a,d,f)),c.has(a[d]))if(c.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=qe(t,n[d]);Xe(e,r[u]),h[u]=e}else h[u]=Xe(i,r[u]),qe(t,n[d],i),n[e]=null;u++}else Ge(n[f]),f--;else Ge(n[d]),d++;for(;u<=v;){const e=qe(t,h[v+1]);Xe(e,r[u]),h[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Ge(t)}return this.ut=l,((t,e=Ye)=>{t._$AH=e})(t,h),Z}}),ei=Ke(class extends Ve{constructor(t){var e;if(super(t),t.type!==We||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const s=t.element.classList;this.nt.forEach((t=>{t in e||(s.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.nt.add(t)):(s.remove(t),this.nt.delete(t)))}return Z}}),ii=ut.extend("--ft-ripple-color",bt.colorContent),oi={color:ii,backgroundColor:ut.extend("--ft-ripple-background-color",ii),opacityContentOnSurfacePressed:ut.external(bt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ut.external(bt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ut.external(bt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ut.external(bt.opacityContentOnSurfaceSelected,"Design system")},si=ut.extend("--ft-ripple-color",bt.colorPrimary),ni=si,ri=ut.extend("--ft-ripple-background-color",si),li=ut.extend("--ft-ripple-color",bt.colorSecondary),ai=li,hi=ut.extend("--ft-ripple-background-color",li),ci=x`
|
|
212
|
+
:host {
|
|
213
|
+
display: contents;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.ft-ripple {
|
|
217
|
+
position: absolute;
|
|
218
|
+
inset: 0;
|
|
219
|
+
pointer-events: none;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
223
|
+
overflow: hidden;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.ft-ripple .ft-ripple--background,
|
|
227
|
+
.ft-ripple .ft-ripple--effect {
|
|
228
|
+
position: absolute;
|
|
229
|
+
opacity: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.ft-ripple .ft-ripple--background {
|
|
233
|
+
background-color: ${oi.backgroundColor};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.ft-ripple .ft-ripple--effect {
|
|
237
|
+
background-color: ${oi.color};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
241
|
+
background-color: ${hi};
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
245
|
+
background-color: ${ai};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
249
|
+
background-color: ${ri};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
253
|
+
background-color: ${ni};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ft-ripple .ft-ripple--background {
|
|
257
|
+
top: 0;
|
|
258
|
+
left: 0;
|
|
259
|
+
height: 100%;
|
|
260
|
+
width: 100%;
|
|
261
|
+
transition: opacity 75ms linear;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ft-ripple .ft-ripple--effect,
|
|
265
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
266
|
+
border-radius: 50%;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.ft-ripple .ft-ripple--effect {
|
|
270
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
271
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
275
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
276
|
+
left: 50%;
|
|
277
|
+
top: 50%;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
281
|
+
transform: translate(-50%, -50%);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
285
|
+
opacity: ${oi.opacityContentOnSurfaceHover};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
289
|
+
opacity: ${oi.opacityContentOnSurfaceSelected};
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
293
|
+
opacity: ${oi.opacityContentOnSurfaceFocused};
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
297
|
+
opacity: ${oi.opacityContentOnSurfacePressed};
|
|
298
|
+
transform: translate(-50%, -50%) scale(1);
|
|
299
|
+
}
|
|
300
|
+
`;
|
|
212
301
|
/**
|
|
213
302
|
* @license
|
|
214
303
|
* Copyright 2017 Google LLC
|
|
215
304
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
216
|
-
*/var
|
|
305
|
+
*/var pi=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 di extends yt{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 V`
|
|
217
306
|
<style>
|
|
218
307
|
.ft-ripple .ft-ripple--effect,
|
|
219
308
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -226,100 +315,43 @@ var ct,pt;null==ht||ht(G,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
226
315
|
top: ${this.originY}px;
|
|
227
316
|
}
|
|
228
317
|
</style>
|
|
229
|
-
<div class="${
|
|
318
|
+
<div class="${ei(t)}">
|
|
230
319
|
<div class="ft-ripple--background"></div>
|
|
231
320
|
<div class="ft-ripple--effect"></div>
|
|
232
321
|
</div>
|
|
233
|
-
`}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()}}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
.ft-ripple {
|
|
239
|
-
position: absolute;
|
|
240
|
-
inset: 0;
|
|
241
|
-
pointer-events: none;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
245
|
-
overflow: hidden;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.ft-ripple .ft-ripple--background,
|
|
249
|
-
.ft-ripple .ft-ripple--effect {
|
|
250
|
-
position: absolute;
|
|
251
|
-
opacity: 0;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.ft-ripple .ft-ripple--background {
|
|
255
|
-
background-color: ${oi.backgroundColor};
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.ft-ripple .ft-ripple--effect {
|
|
259
|
-
background-color: ${oi.color};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
263
|
-
background-color: ${hi};
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
267
|
-
background-color: ${ai};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
271
|
-
background-color: ${ri};
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
275
|
-
background-color: ${ni};
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.ft-ripple .ft-ripple--background {
|
|
279
|
-
top: 0;
|
|
280
|
-
left: 0;
|
|
281
|
-
height: 100%;
|
|
282
|
-
width: 100%;
|
|
283
|
-
transition: opacity 75ms linear;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.ft-ripple .ft-ripple--effect,
|
|
287
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
288
|
-
border-radius: 50%;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.ft-ripple .ft-ripple--effect {
|
|
292
|
-
transform: translate(-50%, -50%) scale(0.15);
|
|
293
|
-
transition: transform 300ms ease, opacity 75ms linear;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
297
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
298
|
-
left: 50%;
|
|
299
|
-
top: 50%;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
303
|
-
transform: translate(-50%, -50%);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
307
|
-
opacity: ${oi.opacityContentOnSurfaceHover};
|
|
308
|
-
}
|
|
322
|
+
`}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()}}di.elementDefinitions={},di.styles=ci,pi([o({type:Boolean})],di.prototype,"primary",void 0),pi([o({type:Boolean})],di.prototype,"secondary",void 0),pi([o({type:Boolean})],di.prototype,"unbounded",void 0),pi([o({type:Boolean})],di.prototype,"activated",void 0),pi([o({type:Boolean})],di.prototype,"selected",void 0),pi([o({type:Boolean})],di.prototype,"disabled",void 0),pi([s()],di.prototype,"hovered",void 0),pi([s()],di.prototype,"focused",void 0),pi([s()],di.prototype,"pressed",void 0),pi([s()],di.prototype,"rippling",void 0),pi([s()],di.prototype,"rippleSize",void 0),pi([s()],di.prototype,"originX",void 0),pi([s()],di.prototype,"originY",void 0),pi([r(".ft-ripple")],di.prototype,"ripple",void 0),pi([r(".ft-ripple--effect")],di.prototype,"rippleEffect",void 0),c("ft-ripple")(di);const fi=ut.create("--ft-tooltip-distance","SIZE","4px"),ui=ut.create("--ft-tooltip-color","COLOR","#FFFFFF"),vi=ut.create("--ft-tooltip-background-color","COLOR","#666666"),bi=ut.create("--ft-tooltip-z-index","NUMBER","1"),xi=ut.external(bt.borderRadiusS,"Design system"),yi=ut.create("--ft-tooltip-max-width","SIZE","150px"),gi=x`
|
|
323
|
+
.ft-tooltip--container {
|
|
324
|
+
display: block;
|
|
325
|
+
position: relative;
|
|
326
|
+
}
|
|
309
327
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
328
|
+
.ft-tooltip--inline {
|
|
329
|
+
display: inline-block;
|
|
330
|
+
max-width: 100%;
|
|
331
|
+
}
|
|
313
332
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
333
|
+
.ft-tooltip {
|
|
334
|
+
position: absolute;
|
|
335
|
+
box-sizing: border-box;
|
|
336
|
+
overflow: hidden;
|
|
337
|
+
width: max-content;
|
|
338
|
+
max-width: ${yi};
|
|
339
|
+
text-align: center;
|
|
340
|
+
padding: ${fi};
|
|
341
|
+
z-index: ${bi};
|
|
342
|
+
}
|
|
317
343
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
|
|
344
|
+
.ft-tooltip--content {
|
|
345
|
+
padding: 4px 8px;
|
|
346
|
+
border-radius: ${xi};
|
|
347
|
+
background-color: ${vi};
|
|
348
|
+
color: ${ui};
|
|
349
|
+
top: -500px;
|
|
350
|
+
left: -500px;
|
|
351
|
+
position: relative;
|
|
352
|
+
word-break: break-word;
|
|
353
|
+
}
|
|
354
|
+
`;var mi=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 $i extends yt{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 V`
|
|
323
355
|
<div part="container"
|
|
324
356
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
325
357
|
@mouseenter=${this.onHover}
|
|
@@ -335,298 +367,266 @@ var ct,pt;null==ht||ht(G,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
335
367
|
</div>
|
|
336
368
|
<slot></slot>
|
|
337
369
|
</div>
|
|
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;let s=0,n=0;switch(this.position){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.ft-tooltip--inline {
|
|
345
|
-
display: inline-block;
|
|
346
|
-
max-width: 100%;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.ft-tooltip {
|
|
350
|
-
position: absolute;
|
|
351
|
-
box-sizing: border-box;
|
|
352
|
-
overflow: hidden;
|
|
353
|
-
width: max-content;
|
|
354
|
-
max-width: ${xi};
|
|
355
|
-
text-align: center;
|
|
356
|
-
padding: ${di};
|
|
357
|
-
z-index: ${vi};
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.ft-tooltip--content {
|
|
361
|
-
padding: 4px 8px;
|
|
362
|
-
border-radius: ${bi};
|
|
363
|
-
background-color: ${ui};
|
|
364
|
-
color: ${fi};
|
|
365
|
-
top: -500px;
|
|
366
|
-
left: -500px;
|
|
367
|
-
position: relative;
|
|
368
|
-
word-break: break-word;
|
|
369
|
-
}
|
|
370
|
-
`,pi([o()],yi.prototype,"text",void 0),pi([o({type:Boolean})],yi.prototype,"manual",void 0),pi([o({type:Boolean})],yi.prototype,"inline",void 0),pi([o({type:Number})],yi.prototype,"delay",void 0),pi([o()],yi.prototype,"position",void 0),pi([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)],yi.prototype,"slotNodes",void 0),pi([r(".ft-tooltip--container")],yi.prototype,"container",void 0),pi([r("slot")],yi.prototype,"target",void 0),pi([r(".ft-tooltip")],yi.prototype,"tooltip",void 0),pi([r(".ft-tooltip--content")],yi.prototype,"tooltipContent",void 0),pi([s()],yi.prototype,"visible",void 0),c("ft-tooltip")(yi);const gi={color:ut.extend("--ft-loader-color",bt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")};class mi extends yt{static get styles(){return x`
|
|
371
|
-
:host {
|
|
372
|
-
line-height: 0;
|
|
373
|
-
}
|
|
370
|
+
`}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;let s=0,n=0;switch(this.position){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${yi})`}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())}}$i.elementDefinitions={"ft-typography":_e},$i.styles=gi,mi([o()],$i.prototype,"text",void 0),mi([o({type:Boolean})],$i.prototype,"manual",void 0),mi([o({type:Boolean})],$i.prototype,"inline",void 0),mi([o({type:Number})],$i.prototype,"delay",void 0),mi([o()],$i.prototype,"position",void 0),mi([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)],$i.prototype,"slotNodes",void 0),mi([r(".ft-tooltip--container")],$i.prototype,"container",void 0),mi([r("slot")],$i.prototype,"target",void 0),mi([r(".ft-tooltip")],$i.prototype,"tooltip",void 0),mi([r(".ft-tooltip--content")],$i.prototype,"tooltipContent",void 0),mi([s()],$i.prototype,"visible",void 0),c("ft-tooltip")($i);const wi={color:ut.extend("--ft-loader-color",bt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")},ki=x`
|
|
371
|
+
:host {
|
|
372
|
+
line-height: 0;
|
|
373
|
+
}
|
|
374
374
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
375
|
+
.ft-loader {
|
|
376
|
+
display: inline-block;
|
|
377
|
+
position: relative;
|
|
378
378
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
379
|
+
width: ${wi.size};
|
|
380
|
+
height: ${wi.size};
|
|
381
|
+
}
|
|
382
382
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
383
|
+
.ft-loader div {
|
|
384
|
+
position: absolute;
|
|
385
|
+
top: 37.5%;
|
|
386
|
+
width: 25%;
|
|
387
|
+
height: 25%;
|
|
388
|
+
border-radius: 50%;
|
|
389
|
+
background: ${wi.color};
|
|
390
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
391
|
+
}
|
|
392
392
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
393
|
+
.ft-loader div:nth-child(1) {
|
|
394
|
+
left: 2.5%;
|
|
395
|
+
animation: appear 0.6s infinite;
|
|
396
|
+
}
|
|
397
397
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
.ft-loader div:nth-child(2) {
|
|
399
|
+
left: 2.5%;
|
|
400
|
+
animation: move 0.6s infinite;
|
|
401
|
+
}
|
|
402
402
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
403
|
+
.ft-loader div:nth-child(3) {
|
|
404
|
+
left: 37.5%;
|
|
405
|
+
animation: move 0.6s infinite;
|
|
406
|
+
}
|
|
407
407
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
408
|
+
.ft-loader div:nth-child(4) {
|
|
409
|
+
left: 72.5%;
|
|
410
|
+
animation: disappear 0.6s infinite;
|
|
411
|
+
}
|
|
412
412
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
413
|
+
@keyframes appear {
|
|
414
|
+
0% {
|
|
415
|
+
transform: scale(0);
|
|
416
|
+
}
|
|
417
|
+
100% {
|
|
418
|
+
transform: scale(1);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
421
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
422
|
+
@keyframes disappear {
|
|
423
|
+
0% {
|
|
424
|
+
transform: scale(1);
|
|
425
|
+
}
|
|
426
|
+
100% {
|
|
427
|
+
transform: scale(0);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
430
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
431
|
+
@keyframes move {
|
|
432
|
+
0% {
|
|
433
|
+
transform: translate(0, 0);
|
|
434
|
+
}
|
|
435
|
+
100% {
|
|
436
|
+
transform: translate(calc(0.35 * ${wi.size}), 0);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
`;class Oi extends yt{render(){return V`
|
|
440
440
|
<div class="ft-loader">
|
|
441
441
|
<div></div>
|
|
442
442
|
<div></div>
|
|
443
443
|
<div></div>
|
|
444
444
|
<div></div>
|
|
445
445
|
</div>
|
|
446
|
-
`}}c("ft-loader")(
|
|
446
|
+
`}}Oi.styles=ki,c("ft-loader")(Oi);
|
|
447
447
|
/**
|
|
448
448
|
* @license
|
|
449
449
|
* Copyright 2017 Google LLC
|
|
450
450
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
451
451
|
*/
|
|
452
|
-
class
|
|
452
|
+
class Si extends Ve{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===J||null==t)return this._t=void 0,this.it=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Si.directiveName="unsafeHTML",Si.resultType=1;const Ci=Ke(Si);var Ni,Ei;!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=""}(Ni||(Ni={})),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=""}(Ei||(Ei={})),new Map([...["abw"].map((t=>[t,Ei.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,Ei.AUDIO])),...["avi"].map((t=>[t,Ei.AVI])),...["chm","xhs"].map((t=>[t,Ei.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,Ei.CODE])),...["csv"].map((t=>[t,Ei.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ei.DITA])),...["epub"].map((t=>[t,Ei.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ei.EXCEL])),...["flac"].map((t=>[t,Ei.FLAC])),...["gif"].map((t=>[t,Ei.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ei.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ei.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,Ei.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ei.JPEG])),...["json"].map((t=>[t,Ei.JSON])),...["m4a","m4p"].map((t=>[t,Ei.M4A])),...["mov","qt"].map((t=>[t,Ei.MOV])),...["mp3"].map((t=>[t,Ei.MP3])),...["mp4","m4v"].map((t=>[t,Ei.MP4])),...["ogg","oga"].map((t=>[t,Ei.OGG])),...["pdf","ps"].map((t=>[t,Ei.PDF])),...["png"].map((t=>[t,Ei.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ei.POWERPOINT])),...["rar"].map((t=>[t,Ei.RAR])),...["stp"].map((t=>[t,Ei.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ei.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,Ei.VIDEO])),...["wav"].map((t=>[t,Ei.WAV])),...["wma"].map((t=>[t,Ei.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ei.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ei.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ei.YAML])),...["zip"].map((t=>[t,Ei.ZIP]))]);const zi={size:ut.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ut.extend("--ft-icon-fluid-topics-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ut.extend("--ft-icon-file-format-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ut.extend("--ft-icon-material-font-family",ut.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:ut.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ri=x`
|
|
453
|
+
:host {
|
|
454
|
+
display: inline-block;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
:host, i.ft-icon {
|
|
458
|
+
width: ${zi.size};
|
|
459
|
+
height: ${zi.size};
|
|
460
|
+
text-align: center;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
i.ft-icon {
|
|
464
|
+
font-size: ${zi.size};
|
|
465
|
+
line-height: 1;
|
|
466
|
+
font-weight: normal;
|
|
467
|
+
text-transform: none;
|
|
468
|
+
font-style: normal;
|
|
469
|
+
font-variant: normal;
|
|
470
|
+
speak: none;
|
|
471
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
472
|
+
text-rendering: auto;
|
|
473
|
+
-webkit-font-smoothing: antialiased;
|
|
474
|
+
-moz-osx-font-smoothing: grayscale;
|
|
475
|
+
vertical-align: ${zi.verticalAlign};
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.ft-icon--fluid-topics {
|
|
479
|
+
font-family: ${zi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.ft-icon--file-format {
|
|
483
|
+
font-family: ${zi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.ft-icon--material {
|
|
487
|
+
font-family: ${zi.materialFontFamily}, "Material Icons", sans-serif;
|
|
488
|
+
}
|
|
489
|
+
`;var Mi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Mi||(Mi={}));var Bi=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 Fi extends yt{constructor(){super(...arguments),this.variant=Mi.fluid_topics,this.resolvedIcon=J}render(){const t="material"!==this.variant||this.value;return V`
|
|
453
490
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
454
|
-
${
|
|
491
|
+
${Ci(this.resolvedIcon)}
|
|
455
492
|
<slot ?hidden=${t}></slot>
|
|
456
493
|
</i>
|
|
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:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
494
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Mi.file_format:this.resolvedIcon=null!==(t=Ei[i.toUpperCase()])&&void 0!==t?t:i;break;case Mi.fluid_topics:this.resolvedIcon=null!==(e=Ni[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||J}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Fi.elementDefinitions={},Fi.styles=Ri,Bi([o()],Fi.prototype,"variant",void 0),Bi([o()],Fi.prototype,"value",void 0),Bi([s()],Fi.prototype,"resolvedIcon",void 0),Bi([r("slot")],Fi.prototype,"slottedContent",void 0),c("ft-icon")(Fi);const ji=ut.extend("--ft-button-color",bt.colorPrimary),Ui={backgroundColor:ut.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",bt.borderRadiusL),color:ji,fontSize:ut.extend("--ft-button-font-size",Ee.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",ji),opacityDisabled:ut.external(bt.colorOpacityDisabled,"Design system")},Li=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",bt.colorOnPrimary)),Di={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",bt.colorPrimary)),color:Li,rippleColor:ut.extend("--ft-button-primary-ripple-color",Li)},Ti=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",bt.borderRadiusM)),Ai=[gt,x`
|
|
458
495
|
:host {
|
|
459
496
|
display: inline-block;
|
|
497
|
+
max-width: 100%;
|
|
498
|
+
pointer-events: none;
|
|
460
499
|
}
|
|
461
500
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
text-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
i.ft-icon {
|
|
469
|
-
font-size: ${Ni.size};
|
|
470
|
-
line-height: 1;
|
|
471
|
-
font-weight: normal;
|
|
472
|
-
text-transform: none;
|
|
473
|
-
font-style: normal;
|
|
474
|
-
font-variant: normal;
|
|
475
|
-
speak: none;
|
|
476
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
477
|
-
text-rendering: auto;
|
|
478
|
-
-webkit-font-smoothing: antialiased;
|
|
479
|
-
-moz-osx-font-smoothing: grayscale;
|
|
480
|
-
vertical-align: ${Ni.verticalAlign};
|
|
501
|
+
button {
|
|
502
|
+
box-shadow: 0px 0px 0px transparent;
|
|
503
|
+
border: 0px solid transparent;
|
|
504
|
+
text-shadow: 0px 0px 0px transparent;
|
|
505
|
+
font-size: ${Ui.fontSize};
|
|
481
506
|
}
|
|
482
507
|
|
|
483
|
-
|
|
484
|
-
|
|
508
|
+
button:hover {
|
|
509
|
+
box-shadow: 0px 0px 0px transparent;
|
|
510
|
+
border: 0px solid transparent;
|
|
511
|
+
text-shadow: 0px 0px 0px transparent;
|
|
485
512
|
}
|
|
486
513
|
|
|
487
|
-
|
|
488
|
-
|
|
514
|
+
button:active {
|
|
515
|
+
outline: none;
|
|
516
|
+
border: none;
|
|
489
517
|
}
|
|
490
518
|
|
|
491
|
-
|
|
492
|
-
|
|
519
|
+
button:focus {
|
|
520
|
+
outline: 0;
|
|
493
521
|
}
|
|
494
|
-
`,Ci([o()],Ei.prototype,"variant",void 0),Ci([o()],Ei.prototype,"value",void 0),Ci([s()],Ei.prototype,"resolvedIcon",void 0),Ci([r("slot")],Ei.prototype,"slottedContent",void 0),c("ft-icon")(Ei);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 Ri=ut.extend("--ft-button-color",bt.colorPrimary),Mi={backgroundColor:ut.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",bt.borderRadiusL),color:Ri,fontSize:ut.extend("--ft-button-font-size",ze.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",Ri),opacityDisabled:ut.external(bt.colorOpacityDisabled,"Design system")},Bi=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",bt.colorOnPrimary)),Fi={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",bt.colorPrimary)),color:Bi,rippleColor:ut.extend("--ft-button-primary-ripple-color",Bi)},ji=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",bt.borderRadiusM));class Ui extends yt{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.iconVariant=Si.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[gt,x`
|
|
495
|
-
:host {
|
|
496
|
-
display: inline-block;
|
|
497
|
-
max-width: 100%;
|
|
498
|
-
pointer-events: none;
|
|
499
|
-
}
|
|
500
522
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
text-shadow: 0px 0px 0px transparent;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
button:active {
|
|
515
|
-
outline: none;
|
|
516
|
-
border: none;
|
|
517
|
-
}
|
|
523
|
+
.ft-button {
|
|
524
|
+
position: relative;
|
|
525
|
+
display: flex;
|
|
526
|
+
justify-content: center;
|
|
527
|
+
align-items: center;
|
|
528
|
+
width: 100%;
|
|
529
|
+
overflow: hidden;
|
|
530
|
+
box-sizing: border-box;
|
|
531
|
+
border: none;
|
|
532
|
+
pointer-events: auto;
|
|
518
533
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
534
|
+
--ft-button-internal-line-height: calc(${Ui.fontSize} + 2px);
|
|
535
|
+
--ft-button-internal-color: ${Ui.color};
|
|
536
|
+
${vt(zi.size,Ui.iconSize)};
|
|
537
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
538
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
539
|
+
${vt(oi.color,Ui.rippleColor)};
|
|
540
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ui.iconSize});
|
|
522
541
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
overflow: hidden;
|
|
530
|
-
box-sizing: border-box;
|
|
531
|
-
border: none;
|
|
532
|
-
pointer-events: auto;
|
|
533
|
-
|
|
534
|
-
--ft-button-internal-line-height: calc(${Mi.fontSize} + 2px);
|
|
535
|
-
--ft-button-internal-color: ${Mi.color};
|
|
536
|
-
${vt(Ni.size,Mi.iconSize)};
|
|
537
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
538
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
539
|
-
${vt(oi.color,Mi.rippleColor)};
|
|
540
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Mi.iconSize});
|
|
541
|
-
|
|
542
|
-
border-radius: ${Mi.borderRadius};
|
|
543
|
-
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
544
|
-
background-color: ${Mi.backgroundColor};
|
|
545
|
-
color: var(--ft-button-internal-color);
|
|
546
|
-
-webkit-mask-image: radial-gradient(white, black);
|
|
547
|
-
}
|
|
542
|
+
border-radius: ${Ui.borderRadius};
|
|
543
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
544
|
+
background-color: ${Ui.backgroundColor};
|
|
545
|
+
color: var(--ft-button-internal-color);
|
|
546
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
547
|
+
}
|
|
548
548
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
549
|
+
.ft-button:not([disabled]):hover {
|
|
550
|
+
cursor: pointer;
|
|
551
|
+
}
|
|
552
552
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
553
|
+
.ft-button--dense {
|
|
554
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
555
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
556
|
+
border-radius: ${Ti};
|
|
557
|
+
}
|
|
558
558
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
559
|
+
.ft-button--round {
|
|
560
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
561
|
+
}
|
|
562
562
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
563
|
+
.ft-button[disabled] {
|
|
564
|
+
filter: grayscale(1);
|
|
565
|
+
opacity: ${Ui.opacityDisabled};
|
|
566
|
+
}
|
|
567
567
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
568
|
+
.ft-button.ft-button--primary {
|
|
569
|
+
background-color: ${Di.backgroundColor};
|
|
570
|
+
--ft-button-internal-color: ${Di.color};
|
|
571
|
+
${vt(oi.color,Di.rippleColor)};
|
|
572
|
+
}
|
|
573
573
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
574
|
+
.ft-button.ft-button--outlined {
|
|
575
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
576
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
577
|
+
}
|
|
578
578
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
579
|
+
.ft-button:focus {
|
|
580
|
+
outline: none;
|
|
581
|
+
}
|
|
582
582
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
583
|
+
.ft-button--label {
|
|
584
|
+
position: relative;
|
|
585
|
+
overflow: hidden;
|
|
586
|
+
white-space: nowrap;
|
|
587
|
+
text-overflow: ellipsis;
|
|
588
|
+
display: block;
|
|
589
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
590
|
+
${vt(Ee.fontSize,"1em")};
|
|
591
|
+
${vt(Ee.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
592
|
+
}
|
|
593
593
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
594
|
+
.ft-button--safari-fix .ft-button--label {
|
|
595
|
+
margin-right: 0;
|
|
596
|
+
}
|
|
597
597
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
598
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
599
|
+
content: "\\0000a0";
|
|
600
|
+
display: inline-block;
|
|
601
|
+
width: 0;
|
|
602
|
+
}
|
|
603
603
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
604
|
+
.ft-button--label[hidden] {
|
|
605
|
+
display: none;
|
|
606
|
+
}
|
|
607
607
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
608
|
+
ft-icon {
|
|
609
|
+
flex-shrink: 0;
|
|
610
|
+
position: relative;
|
|
611
|
+
}
|
|
612
612
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
613
|
+
.ft-button--label[hidden] + ft-icon {
|
|
614
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
615
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
616
|
+
}
|
|
617
617
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
618
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
619
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
620
|
+
order: -1;
|
|
621
|
+
}
|
|
622
622
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
623
|
+
ft-loader {
|
|
624
|
+
${vt(wi.size,Ui.iconSize)};
|
|
625
|
+
${vt(wi.color,"var(--ft-button-internal-color)")};
|
|
626
|
+
}
|
|
627
|
+
`];var Pi=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 _i extends yt{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.iconVariant=Mi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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":kt,"ft-no-text-select":!0};return this.addTooltipIfNeeded(V`
|
|
628
628
|
<button part="button"
|
|
629
|
-
class="${
|
|
629
|
+
class="${ei(t)}"
|
|
630
630
|
aria-label="${this.getLabel()}"
|
|
631
631
|
?disabled=${this.isDisabled()}>
|
|
632
632
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -646,8 +646,85 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
646
646
|
</ft-tooltip>
|
|
647
647
|
`}resolveIcon(){return this.loading?V`
|
|
648
648
|
<ft-loader></ft-loader> `:this.icon?V`
|
|
649
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:J}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}}
|
|
650
|
-
|
|
649
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:J}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}}_i.elementDefinitions={"ft-ripple":di,"ft-tooltip":$i,"ft-typography":_e,"ft-icon":Fi,"ft-loader":Oi},_i.styles=Ai,Pi([o({type:Boolean})],_i.prototype,"primary",void 0),Pi([o({type:Boolean})],_i.prototype,"outlined",void 0),Pi([o({type:Boolean})],_i.prototype,"disabled",void 0),Pi([o({type:Boolean})],_i.prototype,"dense",void 0),Pi([o({type:Boolean})],_i.prototype,"round",void 0),Pi([o({type:String})],_i.prototype,"label",void 0),Pi([o({type:String})],_i.prototype,"icon",void 0),Pi([o({type:String})],_i.prototype,"iconVariant",void 0),Pi([o({type:Boolean})],_i.prototype,"trailingIcon",void 0),Pi([o({type:Boolean})],_i.prototype,"loading",void 0),Pi([o({type:String})],_i.prototype,"tooltipPosition",void 0),Pi([o({type:Boolean})],_i.prototype,"hideTooltip",void 0),Pi([r(".ft-button")],_i.prototype,"button",void 0),Pi([r(".ft-button--label slot")],_i.prototype,"slottedContent",void 0),c("ft-button")(_i);const Ii=ut.extend("--ft-checkbox-text-color",bt.colorOnSurfaceHigh),Wi=ut.external(bt.colorPrimary,"Design system"),Hi=ut.external(bt.colorOnPrimary,"Design system"),Ki=ut.extend("--ft-checkbox-border-color",bt.colorOnSurfaceMedium),Vi=ut.external(bt.colorOnSurfaceDisabled,"Design system"),Zi=x`
|
|
650
|
+
* {
|
|
651
|
+
box-sizing: border-box;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.ft-checkbox {
|
|
655
|
+
box-sizing: border-box;
|
|
656
|
+
color: ${Ii};
|
|
657
|
+
|
|
658
|
+
display: inline-flex;
|
|
659
|
+
align-items: center;
|
|
660
|
+
gap: 4px;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.ft-checkbox--disabled {
|
|
664
|
+
color: ${Vi};
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
input {
|
|
668
|
+
opacity: 0;
|
|
669
|
+
position: absolute;
|
|
670
|
+
width: 40px;
|
|
671
|
+
height: 40px;
|
|
672
|
+
margin: 0;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.ft-checkbox--box-container {
|
|
676
|
+
position: relative;
|
|
677
|
+
width: 40px;
|
|
678
|
+
height: 40px;
|
|
679
|
+
|
|
680
|
+
display: flex;
|
|
681
|
+
justify-content: center;
|
|
682
|
+
align-items: center;
|
|
683
|
+
flex-shrink: 0;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.ft-checkbox--box {
|
|
687
|
+
display: flex;
|
|
688
|
+
border: 2px solid ${Ki};
|
|
689
|
+
border-radius: 2px;
|
|
690
|
+
|
|
691
|
+
width: 18px;
|
|
692
|
+
height: 18px;
|
|
693
|
+
|
|
694
|
+
color: ${Hi};
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
699
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
700
|
+
border-color: ${Wi};
|
|
701
|
+
background-color: ${Wi};
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
705
|
+
border-color: ${Vi};
|
|
706
|
+
background-color: transparent;
|
|
707
|
+
color: ${Vi};
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.ft-checkbox--checkmark {
|
|
711
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
712
|
+
opacity: 0;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.ft-checkbox--checkmark-path {
|
|
716
|
+
stroke-dashoffset: 0;
|
|
717
|
+
stroke: currentcolor;
|
|
718
|
+
stroke-width: 3px;
|
|
719
|
+
stroke-dasharray: 30;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
723
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
724
|
+
opacity: 1;
|
|
725
|
+
}
|
|
726
|
+
`;var Ji=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 qi extends yt{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 V`
|
|
727
|
+
<label class="${ei(t)}" for="checkbox-input">
|
|
651
728
|
<div class="ft-checkbox--box-container">
|
|
652
729
|
<ft-ripple
|
|
653
730
|
?disabled=${this.disabled}
|
|
@@ -672,85 +749,87 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
672
749
|
<slot></slot>
|
|
673
750
|
</ft-typography>
|
|
674
751
|
</label>
|
|
675
|
-
`}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)}}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
752
|
+
`}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)}}qi.elementDefinitions={"ft-ripple":di,"ft-typography":_e},qi.styles=Zi,Ji([o()],qi.prototype,"name",void 0),Ji([o({type:Boolean,reflect:!0})],qi.prototype,"checked",void 0),Ji([o({type:Boolean})],qi.prototype,"indeterminate",void 0),Ji([o({type:Boolean})],qi.prototype,"disabled",void 0),Ji([r(".ft-checkbox")],qi.prototype,"container",void 0),Ji([r("ft-ripple")],qi.prototype,"ripple",void 0),c("ft-checkbox")(qi);const Xi=ut.extend("--ft-radio-text-color",bt.colorOnSurfaceHigh),Yi=ut.external(bt.colorPrimary,"Design system"),Gi=(ut.external(bt.colorOnPrimary,"Design system"),ut.extend("--ft-radio-border-color",bt.colorOnSurfaceMedium)),Qi=ut.external(bt.colorOnSurfaceDisabled,"Design system"),to=x`
|
|
753
|
+
* {
|
|
754
|
+
box-sizing: border-box;
|
|
755
|
+
}
|
|
679
756
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
757
|
+
.ft-radio {
|
|
758
|
+
box-sizing: border-box;
|
|
759
|
+
color: ${Xi};
|
|
683
760
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
761
|
+
display: inline-flex;
|
|
762
|
+
align-items: center;
|
|
763
|
+
gap: 4px;
|
|
764
|
+
}
|
|
688
765
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
766
|
+
.ft-radio--disabled {
|
|
767
|
+
color: ${Qi};
|
|
768
|
+
}
|
|
692
769
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
770
|
+
input {
|
|
771
|
+
opacity: 0;
|
|
772
|
+
position: absolute;
|
|
773
|
+
width: 40px;
|
|
774
|
+
height: 40px;
|
|
775
|
+
margin: 0;
|
|
776
|
+
}
|
|
700
777
|
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
778
|
+
.ft-radio--box-container {
|
|
779
|
+
position: relative;
|
|
780
|
+
width: 40px;
|
|
781
|
+
height: 40px;
|
|
705
782
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
783
|
+
display: flex;
|
|
784
|
+
justify-content: center;
|
|
785
|
+
align-items: center;
|
|
786
|
+
flex-shrink: 0;
|
|
787
|
+
}
|
|
711
788
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
border-radius: 2px;
|
|
789
|
+
.ft-radio--box {
|
|
790
|
+
border: 2px solid ${Gi};
|
|
791
|
+
border-radius: 50%;
|
|
716
792
|
|
|
717
|
-
|
|
718
|
-
|
|
793
|
+
display: flex;
|
|
794
|
+
justify-content: center;
|
|
795
|
+
align-items: center;
|
|
719
796
|
|
|
720
|
-
|
|
721
|
-
|
|
797
|
+
width: 20px;
|
|
798
|
+
height: 20px;
|
|
799
|
+
}
|
|
722
800
|
|
|
801
|
+
.ft-radio--box:after {
|
|
802
|
+
content: " ";
|
|
803
|
+
background-color: ${Yi};
|
|
723
804
|
|
|
724
|
-
|
|
725
|
-
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
726
|
-
border-color: ${Ti};
|
|
727
|
-
background-color: ${Ti};
|
|
728
|
-
}
|
|
805
|
+
border-radius: 50%;
|
|
729
806
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
background-color: transparent;
|
|
733
|
-
color: ${_i};
|
|
734
|
-
}
|
|
807
|
+
width: 12px;
|
|
808
|
+
height: 12px;
|
|
735
809
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
810
|
+
transform: scale(0);
|
|
811
|
+
transition: transform 100ms ease;
|
|
812
|
+
}
|
|
740
813
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
stroke-width: 3px;
|
|
745
|
-
stroke-dasharray: 30;
|
|
746
|
-
}
|
|
814
|
+
.ft-radio--checked .ft-radio--box {
|
|
815
|
+
border-color: ${Yi};
|
|
816
|
+
}
|
|
747
817
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
818
|
+
|
|
819
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
820
|
+
transform: scale(1);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.ft-radio--disabled .ft-radio--box {
|
|
824
|
+
border-color: ${Qi};
|
|
825
|
+
background-color: transparent;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
829
|
+
background-color: ${Qi};
|
|
830
|
+
}
|
|
831
|
+
`;var eo=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 io extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class oo extends yt{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 V`
|
|
832
|
+
<div class="${ei(t)}">
|
|
754
833
|
<div class="ft-radio--box-container">
|
|
755
834
|
<ft-ripple
|
|
756
835
|
?disabled=${this.disabled}
|
|
@@ -774,96 +853,83 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
774
853
|
</ft-typography>
|
|
775
854
|
</label>
|
|
776
855
|
</div>
|
|
777
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
color: ${Zi};
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
input {
|
|
796
|
-
opacity: 0;
|
|
797
|
-
position: absolute;
|
|
798
|
-
width: 40px;
|
|
799
|
-
height: 40px;
|
|
800
|
-
margin: 0;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
.ft-radio--box-container {
|
|
804
|
-
position: relative;
|
|
805
|
-
width: 40px;
|
|
806
|
-
height: 40px;
|
|
807
|
-
|
|
808
|
-
display: flex;
|
|
809
|
-
justify-content: center;
|
|
810
|
-
align-items: center;
|
|
811
|
-
flex-shrink: 0;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
.ft-radio--box {
|
|
815
|
-
border: 2px solid ${Vi};
|
|
816
|
-
border-radius: 50%;
|
|
817
|
-
|
|
818
|
-
display: flex;
|
|
819
|
-
justify-content: center;
|
|
820
|
-
align-items: center;
|
|
856
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new io(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 io(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}oo.elementDefinitions={"ft-ripple":di,"ft-typography":_e},oo.styles=to,eo([o()],oo.prototype,"value",void 0),eo([o()],oo.prototype,"name",void 0),eo([o({type:Boolean,reflect:!0})],oo.prototype,"checked",void 0),eo([o({type:Boolean})],oo.prototype,"disabled",void 0),eo([r(".ft-radio")],oo.prototype,"container",void 0),eo([r("ft-ripple")],oo.prototype,"ripple",void 0),eo([r("input")],oo.prototype,"input",void 0);const so=x`
|
|
857
|
+
:host {
|
|
858
|
+
display: contents;
|
|
859
|
+
}
|
|
860
|
+
`;var no=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 ro extends yt{constructor(){super(...arguments),this.name=""}render(){return V`
|
|
861
|
+
<slot @slotchange=${this.onSlotChange}
|
|
862
|
+
@change=${this.onChange}
|
|
863
|
+
@keydown=${this.onKeyDown}
|
|
864
|
+
@focusin=${this.focusCurrentValue}
|
|
865
|
+
></slot>
|
|
866
|
+
`}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})),this.focusCurrentValue()}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))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}ro.elementDefinitions={},ro.styles=so,no([o()],ro.prototype,"name",void 0),no([h()],ro.prototype,"radioButtons",void 0),c("ft-radio")(oo),c("ft-radio-group")(ro);const lo={borderRadiusM:ut.external(bt.borderRadiusM,"Design system"),colorOutline:ut.external(bt.colorOutline,"Design system"),colorOnSurface:ut.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(bt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ut.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ut.external(bt.colorPrimary,"Design system"),colorOnPrimary:ut.external(bt.colorOnPrimary,"Design system"),fontFamily:ut.external(he.fontFamily,"Body2 typography"),fontSize:ut.external(he.fontSize,"Body2 typography"),fontWeight:ut.external(he.fontWeight,"Body2 typography"),letterSpacing:ut.external(he.letterSpacing,"Body2 typography"),lineHeight:ut.external(he.lineHeight,"Body2 typography"),textTransform:ut.external(he.textTransform,"Body2 typography")},ao=x`
|
|
867
|
+
.ft-filter-level--container {
|
|
868
|
+
display: flex;
|
|
869
|
+
flex-direction: column;
|
|
870
|
+
}
|
|
821
871
|
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
872
|
+
.ft-filter-level--container > * {
|
|
873
|
+
padding: 0 10px;
|
|
874
|
+
}
|
|
825
875
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
876
|
+
.ft-filter-level--go-back {
|
|
877
|
+
flex-shrink: 0;
|
|
878
|
+
text-decoration: none;
|
|
879
|
+
position: relative;
|
|
880
|
+
border-radius: ${lo.borderRadiusM};
|
|
881
|
+
overflow: hidden;
|
|
882
|
+
display: flex;
|
|
883
|
+
align-items: center;
|
|
884
|
+
padding: 4px 4px;
|
|
885
|
+
gap: 4px;
|
|
886
|
+
cursor: pointer;
|
|
887
|
+
color: ${lo.colorOnSurface};
|
|
888
|
+
}
|
|
829
889
|
|
|
830
|
-
|
|
890
|
+
.ft-filter-level--go-back:focus {
|
|
891
|
+
outline: none;
|
|
892
|
+
}
|
|
831
893
|
|
|
832
|
-
|
|
833
|
-
|
|
894
|
+
.ft-filter-level--go-back ft-icon {
|
|
895
|
+
flex-shrink: 0;
|
|
896
|
+
}
|
|
834
897
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
898
|
+
.ft-filter-level--go-back ft-typography {
|
|
899
|
+
display: block;
|
|
900
|
+
flex-grow: 1;
|
|
901
|
+
flex-shrink: 0;
|
|
902
|
+
}
|
|
838
903
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
904
|
+
.ft-filter-level--option {
|
|
905
|
+
display: flex;
|
|
906
|
+
align-items: center;
|
|
907
|
+
max-width: 100%;
|
|
908
|
+
}
|
|
842
909
|
|
|
910
|
+
.ft-filter-level--option ft-button {
|
|
911
|
+
margin-right: -10px;
|
|
912
|
+
flex-shrink: 0;
|
|
913
|
+
}
|
|
843
914
|
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
915
|
+
ft-button {
|
|
916
|
+
${vt(Ui.color,lo.colorOnSurface)};
|
|
917
|
+
}
|
|
847
918
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
919
|
+
ft-radio, ft-checkbox {
|
|
920
|
+
flex-shrink: 1;
|
|
921
|
+
flex-grow: 1;
|
|
922
|
+
display: flex;
|
|
923
|
+
max-width: calc(100% + 10px);
|
|
924
|
+
margin-left: -10px;
|
|
925
|
+
word-break: break-word;
|
|
926
|
+
}
|
|
852
927
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
@change=${this.onChange}
|
|
859
|
-
@keydown=${this.onKeyDown}
|
|
860
|
-
@focusin=${this.focusCurrentValue}
|
|
861
|
-
></slot>
|
|
862
|
-
`}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})),this.focusCurrentValue()}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))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Yi.elementDefinitions={},Yi.styles=x`
|
|
863
|
-
:host {
|
|
864
|
-
display: contents;
|
|
865
|
-
}
|
|
866
|
-
`,Xi([o()],Yi.prototype,"name",void 0),Xi([h()],Yi.prototype,"radioButtons",void 0),c("ft-radio")(qi),c("ft-radio-group")(Yi);var Gi=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 Qi={borderRadiusM:ut.external(bt.borderRadiusM,"Design system"),colorOutline:ut.external(bt.colorOutline,"Design system"),colorOnSurface:ut.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(bt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ut.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ut.external(bt.colorPrimary,"Design system"),colorOnPrimary:ut.external(bt.colorOnPrimary,"Design system"),fontFamily:ut.external(ce.fontFamily,"Body2 typography"),fontSize:ut.external(ce.fontSize,"Body2 typography"),fontWeight:ut.external(ce.fontWeight,"Body2 typography"),letterSpacing:ut.external(ce.letterSpacing,"Body2 typography"),lineHeight:ut.external(ce.lineHeight,"Body2 typography"),textTransform:ut.external(ce.textTransform,"Body2 typography")};class to extends yt{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 V`
|
|
928
|
+
.ft-filter-level--no-values {
|
|
929
|
+
margin: 10px 0;
|
|
930
|
+
color: ${lo.colorOnSurfaceMedium};
|
|
931
|
+
}
|
|
932
|
+
`;var ho=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 co extends yt{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 V`
|
|
867
933
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
868
934
|
${null==this.parent?null:V`
|
|
869
935
|
<div tabindex="0"
|
|
@@ -882,7 +948,7 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
882
948
|
${this.noValuesLabel}
|
|
883
949
|
</ft-typography>
|
|
884
950
|
`:J}
|
|
885
|
-
${
|
|
951
|
+
${ti(e,(t=>t.value),(t=>{var e;return V`
|
|
886
952
|
<div class="ft-filter-level--option" part="options">
|
|
887
953
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
888
954
|
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?J:V`
|
|
@@ -912,7 +978,7 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
912
978
|
data-value="${t.value}"
|
|
913
979
|
.checked=${t.selected}
|
|
914
980
|
.disabled=${this.disabled}
|
|
915
|
-
.indeterminate=${
|
|
981
|
+
.indeterminate=${Ie(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
916
982
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
917
983
|
${t.label}
|
|
918
984
|
</ft-checkbox>
|
|
@@ -927,73 +993,132 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
927
993
|
@change=${t=>t.stopPropagation()}>
|
|
928
994
|
${t.label}
|
|
929
995
|
</ft-radio>
|
|
930
|
-
`}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}))}}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
996
|
+
`}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}))}}co.elementDefinitions={"ft-button":_i,"ft-ripple":di,"ft-typography":_e,"ft-checkbox":qi,"ft-icon":Fi,"ft-radio":oo},co.styles=ao,ho([o({type:String})],co.prototype,"id",void 0),ho([o({type:Object})],co.prototype,"parent",void 0),ho([o({type:Array})],co.prototype,"options",void 0),ho([o({type:Boolean})],co.prototype,"multivalued",void 0),ho([o({type:Boolean})],co.prototype,"disabled",void 0),ho([o({type:Boolean})],co.prototype,"hideSelectedOptions",void 0),ho([o({type:Boolean})],co.prototype,"preventNavigation",void 0),ho([o({type:String})],co.prototype,"filter",void 0),ho([o({type:String})],co.prototype,"moreValuesButtonLabel",void 0),ho([o({type:String})],co.prototype,"noValuesLabel",void 0),ho([o({type:Number})],co.prototype,"displayedValuesLimit",void 0),ho([r(".ft-filter-level--container")],co.prototype,"container",void 0),ho([s()],co.prototype,"displayedPages",void 0);const po={buttonsColor:ut.extend("--ft-snap-scroll-buttons-color",bt.colorPrimary),buttonsZIndex:ut.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ut.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ut.external(bt.colorSurface,"Design system")},fo=x`
|
|
997
|
+
.ft-snap-scroll {
|
|
998
|
+
box-sizing: border-box;
|
|
999
|
+
position: relative;
|
|
1000
|
+
display: flex;
|
|
935
1001
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
}
|
|
1002
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
1003
|
+
}
|
|
939
1004
|
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
overflow: hidden;
|
|
946
|
-
display: flex;
|
|
947
|
-
align-items: center;
|
|
948
|
-
padding: 4px 4px;
|
|
949
|
-
gap: 4px;
|
|
950
|
-
cursor: pointer;
|
|
951
|
-
color: ${Qi.colorOnSurface};
|
|
952
|
-
}
|
|
1005
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
1006
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
1007
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1008
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1009
|
+
}
|
|
953
1010
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1011
|
+
.ft-snap-scroll,
|
|
1012
|
+
.ft-snap-scroll--content {
|
|
1013
|
+
overflow: hidden;
|
|
1014
|
+
}
|
|
957
1015
|
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1016
|
+
.ft-snap-scroll--limit-size,
|
|
1017
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1018
|
+
width: 100%;
|
|
1019
|
+
height: 100%;
|
|
1020
|
+
}
|
|
961
1021
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1022
|
+
.ft-snap-scroll--content {
|
|
1023
|
+
flex-grow: 1;
|
|
1024
|
+
flex-shrink: 1;
|
|
1025
|
+
box-sizing: border-box;
|
|
1026
|
+
scroll-snap-align: start;
|
|
1027
|
+
display: flex;
|
|
1028
|
+
flex-wrap: nowrap;
|
|
1029
|
+
align-items: flex-start;
|
|
1030
|
+
justify-content: flex-start;
|
|
1031
|
+
gap: ${po.gap};
|
|
1032
|
+
}
|
|
967
1033
|
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
max-width: 100%;
|
|
972
|
-
}
|
|
1034
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1035
|
+
display: none;
|
|
1036
|
+
}
|
|
973
1037
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1038
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1039
|
+
-ms-overflow-style: none;
|
|
1040
|
+
scrollbar-width: none;
|
|
1041
|
+
}
|
|
978
1042
|
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1043
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
1044
|
+
flex-shrink: 0;
|
|
1045
|
+
flex-grow: 1;
|
|
1046
|
+
max-height: 100%;
|
|
1047
|
+
max-width: 100%;
|
|
1048
|
+
}
|
|
982
1049
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
max-width: calc(100% + 10px);
|
|
988
|
-
margin-left: -10px;
|
|
989
|
-
word-break: break-word;
|
|
990
|
-
}
|
|
1050
|
+
.ft-snap-scroll--horizontal,
|
|
1051
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1052
|
+
width: 100%;
|
|
1053
|
+
}
|
|
991
1054
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1055
|
+
.ft-snap-scroll--vertical,
|
|
1056
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1057
|
+
height: 100%;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1061
|
+
flex-direction: row;
|
|
1062
|
+
overflow-x: auto;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1066
|
+
flex-direction: column;
|
|
1067
|
+
overflow-y: auto;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.ft-snap-scroll--previous,
|
|
1071
|
+
.ft-snap-scroll--next {
|
|
1072
|
+
position: absolute;
|
|
1073
|
+
display: flex;
|
|
1074
|
+
z-index: ${po.buttonsZIndex};
|
|
1075
|
+
opacity: 1;
|
|
1076
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1077
|
+
${vt(Ui.backgroundColor,"transparent")};
|
|
1078
|
+
${vt(Ui.color,po.buttonsColor)};
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.ft-snap-scroll--previous[hidden],
|
|
1082
|
+
.ft-snap-scroll--next[hidden] {
|
|
1083
|
+
z-index: -1;
|
|
1084
|
+
opacity: 0;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1088
|
+
top: 0;
|
|
1089
|
+
left: -1px;
|
|
1090
|
+
bottom: 0;
|
|
1091
|
+
background: linear-gradient(to right, ${po.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1095
|
+
top: -1px;
|
|
1096
|
+
left: 0;
|
|
1097
|
+
right: 0;
|
|
1098
|
+
background: linear-gradient(to bottom, ${po.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1102
|
+
top: 0;
|
|
1103
|
+
right: -1px;
|
|
1104
|
+
bottom: 0;
|
|
1105
|
+
background: linear-gradient(to left, ${po.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1109
|
+
left: 0;
|
|
1110
|
+
right: 0;
|
|
1111
|
+
bottom: -1px;
|
|
1112
|
+
background: linear-gradient(to top, ${po.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1116
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1117
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1118
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1119
|
+
background-color: ${po.colorSurface};
|
|
1120
|
+
}
|
|
1121
|
+
`;var uo=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 vo extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class bo extends yt{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=ei({"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":kt}),e=this.controls&&this.withScroll;return V`
|
|
997
1122
|
<div part="container" class="${t}">
|
|
998
1123
|
<ft-button
|
|
999
1124
|
class="ft-snap-scroll--previous"
|
|
@@ -1017,201 +1142,7 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1017
1142
|
@click=${this.next}
|
|
1018
1143
|
></ft-button>
|
|
1019
1144
|
</div>
|
|
1020
|
-
`}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
|
|
1021
|
-
.ft-snap-scroll {
|
|
1022
|
-
box-sizing: border-box;
|
|
1023
|
-
position: relative;
|
|
1024
|
-
display: flex;
|
|
1025
|
-
|
|
1026
|
-
--ft-snap-scroll-transparent-color: transparent;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
1030
|
-
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
1031
|
-
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1032
|
-
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
.ft-snap-scroll,
|
|
1036
|
-
.ft-snap-scroll--content {
|
|
1037
|
-
overflow: hidden;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
.ft-snap-scroll--limit-size,
|
|
1041
|
-
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1042
|
-
width: 100%;
|
|
1043
|
-
height: 100%;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
.ft-snap-scroll--content {
|
|
1047
|
-
flex-grow: 1;
|
|
1048
|
-
flex-shrink: 1;
|
|
1049
|
-
box-sizing: border-box;
|
|
1050
|
-
scroll-snap-align: start;
|
|
1051
|
-
display: flex;
|
|
1052
|
-
flex-wrap: nowrap;
|
|
1053
|
-
align-items: flex-start;
|
|
1054
|
-
justify-content: flex-start;
|
|
1055
|
-
gap: ${io.gap};
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1059
|
-
display: none;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1063
|
-
-ms-overflow-style: none;
|
|
1064
|
-
scrollbar-width: none;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.ft-snap-scroll--content::slotted(*) {
|
|
1068
|
-
flex-shrink: 0;
|
|
1069
|
-
flex-grow: 1;
|
|
1070
|
-
max-height: 100%;
|
|
1071
|
-
max-width: 100%;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
.ft-snap-scroll--horizontal,
|
|
1075
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1076
|
-
width: 100%;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
.ft-snap-scroll--vertical,
|
|
1080
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1081
|
-
height: 100%;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1085
|
-
flex-direction: row;
|
|
1086
|
-
overflow-x: auto;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1090
|
-
flex-direction: column;
|
|
1091
|
-
overflow-y: auto;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
.ft-snap-scroll--previous,
|
|
1095
|
-
.ft-snap-scroll--next {
|
|
1096
|
-
position: absolute;
|
|
1097
|
-
display: flex;
|
|
1098
|
-
z-index: ${io.buttonsZIndex};
|
|
1099
|
-
opacity: 1;
|
|
1100
|
-
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1101
|
-
${vt(Mi.backgroundColor,"transparent")};
|
|
1102
|
-
${vt(Mi.color,io.buttonsColor)};
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
.ft-snap-scroll--previous[hidden],
|
|
1106
|
-
.ft-snap-scroll--next[hidden] {
|
|
1107
|
-
z-index: -1;
|
|
1108
|
-
opacity: 0;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1112
|
-
top: 0;
|
|
1113
|
-
left: -1px;
|
|
1114
|
-
bottom: 0;
|
|
1115
|
-
background: linear-gradient(to right, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1119
|
-
top: -1px;
|
|
1120
|
-
left: 0;
|
|
1121
|
-
right: 0;
|
|
1122
|
-
background: linear-gradient(to bottom, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1126
|
-
top: 0;
|
|
1127
|
-
right: -1px;
|
|
1128
|
-
bottom: 0;
|
|
1129
|
-
background: linear-gradient(to left, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1133
|
-
left: 0;
|
|
1134
|
-
right: 0;
|
|
1135
|
-
bottom: -1px;
|
|
1136
|
-
background: linear-gradient(to top, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1140
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1141
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1142
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1143
|
-
background-color: ${io.colorSurface};
|
|
1144
|
-
}
|
|
1145
|
-
`,eo([o({type:Boolean})],so.prototype,"horizontal",void 0),eo([o({type:Boolean})],so.prototype,"hideScrollbar",void 0),eo([o({type:Boolean})],so.prototype,"controls",void 0),eo([o({type:Boolean})],so.prototype,"limitSize",void 0),eo([s()],so.prototype,"elements",void 0),eo([s()],so.prototype,"currentElement",void 0),eo([s()],so.prototype,"withScroll",void 0),eo([s()],so.prototype,"startReached",void 0),eo([s()],so.prototype,"endReached",void 0),eo([r(".ft-snap-scroll--content")],so.prototype,"contentSlot",void 0),c("ft-snap-scroll")(so);var no=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 ro={colorOutline:ut.external(bt.colorOutline,"Design system"),colorOnSurface:ut.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(bt.colorOnSurfaceMedium,"Design system"),colorPrimary:ut.external(bt.colorPrimary,"Design system"),colorSurface:ut.external(bt.colorSurface,"Design system"),transitionDuration:ut.external(bt.transitionDuration,"Design system"),transitionTimingFunction:ut.external(bt.transitionTimingFunction,"Design system")};class lo extends CustomEvent{constructor(t){super("change",{detail:t})}}class ao extends yt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",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 _e(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 V`
|
|
1146
|
-
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1147
|
-
part="container">
|
|
1148
|
-
${this.label||i?V`
|
|
1149
|
-
<div class="ft-filter--header" part="header">
|
|
1150
|
-
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1151
|
-
</ft-typography>
|
|
1152
|
-
${i?V`
|
|
1153
|
-
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1154
|
-
${this.clearButtonLabel}
|
|
1155
|
-
</ft-button>
|
|
1156
|
-
`:null}
|
|
1157
|
-
</div>
|
|
1158
|
-
`:null}
|
|
1159
|
-
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1160
|
-
<input type="search"
|
|
1161
|
-
part="input"
|
|
1162
|
-
class="ft-typography--caption"
|
|
1163
|
-
?disabled=${!o}
|
|
1164
|
-
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1165
|
-
@search=${this.onFilterChange}
|
|
1166
|
-
@keyup=${this.onFilterChange}>
|
|
1167
|
-
</div>
|
|
1168
|
-
<div class="ft-filter--values">
|
|
1169
|
-
${this.renderLevels()}
|
|
1170
|
-
</div>
|
|
1171
|
-
<slot class="ft-filter--slot"
|
|
1172
|
-
@slotchange=${this.updateOptionsFromSlot}
|
|
1173
|
-
@option-change=${this.optionsChanged}></slot>
|
|
1174
|
-
</div>
|
|
1175
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return V`
|
|
1176
|
-
${this.raiseSelectedOptions&&e.length>0?V`
|
|
1177
|
-
<ft-filter-level
|
|
1178
|
-
id="${this.id}"
|
|
1179
|
-
?multivalued=${this.multivalued}
|
|
1180
|
-
?disabled=${this.disabled}
|
|
1181
|
-
preventNavigation
|
|
1182
|
-
.options=${e}
|
|
1183
|
-
@change=${this.onChange}
|
|
1184
|
-
part="values selected-values"
|
|
1185
|
-
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1186
|
-
></ft-filter-level>
|
|
1187
|
-
<div class="ft-filter--separator">
|
|
1188
|
-
`:null}
|
|
1189
|
-
<ft-snap-scroll horizontal hideScrollbar
|
|
1190
|
-
class="ft-filter--levels"
|
|
1191
|
-
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1192
|
-
${this.renderLevel(o,this.options)}
|
|
1193
|
-
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
|
|
1194
|
-
</ft-snap-scroll>
|
|
1195
|
-
`}renderLevel(t,e,i){return V`
|
|
1196
|
-
<ft-filter-level
|
|
1197
|
-
class="${t}"
|
|
1198
|
-
id="${this.id}"
|
|
1199
|
-
filter="${this.filter}"
|
|
1200
|
-
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1201
|
-
?multivalued=${this.multivalued}
|
|
1202
|
-
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1203
|
-
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1204
|
-
.parent=${i}
|
|
1205
|
-
.options=${e}
|
|
1206
|
-
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1207
|
-
@change=${this.onChange}
|
|
1208
|
-
@go-back=${this.goBack}
|
|
1209
|
-
@display-level=${this.onDisplayLevel}
|
|
1210
|
-
part="values available-values"
|
|
1211
|
-
.exportpartsPrefixes=${["values","available-values"]}
|
|
1212
|
-
noValuesLabel="${this.noValuesLabel}"
|
|
1213
|
-
></ft-filter-level>
|
|
1214
|
-
`}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 lo(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(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}ao.elementDefinitions={"ft-button":Ui,"ft-filter-level":to,"ft-snap-scroll":so,"ft-typography":Pe},ao.styles=[Le,x`
|
|
1145
|
+
`}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 vo(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)}}bo.elementDefinitions={"ft-button":_i},bo.styles=fo,uo([o({type:Boolean})],bo.prototype,"horizontal",void 0),uo([o({type:Boolean})],bo.prototype,"hideScrollbar",void 0),uo([o({type:Boolean})],bo.prototype,"controls",void 0),uo([o({type:Boolean})],bo.prototype,"limitSize",void 0),uo([s()],bo.prototype,"elements",void 0),uo([s()],bo.prototype,"currentElement",void 0),uo([s()],bo.prototype,"withScroll",void 0),uo([s()],bo.prototype,"startReached",void 0),uo([s()],bo.prototype,"endReached",void 0),uo([r(".ft-snap-scroll--content")],bo.prototype,"contentSlot",void 0),c("ft-snap-scroll")(bo);const xo={colorOutline:ut.external(bt.colorOutline,"Design system"),colorOnSurface:ut.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(bt.colorOnSurfaceMedium,"Design system"),colorPrimary:ut.external(bt.colorPrimary,"Design system"),colorSurface:ut.external(bt.colorSurface,"Design system"),transitionDuration:ut.external(bt.transitionDuration,"Design system"),transitionTimingFunction:ut.external(bt.transitionTimingFunction,"Design system")},yo=[Ue,x`
|
|
1215
1146
|
:host {
|
|
1216
1147
|
display: flex;
|
|
1217
1148
|
max-height: 100%;
|
|
@@ -1224,7 +1155,7 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1224
1155
|
flex-direction: column;
|
|
1225
1156
|
max-height: 100%;
|
|
1226
1157
|
max-width: 100%;
|
|
1227
|
-
color: ${
|
|
1158
|
+
color: ${xo.colorOnSurface};
|
|
1228
1159
|
}
|
|
1229
1160
|
|
|
1230
1161
|
.ft-filter--header {
|
|
@@ -1234,13 +1165,13 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1234
1165
|
flex-shrink: 0;
|
|
1235
1166
|
padding: 0 10px;
|
|
1236
1167
|
margin-bottom: 8px;
|
|
1237
|
-
${vt(
|
|
1168
|
+
${vt(Bt.fontSize,"14px")};
|
|
1238
1169
|
}
|
|
1239
1170
|
|
|
1240
1171
|
.ft-filter--header ft-button {
|
|
1241
1172
|
flex-shrink: 0;
|
|
1242
1173
|
margin-left: auto;
|
|
1243
|
-
${vt(
|
|
1174
|
+
${vt(Ui.iconSize,"18px")};
|
|
1244
1175
|
}
|
|
1245
1176
|
|
|
1246
1177
|
.ft-filter--label {
|
|
@@ -1248,8 +1179,8 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1248
1179
|
flex-shrink: 1;
|
|
1249
1180
|
flex-grow: 1;
|
|
1250
1181
|
word-break: break-word;
|
|
1251
|
-
${vt(
|
|
1252
|
-
${vt(
|
|
1182
|
+
${vt(Bt.lineHeight,"22px")};
|
|
1183
|
+
${vt(Bt.fontWeight,"bold")};
|
|
1253
1184
|
}
|
|
1254
1185
|
|
|
1255
1186
|
.ft-filter--filter {
|
|
@@ -1260,8 +1191,8 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1260
1191
|
padding: 0 10px;
|
|
1261
1192
|
overflow: hidden;
|
|
1262
1193
|
height: 32px;
|
|
1263
|
-
transition: height ${
|
|
1264
|
-
margin ${
|
|
1194
|
+
transition: height ${xo.transitionDuration} ${xo.transitionTimingFunction},
|
|
1195
|
+
margin ${xo.transitionDuration} ${xo.transitionTimingFunction};
|
|
1265
1196
|
transition-delay: 500ms;
|
|
1266
1197
|
}
|
|
1267
1198
|
|
|
@@ -1274,15 +1205,15 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1274
1205
|
display: block;
|
|
1275
1206
|
width: 100%;
|
|
1276
1207
|
border-radius: 4px;
|
|
1277
|
-
border: 1px solid ${
|
|
1208
|
+
border: 1px solid ${xo.colorOutline};
|
|
1278
1209
|
padding: 4px;
|
|
1279
|
-
background-color: ${
|
|
1280
|
-
color: ${
|
|
1281
|
-
outline-color: ${
|
|
1210
|
+
background-color: ${xo.colorSurface};
|
|
1211
|
+
color: ${xo.colorOnSurface};
|
|
1212
|
+
outline-color: ${xo.colorPrimary};
|
|
1282
1213
|
}
|
|
1283
1214
|
|
|
1284
1215
|
input::placeholder {
|
|
1285
|
-
color: ${
|
|
1216
|
+
color: ${xo.colorOnSurfaceMedium};
|
|
1286
1217
|
}
|
|
1287
1218
|
|
|
1288
1219
|
.ft-filter--values {
|
|
@@ -1294,7 +1225,7 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1294
1225
|
}
|
|
1295
1226
|
|
|
1296
1227
|
.ft-filter--separator {
|
|
1297
|
-
border-top: 1px solid ${
|
|
1228
|
+
border-top: 1px solid ${xo.colorOutline};
|
|
1298
1229
|
margin: 4px 10px;
|
|
1299
1230
|
}
|
|
1300
1231
|
|
|
@@ -1319,6 +1250,75 @@ class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error
|
|
|
1319
1250
|
slot {
|
|
1320
1251
|
display: none;
|
|
1321
1252
|
}
|
|
1322
|
-
`]
|
|
1253
|
+
`];var go=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 mo extends CustomEvent{constructor(t){super("change",{detail:t})}}class $o extends yt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",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 Ie(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 V`
|
|
1254
|
+
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1255
|
+
part="container">
|
|
1256
|
+
${this.label||i?V`
|
|
1257
|
+
<div class="ft-filter--header" part="header">
|
|
1258
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1259
|
+
</ft-typography>
|
|
1260
|
+
${i?V`
|
|
1261
|
+
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1262
|
+
${this.clearButtonLabel}
|
|
1263
|
+
</ft-button>
|
|
1264
|
+
`:null}
|
|
1265
|
+
</div>
|
|
1266
|
+
`:null}
|
|
1267
|
+
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1268
|
+
<input type="search"
|
|
1269
|
+
part="input"
|
|
1270
|
+
class="ft-typography--caption"
|
|
1271
|
+
?disabled=${!o}
|
|
1272
|
+
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1273
|
+
@search=${this.onFilterChange}
|
|
1274
|
+
@keyup=${this.onFilterChange}>
|
|
1275
|
+
</div>
|
|
1276
|
+
<div class="ft-filter--values">
|
|
1277
|
+
${this.renderLevels()}
|
|
1278
|
+
</div>
|
|
1279
|
+
<slot class="ft-filter--slot"
|
|
1280
|
+
@slotchange=${this.updateOptionsFromSlot}
|
|
1281
|
+
@option-change=${this.optionsChanged}></slot>
|
|
1282
|
+
</div>
|
|
1283
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return V`
|
|
1284
|
+
${this.raiseSelectedOptions&&e.length>0?V`
|
|
1285
|
+
<ft-filter-level
|
|
1286
|
+
id="${this.id}"
|
|
1287
|
+
?multivalued=${this.multivalued}
|
|
1288
|
+
?disabled=${this.disabled}
|
|
1289
|
+
preventNavigation
|
|
1290
|
+
.options=${e}
|
|
1291
|
+
@change=${this.onChange}
|
|
1292
|
+
part="values selected-values"
|
|
1293
|
+
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1294
|
+
></ft-filter-level>
|
|
1295
|
+
<div class="ft-filter--separator">
|
|
1296
|
+
`:null}
|
|
1297
|
+
<ft-snap-scroll horizontal hideScrollbar
|
|
1298
|
+
class="ft-filter--levels"
|
|
1299
|
+
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1300
|
+
${this.renderLevel(o,this.options)}
|
|
1301
|
+
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
|
|
1302
|
+
</ft-snap-scroll>
|
|
1303
|
+
`}renderLevel(t,e,i){return V`
|
|
1304
|
+
<ft-filter-level
|
|
1305
|
+
class="${t}"
|
|
1306
|
+
id="${this.id}"
|
|
1307
|
+
filter="${this.filter}"
|
|
1308
|
+
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1309
|
+
?multivalued=${this.multivalued}
|
|
1310
|
+
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1311
|
+
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1312
|
+
.parent=${i}
|
|
1313
|
+
.options=${e}
|
|
1314
|
+
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1315
|
+
@change=${this.onChange}
|
|
1316
|
+
@go-back=${this.goBack}
|
|
1317
|
+
@display-level=${this.onDisplayLevel}
|
|
1318
|
+
part="values available-values"
|
|
1319
|
+
.exportpartsPrefixes=${["values","available-values"]}
|
|
1320
|
+
noValuesLabel="${this.noValuesLabel}"
|
|
1321
|
+
></ft-filter-level>
|
|
1322
|
+
`}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 mo(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(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}$o.elementDefinitions={"ft-button":_i,"ft-filter-level":co,"ft-snap-scroll":bo,"ft-typography":_e},$o.styles=yo,go([o({type:String})],$o.prototype,"id",void 0),go([o({type:String})],$o.prototype,"label",void 0),go([o({type:String})],$o.prototype,"filterPlaceHolder",void 0),go([o({type:String})],$o.prototype,"clearButtonLabel",void 0),go([o({type:String})],$o.prototype,"moreValuesButtonLabel",void 0),go([o({type:String})],$o.prototype,"noValuesLabel",void 0),go([p([])],$o.prototype,"options",void 0),go([o({type:Boolean})],$o.prototype,"multivalued",void 0),go([o({type:Boolean})],$o.prototype,"disabled",void 0),go([o({type:Boolean})],$o.prototype,"raiseSelectedOptions",void 0),go([o({type:Number})],$o.prototype,"displayedValuesLimit",void 0),go([r(".ft-filter--slot")],$o.prototype,"slotElement",void 0),go([r(".ft-filter--container")],$o.prototype,"container",void 0),go([r(".ft-filter--values")],$o.prototype,"valuesContainer",void 0),go([r(".ft-filter--levels")],$o.prototype,"levelsContainer",void 0),go([r(".ft-filter--levels ft-filter-level:last-child")],$o.prototype,"lastLevel",void 0),go([r(".ft-filter--filter input")],$o.prototype,"filterInput",void 0),go([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")],$o.prototype,"levels",void 0),go([s()],$o.prototype,"withScroll",void 0),go([s()],$o.prototype,"filter",void 0),go([s()],$o.prototype,"slideIn",void 0),go([s()],$o.prototype,"slideOut",void 0);var wo=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 ko extends yt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return V`
|
|
1323
1323
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1324
|
-
`}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}))}}
|
|
1324
|
+
`}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}))}}ko.elementDefinitions={},wo([o({type:String})],ko.prototype,"label",void 0),wo([o({type:Object,converter:t=>t})],ko.prototype,"value",void 0),wo([o({type:Boolean,reflect:!0})],ko.prototype,"selected",void 0),wo([o({type:Object})],ko.prototype,"subOptions",void 0),wo([r(".ft-filter-option--slot")],ko.prototype,"slotElement",void 0),c("ft-filter")($o),c("ft-filter-option")(ko),t.FtFilter=$o,t.FtFilterChangeEvent=mo,t.FtFilterCssVariables=xo,t.FtFilterOption=ko,t.styles=yo,Object.defineProperty(t,"i",{value:!0})}({});
|