@fluid-topics/ft-dialog 1.0.55 → 1.0.57
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.light.js +41 -25
- package/build/ft-dialog.min.js +33 -17
- package/package.json +6 -6
package/build/ft-dialog.light.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var r;const l=window,a=l.trustedTypes,p=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",f=`lit$${(Math.random()+"").slice(9)}$`,d="?"+f,c=`<${d}>`,u=document,g=()=>u.createComment(""),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,b="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,$=/>/g,w=RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),k=/'/g,z=/"/g,S=/^(?:script|style|textarea|title)$/i,E=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),I=new WeakMap,j=u.createTreeWalker(u,129,null,!1),N=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=v;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,d=0;for(;d<e.length&&(r.lastIndex=d,a=r.exec(e),null!==a);)d=r.lastIndex,r===v?"!--"===a[1]?r=m:void 0!==a[1]?r=$:void 0!==a[2]?(S.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=w):void 0!==a[3]&&(r=w):r===w?">"===a[0]?(r=null!=n?n:v,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?w:'"'===a[3]?z:k):r===z||r===k?r=w:r===m||r===$?r=v:(r=w,n=void 0);const u=r===w&&t[i+1].startsWith("/>")?" ":"";s+=r===v?e+c:p>=0?(o.push(l),e.slice(0,p)+h+e.slice(p)+f+u):e+f+(-2===p?(o.push(void 0),i):u)}const l=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(l):l,o]};class B{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[p,c]=N(t,i);if(this.el=B.createElement(p,e),j.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=j.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(h)||i.startsWith(f)){const e=c[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+h).split(f),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?
|
|
7
|
+
var r;const l=window,a=l.trustedTypes,p=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",f=`lit$${(Math.random()+"").slice(9)}$`,d="?"+f,c=`<${d}>`,u=document,g=()=>u.createComment(""),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,b="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,$=/>/g,w=RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),k=/'/g,z=/"/g,S=/^(?:script|style|textarea|title)$/i,E=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),I=new WeakMap,j=u.createTreeWalker(u,129,null,!1),N=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=v;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,d=0;for(;d<e.length&&(r.lastIndex=d,a=r.exec(e),null!==a);)d=r.lastIndex,r===v?"!--"===a[1]?r=m:void 0!==a[1]?r=$:void 0!==a[2]?(S.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=w):void 0!==a[3]&&(r=w):r===w?">"===a[0]?(r=null!=n?n:v,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?w:'"'===a[3]?z:k):r===z||r===k?r=w:r===m||r===$?r=v:(r=w,n=void 0);const u=r===w&&t[i+1].startsWith("/>")?" ":"";s+=r===v?e+c:p>=0?(o.push(l),e.slice(0,p)+h+e.slice(p)+f+u):e+f+(-2===p?(o.push(void 0),i):u)}const l=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(l):l,o]};class B{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[p,c]=N(t,i);if(this.el=B.createElement(p,e),j.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=j.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(h)||i.startsWith(f)){const e=c[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+h).split(f),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?U:"@"===i[1]?R:F})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(S.test(o.tagName)){const t=o.textContent.split(f),i=t.length-1;if(i>0){o.textContent=a?a.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],g()),j.nextNode(),l.push({type:2,index:++n});o.append(t[i],g())}}}else if(8===o.nodeType)if(o.data===d)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(f,t+1));)l.push({type:7,index:n}),t+=f.length-1}n++}}static createElement(t,i){const e=u.createElement("template");return e.innerHTML=t,e}}function T(t,i,e=t,o){var n,s,r,l;if(i===O)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=x(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)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=T(t,a._$AS(t,i.values),a,o)),i}class Z{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:u).importNode(e,!0);j.currentNode=n;let s=j.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new A(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new D(s,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=j.nextNode(),r++)}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 A{constructor(t,i,e,o){var n;this.type=2,this._$AH=C,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=T(this,t,i),x(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==O&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>y(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!==C&&x(this._$AH)?this._$AA.nextSibling.data=t:this.$(u.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=B.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 Z(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=I.get(t.strings);return void 0===i&&I.set(t.strings,i=new B(t)),i}T(t){y(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 A(this.k(g()),this.k(g()),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 F{constructor(t,i,e,o,n){this.type=1,this._$AH=C,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=C}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=T(this,t,i,0),s=!x(t)||t!==this._$AH&&t!==O,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=T(this,o[e+r],i,r),l===O&&(l=this._$AH[r]),s||(s=!x(l)||l!==this._$AH[r]),l===C?t=C:t!==C&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const _=a?a.emptyScript:"";class U extends F{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,_):this.element.removeAttribute(this.name)}}class R extends F{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=T(this,t,i,0))&&void 0!==e?e:C)===O)return;const o=this._$AH,n=t===C&&o!==C||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==C&&(o===C||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 D{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){T(this,t)}}const W=l.litHtmlPolyfillSupport;null==W||W(B,A),(null!==(r=l.litHtmlVersions)&&void 0!==r?r:l.litHtmlVersions=[]).push("2.7.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:H}),K=new Map,G=(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=L(s));)a+=n+i[++p],h=!0;p!==o&&l.push(s),r.push(a),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=K.get(t))&&(r.raw=r,K.set(t,i=r)),e=l}return t(i,...e)})(E);var V;!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"}(V||(V={}));const q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),X=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Y={fontFamily:X,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")},J=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",q),Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Y.fontSize,"20px"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Y.fontWeight,"normal"),it=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Y.letterSpacing,"0.15px"),et=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Y.lineHeight,"1.2"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Y.textTransform,"inherit"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Y.fontSize,"14px"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Y.fontWeight,"normal"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Y.letterSpacing,"0.105px"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Y.lineHeight,"1.7"),pt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Y.textTransform,"inherit"),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",X),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Y.fontSize,"16px"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Y.fontWeight,"600"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Y.letterSpacing,"0.144px"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Y.lineHeight,"1.5"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Y.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",X),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",Y.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",Y.fontWeight,"normal"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",Y.letterSpacing,"0.098px"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",Y.lineHeight,"1.7"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",Y.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",X),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",Y.fontSize,"16px"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",Y.fontWeight,"normal"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",Y.letterSpacing,"0.496px"),Et=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",Y.lineHeight,"1.5"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",Y.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",X),It=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",Y.fontSize,"14px"),jt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",Y.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",Y.letterSpacing,"0.252px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",Y.lineHeight,"1.4"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",Y.textTransform,"inherit"),Zt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",X),At=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Y.fontSize,"12px"),
|
|
13
|
+
const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:H}),K=new Map,G=(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=L(s));)a+=n+i[++p],h=!0;p!==o&&l.push(s),r.push(a),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=K.get(t))&&(r.raw=r,K.set(t,i=r)),e=l}return t(i,...e)})(E);var V;!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"}(V||(V={}));const q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),X=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Y={fontFamily:X,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")},J=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",q),Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Y.fontSize,"20px"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Y.fontWeight,"normal"),it=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Y.letterSpacing,"0.15px"),et=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Y.lineHeight,"1.2"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Y.textTransform,"inherit"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Y.fontSize,"14px"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Y.fontWeight,"normal"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Y.letterSpacing,"0.105px"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Y.lineHeight,"1.7"),pt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Y.textTransform,"inherit"),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",X),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Y.fontSize,"16px"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Y.fontWeight,"600"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Y.letterSpacing,"0.144px"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Y.lineHeight,"1.5"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Y.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",X),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",Y.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",Y.fontWeight,"normal"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",Y.letterSpacing,"0.098px"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",Y.lineHeight,"1.7"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",Y.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",X),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",Y.fontSize,"16px"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",Y.fontWeight,"normal"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",Y.letterSpacing,"0.496px"),Et=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",Y.lineHeight,"1.5"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",Y.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",X),It=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",Y.fontSize,"14px"),jt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",Y.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",Y.letterSpacing,"0.252px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",Y.lineHeight,"1.4"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",Y.textTransform,"inherit"),Zt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",X),At=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Y.fontSize,"12px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",Y.fontWeight,"normal"),Mt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",Y.letterSpacing,"0.396px"),_t=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",Y.lineHeight,"1.33"),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",Y.textTransform,"inherit"),Rt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",X),Dt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",Y.fontSize,"10px"),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",Y.fontWeight,"normal"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",Y.letterSpacing,"0.33px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",Y.lineHeight,"1.6"),Pt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",Y.textTransform,"inherit"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",X),Gt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",Y.fontSize,"10px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",Y.fontWeight,"normal"),qt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",Y.letterSpacing,"1.5px"),Xt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",Y.lineHeight,"1.6"),Yt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",Y.textTransform,"uppercase"),Jt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",X),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",Y.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",Y.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",Y.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",Y.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",Y.textTransform,"uppercase")},Qt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${J};
|
|
16
16
|
font-size: ${Q};
|
|
@@ -69,14 +69,14 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
69
69
|
.ft-typography--caption {
|
|
70
70
|
font-family: ${Zt};
|
|
71
71
|
font-size: ${At};
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
72
|
+
font-weight: ${Ft};
|
|
73
|
+
letter-spacing: ${Mt};
|
|
74
74
|
line-height: ${_t};
|
|
75
|
-
text-transform: ${
|
|
75
|
+
text-transform: ${Ut};
|
|
76
76
|
}
|
|
77
77
|
`,ri=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
79
|
+
font-family: ${Rt};
|
|
80
80
|
font-size: ${Dt};
|
|
81
81
|
font-weight: ${Wt};
|
|
82
82
|
letter-spacing: ${Ht};
|
|
@@ -187,6 +187,30 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
187
187
|
opacity: 0;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
.ft-ripple .ft-ripple--effect {
|
|
191
|
+
aspect-ratio: 1;
|
|
192
|
+
width: auto;
|
|
193
|
+
height: auto;
|
|
194
|
+
min-width: 170%;
|
|
195
|
+
min-height: 170%;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ft-ripple .ft-ripple--background{
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 100%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
204
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
205
|
+
aspect-ratio: 1;
|
|
206
|
+
width: auto;
|
|
207
|
+
height: auto;
|
|
208
|
+
max-width: unset;
|
|
209
|
+
max-height: unset;
|
|
210
|
+
min-width: 100%;
|
|
211
|
+
min-height: 100%;
|
|
212
|
+
}
|
|
213
|
+
|
|
190
214
|
.ft-ripple .ft-ripple--background {
|
|
191
215
|
background-color: ${mi.backgroundColor};
|
|
192
216
|
}
|
|
@@ -214,8 +238,6 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
214
238
|
.ft-ripple .ft-ripple--background {
|
|
215
239
|
top: 0;
|
|
216
240
|
left: 0;
|
|
217
|
-
height: 100%;
|
|
218
|
-
width: 100%;
|
|
219
241
|
transition: opacity 75ms linear;
|
|
220
242
|
}
|
|
221
243
|
|
|
@@ -255,14 +277,8 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
255
277
|
opacity: ${mi.opacityContentOnSurfacePressed};
|
|
256
278
|
transform: translate(-50%, -50%) scale(1);
|
|
257
279
|
}
|
|
258
|
-
`;var Ci=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ii 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.
|
|
280
|
+
`;var Ci=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ii 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.originX=0,this.originY=0,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),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.isFocusVisible(null==t?void 0:t.target)&&!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`
|
|
259
281
|
<style>
|
|
260
|
-
.ft-ripple .ft-ripple--effect,
|
|
261
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
262
|
-
width: ${this.rippleSize}px;
|
|
263
|
-
height: ${this.rippleSize}px;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
282
|
.ft-ripple .ft-ripple--effect {
|
|
267
283
|
left: ${this.originX}px;
|
|
268
284
|
top: ${this.originY}px;
|
|
@@ -272,7 +288,7 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
272
288
|
<div class="ft-ripple--background"></div>
|
|
273
289
|
<div class="ft-ripple--effect"></div>
|
|
274
290
|
</div>
|
|
275
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.
|
|
291
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var i,e;super.update(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"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e)}setupFor(t){if(this.setupDebouncer.cancel(),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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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.endRipple()}}Ii.elementDefinitions={},Ii.styles=Oi,Ci([o.property({type:Boolean})],Ii.prototype,"primary",void 0),Ci([o.property({type:Boolean})],Ii.prototype,"secondary",void 0),Ci([o.property({type:Boolean})],Ii.prototype,"unbounded",void 0),Ci([o.property({type:Boolean})],Ii.prototype,"activated",void 0),Ci([o.property({type:Boolean})],Ii.prototype,"selected",void 0),Ci([o.property({type:Boolean})],Ii.prototype,"disabled",void 0),Ci([o.state()],Ii.prototype,"hovered",void 0),Ci([o.state()],Ii.prototype,"focused",void 0),Ci([o.state()],Ii.prototype,"pressed",void 0),Ci([o.state()],Ii.prototype,"rippling",void 0),Ci([o.state()],Ii.prototype,"originX",void 0),Ci([o.state()],Ii.prototype,"originY",void 0),Ci([o.query(".ft-ripple")],Ii.prototype,"ripple",void 0),Ci([o.query(".ft-ripple--effect")],Ii.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(Ii);const ji=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ni=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Bi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Ti=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","100"),Zi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),Ai=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Fi=e.css`
|
|
276
292
|
.ft-tooltip--container {
|
|
277
293
|
display: block;
|
|
278
294
|
}
|
|
@@ -301,7 +317,7 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
301
317
|
position: relative;
|
|
302
318
|
word-break: break-word;
|
|
303
319
|
}
|
|
304
|
-
`;var
|
|
320
|
+
`;var Mi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class _i extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
305
321
|
<div part="container"
|
|
306
322
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
307
323
|
@mouseenter=${this.onHover}
|
|
@@ -319,7 +335,7 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
319
335
|
</div>
|
|
320
336
|
</div>
|
|
321
337
|
</div>
|
|
322
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,o=(t.offsetHeight-e)/2,n=(t.offsetWidth-i)/2;let s=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-e-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft-i-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=s+"px",l.top=r+"px";const a=this.tooltip.getBoundingClientRect();let p=-a.x,h=a.x+a.width-window.innerWidth;l.left=s+Math.round(this.correctOutOfWindowPixels(p,h))+"px";let f=-a.y,d=a.y+a.height-window.innerHeight;l.top=r+Math.round(this.correctOutOfWindowPixels(f,d))+"px",l.maxWidth=`max(${t.offsetWidth}px, ${Ai})`}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())}correctOutOfWindowPixels(t,i){return Math.max(t,Math.min(0,-i))}}_i.elementDefinitions={"ft-typography":ci},_i.styles=Mi
|
|
338
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,o=(t.offsetHeight-e)/2,n=(t.offsetWidth-i)/2;let s=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-e-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft-i-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=s+"px",l.top=r+"px";const a=this.tooltip.getBoundingClientRect();let p=-a.x,h=a.x+a.width-window.innerWidth;l.left=s+Math.round(this.correctOutOfWindowPixels(p,h))+"px";let f=-a.y,d=a.y+a.height-window.innerHeight;l.top=r+Math.round(this.correctOutOfWindowPixels(f,d))+"px",l.maxWidth=`max(${t.offsetWidth}px, ${Ai})`}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())}correctOutOfWindowPixels(t,i){return Math.max(t,Math.min(0,-i))}}_i.elementDefinitions={"ft-typography":ci},_i.styles=Fi,Mi([o.property()],_i.prototype,"text",void 0),Mi([o.property({type:Boolean})],_i.prototype,"manual",void 0),Mi([o.property({type:Boolean})],_i.prototype,"inline",void 0),Mi([o.property({type:Number})],_i.prototype,"delay",void 0),Mi([o.property()],_i.prototype,"position",void 0),Mi([o.queryAssignedNodes("",!0)],_i.prototype,"slotNodes",void 0),Mi([o.query(".ft-tooltip--container")],_i.prototype,"container",void 0),Mi([o.query(".ft-tooltip")],_i.prototype,"tooltip",void 0),Mi([o.query(".ft-tooltip--content")],_i.prototype,"tooltipContent",void 0),Mi([o.state()],_i.prototype,"visible",void 0),i.customElement("ft-tooltip")(_i);const Ui={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ri=e.css`
|
|
323
339
|
:host {
|
|
324
340
|
line-height: 0;
|
|
325
341
|
}
|
|
@@ -328,8 +344,8 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
328
344
|
display: inline-block;
|
|
329
345
|
position: relative;
|
|
330
346
|
|
|
331
|
-
width: ${
|
|
332
|
-
height: ${
|
|
347
|
+
width: ${Ui.size};
|
|
348
|
+
height: ${Ui.size};
|
|
333
349
|
}
|
|
334
350
|
|
|
335
351
|
.ft-loader div {
|
|
@@ -338,7 +354,7 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
338
354
|
width: 25%;
|
|
339
355
|
height: 25%;
|
|
340
356
|
border-radius: 50%;
|
|
341
|
-
background: ${
|
|
357
|
+
background: ${Ui.color};
|
|
342
358
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
343
359
|
}
|
|
344
360
|
|
|
@@ -385,7 +401,7 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
385
401
|
transform: translate(0, 0);
|
|
386
402
|
}
|
|
387
403
|
100% {
|
|
388
|
-
transform: translate(calc(0.35 * ${
|
|
404
|
+
transform: translate(calc(0.35 * ${Ui.size}), 0);
|
|
389
405
|
}
|
|
390
406
|
}
|
|
391
407
|
`;class Di extends i.FtLitElement{render(){return e.html`
|
|
@@ -395,7 +411,7 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
395
411
|
<div></div>
|
|
396
412
|
<div></div>
|
|
397
413
|
</div>
|
|
398
|
-
`}}Di.styles=
|
|
414
|
+
`}}Di.styles=Ri,i.customElement("ft-loader")(Di);const Wi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Hi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Wi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Jt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Wi),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Li=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Pi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Li,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Li)},Ki=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Gi=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Vi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),qi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Xi=[e.css`
|
|
399
415
|
:host {
|
|
400
416
|
display: inline-block;
|
|
401
417
|
max-width: 100%;
|
|
@@ -529,8 +545,8 @@ const H=Symbol.for(""),L=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
529
545
|
}
|
|
530
546
|
|
|
531
547
|
ft-loader {
|
|
532
|
-
${i.setVariable(
|
|
533
|
-
${i.setVariable(
|
|
548
|
+
${i.setVariable(Ui.size,Hi.iconSize)};
|
|
549
|
+
${i.setVariable(Ui.color,"var(--ft-button-internal-color)")};
|
|
534
550
|
}
|
|
535
551
|
`,i.noTextSelect];var Yi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ji extends i.FtLitElement{constructor(){super(...arguments),this.role="button",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.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
536
552
|
<button part="button"
|
package/build/ft-dialog.min.js
CHANGED
|
@@ -61,7 +61,7 @@ const d=window,f=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"
|
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
63
|
*/
|
|
64
|
-
var M;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:R}),(null!==(w=$.reactiveElementVersions)&&void 0!==w?w:$.reactiveElementVersions=[]).push("1.6.1");const U=window,j=U.trustedTypes,
|
|
64
|
+
var M;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:R}),(null!==(w=$.reactiveElementVersions)&&void 0!==w?w:$.reactiveElementVersions=[]).push("1.6.1");const U=window,j=U.trustedTypes,F=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,z="$lit$",B=`lit$${(Math.random()+"").slice(9)}$`,T="?"+B,A=`<${T}>`,L=document,P=()=>L.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,D=Array.isArray,_="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,H=/>/g,K=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,J=/"/g,q=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Y=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Q=new WeakMap,tt=L.createTreeWalker(L,129,null,!1),et=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=W;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,p=0;for(;p<i.length&&(r.lastIndex=p,l=r.exec(i),null!==l);)p=r.lastIndex,r===W?"!--"===l[1]?r=Z:void 0!==l[1]?r=H:void 0!==l[2]?(q.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=K):void 0!==l[3]&&(r=K):r===K?">"===l[0]?(r=null!=n?n:W,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?K:'"'===l[3]?J:V):r===J||r===V?r=K:r===Z||r===H?r=W:(r=K,n=void 0);const c=r===K&&t[e+1].startsWith("/>")?" ":"";s+=r===W?i+A:h>=0?(o.push(a),i.slice(0,h)+z+i.slice(h)+B+c):i+B+(-2===h?(o.push(void 0),e):c)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==F?F.createHTML(a):a,o]};class it{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,a=this.parts,[l,h]=et(t,e);if(this.el=it.createElement(l,i),tt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=tt.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(z)||e.startsWith(B)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+z).split(B),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?at:"?"===e[1]?ht:"@"===e[1]?pt:rt})}else a.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(q.test(o.tagName)){const t=o.textContent.split(B),e=t.length-1;if(e>0){o.textContent=j?j.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],P()),tt.nextNode(),a.push({type:2,index:++n});o.append(t[e],P())}}}else if(8===o.nodeType)if(o.data===T)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(B,t+1));)a.push({type:7,index:n}),t+=B.length-1}n++}}static createElement(t,e){const i=L.createElement("template");return i.innerHTML=t,i}}function ot(t,e,i=t,o){var n,s,r,a;if(e===Y)return e;let l=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=I(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=ot(t,l._$AS(t,e.values),l,o)),e}class nt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:L).importNode(i,!0);tt.currentNode=n;let s=tt.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new st(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new ct(s,this,t)),this._$AV.push(e),l=o[++a]}r!==(null==l?void 0:l.index)&&(s=tt.nextNode(),r++)}return n}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class st{constructor(t,e,i,o){var n;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ot(this,t,e),I(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==Y&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>D(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!==G&&I(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=it.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new nt(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=Q.get(t.strings);return void 0===e&&Q.set(t.strings,e=new it(t)),e}T(t){D(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new st(this.k(P()),this.k(P()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class rt{constructor(t,e,i,o,n){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=ot(this,t,e,0),s=!I(t)||t!==this._$AH&&t!==Y,s&&(this._$AH=t);else{const o=t;let r,a;for(t=n[0],r=0;r<n.length-1;r++)a=ot(this,o[i+r],e,r),a===Y&&(a=this._$AH[r]),s||(s=!I(a)||a!==this._$AH[r]),a===G?t=G:t!==G&&(t+=(null!=a?a:"")+n[r+1]),this._$AH[r]=a}s&&!o&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class at extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const lt=j?j.emptyScript:"";class ht extends rt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,lt):this.element.removeAttribute(this.name)}}class pt extends rt{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=ot(this,t,e,0))&&void 0!==i?i:G)===Y)return;const o=this._$AH,n=t===G&&o!==G||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==G&&(o===G||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class ct{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ot(this,t)}}const dt=U.litHtmlPolyfillSupport;null==dt||dt(it,st),(null!==(M=U.litHtmlVersions)&&void 0!==M?M:U.litHtmlVersions=[]).push("2.7.3");
|
|
65
65
|
/**
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2017 Google LLC
|
|
@@ -99,12 +99,12 @@ var ft,ut;let yt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
99
99
|
display: inline-block;
|
|
100
100
|
width: 0;
|
|
101
101
|
}
|
|
102
|
-
`;var Rt,Mt,Ut;window.ftReduxStores||(window.ftReduxStores={});const jt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ut=null===(Mt=null===(Rt=window.safari)||void 0===Rt?void 0:Rt.pushNotification)||void 0===Mt?void 0:Mt.toString())&&void 0!==Ut?Ut:""),
|
|
102
|
+
`;var Rt,Mt,Ut;window.ftReduxStores||(window.ftReduxStores={});const jt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ut=null===(Mt=null===(Rt=window.safari)||void 0===Rt?void 0:Rt.pushNotification)||void 0===Mt?void 0:Mt.toString())&&void 0!==Ut?Ut:""),Ft=Symbol.for(""),zt=t=>{if((null==t?void 0:t.r)===Ft)return null==t?void 0:t._$litStatic$},Bt=t=>({_$litStatic$:t,r:Ft}),Tt=new Map,At=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(s=i[h],n=zt(s));)l+=n+e[++h],p=!0;h!==o&&a.push(s),r.push(l),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=Tt.get(t))&&(r.raw=r,Tt.set(t,e=r)),i=a}return t(e,...i)})(X);
|
|
103
103
|
/**
|
|
104
104
|
* @license
|
|
105
105
|
* Copyright 2020 Google LLC
|
|
106
106
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
-
*/var Lt;!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"}(Lt||(Lt={}));const Pt=vt.extend("--ft-typography-font-family",bt.titleFont),It=vt.extend("--ft-typography-font-family",bt.contentFont),Dt={fontFamily:It,fontSize:vt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:vt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:vt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:vt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:vt.create("--ft-typography-text-transform","UNKNOWN","inherit")},_t=vt.extend("--ft-typography-title-font-family",Pt),Wt=vt.extend("--ft-typography-title-font-size",Dt.fontSize,"20px"),Zt=vt.extend("--ft-typography-title-font-weight",Dt.fontWeight,"normal"),Ht=vt.extend("--ft-typography-title-letter-spacing",Dt.letterSpacing,"0.15px"),Kt=vt.extend("--ft-typography-title-line-height",Dt.lineHeight,"1.2"),Vt=vt.extend("--ft-typography-title-text-transform",Dt.textTransform,"inherit"),Jt=vt.extend("--ft-typography-title-dense-font-family",Pt),qt=vt.extend("--ft-typography-title-dense-font-size",Dt.fontSize,"14px"),Xt=vt.extend("--ft-typography-title-dense-font-weight",Dt.fontWeight,"normal"),Yt=vt.extend("--ft-typography-title-dense-letter-spacing",Dt.letterSpacing,"0.105px"),Gt=vt.extend("--ft-typography-title-dense-line-height",Dt.lineHeight,"1.7"),Qt=vt.extend("--ft-typography-title-dense-text-transform",Dt.textTransform,"inherit"),te=vt.extend("--ft-typography-subtitle1-font-family",It),ee=vt.extend("--ft-typography-subtitle1-font-size",Dt.fontSize,"16px"),ie=vt.extend("--ft-typography-subtitle1-font-weight",Dt.fontWeight,"600"),oe=vt.extend("--ft-typography-subtitle1-letter-spacing",Dt.letterSpacing,"0.144px"),ne=vt.extend("--ft-typography-subtitle1-line-height",Dt.lineHeight,"1.5"),se=vt.extend("--ft-typography-subtitle1-text-transform",Dt.textTransform,"inherit"),re=vt.extend("--ft-typography-subtitle2-font-family",It),ae=vt.extend("--ft-typography-subtitle2-font-size",Dt.fontSize,"14px"),le=vt.extend("--ft-typography-subtitle2-font-weight",Dt.fontWeight,"normal"),he=vt.extend("--ft-typography-subtitle2-letter-spacing",Dt.letterSpacing,"0.098px"),pe=vt.extend("--ft-typography-subtitle2-line-height",Dt.lineHeight,"1.7"),ce=vt.extend("--ft-typography-subtitle2-text-transform",Dt.textTransform,"inherit"),de=vt.extend("--ft-typography-body1-font-family",It),fe=vt.extend("--ft-typography-body1-font-size",Dt.fontSize,"16px"),ue=vt.extend("--ft-typography-body1-font-weight",Dt.fontWeight,"normal"),ye=vt.extend("--ft-typography-body1-letter-spacing",Dt.letterSpacing,"0.496px"),xe=vt.extend("--ft-typography-body1-line-height",Dt.lineHeight,"1.5"),ve=vt.extend("--ft-typography-body1-text-transform",Dt.textTransform,"inherit"),ge=vt.extend("--ft-typography-body2-font-family",It),be=vt.extend("--ft-typography-body2-font-size",Dt.fontSize,"14px"),me=vt.extend("--ft-typography-body2-font-weight",Dt.fontWeight,"normal"),we=vt.extend("--ft-typography-body2-letter-spacing",Dt.letterSpacing,"0.252px"),$e=vt.extend("--ft-typography-body2-line-height",Dt.lineHeight,"1.4"),Oe=vt.extend("--ft-typography-body2-text-transform",Dt.textTransform,"inherit"),Se=vt.extend("--ft-typography-caption-font-family",It),ke=vt.extend("--ft-typography-caption-font-size",Dt.fontSize,"12px"),Ee=vt.extend("--ft-typography-caption-font-weight",Dt.fontWeight,"normal"),Ce=vt.extend("--ft-typography-caption-letter-spacing",Dt.letterSpacing,"0.396px"),Ne=vt.extend("--ft-typography-caption-line-height",Dt.lineHeight,"1.33"),Re=vt.extend("--ft-typography-caption-text-transform",Dt.textTransform,"inherit"),Me=vt.extend("--ft-typography-breadcrumb-font-family",It),Ue=vt.extend("--ft-typography-breadcrumb-font-size",Dt.fontSize,"10px"),je=vt.extend("--ft-typography-breadcrumb-font-weight",Dt.fontWeight,"normal"),
|
|
107
|
+
*/var Lt;!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"}(Lt||(Lt={}));const Pt=vt.extend("--ft-typography-font-family",bt.titleFont),It=vt.extend("--ft-typography-font-family",bt.contentFont),Dt={fontFamily:It,fontSize:vt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:vt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:vt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:vt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:vt.create("--ft-typography-text-transform","UNKNOWN","inherit")},_t=vt.extend("--ft-typography-title-font-family",Pt),Wt=vt.extend("--ft-typography-title-font-size",Dt.fontSize,"20px"),Zt=vt.extend("--ft-typography-title-font-weight",Dt.fontWeight,"normal"),Ht=vt.extend("--ft-typography-title-letter-spacing",Dt.letterSpacing,"0.15px"),Kt=vt.extend("--ft-typography-title-line-height",Dt.lineHeight,"1.2"),Vt=vt.extend("--ft-typography-title-text-transform",Dt.textTransform,"inherit"),Jt=vt.extend("--ft-typography-title-dense-font-family",Pt),qt=vt.extend("--ft-typography-title-dense-font-size",Dt.fontSize,"14px"),Xt=vt.extend("--ft-typography-title-dense-font-weight",Dt.fontWeight,"normal"),Yt=vt.extend("--ft-typography-title-dense-letter-spacing",Dt.letterSpacing,"0.105px"),Gt=vt.extend("--ft-typography-title-dense-line-height",Dt.lineHeight,"1.7"),Qt=vt.extend("--ft-typography-title-dense-text-transform",Dt.textTransform,"inherit"),te=vt.extend("--ft-typography-subtitle1-font-family",It),ee=vt.extend("--ft-typography-subtitle1-font-size",Dt.fontSize,"16px"),ie=vt.extend("--ft-typography-subtitle1-font-weight",Dt.fontWeight,"600"),oe=vt.extend("--ft-typography-subtitle1-letter-spacing",Dt.letterSpacing,"0.144px"),ne=vt.extend("--ft-typography-subtitle1-line-height",Dt.lineHeight,"1.5"),se=vt.extend("--ft-typography-subtitle1-text-transform",Dt.textTransform,"inherit"),re=vt.extend("--ft-typography-subtitle2-font-family",It),ae=vt.extend("--ft-typography-subtitle2-font-size",Dt.fontSize,"14px"),le=vt.extend("--ft-typography-subtitle2-font-weight",Dt.fontWeight,"normal"),he=vt.extend("--ft-typography-subtitle2-letter-spacing",Dt.letterSpacing,"0.098px"),pe=vt.extend("--ft-typography-subtitle2-line-height",Dt.lineHeight,"1.7"),ce=vt.extend("--ft-typography-subtitle2-text-transform",Dt.textTransform,"inherit"),de=vt.extend("--ft-typography-body1-font-family",It),fe=vt.extend("--ft-typography-body1-font-size",Dt.fontSize,"16px"),ue=vt.extend("--ft-typography-body1-font-weight",Dt.fontWeight,"normal"),ye=vt.extend("--ft-typography-body1-letter-spacing",Dt.letterSpacing,"0.496px"),xe=vt.extend("--ft-typography-body1-line-height",Dt.lineHeight,"1.5"),ve=vt.extend("--ft-typography-body1-text-transform",Dt.textTransform,"inherit"),ge=vt.extend("--ft-typography-body2-font-family",It),be=vt.extend("--ft-typography-body2-font-size",Dt.fontSize,"14px"),me=vt.extend("--ft-typography-body2-font-weight",Dt.fontWeight,"normal"),we=vt.extend("--ft-typography-body2-letter-spacing",Dt.letterSpacing,"0.252px"),$e=vt.extend("--ft-typography-body2-line-height",Dt.lineHeight,"1.4"),Oe=vt.extend("--ft-typography-body2-text-transform",Dt.textTransform,"inherit"),Se=vt.extend("--ft-typography-caption-font-family",It),ke=vt.extend("--ft-typography-caption-font-size",Dt.fontSize,"12px"),Ee=vt.extend("--ft-typography-caption-font-weight",Dt.fontWeight,"normal"),Ce=vt.extend("--ft-typography-caption-letter-spacing",Dt.letterSpacing,"0.396px"),Ne=vt.extend("--ft-typography-caption-line-height",Dt.lineHeight,"1.33"),Re=vt.extend("--ft-typography-caption-text-transform",Dt.textTransform,"inherit"),Me=vt.extend("--ft-typography-breadcrumb-font-family",It),Ue=vt.extend("--ft-typography-breadcrumb-font-size",Dt.fontSize,"10px"),je=vt.extend("--ft-typography-breadcrumb-font-weight",Dt.fontWeight,"normal"),Fe=vt.extend("--ft-typography-breadcrumb-letter-spacing",Dt.letterSpacing,"0.33px"),ze=vt.extend("--ft-typography-breadcrumb-line-height",Dt.lineHeight,"1.6"),Be=vt.extend("--ft-typography-breadcrumb-text-transform",Dt.textTransform,"inherit"),Te=vt.extend("--ft-typography-overline-font-family",It),Ae=vt.extend("--ft-typography-overline-font-size",Dt.fontSize,"10px"),Le=vt.extend("--ft-typography-overline-font-weight",Dt.fontWeight,"normal"),Pe=vt.extend("--ft-typography-overline-letter-spacing",Dt.letterSpacing,"1.5px"),Ie=vt.extend("--ft-typography-overline-line-height",Dt.lineHeight,"1.6"),De=vt.extend("--ft-typography-overline-text-transform",Dt.textTransform,"uppercase"),_e={fontFamily:vt.extend("--ft-typography-button-font-family",It),fontSize:vt.extend("--ft-typography-button-font-size",Dt.fontSize,"14px"),fontWeight:vt.extend("--ft-typography-button-font-weight",Dt.fontWeight,"600"),letterSpacing:vt.extend("--ft-typography-button-letter-spacing",Dt.letterSpacing,"1.246px"),lineHeight:vt.extend("--ft-typography-button-line-height",Dt.lineHeight,"1.15"),textTransform:vt.extend("--ft-typography-button-text-transform",Dt.textTransform,"uppercase")},We=g`
|
|
108
108
|
.ft-typography--title {
|
|
109
109
|
font-family: ${_t};
|
|
110
110
|
font-size: ${Wt};
|
|
@@ -173,8 +173,8 @@ var ft,ut;let yt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
173
173
|
font-family: ${Me};
|
|
174
174
|
font-size: ${Ue};
|
|
175
175
|
font-weight: ${je};
|
|
176
|
-
letter-spacing: ${
|
|
177
|
-
line-height: ${
|
|
176
|
+
letter-spacing: ${Fe};
|
|
177
|
+
line-height: ${ze};
|
|
178
178
|
text-transform: ${Be};
|
|
179
179
|
}
|
|
180
180
|
`,Ye=g`
|
|
@@ -298,6 +298,30 @@ const yi=ni(class extends si{constructor(t){var e;if(super(t),t.type!==ii||"clas
|
|
|
298
298
|
opacity: 0;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
+
.ft-ripple .ft-ripple--effect {
|
|
302
|
+
aspect-ratio: 1;
|
|
303
|
+
width: auto;
|
|
304
|
+
height: auto;
|
|
305
|
+
min-width: 170%;
|
|
306
|
+
min-height: 170%;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.ft-ripple .ft-ripple--background{
|
|
310
|
+
width: 100%;
|
|
311
|
+
height: 100%;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
315
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
316
|
+
aspect-ratio: 1;
|
|
317
|
+
width: auto;
|
|
318
|
+
height: auto;
|
|
319
|
+
max-width: unset;
|
|
320
|
+
max-height: unset;
|
|
321
|
+
min-width: 100%;
|
|
322
|
+
min-height: 100%;
|
|
323
|
+
}
|
|
324
|
+
|
|
301
325
|
.ft-ripple .ft-ripple--background {
|
|
302
326
|
background-color: ${vi.backgroundColor};
|
|
303
327
|
}
|
|
@@ -325,8 +349,6 @@ const yi=ni(class extends si{constructor(t){var e;if(super(t),t.type!==ii||"clas
|
|
|
325
349
|
.ft-ripple .ft-ripple--background {
|
|
326
350
|
top: 0;
|
|
327
351
|
left: 0;
|
|
328
|
-
height: 100%;
|
|
329
|
-
width: 100%;
|
|
330
352
|
transition: opacity 75ms linear;
|
|
331
353
|
}
|
|
332
354
|
|
|
@@ -366,14 +388,8 @@ const yi=ni(class extends si{constructor(t){var e;if(super(t),t.type!==ii||"clas
|
|
|
366
388
|
opacity: ${vi.opacityContentOnSurfacePressed};
|
|
367
389
|
transform: translate(-50%, -50%) scale(1);
|
|
368
390
|
}
|
|
369
|
-
`;var ki=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ei extends Et{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.
|
|
391
|
+
`;var ki=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ei extends Et{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.originX=0,this.originY=0,this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-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.isFocusVisible(null==t?void 0:t.target)&&!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 X`
|
|
370
392
|
<style>
|
|
371
|
-
.ft-ripple .ft-ripple--effect,
|
|
372
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
373
|
-
width: ${this.rippleSize}px;
|
|
374
|
-
height: ${this.rippleSize}px;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
393
|
.ft-ripple .ft-ripple--effect {
|
|
378
394
|
left: ${this.originX}px;
|
|
379
395
|
top: ${this.originY}px;
|
|
@@ -383,7 +399,7 @@ const yi=ni(class extends si{constructor(t){var e;if(super(t),t.type!==ii||"clas
|
|
|
383
399
|
<div class="ft-ripple--background"></div>
|
|
384
400
|
<div class="ft-ripple--effect"></div>
|
|
385
401
|
</div>
|
|
386
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.
|
|
402
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Ei.elementDefinitions={},Ei.styles=Si,ki([o({type:Boolean})],Ei.prototype,"primary",void 0),ki([o({type:Boolean})],Ei.prototype,"secondary",void 0),ki([o({type:Boolean})],Ei.prototype,"unbounded",void 0),ki([o({type:Boolean})],Ei.prototype,"activated",void 0),ki([o({type:Boolean})],Ei.prototype,"selected",void 0),ki([o({type:Boolean})],Ei.prototype,"disabled",void 0),ki([n()],Ei.prototype,"hovered",void 0),ki([n()],Ei.prototype,"focused",void 0),ki([n()],Ei.prototype,"pressed",void 0),ki([n()],Ei.prototype,"rippling",void 0),ki([n()],Ei.prototype,"originX",void 0),ki([n()],Ei.prototype,"originY",void 0),ki([r(".ft-ripple")],Ei.prototype,"ripple",void 0),ki([r(".ft-ripple--effect")],Ei.prototype,"rippleEffect",void 0),c("ft-ripple")(Ei);const Ci=vt.create("--ft-tooltip-distance","SIZE","4px"),Ni=vt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ri=vt.create("--ft-tooltip-background-color","COLOR","#666666"),Mi=vt.create("--ft-tooltip-z-index","NUMBER","100"),Ui=vt.external(bt.borderRadiusS,"Design system"),ji=vt.create("--ft-tooltip-max-width","SIZE","150px"),Fi=g`
|
|
387
403
|
.ft-tooltip--container {
|
|
388
404
|
display: block;
|
|
389
405
|
}
|
|
@@ -412,7 +428,7 @@ const yi=ni(class extends si{constructor(t){var e;if(super(t),t.type!==ii||"clas
|
|
|
412
428
|
position: relative;
|
|
413
429
|
word-break: break-word;
|
|
414
430
|
}
|
|
415
|
-
`;var
|
|
431
|
+
`;var zi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Bi extends Et{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return X`
|
|
416
432
|
<div part="container"
|
|
417
433
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
418
434
|
@mouseenter=${this.onHover}
|
|
@@ -430,7 +446,7 @@ const yi=ni(class extends si{constructor(t){var e;if(super(t),t.type!==ii||"clas
|
|
|
430
446
|
</div>
|
|
431
447
|
</div>
|
|
432
448
|
</div>
|
|
433
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,n=(t.offsetWidth-e)/2;let s=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-i-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=s+"px",a.top=r+"px";const l=this.tooltip.getBoundingClientRect();let h=-l.x,p=l.x+l.width-window.innerWidth;a.left=s+Math.round(this.correctOutOfWindowPixels(h,p))+"px";let c=-l.y,d=l.y+l.height-window.innerHeight;a.top=r+Math.round(this.correctOutOfWindowPixels(c,d))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${ji})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Bi.elementDefinitions={"ft-typography":ei},Bi.styles=zi
|
|
449
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,n=(t.offsetWidth-e)/2;let s=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-i-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=s+"px",a.top=r+"px";const l=this.tooltip.getBoundingClientRect();let h=-l.x,p=l.x+l.width-window.innerWidth;a.left=s+Math.round(this.correctOutOfWindowPixels(h,p))+"px";let c=-l.y,d=l.y+l.height-window.innerHeight;a.top=r+Math.round(this.correctOutOfWindowPixels(c,d))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${ji})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Bi.elementDefinitions={"ft-typography":ei},Bi.styles=Fi,zi([o()],Bi.prototype,"text",void 0),zi([o({type:Boolean})],Bi.prototype,"manual",void 0),zi([o({type:Boolean})],Bi.prototype,"inline",void 0),zi([o({type:Number})],Bi.prototype,"delay",void 0),zi([o()],Bi.prototype,"position",void 0),zi([function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?h({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Bi.prototype,"slotNodes",void 0),zi([r(".ft-tooltip--container")],Bi.prototype,"container",void 0),zi([r(".ft-tooltip")],Bi.prototype,"tooltip",void 0),zi([r(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),zi([n()],Bi.prototype,"visible",void 0),c("ft-tooltip")(Bi);const Ti={color:vt.extend("--ft-loader-color",bt.colorPrimary),size:vt.create("--ft-loader-size","SIZE","80px")},Ai=g`
|
|
434
450
|
:host {
|
|
435
451
|
line-height: 0;
|
|
436
452
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-dialog",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.57",
|
|
4
4
|
"description": "A simple dialog component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "1.0.
|
|
23
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
24
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
25
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-button": "1.0.57",
|
|
23
|
+
"@fluid-topics/ft-icon": "1.0.57",
|
|
24
|
+
"@fluid-topics/ft-typography": "1.0.57",
|
|
25
|
+
"@fluid-topics/ft-wc-utils": "1.0.57",
|
|
26
26
|
"lit": "2.7.2"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "f4480503246fb16f02f9e0265e15b7e53e09a23a"
|
|
29
29
|
}
|