@fluid-topics/ft-reader-navigation-button 0.3.54 → 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.
|
@@ -506,17 +506,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
506
506
|
${i.setVariable(hi.fontSize,"1em")};
|
|
507
507
|
${i.setVariable(hi.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
508
508
|
}
|
|
509
|
-
|
|
510
|
-
.ft-button--safari-fix .ft-button--label {
|
|
511
|
-
margin-right: 0;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
515
|
-
content: "\\0000a0";
|
|
516
|
-
display: inline-block;
|
|
517
|
-
width: 0;
|
|
518
|
-
}
|
|
519
|
-
|
|
509
|
+
|
|
520
510
|
.ft-button--label[hidden] {
|
|
521
511
|
display: none;
|
|
522
512
|
}
|
|
@@ -540,7 +530,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
540
530
|
${i.setVariable(Ai.size,Hi.iconSize)};
|
|
541
531
|
${i.setVariable(Ai.color,"var(--ft-button-internal-color)")};
|
|
542
532
|
}
|
|
543
|
-
`];var qi=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 Xi 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=Wi.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-
|
|
533
|
+
`];var qi=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 Xi 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=Wi.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`
|
|
544
534
|
<button part="button"
|
|
545
535
|
class="${n.classMap(t)}"
|
|
546
536
|
aria-label="${this.getLabel()}"
|
|
@@ -549,7 +539,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
549
539
|
<ft-typography part="label"
|
|
550
540
|
variant="button"
|
|
551
541
|
element="span"
|
|
552
|
-
class="ft-button--label"
|
|
542
|
+
class="ft-button--label ${i.isSafari?"ft-safari-ellipsis-fix":""}"
|
|
553
543
|
?hidden=${!this.hasTextContent()}>
|
|
554
544
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
555
545
|
</ft-typography>
|
|
@@ -563,7 +553,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
563
553
|
</ft-tooltip>
|
|
564
554
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
565
555
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
566
|
-
<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}}Xi.elementDefinitions={"ft-ripple":m,"ft-tooltip":Bi,"ft-typography":ki,"ft-icon":Di,"ft-loader":Mi},Xi.styles=Vi,qi([o.property({type:Boolean})],Xi.prototype,"primary",void 0),qi([o.property({type:Boolean})],Xi.prototype,"outlined",void 0),qi([o.property({type:Boolean})],Xi.prototype,"disabled",void 0),qi([o.property({type:Boolean})],Xi.prototype,"dense",void 0),qi([o.property({type:Boolean})],Xi.prototype,"round",void 0),qi([o.property({type:String})],Xi.prototype,"label",void 0),qi([o.property({type:String})],Xi.prototype,"icon",void 0),qi([o.property({type:String})],Xi.prototype,"iconVariant",void 0),qi([o.property({type:Boolean})],Xi.prototype,"trailingIcon",void 0),qi([o.property({type:Boolean})],Xi.prototype,"loading",void 0),qi([o.property({type:String})],Xi.prototype,"tooltipPosition",void 0),qi([o.property({type:Boolean})],Xi.prototype,"hideTooltip",void 0),qi([o.property({type:Boolean})],Xi.prototype,"forceTooltip",void 0),qi([o.query(".ft-button")],Xi.prototype,"button",void 0),qi([o.query(".ft-button--label slot")],Xi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Xi);var Yi=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 Ji extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Qi extends(function(t){class i extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new Ji)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Yi([o.state()],i.prototype,"stateManager",void 0),i}(i.FtLitElementRedux)){}var te=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 ie extends Qi{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let i=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
|
|
556
|
+
<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}}Xi.elementDefinitions={"ft-ripple":m,"ft-tooltip":Bi,"ft-typography":ki,"ft-icon":Di,"ft-loader":Mi},Xi.styles=[i.safariEllipsisFix,Vi],qi([o.property({type:Boolean})],Xi.prototype,"primary",void 0),qi([o.property({type:Boolean})],Xi.prototype,"outlined",void 0),qi([o.property({type:Boolean})],Xi.prototype,"disabled",void 0),qi([o.property({type:Boolean})],Xi.prototype,"dense",void 0),qi([o.property({type:Boolean})],Xi.prototype,"round",void 0),qi([o.property({type:String})],Xi.prototype,"label",void 0),qi([o.property({type:String})],Xi.prototype,"icon",void 0),qi([o.property({type:String})],Xi.prototype,"iconVariant",void 0),qi([o.property({type:Boolean})],Xi.prototype,"trailingIcon",void 0),qi([o.property({type:Boolean})],Xi.prototype,"loading",void 0),qi([o.property({type:String})],Xi.prototype,"tooltipPosition",void 0),qi([o.property({type:Boolean})],Xi.prototype,"hideTooltip",void 0),qi([o.property({type:Boolean})],Xi.prototype,"forceTooltip",void 0),qi([o.query(".ft-button")],Xi.prototype,"button",void 0),qi([o.query(".ft-button--label slot")],Xi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Xi);var Yi=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 Ji extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Qi extends(function(t){class i extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new Ji)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Yi([o.state()],i.prototype,"stateManager",void 0),i}(i.FtLitElementRedux)){}var te=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 ie extends Qi{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let i=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
|
|
567
557
|
<a class=${i}
|
|
568
558
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
569
559
|
@click=${t=>this.onLinkClick(t)}>
|
|
@@ -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,n=new WeakMap,r=new WeakMap,s=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||[]);f(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 c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(s.set(n,h),h.standInClass=c);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.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 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=l;if(e)return l=void 0,e;const i=s.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),n.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=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.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,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!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)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){d(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 y=[document];const b=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||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,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.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,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!==n.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"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),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 s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.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,n=new WeakMap,r=new WeakMap,s=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||[]);f(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 c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(s.set(n,h),h.standInClass=c);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.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 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=l;if(e)return l=void 0,e;const i=s.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),n.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=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.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,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!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)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){d(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 y=[document];const b=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||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,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.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,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!==n.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"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),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 s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Ei){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,n=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)}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
|
|
@@ -92,34 +92,45 @@ var ct,pt;class ft extends E{constructor(){super(...arguments),this.renderOption
|
|
|
92
92
|
-webkit-hyphens: auto;
|
|
93
93
|
hyphens: auto
|
|
94
94
|
}
|
|
95
|
-
`;const mt=
|
|
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
|
+
`,wt=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged);class $t extends xt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Ot(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Ot(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Ot(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}var St,kt,Ct;const Nt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ct=null===(kt=null===(St=window.safari)||void 0===St?void 0:St.pushNotification)||void 0===kt?void 0:kt.toString())&&void 0!==Ct?Ct:""),Et={outlineColor:ut.extend("--ft-reader-internal-link-outline-color",yt.colorPrimary)},Rt=b`
|
|
96
107
|
:host {
|
|
97
108
|
display: contents;
|
|
98
109
|
}
|
|
99
110
|
|
|
100
111
|
a:focus {
|
|
101
|
-
outline-color: ${
|
|
112
|
+
outline-color: ${Et.outlineColor};
|
|
102
113
|
}
|
|
103
114
|
|
|
104
115
|
.ft-reader-link--remove-style {
|
|
105
116
|
text-decoration: none;
|
|
106
117
|
color: inherit;
|
|
107
118
|
}
|
|
108
|
-
`,
|
|
119
|
+
`,Mt=b`
|
|
109
120
|
ft-reader-internal-link {
|
|
110
|
-
${vt(
|
|
121
|
+
${vt(Et.outlineColor,"transparent")}
|
|
111
122
|
}
|
|
112
123
|
`
|
|
113
124
|
/**
|
|
114
125
|
* @license
|
|
115
126
|
* Copyright 2017 Google LLC
|
|
116
127
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
117
|
-
*/,
|
|
128
|
+
*/,jt=1,Ft=2,Ut=t=>(...e)=>({_$litDirective$:t,values:e});class zt{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)}}
|
|
118
129
|
/**
|
|
119
130
|
* @license
|
|
120
131
|
* Copyright 2018 Google LLC
|
|
121
132
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
122
|
-
*/const
|
|
133
|
+
*/const Bt=Ut(class extends zt{constructor(t){var e;if(super(t),t.type!==jt||"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 n=t.element.classList;this.nt.forEach((t=>{t in e||(n.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?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return J}}),Tt=ut.extend("--ft-ripple-color",yt.colorContent),At={color:Tt,backgroundColor:ut.extend("--ft-ripple-background-color",Tt),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")},Lt=ut.extend("--ft-ripple-color",yt.colorPrimary),Pt=Lt,_t=ut.extend("--ft-ripple-background-color",Lt),Dt=ut.extend("--ft-ripple-color",yt.colorSecondary),It=Dt,Wt=ut.extend("--ft-ripple-background-color",Dt),Ht=b`
|
|
123
134
|
:host {
|
|
124
135
|
display: contents;
|
|
125
136
|
}
|
|
@@ -141,27 +152,27 @@ var ct,pt;class ft extends E{constructor(){super(...arguments),this.renderOption
|
|
|
141
152
|
}
|
|
142
153
|
|
|
143
154
|
.ft-ripple .ft-ripple--background {
|
|
144
|
-
background-color: ${
|
|
155
|
+
background-color: ${At.backgroundColor};
|
|
145
156
|
}
|
|
146
157
|
|
|
147
158
|
.ft-ripple .ft-ripple--effect {
|
|
148
|
-
background-color: ${
|
|
159
|
+
background-color: ${At.color};
|
|
149
160
|
}
|
|
150
161
|
|
|
151
162
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
152
|
-
background-color: ${
|
|
163
|
+
background-color: ${Wt};
|
|
153
164
|
}
|
|
154
165
|
|
|
155
166
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
156
|
-
background-color: ${
|
|
167
|
+
background-color: ${It};
|
|
157
168
|
}
|
|
158
169
|
|
|
159
170
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
160
|
-
background-color: ${
|
|
171
|
+
background-color: ${_t};
|
|
161
172
|
}
|
|
162
173
|
|
|
163
174
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
164
|
-
background-color: ${
|
|
175
|
+
background-color: ${Pt};
|
|
165
176
|
}
|
|
166
177
|
|
|
167
178
|
.ft-ripple .ft-ripple--background {
|
|
@@ -193,22 +204,22 @@ var ct,pt;class ft extends E{constructor(){super(...arguments),this.renderOption
|
|
|
193
204
|
}
|
|
194
205
|
|
|
195
206
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
196
|
-
opacity: ${
|
|
207
|
+
opacity: ${At.opacityContentOnSurfaceHover};
|
|
197
208
|
}
|
|
198
209
|
|
|
199
210
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
200
|
-
opacity: ${
|
|
211
|
+
opacity: ${At.opacityContentOnSurfaceSelected};
|
|
201
212
|
}
|
|
202
213
|
|
|
203
214
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
204
|
-
opacity: ${
|
|
215
|
+
opacity: ${At.opacityContentOnSurfaceFocused};
|
|
205
216
|
}
|
|
206
217
|
|
|
207
218
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
208
|
-
opacity: ${
|
|
219
|
+
opacity: ${At.opacityContentOnSurfacePressed};
|
|
209
220
|
transform: translate(-50%, -50%) scale(1);
|
|
210
221
|
}
|
|
211
|
-
`;var
|
|
222
|
+
`;var Kt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Zt 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 e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:n}=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!=n?n-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 V`
|
|
212
223
|
<style>
|
|
213
224
|
.ft-ripple .ft-ripple--effect,
|
|
214
225
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -221,119 +232,119 @@ var ct,pt;class ft extends E{constructor(){super(...arguments),this.renderOption
|
|
|
221
232
|
top: ${this.originY}px;
|
|
222
233
|
}
|
|
223
234
|
</style>
|
|
224
|
-
<div class="${
|
|
235
|
+
<div class="${Bt(t)}">
|
|
225
236
|
<div class="ft-ripple--background"></div>
|
|
226
237
|
<div class="ft-ripple--effect"></div>
|
|
227
238
|
</div>
|
|
228
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=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",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",i),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 e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}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()}}
|
|
239
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=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",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",i),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 e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}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()}}Zt.elementDefinitions={},Zt.styles=Ht,Kt([o({type:Boolean})],Zt.prototype,"primary",void 0),Kt([o({type:Boolean})],Zt.prototype,"secondary",void 0),Kt([o({type:Boolean})],Zt.prototype,"unbounded",void 0),Kt([o({type:Boolean})],Zt.prototype,"activated",void 0),Kt([o({type:Boolean})],Zt.prototype,"selected",void 0),Kt([o({type:Boolean})],Zt.prototype,"disabled",void 0),Kt([n()],Zt.prototype,"hovered",void 0),Kt([n()],Zt.prototype,"focused",void 0),Kt([n()],Zt.prototype,"pressed",void 0),Kt([n()],Zt.prototype,"rippling",void 0),Kt([n()],Zt.prototype,"rippleSize",void 0),Kt([n()],Zt.prototype,"originX",void 0),Kt([n()],Zt.prototype,"originY",void 0),Kt([s(".ft-ripple")],Zt.prototype,"ripple",void 0),Kt([s(".ft-ripple--effect")],Zt.prototype,"rippleEffect",void 0),h("ft-ripple")(Zt);
|
|
229
240
|
/**
|
|
230
241
|
* @license
|
|
231
242
|
* Copyright 2020 Google LLC
|
|
232
243
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
233
244
|
*/
|
|
234
|
-
const
|
|
245
|
+
const Vt=Symbol.for(""),Jt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void 0:t._$litStatic$},qt=t=>({_$litStatic$:t,r:Vt}),Xt=new Map,Yt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],n=Jt(r));)l+=n+e[++h],c=!0;a.push(r),s.push(l),h++}if(h===o&&s.push(e[o]),c){const t=s.join("$$lit$$");void 0===(e=Xt.get(t))&&(s.raw=s,Xt.set(t,e=s)),i=a}return t(e,...i)})(V);var Gt;!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"}(Gt||(Gt={}));const Qt=ut.extend("--ft-typography-font-family",yt.titleFont),te=ut.extend("--ft-typography-font-family",yt.contentFont),ee={fontFamily:te,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")},ie=ut.extend("--ft-typography-title-font-family",Qt),oe=ut.extend("--ft-typography-title-font-size",ee.fontSize,"20px"),ne=ut.extend("--ft-typography-title-font-weight",ee.fontWeight,"normal"),re=ut.extend("--ft-typography-title-letter-spacing",ee.letterSpacing,"0.15px"),se=ut.extend("--ft-typography-title-line-height",ee.lineHeight,"1.2"),ae=ut.extend("--ft-typography-title-text-transform",ee.textTransform,"inherit"),le=ut.extend("--ft-typography-title-dense-font-family",Qt),he=ut.extend("--ft-typography-title-dense-font-size",ee.fontSize,"14px"),ce=ut.extend("--ft-typography-title-dense-font-weight",ee.fontWeight,"normal"),pe=ut.extend("--ft-typography-title-dense-letter-spacing",ee.letterSpacing,"0.105px"),fe=ut.extend("--ft-typography-title-dense-line-height",ee.lineHeight,"1.7"),de=ut.extend("--ft-typography-title-dense-text-transform",ee.textTransform,"inherit"),ue=ut.extend("--ft-typography-subtitle1-font-family",te),ve=ut.extend("--ft-typography-subtitle1-font-size",ee.fontSize,"16px"),ye=ut.extend("--ft-typography-subtitle1-font-weight",ee.fontWeight,"600"),be=ut.extend("--ft-typography-subtitle1-letter-spacing",ee.letterSpacing,"0.144px"),xe=ut.extend("--ft-typography-subtitle1-line-height",ee.lineHeight,"1.5"),ge=ut.extend("--ft-typography-subtitle1-text-transform",ee.textTransform,"inherit"),me=ut.extend("--ft-typography-subtitle2-font-family",te),we=ut.extend("--ft-typography-subtitle2-font-size",ee.fontSize,"14px"),$e=ut.extend("--ft-typography-subtitle2-font-weight",ee.fontWeight,"normal"),Oe=ut.extend("--ft-typography-subtitle2-letter-spacing",ee.letterSpacing,"0.098px"),Se=ut.extend("--ft-typography-subtitle2-line-height",ee.lineHeight,"1.7"),ke=ut.extend("--ft-typography-subtitle2-text-transform",ee.textTransform,"inherit"),Ce=ut.extend("--ft-typography-body1-font-family",te),Ne=ut.extend("--ft-typography-body1-font-size",ee.fontSize,"16px"),Ee=ut.extend("--ft-typography-body1-font-weight",ee.fontWeight,"normal"),Re=ut.extend("--ft-typography-body1-letter-spacing",ee.letterSpacing,"0.496px"),Me=ut.extend("--ft-typography-body1-line-height",ee.lineHeight,"1.5"),je=ut.extend("--ft-typography-body1-text-transform",ee.textTransform,"inherit"),Fe=ut.extend("--ft-typography-body2-font-family",te),Ue=ut.extend("--ft-typography-body2-font-size",ee.fontSize,"14px"),ze=ut.extend("--ft-typography-body2-font-weight",ee.fontWeight,"normal"),Be=ut.extend("--ft-typography-body2-letter-spacing",ee.letterSpacing,"0.252px"),Te=ut.extend("--ft-typography-body2-line-height",ee.lineHeight,"1.4"),Ae=ut.extend("--ft-typography-body2-text-transform",ee.textTransform,"inherit"),Le=ut.extend("--ft-typography-caption-font-family",te),Pe=ut.extend("--ft-typography-caption-font-size",ee.fontSize,"12px"),_e=ut.extend("--ft-typography-caption-font-weight",ee.fontWeight,"normal"),De=ut.extend("--ft-typography-caption-letter-spacing",ee.letterSpacing,"0.396px"),Ie=ut.extend("--ft-typography-caption-line-height",ee.lineHeight,"1.33"),We=ut.extend("--ft-typography-caption-text-transform",ee.textTransform,"inherit"),He=ut.extend("--ft-typography-breadcrumb-font-family",te),Ke=ut.extend("--ft-typography-breadcrumb-font-size",ee.fontSize,"10px"),Ze=ut.extend("--ft-typography-breadcrumb-font-weight",ee.fontWeight,"normal"),Ve=ut.extend("--ft-typography-breadcrumb-letter-spacing",ee.letterSpacing,"0.33px"),Je=ut.extend("--ft-typography-breadcrumb-line-height",ee.lineHeight,"1.6"),qe=ut.extend("--ft-typography-breadcrumb-text-transform",ee.textTransform,"inherit"),Xe=ut.extend("--ft-typography-overline-font-family",te),Ye=ut.extend("--ft-typography-overline-font-size",ee.fontSize,"10px"),Ge=ut.extend("--ft-typography-overline-font-weight",ee.fontWeight,"normal"),Qe=ut.extend("--ft-typography-overline-letter-spacing",ee.letterSpacing,"1.5px"),ti=ut.extend("--ft-typography-overline-line-height",ee.lineHeight,"1.6"),ei=ut.extend("--ft-typography-overline-text-transform",ee.textTransform,"uppercase"),ii={fontFamily:ut.extend("--ft-typography-button-font-family",te),fontSize:ut.extend("--ft-typography-button-font-size",ee.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-button-font-weight",ee.fontWeight,"600"),letterSpacing:ut.extend("--ft-typography-button-letter-spacing",ee.letterSpacing,"1.246px"),lineHeight:ut.extend("--ft-typography-button-line-height",ee.lineHeight,"1.15"),textTransform:ut.extend("--ft-typography-button-text-transform",ee.textTransform,"uppercase")},oi=b`
|
|
235
246
|
.ft-typography--title {
|
|
236
|
-
font-family: ${
|
|
237
|
-
font-size: ${
|
|
238
|
-
font-weight: ${
|
|
239
|
-
letter-spacing: ${
|
|
240
|
-
line-height: ${
|
|
241
|
-
text-transform: ${
|
|
242
|
-
}
|
|
243
|
-
`,oi=b`
|
|
244
|
-
.ft-typography--title-dense {
|
|
245
|
-
font-family: ${ae};
|
|
246
|
-
font-size: ${le};
|
|
247
|
-
font-weight: ${he};
|
|
248
|
-
letter-spacing: ${ce};
|
|
249
|
-
line-height: ${pe};
|
|
250
|
-
text-transform: ${fe};
|
|
247
|
+
font-family: ${ie};
|
|
248
|
+
font-size: ${oe};
|
|
249
|
+
font-weight: ${ne};
|
|
250
|
+
letter-spacing: ${re};
|
|
251
|
+
line-height: ${se};
|
|
252
|
+
text-transform: ${ae};
|
|
251
253
|
}
|
|
252
254
|
`,ni=b`
|
|
253
|
-
.ft-typography--
|
|
254
|
-
font-family: ${
|
|
255
|
-
font-size: ${
|
|
256
|
-
font-weight: ${
|
|
257
|
-
letter-spacing: ${
|
|
258
|
-
line-height: ${
|
|
259
|
-
text-transform: ${
|
|
255
|
+
.ft-typography--title-dense {
|
|
256
|
+
font-family: ${le};
|
|
257
|
+
font-size: ${he};
|
|
258
|
+
font-weight: ${ce};
|
|
259
|
+
letter-spacing: ${pe};
|
|
260
|
+
line-height: ${fe};
|
|
261
|
+
text-transform: ${de};
|
|
260
262
|
}
|
|
261
263
|
`,ri=b`
|
|
262
|
-
.ft-typography--
|
|
263
|
-
font-family: ${
|
|
264
|
-
font-size: ${
|
|
265
|
-
font-weight: ${
|
|
266
|
-
letter-spacing: ${
|
|
267
|
-
line-height: ${
|
|
268
|
-
text-transform: ${
|
|
264
|
+
.ft-typography--subtitle1 {
|
|
265
|
+
font-family: ${ue};
|
|
266
|
+
font-size: ${ve};
|
|
267
|
+
font-weight: ${ye};
|
|
268
|
+
letter-spacing: ${be};
|
|
269
|
+
line-height: ${xe};
|
|
270
|
+
text-transform: ${ge};
|
|
269
271
|
}
|
|
270
|
-
|
|
271
272
|
`,si=b`
|
|
272
|
-
.ft-typography--
|
|
273
|
-
font-family: ${
|
|
274
|
-
font-size: ${
|
|
275
|
-
font-weight: ${
|
|
276
|
-
letter-spacing: ${
|
|
277
|
-
line-height: ${
|
|
278
|
-
text-transform: ${
|
|
273
|
+
.ft-typography--subtitle2 {
|
|
274
|
+
font-family: ${me};
|
|
275
|
+
font-size: ${we};
|
|
276
|
+
font-weight: ${$e};
|
|
277
|
+
letter-spacing: ${Oe};
|
|
278
|
+
line-height: ${Se};
|
|
279
|
+
text-transform: ${ke};
|
|
279
280
|
}
|
|
281
|
+
|
|
280
282
|
`,ai=b`
|
|
281
|
-
.ft-typography--
|
|
282
|
-
font-family: ${
|
|
283
|
-
font-size: ${
|
|
284
|
-
font-weight: ${
|
|
285
|
-
letter-spacing: ${
|
|
286
|
-
line-height: ${
|
|
287
|
-
text-transform: ${
|
|
283
|
+
.ft-typography--body1 {
|
|
284
|
+
font-family: ${Ce};
|
|
285
|
+
font-size: ${Ne};
|
|
286
|
+
font-weight: ${Ee};
|
|
287
|
+
letter-spacing: ${Re};
|
|
288
|
+
line-height: ${Me};
|
|
289
|
+
text-transform: ${je};
|
|
288
290
|
}
|
|
289
291
|
`,li=b`
|
|
290
|
-
.ft-typography--
|
|
291
|
-
font-family: ${
|
|
292
|
-
font-size: ${
|
|
293
|
-
font-weight: ${
|
|
294
|
-
letter-spacing: ${
|
|
295
|
-
line-height: ${
|
|
296
|
-
text-transform: ${
|
|
292
|
+
.ft-typography--body2 {
|
|
293
|
+
font-family: ${Fe};
|
|
294
|
+
font-size: ${Ue};
|
|
295
|
+
font-weight: ${ze};
|
|
296
|
+
letter-spacing: ${Be};
|
|
297
|
+
line-height: ${Te};
|
|
298
|
+
text-transform: ${Ae};
|
|
297
299
|
}
|
|
298
300
|
`,hi=b`
|
|
299
|
-
.ft-typography--
|
|
300
|
-
font-family: ${
|
|
301
|
-
font-size: ${
|
|
302
|
-
font-weight: ${
|
|
303
|
-
letter-spacing: ${
|
|
304
|
-
line-height: ${
|
|
305
|
-
text-transform: ${
|
|
301
|
+
.ft-typography--caption {
|
|
302
|
+
font-family: ${Le};
|
|
303
|
+
font-size: ${Pe};
|
|
304
|
+
font-weight: ${_e};
|
|
305
|
+
letter-spacing: ${De};
|
|
306
|
+
line-height: ${Ie};
|
|
307
|
+
text-transform: ${We};
|
|
306
308
|
}
|
|
307
309
|
`,ci=b`
|
|
308
|
-
.ft-typography--
|
|
309
|
-
font-family: ${
|
|
310
|
-
font-size: ${
|
|
311
|
-
font-weight: ${
|
|
312
|
-
letter-spacing: ${
|
|
313
|
-
line-height: ${
|
|
314
|
-
text-transform: ${
|
|
310
|
+
.ft-typography--breadcrumb {
|
|
311
|
+
font-family: ${He};
|
|
312
|
+
font-size: ${Ke};
|
|
313
|
+
font-weight: ${Ze};
|
|
314
|
+
letter-spacing: ${Ve};
|
|
315
|
+
line-height: ${Je};
|
|
316
|
+
text-transform: ${qe};
|
|
315
317
|
}
|
|
316
318
|
`,pi=b`
|
|
317
|
-
.ft-typography--
|
|
318
|
-
font-family: ${
|
|
319
|
-
font-size: ${
|
|
320
|
-
font-weight: ${
|
|
321
|
-
letter-spacing: ${
|
|
322
|
-
line-height: ${
|
|
323
|
-
text-transform: ${ei
|
|
319
|
+
.ft-typography--overline {
|
|
320
|
+
font-family: ${Xe};
|
|
321
|
+
font-size: ${Ye};
|
|
322
|
+
font-weight: ${Ge};
|
|
323
|
+
letter-spacing: ${Qe};
|
|
324
|
+
line-height: ${ti};
|
|
325
|
+
text-transform: ${ei};
|
|
324
326
|
}
|
|
325
327
|
`,fi=b`
|
|
328
|
+
.ft-typography--button {
|
|
329
|
+
font-family: ${ii.fontFamily};
|
|
330
|
+
font-size: ${ii.fontSize};
|
|
331
|
+
font-weight: ${ii.fontWeight};
|
|
332
|
+
letter-spacing: ${ii.letterSpacing};
|
|
333
|
+
line-height: ${ii.lineHeight};
|
|
334
|
+
text-transform: ${ii.textTransform};
|
|
335
|
+
}
|
|
336
|
+
`,di=b`
|
|
326
337
|
.ft-typography {
|
|
327
338
|
vertical-align: inherit;
|
|
328
339
|
}
|
|
329
|
-
`;var
|
|
330
|
-
<${
|
|
340
|
+
`;var ui=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class vi extends xt{constructor(){super(...arguments),this.variant=Gt.body1}render(){return this.element?Yt`
|
|
341
|
+
<${qt(this.element)}
|
|
331
342
|
class="ft-typography ft-typography--${this.variant}">
|
|
332
343
|
<slot></slot>
|
|
333
|
-
</${
|
|
334
|
-
`:
|
|
344
|
+
</${qt(this.element)}>
|
|
345
|
+
`:Yt`
|
|
335
346
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
336
|
-
`}}
|
|
347
|
+
`}}vi.styles=[oi,ni,ri,si,ai,li,hi,ci,pi,fi,di],ui([o()],vi.prototype,"element",void 0),ui([o()],vi.prototype,"variant",void 0),h("ft-typography")(vi);const yi=ut.create("--ft-tooltip-distance","SIZE","4px"),bi=ut.create("--ft-tooltip-color","COLOR","#FFFFFF"),xi=ut.create("--ft-tooltip-background-color","COLOR","#666666"),gi=ut.create("--ft-tooltip-z-index","NUMBER","1"),mi=ut.external(yt.borderRadiusS,"Design system"),wi=ut.create("--ft-tooltip-max-width","SIZE","150px"),$i=b`
|
|
337
348
|
.ft-tooltip--container {
|
|
338
349
|
display: block;
|
|
339
350
|
position: relative;
|
|
@@ -349,23 +360,23 @@ const Zt=Symbol.for(""),Vt=t=>{if((null==t?void 0:t.r)===Zt)return null==t?void
|
|
|
349
360
|
box-sizing: border-box;
|
|
350
361
|
overflow: hidden;
|
|
351
362
|
width: max-content;
|
|
352
|
-
max-width: ${
|
|
363
|
+
max-width: ${wi};
|
|
353
364
|
text-align: center;
|
|
354
|
-
padding: ${
|
|
355
|
-
z-index: ${
|
|
365
|
+
padding: ${yi};
|
|
366
|
+
z-index: ${gi};
|
|
356
367
|
}
|
|
357
368
|
|
|
358
369
|
.ft-tooltip--content {
|
|
359
370
|
padding: 4px 8px;
|
|
360
|
-
border-radius: ${
|
|
361
|
-
background-color: ${
|
|
362
|
-
color: ${
|
|
371
|
+
border-radius: ${mi};
|
|
372
|
+
background-color: ${xi};
|
|
373
|
+
color: ${bi};
|
|
363
374
|
top: -500px;
|
|
364
375
|
left: -500px;
|
|
365
376
|
position: relative;
|
|
366
377
|
word-break: break-word;
|
|
367
378
|
}
|
|
368
|
-
`;var
|
|
379
|
+
`;var Oi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Si 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 e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return V`
|
|
369
380
|
<div part="container"
|
|
370
381
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
371
382
|
@mouseenter=${this.onHover}
|
|
@@ -383,13 +394,13 @@ const Zt=Symbol.for(""),Vt=t=>{if((null==t?void 0:t.r)===Zt)return null==t?void
|
|
|
383
394
|
</div>
|
|
384
395
|
</div>
|
|
385
396
|
</div>
|
|
386
|
-
`}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 n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${e.width}px, ${
|
|
397
|
+
`}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 n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.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":vi},Si.styles=$i,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([
|
|
387
398
|
/**
|
|
388
399
|
* @license
|
|
389
400
|
* Copyright 2017 Google LLC
|
|
390
401
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
391
402
|
*/
|
|
392
|
-
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":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)],
|
|
403
|
+
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":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([s(".ft-tooltip--container")],Si.prototype,"container",void 0),Oi([s("slot")],Si.prototype,"target",void 0),Oi([s(".ft-tooltip")],Si.prototype,"tooltip",void 0),Oi([s(".ft-tooltip--content")],Si.prototype,"tooltipContent",void 0),Oi([n()],Si.prototype,"visible",void 0),h("ft-tooltip")(Si);const ki={color:ut.extend("--ft-loader-color",yt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")},Ci=b`
|
|
393
404
|
:host {
|
|
394
405
|
line-height: 0;
|
|
395
406
|
}
|
|
@@ -398,8 +409,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
398
409
|
display: inline-block;
|
|
399
410
|
position: relative;
|
|
400
411
|
|
|
401
|
-
width: ${
|
|
402
|
-
height: ${
|
|
412
|
+
width: ${ki.size};
|
|
413
|
+
height: ${ki.size};
|
|
403
414
|
}
|
|
404
415
|
|
|
405
416
|
.ft-loader div {
|
|
@@ -408,7 +419,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
408
419
|
width: 25%;
|
|
409
420
|
height: 25%;
|
|
410
421
|
border-radius: 50%;
|
|
411
|
-
background: ${
|
|
422
|
+
background: ${ki.color};
|
|
412
423
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
413
424
|
}
|
|
414
425
|
|
|
@@ -455,23 +466,23 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
455
466
|
transform: translate(0, 0);
|
|
456
467
|
}
|
|
457
468
|
100% {
|
|
458
|
-
transform: translate(calc(0.35 * ${
|
|
469
|
+
transform: translate(calc(0.35 * ${ki.size}), 0);
|
|
459
470
|
}
|
|
460
471
|
}
|
|
461
|
-
`;class
|
|
472
|
+
`;class Ni extends xt{render(){return V`
|
|
462
473
|
<div class="ft-loader">
|
|
463
474
|
<div></div>
|
|
464
475
|
<div></div>
|
|
465
476
|
<div></div>
|
|
466
477
|
<div></div>
|
|
467
478
|
</div>
|
|
468
|
-
`}}
|
|
479
|
+
`}}Ni.styles=Ci,h("ft-loader")(Ni);
|
|
469
480
|
/**
|
|
470
481
|
* @license
|
|
471
482
|
* Copyright 2017 Google LLC
|
|
472
483
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
473
484
|
*/
|
|
474
|
-
class
|
|
485
|
+
class Ei extends zt{constructor(t){if(super(t),this.it=q,t.type!==Ft)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 e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Ei.directiveName="unsafeHTML",Ei.resultType=1;const Ri=Ut(Ei);var Mi,ji;!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=""}(ji||(ji={})),new Map([...["abw"].map((t=>[t,ji.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,ji.AUDIO])),...["avi"].map((t=>[t,ji.AVI])),...["chm","xhs"].map((t=>[t,ji.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,ji.CODE])),...["csv"].map((t=>[t,ji.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ji.DITA])),...["epub"].map((t=>[t,ji.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ji.EXCEL])),...["flac"].map((t=>[t,ji.FLAC])),...["gif"].map((t=>[t,ji.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ji.GZIP])),...["html","htm","xhtml"].map((t=>[t,ji.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,ji.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ji.JPEG])),...["json"].map((t=>[t,ji.JSON])),...["m4a","m4p"].map((t=>[t,ji.M4A])),...["mov","qt"].map((t=>[t,ji.MOV])),...["mp3"].map((t=>[t,ji.MP3])),...["mp4","m4v"].map((t=>[t,ji.MP4])),...["ogg","oga"].map((t=>[t,ji.OGG])),...["pdf","ps"].map((t=>[t,ji.PDF])),...["png"].map((t=>[t,ji.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ji.POWERPOINT])),...["rar"].map((t=>[t,ji.RAR])),...["stp"].map((t=>[t,ji.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ji.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,ji.VIDEO])),...["wav"].map((t=>[t,ji.WAV])),...["wma"].map((t=>[t,ji.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ji.WORD])),...["xml","xsl","rdf"].map((t=>[t,ji.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ji.YAML])),...["zip"].map((t=>[t,ji.ZIP]))]);const Fi={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")},Ui=b`
|
|
475
486
|
:host, i.ft-icon {
|
|
476
487
|
display: inline-flex;
|
|
477
488
|
align-items: center;
|
|
@@ -480,14 +491,14 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
480
491
|
}
|
|
481
492
|
|
|
482
493
|
:host {
|
|
483
|
-
width: ${
|
|
484
|
-
height: ${
|
|
494
|
+
width: ${Fi.size};
|
|
495
|
+
height: ${Fi.size};
|
|
485
496
|
}
|
|
486
497
|
|
|
487
498
|
i.ft-icon {
|
|
488
499
|
width: 100%;
|
|
489
500
|
height: 100%;
|
|
490
|
-
font-size: ${
|
|
501
|
+
font-size: ${Fi.size};
|
|
491
502
|
line-height: 1;
|
|
492
503
|
font-weight: normal;
|
|
493
504
|
text-transform: none;
|
|
@@ -498,32 +509,32 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
498
509
|
text-rendering: auto;
|
|
499
510
|
-webkit-font-smoothing: antialiased;
|
|
500
511
|
-moz-osx-font-smoothing: grayscale;
|
|
501
|
-
vertical-align: ${
|
|
512
|
+
vertical-align: ${Fi.verticalAlign};
|
|
502
513
|
}
|
|
503
514
|
|
|
504
515
|
i.ft-icon.ft-icon--fluid-topics {
|
|
505
|
-
font-family: ${
|
|
516
|
+
font-family: ${Fi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
506
517
|
|
|
507
518
|
/* Ugly fix because font is broken */
|
|
508
|
-
font-size: calc(0.9 * ${
|
|
519
|
+
font-size: calc(0.9 * ${Fi.size});
|
|
509
520
|
position: relative;
|
|
510
521
|
top: -5%;
|
|
511
522
|
justify-content: center;
|
|
512
523
|
}
|
|
513
524
|
|
|
514
525
|
.ft-icon--file-format {
|
|
515
|
-
font-family: ${
|
|
526
|
+
font-family: ${Fi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
516
527
|
}
|
|
517
528
|
|
|
518
529
|
.ft-icon--material {
|
|
519
|
-
font-family: ${
|
|
530
|
+
font-family: ${Fi.materialFontFamily}, "Material Icons", sans-serif;
|
|
520
531
|
}
|
|
521
|
-
`;var
|
|
532
|
+
`;var zi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(zi||(zi={}));var Bi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ti extends xt{constructor(){super(...arguments),this.variant=zi.fluid_topics,this.resolvedIcon=q}render(){const t="material"!==this.variant||this.value;return V`
|
|
522
533
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
523
|
-
${
|
|
534
|
+
${Ri(this.resolvedIcon)}
|
|
524
535
|
<slot ?hidden=${t}></slot>
|
|
525
536
|
</i>
|
|
526
|
-
`}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
|
|
537
|
+
`}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 zi.file_format:this.resolvedIcon=null!==(t=ji[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case zi.fluid_topics:this.resolvedIcon=null!==(e=Mi[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||q}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ti.elementDefinitions={},Ti.styles=Ui,Bi([o()],Ti.prototype,"variant",void 0),Bi([o()],Ti.prototype,"value",void 0),Bi([n()],Ti.prototype,"resolvedIcon",void 0),Bi([s("slot")],Ti.prototype,"slottedContent",void 0),h("ft-icon")(Ti);const Ai=ut.extend("--ft-button-color",yt.colorPrimary),Li={backgroundColor:ut.extend("--ft-button-background-color",yt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",yt.borderRadiusL),color:Ai,fontSize:ut.extend("--ft-button-font-size",ii.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",Ai),opacityDisabled:ut.external(yt.colorOpacityDisabled,"Design system")},Pi=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",yt.colorOnPrimary)),_i={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",yt.colorPrimary)),color:Pi,rippleColor:ut.extend("--ft-button-primary-ripple-color",Pi)},Di=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",yt.borderRadiusM)),Ii=[gt,b`
|
|
527
538
|
:host {
|
|
528
539
|
display: inline-block;
|
|
529
540
|
max-width: 100%;
|
|
@@ -534,7 +545,7 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
534
545
|
box-shadow: 0px 0px 0px transparent;
|
|
535
546
|
border: 0px solid transparent;
|
|
536
547
|
text-shadow: 0px 0px 0px transparent;
|
|
537
|
-
font-size: ${
|
|
548
|
+
font-size: ${Li.fontSize};
|
|
538
549
|
}
|
|
539
550
|
|
|
540
551
|
button:hover {
|
|
@@ -563,17 +574,17 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
563
574
|
border: none;
|
|
564
575
|
pointer-events: auto;
|
|
565
576
|
|
|
566
|
-
--ft-button-internal-line-height: calc(${
|
|
567
|
-
--ft-button-internal-color: ${
|
|
568
|
-
${vt(
|
|
577
|
+
--ft-button-internal-line-height: calc(${Li.fontSize} + 2px);
|
|
578
|
+
--ft-button-internal-color: ${Li.color};
|
|
579
|
+
${vt(Fi.size,Li.iconSize)};
|
|
569
580
|
--ft-button-internal-vertical-padding: 6px;
|
|
570
581
|
--ft-button-internal-horizontal-padding: 8px;
|
|
571
|
-
${vt(
|
|
572
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
582
|
+
${vt(At.color,Li.rippleColor)};
|
|
583
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Li.iconSize});
|
|
573
584
|
|
|
574
|
-
border-radius: ${
|
|
585
|
+
border-radius: ${Li.borderRadius};
|
|
575
586
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
576
|
-
background-color: ${
|
|
587
|
+
background-color: ${Li.backgroundColor};
|
|
577
588
|
color: var(--ft-button-internal-color);
|
|
578
589
|
-webkit-mask-image: radial-gradient(white, black);
|
|
579
590
|
}
|
|
@@ -585,7 +596,7 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
585
596
|
.ft-button--dense {
|
|
586
597
|
--ft-button-internal-vertical-padding: 2px;
|
|
587
598
|
--ft-button-internal-horizontal-padding: 4px;
|
|
588
|
-
border-radius: ${
|
|
599
|
+
border-radius: ${Di};
|
|
589
600
|
}
|
|
590
601
|
|
|
591
602
|
.ft-button--round {
|
|
@@ -594,13 +605,13 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
594
605
|
|
|
595
606
|
.ft-button[disabled] {
|
|
596
607
|
filter: grayscale(1);
|
|
597
|
-
opacity: ${
|
|
608
|
+
opacity: ${Li.opacityDisabled};
|
|
598
609
|
}
|
|
599
610
|
|
|
600
611
|
.ft-button.ft-button--primary {
|
|
601
|
-
background-color: ${
|
|
602
|
-
--ft-button-internal-color: ${
|
|
603
|
-
${vt(
|
|
612
|
+
background-color: ${_i.backgroundColor};
|
|
613
|
+
--ft-button-internal-color: ${_i.color};
|
|
614
|
+
${vt(At.color,_i.rippleColor)};
|
|
604
615
|
}
|
|
605
616
|
|
|
606
617
|
.ft-button.ft-button--outlined {
|
|
@@ -619,20 +630,10 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
619
630
|
text-overflow: ellipsis;
|
|
620
631
|
display: block;
|
|
621
632
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
622
|
-
${vt(
|
|
623
|
-
${vt(
|
|
633
|
+
${vt(ii.fontSize,"1em")};
|
|
634
|
+
${vt(ii.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
624
635
|
}
|
|
625
|
-
|
|
626
|
-
.ft-button--safari-fix .ft-button--label {
|
|
627
|
-
margin-right: 0;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
631
|
-
content: "\\0000a0";
|
|
632
|
-
display: inline-block;
|
|
633
|
-
width: 0;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
+
|
|
636
637
|
.ft-button--label[hidden] {
|
|
637
638
|
display: none;
|
|
638
639
|
}
|
|
@@ -653,19 +654,19 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
653
654
|
}
|
|
654
655
|
|
|
655
656
|
ft-loader {
|
|
656
|
-
${vt(
|
|
657
|
-
${vt(
|
|
657
|
+
${vt(ki.size,Li.iconSize)};
|
|
658
|
+
${vt(ki.color,"var(--ft-button-internal-color)")};
|
|
658
659
|
}
|
|
659
|
-
`];var
|
|
660
|
+
`];var Wi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Hi 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=zi.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`
|
|
660
661
|
<button part="button"
|
|
661
|
-
class="${
|
|
662
|
+
class="${Bt(t)}"
|
|
662
663
|
aria-label="${this.getLabel()}"
|
|
663
664
|
?disabled=${this.isDisabled()}>
|
|
664
665
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
665
666
|
<ft-typography part="label"
|
|
666
667
|
variant="button"
|
|
667
668
|
element="span"
|
|
668
|
-
class="ft-button--label"
|
|
669
|
+
class="ft-button--label ${Nt?"ft-safari-ellipsis-fix":""}"
|
|
669
670
|
?hidden=${!this.hasTextContent()}>
|
|
670
671
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
671
672
|
</ft-typography>
|
|
@@ -679,13 +680,13 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
679
680
|
</ft-tooltip>
|
|
680
681
|
`:t}resolveIcon(){return this.loading?V`
|
|
681
682
|
<ft-loader></ft-loader> `:this.icon?V`
|
|
682
|
-
<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}}
|
|
683
|
+
<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}}Hi.elementDefinitions={"ft-ripple":Zt,"ft-tooltip":Si,"ft-typography":vi,"ft-icon":Ti,"ft-loader":Ni},Hi.styles=[mt,Ii],Wi([o({type:Boolean})],Hi.prototype,"primary",void 0),Wi([o({type:Boolean})],Hi.prototype,"outlined",void 0),Wi([o({type:Boolean})],Hi.prototype,"disabled",void 0),Wi([o({type:Boolean})],Hi.prototype,"dense",void 0),Wi([o({type:Boolean})],Hi.prototype,"round",void 0),Wi([o({type:String})],Hi.prototype,"label",void 0),Wi([o({type:String})],Hi.prototype,"icon",void 0),Wi([o({type:String})],Hi.prototype,"iconVariant",void 0),Wi([o({type:Boolean})],Hi.prototype,"trailingIcon",void 0),Wi([o({type:Boolean})],Hi.prototype,"loading",void 0),Wi([o({type:String})],Hi.prototype,"tooltipPosition",void 0),Wi([o({type:Boolean})],Hi.prototype,"hideTooltip",void 0),Wi([o({type:Boolean})],Hi.prototype,"forceTooltip",void 0),Wi([s(".ft-button")],Hi.prototype,"button",void 0),Wi([s(".ft-button--label slot")],Hi.prototype,"slottedContent",void 0),h("ft-button")(Hi);var Ki=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Zi extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Vi extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new Zi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Ki([n()],e.prototype,"stateManager",void 0),e}($t)){}var Ji=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class qi extends Vi{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=Bt({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return V`
|
|
683
684
|
<a class=${e}
|
|
684
685
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
685
686
|
@click=${t=>this.onLinkClick(t)}>
|
|
686
687
|
<slot></slot>
|
|
687
688
|
</a>
|
|
688
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}
|
|
689
|
+
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}qi.styles=Rt,Ji([o()],qi.prototype,"tocId",void 0),Ji([o()],qi.prototype,"section",void 0),Ji([o({type:Number})],qi.prototype,"pageNumber",void 0),Ji([o({type:Boolean})],qi.prototype,"removeStyle",void 0),h("ft-reader-internal-link")(qi);var Xi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Yi extends Vi{constructor(){super(...arguments),this.target="next",this.tooltipPosition="bottom",this.hideTooltip=!1,this.iconVariant=zi.fluid_topics,this.trailingIcon=!1,this.editorMode=!1,this.isReady=!1,this.debouncer=new e(10)}get defaultContent(){return this.target.substring(0,1).toUpperCase()+this.target.substring(1)}get defaultIcon(){return"next"===this.target?Mi.THIN_ARROW_RIGHT:Mi.THIN_ARROW_LEFT}render(){var t,e,i,o,n;if(null==this.targetPage&&!this.editorMode)return q;const r=V`
|
|
689
690
|
<ft-button ?forceTooltip=${!this.hideTooltip}
|
|
690
691
|
?hideTooltip=${this.hideTooltip}
|
|
691
692
|
?trailingIcon=${this.trailingIcon}
|
|
@@ -699,4 +700,4 @@ class Ni extends Ut{constructor(t){if(super(t),this.it=q,t.type!==jt)throw Error
|
|
|
699
700
|
<ft-reader-internal-link .tocId=${null===(n=this.targetPage)||void 0===n?void 0:n.rootTocId} removestyle>
|
|
700
701
|
${r}
|
|
701
702
|
</ft-reader-internal-link>
|
|
702
|
-
`}update(t){super.update(t),t.has("currentPage")&&(this.targetPage=void 0,this.isReady=!1,this.debouncer.run((()=>this.updateTarget())))}async updateTarget(){var t,e;if(this.currentPage){const i=this.currentPage.number+("next"===this.target?1:-1);this.targetPage=await(null===(t=this.service)||void 0===t?void 0:t.getPage(i)),(null===(e=this.targetPage)||void 0===e?void 0:e.number)!==i&&(this.targetPage=void 0)}else this.targetPage=void 0;this.isReady=!0}}
|
|
703
|
+
`}update(t){super.update(t),t.has("currentPage")&&(this.targetPage=void 0,this.isReady=!1,this.debouncer.run((()=>this.updateTarget())))}async updateTarget(){var t,e;if(this.currentPage){const i=this.currentPage.number+("next"===this.target?1:-1);this.targetPage=await(null===(t=this.service)||void 0===t?void 0:t.getPage(i)),(null===(e=this.targetPage)||void 0===e?void 0:e.number)!==i&&(this.targetPage=void 0)}else this.targetPage=void 0;this.isReady=!0}}Yi.elementDefinitions={"ft-button":Hi,"ft-reader-internal-link":qi},Yi.styles=Mt,Xi([o()],Yi.prototype,"target",void 0),Xi([o()],Yi.prototype,"content",void 0),Xi([o()],Yi.prototype,"tooltipPosition",void 0),Xi([o({type:Boolean})],Yi.prototype,"hideTooltip",void 0),Xi([o()],Yi.prototype,"iconVariant",void 0),Xi([o()],Yi.prototype,"icon",void 0),Xi([o({type:Boolean})],Yi.prototype,"trailingIcon",void 0),Xi([o({type:Boolean,attribute:!1})],Yi.prototype,"editorMode",void 0),Xi([((t,e)=>{var i;const o=wt(t)?t:{};return e=null!==(i=null!=e?e:o.hasChanged)&&void 0!==i?i:(t,e)=>!c(t,e),(i,n)=>{var r;i.constructor.createProperty(n,{attribute:!1,hasChanged:e});const s=i;s.reduxProperties=s.reduxProperties||new Map;const a=null!==(r=wt(t)?o.selector:t)&&void 0!==r?r:t=>t[n];s.reduxProperties.set(n,{selector:a,store:o.store})}})()],Yi.prototype,"currentPage",void 0),Xi([n()],Yi.prototype,"targetPage",void 0),h("ft-reader-navigation-button")(Yi),t.FtReaderNavigationButton=Yi,t.FtReaderNavigationButtonCssVariables={},t.styles=Mt,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-navigation-button",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.55",
|
|
4
4
|
"description": "Button used to navigate between pages in an integrated reader context.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
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-reader-context": "0.3.
|
|
24
|
-
"@fluid-topics/ft-reader-internal-link": "0.3.
|
|
25
|
-
"@fluid-topics/ft-tooltip": "0.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-button": "0.3.55",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "0.3.55",
|
|
24
|
+
"@fluid-topics/ft-reader-internal-link": "0.3.55",
|
|
25
|
+
"@fluid-topics/ft-tooltip": "0.3.55",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "0.3.55",
|
|
27
27
|
"lit": "2.2.8"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "4106f01e238edeb1c85fba22d6d50a18757e0b3e"
|
|
30
30
|
}
|