@fluid-topics/ft-dialog 0.2.13 → 0.2.16
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-dialog.d.ts +2 -0
- package/build/ft-dialog.inline-styles.js +531 -123
- package/build/ft-dialog.js +14 -1
- package/build/ft-dialog.light.js +489 -94
- package/build/ft-dialog.min.js +529 -121
- package/package.json +6 -5
package/build/ft-dialog.light.js
CHANGED
|
@@ -1,132 +1,134 @@
|
|
|
1
|
-
!function(t,e,
|
|
1
|
+
!function(t,i,e,o,n,s){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var r;const a=globalThis.trustedTypes,l=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,h="?"+p,f=`<${h}>`,d=document,c=(t="")=>d.createComment(t),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,x=/-->/g,b=/>/g,v=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,m=/'/g,$=/"/g,w=/^(?:script|style|textarea|title)$/i,k=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),z=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),C=new WeakMap,O=d.createTreeWalker(d,129,null,!1),j=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=y;for(let i=0;i<e;i++){const e=t[i];let a,l,h=-1,d=0;for(;d<e.length&&(r.lastIndex=d,l=r.exec(e),null!==l);)d=r.lastIndex,r===y?"!--"===l[1]?r=x:void 0!==l[1]?r=b:void 0!==l[2]?(w.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=v):void 0!==l[3]&&(r=v):r===v?">"===l[0]?(r=null!=n?n:y,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?v:'"'===l[3]?$:m):r===$||r===m?r=v:r===x||r===b?r=y:(r=v,n=void 0);const c=r===v&&t[i+1].startsWith("/>")?" ":"";s+=r===y?e+f:h>=0?(o.push(a),e.slice(0,h)+"$lit$"+e.slice(h)+p+c):e+p+(-2===h?(o.push(void 0),i):c)}const a=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==l?l.createHTML(a):a,o]};class E{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[f,d]=j(t,i);if(this.el=E.createElement(f,e),O.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=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(p)){const e=d[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(p),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?A:"?"===i[1]?M:"@"===i[1]?_:T})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(w.test(o.tagName)){const t=o.textContent.split(p),i=t.length-1;if(i>0){o.textContent=a?a.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],c()),O.nextNode(),l.push({type:2,index:++n});o.append(t[i],c())}}}else if(8===o.nodeType)if(o.data===h)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(p,t+1));)l.push({type:7,index:n}),t+=p.length-1}n++}}static createElement(t,i){const e=d.createElement("template");return e.innerHTML=t,e}}function N(t,i,e=t,o){var n,s,r,a;if(i===z)return i;let l=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const p=u(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Cl)&&void 0!==r?r:a._$Cl=[])[o]=l:e._$Cu=l),void 0!==l&&(i=N(t,l._$AS(t,i.values),l,o)),i}class B{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:d).importNode(e,!0);O.currentNode=n;let s=O.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new I(s,s.nextSibling,this,t):1===l.type?i=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(i=new Z(s,this,t)),this.v.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(s=O.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 I{constructor(t,i,e,o){var n;this.type=2,this._$AH=S,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=N(this,t,i),u(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==z&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return g(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!==S&&u(this._$AH)?this._$AA.nextSibling.data=t:this.k(d.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=E.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 B(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new E(t)),i}S(t){g(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 I(this.M(c()),this.M(c()),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 T{constructor(t,i,e,o,n){this.type=1,this._$AH=S,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=S}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=N(this,t,i,0),s=!u(t)||t!==this._$AH&&t!==z,s&&(this._$AH=t);else{const o=t;let r,a;for(t=n[0],r=0;r<n.length-1;r++)a=N(this,o[e+r],i,r),a===z&&(a=this._$AH[r]),s||(s=!u(a)||a!==this._$AH[r]),a===S?t=S:t!==S&&(t+=(null!=a?a:"")+n[r+1]),this._$AH[r]=a}s&&!o&&this.C(t)}C(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class A extends T{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===S?void 0:t}}const F=a?a.emptyScript:"";class M extends T{constructor(){super(...arguments),this.type=4}C(t){t&&t!==S?this.element.setAttribute(this.name,F):this.element.removeAttribute(this.name)}}class _ extends T{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=N(this,t,i,0))&&void 0!==e?e:S)===z)return;const o=this._$AH,n=t===S&&o!==S||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==S&&(o===S||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 Z{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){N(this,t)}}const R=window.litHtmlPolyfillSupport;null==R||R(E,I),(null!==(r=globalThis.litHtmlVersions)&&void 0!==r?r:globalThis.litHtmlVersions=[]).push("2.2.4");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const D=Symbol.for(""),U=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)===D)return null===(e=t)||void 0===e?void 0:e._$litStatic$},W=t=>({_$litStatic$:t,r:D}),H=new Map,K=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(s=e[p],n=U(s));)l+=n+i[++p],h=!0;a.push(s),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=H.get(t))&&(r.raw=r,H.set(t,i=r)),e=a}return t(i,...e)})(k);var L,G=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!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"}(L||(L={}));const q=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),P=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),X={fontFamily:P,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")},Y=i.FtCssVariable.extend("--ft-typography-title-font-family",q),J=i.FtCssVariable.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=i.FtCssVariable.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),V=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),tt=i.FtCssVariable.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),it=i.FtCssVariable.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),et=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",q),ot=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),nt=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),st=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),lt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",P),pt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),ht=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ft=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),dt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ct=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),ut=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",P),gt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),yt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),xt=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),bt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),vt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),mt=i.FtCssVariable.extend("--ft-typography-body1-font-family",P),$t=i.FtCssVariable.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),wt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),kt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),zt=i.FtCssVariable.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),St=i.FtCssVariable.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit"),Ct=i.FtCssVariable.extend("--ft-typography-body2-font-family",P),Ot=i.FtCssVariable.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),jt=i.FtCssVariable.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),Et=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Nt=i.FtCssVariable.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Bt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),It=i.FtCssVariable.extend("--ft-typography-caption-font-family",P),Tt=i.FtCssVariable.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),At=i.FtCssVariable.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),Ft=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),Mt=i.FtCssVariable.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),_t=i.FtCssVariable.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit"),Zt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",P),Rt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Dt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),Ut=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),Wt=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Ht=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),Kt=i.FtCssVariable.extend("--ft-typography-overline-font-family",P),Lt=i.FtCssVariable.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Gt=i.FtCssVariable.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),qt=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Pt=i.FtCssVariable.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),Xt=i.FtCssVariable.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Yt={fontFamily:i.FtCssVariable.extend("--ft-typography-button-font-family",P),fontSize:i.FtCssVariable.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:i.FtCssVariable.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:i.FtCssVariable.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:i.FtCssVariable.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),textTransform:i.FtCssVariable.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Jt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
15
|
+
font-family: ${Y};
|
|
16
|
+
font-size: ${J};
|
|
17
|
+
font-weight: ${Q};
|
|
18
|
+
letter-spacing: ${V};
|
|
19
|
+
line-height: ${tt};
|
|
20
|
+
text-transform: ${it};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Qt=e.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
24
|
font-family: ${et};
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
25
|
+
font-size: ${ot};
|
|
26
|
+
font-weight: ${nt};
|
|
27
|
+
letter-spacing: ${st};
|
|
28
|
+
line-height: ${rt};
|
|
29
29
|
text-transform: ${at};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Vt=e.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
33
|
+
font-family: ${lt};
|
|
34
|
+
font-size: ${pt};
|
|
35
|
+
font-weight: ${ht};
|
|
36
|
+
letter-spacing: ${ft};
|
|
37
|
+
line-height: ${dt};
|
|
38
|
+
text-transform: ${ct};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,ti=e.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
42
|
+
font-family: ${ut};
|
|
43
|
+
font-size: ${gt};
|
|
44
44
|
font-weight: ${yt};
|
|
45
|
-
letter-spacing: ${
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
45
|
+
letter-spacing: ${xt};
|
|
46
|
+
line-height: ${bt};
|
|
47
|
+
text-transform: ${vt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,ii=e.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
52
|
+
font-family: ${mt};
|
|
53
53
|
font-size: ${$t};
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
54
|
+
font-weight: ${wt};
|
|
55
|
+
letter-spacing: ${kt};
|
|
56
56
|
line-height: ${zt};
|
|
57
57
|
text-transform: ${St};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,ei=e.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
61
|
+
font-family: ${Ct};
|
|
62
|
+
font-size: ${Ot};
|
|
63
63
|
font-weight: ${jt};
|
|
64
64
|
letter-spacing: ${Et};
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
65
|
+
line-height: ${Nt};
|
|
66
|
+
text-transform: ${Bt};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,oi=e.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
70
|
+
font-family: ${It};
|
|
71
|
+
font-size: ${Tt};
|
|
72
72
|
font-weight: ${At};
|
|
73
|
-
letter-spacing: ${
|
|
73
|
+
letter-spacing: ${Ft};
|
|
74
74
|
line-height: ${Mt};
|
|
75
|
-
text-transform: ${
|
|
75
|
+
text-transform: ${_t};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,ni=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
79
|
+
font-family: ${Zt};
|
|
80
|
+
font-size: ${Rt};
|
|
81
|
+
font-weight: ${Dt};
|
|
82
|
+
letter-spacing: ${Ut};
|
|
83
|
+
line-height: ${Wt};
|
|
84
|
+
text-transform: ${Ht};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,si=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
88
|
+
font-family: ${Kt};
|
|
89
|
+
font-size: ${Lt};
|
|
90
|
+
font-weight: ${Gt};
|
|
91
|
+
letter-spacing: ${qt};
|
|
92
|
+
line-height: ${Pt};
|
|
93
|
+
text-transform: ${Xt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,ri=e.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${Yt};
|
|
102
|
-
text-transform: ${
|
|
97
|
+
font-family: ${Yt.fontFamily};
|
|
98
|
+
font-size: ${Yt.fontSize};
|
|
99
|
+
font-weight: ${Yt.fontWeight};
|
|
100
|
+
letter-spacing: ${Yt.letterSpacing};
|
|
101
|
+
line-height: ${Yt.lineHeight};
|
|
102
|
+
text-transform: ${Yt.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`;class
|
|
105
|
-
<${
|
|
104
|
+
`;class ai extends i.FtLitElement{constructor(){super(...arguments),this.variant=L.body1}render(){return this.element?K`
|
|
105
|
+
<${W(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
|
-
</${
|
|
109
|
-
`:
|
|
108
|
+
</${W(this.element)}>
|
|
109
|
+
`:K`
|
|
110
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}var
|
|
111
|
+
`}}var li,pi;ai.styles=[Jt,Qt,Vt,ti,ii,ei,oi,ni,si,ri,e.css`
|
|
112
112
|
.ft-typography {
|
|
113
113
|
vertical-align: inherit;
|
|
114
114
|
}
|
|
115
|
-
`],
|
|
115
|
+
`],G([o.property()],ai.prototype,"element",void 0),G([o.property()],ai.prototype,"variant",void 0),i.customElement("ft-typography")(ai),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=""}(li||(li={})),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=""}(pi||(pi={})),new Map([...["abw"].map((t=>[t,pi.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,pi.AUDIO])),...["avi"].map((t=>[t,pi.AVI])),...["chm","xhs"].map((t=>[t,pi.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,pi.CODE])),...["csv"].map((t=>[t,pi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,pi.DITA])),...["epub"].map((t=>[t,pi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,pi.EXCEL])),...["flac"].map((t=>[t,pi.FLAC])),...["gif"].map((t=>[t,pi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,pi.GZIP])),...["html","htm","xhtml"].map((t=>[t,pi.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,pi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,pi.JPEG])),...["json"].map((t=>[t,pi.JSON])),...["m4a","m4p"].map((t=>[t,pi.M4A])),...["mov","qt"].map((t=>[t,pi.MOV])),...["mp3"].map((t=>[t,pi.MP3])),...["mp4","m4v"].map((t=>[t,pi.MP4])),...["ogg","oga"].map((t=>[t,pi.OGG])),...["pdf","ps"].map((t=>[t,pi.PDF])),...["png"].map((t=>[t,pi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,pi.POWERPOINT])),...["rar"].map((t=>[t,pi.RAR])),...["stp"].map((t=>[t,pi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,pi.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,pi.VIDEO])),...["wav"].map((t=>[t,pi.WAV])),...["wma"].map((t=>[t,pi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,pi.WORD])),...["xml","xsl","rdf"].map((t=>[t,pi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,pi.YAML])),...["zip"].map((t=>[t,pi.ZIP]))]);var hi,fi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(hi||(hi={}));const di={size:i.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariable.extend("--ft-icon-file-format-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariable.extend("--ft-icon-material-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class ci extends i.FtLitElement{constructor(){super(...arguments),this.variant=hi.fluid_topics}render(){return e.html`
|
|
116
116
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
117
117
|
${n.unsafeHTML(this.getIcon())}
|
|
118
118
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
119
119
|
</i>
|
|
120
|
-
`}get textContent(){var t,
|
|
121
|
-
:host
|
|
120
|
+
`}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:""}getIcon(){var t,i;let o=this.textContent;return this.variant===hi.file_format?null!==(t=pi[o.toUpperCase()])&&void 0!==t?t:o:this.variant===hi.fluid_topics?null!==(i=li[o.toUpperCase()])&&void 0!==i?i:o:e.nothing}}ci.elementDefinitions={},ci.styles=e.css`
|
|
121
|
+
:host {
|
|
122
122
|
display: inline-block;
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
}
|
|
124
|
+
:host, i.ft-icon {
|
|
125
|
+
width: ${di.size};
|
|
126
|
+
height: ${di.size};
|
|
125
127
|
text-align: center;
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
i.ft-icon {
|
|
129
|
-
font-size: ${
|
|
131
|
+
font-size: ${di.size};
|
|
130
132
|
line-height: 1;
|
|
131
133
|
font-weight: normal;
|
|
132
134
|
text-transform: none;
|
|
@@ -140,24 +142,410 @@ const B=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
.ft-icon--fluid-topics {
|
|
143
|
-
font-family: ${
|
|
145
|
+
font-family: ${di.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
.ft-icon--file-format {
|
|
147
|
-
font-family: ${
|
|
149
|
+
font-family: ${di.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
.ft-icon--material {
|
|
151
|
-
font-family: ${
|
|
153
|
+
font-family: ${di.materialFontFamily}, "Material Icons", sans-serif;
|
|
154
|
+
}
|
|
155
|
+
`,fi([o.property()],ci.prototype,"variant",void 0),fi([o.query("slot")],ci.prototype,"slottedContent",void 0),i.customElement("ft-icon")(ci);var ui=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const gi=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),yi={color:gi,backgroundColor:i.FtCssVariable.extend("--ft-ripple-background-color",gi),opacityContentOnSurfacePressed:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},xi=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),bi=xi,vi=i.FtCssVariable.extend("--ft-ripple-background-color",xi),mi=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),$i=mi,wi=i.FtCssVariable.extend("--ft-ripple-background-color",mi);class ki 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.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),s=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
156
|
+
<style>
|
|
157
|
+
.ft-ripple .ft-ripple--effect,
|
|
158
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
159
|
+
width: ${this.rippleSize}px;
|
|
160
|
+
height: ${this.rippleSize}px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.ft-ripple .ft-ripple--effect {
|
|
164
|
+
left: ${this.originX}px;
|
|
165
|
+
top: ${this.originY}px;
|
|
166
|
+
}
|
|
167
|
+
</style>
|
|
168
|
+
<div class="${s.classMap(t)}">
|
|
169
|
+
<div class="ft-ripple--background"></div>
|
|
170
|
+
<div class="ft-ripple--effect"></div>
|
|
171
|
+
</div>
|
|
172
|
+
`}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()}}ki.elementDefinitions={},ki.styles=e.css`
|
|
173
|
+
:host {
|
|
174
|
+
display: contents;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ft-ripple {
|
|
178
|
+
position: absolute;
|
|
179
|
+
inset: 0;
|
|
180
|
+
pointer-events: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ft-ripple .ft-ripple--background,
|
|
188
|
+
.ft-ripple .ft-ripple--effect {
|
|
189
|
+
position: absolute;
|
|
190
|
+
opacity: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ft-ripple .ft-ripple--background {
|
|
194
|
+
background-color: ${yi.backgroundColor};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ft-ripple .ft-ripple--effect {
|
|
198
|
+
background-color: ${yi.color};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
202
|
+
background-color: ${wi};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
206
|
+
background-color: ${$i};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
210
|
+
background-color: ${vi};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
214
|
+
background-color: ${bi};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.ft-ripple .ft-ripple--background {
|
|
218
|
+
top: 0;
|
|
219
|
+
left: 0;
|
|
220
|
+
height: 100%;
|
|
221
|
+
width: 100%;
|
|
222
|
+
transition: opacity 75ms linear;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.ft-ripple .ft-ripple--effect,
|
|
226
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
227
|
+
border-radius: 50%;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ft-ripple .ft-ripple--effect {
|
|
231
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
232
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
236
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
237
|
+
left: 50%;
|
|
238
|
+
top: 50%;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
242
|
+
transform: translate(-50%, -50%);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
246
|
+
opacity: ${yi.opacityContentOnSurfaceHover};
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
250
|
+
opacity: ${yi.opacityContentOnSurfaceSelected};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
254
|
+
opacity: ${yi.opacityContentOnSurfaceFocused};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
258
|
+
opacity: ${yi.opacityContentOnSurfacePressed};
|
|
259
|
+
transform: translate(-50%, -50%) scale(1);
|
|
260
|
+
}
|
|
261
|
+
`,ui([o.property({type:Boolean})],ki.prototype,"primary",void 0),ui([o.property({type:Boolean})],ki.prototype,"secondary",void 0),ui([o.property({type:Boolean})],ki.prototype,"unbounded",void 0),ui([o.property({type:Boolean})],ki.prototype,"activated",void 0),ui([o.property({type:Boolean})],ki.prototype,"selected",void 0),ui([o.property({type:Boolean})],ki.prototype,"disabled",void 0),ui([o.state()],ki.prototype,"hovered",void 0),ui([o.state()],ki.prototype,"focused",void 0),ui([o.state()],ki.prototype,"pressed",void 0),ui([o.state()],ki.prototype,"rippling",void 0),ui([o.state()],ki.prototype,"rippleSize",void 0),ui([o.state()],ki.prototype,"originX",void 0),ui([o.state()],ki.prototype,"originY",void 0),ui([o.query(".ft-ripple")],ki.prototype,"ripple",void 0),ui([o.query(".ft-ripple--effect")],ki.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(ki);var zi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Si=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),Ci=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),Oi=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),ji=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),Ei=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class Ni 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`
|
|
262
|
+
<div part="container"
|
|
263
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
264
|
+
@mouseenter=${this.onHover}
|
|
265
|
+
@mouseleave=${this.onOut}
|
|
266
|
+
@focusin=${this.onHover}
|
|
267
|
+
@focusout=${this.onOut}
|
|
268
|
+
@touchstart=${this.onTouch}>
|
|
269
|
+
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
270
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
271
|
+
<ft-typography variant="caption">${this.text}</ft-typography>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
<slot></slot>
|
|
275
|
+
</div>
|
|
276
|
+
`}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())}}Ni.elementDefinitions={"ft-typography":ai},Ni.styles=e.css`
|
|
277
|
+
.ft-tooltip--container {
|
|
278
|
+
display: block;
|
|
279
|
+
position: relative;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.ft-tooltip--inline {
|
|
283
|
+
display: inline-block;
|
|
284
|
+
max-width: 100%;
|
|
152
285
|
}
|
|
153
|
-
|
|
286
|
+
|
|
287
|
+
.ft-tooltip {
|
|
288
|
+
position: absolute;
|
|
289
|
+
box-sizing: border-box;
|
|
290
|
+
overflow: hidden;
|
|
291
|
+
width: max-content;
|
|
292
|
+
max-width: 150px;
|
|
293
|
+
text-align: center;
|
|
294
|
+
padding: ${Si};
|
|
295
|
+
z-index: ${ji};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.ft-tooltip--content {
|
|
299
|
+
padding: 4px 8px;
|
|
300
|
+
border-radius: ${Ei};
|
|
301
|
+
background-color: ${Oi};
|
|
302
|
+
color: ${Ci};
|
|
303
|
+
top: -500px;
|
|
304
|
+
left: -500px;
|
|
305
|
+
position: relative;
|
|
306
|
+
word-break: break-word;
|
|
307
|
+
}
|
|
308
|
+
`,zi([o.property()],Ni.prototype,"text",void 0),zi([o.property({type:Boolean})],Ni.prototype,"manual",void 0),zi([o.property({type:Boolean})],Ni.prototype,"inline",void 0),zi([o.property({type:Number})],Ni.prototype,"delay",void 0),zi([o.property()],Ni.prototype,"position",void 0),zi([o.queryAssignedNodes("",!0)],Ni.prototype,"slotNodes",void 0),zi([o.query(".ft-tooltip--container")],Ni.prototype,"container",void 0),zi([o.query("slot")],Ni.prototype,"target",void 0),zi([o.query(".ft-tooltip")],Ni.prototype,"tooltip",void 0),zi([o.query(".ft-tooltip--content")],Ni.prototype,"tooltipContent",void 0),zi([o.state()],Ni.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ni);const Bi={color:i.FtCssVariable.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class Ii extends i.FtLitElement{static get styles(){return e.css`
|
|
309
|
+
:host {
|
|
310
|
+
line-height: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.ft-loader {
|
|
314
|
+
display: inline-block;
|
|
315
|
+
position: relative;
|
|
316
|
+
|
|
317
|
+
width: ${Bi.size};
|
|
318
|
+
height: ${Bi.size};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.ft-loader div {
|
|
322
|
+
position: absolute;
|
|
323
|
+
top: 37.5%;
|
|
324
|
+
width: 25%;
|
|
325
|
+
height: 25%;
|
|
326
|
+
border-radius: 50%;
|
|
327
|
+
background: ${Bi.color};
|
|
328
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.ft-loader div:nth-child(1) {
|
|
332
|
+
left: 2.5%;
|
|
333
|
+
animation: appear 0.6s infinite;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.ft-loader div:nth-child(2) {
|
|
337
|
+
left: 2.5%;
|
|
338
|
+
animation: move 0.6s infinite;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.ft-loader div:nth-child(3) {
|
|
342
|
+
left: 37.5%;
|
|
343
|
+
animation: move 0.6s infinite;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.ft-loader div:nth-child(4) {
|
|
347
|
+
left: 72.5%;
|
|
348
|
+
animation: disappear 0.6s infinite;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@keyframes appear {
|
|
352
|
+
0% {
|
|
353
|
+
transform: scale(0);
|
|
354
|
+
}
|
|
355
|
+
100% {
|
|
356
|
+
transform: scale(1);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@keyframes disappear {
|
|
361
|
+
0% {
|
|
362
|
+
transform: scale(1);
|
|
363
|
+
}
|
|
364
|
+
100% {
|
|
365
|
+
transform: scale(0);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@keyframes move {
|
|
370
|
+
0% {
|
|
371
|
+
transform: translate(0, 0);
|
|
372
|
+
}
|
|
373
|
+
100% {
|
|
374
|
+
transform: translate(calc(0.35 * ${Bi.size}), 0);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
`}render(){return e.html`
|
|
378
|
+
<div class="ft-loader">
|
|
379
|
+
<div></div>
|
|
380
|
+
<div></div>
|
|
381
|
+
<div></div>
|
|
382
|
+
<div></div>
|
|
383
|
+
</div>
|
|
384
|
+
`}}i.customElement("ft-loader")(Ii);var Ti=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Ai=i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Fi={backgroundColor:i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Ai,fontSize:i.FtCssVariable.extend("--ft-button-font-size",Yt.fontSize),iconSize:i.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariable.extend("--ft-button-ripple-color",Ai),opacityDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Mi=i.FtCssVariable.extend("--ft-button-primary-color",i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),_i={backgroundColor:i.FtCssVariable.extend("--ft-button-primary-background-color",i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Mi,rippleColor:i.FtCssVariable.extend("--ft-button-primary-ripple-color",Mi)},Zi=i.FtCssVariable.extend("--ft-button-dense-border-radius",i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Ri extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[i.noTextSelect,e.css`
|
|
385
|
+
:host {
|
|
386
|
+
display: inline-block;
|
|
387
|
+
max-width: 100%;
|
|
388
|
+
pointer-events: none;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
button {
|
|
392
|
+
box-shadow: 0px 0px 0px transparent;
|
|
393
|
+
border: 0px solid transparent;
|
|
394
|
+
text-shadow: 0px 0px 0px transparent;
|
|
395
|
+
font-size: inherit;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
button:hover {
|
|
399
|
+
box-shadow: 0px 0px 0px transparent;
|
|
400
|
+
border: 0px solid transparent;
|
|
401
|
+
text-shadow: 0px 0px 0px transparent;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
button:active {
|
|
405
|
+
outline: none;
|
|
406
|
+
border: none;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
button:focus {
|
|
410
|
+
outline: 0;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.ft-button {
|
|
414
|
+
position: relative;
|
|
415
|
+
display: flex;
|
|
416
|
+
justify-content: center;
|
|
417
|
+
align-items: center;
|
|
418
|
+
width: 100%;
|
|
419
|
+
overflow: hidden;
|
|
420
|
+
box-sizing: border-box;
|
|
421
|
+
border: none;
|
|
422
|
+
pointer-events: auto;
|
|
423
|
+
line-height: 0;
|
|
424
|
+
|
|
425
|
+
--ft-button-internal-font-size: ${Fi.fontSize};
|
|
426
|
+
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
427
|
+
--ft-button-internal-color: ${Fi.color};
|
|
428
|
+
${i.setVariable(di.size,Fi.iconSize)};
|
|
429
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
430
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
431
|
+
${i.setVariable(yi.color,Fi.rippleColor)};
|
|
432
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Fi.iconSize});
|
|
433
|
+
|
|
434
|
+
border-radius: ${Fi.borderRadius};
|
|
435
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
436
|
+
background-color: ${Fi.backgroundColor};
|
|
437
|
+
color: var(--ft-button-internal-color);
|
|
438
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.ft-button:not([disabled]):hover {
|
|
442
|
+
cursor: pointer;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.ft-button--dense {
|
|
446
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
447
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
448
|
+
border-radius: ${Zi};
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.ft-button--round {
|
|
452
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.ft-button[disabled] {
|
|
456
|
+
filter: grayscale(1);
|
|
457
|
+
opacity: ${Fi.opacityDisabled};
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.ft-button.ft-button--primary {
|
|
461
|
+
background-color: ${_i.backgroundColor};
|
|
462
|
+
--ft-button-internal-color: ${_i.color};
|
|
463
|
+
${i.setVariable(yi.color,_i.rippleColor)};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.ft-button.ft-button--outlined {
|
|
467
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
468
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.ft-button:focus {
|
|
472
|
+
outline: none;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.ft-button--label {
|
|
476
|
+
position: relative;
|
|
477
|
+
overflow: hidden;
|
|
478
|
+
white-space: nowrap;
|
|
479
|
+
text-overflow: ellipsis;
|
|
480
|
+
display: block;
|
|
481
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
482
|
+
${i.setVariable(Yt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
483
|
+
${i.setVariable(Yt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.ft-button--safari-fix .ft-button--label {
|
|
487
|
+
margin-right: 0;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
491
|
+
content: "\\0000a0";
|
|
492
|
+
display: inline-block;
|
|
493
|
+
width: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.ft-button--label[hidden] {
|
|
497
|
+
display: none;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
ft-icon {
|
|
501
|
+
flex-shrink: 0;
|
|
502
|
+
position: relative;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.ft-button--label[hidden] + ft-icon {
|
|
506
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
507
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
511
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
512
|
+
order: -1;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
ft-loader {
|
|
516
|
+
${i.setVariable(Bi.size,Fi.iconSize)};
|
|
517
|
+
${i.setVariable(Bi.color,"var(--ft-button-internal-color)")};
|
|
518
|
+
}
|
|
519
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltip(e.html`
|
|
520
|
+
<button part="button"
|
|
521
|
+
class="${s.classMap(t)}"
|
|
522
|
+
aria-label="${this.getLabel()}"
|
|
523
|
+
?disabled=${this.isDisabled()}>
|
|
524
|
+
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
525
|
+
<ft-typography part="label"
|
|
526
|
+
variant="button"
|
|
527
|
+
class="ft-button--label"
|
|
528
|
+
?hidden=${!this.hasTextContent()}>
|
|
529
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
530
|
+
</ft-typography>
|
|
531
|
+
${this.resolveIcon()}
|
|
532
|
+
</button>
|
|
533
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:e.html`
|
|
534
|
+
<ft-tooltip part="tooltip"
|
|
535
|
+
text="${this.getLabel()}"
|
|
536
|
+
position="${this.tooltipPosition}">
|
|
537
|
+
${t}
|
|
538
|
+
</ft-tooltip>
|
|
539
|
+
`}resolveIcon(){return this.loading?e.html`
|
|
540
|
+
<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}}Ri.elementDefinitions={"ft-ripple":ki,"ft-tooltip":Ni,"ft-typography":ai,"ft-icon":ci,"ft-loader":Ii},Ti([o.property({type:Boolean})],Ri.prototype,"primary",void 0),Ti([o.property({type:Boolean})],Ri.prototype,"outlined",void 0),Ti([o.property({type:Boolean})],Ri.prototype,"disabled",void 0),Ti([o.property({type:Boolean})],Ri.prototype,"dense",void 0),Ti([o.property({type:Boolean})],Ri.prototype,"round",void 0),Ti([o.property({type:String})],Ri.prototype,"label",void 0),Ti([o.property({type:String})],Ri.prototype,"icon",void 0),Ti([o.property({type:Boolean})],Ri.prototype,"trailingIcon",void 0),Ti([o.property({type:Boolean})],Ri.prototype,"loading",void 0),Ti([o.property({type:String})],Ri.prototype,"tooltipPosition",void 0),Ti([o.query(".ft-button")],Ri.prototype,"button",void 0),Ti([o.query(".ft-button--label slot")],Ri.prototype,"slottedContent",void 0),i.customElement("ft-button")(Ri);var Di=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Ui={zIndex:i.FtCssVariable.create("--ft-dialog-z-index","NUMBER","2"),overlayBackgroundColor:i.FtCssVariable.create("--ft-dialog-overlay-background-color","COLOR","rgba(0, 0, 0, 0.3)"),height:i.FtCssVariable.create("--ft-dialog-height","SIZE","unset"),width:i.FtCssVariable.create("--ft-dialog-width","SIZE","unset"),minWidth:i.FtCssVariable.create("--ft-dialog-min-width","SIZE","unset"),paddingTop:i.FtCssVariable.create("--ft-dialog-padding-top","SIZE","20px"),paddingSide:i.FtCssVariable.create("--ft-dialog-padding-side","SIZE","16px"),paddingButtons:i.FtCssVariable.create("--ft-dialog-padding-buttons","SIZE","20px"),colorSurface:i.FtCssVariable.external(i.designSystemVariables.colorSurface,"Design system"),headingColor:i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),borderRadiusS:i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system"),elevation24:i.FtCssVariable.external(i.designSystemVariables.elevation24,"Design system")};class Wi extends i.FtLitElement{constructor(){super(...arguments),this.opened=!1,this.closeOnEsc=!1,this.closeOnClickOutside=!1,this.closable=!1,this.heading="",this.icon=""}static get styles(){return e.css`
|
|
154
542
|
.ft-dialog {
|
|
155
543
|
position: fixed;
|
|
156
544
|
top: 0;
|
|
157
545
|
right: 0;
|
|
158
546
|
bottom: 0;
|
|
159
547
|
left: 0;
|
|
160
|
-
z-index: ${
|
|
548
|
+
z-index: ${Ui.zIndex};
|
|
161
549
|
|
|
162
550
|
display: flex;
|
|
163
551
|
flex-direction: column;
|
|
@@ -177,7 +565,7 @@ const B=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
177
565
|
height: 100%;
|
|
178
566
|
width: 100%;
|
|
179
567
|
|
|
180
|
-
background-color: ${
|
|
568
|
+
background-color: ${Ui.overlayBackgroundColor};
|
|
181
569
|
|
|
182
570
|
}
|
|
183
571
|
|
|
@@ -186,20 +574,20 @@ const B=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
186
574
|
display: flex;
|
|
187
575
|
flex-direction: column;
|
|
188
576
|
|
|
189
|
-
width: ${
|
|
190
|
-
height: ${
|
|
577
|
+
width: ${Ui.width};
|
|
578
|
+
height: ${Ui.height};
|
|
191
579
|
max-width: 95vw;
|
|
192
580
|
max-height: 95vh;
|
|
193
|
-
min-width: ${
|
|
581
|
+
min-width: ${Ui.minWidth};
|
|
194
582
|
|
|
195
|
-
padding-top: ${
|
|
196
|
-
padding-right: ${
|
|
197
|
-
padding-left: ${
|
|
583
|
+
padding-top: ${Ui.paddingTop};
|
|
584
|
+
padding-right: ${Ui.paddingSide};
|
|
585
|
+
padding-left: ${Ui.paddingSide};
|
|
198
586
|
|
|
199
|
-
background-color: ${
|
|
587
|
+
background-color: ${Ui.colorSurface};
|
|
200
588
|
|
|
201
|
-
border-radius: ${
|
|
202
|
-
box-shadow: ${
|
|
589
|
+
border-radius: ${Ui.borderRadiusS};
|
|
590
|
+
box-shadow: ${Ui.elevation24};
|
|
203
591
|
}
|
|
204
592
|
|
|
205
593
|
.ft-dialog-content {
|
|
@@ -213,11 +601,11 @@ const B=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
213
601
|
margin-bottom: 20px;
|
|
214
602
|
gap: 8px;
|
|
215
603
|
|
|
216
|
-
color: ${
|
|
604
|
+
color: ${Ui.headingColor};
|
|
217
605
|
}
|
|
218
606
|
|
|
219
607
|
.ft-dialog-buttons {
|
|
220
|
-
padding-top: ${
|
|
608
|
+
padding-top: ${Ui.paddingButtons};
|
|
221
609
|
}
|
|
222
610
|
|
|
223
611
|
slot[name=buttons] {
|
|
@@ -232,15 +620,22 @@ const B=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
232
620
|
margin-bottom: 8px
|
|
233
621
|
}
|
|
234
622
|
|
|
235
|
-
|
|
623
|
+
.ft-dialog-heading ft-button {
|
|
624
|
+
margin-left: auto;
|
|
625
|
+
${i.setVariable(Fi.color,Ui.headingColor)};
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
`}render(){return this.opened?e.html`
|
|
236
629
|
<div class="ft-dialog">
|
|
237
630
|
<div class="ft-dialog-overlay" @click="${()=>this.watchClickOutside()}"></div>
|
|
238
631
|
<div class="ft-dialog-wrapper">
|
|
239
|
-
${this.heading?
|
|
632
|
+
${this.heading?e.html`
|
|
240
633
|
<div class="ft-dialog-heading">
|
|
241
|
-
${this.icon?
|
|
634
|
+
${this.icon?e.html`
|
|
242
635
|
<ft-icon variant="material">${this.icon}</ft-icon>`:void 0}
|
|
243
636
|
<ft-typography element="span" variant="title">${this.heading}</ft-typography>
|
|
637
|
+
${this.closable?e.html`
|
|
638
|
+
<ft-button icon="close" @click=${this.close}></ft-button>`:void 0}
|
|
244
639
|
</div>
|
|
245
640
|
`:null}
|
|
246
641
|
<div class="ft-dialog-content">
|
|
@@ -251,4 +646,4 @@ const B=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
251
646
|
</div>
|
|
252
647
|
</div>
|
|
253
648
|
</div>
|
|
254
|
-
`:null}updated(t){if(t.has("opened")){const t=new CustomEvent("opened-changed",{detail:{opened:this.opened}});this.dispatchEvent(t)}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.watchEscapeKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.watchEscapeKey.bind(this))}close(){this.opened=!1}open(){this.opened=!0}watchEscapeKey(t){"Escape"===t.key&&this.closeOnEsc&&this.close()}watchClickOutside(){this.closeOnClickOutside&&this.close()}}
|
|
649
|
+
`:null}updated(t){if(t.has("opened")){const t=new CustomEvent("opened-changed",{detail:{opened:this.opened}});this.dispatchEvent(t)}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.watchEscapeKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.watchEscapeKey.bind(this))}close(){this.opened=!1}open(){this.opened=!0}watchEscapeKey(t){"Escape"===t.key&&this.closeOnEsc&&this.close()}watchClickOutside(){this.closeOnClickOutside&&this.close()}}Wi.elementDefinitions={"ft-typography":ai,"ft-icon":ci,"ft-button":Ri},Di([o.property({type:Boolean,hasChanged:(t,i)=>!1===i&&!0===t||!0===i&&!1===t})],Wi.prototype,"opened",void 0),Di([o.property({type:Boolean})],Wi.prototype,"closeOnEsc",void 0),Di([o.property({type:Boolean})],Wi.prototype,"closeOnClickOutside",void 0),Di([o.property({type:Boolean})],Wi.prototype,"closable",void 0),Di([o.property({type:String})],Wi.prototype,"heading",void 0),Di([o.property({type:String})],Wi.prototype,"icon",void 0),i.customElement("ft-dialog")(Wi),t.FtDialog=Wi,t.FtDialogCssVariables=Ui,t.default=Wi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|