@maggioli-design-system/mds-modal 5.2.1 → 5.4.0
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/dist/cjs/{index-7b5471f5.js → index-6f236cfa.js} +164 -69
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-modal.cjs.entry.js +47 -7
- package/dist/cjs/mds-modal.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/floating-controller.js +180 -0
- package/dist/collection/common/slot.js +19 -4
- package/dist/collection/common/string.js +30 -0
- package/dist/collection/components/mds-modal/mds-modal.css +124 -0
- package/dist/collection/components/mds-modal/mds-modal.js +77 -5
- package/dist/collection/components/mds-modal/meta/dictionary.js +5 -1
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +20 -2
- package/dist/collection/dictionary/keyboard.js +84 -0
- package/dist/collection/dictionary/tree.js +13 -0
- package/dist/collection/type/keyboard.js +1 -0
- package/dist/collection/type/tree.js +1 -0
- package/dist/components/mds-modal.js +48 -7
- package/dist/documentation.d.ts +8 -0
- package/dist/documentation.json +56 -5
- package/dist/esm/{index-1c34ac95.js → index-f8d2dee4.js} +164 -69
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-modal.entry.js +47 -7
- package/dist/esm/mds-modal.js +4 -4
- package/dist/esm-es5/index-f8d2dee4.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-modal.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/mds-modal.js +1 -1
- package/dist/mds-modal/p-2c91cf1f.entry.js +1 -0
- package/dist/mds-modal/p-69576bb4.system.entry.js +1 -0
- package/dist/mds-modal/p-bc1fa4e4.system.js +2 -0
- package/dist/mds-modal/{p-67c6f337.system.js → p-c6899cb0.system.js} +1 -1
- package/dist/mds-modal/p-ee90f86a.js +2 -0
- package/dist/stats.json +128 -38
- package/dist/types/common/floating-controller.d.ts +46 -0
- package/dist/types/common/slot.d.ts +3 -1
- package/dist/types/common/string.d.ts +4 -0
- package/dist/types/components/mds-modal/mds-modal.d.ts +8 -1
- package/dist/types/components/mds-modal/meta/dictionary.d.ts +2 -1
- package/dist/types/components/mds-modal/meta/types.d.ts +1 -0
- package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +11 -0
- package/dist/types/components.d.ts +10 -2
- package/dist/types/dictionary/keyboard.d.ts +2 -0
- package/dist/types/dictionary/tree.d.ts +4 -0
- package/dist/types/type/keyboard.d.ts +12 -0
- package/dist/types/type/tree.d.ts +3 -0
- package/documentation.json +96 -10
- package/package.json +4 -4
- package/readme.md +18 -16
- package/src/common/floating-controller.ts +263 -0
- package/src/common/slot.ts +23 -3
- package/src/common/string.ts +42 -0
- package/src/components/mds-modal/mds-modal.css +7 -1
- package/src/components/mds-modal/mds-modal.tsx +36 -1
- package/src/components/mds-modal/meta/dictionary.ts +6 -0
- package/src/components/mds-modal/meta/types.ts +4 -0
- package/src/components/mds-modal/readme.md +18 -16
- package/src/components/mds-modal/test/mds-modal.stories.tsx +57 -3
- package/src/components.d.ts +10 -2
- package/src/dictionary/keyboard.ts +87 -0
- package/src/dictionary/tree.ts +21 -0
- package/src/fixtures/icons.json +38 -1
- package/src/fixtures/iconsauce.json +6 -0
- package/src/meta/keyboard/keys.json +83 -0
- package/src/tailwind/components.css +11 -0
- package/src/tailwind/fouc.css +118 -0
- package/src/type/keyboard.ts +93 -0
- package/src/type/tree.ts +12 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/www/build/p-2c91cf1f.entry.js +1 -0
- package/www/build/p-69576bb4.system.entry.js +1 -0
- package/www/build/p-bc1fa4e4.system.js +2 -0
- package/www/build/{p-67c6f337.system.js → p-c6899cb0.system.js} +1 -1
- package/www/build/p-ee90f86a.js +2 -0
- package/dist/esm-es5/index-1c34ac95.js +0 -1
- package/dist/mds-modal/p-08a99956.entry.js +0 -1
- package/dist/mds-modal/p-0d78ea55.system.entry.js +0 -1
- package/dist/mds-modal/p-0ed6e0c8.js +0 -2
- package/dist/mds-modal/p-423dac35.system.js +0 -2
- package/www/build/p-08a99956.entry.js +0 -1
- package/www/build/p-0d78ea55.system.entry.js +0 -1
- package/www/build/p-0ed6e0c8.js +0 -2
- package/www/build/p-423dac35.system.js +0 -2
|
@@ -12,6 +12,22 @@ export class MdsModal {
|
|
|
12
12
|
this.window = false;
|
|
13
13
|
this.top = false;
|
|
14
14
|
this.bottom = false;
|
|
15
|
+
/**
|
|
16
|
+
* Specifies if the modal is opened or not
|
|
17
|
+
*/
|
|
18
|
+
this.opened = false;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the animation position of the modal window
|
|
21
|
+
*/
|
|
22
|
+
this.position = 'center';
|
|
23
|
+
/**
|
|
24
|
+
* Specifies if the component is animating itself or not
|
|
25
|
+
*/
|
|
26
|
+
this.animating = 'none';
|
|
27
|
+
/**
|
|
28
|
+
* Specifies if the component prevents the body from scrolling when modal window is opened
|
|
29
|
+
*/
|
|
30
|
+
this.overflow = 'auto';
|
|
15
31
|
this.updateCSSCustomProps = () => {
|
|
16
32
|
var _a;
|
|
17
33
|
if (typeof window === 'undefined')
|
|
@@ -30,6 +46,24 @@ export class MdsModal {
|
|
|
30
46
|
this.hideEvent.emit();
|
|
31
47
|
clearTimeout(this.animationDelayTimeout);
|
|
32
48
|
};
|
|
49
|
+
this.disableOverflow = () => {
|
|
50
|
+
if (document) {
|
|
51
|
+
if (document.body.style.overflow) {
|
|
52
|
+
this.bodyOverflow = document.body.style.overflow;
|
|
53
|
+
}
|
|
54
|
+
document.body.style.overflow = 'hidden';
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
this.enableOverflow = () => {
|
|
58
|
+
if (document) {
|
|
59
|
+
if (this.bodyOverflow) {
|
|
60
|
+
document.body.style.overflow = this.bodyOverflow;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
document.body.style.removeProperty('overflow');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
33
67
|
this.animateOpenWindow = () => {
|
|
34
68
|
this.animating = 'intro';
|
|
35
69
|
clearTimeout(this.animationDelayTimeout);
|
|
@@ -50,15 +84,15 @@ export class MdsModal {
|
|
|
50
84
|
this.closeEvent.emit();
|
|
51
85
|
}
|
|
52
86
|
};
|
|
53
|
-
this.opened = false;
|
|
54
|
-
this.position = 'center';
|
|
55
|
-
this.animating = 'none';
|
|
56
87
|
}
|
|
57
88
|
componentWillLoad() {
|
|
58
89
|
var _a;
|
|
59
90
|
this.bottom = this.host.querySelector('[slot="bottom"]') !== null;
|
|
60
91
|
this.top = this.host.querySelector('[slot="top"]') !== null;
|
|
61
92
|
this.window = this.host.querySelector('[slot="window"]') !== null;
|
|
93
|
+
if (this.overflow === 'auto' && this.opened) {
|
|
94
|
+
this.disableOverflow();
|
|
95
|
+
}
|
|
62
96
|
if (this.window) {
|
|
63
97
|
(_a = this.host.querySelector('[slot="window"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('role', 'dialog');
|
|
64
98
|
}
|
|
@@ -71,9 +105,15 @@ export class MdsModal {
|
|
|
71
105
|
}
|
|
72
106
|
handleOpenProp(newValue) {
|
|
73
107
|
if (newValue) {
|
|
108
|
+
if (this.overflow === 'auto') {
|
|
109
|
+
this.disableOverflow();
|
|
110
|
+
}
|
|
74
111
|
this.animateOpenWindow();
|
|
75
112
|
return;
|
|
76
113
|
}
|
|
114
|
+
if (this.overflow === 'auto') {
|
|
115
|
+
this.enableOverflow();
|
|
116
|
+
}
|
|
77
117
|
this.animateCloseWindow();
|
|
78
118
|
}
|
|
79
119
|
onModalCloseListener() {
|
|
@@ -83,11 +123,11 @@ export class MdsModal {
|
|
|
83
123
|
this.opened = false;
|
|
84
124
|
}
|
|
85
125
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: '7c55fe13070b89c43efcc7168dbdb8d07b749b8a', "aria-modal": clsx(this.opened ? 'true' : 'false'), onClick: (e) => { this.closeModal(e); } }, this.window
|
|
87
127
|
? h("slot", { name: "window" })
|
|
88
128
|
: h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), part: "window" }, this.top &&
|
|
89
129
|
h("slot", { name: "top" }), h("slot", null), this.bottom &&
|
|
90
|
-
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: '
|
|
130
|
+
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: 'e9b3c0037f8a0cf2fc3b284dc02b2f7b16bbe205', class: "action-close", icon: "mi/baseline/close", variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); } })));
|
|
91
131
|
}
|
|
92
132
|
static get is() { return "mds-modal"; }
|
|
93
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -117,6 +157,8 @@ export class MdsModal {
|
|
|
117
157
|
"tags": [],
|
|
118
158
|
"text": "Specifies if the modal is opened or not"
|
|
119
159
|
},
|
|
160
|
+
"getter": false,
|
|
161
|
+
"setter": false,
|
|
120
162
|
"attribute": "opened",
|
|
121
163
|
"reflect": true,
|
|
122
164
|
"defaultValue": "false"
|
|
@@ -141,6 +183,8 @@ export class MdsModal {
|
|
|
141
183
|
"tags": [],
|
|
142
184
|
"text": "Specifies the animation position of the modal window"
|
|
143
185
|
},
|
|
186
|
+
"getter": false,
|
|
187
|
+
"setter": false,
|
|
144
188
|
"attribute": "position",
|
|
145
189
|
"reflect": true,
|
|
146
190
|
"defaultValue": "'center'"
|
|
@@ -165,9 +209,37 @@ export class MdsModal {
|
|
|
165
209
|
"tags": [],
|
|
166
210
|
"text": "Specifies if the component is animating itself or not"
|
|
167
211
|
},
|
|
212
|
+
"getter": false,
|
|
213
|
+
"setter": false,
|
|
168
214
|
"attribute": "animating",
|
|
169
215
|
"reflect": true,
|
|
170
216
|
"defaultValue": "'none'"
|
|
217
|
+
},
|
|
218
|
+
"overflow": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"mutable": false,
|
|
221
|
+
"complexType": {
|
|
222
|
+
"original": "ModalOverflowType",
|
|
223
|
+
"resolved": "\"auto\" | \"manual\"",
|
|
224
|
+
"references": {
|
|
225
|
+
"ModalOverflowType": {
|
|
226
|
+
"location": "import",
|
|
227
|
+
"path": "./meta/types",
|
|
228
|
+
"id": "src/components/mds-modal/meta/types.ts::ModalOverflowType"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"required": false,
|
|
233
|
+
"optional": false,
|
|
234
|
+
"docs": {
|
|
235
|
+
"tags": [],
|
|
236
|
+
"text": "Specifies if the component prevents the body from scrolling when modal window is opened"
|
|
237
|
+
},
|
|
238
|
+
"getter": false,
|
|
239
|
+
"setter": false,
|
|
240
|
+
"attribute": "overflow",
|
|
241
|
+
"reflect": true,
|
|
242
|
+
"defaultValue": "'auto'"
|
|
171
243
|
}
|
|
172
244
|
};
|
|
173
245
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { modalPositionDictionary } from "../meta/dictionary";
|
|
3
|
+
import { modalPositionDictionary, modalOverflowDictionary } from "../meta/dictionary";
|
|
4
4
|
export default {
|
|
5
5
|
title: 'UI / Modal',
|
|
6
6
|
argTypes: {
|
|
@@ -8,6 +8,12 @@ export default {
|
|
|
8
8
|
description: 'Specifies if the modal is opened or not',
|
|
9
9
|
type: { name: 'boolean' },
|
|
10
10
|
},
|
|
11
|
+
overflow: {
|
|
12
|
+
description: 'Specifies if the component prevents the body from scrolling when modal window is opened',
|
|
13
|
+
control: { type: 'select' },
|
|
14
|
+
options: modalOverflowDictionary,
|
|
15
|
+
type: { name: 'string' },
|
|
16
|
+
},
|
|
11
17
|
position: {
|
|
12
18
|
control: { type: 'select' },
|
|
13
19
|
description: 'Specifies the animation position of the modal window',
|
|
@@ -20,7 +26,8 @@ const firstName = 'Mario';
|
|
|
20
26
|
const lastName = 'Rossi';
|
|
21
27
|
const fullName = `${firstName} ${lastName}`;
|
|
22
28
|
const email = `${firstName.toLowerCase()}.${lastName.toLowerCase()}@nintendo.com`;
|
|
23
|
-
const Template = args => h("mds-modal", Object.assign({}, args), h("header", { slot: "top", class: "p-800 flex gap-400 items-center border-b border-solid border-0 border-tone-neutral-09 max-w-[400px]" }, h("mds-img", { class: "w-1600", src: "
|
|
29
|
+
const Template = args => h("mds-modal", Object.assign({}, args), h("header", { slot: "top", class: "p-800 flex gap-400 items-center border-b border-solid border-0 border-tone-neutral-09 max-w-[400px]" }, h("mds-img", { class: "w-1600", src: "./logo-gruppo-maggioli-512w.webp" }), h("div", { class: "text-tone-neutral-02" }, h("mds-text", { typography: "h5", class: "truncate min-w-0" }, "Maggioli Editore"), h("mds-text", { typography: "detail", class: "truncate min-w-0" }, "Menu di servizio"))), h("div", { class: "p-800 max-w-[400px]" }, h("mds-text", null, "As a multi-brand design system, our components need to be flexible enough for any one of our brands to use them for multiple use cases. To achieve this, we ensure that all of the brands are involved in the specification stage, giving us more confidence that we\u2019re future-proofing our components as more brands adopt NewsKit.")), h("footer", { slot: "bottom", class: "p-800 flex gap-400 text-tone-neutral-02 border-t border-solid border-0 border-tone-neutral-09 max-w-[400px]" }, h("mds-author", { class: "flex-grow" }, h("mds-avatar", { slot: "avatar", class: "w-1600 mobile:w-1200", src: "./avatar-01-200x200.jpeg" }), h("mds-text", { typography: "h6" }, fullName), h("mds-text", { typography: "caption", class: "text-tone-neutral-04" }, email)), h("mds-button", { icon: "mdi/dots-vertical", variant: "light" })));
|
|
30
|
+
const TemplateOverflow = args => h("div", null, h("div", { class: "grid" }, Array(40).fill(null).map((_value, index) => (h("div", { key: index, class: "h-[100px] flex items-start justify-center text-center border-0 border-t border-solid border-t-tone-neutral-07" }, h("mds-text", { class: "px-200 py-100 rounded-b-lg bg-tone-neutral-10 border-t-0 border border-solid border-tone-neutral-07", typography: "snippet", tag: "div" }, index === 0 ? '0px' : index + '00px'))))), h("mds-modal", Object.assign({}, args), h("header", { slot: "top", class: "p-800 flex gap-400 items-center border-b border-solid border-0 border-tone-neutral-09 max-w-[400px]" }, h("mds-img", { class: "w-1600", src: "./logo-gruppo-maggioli-512w.webp" }), h("div", { class: "text-tone-neutral-02" }, h("mds-text", { typography: "h5", class: "truncate min-w-0" }, "Maggioli Editore"), h("mds-text", { typography: "detail", class: "truncate min-w-0" }, "Menu di servizio"))), h("div", { class: "p-800 max-w-[400px]" }, h("mds-text", null, "As a multi-brand design system, our components need to be flexible enough for any one of our brands to use them for multiple use cases. To achieve this, we ensure that all of the brands are involved in the specification stage, giving us more confidence that we\u2019re future-proofing our components as more brands adopt NewsKit.")), h("footer", { slot: "bottom", class: "p-800 flex gap-400 text-tone-neutral-02 border-t border-solid border-0 border-tone-neutral-09 max-w-[400px]" }, h("mds-author", { class: "flex-grow" }, h("mds-avatar", { slot: "avatar", class: "w-1600 mobile:w-1200", src: "./avatar-01-200x200.jpeg" }), h("mds-text", { typography: "h6" }, fullName), h("mds-text", { typography: "caption", class: "text-tone-neutral-04" }, email)), h("mds-button", { icon: "mdi/dots-vertical", variant: "light" }))));
|
|
24
31
|
const CustomTemplate = args => h("mds-modal", Object.assign({}, args), h("mds-banner", { slot: "window", class: "max-w-xl mx-6", deletable: true, headline: "Action required" }, h("mds-text", { typography: "detail" }, "As a multi-brand design system, our components need to be flexible enough for any one of our brands to use them for multiple use cases. To achieve this, we ensure that all of the brands are involved in the specification stage, giving us more confidence that we\u2019re future-proofing our components as more brands adopt NewsKit."), h("mds-button", { slot: "actions", variant: "primary", tone: "quiet" }, "Cancel"), h("mds-button", { slot: "actions", variant: "primary" }, "Confirm")));
|
|
25
32
|
const InteractiveTemplate = () => {
|
|
26
33
|
// Click not working with reader
|
|
@@ -31,13 +38,24 @@ const InteractiveTemplate = () => {
|
|
|
31
38
|
export const Default = Template.bind({});
|
|
32
39
|
Default.args = {
|
|
33
40
|
position: 'right',
|
|
41
|
+
opened: true,
|
|
42
|
+
};
|
|
43
|
+
export const BodyOverflowDisabled = TemplateOverflow.bind({});
|
|
44
|
+
BodyOverflowDisabled.args = {
|
|
45
|
+
overflow: 'auto',
|
|
46
|
+
opened: true,
|
|
47
|
+
position: 'right',
|
|
34
48
|
};
|
|
35
49
|
export const DefaultWindowCustomized = Template.bind({});
|
|
36
50
|
DefaultWindowCustomized.args = {
|
|
37
51
|
position: 'right',
|
|
52
|
+
opened: true,
|
|
38
53
|
style: { '--mds-modal-window-distance': '1rem', '--mds-modal-window-radius': '1rem' },
|
|
39
54
|
};
|
|
40
55
|
export const CustomWindowElement = CustomTemplate.bind({});
|
|
56
|
+
CustomWindowElement.args = {
|
|
57
|
+
opened: true,
|
|
58
|
+
};
|
|
41
59
|
export const Interactive = InteractiveTemplate.bind({});
|
|
42
60
|
export const ARIATest = CustomTemplate.bind({});
|
|
43
61
|
ARIATest.args = {
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const keyboardKeyNameDictionary = [
|
|
2
|
+
'0',
|
|
3
|
+
'1',
|
|
4
|
+
'2',
|
|
5
|
+
'3',
|
|
6
|
+
'4',
|
|
7
|
+
'5',
|
|
8
|
+
'6',
|
|
9
|
+
'7',
|
|
10
|
+
'8',
|
|
11
|
+
'9',
|
|
12
|
+
'a',
|
|
13
|
+
'alt',
|
|
14
|
+
'altleft',
|
|
15
|
+
'altright',
|
|
16
|
+
'arrowdown',
|
|
17
|
+
'arrowleft',
|
|
18
|
+
'arrowright',
|
|
19
|
+
'arrowup',
|
|
20
|
+
'b',
|
|
21
|
+
'backspace',
|
|
22
|
+
'c',
|
|
23
|
+
'capslock',
|
|
24
|
+
'command',
|
|
25
|
+
'commandleft',
|
|
26
|
+
'commandright',
|
|
27
|
+
'control',
|
|
28
|
+
'controlleft',
|
|
29
|
+
'controlright',
|
|
30
|
+
'd',
|
|
31
|
+
'delete',
|
|
32
|
+
'e',
|
|
33
|
+
'end',
|
|
34
|
+
'enter',
|
|
35
|
+
'escape',
|
|
36
|
+
'f',
|
|
37
|
+
'f1',
|
|
38
|
+
'f10',
|
|
39
|
+
'f11',
|
|
40
|
+
'f12',
|
|
41
|
+
'f2',
|
|
42
|
+
'f3',
|
|
43
|
+
'f4',
|
|
44
|
+
'f5',
|
|
45
|
+
'f6',
|
|
46
|
+
'f7',
|
|
47
|
+
'f8',
|
|
48
|
+
'f9',
|
|
49
|
+
'g',
|
|
50
|
+
'h',
|
|
51
|
+
'home',
|
|
52
|
+
'i',
|
|
53
|
+
'j',
|
|
54
|
+
'k',
|
|
55
|
+
'l',
|
|
56
|
+
'm',
|
|
57
|
+
'n',
|
|
58
|
+
'o',
|
|
59
|
+
'option',
|
|
60
|
+
'optionleft',
|
|
61
|
+
'optionright',
|
|
62
|
+
'p',
|
|
63
|
+
'pagedown',
|
|
64
|
+
'pageup',
|
|
65
|
+
'q',
|
|
66
|
+
'r',
|
|
67
|
+
's',
|
|
68
|
+
'shift',
|
|
69
|
+
'shiftleft',
|
|
70
|
+
'shiftright',
|
|
71
|
+
'space',
|
|
72
|
+
't',
|
|
73
|
+
'tab',
|
|
74
|
+
'u',
|
|
75
|
+
'v',
|
|
76
|
+
'w',
|
|
77
|
+
'windows',
|
|
78
|
+
'windowsleft',
|
|
79
|
+
'windowsright',
|
|
80
|
+
'x',
|
|
81
|
+
'y',
|
|
82
|
+
'z',
|
|
83
|
+
];
|
|
84
|
+
export { keyboardKeyNameDictionary, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const treeActionsDictionary = [
|
|
2
|
+
'auto',
|
|
3
|
+
'visible',
|
|
4
|
+
];
|
|
5
|
+
const treeAppearanceDictionary = [
|
|
6
|
+
'depth',
|
|
7
|
+
'none',
|
|
8
|
+
];
|
|
9
|
+
const treeIconDictionary = [
|
|
10
|
+
'folder',
|
|
11
|
+
'chevron',
|
|
12
|
+
];
|
|
13
|
+
export { treeActionsDictionary, treeAppearanceDictionary, treeIconDictionary, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,7 +12,7 @@ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
|
12
12
|
return defaultValue;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const mdsModalCss = "@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-overlay-opacity: Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-radius: Set the border radius of the window\n * @prop --mds-modal-window-distance: Set the distance between the modal window and the screen bounds\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-transition-duration: 500ms;\n --mds-modal-transition-intro-ease: cubic-bezier(0.19, 1, 0.22, 1);\n --mds-modal-transition-outro-ease: cubic-bezier(0.86, 0, 0.07, 1);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-radius: 0;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-window-distance: 0;\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host( [position=\"top\"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position=\"bottom\"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.action-close {\n border-radius: 100px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, transform;\n transition-property: bottom, opacity, top, transform, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host([opened]:not([opened=\"false\"])) .action-close {\n opacity: 1;\n pointer-events: auto;\n}\n\n.action-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n border-radius: var(--mds-modal-window-radius);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n margin: var(--mds-modal-window-distance);\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n:host .window {\n -webkit-transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n}\n\n\n:host([opened]:not([opened=\"false\"]) ) {\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n:host .window,\n:host > ::slotted( [slot=\"window\"] ) {\n opacity: 0;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: opacity, -webkit-transform;\n transition-property: opacity, -webkit-transform;\n transition-property: transform, opacity;\n transition-property: transform, opacity, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-modal-transition-outro-ease);\n transition-timing-function: var(--mds-modal-transition-outro-ease);\n}\n\n:host([opened]:not([opened=\"false\"]) ) .window,\n:host([opened]:not([opened=\"false\"]) ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n -webkit-transform: rotate(0) scale(1) translateY(0);\n transform: rotate(0) scale(1) translateY(0);\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-timing-function: var(--mds-modal-transition-intro-ease);\n transition-timing-function: var(--mds-modal-transition-intro-ease);\n}\n\n:host([position=\"bottom-left\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom-left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom-left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position=\"bottom-left\"][opened=\"false\"]) .window,\n:host([position=\"bottom-left\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"bottom-right\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom-right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom-right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position=\"bottom-right\"][opened=\"false\"]) .window,\n:host([position=\"bottom-right\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"bottom\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n}\n\n:host([position=\"bottom\"][opened=\"false\"]) .window,\n:host([position=\"bottom\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"center\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"center\"]) .window {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n:host([position=\"center\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"center\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n}\n\n:host([position=\"center\"][opened=\"false\"]) .window,\n:host([position=\"center\"]:not([opened])) .window {\n -webkit-transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n}\n\n:host([position=\"left\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"left\"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position=\"left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n}\n\n:host([position=\"left\"][opened=\"false\"]) .window,\n:host([position=\"left\"]:not([opened])) .window {\n -webkit-transform: translate(-100%, 0%);\n transform: translate(-100%, 0%);\n}\n\n:host([position=\"left\"]) .action-close {\n right: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(-120%) rotate(-45deg);\n transform: translateX(-120%) rotate(-45deg);\n}\n\n:host([position=\"left\"][opened]:not([opened=\"false\"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position=\"right\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"right\"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position=\"right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n}\n\n:host([position=\"right\"][opened=\"false\"]) .window,\n:host([position=\"right\"]:not([opened])) .window {\n -webkit-transform: translate(100%, 0%);\n transform: translate(100%, 0%);\n}\n\n:host([position=\"right\"]) .action-close {\n left: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(120%) rotate(45deg);\n transform: translateX(120%) rotate(45deg);\n}\n\n:host([position=\"right\"][opened]:not([opened=\"false\"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position=\"top-left\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top-left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top-left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position=\"top-left\"][opened=\"false\"]) .window,\n:host([position=\"top-left\"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n:host([position=\"top-right\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top-right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top-right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position=\"top-right\"][opened=\"false\"]) .window,\n:host([position=\"top-right\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"top\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n}\n\n:host([position=\"top\"][opened=\"false\"]) .window,\n:host([position=\"top\"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n }\n}\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n }\n}\n\n\n";
|
|
15
|
+
const mdsModalCss = "@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-overlay-opacity: Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-radius: Set the border radius of the window\n * @prop --mds-modal-window-distance: Set the distance between the modal window and the screen bounds\n * @prop --mds-modal-custom-window-distance: Set the distance between the slotted modal window and the screen bounds\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-transition-duration: 500ms;\n --mds-modal-transition-intro-ease: cubic-bezier(0.19, 1, 0.22, 1);\n --mds-modal-transition-outro-ease: cubic-bezier(0.86, 0, 0.07, 1);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-radius: 0;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-window-distance: 0;\n --mds-modal-custom-window-distance: 1.5rem;\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host ::slotted([slot=\"window\"]) {\n margin: var(--mds-modal-custom-window-distance);\n}\n\n:host( [position=\"top\"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position=\"bottom\"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.action-close {\n border-radius: 100px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, transform;\n transition-property: bottom, opacity, top, transform, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host([opened]:not([opened=\"false\"])) .action-close {\n opacity: 1;\n pointer-events: auto;\n}\n\n.action-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n border-radius: var(--mds-modal-window-radius);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n margin: var(--mds-modal-window-distance);\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n:host .window {\n -webkit-transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n}\n\n\n:host([opened]:not([opened=\"false\"]) ) {\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n:host .window,\n:host > ::slotted( [slot=\"window\"] ) {\n opacity: 0;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: opacity, -webkit-transform;\n transition-property: opacity, -webkit-transform;\n transition-property: transform, opacity;\n transition-property: transform, opacity, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-modal-transition-outro-ease);\n transition-timing-function: var(--mds-modal-transition-outro-ease);\n}\n\n:host([opened]:not([opened=\"false\"]) ) .window,\n:host([opened]:not([opened=\"false\"]) ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n -webkit-transform: rotate(0) scale(1) translateY(0);\n transform: rotate(0) scale(1) translateY(0);\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-timing-function: var(--mds-modal-transition-intro-ease);\n transition-timing-function: var(--mds-modal-transition-intro-ease);\n}\n\n:host([position=\"bottom-left\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom-left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom-left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position=\"bottom-left\"][opened=\"false\"]) .window,\n:host([position=\"bottom-left\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"bottom-right\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom-right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom-right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position=\"bottom-right\"][opened=\"false\"]) .window,\n:host([position=\"bottom-right\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"bottom\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n}\n\n:host([position=\"bottom\"][opened=\"false\"]) .window,\n:host([position=\"bottom\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"center\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"center\"]) .window {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n:host([position=\"center\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"center\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n}\n\n:host([position=\"center\"][opened=\"false\"]) .window,\n:host([position=\"center\"]:not([opened])) .window {\n -webkit-transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n}\n\n:host([position=\"left\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"left\"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position=\"left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n}\n\n:host([position=\"left\"][opened=\"false\"]) .window,\n:host([position=\"left\"]:not([opened])) .window {\n -webkit-transform: translate(-100%, 0%);\n transform: translate(-100%, 0%);\n}\n\n:host([position=\"left\"]) .action-close {\n right: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(-120%) rotate(-45deg);\n transform: translateX(-120%) rotate(-45deg);\n}\n\n:host([position=\"left\"][opened]:not([opened=\"false\"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position=\"right\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"right\"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position=\"right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n}\n\n:host([position=\"right\"][opened=\"false\"]) .window,\n:host([position=\"right\"]:not([opened])) .window {\n -webkit-transform: translate(100%, 0%);\n transform: translate(100%, 0%);\n}\n\n:host([position=\"right\"]) .action-close {\n left: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(120%) rotate(45deg);\n transform: translateX(120%) rotate(45deg);\n}\n\n:host([position=\"right\"][opened]:not([opened=\"false\"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position=\"top-left\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top-left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top-left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position=\"top-left\"][opened=\"false\"]) .window,\n:host([position=\"top-left\"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n:host([position=\"top-right\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top-right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top-right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position=\"top-right\"][opened=\"false\"]) .window,\n:host([position=\"top-right\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"top\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n}\n\n:host([position=\"top\"][opened=\"false\"]) .window,\n:host([position=\"top\"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n }\n}\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n }\n}\n\n:host(:not(:is([hydrated], .hydrated))) {\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */\n\nmds-accordion:not(:is([hydrated], .hydrated)),\nmds-accordion-item:not(:is([hydrated], .hydrated)),\nmds-accordion-timer:not(:is([hydrated], .hydrated)),\nmds-accordion-timer-item:not(:is([hydrated], .hydrated)),\nmds-author:not(:is([hydrated], .hydrated)),\nmds-avatar:not(:is([hydrated], .hydrated)),\nmds-badge:not(:is([hydrated], .hydrated)),\nmds-banner:not(:is([hydrated], .hydrated)),\nmds-benchmark-bar:not(:is([hydrated], .hydrated)),\nmds-bibliography:not(:is([hydrated], .hydrated)),\nmds-breadcrumb:not(:is([hydrated], .hydrated)),\nmds-breadcrumb-item:not(:is([hydrated], .hydrated)),\nmds-button:not(:is([hydrated], .hydrated)),\nmds-card:not(:is([hydrated], .hydrated)),\nmds-card-content:not(:is([hydrated], .hydrated)),\nmds-card-footer:not(:is([hydrated], .hydrated)),\nmds-card-header:not(:is([hydrated], .hydrated)),\nmds-card-media:not(:is([hydrated], .hydrated)),\nmds-chip:not(:is([hydrated], .hydrated)),\nmds-details:not(:is([hydrated], .hydrated)),\nmds-dropdown:not(:is([hydrated], .hydrated)),\nmds-entity:not(:is([hydrated], .hydrated)),\nmds-file:not(:is([hydrated], .hydrated)),\nmds-file-preview:not(:is([hydrated], .hydrated)),\nmds-filter:not(:is([hydrated], .hydrated)),\nmds-filter-item:not(:is([hydrated], .hydrated)),\nmds-header:not(:is([hydrated], .hydrated)),\nmds-header-bar:not(:is([hydrated], .hydrated)),\nmds-help:not(:is([hydrated], .hydrated)),\nmds-horizontal-scroll:not(:is([hydrated], .hydrated)),\nmds-hr:not(:is([hydrated], .hydrated)),\nmds-icon:not(:is([hydrated], .hydrated)),\nmds-img:not(:is([hydrated], .hydrated)),\nmds-input:not(:is([hydrated], .hydrated)),\nmds-input-field:not(:is([hydrated], .hydrated)),\nmds-input-range:not(:is([hydrated], .hydrated)),\nmds-input-select:not(:is([hydrated], .hydrated)),\nmds-input-switch:not(:is([hydrated], .hydrated)),\nmds-input-tip:not(:is([hydrated], .hydrated)),\nmds-input-tip-item:not(:is([hydrated], .hydrated)),\nmds-input-upload:not(:is([hydrated], .hydrated)),\nmds-keyboard:not(:is([hydrated], .hydrated)),\nmds-keyboard-key:not(:is([hydrated], .hydrated)),\nmds-kpi:not(:is([hydrated], .hydrated)),\nmds-kpi-item:not(:is([hydrated], .hydrated)),\nmds-label:not(:is([hydrated], .hydrated)),\nmds-list:not(:is([hydrated], .hydrated)),\nmds-list-item:not(:is([hydrated], .hydrated)),\nmds-modal:not(:is([hydrated], .hydrated)),\nmds-note:not(:is([hydrated], .hydrated)),\nmds-notification:not(:is([hydrated], .hydrated)),\nmds-paginator:not(:is([hydrated], .hydrated)),\nmds-paginator-item:not(:is([hydrated], .hydrated)),\nmds-pref:not(:is([hydrated], .hydrated)),\nmds-pref-animation:not(:is([hydrated], .hydrated)),\nmds-pref-consumption:not(:is([hydrated], .hydrated)),\nmds-pref-contrast:not(:is([hydrated], .hydrated)),\nmds-pref-language:not(:is([hydrated], .hydrated)),\nmds-pref-language-item:not(:is([hydrated], .hydrated)),\nmds-pref-theme:not(:is([hydrated], .hydrated)),\nmds-price-table:not(:is([hydrated], .hydrated)),\nmds-price-table-features:not(:is([hydrated], .hydrated)),\nmds-price-table-features-cell:not(:is([hydrated], .hydrated)),\nmds-price-table-features-row:not(:is([hydrated], .hydrated)),\nmds-price-table-header:not(:is([hydrated], .hydrated)),\nmds-price-table-list:not(:is([hydrated], .hydrated)),\nmds-price-table-list-item:not(:is([hydrated], .hydrated)),\nmds-progress:not(:is([hydrated], .hydrated)),\nmds-push-notification:not(:is([hydrated], .hydrated)),\nmds-push-notifications:not(:is([hydrated], .hydrated)),\nmds-quote:not(:is([hydrated], .hydrated)),\nmds-separator:not(:is([hydrated], .hydrated)),\nmds-spinner:not(:is([hydrated], .hydrated)),\nmds-stepper-bar:not(:is([hydrated], .hydrated)),\nmds-stepper-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab:not(:is([hydrated], .hydrated)),\nmds-tab-bar:not(:is([hydrated], .hydrated)),\nmds-tab-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab-item:not(:is([hydrated], .hydrated)),\nmds-table:not(:is([hydrated], .hydrated)),\nmds-table-body:not(:is([hydrated], .hydrated)),\nmds-table-cell:not(:is([hydrated], .hydrated)),\nmds-table-footer:not(:is([hydrated], .hydrated)),\nmds-table-header:not(:is([hydrated], .hydrated)),\nmds-table-header-cell:not(:is([hydrated], .hydrated)),\nmds-table-row:not(:is([hydrated], .hydrated)),\nmds-text:not(:is([hydrated], .hydrated)),\nmds-toast:not(:is([hydrated], .hydrated)),\nmds-tooltip:not(:is([hydrated], .hydrated)),\nmds-tree:not(:is([hydrated], .hydrated)),\nmds-tree-item:not(:is([hydrated], .hydrated)),\nmds-url-view:not(:is([hydrated], .hydrated)),\nmds-usage:not(:is([hydrated], .hydrated)),\nmds-video-wall:not(:is([hydrated], .hydrated)),\nmds-zero:not(:is([hydrated], .hydrated))\n{\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n";
|
|
16
16
|
const MdsModalStyle0 = mdsModalCss;
|
|
17
17
|
|
|
18
18
|
const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLElement {
|
|
@@ -25,6 +25,22 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
25
25
|
this.window = false;
|
|
26
26
|
this.top = false;
|
|
27
27
|
this.bottom = false;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies if the modal is opened or not
|
|
30
|
+
*/
|
|
31
|
+
this.opened = false;
|
|
32
|
+
/**
|
|
33
|
+
* Specifies the animation position of the modal window
|
|
34
|
+
*/
|
|
35
|
+
this.position = 'center';
|
|
36
|
+
/**
|
|
37
|
+
* Specifies if the component is animating itself or not
|
|
38
|
+
*/
|
|
39
|
+
this.animating = 'none';
|
|
40
|
+
/**
|
|
41
|
+
* Specifies if the component prevents the body from scrolling when modal window is opened
|
|
42
|
+
*/
|
|
43
|
+
this.overflow = 'auto';
|
|
28
44
|
this.updateCSSCustomProps = () => {
|
|
29
45
|
var _a;
|
|
30
46
|
if (typeof window === 'undefined')
|
|
@@ -43,6 +59,24 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
43
59
|
this.hideEvent.emit();
|
|
44
60
|
clearTimeout(this.animationDelayTimeout);
|
|
45
61
|
};
|
|
62
|
+
this.disableOverflow = () => {
|
|
63
|
+
if (document) {
|
|
64
|
+
if (document.body.style.overflow) {
|
|
65
|
+
this.bodyOverflow = document.body.style.overflow;
|
|
66
|
+
}
|
|
67
|
+
document.body.style.overflow = 'hidden';
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
this.enableOverflow = () => {
|
|
71
|
+
if (document) {
|
|
72
|
+
if (this.bodyOverflow) {
|
|
73
|
+
document.body.style.overflow = this.bodyOverflow;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
document.body.style.removeProperty('overflow');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
46
80
|
this.animateOpenWindow = () => {
|
|
47
81
|
this.animating = 'intro';
|
|
48
82
|
clearTimeout(this.animationDelayTimeout);
|
|
@@ -63,15 +97,15 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
63
97
|
this.closeEvent.emit();
|
|
64
98
|
}
|
|
65
99
|
};
|
|
66
|
-
this.opened = false;
|
|
67
|
-
this.position = 'center';
|
|
68
|
-
this.animating = 'none';
|
|
69
100
|
}
|
|
70
101
|
componentWillLoad() {
|
|
71
102
|
var _a;
|
|
72
103
|
this.bottom = this.host.querySelector('[slot="bottom"]') !== null;
|
|
73
104
|
this.top = this.host.querySelector('[slot="top"]') !== null;
|
|
74
105
|
this.window = this.host.querySelector('[slot="window"]') !== null;
|
|
106
|
+
if (this.overflow === 'auto' && this.opened) {
|
|
107
|
+
this.disableOverflow();
|
|
108
|
+
}
|
|
75
109
|
if (this.window) {
|
|
76
110
|
(_a = this.host.querySelector('[slot="window"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('role', 'dialog');
|
|
77
111
|
}
|
|
@@ -84,9 +118,15 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
84
118
|
}
|
|
85
119
|
handleOpenProp(newValue) {
|
|
86
120
|
if (newValue) {
|
|
121
|
+
if (this.overflow === 'auto') {
|
|
122
|
+
this.disableOverflow();
|
|
123
|
+
}
|
|
87
124
|
this.animateOpenWindow();
|
|
88
125
|
return;
|
|
89
126
|
}
|
|
127
|
+
if (this.overflow === 'auto') {
|
|
128
|
+
this.enableOverflow();
|
|
129
|
+
}
|
|
90
130
|
this.animateCloseWindow();
|
|
91
131
|
}
|
|
92
132
|
onModalCloseListener() {
|
|
@@ -96,11 +136,11 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
96
136
|
this.opened = false;
|
|
97
137
|
}
|
|
98
138
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
139
|
+
return (h(Host, { key: '7c55fe13070b89c43efcc7168dbdb8d07b749b8a', "aria-modal": clsx(this.opened ? 'true' : 'false'), onClick: (e) => { this.closeModal(e); } }, this.window
|
|
100
140
|
? h("slot", { name: "window" })
|
|
101
141
|
: h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), part: "window" }, this.top &&
|
|
102
142
|
h("slot", { name: "top" }), h("slot", null), this.bottom &&
|
|
103
|
-
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: '
|
|
143
|
+
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: 'e9b3c0037f8a0cf2fc3b284dc02b2f7b16bbe205', class: "action-close", icon: "mi/baseline/close", variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); } })));
|
|
104
144
|
}
|
|
105
145
|
get host() { return this; }
|
|
106
146
|
static get watchers() { return {
|
|
@@ -110,7 +150,8 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
110
150
|
}, [1, "mds-modal", {
|
|
111
151
|
"opened": [1540],
|
|
112
152
|
"position": [1537],
|
|
113
|
-
"animating": [1537]
|
|
153
|
+
"animating": [1537],
|
|
154
|
+
"overflow": [513]
|
|
114
155
|
}, [[4, "mdsModalClose", "onModalCloseListener"], [4, "mdsBannerClose", "onBannerCloseListener"]], {
|
|
115
156
|
"opened": ["handleOpenProp"]
|
|
116
157
|
}]);
|
package/dist/documentation.d.ts
CHANGED
|
@@ -316,6 +316,14 @@ export interface JsonDocsProp {
|
|
|
316
316
|
* ```
|
|
317
317
|
*/
|
|
318
318
|
required: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* `true` if the prop has a `get()`. `false` otherwise
|
|
321
|
+
*/
|
|
322
|
+
getter: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* `true` if the prop has a `set()`. `false` otherwise
|
|
325
|
+
*/
|
|
326
|
+
setter: boolean;
|
|
319
327
|
}
|
|
320
328
|
export interface JsonDocsMethod {
|
|
321
329
|
name: string;
|
package/dist/documentation.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "
|
|
2
|
+
"timestamp": "2025-02-25T14:19:58",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.25.1",
|
|
6
6
|
"typescriptVersion": "5.5.4"
|
|
7
7
|
},
|
|
8
8
|
"components": [
|
|
@@ -69,7 +69,9 @@
|
|
|
69
69
|
}
|
|
70
70
|
],
|
|
71
71
|
"optional": true,
|
|
72
|
-
"required": false
|
|
72
|
+
"required": false,
|
|
73
|
+
"getter": false,
|
|
74
|
+
"setter": false
|
|
73
75
|
},
|
|
74
76
|
{
|
|
75
77
|
"name": "opened",
|
|
@@ -91,7 +93,44 @@
|
|
|
91
93
|
}
|
|
92
94
|
],
|
|
93
95
|
"optional": false,
|
|
94
|
-
"required": false
|
|
96
|
+
"required": false,
|
|
97
|
+
"getter": false,
|
|
98
|
+
"setter": false
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "overflow",
|
|
102
|
+
"type": "\"auto\" | \"manual\"",
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "ModalOverflowType",
|
|
105
|
+
"resolved": "\"auto\" | \"manual\"",
|
|
106
|
+
"references": {
|
|
107
|
+
"ModalOverflowType": {
|
|
108
|
+
"location": "import",
|
|
109
|
+
"path": "./meta/types",
|
|
110
|
+
"id": "src/components/mds-modal/meta/types.ts::ModalOverflowType"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"attr": "overflow",
|
|
116
|
+
"reflectToAttr": true,
|
|
117
|
+
"docs": "Specifies if the component prevents the body from scrolling when modal window is opened",
|
|
118
|
+
"docsTags": [],
|
|
119
|
+
"default": "'auto'",
|
|
120
|
+
"values": [
|
|
121
|
+
{
|
|
122
|
+
"value": "auto",
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"value": "manual",
|
|
127
|
+
"type": "string"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"optional": false,
|
|
131
|
+
"required": false,
|
|
132
|
+
"getter": false,
|
|
133
|
+
"setter": false
|
|
95
134
|
},
|
|
96
135
|
{
|
|
97
136
|
"name": "position",
|
|
@@ -155,7 +194,9 @@
|
|
|
155
194
|
}
|
|
156
195
|
],
|
|
157
196
|
"optional": true,
|
|
158
|
-
"required": false
|
|
197
|
+
"required": false,
|
|
198
|
+
"getter": false,
|
|
199
|
+
"setter": false
|
|
159
200
|
}
|
|
160
201
|
],
|
|
161
202
|
"methods": [],
|
|
@@ -209,6 +250,11 @@
|
|
|
209
250
|
"annotation": "prop",
|
|
210
251
|
"docs": "Set the color of the close icon button to the top left."
|
|
211
252
|
},
|
|
253
|
+
{
|
|
254
|
+
"name": "--mds-modal-custom-window-distance",
|
|
255
|
+
"annotation": "prop",
|
|
256
|
+
"docs": "Set the distance between the slotted modal window and the screen bounds"
|
|
257
|
+
},
|
|
212
258
|
{
|
|
213
259
|
"name": "--mds-modal-overlay-color",
|
|
214
260
|
"annotation": "prop",
|
|
@@ -289,6 +335,11 @@
|
|
|
289
335
|
"declaration": "export type ModalAnimationStateType =\n | 'intro'\n | 'none'\n | 'outro'",
|
|
290
336
|
"docstring": "",
|
|
291
337
|
"path": "src/components/mds-modal/meta/types.ts"
|
|
338
|
+
},
|
|
339
|
+
"src/components/mds-modal/meta/types.ts::ModalOverflowType": {
|
|
340
|
+
"declaration": "export type ModalOverflowType =\n | 'auto'\n | 'manual'",
|
|
341
|
+
"docstring": "",
|
|
342
|
+
"path": "src/components/mds-modal/meta/types.ts"
|
|
292
343
|
}
|
|
293
344
|
}
|
|
294
345
|
}
|