@momentum-design/components 0.85.8 → 0.85.9
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/browser/index.js +122 -105
- package/dist/browser/index.js.map +3 -3
- package/dist/components/dialog/dialog.component.d.ts +2 -2
- package/dist/components/dialog/dialog.component.js +2 -2
- package/dist/components/dialog/dialog.constants.d.ts +1 -1
- package/dist/components/dialog/dialog.constants.js +1 -1
- package/dist/components/dialog/dialog.styles.js +22 -5
- package/dist/custom-elements.json +520 -520
- package/dist/react/dialog/index.d.ts +1 -1
- package/dist/react/dialog/index.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
@@ -5,7 +5,7 @@ declare const Dialog_base: import("../../utils/mixins/index.types").Constructor<
|
|
5
5
|
/**
|
6
6
|
* Dialog component is a modal dialog that can be used to display information or prompt the user for input.
|
7
7
|
* It can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.
|
8
|
-
* The dialog is available in
|
8
|
+
* The dialog is available in 5 sizes: small, medium, large, xlarge and fullscreen. It may also receive custom styling/sizing.
|
9
9
|
* The dialog interrupts the user and will block interaction with the rest of the application until it is closed.
|
10
10
|
*
|
11
11
|
* The dialog can be controlled solely through the `visible` property, no trigger element is required.
|
@@ -81,7 +81,7 @@ declare class Dialog extends Dialog_base {
|
|
81
81
|
*/
|
82
82
|
zIndex: number;
|
83
83
|
/**
|
84
|
-
* The size of the dialog, can be 'small' (432px width), 'medium' (656px width),
|
84
|
+
* The size of the dialog, can be 'small' (432px width), 'medium' (656px width), 'large' (992px width), 'xlarge' (90% width) or 'fullscreen' (100% width).
|
85
85
|
* @default small
|
86
86
|
*/
|
87
87
|
size: DialogSize;
|
@@ -22,7 +22,7 @@ import styles from './dialog.styles';
|
|
22
22
|
/**
|
23
23
|
* Dialog component is a modal dialog that can be used to display information or prompt the user for input.
|
24
24
|
* It can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.
|
25
|
-
* The dialog is available in
|
25
|
+
* The dialog is available in 5 sizes: small, medium, large, xlarge and fullscreen. It may also receive custom styling/sizing.
|
26
26
|
* The dialog interrupts the user and will block interaction with the rest of the application until it is closed.
|
27
27
|
*
|
28
28
|
* The dialog can be controlled solely through the `visible` property, no trigger element is required.
|
@@ -94,7 +94,7 @@ class Dialog extends PreventScrollMixin(FocusTrapMixin(CardAndDialogFooterMixin(
|
|
94
94
|
*/
|
95
95
|
this.zIndex = DEFAULTS.Z_INDEX;
|
96
96
|
/**
|
97
|
-
* The size of the dialog, can be 'small' (432px width), 'medium' (656px width),
|
97
|
+
* The size of the dialog, can be 'small' (432px width), 'medium' (656px width), 'large' (992px width), 'xlarge' (90% width) or 'fullscreen' (100% width).
|
98
98
|
* @default small
|
99
99
|
*/
|
100
100
|
this.size = DEFAULTS.SIZE;
|
@@ -15,6 +15,6 @@ declare const DEFAULTS: {
|
|
15
15
|
readonly DISABLE_ARIA_HAS_POPUP: false;
|
16
16
|
readonly FOCUS_TRAP: true;
|
17
17
|
};
|
18
|
-
declare const DIALOG_SIZE: readonly ["small", "medium", "large"];
|
18
|
+
declare const DIALOG_SIZE: readonly ["small", "medium", "large", "xlarge", "fullscreen"];
|
19
19
|
declare const DIALOG_ROLE: readonly ["dialog", "alertdialog"];
|
20
20
|
export { TAG_NAME, DEFAULTS, DIALOG_SIZE, DIALOG_ROLE, DIALOG_VARIANT };
|
@@ -16,6 +16,6 @@ const DEFAULTS = {
|
|
16
16
|
DISABLE_ARIA_HAS_POPUP: false,
|
17
17
|
FOCUS_TRAP: true,
|
18
18
|
};
|
19
|
-
const DIALOG_SIZE = ['small', 'medium', 'large'];
|
19
|
+
const DIALOG_SIZE = ['small', 'medium', 'large', 'xlarge', 'fullscreen'];
|
20
20
|
const DIALOG_ROLE = ['dialog', 'alertdialog'];
|
21
21
|
export { TAG_NAME, DEFAULTS, DIALOG_SIZE, DIALOG_ROLE, DIALOG_VARIANT };
|
@@ -7,13 +7,14 @@ const styles = css `
|
|
7
7
|
--mdc-dialog-description-text-color: var(--mds-color-theme-text-secondary-normal);
|
8
8
|
--mdc-dialog-elevation-3: var(--mds-elevation-3);
|
9
9
|
--mdc-dialog-width: 27rem; /* Default to small */
|
10
|
+
--mdc-dialog-padding: 1.5rem;
|
10
11
|
|
11
12
|
background-color: var(--mdc-dialog-primary-background-color);
|
12
13
|
border: 0.0625rem solid var(--mdc-dialog-border-color);
|
13
14
|
border-radius: 0.5rem;
|
14
15
|
filter: var(--mdc-dialog-elevation-3);
|
15
16
|
display: none;
|
16
|
-
padding:
|
17
|
+
padding: var(--mdc-dialog-padding);
|
17
18
|
flex-direction: column;
|
18
19
|
justify-content: center;
|
19
20
|
align-items: center;
|
@@ -40,6 +41,23 @@ const styles = css `
|
|
40
41
|
--mdc-dialog-width: 62rem;
|
41
42
|
}
|
42
43
|
|
44
|
+
:host([size='xlarge']) {
|
45
|
+
--mdc-dialog-width: 90%;
|
46
|
+
}
|
47
|
+
|
48
|
+
@media (max-width: 62rem) {
|
49
|
+
:host([size='xlarge']) {
|
50
|
+
--mdc-dialog-width: 100%;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
:host([size='fullscreen']) {
|
55
|
+
--mdc-dialog-width: 100%;
|
56
|
+
height: 100%;
|
57
|
+
border: none;
|
58
|
+
border-radius: 0;
|
59
|
+
}
|
60
|
+
|
43
61
|
:host {
|
44
62
|
width: var(--mdc-dialog-width);
|
45
63
|
max-width: 100%;
|
@@ -91,14 +109,13 @@ const styles = css `
|
|
91
109
|
|
92
110
|
:host::part(dialog-close-btn) {
|
93
111
|
position: absolute;
|
94
|
-
top:
|
95
|
-
right:
|
96
|
-
cursor: pointer;
|
112
|
+
top: var(--mdc-dialog-padding);
|
113
|
+
right: var(--mdc-dialog-padding);
|
97
114
|
}
|
98
115
|
|
99
116
|
:host(:dir(rtl))::part(dialog-close-btn) {
|
100
117
|
right: auto;
|
101
|
-
left:
|
118
|
+
left: var(--mdc-dialog-padding);
|
102
119
|
}
|
103
120
|
|
104
121
|
mdc-text::part(text) {
|