@momentum-design/components 0.133.1 → 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 +45 -6
- 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/components/tab/tab.component.d.ts +3 -25
- package/dist/components/tab/tab.component.js +29 -34
- package/dist/components/tab/tab.styles.js +20 -0
- package/dist/custom-elements.json +71 -28
- 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/react/tab/index.d.ts +2 -3
- package/dist/react/tab/index.js +2 -3
- 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;
|
|
@@ -51,10 +51,9 @@ declare const Tab_base: import("../../utils/mixins/index.types").Constructor<imp
|
|
|
51
51
|
* @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.
|
|
52
52
|
* @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
54
|
* @csspart container - The container of the tab.
|
|
57
|
-
* @csspart icon - The icon of the tab.
|
|
55
|
+
* @csspart regular-icon - The icon of the tab, if inactive.
|
|
56
|
+
* @csspart filled-icon - The icon of the tab, if active.
|
|
58
57
|
* @csspart indicator - The indicator of the tab.
|
|
59
58
|
* @csspart text - The text of the tab.
|
|
60
59
|
*/
|
|
@@ -94,20 +93,7 @@ declare class Tab extends Tab_base {
|
|
|
94
93
|
* @default undefined
|
|
95
94
|
*/
|
|
96
95
|
tabId?: string;
|
|
97
|
-
/**
|
|
98
|
-
* @internal
|
|
99
|
-
*/
|
|
100
|
-
private prevIconName?;
|
|
101
96
|
connectedCallback(): void;
|
|
102
|
-
/**
|
|
103
|
-
* Modifies the icon name based on the active state.
|
|
104
|
-
* If the tab is active, the icon name is suffixed with '-filled'.
|
|
105
|
-
* If the tab is inactive, the icon name is restored to its original value.
|
|
106
|
-
* If '-filled' icon is not available, the icon name remains unchanged.
|
|
107
|
-
*
|
|
108
|
-
* @param active - The active state.
|
|
109
|
-
*/
|
|
110
|
-
private modifyIconName;
|
|
111
97
|
/**
|
|
112
98
|
* Sets the variant attribute for the tab component.
|
|
113
99
|
* If the provided variant is not included in the TAB_VARIANTS,
|
|
@@ -122,15 +108,7 @@ declare class Tab extends Tab_base {
|
|
|
122
108
|
* @param active - The active state of the tab.
|
|
123
109
|
*/
|
|
124
110
|
private handleTabActiveChange;
|
|
125
|
-
|
|
126
|
-
* Sets the aria-selected attribute based on the active state of the Tab.
|
|
127
|
-
* If the tab is active, the filled version of the icon is displayed,
|
|
128
|
-
* else the icon is restored to its original value.
|
|
129
|
-
*
|
|
130
|
-
* @param element - The tab element.
|
|
131
|
-
* @param active - The active state of the tab.
|
|
132
|
-
*/
|
|
133
|
-
protected setActive(element: HTMLElement, active: boolean): void;
|
|
111
|
+
private getFilledIconName;
|
|
134
112
|
protected executeAction(): void;
|
|
135
113
|
update(changedProperties: PropertyValues): void;
|
|
136
114
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -9,6 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { html, nothing } from 'lit';
|
|
11
11
|
import { property } from 'lit/decorators.js';
|
|
12
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
13
|
import { getIconNameWithoutStyle } from '../button/button.utils';
|
|
13
14
|
import Buttonsimple from '../buttonsimple/buttonsimple.component';
|
|
14
15
|
import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
|
|
@@ -66,10 +67,9 @@ import styles from './tab.styles';
|
|
|
66
67
|
* @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.
|
|
67
68
|
* @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.
|
|
68
69
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
70
|
* @csspart container - The container of the tab.
|
|
72
|
-
* @csspart icon - The icon of the tab.
|
|
71
|
+
* @csspart regular-icon - The icon of the tab, if inactive.
|
|
72
|
+
* @csspart filled-icon - The icon of the tab, if active.
|
|
73
73
|
* @csspart indicator - The indicator of the tab.
|
|
74
74
|
* @csspart text - The text of the tab.
|
|
75
75
|
*/
|
|
@@ -121,25 +121,6 @@ class Tab extends IconNameMixin(LifeCycleMixin(Buttonsimple)) {
|
|
|
121
121
|
this.onerror('tab id is required');
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
/**
|
|
125
|
-
* Modifies the icon name based on the active state.
|
|
126
|
-
* If the tab is active, the icon name is suffixed with '-filled'.
|
|
127
|
-
* If the tab is inactive, the icon name is restored to its original value.
|
|
128
|
-
* If '-filled' icon is not available, the icon name remains unchanged.
|
|
129
|
-
*
|
|
130
|
-
* @param active - The active state.
|
|
131
|
-
*/
|
|
132
|
-
modifyIconName(active) {
|
|
133
|
-
if (this.iconName) {
|
|
134
|
-
if (active) {
|
|
135
|
-
this.prevIconName = this.iconName;
|
|
136
|
-
this.iconName = `${getIconNameWithoutStyle(this.iconName)}-filled`;
|
|
137
|
-
}
|
|
138
|
-
else if (this.prevIconName) {
|
|
139
|
-
this.iconName = this.prevIconName;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
124
|
/**
|
|
144
125
|
* Sets the variant attribute for the tab component.
|
|
145
126
|
* If the provided variant is not included in the TAB_VARIANTS,
|
|
@@ -150,17 +131,16 @@ class Tab extends IconNameMixin(LifeCycleMixin(Buttonsimple)) {
|
|
|
150
131
|
setVariant(variant) {
|
|
151
132
|
this.setAttribute('variant', Object.values(TAB_VARIANTS).includes(variant) ? variant : DEFAULTS.VARIANT);
|
|
152
133
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
this.modifyIconName(active);
|
|
134
|
+
getFilledIconName() {
|
|
135
|
+
if (!this.iconName) {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
const isFilled = this.iconName.endsWith('-filled');
|
|
139
|
+
if (isFilled) {
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
const baseIcon = getIconNameWithoutStyle(this.iconName);
|
|
143
|
+
return `${baseIcon}-filled`;
|
|
164
144
|
}
|
|
165
145
|
executeAction() {
|
|
166
146
|
// Toggle the active state of the tab.
|
|
@@ -178,7 +158,22 @@ class Tab extends IconNameMixin(LifeCycleMixin(Buttonsimple)) {
|
|
|
178
158
|
<div part="leading">
|
|
179
159
|
<slot name="prefix">
|
|
180
160
|
${this.iconName
|
|
181
|
-
? html `
|
|
161
|
+
? html `
|
|
162
|
+
<div part="icon-container">
|
|
163
|
+
<mdc-icon
|
|
164
|
+
name="${this.iconName}"
|
|
165
|
+
size="1"
|
|
166
|
+
length-unit="rem"
|
|
167
|
+
part="regular-icon"
|
|
168
|
+
></mdc-icon>
|
|
169
|
+
<mdc-icon
|
|
170
|
+
name="${ifDefined(this.getFilledIconName())}"
|
|
171
|
+
size="1"
|
|
172
|
+
length-unit="rem"
|
|
173
|
+
part="filled-icon"
|
|
174
|
+
></mdc-icon>
|
|
175
|
+
</div>
|
|
176
|
+
`
|
|
182
177
|
: nothing}
|
|
183
178
|
</slot>
|
|
184
179
|
${this.text
|
|
@@ -44,6 +44,26 @@ const styles = [
|
|
|
44
44
|
justify-content: var(--mdc-tab-content-justification);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
:host::part(icon-container) {
|
|
48
|
+
position: relative;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([active])::part(regular-icon) {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([active])::part(filled-icon) {
|
|
56
|
+
display: block;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host::part(regular-icon) {
|
|
60
|
+
display: block;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host::part(filled-icon) {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
47
67
|
:host::part(leading),
|
|
48
68
|
:host::part(trailing) {
|
|
49
69
|
display: flex;
|
|
@@ -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
|
],
|
|
@@ -45488,8 +45520,12 @@
|
|
|
45488
45520
|
"name": "container"
|
|
45489
45521
|
},
|
|
45490
45522
|
{
|
|
45491
|
-
"description": "The icon of the tab.",
|
|
45492
|
-
"name": "icon"
|
|
45523
|
+
"description": "The icon of the tab, if inactive.",
|
|
45524
|
+
"name": "regular-icon"
|
|
45525
|
+
},
|
|
45526
|
+
{
|
|
45527
|
+
"description": "The icon of the tab, if active.",
|
|
45528
|
+
"name": "filled-icon"
|
|
45493
45529
|
},
|
|
45494
45530
|
{
|
|
45495
45531
|
"description": "The indicator of the tab.",
|
|
@@ -45570,6 +45606,16 @@
|
|
|
45570
45606
|
"module": "components/buttonsimple/buttonsimple.component.js"
|
|
45571
45607
|
}
|
|
45572
45608
|
},
|
|
45609
|
+
{
|
|
45610
|
+
"kind": "method",
|
|
45611
|
+
"name": "getFilledIconName",
|
|
45612
|
+
"privacy": "private",
|
|
45613
|
+
"return": {
|
|
45614
|
+
"type": {
|
|
45615
|
+
"text": "IconNames | undefined"
|
|
45616
|
+
}
|
|
45617
|
+
}
|
|
45618
|
+
},
|
|
45573
45619
|
{
|
|
45574
45620
|
"kind": "method",
|
|
45575
45621
|
"name": "handleBlur",
|
|
@@ -45645,26 +45691,6 @@
|
|
|
45645
45691
|
"module": "utils/mixins/IconNameMixin.js"
|
|
45646
45692
|
}
|
|
45647
45693
|
},
|
|
45648
|
-
{
|
|
45649
|
-
"kind": "method",
|
|
45650
|
-
"name": "modifyIconName",
|
|
45651
|
-
"privacy": "private",
|
|
45652
|
-
"return": {
|
|
45653
|
-
"type": {
|
|
45654
|
-
"text": "void"
|
|
45655
|
-
}
|
|
45656
|
-
},
|
|
45657
|
-
"parameters": [
|
|
45658
|
-
{
|
|
45659
|
-
"name": "active",
|
|
45660
|
-
"type": {
|
|
45661
|
-
"text": "boolean"
|
|
45662
|
-
},
|
|
45663
|
-
"description": "The active state."
|
|
45664
|
-
}
|
|
45665
|
-
],
|
|
45666
|
-
"description": "Modifies the icon name based on the active state.\nIf the tab is active, the icon name is suffixed with '-filled'.\nIf the tab is inactive, the icon name is restored to its original value.\nIf '-filled' icon is not available, the icon name remains unchanged."
|
|
45667
|
-
},
|
|
45668
45694
|
{
|
|
45669
45695
|
"kind": "field",
|
|
45670
45696
|
"name": "name",
|
|
@@ -45704,17 +45730,18 @@
|
|
|
45704
45730
|
"type": {
|
|
45705
45731
|
"text": "HTMLElement"
|
|
45706
45732
|
},
|
|
45707
|
-
"description": "The
|
|
45733
|
+
"description": "The button element"
|
|
45708
45734
|
},
|
|
45709
45735
|
{
|
|
45710
45736
|
"name": "active",
|
|
45737
|
+
"optional": true,
|
|
45711
45738
|
"type": {
|
|
45712
45739
|
"text": "boolean"
|
|
45713
45740
|
},
|
|
45714
|
-
"description": "The active state of the
|
|
45741
|
+
"description": "The active state of the element"
|
|
45715
45742
|
}
|
|
45716
45743
|
],
|
|
45717
|
-
"description": "Sets the
|
|
45744
|
+
"description": "Sets the ariaStateKey attributes based on the active state of the button.",
|
|
45718
45745
|
"inheritedFrom": {
|
|
45719
45746
|
"name": "Buttonsimple",
|
|
45720
45747
|
"module": "components/buttonsimple/buttonsimple.component.js"
|
|
@@ -46149,7 +46176,7 @@
|
|
|
46149
46176
|
"module": "/src/components/buttonsimple/buttonsimple.component"
|
|
46150
46177
|
},
|
|
46151
46178
|
"tagName": "mdc-tab",
|
|
46152
|
-
"jsDoc": "/**\n * `mdc-tab` is Tab component to be used within the Tabgroup.\n *\n * Passing in the attribute `text` to the tab component is changing the text displayed in the tab.\n *\n * Pass attribute `tabid` when using inside of `tablist` component.\n *\n * The `slot=\"badge\"` can be used to add a badge to the tab.\n *\n * The `slot=\"chip\"` can be used to add a chip to the tab.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * Note: Icons can be used in conjunction with badges or chips.\n * Badges and chips should not be used at the same time.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the tab is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the tab.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the tab.\n * @event focus - (React: onFocus) This event is dispatched when the tab receives focus.\n * @event activechange - (React: onActiveChange) This event is dispatched when the active state of the tab changes\n * <br />\n * Event Data: `detail: { tabId: this.tabId, active }`\n * <br />\n * Note: the activechange event is used by the tab list component to react to the change in state of the tab,\n * so this event won't be needed if the tab list is used.\n *\n * @tagname mdc-tab\n *\n * @cssproperty --mdc-tab-height - The height of the tab.\n * @cssproperty --mdc-tab-padding-left - The left padding of the tab.\n * @cssproperty --mdc-tab-padding-right - The right padding of the tab.\n * @cssproperty --mdc-tab-content-gap - The gap between the icon and text in the tab.\n * @cssproperty --mdc-tab-background-color - The background color of the tab.\n * @cssproperty --mdc-tab-color - The text color of the tab.\n * @cssproperty --mdc-tab-border-radius - The border radius of the tab.\n * @cssproperty --mdc-tab-content-justification - The justification of the content in the tab.\n *\n * @cssproperty --mdc-tab-line-active-indicator-height - The height of the active indicator line.\n * @cssproperty --mdc-tab-line-active-indicator-width - The width of the active indicator line.\n *\n * @cssproperty --mdc-tab-line-border-bottom-left-radius - The border bottom left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-bottom-right-radius - The border bottom right radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.\n *\n
|
|
46179
|
+
"jsDoc": "/**\n * `mdc-tab` is Tab component to be used within the Tabgroup.\n *\n * Passing in the attribute `text` to the tab component is changing the text displayed in the tab.\n *\n * Pass attribute `tabid` when using inside of `tablist` component.\n *\n * The `slot=\"badge\"` can be used to add a badge to the tab.\n *\n * The `slot=\"chip\"` can be used to add a chip to the tab.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * Note: Icons can be used in conjunction with badges or chips.\n * Badges and chips should not be used at the same time.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the tab is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the tab.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the tab.\n * @event focus - (React: onFocus) This event is dispatched when the tab receives focus.\n * @event activechange - (React: onActiveChange) This event is dispatched when the active state of the tab changes\n * <br />\n * Event Data: `detail: { tabId: this.tabId, active }`\n * <br />\n * Note: the activechange event is used by the tab list component to react to the change in state of the tab,\n * so this event won't be needed if the tab list is used.\n *\n * @tagname mdc-tab\n *\n * @cssproperty --mdc-tab-height - The height of the tab.\n * @cssproperty --mdc-tab-padding-left - The left padding of the tab.\n * @cssproperty --mdc-tab-padding-right - The right padding of the tab.\n * @cssproperty --mdc-tab-content-gap - The gap between the icon and text in the tab.\n * @cssproperty --mdc-tab-background-color - The background color of the tab.\n * @cssproperty --mdc-tab-color - The text color of the tab.\n * @cssproperty --mdc-tab-border-radius - The border radius of the tab.\n * @cssproperty --mdc-tab-content-justification - The justification of the content in the tab.\n *\n * @cssproperty --mdc-tab-line-active-indicator-height - The height of the active indicator line.\n * @cssproperty --mdc-tab-line-active-indicator-width - The width of the active indicator line.\n *\n * @cssproperty --mdc-tab-line-border-bottom-left-radius - The border bottom left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-bottom-right-radius - The border bottom right radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.\n * @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.\n *\n * @csspart container - The container of the tab.\n * @csspart regular-icon - The icon of the tab, if inactive.\n * @csspart filled-icon - The icon of the tab, if active.\n * @csspart indicator - The indicator of the tab.\n * @csspart text - The text of the tab.\n */",
|
|
46153
46180
|
"customElement": true,
|
|
46154
46181
|
"slots": [
|
|
46155
46182
|
{
|
|
@@ -50530,6 +50557,14 @@
|
|
|
50530
50557
|
"name": "Popover",
|
|
50531
50558
|
"module": "src/components/popover/popover.component.ts"
|
|
50532
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
|
+
}
|
|
50533
50568
|
}
|
|
50534
50569
|
],
|
|
50535
50570
|
"slots": [
|
|
@@ -51972,6 +52007,14 @@
|
|
|
51972
52007
|
"name": "Popover",
|
|
51973
52008
|
"module": "src/components/popover/popover.component.ts"
|
|
51974
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
|
+
}
|
|
51975
52018
|
}
|
|
51976
52019
|
],
|
|
51977
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
|
*
|
|
@@ -51,10 +51,9 @@ import type { Events as EventsInherited } from '../../components/buttonsimple/bu
|
|
|
51
51
|
* @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.
|
|
52
52
|
* @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
54
|
* @csspart container - The container of the tab.
|
|
57
|
-
* @csspart icon - The icon of the tab.
|
|
55
|
+
* @csspart regular-icon - The icon of the tab, if inactive.
|
|
56
|
+
* @csspart filled-icon - The icon of the tab, if active.
|
|
58
57
|
* @csspart indicator - The indicator of the tab.
|
|
59
58
|
* @csspart text - The text of the tab.
|
|
60
59
|
*/
|
package/dist/react/tab/index.js
CHANGED
|
@@ -51,10 +51,9 @@ import { TAG_NAME } from '../../components/tab/tab.constants';
|
|
|
51
51
|
* @cssproperty --mdc-tab-line-border-top-left-radius - The border top left radius of the active indicator line.
|
|
52
52
|
* @cssproperty --mdc-tab-line-border-top-right-radius - The border top right radius of the active indicator line.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
54
|
* @csspart container - The container of the tab.
|
|
57
|
-
* @csspart icon - The icon of the tab.
|
|
55
|
+
* @csspart regular-icon - The icon of the tab, if inactive.
|
|
56
|
+
* @csspart filled-icon - The icon of the tab, if active.
|
|
58
57
|
* @csspart indicator - The indicator of the tab.
|
|
59
58
|
* @csspart text - The text of the tab.
|
|
60
59
|
*/
|
|
@@ -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
|
`;
|