@momentum-design/components 0.30.0 → 0.31.0

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.
@@ -50,7 +50,9 @@ const styles = [css `
50
50
  --mdc-icon-fill-color: var(--mdc-checkbox-disabled-icon-color);
51
51
  }
52
52
  :host([disabled][checked]) .icon-container,
53
- :host([disabled][indeterminate]) .icon-container {
53
+ :host([disabled][indeterminate]) .icon-container,
54
+ :host([disabled][checked]) .container:hover .icon-container,
55
+ :host([disabled][indeterminate]) .container:hover .icon-container {
54
56
  background: var(--mdc-checkbox-disabled-checked-icon-color);
55
57
  border: 0.0625rem solid var(--mdc-checkbox-disabled-border-color);
56
58
  }
@@ -33,9 +33,17 @@ declare const ListItem_base: import("../../utils/mixins/index.types").Constructo
33
33
  * - Allows customization of the primary label, side header and subline text slot color.
34
34
  * @cssproperty --mdc-listitem-secondary-label-color
35
35
  * - Allows customization of the secondary and teritary label text slot color.
36
+ * @cssproperty --mdc-listitem-disabled-color - Allows customization of the disabled color.
37
+ *
38
+ * @event click - (React: onClick) This event is dispatched when the listitem is clicked.
39
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.
40
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the listitem.
41
+ * @event focus - (React: onFocus) This event is dispatched when the listitem receives focus.
36
42
  */
37
43
  declare class ListItem extends ListItem_base {
44
+ /** @internal */
38
45
  leadingControlsSlot: Array<HTMLElement>;
46
+ /** @internal */
39
47
  trailingControlsSlot: Array<HTMLElement>;
40
48
  /**
41
49
  * The variant of the list item. It can be a pill, rectangle or a full-width.
@@ -46,6 +46,12 @@ import styles from './listitem.styles';
46
46
  * - Allows customization of the primary label, side header and subline text slot color.
47
47
  * @cssproperty --mdc-listitem-secondary-label-color
48
48
  * - Allows customization of the secondary and teritary label text slot color.
49
+ * @cssproperty --mdc-listitem-disabled-color - Allows customization of the disabled color.
50
+ *
51
+ * @event click - (React: onClick) This event is dispatched when the listitem is clicked.
52
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.
53
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the listitem.
54
+ * @event focus - (React: onFocus) This event is dispatched when the listitem receives focus.
49
55
  */
50
56
  class ListItem extends DataAriaLabelMixin(DisabledMixin(TabIndexMixin(Component))) {
51
57
  constructor() {
@@ -5407,6 +5407,10 @@
5407
5407
  {
5408
5408
  "description": "Allows customization of the secondary and teritary label text slot color.",
5409
5409
  "name": "--mdc-listitem-secondary-label-color"
5410
+ },
5411
+ {
5412
+ "description": "Allows customization of the disabled color.",
5413
+ "name": "--mdc-listitem-disabled-color"
5410
5414
  }
5411
5415
  ],
5412
5416
  "slots": [
@@ -5440,20 +5444,6 @@
5440
5444
  }
5441
5445
  ],
5442
5446
  "members": [
5443
- {
5444
- "kind": "field",
5445
- "name": "leadingControlsSlot",
5446
- "type": {
5447
- "text": "Array<HTMLElement>"
5448
- }
5449
- },
5450
- {
5451
- "kind": "field",
5452
- "name": "trailingControlsSlot",
5453
- "type": {
5454
- "text": "Array<HTMLElement>"
5455
- }
5456
- },
5457
5447
  {
5458
5448
  "kind": "field",
5459
5449
  "name": "variant",
@@ -5624,6 +5614,32 @@
5624
5614
  }
5625
5615
  }
5626
5616
  ],
5617
+ "events": [
5618
+ {
5619
+ "description": "(React: onClick) This event is dispatched when the listitem is clicked.",
5620
+ "name": "click",
5621
+ "reactName": "onClick",
5622
+ "eventName": "ClickEvent"
5623
+ },
5624
+ {
5625
+ "description": "(React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.",
5626
+ "name": "keydown",
5627
+ "reactName": "onKeyDown",
5628
+ "eventName": "KeydownEvent"
5629
+ },
5630
+ {
5631
+ "description": "(React: onKeyUp) This event is dispatched when a key is released on the listitem.",
5632
+ "name": "keyup",
5633
+ "reactName": "onKeyUp",
5634
+ "eventName": "KeyupEvent"
5635
+ },
5636
+ {
5637
+ "description": "(React: onFocus) This event is dispatched when the listitem receives focus.",
5638
+ "name": "focus",
5639
+ "reactName": "onFocus",
5640
+ "eventName": "FocusEvent"
5641
+ }
5642
+ ],
5627
5643
  "attributes": [
5628
5644
  {
5629
5645
  "name": "variant",
@@ -5733,7 +5749,7 @@
5733
5749
  "module": "/src/models"
5734
5750
  },
5735
5751
  "tagName": "mdc-listitem",
5736
- "jsDoc": "/**\n * mdc-listitem component is used to display a label with different types of controls.\n * There can be three types of controls, a radio button, a checkbox on the\n * leading side and a toggle on the trailing side.\n * The list item can contain an avatar on the leading side and a badge on the trailing side.\n * Additionally, the list item can contain a side header and a subline text.\n *\n * The leading and trailing slots can be used to display controls and text. <br/>\n * Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>\n * Please use mdc-list as a parent element even when there is only listitem for a11y purpose.\n *\n * @tagname mdc-listitem\n *\n * @dependency mdc-text\n *\n * @slot leading-controls - slot for list item controls to appear of leading end.\n * @slot leading-text-primary-label - slot for list item primary label.\n * @slot leading-text-secondary-label - slot for list item secondary label.\n * @slot leading-text-tertiary-label - slot for list item tertiary label.\n * @slot trailing-text-side-header - slot for list item side header text.\n * @slot trailing-text-subline - slot for list item subline text.\n * @slot trailing-controls - slot for list item controls to appear of trailing end.\n *\n * @cssproperty --mdc-listitem-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-listitem-background-color-hover - Allows customization of the background color on hover.\n * @cssproperty --mdc-listitem-background-color-active - Allows customization of the background color when pressed.\n * @cssproperty --mdc-listitem-primary-label-color\n * - Allows customization of the primary label, side header and subline text slot color.\n * @cssproperty --mdc-listitem-secondary-label-color\n * - Allows customization of the secondary and teritary label text slot color.\n */",
5752
+ "jsDoc": "/**\n * mdc-listitem component is used to display a label with different types of controls.\n * There can be three types of controls, a radio button, a checkbox on the\n * leading side and a toggle on the trailing side.\n * The list item can contain an avatar on the leading side and a badge on the trailing side.\n * Additionally, the list item can contain a side header and a subline text.\n *\n * The leading and trailing slots can be used to display controls and text. <br/>\n * Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>\n * Please use mdc-list as a parent element even when there is only listitem for a11y purpose.\n *\n * @tagname mdc-listitem\n *\n * @dependency mdc-text\n *\n * @slot leading-controls - slot for list item controls to appear of leading end.\n * @slot leading-text-primary-label - slot for list item primary label.\n * @slot leading-text-secondary-label - slot for list item secondary label.\n * @slot leading-text-tertiary-label - slot for list item tertiary label.\n * @slot trailing-text-side-header - slot for list item side header text.\n * @slot trailing-text-subline - slot for list item subline text.\n * @slot trailing-controls - slot for list item controls to appear of trailing end.\n *\n * @cssproperty --mdc-listitem-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-listitem-background-color-hover - Allows customization of the background color on hover.\n * @cssproperty --mdc-listitem-background-color-active - Allows customization of the background color when pressed.\n * @cssproperty --mdc-listitem-primary-label-color\n * - Allows customization of the primary label, side header and subline text slot color.\n * @cssproperty --mdc-listitem-secondary-label-color\n * - Allows customization of the secondary and teritary label text slot color.\n * @cssproperty --mdc-listitem-disabled-color - Allows customization of the disabled color.\n *\n * @event click - (React: onClick) This event is dispatched when the listitem is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the listitem.\n * @event focus - (React: onFocus) This event is dispatched when the listitem receives focus.\n */",
5737
5753
  "customElement": true
5738
5754
  }
5739
5755
  ],
@@ -29,6 +29,17 @@ import Component from '../../components/listitem';
29
29
  * - Allows customization of the primary label, side header and subline text slot color.
30
30
  * @cssproperty --mdc-listitem-secondary-label-color
31
31
  * - Allows customization of the secondary and teritary label text slot color.
32
+ * @cssproperty --mdc-listitem-disabled-color - Allows customization of the disabled color.
33
+ *
34
+ * @event click - (React: onClick) This event is dispatched when the listitem is clicked.
35
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.
36
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the listitem.
37
+ * @event focus - (React: onFocus) This event is dispatched when the listitem receives focus.
32
38
  */
33
- declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
39
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
40
+ onClick: string;
41
+ onKeyDown: string;
42
+ onKeyUp: string;
43
+ onFocus: string;
44
+ }>;
34
45
  export default reactWrapper;
@@ -32,12 +32,23 @@ import { TAG_NAME } from '../../components/listitem/listitem.constants';
32
32
  * - Allows customization of the primary label, side header and subline text slot color.
33
33
  * @cssproperty --mdc-listitem-secondary-label-color
34
34
  * - Allows customization of the secondary and teritary label text slot color.
35
+ * @cssproperty --mdc-listitem-disabled-color - Allows customization of the disabled color.
36
+ *
37
+ * @event click - (React: onClick) This event is dispatched when the listitem is clicked.
38
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.
39
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the listitem.
40
+ * @event focus - (React: onFocus) This event is dispatched when the listitem receives focus.
35
41
  */
36
42
  const reactWrapper = createComponent({
37
43
  tagName: TAG_NAME,
38
44
  elementClass: Component,
39
45
  react: React,
40
- events: {},
46
+ events: {
47
+ onClick: 'click',
48
+ onKeyDown: 'keydown',
49
+ onKeyUp: 'keyup',
50
+ onFocus: 'focus',
51
+ },
41
52
  displayName: 'ListItem',
42
53
  });
43
54
  export default reactWrapper;
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  "lit": "^3.2.0",
39
39
  "uuid": "^11.0.5"
40
40
  },
41
- "version": "0.30.0"
41
+ "version": "0.31.0"
42
42
  }