@momentum-design/components 0.94.0 → 0.95.1

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.
@@ -16,8 +16,8 @@ export { default as CardCheckbox } from './cardcheckbox';
16
16
  export { default as CardRadio } from './cardradio';
17
17
  export { default as Checkbox } from './checkbox';
18
18
  export { default as Chip } from './chip';
19
- export { default as Dialog } from './dialog';
20
19
  export { default as Coachmark } from './coachmark';
20
+ export { default as Dialog } from './dialog';
21
21
  export { default as Divider } from './divider';
22
22
  export { default as FilterChip } from './filterchip';
23
23
  export { default as FormfieldGroup } from './formfieldgroup';
@@ -16,8 +16,8 @@ export { default as CardCheckbox } from './cardcheckbox';
16
16
  export { default as CardRadio } from './cardradio';
17
17
  export { default as Checkbox } from './checkbox';
18
18
  export { default as Chip } from './chip';
19
- export { default as Dialog } from './dialog';
20
19
  export { default as Coachmark } from './coachmark';
20
+ export { default as Dialog } from './dialog';
21
21
  export { default as Divider } from './divider';
22
22
  export { default as FilterChip } from './filterchip';
23
23
  export { default as FormfieldGroup } from './formfieldgroup';
@@ -1,9 +1,17 @@
1
1
  import { type EventName } from '@lit/react';
2
2
  import Component from '../../components/option';
3
3
  /**
4
- * option component, which is used as a list item in a select component.<br/>
5
- * We can pass an icon which will be displayed in leading position of the option label text.
6
- * We can pass a tooltip which will be displayed on hover of the option label text.
4
+ * Option component, which is used within Selectlistbox within Select component.
5
+ *
6
+ * The label and secondary label of the option can be set using the `label` and `secondaryLabel` properties respectively.
7
+ * The `label` is the primary text displayed in the option, while the `secondaryLabel` is the secondary text displayed below the primary label.
8
+ *
9
+ * The `selected` property is used to indicate whether the option is selected or not.
10
+ * When the `selected` property is set to true, a checkmark icon will be displayed
11
+ * on the right side of the option to indicate that it is selected.
12
+ *
13
+ * The `prefixIcon` property can be used to display an icon on the left side of the option label.
14
+ * We can show a tooltip by setting `tooltip-text` attribute. This will be displayed on hover or focus of the option.
7
15
  * The tooltip will be helpful for a long label text which is truncated with ellipsis.
8
16
  *
9
17
  * @dependency mdc-icon
@@ -12,8 +20,6 @@ import Component from '../../components/option';
12
20
  *
13
21
  * @tagname mdc-option
14
22
  *
15
- * @slot default - This is a default/unnamed slot
16
- *
17
23
  * @event click - (React: onClick) This event is dispatched when the option is clicked.
18
24
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the option.
19
25
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the option.
@@ -3,9 +3,17 @@ import { createComponent } from '@lit/react';
3
3
  import Component from '../../components/option';
4
4
  import { TAG_NAME } from '../../components/option/option.constants';
5
5
  /**
6
- * option component, which is used as a list item in a select component.<br/>
7
- * We can pass an icon which will be displayed in leading position of the option label text.
8
- * We can pass a tooltip which will be displayed on hover of the option label text.
6
+ * Option component, which is used within Selectlistbox within Select component.
7
+ *
8
+ * The label and secondary label of the option can be set using the `label` and `secondaryLabel` properties respectively.
9
+ * The `label` is the primary text displayed in the option, while the `secondaryLabel` is the secondary text displayed below the primary label.
10
+ *
11
+ * The `selected` property is used to indicate whether the option is selected or not.
12
+ * When the `selected` property is set to true, a checkmark icon will be displayed
13
+ * on the right side of the option to indicate that it is selected.
14
+ *
15
+ * The `prefixIcon` property can be used to display an icon on the left side of the option label.
16
+ * We can show a tooltip by setting `tooltip-text` attribute. This will be displayed on hover or focus of the option.
9
17
  * The tooltip will be helpful for a long label text which is truncated with ellipsis.
10
18
  *
11
19
  * @dependency mdc-icon
@@ -14,8 +22,6 @@ import { TAG_NAME } from '../../components/option/option.constants';
14
22
  *
15
23
  * @tagname mdc-option
16
24
  *
17
- * @slot default - This is a default/unnamed slot
18
- *
19
25
  * @event click - (React: onClick) This event is dispatched when the option is clicked.
20
26
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the option.
21
27
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the option.
@@ -6,6 +6,8 @@ import Component from '../../components/select';
6
6
  * The component ensures accessibility and usability while handling various use cases,
7
7
  * including long text truncation with tooltip support.
8
8
  *
9
+ * Every mdc-option should have a `value` attribute set to ensure proper form submission.
10
+ *
9
11
  * To set a default option, use the `selected` attribute on the `mdc-option` element.
10
12
  *
11
13
  * **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-select` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.
@@ -18,7 +20,7 @@ import Component from '../../components/select';
18
20
  *
19
21
  * @tagname mdc-select
20
22
  *
21
- * @slot default - This is a default/unnamed slot for options and/or option group.
23
+ * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
22
24
  *
23
25
  * @event click - (React: onClick) This event is dispatched when the select is clicked.
24
26
  * @event change - (React: onChange) This event is dispatched when the select is changed.
@@ -27,8 +29,12 @@ import Component from '../../components/select';
27
29
  * @event focus - (React: onFocus) This event is dispatched when the select receives focus.
28
30
  */
29
31
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
30
- onChange: EventName<Event>;
31
- onInput: EventName<Event>;
32
+ onChange: EventName<import("../../utils/types").TypedEvent<Component, {
33
+ value: string;
34
+ }>>;
35
+ onInput: EventName<import("../../utils/types").TypedEvent<Component, {
36
+ value: string;
37
+ }>>;
32
38
  onClick: EventName<MouseEvent>;
33
39
  onKeyDown: EventName<KeyboardEvent>;
34
40
  onFocus: EventName<FocusEvent>;
@@ -8,6 +8,8 @@ import { TAG_NAME } from '../../components/select/select.constants';
8
8
  * The component ensures accessibility and usability while handling various use cases,
9
9
  * including long text truncation with tooltip support.
10
10
  *
11
+ * Every mdc-option should have a `value` attribute set to ensure proper form submission.
12
+ *
11
13
  * To set a default option, use the `selected` attribute on the `mdc-option` element.
12
14
  *
13
15
  * **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-select` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.
@@ -20,7 +22,7 @@ import { TAG_NAME } from '../../components/select/select.constants';
20
22
  *
21
23
  * @tagname mdc-select
22
24
  *
23
- * @slot default - This is a default/unnamed slot for options and/or option group.
25
+ * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
24
26
  *
25
27
  * @event click - (React: onClick) This event is dispatched when the select is clicked.
26
28
  * @event change - (React: onChange) This event is dispatched when the select is changed.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.94.0",
4
+ "version": "0.95.1",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"