@fluid-topics/ft-modal 1.3.54 → 1.3.56
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.d.ts +1 -1
- package/build/ft-modal.js +13 -16
- package/build/ft-modal.light.js +125 -159
- package/build/ft-modal.min.js +147 -181
- package/build/ft-modal.styles.d.ts +1 -0
- package/build/ft-modal.styles.js +4 -38
- package/package.json +4 -4
package/build/ft-modal.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ export declare class FtModal extends FtModal_base implements FtModalProperties {
|
|
|
9
9
|
buttonIcon?: string;
|
|
10
10
|
heading: string;
|
|
11
11
|
icon?: string;
|
|
12
|
-
drawer: boolean;
|
|
13
12
|
dialog?: HTMLDialogElement;
|
|
14
13
|
size: DesignSystemSize;
|
|
15
14
|
constructor();
|
|
16
15
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
private renderCloseButton;
|
|
17
17
|
protected onTriggerClick(e: MouseEvent): void;
|
|
18
18
|
protected elementToFocusOnClose?: HTMLElement;
|
|
19
19
|
private intersectionObserver;
|
package/build/ft-modal.js
CHANGED
|
@@ -33,7 +33,6 @@ class FtModal extends withI18n(FtdsBase) {
|
|
|
33
33
|
super();
|
|
34
34
|
this.buttonLabel = "";
|
|
35
35
|
this.heading = "";
|
|
36
|
-
this.drawer = false;
|
|
37
36
|
this.size = DesignSystemSize.small;
|
|
38
37
|
this.intersectionObserver = new IntersectionObserver(() => {
|
|
39
38
|
if (this.dialog && !this.dialog.checkVisibility()) {
|
|
@@ -46,9 +45,6 @@ class FtModal extends withI18n(FtdsBase) {
|
|
|
46
45
|
const classes = {
|
|
47
46
|
"ft-modal": true,
|
|
48
47
|
};
|
|
49
|
-
const drawerClasses = {
|
|
50
|
-
"drawer": this.drawer,
|
|
51
|
-
};
|
|
52
48
|
return html `
|
|
53
49
|
<div class="${classMap(classes)}" part="container">
|
|
54
50
|
<slot @click=${this.onTriggerClick} name="trigger">
|
|
@@ -58,21 +54,16 @@ class FtModal extends withI18n(FtdsBase) {
|
|
|
58
54
|
</slot>
|
|
59
55
|
<dialog part="dialog" aria-labelledby="heading" @close=${this.onClose}>
|
|
60
56
|
<div part="overlay" @click=${this.onOverlayClick}></div>
|
|
61
|
-
<div part="inner-container"
|
|
57
|
+
<div part="inner-container">
|
|
62
58
|
<div part="header">
|
|
63
|
-
${when(!!this.icon
|
|
59
|
+
${when(!!this.icon, () => html `
|
|
64
60
|
<ft-icon part="icon" value="${this.icon}"></ft-icon>
|
|
65
61
|
`)}
|
|
66
62
|
<ft-typography id="heading" part="heading" role="heading" variant="${FtTypographyVariants.title}">
|
|
67
63
|
${this.heading}
|
|
68
64
|
</ft-typography>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
tertiary
|
|
72
|
-
label="${modal.messages.closeModal()}"
|
|
73
|
-
tooltipPosition="left"
|
|
74
|
-
@click=${this.close}>
|
|
75
|
-
</ft-button>
|
|
65
|
+
<slot name="header-actions"></slot>
|
|
66
|
+
${this.renderCloseButton()}
|
|
76
67
|
</div>
|
|
77
68
|
<div part="body">
|
|
78
69
|
<div part="content">
|
|
@@ -87,6 +78,15 @@ class FtModal extends withI18n(FtdsBase) {
|
|
|
87
78
|
</div>
|
|
88
79
|
`;
|
|
89
80
|
}
|
|
81
|
+
renderCloseButton() {
|
|
82
|
+
return html `
|
|
83
|
+
<ft-button part="closing-button"
|
|
84
|
+
icon="${FtIcons.CLOSE}"
|
|
85
|
+
tertiary
|
|
86
|
+
label="${modal.messages.closeModal()}"
|
|
87
|
+
tooltipPosition="left"
|
|
88
|
+
@click=${this.close}></ft-button>`;
|
|
89
|
+
}
|
|
90
90
|
onTriggerClick(e) {
|
|
91
91
|
this.open(e.target);
|
|
92
92
|
}
|
|
@@ -135,9 +135,6 @@ __decorate([
|
|
|
135
135
|
__decorate([
|
|
136
136
|
property()
|
|
137
137
|
], FtModal.prototype, "icon", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
property()
|
|
140
|
-
], FtModal.prototype, "drawer", void 0);
|
|
141
138
|
__decorate([
|
|
142
139
|
query("dialog")
|
|
143
140
|
], FtModal.prototype, "dialog", void 0);
|