@fluid-topics/ft-button 0.2.16 → 0.2.19
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-button.js +1 -2
- package/build/ft-button.light.js +12 -13
- package/build/ft-button.min.js +137 -137
- package/package.json +8 -8
- package/build/ft-button.inline-styles.js +0 -644
- package/build/inline-styles.d.ts +0 -2
- package/build/inline-styles.js +0 -4
package/build/ft-button.js
CHANGED
|
@@ -69,7 +69,7 @@ export class FtButton extends FtLitElement {
|
|
|
69
69
|
box-shadow: 0px 0px 0px transparent;
|
|
70
70
|
border: 0px solid transparent;
|
|
71
71
|
text-shadow: 0px 0px 0px transparent;
|
|
72
|
-
font-size:
|
|
72
|
+
font-size: 16px;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
button:hover {
|
|
@@ -97,7 +97,6 @@ export class FtButton extends FtLitElement {
|
|
|
97
97
|
box-sizing: border-box;
|
|
98
98
|
border: none;
|
|
99
99
|
pointer-events: auto;
|
|
100
|
-
line-height: 0;
|
|
101
100
|
|
|
102
101
|
--ft-button-internal-font-size: ${FtButtonCssVariables.fontSize};
|
|
103
102
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
package/build/ft-button.light.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
var
|
|
24
|
+
var y;x.elementDefinitions={},x.styles=e.css`
|
|
25
25
|
:host {
|
|
26
26
|
display: contents;
|
|
27
27
|
}
|
|
@@ -110,13 +110,13 @@ var g;x.elementDefinitions={},x.styles=e.css`
|
|
|
110
110
|
opacity: ${a.opacityContentOnSurfacePressed};
|
|
111
111
|
transform: translate(-50%, -50%) scale(1);
|
|
112
112
|
}
|
|
113
|
-
`,r([o.property({type:Boolean})],x.prototype,"primary",void 0),r([o.property({type:Boolean})],x.prototype,"secondary",void 0),r([o.property({type:Boolean})],x.prototype,"unbounded",void 0),r([o.property({type:Boolean})],x.prototype,"activated",void 0),r([o.property({type:Boolean})],x.prototype,"selected",void 0),r([o.property({type:Boolean})],x.prototype,"disabled",void 0),r([o.state()],x.prototype,"hovered",void 0),r([o.state()],x.prototype,"focused",void 0),r([o.state()],x.prototype,"pressed",void 0),r([o.state()],x.prototype,"rippling",void 0),r([o.state()],x.prototype,"rippleSize",void 0),r([o.state()],x.prototype,"originX",void 0),r([o.state()],x.prototype,"originY",void 0),r([o.query(".ft-ripple")],x.prototype,"ripple",void 0),r([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const
|
|
113
|
+
`,r([o.property({type:Boolean})],x.prototype,"primary",void 0),r([o.property({type:Boolean})],x.prototype,"secondary",void 0),r([o.property({type:Boolean})],x.prototype,"unbounded",void 0),r([o.property({type:Boolean})],x.prototype,"activated",void 0),r([o.property({type:Boolean})],x.prototype,"selected",void 0),r([o.property({type:Boolean})],x.prototype,"disabled",void 0),r([o.state()],x.prototype,"hovered",void 0),r([o.state()],x.prototype,"focused",void 0),r([o.state()],x.prototype,"pressed",void 0),r([o.state()],x.prototype,"rippling",void 0),r([o.state()],x.prototype,"rippleSize",void 0),r([o.state()],x.prototype,"originX",void 0),r([o.state()],x.prototype,"originY",void 0),r([o.query(".ft-ripple")],x.prototype,"ripple",void 0),r([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const g=globalThis.trustedTypes,b=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,m="?"+v,$=`<${m}>`,w=document,k=(t="")=>w.createComment(t),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,N=/>/g,j=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,T=/'/g,A=/"/g,B=/^(?:script|style|textarea|title)$/i,F=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),E=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),M=new WeakMap,_=w.createTreeWalker(w,129,null,!1),R=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=C;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===C?"!--"===a[1]?r=O:void 0!==a[1]?r=N:void 0!==a[2]?(B.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=j):void 0!==a[3]&&(r=j):r===j?">"===a[0]?(r=null!=n?n:C,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?j:'"'===a[3]?A:T):r===A||r===T?r=j:r===O||r===N?r=C:(r=j,n=void 0);const f=r===j&&t[i+1].startsWith("/>")?" ":"";s+=r===C?e+$:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+v+f):e+v+(-2===p?(o.push(void 0),i):f)}const l=s+(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 U{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,p]=R(t,i);if(this.el=U.createElement(a,e),_.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=_.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(v)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(v),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?G:"?"===i[1]?L:"@"===i[1]?q:H})}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(v),i=t.length-1;if(i>0){o.textContent=g?g.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],k()),_.nextNode(),l.push({type:2,index:++n});o.append(t[i],k())}}}else if(8===o.nodeType)if(o.data===m)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(v,t+1));)l.push({type:7,index:n}),t+=v.length-1}n++}}static createElement(t,i){const e=w.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var n,s,r,l;if(i===E)return i;let a=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const p=z(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=D(t,a._$AS(t,i.values),a,o)),i}class W{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:w).importNode(e,!0);_.currentNode=n;let s=_.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new Z(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new P(s,this,t)),this.v.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=_.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class Z{constructor(t,i,e,o){var n;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=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._$Cg}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),z(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==E&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return S(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==I&&z(this._$AH)?this._$AA.nextSibling.data=t:this.k(w.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=U.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new W(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=M.get(t.strings);return void 0===i&&M.set(t.strings,i=new U(t)),i}S(t){S(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 Z(this.M(k()),this.M(k()),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._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class H{constructor(t,i,e,o,n){this.type=1,this._$AH=I,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=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=D(this,t,i,0),s=!z(t)||t!==this._$AH&&t!==E,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=D(this,o[e+r],i,r),l===E&&(l=this._$AH[r]),s||(s=!z(l)||l!==this._$AH[r]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.C(t)}C(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends H{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===I?void 0:t}}const K=g?g.emptyScript:"";class L extends H{constructor(){super(...arguments),this.type=4}C(t){t&&t!==I?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class q extends H{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:I)===E)return;const o=this._$AH,n=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==I&&(o===I||n);n&&this.element.removeEventListener(this.name,this,o),s&&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 P{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 X=window.litHtmlPolyfillSupport;null==X||X(U,Z),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.2.4");
|
|
114
114
|
/**
|
|
115
115
|
* @license
|
|
116
116
|
* Copyright 2020 Google LLC
|
|
117
117
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
118
118
|
*/
|
|
119
|
-
const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===Y)return null===(e=t)||void 0===e?void 0:e._$litStatic$},Q=t=>({_$litStatic$:t,r:Y}),V=new Map,tt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],l=[];let a,p=0,h=!1;for(;p<o;){for(a=i[p];p<o&&void 0!==(s=e[p],n=J(s));)a+=n+i[++p],h=!0;l.push(s),r.push(a),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=V.get(t))&&(r.raw=r,V.set(t,i=r)),e=l}return t(i,...e)})(F);var it,et=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!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"}(it||(it={}));const ot=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),nt=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),st={fontFamily:nt,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},rt=i.FtCssVariable.extend("--ft-typography-title-font-family",ot),lt=i.FtCssVariable.extend("--ft-typography-title-font-size",st.fontSize,"20px"),at=i.FtCssVariable.extend("--ft-typography-title-font-weight",st.fontWeight,"normal"),pt=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",st.letterSpacing,"0.15px"),ht=i.FtCssVariable.extend("--ft-typography-title-line-height",st.lineHeight,"1.2"),ft=i.FtCssVariable.extend("--ft-typography-title-text-transform",st.textTransform,"inherit"),dt=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",ot),ct=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",st.fontSize,"14px"),ut=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",st.fontWeight,"normal"),xt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",st.letterSpacing,"0.105px"),
|
|
119
|
+
const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===Y)return null===(e=t)||void 0===e?void 0:e._$litStatic$},Q=t=>({_$litStatic$:t,r:Y}),V=new Map,tt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],l=[];let a,p=0,h=!1;for(;p<o;){for(a=i[p];p<o&&void 0!==(s=e[p],n=J(s));)a+=n+i[++p],h=!0;l.push(s),r.push(a),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=V.get(t))&&(r.raw=r,V.set(t,i=r)),e=l}return t(i,...e)})(F);var it,et=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!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"}(it||(it={}));const ot=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),nt=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),st={fontFamily:nt,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},rt=i.FtCssVariable.extend("--ft-typography-title-font-family",ot),lt=i.FtCssVariable.extend("--ft-typography-title-font-size",st.fontSize,"20px"),at=i.FtCssVariable.extend("--ft-typography-title-font-weight",st.fontWeight,"normal"),pt=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",st.letterSpacing,"0.15px"),ht=i.FtCssVariable.extend("--ft-typography-title-line-height",st.lineHeight,"1.2"),ft=i.FtCssVariable.extend("--ft-typography-title-text-transform",st.textTransform,"inherit"),dt=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",ot),ct=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",st.fontSize,"14px"),ut=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",st.fontWeight,"normal"),xt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",st.letterSpacing,"0.105px"),yt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",st.lineHeight,"1.7"),gt=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",st.textTransform,"inherit"),bt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",nt),vt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",st.fontSize,"16px"),mt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",st.fontWeight,"600"),$t=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",st.letterSpacing,"0.144px"),wt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",st.lineHeight,"1.5"),kt=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",st.textTransform,"inherit"),zt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",nt),St=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",st.fontSize,"14px"),Ct=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",st.fontWeight,"normal"),Ot=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",st.letterSpacing,"0.098px"),Nt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",st.lineHeight,"1.7"),jt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",st.textTransform,"inherit"),Tt=i.FtCssVariable.extend("--ft-typography-body1-font-family",nt),At=i.FtCssVariable.extend("--ft-typography-body1-font-size",st.fontSize,"16px"),Bt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",st.fontWeight,"normal"),Ft=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",st.letterSpacing,"0.496px"),Et=i.FtCssVariable.extend("--ft-typography-body1-line-height",st.lineHeight,"1.5"),It=i.FtCssVariable.extend("--ft-typography-body1-text-transform",st.textTransform,"inherit"),Mt=i.FtCssVariable.extend("--ft-typography-body2-font-family",nt),_t=i.FtCssVariable.extend("--ft-typography-body2-font-size",st.fontSize,"14px"),Rt=i.FtCssVariable.extend("--ft-typography-body2-font-weight",st.fontWeight,"normal"),Ut=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",st.letterSpacing,"0.252px"),Dt=i.FtCssVariable.extend("--ft-typography-body2-line-height",st.lineHeight,"1.4"),Wt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",st.textTransform,"inherit"),Zt=i.FtCssVariable.extend("--ft-typography-caption-font-family",nt),Ht=i.FtCssVariable.extend("--ft-typography-caption-font-size",st.fontSize,"12px"),Gt=i.FtCssVariable.extend("--ft-typography-caption-font-weight",st.fontWeight,"normal"),Kt=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",st.letterSpacing,"0.396px"),Lt=i.FtCssVariable.extend("--ft-typography-caption-line-height",st.lineHeight,"1.33"),qt=i.FtCssVariable.extend("--ft-typography-caption-text-transform",st.textTransform,"inherit"),Pt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",nt),Xt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",st.fontSize,"10px"),Yt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",st.fontWeight,"normal"),Jt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",st.letterSpacing,"0.33px"),Qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",st.lineHeight,"1.6"),Vt=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",st.textTransform,"inherit"),ti=i.FtCssVariable.extend("--ft-typography-overline-font-family",nt),ii=i.FtCssVariable.extend("--ft-typography-overline-font-size",st.fontSize,"10px"),ei=i.FtCssVariable.extend("--ft-typography-overline-font-weight",st.fontWeight,"normal"),oi=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",st.letterSpacing,"1.5px"),ni=i.FtCssVariable.extend("--ft-typography-overline-line-height",st.lineHeight,"1.6"),si=i.FtCssVariable.extend("--ft-typography-overline-text-transform",st.textTransform,"uppercase"),ri={fontFamily:i.FtCssVariable.extend("--ft-typography-button-font-family",nt),fontSize:i.FtCssVariable.extend("--ft-typography-button-font-size",st.fontSize,"14px"),fontWeight:i.FtCssVariable.extend("--ft-typography-button-font-weight",st.fontWeight,"600"),letterSpacing:i.FtCssVariable.extend("--ft-typography-button-letter-spacing",st.letterSpacing,"1.246px"),lineHeight:i.FtCssVariable.extend("--ft-typography-button-line-height",st.lineHeight,"1.15"),textTransform:i.FtCssVariable.extend("--ft-typography-button-text-transform",st.textTransform,"uppercase")},li=e.css`
|
|
120
120
|
.ft-typography--title {
|
|
121
121
|
font-family: ${rt};
|
|
122
122
|
font-size: ${lt};
|
|
@@ -131,8 +131,8 @@ const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
131
131
|
font-size: ${ct};
|
|
132
132
|
font-weight: ${ut};
|
|
133
133
|
letter-spacing: ${xt};
|
|
134
|
-
line-height: ${
|
|
135
|
-
text-transform: ${
|
|
134
|
+
line-height: ${yt};
|
|
135
|
+
text-transform: ${gt};
|
|
136
136
|
}
|
|
137
137
|
`,pi=e.css`
|
|
138
138
|
.ft-typography--subtitle1 {
|
|
@@ -198,7 +198,7 @@ const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
198
198
|
line-height: ${ni};
|
|
199
199
|
text-transform: ${si};
|
|
200
200
|
}
|
|
201
|
-
`,
|
|
201
|
+
`,yi=e.css`
|
|
202
202
|
.ft-typography--button {
|
|
203
203
|
font-family: ${ri.fontFamily};
|
|
204
204
|
font-size: ${ri.fontSize};
|
|
@@ -207,18 +207,18 @@ const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
207
207
|
line-height: ${ri.lineHeight};
|
|
208
208
|
text-transform: ${ri.textTransform};
|
|
209
209
|
}
|
|
210
|
-
`;class
|
|
210
|
+
`;class gi extends i.FtLitElement{constructor(){super(...arguments),this.variant=it.body1}render(){return this.element?tt`
|
|
211
211
|
<${Q(this.element)}
|
|
212
212
|
class="ft-typography ft-typography--${this.variant}">
|
|
213
213
|
<slot></slot>
|
|
214
214
|
</${Q(this.element)}>
|
|
215
215
|
`:tt`
|
|
216
216
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
217
|
-
`}}
|
|
217
|
+
`}}gi.styles=[li,ai,pi,hi,fi,di,ci,ui,xi,yi,e.css`
|
|
218
218
|
.ft-typography {
|
|
219
219
|
vertical-align: inherit;
|
|
220
220
|
}
|
|
221
|
-
`],et([o.property()],
|
|
221
|
+
`],et([o.property()],gi.prototype,"element",void 0),et([o.property()],gi.prototype,"variant",void 0),i.customElement("ft-typography")(gi);var bi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const vi=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),mi=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),$i=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),wi=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),ki=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class zi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
222
222
|
<div part="container"
|
|
223
223
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
224
224
|
@mouseenter=${this.onHover}
|
|
@@ -233,7 +233,7 @@ const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
233
233
|
</div>
|
|
234
234
|
<slot></slot>
|
|
235
235
|
</div>
|
|
236
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=i.height+"px",n.left=o+"px";break;case"left":n.top=e+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=e+"px",n.left=i.width+"px"}n.maxWidth=Math.max(i.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}zi.elementDefinitions={"ft-typography":
|
|
236
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=i.height+"px",n.left=o+"px";break;case"left":n.top=e+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=e+"px",n.left=i.width+"px"}n.maxWidth=Math.max(i.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}zi.elementDefinitions={"ft-typography":gi},zi.styles=e.css`
|
|
237
237
|
.ft-tooltip--container {
|
|
238
238
|
display: block;
|
|
239
239
|
position: relative;
|
|
@@ -392,7 +392,7 @@ const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
392
392
|
box-shadow: 0px 0px 0px transparent;
|
|
393
393
|
border: 0px solid transparent;
|
|
394
394
|
text-shadow: 0px 0px 0px transparent;
|
|
395
|
-
font-size:
|
|
395
|
+
font-size: 16px;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
button:hover {
|
|
@@ -420,7 +420,6 @@ const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
420
420
|
box-sizing: border-box;
|
|
421
421
|
border: none;
|
|
422
422
|
pointer-events: auto;
|
|
423
|
-
line-height: 0;
|
|
424
423
|
|
|
425
424
|
--ft-button-internal-font-size: ${Ii.fontSize};
|
|
426
425
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
@@ -538,4 +537,4 @@ const Y=Symbol.for(""),J=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
538
537
|
</ft-tooltip>
|
|
539
538
|
`}resolveIcon(){return this.loading?e.html`
|
|
540
539
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
541
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ui.elementDefinitions={"ft-ripple":x,"ft-tooltip":zi,"ft-typography":
|
|
540
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ui.elementDefinitions={"ft-ripple":x,"ft-tooltip":zi,"ft-typography":gi,"ft-icon":Bi,"ft-loader":Ci},Fi([o.property({type:Boolean})],Ui.prototype,"primary",void 0),Fi([o.property({type:Boolean})],Ui.prototype,"outlined",void 0),Fi([o.property({type:Boolean})],Ui.prototype,"disabled",void 0),Fi([o.property({type:Boolean})],Ui.prototype,"dense",void 0),Fi([o.property({type:Boolean})],Ui.prototype,"round",void 0),Fi([o.property({type:String})],Ui.prototype,"label",void 0),Fi([o.property({type:String})],Ui.prototype,"icon",void 0),Fi([o.property({type:Boolean})],Ui.prototype,"trailingIcon",void 0),Fi([o.property({type:Boolean})],Ui.prototype,"loading",void 0),Fi([o.property({type:String})],Ui.prototype,"tooltipPosition",void 0),Fi([o.query(".ft-button")],Ui.prototype,"button",void 0),Fi([o.query(".ft-button--label slot")],Ui.prototype,"slottedContent",void 0),i.customElement("ft-button")(Ui),t.FtButton=Ui,t.FtButtonCssVariables=Ii,t.FtButtonDenseCssVariables=Ri,t.FtButtonPrimaryCssVariables=_i,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|