@fluid-topics/ft-collapsible 0.3.53 → 0.3.55
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-collapsible.light.js +4 -14
- package/build/ft-collapsible.min.js +159 -158
- package/package.json +4 -4
|
@@ -489,17 +489,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
489
489
|
${i.setVariable(li.fontSize,"1em")};
|
|
490
490
|
${i.setVariable(li.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
491
491
|
}
|
|
492
|
-
|
|
493
|
-
.ft-button--safari-fix .ft-button--label {
|
|
494
|
-
margin-right: 0;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
498
|
-
content: "\\0000a0";
|
|
499
|
-
display: inline-block;
|
|
500
|
-
width: 0;
|
|
501
|
-
}
|
|
502
|
-
|
|
492
|
+
|
|
503
493
|
.ft-button--label[hidden] {
|
|
504
494
|
display: none;
|
|
505
495
|
}
|
|
@@ -523,7 +513,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
523
513
|
${i.setVariable(Bi.size,Hi.iconSize)};
|
|
524
514
|
${i.setVariable(Bi.color,"var(--ft-button-internal-color)")};
|
|
525
515
|
}
|
|
526
|
-
`];var Ki=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Pi extends i.FtLitElement{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=Ri.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-
|
|
516
|
+
`];var Ki=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Pi extends i.FtLitElement{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=Ri.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(e.html`
|
|
527
517
|
<button part="button"
|
|
528
518
|
class="${n.classMap(t)}"
|
|
529
519
|
aria-label="${this.getLabel()}"
|
|
@@ -532,7 +522,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
532
522
|
<ft-typography part="label"
|
|
533
523
|
variant="button"
|
|
534
524
|
element="span"
|
|
535
|
-
class="ft-button--label"
|
|
525
|
+
class="ft-button--label ${i.isSafari?"ft-safari-ellipsis-fix":""}"
|
|
536
526
|
?hidden=${!this.hasTextContent()}>
|
|
537
527
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
538
528
|
</ft-typography>
|
|
@@ -546,7 +536,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
546
536
|
</ft-tooltip>
|
|
547
537
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
548
538
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
549
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}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}}Pi.elementDefinitions={"ft-ripple":x,"ft-tooltip":ji,"ft-typography":mi,"ft-icon":Ui,"ft-loader":Ti},Pi.styles=Gi,Ki([o.property({type:Boolean})],Pi.prototype,"primary",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"outlined",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"disabled",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"dense",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"round",void 0),Ki([o.property({type:String})],Pi.prototype,"label",void 0),Ki([o.property({type:String})],Pi.prototype,"icon",void 0),Ki([o.property({type:String})],Pi.prototype,"iconVariant",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"trailingIcon",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"loading",void 0),Ki([o.property({type:String})],Pi.prototype,"tooltipPosition",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"hideTooltip",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"forceTooltip",void 0),Ki([o.query(".ft-button")],Pi.prototype,"button",void 0),Ki([o.query(".ft-button--label slot")],Pi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Pi);const Vi=e.css`
|
|
539
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}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}}Pi.elementDefinitions={"ft-ripple":x,"ft-tooltip":ji,"ft-typography":mi,"ft-icon":Ui,"ft-loader":Ti},Pi.styles=[i.safariEllipsisFix,Gi],Ki([o.property({type:Boolean})],Pi.prototype,"primary",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"outlined",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"disabled",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"dense",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"round",void 0),Ki([o.property({type:String})],Pi.prototype,"label",void 0),Ki([o.property({type:String})],Pi.prototype,"icon",void 0),Ki([o.property({type:String})],Pi.prototype,"iconVariant",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"trailingIcon",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"loading",void 0),Ki([o.property({type:String})],Pi.prototype,"tooltipPosition",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"hideTooltip",void 0),Ki([o.property({type:Boolean})],Pi.prototype,"forceTooltip",void 0),Ki([o.query(".ft-button")],Pi.prototype,"button",void 0),Ki([o.query(".ft-button--label slot")],Pi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Pi);const Vi=e.css`
|
|
550
540
|
:host {
|
|
551
541
|
display: contents;
|
|
552
542
|
}
|
|
@@ -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,i=window.customElements.define,e=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);d(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let p=e.call(o,t);p||(p=c(t),i.call(o,t,p)),this===window.customElements&&(r.set(n,h),h.standInClass=p);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)s.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let o=this._awaitingUpgrade.get(i);o||this._awaitingUpgrade.set(i,o=new Set),e?o.add(t):o.delete(t)}},window.HTMLElement=function(){let i=l;if(i)return l=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let i=t.getRootNode();if(!h(i)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),h(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},c=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=p(e)||window.customElements,n=o._getDefinition(i);return n?u(e,n):s.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s,n),e.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},f=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):f(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){f(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let y=[document];const b=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){y.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){y.push(this),e.set.call(this,t),y.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const o=i.call(this,...e);return t.set(o,this),o},e.forEach((i=>{const e=window.ElementInternals.prototype,o=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...i)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),n=i.get(o)||[];this[+e]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new s(i)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);d(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let p=e.call(o,t);p||(p=c(t),i.call(o,t,p)),this===window.customElements&&(r.set(n,h),h.standInClass=p);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)s.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let o=this._awaitingUpgrade.get(i);o||this._awaitingUpgrade.set(i,o=new Set),e?o.add(t):o.delete(t)}},window.HTMLElement=function(){let i=l;if(i)return l=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let i=t.getRootNode();if(!h(i)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),h(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},c=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=p(e)||window.customElements,n=o._getDefinition(i);return n?u(e,n):s.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s,n),e.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},f=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):f(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){f(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let y=[document];const b=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){y.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){y.push(this),e.set.call(this,t),y.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const o=i.call(this,...e);return t.set(o,this),o},e.forEach((i=>{const e=window.ElementInternals.prototype,o=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...i)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),n=i.get(o)||[];this[+e]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new s(i)}})}}try{window.customElements.define("custom-element",null)}catch($e){const t=window.customElements.define;window.customElements.define=(i,e,o)=>{try{t.bind(window.customElements)(i,e,o)}catch(t){console.info(i,e,o,t)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){return this.callbacks=[t],this.debounce(i)}queue(t,i){return this.callbacks.push(t),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,i)=>{this.resolvePromise=t,this.rejectPromise=i}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,i;const e=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(i=this.resolvePromise)&&void 0!==i?i:()=>null;this.clearPromise();for(let t of e)try{await t()}catch(t){return void o(t)}n(!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
|
|
@@ -80,7 +80,7 @@ var pt,ct;class dt extends E{constructor(){super(...arguments),this.renderOption
|
|
|
80
80
|
-ms-user-select: none;
|
|
81
81
|
user-select: none;
|
|
82
82
|
}
|
|
83
|
-
`;
|
|
83
|
+
`;b`
|
|
84
84
|
.ft-word-wrap {
|
|
85
85
|
white-space: normal;
|
|
86
86
|
word-wrap: break-word;
|
|
@@ -92,17 +92,28 @@ var pt,ct;class dt extends E{constructor(){super(...arguments),this.renderOption
|
|
|
92
92
|
-webkit-hyphens: auto;
|
|
93
93
|
hyphens: auto
|
|
94
94
|
}
|
|
95
|
-
`;const
|
|
95
|
+
`;const mt=b`
|
|
96
|
+
.ft-safari-ellipsis-fix {
|
|
97
|
+
margin-right: 0;
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ft-safari-ellipsis-fix:after {
|
|
102
|
+
content: "\\0000a0";
|
|
103
|
+
display: inline-block;
|
|
104
|
+
width: 0;
|
|
105
|
+
}
|
|
106
|
+
`;var wt,$t,Ot;const St=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ot=null===($t=null===(wt=window.safari)||void 0===wt?void 0:wt.pushNotification)||void 0===$t?void 0:$t.toString())&&void 0!==Ot?Ot:""),kt=1,Nt=2,Ct=t=>(...i)=>({_$litDirective$:t,values:i});
|
|
96
107
|
/**
|
|
97
108
|
* @license
|
|
98
109
|
* Copyright 2017 Google LLC
|
|
99
110
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
100
|
-
*/class
|
|
111
|
+
*/class Et{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}
|
|
101
112
|
/**
|
|
102
113
|
* @license
|
|
103
114
|
* Copyright 2018 Google LLC
|
|
104
115
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
105
|
-
*/const
|
|
116
|
+
*/const Rt=Ct(class extends Et{constructor(t){var i;if(super(t),t.type!==kt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.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((i=>t[i])).join(" ")+" "}update(t,[i]){var e,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 i)i[t]&&!(null===(e=this.st)||void 0===e?void 0:e.has(t))&&this.nt.add(t);return this.render(i)}const n=t.element.classList;this.nt.forEach((t=>{t in i||(n.remove(t),this.nt.delete(t))}));for(const t in i){const e=!!i[t];e===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(e?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return J}}),Mt=ut.extend("--ft-ripple-color",yt.colorContent),zt={color:Mt,backgroundColor:ut.extend("--ft-ripple-background-color",Mt),opacityContentOnSurfacePressed:ut.external(yt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ut.external(yt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ut.external(yt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ut.external(yt.opacityContentOnSurfaceSelected,"Design system")},Ut=ut.extend("--ft-ripple-color",yt.colorPrimary),Ft=Ut,jt=ut.extend("--ft-ripple-background-color",Ut),Bt=ut.extend("--ft-ripple-color",yt.colorSecondary),Tt=Bt,At=ut.extend("--ft-ripple-background-color",Bt),Lt=b`
|
|
106
117
|
:host {
|
|
107
118
|
display: contents;
|
|
108
119
|
}
|
|
@@ -124,27 +135,27 @@ var pt,ct;class dt extends E{constructor(){super(...arguments),this.renderOption
|
|
|
124
135
|
}
|
|
125
136
|
|
|
126
137
|
.ft-ripple .ft-ripple--background {
|
|
127
|
-
background-color: ${
|
|
138
|
+
background-color: ${zt.backgroundColor};
|
|
128
139
|
}
|
|
129
140
|
|
|
130
141
|
.ft-ripple .ft-ripple--effect {
|
|
131
|
-
background-color: ${
|
|
142
|
+
background-color: ${zt.color};
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
135
|
-
background-color: ${
|
|
146
|
+
background-color: ${At};
|
|
136
147
|
}
|
|
137
148
|
|
|
138
149
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
139
|
-
background-color: ${
|
|
150
|
+
background-color: ${Tt};
|
|
140
151
|
}
|
|
141
152
|
|
|
142
153
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
143
|
-
background-color: ${
|
|
154
|
+
background-color: ${jt};
|
|
144
155
|
}
|
|
145
156
|
|
|
146
157
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
147
|
-
background-color: ${
|
|
158
|
+
background-color: ${Ft};
|
|
148
159
|
}
|
|
149
160
|
|
|
150
161
|
.ft-ripple .ft-ripple--background {
|
|
@@ -176,22 +187,22 @@ var pt,ct;class dt extends E{constructor(){super(...arguments),this.renderOption
|
|
|
176
187
|
}
|
|
177
188
|
|
|
178
189
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
179
|
-
opacity: ${
|
|
190
|
+
opacity: ${zt.opacityContentOnSurfaceHover};
|
|
180
191
|
}
|
|
181
192
|
|
|
182
193
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
183
|
-
opacity: ${
|
|
194
|
+
opacity: ${zt.opacityContentOnSurfaceSelected};
|
|
184
195
|
}
|
|
185
196
|
|
|
186
197
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
187
|
-
opacity: ${
|
|
198
|
+
opacity: ${zt.opacityContentOnSurfaceFocused};
|
|
188
199
|
}
|
|
189
200
|
|
|
190
201
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
191
|
-
opacity: ${
|
|
202
|
+
opacity: ${zt.opacityContentOnSurfacePressed};
|
|
192
203
|
transform: translate(-50%, -50%) scale(1);
|
|
193
204
|
}
|
|
194
|
-
`;var
|
|
205
|
+
`;var Pt=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class _t extends xt{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 i(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),s=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return V`
|
|
195
206
|
<style>
|
|
196
207
|
.ft-ripple .ft-ripple--effect,
|
|
197
208
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -204,119 +215,119 @@ var pt,ct;class dt extends E{constructor(){super(...arguments),this.renderOption
|
|
|
204
215
|
top: ${this.originY}px;
|
|
205
216
|
}
|
|
206
217
|
</style>
|
|
207
|
-
<div class="${
|
|
218
|
+
<div class="${Rt(t)}">
|
|
208
219
|
<div class="ft-ripple--background"></div>
|
|
209
220
|
<div class="ft-ripple--effect"></div>
|
|
210
221
|
</div>
|
|
211
|
-
`}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 i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
222
|
+
`}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 i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}_t.elementDefinitions={},_t.styles=Lt,Pt([o({type:Boolean})],_t.prototype,"primary",void 0),Pt([o({type:Boolean})],_t.prototype,"secondary",void 0),Pt([o({type:Boolean})],_t.prototype,"unbounded",void 0),Pt([o({type:Boolean})],_t.prototype,"activated",void 0),Pt([o({type:Boolean})],_t.prototype,"selected",void 0),Pt([o({type:Boolean})],_t.prototype,"disabled",void 0),Pt([n()],_t.prototype,"hovered",void 0),Pt([n()],_t.prototype,"focused",void 0),Pt([n()],_t.prototype,"pressed",void 0),Pt([n()],_t.prototype,"rippling",void 0),Pt([n()],_t.prototype,"rippleSize",void 0),Pt([n()],_t.prototype,"originX",void 0),Pt([n()],_t.prototype,"originY",void 0),Pt([r(".ft-ripple")],_t.prototype,"ripple",void 0),Pt([r(".ft-ripple--effect")],_t.prototype,"rippleEffect",void 0),h("ft-ripple")(_t);
|
|
212
223
|
/**
|
|
213
224
|
* @license
|
|
214
225
|
* Copyright 2020 Google LLC
|
|
215
226
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
216
227
|
*/
|
|
217
|
-
const
|
|
228
|
+
const It=Symbol.for(""),Dt=t=>{if((null==t?void 0:t.r)===It)return null==t?void 0:t._$litStatic$},Wt=t=>({_$litStatic$:t,r:It}),Ht=new Map,Kt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(s=e[h],n=Dt(s));)l+=n+i[++h],p=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=Ht.get(t))&&(r.raw=r,Ht.set(t,i=r)),e=a}return t(i,...e)})(V);var Zt;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Zt||(Zt={}));const Vt=ut.extend("--ft-typography-font-family",yt.titleFont),Jt=ut.extend("--ft-typography-font-family",yt.contentFont),qt={fontFamily:Jt,fontSize:ut.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ut.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ut.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ut.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:ut.create("--ft-typography-text-transform","UNKNOWN","inherit")},Xt=ut.extend("--ft-typography-title-font-family",Vt),Gt=ut.extend("--ft-typography-title-font-size",qt.fontSize,"20px"),Yt=ut.extend("--ft-typography-title-font-weight",qt.fontWeight,"normal"),Qt=ut.extend("--ft-typography-title-letter-spacing",qt.letterSpacing,"0.15px"),ti=ut.extend("--ft-typography-title-line-height",qt.lineHeight,"1.2"),ii=ut.extend("--ft-typography-title-text-transform",qt.textTransform,"inherit"),ei=ut.extend("--ft-typography-title-dense-font-family",Vt),oi=ut.extend("--ft-typography-title-dense-font-size",qt.fontSize,"14px"),ni=ut.extend("--ft-typography-title-dense-font-weight",qt.fontWeight,"normal"),si=ut.extend("--ft-typography-title-dense-letter-spacing",qt.letterSpacing,"0.105px"),ri=ut.extend("--ft-typography-title-dense-line-height",qt.lineHeight,"1.7"),ai=ut.extend("--ft-typography-title-dense-text-transform",qt.textTransform,"inherit"),li=ut.extend("--ft-typography-subtitle1-font-family",Jt),hi=ut.extend("--ft-typography-subtitle1-font-size",qt.fontSize,"16px"),pi=ut.extend("--ft-typography-subtitle1-font-weight",qt.fontWeight,"600"),ci=ut.extend("--ft-typography-subtitle1-letter-spacing",qt.letterSpacing,"0.144px"),di=ut.extend("--ft-typography-subtitle1-line-height",qt.lineHeight,"1.5"),fi=ut.extend("--ft-typography-subtitle1-text-transform",qt.textTransform,"inherit"),ui=ut.extend("--ft-typography-subtitle2-font-family",Jt),vi=ut.extend("--ft-typography-subtitle2-font-size",qt.fontSize,"14px"),yi=ut.extend("--ft-typography-subtitle2-font-weight",qt.fontWeight,"normal"),bi=ut.extend("--ft-typography-subtitle2-letter-spacing",qt.letterSpacing,"0.098px"),xi=ut.extend("--ft-typography-subtitle2-line-height",qt.lineHeight,"1.7"),gi=ut.extend("--ft-typography-subtitle2-text-transform",qt.textTransform,"inherit"),mi=ut.extend("--ft-typography-body1-font-family",Jt),wi=ut.extend("--ft-typography-body1-font-size",qt.fontSize,"16px"),$i=ut.extend("--ft-typography-body1-font-weight",qt.fontWeight,"normal"),Oi=ut.extend("--ft-typography-body1-letter-spacing",qt.letterSpacing,"0.496px"),Si=ut.extend("--ft-typography-body1-line-height",qt.lineHeight,"1.5"),ki=ut.extend("--ft-typography-body1-text-transform",qt.textTransform,"inherit"),Ni=ut.extend("--ft-typography-body2-font-family",Jt),Ci=ut.extend("--ft-typography-body2-font-size",qt.fontSize,"14px"),Ei=ut.extend("--ft-typography-body2-font-weight",qt.fontWeight,"normal"),Ri=ut.extend("--ft-typography-body2-letter-spacing",qt.letterSpacing,"0.252px"),Mi=ut.extend("--ft-typography-body2-line-height",qt.lineHeight,"1.4"),zi=ut.extend("--ft-typography-body2-text-transform",qt.textTransform,"inherit"),Ui=ut.extend("--ft-typography-caption-font-family",Jt),Fi=ut.extend("--ft-typography-caption-font-size",qt.fontSize,"12px"),ji=ut.extend("--ft-typography-caption-font-weight",qt.fontWeight,"normal"),Bi=ut.extend("--ft-typography-caption-letter-spacing",qt.letterSpacing,"0.396px"),Ti=ut.extend("--ft-typography-caption-line-height",qt.lineHeight,"1.33"),Ai=ut.extend("--ft-typography-caption-text-transform",qt.textTransform,"inherit"),Li=ut.extend("--ft-typography-breadcrumb-font-family",Jt),Pi=ut.extend("--ft-typography-breadcrumb-font-size",qt.fontSize,"10px"),_i=ut.extend("--ft-typography-breadcrumb-font-weight",qt.fontWeight,"normal"),Ii=ut.extend("--ft-typography-breadcrumb-letter-spacing",qt.letterSpacing,"0.33px"),Di=ut.extend("--ft-typography-breadcrumb-line-height",qt.lineHeight,"1.6"),Wi=ut.extend("--ft-typography-breadcrumb-text-transform",qt.textTransform,"inherit"),Hi=ut.extend("--ft-typography-overline-font-family",Jt),Ki=ut.extend("--ft-typography-overline-font-size",qt.fontSize,"10px"),Zi=ut.extend("--ft-typography-overline-font-weight",qt.fontWeight,"normal"),Vi=ut.extend("--ft-typography-overline-letter-spacing",qt.letterSpacing,"1.5px"),Ji=ut.extend("--ft-typography-overline-line-height",qt.lineHeight,"1.6"),qi=ut.extend("--ft-typography-overline-text-transform",qt.textTransform,"uppercase"),Xi={fontFamily:ut.extend("--ft-typography-button-font-family",Jt),fontSize:ut.extend("--ft-typography-button-font-size",qt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-button-font-weight",qt.fontWeight,"600"),letterSpacing:ut.extend("--ft-typography-button-letter-spacing",qt.letterSpacing,"1.246px"),lineHeight:ut.extend("--ft-typography-button-line-height",qt.lineHeight,"1.15"),textTransform:ut.extend("--ft-typography-button-text-transform",qt.textTransform,"uppercase")},Gi=b`
|
|
218
229
|
.ft-typography--title {
|
|
219
|
-
font-family: ${
|
|
220
|
-
font-size: ${
|
|
221
|
-
font-weight: ${
|
|
222
|
-
letter-spacing: ${
|
|
223
|
-
line-height: ${
|
|
224
|
-
text-transform: ${
|
|
225
|
-
}
|
|
226
|
-
`,Gi=b`
|
|
227
|
-
.ft-typography--title-dense {
|
|
228
|
-
font-family: ${ii};
|
|
229
|
-
font-size: ${ei};
|
|
230
|
-
font-weight: ${oi};
|
|
231
|
-
letter-spacing: ${ni};
|
|
232
|
-
line-height: ${si};
|
|
233
|
-
text-transform: ${ri};
|
|
230
|
+
font-family: ${Xt};
|
|
231
|
+
font-size: ${Gt};
|
|
232
|
+
font-weight: ${Yt};
|
|
233
|
+
letter-spacing: ${Qt};
|
|
234
|
+
line-height: ${ti};
|
|
235
|
+
text-transform: ${ii};
|
|
234
236
|
}
|
|
235
237
|
`,Yi=b`
|
|
236
|
-
.ft-typography--
|
|
237
|
-
font-family: ${
|
|
238
|
-
font-size: ${
|
|
239
|
-
font-weight: ${
|
|
240
|
-
letter-spacing: ${
|
|
241
|
-
line-height: ${
|
|
242
|
-
text-transform: ${
|
|
238
|
+
.ft-typography--title-dense {
|
|
239
|
+
font-family: ${ei};
|
|
240
|
+
font-size: ${oi};
|
|
241
|
+
font-weight: ${ni};
|
|
242
|
+
letter-spacing: ${si};
|
|
243
|
+
line-height: ${ri};
|
|
244
|
+
text-transform: ${ai};
|
|
243
245
|
}
|
|
244
246
|
`,Qi=b`
|
|
245
|
-
.ft-typography--
|
|
246
|
-
font-family: ${
|
|
247
|
-
font-size: ${
|
|
248
|
-
font-weight: ${
|
|
249
|
-
letter-spacing: ${
|
|
250
|
-
line-height: ${
|
|
251
|
-
text-transform: ${
|
|
247
|
+
.ft-typography--subtitle1 {
|
|
248
|
+
font-family: ${li};
|
|
249
|
+
font-size: ${hi};
|
|
250
|
+
font-weight: ${pi};
|
|
251
|
+
letter-spacing: ${ci};
|
|
252
|
+
line-height: ${di};
|
|
253
|
+
text-transform: ${fi};
|
|
252
254
|
}
|
|
253
|
-
|
|
254
255
|
`,te=b`
|
|
255
|
-
.ft-typography--
|
|
256
|
-
font-family: ${
|
|
257
|
-
font-size: ${
|
|
258
|
-
font-weight: ${
|
|
259
|
-
letter-spacing: ${
|
|
260
|
-
line-height: ${
|
|
261
|
-
text-transform: ${
|
|
256
|
+
.ft-typography--subtitle2 {
|
|
257
|
+
font-family: ${ui};
|
|
258
|
+
font-size: ${vi};
|
|
259
|
+
font-weight: ${yi};
|
|
260
|
+
letter-spacing: ${bi};
|
|
261
|
+
line-height: ${xi};
|
|
262
|
+
text-transform: ${gi};
|
|
262
263
|
}
|
|
264
|
+
|
|
263
265
|
`,ie=b`
|
|
264
|
-
.ft-typography--
|
|
265
|
-
font-family: ${
|
|
266
|
-
font-size: ${
|
|
267
|
-
font-weight: ${
|
|
268
|
-
letter-spacing: ${
|
|
269
|
-
line-height: ${
|
|
270
|
-
text-transform: ${
|
|
266
|
+
.ft-typography--body1 {
|
|
267
|
+
font-family: ${mi};
|
|
268
|
+
font-size: ${wi};
|
|
269
|
+
font-weight: ${$i};
|
|
270
|
+
letter-spacing: ${Oi};
|
|
271
|
+
line-height: ${Si};
|
|
272
|
+
text-transform: ${ki};
|
|
271
273
|
}
|
|
272
274
|
`,ee=b`
|
|
273
|
-
.ft-typography--
|
|
274
|
-
font-family: ${
|
|
275
|
-
font-size: ${
|
|
276
|
-
font-weight: ${
|
|
277
|
-
letter-spacing: ${
|
|
278
|
-
line-height: ${
|
|
279
|
-
text-transform: ${
|
|
275
|
+
.ft-typography--body2 {
|
|
276
|
+
font-family: ${Ni};
|
|
277
|
+
font-size: ${Ci};
|
|
278
|
+
font-weight: ${Ei};
|
|
279
|
+
letter-spacing: ${Ri};
|
|
280
|
+
line-height: ${Mi};
|
|
281
|
+
text-transform: ${zi};
|
|
280
282
|
}
|
|
281
283
|
`,oe=b`
|
|
282
|
-
.ft-typography--
|
|
283
|
-
font-family: ${
|
|
284
|
-
font-size: ${
|
|
285
|
-
font-weight: ${
|
|
286
|
-
letter-spacing: ${
|
|
287
|
-
line-height: ${
|
|
288
|
-
text-transform: ${
|
|
284
|
+
.ft-typography--caption {
|
|
285
|
+
font-family: ${Ui};
|
|
286
|
+
font-size: ${Fi};
|
|
287
|
+
font-weight: ${ji};
|
|
288
|
+
letter-spacing: ${Bi};
|
|
289
|
+
line-height: ${Ti};
|
|
290
|
+
text-transform: ${Ai};
|
|
289
291
|
}
|
|
290
292
|
`,ne=b`
|
|
291
|
-
.ft-typography--
|
|
292
|
-
font-family: ${
|
|
293
|
-
font-size: ${
|
|
294
|
-
font-weight: ${
|
|
295
|
-
letter-spacing: ${
|
|
296
|
-
line-height: ${
|
|
297
|
-
text-transform: ${
|
|
293
|
+
.ft-typography--breadcrumb {
|
|
294
|
+
font-family: ${Li};
|
|
295
|
+
font-size: ${Pi};
|
|
296
|
+
font-weight: ${_i};
|
|
297
|
+
letter-spacing: ${Ii};
|
|
298
|
+
line-height: ${Di};
|
|
299
|
+
text-transform: ${Wi};
|
|
298
300
|
}
|
|
299
301
|
`,se=b`
|
|
300
|
-
.ft-typography--
|
|
301
|
-
font-family: ${
|
|
302
|
-
font-size: ${
|
|
303
|
-
font-weight: ${
|
|
304
|
-
letter-spacing: ${
|
|
305
|
-
line-height: ${
|
|
306
|
-
text-transform: ${qi
|
|
302
|
+
.ft-typography--overline {
|
|
303
|
+
font-family: ${Hi};
|
|
304
|
+
font-size: ${Ki};
|
|
305
|
+
font-weight: ${Zi};
|
|
306
|
+
letter-spacing: ${Vi};
|
|
307
|
+
line-height: ${Ji};
|
|
308
|
+
text-transform: ${qi};
|
|
307
309
|
}
|
|
308
310
|
`,re=b`
|
|
311
|
+
.ft-typography--button {
|
|
312
|
+
font-family: ${Xi.fontFamily};
|
|
313
|
+
font-size: ${Xi.fontSize};
|
|
314
|
+
font-weight: ${Xi.fontWeight};
|
|
315
|
+
letter-spacing: ${Xi.letterSpacing};
|
|
316
|
+
line-height: ${Xi.lineHeight};
|
|
317
|
+
text-transform: ${Xi.textTransform};
|
|
318
|
+
}
|
|
319
|
+
`,ae=b`
|
|
309
320
|
.ft-typography {
|
|
310
321
|
vertical-align: inherit;
|
|
311
322
|
}
|
|
312
|
-
`;var
|
|
313
|
-
<${
|
|
323
|
+
`;var le=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class he extends xt{constructor(){super(...arguments),this.variant=Zt.body1}render(){return this.element?Kt`
|
|
324
|
+
<${Wt(this.element)}
|
|
314
325
|
class="ft-typography ft-typography--${this.variant}">
|
|
315
326
|
<slot></slot>
|
|
316
|
-
</${
|
|
317
|
-
`:
|
|
327
|
+
</${Wt(this.element)}>
|
|
328
|
+
`:Kt`
|
|
318
329
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
319
|
-
`}}
|
|
330
|
+
`}}he.styles=[Gi,Yi,Qi,te,ie,ee,oe,ne,se,re,ae],le([o()],he.prototype,"element",void 0),le([o()],he.prototype,"variant",void 0),h("ft-typography")(he);const pe=ut.create("--ft-tooltip-distance","SIZE","4px"),ce=ut.create("--ft-tooltip-color","COLOR","#FFFFFF"),de=ut.create("--ft-tooltip-background-color","COLOR","#666666"),fe=ut.create("--ft-tooltip-z-index","NUMBER","1"),ue=ut.external(yt.borderRadiusS,"Design system"),ve=ut.create("--ft-tooltip-max-width","SIZE","150px"),ye=b`
|
|
320
331
|
.ft-tooltip--container {
|
|
321
332
|
display: block;
|
|
322
333
|
position: relative;
|
|
@@ -332,23 +343,23 @@ const _t=Symbol.for(""),It=t=>{if((null==t?void 0:t.r)===_t)return null==t?void
|
|
|
332
343
|
box-sizing: border-box;
|
|
333
344
|
overflow: hidden;
|
|
334
345
|
width: max-content;
|
|
335
|
-
max-width: ${
|
|
346
|
+
max-width: ${ve};
|
|
336
347
|
text-align: center;
|
|
337
|
-
padding: ${
|
|
338
|
-
z-index: ${
|
|
348
|
+
padding: ${pe};
|
|
349
|
+
z-index: ${fe};
|
|
339
350
|
}
|
|
340
351
|
|
|
341
352
|
.ft-tooltip--content {
|
|
342
353
|
padding: 4px 8px;
|
|
343
|
-
border-radius: ${
|
|
344
|
-
background-color: ${
|
|
345
|
-
color: ${
|
|
354
|
+
border-radius: ${ue};
|
|
355
|
+
background-color: ${de};
|
|
356
|
+
color: ${ce};
|
|
346
357
|
top: -500px;
|
|
347
358
|
left: -500px;
|
|
348
359
|
position: relative;
|
|
349
360
|
word-break: break-word;
|
|
350
361
|
}
|
|
351
|
-
`;var
|
|
362
|
+
`;var be=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class xe extends xt{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 i,this.revealDebouncer=new i}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return V`
|
|
352
363
|
<div part="container"
|
|
353
364
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
354
365
|
@mouseenter=${this.onHover}
|
|
@@ -366,13 +377,13 @@ const _t=Symbol.for(""),It=t=>{if((null==t?void 0:t.r)===_t)return null==t?void
|
|
|
366
377
|
</div>
|
|
367
378
|
</div>
|
|
368
379
|
</div>
|
|
369
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&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 i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.validPosition){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${
|
|
380
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&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 i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.validPosition){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${ve})`}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())}}xe.elementDefinitions={"ft-typography":he},xe.styles=ye,be([o()],xe.prototype,"text",void 0),be([o({type:Boolean})],xe.prototype,"manual",void 0),be([o({type:Boolean})],xe.prototype,"inline",void 0),be([o({type:Number})],xe.prototype,"delay",void 0),be([o()],xe.prototype,"position",void 0),be([
|
|
370
381
|
/**
|
|
371
382
|
* @license
|
|
372
383
|
* Copyright 2017 Google LLC
|
|
373
384
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
374
385
|
*/
|
|
375
|
-
function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const n="slot"+(i?`[name=${i}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?l(s,t):[];return e?r.filter((t=>t.matches(e))):r},enumerable:!0,configurable:!0})})}({slot:n,flatten:i,selector:e}):s({descriptor:t=>({get(){var t,i;const e="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==s?void 0:s.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
386
|
+
function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const n="slot"+(i?`[name=${i}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?l(s,t):[];return e?r.filter((t=>t.matches(e))):r},enumerable:!0,configurable:!0})})}({slot:n,flatten:i,selector:e}):s({descriptor:t=>({get(){var t,i;const e="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==s?void 0:s.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],xe.prototype,"slotNodes",void 0),be([r(".ft-tooltip--container")],xe.prototype,"container",void 0),be([r("slot")],xe.prototype,"target",void 0),be([r(".ft-tooltip")],xe.prototype,"tooltip",void 0),be([r(".ft-tooltip--content")],xe.prototype,"tooltipContent",void 0),be([n()],xe.prototype,"visible",void 0),h("ft-tooltip")(xe);const ge={color:ut.extend("--ft-loader-color",yt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")},me=b`
|
|
376
387
|
:host {
|
|
377
388
|
line-height: 0;
|
|
378
389
|
}
|
|
@@ -381,8 +392,8 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
381
392
|
display: inline-block;
|
|
382
393
|
position: relative;
|
|
383
394
|
|
|
384
|
-
width: ${
|
|
385
|
-
height: ${
|
|
395
|
+
width: ${ge.size};
|
|
396
|
+
height: ${ge.size};
|
|
386
397
|
}
|
|
387
398
|
|
|
388
399
|
.ft-loader div {
|
|
@@ -391,7 +402,7 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
391
402
|
width: 25%;
|
|
392
403
|
height: 25%;
|
|
393
404
|
border-radius: 50%;
|
|
394
|
-
background: ${
|
|
405
|
+
background: ${ge.color};
|
|
395
406
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
396
407
|
}
|
|
397
408
|
|
|
@@ -438,23 +449,23 @@ function(t,i,e){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:i},
|
|
|
438
449
|
transform: translate(0, 0);
|
|
439
450
|
}
|
|
440
451
|
100% {
|
|
441
|
-
transform: translate(calc(0.35 * ${
|
|
452
|
+
transform: translate(calc(0.35 * ${ge.size}), 0);
|
|
442
453
|
}
|
|
443
454
|
}
|
|
444
|
-
`;class
|
|
455
|
+
`;class we extends xt{render(){return V`
|
|
445
456
|
<div class="ft-loader">
|
|
446
457
|
<div></div>
|
|
447
458
|
<div></div>
|
|
448
459
|
<div></div>
|
|
449
460
|
<div></div>
|
|
450
461
|
</div>
|
|
451
|
-
`}}
|
|
462
|
+
`}}we.styles=me,h("ft-loader")(we);
|
|
452
463
|
/**
|
|
453
464
|
* @license
|
|
454
465
|
* Copyright 2017 Google LLC
|
|
455
466
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
456
467
|
*/
|
|
457
|
-
class
|
|
468
|
+
class $e extends Et{constructor(t){if(super(t),this.it=q,t.type!==Nt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this._t=void 0,this.it=t;if(t===J)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 i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}$e.directiveName="unsafeHTML",$e.resultType=1;const Oe=Ct($e);var Se,ke;!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=""}(Se||(Se={})),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=""}(ke||(ke={})),new Map([...["abw"].map((t=>[t,ke.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,ke.AUDIO])),...["avi"].map((t=>[t,ke.AVI])),...["chm","xhs"].map((t=>[t,ke.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,ke.CODE])),...["csv"].map((t=>[t,ke.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ke.DITA])),...["epub"].map((t=>[t,ke.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ke.EXCEL])),...["flac"].map((t=>[t,ke.FLAC])),...["gif"].map((t=>[t,ke.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ke.GZIP])),...["html","htm","xhtml"].map((t=>[t,ke.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,ke.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ke.JPEG])),...["json"].map((t=>[t,ke.JSON])),...["m4a","m4p"].map((t=>[t,ke.M4A])),...["mov","qt"].map((t=>[t,ke.MOV])),...["mp3"].map((t=>[t,ke.MP3])),...["mp4","m4v"].map((t=>[t,ke.MP4])),...["ogg","oga"].map((t=>[t,ke.OGG])),...["pdf","ps"].map((t=>[t,ke.PDF])),...["png"].map((t=>[t,ke.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ke.POWERPOINT])),...["rar"].map((t=>[t,ke.RAR])),...["stp"].map((t=>[t,ke.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ke.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,ke.VIDEO])),...["wav"].map((t=>[t,ke.WAV])),...["wma"].map((t=>[t,ke.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ke.WORD])),...["xml","xsl","rdf"].map((t=>[t,ke.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ke.YAML])),...["zip"].map((t=>[t,ke.ZIP]))]);const Ne={size:ut.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ut.extend("--ft-icon-fluid-topics-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ut.extend("--ft-icon-file-format-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ut.extend("--ft-icon-material-font-family",ut.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:ut.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ce=b`
|
|
458
469
|
:host, i.ft-icon {
|
|
459
470
|
display: inline-flex;
|
|
460
471
|
align-items: center;
|
|
@@ -463,14 +474,14 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
463
474
|
}
|
|
464
475
|
|
|
465
476
|
:host {
|
|
466
|
-
width: ${
|
|
467
|
-
height: ${
|
|
477
|
+
width: ${Ne.size};
|
|
478
|
+
height: ${Ne.size};
|
|
468
479
|
}
|
|
469
480
|
|
|
470
481
|
i.ft-icon {
|
|
471
482
|
width: 100%;
|
|
472
483
|
height: 100%;
|
|
473
|
-
font-size: ${
|
|
484
|
+
font-size: ${Ne.size};
|
|
474
485
|
line-height: 1;
|
|
475
486
|
font-weight: normal;
|
|
476
487
|
text-transform: none;
|
|
@@ -481,32 +492,32 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
481
492
|
text-rendering: auto;
|
|
482
493
|
-webkit-font-smoothing: antialiased;
|
|
483
494
|
-moz-osx-font-smoothing: grayscale;
|
|
484
|
-
vertical-align: ${
|
|
495
|
+
vertical-align: ${Ne.verticalAlign};
|
|
485
496
|
}
|
|
486
497
|
|
|
487
498
|
i.ft-icon.ft-icon--fluid-topics {
|
|
488
|
-
font-family: ${
|
|
499
|
+
font-family: ${Ne.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
489
500
|
|
|
490
501
|
/* Ugly fix because font is broken */
|
|
491
|
-
font-size: calc(0.9 * ${
|
|
502
|
+
font-size: calc(0.9 * ${Ne.size});
|
|
492
503
|
position: relative;
|
|
493
504
|
top: -5%;
|
|
494
505
|
justify-content: center;
|
|
495
506
|
}
|
|
496
507
|
|
|
497
508
|
.ft-icon--file-format {
|
|
498
|
-
font-family: ${
|
|
509
|
+
font-family: ${Ne.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
499
510
|
}
|
|
500
511
|
|
|
501
512
|
.ft-icon--material {
|
|
502
|
-
font-family: ${
|
|
513
|
+
font-family: ${Ne.materialFontFamily}, "Material Icons", sans-serif;
|
|
503
514
|
}
|
|
504
|
-
`;var
|
|
515
|
+
`;var Ee;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ee||(Ee={}));var Re=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Me extends xt{constructor(){super(...arguments),this.variant=Ee.fluid_topics,this.resolvedIcon=q}render(){const t="material"!==this.variant||this.value;return V`
|
|
505
516
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
506
|
-
${
|
|
517
|
+
${Oe(this.resolvedIcon)}
|
|
507
518
|
<slot ?hidden=${t}></slot>
|
|
508
519
|
</i>
|
|
509
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let e=this.value||this.textContent;switch(this.variant){case
|
|
520
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let e=this.value||this.textContent;switch(this.variant){case Ee.file_format:this.resolvedIcon=null!==(t=ke[e.replace("-","_").toUpperCase()])&&void 0!==t?t:e;break;case Ee.fluid_topics:this.resolvedIcon=null!==(i=Se[e.replace("-","_").toUpperCase()])&&void 0!==i?i:e;break;default:this.resolvedIcon=this.value||q}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Me.elementDefinitions={},Me.styles=Ce,Re([o()],Me.prototype,"variant",void 0),Re([o()],Me.prototype,"value",void 0),Re([n()],Me.prototype,"resolvedIcon",void 0),Re([r("slot")],Me.prototype,"slottedContent",void 0),h("ft-icon")(Me);const ze=ut.extend("--ft-button-color",yt.colorPrimary),Ue={backgroundColor:ut.extend("--ft-button-background-color",yt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",yt.borderRadiusL),color:ze,fontSize:ut.extend("--ft-button-font-size",Xi.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",ze),opacityDisabled:ut.external(yt.colorOpacityDisabled,"Design system")},Fe=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",yt.colorOnPrimary)),je={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",yt.colorPrimary)),color:Fe,rippleColor:ut.extend("--ft-button-primary-ripple-color",Fe)},Be=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",yt.borderRadiusM)),Te=[gt,b`
|
|
510
521
|
:host {
|
|
511
522
|
display: inline-block;
|
|
512
523
|
max-width: 100%;
|
|
@@ -517,7 +528,7 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
517
528
|
box-shadow: 0px 0px 0px transparent;
|
|
518
529
|
border: 0px solid transparent;
|
|
519
530
|
text-shadow: 0px 0px 0px transparent;
|
|
520
|
-
font-size: ${
|
|
531
|
+
font-size: ${Ue.fontSize};
|
|
521
532
|
}
|
|
522
533
|
|
|
523
534
|
button:hover {
|
|
@@ -546,17 +557,17 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
546
557
|
border: none;
|
|
547
558
|
pointer-events: auto;
|
|
548
559
|
|
|
549
|
-
--ft-button-internal-line-height: calc(${
|
|
550
|
-
--ft-button-internal-color: ${
|
|
551
|
-
${vt(
|
|
560
|
+
--ft-button-internal-line-height: calc(${Ue.fontSize} + 2px);
|
|
561
|
+
--ft-button-internal-color: ${Ue.color};
|
|
562
|
+
${vt(Ne.size,Ue.iconSize)};
|
|
552
563
|
--ft-button-internal-vertical-padding: 6px;
|
|
553
564
|
--ft-button-internal-horizontal-padding: 8px;
|
|
554
|
-
${vt(
|
|
555
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
565
|
+
${vt(zt.color,Ue.rippleColor)};
|
|
566
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ue.iconSize});
|
|
556
567
|
|
|
557
|
-
border-radius: ${
|
|
568
|
+
border-radius: ${Ue.borderRadius};
|
|
558
569
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
559
|
-
background-color: ${
|
|
570
|
+
background-color: ${Ue.backgroundColor};
|
|
560
571
|
color: var(--ft-button-internal-color);
|
|
561
572
|
-webkit-mask-image: radial-gradient(white, black);
|
|
562
573
|
}
|
|
@@ -568,7 +579,7 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
568
579
|
.ft-button--dense {
|
|
569
580
|
--ft-button-internal-vertical-padding: 2px;
|
|
570
581
|
--ft-button-internal-horizontal-padding: 4px;
|
|
571
|
-
border-radius: ${
|
|
582
|
+
border-radius: ${Be};
|
|
572
583
|
}
|
|
573
584
|
|
|
574
585
|
.ft-button--round {
|
|
@@ -577,13 +588,13 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
577
588
|
|
|
578
589
|
.ft-button[disabled] {
|
|
579
590
|
filter: grayscale(1);
|
|
580
|
-
opacity: ${
|
|
591
|
+
opacity: ${Ue.opacityDisabled};
|
|
581
592
|
}
|
|
582
593
|
|
|
583
594
|
.ft-button.ft-button--primary {
|
|
584
|
-
background-color: ${
|
|
585
|
-
--ft-button-internal-color: ${
|
|
586
|
-
${vt(
|
|
595
|
+
background-color: ${je.backgroundColor};
|
|
596
|
+
--ft-button-internal-color: ${je.color};
|
|
597
|
+
${vt(zt.color,je.rippleColor)};
|
|
587
598
|
}
|
|
588
599
|
|
|
589
600
|
.ft-button.ft-button--outlined {
|
|
@@ -602,20 +613,10 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
602
613
|
text-overflow: ellipsis;
|
|
603
614
|
display: block;
|
|
604
615
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
605
|
-
${vt(
|
|
606
|
-
${vt(
|
|
616
|
+
${vt(Xi.fontSize,"1em")};
|
|
617
|
+
${vt(Xi.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
607
618
|
}
|
|
608
|
-
|
|
609
|
-
.ft-button--safari-fix .ft-button--label {
|
|
610
|
-
margin-right: 0;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
614
|
-
content: "\\0000a0";
|
|
615
|
-
display: inline-block;
|
|
616
|
-
width: 0;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
+
|
|
619
620
|
.ft-button--label[hidden] {
|
|
620
621
|
display: none;
|
|
621
622
|
}
|
|
@@ -636,19 +637,19 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
636
637
|
}
|
|
637
638
|
|
|
638
639
|
ft-loader {
|
|
639
|
-
${vt(
|
|
640
|
-
${vt(
|
|
640
|
+
${vt(ge.size,Ue.iconSize)};
|
|
641
|
+
${vt(ge.color,"var(--ft-button-internal-color)")};
|
|
641
642
|
}
|
|
642
|
-
`];var
|
|
643
|
+
`];var Ae=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Le extends xt{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=Ee.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(V`
|
|
643
644
|
<button part="button"
|
|
644
|
-
class="${
|
|
645
|
+
class="${Rt(t)}"
|
|
645
646
|
aria-label="${this.getLabel()}"
|
|
646
647
|
?disabled=${this.isDisabled()}>
|
|
647
648
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
648
649
|
<ft-typography part="label"
|
|
649
650
|
variant="button"
|
|
650
651
|
element="span"
|
|
651
|
-
class="ft-button--label"
|
|
652
|
+
class="ft-button--label ${St?"ft-safari-ellipsis-fix":""}"
|
|
652
653
|
?hidden=${!this.hasTextContent()}>
|
|
653
654
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
654
655
|
</ft-typography>
|
|
@@ -662,7 +663,7 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
662
663
|
</ft-tooltip>
|
|
663
664
|
`:t}resolveIcon(){return this.loading?V`
|
|
664
665
|
<ft-loader></ft-loader> `:this.icon?V`
|
|
665
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:q}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}}
|
|
666
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:q}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}}Le.elementDefinitions={"ft-ripple":_t,"ft-tooltip":xe,"ft-typography":he,"ft-icon":Me,"ft-loader":we},Le.styles=[mt,Te],Ae([o({type:Boolean})],Le.prototype,"primary",void 0),Ae([o({type:Boolean})],Le.prototype,"outlined",void 0),Ae([o({type:Boolean})],Le.prototype,"disabled",void 0),Ae([o({type:Boolean})],Le.prototype,"dense",void 0),Ae([o({type:Boolean})],Le.prototype,"round",void 0),Ae([o({type:String})],Le.prototype,"label",void 0),Ae([o({type:String})],Le.prototype,"icon",void 0),Ae([o({type:String})],Le.prototype,"iconVariant",void 0),Ae([o({type:Boolean})],Le.prototype,"trailingIcon",void 0),Ae([o({type:Boolean})],Le.prototype,"loading",void 0),Ae([o({type:String})],Le.prototype,"tooltipPosition",void 0),Ae([o({type:Boolean})],Le.prototype,"hideTooltip",void 0),Ae([o({type:Boolean})],Le.prototype,"forceTooltip",void 0),Ae([r(".ft-button")],Le.prototype,"button",void 0),Ae([r(".ft-button--label slot")],Le.prototype,"slottedContent",void 0),h("ft-button")(Le);const Pe=b`
|
|
666
667
|
:host {
|
|
667
668
|
display: contents;
|
|
668
669
|
}
|
|
@@ -686,7 +687,7 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
686
687
|
.ft-collapsible--animated.ft-collapsible--hidden, .ft-collapsible--animated.ft-collapsible--hidden::slotted(*) {
|
|
687
688
|
transition: opacity 300ms;
|
|
688
689
|
}
|
|
689
|
-
`;var
|
|
690
|
+
`;var _e=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ie extends xt{constructor(){super(...arguments),this.open=!1,this.animated=!1,this.closeCollapsibleMatchers=[],this.primary=!1,this.secondary=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.tooltipPosition="right",this.iconVariant=Ee.fluid_topics,this.openIcon="THIN_ARROW",this.closedIcon="THIN_ARROW_RIGHT",this.trailingIcon=!1,this.animationInProgress=!1,this.animationEndSafeguard=new i(800)}render(){const t={"ft-collapsible--content":!0,"ft-collapsible--hidden":!this.open,"ft-collapsible--animated":this.animated,"ft-collapsible--animation-in-progress":this.animated&&this.animationInProgress};return V`
|
|
690
691
|
<ft-button
|
|
691
692
|
part="toggle"
|
|
692
693
|
.tooltipPosition=${this.tooltipPosition}
|
|
@@ -709,7 +710,7 @@ class we extends Ct{constructor(t){if(super(t),this.it=q,t.type!==kt)throw Error
|
|
|
709
710
|
class="${this.hasCustomToggle()?"":"ft-collapsible--hidden"}"
|
|
710
711
|
@click=${this.toggleOpen}
|
|
711
712
|
@slotchange=${this.onCustomToggleSlotChange}></slot>
|
|
712
|
-
<slot class="${
|
|
713
|
+
<slot class="${Rt(t)}"
|
|
713
714
|
@click=${this.onContentClick}
|
|
714
715
|
@transitionend=${()=>this.animationInProgress=!1}></slot>
|
|
715
|
-
`}onCustomToggleSlotChange(){this.requestUpdate()}hasCustomToggle(){var t,i;return 0!==(null!==(i=null===(t=this.toggleSlot)||void 0===t?void 0:t.assignedNodes().length)&&void 0!==i?i:0)}toggleOpen(){this.animationInProgress=!0,setTimeout((()=>this.open=!this.open),5),this.animationEndSafeguard.run((()=>this.animationInProgress=!1))}update(t){super.update(t),t.has("open")&&this.dispatchEvent(new CustomEvent("change",{detail:{open:this.open}}))}onContentClick(t){if(this.closeCollapsibleMatchers.length>0){const i=t.composedPath();for(let t of i){if(t===this)return;if(t.matches&&this.closeCollapsibleMatchers.some((i=>t.matches(i))))return void this.toggleOpen()}}}}
|
|
716
|
+
`}onCustomToggleSlotChange(){this.requestUpdate()}hasCustomToggle(){var t,i;return 0!==(null!==(i=null===(t=this.toggleSlot)||void 0===t?void 0:t.assignedNodes().length)&&void 0!==i?i:0)}toggleOpen(){this.animationInProgress=!0,setTimeout((()=>this.open=!this.open),5),this.animationEndSafeguard.run((()=>this.animationInProgress=!1))}update(t){super.update(t),t.has("open")&&this.dispatchEvent(new CustomEvent("change",{detail:{open:this.open}}))}onContentClick(t){if(this.closeCollapsibleMatchers.length>0){const i=t.composedPath();for(let t of i){if(t===this)return;if(t.matches&&this.closeCollapsibleMatchers.some((i=>t.matches(i))))return void this.toggleOpen()}}}}Ie.elementDefinitions={"ft-button":Le},Ie.styles=Pe,_e([o({type:Boolean,reflect:!0})],Ie.prototype,"open",void 0),_e([o({type:Boolean})],Ie.prototype,"animated",void 0),_e([p([])],Ie.prototype,"closeCollapsibleMatchers",void 0),_e([o()],Ie.prototype,"label",void 0),_e([o()],Ie.prototype,"openLabel",void 0),_e([o()],Ie.prototype,"closedLabel",void 0),_e([o()],Ie.prototype,"text",void 0),_e([o()],Ie.prototype,"openText",void 0),_e([o()],Ie.prototype,"closedText",void 0),_e([o({type:Boolean})],Ie.prototype,"primary",void 0),_e([o({type:Boolean})],Ie.prototype,"secondary",void 0),_e([o({type:Boolean})],Ie.prototype,"disabled",void 0),_e([o({type:Boolean})],Ie.prototype,"dense",void 0),_e([o({type:Boolean})],Ie.prototype,"round",void 0),_e([o()],Ie.prototype,"tooltipPosition",void 0),_e([o()],Ie.prototype,"iconVariant",void 0),_e([o()],Ie.prototype,"openIcon",void 0),_e([o()],Ie.prototype,"closedIcon",void 0),_e([o({type:Boolean})],Ie.prototype,"trailingIcon",void 0),_e([r('slot[name="toggle"]')],Ie.prototype,"toggleSlot",void 0),_e([r(".content")],Ie.prototype,"content",void 0),_e([n()],Ie.prototype,"animationInProgress",void 0),h("ft-collapsible")(Ie),t.FtCollapsible=Ie,t.styles=Pe,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-collapsible",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.55",
|
|
4
4
|
"description": "Collapsible web component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "0.3.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-button": "0.3.55",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "0.3.55",
|
|
24
24
|
"lit": "2.2.8"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "4106f01e238edeb1c85fba22d6d50a18757e0b3e"
|
|
27
27
|
}
|