@momentum-design/components 0.129.14 → 0.129.16
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 +2 -2
- package/dist/browser/index.js.map +2 -2
- package/dist/components/brandvisual/brandvisual.component.d.ts +2 -0
- package/dist/components/brandvisual/brandvisual.component.js +3 -1
- package/dist/components/bullet/bullet.component.d.ts +5 -2
- package/dist/components/bullet/bullet.component.js +5 -2
- package/dist/components/button/button.component.d.ts +65 -29
- package/dist/components/button/button.component.js +65 -29
- package/dist/components/buttongroup/buttongroup.component.d.ts +26 -21
- package/dist/components/buttongroup/buttongroup.component.js +26 -21
- package/dist/components/buttonsimple/buttonsimple.component.d.ts +5 -3
- package/dist/components/buttonsimple/buttonsimple.component.js +5 -3
- package/dist/custom-elements.json +153 -63
- package/dist/react/brandvisual/index.d.ts +2 -0
- package/dist/react/brandvisual/index.js +2 -0
- package/dist/react/button/index.d.ts +39 -22
- package/dist/react/button/index.js +39 -22
- package/dist/react/buttongroup/index.d.ts +16 -18
- package/dist/react/buttongroup/index.js +16 -18
- package/dist/react/buttonsimple/index.d.ts +5 -3
- package/dist/react/buttonsimple/index.js +5 -3
- package/dist/utils/mixins/ButtonComponentMixin.js +12 -5
- package/dist/utils/roles.d.ts +1 -0
- package/dist/utils/roles.js +1 -0
- package/package.json +1 -1
|
@@ -17,6 +17,8 @@ import type { BrandVisualNames } from './brandvisual.types';
|
|
|
17
17
|
* @event load - (React: onLoad) This event is dispatched when the brandvisual has been successfully loaded.
|
|
18
18
|
* @event error - (React: onError) This event is dispatched when the brandvisual fetching has failed.
|
|
19
19
|
*
|
|
20
|
+
* @csspart brandvisual - Set styles for the brandvisual svg container
|
|
21
|
+
* @csspart brandvisualImage - Set styles for the brandvisual image container
|
|
20
22
|
*/
|
|
21
23
|
declare class Brandvisual extends Component {
|
|
22
24
|
private brandVisualData?;
|
|
@@ -27,6 +27,8 @@ import styles from './brandvisual.styles';
|
|
|
27
27
|
* @event load - (React: onLoad) This event is dispatched when the brandvisual has been successfully loaded.
|
|
28
28
|
* @event error - (React: onError) This event is dispatched when the brandvisual fetching has failed.
|
|
29
29
|
*
|
|
30
|
+
* @csspart brandvisual - Set styles for the brandvisual svg container
|
|
31
|
+
* @csspart brandvisualImage - Set styles for the brandvisual image container
|
|
30
32
|
*/
|
|
31
33
|
class Brandvisual extends Component {
|
|
32
34
|
async getBrandVisualData() {
|
|
@@ -118,7 +120,7 @@ __decorate([
|
|
|
118
120
|
__metadata("design:type", String)
|
|
119
121
|
], Brandvisual.prototype, "name", void 0);
|
|
120
122
|
__decorate([
|
|
121
|
-
property({ type: String, reflect: true }),
|
|
123
|
+
property({ type: String, reflect: true, attribute: 'alt-text' }),
|
|
122
124
|
__metadata("design:type", String)
|
|
123
125
|
], Brandvisual.prototype, "altText", void 0);
|
|
124
126
|
export default Brandvisual;
|
|
@@ -14,9 +14,12 @@ import type { Size } from './bullet.types';
|
|
|
14
14
|
*/
|
|
15
15
|
declare class Bullet extends Component {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Specifies the size of the bullet visual indicator.
|
|
18
|
+
*
|
|
19
|
+
* - `small` (default): 0.25rem (4px) - Compact bullet for dense layouts
|
|
20
|
+
* - `medium`: 0.5rem (8px) - Standard bullet for most use cases
|
|
21
|
+
* - `large`: 1rem (16px) - Prominent bullet for emphasis
|
|
18
22
|
*
|
|
19
|
-
* Possible values: 'small', 'medium', 'large'
|
|
20
23
|
* @default small
|
|
21
24
|
*/
|
|
22
25
|
size: Size;
|
|
@@ -26,9 +26,12 @@ class Bullet extends Component {
|
|
|
26
26
|
constructor() {
|
|
27
27
|
super(...arguments);
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Specifies the size of the bullet visual indicator.
|
|
30
|
+
*
|
|
31
|
+
* - `small` (default): 0.25rem (4px) - Compact bullet for dense layouts
|
|
32
|
+
* - `medium`: 0.5rem (8px) - Standard bullet for most use cases
|
|
33
|
+
* - `large`: 1rem (16px) - Prominent bullet for emphasis
|
|
30
34
|
*
|
|
31
|
-
* Possible values: 'small', 'medium', 'large'
|
|
32
35
|
* @default small
|
|
33
36
|
*/
|
|
34
37
|
this.size = SIZE.SMALL;
|
|
@@ -7,28 +7,43 @@ declare const Button_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
7
7
|
/**
|
|
8
8
|
* `mdc-button` is a component that can be configured in various ways to suit different use cases.
|
|
9
9
|
*
|
|
10
|
-
* Button
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* - **
|
|
19
|
-
* - **
|
|
20
|
-
* - **
|
|
21
|
-
*
|
|
22
|
-
* Button
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* - **
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
10
|
+
* ## Button configuration
|
|
11
|
+
*
|
|
12
|
+
* The appearance of the button depends on combination of multiple attributes.
|
|
13
|
+
*
|
|
14
|
+
* ### Button Types
|
|
15
|
+
*
|
|
16
|
+
* The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots:
|
|
17
|
+
*
|
|
18
|
+
* - **Pill button**: Contains text value, commonly used for call to action, tags, or filters
|
|
19
|
+
* - **Pill button with icons**: Contains an icon on the left or right side of the button
|
|
20
|
+
* - **Icon button**: Represented by just an icon without any text
|
|
21
|
+
*
|
|
22
|
+
* ### Button Variants:
|
|
23
|
+
*
|
|
24
|
+
* Options for button backgrounds and borders:
|
|
25
|
+
*
|
|
26
|
+
* - **Primary**: Solid background color
|
|
27
|
+
* - **Secondary**: Transparent background with solid border
|
|
28
|
+
* - **Tertiary**: No background or border, text-only appearance
|
|
29
|
+
*
|
|
30
|
+
* ### Button Colors
|
|
31
|
+
*
|
|
32
|
+
* Color options for **Primary** and **Secondary** buttons:
|
|
33
|
+
*
|
|
34
|
+
* - **Default**: For standard actions
|
|
35
|
+
* - **Positive**: For success or confirmation actions
|
|
36
|
+
* - **Negative**: For destructive or error actions
|
|
37
|
+
* - **Accent**: For informational actions
|
|
38
|
+
* - **Promotional**: For promotional actions
|
|
39
|
+
*
|
|
40
|
+
* ### Button Sizes
|
|
41
|
+
*
|
|
42
|
+
* Size options for different button configurations in REM:
|
|
43
|
+
*
|
|
44
|
+
* - **Pill button**: 40, 32, 28, 24
|
|
45
|
+
* - **Icon button**: 64, 52, 40, 32, 28, 24
|
|
46
|
+
* - **Tertiary icon button**: 20
|
|
32
47
|
*
|
|
33
48
|
* @dependency mdc-icon
|
|
34
49
|
*
|
|
@@ -41,6 +56,8 @@ declare const Button_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
41
56
|
* @csspart button-text - Text label of the button, passed in default slot
|
|
42
57
|
* @csspart prefix - Content before the text label, passed in `prefix` slot
|
|
43
58
|
* @csspart postfix - Content after the text label, passed in `postfix` slot
|
|
59
|
+
* @csspart prefix-icon - Icon element displayed before the text label when `prefix-icon` attribute is set
|
|
60
|
+
* @csspart postfix-icon - Icon element displayed after the text label when `postfix-icon` attribute is set
|
|
44
61
|
*
|
|
45
62
|
* @cssproperty --mdc-button-height - Height for button size
|
|
46
63
|
* @cssproperty --mdc-button-background - Background of the button
|
|
@@ -52,18 +69,37 @@ declare const Button_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
52
69
|
*/
|
|
53
70
|
declare class Button extends Button_base {
|
|
54
71
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* -
|
|
72
|
+
* Specifies the size of the button in pixels. Available sizes depend on the button type:
|
|
73
|
+
*
|
|
74
|
+
* **Pill button** (with text):
|
|
75
|
+
* - `40`: Large size (2.5rem)
|
|
76
|
+
* - `32`: Default size (2rem)
|
|
77
|
+
* - `28`: Medium size (1.75rem)
|
|
78
|
+
* - `24`: Small size (1.5rem)
|
|
79
|
+
*
|
|
80
|
+
* **Icon button** (icon only):
|
|
81
|
+
* - `64`: Extra large (4rem)
|
|
82
|
+
* - `52`: Large (3.25rem)
|
|
83
|
+
* - `40`: Medium-large (2.5rem)
|
|
84
|
+
* - `32`: Default (2rem)
|
|
85
|
+
* - `28`: Medium (1.75rem)
|
|
86
|
+
* - `24`: Small (1.5rem)
|
|
87
|
+
* - `20`: Extra small (1.25rem) - Only available for tertiary variant
|
|
88
|
+
*
|
|
59
89
|
* @default 32
|
|
60
90
|
*/
|
|
61
91
|
size: PillButtonSize | IconButtonSize;
|
|
62
92
|
/**
|
|
63
|
-
*
|
|
93
|
+
* Inverts the button's color scheme for use on dark backgrounds.
|
|
94
|
+
* When enabled, the button adapts its colors to maintain proper contrast on inverted surfaces.
|
|
95
|
+
*
|
|
96
|
+
* **Requirements:**
|
|
97
|
+
* - Only works with `variant="primary"`
|
|
98
|
+
* - Only works with `color="default"`
|
|
99
|
+
* - Button must not be in `active` state
|
|
100
|
+
*
|
|
101
|
+
* **Use case:** Place buttons on dark-colored backgrounds or inverted theme sections.
|
|
64
102
|
*
|
|
65
|
-
* Only applies when variant is set to `primary`, color is set to `default`
|
|
66
|
-
* and button is not `active`.
|
|
67
103
|
* @default false
|
|
68
104
|
*/
|
|
69
105
|
inverted: boolean;
|
|
@@ -18,28 +18,43 @@ import { getIconNameWithoutStyle } from './button.utils';
|
|
|
18
18
|
/**
|
|
19
19
|
* `mdc-button` is a component that can be configured in various ways to suit different use cases.
|
|
20
20
|
*
|
|
21
|
-
* Button
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* - **
|
|
30
|
-
* - **
|
|
31
|
-
* - **
|
|
32
|
-
*
|
|
33
|
-
* Button
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* - **
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
21
|
+
* ## Button configuration
|
|
22
|
+
*
|
|
23
|
+
* The appearance of the button depends on combination of multiple attributes.
|
|
24
|
+
*
|
|
25
|
+
* ### Button Types
|
|
26
|
+
*
|
|
27
|
+
* The type of button is inferred based on the presence of slot and/or prefix and postfix icons/slots:
|
|
28
|
+
*
|
|
29
|
+
* - **Pill button**: Contains text value, commonly used for call to action, tags, or filters
|
|
30
|
+
* - **Pill button with icons**: Contains an icon on the left or right side of the button
|
|
31
|
+
* - **Icon button**: Represented by just an icon without any text
|
|
32
|
+
*
|
|
33
|
+
* ### Button Variants:
|
|
34
|
+
*
|
|
35
|
+
* Options for button backgrounds and borders:
|
|
36
|
+
*
|
|
37
|
+
* - **Primary**: Solid background color
|
|
38
|
+
* - **Secondary**: Transparent background with solid border
|
|
39
|
+
* - **Tertiary**: No background or border, text-only appearance
|
|
40
|
+
*
|
|
41
|
+
* ### Button Colors
|
|
42
|
+
*
|
|
43
|
+
* Color options for **Primary** and **Secondary** buttons:
|
|
44
|
+
*
|
|
45
|
+
* - **Default**: For standard actions
|
|
46
|
+
* - **Positive**: For success or confirmation actions
|
|
47
|
+
* - **Negative**: For destructive or error actions
|
|
48
|
+
* - **Accent**: For informational actions
|
|
49
|
+
* - **Promotional**: For promotional actions
|
|
50
|
+
*
|
|
51
|
+
* ### Button Sizes
|
|
52
|
+
*
|
|
53
|
+
* Size options for different button configurations in REM:
|
|
54
|
+
*
|
|
55
|
+
* - **Pill button**: 40, 32, 28, 24
|
|
56
|
+
* - **Icon button**: 64, 52, 40, 32, 28, 24
|
|
57
|
+
* - **Tertiary icon button**: 20
|
|
43
58
|
*
|
|
44
59
|
* @dependency mdc-icon
|
|
45
60
|
*
|
|
@@ -52,6 +67,8 @@ import { getIconNameWithoutStyle } from './button.utils';
|
|
|
52
67
|
* @csspart button-text - Text label of the button, passed in default slot
|
|
53
68
|
* @csspart prefix - Content before the text label, passed in `prefix` slot
|
|
54
69
|
* @csspart postfix - Content after the text label, passed in `postfix` slot
|
|
70
|
+
* @csspart prefix-icon - Icon element displayed before the text label when `prefix-icon` attribute is set
|
|
71
|
+
* @csspart postfix-icon - Icon element displayed after the text label when `postfix-icon` attribute is set
|
|
55
72
|
*
|
|
56
73
|
* @cssproperty --mdc-button-height - Height for button size
|
|
57
74
|
* @cssproperty --mdc-button-background - Background of the button
|
|
@@ -65,18 +82,37 @@ class Button extends ButtonComponentMixin(Buttonsimple) {
|
|
|
65
82
|
constructor() {
|
|
66
83
|
super(...arguments);
|
|
67
84
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* -
|
|
85
|
+
* Specifies the size of the button in pixels. Available sizes depend on the button type:
|
|
86
|
+
*
|
|
87
|
+
* **Pill button** (with text):
|
|
88
|
+
* - `40`: Large size (2.5rem)
|
|
89
|
+
* - `32`: Default size (2rem)
|
|
90
|
+
* - `28`: Medium size (1.75rem)
|
|
91
|
+
* - `24`: Small size (1.5rem)
|
|
92
|
+
*
|
|
93
|
+
* **Icon button** (icon only):
|
|
94
|
+
* - `64`: Extra large (4rem)
|
|
95
|
+
* - `52`: Large (3.25rem)
|
|
96
|
+
* - `40`: Medium-large (2.5rem)
|
|
97
|
+
* - `32`: Default (2rem)
|
|
98
|
+
* - `28`: Medium (1.75rem)
|
|
99
|
+
* - `24`: Small (1.5rem)
|
|
100
|
+
* - `20`: Extra small (1.25rem) - Only available for tertiary variant
|
|
101
|
+
*
|
|
72
102
|
* @default 32
|
|
73
103
|
*/
|
|
74
104
|
this.size = DEFAULTS.SIZE;
|
|
75
105
|
/**
|
|
76
|
-
*
|
|
106
|
+
* Inverts the button's color scheme for use on dark backgrounds.
|
|
107
|
+
* When enabled, the button adapts its colors to maintain proper contrast on inverted surfaces.
|
|
108
|
+
*
|
|
109
|
+
* **Requirements:**
|
|
110
|
+
* - Only works with `variant="primary"`
|
|
111
|
+
* - Only works with `color="default"`
|
|
112
|
+
* - Button must not be in `active` state
|
|
113
|
+
*
|
|
114
|
+
* **Use case:** Place buttons on dark-colored backgrounds or inverted theme sections.
|
|
77
115
|
*
|
|
78
|
-
* Only applies when variant is set to `primary`, color is set to `default`
|
|
79
|
-
* and button is not `active`.
|
|
80
116
|
* @default false
|
|
81
117
|
*/
|
|
82
118
|
this.inverted = DEFAULTS.INVERTED;
|
|
@@ -2,24 +2,22 @@ import { CSSResult, PropertyValues } from 'lit';
|
|
|
2
2
|
import { Component } from '../../models';
|
|
3
3
|
import type { ButtonGroupOrientation, ButtonGroupSize, ButtonGroupVariant } from './buttongroup.types';
|
|
4
4
|
/**
|
|
5
|
-
* buttongroup
|
|
6
|
-
* It can support icon buttons, combination of icon and pill buttons, and text buttons.
|
|
7
|
-
* Button group can be positioned in horizontal orientation and vertical orientation.
|
|
5
|
+
* `mdc-buttongroup` is a wrapper component that groups multiple buttons together.
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* ## Supported button types
|
|
8
|
+
* - Icon buttons
|
|
9
|
+
* - Pill buttons
|
|
10
|
+
* - Combination of icon and pill buttons
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* ## Features
|
|
13
|
+
* - Horizontal or vertical orientation
|
|
14
|
+
* - Unified size and variant applied to all child buttons
|
|
15
|
+
* - Optional compact mode for reduced height
|
|
16
|
+
* - Supported sizes: 24, 28 (default), 32, 40
|
|
13
17
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* All buttons are placed horizontally by default. To change the orientation to vertical, set the `orientation` attribute to `vertical`.
|
|
18
|
-
*
|
|
19
|
-
* Things to note:
|
|
20
|
-
* - Button group will allow only `mdc-button` components as its direct children.
|
|
21
|
-
* - Button group will set the `size` and `variant` attributes on the buttons within it,
|
|
22
|
-
* so any `size` or `variant` set directly on any button will be overridden.
|
|
18
|
+
* ## Usage
|
|
19
|
+
* - Only `mdc-button` components are allowed as direct children
|
|
20
|
+
* - The `size` and `variant` set on buttongroup override individual button settings
|
|
23
21
|
*
|
|
24
22
|
* @tagname mdc-buttongroup
|
|
25
23
|
*
|
|
@@ -33,23 +31,30 @@ import type { ButtonGroupOrientation, ButtonGroupSize, ButtonGroupVariant } from
|
|
|
33
31
|
*/
|
|
34
32
|
declare class ButtonGroup extends Component {
|
|
35
33
|
/**
|
|
36
|
-
*
|
|
34
|
+
* Layout direction of the buttons within the group.
|
|
35
|
+
* - `horizontal`: Buttons are arranged side by side (default)
|
|
36
|
+
* - `vertical`: Buttons are stacked vertically
|
|
37
37
|
* @default 'horizontal'
|
|
38
38
|
*/
|
|
39
39
|
orientation: ButtonGroupOrientation;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Visual style variant applied to all buttons in the group.
|
|
42
|
+
* - `primary`: Solid background color
|
|
43
|
+
* - `secondary`: Transparent background with solid border
|
|
44
|
+
* - `tertiary`: No background or border, text-only appearance
|
|
42
45
|
* @default 'primary'
|
|
43
46
|
*/
|
|
44
47
|
variant: ButtonGroupVariant;
|
|
45
48
|
/**
|
|
46
|
-
* Size
|
|
47
|
-
*
|
|
49
|
+
* Size applied to all buttons in the group.
|
|
50
|
+
* Available sizes: 24, 28, 32, 40
|
|
51
|
+
* @default 28
|
|
48
52
|
*/
|
|
49
53
|
size: ButtonGroupSize;
|
|
50
54
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
55
|
+
* Enables compact mode with reduced height.
|
|
56
|
+
* When true, all buttons have a fixed height of 24px regardless of their size setting.
|
|
57
|
+
* Useful for space-constrained layouts.
|
|
53
58
|
* @default false
|
|
54
59
|
*/
|
|
55
60
|
compact: boolean;
|
|
@@ -13,24 +13,22 @@ import { Component } from '../../models';
|
|
|
13
13
|
import { DEFAULTS } from './buttongroup.constants';
|
|
14
14
|
import styles from './buttongroup.styles';
|
|
15
15
|
/**
|
|
16
|
-
* buttongroup
|
|
17
|
-
* It can support icon buttons, combination of icon and pill buttons, and text buttons.
|
|
18
|
-
* Button group can be positioned in horizontal orientation and vertical orientation.
|
|
16
|
+
* `mdc-buttongroup` is a wrapper component that groups multiple buttons together.
|
|
19
17
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* ## Supported button types
|
|
19
|
+
* - Icon buttons
|
|
20
|
+
* - Pill buttons
|
|
21
|
+
* - Combination of icon and pill buttons
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* ## Features
|
|
24
|
+
* - Horizontal or vertical orientation
|
|
25
|
+
* - Unified size and variant applied to all child buttons
|
|
26
|
+
* - Optional compact mode for reduced height
|
|
27
|
+
* - Supported sizes: 24, 28 (default), 32, 40
|
|
24
28
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* All buttons are placed horizontally by default. To change the orientation to vertical, set the `orientation` attribute to `vertical`.
|
|
29
|
-
*
|
|
30
|
-
* Things to note:
|
|
31
|
-
* - Button group will allow only `mdc-button` components as its direct children.
|
|
32
|
-
* - Button group will set the `size` and `variant` attributes on the buttons within it,
|
|
33
|
-
* so any `size` or `variant` set directly on any button will be overridden.
|
|
29
|
+
* ## Usage
|
|
30
|
+
* - Only `mdc-button` components are allowed as direct children
|
|
31
|
+
* - The `size` and `variant` set on buttongroup override individual button settings
|
|
34
32
|
*
|
|
35
33
|
* @tagname mdc-buttongroup
|
|
36
34
|
*
|
|
@@ -46,23 +44,30 @@ class ButtonGroup extends Component {
|
|
|
46
44
|
constructor() {
|
|
47
45
|
super(...arguments);
|
|
48
46
|
/**
|
|
49
|
-
*
|
|
47
|
+
* Layout direction of the buttons within the group.
|
|
48
|
+
* - `horizontal`: Buttons are arranged side by side (default)
|
|
49
|
+
* - `vertical`: Buttons are stacked vertically
|
|
50
50
|
* @default 'horizontal'
|
|
51
51
|
*/
|
|
52
52
|
this.orientation = DEFAULTS.ORIENTATION;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Visual style variant applied to all buttons in the group.
|
|
55
|
+
* - `primary`: Solid background color
|
|
56
|
+
* - `secondary`: Transparent background with solid border
|
|
57
|
+
* - `tertiary`: No background or border, text-only appearance
|
|
55
58
|
* @default 'primary'
|
|
56
59
|
*/
|
|
57
60
|
this.variant = DEFAULTS.VARIANT;
|
|
58
61
|
/**
|
|
59
|
-
* Size
|
|
60
|
-
*
|
|
62
|
+
* Size applied to all buttons in the group.
|
|
63
|
+
* Available sizes: 24, 28, 32, 40
|
|
64
|
+
* @default 28
|
|
61
65
|
*/
|
|
62
66
|
this.size = DEFAULTS.SIZE;
|
|
63
67
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
68
|
+
* Enables compact mode with reduced height.
|
|
69
|
+
* When true, all buttons have a fixed height of 24px regardless of their size setting.
|
|
70
|
+
* Useful for space-constrained layouts.
|
|
66
71
|
* @default false
|
|
67
72
|
*/
|
|
68
73
|
this.compact = false;
|
|
@@ -9,16 +9,18 @@ declare const Buttonsimple_base: import("../../utils/mixins/index.types").Constr
|
|
|
9
9
|
* It is used as an internal component and is not intended to be used directly by consumers.
|
|
10
10
|
* Consumers should use the `mdc-button` component instead.
|
|
11
11
|
*
|
|
12
|
+
* @tagname mdc-buttonsimple
|
|
13
|
+
*
|
|
14
|
+
* @slot - Text label of the button.
|
|
15
|
+
*
|
|
12
16
|
* @event click - (React: onClick) This event is dispatched when the button is clicked.
|
|
13
17
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.
|
|
14
18
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.
|
|
15
19
|
* @event focus - (React: onFocus) This event is dispatched when the button receives focus.
|
|
16
20
|
*
|
|
17
|
-
* @tagname mdc-buttonsimple
|
|
18
|
-
*
|
|
19
21
|
* @cssproperty --mdc-button-height - Height for button size
|
|
20
22
|
* @cssproperty --mdc-button-background - Background color of the button
|
|
21
|
-
* @cssproperty --mdc-button-border-color -
|
|
23
|
+
* @cssproperty --mdc-button-border-color - Border color of the button
|
|
22
24
|
* @cssproperty --mdc-button-text-color - Text color of the button
|
|
23
25
|
*/
|
|
24
26
|
declare class Buttonsimple extends Buttonsimple_base {
|
|
@@ -21,16 +21,18 @@ import styles from './buttonsimple.styles';
|
|
|
21
21
|
* It is used as an internal component and is not intended to be used directly by consumers.
|
|
22
22
|
* Consumers should use the `mdc-button` component instead.
|
|
23
23
|
*
|
|
24
|
+
* @tagname mdc-buttonsimple
|
|
25
|
+
*
|
|
26
|
+
* @slot - Text label of the button.
|
|
27
|
+
*
|
|
24
28
|
* @event click - (React: onClick) This event is dispatched when the button is clicked.
|
|
25
29
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.
|
|
26
30
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.
|
|
27
31
|
* @event focus - (React: onFocus) This event is dispatched when the button receives focus.
|
|
28
32
|
*
|
|
29
|
-
* @tagname mdc-buttonsimple
|
|
30
|
-
*
|
|
31
33
|
* @cssproperty --mdc-button-height - Height for button size
|
|
32
34
|
* @cssproperty --mdc-button-background - Background color of the button
|
|
33
|
-
* @cssproperty --mdc-button-border-color -
|
|
35
|
+
* @cssproperty --mdc-button-border-color - Border color of the button
|
|
34
36
|
* @cssproperty --mdc-button-text-color - Text color of the button
|
|
35
37
|
*/
|
|
36
38
|
class Buttonsimple extends AutoFocusOnMountMixin(TabIndexMixin(DisabledMixin(Component))) {
|