@fluid-topics/ft-modal 1.3.34 → 1.3.36
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-modal.light.js +25 -28
- package/build/ft-modal.min.js +44 -47
- package/build/ft-modal.styles.js +2 -5
- package/package.json +4 -4
package/build/ft-modal.light.js
CHANGED
|
@@ -85,7 +85,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
85
85
|
display: flex;
|
|
86
86
|
gap: ${Do.foundation.spacing3}
|
|
87
87
|
}
|
|
88
|
-
`];var ln=O(P());var vr=O(re()),ss=O(P());var ti=O(H()),D=O(P());var Pa=O(H()),
|
|
88
|
+
`];var ln=O(P());var vr=O(re()),ss=O(P());var ti=O(H()),D=O(P());var Pa=O(H()),Y=O(P()),Na=Y.FtCssVariableFactory.extend("--ft-ripple-color","",Y.designSystemVariables.colorContent),E={color:Na,backgroundColor:Y.FtCssVariableFactory.extend("--ft-ripple-background-color","",Na),opacityContentOnSurfacePressed:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:Y.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ta=Y.FtCssVariableFactory.extend("--ft-ripple-color","",Y.designSystemVariables.colorPrimary),La={color:Ta,backgroundColor:Y.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ta)},Ia=Y.FtCssVariableFactory.extend("--ft-ripple-color","",Y.designSystemVariables.colorSecondary),_a={color:Ia,backgroundColor:Y.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ia)},ka=Pa.css`
|
|
89
89
|
:host {
|
|
90
90
|
display: contents;
|
|
91
91
|
}
|
|
@@ -569,7 +569,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
569
569
|
</div>
|
|
570
570
|
`}contentAvailableCallback(r){super.contentAvailableCallback(r),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(r){var o,n;super.update(r),r.has("disabled")&&(this.disabled?(this.endRipple(),(o=this.target)===null||o===void 0||o.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.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 r,o;let n=(r=this.shadowRoot)===null||r===void 0?void 0:r.host.parentElement;n&&this.setupFor((o=this.target)!==null&&o!==void 0?o:n)}forceFocusUpdate(){var r;!((r=this.target)===null||r===void 0)&&r.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(r){if(this.setupDebouncer.cancel(),this.target===r)return;this.onDisconnect&&this.onDisconnect(),this.target=r,r.setAttribute("data-is-ft-ripple-target","true");let o=(...l)=>u=>{l.forEach(p=>window.addEventListener(p,this.endPress,{once:!0})),this.startPress(u)},n=o("mouseup","contextmenu"),a=o("touchend","touchcancel"),i=l=>{["Enter"," "].includes(l.key)&&o("keyup")(l)},c={passive:!0};r.addEventListener("mouseover",this.startHover,c),r.addEventListener("mousemove",this.moveRipple,c),r.addEventListener("mouseleave",this.endHover,c),r.addEventListener("mousedown",n,c),r.addEventListener("touchstart",a,c),r.addEventListener("touchmove",this.moveRipple,c),r.addEventListener("keydown",i,c),r.addEventListener("focus",this.startFocus,c),r.addEventListener("blur",this.endFocus,c),r.addEventListener("focusin",this.startFocus,c),r.addEventListener("focusout",this.endFocus,c),this.onDisconnect=()=>{r.removeAttribute("data-is-ft-ripple-target"),r.removeEventListener("mouseover",this.startHover,c),r.removeEventListener("mousemove",this.moveRipple,c),r.removeEventListener("mouseleave",this.endHover,c),r.removeEventListener("mousedown",n,c),r.removeEventListener("touchstart",a,c),r.removeEventListener("touchmove",this.moveRipple,c),r.removeEventListener("keydown",i,c),r.removeEventListener("focus",this.startFocus,c),r.removeEventListener("blur",this.endFocus,c),r.removeEventListener("focusin",this.startFocus,c),r.removeEventListener("focusout",this.endFocus,c),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(r){let o=r,n=r,a,i;return o.x!=null?{x:a,y:i}=o:n.touches!=null&&(a=n.touches[0].clientX,i=n.touches[0].clientY),{x:a,y:i}}isFocusVisible(r){return r instanceof HTMLElement?r.matches(":focus-visible"):!0}isIgnored(r){if(this.disabled)return!0;if(r!=null)for(let o of r.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Z.elementDefinitions={};Z.styles=ka;ge([(0,se.property)({type:Boolean})],Z.prototype,"primary",void 0);ge([(0,se.property)({type:Boolean})],Z.prototype,"secondary",void 0);ge([(0,se.property)({type:Boolean})],Z.prototype,"unbounded",void 0);ge([(0,se.property)({type:Boolean})],Z.prototype,"activated",void 0);ge([(0,se.property)({type:Boolean})],Z.prototype,"selected",void 0);ge([(0,se.property)({type:Boolean})],Z.prototype,"disabled",void 0);ge([(0,se.state)()],Z.prototype,"hovered",void 0);ge([(0,se.state)()],Z.prototype,"focused",void 0);ge([(0,se.state)()],Z.prototype,"pressed",void 0);ge([(0,se.state)()],Z.prototype,"rippling",void 0);ge([(0,se.state)()],Z.prototype,"originX",void 0);ge([(0,se.state)()],Z.prototype,"originY",void 0);ge([(0,se.query)(".ft-ripple")],Z.prototype,"ripple",void 0);ge([(0,se.query)(".ft-ripple--effect")],Z.prototype,"rippleEffect",void 0);(0,ai.customElement)("ft-ripple")(Z);var Ji=O(P());var Xi=O(H()),Se=O(re()),xe=O(P());var Ci=O(P());var zo=globalThis,$r=zo.trustedTypes,ii=$r?$r.createPolicy("lit-html",{createHTML:e=>e}):void 0,pi="$lit$",nt=`lit$${Math.random().toFixed(9).slice(2)}$`,fi="?"+nt,yl=`<${fi}>`,xt=document,Fr=()=>xt.createComment(""),ur=e=>e===null||typeof e!="object"&&typeof e!="function",Go=Array.isArray,ml=e=>Go(e)||typeof e?.[Symbol.iterator]=="function",Mo=`[
|
|
571
571
|
\f\r]`,dr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,si=/-->/g,ci=/>/g,gt=RegExp(`>|${Mo}(?:([^\\s"'>=/]+)(${Mo}*=${Mo}*(?:[^
|
|
572
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),li=/'/g,di=/"/g,hi=/^(?:script|style|textarea|title)$/i,jo=e=>(r,...o)=>({_$litType$:e,strings:r,values:o}),yi=jo(1),mi=jo(2),gi=jo(3),pr=Symbol.for("lit-noChange"),
|
|
572
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),li=/'/g,di=/"/g,hi=/^(?:script|style|textarea|title)$/i,jo=e=>(r,...o)=>({_$litType$:e,strings:r,values:o}),yi=jo(1),mi=jo(2),gi=jo(3),pr=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),ui=new WeakMap,bt=xt.createTreeWalker(xt,129);function bi(e,r){if(!Go(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ii!==void 0?ii.createHTML(r):r}var gl=(e,r)=>{let o=e.length-1,n=[],a,i=r===2?"<svg>":r===3?"<math>":"",c=dr;for(let l=0;l<o;l++){let u=e[l],p,m,h=-1,g=0;for(;g<u.length&&(c.lastIndex=g,m=c.exec(u),m!==null);)g=c.lastIndex,c===dr?m[1]==="!--"?c=si:m[1]!==void 0?c=ci:m[2]!==void 0?(hi.test(m[2])&&(a=RegExp("</"+m[2],"g")),c=gt):m[3]!==void 0&&(c=gt):c===gt?m[0]===">"?(c=a??dr,h=-1):m[1]===void 0?h=-2:(h=c.lastIndex-m[2].length,p=m[1],c=m[3]===void 0?gt:m[3]==='"'?di:li):c===di||c===li?c=gt:c===si||c===ci?c=dr:(c=gt,a=void 0);let v=c===gt&&e[l+1].startsWith("/>")?" ":"";i+=c===dr?u+yl:h>=0?(n.push(p),u.slice(0,h)+pi+u.slice(h)+nt+v):u+nt+(h===-2?l:v)}return[bi(e,i+(e[o]||"<?>")+(r===2?"</svg>":r===3?"</math>":"")),n]},fr=class e{constructor({strings:r,_$litType$:o},n){let a;this.parts=[];let i=0,c=0,l=r.length-1,u=this.parts,[p,m]=gl(r,o);if(this.el=e.createElement(p,n),bt.currentNode=this.el.content,o===2||o===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(a=bt.nextNode())!==null&&u.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let h of a.getAttributeNames())if(h.endsWith(pi)){let g=m[c++],v=a.getAttribute(h).split(nt),x=/([.?@])?(.*)/.exec(g);u.push({type:1,index:i,name:x[2],strings:v,ctor:x[1]==="."?$o:x[1]==="?"?Fo:x[1]==="@"?Ho:zt}),a.removeAttribute(h)}else h.startsWith(nt)&&(u.push({type:6,index:i}),a.removeAttribute(h));if(hi.test(a.tagName)){let h=a.textContent.split(nt),g=h.length-1;if(g>0){a.textContent=$r?$r.emptyScript:"";for(let v=0;v<g;v++)a.append(h[v],Fr()),bt.nextNode(),u.push({type:2,index:++i});a.append(h[g],Fr())}}}else if(a.nodeType===8)if(a.data===fi)u.push({type:2,index:i});else{let h=-1;for(;(h=a.data.indexOf(nt,h+1))!==-1;)u.push({type:7,index:i}),h+=nt.length-1}i++}}static createElement(r,o){let n=xt.createElement("template");return n.innerHTML=r,n}};function Wt(e,r,o=e,n){if(r===pr)return r;let a=n!==void 0?o._$Co?.[n]:o._$Cl,i=ur(r)?void 0:r._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(e),a._$AT(e,o,n)),n!==void 0?(o._$Co??=[])[n]=a:o._$Cl=a),a!==void 0&&(r=Wt(e,a._$AS(e,r.values),a,n)),r}var Uo=class{constructor(r,o){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){let{el:{content:o},parts:n}=this._$AD,a=(r?.creationScope??xt).importNode(o,!0);bt.currentNode=a;let i=bt.nextNode(),c=0,l=0,u=n[0];for(;u!==void 0;){if(c===u.index){let p;u.type===2?p=new Hr(i,i.nextSibling,this,r):u.type===1?p=new u.ctor(i,u.name,u.strings,this,r):u.type===6&&(p=new Wo(i,this,r)),this._$AV.push(p),u=n[++l]}c!==u?.index&&(i=bt.nextNode(),c++)}return bt.currentNode=xt,a}p(r){let o=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(r,n,o),o+=n.strings.length-2):n._$AI(r[o])),o++}},Hr=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(r,o,n,a){this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=r,this._$AB=o,this._$AM=n,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let r=this._$AA.parentNode,o=this._$AM;return o!==void 0&&r?.nodeType===11&&(r=o.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,o=this){r=Wt(this,r,o),ur(r)?r===X||r==null||r===""?(this._$AH!==X&&this._$AR(),this._$AH=X):r!==this._$AH&&r!==pr&&this._(r):r._$litType$!==void 0?this.$(r):r.nodeType!==void 0?this.T(r):ml(r)?this.k(r):this._(r)}O(r){return this._$AA.parentNode.insertBefore(r,this._$AB)}T(r){this._$AH!==r&&(this._$AR(),this._$AH=this.O(r))}_(r){this._$AH!==X&&ur(this._$AH)?this._$AA.nextSibling.data=r:this.T(xt.createTextNode(r)),this._$AH=r}$(r){let{values:o,_$litType$:n}=r,a=typeof n=="number"?this._$AC(r):(n.el===void 0&&(n.el=fr.createElement(bi(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(o);else{let i=new Uo(a,this),c=i.u(this.options);i.p(o),this.T(c),this._$AH=i}}_$AC(r){let o=ui.get(r.strings);return o===void 0&&ui.set(r.strings,o=new fr(r)),o}k(r){Go(this._$AH)||(this._$AH=[],this._$AR());let o=this._$AH,n,a=0;for(let i of r)a===o.length?o.push(n=new e(this.O(Fr()),this.O(Fr()),this,this.options)):n=o[a],n._$AI(i),a++;a<o.length&&(this._$AR(n&&n._$AB.nextSibling,a),o.length=a)}_$AR(r=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);r&&r!==this._$AB;){let n=r.nextSibling;r.remove(),r=n}}setConnected(r){this._$AM===void 0&&(this._$Cv=r,this._$AP?.(r))}},zt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(r,o,n,a,i){this.type=1,this._$AH=X,this._$AN=void 0,this.element=r,this.name=o,this._$AM=a,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=X}_$AI(r,o=this,n,a){let i=this.strings,c=!1;if(i===void 0)r=Wt(this,r,o,0),c=!ur(r)||r!==this._$AH&&r!==pr,c&&(this._$AH=r);else{let l=r,u,p;for(r=i[0],u=0;u<i.length-1;u++)p=Wt(this,l[n+u],o,u),p===pr&&(p=this._$AH[u]),c||=!ur(p)||p!==this._$AH[u],p===X?r=X:r!==X&&(r+=(p??"")+i[u+1]),this._$AH[u]=p}c&&!a&&this.j(r)}j(r){r===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,r??"")}},$o=class extends zt{constructor(){super(...arguments),this.type=3}j(r){this.element[this.name]=r===X?void 0:r}},Fo=class extends zt{constructor(){super(...arguments),this.type=4}j(r){this.element.toggleAttribute(this.name,!!r&&r!==X)}},Ho=class extends zt{constructor(r,o,n,a,i){super(r,o,n,a,i),this.type=5}_$AI(r,o=this){if((r=Wt(this,r,o,0)??X)===pr)return;let n=this._$AH,a=r===X&&n!==X||r.capture!==n.capture||r.once!==n.once||r.passive!==n.passive,i=r!==X&&(n===X||a);a&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,r),this._$AH=r}handleEvent(r){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,r):this._$AH.handleEvent(r)}},Wo=class{constructor(r,o,n){this.element=r,this.type=6,this._$AN=void 0,this._$AM=o,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(r){Wt(this,r)}};var bl=zo.litHtmlPolyfillSupport;bl?.(fr,Hr),(zo.litHtmlVersions??=[]).push("3.3.0");var vi=Symbol.for(""),xl=e=>{if(e?.r===vi)return e?._$litStatic$},Ko=e=>({_$litStatic$:e,r:vi});var xi=new Map,Vo=e=>(r,...o)=>{let n=o.length,a,i,c=[],l=[],u,p=0,m=!1;for(;p<n;){for(u=r[p];p<n&&(i=o[p],(a=xl(i))!==void 0);)u+=a+r[++p],m=!0;p!==n&&l.push(i),c.push(u),p++}if(p===n&&c.push(r[n]),m){let h=c.join("$$lit$$");(r=xi.get(h))===void 0&&(c.raw=c,xi.set(h,r=c)),o=l}return e(r,...o)},Zo=Vo(yi),Ty=Vo(mi),Ly=Vo(gi);var qo=O(re()),Oi=O(P());var ue;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button",e.display="display",e.title1="title-1",e.title2="title-2",e.title3="title-3",e.body1regular="body-1-regular",e.body1medium="body-1-medium",e.body1semibold="body-1-semibold",e.body2regular="body-2-regular",e.body2medium="body-2-medium",e.body2semibold="body-2-semibold",e.label1medium="label-1-medium",e.label1semibold="label-1-semibold",e.label1bold="label-1-bold",e.label2medium="label-2-medium",e.label2semibold="label-2-semibold",e.label2bold="label-2-bold",e.caption1medium="caption-1-medium",e.caption1semibold="caption-1-semibold",e.caption1bold="caption-1-bold",e.caption2medium="caption-2-medium",e.caption2semibold="caption-2-semibold",e.caption2bold="caption-2-bold"})(ue||(ue={}));var Si=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},ce=class extends Oi.FtLitElement{constructor(){super(...arguments),this.variant=ue.body1}render(){return this.element?Zo`
|
|
573
573
|
<${Ko(this.element)}
|
|
574
574
|
part="text"
|
|
575
575
|
class="ft-typography ft-typography--${this.variant}">
|
|
@@ -631,7 +631,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
631
631
|
<div></div>
|
|
632
632
|
<div></div>
|
|
633
633
|
</div>
|
|
634
|
-
`}};Ot.styles=Ya;(0,is.customElement)("ft-loader")(Ot);var st=O(H()),cn=O(sr()),
|
|
634
|
+
`}};Ot.styles=Ya;(0,is.customElement)("ft-loader")(Ot);var st=O(H()),cn=O(sr()),J=O(re());var Zr=e=>e??X;var ne=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},W=class extends(0,ct.toFtFormComponent)(ct.FtLitElement){get buttonClasses(){return{}}get typographyVariant(){return""}constructor(){super(),this.href=void 0,this.target=void 0,this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.addEventListener("click",r=>{var o;this.isDisabled()?(r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation()):this.type=="submit"&&((o=this.form)===null||o===void 0||o.requestSubmit())})}render(){var r,o,n;let a=st.html`
|
|
635
635
|
<ft-ripple part="ripple"
|
|
636
636
|
?disabled=${this.isDisabled()}
|
|
637
637
|
?activated=${this.activated}
|
|
@@ -672,7 +672,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
672
672
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
673
673
|
`:st.html`
|
|
674
674
|
<slot part="icon" name="icon"></slot>
|
|
675
|
-
`}focus(){var r;(r=this.button)===null||r===void 0||r.focus()}showTooltip(){var r;(r=this.tooltip)===null||r===void 0||r.show()}showTemporaryTooltip(r,o){var n;return(n=this.tooltip)===null||n===void 0?void 0:n.showTemporaryText(r,o)}setTooltipManual(r){this.tooltip&&(this.tooltip.manual=r)}click(){var r;(r=this.button)===null||r===void 0||r.click()}getLabel(){return this.label||this.textContent}get textContent(){return(0,ct.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};W.elementDefinitions={"ft-ripple":Z,"ft-tooltip":Q,"ft-typography":ce,"ft-icon":le,"ft-loader":Ot};ne([(0,
|
|
675
|
+
`}focus(){var r;(r=this.button)===null||r===void 0||r.focus()}showTooltip(){var r;(r=this.tooltip)===null||r===void 0||r.show()}showTemporaryTooltip(r,o){var n;return(n=this.tooltip)===null||n===void 0?void 0:n.showTemporaryText(r,o)}setTooltipManual(r){this.tooltip&&(this.tooltip.manual=r)}click(){var r;(r=this.button)===null||r===void 0||r.click()}getLabel(){return this.label||this.textContent}get textContent(){return(0,ct.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};W.elementDefinitions={"ft-ripple":Z,"ft-tooltip":Q,"ft-typography":ce,"ft-icon":le,"ft-loader":Ot};ne([(0,J.property)()],W.prototype,"href",void 0);ne([(0,J.property)()],W.prototype,"target",void 0);ne([(0,J.property)()],W.prototype,"type",void 0);ne([(0,J.property)({type:Boolean})],W.prototype,"disabled",void 0);ne([(0,J.property)()],W.prototype,"label",void 0);ne([(0,J.property)()],W.prototype,"icon",void 0);ne([(0,J.property)()],W.prototype,"iconVariant",void 0);ne([(0,J.property)({type:Boolean})],W.prototype,"trailingIcon",void 0);ne([(0,J.property)({type:Boolean})],W.prototype,"loading",void 0);ne([(0,J.property)({attribute:"aria-label"})],W.prototype,"ariaLabel",void 0);ne([(0,J.property)()],W.prototype,"ariaHasPopup",void 0);ne([(0,J.property)()],W.prototype,"tooltipPosition",void 0);ne([(0,J.property)({type:Boolean})],W.prototype,"hideTooltip",void 0);ne([(0,J.property)({type:Boolean})],W.prototype,"forceTooltip",void 0);ne([(0,J.property)({type:Boolean})],W.prototype,"activated",void 0);ne([(0,J.query)(".ft-button")],W.prototype,"button",void 0);ne([(0,J.query)(".ft-button--label slot")],W.prototype,"slottedContent",void 0);ne([(0,J.query)("[part=tooltip]")],W.prototype,"tooltip",void 0);var qr=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},De=class extends W{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"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}}get typographyVariant(){return"button"}};De.styles=[ss.safariEllipsisFix,ri];qr([(0,vr.property)({type:Boolean})],De.prototype,"primary",void 0);qr([(0,vr.property)({type:Boolean})],De.prototype,"outlined",void 0);qr([(0,vr.property)({type:Boolean})],De.prototype,"dense",void 0);qr([(0,vr.property)({type:Boolean})],De.prototype,"round",void 0);var Sr=O(re());var Xr=O(P());var cs=O(H()),S=O(P());var Fl={...f,iconOnlyScale:S.FtCssVariableFactory.create("--ft-button-icon-only-scale","","NUMBER","1")},ls=[cs.css`
|
|
676
676
|
:host {
|
|
677
677
|
display: inline-block;
|
|
678
678
|
max-width: 100%;
|
|
@@ -1209,7 +1209,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
1209
1209
|
${this.confirmText}
|
|
1210
1210
|
</ftds-button>
|
|
1211
1211
|
</ftds-modal>
|
|
1212
|
-
`}async askConfirmation(){this.modal.open();let r=await new Promise(o=>{this.promiseResolve=o});return this.modal.close(),r}onConfirm(){var r;(r=this.promiseResolve)===null||r===void 0||r.call(this,!0),this.promiseResolve=void 0}onCancel(){var r;(r=this.promiseResolve)===null||r===void 0||r.call(this,!1),this.promiseResolve=void 0}};Le.elementDefinitions={"ftds-modal":$e,"ft-typography":ce,"ftds-button":Oe};Tt([(0,rt.property)({type:String})],Le.prototype,"heading",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"text",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"confirmText",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"cancelText",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"confirmIcon",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"cancelIcon",void 0);Tt([(0,rt.query)("ftds-modal")],Le.prototype,"modal",void 0);var kr=O(H()),Lt=O(re()),il=O(P()),sl=O(sr());var rl=O(H()),$=O(P()),
|
|
1212
|
+
`}async askConfirmation(){this.modal.open();let r=await new Promise(o=>{this.promiseResolve=o});return this.modal.close(),r}onConfirm(){var r;(r=this.promiseResolve)===null||r===void 0||r.call(this,!0),this.promiseResolve=void 0}onCancel(){var r;(r=this.promiseResolve)===null||r===void 0||r.call(this,!1),this.promiseResolve=void 0}};Le.elementDefinitions={"ftds-modal":$e,"ft-typography":ce,"ftds-button":Oe};Tt([(0,rt.property)({type:String})],Le.prototype,"heading",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"text",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"confirmText",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"cancelText",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"confirmIcon",void 0);Tt([(0,rt.property)({type:String})],Le.prototype,"cancelIcon",void 0);Tt([(0,rt.query)("ftds-modal")],Le.prototype,"modal",void 0);var kr=O(H()),Lt=O(re()),il=O(P()),sl=O(sr());var rl=O(H()),$=O(P()),q={shadow:$.FtCssVariableFactory.extend("--ft-modal-shadow","",$.designSystemVariables.elevation03),borderRadius:$.FtCssVariableFactory.extend("--ft-modal-border-radius","",$.designSystemVariables.borderRadiusM),height:$.FtCssVariableFactory.create("--ft-modal-height","","SIZE","fit-content"),width:$.FtCssVariableFactory.create("--ft-modal-width","","SIZE","800px"),headerPadding:$.FtCssVariableFactory.create("--ft-modal-header-padding","","SIZE","8px 16px"),headerGap:$.FtCssVariableFactory.create("--ft-modal-header-gap","","SIZE","8px"),headerBorderColor:$.FtCssVariableFactory.extend("--ft-modal-header-border-color","",$.designSystemVariables.colorOutline),headerBorderWidth:$.FtCssVariableFactory.create("--ft-modal-header-border-width","","SIZE","1px"),headerBackgroundColor:$.FtCssVariableFactory.extend("--ft-modal-header-background-color","",$.designSystemVariables.colorSurface),headerColor:$.FtCssVariableFactory.extend("--ft-modal-header-color","",$.designSystemVariables.colorOnSurfaceHigh),headerIconColor:$.FtCssVariableFactory.extend("--ft-modal-header-icon-color","",$.designSystemVariables.colorOnSurfaceHigh),contentPadding:$.FtCssVariableFactory.create("--ft-modal-content-padding","","SIZE","16px"),contentGap:$.FtCssVariableFactory.create("--ft-modal-content-gap","","SIZE","16px"),contentBackgroundColor:$.FtCssVariableFactory.extend("--ft-modal-content-background-color","",$.designSystemVariables.colorSurface),contentColor:$.FtCssVariableFactory.extend("--ft-modal-content-color","",$.designSystemVariables.colorOnSurfaceMedium),actionsGap:$.FtCssVariableFactory.create("--ft-modal-action-gap","","SIZE","8px"),overlayBackgroundColor:$.FtCssVariableFactory.create("--ft-modal-overlay-background-color","","COLOR","rgb(10, 10, 13)"),overlayOpacity:$.FtCssVariableFactory.create("--ft-modal-overlay-opacity","","NUMBER","0.4"),closingButtonColor:$.FtCssVariableFactory.extend("--ft-modal-closing-button-color","",$.designSystemVariables.colorOnSurfaceMedium)},ol=rl.css`
|
|
1213
1213
|
[part=container] {
|
|
1214
1214
|
display: contents;
|
|
1215
1215
|
}
|
|
@@ -1226,17 +1226,15 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
1226
1226
|
[part=overlay] {
|
|
1227
1227
|
position: absolute;
|
|
1228
1228
|
inset: 0;
|
|
1229
|
-
background-color: ${
|
|
1230
|
-
opacity: ${
|
|
1229
|
+
background-color: ${q.overlayBackgroundColor};
|
|
1230
|
+
opacity: ${q.overlayOpacity};
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
1233
|
[part=inner-container] {
|
|
1234
1234
|
position: fixed;
|
|
1235
1235
|
inset: 0;
|
|
1236
|
-
background-color: ${J.contentBackgroundColor};
|
|
1237
1236
|
display: flex;
|
|
1238
1237
|
flex-direction: column;
|
|
1239
|
-
overflow: hidden;
|
|
1240
1238
|
max-height: 100%;
|
|
1241
1239
|
max-width: 100%;
|
|
1242
1240
|
|
|
@@ -1244,11 +1242,9 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
1244
1242
|
top: 50%;
|
|
1245
1243
|
bottom: unset;
|
|
1246
1244
|
transform: translate(0, -50%);
|
|
1247
|
-
box-shadow: ${
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
height: ${J.height};
|
|
1251
|
-
width: ${J.width};
|
|
1245
|
+
box-shadow: ${q.shadow};
|
|
1246
|
+
height: ${q.height};
|
|
1247
|
+
width: ${q.width};
|
|
1252
1248
|
margin: auto;
|
|
1253
1249
|
max-height: calc(100% - 24px);
|
|
1254
1250
|
max-width: calc(100% - 24px);
|
|
@@ -1257,15 +1253,16 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
1257
1253
|
|
|
1258
1254
|
|
|
1259
1255
|
[part=header] {
|
|
1260
|
-
padding: ${
|
|
1256
|
+
padding: ${q.headerPadding};
|
|
1261
1257
|
display: flex;
|
|
1262
1258
|
align-items: center;
|
|
1263
|
-
gap: ${
|
|
1264
|
-
border-color: ${
|
|
1265
|
-
border-bottom-width: ${
|
|
1259
|
+
gap: ${q.headerGap};
|
|
1260
|
+
border-color: ${q.headerBorderColor};
|
|
1261
|
+
border-bottom-width: ${q.headerBorderWidth};
|
|
1266
1262
|
border-bottom-style: solid;
|
|
1267
|
-
color: ${
|
|
1268
|
-
background-color: ${
|
|
1263
|
+
color: ${q.headerColor};
|
|
1264
|
+
background-color: ${q.headerBackgroundColor};
|
|
1265
|
+
border-radius: ${q.borderRadius} ${q.borderRadius} 0px 0px;
|
|
1269
1266
|
}
|
|
1270
1267
|
|
|
1271
1268
|
[part=heading] {
|
|
@@ -1273,7 +1270,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
1273
1270
|
}
|
|
1274
1271
|
|
|
1275
1272
|
[part=icon] {
|
|
1276
|
-
color: ${
|
|
1273
|
+
color: ${q.headerIconColor};
|
|
1277
1274
|
}
|
|
1278
1275
|
|
|
1279
1276
|
[part=closing-button] {
|
|
@@ -1283,13 +1280,13 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
1283
1280
|
[part=body] {
|
|
1284
1281
|
flex-shrink: 1;
|
|
1285
1282
|
flex-grow: 1;
|
|
1286
|
-
|
|
1287
|
-
padding: ${J.contentPadding};
|
|
1283
|
+
padding: ${q.contentPadding};
|
|
1288
1284
|
display: flex;
|
|
1289
1285
|
flex-direction: column;
|
|
1290
|
-
gap: ${
|
|
1291
|
-
color: ${
|
|
1292
|
-
background-color: ${
|
|
1286
|
+
gap: ${q.contentGap};
|
|
1287
|
+
color: ${q.contentColor};
|
|
1288
|
+
background-color: ${q.contentBackgroundColor};
|
|
1289
|
+
border-radius: 0px 0px ${q.borderRadius} ${q.borderRadius};
|
|
1293
1290
|
}
|
|
1294
1291
|
|
|
1295
1292
|
[part=content] {
|
|
@@ -1299,11 +1296,11 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:t.extend("--ftds-con
|
|
|
1299
1296
|
[part=actions] {
|
|
1300
1297
|
align-self: flex-end;
|
|
1301
1298
|
display: flex;
|
|
1302
|
-
gap: ${
|
|
1299
|
+
gap: ${q.actionsGap};
|
|
1303
1300
|
}
|
|
1304
1301
|
|
|
1305
1302
|
[part=closing-button] {
|
|
1306
|
-
color: ${
|
|
1303
|
+
color: ${q.closingButtonColor};
|
|
1307
1304
|
}
|
|
1308
1305
|
`;function jn(e,r,o){return e?r(e):o?.(e)}var nl=ir.build("ftModal"),al={closeModal:"Close modal"};var Dr=function(e,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,r,o,n);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(i=(a<3?c(i):a>3?c(r,o,i):c(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Kn=class extends Event{constructor(){super("close")}},Vn=class extends Event{constructor(){super("open")}},Fe=class extends ar(il.FtdsBase){constructor(){super(),this.buttonLabel="",this.heading="",this.size=he.small,this.intersectionObserver=new IntersectionObserver(()=>{this.dialog&&!this.dialog.checkVisibility()&&this.close()}),this.addI18nContext(nl,al)}render(){return kr.html`
|
|
1309
1306
|
<div class="${(0,sl.classMap)({"ft-modal":!0})}" part="container">
|