@momentum-design/components 0.129.13 → 0.129.15

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.
Files changed (30) hide show
  1. package/dist/browser/index.js.map +2 -2
  2. package/dist/components/appheader/appheader.component.d.ts +16 -12
  3. package/dist/components/appheader/appheader.component.js +16 -12
  4. package/dist/components/avatar/avatar.component.d.ts +22 -15
  5. package/dist/components/avatar/avatar.component.js +22 -15
  6. package/dist/components/avatarbutton/avatarbutton.component.d.ts +13 -11
  7. package/dist/components/avatarbutton/avatarbutton.component.js +13 -11
  8. package/dist/components/bullet/bullet.component.d.ts +5 -2
  9. package/dist/components/bullet/bullet.component.js +5 -2
  10. package/dist/components/button/button.component.d.ts +65 -29
  11. package/dist/components/button/button.component.js +65 -29
  12. package/dist/components/buttongroup/buttongroup.component.d.ts +26 -21
  13. package/dist/components/buttongroup/buttongroup.component.js +26 -21
  14. package/dist/components/buttonsimple/buttonsimple.component.d.ts +5 -3
  15. package/dist/components/buttonsimple/buttonsimple.component.js +5 -3
  16. package/dist/custom-elements.json +166 -80
  17. package/dist/react/appheader/index.d.ts +16 -12
  18. package/dist/react/appheader/index.js +16 -12
  19. package/dist/react/avatar/index.d.ts +25 -18
  20. package/dist/react/avatar/index.js +25 -18
  21. package/dist/react/avatarbutton/index.d.ts +13 -11
  22. package/dist/react/avatarbutton/index.js +13 -11
  23. package/dist/react/button/index.d.ts +39 -22
  24. package/dist/react/button/index.js +39 -22
  25. package/dist/react/buttongroup/index.d.ts +16 -18
  26. package/dist/react/buttongroup/index.js +16 -18
  27. package/dist/react/buttonsimple/index.d.ts +5 -3
  28. package/dist/react/buttonsimple/index.js +5 -3
  29. package/dist/utils/mixins/ButtonComponentMixin.js +12 -5
  30. package/package.json +1 -1
@@ -1,22 +1,26 @@
1
1
  import Component from '../../components/appheader';
2
2
  /**
3
- * The `mdc-appheader` component provides a structured and accessible app header layout.
4
- * It consists of three primary sections: leading, center, and trailing.
3
+ * The `mdc-appheader` component provides a structured and accessible app header layout with three sections: leading, center, and trailing.
5
4
  *
6
- * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.
7
- * - The **center section** can contain a **search bar**, **icons** or action controls.
8
- * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.
5
+ * ## Layout sections
6
+ * - **Leading** - Typically holds brand logo, brand name, or menu icon
7
+ * - **Center** - Can contain search bar, icons, navigation links, or action controls
8
+ * - **Trailing** - Generally includes profile avatar, icons, settings, or additional action controls
9
+ *
10
+ * Each section automatically handles flex alignment: leading aligns left, center aligns center, trailing aligns right.
9
11
  *
10
12
  * @tagname mdc-appheader
11
13
  *
12
- * @slot leading - Slot for the leading section (e.g., brand logo, brand name).
13
- * @slot center - Slot for the center section (e.g., search bar, icons).
14
- * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).
14
+ * @slot leading - Content for the leading section (left-aligned).
15
+ * @slot center - Content for the center section (center-aligned).
16
+ * @slot trailing - Content for the trailing section (right-aligned).
17
+ *
18
+ * @cssproperty --mdc-appheader-height - Height of the app header. Default is 4rem (64px).
15
19
  *
16
- * @csspart container - The main container for styling the header.
17
- * @csspart leading-section - The leading section of the header.
18
- * @csspart center-section - The center section of the header.
19
- * @csspart trailing-section - The trailing section of the header.
20
+ * @csspart container - The main header container.
21
+ * @csspart leading-section - The leading section wrapper (left side).
22
+ * @csspart center-section - The center section wrapper (middle).
23
+ * @csspart trailing-section - The trailing section wrapper (right side).
20
24
  */
21
25
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
22
26
  export default reactWrapper;
@@ -3,23 +3,27 @@ import { createComponent } from '@lit/react';
3
3
  import Component from '../../components/appheader';
4
4
  import { TAG_NAME } from '../../components/appheader/appheader.constants';
5
5
  /**
6
- * The `mdc-appheader` component provides a structured and accessible app header layout.
7
- * It consists of three primary sections: leading, center, and trailing.
6
+ * The `mdc-appheader` component provides a structured and accessible app header layout with three sections: leading, center, and trailing.
8
7
  *
9
- * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.
10
- * - The **center section** can contain a **search bar**, **icons** or action controls.
11
- * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.
8
+ * ## Layout sections
9
+ * - **Leading** - Typically holds brand logo, brand name, or menu icon
10
+ * - **Center** - Can contain search bar, icons, navigation links, or action controls
11
+ * - **Trailing** - Generally includes profile avatar, icons, settings, or additional action controls
12
+ *
13
+ * Each section automatically handles flex alignment: leading aligns left, center aligns center, trailing aligns right.
12
14
  *
13
15
  * @tagname mdc-appheader
14
16
  *
15
- * @slot leading - Slot for the leading section (e.g., brand logo, brand name).
16
- * @slot center - Slot for the center section (e.g., search bar, icons).
17
- * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).
17
+ * @slot leading - Content for the leading section (left-aligned).
18
+ * @slot center - Content for the center section (center-aligned).
19
+ * @slot trailing - Content for the trailing section (right-aligned).
20
+ *
21
+ * @cssproperty --mdc-appheader-height - Height of the app header. Default is 4rem (64px).
18
22
  *
19
- * @csspart container - The main container for styling the header.
20
- * @csspart leading-section - The leading section of the header.
21
- * @csspart center-section - The center section of the header.
22
- * @csspart trailing-section - The trailing section of the header.
23
+ * @csspart container - The main header container.
24
+ * @csspart leading-section - The leading section wrapper (left side).
25
+ * @csspart center-section - The center section wrapper (middle).
26
+ * @csspart trailing-section - The trailing section wrapper (right side).
23
27
  */
24
28
  const reactWrapper = createComponent({
25
29
  tagName: TAG_NAME,
@@ -1,23 +1,30 @@
1
1
  import Component from '../../components/avatar';
2
2
  /**
3
- * The `mdc-avatar` component is used to represent a person or a space.
4
- * An avatar can be an icon, initials, counter and photo.
5
- *
6
- * To set the photo of an avatar,
7
- * you need to set "src" attribute.
8
- *
9
- * While the avatar image is loading, as a placeholder,
10
- * we will show the initials text.
11
- * If the initials are not specified then,
12
- * we will show `user-regular` icon as a placeholder.
13
- *
14
- * By default, if there are no attributes specified,
15
- * then the default avatar will be an icon with `user-regular` name.
16
- *
17
- * The avatar component is non clickable and non interactive/focusable component.
18
- * If the avatar is typing, then the loading indicator will be displayed.
19
- * If the counter type avatar is set to a negative number, then we will display 0.
20
- * The presence indicator will be hidden when the counter property is set.
3
+ * The `mdc-avatar` component represents a person or a space. It displays as a photo, initials, icon, or counter.
4
+ *
5
+ * ## Display Priority
6
+ *
7
+ * When multiple attributes are provided, the component determines what to display based on this priority:
8
+ * 1. **Photo** (`src`) - Takes highest priority
9
+ * - While loading: Shows `initials` as placeholder if provided (instant), otherwise shows icon (requires loading)
10
+ * - After loading: Shows the photo
11
+ * - On error: Placeholder remains visible (initials or icon)
12
+ * 2. **Icon** (`icon-name`) - Takes priority if no `src` is provided
13
+ * - Shows custom icon if `icon-name` is set (requires icon library to load)
14
+ * - **Note:** If both `icon-name` and `initials` are provided (without `src`), icon takes precedence and initials are ignored.
15
+ * This means users may see a delay while the icon loads, even though initials render instantly.
16
+ * - Defaults to `user-regular` icon if no other content is available
17
+ * 3. **Initials** (`initials`) - Displayed only if no `src` or `icon-name` is provided
18
+ * - Shows first two characters, converted to uppercase
19
+ * - Renders instantly (no loading required)
20
+ * 4. **Counter** (`counter`) - Displayed only if none of the above are provided
21
+ * - Shows numeric value (max 99+)
22
+ * - Negative values display as 0
23
+ *
24
+ * ## Behavior
25
+ * - Non-interactive and non-focusable component (use `mdc-avatarbutton` for clickable avatars)
26
+ * - Shows loading indicator overlay when `is-typing` is true (displays on top of existing content)
27
+ * - Presence indicator hidden when counter is set or when typing
21
28
  *
22
29
  * @dependency mdc-icon
23
30
  * @dependency mdc-presence
@@ -3,24 +3,31 @@ import { createComponent } from '@lit/react';
3
3
  import Component from '../../components/avatar';
4
4
  import { TAG_NAME } from '../../components/avatar/avatar.constants';
5
5
  /**
6
- * The `mdc-avatar` component is used to represent a person or a space.
7
- * An avatar can be an icon, initials, counter and photo.
8
- *
9
- * To set the photo of an avatar,
10
- * you need to set "src" attribute.
11
- *
12
- * While the avatar image is loading, as a placeholder,
13
- * we will show the initials text.
14
- * If the initials are not specified then,
15
- * we will show `user-regular` icon as a placeholder.
16
- *
17
- * By default, if there are no attributes specified,
18
- * then the default avatar will be an icon with `user-regular` name.
19
- *
20
- * The avatar component is non clickable and non interactive/focusable component.
21
- * If the avatar is typing, then the loading indicator will be displayed.
22
- * If the counter type avatar is set to a negative number, then we will display 0.
23
- * The presence indicator will be hidden when the counter property is set.
6
+ * The `mdc-avatar` component represents a person or a space. It displays as a photo, initials, icon, or counter.
7
+ *
8
+ * ## Display Priority
9
+ *
10
+ * When multiple attributes are provided, the component determines what to display based on this priority:
11
+ * 1. **Photo** (`src`) - Takes highest priority
12
+ * - While loading: Shows `initials` as placeholder if provided (instant), otherwise shows icon (requires loading)
13
+ * - After loading: Shows the photo
14
+ * - On error: Placeholder remains visible (initials or icon)
15
+ * 2. **Icon** (`icon-name`) - Takes priority if no `src` is provided
16
+ * - Shows custom icon if `icon-name` is set (requires icon library to load)
17
+ * - **Note:** If both `icon-name` and `initials` are provided (without `src`), icon takes precedence and initials are ignored.
18
+ * This means users may see a delay while the icon loads, even though initials render instantly.
19
+ * - Defaults to `user-regular` icon if no other content is available
20
+ * 3. **Initials** (`initials`) - Displayed only if no `src` or `icon-name` is provided
21
+ * - Shows first two characters, converted to uppercase
22
+ * - Renders instantly (no loading required)
23
+ * 4. **Counter** (`counter`) - Displayed only if none of the above are provided
24
+ * - Shows numeric value (max 99+)
25
+ * - Negative values display as 0
26
+ *
27
+ * ## Behavior
28
+ * - Non-interactive and non-focusable component (use `mdc-avatarbutton` for clickable avatars)
29
+ * - Shows loading indicator overlay when `is-typing` is true (displays on top of existing content)
30
+ * - Presence indicator hidden when counter is set or when typing
24
31
  *
25
32
  * @dependency mdc-icon
26
33
  * @dependency mdc-presence
@@ -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,28 +4,43 @@ import type { Events as EventsInherited } from '../../components/buttonsimple/bu
4
4
  /**
5
5
  * `mdc-button` is a component that can be configured in various ways to suit different use cases.
6
6
  *
7
- * Button Variants:
8
- * - **Primary**: Solid background color.
9
- * - **Secondary**: Transparent background with a solid border.
10
- * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.
11
- *
12
- * Button Colors:
13
- * - **Positive**: Green color.
14
- * - **Negative**: Red color.
15
- * - **Accent**: Blue color.
16
- * - **Promotional**: Purple color.
17
- * - **Default**: White color.
18
- *
19
- * Button Sizes (in REM units):
20
- * - **Pill button**: 40, 32, 28, 24.
21
- * - **Icon button**: 64, 52, 40, 32, 28, 24.
22
- * - **Tertiary icon button**: 20.
23
- *
24
- * Button Types:
25
- * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.
26
- * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.
27
- * - **Icon button**: A button represented by just an icon without any text.
28
- * The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots.
7
+ * ## Button configuration
8
+ *
9
+ * The appearance of the button depends on combination of multiple attributes.
10
+ *
11
+ * ### Button Types
12
+ *
13
+ * The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots:
14
+ *
15
+ * - **Pill button**: Contains text value, commonly used for call to action, tags, or filters
16
+ * - **Pill button with icons**: Contains an icon on the left or right side of the button
17
+ * - **Icon button**: Represented by just an icon without any text
18
+ *
19
+ * ### Button Variants:
20
+ *
21
+ * Options for button backgrounds and borders:
22
+ *
23
+ * - **Primary**: Solid background color
24
+ * - **Secondary**: Transparent background with solid border
25
+ * - **Tertiary**: No background or border, text-only appearance
26
+ *
27
+ * ### Button Colors
28
+ *
29
+ * Color options for **Primary** and **Secondary** buttons:
30
+ *
31
+ * - **Default**: For standard actions
32
+ * - **Positive**: For success or confirmation actions
33
+ * - **Negative**: For destructive or error actions
34
+ * - **Accent**: For informational actions
35
+ * - **Promotional**: For promotional actions
36
+ *
37
+ * ### Button Sizes
38
+ *
39
+ * Size options for different button configurations in REM:
40
+ *
41
+ * - **Pill button**: 40, 32, 28, 24
42
+ * - **Icon button**: 64, 52, 40, 32, 28, 24
43
+ * - **Tertiary icon button**: 20
29
44
  *
30
45
  * @dependency mdc-icon
31
46
  *
@@ -38,6 +53,8 @@ import type { Events as EventsInherited } from '../../components/buttonsimple/bu
38
53
  * @csspart button-text - Text label of the button, passed in default slot
39
54
  * @csspart prefix - Content before the text label, passed in `prefix` slot
40
55
  * @csspart postfix - Content after the text label, passed in `postfix` slot
56
+ * @csspart prefix-icon - Icon element displayed before the text label when `prefix-icon` attribute is set
57
+ * @csspart postfix-icon - Icon element displayed after the text label when `postfix-icon` attribute is set
41
58
  *
42
59
  * @cssproperty --mdc-button-height - Height for button size
43
60
  * @cssproperty --mdc-button-background - Background of the button
@@ -5,28 +5,43 @@ import { TAG_NAME } from '../../components/button/button.constants';
5
5
  /**
6
6
  * `mdc-button` is a component that can be configured in various ways to suit different use cases.
7
7
  *
8
- * Button Variants:
9
- * - **Primary**: Solid background color.
10
- * - **Secondary**: Transparent background with a solid border.
11
- * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.
12
- *
13
- * Button Colors:
14
- * - **Positive**: Green color.
15
- * - **Negative**: Red color.
16
- * - **Accent**: Blue color.
17
- * - **Promotional**: Purple color.
18
- * - **Default**: White color.
19
- *
20
- * Button Sizes (in REM units):
21
- * - **Pill button**: 40, 32, 28, 24.
22
- * - **Icon button**: 64, 52, 40, 32, 28, 24.
23
- * - **Tertiary icon button**: 20.
24
- *
25
- * Button Types:
26
- * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.
27
- * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.
28
- * - **Icon button**: A button represented by just an icon without any text.
29
- * The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots.
8
+ * ## Button configuration
9
+ *
10
+ * The appearance of the button depends on combination of multiple attributes.
11
+ *
12
+ * ### Button Types
13
+ *
14
+ * The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots:
15
+ *
16
+ * - **Pill button**: Contains text value, commonly used for call to action, tags, or filters
17
+ * - **Pill button with icons**: Contains an icon on the left or right side of the button
18
+ * - **Icon button**: Represented by just an icon without any text
19
+ *
20
+ * ### Button Variants:
21
+ *
22
+ * Options for button backgrounds and borders:
23
+ *
24
+ * - **Primary**: Solid background color
25
+ * - **Secondary**: Transparent background with solid border
26
+ * - **Tertiary**: No background or border, text-only appearance
27
+ *
28
+ * ### Button Colors
29
+ *
30
+ * Color options for **Primary** and **Secondary** buttons:
31
+ *
32
+ * - **Default**: For standard actions
33
+ * - **Positive**: For success or confirmation actions
34
+ * - **Negative**: For destructive or error actions
35
+ * - **Accent**: For informational actions
36
+ * - **Promotional**: For promotional actions
37
+ *
38
+ * ### Button Sizes
39
+ *
40
+ * Size options for different button configurations in REM:
41
+ *
42
+ * - **Pill button**: 40, 32, 28, 24
43
+ * - **Icon button**: 64, 52, 40, 32, 28, 24
44
+ * - **Tertiary icon button**: 20
30
45
  *
31
46
  * @dependency mdc-icon
32
47
  *
@@ -39,6 +54,8 @@ import { TAG_NAME } from '../../components/button/button.constants';
39
54
  * @csspart button-text - Text label of the button, passed in default slot
40
55
  * @csspart prefix - Content before the text label, passed in `prefix` slot
41
56
  * @csspart postfix - Content after the text label, passed in `postfix` slot
57
+ * @csspart prefix-icon - Icon element displayed before the text label when `prefix-icon` attribute is set
58
+ * @csspart postfix-icon - Icon element displayed after the text label when `postfix-icon` attribute is set
42
59
  *
43
60
  * @cssproperty --mdc-button-height - Height for button size
44
61
  * @cssproperty --mdc-button-background - Background of the button
@@ -1,23 +1,21 @@
1
1
  import Component from '../../components/buttongroup';
2
2
  /**
3
- * buttongroup component, is a wrapper to group multiple buttons.
4
- * It can support icon buttons, combination of icon and pill buttons, and text buttons.
5
- * Button group can be positioned in horizontal orientation and vertical orientation.
6
- *
7
- * The sizes of buttons within the button group can be set using the `size` attribute on the button group,
8
- * which will apply the size to all buttons within the group.
9
- *
10
- * Buttons of sizes 24, 28, 32, and 40 are only supported inside a button group. Default size is 28.
11
- *
12
- * The variant of buttons within the button group can be set using the `variant` attribute on the button group,
13
- * which will apply the variant to all buttons within the group. Default variant is `primary`.
14
- *
15
- * All buttons are placed horizontally by default. To change the orientation to vertical, set the `orientation` attribute to `vertical`.
16
- *
17
- * Things to note:
18
- * - Button group will allow only `mdc-button` components as its direct children.
19
- * - Button group will set the `size` and `variant` attributes on the buttons within it,
20
- * so any `size` or `variant` set directly on any button will be overridden.
3
+ * `mdc-buttongroup` is a wrapper component that groups multiple buttons together.
4
+ *
5
+ * ## Supported button types
6
+ * - Icon buttons
7
+ * - Pill buttons
8
+ * - Combination of icon and pill buttons
9
+ *
10
+ * ## Features
11
+ * - Horizontal or vertical orientation
12
+ * - Unified size and variant applied to all child buttons
13
+ * - Optional compact mode for reduced height
14
+ * - Supported sizes: 24, 28 (default), 32, 40
15
+ *
16
+ * ## Usage
17
+ * - Only `mdc-button` components are allowed as direct children
18
+ * - The `size` and `variant` set on buttongroup override individual button settings
21
19
  *
22
20
  * @tagname mdc-buttongroup
23
21
  *
@@ -3,24 +3,22 @@ import { createComponent } from '@lit/react';
3
3
  import Component from '../../components/buttongroup';
4
4
  import { TAG_NAME } from '../../components/buttongroup/buttongroup.constants';
5
5
  /**
6
- * buttongroup component, is a wrapper to group multiple buttons.
7
- * It can support icon buttons, combination of icon and pill buttons, and text buttons.
8
- * Button group can be positioned in horizontal orientation and vertical orientation.
9
- *
10
- * The sizes of buttons within the button group can be set using the `size` attribute on the button group,
11
- * which will apply the size to all buttons within the group.
12
- *
13
- * Buttons of sizes 24, 28, 32, and 40 are only supported inside a button group. Default size is 28.
14
- *
15
- * The variant of buttons within the button group can be set using the `variant` attribute on the button group,
16
- * which will apply the variant to all buttons within the group. Default variant is `primary`.
17
- *
18
- * All buttons are placed horizontally by default. To change the orientation to vertical, set the `orientation` attribute to `vertical`.
19
- *
20
- * Things to note:
21
- * - Button group will allow only `mdc-button` components as its direct children.
22
- * - Button group will set the `size` and `variant` attributes on the buttons within it,
23
- * so any `size` or `variant` set directly on any button will be overridden.
6
+ * `mdc-buttongroup` is a wrapper component that groups multiple buttons together.
7
+ *
8
+ * ## Supported button types
9
+ * - Icon buttons
10
+ * - Pill buttons
11
+ * - Combination of icon and pill buttons
12
+ *
13
+ * ## Features
14
+ * - Horizontal or vertical orientation
15
+ * - Unified size and variant applied to all child buttons
16
+ * - Optional compact mode for reduced height
17
+ * - Supported sizes: 24, 28 (default), 32, 40
18
+ *
19
+ * ## Usage
20
+ * - Only `mdc-button` components are allowed as direct children
21
+ * - The `size` and `variant` set on buttongroup override individual button settings
24
22
  *
25
23
  * @tagname mdc-buttongroup
26
24
  *
@@ -6,16 +6,18 @@ import type { Events } from '../../components/buttonsimple/buttonsimple.types';
6
6
  * It is used as an internal component and is not intended to be used directly by consumers.
7
7
  * Consumers should use the `mdc-button` component instead.
8
8
  *
9
+ * @tagname mdc-buttonsimple
10
+ *
11
+ * @slot - Text label of the button.
12
+ *
9
13
  * @event click - (React: onClick) This event is dispatched when the button is clicked.
10
14
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.
11
15
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.
12
16
  * @event focus - (React: onFocus) This event is dispatched when the button receives focus.
13
17
  *
14
- * @tagname mdc-buttonsimple
15
- *
16
18
  * @cssproperty --mdc-button-height - Height for button size
17
19
  * @cssproperty --mdc-button-background - Background color of the button
18
- * @cssproperty --mdc-button-border-color - Borer color of the button
20
+ * @cssproperty --mdc-button-border-color - Border color of the button
19
21
  * @cssproperty --mdc-button-text-color - Text color of the button
20
22
  */
21
23
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
@@ -7,16 +7,18 @@ import { TAG_NAME } from '../../components/buttonsimple/buttonsimple.constants';
7
7
  * It is used as an internal component and is not intended to be used directly by consumers.
8
8
  * Consumers should use the `mdc-button` component instead.
9
9
  *
10
+ * @tagname mdc-buttonsimple
11
+ *
12
+ * @slot - Text label of the button.
13
+ *
10
14
  * @event click - (React: onClick) This event is dispatched when the button is clicked.
11
15
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.
12
16
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.
13
17
  * @event focus - (React: onFocus) This event is dispatched when the button receives focus.
14
18
  *
15
- * @tagname mdc-buttonsimple
16
- *
17
19
  * @cssproperty --mdc-button-height - Height for button size
18
20
  * @cssproperty --mdc-button-background - Background color of the button
19
- * @cssproperty --mdc-button-border-color - Borer color of the button
21
+ * @cssproperty --mdc-button-border-color - Border color of the button
20
22
  * @cssproperty --mdc-button-text-color - Text color of the button
21
23
  */
22
24
  const reactWrapper = createComponent({
@@ -15,15 +15,22 @@ export const ButtonComponentMixin = (superClass) => {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  /**
18
- * There are 3 variants of button: primary, secondary, tertiary. They are styled differently.
19
- * - **Primary**: Solid background color.
20
- * - **Secondary**: Transparent background with a solid border.
21
- * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.
18
+ * The visual style variant of the button.
19
+ * - `primary`: Solid background color
20
+ * - `secondary`: Transparent background with solid border
21
+ * - `tertiary`: No background or border, text-only appearance
22
22
  * @default primary
23
23
  */
24
24
  this.variant = DEFAULTS.VARIANT;
25
25
  /**
26
- * There are 5 colors for button: positive, negative, accent, promotional, default.
26
+ * The semantic color of the button.
27
+ * - `positive`: For success or confirmation actions
28
+ * - `negative`: For destructive or error actions
29
+ * - `accent`: For informational actions
30
+ * - `promotional`: For promotional actions
31
+ * - `default`: For standard actions
32
+ *
33
+ * Note: Tertiary buttons always use default color.
27
34
  * @default default
28
35
  */
29
36
  this.color = DEFAULTS.COLOR;
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.13",
4
+ "version": "0.129.15",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"