@momentum-design/components 0.39.3 → 0.39.5
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 +79 -79
- package/dist/browser/index.js.map +3 -3
- package/dist/components/alertchip/alertchip.component.d.ts +1 -1
- package/dist/components/alertchip/alertchip.component.js +4 -1
- package/dist/components/avatarbutton/avatarbutton.component.d.ts +1 -1
- package/dist/components/avatarbutton/avatarbutton.component.js +4 -1
- package/dist/components/checkbox/checkbox.component.d.ts +1 -1
- package/dist/components/checkbox/checkbox.component.js +4 -1
- package/dist/components/chip/chip.component.d.ts +1 -1
- package/dist/components/chip/chip.component.js +4 -1
- package/dist/components/coachmark/coachmark.component.d.ts +7 -1
- package/dist/components/coachmark/coachmark.component.js +10 -1
- package/dist/components/divider/divider.component.d.ts +1 -1
- package/dist/components/divider/divider.component.js +39 -36
- package/dist/components/filterchip/filterchip.component.d.ts +1 -1
- package/dist/components/filterchip/filterchip.component.js +4 -1
- package/dist/components/formfieldgroup/formfieldgroup.component.d.ts +1 -1
- package/dist/components/formfieldgroup/formfieldgroup.component.js +4 -1
- package/dist/components/listitem/listitem.component.d.ts +1 -1
- package/dist/components/listitem/listitem.component.js +4 -1
- package/dist/components/option/option.component.d.ts +1 -1
- package/dist/components/option/option.component.js +4 -1
- package/dist/components/popover/popover.component.d.ts +6 -0
- package/dist/components/popover/popover.component.js +6 -0
- package/dist/components/popover/popover.events.js +4 -4
- package/dist/components/radio/radio.component.d.ts +1 -1
- package/dist/components/radio/radio.component.js +4 -1
- package/dist/components/tab/tab.component.d.ts +1 -1
- package/dist/components/tab/tab.component.js +4 -1
- package/dist/components/textarea/textarea.component.d.ts +0 -1
- package/dist/components/textarea/textarea.component.js +7 -7
- package/dist/components/toggle/toggle.component.d.ts +1 -1
- package/dist/components/toggle/toggle.component.js +4 -1
- package/dist/components/tooltip/tooltip.component.d.ts +6 -1
- package/dist/components/tooltip/tooltip.component.js +9 -3
- package/dist/components/tooltip/tooltip.constants.d.ts +0 -1
- package/dist/components/tooltip/tooltip.constants.js +1 -2
- package/dist/custom-elements.json +2202 -2122
- package/dist/index.d.ts +2 -1
- package/dist/react/coachmark/index.d.ts +12 -1
- package/dist/react/coachmark/index.js +12 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/popover/index.d.ts +12 -1
- package/dist/react/popover/index.js +12 -1
- package/dist/react/tooltip/index.d.ts +11 -1
- package/dist/react/tooltip/index.js +11 -1
- package/package.json +1 -1
@@ -35,7 +35,7 @@ import Buttonsimple from '../buttonsimple/buttonsimple.component';
|
|
35
35
|
*/
|
36
36
|
class AlertChip extends Buttonsimple {
|
37
37
|
constructor() {
|
38
|
-
super();
|
38
|
+
super(...arguments);
|
39
39
|
/**
|
40
40
|
* The variant of the alertchip. It supports 5 variants
|
41
41
|
* - neutral
|
@@ -54,6 +54,9 @@ class AlertChip extends Buttonsimple {
|
|
54
54
|
* including empty spaces to split words.
|
55
55
|
*/
|
56
56
|
this.label = '';
|
57
|
+
}
|
58
|
+
connectedCallback() {
|
59
|
+
super.connectedCallback();
|
57
60
|
this.disabled = undefined;
|
58
61
|
this.softDisabled = undefined;
|
59
62
|
this.active = undefined;
|
@@ -22,7 +22,7 @@ declare class AvatarButton extends AvatarButton_base {
|
|
22
22
|
* Aria-label attribute to be set for accessibility
|
23
23
|
*/
|
24
24
|
ariaLabel: string | null;
|
25
|
-
|
25
|
+
connectedCallback(): void;
|
26
26
|
update(changedProperties: PropertyValues): void;
|
27
27
|
private setSize;
|
28
28
|
render(): import("lit-html").TemplateResult<1>;
|
@@ -33,11 +33,14 @@ import styles from './avatarbutton.styles';
|
|
33
33
|
*/
|
34
34
|
class AvatarButton extends AvatarComponentMixin(IconNameMixin(Buttonsimple)) {
|
35
35
|
constructor() {
|
36
|
-
super();
|
36
|
+
super(...arguments);
|
37
37
|
/**
|
38
38
|
* Aria-label attribute to be set for accessibility
|
39
39
|
*/
|
40
40
|
this.ariaLabel = null;
|
41
|
+
}
|
42
|
+
connectedCallback() {
|
43
|
+
super.connectedCallback();
|
41
44
|
this.active = undefined;
|
42
45
|
this.disabled = undefined;
|
43
46
|
this.softDisabled = undefined;
|
@@ -52,7 +52,7 @@ declare class Checkbox extends Checkbox_base implements AssociatedFormControl {
|
|
52
52
|
* @default false
|
53
53
|
*/
|
54
54
|
autofocus: boolean;
|
55
|
-
|
55
|
+
connectedCallback(): void;
|
56
56
|
/**
|
57
57
|
* Updates the form value to reflect the current state of the checkbox.
|
58
58
|
* If checked, the value is set to either the user-provided value or 'on' if no value is provided.
|
@@ -47,7 +47,7 @@ import styles from './checkbox.styles';
|
|
47
47
|
*/
|
48
48
|
class Checkbox extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
49
49
|
constructor() {
|
50
|
-
super();
|
50
|
+
super(...arguments);
|
51
51
|
/**
|
52
52
|
* Determines whether the checkbox is selected or unselected.
|
53
53
|
*
|
@@ -76,6 +76,9 @@ class Checkbox extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper))
|
|
76
76
|
${this.renderHelperText()}
|
77
77
|
</div>`;
|
78
78
|
};
|
79
|
+
}
|
80
|
+
connectedCallback() {
|
81
|
+
super.connectedCallback();
|
79
82
|
// Checkbox does not contain helpTextType property.
|
80
83
|
this.helpTextType = undefined;
|
81
84
|
}
|
@@ -45,7 +45,7 @@ declare class Chip extends Chip_base {
|
|
45
45
|
* including empty spaces to split words.
|
46
46
|
*/
|
47
47
|
label: string;
|
48
|
-
|
48
|
+
connectedCallback(): void;
|
49
49
|
/**
|
50
50
|
* Renders the icon element if available.
|
51
51
|
* @returns The icon element if available, otherwise nothing.
|
@@ -36,7 +36,7 @@ import Buttonsimple from '../buttonsimple/buttonsimple.component';
|
|
36
36
|
*/
|
37
37
|
class Chip extends IconNameMixin(Buttonsimple) {
|
38
38
|
constructor() {
|
39
|
-
super();
|
39
|
+
super(...arguments);
|
40
40
|
/**
|
41
41
|
* The color of the chip. It supports the following colors
|
42
42
|
* - default
|
@@ -59,6 +59,9 @@ class Chip extends IconNameMixin(Buttonsimple) {
|
|
59
59
|
* including empty spaces to split words.
|
60
60
|
*/
|
61
61
|
this.label = '';
|
62
|
+
}
|
63
|
+
connectedCallback() {
|
64
|
+
super.connectedCallback();
|
62
65
|
this.role = DEFAULTS.ROLE;
|
63
66
|
this.size = DEFAULTS.SIZE;
|
64
67
|
this.active = undefined;
|
@@ -8,6 +8,12 @@ import type { PopoverTrigger } from '../popover/popover.types';
|
|
8
8
|
*
|
9
9
|
* @tagname mdc-coachmark
|
10
10
|
*
|
11
|
+
* @event shown - (React: onShown) This event is dispatched when the coachmark is shown
|
12
|
+
* @event hidden - (React: onHidden) This event is dispatched when the coachmark is hidden
|
13
|
+
* @event created - (React: onCreated) This event is dispatched when the coachmark is created (added to the DOM)
|
14
|
+
* @event destroyed - (React: onDestroyed) This event is dispatched when the coachmark is
|
15
|
+
* destroyed (removed from the DOM)
|
16
|
+
*
|
11
17
|
* @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border
|
12
18
|
* @cssproperty --mdc-popover-arrow-border - border of the arrow
|
13
19
|
* @cssproperty --mdc-popover-primary-background-color - primary background color of the popover
|
@@ -47,6 +53,6 @@ declare class Coachmark extends Popover {
|
|
47
53
|
* @default true
|
48
54
|
*/
|
49
55
|
disableAriaExpanded: boolean;
|
50
|
-
|
56
|
+
connectedCallback(): void;
|
51
57
|
}
|
52
58
|
export default Coachmark;
|
@@ -18,6 +18,12 @@ import { DEFAULTS } from './coachmark.constants';
|
|
18
18
|
*
|
19
19
|
* @tagname mdc-coachmark
|
20
20
|
*
|
21
|
+
* @event shown - (React: onShown) This event is dispatched when the coachmark is shown
|
22
|
+
* @event hidden - (React: onHidden) This event is dispatched when the coachmark is hidden
|
23
|
+
* @event created - (React: onCreated) This event is dispatched when the coachmark is created (added to the DOM)
|
24
|
+
* @event destroyed - (React: onDestroyed) This event is dispatched when the coachmark is
|
25
|
+
* destroyed (removed from the DOM)
|
26
|
+
*
|
21
27
|
* @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border
|
22
28
|
* @cssproperty --mdc-popover-arrow-border - border of the arrow
|
23
29
|
* @cssproperty --mdc-popover-primary-background-color - primary background color of the popover
|
@@ -32,7 +38,7 @@ import { DEFAULTS } from './coachmark.constants';
|
|
32
38
|
*/
|
33
39
|
class Coachmark extends Popover {
|
34
40
|
constructor() {
|
35
|
-
super();
|
41
|
+
super(...arguments);
|
36
42
|
/**
|
37
43
|
* Determines the events that cause the Coachmark to show.
|
38
44
|
* Multiple event names should be separated by spaces.
|
@@ -59,6 +65,9 @@ class Coachmark extends Popover {
|
|
59
65
|
* @default true
|
60
66
|
*/
|
61
67
|
this.disableAriaExpanded = DEFAULTS.DISABLE_ARIA_EXPANDED;
|
68
|
+
}
|
69
|
+
connectedCallback() {
|
70
|
+
super.connectedCallback();
|
62
71
|
this.color = DEFAULTS.COLOR;
|
63
72
|
this.showArrow = DEFAULTS.ARROW;
|
64
73
|
}
|
@@ -130,7 +130,7 @@ declare class Divider extends Component {
|
|
130
130
|
* @param slot - default slot of divider
|
131
131
|
*/
|
132
132
|
private inferDividerType;
|
133
|
-
|
133
|
+
connectedCallback(): void;
|
134
134
|
protected render(): import("lit-html").TemplateResult<1>;
|
135
135
|
static styles: Array<CSSResult>;
|
136
136
|
}
|
@@ -60,6 +60,43 @@ import styles from './divider.styles';
|
|
60
60
|
* @cssproperty --mdc-divider-grabber-button-border-radius - border radius of the grabber button
|
61
61
|
*/
|
62
62
|
class Divider extends Component {
|
63
|
+
constructor() {
|
64
|
+
super(...arguments);
|
65
|
+
/**
|
66
|
+
* Two orientations of divider
|
67
|
+
* - **horizontal**: A thin, horizontal line with 0.0625rem width.
|
68
|
+
* - **vertical**: A thin, vertical line with 0.0625rem width.
|
69
|
+
*
|
70
|
+
* Note: We do not support "Vertical Text Divider" as of now.
|
71
|
+
* @default horizontal
|
72
|
+
*/
|
73
|
+
this.orientation = DEFAULTS.ORIENTATION;
|
74
|
+
/**
|
75
|
+
* Two variants of divider
|
76
|
+
* - **solid**: Solid line.
|
77
|
+
* - **gradient**: Gradient Line that fades on either sides of the divider.
|
78
|
+
* @default solid
|
79
|
+
*/
|
80
|
+
this.variant = DEFAULTS.VARIANT;
|
81
|
+
/**
|
82
|
+
* Direction of the arrow icon, if applicable.
|
83
|
+
* - **positive**
|
84
|
+
* - **negative**
|
85
|
+
*
|
86
|
+
* Note: Positive and Negative directions are defined based on Cartesian plane.
|
87
|
+
* @default 'negative'
|
88
|
+
*/
|
89
|
+
this.arrowDirection = DEFAULTS.ARROW_DIRECTION;
|
90
|
+
/**
|
91
|
+
* Position of the button, if applicable.
|
92
|
+
* - **positive**
|
93
|
+
* - **negative**
|
94
|
+
*
|
95
|
+
* Note: Positive and Negative directions are defined based on Cartesian plane.
|
96
|
+
* @default 'negative'
|
97
|
+
*/
|
98
|
+
this.buttonPosition = DEFAULTS.BUTTON_DIRECTION;
|
99
|
+
}
|
63
100
|
/**
|
64
101
|
* Sets the variant attribute for the divider component.
|
65
102
|
* If the provided variant is not included in the DIVIDER_VARIANT,
|
@@ -163,42 +200,8 @@ class Divider extends Component {
|
|
163
200
|
this.setGrabberButton();
|
164
201
|
}
|
165
202
|
}
|
166
|
-
|
167
|
-
super();
|
168
|
-
/**
|
169
|
-
* Two orientations of divider
|
170
|
-
* - **horizontal**: A thin, horizontal line with 0.0625rem width.
|
171
|
-
* - **vertical**: A thin, vertical line with 0.0625rem width.
|
172
|
-
*
|
173
|
-
* Note: We do not support "Vertical Text Divider" as of now.
|
174
|
-
* @default horizontal
|
175
|
-
*/
|
176
|
-
this.orientation = DEFAULTS.ORIENTATION;
|
177
|
-
/**
|
178
|
-
* Two variants of divider
|
179
|
-
* - **solid**: Solid line.
|
180
|
-
* - **gradient**: Gradient Line that fades on either sides of the divider.
|
181
|
-
* @default solid
|
182
|
-
*/
|
183
|
-
this.variant = DEFAULTS.VARIANT;
|
184
|
-
/**
|
185
|
-
* Direction of the arrow icon, if applicable.
|
186
|
-
* - **positive**
|
187
|
-
* - **negative**
|
188
|
-
*
|
189
|
-
* Note: Positive and Negative directions are defined based on Cartesian plane.
|
190
|
-
* @default 'negative'
|
191
|
-
*/
|
192
|
-
this.arrowDirection = DEFAULTS.ARROW_DIRECTION;
|
193
|
-
/**
|
194
|
-
* Position of the button, if applicable.
|
195
|
-
* - **positive**
|
196
|
-
* - **negative**
|
197
|
-
*
|
198
|
-
* Note: Positive and Negative directions are defined based on Cartesian plane.
|
199
|
-
* @default 'negative'
|
200
|
-
*/
|
201
|
-
this.buttonPosition = DEFAULTS.BUTTON_DIRECTION;
|
203
|
+
connectedCallback() {
|
204
|
+
super.connectedCallback();
|
202
205
|
this.setAttribute('data-type', 'mdc-primary-divider');
|
203
206
|
}
|
204
207
|
render() {
|
@@ -16,7 +16,7 @@ declare class FilterChip extends Chip {
|
|
16
16
|
* @default false
|
17
17
|
*/
|
18
18
|
selected: boolean;
|
19
|
-
|
19
|
+
connectedCallback(): void;
|
20
20
|
/**
|
21
21
|
* Sets the selected state of the filterchip along with the icon.
|
22
22
|
* aria-pressed attribute is also set to true or false.
|
@@ -22,13 +22,16 @@ import { DEFAULTS } from './filterchip.constants';
|
|
22
22
|
*/
|
23
23
|
class FilterChip extends Chip {
|
24
24
|
constructor() {
|
25
|
-
super();
|
25
|
+
super(...arguments);
|
26
26
|
/**
|
27
27
|
* The selected state of the filterchip.
|
28
28
|
*
|
29
29
|
* @default false
|
30
30
|
*/
|
31
31
|
this.selected = false;
|
32
|
+
}
|
33
|
+
connectedCallback() {
|
34
|
+
super.connectedCallback();
|
32
35
|
this.color = DEFAULTS.COLOR;
|
33
36
|
}
|
34
37
|
/**
|
@@ -27,7 +27,7 @@ declare class FormfieldGroup extends FormfieldGroup_base {
|
|
27
27
|
* This is used to set the role of the component as `radiogroup` if this is true and to 'group' if it is false.
|
28
28
|
*/
|
29
29
|
protected isRadio: boolean;
|
30
|
-
|
30
|
+
connectedCallback(): void;
|
31
31
|
render(): import("lit-html").TemplateResult<1>;
|
32
32
|
static styles: Array<CSSResult>;
|
33
33
|
}
|
@@ -27,12 +27,15 @@ import styles from './formfieldgroup.styles';
|
|
27
27
|
*/
|
28
28
|
class FormfieldGroup extends DataAriaLabelMixin(FormfieldWrapper) {
|
29
29
|
constructor() {
|
30
|
-
super();
|
30
|
+
super(...arguments);
|
31
31
|
/**
|
32
32
|
* @internal
|
33
33
|
* This is used to set the role of the component as `radiogroup` if this is true and to 'group' if it is false.
|
34
34
|
*/
|
35
35
|
this.isRadio = false;
|
36
|
+
}
|
37
|
+
connectedCallback() {
|
38
|
+
super.connectedCallback();
|
36
39
|
/** @internal */
|
37
40
|
this.shouldRenderLabel = false;
|
38
41
|
this.id = '';
|
@@ -76,7 +76,7 @@ declare class ListItem extends ListItem_base {
|
|
76
76
|
* This appears on the trailing side of the list item.
|
77
77
|
*/
|
78
78
|
sublineText?: string;
|
79
|
-
|
79
|
+
connectedCallback(): void;
|
80
80
|
/**
|
81
81
|
* Generates a template for a text slot with the specified content.
|
82
82
|
*
|
@@ -55,12 +55,15 @@ import styles from './listitem.styles';
|
|
55
55
|
*/
|
56
56
|
class ListItem extends DataAriaLabelMixin(DisabledMixin(TabIndexMixin(Component))) {
|
57
57
|
constructor() {
|
58
|
-
super();
|
58
|
+
super(...arguments);
|
59
59
|
/**
|
60
60
|
* The variant of the list item. It can be a pill, rectangle or a full-width.
|
61
61
|
* @default 'full-width'
|
62
62
|
*/
|
63
63
|
this.variant = DEFAULTS.VARIANT;
|
64
|
+
}
|
65
|
+
connectedCallback() {
|
66
|
+
super.connectedCallback();
|
64
67
|
this.role = this.role || 'listitem';
|
65
68
|
}
|
66
69
|
/**
|
@@ -28,7 +28,7 @@ declare class Option extends Option_base {
|
|
28
28
|
* Any additional description can be provided here for screen readers.
|
29
29
|
*/
|
30
30
|
ariaLabel: string | null;
|
31
|
-
|
31
|
+
connectedCallback(): void;
|
32
32
|
/**
|
33
33
|
* Listens to changes in the default slot and updates the label of the option accordingly.
|
34
34
|
* This is used to set the label of the option when it is not explicitly set.
|
@@ -31,7 +31,7 @@ import styles from './option.styles';
|
|
31
31
|
*/
|
32
32
|
class Option extends FormInternalsMixin(ListItem) {
|
33
33
|
constructor() {
|
34
|
-
super();
|
34
|
+
super(...arguments);
|
35
35
|
/**
|
36
36
|
* The selected attribute is used to indicate that the option is selected.
|
37
37
|
*/
|
@@ -40,6 +40,9 @@ class Option extends FormInternalsMixin(ListItem) {
|
|
40
40
|
* Any additional description can be provided here for screen readers.
|
41
41
|
*/
|
42
42
|
this.ariaLabel = null;
|
43
|
+
}
|
44
|
+
connectedCallback() {
|
45
|
+
super.connectedCallback();
|
43
46
|
this.role = 'option';
|
44
47
|
this.variant = LISTITEM_VARIANTS.INSET_RECTANGLE;
|
45
48
|
this.updateAttribute('aria-selected', `${this.selected}`);
|
@@ -12,6 +12,12 @@ declare const Popover_base: import("../../utils/mixins/index.types").Constructor
|
|
12
12
|
*
|
13
13
|
* @tagname mdc-popover
|
14
14
|
*
|
15
|
+
*
|
16
|
+
* @event shown - (React: onShown) This event is dispatched when the popover is shown
|
17
|
+
* @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
|
18
|
+
* @event created - (React: onCreated) This event is dispatched when the popover is created (added to the DOM)
|
19
|
+
* @event destroyed - (React: onDestroyed) This event is dispatched when the popover is destroyed (removed from the DOM)
|
20
|
+
*
|
15
21
|
* @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border
|
16
22
|
* @cssproperty --mdc-popover-arrow-border - border of the arrow
|
17
23
|
* @cssproperty --mdc-popover-primary-background-color - primary background color of the popover
|
@@ -28,6 +28,12 @@ import { PopoverUtils } from './popover.utils';
|
|
28
28
|
*
|
29
29
|
* @tagname mdc-popover
|
30
30
|
*
|
31
|
+
*
|
32
|
+
* @event shown - (React: onShown) This event is dispatched when the popover is shown
|
33
|
+
* @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
|
34
|
+
* @event created - (React: onCreated) This event is dispatched when the popover is created (added to the DOM)
|
35
|
+
* @event destroyed - (React: onDestroyed) This event is dispatched when the popover is destroyed (removed from the DOM)
|
36
|
+
*
|
31
37
|
* @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border
|
32
38
|
* @cssproperty --mdc-popover-arrow-border - border of the arrow
|
33
39
|
* @cssproperty --mdc-popover-primary-background-color - primary background color of the popover
|
@@ -18,7 +18,7 @@ export class PopoverEventManager {
|
|
18
18
|
* @param instance - The popover instance.
|
19
19
|
*/
|
20
20
|
static onShowPopover(instance) {
|
21
|
-
this.dispatchPopoverEvent('
|
21
|
+
this.dispatchPopoverEvent('shown', instance);
|
22
22
|
}
|
23
23
|
/**
|
24
24
|
* Custom event that is fired when the popover is hidden.
|
@@ -26,7 +26,7 @@ export class PopoverEventManager {
|
|
26
26
|
* @param instance - The popover instance.
|
27
27
|
*/
|
28
28
|
static onHidePopover(instance) {
|
29
|
-
this.dispatchPopoverEvent('
|
29
|
+
this.dispatchPopoverEvent('hidden', instance);
|
30
30
|
}
|
31
31
|
/**
|
32
32
|
* Custom event that is fired when the popover is created.
|
@@ -34,7 +34,7 @@ export class PopoverEventManager {
|
|
34
34
|
* @param instance - The popover instance.
|
35
35
|
*/
|
36
36
|
static onCreatedPopover(instance) {
|
37
|
-
this.dispatchPopoverEvent('
|
37
|
+
this.dispatchPopoverEvent('created', instance);
|
38
38
|
}
|
39
39
|
/**
|
40
40
|
* Custom event that is fired when the popover is destroyed.
|
@@ -42,6 +42,6 @@ export class PopoverEventManager {
|
|
42
42
|
* @param instance - The popover instance.
|
43
43
|
*/
|
44
44
|
static onDestroyedPopover(instance) {
|
45
|
-
this.dispatchPopoverEvent('
|
45
|
+
this.dispatchPopoverEvent('destroyed', instance);
|
46
46
|
}
|
47
47
|
}
|
@@ -48,7 +48,7 @@ import { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwra
|
|
48
48
|
*/
|
49
49
|
class Radio extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
50
50
|
constructor() {
|
51
|
-
super();
|
51
|
+
super(...arguments);
|
52
52
|
/**
|
53
53
|
* Determines whether the radio is selected or unselected.
|
54
54
|
*
|
@@ -75,6 +75,9 @@ class Radio extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
|
75
75
|
${this.renderHelperText()}
|
76
76
|
</div>`;
|
77
77
|
};
|
78
|
+
}
|
79
|
+
connectedCallback() {
|
80
|
+
super.connectedCallback();
|
78
81
|
// Radio does not contain helpTextType property.
|
79
82
|
this.helpTextType = undefined;
|
80
83
|
}
|
@@ -112,7 +112,7 @@ declare class Tab extends Tab_base {
|
|
112
112
|
* @internal
|
113
113
|
*/
|
114
114
|
private prevIconName?;
|
115
|
-
|
115
|
+
connectedCallback(): void;
|
116
116
|
/**
|
117
117
|
* Modifies the icon name based on the active state.
|
118
118
|
* If the tab is active, the icon name is suffixed with '-filled'.
|
@@ -106,7 +106,7 @@ import { IconNameMixin } from '../../utils/mixins/IconNameMixin';
|
|
106
106
|
*/
|
107
107
|
class Tab extends IconNameMixin(Buttonsimple) {
|
108
108
|
constructor() {
|
109
|
-
super();
|
109
|
+
super(...arguments);
|
110
110
|
/**
|
111
111
|
* Tab can have three variants:
|
112
112
|
* - `glass`
|
@@ -117,6 +117,9 @@ class Tab extends IconNameMixin(Buttonsimple) {
|
|
117
117
|
* @default pill
|
118
118
|
*/
|
119
119
|
this.variant = DEFAULTS.VARIANT;
|
120
|
+
}
|
121
|
+
connectedCallback() {
|
122
|
+
super.connectedCallback();
|
120
123
|
this.role = 'tab';
|
121
124
|
this.softDisabled = undefined;
|
122
125
|
this.size = undefined;
|
@@ -115,7 +115,6 @@ declare class Textarea extends Textarea_base {
|
|
115
115
|
inputElement: HTMLTextAreaElement;
|
116
116
|
private characterLimitExceedingFired;
|
117
117
|
protected get textarea(): HTMLTextAreaElement;
|
118
|
-
constructor();
|
119
118
|
connectedCallback(): void;
|
120
119
|
private setTextareaValidity;
|
121
120
|
/** @internal */
|
@@ -67,12 +67,8 @@ import { FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';
|
|
67
67
|
* @cssproperty --mdc-textarea-focused-border-color - Border color for the textarea container when focused
|
68
68
|
*/
|
69
69
|
class Textarea extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
70
|
-
get textarea() {
|
71
|
-
return this.inputElement;
|
72
|
-
}
|
73
70
|
constructor() {
|
74
|
-
|
75
|
-
super();
|
71
|
+
super(...arguments);
|
76
72
|
/**
|
77
73
|
* readonly attribute of the textarea field. If true, the textarea field is read-only.
|
78
74
|
* @default false
|
@@ -109,11 +105,15 @@ class Textarea extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper))
|
|
109
105
|
*/
|
110
106
|
this.autofocus = false;
|
111
107
|
this.characterLimitExceedingFired = false;
|
112
|
-
|
113
|
-
|
108
|
+
}
|
109
|
+
get textarea() {
|
110
|
+
return this.inputElement;
|
114
111
|
}
|
115
112
|
connectedCallback() {
|
113
|
+
var _a;
|
116
114
|
super.connectedCallback();
|
115
|
+
// Set the default value to the textarea field if the value is set through the text content directly
|
116
|
+
this.value = ((_a = this.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || this.value;
|
117
117
|
this.updateComplete.then(() => {
|
118
118
|
if (this.textarea) {
|
119
119
|
this.textarea.checkValidity();
|
@@ -58,7 +58,7 @@ declare class Toggle extends Toggle_base implements AssociatedFormControl {
|
|
58
58
|
* @default false
|
59
59
|
*/
|
60
60
|
autofocus: boolean;
|
61
|
-
|
61
|
+
connectedCallback(): void;
|
62
62
|
/** @internal
|
63
63
|
* Resets the checkbox to its initial state.
|
64
64
|
* The checked property is set to false.
|
@@ -54,7 +54,7 @@ import { FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';
|
|
54
54
|
*/
|
55
55
|
class Toggle extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
56
56
|
constructor() {
|
57
|
-
super();
|
57
|
+
super(...arguments);
|
58
58
|
/**
|
59
59
|
* Determines whether the toggle is active or inactive.
|
60
60
|
* @default false
|
@@ -73,6 +73,9 @@ class Toggle extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
|
73
73
|
* @default false
|
74
74
|
*/
|
75
75
|
this.autofocus = false;
|
76
|
+
}
|
77
|
+
connectedCallback() {
|
78
|
+
super.connectedCallback();
|
76
79
|
// Toggle does not contain helpTextType property.
|
77
80
|
this.helpTextType = undefined;
|
78
81
|
}
|
@@ -10,6 +10,11 @@ import type { TooltipType } from './tooltip.types';
|
|
10
10
|
*
|
11
11
|
* @tagname mdc-tooltip
|
12
12
|
*
|
13
|
+
* @event shown - (React: onShown) This event is dispatched when the tooltip is shown
|
14
|
+
* @event hidden - (React: onHidden) This event is dispatched when the tooltip is hidden
|
15
|
+
* @event created - (React: onCreated) This event is dispatched when the tooltip is created (added to the DOM)
|
16
|
+
* @event destroyed - (React: onDestroyed) This event is dispatched when the tooltip is destroyed (removed from the DOM)
|
17
|
+
*
|
13
18
|
* @cssproperty --mdc-tooltip-max-width - The maximum width of the tooltip.
|
14
19
|
* @cssproperty --mdc-tooltip-padding - The padding of the tooltip.
|
15
20
|
* @cssproperty --mdc-tooltip-text-color - The text color of the tooltip.
|
@@ -26,7 +31,7 @@ declare class Tooltip extends Popover {
|
|
26
31
|
*/
|
27
32
|
tooltipType: TooltipType;
|
28
33
|
private defaultSlotNodes;
|
29
|
-
|
34
|
+
connectedCallback(): void;
|
30
35
|
/**
|
31
36
|
* @returns The tooltip text.
|
32
37
|
*/
|
@@ -21,6 +21,11 @@ import { POPOVER_PLACEMENT } from '../popover/popover.constants';
|
|
21
21
|
*
|
22
22
|
* @tagname mdc-tooltip
|
23
23
|
*
|
24
|
+
* @event shown - (React: onShown) This event is dispatched when the tooltip is shown
|
25
|
+
* @event hidden - (React: onHidden) This event is dispatched when the tooltip is hidden
|
26
|
+
* @event created - (React: onCreated) This event is dispatched when the tooltip is created (added to the DOM)
|
27
|
+
* @event destroyed - (React: onDestroyed) This event is dispatched when the tooltip is destroyed (removed from the DOM)
|
28
|
+
*
|
24
29
|
* @cssproperty --mdc-tooltip-max-width - The maximum width of the tooltip.
|
25
30
|
* @cssproperty --mdc-tooltip-padding - The padding of the tooltip.
|
26
31
|
* @cssproperty --mdc-tooltip-text-color - The text color of the tooltip.
|
@@ -29,7 +34,7 @@ import { POPOVER_PLACEMENT } from '../popover/popover.constants';
|
|
29
34
|
*/
|
30
35
|
class Tooltip extends Popover {
|
31
36
|
constructor() {
|
32
|
-
super();
|
37
|
+
super(...arguments);
|
33
38
|
/**
|
34
39
|
* The type of tooltip.
|
35
40
|
* - **description** sets aria-describedby on the trigger component which refers to the tooltip id.
|
@@ -38,8 +43,10 @@ class Tooltip extends Popover {
|
|
38
43
|
* @default 'description'
|
39
44
|
*/
|
40
45
|
this.tooltipType = DEFAULTS.TOOLTIP_TYPE;
|
46
|
+
}
|
47
|
+
connectedCallback() {
|
48
|
+
super.connectedCallback();
|
41
49
|
this.backdrop = false;
|
42
|
-
this.color = DEFAULTS.COLOR;
|
43
50
|
this.delay = DEFAULTS.DELAY;
|
44
51
|
this.focusTrap = false;
|
45
52
|
this.hideOnBlur = true;
|
@@ -50,7 +57,6 @@ class Tooltip extends Popover {
|
|
50
57
|
this.role = 'tooltip';
|
51
58
|
this.showArrow = true;
|
52
59
|
this.trigger = 'mouseenter focusin';
|
53
|
-
this.visible = false;
|
54
60
|
this.enabledFocusTrap = false;
|
55
61
|
this.enabledPreventScroll = false;
|
56
62
|
this.flip = true;
|