@momentum-design/components 0.106.6 → 0.106.8
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 +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/components/alertchip/alertchip.component.d.ts +5 -0
- package/dist/components/alertchip/alertchip.component.js +5 -0
- package/dist/components/alertchip/alertchip.types.d.ts +9 -2
- package/dist/components/chip/chip.component.d.ts +7 -0
- package/dist/components/chip/chip.component.js +7 -0
- package/dist/components/chip/chip.types.d.ts +9 -2
- package/dist/components/filterchip/filterchip.component.d.ts +13 -0
- package/dist/components/filterchip/filterchip.component.js +13 -0
- package/dist/components/filterchip/filterchip.types.d.ts +9 -0
- package/dist/components/filterchip/filterchip.types.js +1 -0
- package/dist/components/inputchip/inputchip.component.d.ts +4 -0
- package/dist/components/inputchip/inputchip.component.js +5 -1
- package/dist/custom-elements.json +1646 -1616
- package/dist/react/alertchip/index.d.ts +5 -0
- package/dist/react/alertchip/index.js +5 -0
- package/dist/react/chip/index.d.ts +7 -0
- package/dist/react/chip/index.js +7 -0
- package/dist/react/filterchip/index.d.ts +13 -0
- package/dist/react/filterchip/index.js +13 -0
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/react/inputchip/index.d.ts +4 -0
- package/dist/react/inputchip/index.js +4 -0
- package/package.json +1 -1
@@ -21,6 +21,11 @@ import type { VariantType } from './alertchip.types';
|
|
21
21
|
*
|
22
22
|
* @csspart icon - The alert icon
|
23
23
|
* @csspart label - The text label of the alertchip
|
24
|
+
*
|
25
|
+
* @event click - (React: onClick) This event is dispatched when the chip is clicked.
|
26
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the chip.
|
27
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
|
28
|
+
* @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
|
24
29
|
*/
|
25
30
|
declare class AlertChip extends Buttonsimple {
|
26
31
|
/**
|
@@ -34,6 +34,11 @@ import { getAlertIcon } from './alertchip.utils';
|
|
34
34
|
*
|
35
35
|
* @csspart icon - The alert icon
|
36
36
|
* @csspart label - The text label of the alertchip
|
37
|
+
*
|
38
|
+
* @event click - (React: onClick) This event is dispatched when the chip is clicked.
|
39
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the chip.
|
40
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
|
41
|
+
* @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
|
37
42
|
*/
|
38
43
|
class AlertChip extends Buttonsimple {
|
39
44
|
constructor() {
|
@@ -1,6 +1,13 @@
|
|
1
|
-
import type { ValueOf } from '../../utils/types';
|
1
|
+
import type { OverrideEventTarget, ValueOf } from '../../utils/types';
|
2
2
|
import type { IconNames } from '../icon/icon.types';
|
3
|
+
import type AlertChip from './alertchip.component';
|
3
4
|
import { VARIANTS } from './alertchip.constants';
|
4
5
|
type VariantType = ValueOf<typeof VARIANTS>;
|
5
6
|
type IconListType = Extract<IconNames, 'error-legacy-badge-filled' | 'warning-badge-filled' | 'check-circle-badge-filled' | 'dnd-presence-badge-filled' | 'info-badge-filled'>;
|
6
|
-
|
7
|
+
interface Events {
|
8
|
+
onClickEvent: OverrideEventTarget<MouseEvent, AlertChip>;
|
9
|
+
onKeyDownEvent: OverrideEventTarget<KeyboardEvent, AlertChip>;
|
10
|
+
onKeyUpEvent: OverrideEventTarget<KeyboardEvent, AlertChip>;
|
11
|
+
onFocusEvent: OverrideEventTarget<FocusEvent, AlertChip>;
|
12
|
+
}
|
13
|
+
export type { VariantType, IconListType, Events };
|
@@ -21,6 +21,13 @@ declare const Chip_base: import("../../utils/mixins/index.types").Constructor<im
|
|
21
21
|
* @cssproperty --mdc-chip-border-color - The border color of the chip.
|
22
22
|
* @cssproperty --mdc-chip-background-color - The background color of the chip.
|
23
23
|
*
|
24
|
+
* @csspart label - The label part of the chip.
|
25
|
+
*
|
26
|
+
* @event click - (React: onClick) This event is dispatched when the chip is clicked.
|
27
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the chip.
|
28
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
|
29
|
+
* @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
|
30
|
+
*
|
24
31
|
*/
|
25
32
|
declare class Chip extends Chip_base {
|
26
33
|
/**
|
@@ -33,6 +33,13 @@ import styles from './chip.styles';
|
|
33
33
|
* @cssproperty --mdc-chip-border-color - The border color of the chip.
|
34
34
|
* @cssproperty --mdc-chip-background-color - The background color of the chip.
|
35
35
|
*
|
36
|
+
* @csspart label - The label part of the chip.
|
37
|
+
*
|
38
|
+
* @event click - (React: onClick) This event is dispatched when the chip is clicked.
|
39
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the chip.
|
40
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
|
41
|
+
* @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
|
42
|
+
*
|
36
43
|
*/
|
37
44
|
class Chip extends IconNameMixin(Buttonsimple) {
|
38
45
|
constructor() {
|
@@ -1,4 +1,11 @@
|
|
1
|
-
import type { ValueOf } from '../../utils/types';
|
1
|
+
import type { OverrideEventTarget, ValueOf } from '../../utils/types';
|
2
|
+
import type Chip from './chip.component';
|
2
3
|
import { COLOR } from './chip.constants';
|
3
4
|
type ColorType = ValueOf<typeof COLOR>;
|
4
|
-
|
5
|
+
interface Events {
|
6
|
+
onClickEvent: OverrideEventTarget<MouseEvent, Chip>;
|
7
|
+
onKeyDownEvent: OverrideEventTarget<KeyboardEvent, Chip>;
|
8
|
+
onKeyUpEvent: OverrideEventTarget<KeyboardEvent, Chip>;
|
9
|
+
onFocusEvent: OverrideEventTarget<FocusEvent, Chip>;
|
10
|
+
}
|
11
|
+
export type { ColorType, Events };
|
@@ -8,6 +8,19 @@ import Chip from '../chip/chip.component';
|
|
8
8
|
*
|
9
9
|
* @tagname mdc-filterchip
|
10
10
|
*
|
11
|
+
* @dependency mdc-icon
|
12
|
+
* @dependency mdc-text
|
13
|
+
*
|
14
|
+
* @csspart label - The label part of the chip.
|
15
|
+
*
|
16
|
+
* @cssproperty --mdc-chip-color - The color of the chip.
|
17
|
+
* @cssproperty --mdc-chip-border-color - The border color of the chip.
|
18
|
+
* @cssproperty --mdc-chip-background-color - The background color of the chip.
|
19
|
+
*
|
20
|
+
* @event click - (React: onClick) This event is dispatched when the chip is clicked.
|
21
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the chip.
|
22
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
|
23
|
+
* @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
|
11
24
|
*/
|
12
25
|
declare class FilterChip extends Chip {
|
13
26
|
/**
|
@@ -19,6 +19,19 @@ import { DEFAULTS } from './filterchip.constants';
|
|
19
19
|
*
|
20
20
|
* @tagname mdc-filterchip
|
21
21
|
*
|
22
|
+
* @dependency mdc-icon
|
23
|
+
* @dependency mdc-text
|
24
|
+
*
|
25
|
+
* @csspart label - The label part of the chip.
|
26
|
+
*
|
27
|
+
* @cssproperty --mdc-chip-color - The color of the chip.
|
28
|
+
* @cssproperty --mdc-chip-border-color - The border color of the chip.
|
29
|
+
* @cssproperty --mdc-chip-background-color - The background color of the chip.
|
30
|
+
*
|
31
|
+
* @event click - (React: onClick) This event is dispatched when the chip is clicked.
|
32
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the chip.
|
33
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
|
34
|
+
* @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
|
22
35
|
*/
|
23
36
|
class FilterChip extends Chip {
|
24
37
|
constructor() {
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { OverrideEventTarget } from '../../utils/types';
|
2
|
+
import type FilterChip from './filterchip.component';
|
3
|
+
interface Events {
|
4
|
+
onClickEvent: OverrideEventTarget<MouseEvent, FilterChip>;
|
5
|
+
onKeyDownEvent: OverrideEventTarget<KeyboardEvent, FilterChip>;
|
6
|
+
onKeyUpEvent: OverrideEventTarget<KeyboardEvent, FilterChip>;
|
7
|
+
onFocusEvent: OverrideEventTarget<FocusEvent, FilterChip>;
|
8
|
+
}
|
9
|
+
export type { Events };
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -16,6 +16,10 @@ declare const InputChip_base: import("../../utils/mixins/index.types").Construct
|
|
16
16
|
*
|
17
17
|
* @event remove - This event is dispatched when the close button is activated. It bubbles and is composed.
|
18
18
|
*
|
19
|
+
* @csspart label - The label part of the chip.
|
20
|
+
* @csspart icon - The icon part of the chip.
|
21
|
+
* @csspart close-icon - The close icon part of the chip.
|
22
|
+
*
|
19
23
|
* @cssproperty --mdc-chip-color - The color of the chip.
|
20
24
|
* @cssproperty --mdc-chip-border-color - The border color of the chip.
|
21
25
|
* @cssproperty --mdc-chip-background-color - The background color of the chip.
|
@@ -29,6 +29,10 @@ import { DEFAULTS } from './inputchip.constants';
|
|
29
29
|
*
|
30
30
|
* @event remove - This event is dispatched when the close button is activated. It bubbles and is composed.
|
31
31
|
*
|
32
|
+
* @csspart label - The label part of the chip.
|
33
|
+
* @csspart icon - The icon part of the chip.
|
34
|
+
* @csspart close-icon - The close icon part of the chip.
|
35
|
+
*
|
32
36
|
* @cssproperty --mdc-chip-color - The color of the chip.
|
33
37
|
* @cssproperty --mdc-chip-border-color - The border color of the chip.
|
34
38
|
* @cssproperty --mdc-chip-background-color - The background color of the chip.
|
@@ -62,7 +66,7 @@ class InputChip extends IconNameMixin(DisabledMixin(Component)) {
|
|
62
66
|
renderIcon() {
|
63
67
|
if (!this.iconName)
|
64
68
|
return nothing;
|
65
|
-
return html ` <mdc-icon name="${this.iconName}" length-unit="rem" size="1"></mdc-icon> `;
|
69
|
+
return html ` <mdc-icon part="icon" name="${this.iconName}" length-unit="rem" size="1"></mdc-icon> `;
|
66
70
|
}
|
67
71
|
/**
|
68
72
|
* Handles the behavior of the close button on click event.
|