@momentum-design/components 0.114.0 → 0.116.0
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 +386 -275
- package/dist/browser/index.js.map +4 -4
- package/dist/components/banner/banner.component.d.ts +79 -0
- package/dist/components/banner/banner.component.js +142 -0
- package/dist/components/banner/banner.constants.d.ts +28 -0
- package/dist/components/banner/banner.constants.js +29 -0
- package/dist/components/banner/banner.styles.d.ts +2 -0
- package/dist/components/banner/banner.styles.js +86 -0
- package/dist/components/banner/banner.types.d.ts +4 -0
- package/dist/components/banner/banner.types.js +1 -0
- package/dist/components/banner/banner.utils.d.ts +3 -0
- package/dist/components/banner/banner.utils.js +16 -0
- package/dist/components/banner/index.d.ts +9 -0
- package/dist/components/banner/index.js +6 -0
- package/dist/custom-elements.json +160 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/banner/index.d.ts +40 -0
- package/dist/react/banner/index.js +49 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/package.json +1 -1
@@ -0,0 +1,40 @@
|
|
1
|
+
import Component from '../../components/banner';
|
2
|
+
/**
|
3
|
+
* `mdc-banner` is a component that allows applications to communicate important messages to users
|
4
|
+
* and requires user action to dismiss them. It supports different message types with appropriate styling
|
5
|
+
* and icons, and provides flexibility for customization through label, secondary label, icons, and actions.
|
6
|
+
*
|
7
|
+
* They are designed to be noticeable yet non-intrusive, helping users stay informed without interrupting their workflow.
|
8
|
+
*
|
9
|
+
* This component supports both structured content via properties and flexible customization via slots:
|
10
|
+
* - Use the properties (`label`, `secondaryLabel`, `variant`) for standard banner layouts with automatic icon selection.
|
11
|
+
* - Use slots for custom content and complete layout control.
|
12
|
+
* - Combine both approaches for maximum flexibility.
|
13
|
+
* - Create custom orientations and actions using CSS parts and slots.
|
14
|
+
*
|
15
|
+
* @dependency mdc-icon
|
16
|
+
* @dependency mdc-text
|
17
|
+
*
|
18
|
+
* @slot content - Complete content override. When used, it replaces all default banner content including icon, label, secondary label, and actions.
|
19
|
+
* @slot leading-icon - Custom icon content. Overrides the default variant-based icon.
|
20
|
+
* @slot leading-text - Custom text content. Overrides the label and secondaryLabel properties.
|
21
|
+
* @slot trailing-actions - Custom action buttons and controls. Use this for dismiss buttons, reset buttons, or any other actions.
|
22
|
+
*
|
23
|
+
* @tagname mdc-banner
|
24
|
+
*
|
25
|
+
* @csspart leading - The leading section containing the icon and text.
|
26
|
+
* @csspart leading-icon - The icon displayed for variants or custom icon slot.
|
27
|
+
* @csspart leading-text - The leading section containing label and secondary label text.
|
28
|
+
* @csspart trailing - The trailing section containing action buttons and controls.
|
29
|
+
* @csspart leading-label - The label text of the banner.
|
30
|
+
* @csspart leading-secondary-label - The secondary label text of the banner.
|
31
|
+
*
|
32
|
+
* @cssproperty --mdc-banner-background-color - Background color of the banner.
|
33
|
+
* @cssproperty --mdc-banner-border-color - Border color of the banner.
|
34
|
+
* @cssproperty --mdc-banner-icon-color - Color of the icon in the banner.
|
35
|
+
* @cssproperty --mdc-banner-elevation - Elevation/shadow of the banner.
|
36
|
+
* @cssproperty --mdc-banner-padding - Padding inside the banner.
|
37
|
+
* @cssproperty --mdc-banner-gap - Gap between banner elements.
|
38
|
+
*/
|
39
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
40
|
+
export default reactWrapper;
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/banner';
|
4
|
+
import { TAG_NAME } from '../../components/banner/banner.constants';
|
5
|
+
/**
|
6
|
+
* `mdc-banner` is a component that allows applications to communicate important messages to users
|
7
|
+
* and requires user action to dismiss them. It supports different message types with appropriate styling
|
8
|
+
* and icons, and provides flexibility for customization through label, secondary label, icons, and actions.
|
9
|
+
*
|
10
|
+
* They are designed to be noticeable yet non-intrusive, helping users stay informed without interrupting their workflow.
|
11
|
+
*
|
12
|
+
* This component supports both structured content via properties and flexible customization via slots:
|
13
|
+
* - Use the properties (`label`, `secondaryLabel`, `variant`) for standard banner layouts with automatic icon selection.
|
14
|
+
* - Use slots for custom content and complete layout control.
|
15
|
+
* - Combine both approaches for maximum flexibility.
|
16
|
+
* - Create custom orientations and actions using CSS parts and slots.
|
17
|
+
*
|
18
|
+
* @dependency mdc-icon
|
19
|
+
* @dependency mdc-text
|
20
|
+
*
|
21
|
+
* @slot content - Complete content override. When used, it replaces all default banner content including icon, label, secondary label, and actions.
|
22
|
+
* @slot leading-icon - Custom icon content. Overrides the default variant-based icon.
|
23
|
+
* @slot leading-text - Custom text content. Overrides the label and secondaryLabel properties.
|
24
|
+
* @slot trailing-actions - Custom action buttons and controls. Use this for dismiss buttons, reset buttons, or any other actions.
|
25
|
+
*
|
26
|
+
* @tagname mdc-banner
|
27
|
+
*
|
28
|
+
* @csspart leading - The leading section containing the icon and text.
|
29
|
+
* @csspart leading-icon - The icon displayed for variants or custom icon slot.
|
30
|
+
* @csspart leading-text - The leading section containing label and secondary label text.
|
31
|
+
* @csspart trailing - The trailing section containing action buttons and controls.
|
32
|
+
* @csspart leading-label - The label text of the banner.
|
33
|
+
* @csspart leading-secondary-label - The secondary label text of the banner.
|
34
|
+
*
|
35
|
+
* @cssproperty --mdc-banner-background-color - Background color of the banner.
|
36
|
+
* @cssproperty --mdc-banner-border-color - Border color of the banner.
|
37
|
+
* @cssproperty --mdc-banner-icon-color - Color of the icon in the banner.
|
38
|
+
* @cssproperty --mdc-banner-elevation - Elevation/shadow of the banner.
|
39
|
+
* @cssproperty --mdc-banner-padding - Padding inside the banner.
|
40
|
+
* @cssproperty --mdc-banner-gap - Gap between banner elements.
|
41
|
+
*/
|
42
|
+
const reactWrapper = createComponent({
|
43
|
+
tagName: TAG_NAME,
|
44
|
+
elementClass: Component,
|
45
|
+
react: React,
|
46
|
+
events: {},
|
47
|
+
displayName: 'Banner',
|
48
|
+
});
|
49
|
+
export default reactWrapper;
|
package/dist/react/index.d.ts
CHANGED
@@ -7,6 +7,7 @@ export { default as Appheader } from './appheader';
|
|
7
7
|
export { default as Avatar } from './avatar';
|
8
8
|
export { default as AvatarButton } from './avatarbutton';
|
9
9
|
export { default as Badge } from './badge';
|
10
|
+
export { default as Banner } from './banner';
|
10
11
|
export { default as Brandvisual } from './brandvisual';
|
11
12
|
export { default as Bullet } from './bullet';
|
12
13
|
export { default as Button } from './button';
|
package/dist/react/index.js
CHANGED
@@ -7,6 +7,7 @@ export { default as Appheader } from './appheader';
|
|
7
7
|
export { default as Avatar } from './avatar';
|
8
8
|
export { default as AvatarButton } from './avatarbutton';
|
9
9
|
export { default as Badge } from './badge';
|
10
|
+
export { default as Banner } from './banner';
|
10
11
|
export { default as Brandvisual } from './brandvisual';
|
11
12
|
export { default as Bullet } from './bullet';
|
12
13
|
export { default as Button } from './button';
|