@momentum-design/components 0.129.12 → 0.129.14
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.map +2 -2
- package/dist/components/appheader/appheader.component.d.ts +16 -12
- package/dist/components/appheader/appheader.component.js +16 -12
- package/dist/components/avatar/avatar.component.d.ts +22 -15
- package/dist/components/avatar/avatar.component.js +22 -15
- package/dist/components/avatarbutton/avatarbutton.component.d.ts +13 -11
- package/dist/components/avatarbutton/avatarbutton.component.js +13 -11
- package/dist/components/buttonlink/buttonlink.component.d.ts +14 -12
- package/dist/components/buttonlink/buttonlink.component.js +14 -12
- package/dist/components/linkbutton/linkbutton.component.d.ts +12 -7
- package/dist/components/linkbutton/linkbutton.component.js +12 -7
- package/dist/components/linksimple/linksimple.component.d.ts +6 -0
- package/dist/custom-elements.json +59 -57
- package/dist/react/appheader/index.d.ts +16 -12
- package/dist/react/appheader/index.js +16 -12
- package/dist/react/avatar/index.d.ts +25 -18
- package/dist/react/avatar/index.js +25 -18
- package/dist/react/avatarbutton/index.d.ts +13 -11
- package/dist/react/avatarbutton/index.js +13 -11
- package/dist/react/buttonlink/index.d.ts +10 -8
- package/dist/react/buttonlink/index.js +10 -8
- package/dist/react/linkbutton/index.d.ts +3 -0
- package/dist/react/linkbutton/index.js +2 -0
- package/package.json +1 -1
|
@@ -2,25 +2,27 @@ import { type EventName } from '@lit/react';
|
|
|
2
2
|
import Component from '../../components/avatarbutton';
|
|
3
3
|
import type { Events as EventsInherited } from '../../components/buttonsimple/buttonsimple.types';
|
|
4
4
|
/**
|
|
5
|
-
* The `mdc-avatarbutton` component is an
|
|
5
|
+
* The `mdc-avatarbutton` component is an interactive, clickable version of `mdc-avatar`.
|
|
6
|
+
* It wraps the avatar component in a button, making it focusable and actionable.
|
|
6
7
|
*
|
|
7
|
-
* This component
|
|
8
|
-
*
|
|
8
|
+
* This component extends `buttonsimple` and includes all avatar display features (photo, initials, icon, counter, presence).
|
|
9
|
+
* Use CSS parts to customize the avatar's appearance inside the button.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
+
* ## Accessibility
|
|
12
|
+
* - Always provide an `aria-label` attribute to describe the button's purpose
|
|
11
13
|
*
|
|
12
14
|
* @dependency mdc-avatar
|
|
13
15
|
*
|
|
14
|
-
* @event click - (React: onClick)
|
|
15
|
-
* @event keydown - (React: onKeyDown)
|
|
16
|
-
* @event keyup - (React: onKeyUp)
|
|
17
|
-
* @event focus - (React: onFocus)
|
|
16
|
+
* @event click - (React: onClick) Dispatched when the avatar button is clicked.
|
|
17
|
+
* @event keydown - (React: onKeyDown) Dispatched when a key is pressed on the avatar button.
|
|
18
|
+
* @event keyup - (React: onKeyUp) Dispatched when a key is released on the avatar button.
|
|
19
|
+
* @event focus - (React: onFocus) Dispatched when the avatar button receives focus.
|
|
18
20
|
*
|
|
19
21
|
* @tagname mdc-avatarbutton
|
|
20
22
|
*
|
|
21
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-rest - Background color of the overlay in rest state
|
|
22
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-hover - Background color of the overlay in hover state
|
|
23
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-active - Background color of the overlay in active state
|
|
23
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-rest - Background color of the overlay in rest state.
|
|
24
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-hover - Background color of the overlay in hover state.
|
|
25
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-active - Background color of the overlay in active state.
|
|
24
26
|
*
|
|
25
27
|
* @csspart overlay - The overlay part of the avatar button.
|
|
26
28
|
* @csspart content - The main content of the avatar.
|
|
@@ -3,25 +3,27 @@ import { createComponent } from '@lit/react';
|
|
|
3
3
|
import Component from '../../components/avatarbutton';
|
|
4
4
|
import { TAG_NAME } from '../../components/avatarbutton/avatarbutton.constants';
|
|
5
5
|
/**
|
|
6
|
-
* The `mdc-avatarbutton` component is an
|
|
6
|
+
* The `mdc-avatarbutton` component is an interactive, clickable version of `mdc-avatar`.
|
|
7
|
+
* It wraps the avatar component in a button, making it focusable and actionable.
|
|
7
8
|
*
|
|
8
|
-
* This component
|
|
9
|
-
*
|
|
9
|
+
* This component extends `buttonsimple` and includes all avatar display features (photo, initials, icon, counter, presence).
|
|
10
|
+
* Use CSS parts to customize the avatar's appearance inside the button.
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
+
* ## Accessibility
|
|
13
|
+
* - Always provide an `aria-label` attribute to describe the button's purpose
|
|
12
14
|
*
|
|
13
15
|
* @dependency mdc-avatar
|
|
14
16
|
*
|
|
15
|
-
* @event click - (React: onClick)
|
|
16
|
-
* @event keydown - (React: onKeyDown)
|
|
17
|
-
* @event keyup - (React: onKeyUp)
|
|
18
|
-
* @event focus - (React: onFocus)
|
|
17
|
+
* @event click - (React: onClick) Dispatched when the avatar button is clicked.
|
|
18
|
+
* @event keydown - (React: onKeyDown) Dispatched when a key is pressed on the avatar button.
|
|
19
|
+
* @event keyup - (React: onKeyUp) Dispatched when a key is released on the avatar button.
|
|
20
|
+
* @event focus - (React: onFocus) Dispatched when the avatar button receives focus.
|
|
19
21
|
*
|
|
20
22
|
* @tagname mdc-avatarbutton
|
|
21
23
|
*
|
|
22
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-rest - Background color of the overlay in rest state
|
|
23
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-hover - Background color of the overlay in hover state
|
|
24
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-active - Background color of the overlay in active state
|
|
24
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-rest - Background color of the overlay in rest state.
|
|
25
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-hover - Background color of the overlay in hover state.
|
|
26
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-active - Background color of the overlay in active state.
|
|
25
27
|
*
|
|
26
28
|
* @csspart overlay - The overlay part of the avatar button.
|
|
27
29
|
* @csspart content - The main content of the avatar.
|
|
@@ -4,18 +4,20 @@ import type { Events as EventsInherited } from '../../components/linksimple/link
|
|
|
4
4
|
/**
|
|
5
5
|
* `mdc-buttonlink` combines the functional behavior of `mdc-linksimple` with the visual and structural
|
|
6
6
|
* features of `mdc-button`. This includes support for variants, sizing, and optional
|
|
7
|
-
* prefix and postfix icons
|
|
7
|
+
* prefix and postfix icons.
|
|
8
8
|
*
|
|
9
9
|
* ### Features:
|
|
10
|
-
* - Behaves like
|
|
11
|
-
* - Supports slots for `prefix-icon` and `postfix-icon`.
|
|
10
|
+
* - Behaves like a link while visually resembling a button.
|
|
12
11
|
* - Customizable size, color, and variant through attributes.
|
|
12
|
+
* - Supports prefix and postfix icons.
|
|
13
13
|
* - Inherits accessibility and keyboard interaction support from `mdc-linksimple`.
|
|
14
14
|
*
|
|
15
15
|
* @dependency mdc-icon
|
|
16
16
|
*
|
|
17
17
|
* @tagname mdc-buttonlink
|
|
18
18
|
*
|
|
19
|
+
* @slot default - The default slot for buttonlink text content.
|
|
20
|
+
*
|
|
19
21
|
* @event click - (React: onClick) Fired when the user activates the buttonLink using a mouse or assistive technology.
|
|
20
22
|
* @event keydown - (React: onKeyDown) Fired when the user presses a key while the buttonLink has focus.
|
|
21
23
|
* @event focus - (React: onFocus) Fired when the buttonLink receives keyboard or mouse focus.
|
|
@@ -26,11 +28,11 @@ import type { Events as EventsInherited } from '../../components/linksimple/link
|
|
|
26
28
|
* @csspart button-text - The slot containing the buttonlink text.
|
|
27
29
|
* @csspart postfix-icon - The postfix icon element.
|
|
28
30
|
*
|
|
29
|
-
* @cssproperty --mdc-button-height - Height
|
|
30
|
-
* @cssproperty --mdc-button-background - Background color of the
|
|
31
|
-
* @cssproperty --mdc-button-border-color -
|
|
32
|
-
* @cssproperty --mdc-button-text-color - Text color of the
|
|
33
|
-
* @cssproperty --mdc-button-line-height - Line height of the
|
|
31
|
+
* @cssproperty --mdc-button-height - Height of the buttonlink
|
|
32
|
+
* @cssproperty --mdc-button-background - Background color of the buttonlink
|
|
33
|
+
* @cssproperty --mdc-button-border-color - Border color of the buttonlink
|
|
34
|
+
* @cssproperty --mdc-button-text-color - Text color of the buttonlink
|
|
35
|
+
* @cssproperty --mdc-button-line-height - Line height of the buttonlink text
|
|
34
36
|
* @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon
|
|
35
37
|
* @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon
|
|
36
38
|
*/
|
|
@@ -5,18 +5,20 @@ import { TAG_NAME } from '../../components/buttonlink/buttonlink.constants';
|
|
|
5
5
|
/**
|
|
6
6
|
* `mdc-buttonlink` combines the functional behavior of `mdc-linksimple` with the visual and structural
|
|
7
7
|
* features of `mdc-button`. This includes support for variants, sizing, and optional
|
|
8
|
-
* prefix and postfix icons
|
|
8
|
+
* prefix and postfix icons.
|
|
9
9
|
*
|
|
10
10
|
* ### Features:
|
|
11
|
-
* - Behaves like
|
|
12
|
-
* - Supports slots for `prefix-icon` and `postfix-icon`.
|
|
11
|
+
* - Behaves like a link while visually resembling a button.
|
|
13
12
|
* - Customizable size, color, and variant through attributes.
|
|
13
|
+
* - Supports prefix and postfix icons.
|
|
14
14
|
* - Inherits accessibility and keyboard interaction support from `mdc-linksimple`.
|
|
15
15
|
*
|
|
16
16
|
* @dependency mdc-icon
|
|
17
17
|
*
|
|
18
18
|
* @tagname mdc-buttonlink
|
|
19
19
|
*
|
|
20
|
+
* @slot default - The default slot for buttonlink text content.
|
|
21
|
+
*
|
|
20
22
|
* @event click - (React: onClick) Fired when the user activates the buttonLink using a mouse or assistive technology.
|
|
21
23
|
* @event keydown - (React: onKeyDown) Fired when the user presses a key while the buttonLink has focus.
|
|
22
24
|
* @event focus - (React: onFocus) Fired when the buttonLink receives keyboard or mouse focus.
|
|
@@ -27,11 +29,11 @@ import { TAG_NAME } from '../../components/buttonlink/buttonlink.constants';
|
|
|
27
29
|
* @csspart button-text - The slot containing the buttonlink text.
|
|
28
30
|
* @csspart postfix-icon - The postfix icon element.
|
|
29
31
|
*
|
|
30
|
-
* @cssproperty --mdc-button-height - Height
|
|
31
|
-
* @cssproperty --mdc-button-background - Background color of the
|
|
32
|
-
* @cssproperty --mdc-button-border-color -
|
|
33
|
-
* @cssproperty --mdc-button-text-color - Text color of the
|
|
34
|
-
* @cssproperty --mdc-button-line-height - Line height of the
|
|
32
|
+
* @cssproperty --mdc-button-height - Height of the buttonlink
|
|
33
|
+
* @cssproperty --mdc-button-background - Background color of the buttonlink
|
|
34
|
+
* @cssproperty --mdc-button-border-color - Border color of the buttonlink
|
|
35
|
+
* @cssproperty --mdc-button-text-color - Text color of the buttonlink
|
|
36
|
+
* @cssproperty --mdc-button-line-height - Line height of the buttonlink text
|
|
35
37
|
* @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon
|
|
36
38
|
* @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon
|
|
37
39
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type EventName } from '@lit/react';
|
|
2
2
|
import Component from '../../components/linkbutton';
|
|
3
|
+
import type { Events } from '../../components/linkbutton/linkbutton.types';
|
|
3
4
|
import type { Events as EventsInherited } from '../../components/buttonsimple/buttonsimple.types';
|
|
4
5
|
/**
|
|
5
6
|
* `mdc-linkbutton` visually mimics a hyperlink while functioning as a button. It blends the appearance of `mdc-link` with the accessibility and interaction capabilities of `mdc-button`.
|
|
@@ -19,6 +20,7 @@ import type { Events as EventsInherited } from '../../components/buttonsimple/bu
|
|
|
19
20
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the linkbutton.
|
|
20
21
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the linkbutton.
|
|
21
22
|
* @event focus - (React: onFocus) This event is dispatched when the linkbutton receives focus.
|
|
23
|
+
* @event blur - (React: onBlur) This event is dispatched when the linkbutton loses focus.
|
|
22
24
|
*
|
|
23
25
|
* @cssproperty --mdc-link-border-radius - Border radius of the linkbutton.
|
|
24
26
|
* @cssproperty --mdc-link-color-active - Color of the linkbutton’s child content in the active state.
|
|
@@ -32,6 +34,7 @@ import type { Events as EventsInherited } from '../../components/buttonsimple/bu
|
|
|
32
34
|
* @cssproperty --mdc-button-height - Height for button size
|
|
33
35
|
*/
|
|
34
36
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
|
37
|
+
onBlur: EventName<Events["onBlurEvent"]>;
|
|
35
38
|
onClick: EventName<EventsInherited["onClickEvent"]>;
|
|
36
39
|
onKeyDown: EventName<EventsInherited["onKeyDownEvent"]>;
|
|
37
40
|
onKeyUp: EventName<EventsInherited["onKeyUpEvent"]>;
|
|
@@ -20,6 +20,7 @@ import { TAG_NAME } from '../../components/linkbutton/linkbutton.constants';
|
|
|
20
20
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the linkbutton.
|
|
21
21
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the linkbutton.
|
|
22
22
|
* @event focus - (React: onFocus) This event is dispatched when the linkbutton receives focus.
|
|
23
|
+
* @event blur - (React: onBlur) This event is dispatched when the linkbutton loses focus.
|
|
23
24
|
*
|
|
24
25
|
* @cssproperty --mdc-link-border-radius - Border radius of the linkbutton.
|
|
25
26
|
* @cssproperty --mdc-link-color-active - Color of the linkbutton’s child content in the active state.
|
|
@@ -37,6 +38,7 @@ const reactWrapper = createComponent({
|
|
|
37
38
|
elementClass: Component,
|
|
38
39
|
react: React,
|
|
39
40
|
events: {
|
|
41
|
+
onBlur: 'blur',
|
|
40
42
|
onClick: 'click',
|
|
41
43
|
onKeyDown: 'keydown',
|
|
42
44
|
onKeyUp: 'keyup',
|