@fluid-topics/ft-chip 0.3.12 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-chip.css.d.ts +22 -0
- package/build/ft-chip.css.js +163 -0
- package/build/ft-chip.d.ts +2 -33
- package/build/ft-chip.js +7 -164
- package/build/ft-chip.light.js +240 -246
- package/build/ft-chip.min.js +243 -243
- package/build/ft-chip.property.d.ts +13 -0
- package/build/ft-chip.property.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +6 -6
package/build/ft-chip.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=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 c={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,c),this._definitionsByClass.set(n,c);let p=e.call(o,t);p||(p=h(t),i.call(o,t,p)),this===window.customElements&&(s.set(n,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.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=s.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 c=t=>t===document||t instanceof ShadowRoot,p=t=>{let i=t.getRootNode();if(!c(i)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},h=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):r.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.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)}},f=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(i.has(r)){const t=this.getAttribute(r);o.call(this,r,n),e.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(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},d=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):d(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){d(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)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=y.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let g=[document];const v=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){g.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),g.pop(),t}};v(ShadowRoot,"createElement",document),v(ShadowRoot,"importNode",document),v(Element,"insertAdjacentHTML");const x=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){g.push(this),e.set.call(this,t),g.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 r{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 s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new r(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,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 c={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,c),this._definitionsByClass.set(n,c);let p=e.call(o,t);p||(p=h(t),i.call(o,t,p)),this===window.customElements&&(s.set(n,c),c.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.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=s.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 c=t=>t===document||t instanceof ShadowRoot,p=t=>{let i=t.getRootNode();if(!c(i)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},h=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):r.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.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)}},f=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(i.has(r)){const t=this.getAttribute(r);o.call(this,r,n),e.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(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},d=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):d(e)},u=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){d(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)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=y.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let g=[document];const v=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){g.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),g.pop(),t}};v(ShadowRoot,"createElement",document),v(ShadowRoot,"importNode",document),v(Element,"insertAdjacentHTML");const x=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){g.push(this),e.set.call(this,t),g.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 r{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 s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new r(i)}})}}try{window.customElements.define("custom-element",null)}catch(oe){const t=window.customElements.define;window.customElements.define=(i,e,o)=>{try{t.bind(window.customElements)(i,e,o)}catch(t){console.warn(i,e,o,t)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -92,119 +92,119 @@ var nt,rt;null==ot||ot(V,X),(null!==(S=globalThis.litHtmlVersions)&&void 0!==S?S
|
|
|
92
92
|
* @license
|
|
93
93
|
* Copyright 2018 Google LLC
|
|
94
94
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
95
|
-
*/const $t=bt(class extends wt{constructor(t){var i;if(super(t),t.type!==xt||"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 I}})
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
width: ${this.rippleSize}px;
|
|
100
|
-
height: ${this.rippleSize}px;
|
|
101
|
-
}
|
|
95
|
+
*/const $t=bt(class extends wt{constructor(t){var i;if(super(t),t.type!==xt||"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 I}}),Ot=lt.extend("--ft-ripple-color",pt.colorContent),St={color:Ot,backgroundColor:lt.extend("--ft-ripple-background-color",Ot),opacityContentOnSurfacePressed:lt.external(pt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:lt.external(pt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:lt.external(pt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:lt.external(pt.opacityContentOnSurfaceSelected,"Design system")},kt=lt.extend("--ft-ripple-color",pt.colorPrimary),Nt=kt,Ct=lt.extend("--ft-ripple-background-color",kt),Et=lt.extend("--ft-ripple-color",pt.colorSecondary),Rt=Et,Mt=lt.extend("--ft-ripple-background-color",Et),zt=d`
|
|
96
|
+
:host {
|
|
97
|
+
display: contents;
|
|
98
|
+
}
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<div class="${$t(t)}">
|
|
109
|
-
<div class="ft-ripple--background"></div>
|
|
110
|
-
<div class="ft-ripple--effect"></div>
|
|
111
|
-
</div>
|
|
112
|
-
`}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()}}Ut.elementDefinitions={},Ut.styles=d`
|
|
113
|
-
:host {
|
|
114
|
-
display: contents;
|
|
115
|
-
}
|
|
100
|
+
.ft-ripple {
|
|
101
|
+
position: absolute;
|
|
102
|
+
inset: 0;
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
}
|
|
116
105
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
pointer-events: none;
|
|
121
|
-
}
|
|
106
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
|
122
109
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
110
|
+
.ft-ripple .ft-ripple--background,
|
|
111
|
+
.ft-ripple .ft-ripple--effect {
|
|
112
|
+
position: absolute;
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
126
115
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
opacity: 0;
|
|
131
|
-
}
|
|
116
|
+
.ft-ripple .ft-ripple--background {
|
|
117
|
+
background-color: ${St.backgroundColor};
|
|
118
|
+
}
|
|
132
119
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
120
|
+
.ft-ripple .ft-ripple--effect {
|
|
121
|
+
background-color: ${St.color};
|
|
122
|
+
}
|
|
136
123
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
125
|
+
background-color: ${Mt};
|
|
126
|
+
}
|
|
140
127
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
128
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
129
|
+
background-color: ${Rt};
|
|
130
|
+
}
|
|
144
131
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
132
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
133
|
+
background-color: ${Ct};
|
|
134
|
+
}
|
|
148
135
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
136
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
137
|
+
background-color: ${Nt};
|
|
138
|
+
}
|
|
152
139
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
.ft-ripple .ft-ripple--background {
|
|
141
|
+
top: 0;
|
|
142
|
+
left: 0;
|
|
143
|
+
height: 100%;
|
|
144
|
+
width: 100%;
|
|
145
|
+
transition: opacity 75ms linear;
|
|
146
|
+
}
|
|
156
147
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
width: 100%;
|
|
162
|
-
transition: opacity 75ms linear;
|
|
163
|
-
}
|
|
148
|
+
.ft-ripple .ft-ripple--effect,
|
|
149
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
150
|
+
border-radius: 50%;
|
|
151
|
+
}
|
|
164
152
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
153
|
+
.ft-ripple .ft-ripple--effect {
|
|
154
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
155
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
156
|
+
}
|
|
169
157
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
158
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
159
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
160
|
+
left: 50%;
|
|
161
|
+
top: 50%;
|
|
162
|
+
}
|
|
174
163
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
top: 50%;
|
|
179
|
-
}
|
|
164
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
165
|
+
transform: translate(-50%, -50%);
|
|
166
|
+
}
|
|
180
167
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
168
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
169
|
+
opacity: ${St.opacityContentOnSurfaceHover};
|
|
170
|
+
}
|
|
184
171
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
172
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
173
|
+
opacity: ${St.opacityContentOnSurfaceSelected};
|
|
174
|
+
}
|
|
188
175
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
176
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
177
|
+
opacity: ${St.opacityContentOnSurfaceFocused};
|
|
178
|
+
}
|
|
192
179
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
180
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
181
|
+
opacity: ${St.opacityContentOnSurfacePressed};
|
|
182
|
+
transform: translate(-50%, -50%) scale(1);
|
|
183
|
+
}
|
|
184
|
+
`;var Ut=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Ft extends ft{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),r=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-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 D`
|
|
185
|
+
<style>
|
|
186
|
+
.ft-ripple .ft-ripple--effect,
|
|
187
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
188
|
+
width: ${this.rippleSize}px;
|
|
189
|
+
height: ${this.rippleSize}px;
|
|
190
|
+
}
|
|
196
191
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
192
|
+
.ft-ripple .ft-ripple--effect {
|
|
193
|
+
left: ${this.originX}px;
|
|
194
|
+
top: ${this.originY}px;
|
|
195
|
+
}
|
|
196
|
+
</style>
|
|
197
|
+
<div class="${$t(t)}">
|
|
198
|
+
<div class="ft-ripple--background"></div>
|
|
199
|
+
<div class="ft-ripple--effect"></div>
|
|
200
|
+
</div>
|
|
201
|
+
`}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()}}Ft.elementDefinitions={},Ft.styles=zt,Ut([o({type:Boolean})],Ft.prototype,"primary",void 0),Ut([o({type:Boolean})],Ft.prototype,"secondary",void 0),Ut([o({type:Boolean})],Ft.prototype,"unbounded",void 0),Ut([o({type:Boolean})],Ft.prototype,"activated",void 0),Ut([o({type:Boolean})],Ft.prototype,"selected",void 0),Ut([o({type:Boolean})],Ft.prototype,"disabled",void 0),Ut([n()],Ft.prototype,"hovered",void 0),Ut([n()],Ft.prototype,"focused",void 0),Ut([n()],Ft.prototype,"pressed",void 0),Ut([n()],Ft.prototype,"rippling",void 0),Ut([n()],Ft.prototype,"rippleSize",void 0),Ut([n()],Ft.prototype,"originX",void 0),Ut([n()],Ft.prototype,"originY",void 0),Ut([r(".ft-ripple")],Ft.prototype,"ripple",void 0),Ut([r(".ft-ripple--effect")],Ft.prototype,"rippleEffect",void 0),a("ft-ripple")(Ft);
|
|
202
202
|
/**
|
|
203
203
|
* @license
|
|
204
204
|
* Copyright 2020 Google LLC
|
|
205
205
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
206
206
|
*/
|
|
207
|
-
const
|
|
207
|
+
const jt=Symbol.for(""),At=t=>{if((null==t?void 0:t.r)===jt)return null==t?void 0:t._$litStatic$},Bt=t=>({_$litStatic$:t,r:jt}),Lt=new Map,Pt=(t=>(i,...e)=>{const o=e.length;let n,r;const s=[],a=[];let l,c=0,p=!1;for(;c<o;){for(l=i[c];c<o&&void 0!==(r=e[c],n=At(r));)l+=n+i[++c],p=!0;a.push(r),s.push(l),c++}if(c===o&&s.push(i[o]),p){const t=s.join("$$lit$$");void 0===(i=Lt.get(t))&&(s.raw=s,Lt.set(t,i=s)),e=a}return t(i,...e)})(D);var Tt;!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"}(Tt||(Tt={}));const _t=lt.extend("--ft-typography-font-family",pt.titleFont),Dt=lt.extend("--ft-typography-font-family",pt.contentFont),It={fontFamily:Dt,fontSize:lt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:lt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:lt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:lt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:lt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Wt=lt.extend("--ft-typography-title-font-family",_t),Kt=lt.extend("--ft-typography-title-font-size",It.fontSize,"20px"),Ht=lt.extend("--ft-typography-title-font-weight",It.fontWeight,"normal"),Zt=lt.extend("--ft-typography-title-letter-spacing",It.letterSpacing,"0.15px"),Vt=lt.extend("--ft-typography-title-line-height",It.lineHeight,"1.2"),Jt=lt.extend("--ft-typography-title-text-transform",It.textTransform,"inherit"),qt=lt.extend("--ft-typography-title-dense-font-family",_t),Xt=lt.extend("--ft-typography-title-dense-font-size",It.fontSize,"14px"),Yt=lt.extend("--ft-typography-title-dense-font-weight",It.fontWeight,"normal"),Gt=lt.extend("--ft-typography-title-dense-letter-spacing",It.letterSpacing,"0.105px"),Qt=lt.extend("--ft-typography-title-dense-line-height",It.lineHeight,"1.7"),ti=lt.extend("--ft-typography-title-dense-text-transform",It.textTransform,"inherit"),ii=lt.extend("--ft-typography-subtitle1-font-family",Dt),ei=lt.extend("--ft-typography-subtitle1-font-size",It.fontSize,"16px"),oi=lt.extend("--ft-typography-subtitle1-font-weight",It.fontWeight,"600"),ni=lt.extend("--ft-typography-subtitle1-letter-spacing",It.letterSpacing,"0.144px"),ri=lt.extend("--ft-typography-subtitle1-line-height",It.lineHeight,"1.5"),si=lt.extend("--ft-typography-subtitle1-text-transform",It.textTransform,"inherit"),ai=lt.extend("--ft-typography-subtitle2-font-family",Dt),li=lt.extend("--ft-typography-subtitle2-font-size",It.fontSize,"14px"),ci=lt.extend("--ft-typography-subtitle2-font-weight",It.fontWeight,"normal"),pi=lt.extend("--ft-typography-subtitle2-letter-spacing",It.letterSpacing,"0.098px"),hi=lt.extend("--ft-typography-subtitle2-line-height",It.lineHeight,"1.7"),fi=lt.extend("--ft-typography-subtitle2-text-transform",It.textTransform,"inherit"),di=lt.extend("--ft-typography-body1-font-family",Dt),ui=lt.extend("--ft-typography-body1-font-size",It.fontSize,"16px"),yi=lt.extend("--ft-typography-body1-font-weight",It.fontWeight,"normal"),gi=lt.extend("--ft-typography-body1-letter-spacing",It.letterSpacing,"0.496px"),vi=lt.extend("--ft-typography-body1-line-height",It.lineHeight,"1.5"),xi=lt.extend("--ft-typography-body1-text-transform",It.textTransform,"inherit"),mi={fontFamily:lt.extend("--ft-typography-body2-font-family",Dt),fontSize:lt.extend("--ft-typography-body2-font-size",It.fontSize,"14px"),fontWeight:lt.extend("--ft-typography-body2-font-weight",It.fontWeight,"normal"),letterSpacing:lt.extend("--ft-typography-body2-letter-spacing",It.letterSpacing,"0.252px"),lineHeight:lt.extend("--ft-typography-body2-line-height",It.lineHeight,"1.4"),textTransform:lt.extend("--ft-typography-body2-text-transform",It.textTransform,"inherit")},bi=lt.extend("--ft-typography-caption-font-family",Dt),wi=lt.extend("--ft-typography-caption-font-size",It.fontSize,"12px"),$i=lt.extend("--ft-typography-caption-font-weight",It.fontWeight,"normal"),Oi=lt.extend("--ft-typography-caption-letter-spacing",It.letterSpacing,"0.396px"),Si=lt.extend("--ft-typography-caption-line-height",It.lineHeight,"1.33"),ki=lt.extend("--ft-typography-caption-text-transform",It.textTransform,"inherit"),Ni=lt.extend("--ft-typography-breadcrumb-font-family",Dt),Ci=lt.extend("--ft-typography-breadcrumb-font-size",It.fontSize,"10px"),Ei=lt.extend("--ft-typography-breadcrumb-font-weight",It.fontWeight,"normal"),Ri=lt.extend("--ft-typography-breadcrumb-letter-spacing",It.letterSpacing,"0.33px"),Mi=lt.extend("--ft-typography-breadcrumb-line-height",It.lineHeight,"1.6"),zi=lt.extend("--ft-typography-breadcrumb-text-transform",It.textTransform,"inherit"),Ui=lt.extend("--ft-typography-overline-font-family",Dt),Fi=lt.extend("--ft-typography-overline-font-size",It.fontSize,"10px"),ji=lt.extend("--ft-typography-overline-font-weight",It.fontWeight,"normal"),Ai=lt.extend("--ft-typography-overline-letter-spacing",It.letterSpacing,"1.5px"),Bi=lt.extend("--ft-typography-overline-line-height",It.lineHeight,"1.6"),Li=lt.extend("--ft-typography-overline-text-transform",It.textTransform,"uppercase"),Pi=lt.extend("--ft-typography-button-font-family",Dt),Ti=lt.extend("--ft-typography-button-font-size",It.fontSize,"14px"),_i=lt.extend("--ft-typography-button-font-weight",It.fontWeight,"600"),Di=lt.extend("--ft-typography-button-letter-spacing",It.letterSpacing,"1.246px"),Ii=lt.extend("--ft-typography-button-line-height",It.lineHeight,"1.15"),Wi=lt.extend("--ft-typography-button-text-transform",It.textTransform,"uppercase"),Ki=d`
|
|
208
208
|
.ft-typography--title {
|
|
209
209
|
font-family: ${Wt};
|
|
210
210
|
font-size: ${Kt};
|
|
@@ -295,196 +295,196 @@ const Ft=Symbol.for(""),jt=t=>{if((null==t?void 0:t.r)===Ft)return null==t?void
|
|
|
295
295
|
line-height: ${Ii};
|
|
296
296
|
text-transform: ${Wi};
|
|
297
297
|
}
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
`,te=d`
|
|
299
|
+
.ft-typography {
|
|
300
|
+
vertical-align: inherit;
|
|
301
|
+
}
|
|
302
|
+
`;var ie=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class ee extends ft{constructor(){super(...arguments),this.variant=Tt.body1}render(){return this.element?Pt`
|
|
303
|
+
<${Bt(this.element)}
|
|
300
304
|
class="ft-typography ft-typography--${this.variant}">
|
|
301
305
|
<slot></slot>
|
|
302
|
-
</${
|
|
303
|
-
`:
|
|
306
|
+
</${Bt(this.element)}>
|
|
307
|
+
`:Pt`
|
|
304
308
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
305
|
-
`}}
|
|
306
|
-
.ft-typography {
|
|
307
|
-
vertical-align: inherit;
|
|
308
|
-
}
|
|
309
|
-
`],Tt([o()],te.prototype,"element",void 0),Tt([o()],te.prototype,"variant",void 0),a("ft-typography")(te);
|
|
309
|
+
`}}ee.styles=[Ki,Hi,Zi,Vi,Ji,qi,Xi,Yi,Gi,Qi,te],ie([o()],ee.prototype,"element",void 0),ie([o()],ee.prototype,"variant",void 0),a("ft-typography")(ee);
|
|
310
310
|
/**
|
|
311
311
|
* @license
|
|
312
312
|
* Copyright 2017 Google LLC
|
|
313
313
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
314
314
|
*/
|
|
315
|
-
class
|
|
315
|
+
class oe extends wt{constructor(t){if(super(t),this.it=W,t.type!==mt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===W||null==t)return this._t=void 0,this.it=t;if(t===I)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:[]}}}oe.directiveName="unsafeHTML",oe.resultType=1;const ne=bt(oe);var re,se;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(re||(re={})),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=""}(se||(se={})),new Map([...["abw"].map((t=>[t,se.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,se.AUDIO])),...["avi"].map((t=>[t,se.AVI])),...["chm","xhs"].map((t=>[t,se.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,se.CODE])),...["csv"].map((t=>[t,se.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,se.DITA])),...["epub"].map((t=>[t,se.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,se.EXCEL])),...["flac"].map((t=>[t,se.FLAC])),...["gif"].map((t=>[t,se.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,se.GZIP])),...["html","htm","xhtml"].map((t=>[t,se.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,se.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,se.JPEG])),...["json"].map((t=>[t,se.JSON])),...["m4a","m4p"].map((t=>[t,se.M4A])),...["mov","qt"].map((t=>[t,se.MOV])),...["mp3"].map((t=>[t,se.MP3])),...["mp4","m4v"].map((t=>[t,se.MP4])),...["ogg","oga"].map((t=>[t,se.OGG])),...["pdf","ps"].map((t=>[t,se.PDF])),...["png"].map((t=>[t,se.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,se.POWERPOINT])),...["rar"].map((t=>[t,se.RAR])),...["stp"].map((t=>[t,se.STP])),...["txt","rtf","md","mdown"].map((t=>[t,se.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,se.VIDEO])),...["wav"].map((t=>[t,se.WAV])),...["wma"].map((t=>[t,se.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,se.WORD])),...["xml","xsl","rdf"].map((t=>[t,se.XML])),...["yaml","yml","x-yaml"].map((t=>[t,se.YAML])),...["zip"].map((t=>[t,se.ZIP]))]);const ae={size:lt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:lt.extend("--ft-icon-fluid-topics-font-family",lt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:lt.extend("--ft-icon-file-format-font-family",lt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:lt.extend("--ft-icon-material-font-family",lt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:lt.create("--ft-icon-vertical-align","UNKNOWN","unset")},le=d`
|
|
316
|
+
:host {
|
|
317
|
+
display: inline-block;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
:host, i.ft-icon {
|
|
321
|
+
width: ${ae.size};
|
|
322
|
+
height: ${ae.size};
|
|
323
|
+
text-align: center;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
i.ft-icon {
|
|
327
|
+
font-size: ${ae.size};
|
|
328
|
+
line-height: 1;
|
|
329
|
+
font-weight: normal;
|
|
330
|
+
text-transform: none;
|
|
331
|
+
font-style: normal;
|
|
332
|
+
font-variant: normal;
|
|
333
|
+
speak: none;
|
|
334
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
335
|
+
text-rendering: auto;
|
|
336
|
+
-webkit-font-smoothing: antialiased;
|
|
337
|
+
-moz-osx-font-smoothing: grayscale;
|
|
338
|
+
vertical-align: ${ae.verticalAlign};
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.ft-icon--fluid-topics {
|
|
342
|
+
font-family: ${ae.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ft-icon--file-format {
|
|
346
|
+
font-family: ${ae.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.ft-icon--material {
|
|
350
|
+
font-family: ${ae.materialFontFamily}, "Material Icons", sans-serif;
|
|
351
|
+
}
|
|
352
|
+
`;var ce;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ce||(ce={}));var pe=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class he extends ft{constructor(){super(...arguments),this.variant=ce.fluid_topics,this.resolvedIcon=W}render(){const t="material"!==this.variant||this.value;return D`
|
|
316
353
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
317
|
-
${
|
|
354
|
+
${ne(this.resolvedIcon)}
|
|
318
355
|
<slot ?hidden=${t}></slot>
|
|
319
356
|
</i>
|
|
320
|
-
`}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
|
|
357
|
+
`}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 ce.file_format:this.resolvedIcon=null!==(t=se[e.toUpperCase()])&&void 0!==t?t:e;break;case ce.fluid_topics:this.resolvedIcon=null!==(i=re[e.toUpperCase()])&&void 0!==i?i:e;break;default:this.resolvedIcon=this.value||W}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}he.elementDefinitions={},he.styles=le,pe([o()],he.prototype,"variant",void 0),pe([o()],he.prototype,"value",void 0),pe([n()],he.prototype,"resolvedIcon",void 0),pe([r("slot")],he.prototype,"slottedContent",void 0),a("ft-icon")(he);const fe=lt.extend("--ft-chip-color",pt.colorOnSurface),de={backgroundColor:lt.extend("--ft-chip-background-color",pt.colorSurface),color:fe,fontSize:lt.extend("--ft-chip-font-size",mi.fontSize),iconSize:lt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:lt.extend("--ft-chip-ripple-color",fe),horizontalPadding:lt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:lt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:lt.external(pt.colorOutline,"Design system"),opacityDisabled:lt.external(pt.colorOpacityDisabled,"Design system")},ue=lt.extend("--ft-chip-highlighted-color",lt.extend("--ft-chip-color",pt.colorOnPrimary)),ye={backgroundColor:lt.extend("--ft-chip-highlighted-background-color",lt.extend("--ft-chip-background-color",pt.colorPrimary)),color:ue,rippleColor:lt.extend("--ft-chip-highlighted-ripple-color",ue)},ge={horizontalPadding:lt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),verticalPadding:lt.create("--ft-chip-dense-vertical-padding","SIZE","4px")},ve=[dt,d`
|
|
321
358
|
:host {
|
|
322
359
|
display: inline-block;
|
|
360
|
+
max-width: 100%;
|
|
361
|
+
pointer-events: none;
|
|
323
362
|
}
|
|
324
363
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
364
|
+
.ft-chip {
|
|
365
|
+
position: relative;
|
|
366
|
+
display: flex;
|
|
367
|
+
justify-content: center;
|
|
368
|
+
align-items: center;
|
|
369
|
+
width: 100%;
|
|
370
|
+
overflow: hidden;
|
|
371
|
+
box-sizing: border-box;
|
|
372
|
+
pointer-events: auto;
|
|
373
|
+
|
|
374
|
+
--ft-chip-internal-font-size: ${de.fontSize};
|
|
375
|
+
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
376
|
+
${ct(ae.size,de.iconSize)};
|
|
377
|
+
--ft-chip-internal-vertical-padding: ${de.verticalPadding};
|
|
378
|
+
--ft-chip-internal-horizontal-padding: ${de.horizontalPadding};
|
|
379
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
380
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${de.iconSize});
|
|
381
|
+
|
|
382
|
+
border: 1px solid ${de.colorOutline};
|
|
383
|
+
color: ${de.color};
|
|
384
|
+
${ct(St.color,de.rippleColor)};
|
|
385
|
+
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
386
|
+
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
387
|
+
background-color: ${de.backgroundColor};
|
|
388
|
+
line-height: var(--ft-chip-internal-content-height);
|
|
329
389
|
}
|
|
330
390
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
line-height: 1;
|
|
334
|
-
font-weight: normal;
|
|
335
|
-
text-transform: none;
|
|
336
|
-
font-style: normal;
|
|
337
|
-
font-variant: normal;
|
|
338
|
-
speak: none;
|
|
339
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
340
|
-
text-rendering: auto;
|
|
341
|
-
-webkit-font-smoothing: antialiased;
|
|
342
|
-
-moz-osx-font-smoothing: grayscale;
|
|
343
|
-
vertical-align: ${ae.verticalAlign};
|
|
391
|
+
.ft-chip > *:not(ft-ripple) {
|
|
392
|
+
position: relative;
|
|
344
393
|
}
|
|
345
394
|
|
|
346
|
-
.ft-
|
|
347
|
-
|
|
395
|
+
.ft-chip--dense {
|
|
396
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
397
|
+
--ft-chip-internal-vertical-padding: ${ge.verticalPadding};
|
|
398
|
+
--ft-chip-internal-horizontal-padding: ${ge.horizontalPadding};
|
|
399
|
+
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
348
400
|
}
|
|
349
401
|
|
|
350
|
-
.ft-
|
|
351
|
-
|
|
402
|
+
.ft-chip--no-content {
|
|
403
|
+
--ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
|
|
352
404
|
}
|
|
353
405
|
|
|
354
|
-
.ft-
|
|
355
|
-
|
|
406
|
+
.ft-chip--disabled {
|
|
407
|
+
cursor: default;
|
|
408
|
+
pointer-events: none;
|
|
409
|
+
filter: grayscale(1);
|
|
410
|
+
opacity: ${de.opacityDisabled};
|
|
356
411
|
}
|
|
357
|
-
`,se([o()],le.prototype,"variant",void 0),se([o()],le.prototype,"value",void 0),se([n()],le.prototype,"resolvedIcon",void 0),se([r("slot")],le.prototype,"slottedContent",void 0),a("ft-icon")(le);var ce=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};const pe=lt.extend("--ft-chip-color",pt.colorOnSurface),he={backgroundColor:lt.extend("--ft-chip-background-color",pt.colorSurface),color:pe,fontSize:lt.extend("--ft-chip-font-size",mi.fontSize),iconSize:lt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:lt.extend("--ft-chip-ripple-color",pe),horizontalPadding:lt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:lt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:lt.external(pt.colorOutline,"Design system"),opacityDisabled:lt.external(pt.colorOpacityDisabled,"Design system")},fe=lt.extend("--ft-chip-highlighted-color",lt.extend("--ft-chip-color",pt.colorOnPrimary)),de={backgroundColor:lt.extend("--ft-chip-highlighted-background-color",lt.extend("--ft-chip-background-color",pt.colorPrimary)),color:fe,rippleColor:lt.extend("--ft-chip-highlighted-ripple-color",fe)},ue={horizontalPadding:lt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),verticalPadding:lt.create("--ft-chip-dense-vertical-padding","SIZE","4px")};class ye extends CustomEvent{constructor(){super("icon-click")}}class ge extends ft{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}static get styles(){return[dt,d`
|
|
358
|
-
:host {
|
|
359
|
-
display: inline-block;
|
|
360
|
-
max-width: 100%;
|
|
361
|
-
pointer-events: none;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
.ft-chip {
|
|
365
|
-
position: relative;
|
|
366
|
-
display: flex;
|
|
367
|
-
justify-content: center;
|
|
368
|
-
align-items: center;
|
|
369
|
-
width: 100%;
|
|
370
|
-
overflow: hidden;
|
|
371
|
-
box-sizing: border-box;
|
|
372
|
-
pointer-events: auto;
|
|
373
|
-
|
|
374
|
-
--ft-chip-internal-font-size: ${he.fontSize};
|
|
375
|
-
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
376
|
-
${ct(ae.size,he.iconSize)};
|
|
377
|
-
--ft-chip-internal-vertical-padding: ${he.verticalPadding};
|
|
378
|
-
--ft-chip-internal-horizontal-padding: ${he.horizontalPadding};
|
|
379
|
-
--ft-chip-internal-icon-padding: 3px;
|
|
380
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${he.iconSize});
|
|
381
|
-
|
|
382
|
-
border: 1px solid ${he.colorOutline};
|
|
383
|
-
color: ${he.color};
|
|
384
|
-
${ct(kt.color,he.rippleColor)};
|
|
385
|
-
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
386
|
-
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
387
|
-
background-color: ${he.backgroundColor};
|
|
388
|
-
line-height: var(--ft-chip-internal-content-height);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.ft-chip > *:not(ft-ripple) {
|
|
392
|
-
position: relative;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.ft-chip--dense {
|
|
396
|
-
--ft-chip-internal-icon-padding: 3px;
|
|
397
|
-
--ft-chip-internal-vertical-padding: ${ue.verticalPadding};
|
|
398
|
-
--ft-chip-internal-horizontal-padding: ${ue.horizontalPadding};
|
|
399
|
-
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
400
|
-
}
|
|
401
412
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
filter: grayscale(1);
|
|
410
|
-
opacity: ${he.opacityDisabled};
|
|
411
|
-
}
|
|
413
|
+
.ft-chip--highlighted {
|
|
414
|
+
border: none;
|
|
415
|
+
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
416
|
+
background-color: ${ye.backgroundColor};
|
|
417
|
+
${ct(St.color,ye.rippleColor)};
|
|
418
|
+
color: ${ye.color};
|
|
419
|
+
}
|
|
412
420
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
${ct(kt.color,de.rippleColor)};
|
|
418
|
-
color: ${de.color};
|
|
419
|
-
}
|
|
421
|
+
.ft-chip--clickable {
|
|
422
|
+
cursor: pointer;
|
|
423
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
424
|
+
}
|
|
420
425
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}
|
|
426
|
+
.ft-chip:focus {
|
|
427
|
+
outline: none;
|
|
428
|
+
}
|
|
425
429
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
430
|
+
.ft-chip--icon-container {
|
|
431
|
+
display: inline-flex;
|
|
432
|
+
position: relative;
|
|
433
|
+
overflow: hidden;
|
|
434
|
+
border-radius: 100%;
|
|
435
|
+
justify-content: center;
|
|
436
|
+
align-items: center;
|
|
437
|
+
flex-shrink: 0;
|
|
429
438
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
overflow: hidden;
|
|
434
|
-
border-radius: 100%;
|
|
435
|
-
justify-content: center;
|
|
436
|
-
align-items: center;
|
|
437
|
-
flex-shrink: 0;
|
|
438
|
-
|
|
439
|
-
padding: var(--ft-chip-internal-icon-padding);
|
|
440
|
-
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
441
|
-
}
|
|
439
|
+
padding: var(--ft-chip-internal-icon-padding);
|
|
440
|
+
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
441
|
+
}
|
|
442
442
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
443
|
+
.ft-chip--icon-container > *:not(ft-ripple) {
|
|
444
|
+
position: relative;
|
|
445
|
+
}
|
|
446
446
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
447
|
+
.ft-chip--label {
|
|
448
|
+
vertical-align: bottom;
|
|
449
|
+
display: block;
|
|
450
|
+
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
451
|
+
${ct(mi.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
452
|
+
${ct(mi.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
453
|
+
}
|
|
454
454
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
455
|
+
.ft-chip--safari-fix .ft-chip--label {
|
|
456
|
+
margin-right: 0;
|
|
457
|
+
}
|
|
458
458
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
459
|
+
.ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
|
|
460
|
+
overflow: hidden;
|
|
461
|
+
white-space: nowrap;
|
|
462
|
+
text-overflow: ellipsis;
|
|
463
|
+
}
|
|
464
464
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
465
|
+
.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
|
|
466
|
+
content: "\\0000a0";
|
|
467
|
+
display: inline-block;
|
|
468
|
+
width: 0;
|
|
469
|
+
}
|
|
470
470
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
.ft-chip--no-content .ft-chip--label {
|
|
472
|
+
display: none;
|
|
473
|
+
}
|
|
474
474
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
475
|
+
.ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
|
|
476
|
+
width: var(--ft-chip-internal-content-height);
|
|
477
|
+
height: var(--ft-chip-internal-content-height);
|
|
478
|
+
}
|
|
479
479
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
.ft-chip--icon-container:focus {
|
|
481
|
+
outline: none;
|
|
482
|
+
}
|
|
483
483
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
484
|
+
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
485
|
+
order: -1;
|
|
486
|
+
}
|
|
487
|
+
`];var xe=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class me extends CustomEvent{constructor(){super("icon-click")}}class be extends ft{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":vt};return D`
|
|
488
488
|
<div class="${$t(t)}"
|
|
489
489
|
aria-label="${this.getLabel()}"
|
|
490
490
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -503,4 +503,4 @@ class ie extends wt{constructor(t){if(super(t),this.it=W,t.type!==mt)throw Error
|
|
|
503
503
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
504
504
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
505
505
|
</div>
|
|
506
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
506
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new me))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new me))}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}be.elementDefinitions={"ft-ripple":Ft,"ft-typography":ee,"ft-icon":he},be.styles=ve,xe([o({type:Boolean})],be.prototype,"highlighted",void 0),xe([o({type:Boolean})],be.prototype,"removable",void 0),xe([o({type:Boolean})],be.prototype,"disabled",void 0),xe([o({type:Boolean})],be.prototype,"clickable",void 0),xe([o({type:Boolean})],be.prototype,"iconClickable",void 0),xe([o({type:Boolean})],be.prototype,"dense",void 0),xe([o({type:Boolean})],be.prototype,"multiLine",void 0),xe([o({type:String})],be.prototype,"label",void 0),xe([o({type:String})],be.prototype,"icon",void 0),xe([o({type:Boolean})],be.prototype,"trailingIcon",void 0),xe([r("ft-typography slot")],be.prototype,"slottedContent",void 0),a("ft-chip")(be),t.FtChip=be,t.FtChipCssVariables=de,t.FtChipDenseCssVariables=ge,t.FtChipHighlightedCssVariables=ye,t.IconClickEvent=me,t.styles=ve,Object.defineProperty(t,"i",{value:!0})}({});
|