@momentum-design/components 0.85.7 → 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 +4 -4
- package/dist/react/dialog/index.d.ts +1 -1
- package/dist/react/dialog/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) {
|
@@ -9485,7 +9485,7 @@
|
|
9485
9485
|
"declarations": [
|
9486
9486
|
{
|
9487
9487
|
"kind": "class",
|
9488
|
-
"description": "Dialog component is a modal dialog that can be used to display information or prompt the user for input.\nIt can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.\nThe dialog is available in
|
9488
|
+
"description": "Dialog component is a modal dialog that can be used to display information or prompt the user for input.\nIt can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.\nThe dialog is available in 5 sizes: small, medium, large, xlarge and fullscreen. It may also receive custom styling/sizing.\nThe dialog interrupts the user and will block interaction with the rest of the application until it is closed.\n\nThe dialog can be controlled solely through the `visible` property, no trigger element is required.\nIf a `triggerId` is provided, the dialog will manage focus with that element, otherwise it will\nremember the previously focused element before the dialog was opened.\n\nThe dialog is a controlled component, meaning it does not have its own state management for visibility.\nUse the `visible` property to control the visibility of the dialog.\nUse the `onClose` event to handle the close action of the dialog (fired when Close button is clicked\nor Escape is pressed).\n\nDialog component have 2 variants: default and promotional.\n\n**Accessibility notes for consuming (have to be explicitly set when you consume the component)**\n\n- The dialog should have an aria-label or aria-labelledby attribute to provide a label for screen readers.\n- Use aria-labelledby to reference the ID of the element that labels the dialog when there is no visible title.\n\n**Note: Programmatic show/hide requires the ? prefix on the visible attribute**\n- Use `?visible=true/false` as an attribute instead of `visible=true/false`\n- Reference docs for more info: https://lit.dev/docs/templates/expressions/#boolean-attribute-expressions",
|
9489
9489
|
"name": "Dialog",
|
9490
9490
|
"cssProperties": [
|
9491
9491
|
{
|
@@ -9590,7 +9590,7 @@
|
|
9590
9590
|
"type": {
|
9591
9591
|
"text": "DialogSize"
|
9592
9592
|
},
|
9593
|
-
"description": "The size of the dialog, can be 'small' (432px width), 'medium' (656px width),
|
9593
|
+
"description": "The size of the dialog, can be 'small' (432px width), 'medium' (656px width), 'large' (992px width), 'xlarge' (90% width) or 'fullscreen' (100% width).",
|
9594
9594
|
"default": "small",
|
9595
9595
|
"attribute": "size",
|
9596
9596
|
"reflects": true
|
@@ -10378,7 +10378,7 @@
|
|
10378
10378
|
"type": {
|
10379
10379
|
"text": "DialogSize"
|
10380
10380
|
},
|
10381
|
-
"description": "The size of the dialog, can be 'small' (432px width), 'medium' (656px width),
|
10381
|
+
"description": "The size of the dialog, can be 'small' (432px width), 'medium' (656px width), 'large' (992px width), 'xlarge' (90% width) or 'fullscreen' (100% width).",
|
10382
10382
|
"default": "small",
|
10383
10383
|
"fieldName": "size"
|
10384
10384
|
},
|
@@ -10528,7 +10528,7 @@
|
|
10528
10528
|
"module": "/src/models"
|
10529
10529
|
},
|
10530
10530
|
"tagName": "mdc-dialog",
|
10531
|
-
"jsDoc": "/**\n * Dialog component is a modal dialog that can be used to display information or prompt the user for input.\n * It can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.\n * The dialog is available in
|
10531
|
+
"jsDoc": "/**\n * Dialog component is a modal dialog that can be used to display information or prompt the user for input.\n * It can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.\n * The dialog is available in 5 sizes: small, medium, large, xlarge and fullscreen. It may also receive custom styling/sizing.\n * The dialog interrupts the user and will block interaction with the rest of the application until it is closed.\n *\n * The dialog can be controlled solely through the `visible` property, no trigger element is required.\n * If a `triggerId` is provided, the dialog will manage focus with that element, otherwise it will\n * remember the previously focused element before the dialog was opened.\n *\n * The dialog is a controlled component, meaning it does not have its own state management for visibility.\n * Use the `visible` property to control the visibility of the dialog.\n * Use the `onClose` event to handle the close action of the dialog (fired when Close button is clicked\n * or Escape is pressed).\n *\n * Dialog component have 2 variants: default and promotional.\n *\n * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**\n *\n * - The dialog should have an aria-label or aria-labelledby attribute to provide a label for screen readers.\n * - Use aria-labelledby to reference the ID of the element that labels the dialog when there is no visible title.\n *\n * **Note: Programmatic show/hide requires the ? prefix on the visible attribute**\n * - Use `?visible=true/false` as an attribute instead of `visible=true/false`\n * - Reference docs for more info: https://lit.dev/docs/templates/expressions/#boolean-attribute-expressions\n *\n * @dependency mdc-button\n * @dependency mdc-text\n *\n * @tagname mdc-dialog\n *\n * @event shown - (React: onShown) Dispatched when the dialog is shown\n * @event hidden - (React: onHidden) Dispatched when the dialog is hidden\n * @event created - (React: onCreated) Dispatched when the dialog is created (added to the DOM)\n * @event destroyed - (React: onDestroyed) Dispatched when the dialog is destroyed (removed from the DOM)\n * @event close - (React: onClose) Dispatched when the Close Button is clicked or Escape key is pressed\n * (this does not hide the dialog)\n *\n * @cssproperty --mdc-dialog-primary-background-color - primary background color of the dialog\n * @cssproperty --mdc-dialog-border-color - border color of the dialog\n * @cssproperty --mdc-dialog-header-text-color - text color of the header/title of the dialog\n * @cssproperty --mdc-dialog-description-text-color - text color of the below header description of the dialog\n * @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog\n * @cssproperty --mdc-dialog-width - width of the dialog\n *\n * @slot header-prefix - Slot for the dialog header content. This can be used to pass custom header content.\n * @slot dialog-body - Slot for the dialog body content\n * @slot footer-link - This slot is for passing `mdc-link` component within the footer section.\n * @slot footer-button-secondary - This slot is for passing secondary variant of `mdc-button` component\n * within the footer section.\n * @slot footer-button-primary - This slot is for passing primary variant of\n * `mdc-button` component within the footer section.\n * @slot footer - This slot is for passing custom footer content. Only use this if really needed,\n * using the footer-link and footer-button slots is preferred\n */",
|
10532
10532
|
"customElement": true
|
10533
10533
|
}
|
10534
10534
|
],
|
@@ -3,7 +3,7 @@ import Component from '../../components/dialog';
|
|
3
3
|
/**
|
4
4
|
* Dialog component is a modal dialog that can be used to display information or prompt the user for input.
|
5
5
|
* It can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.
|
6
|
-
* The dialog is available in
|
6
|
+
* The dialog is available in 5 sizes: small, medium, large, xlarge and fullscreen. It may also receive custom styling/sizing.
|
7
7
|
* The dialog interrupts the user and will block interaction with the rest of the application until it is closed.
|
8
8
|
*
|
9
9
|
* The dialog can be controlled solely through the `visible` property, no trigger element is required.
|
@@ -5,7 +5,7 @@ import { TAG_NAME } from '../../components/dialog/dialog.constants';
|
|
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.
|
package/package.json
CHANGED