@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.
@@ -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 interactable version of the `mdc-avatar` component.
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 is made by extending `buttonsimple` class.
8
- * The button component acts as a wrapper for the avatar component.
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
- * To override styles of the avatar inside, use the specified css parts.
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) This event is dispatched when the avatarbutton is clicked.
15
- * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the avatarbutton.
16
- * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the avatarbutton.
17
- * @event focus - (React: onFocus) This event is dispatched when the avatarbutton receives focus.
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 interactable version of the `mdc-avatar` component.
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 is made by extending `buttonsimple` class.
9
- * The button component acts as a wrapper for the avatar component.
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
- * To override styles of the avatar inside, use the specified css parts.
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) This event is dispatched when the avatarbutton is clicked.
16
- * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the avatarbutton.
17
- * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the avatarbutton.
18
- * @event focus - (React: onFocus) This event is dispatched when the avatarbutton receives focus.
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 via slots.
7
+ * prefix and postfix icons.
8
8
  *
9
9
  * ### Features:
10
- * - Behaves like an link while visually resembling a button.
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 for button size
30
- * @cssproperty --mdc-button-background - Background color of the button
31
- * @cssproperty --mdc-button-border-color - Borer color of the button
32
- * @cssproperty --mdc-button-text-color - Text color of the button
33
- * @cssproperty --mdc-button-line-height - Line height of the button text
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 via slots.
8
+ * prefix and postfix icons.
9
9
  *
10
10
  * ### Features:
11
- * - Behaves like an link while visually resembling a button.
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 for button size
31
- * @cssproperty --mdc-button-background - Background color of the button
32
- * @cssproperty --mdc-button-border-color - Borer color of the button
33
- * @cssproperty --mdc-button-text-color - Text color of the button
34
- * @cssproperty --mdc-button-line-height - Line height of the button text
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',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.129.12",
4
+ "version": "0.129.14",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"