@momentum-design/components 0.95.0 → 0.95.2

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.
@@ -1,5 +1,5 @@
1
- export { default as AlertChip } from './alertchip';
2
1
  export { default as Animation } from './animation';
2
+ export { default as AlertChip } from './alertchip';
3
3
  export { default as Appheader } from './appheader';
4
4
  export { default as Avatar } from './avatar';
5
5
  export { default as AvatarButton } from './avatarbutton';
@@ -13,17 +13,17 @@ export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
14
  export { default as CardButton } from './cardbutton';
15
15
  export { default as CardCheckbox } from './cardcheckbox';
16
- export { default as Checkbox } from './checkbox';
17
16
  export { default as CardRadio } from './cardradio';
17
+ export { default as Checkbox } from './checkbox';
18
+ export { default as Chip } from './chip';
18
19
  export { default as Coachmark } from './coachmark';
19
20
  export { default as Dialog } from './dialog';
20
- export { default as Chip } from './chip';
21
21
  export { default as Divider } from './divider';
22
22
  export { default as FilterChip } from './filterchip';
23
23
  export { default as FormfieldGroup } from './formfieldgroup';
24
24
  export { default as FormfieldWrapper } from './formfieldwrapper';
25
- export { default as Icon } from './icon';
26
25
  export { default as IconProvider } from './iconprovider';
26
+ export { default as Icon } from './icon';
27
27
  export { default as Input } from './input';
28
28
  export { default as InputChip } from './inputchip';
29
29
  export { default as Link } from './link';
@@ -1,5 +1,5 @@
1
- export { default as AlertChip } from './alertchip';
2
1
  export { default as Animation } from './animation';
2
+ export { default as AlertChip } from './alertchip';
3
3
  export { default as Appheader } from './appheader';
4
4
  export { default as Avatar } from './avatar';
5
5
  export { default as AvatarButton } from './avatarbutton';
@@ -13,17 +13,17 @@ export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
14
  export { default as CardButton } from './cardbutton';
15
15
  export { default as CardCheckbox } from './cardcheckbox';
16
- export { default as Checkbox } from './checkbox';
17
16
  export { default as CardRadio } from './cardradio';
17
+ export { default as Checkbox } from './checkbox';
18
+ export { default as Chip } from './chip';
18
19
  export { default as Coachmark } from './coachmark';
19
20
  export { default as Dialog } from './dialog';
20
- export { default as Chip } from './chip';
21
21
  export { default as Divider } from './divider';
22
22
  export { default as FilterChip } from './filterchip';
23
23
  export { default as FormfieldGroup } from './formfieldgroup';
24
24
  export { default as FormfieldWrapper } from './formfieldwrapper';
25
- export { default as Icon } from './icon';
26
25
  export { default as IconProvider } from './iconprovider';
26
+ export { default as Icon } from './icon';
27
27
  export { default as Input } from './input';
28
28
  export { default as InputChip } from './inputchip';
29
29
  export { default as Link } from './link';
@@ -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.
@@ -46,12 +46,12 @@ export const CardComponentMixin = (superClass) => {
46
46
  */
47
47
  this.orientation = DEFAULTS.ORIENTATION;
48
48
  /**
49
- * The tag name for the card title. It supports all the types that `msc-text` supports
49
+ * The tag name for the card title. It supports all the types that `mdc-text` supports
50
50
  * @default 'span'
51
51
  */
52
52
  this.titleTagName = DEFAULTS.TAGNAME;
53
53
  /**
54
- * The tag name for the subtitle. It supports all the types that `msc-text` supports
54
+ * The tag name for the subtitle. It supports all the types that `mdc-text` supports
55
55
  * @default 'span'
56
56
  */
57
57
  this.subtitleTagName = DEFAULTS.TAGNAME;
@@ -1,6 +1,6 @@
1
1
  import { LitElement, TemplateResult } from 'lit';
2
2
  import type { Constructor } from './index.types';
3
- export declare class CardAndDialogFooterMixinInterface {
3
+ export declare class FooterMixinInterface {
4
4
  protected footerLink?: Array<HTMLElement>;
5
5
  protected footerButtonPrimary?: Array<HTMLElement>;
6
6
  protected footerButtonSecondary?: Array<HTMLElement>;
@@ -8,4 +8,4 @@ export declare class CardAndDialogFooterMixinInterface {
8
8
  protected handleFooterSlot(tagname: string, variant?: string): void;
9
9
  protected renderFooter(): TemplateResult;
10
10
  }
11
- export declare const CardAndDialogFooterMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<CardAndDialogFooterMixinInterface> & T;
11
+ export declare const FooterMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<FooterMixinInterface> & T;
@@ -12,7 +12,7 @@ import { html } from 'lit';
12
12
  import { queryAssignedElements } from 'lit/decorators.js';
13
13
  import { DEFAULTS, VARIANTS } from '../../components/card/card.constants';
14
14
  import { BUTTON_COLORS, BUTTON_VARIANTS } from '../../components/button/button.constants';
15
- export const CardAndDialogFooterMixin = (superClass) => {
15
+ export const FooterMixin = (superClass) => {
16
16
  class InnerMixinClass extends superClass {
17
17
  /**
18
18
  * Updates the color of the footer buttons based on the variant.
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.95.0",
4
+ "version": "0.95.2",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"