@momentum-design/components 0.117.2 → 0.117.4
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 +208 -192
- package/dist/browser/index.js.map +3 -3
- package/dist/components/accordionbutton/accordionbutton.constants.d.ts +3 -2
- package/dist/components/animation/animation.component.js +1 -1
- package/dist/components/badge/badge.component.d.ts +1 -1
- package/dist/components/cardcheckbox/cardcheckbox.constants.d.ts +3 -2
- package/dist/components/checkbox/checkbox.component.d.ts +6 -1
- package/dist/components/checkbox/checkbox.component.js +5 -0
- package/dist/components/checkbox/checkbox.constants.d.ts +3 -2
- package/dist/components/checkbox/checkbox.styles.js +5 -0
- package/dist/components/combobox/combobox.component.d.ts +5 -1
- package/dist/components/combobox/combobox.component.js +4 -0
- package/dist/components/combobox/combobox.constants.d.ts +3 -2
- package/dist/components/dialog/dialog.constants.d.ts +2 -1
- package/dist/components/filterchip/filterchip.constants.d.ts +4 -2
- package/dist/components/formfieldgroup/formfieldgroup.component.d.ts +4 -0
- package/dist/components/formfieldgroup/formfieldgroup.component.js +4 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +10 -6
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +37 -22
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +3 -1
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +1 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.styles.js +4 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.utils.d.ts +1 -1
- package/dist/components/input/input.component.d.ts +10 -1
- package/dist/components/input/input.component.js +9 -0
- package/dist/components/input/input.constants.d.ts +2 -1
- package/dist/components/inputchip/inputchip.constants.d.ts +2 -1
- package/dist/components/menuitem/menuitem.constants.d.ts +3 -2
- package/dist/components/navmenuitem/navmenuitem.constants.d.ts +2 -1
- package/dist/components/password/password.constants.d.ts +3 -2
- package/dist/components/popover/popover.constants.d.ts +1 -1
- package/dist/components/popover/popover.constants.js +1 -1
- package/dist/components/presence/presence.utils.d.ts +1 -1
- package/dist/components/progressspinner/progressspinner.constants.d.ts +3 -2
- package/dist/components/progressspinner/progressspinner.constants.js +2 -2
- package/dist/components/radio/radio.component.d.ts +1 -1
- package/dist/components/radio/radio.styles.js +3 -0
- package/dist/components/searchfield/searchfield.constants.d.ts +2 -1
- package/dist/components/select/select.component.d.ts +1 -1
- package/dist/components/select/select.constants.d.ts +3 -2
- package/dist/components/statictoggle/statictoggle.constants.d.ts +3 -2
- package/dist/components/stepperitem/stepperitem.constants.d.ts +4 -3
- package/dist/components/textarea/textarea.component.d.ts +1 -1
- package/dist/components/textarea/textarea.styles.js +1 -0
- package/dist/components/toast/toast.component.js +16 -21
- package/dist/components/toast/toast.constants.d.ts +7 -6
- package/dist/components/toggle/toggle.component.d.ts +1 -1
- package/dist/components/toggle/toggle.constants.d.ts +3 -2
- package/dist/components/toggle/toggle.styles.js +5 -0
- package/dist/custom-elements.json +4343 -3485
- package/dist/react/accordion/index.d.ts +2 -3
- package/dist/react/accordionbutton/index.d.ts +2 -3
- package/dist/react/alertchip/index.d.ts +5 -4
- package/dist/react/animation/index.d.ts +4 -9
- package/dist/react/avatarbutton/index.d.ts +5 -4
- package/dist/react/brandvisual/index.d.ts +3 -6
- package/dist/react/button/index.d.ts +5 -4
- package/dist/react/buttonlink/index.d.ts +5 -4
- package/dist/react/buttonsimple/index.d.ts +5 -4
- package/dist/react/cardbutton/index.d.ts +5 -4
- package/dist/react/cardcheckbox/index.d.ts +6 -7
- package/dist/react/cardradio/index.d.ts +6 -7
- package/dist/react/checkbox/index.d.ts +8 -2
- package/dist/react/checkbox/index.js +5 -0
- package/dist/react/chip/index.d.ts +5 -4
- package/dist/react/coachmark/index.d.ts +5 -12
- package/dist/react/combobox/index.d.ts +10 -15
- package/dist/react/combobox/index.js +4 -0
- package/dist/react/dialog/index.d.ts +6 -15
- package/dist/react/filterchip/index.d.ts +5 -4
- package/dist/react/formfieldgroup/index.d.ts +4 -0
- package/dist/react/formfieldgroup/index.js +4 -0
- package/dist/react/formfieldwrapper/index.d.ts +4 -1
- package/dist/react/formfieldwrapper/index.js +4 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/react/input/index.d.ts +15 -5
- package/dist/react/input/index.js +9 -0
- package/dist/react/inputchip/index.d.ts +2 -1
- package/dist/react/link/index.d.ts +5 -4
- package/dist/react/linkbutton/index.d.ts +5 -4
- package/dist/react/linksimple/index.d.ts +5 -4
- package/dist/react/listbox/index.d.ts +2 -1
- package/dist/react/listitem/index.d.ts +9 -8
- package/dist/react/menuitem/index.d.ts +9 -8
- package/dist/react/menuitemcheckbox/index.d.ts +11 -9
- package/dist/react/menuitemradio/index.d.ts +11 -9
- package/dist/react/menupopover/index.d.ts +8 -14
- package/dist/react/menusection/index.d.ts +3 -2
- package/dist/react/navmenuitem/index.d.ts +11 -12
- package/dist/react/option/index.d.ts +9 -8
- package/dist/react/password/index.d.ts +6 -5
- package/dist/react/popover/index.d.ts +5 -12
- package/dist/react/radio/index.d.ts +3 -2
- package/dist/react/searchfield/index.d.ts +6 -5
- package/dist/react/select/index.d.ts +6 -5
- package/dist/react/sidenavigation/index.d.ts +3 -11
- package/dist/react/slider/index.d.ts +3 -4
- package/dist/react/stepperitem/index.d.ts +4 -3
- package/dist/react/tab/index.d.ts +7 -8
- package/dist/react/tablist/index.d.ts +2 -3
- package/dist/react/textarea/index.d.ts +6 -5
- package/dist/react/toast/index.d.ts +2 -1
- package/dist/react/toggle/index.d.ts +3 -2
- package/dist/react/toggletip/index.d.ts +5 -12
- package/dist/react/tooltip/index.d.ts +5 -12
- package/dist/react/typewriter/index.d.ts +3 -2
- package/dist/react/virtualizedlist/index.d.ts +2 -1
- package/dist/utils/provider/index.d.ts +2 -4
- package/dist/utils/tag-name/index.d.ts +3 -1
- package/package.json +1 -1
@@ -1,7 +1,8 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-accordionbutton";
|
2
3
|
declare const ICON_NAME: {
|
3
|
-
readonly ARROW_UP: "arrow-up-bold"
|
4
|
-
readonly ARROW_DOWN: "arrow-down-bold"
|
4
|
+
readonly ARROW_UP: Extract<IconNames, "arrow-up-bold">;
|
5
|
+
readonly ARROW_DOWN: Extract<IconNames, "arrow-down-bold">;
|
5
6
|
};
|
6
7
|
declare const VARIANT: {
|
7
8
|
readonly DEFAULT: "default";
|
@@ -96,7 +96,7 @@ class Animation extends Component {
|
|
96
96
|
}
|
97
97
|
if (this.containerRef.value) {
|
98
98
|
this.lottieInstance = lottie.loadAnimation({
|
99
|
-
container: this.containerRef.value,
|
99
|
+
container: this.containerRef.value, // the dom element that will contain the animation
|
100
100
|
renderer: 'svg',
|
101
101
|
loop: this.getLoopValue(),
|
102
102
|
autoplay: this.autoplay,
|
@@ -113,7 +113,7 @@ declare class Badge extends Badge_base {
|
|
113
113
|
*/
|
114
114
|
private getBadgeContentBasedOnType;
|
115
115
|
update(changedProperties: PropertyValues): void;
|
116
|
-
render(): TemplateResult
|
116
|
+
render(): TemplateResult;
|
117
117
|
static styles: Array<CSSResult>;
|
118
118
|
}
|
119
119
|
export default Badge;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-cardcheckbox";
|
2
3
|
declare const CHECK_MARK: {
|
3
|
-
readonly DEFAULT: "check-circle-bold"
|
4
|
-
readonly CHECKED: "check-circle-filled"
|
4
|
+
readonly DEFAULT: Extract<IconNames, "check-circle-bold">;
|
5
|
+
readonly CHECKED: Extract<IconNames, "check-circle-filled">;
|
5
6
|
};
|
6
7
|
declare const SELECTION_TYPE: {
|
7
8
|
readonly CHECK: "check";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { CSSResult, PropertyValueMap, PropertyValues } from 'lit';
|
2
2
|
import { AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';
|
3
3
|
import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
|
4
|
-
declare const Checkbox_base: import("../../utils/mixins/index.types").Constructor<import("../../models
|
4
|
+
declare const Checkbox_base: import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
5
5
|
/**
|
6
6
|
* Checkboxes allow users to select multiple options from a list or turn an item/feature on or off.
|
7
7
|
* These are often used in forms, settings, and selections in lists.
|
@@ -26,6 +26,11 @@ declare const Checkbox_base: import("../../utils/mixins/index.types").Constructo
|
|
26
26
|
* @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.
|
27
27
|
* @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.
|
28
28
|
* @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a selected checkbox when disabled.
|
29
|
+
*
|
30
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
31
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
32
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
33
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
29
34
|
*/
|
30
35
|
declare class Checkbox extends Checkbox_base implements AssociatedFormControl {
|
31
36
|
/**
|
@@ -41,6 +41,11 @@ import styles from './checkbox.styles';
|
|
41
41
|
* @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.
|
42
42
|
* @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.
|
43
43
|
* @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a selected checkbox when disabled.
|
44
|
+
*
|
45
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
46
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
47
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
48
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
44
49
|
*/
|
45
50
|
class Checkbox extends AutoFocusOnMountMixin(FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper))) {
|
46
51
|
constructor() {
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-checkbox";
|
2
3
|
declare const ICON_NAME: {
|
3
|
-
readonly CHECKED: "check-bold"
|
4
|
-
readonly INDETERMINATE: "minus-bold"
|
4
|
+
readonly CHECKED: Extract<IconNames, "check-bold">;
|
5
|
+
readonly INDETERMINATE: Extract<IconNames, "minus-bold">;
|
5
6
|
};
|
6
7
|
export { TAG_NAME, ICON_NAME };
|
@@ -4,7 +4,7 @@ import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
|
|
4
4
|
import type Option from '../option/option.component';
|
5
5
|
import type { PopoverStrategy } from '../popover/popover.types';
|
6
6
|
import type { Placement } from './combobox.types';
|
7
|
-
declare const Combobox_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/lifecycle/CaptureDestroyEventForChildElement").CaptureDestroyEventForChildElementInterface> & import("../../utils/mixins/index.types").Constructor<import("../../models
|
7
|
+
declare const Combobox_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/lifecycle/CaptureDestroyEventForChildElement").CaptureDestroyEventForChildElementInterface> & import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
8
8
|
/**
|
9
9
|
* The Combobox component is a text-based dropdown control that allows users to select an option from a predefined list.
|
10
10
|
* Users can type text to filter the options and select their desired choice.
|
@@ -36,6 +36,10 @@ declare const Combobox_base: import("../../utils/mixins/index.types").Constructo
|
|
36
36
|
* @tagname mdc-combobox
|
37
37
|
*
|
38
38
|
* @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
|
39
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
40
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
41
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
42
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
39
43
|
*
|
40
44
|
* @event click - (React: onClick) This event is dispatched when the combobox is clicked.
|
41
45
|
* @event change - (React: onChange) This event is dispatched when the combobox is changed.
|
@@ -62,6 +62,10 @@ import styles from './combobox.styles';
|
|
62
62
|
* @tagname mdc-combobox
|
63
63
|
*
|
64
64
|
* @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
|
65
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
66
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
67
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
68
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
65
69
|
*
|
66
70
|
* @event click - (React: onClick) This event is dispatched when the combobox is clicked.
|
67
71
|
* @event change - (React: onChange) This event is dispatched when the combobox is changed.
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-combobox";
|
2
3
|
declare const ICON_NAME: {
|
3
|
-
readonly ARROW_UP: "arrow-up-bold"
|
4
|
-
readonly ARROW_DOWN: "arrow-down-bold"
|
4
|
+
readonly ARROW_UP: Extract<IconNames, "arrow-up-bold">;
|
5
|
+
readonly ARROW_DOWN: Extract<IconNames, "arrow-down-bold">;
|
5
6
|
};
|
6
7
|
declare const AUTOCOMPLETE_LIST = "list";
|
7
8
|
declare const LISTBOX_ID = "combobox-listbox-id";
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-dialog";
|
2
3
|
declare const DIALOG_VARIANT: {
|
3
4
|
readonly DEFAULT: "default";
|
@@ -10,7 +11,7 @@ declare const DEFAULTS: {
|
|
10
11
|
readonly SIZE: "small";
|
11
12
|
readonly HEADER_TAG_NAME: "h2";
|
12
13
|
readonly DESCRIPTION_TAG_NAME: "p";
|
13
|
-
readonly CANCEL_ICON: "cancel-bold"
|
14
|
+
readonly CANCEL_ICON: Extract<IconNames, "cancel-bold">;
|
14
15
|
readonly VARIANT: "default";
|
15
16
|
readonly DISABLE_ARIA_HAS_POPUP: false;
|
16
17
|
readonly FOCUS_TRAP: true;
|
@@ -1,6 +1,8 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
2
|
+
import { ColorType } from '../chip/chip.types';
|
1
3
|
declare const TAG_NAME: "mdc-filterchip";
|
2
4
|
declare const DEFAULTS: {
|
3
|
-
readonly ICON_NAME: "check-bold"
|
4
|
-
readonly COLOR: "default"
|
5
|
+
readonly ICON_NAME: Extract<IconNames, "check-bold">;
|
6
|
+
readonly COLOR: Extract<ColorType, "default">;
|
5
7
|
};
|
6
8
|
export { TAG_NAME, DEFAULTS };
|
@@ -25,6 +25,10 @@ declare const FormfieldGroup_base: import("../../utils/mixins/index.types").Cons
|
|
25
25
|
* @dependency mdc-toggletip
|
26
26
|
*
|
27
27
|
* @slot default - This is a default slot for checkbox or toggle components.
|
28
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
29
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
30
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
31
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
28
32
|
*/
|
29
33
|
declare class FormfieldGroup extends FormfieldGroup_base {
|
30
34
|
/**
|
@@ -29,6 +29,10 @@ import styles from './formfieldgroup.styles';
|
|
29
29
|
* @dependency mdc-toggletip
|
30
30
|
*
|
31
31
|
* @slot default - This is a default slot for checkbox or toggle components.
|
32
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
33
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
34
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
35
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
32
36
|
*/
|
33
37
|
class FormfieldGroup extends DataAriaLabelMixin(FormfieldWrapper) {
|
34
38
|
constructor() {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CSSResult, nothing } from 'lit';
|
2
2
|
import { Component } from '../../models';
|
3
|
-
import type { PopoverPlacement } from '../popover/popover.types';
|
3
|
+
import type { PopoverPlacement, PopoverStrategy } from '../popover/popover.types';
|
4
4
|
import type { ValidationType } from './formfieldwrapper.types';
|
5
5
|
declare const FormfieldWrapper_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DisabledMixin").DisabledMixinInterface> & typeof Component;
|
6
6
|
/**
|
@@ -15,14 +15,17 @@ declare const FormfieldWrapper_base: import("../../utils/mixins/index.types").Co
|
|
15
15
|
* @dependency mdc-button
|
16
16
|
* @dependency mdc-toggletip
|
17
17
|
*
|
18
|
-
*
|
18
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
19
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
20
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
21
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
19
22
|
*/
|
20
23
|
declare class FormfieldWrapper extends FormfieldWrapper_base {
|
21
24
|
/**
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
25
|
+
* Indicates the unique identifier for the native input element.
|
26
|
+
* Required for acccessibility.
|
27
|
+
* @internal
|
28
|
+
*/
|
26
29
|
protected inputId: string;
|
27
30
|
/**
|
28
31
|
* The label of the input field. It is linked to the input field using the `for` attribute.
|
@@ -52,6 +55,7 @@ declare class FormfieldWrapper extends FormfieldWrapper_base {
|
|
52
55
|
* @default 'top'
|
53
56
|
*/
|
54
57
|
toggletipPlacement: PopoverPlacement;
|
58
|
+
toggletipStrategy: PopoverStrategy;
|
55
59
|
/**
|
56
60
|
* Aria label for the info icon that is displayed next to the label when `toggletipText` is set.
|
57
61
|
* This is used for accessibility purposes to provide a description of the icon.
|
@@ -29,16 +29,19 @@ import { getHelperIcon } from './formfieldwrapper.utils';
|
|
29
29
|
* @dependency mdc-button
|
30
30
|
* @dependency mdc-toggletip
|
31
31
|
*
|
32
|
-
*
|
32
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
33
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
34
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
35
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
33
36
|
*/
|
34
37
|
class FormfieldWrapper extends DisabledMixin(Component) {
|
35
38
|
constructor() {
|
36
39
|
super(...arguments);
|
37
40
|
/**
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
* Indicates the unique identifier for the native input element.
|
42
|
+
* Required for acccessibility.
|
43
|
+
* @internal
|
44
|
+
*/
|
42
45
|
this.inputId = `mdc-el-${uuidv4()}`;
|
43
46
|
/**
|
44
47
|
* The required attribute to indicate that the input field is required.
|
@@ -55,6 +58,7 @@ class FormfieldWrapper extends DisabledMixin(Component) {
|
|
55
58
|
* @default 'top'
|
56
59
|
*/
|
57
60
|
this.toggletipPlacement = DEFAULTS.TOGGLETIP_PLACEMENT;
|
61
|
+
this.toggletipStrategy = DEFAULTS.TOGGLETIP_STRATEGY;
|
58
62
|
/** @internal */
|
59
63
|
this.shouldRenderLabel = true;
|
60
64
|
}
|
@@ -68,7 +72,9 @@ class FormfieldWrapper extends DisabledMixin(Component) {
|
|
68
72
|
return nothing;
|
69
73
|
}
|
70
74
|
return this.shouldRenderLabel
|
71
|
-
? html `<label for="${this.inputId}" id="${DEFAULTS.HEADING_ID}" class="mdc-label" part="label"
|
75
|
+
? html `<label for="${this.inputId}" id="${DEFAULTS.HEADING_ID}" class="mdc-label" part="label"
|
76
|
+
>${this.label}</label
|
77
|
+
>`
|
72
78
|
: html ` <mdc-text
|
73
79
|
id="${DEFAULTS.HEADING_ID}"
|
74
80
|
tagname="${MDC_TEXT_OPTIONS.TAGNAME}"
|
@@ -119,27 +125,32 @@ class FormfieldWrapper extends DisabledMixin(Component) {
|
|
119
125
|
renderLabel() {
|
120
126
|
if (!this.label)
|
121
127
|
return nothing;
|
128
|
+
const triggerId = `toggletip-trigger-${uuidv4()}`;
|
122
129
|
return html `<div class="mdc-label-text" part="label-text">
|
123
130
|
<slot name="label">${this.renderLabelElement()}</slot>
|
124
131
|
${this.required ? html `<span part="required-indicator">*</span>` : nothing}
|
125
|
-
|
132
|
+
<slot name="toggletip">
|
133
|
+
${this.toggletipText
|
126
134
|
? html ` <mdc-button
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
135
|
+
part="info-icon-btn"
|
136
|
+
prefix-icon="${DEFAULTS.INFO_ICON}"
|
137
|
+
size="${DEFAULTS.ICON_SIZE}"
|
138
|
+
variant="${BUTTON_VARIANTS.TERTIARY}"
|
139
|
+
aria-label="${ifDefined(this.infoIconAriaLabel)}"
|
140
|
+
?disabled="${this.disabled}"
|
141
|
+
id="${triggerId}"
|
142
|
+
></mdc-button>
|
143
|
+
<mdc-toggletip
|
144
|
+
part="label-toggletip"
|
145
|
+
triggerid="${triggerId}"
|
146
|
+
id="label-toggletip-id"
|
147
|
+
placement="${this.toggletipPlacement}"
|
148
|
+
strategy="${this.toggletipStrategy}"
|
149
|
+
show-arrow
|
150
|
+
>${this.toggletipText}</mdc-toggletip
|
151
|
+
>`
|
142
152
|
: nothing}
|
153
|
+
</slot>
|
143
154
|
</div>`;
|
144
155
|
}
|
145
156
|
/**
|
@@ -181,6 +192,10 @@ __decorate([
|
|
181
192
|
property({ type: String, reflect: true, attribute: 'toggletip-placement' }),
|
182
193
|
__metadata("design:type", String)
|
183
194
|
], FormfieldWrapper.prototype, "toggletipPlacement", void 0);
|
195
|
+
__decorate([
|
196
|
+
property({ type: String, reflect: true, attribute: 'toggletip-strategy' }),
|
197
|
+
__metadata("design:type", String)
|
198
|
+
], FormfieldWrapper.prototype, "toggletipStrategy", void 0);
|
184
199
|
__decorate([
|
185
200
|
property({ type: String, reflect: true, attribute: 'info-icon-aria-label' }),
|
186
201
|
__metadata("design:type", String)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-formfieldwrapper";
|
2
3
|
declare const VALIDATION: {
|
3
4
|
readonly DEFAULT: "default";
|
@@ -11,8 +12,9 @@ declare const DEFAULTS: {
|
|
11
12
|
readonly HELPER_TEXT_ID: "helper-text-id";
|
12
13
|
readonly HEADING_ID: "heading-id";
|
13
14
|
readonly ICON_SIZE: 20;
|
14
|
-
readonly INFO_ICON: "info-badge-filled"
|
15
|
+
readonly INFO_ICON: Extract<IconNames, "info-badge-filled">;
|
15
16
|
readonly TOGGLETIP_PLACEMENT: "top";
|
17
|
+
readonly TOGGLETIP_STRATEGY: "absolute";
|
16
18
|
};
|
17
19
|
declare const MDC_TEXT_OPTIONS: {
|
18
20
|
readonly TAGNAME: "span";
|
@@ -49,6 +49,10 @@ const styles = [
|
|
49
49
|
color: var(--mds-color-theme-text-secondary-normal);
|
50
50
|
}
|
51
51
|
|
52
|
+
:host::part(info-icon-btn) {
|
53
|
+
align-self: flex-start;
|
54
|
+
}
|
55
|
+
|
52
56
|
:host([help-text-type='error']) .mdc-help-text {
|
53
57
|
color: var(--mds-color-theme-text-error-normal);
|
54
58
|
}
|
@@ -3,7 +3,7 @@ import FormfieldWrapper from '../formfieldwrapper';
|
|
3
3
|
import type { IconNames } from '../icon/icon.types';
|
4
4
|
import { AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';
|
5
5
|
import type { AutoCapitalizeType, AutoCompleteType, InputType } from './input.types';
|
6
|
-
declare const Input_base: import("../../utils/mixins/index.types").Constructor<import("../../models
|
6
|
+
declare const Input_base: import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
7
7
|
/**
|
8
8
|
* mdc-input is a component that allows users to input text.
|
9
9
|
* It contains:
|
@@ -29,6 +29,15 @@ declare const Input_base: import("../../utils/mixins/index.types").Constructor<i
|
|
29
29
|
* @dependency mdc-button
|
30
30
|
* @dependency mdc-toggletip
|
31
31
|
*
|
32
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
33
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
34
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
35
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
36
|
+
* @slot input - Slot for the input element. If not provided, the input field will be rendered.
|
37
|
+
* @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
|
38
|
+
* @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
|
39
|
+
* @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.
|
40
|
+
*
|
32
41
|
* @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
|
33
42
|
* @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
|
34
43
|
* @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled
|
@@ -44,6 +44,15 @@ import styles from './input.styles';
|
|
44
44
|
* @dependency mdc-button
|
45
45
|
* @dependency mdc-toggletip
|
46
46
|
*
|
47
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
48
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
49
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
50
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
51
|
+
* @slot input - Slot for the input element. If not provided, the input field will be rendered.
|
52
|
+
* @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
|
53
|
+
* @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
|
54
|
+
* @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.
|
55
|
+
*
|
47
56
|
* @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
|
48
57
|
* @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
|
49
58
|
* @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-input";
|
2
3
|
declare const AUTO_CAPITALIZE: {
|
3
4
|
readonly OFF: "off";
|
@@ -24,7 +25,7 @@ declare const DEFAULTS: {
|
|
24
25
|
readonly VALIDATION: "default";
|
25
26
|
readonly ICON_SIZE_VALUE: 1;
|
26
27
|
readonly ICON_SIZE_UNIT: "rem";
|
27
|
-
readonly CLEAR_BUTTON_ICON: "cancel-bold"
|
28
|
+
readonly CLEAR_BUTTON_ICON: Extract<IconNames, "cancel-bold">;
|
28
29
|
readonly CLEAR_BUTTON_VARIANT: "tertiary";
|
29
30
|
readonly CLEAR_BUTTON_SIZE: 20;
|
30
31
|
readonly PREFIX_TEXT_TYPE: "body-midsize-regular";
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-inputchip";
|
2
3
|
declare const DEFAULTS: {
|
3
4
|
readonly TEXT_TYPE: "body-midsize-regular";
|
4
5
|
readonly TAG_NAME: "span";
|
5
|
-
readonly CLOSE_ICON: "cancel-bold"
|
6
|
+
readonly CLOSE_ICON: Extract<IconNames, "cancel-bold">;
|
6
7
|
};
|
7
8
|
export { TAG_NAME, DEFAULTS };
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-menuitem";
|
2
3
|
declare const ARROW_ICONS: {
|
3
|
-
readonly LEFT: "arrow-left-bold"
|
4
|
-
readonly RIGHT: "arrow-right-bold"
|
4
|
+
readonly LEFT: Extract<IconNames, "arrow-left-bold">;
|
5
|
+
readonly RIGHT: Extract<IconNames, "arrow-right-bold">;
|
5
6
|
};
|
6
7
|
declare const ARROW_DIRECTIONS: {
|
7
8
|
readonly POSITIVE: "positive";
|
@@ -1,10 +1,11 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-navmenuitem";
|
2
3
|
declare const ALLOWED_BADGE_TYPES: {
|
3
4
|
readonly DOT: "dot";
|
4
5
|
readonly COUNTER: "counter";
|
5
6
|
};
|
6
7
|
declare const ICON_NAME: {
|
7
|
-
readonly RIGHT_ARROW: "arrow-right-bold"
|
8
|
+
readonly RIGHT_ARROW: Extract<IconNames, "arrow-right-bold">;
|
8
9
|
};
|
9
10
|
declare const DEFAULTS: {
|
10
11
|
readonly MAX_COUNTER: 99;
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { IconNames } from '../icon/icon.types';
|
1
2
|
export declare const PASSWORD_VISIBILITY_ICONS: {
|
2
|
-
readonly HIDE_BOLD: "hide-bold"
|
3
|
-
readonly SHOW_BOLD: "show-bold"
|
3
|
+
readonly HIDE_BOLD: Extract<IconNames, "hide-bold">;
|
4
|
+
readonly SHOW_BOLD: Extract<IconNames, "show-bold">;
|
4
5
|
};
|
5
6
|
export declare const TAG_NAME: "mdc-password";
|
@@ -31,6 +31,7 @@ declare const DEFAULTS: {
|
|
31
31
|
readonly PLACEMENT: "bottom";
|
32
32
|
readonly TRIGGER: "click";
|
33
33
|
readonly COLOR: "tonal";
|
34
|
+
readonly STRATEGY: "absolute";
|
34
35
|
readonly OFFSET: 4;
|
35
36
|
readonly BOUNDARY: "clippingAncestors";
|
36
37
|
readonly BOUNDARY_ROOT: "viewport";
|
@@ -54,7 +55,6 @@ declare const DEFAULTS: {
|
|
54
55
|
readonly DISABLE_ARIA_EXPANDED: false;
|
55
56
|
readonly PROPAGATE_EVENT_ON_ESCAPE: false;
|
56
57
|
readonly KEEP_CONNECTED_TOOLTIP_CLOSED: true;
|
57
|
-
readonly STRATEGY: "absolute";
|
58
58
|
readonly IS_BACKDROP_INVISIBLE: true;
|
59
59
|
};
|
60
60
|
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS };
|
@@ -33,6 +33,7 @@ const DEFAULTS = {
|
|
33
33
|
PLACEMENT: POPOVER_PLACEMENT.BOTTOM,
|
34
34
|
TRIGGER: TRIGGER.CLICK,
|
35
35
|
COLOR: COLOR.TONAL,
|
36
|
+
STRATEGY: STRATEGY.ABSOLUTE,
|
36
37
|
OFFSET: 4,
|
37
38
|
BOUNDARY: 'clippingAncestors',
|
38
39
|
BOUNDARY_ROOT: 'viewport',
|
@@ -56,7 +57,6 @@ const DEFAULTS = {
|
|
56
57
|
DISABLE_ARIA_EXPANDED: false,
|
57
58
|
PROPAGATE_EVENT_ON_ESCAPE: false,
|
58
59
|
KEEP_CONNECTED_TOOLTIP_CLOSED: true,
|
59
|
-
STRATEGY: 'absolute',
|
60
60
|
IS_BACKDROP_INVISIBLE: true,
|
61
61
|
};
|
62
62
|
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS };
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { PresenceSize, PresenceType } from './presence.types';
|
2
|
-
export declare const getIconValue: (type: PresenceType) => "
|
2
|
+
export declare const getIconValue: (type: PresenceType) => "dnd-presence-badge-filled" | "recents-presence-badge-filled" | "away-calling-presence-filled" | "busy-presence-bold" | "camera-filled" | "handset-filled" | "generic-device-video-badge-filled" | "phone-badge-filled" | "pause-badge-filled" | "pto-presence-filled" | "share-screen-badge-filled" | "quiet-hours-presence-filled" | "meetings-presence-badge-filled" | "active-presence-small-filled";
|
3
3
|
export declare const getPresenceIconSize: (size: PresenceSize) => number;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-progressspinner";
|
2
3
|
declare const DEFAULTS: {
|
3
4
|
readonly RADIUS: 20;
|
@@ -9,7 +10,7 @@ declare const DEFAULTS: {
|
|
9
10
|
readonly ICON_LENGTH_UNIT: "em";
|
10
11
|
};
|
11
12
|
declare const ICON_NAME: {
|
12
|
-
readonly CHECK_CIRCLE_BOLD: "check-circle-bold"
|
13
|
-
readonly ERROR_LEGACY_FILLED: "error-legacy-filled"
|
13
|
+
readonly CHECK_CIRCLE_BOLD: Extract<IconNames, "check-circle-bold">;
|
14
|
+
readonly ERROR_LEGACY_FILLED: Extract<IconNames, "error-legacy-filled">;
|
14
15
|
};
|
15
16
|
export { TAG_NAME, DEFAULTS, ICON_NAME };
|
@@ -3,8 +3,8 @@ const TAG_NAME = utils.constructTagName('progressspinner');
|
|
3
3
|
const DEFAULTS = {
|
4
4
|
RADIUS: 20,
|
5
5
|
CIRCUMFERENCE: 2 * Math.PI * 20,
|
6
|
-
STROKE_WIDTH: 4,
|
7
|
-
GAP_SIZE: 7.5,
|
6
|
+
STROKE_WIDTH: 4, // Default stroke width or border width
|
7
|
+
GAP_SIZE: 7.5, // Gap size between the spinner and the track
|
8
8
|
ERROR_ICON_SIZE: 2,
|
9
9
|
SUCCESS_ICON_SIZE: 3,
|
10
10
|
ICON_LENGTH_UNIT: 'em',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { CSSResult, PropertyValueMap, PropertyValues } from 'lit';
|
2
2
|
import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
|
3
3
|
import { AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';
|
4
|
-
declare const Radio_base: import("../../utils/mixins/index.types").Constructor<import("../../models
|
4
|
+
declare const Radio_base: import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
5
5
|
/**
|
6
6
|
* Radio allow users to select single options from a list or turn an item/feature on or off.
|
7
7
|
* These are often used in forms, settings, and selection in lists.
|
@@ -61,6 +61,8 @@ const styles = [
|
|
61
61
|
|
62
62
|
.mdc-label {
|
63
63
|
cursor: pointer;
|
64
|
+
word-break: break-word;
|
65
|
+
white-space: normal;
|
64
66
|
}
|
65
67
|
|
66
68
|
:host([disabled]) .mdc-radio__label-text,
|
@@ -83,6 +85,7 @@ const styles = [
|
|
83
85
|
flex-direction: column;
|
84
86
|
justify-content: center;
|
85
87
|
gap: 0.25rem;
|
88
|
+
flex: 1;
|
86
89
|
}
|
87
90
|
:host::part(required-indicator) {
|
88
91
|
display: none;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import type { IconNames } from '../icon/icon.types';
|
1
2
|
declare const TAG_NAME: "mdc-searchfield";
|
2
3
|
declare const DEFAULTS: {
|
3
4
|
readonly TYPE: "search";
|
4
|
-
readonly ICON: "search-bold"
|
5
|
+
readonly ICON: Extract<IconNames, "search-bold">;
|
5
6
|
readonly CLOSE_BTN: true;
|
6
7
|
readonly INPUT_CHIP_TAG: "mdc-inputchip";
|
7
8
|
};
|