@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
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
2
|
import { Component } from '../../models';
|
|
3
3
|
/**
|
|
4
|
-
* The `mdc-appheader` component provides a structured and accessible app header layout.
|
|
5
|
-
* It consists of three primary sections: leading, center, and trailing.
|
|
4
|
+
* The `mdc-appheader` component provides a structured and accessible app header layout with three sections: leading, center, and trailing.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
6
|
+
* ## Layout sections
|
|
7
|
+
* - **Leading** - Typically holds brand logo, brand name, or menu icon
|
|
8
|
+
* - **Center** - Can contain search bar, icons, navigation links, or action controls
|
|
9
|
+
* - **Trailing** - Generally includes profile avatar, icons, settings, or additional action controls
|
|
10
|
+
*
|
|
11
|
+
* Each section automatically handles flex alignment: leading aligns left, center aligns center, trailing aligns right.
|
|
10
12
|
*
|
|
11
13
|
* @tagname mdc-appheader
|
|
12
14
|
*
|
|
13
|
-
* @slot leading -
|
|
14
|
-
* @slot center -
|
|
15
|
-
* @slot trailing -
|
|
15
|
+
* @slot leading - Content for the leading section (left-aligned).
|
|
16
|
+
* @slot center - Content for the center section (center-aligned).
|
|
17
|
+
* @slot trailing - Content for the trailing section (right-aligned).
|
|
18
|
+
*
|
|
19
|
+
* @cssproperty --mdc-appheader-height - Height of the app header. Default is 4rem (64px).
|
|
16
20
|
*
|
|
17
|
-
* @csspart container - The main container
|
|
18
|
-
* @csspart leading-section - The leading section
|
|
19
|
-
* @csspart center-section - The center section
|
|
20
|
-
* @csspart trailing-section - The trailing section
|
|
21
|
+
* @csspart container - The main header container.
|
|
22
|
+
* @csspart leading-section - The leading section wrapper (left side).
|
|
23
|
+
* @csspart center-section - The center section wrapper (middle).
|
|
24
|
+
* @csspart trailing-section - The trailing section wrapper (right side).
|
|
21
25
|
*/
|
|
22
26
|
declare class Appheader extends Component {
|
|
23
27
|
/**
|
|
@@ -2,23 +2,27 @@ import { html } from 'lit';
|
|
|
2
2
|
import { Component } from '../../models';
|
|
3
3
|
import styles from './appheader.styles';
|
|
4
4
|
/**
|
|
5
|
-
* The `mdc-appheader` component provides a structured and accessible app header layout.
|
|
6
|
-
* It consists of three primary sections: leading, center, and trailing.
|
|
5
|
+
* The `mdc-appheader` component provides a structured and accessible app header layout with three sections: leading, center, and trailing.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
7
|
+
* ## Layout sections
|
|
8
|
+
* - **Leading** - Typically holds brand logo, brand name, or menu icon
|
|
9
|
+
* - **Center** - Can contain search bar, icons, navigation links, or action controls
|
|
10
|
+
* - **Trailing** - Generally includes profile avatar, icons, settings, or additional action controls
|
|
11
|
+
*
|
|
12
|
+
* Each section automatically handles flex alignment: leading aligns left, center aligns center, trailing aligns right.
|
|
11
13
|
*
|
|
12
14
|
* @tagname mdc-appheader
|
|
13
15
|
*
|
|
14
|
-
* @slot leading -
|
|
15
|
-
* @slot center -
|
|
16
|
-
* @slot trailing -
|
|
16
|
+
* @slot leading - Content for the leading section (left-aligned).
|
|
17
|
+
* @slot center - Content for the center section (center-aligned).
|
|
18
|
+
* @slot trailing - Content for the trailing section (right-aligned).
|
|
19
|
+
*
|
|
20
|
+
* @cssproperty --mdc-appheader-height - Height of the app header. Default is 4rem (64px).
|
|
17
21
|
*
|
|
18
|
-
* @csspart container - The main container
|
|
19
|
-
* @csspart leading-section - The leading section
|
|
20
|
-
* @csspart center-section - The center section
|
|
21
|
-
* @csspart trailing-section - The trailing section
|
|
22
|
+
* @csspart container - The main header container.
|
|
23
|
+
* @csspart leading-section - The leading section wrapper (left side).
|
|
24
|
+
* @csspart center-section - The center section wrapper (middle).
|
|
25
|
+
* @csspart trailing-section - The trailing section wrapper (right side).
|
|
22
26
|
*/
|
|
23
27
|
class Appheader extends Component {
|
|
24
28
|
/**
|
|
@@ -3,24 +3,31 @@ import { CSSResult } from 'lit';
|
|
|
3
3
|
import { Component } from '../../models';
|
|
4
4
|
declare const Avatar_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/AvatarComponentMixin").AvatarComponentMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/IconNameMixin").IconNameMixinInterface> & typeof Component;
|
|
5
5
|
/**
|
|
6
|
-
* The `mdc-avatar` component
|
|
7
|
-
* An avatar can be an icon, initials, counter and photo.
|
|
6
|
+
* The `mdc-avatar` component represents a person or a space. It displays as a photo, initials, icon, or counter.
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
* you need to set "src" attribute.
|
|
8
|
+
* ## Display Priority
|
|
11
9
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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
|
|
16
26
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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.
|
|
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
|
|
@@ -17,24 +17,31 @@ import { AVATAR_TYPE, DEFAULTS, MAX_COUNTER } from './avatar.constants';
|
|
|
17
17
|
import styles from './avatar.styles';
|
|
18
18
|
import { getAvatarIconSize, getAvatarTextFontSize, getPresenceSize } from './avatar.utils';
|
|
19
19
|
/**
|
|
20
|
-
* The `mdc-avatar` component
|
|
21
|
-
* An avatar can be an icon, initials, counter and photo.
|
|
20
|
+
* The `mdc-avatar` component represents a person or a space. It displays as a photo, initials, icon, or counter.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
24
|
-
* you need to set "src" attribute.
|
|
22
|
+
* ## Display Priority
|
|
25
23
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
24
|
+
* When multiple attributes are provided, the component determines what to display based on this priority:
|
|
25
|
+
* 1. **Photo** (`src`) - Takes highest priority
|
|
26
|
+
* - While loading: Shows `initials` as placeholder if provided (instant), otherwise shows icon (requires loading)
|
|
27
|
+
* - After loading: Shows the photo
|
|
28
|
+
* - On error: Placeholder remains visible (initials or icon)
|
|
29
|
+
* 2. **Icon** (`icon-name`) - Takes priority if no `src` is provided
|
|
30
|
+
* - Shows custom icon if `icon-name` is set (requires icon library to load)
|
|
31
|
+
* - **Note:** If both `icon-name` and `initials` are provided (without `src`), icon takes precedence and initials are ignored.
|
|
32
|
+
* This means users may see a delay while the icon loads, even though initials render instantly.
|
|
33
|
+
* - Defaults to `user-regular` icon if no other content is available
|
|
34
|
+
* 3. **Initials** (`initials`) - Displayed only if no `src` or `icon-name` is provided
|
|
35
|
+
* - Shows first two characters, converted to uppercase
|
|
36
|
+
* - Renders instantly (no loading required)
|
|
37
|
+
* 4. **Counter** (`counter`) - Displayed only if none of the above are provided
|
|
38
|
+
* - Shows numeric value (max 99+)
|
|
39
|
+
* - Negative values display as 0
|
|
30
40
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* If the avatar is typing, then the loading indicator will be displayed.
|
|
36
|
-
* If the counter type avatar is set to a negative number, then we will display 0.
|
|
37
|
-
* The presence indicator will be hidden when the counter property is set.
|
|
41
|
+
* ## Behavior
|
|
42
|
+
* - Non-interactive and non-focusable component (use `mdc-avatarbutton` for clickable avatars)
|
|
43
|
+
* - Shows loading indicator overlay when `is-typing` is true (displays on top of existing content)
|
|
44
|
+
* - Presence indicator hidden when counter is set or when typing
|
|
38
45
|
*
|
|
39
46
|
* @dependency mdc-icon
|
|
40
47
|
* @dependency mdc-presence
|
|
@@ -3,25 +3,27 @@ import { CSSResult } from 'lit';
|
|
|
3
3
|
import Buttonsimple from '../buttonsimple/buttonsimple.component';
|
|
4
4
|
declare const AvatarButton_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/AvatarComponentMixin").AvatarComponentMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/IconNameMixin").IconNameMixinInterface> & typeof Buttonsimple;
|
|
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.
|
|
@@ -18,25 +18,27 @@ import { DEFAULTS as BUTTON_DEFAULTS } from '../button/button.constants';
|
|
|
18
18
|
import Buttonsimple from '../buttonsimple/buttonsimple.component';
|
|
19
19
|
import styles from './avatarbutton.styles';
|
|
20
20
|
/**
|
|
21
|
-
* The `mdc-avatarbutton` component is an
|
|
21
|
+
* The `mdc-avatarbutton` component is an interactive, clickable version of `mdc-avatar`.
|
|
22
|
+
* It wraps the avatar component in a button, making it focusable and actionable.
|
|
22
23
|
*
|
|
23
|
-
* This component
|
|
24
|
-
*
|
|
24
|
+
* This component extends `buttonsimple` and includes all avatar display features (photo, initials, icon, counter, presence).
|
|
25
|
+
* Use CSS parts to customize the avatar's appearance inside the button.
|
|
25
26
|
*
|
|
26
|
-
*
|
|
27
|
+
* ## Accessibility
|
|
28
|
+
* - Always provide an `aria-label` attribute to describe the button's purpose
|
|
27
29
|
*
|
|
28
30
|
* @dependency mdc-avatar
|
|
29
31
|
*
|
|
30
|
-
* @event click - (React: onClick)
|
|
31
|
-
* @event keydown - (React: onKeyDown)
|
|
32
|
-
* @event keyup - (React: onKeyUp)
|
|
33
|
-
* @event focus - (React: onFocus)
|
|
32
|
+
* @event click - (React: onClick) Dispatched when the avatar button is clicked.
|
|
33
|
+
* @event keydown - (React: onKeyDown) Dispatched when a key is pressed on the avatar button.
|
|
34
|
+
* @event keyup - (React: onKeyUp) Dispatched when a key is released on the avatar button.
|
|
35
|
+
* @event focus - (React: onFocus) Dispatched when the avatar button receives focus.
|
|
34
36
|
*
|
|
35
37
|
* @tagname mdc-avatarbutton
|
|
36
38
|
*
|
|
37
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-rest - Background color of the overlay in rest state
|
|
38
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-hover - Background color of the overlay in hover state
|
|
39
|
-
* @cssproperty --mdc-avatarbutton-overlay-background-color-active - Background color of the overlay in active state
|
|
39
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-rest - Background color of the overlay in rest state.
|
|
40
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-hover - Background color of the overlay in hover state.
|
|
41
|
+
* @cssproperty --mdc-avatarbutton-overlay-background-color-active - Background color of the overlay in active state.
|
|
40
42
|
*
|
|
41
43
|
* @csspart overlay - The overlay part of the avatar button.
|
|
42
44
|
* @csspart content - The main content of the avatar.
|
|
@@ -5,18 +5,20 @@ declare const ButtonLink_base: import("../../utils/mixins/index.types").Construc
|
|
|
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,20 +29,20 @@ declare const ButtonLink_base: import("../../utils/mixins/index.types").Construc
|
|
|
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
|
*/
|
|
38
40
|
declare class ButtonLink extends ButtonLink_base {
|
|
39
41
|
/**
|
|
40
|
-
*
|
|
41
|
-
* - **Pill buttonlink**: 40, 32, 28, 24.
|
|
42
|
-
* - **Icon buttonlink**: 64, 52, 40, 32, 28, 24.
|
|
43
|
-
* - Tertiary icon buttonlink can also
|
|
42
|
+
* Size of the buttonlink, determined by its type.
|
|
43
|
+
* - **Pill buttonlink**: 40 (2.5rem), 32 (2rem), 28 (1.75rem), 24 (1.5rem)
|
|
44
|
+
* - **Icon buttonlink**: 64 (4rem), 52 (3.25rem), 40 (2.5rem), 32 (2rem), 28 (1.75rem), 24 (1.5rem)
|
|
45
|
+
* - **Tertiary icon buttonlink** can also use: 20 (1.25rem)
|
|
44
46
|
* @default 32
|
|
45
47
|
*/
|
|
46
48
|
size: PillButtonSize | IconButtonSize;
|
|
@@ -17,18 +17,20 @@ import styles from './buttonlink.styles';
|
|
|
17
17
|
/**
|
|
18
18
|
* `mdc-buttonlink` combines the functional behavior of `mdc-linksimple` with the visual and structural
|
|
19
19
|
* features of `mdc-button`. This includes support for variants, sizing, and optional
|
|
20
|
-
* prefix and postfix icons
|
|
20
|
+
* prefix and postfix icons.
|
|
21
21
|
*
|
|
22
22
|
* ### Features:
|
|
23
|
-
* - Behaves like
|
|
24
|
-
* - Supports slots for `prefix-icon` and `postfix-icon`.
|
|
23
|
+
* - Behaves like a link while visually resembling a button.
|
|
25
24
|
* - Customizable size, color, and variant through attributes.
|
|
25
|
+
* - Supports prefix and postfix icons.
|
|
26
26
|
* - Inherits accessibility and keyboard interaction support from `mdc-linksimple`.
|
|
27
27
|
*
|
|
28
28
|
* @dependency mdc-icon
|
|
29
29
|
*
|
|
30
30
|
* @tagname mdc-buttonlink
|
|
31
31
|
*
|
|
32
|
+
* @slot default - The default slot for buttonlink text content.
|
|
33
|
+
*
|
|
32
34
|
* @event click - (React: onClick) Fired when the user activates the buttonLink using a mouse or assistive technology.
|
|
33
35
|
* @event keydown - (React: onKeyDown) Fired when the user presses a key while the buttonLink has focus.
|
|
34
36
|
* @event focus - (React: onFocus) Fired when the buttonLink receives keyboard or mouse focus.
|
|
@@ -39,11 +41,11 @@ import styles from './buttonlink.styles';
|
|
|
39
41
|
* @csspart button-text - The slot containing the buttonlink text.
|
|
40
42
|
* @csspart postfix-icon - The postfix icon element.
|
|
41
43
|
*
|
|
42
|
-
* @cssproperty --mdc-button-height - Height
|
|
43
|
-
* @cssproperty --mdc-button-background - Background color of the
|
|
44
|
-
* @cssproperty --mdc-button-border-color -
|
|
45
|
-
* @cssproperty --mdc-button-text-color - Text color of the
|
|
46
|
-
* @cssproperty --mdc-button-line-height - Line height of the
|
|
44
|
+
* @cssproperty --mdc-button-height - Height of the buttonlink
|
|
45
|
+
* @cssproperty --mdc-button-background - Background color of the buttonlink
|
|
46
|
+
* @cssproperty --mdc-button-border-color - Border color of the buttonlink
|
|
47
|
+
* @cssproperty --mdc-button-text-color - Text color of the buttonlink
|
|
48
|
+
* @cssproperty --mdc-button-line-height - Line height of the buttonlink text
|
|
47
49
|
* @cssproperty --mdc-button-prefix-icon-size - Size of the prefix icon
|
|
48
50
|
* @cssproperty --mdc-button-postfix-icon-size - Size of the postfix icon
|
|
49
51
|
*/
|
|
@@ -51,10 +53,10 @@ class ButtonLink extends ButtonComponentMixin(Linksimple) {
|
|
|
51
53
|
constructor() {
|
|
52
54
|
super(...arguments);
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
55
|
-
* - **Pill buttonlink**: 40, 32, 28, 24.
|
|
56
|
-
* - **Icon buttonlink**: 64, 52, 40, 32, 28, 24.
|
|
57
|
-
* - Tertiary icon buttonlink can also
|
|
56
|
+
* Size of the buttonlink, determined by its type.
|
|
57
|
+
* - **Pill buttonlink**: 40 (2.5rem), 32 (2rem), 28 (1.75rem), 24 (1.5rem)
|
|
58
|
+
* - **Icon buttonlink**: 64 (4rem), 52 (3.25rem), 40 (2.5rem), 32 (2rem), 28 (1.75rem), 24 (1.5rem)
|
|
59
|
+
* - **Tertiary icon buttonlink** can also use: 20 (1.25rem)
|
|
58
60
|
* @default 32
|
|
59
61
|
*/
|
|
60
62
|
this.size = DEFAULTS.SIZE;
|
|
@@ -20,6 +20,7 @@ declare const LinkButton_base: import("../../utils/mixins/index.types").Construc
|
|
|
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.
|
|
@@ -34,21 +35,24 @@ declare const LinkButton_base: import("../../utils/mixins/index.types").Construc
|
|
|
34
35
|
*/
|
|
35
36
|
declare class LinkButton extends LinkButton_base {
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* -
|
|
40
|
-
* -
|
|
41
|
-
* - 16
|
|
38
|
+
* Size of the linkbutton text and icon.
|
|
39
|
+
* - **12**: 0.75rem font size
|
|
40
|
+
* - **14**: 0.875rem font size
|
|
41
|
+
* - **16**: 1rem font size (default)
|
|
42
42
|
* @default 16
|
|
43
43
|
*/
|
|
44
44
|
size: LinkButtonSize;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Display mode of the linkbutton.
|
|
47
|
+
* - `false`: Standalone display (default)
|
|
48
|
+
* - `true`: Inline display within text flow
|
|
47
49
|
* @default false
|
|
48
50
|
*/
|
|
49
51
|
inline: boolean;
|
|
50
52
|
/**
|
|
51
|
-
*
|
|
53
|
+
* Color scheme of the linkbutton.
|
|
54
|
+
* - `false`: Normal color scheme for light backgrounds (default)
|
|
55
|
+
* - `true`: Inverted color scheme for dark backgrounds
|
|
52
56
|
* @default false
|
|
53
57
|
*/
|
|
54
58
|
inverted: boolean;
|
|
@@ -58,6 +62,7 @@ declare class LinkButton extends LinkButton_base {
|
|
|
58
62
|
* Sets the `size` attribute for the linkbutton, falling back to the default if the value is invalid.
|
|
59
63
|
*
|
|
60
64
|
* @param size - The desired link size.
|
|
65
|
+
* @internal
|
|
61
66
|
*/
|
|
62
67
|
private setSize;
|
|
63
68
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -33,6 +33,7 @@ import styles from './linkbutton.styles';
|
|
|
33
33
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the linkbutton.
|
|
34
34
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the linkbutton.
|
|
35
35
|
* @event focus - (React: onFocus) This event is dispatched when the linkbutton receives focus.
|
|
36
|
+
* @event blur - (React: onBlur) This event is dispatched when the linkbutton loses focus.
|
|
36
37
|
*
|
|
37
38
|
* @cssproperty --mdc-link-border-radius - Border radius of the linkbutton.
|
|
38
39
|
* @cssproperty --mdc-link-color-active - Color of the linkbutton’s child content in the active state.
|
|
@@ -49,21 +50,24 @@ class LinkButton extends IconNameMixin(Buttonsimple) {
|
|
|
49
50
|
constructor() {
|
|
50
51
|
super(...arguments);
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* -
|
|
55
|
-
* -
|
|
56
|
-
* - 16
|
|
53
|
+
* Size of the linkbutton text and icon.
|
|
54
|
+
* - **12**: 0.75rem font size
|
|
55
|
+
* - **14**: 0.875rem font size
|
|
56
|
+
* - **16**: 1rem font size (default)
|
|
57
57
|
* @default 16
|
|
58
58
|
*/
|
|
59
59
|
this.size = DEFAULTS.SIZE;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Display mode of the linkbutton.
|
|
62
|
+
* - `false`: Standalone display (default)
|
|
63
|
+
* - `true`: Inline display within text flow
|
|
62
64
|
* @default false
|
|
63
65
|
*/
|
|
64
66
|
this.inline = DEFAULTS.INLINE;
|
|
65
67
|
/**
|
|
66
|
-
*
|
|
68
|
+
* Color scheme of the linkbutton.
|
|
69
|
+
* - `false`: Normal color scheme for light backgrounds (default)
|
|
70
|
+
* - `true`: Inverted color scheme for dark backgrounds
|
|
67
71
|
* @default false
|
|
68
72
|
*/
|
|
69
73
|
this.inverted = DEFAULTS.INVERTED;
|
|
@@ -83,6 +87,7 @@ class LinkButton extends IconNameMixin(Buttonsimple) {
|
|
|
83
87
|
* Sets the `size` attribute for the linkbutton, falling back to the default if the value is invalid.
|
|
84
88
|
*
|
|
85
89
|
* @param size - The desired link size.
|
|
90
|
+
* @internal
|
|
86
91
|
*/
|
|
87
92
|
setSize(size) {
|
|
88
93
|
this.setAttribute('size', Object.values(LINKBUTTON_SIZES).includes(size) ? `${size}` : DEFAULTS.SIZE.toString());
|
|
@@ -54,6 +54,12 @@ declare class Linksimple extends Linksimple_base {
|
|
|
54
54
|
rel?: string;
|
|
55
55
|
/**
|
|
56
56
|
* Optional download attribute to instruct browsers to download the linked resource.
|
|
57
|
+
*
|
|
58
|
+
* Valid values:
|
|
59
|
+
* - empty string: browser suggests a name for the downloaded file
|
|
60
|
+
* - string: name of the downloaded file
|
|
61
|
+
*
|
|
62
|
+
* More details in the [Anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download) docs.
|
|
57
63
|
*/
|
|
58
64
|
download?: string;
|
|
59
65
|
/**
|