@momentum-design/components 0.129.19 → 0.129.20

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.
@@ -58,6 +58,7 @@ declare class FormfieldWrapper extends FormfieldWrapper_base {
58
58
  required: boolean;
59
59
  /**
60
60
  * The type of help text. It can be 'default', 'error', 'warning', 'success', 'priority'.
61
+ * @default 'default'
61
62
  */
62
63
  helpTextType: ValidationType;
63
64
  /**
@@ -74,6 +75,10 @@ declare class FormfieldWrapper extends FormfieldWrapper_base {
74
75
  * @default 'top'
75
76
  */
76
77
  toggletipPlacement: PopoverPlacement;
78
+ /**
79
+ * The strategy of the toggletip that is displayed when the info icon is hovered.
80
+ * @default 'absolute'
81
+ */
77
82
  toggletipStrategy: PopoverStrategy;
78
83
  /**
79
84
  * Aria label for the info icon that is displayed next to the label when `toggletipText` is set.
@@ -70,6 +70,7 @@ class FormfieldWrapper extends DisabledMixin(Component) {
70
70
  this.required = false;
71
71
  /**
72
72
  * The type of help text. It can be 'default', 'error', 'warning', 'success', 'priority'.
73
+ * @default 'default'
73
74
  */
74
75
  this.helpTextType = DEFAULTS.VALIDATION;
75
76
  /**
@@ -77,6 +78,10 @@ class FormfieldWrapper extends DisabledMixin(Component) {
77
78
  * @default 'top'
78
79
  */
79
80
  this.toggletipPlacement = DEFAULTS.TOGGLETIP_PLACEMENT;
81
+ /**
82
+ * The strategy of the toggletip that is displayed when the info icon is hovered.
83
+ * @default 'absolute'
84
+ */
80
85
  this.toggletipStrategy = DEFAULTS.TOGGLETIP_STRATEGY;
81
86
  /**
82
87
  * Determines whether the form field is read-only.
@@ -1,4 +1,4 @@
1
- import { IconNames } from '../icon/icon.types';
1
+ import type { IconNames } from '../icon/icon.types';
2
2
  declare const TAG_NAME: "mdc-formfieldwrapper";
3
3
  declare const VALIDATION: {
4
4
  readonly DEFAULT: "default";
@@ -1,4 +1,5 @@
1
1
  import utils from '../../utils/tag-name';
2
+ import { POPOVER_PLACEMENT, STRATEGY } from '../popover/popover.constants';
2
3
  import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
3
4
  const TAG_NAME = utils.constructTagName('formfieldwrapper');
4
5
  const VALIDATION = {
@@ -14,8 +15,8 @@ const DEFAULTS = {
14
15
  HEADING_ID: 'heading-id',
15
16
  ICON_SIZE: 20,
16
17
  INFO_ICON: 'info-badge-filled',
17
- TOGGLETIP_PLACEMENT: 'top',
18
- TOGGLETIP_STRATEGY: 'absolute',
18
+ TOGGLETIP_PLACEMENT: POPOVER_PLACEMENT.TOP,
19
+ TOGGLETIP_STRATEGY: STRATEGY.ABSOLUTE,
19
20
  };
20
21
  const MDC_TEXT_OPTIONS = {
21
22
  TAGNAME: VALID_TEXT_TAGS.SPAN,
@@ -9,6 +9,7 @@ declare const Select_base: import("../../utils/mixins/index.types").Constructor<
9
9
  /**
10
10
  * The mdc-select component is a dropdown selection control that allows users to pick an option from a predefined list.
11
11
  * It is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.
12
+ * Optional: Add `mdc-divider` after each option group (`mdc-optgroup`) to separate groups visually.
12
13
  *
13
14
  * Every mdc-option should have a `value` attribute set to ensure proper form submission.
14
15
  *
@@ -27,14 +28,13 @@ declare const Select_base: import("../../utils/mixins/index.types").Constructor<
27
28
  *
28
29
  * @tagname mdc-select
29
30
  *
30
- * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
31
- *
32
31
  * @event click - (React: onClick) This event is dispatched when the select is clicked.
33
32
  * @event change - (React: onChange) This event is dispatched when the select is changed.
34
33
  * @event input - (React: onInput) This event is dispatched when the select is changed.
35
34
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the select.
36
35
  * @event focus - (React: onFocus) This event is dispatched when the select receives focus.
37
36
  *
37
+ * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
38
38
  * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
39
39
  * @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.
40
40
  * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
@@ -30,6 +30,7 @@ import styles from './select.styles';
30
30
  /**
31
31
  * The mdc-select component is a dropdown selection control that allows users to pick an option from a predefined list.
32
32
  * It is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.
33
+ * Optional: Add `mdc-divider` after each option group (`mdc-optgroup`) to separate groups visually.
33
34
  *
34
35
  * Every mdc-option should have a `value` attribute set to ensure proper form submission.
35
36
  *
@@ -48,14 +49,13 @@ import styles from './select.styles';
48
49
  *
49
50
  * @tagname mdc-select
50
51
  *
51
- * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
52
- *
53
52
  * @event click - (React: onClick) This event is dispatched when the select is clicked.
54
53
  * @event change - (React: onChange) This event is dispatched when the select is changed.
55
54
  * @event input - (React: onInput) This event is dispatched when the select is changed.
56
55
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the select.
57
56
  * @event focus - (React: onFocus) This event is dispatched when the select receives focus.
58
57
  *
58
+ * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
59
59
  * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
60
60
  * @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.
61
61
  * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.