@fluid-topics/ft-dialog 0.3.16 → 0.3.18
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
CHANGED
|
@@ -517,7 +517,7 @@ const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
517
517
|
${i.setVariable(_i.size,Ui.iconSize)};
|
|
518
518
|
${i.setVariable(_i.color,"var(--ft-button-internal-color)")};
|
|
519
519
|
}
|
|
520
|
-
`];var Li=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Gi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=ci.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!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-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
520
|
+
`];var Li=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Gi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=ci.material,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-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
521
521
|
<button part="button"
|
|
522
522
|
class="${s.classMap(t)}"
|
|
523
523
|
aria-label="${this.getLabel()}"
|
|
@@ -531,15 +531,15 @@ const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
531
531
|
</ft-typography>
|
|
532
532
|
${this.resolveIcon()}
|
|
533
533
|
</button>
|
|
534
|
-
`)}addTooltipIfNeeded(t){return this.
|
|
534
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?e.html`
|
|
535
535
|
<ft-tooltip part="tooltip"
|
|
536
536
|
text="${this.getLabel()}"
|
|
537
537
|
position="${this.tooltipPosition}">
|
|
538
538
|
${t}
|
|
539
539
|
</ft-tooltip>
|
|
540
|
-
|
|
540
|
+
`:t}resolveIcon(){return this.loading?e.html`
|
|
541
541
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
542
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Gi.elementDefinitions={"ft-ripple":Ci,"ft-tooltip":Fi,"ft-typography":hi,"ft-icon":gi,"ft-loader":Zi},Gi.styles=Hi,Li([o.property({type:Boolean})],Gi.prototype,"primary",void 0),Li([o.property({type:Boolean})],Gi.prototype,"outlined",void 0),Li([o.property({type:Boolean})],Gi.prototype,"disabled",void 0),Li([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Li([o.property({type:Boolean})],Gi.prototype,"round",void 0),Li([o.property({type:String})],Gi.prototype,"label",void 0),Li([o.property({type:String})],Gi.prototype,"icon",void 0),Li([o.property({type:String})],Gi.prototype,"iconVariant",void 0),Li([o.property({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Li([o.property({type:Boolean})],Gi.prototype,"loading",void 0),Li([o.property({type:String})],Gi.prototype,"tooltipPosition",void 0),Li([o.property({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Li([o.query(".ft-button")],Gi.prototype,"button",void 0),Li([o.query(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Gi);const Pi={zIndex:i.FtCssVariableFactory.create("--ft-dialog-z-index","NUMBER","2"),overlayBackgroundColor:i.FtCssVariableFactory.create("--ft-dialog-overlay-background-color","COLOR","rgba(0, 0, 0, 0.3)"),height:i.FtCssVariableFactory.create("--ft-dialog-height","SIZE","unset"),width:i.FtCssVariableFactory.create("--ft-dialog-width","SIZE","unset"),minWidth:i.FtCssVariableFactory.create("--ft-dialog-min-width","SIZE","unset"),paddingTop:i.FtCssVariableFactory.create("--ft-dialog-padding-top","SIZE","20px"),paddingSide:i.FtCssVariableFactory.create("--ft-dialog-padding-side","SIZE","16px"),paddingButtons:i.FtCssVariableFactory.create("--ft-dialog-padding-buttons","SIZE","20px"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),headingColor:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),borderRadiusS:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),elevation24:i.FtCssVariableFactory.external(i.designSystemVariables.elevation24,"Design system")},qi=e.css`
|
|
542
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Gi.elementDefinitions={"ft-ripple":Ci,"ft-tooltip":Fi,"ft-typography":hi,"ft-icon":gi,"ft-loader":Zi},Gi.styles=Hi,Li([o.property({type:Boolean})],Gi.prototype,"primary",void 0),Li([o.property({type:Boolean})],Gi.prototype,"outlined",void 0),Li([o.property({type:Boolean})],Gi.prototype,"disabled",void 0),Li([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Li([o.property({type:Boolean})],Gi.prototype,"round",void 0),Li([o.property({type:String})],Gi.prototype,"label",void 0),Li([o.property({type:String})],Gi.prototype,"icon",void 0),Li([o.property({type:String})],Gi.prototype,"iconVariant",void 0),Li([o.property({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Li([o.property({type:Boolean})],Gi.prototype,"loading",void 0),Li([o.property({type:String})],Gi.prototype,"tooltipPosition",void 0),Li([o.property({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Li([o.property({type:Boolean})],Gi.prototype,"forceTooltip",void 0),Li([o.query(".ft-button")],Gi.prototype,"button",void 0),Li([o.query(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Gi);const Pi={zIndex:i.FtCssVariableFactory.create("--ft-dialog-z-index","NUMBER","2"),overlayBackgroundColor:i.FtCssVariableFactory.create("--ft-dialog-overlay-background-color","COLOR","rgba(0, 0, 0, 0.3)"),height:i.FtCssVariableFactory.create("--ft-dialog-height","SIZE","unset"),width:i.FtCssVariableFactory.create("--ft-dialog-width","SIZE","unset"),minWidth:i.FtCssVariableFactory.create("--ft-dialog-min-width","SIZE","unset"),paddingTop:i.FtCssVariableFactory.create("--ft-dialog-padding-top","SIZE","20px"),paddingSide:i.FtCssVariableFactory.create("--ft-dialog-padding-side","SIZE","16px"),paddingButtons:i.FtCssVariableFactory.create("--ft-dialog-padding-buttons","SIZE","20px"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),headingColor:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),borderRadiusS:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),elevation24:i.FtCssVariableFactory.external(i.designSystemVariables.elevation24,"Design system")},qi=e.css`
|
|
543
543
|
.ft-dialog {
|
|
544
544
|
position: fixed;
|
|
545
545
|
top: 0;
|
package/build/ft-dialog.min.js
CHANGED
|
@@ -628,7 +628,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
628
628
|
${ct(Oi.size,Ni.iconSize)};
|
|
629
629
|
${ct(Oi.color,"var(--ft-button-internal-color)")};
|
|
630
630
|
}
|
|
631
|
-
`];var Ui=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 Fi extends ut{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Qe.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!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-button--safari-fix":xt,"ft-no-text-select":!0};return this.addTooltipIfNeeded(W`
|
|
631
|
+
`];var Ui=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 Fi extends ut{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Qe.material,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-button--safari-fix":xt,"ft-no-text-select":!0};return this.addTooltipIfNeeded(W`
|
|
632
632
|
<button part="button"
|
|
633
633
|
class="${ii(t)}"
|
|
634
634
|
aria-label="${this.getLabel()}"
|
|
@@ -642,15 +642,15 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
642
642
|
</ft-typography>
|
|
643
643
|
${this.resolveIcon()}
|
|
644
644
|
</button>
|
|
645
|
-
`)}addTooltipIfNeeded(t){return this.
|
|
645
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?W`
|
|
646
646
|
<ft-tooltip part="tooltip"
|
|
647
647
|
text="${this.getLabel()}"
|
|
648
648
|
position="${this.tooltipPosition}">
|
|
649
649
|
${t}
|
|
650
650
|
</ft-tooltip>
|
|
651
|
-
|
|
651
|
+
`:t}resolveIcon(){return this.loading?W`
|
|
652
652
|
<ft-loader></ft-loader> `:this.icon?W`
|
|
653
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:K}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Fi.elementDefinitions={"ft-ripple":fi,"ft-tooltip":$i,"ft-typography":_e,"ft-icon":ei,"ft-loader":ki},Fi.styles=zi,Ui([o({type:Boolean})],Fi.prototype,"primary",void 0),Ui([o({type:Boolean})],Fi.prototype,"outlined",void 0),Ui([o({type:Boolean})],Fi.prototype,"disabled",void 0),Ui([o({type:Boolean})],Fi.prototype,"dense",void 0),Ui([o({type:Boolean})],Fi.prototype,"round",void 0),Ui([o({type:String})],Fi.prototype,"label",void 0),Ui([o({type:String})],Fi.prototype,"icon",void 0),Ui([o({type:String})],Fi.prototype,"iconVariant",void 0),Ui([o({type:Boolean})],Fi.prototype,"trailingIcon",void 0),Ui([o({type:Boolean})],Fi.prototype,"loading",void 0),Ui([o({type:String})],Fi.prototype,"tooltipPosition",void 0),Ui([o({type:Boolean})],Fi.prototype,"hideTooltip",void 0),Ui([r(".ft-button")],Fi.prototype,"button",void 0),Ui([r(".ft-button--label slot")],Fi.prototype,"slottedContent",void 0),p("ft-button")(Fi);const ji={zIndex:ht.create("--ft-dialog-z-index","NUMBER","2"),overlayBackgroundColor:ht.create("--ft-dialog-overlay-background-color","COLOR","rgba(0, 0, 0, 0.3)"),height:ht.create("--ft-dialog-height","SIZE","unset"),width:ht.create("--ft-dialog-width","SIZE","unset"),minWidth:ht.create("--ft-dialog-min-width","SIZE","unset"),paddingTop:ht.create("--ft-dialog-padding-top","SIZE","20px"),paddingSide:ht.create("--ft-dialog-padding-side","SIZE","16px"),paddingButtons:ht.create("--ft-dialog-padding-buttons","SIZE","20px"),colorSurface:ht.external(dt.colorSurface,"Design system"),headingColor:ht.external(dt.colorOnSurfaceMedium,"Design system"),borderRadiusS:ht.external(dt.borderRadiusS,"Design system"),elevation24:ht.external(dt.elevation24,"Design system")},Bi=y`
|
|
653
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:K}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Fi.elementDefinitions={"ft-ripple":fi,"ft-tooltip":$i,"ft-typography":_e,"ft-icon":ei,"ft-loader":ki},Fi.styles=zi,Ui([o({type:Boolean})],Fi.prototype,"primary",void 0),Ui([o({type:Boolean})],Fi.prototype,"outlined",void 0),Ui([o({type:Boolean})],Fi.prototype,"disabled",void 0),Ui([o({type:Boolean})],Fi.prototype,"dense",void 0),Ui([o({type:Boolean})],Fi.prototype,"round",void 0),Ui([o({type:String})],Fi.prototype,"label",void 0),Ui([o({type:String})],Fi.prototype,"icon",void 0),Ui([o({type:String})],Fi.prototype,"iconVariant",void 0),Ui([o({type:Boolean})],Fi.prototype,"trailingIcon",void 0),Ui([o({type:Boolean})],Fi.prototype,"loading",void 0),Ui([o({type:String})],Fi.prototype,"tooltipPosition",void 0),Ui([o({type:Boolean})],Fi.prototype,"hideTooltip",void 0),Ui([o({type:Boolean})],Fi.prototype,"forceTooltip",void 0),Ui([r(".ft-button")],Fi.prototype,"button",void 0),Ui([r(".ft-button--label slot")],Fi.prototype,"slottedContent",void 0),p("ft-button")(Fi);const ji={zIndex:ht.create("--ft-dialog-z-index","NUMBER","2"),overlayBackgroundColor:ht.create("--ft-dialog-overlay-background-color","COLOR","rgba(0, 0, 0, 0.3)"),height:ht.create("--ft-dialog-height","SIZE","unset"),width:ht.create("--ft-dialog-width","SIZE","unset"),minWidth:ht.create("--ft-dialog-min-width","SIZE","unset"),paddingTop:ht.create("--ft-dialog-padding-top","SIZE","20px"),paddingSide:ht.create("--ft-dialog-padding-side","SIZE","16px"),paddingButtons:ht.create("--ft-dialog-padding-buttons","SIZE","20px"),colorSurface:ht.external(dt.colorSurface,"Design system"),headingColor:ht.external(dt.colorOnSurfaceMedium,"Design system"),borderRadiusS:ht.external(dt.borderRadiusS,"Design system"),elevation24:ht.external(dt.elevation24,"Design system")},Bi=y`
|
|
654
654
|
.ft-dialog {
|
|
655
655
|
position: fixed;
|
|
656
656
|
top: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-dialog",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
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": "0.3.
|
|
23
|
-
"@fluid-topics/ft-icon": "0.3.
|
|
24
|
-
"@fluid-topics/ft-typography": "0.3.
|
|
25
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-button": "0.3.18",
|
|
23
|
+
"@fluid-topics/ft-icon": "0.3.18",
|
|
24
|
+
"@fluid-topics/ft-typography": "0.3.18",
|
|
25
|
+
"@fluid-topics/ft-wc-utils": "0.3.18",
|
|
26
26
|
"lit": "2.2.8"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "33fac246cb4042276b1804479304a2c8fe0f8e3f"
|
|
29
29
|
}
|