@fluid-topics/ft-filter 0.3.54 → 0.3.56
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.light.js +6 -16
- package/build/ft-filter.min.js +213 -212
- 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,r=new WeakMap,n=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&&(n.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.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=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),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):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.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 r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,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 r{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 n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(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,r=new WeakMap,n=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&&(n.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.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=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),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):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.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 r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,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 r{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 n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(zi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,s=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}s(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -91,7 +91,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
91
91
|
-ms-user-select: none;
|
|
92
92
|
user-select: none;
|
|
93
93
|
}
|
|
94
|
-
`;
|
|
94
|
+
`;y`
|
|
95
95
|
.ft-word-wrap {
|
|
96
96
|
white-space: normal;
|
|
97
97
|
word-wrap: break-word;
|
|
@@ -103,124 +103,135 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
103
103
|
-webkit-hyphens: auto;
|
|
104
104
|
hyphens: auto
|
|
105
105
|
}
|
|
106
|
-
`;const
|
|
106
|
+
`;const kt=y`
|
|
107
|
+
.ft-safari-ellipsis-fix {
|
|
108
|
+
margin-right: 0;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ft-safari-ellipsis-fix:after {
|
|
113
|
+
content: "\\0000a0";
|
|
114
|
+
display: inline-block;
|
|
115
|
+
width: 0;
|
|
116
|
+
}
|
|
117
|
+
`;var Ot,St,Ct;const Et=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ct=null===(St=null===(Ot=window.safari)||void 0===Ot?void 0:Ot.pushNotification)||void 0===St?void 0:St.toString())&&void 0!==Ct?Ct:""),Nt=Symbol.for(""),zt=t=>{if((null==t?void 0:t.r)===Nt)return null==t?void 0:t._$litStatic$},Rt=t=>({_$litStatic$:t,r:Nt}),Mt=new Map,Bt=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,h=0,c=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(r=i[h],s=zt(r));)a+=s+e[++h],c=!0;l.push(r),n.push(a),h++}if(h===o&&n.push(e[o]),c){const t=n.join("$$lit$$");void 0===(e=Mt.get(t))&&(n.raw=n,Mt.set(t,e=n)),i=l}return t(e,...i)})(q);
|
|
107
118
|
/**
|
|
108
119
|
* @license
|
|
109
120
|
* Copyright 2020 Google LLC
|
|
110
121
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
111
|
-
*/var
|
|
122
|
+
*/var jt;!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"}(jt||(jt={}));const Ft=xt.extend("--ft-typography-font-family",gt.titleFont),Ut=xt.extend("--ft-typography-font-family",gt.contentFont),Lt={fontFamily:Ut,fontSize:xt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:xt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:xt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:xt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:xt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Dt=xt.extend("--ft-typography-title-font-family",Ft),Tt=xt.extend("--ft-typography-title-font-size",Lt.fontSize,"20px"),At=xt.extend("--ft-typography-title-font-weight",Lt.fontWeight,"normal"),Pt=xt.extend("--ft-typography-title-letter-spacing",Lt.letterSpacing,"0.15px"),_t=xt.extend("--ft-typography-title-line-height",Lt.lineHeight,"1.2"),It=xt.extend("--ft-typography-title-text-transform",Lt.textTransform,"inherit"),Wt=xt.extend("--ft-typography-title-dense-font-family",Ft),Ht=xt.extend("--ft-typography-title-dense-font-size",Lt.fontSize,"14px"),Kt=xt.extend("--ft-typography-title-dense-font-weight",Lt.fontWeight,"normal"),Vt=xt.extend("--ft-typography-title-dense-letter-spacing",Lt.letterSpacing,"0.105px"),Zt=xt.extend("--ft-typography-title-dense-line-height",Lt.lineHeight,"1.7"),Jt=xt.extend("--ft-typography-title-dense-text-transform",Lt.textTransform,"inherit"),qt=xt.extend("--ft-typography-subtitle1-font-family",Ut),Xt=xt.extend("--ft-typography-subtitle1-font-size",Lt.fontSize,"16px"),Yt=xt.extend("--ft-typography-subtitle1-font-weight",Lt.fontWeight,"600"),Gt=xt.extend("--ft-typography-subtitle1-letter-spacing",Lt.letterSpacing,"0.144px"),Qt=xt.extend("--ft-typography-subtitle1-line-height",Lt.lineHeight,"1.5"),te=xt.extend("--ft-typography-subtitle1-text-transform",Lt.textTransform,"inherit"),ee=xt.extend("--ft-typography-subtitle2-font-family",Ut),ie=xt.extend("--ft-typography-subtitle2-font-size",Lt.fontSize,"14px"),oe=xt.extend("--ft-typography-subtitle2-font-weight",Lt.fontWeight,"normal"),se=xt.extend("--ft-typography-subtitle2-letter-spacing",Lt.letterSpacing,"0.098px"),re=xt.extend("--ft-typography-subtitle2-line-height",Lt.lineHeight,"1.7"),ne=xt.extend("--ft-typography-subtitle2-text-transform",Lt.textTransform,"inherit"),le=xt.extend("--ft-typography-body1-font-family",Ut),ae=xt.extend("--ft-typography-body1-font-size",Lt.fontSize,"16px"),he=xt.extend("--ft-typography-body1-font-weight",Lt.fontWeight,"normal"),ce=xt.extend("--ft-typography-body1-letter-spacing",Lt.letterSpacing,"0.496px"),pe=xt.extend("--ft-typography-body1-line-height",Lt.lineHeight,"1.5"),de=xt.extend("--ft-typography-body1-text-transform",Lt.textTransform,"inherit"),fe={fontFamily:xt.extend("--ft-typography-body2-font-family",Ut),fontSize:xt.extend("--ft-typography-body2-font-size",Lt.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-body2-font-weight",Lt.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-body2-letter-spacing",Lt.letterSpacing,"0.252px"),lineHeight:xt.extend("--ft-typography-body2-line-height",Lt.lineHeight,"1.4"),textTransform:xt.extend("--ft-typography-body2-text-transform",Lt.textTransform,"inherit")},ue=xt.extend("--ft-typography-caption-font-family",Ut),ve=xt.extend("--ft-typography-caption-font-size",Lt.fontSize,"12px"),be=xt.extend("--ft-typography-caption-font-weight",Lt.fontWeight,"normal"),xe=xt.extend("--ft-typography-caption-letter-spacing",Lt.letterSpacing,"0.396px"),ye=xt.extend("--ft-typography-caption-line-height",Lt.lineHeight,"1.33"),ge=xt.extend("--ft-typography-caption-text-transform",Lt.textTransform,"inherit"),me=xt.extend("--ft-typography-breadcrumb-font-family",Ut),$e=xt.extend("--ft-typography-breadcrumb-font-size",Lt.fontSize,"10px"),we=xt.extend("--ft-typography-breadcrumb-font-weight",Lt.fontWeight,"normal"),ke=xt.extend("--ft-typography-breadcrumb-letter-spacing",Lt.letterSpacing,"0.33px"),Oe=xt.extend("--ft-typography-breadcrumb-line-height",Lt.lineHeight,"1.6"),Se=xt.extend("--ft-typography-breadcrumb-text-transform",Lt.textTransform,"inherit"),Ce=xt.extend("--ft-typography-overline-font-family",Ut),Ee=xt.extend("--ft-typography-overline-font-size",Lt.fontSize,"10px"),Ne=xt.extend("--ft-typography-overline-font-weight",Lt.fontWeight,"normal"),ze=xt.extend("--ft-typography-overline-letter-spacing",Lt.letterSpacing,"1.5px"),Re=xt.extend("--ft-typography-overline-line-height",Lt.lineHeight,"1.6"),Me=xt.extend("--ft-typography-overline-text-transform",Lt.textTransform,"uppercase"),Be={fontFamily:xt.extend("--ft-typography-button-font-family",Ut),fontSize:xt.extend("--ft-typography-button-font-size",Lt.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-button-font-weight",Lt.fontWeight,"600"),letterSpacing:xt.extend("--ft-typography-button-letter-spacing",Lt.letterSpacing,"1.246px"),lineHeight:xt.extend("--ft-typography-button-line-height",Lt.lineHeight,"1.15"),textTransform:xt.extend("--ft-typography-button-text-transform",Lt.textTransform,"uppercase")},je=y`
|
|
112
123
|
.ft-typography--title {
|
|
113
|
-
font-family: ${
|
|
114
|
-
font-size: ${
|
|
115
|
-
font-weight: ${
|
|
116
|
-
letter-spacing: ${
|
|
117
|
-
line-height: ${
|
|
118
|
-
text-transform: ${
|
|
119
|
-
}
|
|
120
|
-
`,je=y`
|
|
121
|
-
.ft-typography--title-dense {
|
|
122
|
-
font-family: ${It};
|
|
123
|
-
font-size: ${Wt};
|
|
124
|
-
font-weight: ${Ht};
|
|
125
|
-
letter-spacing: ${Kt};
|
|
126
|
-
line-height: ${Vt};
|
|
127
|
-
text-transform: ${Zt};
|
|
124
|
+
font-family: ${Dt};
|
|
125
|
+
font-size: ${Tt};
|
|
126
|
+
font-weight: ${At};
|
|
127
|
+
letter-spacing: ${Pt};
|
|
128
|
+
line-height: ${_t};
|
|
129
|
+
text-transform: ${It};
|
|
128
130
|
}
|
|
129
131
|
`,Fe=y`
|
|
130
|
-
.ft-typography--
|
|
131
|
-
font-family: ${
|
|
132
|
-
font-size: ${
|
|
133
|
-
font-weight: ${
|
|
134
|
-
letter-spacing: ${
|
|
135
|
-
line-height: ${
|
|
136
|
-
text-transform: ${
|
|
132
|
+
.ft-typography--title-dense {
|
|
133
|
+
font-family: ${Wt};
|
|
134
|
+
font-size: ${Ht};
|
|
135
|
+
font-weight: ${Kt};
|
|
136
|
+
letter-spacing: ${Vt};
|
|
137
|
+
line-height: ${Zt};
|
|
138
|
+
text-transform: ${Jt};
|
|
137
139
|
}
|
|
138
140
|
`,Ue=y`
|
|
139
|
-
.ft-typography--
|
|
140
|
-
font-family: ${
|
|
141
|
-
font-size: ${
|
|
142
|
-
font-weight: ${
|
|
143
|
-
letter-spacing: ${
|
|
144
|
-
line-height: ${
|
|
145
|
-
text-transform: ${
|
|
141
|
+
.ft-typography--subtitle1 {
|
|
142
|
+
font-family: ${qt};
|
|
143
|
+
font-size: ${Xt};
|
|
144
|
+
font-weight: ${Yt};
|
|
145
|
+
letter-spacing: ${Gt};
|
|
146
|
+
line-height: ${Qt};
|
|
147
|
+
text-transform: ${te};
|
|
146
148
|
}
|
|
147
|
-
|
|
148
149
|
`,Le=y`
|
|
149
|
-
.ft-typography--
|
|
150
|
-
font-family: ${
|
|
151
|
-
font-size: ${
|
|
152
|
-
font-weight: ${
|
|
153
|
-
letter-spacing: ${
|
|
154
|
-
line-height: ${
|
|
155
|
-
text-transform: ${
|
|
150
|
+
.ft-typography--subtitle2 {
|
|
151
|
+
font-family: ${ee};
|
|
152
|
+
font-size: ${ie};
|
|
153
|
+
font-weight: ${oe};
|
|
154
|
+
letter-spacing: ${se};
|
|
155
|
+
line-height: ${re};
|
|
156
|
+
text-transform: ${ne};
|
|
156
157
|
}
|
|
158
|
+
|
|
157
159
|
`,De=y`
|
|
158
|
-
.ft-typography--
|
|
159
|
-
font-family: ${
|
|
160
|
-
font-size: ${
|
|
161
|
-
font-weight: ${
|
|
162
|
-
letter-spacing: ${
|
|
163
|
-
line-height: ${
|
|
164
|
-
text-transform: ${de
|
|
160
|
+
.ft-typography--body1 {
|
|
161
|
+
font-family: ${le};
|
|
162
|
+
font-size: ${ae};
|
|
163
|
+
font-weight: ${he};
|
|
164
|
+
letter-spacing: ${ce};
|
|
165
|
+
line-height: ${pe};
|
|
166
|
+
text-transform: ${de};
|
|
165
167
|
}
|
|
166
168
|
`,Te=y`
|
|
167
|
-
.ft-typography--
|
|
168
|
-
font-family: ${fe};
|
|
169
|
-
font-size: ${
|
|
170
|
-
font-weight: ${
|
|
171
|
-
letter-spacing: ${
|
|
172
|
-
line-height: ${
|
|
173
|
-
text-transform: ${
|
|
169
|
+
.ft-typography--body2 {
|
|
170
|
+
font-family: ${fe.fontFamily};
|
|
171
|
+
font-size: ${fe.fontSize};
|
|
172
|
+
font-weight: ${fe.fontWeight};
|
|
173
|
+
letter-spacing: ${fe.letterSpacing};
|
|
174
|
+
line-height: ${fe.lineHeight};
|
|
175
|
+
text-transform: ${fe.textTransform};
|
|
174
176
|
}
|
|
175
177
|
`,Ae=y`
|
|
176
|
-
.ft-typography--
|
|
177
|
-
font-family: ${
|
|
178
|
-
font-size: ${
|
|
179
|
-
font-weight: ${
|
|
180
|
-
letter-spacing: ${
|
|
181
|
-
line-height: ${
|
|
182
|
-
text-transform: ${
|
|
178
|
+
.ft-typography--caption {
|
|
179
|
+
font-family: ${ue};
|
|
180
|
+
font-size: ${ve};
|
|
181
|
+
font-weight: ${be};
|
|
182
|
+
letter-spacing: ${xe};
|
|
183
|
+
line-height: ${ye};
|
|
184
|
+
text-transform: ${ge};
|
|
183
185
|
}
|
|
184
186
|
`,Pe=y`
|
|
185
|
-
.ft-typography--
|
|
186
|
-
font-family: ${
|
|
187
|
-
font-size: ${
|
|
188
|
-
font-weight: ${
|
|
189
|
-
letter-spacing: ${
|
|
190
|
-
line-height: ${
|
|
191
|
-
text-transform: ${
|
|
187
|
+
.ft-typography--breadcrumb {
|
|
188
|
+
font-family: ${me};
|
|
189
|
+
font-size: ${$e};
|
|
190
|
+
font-weight: ${we};
|
|
191
|
+
letter-spacing: ${ke};
|
|
192
|
+
line-height: ${Oe};
|
|
193
|
+
text-transform: ${Se};
|
|
192
194
|
}
|
|
193
195
|
`,_e=y`
|
|
194
|
-
.ft-typography--
|
|
195
|
-
font-family: ${
|
|
196
|
-
font-size: ${
|
|
197
|
-
font-weight: ${
|
|
198
|
-
letter-spacing: ${
|
|
199
|
-
line-height: ${
|
|
200
|
-
text-transform: ${Me
|
|
196
|
+
.ft-typography--overline {
|
|
197
|
+
font-family: ${Ce};
|
|
198
|
+
font-size: ${Ee};
|
|
199
|
+
font-weight: ${Ne};
|
|
200
|
+
letter-spacing: ${ze};
|
|
201
|
+
line-height: ${Re};
|
|
202
|
+
text-transform: ${Me};
|
|
201
203
|
}
|
|
202
204
|
`,Ie=y`
|
|
205
|
+
.ft-typography--button {
|
|
206
|
+
font-family: ${Be.fontFamily};
|
|
207
|
+
font-size: ${Be.fontSize};
|
|
208
|
+
font-weight: ${Be.fontWeight};
|
|
209
|
+
letter-spacing: ${Be.letterSpacing};
|
|
210
|
+
line-height: ${Be.lineHeight};
|
|
211
|
+
text-transform: ${Be.textTransform};
|
|
212
|
+
}
|
|
213
|
+
`,We=y`
|
|
203
214
|
.ft-typography {
|
|
204
215
|
vertical-align: inherit;
|
|
205
216
|
}
|
|
206
|
-
`;var
|
|
207
|
-
<${
|
|
217
|
+
`;var He=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ke extends $t{constructor(){super(...arguments),this.variant=jt.body1}render(){return this.element?Bt`
|
|
218
|
+
<${Rt(this.element)}
|
|
208
219
|
class="ft-typography ft-typography--${this.variant}">
|
|
209
220
|
<slot></slot>
|
|
210
|
-
</${
|
|
211
|
-
`:
|
|
221
|
+
</${Rt(this.element)}>
|
|
222
|
+
`:Bt`
|
|
212
223
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
213
|
-
`}}function
|
|
224
|
+
`}}function Ve(t,e){return t.flatMap((t=>[t,...Ve(e(t),e)]))}
|
|
214
225
|
/**
|
|
215
226
|
* @license
|
|
216
227
|
* Copyright 2017 Google LLC
|
|
217
228
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
218
|
-
*/
|
|
229
|
+
*/Ke.styles=[je,Fe,Ue,Le,De,Te,Ae,Pe,_e,Ie,We],He([o()],Ke.prototype,"element",void 0),He([o()],Ke.prototype,"variant",void 0),c("ft-typography")(Ke);const Ze=1,Je=2,qe=t=>(...e)=>({_$litDirective$:t,values:e});class Xe{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)}}
|
|
219
230
|
/**
|
|
220
231
|
* @license
|
|
221
232
|
* Copyright 2020 Google LLC
|
|
222
233
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
223
|
-
*/const{I:
|
|
234
|
+
*/const{I:Ye}=pt,Ge=()=>document.createComment(""),Qe=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Ge(),r),o=s.insertBefore(Ge(),r);i=new Ye(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,l=n!==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)!==n._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},ti=(t,e,i=t)=>(t._$AI(e,i),t),ei={},ii=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}},oi=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},si=qe(class extends Xe{constructor(t){if(super(t),t.type!==Je)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=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:l}=this.ht(e,i,o);if(!Array.isArray(r))return this.ut=l,n;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],h=[];let c,p,d=0,f=r.length-1,u=0,v=n.length-1;for(;d<=f&&u<=v;)if(null===r[d])d++;else if(null===r[f])f--;else if(a[d]===l[u])h[u]=ti(r[d],n[u]),d++,u++;else if(a[f]===l[v])h[v]=ti(r[f],n[v]),f--,v--;else if(a[d]===l[v])h[v]=ti(r[d],n[v]),Qe(t,h[v+1],r[d]),d++,v--;else if(a[f]===l[u])h[u]=ti(r[f],n[u]),Qe(t,r[d],r[f]),f--,u++;else if(void 0===c&&(c=oi(l,u,v),p=oi(a,d,f)),c.has(a[d]))if(c.has(a[f])){const e=p.get(l[u]),i=void 0!==e?r[e]:null;if(null===i){const e=Qe(t,r[d]);ti(e,n[u]),h[u]=e}else h[u]=ti(i,n[u]),Qe(t,r[d],i),r[e]=null;u++}else ii(r[f]),f--;else ii(r[d]),d++;for(;u<=v;){const e=Qe(t,h[v+1]);ti(e,n[u]),h[u++]=e}for(;d<=f;){const t=r[d++];null!==t&&ii(t)}return this.ut=l,((t,e=ei)=>{t._$AH=e})(t,h),X}}),ri=qe(class extends Xe{constructor(t){var e;if(super(t),t.type!==Ze||"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 X}}),ni=xt.extend("--ft-ripple-color",gt.colorContent),li={color:ni,backgroundColor:xt.extend("--ft-ripple-background-color",ni),opacityContentOnSurfacePressed:xt.external(gt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xt.external(gt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xt.external(gt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xt.external(gt.opacityContentOnSurfaceSelected,"Design system")},ai=xt.extend("--ft-ripple-color",gt.colorPrimary),hi=ai,ci=xt.extend("--ft-ripple-background-color",ai),pi=xt.extend("--ft-ripple-color",gt.colorSecondary),di=pi,fi=xt.extend("--ft-ripple-background-color",pi),ui=y`
|
|
224
235
|
:host {
|
|
225
236
|
display: contents;
|
|
226
237
|
}
|
|
@@ -242,27 +253,27 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
242
253
|
}
|
|
243
254
|
|
|
244
255
|
.ft-ripple .ft-ripple--background {
|
|
245
|
-
background-color: ${
|
|
256
|
+
background-color: ${li.backgroundColor};
|
|
246
257
|
}
|
|
247
258
|
|
|
248
259
|
.ft-ripple .ft-ripple--effect {
|
|
249
|
-
background-color: ${
|
|
260
|
+
background-color: ${li.color};
|
|
250
261
|
}
|
|
251
262
|
|
|
252
263
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
253
|
-
background-color: ${
|
|
264
|
+
background-color: ${fi};
|
|
254
265
|
}
|
|
255
266
|
|
|
256
267
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
257
|
-
background-color: ${
|
|
268
|
+
background-color: ${di};
|
|
258
269
|
}
|
|
259
270
|
|
|
260
271
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
261
|
-
background-color: ${
|
|
272
|
+
background-color: ${ci};
|
|
262
273
|
}
|
|
263
274
|
|
|
264
275
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
265
|
-
background-color: ${
|
|
276
|
+
background-color: ${hi};
|
|
266
277
|
}
|
|
267
278
|
|
|
268
279
|
.ft-ripple .ft-ripple--background {
|
|
@@ -294,19 +305,19 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
294
305
|
}
|
|
295
306
|
|
|
296
307
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
297
|
-
opacity: ${
|
|
308
|
+
opacity: ${li.opacityContentOnSurfaceHover};
|
|
298
309
|
}
|
|
299
310
|
|
|
300
311
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
301
|
-
opacity: ${
|
|
312
|
+
opacity: ${li.opacityContentOnSurfaceSelected};
|
|
302
313
|
}
|
|
303
314
|
|
|
304
315
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
305
|
-
opacity: ${
|
|
316
|
+
opacity: ${li.opacityContentOnSurfaceFocused};
|
|
306
317
|
}
|
|
307
318
|
|
|
308
319
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
309
|
-
opacity: ${
|
|
320
|
+
opacity: ${li.opacityContentOnSurfacePressed};
|
|
310
321
|
transform: translate(-50%, -50%) scale(1);
|
|
311
322
|
}
|
|
312
323
|
`;
|
|
@@ -314,7 +325,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
314
325
|
* @license
|
|
315
326
|
* Copyright 2017 Google LLC
|
|
316
327
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
317
|
-
*/var
|
|
328
|
+
*/var vi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class bi extends $t{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.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return q`
|
|
318
329
|
<style>
|
|
319
330
|
.ft-ripple .ft-ripple--effect,
|
|
320
331
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -327,11 +338,11 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
327
338
|
top: ${this.originY}px;
|
|
328
339
|
}
|
|
329
340
|
</style>
|
|
330
|
-
<div class="${
|
|
341
|
+
<div class="${ri(t)}">
|
|
331
342
|
<div class="ft-ripple--background"></div>
|
|
332
343
|
<div class="ft-ripple--effect"></div>
|
|
333
344
|
</div>
|
|
334
|
-
`}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(){
|
|
345
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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()}}bi.elementDefinitions={},bi.styles=ui,vi([o({type:Boolean})],bi.prototype,"primary",void 0),vi([o({type:Boolean})],bi.prototype,"secondary",void 0),vi([o({type:Boolean})],bi.prototype,"unbounded",void 0),vi([o({type:Boolean})],bi.prototype,"activated",void 0),vi([o({type:Boolean})],bi.prototype,"selected",void 0),vi([o({type:Boolean})],bi.prototype,"disabled",void 0),vi([s()],bi.prototype,"hovered",void 0),vi([s()],bi.prototype,"focused",void 0),vi([s()],bi.prototype,"pressed",void 0),vi([s()],bi.prototype,"rippling",void 0),vi([s()],bi.prototype,"rippleSize",void 0),vi([s()],bi.prototype,"originX",void 0),vi([s()],bi.prototype,"originY",void 0),vi([n(".ft-ripple")],bi.prototype,"ripple",void 0),vi([n(".ft-ripple--effect")],bi.prototype,"rippleEffect",void 0),c("ft-ripple")(bi);const xi=xt.create("--ft-tooltip-distance","SIZE","4px"),yi=xt.create("--ft-tooltip-color","COLOR","#FFFFFF"),gi=xt.create("--ft-tooltip-background-color","COLOR","#666666"),mi=xt.create("--ft-tooltip-z-index","NUMBER","1"),$i=xt.external(gt.borderRadiusS,"Design system"),wi=xt.create("--ft-tooltip-max-width","SIZE","150px"),ki=y`
|
|
335
346
|
.ft-tooltip--container {
|
|
336
347
|
display: block;
|
|
337
348
|
position: relative;
|
|
@@ -347,23 +358,23 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
347
358
|
box-sizing: border-box;
|
|
348
359
|
overflow: hidden;
|
|
349
360
|
width: max-content;
|
|
350
|
-
max-width: ${
|
|
361
|
+
max-width: ${wi};
|
|
351
362
|
text-align: center;
|
|
352
|
-
padding: ${
|
|
353
|
-
z-index: ${
|
|
363
|
+
padding: ${xi};
|
|
364
|
+
z-index: ${mi};
|
|
354
365
|
}
|
|
355
366
|
|
|
356
367
|
.ft-tooltip--content {
|
|
357
368
|
padding: 4px 8px;
|
|
358
|
-
border-radius: ${
|
|
359
|
-
background-color: ${
|
|
360
|
-
color: ${
|
|
369
|
+
border-radius: ${$i};
|
|
370
|
+
background-color: ${gi};
|
|
371
|
+
color: ${yi};
|
|
361
372
|
top: -500px;
|
|
362
373
|
left: -500px;
|
|
363
374
|
position: relative;
|
|
364
375
|
word-break: break-word;
|
|
365
376
|
}
|
|
366
|
-
`;var
|
|
377
|
+
`;var Oi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Si extends $t{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return q`
|
|
367
378
|
<div part="container"
|
|
368
379
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
369
380
|
@mouseenter=${this.onHover}
|
|
@@ -381,7 +392,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
381
392
|
</div>
|
|
382
393
|
</div>
|
|
383
394
|
</div>
|
|
384
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){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,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=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 n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${
|
|
395
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){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,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=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 n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${wi})`}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())}}Si.elementDefinitions={"ft-typography":Ke},Si.styles=ki,Oi([o()],Si.prototype,"text",void 0),Oi([o({type:Boolean})],Si.prototype,"manual",void 0),Oi([o({type:Boolean})],Si.prototype,"inline",void 0),Oi([o({type:Number})],Si.prototype,"delay",void 0),Oi([o()],Si.prototype,"position",void 0),Oi([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}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Si.prototype,"slotNodes",void 0),Oi([n(".ft-tooltip--container")],Si.prototype,"container",void 0),Oi([n("slot")],Si.prototype,"target",void 0),Oi([n(".ft-tooltip")],Si.prototype,"tooltip",void 0),Oi([n(".ft-tooltip--content")],Si.prototype,"tooltipContent",void 0),Oi([s()],Si.prototype,"visible",void 0),c("ft-tooltip")(Si);const Ci={color:xt.extend("--ft-loader-color",gt.colorPrimary),size:xt.create("--ft-loader-size","SIZE","80px")},Ei=y`
|
|
385
396
|
:host {
|
|
386
397
|
line-height: 0;
|
|
387
398
|
}
|
|
@@ -390,8 +401,8 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
390
401
|
display: inline-block;
|
|
391
402
|
position: relative;
|
|
392
403
|
|
|
393
|
-
width: ${
|
|
394
|
-
height: ${
|
|
404
|
+
width: ${Ci.size};
|
|
405
|
+
height: ${Ci.size};
|
|
395
406
|
}
|
|
396
407
|
|
|
397
408
|
.ft-loader div {
|
|
@@ -400,7 +411,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
400
411
|
width: 25%;
|
|
401
412
|
height: 25%;
|
|
402
413
|
border-radius: 50%;
|
|
403
|
-
background: ${
|
|
414
|
+
background: ${Ci.color};
|
|
404
415
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
405
416
|
}
|
|
406
417
|
|
|
@@ -447,23 +458,23 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
447
458
|
transform: translate(0, 0);
|
|
448
459
|
}
|
|
449
460
|
100% {
|
|
450
|
-
transform: translate(calc(0.35 * ${
|
|
461
|
+
transform: translate(calc(0.35 * ${Ci.size}), 0);
|
|
451
462
|
}
|
|
452
463
|
}
|
|
453
|
-
`;class
|
|
464
|
+
`;class Ni extends $t{render(){return q`
|
|
454
465
|
<div class="ft-loader">
|
|
455
466
|
<div></div>
|
|
456
467
|
<div></div>
|
|
457
468
|
<div></div>
|
|
458
469
|
<div></div>
|
|
459
470
|
</div>
|
|
460
|
-
`}}
|
|
471
|
+
`}}Ni.styles=Ei,c("ft-loader")(Ni);
|
|
461
472
|
/**
|
|
462
473
|
* @license
|
|
463
474
|
* Copyright 2017 Google LLC
|
|
464
475
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
465
476
|
*/
|
|
466
|
-
class
|
|
477
|
+
class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Y||null==t)return this._t=void 0,this.it=t;if(t===X)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:[]}}}zi.directiveName="unsafeHTML",zi.resultType=1;const Ri=qe(zi);var Mi,Bi;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",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=""}(Mi||(Mi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Bi||(Bi={})),new Map([...["abw"].map((t=>[t,Bi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Bi.AUDIO])),...["avi"].map((t=>[t,Bi.AVI])),...["chm","xhs"].map((t=>[t,Bi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Bi.CODE])),...["csv"].map((t=>[t,Bi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Bi.DITA])),...["epub"].map((t=>[t,Bi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Bi.EXCEL])),...["flac"].map((t=>[t,Bi.FLAC])),...["gif"].map((t=>[t,Bi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Bi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Bi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Bi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Bi.JPEG])),...["json"].map((t=>[t,Bi.JSON])),...["m4a","m4p"].map((t=>[t,Bi.M4A])),...["mov","qt"].map((t=>[t,Bi.MOV])),...["mp3"].map((t=>[t,Bi.MP3])),...["mp4","m4v"].map((t=>[t,Bi.MP4])),...["ogg","oga"].map((t=>[t,Bi.OGG])),...["pdf","ps"].map((t=>[t,Bi.PDF])),...["png"].map((t=>[t,Bi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Bi.POWERPOINT])),...["rar"].map((t=>[t,Bi.RAR])),...["stp"].map((t=>[t,Bi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Bi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Bi.VIDEO])),...["wav"].map((t=>[t,Bi.WAV])),...["wma"].map((t=>[t,Bi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Bi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Bi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Bi.YAML])),...["zip"].map((t=>[t,Bi.ZIP]))]);const ji={size:xt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:xt.extend("--ft-icon-fluid-topics-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:xt.extend("--ft-icon-file-format-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:xt.extend("--ft-icon-material-font-family",xt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:xt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Fi=y`
|
|
467
478
|
:host, i.ft-icon {
|
|
468
479
|
display: inline-flex;
|
|
469
480
|
align-items: center;
|
|
@@ -472,14 +483,14 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
472
483
|
}
|
|
473
484
|
|
|
474
485
|
:host {
|
|
475
|
-
width: ${
|
|
476
|
-
height: ${
|
|
486
|
+
width: ${ji.size};
|
|
487
|
+
height: ${ji.size};
|
|
477
488
|
}
|
|
478
489
|
|
|
479
490
|
i.ft-icon {
|
|
480
491
|
width: 100%;
|
|
481
492
|
height: 100%;
|
|
482
|
-
font-size: ${
|
|
493
|
+
font-size: ${ji.size};
|
|
483
494
|
line-height: 1;
|
|
484
495
|
font-weight: normal;
|
|
485
496
|
text-transform: none;
|
|
@@ -490,32 +501,32 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
490
501
|
text-rendering: auto;
|
|
491
502
|
-webkit-font-smoothing: antialiased;
|
|
492
503
|
-moz-osx-font-smoothing: grayscale;
|
|
493
|
-
vertical-align: ${
|
|
504
|
+
vertical-align: ${ji.verticalAlign};
|
|
494
505
|
}
|
|
495
506
|
|
|
496
507
|
i.ft-icon.ft-icon--fluid-topics {
|
|
497
|
-
font-family: ${
|
|
508
|
+
font-family: ${ji.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
498
509
|
|
|
499
510
|
/* Ugly fix because font is broken */
|
|
500
|
-
font-size: calc(0.9 * ${
|
|
511
|
+
font-size: calc(0.9 * ${ji.size});
|
|
501
512
|
position: relative;
|
|
502
513
|
top: -5%;
|
|
503
514
|
justify-content: center;
|
|
504
515
|
}
|
|
505
516
|
|
|
506
517
|
.ft-icon--file-format {
|
|
507
|
-
font-family: ${
|
|
518
|
+
font-family: ${ji.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
508
519
|
}
|
|
509
520
|
|
|
510
521
|
.ft-icon--material {
|
|
511
|
-
font-family: ${
|
|
522
|
+
font-family: ${ji.materialFontFamily}, "Material Icons", sans-serif;
|
|
512
523
|
}
|
|
513
|
-
`;var
|
|
524
|
+
`;var Ui;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ui||(Ui={}));var Li=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Di extends $t{constructor(){super(...arguments),this.variant=Ui.fluid_topics,this.resolvedIcon=Y}render(){const t="material"!==this.variant||this.value;return q`
|
|
514
525
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
515
|
-
${
|
|
526
|
+
${Ri(this.resolvedIcon)}
|
|
516
527
|
<slot ?hidden=${t}></slot>
|
|
517
528
|
</i>
|
|
518
|
-
`}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
|
|
529
|
+
`}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 Ui.file_format:this.resolvedIcon=null!==(t=Bi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Ui.fluid_topics:this.resolvedIcon=null!==(e=Mi[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||Y}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Di.elementDefinitions={},Di.styles=Fi,Li([o()],Di.prototype,"variant",void 0),Li([o()],Di.prototype,"value",void 0),Li([s()],Di.prototype,"resolvedIcon",void 0),Li([n("slot")],Di.prototype,"slottedContent",void 0),c("ft-icon")(Di);const Ti=xt.extend("--ft-button-color",gt.colorPrimary),Ai={backgroundColor:xt.extend("--ft-button-background-color",gt.colorSurface),borderRadius:xt.extend("--ft-button-border-radius",gt.borderRadiusL),color:Ti,fontSize:xt.extend("--ft-button-font-size",Be.fontSize),iconSize:xt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:xt.extend("--ft-button-ripple-color",Ti),opacityDisabled:xt.external(gt.colorOpacityDisabled,"Design system")},Pi=xt.extend("--ft-button-primary-color",xt.extend("--ft-button-color",gt.colorOnPrimary)),_i={backgroundColor:xt.extend("--ft-button-primary-background-color",xt.extend("--ft-button-background-color",gt.colorPrimary)),color:Pi,rippleColor:xt.extend("--ft-button-primary-ripple-color",Pi)},Ii=xt.extend("--ft-button-dense-border-radius",xt.extend("--ft-button-border-radius",gt.borderRadiusM)),Wi=[wt,y`
|
|
519
530
|
:host {
|
|
520
531
|
display: inline-block;
|
|
521
532
|
max-width: 100%;
|
|
@@ -526,7 +537,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
526
537
|
box-shadow: 0px 0px 0px transparent;
|
|
527
538
|
border: 0px solid transparent;
|
|
528
539
|
text-shadow: 0px 0px 0px transparent;
|
|
529
|
-
font-size: ${
|
|
540
|
+
font-size: ${Ai.fontSize};
|
|
530
541
|
}
|
|
531
542
|
|
|
532
543
|
button:hover {
|
|
@@ -555,17 +566,17 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
555
566
|
border: none;
|
|
556
567
|
pointer-events: auto;
|
|
557
568
|
|
|
558
|
-
--ft-button-internal-line-height: calc(${
|
|
559
|
-
--ft-button-internal-color: ${
|
|
560
|
-
${yt(
|
|
569
|
+
--ft-button-internal-line-height: calc(${Ai.fontSize} + 2px);
|
|
570
|
+
--ft-button-internal-color: ${Ai.color};
|
|
571
|
+
${yt(ji.size,Ai.iconSize)};
|
|
561
572
|
--ft-button-internal-vertical-padding: 6px;
|
|
562
573
|
--ft-button-internal-horizontal-padding: 8px;
|
|
563
|
-
${yt(
|
|
564
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
574
|
+
${yt(li.color,Ai.rippleColor)};
|
|
575
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ai.iconSize});
|
|
565
576
|
|
|
566
|
-
border-radius: ${
|
|
577
|
+
border-radius: ${Ai.borderRadius};
|
|
567
578
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
568
|
-
background-color: ${
|
|
579
|
+
background-color: ${Ai.backgroundColor};
|
|
569
580
|
color: var(--ft-button-internal-color);
|
|
570
581
|
-webkit-mask-image: radial-gradient(white, black);
|
|
571
582
|
}
|
|
@@ -577,7 +588,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
577
588
|
.ft-button--dense {
|
|
578
589
|
--ft-button-internal-vertical-padding: 2px;
|
|
579
590
|
--ft-button-internal-horizontal-padding: 4px;
|
|
580
|
-
border-radius: ${
|
|
591
|
+
border-radius: ${Ii};
|
|
581
592
|
}
|
|
582
593
|
|
|
583
594
|
.ft-button--round {
|
|
@@ -586,13 +597,13 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
586
597
|
|
|
587
598
|
.ft-button[disabled] {
|
|
588
599
|
filter: grayscale(1);
|
|
589
|
-
opacity: ${
|
|
600
|
+
opacity: ${Ai.opacityDisabled};
|
|
590
601
|
}
|
|
591
602
|
|
|
592
603
|
.ft-button.ft-button--primary {
|
|
593
|
-
background-color: ${
|
|
594
|
-
--ft-button-internal-color: ${
|
|
595
|
-
${yt(
|
|
604
|
+
background-color: ${_i.backgroundColor};
|
|
605
|
+
--ft-button-internal-color: ${_i.color};
|
|
606
|
+
${yt(li.color,_i.rippleColor)};
|
|
596
607
|
}
|
|
597
608
|
|
|
598
609
|
.ft-button.ft-button--outlined {
|
|
@@ -611,20 +622,10 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
611
622
|
text-overflow: ellipsis;
|
|
612
623
|
display: block;
|
|
613
624
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
614
|
-
${yt(
|
|
615
|
-
${yt(
|
|
625
|
+
${yt(Be.fontSize,"1em")};
|
|
626
|
+
${yt(Be.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
616
627
|
}
|
|
617
|
-
|
|
618
|
-
.ft-button--safari-fix .ft-button--label {
|
|
619
|
-
margin-right: 0;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
623
|
-
content: "\\0000a0";
|
|
624
|
-
display: inline-block;
|
|
625
|
-
width: 0;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
+
|
|
628
629
|
.ft-button--label[hidden] {
|
|
629
630
|
display: none;
|
|
630
631
|
}
|
|
@@ -645,19 +646,19 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
645
646
|
}
|
|
646
647
|
|
|
647
648
|
ft-loader {
|
|
648
|
-
${yt(
|
|
649
|
-
${yt(
|
|
649
|
+
${yt(Ci.size,Ai.iconSize)};
|
|
650
|
+
${yt(Ci.color,"var(--ft-button-internal-color)")};
|
|
650
651
|
}
|
|
651
|
-
`];var
|
|
652
|
+
`];var Hi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ki extends $t{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=Ui.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!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-no-text-select":!0};return this.addTooltipIfNeeded(q`
|
|
652
653
|
<button part="button"
|
|
653
|
-
class="${
|
|
654
|
+
class="${ri(t)}"
|
|
654
655
|
aria-label="${this.getLabel()}"
|
|
655
656
|
?disabled=${this.isDisabled()}>
|
|
656
657
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
657
658
|
<ft-typography part="label"
|
|
658
659
|
variant="button"
|
|
659
660
|
element="span"
|
|
660
|
-
class="ft-button--label"
|
|
661
|
+
class="ft-button--label ${Et?"ft-safari-ellipsis-fix":""}"
|
|
661
662
|
?hidden=${!this.hasTextContent()}>
|
|
662
663
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
663
664
|
</ft-typography>
|
|
@@ -671,14 +672,14 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
671
672
|
</ft-tooltip>
|
|
672
673
|
`:t}resolveIcon(){return this.loading?q`
|
|
673
674
|
<ft-loader></ft-loader> `:this.icon?q`
|
|
674
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}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}}
|
|
675
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}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}}Ki.elementDefinitions={"ft-ripple":bi,"ft-tooltip":Si,"ft-typography":Ke,"ft-icon":Di,"ft-loader":Ni},Ki.styles=[kt,Wi],Hi([o({type:Boolean})],Ki.prototype,"primary",void 0),Hi([o({type:Boolean})],Ki.prototype,"outlined",void 0),Hi([o({type:Boolean})],Ki.prototype,"disabled",void 0),Hi([o({type:Boolean})],Ki.prototype,"dense",void 0),Hi([o({type:Boolean})],Ki.prototype,"round",void 0),Hi([o({type:String})],Ki.prototype,"label",void 0),Hi([o({type:String})],Ki.prototype,"icon",void 0),Hi([o({type:String})],Ki.prototype,"iconVariant",void 0),Hi([o({type:Boolean})],Ki.prototype,"trailingIcon",void 0),Hi([o({type:Boolean})],Ki.prototype,"loading",void 0),Hi([o({type:String})],Ki.prototype,"tooltipPosition",void 0),Hi([o({type:Boolean})],Ki.prototype,"hideTooltip",void 0),Hi([o({type:Boolean})],Ki.prototype,"forceTooltip",void 0),Hi([n(".ft-button")],Ki.prototype,"button",void 0),Hi([n(".ft-button--label slot")],Ki.prototype,"slottedContent",void 0),c("ft-button")(Ki);const Vi=xt.extend("--ft-checkbox-text-color",gt.colorOnSurfaceHigh),Zi=xt.external(gt.colorPrimary,"Design system"),Ji=xt.external(gt.colorOnPrimary,"Design system"),qi=xt.extend("--ft-checkbox-border-color",gt.colorOnSurfaceMedium),Xi=xt.external(gt.colorOnSurfaceDisabled,"Design system"),Yi=y`
|
|
675
676
|
* {
|
|
676
677
|
box-sizing: border-box;
|
|
677
678
|
}
|
|
678
679
|
|
|
679
680
|
.ft-checkbox {
|
|
680
681
|
box-sizing: border-box;
|
|
681
|
-
color: ${
|
|
682
|
+
color: ${Vi};
|
|
682
683
|
|
|
683
684
|
display: inline-flex;
|
|
684
685
|
align-items: center;
|
|
@@ -686,7 +687,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
686
687
|
}
|
|
687
688
|
|
|
688
689
|
.ft-checkbox--disabled {
|
|
689
|
-
color: ${
|
|
690
|
+
color: ${Xi};
|
|
690
691
|
}
|
|
691
692
|
|
|
692
693
|
input {
|
|
@@ -710,26 +711,26 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
710
711
|
|
|
711
712
|
.ft-checkbox--box {
|
|
712
713
|
display: flex;
|
|
713
|
-
border: 2px solid ${
|
|
714
|
+
border: 2px solid ${qi};
|
|
714
715
|
border-radius: 2px;
|
|
715
716
|
|
|
716
717
|
width: 18px;
|
|
717
718
|
height: 18px;
|
|
718
719
|
|
|
719
|
-
color: ${
|
|
720
|
+
color: ${Ji};
|
|
720
721
|
}
|
|
721
722
|
|
|
722
723
|
|
|
723
724
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
724
725
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
725
|
-
border-color: ${
|
|
726
|
-
background-color: ${
|
|
726
|
+
border-color: ${Zi};
|
|
727
|
+
background-color: ${Zi};
|
|
727
728
|
}
|
|
728
729
|
|
|
729
730
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
730
|
-
border-color: ${
|
|
731
|
+
border-color: ${Xi};
|
|
731
732
|
background-color: transparent;
|
|
732
|
-
color: ${
|
|
733
|
+
color: ${Xi};
|
|
733
734
|
}
|
|
734
735
|
|
|
735
736
|
.ft-checkbox--checkmark {
|
|
@@ -748,8 +749,8 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
748
749
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
749
750
|
opacity: 1;
|
|
750
751
|
}
|
|
751
|
-
`;var
|
|
752
|
-
<label class="${
|
|
752
|
+
`;var Gi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Qi extends $t{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 q`
|
|
753
|
+
<label class="${ri(t)}" for="checkbox-input">
|
|
753
754
|
<div class="ft-checkbox--box-container">
|
|
754
755
|
<ft-ripple
|
|
755
756
|
?disabled=${this.disabled}
|
|
@@ -774,14 +775,14 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
774
775
|
<slot></slot>
|
|
775
776
|
</ft-typography>
|
|
776
777
|
</label>
|
|
777
|
-
`}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)}}
|
|
778
|
+
`}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":bi,"ft-typography":Ke},Qi.styles=Yi,Gi([o()],Qi.prototype,"name",void 0),Gi([o({type:Boolean,reflect:!0})],Qi.prototype,"checked",void 0),Gi([o({type:Boolean})],Qi.prototype,"indeterminate",void 0),Gi([o({type:Boolean})],Qi.prototype,"disabled",void 0),Gi([n(".ft-checkbox")],Qi.prototype,"container",void 0),Gi([n("ft-ripple")],Qi.prototype,"ripple",void 0),c("ft-checkbox")(Qi);const to=xt.extend("--ft-radio-text-color",gt.colorOnSurfaceHigh),eo=xt.external(gt.colorPrimary,"Design system"),io=(xt.external(gt.colorOnPrimary,"Design system"),xt.extend("--ft-radio-border-color",gt.colorOnSurfaceMedium)),oo=xt.external(gt.colorOnSurfaceDisabled,"Design system"),so=y`
|
|
778
779
|
* {
|
|
779
780
|
box-sizing: border-box;
|
|
780
781
|
}
|
|
781
782
|
|
|
782
783
|
.ft-radio {
|
|
783
784
|
box-sizing: border-box;
|
|
784
|
-
color: ${
|
|
785
|
+
color: ${to};
|
|
785
786
|
|
|
786
787
|
display: inline-flex;
|
|
787
788
|
align-items: center;
|
|
@@ -789,7 +790,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
789
790
|
}
|
|
790
791
|
|
|
791
792
|
.ft-radio--disabled {
|
|
792
|
-
color: ${
|
|
793
|
+
color: ${oo};
|
|
793
794
|
}
|
|
794
795
|
|
|
795
796
|
input {
|
|
@@ -812,7 +813,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
812
813
|
}
|
|
813
814
|
|
|
814
815
|
.ft-radio--box {
|
|
815
|
-
border: 2px solid ${
|
|
816
|
+
border: 2px solid ${io};
|
|
816
817
|
border-radius: 50%;
|
|
817
818
|
|
|
818
819
|
display: flex;
|
|
@@ -825,7 +826,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
825
826
|
|
|
826
827
|
.ft-radio--box:after {
|
|
827
828
|
content: " ";
|
|
828
|
-
background-color: ${
|
|
829
|
+
background-color: ${eo};
|
|
829
830
|
|
|
830
831
|
border-radius: 50%;
|
|
831
832
|
|
|
@@ -837,7 +838,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
837
838
|
}
|
|
838
839
|
|
|
839
840
|
.ft-radio--checked .ft-radio--box {
|
|
840
|
-
border-color: ${
|
|
841
|
+
border-color: ${eo};
|
|
841
842
|
}
|
|
842
843
|
|
|
843
844
|
|
|
@@ -846,15 +847,15 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
846
847
|
}
|
|
847
848
|
|
|
848
849
|
.ft-radio--disabled .ft-radio--box {
|
|
849
|
-
border-color: ${
|
|
850
|
+
border-color: ${oo};
|
|
850
851
|
background-color: transparent;
|
|
851
852
|
}
|
|
852
853
|
|
|
853
854
|
.ft-radio--disabled .ft-radio--box:after {
|
|
854
|
-
background-color: ${
|
|
855
|
+
background-color: ${oo};
|
|
855
856
|
}
|
|
856
|
-
`;var
|
|
857
|
-
<div class="${
|
|
857
|
+
`;var ro=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class no extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class lo extends $t{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 q`
|
|
858
|
+
<div class="${ri(t)}">
|
|
858
859
|
<div class="ft-radio--box-container">
|
|
859
860
|
<ft-ripple
|
|
860
861
|
?disabled=${this.disabled}
|
|
@@ -878,17 +879,17 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
878
879
|
</ft-typography>
|
|
879
880
|
</label>
|
|
880
881
|
</div>
|
|
881
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
882
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new no(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 no(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}lo.elementDefinitions={"ft-ripple":bi,"ft-typography":Ke},lo.styles=so,ro([o()],lo.prototype,"value",void 0),ro([o()],lo.prototype,"name",void 0),ro([o({type:Boolean,reflect:!0})],lo.prototype,"checked",void 0),ro([o({type:Boolean})],lo.prototype,"disabled",void 0),ro([n(".ft-radio")],lo.prototype,"container",void 0),ro([n("ft-ripple")],lo.prototype,"ripple",void 0),ro([n("input")],lo.prototype,"input",void 0);const ao=y`
|
|
882
883
|
:host {
|
|
883
884
|
display: contents;
|
|
884
885
|
}
|
|
885
|
-
`;var
|
|
886
|
+
`;var ho=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class co extends $t{constructor(){super(...arguments),this.name=""}render(){return q`
|
|
886
887
|
<slot @slotchange=${this.onSlotChange}
|
|
887
888
|
@change=${this.onChange}
|
|
888
889
|
@keydown=${this.onKeyDown}
|
|
889
890
|
@focusin=${this.focusCurrentValue}
|
|
890
891
|
></slot>
|
|
891
|
-
`}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)}}
|
|
892
|
+
`}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)}}co.elementDefinitions={},co.styles=ao,ho([o()],co.prototype,"name",void 0),ho([h()],co.prototype,"radioButtons",void 0),c("ft-radio")(lo),c("ft-radio-group")(co);const po={borderRadiusM:xt.external(gt.borderRadiusM,"Design system"),colorOutline:xt.external(gt.colorOutline,"Design system"),colorOnSurface:xt.external(gt.colorOnSurface,"Design system"),colorOnSurfaceMedium:xt.external(gt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:xt.external(gt.colorOnSurfaceDisabled,"Design system"),colorPrimary:xt.external(gt.colorPrimary,"Design system"),colorOnPrimary:xt.external(gt.colorOnPrimary,"Design system"),fontFamily:xt.external(fe.fontFamily,"Body2 typography"),fontSize:xt.external(fe.fontSize,"Body2 typography"),fontWeight:xt.external(fe.fontWeight,"Body2 typography"),letterSpacing:xt.external(fe.letterSpacing,"Body2 typography"),lineHeight:xt.external(fe.lineHeight,"Body2 typography"),textTransform:xt.external(fe.textTransform,"Body2 typography")},fo=y`
|
|
892
893
|
.ft-filter-level--container {
|
|
893
894
|
display: flex;
|
|
894
895
|
flex-direction: column;
|
|
@@ -902,14 +903,14 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
902
903
|
flex-shrink: 0;
|
|
903
904
|
text-decoration: none;
|
|
904
905
|
position: relative;
|
|
905
|
-
border-radius: ${
|
|
906
|
+
border-radius: ${po.borderRadiusM};
|
|
906
907
|
overflow: hidden;
|
|
907
908
|
display: flex;
|
|
908
909
|
align-items: center;
|
|
909
910
|
padding: 4px 4px;
|
|
910
911
|
gap: 4px;
|
|
911
912
|
cursor: pointer;
|
|
912
|
-
color: ${
|
|
913
|
+
color: ${po.colorOnSurface};
|
|
913
914
|
}
|
|
914
915
|
|
|
915
916
|
.ft-filter-level--go-back:focus {
|
|
@@ -938,7 +939,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
938
939
|
}
|
|
939
940
|
|
|
940
941
|
ft-button {
|
|
941
|
-
${yt(
|
|
942
|
+
${yt(Ai.color,po.colorOnSurface)};
|
|
942
943
|
}
|
|
943
944
|
|
|
944
945
|
ft-radio, ft-checkbox {
|
|
@@ -952,9 +953,9 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
952
953
|
|
|
953
954
|
.ft-filter-level--no-values {
|
|
954
955
|
margin: 10px 0;
|
|
955
|
-
color: ${
|
|
956
|
+
color: ${po.colorOnSurfaceMedium};
|
|
956
957
|
}
|
|
957
|
-
`;var
|
|
958
|
+
`;var uo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class vo extends $t{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 q`
|
|
958
959
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
959
960
|
${null==this.parent?null:q`
|
|
960
961
|
<div tabindex="0"
|
|
@@ -973,7 +974,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
973
974
|
${this.noValuesLabel}
|
|
974
975
|
</ft-typography>
|
|
975
976
|
`:Y}
|
|
976
|
-
${
|
|
977
|
+
${si(e,(t=>t.value),(t=>{var e;return q`
|
|
977
978
|
<div class="ft-filter-level--option" part="options">
|
|
978
979
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
979
980
|
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?Y:q`
|
|
@@ -1003,7 +1004,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1003
1004
|
data-value="${t.value}"
|
|
1004
1005
|
.checked=${t.selected}
|
|
1005
1006
|
.disabled=${this.disabled}
|
|
1006
|
-
.indeterminate=${
|
|
1007
|
+
.indeterminate=${Ve(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
1007
1008
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
1008
1009
|
${t.renderOption?t.renderOption:t.label}
|
|
1009
1010
|
</ft-checkbox>
|
|
@@ -1018,7 +1019,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1018
1019
|
@change=${t=>t.stopPropagation()}>
|
|
1019
1020
|
${t.renderOption?t.renderOption:t.label}
|
|
1020
1021
|
</ft-radio>
|
|
1021
|
-
`}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}))}}
|
|
1022
|
+
`}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}))}}vo.elementDefinitions={"ft-button":Ki,"ft-ripple":bi,"ft-typography":Ke,"ft-checkbox":Qi,"ft-icon":Di,"ft-radio":lo},vo.styles=fo,uo([o({type:String})],vo.prototype,"id",void 0),uo([o({type:Object})],vo.prototype,"parent",void 0),uo([o({type:Array})],vo.prototype,"options",void 0),uo([o({type:Boolean})],vo.prototype,"multivalued",void 0),uo([o({type:Boolean})],vo.prototype,"disabled",void 0),uo([o({type:Boolean})],vo.prototype,"hideSelectedOptions",void 0),uo([o({type:Boolean})],vo.prototype,"preventNavigation",void 0),uo([o({type:String})],vo.prototype,"filter",void 0),uo([o({type:String})],vo.prototype,"moreValuesButtonLabel",void 0),uo([o({type:String})],vo.prototype,"noValuesLabel",void 0),uo([o({type:Number})],vo.prototype,"displayedValuesLimit",void 0),uo([n(".ft-filter-level--container")],vo.prototype,"container",void 0),uo([s()],vo.prototype,"displayedPages",void 0);const bo={buttonsColor:xt.extend("--ft-snap-scroll-buttons-color",gt.colorPrimary),buttonsZIndex:xt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:xt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:xt.external(gt.colorSurface,"Design system")},xo=y`
|
|
1022
1023
|
.ft-snap-scroll {
|
|
1023
1024
|
box-sizing: border-box;
|
|
1024
1025
|
position: relative;
|
|
@@ -1053,7 +1054,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1053
1054
|
flex-wrap: nowrap;
|
|
1054
1055
|
align-items: flex-start;
|
|
1055
1056
|
justify-content: flex-start;
|
|
1056
|
-
gap: ${
|
|
1057
|
+
gap: ${bo.gap};
|
|
1057
1058
|
}
|
|
1058
1059
|
|
|
1059
1060
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1096,11 +1097,11 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1096
1097
|
.ft-snap-scroll--next {
|
|
1097
1098
|
position: absolute;
|
|
1098
1099
|
display: flex;
|
|
1099
|
-
z-index: ${
|
|
1100
|
+
z-index: ${bo.buttonsZIndex};
|
|
1100
1101
|
opacity: 1;
|
|
1101
1102
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1102
|
-
${yt(
|
|
1103
|
-
${yt(
|
|
1103
|
+
${yt(Ai.backgroundColor,"transparent")};
|
|
1104
|
+
${yt(Ai.color,bo.buttonsColor)};
|
|
1104
1105
|
}
|
|
1105
1106
|
|
|
1106
1107
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1113,37 +1114,37 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1113
1114
|
top: 0;
|
|
1114
1115
|
left: -1px;
|
|
1115
1116
|
bottom: 0;
|
|
1116
|
-
background: linear-gradient(to right, ${
|
|
1117
|
+
background: linear-gradient(to right, ${bo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1117
1118
|
}
|
|
1118
1119
|
|
|
1119
1120
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1120
1121
|
top: -1px;
|
|
1121
1122
|
left: 0;
|
|
1122
1123
|
right: 0;
|
|
1123
|
-
background: linear-gradient(to bottom, ${
|
|
1124
|
+
background: linear-gradient(to bottom, ${bo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1124
1125
|
}
|
|
1125
1126
|
|
|
1126
1127
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1127
1128
|
top: 0;
|
|
1128
1129
|
right: -1px;
|
|
1129
1130
|
bottom: 0;
|
|
1130
|
-
background: linear-gradient(to left, ${
|
|
1131
|
+
background: linear-gradient(to left, ${bo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1131
1132
|
}
|
|
1132
1133
|
|
|
1133
1134
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1134
1135
|
left: 0;
|
|
1135
1136
|
right: 0;
|
|
1136
1137
|
bottom: -1px;
|
|
1137
|
-
background: linear-gradient(to top, ${
|
|
1138
|
+
background: linear-gradient(to top, ${bo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1138
1139
|
}
|
|
1139
1140
|
|
|
1140
1141
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1141
1142
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1142
1143
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1143
1144
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1144
|
-
background-color: ${
|
|
1145
|
+
background-color: ${bo.colorSurface};
|
|
1145
1146
|
}
|
|
1146
|
-
`;var
|
|
1147
|
+
`;var yo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class go extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class mo extends $t{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=ri({"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":Et}),e=this.controls&&this.withScroll;return q`
|
|
1147
1148
|
<div part="container" class="${t}">
|
|
1148
1149
|
<ft-button
|
|
1149
1150
|
class="ft-snap-scroll--previous"
|
|
@@ -1167,7 +1168,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1167
1168
|
@click=${this.next}
|
|
1168
1169
|
></ft-button>
|
|
1169
1170
|
</div>
|
|
1170
|
-
`}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
|
|
1171
|
+
`}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 go(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)}}mo.elementDefinitions={"ft-button":Ki},mo.styles=xo,yo([o({type:Boolean})],mo.prototype,"horizontal",void 0),yo([o({type:Boolean})],mo.prototype,"hideScrollbar",void 0),yo([o({type:Boolean})],mo.prototype,"controls",void 0),yo([o({type:Boolean})],mo.prototype,"limitSize",void 0),yo([s()],mo.prototype,"elements",void 0),yo([s()],mo.prototype,"currentElement",void 0),yo([s()],mo.prototype,"withScroll",void 0),yo([s()],mo.prototype,"startReached",void 0),yo([s()],mo.prototype,"endReached",void 0),yo([n(".ft-snap-scroll--content")],mo.prototype,"contentSlot",void 0),c("ft-snap-scroll")(mo);const $o={colorOutline:xt.external(gt.colorOutline,"Design system"),colorOnSurface:xt.external(gt.colorOnSurface,"Design system"),colorOnSurfaceMedium:xt.external(gt.colorOnSurfaceMedium,"Design system"),colorPrimary:xt.external(gt.colorPrimary,"Design system"),colorSurface:xt.external(gt.colorSurface,"Design system"),transitionDuration:xt.external(gt.transitionDuration,"Design system"),transitionTimingFunction:xt.external(gt.transitionTimingFunction,"Design system")},wo=[Ae,y`
|
|
1171
1172
|
:host {
|
|
1172
1173
|
display: flex;
|
|
1173
1174
|
max-height: 100%;
|
|
@@ -1180,7 +1181,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1180
1181
|
flex-direction: column;
|
|
1181
1182
|
max-height: 100%;
|
|
1182
1183
|
max-width: 100%;
|
|
1183
|
-
color: ${
|
|
1184
|
+
color: ${$o.colorOnSurface};
|
|
1184
1185
|
}
|
|
1185
1186
|
|
|
1186
1187
|
.ft-filter--header {
|
|
@@ -1190,13 +1191,13 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1190
1191
|
flex-shrink: 0;
|
|
1191
1192
|
padding: 0 10px;
|
|
1192
1193
|
margin-bottom: 8px;
|
|
1193
|
-
${yt(
|
|
1194
|
+
${yt(Lt.fontSize,"14px")};
|
|
1194
1195
|
}
|
|
1195
1196
|
|
|
1196
1197
|
.ft-filter--header ft-button {
|
|
1197
1198
|
flex-shrink: 0;
|
|
1198
1199
|
margin-left: auto;
|
|
1199
|
-
${yt(
|
|
1200
|
+
${yt(Ai.iconSize,"18px")};
|
|
1200
1201
|
}
|
|
1201
1202
|
|
|
1202
1203
|
.ft-filter--label {
|
|
@@ -1204,8 +1205,8 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1204
1205
|
flex-shrink: 1;
|
|
1205
1206
|
flex-grow: 1;
|
|
1206
1207
|
word-break: break-word;
|
|
1207
|
-
${yt(
|
|
1208
|
-
${yt(
|
|
1208
|
+
${yt(Lt.lineHeight,"22px")};
|
|
1209
|
+
${yt(Lt.fontWeight,"bold")};
|
|
1209
1210
|
}
|
|
1210
1211
|
|
|
1211
1212
|
.ft-filter--filter {
|
|
@@ -1216,8 +1217,8 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1216
1217
|
padding: 0 10px;
|
|
1217
1218
|
overflow: hidden;
|
|
1218
1219
|
height: 32px;
|
|
1219
|
-
transition: height ${
|
|
1220
|
-
margin ${
|
|
1220
|
+
transition: height ${$o.transitionDuration} ${$o.transitionTimingFunction},
|
|
1221
|
+
margin ${$o.transitionDuration} ${$o.transitionTimingFunction};
|
|
1221
1222
|
transition-delay: 500ms;
|
|
1222
1223
|
}
|
|
1223
1224
|
|
|
@@ -1230,15 +1231,15 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1230
1231
|
display: block;
|
|
1231
1232
|
width: 100%;
|
|
1232
1233
|
border-radius: 4px;
|
|
1233
|
-
border: 1px solid ${
|
|
1234
|
+
border: 1px solid ${$o.colorOutline};
|
|
1234
1235
|
padding: 4px;
|
|
1235
|
-
background-color: ${
|
|
1236
|
-
color: ${
|
|
1237
|
-
outline-color: ${
|
|
1236
|
+
background-color: ${$o.colorSurface};
|
|
1237
|
+
color: ${$o.colorOnSurface};
|
|
1238
|
+
outline-color: ${$o.colorPrimary};
|
|
1238
1239
|
}
|
|
1239
1240
|
|
|
1240
1241
|
input::placeholder {
|
|
1241
|
-
color: ${
|
|
1242
|
+
color: ${$o.colorOnSurfaceMedium};
|
|
1242
1243
|
}
|
|
1243
1244
|
|
|
1244
1245
|
input:placeholder-shown {
|
|
@@ -1254,7 +1255,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1254
1255
|
}
|
|
1255
1256
|
|
|
1256
1257
|
.ft-filter--separator {
|
|
1257
|
-
border-top: 1px solid ${
|
|
1258
|
+
border-top: 1px solid ${$o.colorOutline};
|
|
1258
1259
|
margin: 4px 10px;
|
|
1259
1260
|
}
|
|
1260
1261
|
|
|
@@ -1279,7 +1280,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1279
1280
|
slot {
|
|
1280
1281
|
display: none;
|
|
1281
1282
|
}
|
|
1282
|
-
`];var
|
|
1283
|
+
`];var ko=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Oo extends CustomEvent{constructor(t){super("change",{detail:t})}}class So extends $t{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.hideClearButton=!1,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 Ve(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e,s=this.filterPlaceHolder.replace("{0}",this.label);return q`
|
|
1283
1284
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1284
1285
|
part="container">
|
|
1285
1286
|
${this.label||i?q`
|
|
@@ -1349,6 +1350,6 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
|
|
|
1349
1350
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1350
1351
|
noValuesLabel="${this.noValuesLabel}"
|
|
1351
1352
|
></ft-filter-level>
|
|
1352
|
-
`}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;this.dispatchEvent(new
|
|
1353
|
+
`}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;this.dispatchEvent(new Oo(this.selectedValues)),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)}}So.elementDefinitions={"ft-button":Ki,"ft-filter-level":vo,"ft-snap-scroll":mo,"ft-typography":Ke},So.styles=wo,ko([o({type:String})],So.prototype,"id",void 0),ko([o({type:String})],So.prototype,"label",void 0),ko([o({type:String})],So.prototype,"filterPlaceHolder",void 0),ko([o({type:String})],So.prototype,"clearButtonLabel",void 0),ko([o({type:String})],So.prototype,"moreValuesButtonLabel",void 0),ko([o({type:String})],So.prototype,"noValuesLabel",void 0),ko([p([])],So.prototype,"options",void 0),ko([o({type:Boolean})],So.prototype,"multivalued",void 0),ko([o({type:Boolean})],So.prototype,"disabled",void 0),ko([o({type:Boolean})],So.prototype,"raiseSelectedOptions",void 0),ko([o({type:Number})],So.prototype,"displayedValuesLimit",void 0),ko([o({type:Boolean})],So.prototype,"hideClearButton",void 0),ko([n(".ft-filter--slot")],So.prototype,"slotElement",void 0),ko([n(".ft-filter--container")],So.prototype,"container",void 0),ko([n(".ft-filter--values")],So.prototype,"valuesContainer",void 0),ko([n(".ft-filter--levels")],So.prototype,"levelsContainer",void 0),ko([n(".ft-filter--levels ft-filter-level:last-child")],So.prototype,"lastLevel",void 0),ko([n(".ft-filter--filter input")],So.prototype,"filterInput",void 0),ko([function(t){return r({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")],So.prototype,"levels",void 0),ko([s()],So.prototype,"withScroll",void 0),ko([s()],So.prototype,"filter",void 0),ko([s()],So.prototype,"slideIn",void 0),ko([s()],So.prototype,"slideOut",void 0);var Co=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Eo extends $t{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return q`
|
|
1353
1354
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1354
|
-
`}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}))}}
|
|
1355
|
+
`}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}))}}Eo.elementDefinitions={},Co([o({type:String})],Eo.prototype,"label",void 0),Co([o({type:Object,converter:t=>t})],Eo.prototype,"value",void 0),Co([o({type:Boolean,reflect:!0})],Eo.prototype,"selected",void 0),Co([o({type:Object})],Eo.prototype,"subOptions",void 0),Co([p({})],Eo.prototype,"renderOption",void 0),Co([n(".ft-filter-option--slot")],Eo.prototype,"slotElement",void 0),c("ft-filter")(So),c("ft-filter-option")(Eo),t.FtFilter=So,t.FtFilterChangeEvent=Oo,t.FtFilterCssVariables=$o,t.FtFilterOption=Eo,t.styles=wo,Object.defineProperty(t,"i",{value:!0})}({});
|