@momentum-design/components 0.134.22 → 0.135.1
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 +395 -313
- package/dist/browser/index.js.map +4 -4
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +7 -3
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +2 -7
- package/dist/components/formfieldwrapper/formfieldwrapper.styles.js +10 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.types.d.ts +2 -2
- package/dist/components/formfieldwrapper/formfieldwrapper.utils.js +2 -11
- package/dist/components/formfieldwrapper/index.d.ts +1 -0
- package/dist/components/formfieldwrapper/index.js +1 -0
- package/dist/components/spatialnavigationprovider/spatialnavigationprovider.component.js +10 -7
- package/dist/components/statusmessage/index.d.ts +9 -0
- package/dist/components/statusmessage/index.js +8 -0
- package/dist/components/statusmessage/statusmessage.component.d.ts +54 -0
- package/dist/components/statusmessage/statusmessage.component.js +80 -0
- package/dist/components/statusmessage/statusmessage.constants.d.ts +28 -0
- package/dist/components/statusmessage/statusmessage.constants.js +31 -0
- package/dist/components/statusmessage/statusmessage.styles.d.ts +2 -0
- package/dist/components/statusmessage/statusmessage.styles.js +66 -0
- package/dist/components/statusmessage/statusmessage.types.d.ts +5 -0
- package/dist/components/statusmessage/statusmessage.types.js +2 -0
- package/dist/custom-elements.json +130 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/statusmessage/index.d.ts +37 -0
- package/dist/react/statusmessage/index.js +32 -0
- package/package.json +2 -2
|
@@ -193,10 +193,14 @@ class FormfieldWrapper extends DisabledMixin(Component) {
|
|
|
193
193
|
if (!this.helpText) {
|
|
194
194
|
return nothing;
|
|
195
195
|
}
|
|
196
|
-
return html `<
|
|
197
|
-
|
|
196
|
+
return html `<mdc-statusmessage
|
|
197
|
+
part="help-text-container"
|
|
198
|
+
severity="${DEFAULTS.VALIDATION}"
|
|
199
|
+
exportparts="container: help-text-container, icon: helper-icon, text: help-text"
|
|
200
|
+
>
|
|
201
|
+
<slot name="help-icon" slot="icon">${this.renderHelpTextIcon()}</slot>
|
|
198
202
|
<slot name="help-text">${this.renderHelpText()}</slot>
|
|
199
|
-
</
|
|
203
|
+
</mdc-statusmessage>`;
|
|
200
204
|
}
|
|
201
205
|
}
|
|
202
206
|
FormfieldWrapper.styles = [...Component.styles, ...styles];
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import utils from '../../utils/tag-name';
|
|
2
2
|
import { POPOVER_PLACEMENT, STRATEGY } from '../popover/popover.constants';
|
|
3
3
|
import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
|
|
4
|
+
import { STATUSMESSAGE_SEVERITY } from '../statusmessage/statusmessage.constants';
|
|
4
5
|
const TAG_NAME = utils.constructTagName('formfieldwrapper');
|
|
5
|
-
const VALIDATION =
|
|
6
|
-
DEFAULT: 'default',
|
|
7
|
-
ERROR: 'error',
|
|
8
|
-
PRIORITY: 'priority',
|
|
9
|
-
SUCCESS: 'success',
|
|
10
|
-
WARNING: 'warning',
|
|
11
|
-
};
|
|
6
|
+
const VALIDATION = STATUSMESSAGE_SEVERITY;
|
|
12
7
|
const DEFAULTS = {
|
|
13
8
|
VALIDATION: VALIDATION.DEFAULT,
|
|
14
9
|
HELPER_TEXT_ID: 'helper-text-id',
|
|
@@ -59,6 +59,16 @@ const styles = css `
|
|
|
59
59
|
color: var(--mdc-help-text-color);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
mdc-statusmessage[part='help-text-container'] {
|
|
63
|
+
--mdc-statusmessage-color: var(--mdc-help-text-color);
|
|
64
|
+
--mdc-statusmessage-font-size: var(--mdc-help-text-font-size);
|
|
65
|
+
--mdc-statusmessage-font-weight: var(--mdc-help-text-font-weight);
|
|
66
|
+
--mdc-statusmessage-line-height: var(--mdc-help-text-line-height);
|
|
67
|
+
--mdc-statusmessage-gap: 0.5rem;
|
|
68
|
+
|
|
69
|
+
width: 100%;
|
|
70
|
+
}
|
|
71
|
+
|
|
62
72
|
:host::part(info-icon-btn) {
|
|
63
73
|
align-self: flex-start;
|
|
64
74
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ValueOf } from '../../utils/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { StatusMessageIcon } from '../statusmessage/statusmessage.types';
|
|
3
3
|
import { VALIDATION } from './formfieldwrapper.constants';
|
|
4
4
|
type ValidationType = ValueOf<typeof VALIDATION>;
|
|
5
|
-
type HelperIconsList =
|
|
5
|
+
type HelperIconsList = StatusMessageIcon;
|
|
6
6
|
export type { HelperIconsList, ValidationType };
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const getHelperIcon = (type) =>
|
|
3
|
-
const helperIconSizeMap = {
|
|
4
|
-
[VALIDATION.ERROR]: 'error-legacy-badge-filled',
|
|
5
|
-
[VALIDATION.WARNING]: 'warning-badge-filled',
|
|
6
|
-
[VALIDATION.SUCCESS]: 'check-circle-badge-filled',
|
|
7
|
-
[VALIDATION.PRIORITY]: 'priority-badge-filled',
|
|
8
|
-
[VALIDATION.DEFAULT]: '',
|
|
9
|
-
};
|
|
10
|
-
return helperIconSizeMap[type] || '';
|
|
11
|
-
};
|
|
1
|
+
import { STATUSMESSAGE_ICON_NAME_BY_SEVERITY } from '../statusmessage/statusmessage.constants';
|
|
2
|
+
const getHelperIcon = (type) => STATUSMESSAGE_ICON_NAME_BY_SEVERITY[type] || '';
|
|
12
3
|
export { getHelperIcon };
|
|
@@ -500,13 +500,16 @@ class SpatialNavigationProvider extends Provider {
|
|
|
500
500
|
goBack() {
|
|
501
501
|
const goBackElement = findFocusable(this.root).find(el => el.hasAttribute(DATA_ATTRIBUTES.GO_BACK));
|
|
502
502
|
const isDefaultPrevented = this.emitGoBackEvent(goBackElement);
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
503
|
+
// Skip default behavior when event was prevented by the user
|
|
504
|
+
if (!isDefaultPrevented) {
|
|
505
|
+
if (goBackElement) {
|
|
506
|
+
goBackElement.click();
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
if (window.history.length > this.initialHistoryLength) {
|
|
510
|
+
window.history.back();
|
|
511
|
+
return true;
|
|
512
|
+
}
|
|
510
513
|
}
|
|
511
514
|
return false;
|
|
512
515
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CSSResult } from 'lit';
|
|
2
|
+
import { Component } from '../../models';
|
|
3
|
+
import type { StatusMessageSeverity } from './statusmessage.types';
|
|
4
|
+
/**
|
|
5
|
+
* The status message is a compact inline message used to communicate helper, validation, or status text with an optional severity icon. It is intentionally lightweight and does not behave like an alert or live region by default.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use `mdc-statusmessage` for short inline messages that sit near a related control, setting, or content region.
|
|
10
|
+
* - Use a severity when the message needs a visual state such as error, warning, success, or priority.
|
|
11
|
+
* - Use the `icon` slot when a custom visual icon is required instead of the built-in severity icon.
|
|
12
|
+
*
|
|
13
|
+
* **When not to use**
|
|
14
|
+
*
|
|
15
|
+
* - Use `mdc-banner`, `mdc-toast`, or `mdc-announcementdialog` when the message needs more prominence, actions, dismissal, or system-level announcement behaviour.
|
|
16
|
+
* - Use form components' `help-text` APIs for standard field helper or validation text; those components compose `mdc-statusmessage` internally.
|
|
17
|
+
* - Use plain `mdc-text` when no severity styling or icon treatment is needed.
|
|
18
|
+
*
|
|
19
|
+
* @tagname mdc-statusmessage
|
|
20
|
+
*
|
|
21
|
+
* @dependency mdc-icon
|
|
22
|
+
* @dependency mdc-text
|
|
23
|
+
*
|
|
24
|
+
* @slot default - Message content. Slotted content takes precedence over the `message` attribute.
|
|
25
|
+
* @slot icon - Custom icon content. Overrides the default severity icon.
|
|
26
|
+
*
|
|
27
|
+
* @csspart container - The container for the icon and message text.
|
|
28
|
+
* @csspart icon - The default severity icon slot or rendered icon.
|
|
29
|
+
* @csspart text - The rendered message text when using the `message` attribute.
|
|
30
|
+
*
|
|
31
|
+
* @cssproperty --mdc-statusmessage-color - Color for the icon and message text.
|
|
32
|
+
* @cssproperty --mdc-statusmessage-font-size - Font size for the message text.
|
|
33
|
+
* @cssproperty --mdc-statusmessage-font-weight - Font weight for the message text.
|
|
34
|
+
* @cssproperty --mdc-statusmessage-line-height - Line height for the message text.
|
|
35
|
+
* @cssproperty --mdc-statusmessage-gap - Gap between the icon and message text.
|
|
36
|
+
* @cssproperty --mdc-statusmessage-icon-size - Width and height of the default severity icon.
|
|
37
|
+
*/
|
|
38
|
+
declare class StatusMessage extends Component {
|
|
39
|
+
/**
|
|
40
|
+
* The severity used to set the status message color and default icon.
|
|
41
|
+
* Can be `default`, `error`, `warning`, `success`, or `priority`.
|
|
42
|
+
* @default default
|
|
43
|
+
*/
|
|
44
|
+
severity: StatusMessageSeverity;
|
|
45
|
+
/**
|
|
46
|
+
* Message text to render when no default slot content is provided.
|
|
47
|
+
*/
|
|
48
|
+
message?: string;
|
|
49
|
+
private renderIcon;
|
|
50
|
+
private renderMessage;
|
|
51
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
52
|
+
static styles: Array<CSSResult>;
|
|
53
|
+
}
|
|
54
|
+
export default StatusMessage;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
// AI-Assisted
|
|
11
|
+
import { html, nothing } from 'lit';
|
|
12
|
+
import { property } from 'lit/decorators.js';
|
|
13
|
+
import { Component } from '../../models';
|
|
14
|
+
import { DEFAULTS, STATUSMESSAGE_ICON_NAME_BY_SEVERITY } from './statusmessage.constants';
|
|
15
|
+
import styles from './statusmessage.styles';
|
|
16
|
+
/**
|
|
17
|
+
* @tagname mdc-statusmessage
|
|
18
|
+
*
|
|
19
|
+
* @dependency mdc-icon
|
|
20
|
+
* @dependency mdc-text
|
|
21
|
+
*
|
|
22
|
+
* @slot default - Message content. Slotted content takes precedence over the `message` attribute.
|
|
23
|
+
* @slot icon - Custom icon content. Overrides the default severity icon.
|
|
24
|
+
*
|
|
25
|
+
* @csspart container - The container for the icon and message text.
|
|
26
|
+
* @csspart icon - The default severity icon slot or rendered icon.
|
|
27
|
+
* @csspart text - The rendered message text when using the `message` attribute.
|
|
28
|
+
*
|
|
29
|
+
* @cssproperty --mdc-statusmessage-color - Color for the icon and message text.
|
|
30
|
+
* @cssproperty --mdc-statusmessage-font-size - Font size for the message text.
|
|
31
|
+
* @cssproperty --mdc-statusmessage-font-weight - Font weight for the message text.
|
|
32
|
+
* @cssproperty --mdc-statusmessage-line-height - Line height for the message text.
|
|
33
|
+
* @cssproperty --mdc-statusmessage-gap - Gap between the icon and message text.
|
|
34
|
+
* @cssproperty --mdc-statusmessage-icon-size - Width and height of the default severity icon.
|
|
35
|
+
*/
|
|
36
|
+
class StatusMessage extends Component {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments);
|
|
39
|
+
/**
|
|
40
|
+
* The severity used to set the status message color and default icon.
|
|
41
|
+
* Can be `default`, `error`, `warning`, `success`, or `priority`.
|
|
42
|
+
* @default default
|
|
43
|
+
*/
|
|
44
|
+
this.severity = DEFAULTS.SEVERITY;
|
|
45
|
+
}
|
|
46
|
+
renderIcon() {
|
|
47
|
+
const icon = STATUSMESSAGE_ICON_NAME_BY_SEVERITY[this.severity || DEFAULTS.SEVERITY];
|
|
48
|
+
if (!icon) {
|
|
49
|
+
return nothing;
|
|
50
|
+
}
|
|
51
|
+
return html `<mdc-icon part="icon" name="${icon}"></mdc-icon>`;
|
|
52
|
+
}
|
|
53
|
+
renderMessage() {
|
|
54
|
+
if (!this.message) {
|
|
55
|
+
return nothing;
|
|
56
|
+
}
|
|
57
|
+
return html `
|
|
58
|
+
<mdc-text part="text" tagname="${DEFAULTS.TEXT_TAGNAME}" type="${DEFAULTS.TEXT_TYPE}">${this.message}</mdc-text>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return html `
|
|
63
|
+
<div part="container">
|
|
64
|
+
<slot name="icon" part="icon">${this.renderIcon()}</slot>
|
|
65
|
+
<slot part="text">${this.renderMessage()}</slot>
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
StatusMessage.styles = [...Component.styles, ...styles];
|
|
71
|
+
__decorate([
|
|
72
|
+
property({ type: String, reflect: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], StatusMessage.prototype, "severity", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
property({ type: String, reflect: true }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], StatusMessage.prototype, "message", void 0);
|
|
79
|
+
export default StatusMessage;
|
|
80
|
+
// End AI-Assisted
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
|
2
|
+
declare const TAG_NAME: "mdc-statusmessage";
|
|
3
|
+
declare const STATUSMESSAGE_SEVERITY: {
|
|
4
|
+
readonly DEFAULT: "default";
|
|
5
|
+
readonly ERROR: "error";
|
|
6
|
+
readonly PRIORITY: "priority";
|
|
7
|
+
readonly SUCCESS: "success";
|
|
8
|
+
readonly WARNING: "warning";
|
|
9
|
+
};
|
|
10
|
+
declare const STATUSMESSAGE_ICON_NAMES: {
|
|
11
|
+
readonly ERROR: Extract<IconNames, "error-legacy-badge-filled">;
|
|
12
|
+
readonly WARNING: Extract<IconNames, "warning-badge-filled">;
|
|
13
|
+
readonly SUCCESS: Extract<IconNames, "check-circle-badge-filled">;
|
|
14
|
+
readonly PRIORITY: Extract<IconNames, "priority-badge-filled">;
|
|
15
|
+
};
|
|
16
|
+
declare const STATUSMESSAGE_ICON_NAME_BY_SEVERITY: {
|
|
17
|
+
readonly default: "";
|
|
18
|
+
readonly error: "error-legacy-badge-filled";
|
|
19
|
+
readonly warning: "warning-badge-filled";
|
|
20
|
+
readonly success: "check-circle-badge-filled";
|
|
21
|
+
readonly priority: "priority-badge-filled";
|
|
22
|
+
};
|
|
23
|
+
declare const DEFAULTS: {
|
|
24
|
+
readonly SEVERITY: "default";
|
|
25
|
+
readonly TEXT_TAGNAME: "span";
|
|
26
|
+
readonly TEXT_TYPE: "body-midsize-regular";
|
|
27
|
+
};
|
|
28
|
+
export { DEFAULTS, STATUSMESSAGE_ICON_NAME_BY_SEVERITY, STATUSMESSAGE_ICON_NAMES, STATUSMESSAGE_SEVERITY, TAG_NAME };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// AI-Assisted
|
|
2
|
+
import utils from '../../utils/tag-name';
|
|
3
|
+
import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
|
|
4
|
+
const TAG_NAME = utils.constructTagName('statusmessage');
|
|
5
|
+
const STATUSMESSAGE_SEVERITY = {
|
|
6
|
+
DEFAULT: 'default',
|
|
7
|
+
ERROR: 'error',
|
|
8
|
+
PRIORITY: 'priority',
|
|
9
|
+
SUCCESS: 'success',
|
|
10
|
+
WARNING: 'warning',
|
|
11
|
+
};
|
|
12
|
+
const STATUSMESSAGE_ICON_NAMES = {
|
|
13
|
+
ERROR: 'error-legacy-badge-filled',
|
|
14
|
+
WARNING: 'warning-badge-filled',
|
|
15
|
+
SUCCESS: 'check-circle-badge-filled',
|
|
16
|
+
PRIORITY: 'priority-badge-filled',
|
|
17
|
+
};
|
|
18
|
+
const STATUSMESSAGE_ICON_NAME_BY_SEVERITY = {
|
|
19
|
+
[STATUSMESSAGE_SEVERITY.DEFAULT]: '',
|
|
20
|
+
[STATUSMESSAGE_SEVERITY.ERROR]: STATUSMESSAGE_ICON_NAMES.ERROR,
|
|
21
|
+
[STATUSMESSAGE_SEVERITY.WARNING]: STATUSMESSAGE_ICON_NAMES.WARNING,
|
|
22
|
+
[STATUSMESSAGE_SEVERITY.SUCCESS]: STATUSMESSAGE_ICON_NAMES.SUCCESS,
|
|
23
|
+
[STATUSMESSAGE_SEVERITY.PRIORITY]: STATUSMESSAGE_ICON_NAMES.PRIORITY,
|
|
24
|
+
};
|
|
25
|
+
const DEFAULTS = {
|
|
26
|
+
SEVERITY: STATUSMESSAGE_SEVERITY.DEFAULT,
|
|
27
|
+
TEXT_TAGNAME: VALID_TEXT_TAGS.SPAN,
|
|
28
|
+
TEXT_TYPE: TYPE.BODY_MIDSIZE_REGULAR,
|
|
29
|
+
};
|
|
30
|
+
export { DEFAULTS, STATUSMESSAGE_ICON_NAME_BY_SEVERITY, STATUSMESSAGE_ICON_NAMES, STATUSMESSAGE_SEVERITY, TAG_NAME };
|
|
31
|
+
// End AI-Assisted
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// AI-Assisted
|
|
2
|
+
import { css } from 'lit';
|
|
3
|
+
const styles = css `
|
|
4
|
+
:host {
|
|
5
|
+
--mdc-statusmessage-color: var(--mds-color-theme-text-secondary-normal);
|
|
6
|
+
--mdc-statusmessage-font-size: var(--mds-font-apps-body-midsize-regular-font-size);
|
|
7
|
+
--mdc-statusmessage-font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
|
|
8
|
+
--mdc-statusmessage-line-height: var(--mds-font-apps-body-midsize-regular-line-height);
|
|
9
|
+
--mdc-statusmessage-gap: 0.5rem;
|
|
10
|
+
--mdc-statusmessage-icon-size: 1rem;
|
|
11
|
+
|
|
12
|
+
display: block;
|
|
13
|
+
width: fit-content;
|
|
14
|
+
color: var(--mdc-statusmessage-color);
|
|
15
|
+
font-size: var(--mdc-statusmessage-font-size);
|
|
16
|
+
font-weight: var(--mdc-statusmessage-font-weight);
|
|
17
|
+
line-height: var(--mdc-statusmessage-line-height);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([severity='error']) {
|
|
21
|
+
--mdc-statusmessage-color: var(--mds-color-theme-text-error-normal);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([severity='warning']) {
|
|
25
|
+
--mdc-statusmessage-color: var(--mds-color-theme-text-warning-normal);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([severity='success']) {
|
|
29
|
+
--mdc-statusmessage-color: var(--mds-color-theme-text-success-normal);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([severity='priority']) {
|
|
33
|
+
--mdc-statusmessage-color: var(--mds-color-theme-text-accent-normal);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[part='container'] {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: var(--mdc-statusmessage-gap);
|
|
40
|
+
width: 100%;
|
|
41
|
+
color: var(--mdc-statusmessage-color);
|
|
42
|
+
font-size: var(--mdc-statusmessage-font-size);
|
|
43
|
+
font-weight: var(--mdc-statusmessage-font-weight);
|
|
44
|
+
line-height: var(--mdc-statusmessage-line-height);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[part='icon'],
|
|
48
|
+
::slotted([slot='icon']) {
|
|
49
|
+
--mdc-icon-size: var(--mdc-statusmessage-icon-size);
|
|
50
|
+
|
|
51
|
+
align-self: flex-start;
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
height: var(--mdc-statusmessage-icon-size);
|
|
54
|
+
margin-block-start: 0.125rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[part='text'],
|
|
58
|
+
::slotted(*) {
|
|
59
|
+
color: inherit;
|
|
60
|
+
font-size: inherit;
|
|
61
|
+
font-weight: inherit;
|
|
62
|
+
line-height: inherit;
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
export default [styles];
|
|
66
|
+
// End AI-Assisted
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ValueOf } from '../../utils/types';
|
|
2
|
+
import { STATUSMESSAGE_ICON_NAME_BY_SEVERITY, STATUSMESSAGE_SEVERITY } from './statusmessage.constants';
|
|
3
|
+
type StatusMessageSeverity = ValueOf<typeof STATUSMESSAGE_SEVERITY>;
|
|
4
|
+
type StatusMessageIcon = ValueOf<typeof STATUSMESSAGE_ICON_NAME_BY_SEVERITY>;
|
|
5
|
+
export type { StatusMessageIcon, StatusMessageSeverity };
|
|
@@ -46056,6 +46056,136 @@
|
|
|
46056
46056
|
}
|
|
46057
46057
|
]
|
|
46058
46058
|
},
|
|
46059
|
+
{
|
|
46060
|
+
"kind": "javascript-module",
|
|
46061
|
+
"path": "components/statusmessage/statusmessage.component.js",
|
|
46062
|
+
"declarations": [
|
|
46063
|
+
{
|
|
46064
|
+
"kind": "class",
|
|
46065
|
+
"description": "",
|
|
46066
|
+
"name": "StatusMessage",
|
|
46067
|
+
"cssProperties": [
|
|
46068
|
+
{
|
|
46069
|
+
"description": "Color for the icon and message text.",
|
|
46070
|
+
"name": "--mdc-statusmessage-color"
|
|
46071
|
+
},
|
|
46072
|
+
{
|
|
46073
|
+
"description": "Font size for the message text.",
|
|
46074
|
+
"name": "--mdc-statusmessage-font-size"
|
|
46075
|
+
},
|
|
46076
|
+
{
|
|
46077
|
+
"description": "Font weight for the message text.",
|
|
46078
|
+
"name": "--mdc-statusmessage-font-weight"
|
|
46079
|
+
},
|
|
46080
|
+
{
|
|
46081
|
+
"description": "Line height for the message text.",
|
|
46082
|
+
"name": "--mdc-statusmessage-line-height"
|
|
46083
|
+
},
|
|
46084
|
+
{
|
|
46085
|
+
"description": "Gap between the icon and message text.",
|
|
46086
|
+
"name": "--mdc-statusmessage-gap"
|
|
46087
|
+
},
|
|
46088
|
+
{
|
|
46089
|
+
"description": "Width and height of the default severity icon.",
|
|
46090
|
+
"name": "--mdc-statusmessage-icon-size"
|
|
46091
|
+
}
|
|
46092
|
+
],
|
|
46093
|
+
"cssParts": [
|
|
46094
|
+
{
|
|
46095
|
+
"description": "The container for the icon and message text.",
|
|
46096
|
+
"name": "container"
|
|
46097
|
+
},
|
|
46098
|
+
{
|
|
46099
|
+
"description": "The default severity icon slot or rendered icon.",
|
|
46100
|
+
"name": "icon"
|
|
46101
|
+
},
|
|
46102
|
+
{
|
|
46103
|
+
"description": "The rendered message text when using the `message` attribute.",
|
|
46104
|
+
"name": "text"
|
|
46105
|
+
}
|
|
46106
|
+
],
|
|
46107
|
+
"slots": [
|
|
46108
|
+
{
|
|
46109
|
+
"description": "Message content. Slotted content takes precedence over the `message` attribute.",
|
|
46110
|
+
"name": "default"
|
|
46111
|
+
},
|
|
46112
|
+
{
|
|
46113
|
+
"description": "Custom icon content. Overrides the default severity icon.",
|
|
46114
|
+
"name": "icon"
|
|
46115
|
+
}
|
|
46116
|
+
],
|
|
46117
|
+
"members": [
|
|
46118
|
+
{
|
|
46119
|
+
"kind": "field",
|
|
46120
|
+
"name": "message",
|
|
46121
|
+
"type": {
|
|
46122
|
+
"text": "string | undefined"
|
|
46123
|
+
},
|
|
46124
|
+
"description": "Message text to render when no default slot content is provided.",
|
|
46125
|
+
"attribute": "message",
|
|
46126
|
+
"reflects": true
|
|
46127
|
+
},
|
|
46128
|
+
{
|
|
46129
|
+
"kind": "method",
|
|
46130
|
+
"name": "renderIcon",
|
|
46131
|
+
"privacy": "private"
|
|
46132
|
+
},
|
|
46133
|
+
{
|
|
46134
|
+
"kind": "method",
|
|
46135
|
+
"name": "renderMessage",
|
|
46136
|
+
"privacy": "private"
|
|
46137
|
+
},
|
|
46138
|
+
{
|
|
46139
|
+
"kind": "field",
|
|
46140
|
+
"name": "severity",
|
|
46141
|
+
"type": {
|
|
46142
|
+
"text": "StatusMessageSeverity"
|
|
46143
|
+
},
|
|
46144
|
+
"description": "The severity used to set the status message color and default icon.\nCan be `default`, `error`, `warning`, `success`, or `priority`.",
|
|
46145
|
+
"default": "default",
|
|
46146
|
+
"attribute": "severity",
|
|
46147
|
+
"reflects": true
|
|
46148
|
+
}
|
|
46149
|
+
],
|
|
46150
|
+
"attributes": [
|
|
46151
|
+
{
|
|
46152
|
+
"name": "severity",
|
|
46153
|
+
"type": {
|
|
46154
|
+
"text": "StatusMessageSeverity"
|
|
46155
|
+
},
|
|
46156
|
+
"description": "The severity used to set the status message color and default icon.\nCan be `default`, `error`, `warning`, `success`, or `priority`.",
|
|
46157
|
+
"default": "default",
|
|
46158
|
+
"fieldName": "severity"
|
|
46159
|
+
},
|
|
46160
|
+
{
|
|
46161
|
+
"name": "message",
|
|
46162
|
+
"type": {
|
|
46163
|
+
"text": "string | undefined"
|
|
46164
|
+
},
|
|
46165
|
+
"description": "Message text to render when no default slot content is provided.",
|
|
46166
|
+
"fieldName": "message"
|
|
46167
|
+
}
|
|
46168
|
+
],
|
|
46169
|
+
"superclass": {
|
|
46170
|
+
"name": "Component",
|
|
46171
|
+
"module": "/src/models"
|
|
46172
|
+
},
|
|
46173
|
+
"tagName": "mdc-statusmessage",
|
|
46174
|
+
"jsDoc": "/**\n * @tagname mdc-statusmessage\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @slot default - Message content. Slotted content takes precedence over the `message` attribute.\n * @slot icon - Custom icon content. Overrides the default severity icon.\n *\n * @csspart container - The container for the icon and message text.\n * @csspart icon - The default severity icon slot or rendered icon.\n * @csspart text - The rendered message text when using the `message` attribute.\n *\n * @cssproperty --mdc-statusmessage-color - Color for the icon and message text.\n * @cssproperty --mdc-statusmessage-font-size - Font size for the message text.\n * @cssproperty --mdc-statusmessage-font-weight - Font weight for the message text.\n * @cssproperty --mdc-statusmessage-line-height - Line height for the message text.\n * @cssproperty --mdc-statusmessage-gap - Gap between the icon and message text.\n * @cssproperty --mdc-statusmessage-icon-size - Width and height of the default severity icon.\n */",
|
|
46175
|
+
"customElement": true
|
|
46176
|
+
}
|
|
46177
|
+
],
|
|
46178
|
+
"exports": [
|
|
46179
|
+
{
|
|
46180
|
+
"kind": "js",
|
|
46181
|
+
"name": "default",
|
|
46182
|
+
"declaration": {
|
|
46183
|
+
"name": "StatusMessage",
|
|
46184
|
+
"module": "components/statusmessage/statusmessage.component.js"
|
|
46185
|
+
}
|
|
46186
|
+
}
|
|
46187
|
+
]
|
|
46188
|
+
},
|
|
46059
46189
|
{
|
|
46060
46190
|
"kind": "javascript-module",
|
|
46061
46191
|
"path": "components/stepper/stepper.component.js",
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ import ListBox from './components/listbox';
|
|
|
90
90
|
import Banner from './components/banner';
|
|
91
91
|
import Buttonsimple from './components/buttonsimple';
|
|
92
92
|
import Verticaltablist from './components/verticaltablist';
|
|
93
|
+
import StatusMessage from './components/statusmessage';
|
|
93
94
|
import type { AvatarSize } from './components/avatar/avatar.types';
|
|
94
95
|
import type { BadgeType } from './components/badge/badge.types';
|
|
95
96
|
import type { ColorType as ChipColorType } from './components/staticchip/staticchip.types';
|
|
@@ -101,6 +102,7 @@ import type { SpinnerSize, SpinnerVariant } from './components/spinner/spinner.t
|
|
|
101
102
|
import type { TextType } from './components/text/text.types';
|
|
102
103
|
import type { LinkButtonSize } from './components/linkbutton/linkbutton.types';
|
|
103
104
|
import type { TextType as TypewriterType } from './components/typewriter/typewriter.types';
|
|
105
|
+
import type { StatusMessageSeverity } from './components/statusmessage/statusmessage.types';
|
|
104
106
|
import type { MenuPopoverActionEvent, MenuPopoverChangeEvent } from './components/menupopover/menupopover.types';
|
|
105
107
|
import type { SelectChangeEvent, SelectInputEvent } from './components/select/select.types';
|
|
106
108
|
import type { MenuSectionChangeEvent } from './components/menusection/menusection.types';
|
|
@@ -119,6 +121,6 @@ import type { TimePickerChangeEvent, TimePickerInputEvent } from './components/t
|
|
|
119
121
|
import type { DatePickerChangeEvent, DatePickerInputEvent } from './components/datepicker/datepicker.types';
|
|
120
122
|
import type { CalendarDateSelectedEvent, CalendarMonthChangedEvent } from './components/calendar/calendar.types';
|
|
121
123
|
import type { ListBoxChangeEvent } from './components/listbox/listbox.types';
|
|
122
|
-
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, };
|
|
123
|
-
export type { AvatarSize, BadgeType, ChipColorType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, PresenceType, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, SliderChangeEvent, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, TablistChangeEvent, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, ToggleOnChangeEvent, CheckboxOnChangeEvent, LinkButtonSize, TimePickerChangeEvent, TimePickerInputEvent, DatePickerChangeEvent, DatePickerInputEvent, CalendarDateSelectedEvent, CalendarMonthChangedEvent, VerticaltablistChangeEvent, ListBoxChangeEvent, };
|
|
124
|
+
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, };
|
|
125
|
+
export type { AvatarSize, BadgeType, ChipColorType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, PresenceType, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, SliderChangeEvent, StatusMessageSeverity, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, TablistChangeEvent, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, ToggleOnChangeEvent, CheckboxOnChangeEvent, LinkButtonSize, TimePickerChangeEvent, TimePickerInputEvent, DatePickerChangeEvent, DatePickerInputEvent, CalendarDateSelectedEvent, CalendarMonthChangedEvent, VerticaltablistChangeEvent, ListBoxChangeEvent, };
|
|
124
126
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
|
package/dist/index.js
CHANGED
|
@@ -92,11 +92,12 @@ import ListBox from './components/listbox';
|
|
|
92
92
|
import Banner from './components/banner';
|
|
93
93
|
import Buttonsimple from './components/buttonsimple';
|
|
94
94
|
import Verticaltablist from './components/verticaltablist';
|
|
95
|
+
import StatusMessage from './components/statusmessage';
|
|
95
96
|
// Constants / Utils Imports
|
|
96
97
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
|
|
97
98
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
|
98
99
|
import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
|
|
99
100
|
// Components Exports
|
|
100
|
-
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, };
|
|
101
|
+
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, };
|
|
101
102
|
// Constants / Utils Exports
|
|
102
103
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export { default as StaticCheckbox } from './staticcheckbox';
|
|
|
76
76
|
export { default as StaticChip } from './staticchip';
|
|
77
77
|
export { default as StaticRadio } from './staticradio';
|
|
78
78
|
export { default as StaticToggle } from './statictoggle';
|
|
79
|
+
export { default as StatusMessage } from './statusmessage';
|
|
79
80
|
export { default as Stepper } from './stepper';
|
|
80
81
|
export { default as StepperConnector } from './stepperconnector';
|
|
81
82
|
export { default as StepperItem } from './stepperitem';
|
package/dist/react/index.js
CHANGED
|
@@ -76,6 +76,7 @@ export { default as StaticCheckbox } from './staticcheckbox';
|
|
|
76
76
|
export { default as StaticChip } from './staticchip';
|
|
77
77
|
export { default as StaticRadio } from './staticradio';
|
|
78
78
|
export { default as StaticToggle } from './statictoggle';
|
|
79
|
+
export { default as StatusMessage } from './statusmessage';
|
|
79
80
|
export { default as Stepper } from './stepper';
|
|
80
81
|
export { default as StepperConnector } from './stepperconnector';
|
|
81
82
|
export { default as StepperItem } from './stepperitem';
|