@momentum-design/components 0.133.2 → 0.133.3
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 +7 -3
- package/dist/browser/index.js.map +3 -3
- package/dist/components/dialog/dialog.component.d.ts +1 -0
- package/dist/components/dialog/dialog.component.js +1 -0
- package/dist/components/dialog/dialog.styles.js +2 -0
- package/dist/components/popover/popover.component.d.ts +1 -0
- package/dist/components/popover/popover.component.js +1 -0
- package/dist/components/popover/popover.styles.js +2 -0
- package/dist/custom-elements.json +50 -2
- package/dist/react/dialog/index.d.ts +1 -0
- package/dist/react/dialog/index.js +1 -0
- package/dist/react/popover/index.d.ts +1 -0
- package/dist/react/popover/index.js +1 -0
- package/dist/utils/mixins/BackdropMixin.js +5 -1
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ declare const Dialog_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
57
57
|
* @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
|
|
58
58
|
* @cssproperty --mdc-dialog-width - width of the dialog
|
|
59
59
|
* @cssproperty --mdc-dialog-height - height of the dialog
|
|
60
|
+
* @cssproperty --mdc-dialog-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
60
61
|
*
|
|
61
62
|
* @csspart body - The body section of the dialog.
|
|
62
63
|
* @csspart description-text - The description text of the dialog.
|
|
@@ -79,6 +79,7 @@ import styles from './dialog.styles';
|
|
|
79
79
|
* @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
|
|
80
80
|
* @cssproperty --mdc-dialog-width - width of the dialog
|
|
81
81
|
* @cssproperty --mdc-dialog-height - height of the dialog
|
|
82
|
+
* @cssproperty --mdc-dialog-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
82
83
|
*
|
|
83
84
|
* @csspart body - The body section of the dialog.
|
|
84
85
|
* @csspart description-text - The description text of the dialog.
|
|
@@ -9,6 +9,8 @@ const styles = css `
|
|
|
9
9
|
--mdc-dialog-width: 27rem; /* Default to small */
|
|
10
10
|
--mdc-dialog-height: auto;
|
|
11
11
|
--mdc-dialog-padding: 1.5rem;
|
|
12
|
+
--mdc-dialog-backdrop-color: var(--mds-color-theme-common-overlays-secondary-normal);
|
|
13
|
+
--mdc-backdrop-mixin-background-color: var(--mdc-dialog-backdrop-color);
|
|
12
14
|
|
|
13
15
|
background-color: var(--mdc-dialog-primary-background-color);
|
|
14
16
|
border: 0.0625rem solid var(--mdc-dialog-border-color);
|
|
@@ -71,6 +71,7 @@ declare const Popover_base: import("../../utils/mixins/index.types").Constructor
|
|
|
71
71
|
* @cssproperty --mdc-popover-max-width - max width of the popover
|
|
72
72
|
* @cssproperty --mdc-popover-max-height - max height of the popover
|
|
73
73
|
* @cssproperty --mdc-popover-width - width of the popover
|
|
74
|
+
* @cssproperty --mdc-popover-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
74
75
|
*
|
|
75
76
|
* @slot - Default slot for the popover content
|
|
76
77
|
*
|
|
@@ -91,6 +91,7 @@ import { PopoverUtils } from './popover.utils';
|
|
|
91
91
|
* @cssproperty --mdc-popover-max-width - max width of the popover
|
|
92
92
|
* @cssproperty --mdc-popover-max-height - max height of the popover
|
|
93
93
|
* @cssproperty --mdc-popover-width - width of the popover
|
|
94
|
+
* @cssproperty --mdc-popover-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
94
95
|
*
|
|
95
96
|
* @slot - Default slot for the popover content
|
|
96
97
|
*
|
|
@@ -13,6 +13,8 @@ const styles = css `
|
|
|
13
13
|
--mdc-popover-width: unset;
|
|
14
14
|
--mdc-popover-max-width: max-content;
|
|
15
15
|
--mdc-popover-max-height: auto;
|
|
16
|
+
--mdc-popover-backdrop-color: var(--mds-color-theme-common-overlays-secondary-normal);
|
|
17
|
+
--mdc-backdrop-mixin-background-color: var(--mdc-popover-backdrop-color);
|
|
16
18
|
|
|
17
19
|
display: none;
|
|
18
20
|
position: absolute;
|
|
@@ -2083,6 +2083,14 @@
|
|
|
2083
2083
|
"name": "Dialog",
|
|
2084
2084
|
"module": "src/components/dialog/dialog.component.ts"
|
|
2085
2085
|
}
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
"description": "background color of the backdrop (if backdrop is enabled)",
|
|
2089
|
+
"name": "--mdc-dialog-backdrop-color",
|
|
2090
|
+
"inheritedFrom": {
|
|
2091
|
+
"name": "Dialog",
|
|
2092
|
+
"module": "src/components/dialog/dialog.component.ts"
|
|
2093
|
+
}
|
|
2086
2094
|
}
|
|
2087
2095
|
],
|
|
2088
2096
|
"cssParts": [
|
|
@@ -12281,6 +12289,14 @@
|
|
|
12281
12289
|
"name": "Popover",
|
|
12282
12290
|
"module": "src/components/popover/popover.component.ts"
|
|
12283
12291
|
}
|
|
12292
|
+
},
|
|
12293
|
+
{
|
|
12294
|
+
"description": "background color of the backdrop (if backdrop is enabled)",
|
|
12295
|
+
"name": "--mdc-popover-backdrop-color",
|
|
12296
|
+
"inheritedFrom": {
|
|
12297
|
+
"name": "Popover",
|
|
12298
|
+
"module": "src/components/popover/popover.component.ts"
|
|
12299
|
+
}
|
|
12284
12300
|
}
|
|
12285
12301
|
],
|
|
12286
12302
|
"slots": [
|
|
@@ -16372,6 +16388,10 @@
|
|
|
16372
16388
|
{
|
|
16373
16389
|
"description": "height of the dialog",
|
|
16374
16390
|
"name": "--mdc-dialog-height"
|
|
16391
|
+
},
|
|
16392
|
+
{
|
|
16393
|
+
"description": "background color of the backdrop (if backdrop is enabled)",
|
|
16394
|
+
"name": "--mdc-dialog-backdrop-color"
|
|
16375
16395
|
}
|
|
16376
16396
|
],
|
|
16377
16397
|
"cssParts": [
|
|
@@ -16939,7 +16959,7 @@
|
|
|
16939
16959
|
"module": "/src/models"
|
|
16940
16960
|
},
|
|
16941
16961
|
"tagName": "mdc-dialog",
|
|
16942
|
-
"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 * Dialog component have 2 variants: default and promotional.\n *\n * ## Visibility\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 * ## Accessibility\n *\n * Some attributes have to be explicitly set by the consumer of 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 * ## Responsive design\n *\n * Dialog has few built in logic to prevent content clipping on small screens\n *\n * - maximum height limited to the viewport height\n * - dialog body has `overflow: auto` by default\n * - dialog itself also has `overflow: auto`, it activates only when the body can not shrink more\n *\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 * @cssproperty --mdc-dialog-height - height of the dialog\n *\n * @csspart body - The body section of the dialog.\n * @csspart description-text - The description text of the dialog.\n * @csspart dialog-close-btn - The close button of the dialog.\n * @csspart header - The header of the dialog.\n * @csspart header-section - The header section of the dialog.\n * @csspart header-text - The header text 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 */",
|
|
16962
|
+
"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 * Dialog component have 2 variants: default and promotional.\n *\n * ## Visibility\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 * ## Accessibility\n *\n * Some attributes have to be explicitly set by the consumer of 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 * ## Responsive design\n *\n * Dialog has few built in logic to prevent content clipping on small screens\n *\n * - maximum height limited to the viewport height\n * - dialog body has `overflow: auto` by default\n * - dialog itself also has `overflow: auto`, it activates only when the body can not shrink more\n *\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 * @cssproperty --mdc-dialog-height - height of the dialog\n * @cssproperty --mdc-dialog-backdrop-color - background color of the backdrop (if backdrop is enabled)\n *\n * @csspart body - The body section of the dialog.\n * @csspart description-text - The description text of the dialog.\n * @csspart dialog-close-btn - The close button of the dialog.\n * @csspart header - The header of the dialog.\n * @csspart header-section - The header section of the dialog.\n * @csspart header-text - The header text 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 */",
|
|
16943
16963
|
"customElement": true
|
|
16944
16964
|
}
|
|
16945
16965
|
],
|
|
@@ -29303,6 +29323,14 @@
|
|
|
29303
29323
|
"name": "Popover",
|
|
29304
29324
|
"module": "src/components/popover/popover.component.ts"
|
|
29305
29325
|
}
|
|
29326
|
+
},
|
|
29327
|
+
{
|
|
29328
|
+
"description": "background color of the backdrop (if backdrop is enabled)",
|
|
29329
|
+
"name": "--mdc-popover-backdrop-color",
|
|
29330
|
+
"inheritedFrom": {
|
|
29331
|
+
"name": "Popover",
|
|
29332
|
+
"module": "src/components/popover/popover.component.ts"
|
|
29333
|
+
}
|
|
29306
29334
|
}
|
|
29307
29335
|
]
|
|
29308
29336
|
}
|
|
@@ -33671,6 +33699,10 @@
|
|
|
33671
33699
|
{
|
|
33672
33700
|
"description": "width of the popover",
|
|
33673
33701
|
"name": "--mdc-popover-width"
|
|
33702
|
+
},
|
|
33703
|
+
{
|
|
33704
|
+
"description": "background color of the backdrop (if backdrop is enabled)",
|
|
33705
|
+
"name": "--mdc-popover-backdrop-color"
|
|
33674
33706
|
}
|
|
33675
33707
|
],
|
|
33676
33708
|
"cssParts": [
|
|
@@ -34597,7 +34629,7 @@
|
|
|
34597
34629
|
"module": "/src/models"
|
|
34598
34630
|
},
|
|
34599
34631
|
"tagName": "mdc-popover",
|
|
34600
|
-
"jsDoc": "/**\n * Popover is generic overlay which can be triggered by any actionable element.\n *\n * It can be used for tooltips, dropdowns, menus or any showing any other contextual content.\n *\n * The popover automatically positions itself based on available space and\n * supports dynamic height adjustments with scrollable content when needed.\n * It uses [Floating UI](https://floating-ui.com/) for maintaining the position of the popover.\n *\n * ## Limitations\n *\n * ### On trigger for multiple popovers\n *\n * A component (button, etc.) can trigger more than one popover, but only one of them should change the\n * aria-expanded and aria-haspopup attributes on the trigger.\n *\n * To prevent unexpected attribute changes on the trigger `disable-aria-expanded` attribute must be set on all linked\n * Popovers except one.\n *\n * ### React Popover with append-to attribute\n *\n * React mounts the popover based on the virtual DOM, but when the append-to attribute is set, the popover removes itself\n * and mounts to the specified element. React will not know about the move and will not know about the\n * newly created mdc-popoverportal element either. This throws a `NotFoundError` error when the Popover is directly\n * added/removed by React, for example:\n *\n * ```tsx\n * const SomeComponent = () => {\n * const [isOpen, setIsOpen] = useState(false);\n * return (<div>\n * {isOpen && <Popover append-to=\"some-element-id\">...</mdc-popover>}\n * </div>);\n * }\n * ```\n * As a workaround Popover need to wrap with any other element/component, for example:\n * ```tsx\n * const SomeComponent = () => {\n * const [isOpen, setIsOpen] = useState(false);\n * return (<div>\n * {isOpen && <div>\n * <Popover append-to=\"some-element-id\">...</mdc-popover>\n * <div>}\n * </div>);\n * }\n * ```\n * Note the wrapper <div> around the Popover component (React.Fragment does not work).\n *\n * @dependency mdc-button\n *\n * @tagname mdc-popover\n *\n * @event shown - (React: onShown) This event is dispatched when the popover is shown\n * @event hidden - (React: onHidden) This event is dispatched when the popover is hidden\n * @event created - (React: onCreated) This event is dispatched when the popover is created (added to the DOM)\n * @event destroyed - (React: onDestroyed) This event is dispatched when the popover is destroyed (removed from the DOM)\n *\n * @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border\n * @cssproperty --mdc-popover-arrow-border - border of the arrow\n * @cssproperty --mdc-popover-primary-background-color - primary background color of the popover\n * @cssproperty --mdc-popover-border-color - border color of the popover\n * @cssproperty --mdc-popover-inverted-background-color - inverted background color of the popover\n * @cssproperty --mdc-popover-inverted-border-color - inverted border color of the popover\n * @cssproperty --mdc-popover-inverted-text-color - inverted text color of the popover\n * @cssproperty --mdc-popover-elevation-3 - elevation of the popover\n * @cssproperty --mdc-popover-max-width - max width of the popover\n * @cssproperty --mdc-popover-max-height - max height of the popover\n * @cssproperty --mdc-popover-width - width of the popover\n *\n * @slot - Default slot for the popover content\n *\n * @csspart popover-close - The close button of the popover.\n * @csspart popover-content - The content of the popover.\n * @csspart popover-hover-bridge - The hover bridge of the popover.\n */",
|
|
34632
|
+
"jsDoc": "/**\n * Popover is generic overlay which can be triggered by any actionable element.\n *\n * It can be used for tooltips, dropdowns, menus or any showing any other contextual content.\n *\n * The popover automatically positions itself based on available space and\n * supports dynamic height adjustments with scrollable content when needed.\n * It uses [Floating UI](https://floating-ui.com/) for maintaining the position of the popover.\n *\n * ## Limitations\n *\n * ### On trigger for multiple popovers\n *\n * A component (button, etc.) can trigger more than one popover, but only one of them should change the\n * aria-expanded and aria-haspopup attributes on the trigger.\n *\n * To prevent unexpected attribute changes on the trigger `disable-aria-expanded` attribute must be set on all linked\n * Popovers except one.\n *\n * ### React Popover with append-to attribute\n *\n * React mounts the popover based on the virtual DOM, but when the append-to attribute is set, the popover removes itself\n * and mounts to the specified element. React will not know about the move and will not know about the\n * newly created mdc-popoverportal element either. This throws a `NotFoundError` error when the Popover is directly\n * added/removed by React, for example:\n *\n * ```tsx\n * const SomeComponent = () => {\n * const [isOpen, setIsOpen] = useState(false);\n * return (<div>\n * {isOpen && <Popover append-to=\"some-element-id\">...</mdc-popover>}\n * </div>);\n * }\n * ```\n * As a workaround Popover need to wrap with any other element/component, for example:\n * ```tsx\n * const SomeComponent = () => {\n * const [isOpen, setIsOpen] = useState(false);\n * return (<div>\n * {isOpen && <div>\n * <Popover append-to=\"some-element-id\">...</mdc-popover>\n * <div>}\n * </div>);\n * }\n * ```\n * Note the wrapper <div> around the Popover component (React.Fragment does not work).\n *\n * @dependency mdc-button\n *\n * @tagname mdc-popover\n *\n * @event shown - (React: onShown) This event is dispatched when the popover is shown\n * @event hidden - (React: onHidden) This event is dispatched when the popover is hidden\n * @event created - (React: onCreated) This event is dispatched when the popover is created (added to the DOM)\n * @event destroyed - (React: onDestroyed) This event is dispatched when the popover is destroyed (removed from the DOM)\n *\n * @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border\n * @cssproperty --mdc-popover-arrow-border - border of the arrow\n * @cssproperty --mdc-popover-primary-background-color - primary background color of the popover\n * @cssproperty --mdc-popover-border-color - border color of the popover\n * @cssproperty --mdc-popover-inverted-background-color - inverted background color of the popover\n * @cssproperty --mdc-popover-inverted-border-color - inverted border color of the popover\n * @cssproperty --mdc-popover-inverted-text-color - inverted text color of the popover\n * @cssproperty --mdc-popover-elevation-3 - elevation of the popover\n * @cssproperty --mdc-popover-max-width - max width of the popover\n * @cssproperty --mdc-popover-max-height - max height of the popover\n * @cssproperty --mdc-popover-width - width of the popover\n * @cssproperty --mdc-popover-backdrop-color - background color of the backdrop (if backdrop is enabled)\n *\n * @slot - Default slot for the popover content\n *\n * @csspart popover-close - The close button of the popover.\n * @csspart popover-content - The content of the popover.\n * @csspart popover-hover-bridge - The hover bridge of the popover.\n */",
|
|
34601
34633
|
"customElement": true
|
|
34602
34634
|
}
|
|
34603
34635
|
],
|
|
@@ -50525,6 +50557,14 @@
|
|
|
50525
50557
|
"name": "Popover",
|
|
50526
50558
|
"module": "src/components/popover/popover.component.ts"
|
|
50527
50559
|
}
|
|
50560
|
+
},
|
|
50561
|
+
{
|
|
50562
|
+
"description": "background color of the backdrop (if backdrop is enabled)",
|
|
50563
|
+
"name": "--mdc-popover-backdrop-color",
|
|
50564
|
+
"inheritedFrom": {
|
|
50565
|
+
"name": "Popover",
|
|
50566
|
+
"module": "src/components/popover/popover.component.ts"
|
|
50567
|
+
}
|
|
50528
50568
|
}
|
|
50529
50569
|
],
|
|
50530
50570
|
"slots": [
|
|
@@ -51967,6 +52007,14 @@
|
|
|
51967
52007
|
"name": "Popover",
|
|
51968
52008
|
"module": "src/components/popover/popover.component.ts"
|
|
51969
52009
|
}
|
|
52010
|
+
},
|
|
52011
|
+
{
|
|
52012
|
+
"description": "background color of the backdrop (if backdrop is enabled)",
|
|
52013
|
+
"name": "--mdc-popover-backdrop-color",
|
|
52014
|
+
"inheritedFrom": {
|
|
52015
|
+
"name": "Popover",
|
|
52016
|
+
"module": "src/components/popover/popover.component.ts"
|
|
52017
|
+
}
|
|
51970
52018
|
}
|
|
51971
52019
|
],
|
|
51972
52020
|
"members": [
|
|
@@ -55,6 +55,7 @@ import type { Events } from '../../components/dialog/dialog.types';
|
|
|
55
55
|
* @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
|
|
56
56
|
* @cssproperty --mdc-dialog-width - width of the dialog
|
|
57
57
|
* @cssproperty --mdc-dialog-height - height of the dialog
|
|
58
|
+
* @cssproperty --mdc-dialog-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
58
59
|
*
|
|
59
60
|
* @csspart body - The body section of the dialog.
|
|
60
61
|
* @csspart description-text - The description text of the dialog.
|
|
@@ -56,6 +56,7 @@ import { TAG_NAME } from '../../components/dialog/dialog.constants';
|
|
|
56
56
|
* @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
|
|
57
57
|
* @cssproperty --mdc-dialog-width - width of the dialog
|
|
58
58
|
* @cssproperty --mdc-dialog-height - height of the dialog
|
|
59
|
+
* @cssproperty --mdc-dialog-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
59
60
|
*
|
|
60
61
|
* @csspart body - The body section of the dialog.
|
|
61
62
|
* @csspart description-text - The description text of the dialog.
|
|
@@ -68,6 +68,7 @@ import type { Events } from '../../components/popover/popover.types';
|
|
|
68
68
|
* @cssproperty --mdc-popover-max-width - max width of the popover
|
|
69
69
|
* @cssproperty --mdc-popover-max-height - max height of the popover
|
|
70
70
|
* @cssproperty --mdc-popover-width - width of the popover
|
|
71
|
+
* @cssproperty --mdc-popover-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
71
72
|
*
|
|
72
73
|
* @slot - Default slot for the popover content
|
|
73
74
|
*
|
|
@@ -69,6 +69,7 @@ import { TAG_NAME } from '../../components/popover/popover.constants';
|
|
|
69
69
|
* @cssproperty --mdc-popover-max-width - max width of the popover
|
|
70
70
|
* @cssproperty --mdc-popover-max-height - max height of the popover
|
|
71
71
|
* @cssproperty --mdc-popover-width - width of the popover
|
|
72
|
+
* @cssproperty --mdc-popover-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
72
73
|
*
|
|
73
74
|
* @slot - Default slot for the popover content
|
|
74
75
|
*
|
|
@@ -37,6 +37,10 @@ export const BackdropMixin = (superClass) => {
|
|
|
37
37
|
const backdrop = document.createElement('div');
|
|
38
38
|
backdrop.classList.add(`${classNamePrefix}-backdrop`);
|
|
39
39
|
const styleElement = document.createElement('style');
|
|
40
|
+
const bgColor = this.isBackdropInvisible
|
|
41
|
+
? 'transparent'
|
|
42
|
+
: getComputedStyle(this).getPropertyValue('--mdc-backdrop-mixin-background-color') ||
|
|
43
|
+
`var(--mds-color-theme-common-overlays-secondary-normal)`;
|
|
40
44
|
styleElement.textContent = `
|
|
41
45
|
.${classNamePrefix}-backdrop {
|
|
42
46
|
position: fixed;
|
|
@@ -44,7 +48,7 @@ export const BackdropMixin = (superClass) => {
|
|
|
44
48
|
left: 0;
|
|
45
49
|
width: 100%;
|
|
46
50
|
height: 100%;
|
|
47
|
-
background: ${
|
|
51
|
+
background: ${bgColor};
|
|
48
52
|
z-index: ${this.zIndex + OVERLAY_BACKDROP_Z_INDEX_OFFSET};
|
|
49
53
|
}
|
|
50
54
|
`;
|