@fluid-topics/ft-chip 0.3.70 → 1.0.0-alpha.0
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 +0 -1
- package/build/ft-chip.css.js +0 -1
- package/build/ft-chip.d.ts +2 -1
- package/build/ft-chip.js +8 -5
- package/build/ft-chip.light.js +122 -122
- package/build/ft-chip.min.js +146 -156
- package/build/ft-chip.property.d.ts +2 -1
- package/build/ft-chip.property.js +0 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/package.json +7 -7
package/build/ft-chip.light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,i,e,o,n,r){const s=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),
|
|
1
|
+
!function(t,i,e,o,n,r){const s=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),p={color:s,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",s),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},l=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),a=l,h=i.FtCssVariableFactory.extend("--ft-ripple-background-color",l),f=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),c=f,d=i.FtCssVariableFactory.extend("--ft-ripple-background-color",f),g=e.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.ft-ripple .ft-ripple--background {
|
|
23
|
-
background-color: ${
|
|
23
|
+
background-color: ${p.backgroundColor};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.ft-ripple .ft-ripple--effect {
|
|
27
|
-
background-color: ${
|
|
27
|
+
background-color: ${p.color};
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
@@ -72,22 +72,22 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
75
|
-
opacity: ${
|
|
75
|
+
opacity: ${p.opacityContentOnSurfaceHover};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
79
|
-
opacity: ${
|
|
79
|
+
opacity: ${p.opacityContentOnSurfaceSelected};
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
83
|
-
opacity: ${
|
|
83
|
+
opacity: ${p.opacityContentOnSurfaceFocused};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
87
|
-
opacity: ${
|
|
87
|
+
opacity: ${p.opacityContentOnSurfacePressed};
|
|
88
88
|
transform: translate(-50%, -50%) scale(1);
|
|
89
89
|
}
|
|
90
|
-
`;var y,x=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,
|
|
90
|
+
`;var y,x=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(n=t[p])&&(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 u extends i.FtLitElement{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.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new i.Debouncer(10),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 e.html`
|
|
91
91
|
<style>
|
|
92
92
|
.ft-ripple .ft-ripple--effect,
|
|
93
93
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -104,115 +104,115 @@
|
|
|
104
104
|
<div class="ft-ripple--background"></div>
|
|
105
105
|
<div class="ft-ripple--effect"></div>
|
|
106
106
|
</div>
|
|
107
|
-
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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()}}u.elementDefinitions={},u.styles=g,x([o.property({type:Boolean})],u.prototype,"primary",void 0),x([o.property({type:Boolean})],u.prototype,"secondary",void 0),x([o.property({type:Boolean})],u.prototype,"unbounded",void 0),x([o.property({type:Boolean})],u.prototype,"activated",void 0),x([o.property({type:Boolean})],u.prototype,"selected",void 0),x([o.property({type:Boolean})],u.prototype,"disabled",void 0),x([o.state()],u.prototype,"hovered",void 0),x([o.state()],u.prototype,"focused",void 0),x([o.state()],u.prototype,"pressed",void 0),x([o.state()],u.prototype,"rippling",void 0),x([o.state()],u.prototype,"rippleSize",void 0),x([o.state()],u.prototype,"originX",void 0),x([o.state()],u.prototype,"originY",void 0),x([o.query(".ft-ripple")],u.prototype,"ripple",void 0),x([o.query(".ft-ripple--effect")],u.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(u);const v=window,m=v.trustedTypes,b=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,k=`<${w}>`,z=document,S=(t="")=>z.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,I=/>/g,E=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),A=/'/g,_=/"/g,B=/^(?:script|style|textarea|title)$/i,U=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),M=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),T=new WeakMap,Z=z.createTreeWalker(z,129,null,!1),W=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",s=N;for(let i=0;i<e;i++){const e=t[i];let l,p,a=-1,h=0;for(;h<e.length&&(s.lastIndex=h,p=s.exec(e),null!==p);)h=s.lastIndex,s===N?"!--"===p[1]?s=O:void 0!==p[1]?s=I:void 0!==p[2]?(B.test(p[2])&&(n=RegExp("</"+p[2],"g")),s=E):void 0!==p[3]&&(s=E):s===E?">"===p[0]?(s=null!=n?n:N,a=-1):void 0===p[1]?a=-2:(a=s.lastIndex-p[2].length,l=p[1],s=void 0===p[3]?E:'"'===p[3]?_:A):s===_||s===A?s=E:s===O||s===I?s=N:(s=E,n=void 0);const f=s===E&&t[i+1].startsWith("/>")?" ":"";r+=s===N?e+k:a>=0?(o.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+$+f):e+$+(-2===a?(o.push(void 0),i):f)}const l=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(l):l,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,l=this.parts,[p,a]=W(t,i);if(this.el=K.createElement(p,e),Z.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Z.nextNode())&&l.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith($)){const e=a[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split($),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?H:"?"===i[1]?q:"@"===i[1]?X:P})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(B.test(o.tagName)){const t=o.textContent.split($),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],S()),Z.nextNode(),l.push({type:2,index:++n});o.append(t[i],S())}}}else if(8===o.nodeType)if(o.data===w)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf($,t+1));)l.push({type:7,index:n}),t+=$.length-1}n++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var n,r,s,l;if(i===M)return i;let p=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const a=j(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==a&&(null===(r=null==p?void 0:p._$AO)||void 0===r||r.call(p,!1),void 0===a?p=void 0:(p=new a(t),p._$AT(t,e,o)),void 0!==o?(null!==(s=(l=e)._$Co)&&void 0!==s?s:l._$Co=[])[o]=p:e._$Cl=p),void 0!==p&&(i=D(t,p._$AS(t,i.values),p,o)),i}class R{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);Z.currentNode=n;let r=Z.nextNode(),s=0,l=0,p=o[0];for(;void 0!==p;){if(s===p.index){let i;2===p.type?i=new G(r,r.nextSibling,this,t):1===p.type?i=new p.ctor(r,p.name,p.strings,this,t):6===p.type&&(i=new Y(r,this,t)),this.u.push(i),p=o[++l]}s!==(null==p?void 0:p.index)&&(r=Z.nextNode(),s++)}return n}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var n;this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=D(this,t,i),j(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==M&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>C(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==F&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.p(e);else{const t=new R(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new K(t)),i}k(t){C(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new G(this.O(S()),this.O(S()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class P{constructor(t,i,e,o,n){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=D(this,t,i,0),r=!j(t)||t!==this._$AH&&t!==M,r&&(this._$AH=t);else{const o=t;let s,l;for(t=n[0],s=0;s<n.length-1;s++)l=D(this,o[e+s],i,s),l===M&&(l=this._$AH[s]),r||(r=!j(l)||l!==this._$AH[s]),l===F?t=F:t!==F&&(t+=(null!=l?l:"")+n[s+1]),this._$AH[s]=l}r&&!o&&this.j(t)}j(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class H extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===F?void 0:t}}const L=m?m.emptyScript:"";class q extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==F?this.element.setAttribute(this.name,L):this.element.removeAttribute(this.name)}}class X extends P{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=D(this,t,i,0))&&void 0!==e?e:F)===M)return;const o=this._$AH,n=t===F&&o!==F||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==F&&(o===F||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Y{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const J=v.litHtmlPolyfillSupport;null==J||J(K,G),(null!==(y=v.litHtmlVersions)&&void 0!==y?y:v.litHtmlVersions=[]).push("2.4.0");
|
|
107
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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()}}u.elementDefinitions={},u.styles=g,x([o.property({type:Boolean})],u.prototype,"primary",void 0),x([o.property({type:Boolean})],u.prototype,"secondary",void 0),x([o.property({type:Boolean})],u.prototype,"unbounded",void 0),x([o.property({type:Boolean})],u.prototype,"activated",void 0),x([o.property({type:Boolean})],u.prototype,"selected",void 0),x([o.property({type:Boolean})],u.prototype,"disabled",void 0),x([o.state()],u.prototype,"hovered",void 0),x([o.state()],u.prototype,"focused",void 0),x([o.state()],u.prototype,"pressed",void 0),x([o.state()],u.prototype,"rippling",void 0),x([o.state()],u.prototype,"rippleSize",void 0),x([o.state()],u.prototype,"originX",void 0),x([o.state()],u.prototype,"originY",void 0),x([o.query(".ft-ripple")],u.prototype,"ripple",void 0),x([o.query(".ft-ripple--effect")],u.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(u);const v=window,m=v.trustedTypes,b=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,k="?"+w,z=`<${k}>`,S=document,j=()=>S.createComment(""),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,I="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,A=/>/g,_=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,U=/"/g,F=/^(?:script|style|textarea|title)$/i,M=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),T=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),W=new WeakMap,K=S.createTreeWalker(S,129,null,!1),D=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",s=O;for(let i=0;i<e;i++){const e=t[i];let p,l,a=-1,h=0;for(;h<e.length&&(s.lastIndex=h,l=s.exec(e),null!==l);)h=s.lastIndex,s===O?"!--"===l[1]?s=E:void 0!==l[1]?s=A:void 0!==l[2]?(F.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=_):void 0!==l[3]&&(s=_):s===_?">"===l[0]?(s=null!=n?n:O,a=-1):void 0===l[1]?a=-2:(a=s.lastIndex-l[2].length,p=l[1],s=void 0===l[3]?_:'"'===l[3]?U:B):s===U||s===B?s=_:s===E||s===A?s=O:(s=_,n=void 0);const f=s===_&&t[i+1].startsWith("/>")?" ":"";r+=s===O?e+z:a>=0?(o.push(p),e.slice(0,a)+$+e.slice(a)+w+f):e+w+(-2===a?(o.push(void 0),i):f)}const p=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(p):p,o]};class R{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,p=this.parts,[l,a]=D(t,i);if(this.el=R.createElement(l,e),K.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=K.nextNode())&&p.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith($)||i.startsWith(w)){const e=a[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+$).split(w),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?q:"?"===i[1]?X:"@"===i[1]?Y:L})}else p.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(F.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],j()),K.nextNode(),p.push({type:2,index:++n});o.append(t[i],j())}}}else if(8===o.nodeType)if(o.data===k)p.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)p.push({type:7,index:n}),t+=w.length-1}n++}}static createElement(t,i){const e=S.createElement("template");return e.innerHTML=t,e}}function G(t,i,e=t,o){var n,r,s,p;if(i===T)return i;let l=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const a=C(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===a?l=void 0:(l=new a(t),l._$AT(t,e,o)),void 0!==o?(null!==(s=(p=e)._$Co)&&void 0!==s?s:p._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=G(t,l._$AS(t,i.values),l,o)),i}class P{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:S).importNode(e,!0);K.currentNode=n;let r=K.nextNode(),s=0,p=0,l=o[0];for(;void 0!==l;){if(s===l.index){let i;2===l.type?i=new H(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new J(r,this,t)),this._$AV.push(i),l=o[++p]}s!==(null==l?void 0:l.index)&&(r=K.nextNode(),s++)}return n}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class H{constructor(t,i,e,o){var n;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=G(this,t,i),C(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Z&&C(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=R.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new P(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=W.get(t.strings);return void 0===i&&W.set(t.strings,i=new R(t)),i}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new H(this.k(j()),this.k(j()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class L{constructor(t,i,e,o,n){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=G(this,t,i,0),r=!C(t)||t!==this._$AH&&t!==T,r&&(this._$AH=t);else{const o=t;let s,p;for(t=n[0],s=0;s<n.length-1;s++)p=G(this,o[e+s],i,s),p===T&&(p=this._$AH[s]),r||(r=!C(p)||p!==this._$AH[s]),p===Z?t=Z:t!==Z&&(t+=(null!=p?p:"")+n[s+1]),this._$AH[s]=p}r&&!o&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class q extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const V=m?m.emptyScript:"";class X extends L{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class Y extends L{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=G(this,t,i,0))&&void 0!==e?e:Z)===T)return;const o=this._$AH,n=t===Z&&o!==Z||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==Z&&(o===Z||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const Q=v.litHtmlPolyfillSupport;null==Q||Q(R,H),(null!==(y=v.litHtmlVersions)&&void 0!==y?y:v.litHtmlVersions=[]).push("2.7.3");
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
112
|
*/
|
|
113
|
-
const
|
|
113
|
+
const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void 0:t._$litStatic$},et=t=>({_$litStatic$:t,r:tt}),ot=new Map,nt=(t=>(i,...e)=>{const o=e.length;let n,r;const s=[],p=[];let l,a=0,h=!1;for(;a<o;){for(l=i[a];a<o&&void 0!==(r=e[a],n=it(r));)l+=n+i[++a],h=!0;a!==o&&p.push(r),s.push(l),a++}if(a===o&&s.push(i[o]),h){const t=s.join("$$lit$$");void 0===(i=ot.get(t))&&(s.raw=s,ot.set(t,i=s)),e=p}return t(i,...e)})(M);var rt;!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"}(rt||(rt={}));const st=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),pt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),lt={fontFamily:pt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},at=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",st),ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",lt.fontSize,"20px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",lt.fontWeight,"normal"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",lt.letterSpacing,"0.15px"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",lt.lineHeight,"1.2"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",lt.textTransform,"inherit"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",st),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",lt.fontSize,"14px"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",lt.fontWeight,"normal"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",lt.letterSpacing,"0.105px"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",lt.lineHeight,"1.7"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",lt.textTransform,"inherit"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",pt),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",lt.fontSize,"16px"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",lt.fontWeight,"600"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",lt.letterSpacing,"0.144px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",lt.lineHeight,"1.5"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",lt.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",pt),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",lt.fontSize,"14px"),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",lt.fontWeight,"normal"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",lt.letterSpacing,"0.098px"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",lt.lineHeight,"1.7"),At=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",lt.textTransform,"inherit"),_t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",pt),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",lt.fontSize,"16px"),Ut=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",lt.fontWeight,"normal"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",lt.letterSpacing,"0.496px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",lt.lineHeight,"1.5"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",lt.textTransform,"inherit"),Zt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",pt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",lt.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",lt.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",lt.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",lt.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",lt.textTransform,"inherit")},Wt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",pt),Kt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",lt.fontSize,"12px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",lt.fontWeight,"normal"),Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",lt.letterSpacing,"0.396px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",lt.lineHeight,"1.33"),Pt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",lt.textTransform,"inherit"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",pt),Lt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",lt.fontSize,"10px"),qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",lt.fontWeight,"normal"),Vt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",lt.letterSpacing,"0.33px"),Xt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",lt.lineHeight,"1.6"),Yt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",lt.textTransform,"inherit"),Jt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",pt),Qt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",lt.fontSize,"10px"),ti=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",lt.fontWeight,"normal"),ii=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",lt.letterSpacing,"1.5px"),ei=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",lt.lineHeight,"1.6"),oi=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",lt.textTransform,"uppercase"),ni=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",pt),ri=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",lt.fontSize,"14px"),si=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",lt.fontWeight,"600"),pi=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",lt.letterSpacing,"1.246px"),li=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",lt.lineHeight,"1.15"),ai=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",lt.textTransform,"uppercase"),hi=e.css`
|
|
114
114
|
.ft-typography--title {
|
|
115
|
-
font-family: ${
|
|
116
|
-
font-size: ${
|
|
117
|
-
font-weight: ${
|
|
118
|
-
letter-spacing: ${
|
|
119
|
-
line-height: ${
|
|
120
|
-
text-transform: ${
|
|
121
|
-
}
|
|
122
|
-
`,ai=e.css`
|
|
123
|
-
.ft-typography--title-dense {
|
|
124
|
-
font-family: ${dt};
|
|
125
|
-
font-size: ${gt};
|
|
126
|
-
font-weight: ${yt};
|
|
127
|
-
letter-spacing: ${xt};
|
|
128
|
-
line-height: ${ut};
|
|
129
|
-
text-transform: ${vt};
|
|
130
|
-
}
|
|
131
|
-
`,hi=e.css`
|
|
132
|
-
.ft-typography--subtitle1 {
|
|
133
|
-
font-family: ${mt};
|
|
134
|
-
font-size: ${bt};
|
|
135
|
-
font-weight: ${$t};
|
|
136
|
-
letter-spacing: ${wt};
|
|
137
|
-
line-height: ${kt};
|
|
138
|
-
text-transform: ${zt};
|
|
115
|
+
font-family: ${at};
|
|
116
|
+
font-size: ${ht};
|
|
117
|
+
font-weight: ${ft};
|
|
118
|
+
letter-spacing: ${ct};
|
|
119
|
+
line-height: ${dt};
|
|
120
|
+
text-transform: ${gt};
|
|
139
121
|
}
|
|
140
122
|
`,fi=e.css`
|
|
141
|
-
.ft-typography--
|
|
142
|
-
font-family: ${
|
|
143
|
-
font-size: ${
|
|
144
|
-
font-weight: ${
|
|
145
|
-
letter-spacing: ${
|
|
146
|
-
line-height: ${
|
|
147
|
-
text-transform: ${
|
|
123
|
+
.ft-typography--title-dense {
|
|
124
|
+
font-family: ${yt};
|
|
125
|
+
font-size: ${xt};
|
|
126
|
+
font-weight: ${ut};
|
|
127
|
+
letter-spacing: ${vt};
|
|
128
|
+
line-height: ${mt};
|
|
129
|
+
text-transform: ${bt};
|
|
148
130
|
}
|
|
149
|
-
|
|
150
131
|
`,ci=e.css`
|
|
151
|
-
.ft-typography--
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
132
|
+
.ft-typography--subtitle1 {
|
|
133
|
+
font-family: ${$t};
|
|
134
|
+
font-size: ${wt};
|
|
135
|
+
font-weight: ${kt};
|
|
136
|
+
letter-spacing: ${zt};
|
|
137
|
+
line-height: ${St};
|
|
138
|
+
text-transform: ${jt};
|
|
158
139
|
}
|
|
159
140
|
`,di=e.css`
|
|
160
|
-
.ft-typography--
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
141
|
+
.ft-typography--subtitle2 {
|
|
142
|
+
font-family: ${Ct};
|
|
143
|
+
font-size: ${Nt};
|
|
144
|
+
font-weight: ${It};
|
|
145
|
+
letter-spacing: ${Ot};
|
|
146
|
+
line-height: ${Et};
|
|
147
|
+
text-transform: ${At};
|
|
167
148
|
}
|
|
149
|
+
|
|
168
150
|
`,gi=e.css`
|
|
169
|
-
.ft-typography--
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
151
|
+
.ft-typography--body1 {
|
|
152
|
+
font-family: ${_t};
|
|
153
|
+
font-size: ${Bt};
|
|
154
|
+
font-weight: ${Ut};
|
|
155
|
+
letter-spacing: ${Ft};
|
|
156
|
+
line-height: ${Mt};
|
|
157
|
+
text-transform: ${Tt};
|
|
176
158
|
}
|
|
177
159
|
`,yi=e.css`
|
|
178
|
-
.ft-typography--
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
160
|
+
.ft-typography--body2 {
|
|
161
|
+
font-family: ${Zt.fontFamily};
|
|
162
|
+
font-size: ${Zt.fontSize};
|
|
163
|
+
font-weight: ${Zt.fontWeight};
|
|
164
|
+
letter-spacing: ${Zt.letterSpacing};
|
|
165
|
+
line-height: ${Zt.lineHeight};
|
|
166
|
+
text-transform: ${Zt.textTransform};
|
|
185
167
|
}
|
|
186
168
|
`,xi=e.css`
|
|
187
|
-
.ft-typography--
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
192
|
-
line-height: ${
|
|
193
|
-
text-transform: ${
|
|
169
|
+
.ft-typography--caption {
|
|
170
|
+
font-family: ${Wt};
|
|
171
|
+
font-size: ${Kt};
|
|
172
|
+
font-weight: ${Dt};
|
|
173
|
+
letter-spacing: ${Rt};
|
|
174
|
+
line-height: ${Gt};
|
|
175
|
+
text-transform: ${Pt};
|
|
194
176
|
}
|
|
195
177
|
`,ui=e.css`
|
|
196
|
-
.ft-typography--
|
|
197
|
-
font-family: ${
|
|
198
|
-
font-size: ${
|
|
199
|
-
font-weight: ${
|
|
200
|
-
letter-spacing: ${
|
|
201
|
-
line-height: ${
|
|
202
|
-
text-transform: ${
|
|
178
|
+
.ft-typography--breadcrumb {
|
|
179
|
+
font-family: ${Ht};
|
|
180
|
+
font-size: ${Lt};
|
|
181
|
+
font-weight: ${qt};
|
|
182
|
+
letter-spacing: ${Vt};
|
|
183
|
+
line-height: ${Xt};
|
|
184
|
+
text-transform: ${Yt};
|
|
203
185
|
}
|
|
204
186
|
`,vi=e.css`
|
|
187
|
+
.ft-typography--overline {
|
|
188
|
+
font-family: ${Jt};
|
|
189
|
+
font-size: ${Qt};
|
|
190
|
+
font-weight: ${ti};
|
|
191
|
+
letter-spacing: ${ii};
|
|
192
|
+
line-height: ${ei};
|
|
193
|
+
text-transform: ${oi};
|
|
194
|
+
}
|
|
195
|
+
`,mi=e.css`
|
|
196
|
+
.ft-typography--button {
|
|
197
|
+
font-family: ${ni};
|
|
198
|
+
font-size: ${ri};
|
|
199
|
+
font-weight: ${si};
|
|
200
|
+
letter-spacing: ${pi};
|
|
201
|
+
line-height: ${li};
|
|
202
|
+
text-transform: ${ai};
|
|
203
|
+
}
|
|
204
|
+
`,bi=e.css`
|
|
205
205
|
.ft-typography {
|
|
206
206
|
vertical-align: inherit;
|
|
207
207
|
}
|
|
208
|
-
`;var
|
|
209
|
-
<${
|
|
208
|
+
`;var $i,wi,ki=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(n=t[p])&&(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 zi extends i.FtLitElement{constructor(){super(...arguments),this.variant=rt.body1}render(){return this.element?nt`
|
|
209
|
+
<${et(this.element)}
|
|
210
210
|
class="ft-typography ft-typography--${this.variant}">
|
|
211
211
|
<slot></slot>
|
|
212
|
-
</${
|
|
213
|
-
`:
|
|
212
|
+
</${et(this.element)}>
|
|
213
|
+
`:nt`
|
|
214
214
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
215
|
-
`}}
|
|
215
|
+
`}}zi.styles=[hi,fi,ci,di,gi,yi,xi,ui,vi,mi,bi],ki([o.property()],zi.prototype,"element",void 0),ki([o.property()],zi.prototype,"variant",void 0),i.customElement("ft-typography")(zi),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=""}($i||($i={})),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=""}(wi||(wi={})),new Map([...["abw"].map((t=>[t,wi.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,wi.AUDIO])),...["avi"].map((t=>[t,wi.AVI])),...["chm","xhs"].map((t=>[t,wi.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,wi.CODE])),...["csv"].map((t=>[t,wi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,wi.DITA])),...["epub"].map((t=>[t,wi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,wi.EXCEL])),...["flac"].map((t=>[t,wi.FLAC])),...["gif"].map((t=>[t,wi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,wi.GZIP])),...["html","htm","xhtml"].map((t=>[t,wi.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,wi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,wi.JPEG])),...["json"].map((t=>[t,wi.JSON])),...["m4a","m4p"].map((t=>[t,wi.M4A])),...["mov","qt"].map((t=>[t,wi.MOV])),...["mp3"].map((t=>[t,wi.MP3])),...["mp4","m4v"].map((t=>[t,wi.MP4])),...["ogg","oga"].map((t=>[t,wi.OGG])),...["pdf","ps"].map((t=>[t,wi.PDF])),...["png"].map((t=>[t,wi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,wi.POWERPOINT])),...["rar"].map((t=>[t,wi.RAR])),...["stp"].map((t=>[t,wi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,wi.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,wi.VIDEO])),...["wav"].map((t=>[t,wi.WAV])),...["wma"].map((t=>[t,wi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,wi.WORD])),...["xml","xsl","rdf"].map((t=>[t,wi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,wi.YAML])),...["zip"].map((t=>[t,wi.ZIP]))]);const Si={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},ji=e.css`
|
|
216
216
|
:host, i.ft-icon {
|
|
217
217
|
display: inline-flex;
|
|
218
218
|
align-items: center;
|
|
@@ -221,14 +221,14 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
:host {
|
|
224
|
-
width: ${
|
|
225
|
-
height: ${
|
|
224
|
+
width: ${Si.size};
|
|
225
|
+
height: ${Si.size};
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
i.ft-icon {
|
|
229
229
|
width: 100%;
|
|
230
230
|
height: 100%;
|
|
231
|
-
font-size: ${
|
|
231
|
+
font-size: ${Si.size};
|
|
232
232
|
line-height: 1;
|
|
233
233
|
font-weight: normal;
|
|
234
234
|
text-transform: none;
|
|
@@ -239,32 +239,32 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
239
239
|
text-rendering: auto;
|
|
240
240
|
-webkit-font-smoothing: antialiased;
|
|
241
241
|
-moz-osx-font-smoothing: grayscale;
|
|
242
|
-
vertical-align: ${
|
|
242
|
+
vertical-align: ${Si.verticalAlign};
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
i.ft-icon.ft-icon--fluid-topics {
|
|
246
|
-
font-family: ${
|
|
246
|
+
font-family: ${Si.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
247
247
|
|
|
248
248
|
/* Ugly fix because font is broken */
|
|
249
|
-
font-size: calc(0.
|
|
249
|
+
font-size: calc(0.75 * ${Si.size});
|
|
250
250
|
position: relative;
|
|
251
|
-
top: -
|
|
251
|
+
top: -4%;
|
|
252
252
|
justify-content: center;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
.ft-icon--file-format {
|
|
256
|
-
font-family: ${
|
|
256
|
+
font-family: ${Si.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
.ft-icon--material {
|
|
260
|
-
font-family: ${
|
|
260
|
+
font-family: ${Si.materialFontFamily}, "Material Icons", sans-serif;
|
|
261
261
|
}
|
|
262
|
-
`;var
|
|
263
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
262
|
+
`;var Ci;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ci||(Ci={}));var Ni=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(n=t[p])&&(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 Ii extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Ci).includes(this.variant)?this.variant:Ci.fluid_topics,i=t!==Ci.material||!!this.value;return e.html`
|
|
263
|
+
<i class="ft-icon ${"ft-icon--"+t}">
|
|
264
264
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
265
|
-
<slot ?hidden=${
|
|
265
|
+
<slot ?hidden=${i}></slot>
|
|
266
266
|
</i>
|
|
267
|
-
`}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 o=this.value||this.textContent;switch(this.variant){case
|
|
267
|
+
`}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 o=this.value||this.textContent;switch(this.variant){case Ci.file_format:this.resolvedIcon=null!==(t=wi[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ci.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=$i[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ii.elementDefinitions={},Ii.styles=ji,Ni([o.property()],Ii.prototype,"variant",void 0),Ni([o.property()],Ii.prototype,"value",void 0),Ni([o.state()],Ii.prototype,"resolvedIcon",void 0),Ni([o.query("slot")],Ii.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ii);const Oi=i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnSurface),Ei={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorSurface),color:Oi,fontSize:i.FtCssVariableFactory.extend("--ft-chip-font-size",Zt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:i.FtCssVariableFactory.extend("--ft-chip-ripple-color",Oi),horizontalPadding:i.FtCssVariableFactory.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:i.FtCssVariableFactory.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Ai=i.FtCssVariableFactory.extend("--ft-chip-highlighted-color",i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnPrimary)),_i={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color",i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorPrimary)),color:Ai,rippleColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color",Ai)},Bi={horizontalPadding:i.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),verticalPadding:i.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","SIZE","4px")},Ui=[i.noTextSelect,e.css`
|
|
268
268
|
:host {
|
|
269
269
|
display: inline-block;
|
|
270
270
|
max-width: 100%;
|
|
@@ -281,20 +281,20 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
281
281
|
box-sizing: border-box;
|
|
282
282
|
pointer-events: auto;
|
|
283
283
|
|
|
284
|
-
--ft-chip-internal-font-size: ${
|
|
284
|
+
--ft-chip-internal-font-size: ${Ei.fontSize};
|
|
285
285
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
286
|
-
${i.setVariable(
|
|
287
|
-
--ft-chip-internal-vertical-padding: ${
|
|
288
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
286
|
+
${i.setVariable(Si.size,Ei.iconSize)};
|
|
287
|
+
--ft-chip-internal-vertical-padding: ${Ei.verticalPadding};
|
|
288
|
+
--ft-chip-internal-horizontal-padding: ${Ei.horizontalPadding};
|
|
289
289
|
--ft-chip-internal-icon-padding: 3px;
|
|
290
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
290
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${Ei.iconSize});
|
|
291
291
|
|
|
292
|
-
border: 1px solid ${
|
|
293
|
-
color: ${
|
|
294
|
-
${i.setVariable(
|
|
292
|
+
border: 1px solid ${Ei.colorOutline};
|
|
293
|
+
color: ${Ei.color};
|
|
294
|
+
${i.setVariable(p.color,Ei.rippleColor)};
|
|
295
295
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
296
296
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
297
|
-
background-color: ${
|
|
297
|
+
background-color: ${Ei.backgroundColor};
|
|
298
298
|
line-height: var(--ft-chip-internal-content-height);
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -304,8 +304,8 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
304
304
|
|
|
305
305
|
.ft-chip--dense {
|
|
306
306
|
--ft-chip-internal-icon-padding: 3px;
|
|
307
|
-
--ft-chip-internal-vertical-padding: ${
|
|
308
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
307
|
+
--ft-chip-internal-vertical-padding: ${Bi.verticalPadding};
|
|
308
|
+
--ft-chip-internal-horizontal-padding: ${Bi.horizontalPadding};
|
|
309
309
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
310
310
|
}
|
|
311
311
|
|
|
@@ -317,15 +317,15 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
317
317
|
cursor: default;
|
|
318
318
|
pointer-events: none;
|
|
319
319
|
filter: grayscale(1);
|
|
320
|
-
opacity: ${
|
|
320
|
+
opacity: ${Ei.opacityDisabled};
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
.ft-chip--highlighted {
|
|
324
324
|
border: none;
|
|
325
325
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
326
|
-
background-color: ${
|
|
327
|
-
${i.setVariable(
|
|
328
|
-
color: ${
|
|
326
|
+
background-color: ${_i.backgroundColor};
|
|
327
|
+
${i.setVariable(p.color,_i.rippleColor)};
|
|
328
|
+
color: ${_i.color};
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
.ft-chip--clickable {
|
|
@@ -358,8 +358,8 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
358
358
|
vertical-align: bottom;
|
|
359
359
|
display: block;
|
|
360
360
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
361
|
-
${i.setVariable(
|
|
362
|
-
${i.setVariable(
|
|
361
|
+
${i.setVariable(Zt.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
362
|
+
${i.setVariable(Zt.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -394,7 +394,7 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
394
394
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
395
395
|
order: -1;
|
|
396
396
|
}
|
|
397
|
-
`];var
|
|
397
|
+
`];var Fi=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(n=t[p])&&(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 Mi extends CustomEvent{constructor(){super("icon-click")}}class Ti extends i.FtLitElement{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":i.isSafari};return e.html`
|
|
398
398
|
<div class="${n.classMap(t)}"
|
|
399
399
|
aria-label="${this.getLabel()}"
|
|
400
400
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -411,6 +411,6 @@ const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t
|
|
|
411
411
|
@click=${this.onIconClick}
|
|
412
412
|
@keyup=${this.onIconKeyUp}>
|
|
413
413
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
414
|
-
<ft-icon variant="
|
|
414
|
+
<ft-icon .variant=${this.iconVariant} value="${this.internalIcon}"></ft-icon>
|
|
415
415
|
</div>
|
|
416
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
416
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Mi))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Mi))}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)}}Ti.elementDefinitions={"ft-ripple":u,"ft-typography":zi,"ft-icon":Ii},Ti.styles=Ui,Fi([o.property({type:Boolean})],Ti.prototype,"highlighted",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"removable",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"disabled",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"clickable",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"iconClickable",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"dense",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"multiLine",void 0),Fi([o.property()],Ti.prototype,"label",void 0),Fi([o.property()],Ti.prototype,"icon",void 0),Fi([o.property()],Ti.prototype,"iconVariant",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"trailingIcon",void 0),Fi([o.query("ft-typography slot")],Ti.prototype,"slottedContent",void 0),i.customElement("ft-chip")(Ti),t.FtChip=Ti,t.FtChipCssVariables=Ei,t.FtChipDenseCssVariables=Bi,t.FtChipHighlightedCssVariables=_i,t.IconClickEvent=Mi,t.styles=Ui}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|