@momentum-design/components 0.104.1 → 0.104.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.
Files changed (93) hide show
  1. package/dist/browser/index.js.map +2 -2
  2. package/dist/components/accordionbutton/accordionbutton.types.d.ts +5 -2
  3. package/dist/components/animation/animation.types.d.ts +11 -3
  4. package/dist/components/brandvisual/brandvisual.types.d.ts +8 -2
  5. package/dist/components/buttonlink/buttonlink.types.d.ts +6 -4
  6. package/dist/components/buttonsimple/buttonsimple.types.d.ts +6 -5
  7. package/dist/components/cardbutton/cardbutton.types.d.ts +6 -4
  8. package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +0 -1
  9. package/dist/components/cardcheckbox/cardcheckbox.component.js +0 -1
  10. package/dist/components/cardcheckbox/cardcheckbox.types.d.ts +6 -6
  11. package/dist/components/cardradio/cardradio.component.d.ts +0 -1
  12. package/dist/components/cardradio/cardradio.component.js +0 -1
  13. package/dist/components/cardradio/cardradio.types.d.ts +6 -5
  14. package/dist/components/checkbox/checkbox.types.d.ts +4 -2
  15. package/dist/components/dialog/dialog.types.d.ts +17 -6
  16. package/dist/components/input/input.types.d.ts +6 -6
  17. package/dist/components/inputchip/inputchip.types.d.ts +3 -1
  18. package/dist/components/link/link.types.d.ts +6 -5
  19. package/dist/components/linkbutton/linkbutton.types.d.ts +6 -5
  20. package/dist/components/linksimple/linksimple.types.d.ts +6 -4
  21. package/dist/components/listitem/listitem.types.d.ts +14 -13
  22. package/dist/components/menuitem/menuitem.component.d.ts +4 -0
  23. package/dist/components/menuitem/menuitem.component.js +4 -0
  24. package/dist/components/menuitem/menuitem.types.d.ts +10 -4
  25. package/dist/components/menuitemcheckbox/menuitemcheckbox.types.d.ts +5 -4
  26. package/dist/components/menuitemradio/menuitemradio.types.d.ts +5 -4
  27. package/dist/components/menupopover/menupopover.types.d.ts +4 -7
  28. package/dist/components/menusection/menusection.types.d.ts +3 -4
  29. package/dist/components/navmenuitem/navmenuitem.types.d.ts +10 -6
  30. package/dist/components/option/option.types.d.ts +6 -4
  31. package/dist/components/password/password.types.d.ts +6 -4
  32. package/dist/components/popover/popover.types.d.ts +5 -5
  33. package/dist/components/radio/radio.types.d.ts +4 -2
  34. package/dist/components/select/select.types.d.ts +6 -6
  35. package/dist/components/sidenavigation/sidenavigation.types.d.ts +6 -2
  36. package/dist/components/stepperitem/stepperitem.types.d.ts +5 -4
  37. package/dist/components/tab/tab.types.d.ts +6 -2
  38. package/dist/components/tablist/tablist.types.d.ts +5 -2
  39. package/dist/components/textarea/textarea.types.d.ts +7 -6
  40. package/dist/components/toast/toast.types.d.ts +3 -2
  41. package/dist/components/toggle/toggle.types.d.ts +4 -3
  42. package/dist/components/toggletip/toggletip.types.d.ts +6 -4
  43. package/dist/components/typewriter/typewriter.types.d.ts +3 -5
  44. package/dist/components/virtualizedlist/virtualizedlist.types.d.ts +3 -1
  45. package/dist/custom-elements.json +1575 -1585
  46. package/dist/react/accordion/index.d.ts +3 -1
  47. package/dist/react/accordionbutton/index.d.ts +3 -1
  48. package/dist/react/alertchip/index.d.ts +4 -4
  49. package/dist/react/animation/index.d.ts +9 -3
  50. package/dist/react/avatarbutton/index.d.ts +4 -4
  51. package/dist/react/brandvisual/index.d.ts +6 -2
  52. package/dist/react/button/index.d.ts +4 -4
  53. package/dist/react/buttonlink/index.d.ts +4 -4
  54. package/dist/react/buttonsimple/index.d.ts +4 -4
  55. package/dist/react/cardbutton/index.d.ts +4 -4
  56. package/dist/react/cardcheckbox/index.d.ts +4 -6
  57. package/dist/react/cardcheckbox/index.js +0 -2
  58. package/dist/react/cardradio/index.d.ts +4 -6
  59. package/dist/react/cardradio/index.js +0 -2
  60. package/dist/react/checkbox/index.d.ts +2 -2
  61. package/dist/react/chip/index.d.ts +4 -4
  62. package/dist/react/dialog/index.d.ts +15 -5
  63. package/dist/react/filterchip/index.d.ts +4 -4
  64. package/dist/react/index.d.ts +4 -4
  65. package/dist/react/index.js +4 -4
  66. package/dist/react/input/index.d.ts +3 -3
  67. package/dist/react/inputchip/index.d.ts +1 -1
  68. package/dist/react/link/index.d.ts +4 -4
  69. package/dist/react/linkbutton/index.d.ts +4 -4
  70. package/dist/react/linksimple/index.d.ts +4 -4
  71. package/dist/react/listitem/index.d.ts +8 -8
  72. package/dist/react/menuitem/index.d.ts +12 -8
  73. package/dist/react/menuitem/index.js +4 -0
  74. package/dist/react/menuitemcheckbox/index.d.ts +9 -9
  75. package/dist/react/menuitemradio/index.d.ts +9 -9
  76. package/dist/react/navmenuitem/index.d.ts +12 -9
  77. package/dist/react/option/index.d.ts +8 -8
  78. package/dist/react/password/index.d.ts +3 -3
  79. package/dist/react/radio/index.d.ts +2 -2
  80. package/dist/react/searchfield/index.d.ts +3 -3
  81. package/dist/react/select/index.d.ts +3 -3
  82. package/dist/react/sidenavigation/index.d.ts +4 -1
  83. package/dist/react/stepperitem/index.d.ts +3 -3
  84. package/dist/react/tab/index.d.ts +8 -5
  85. package/dist/react/tablist/index.d.ts +3 -1
  86. package/dist/react/textarea/index.d.ts +5 -5
  87. package/dist/react/toast/index.d.ts +1 -1
  88. package/dist/react/toggle/index.d.ts +2 -2
  89. package/dist/react/virtualizedlist/index.d.ts +1 -1
  90. package/dist/utils/types.d.ts +9 -1
  91. package/package.json +1 -1
  92. package/dist/components/selectlistbox/selectlistbox.types.d.ts +0 -3
  93. package/dist/components/selectlistbox/selectlistbox.types.js +0 -1
@@ -1,8 +1,11 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type AccordionButton from './accordionbutton.component';
2
3
  import { ICON_NAME, VARIANT } from './accordionbutton.constants';
3
4
  type Variant = ValueOf<typeof VARIANT>;
4
5
  type IconName = ValueOf<typeof ICON_NAME>;
5
6
  interface Events {
6
- onShownEvent: Event;
7
+ onShownEvent: TypedCustomEvent<AccordionButton, {
8
+ expanded: boolean;
9
+ }>;
7
10
  }
8
11
  export type { Variant, IconName, Events };
@@ -1,12 +1,20 @@
1
1
  import type AnimationNames from '@momentum-design/animations/dist/types/types';
2
+ import type { TypedCustomEvent } from '../../utils/types';
3
+ import type Animation from './animation.component';
2
4
  /** Event mapping for React */
3
5
  interface Events {
4
6
  /** This event is dispatched when the animation is loaded */
5
- onLoadEvent: Event;
7
+ onLoadEvent: TypedCustomEvent<Animation, {
8
+ name: AnimationNames;
9
+ }>;
6
10
  /** This event is dispatched when all animation loops completed */
7
- onCompleteEvent: Event;
11
+ onCompleteEvent: TypedCustomEvent<Animation, {
12
+ name: AnimationNames;
13
+ }>;
8
14
  /** This event is dispatched when animation loading failed */
9
- onErrorEvent: Event;
15
+ onErrorEvent: TypedCustomEvent<Animation, {
16
+ error: Error;
17
+ }>;
10
18
  }
11
19
  type LoopType = `${boolean | number}`;
12
20
  export type { Events, AnimationNames, LoopType };
@@ -1,6 +1,12 @@
1
1
  import type BrandVisualNames from '@momentum-design/brand-visuals/dist/types/types';
2
+ import type { TypedCustomEvent } from '../../utils/types';
3
+ import type Brandvisual from './brandvisual.component';
2
4
  interface Events {
3
- onLoadEvent: Event;
4
- onErrorEvent: Event;
5
+ onLoadEvent: TypedCustomEvent<Brandvisual, {
6
+ name: BrandVisualNames;
7
+ }>;
8
+ onErrorEvent: TypedCustomEvent<Brandvisual, {
9
+ error: Error;
10
+ }>;
5
11
  }
6
12
  export type { BrandVisualNames, Events };
@@ -1,7 +1,9 @@
1
+ import type { OverrideEventTarget } from "../../utils/types";
2
+ import type ButtonLink from "./buttonlink.component";
1
3
  interface Events {
2
- onClickEvent: MouseEvent;
3
- onKeyDownEvent: KeyboardEvent;
4
- onFocusEvent: FocusEvent;
5
- onBlurEvent: Event;
4
+ onClickEvent: OverrideEventTarget<MouseEvent, ButtonLink>;
5
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, ButtonLink>;
6
+ onFocusEvent: OverrideEventTarget<FocusEvent, ButtonLink>;
7
+ onBlurEvent: OverrideEventTarget<FocusEvent, ButtonLink>;
6
8
  }
7
9
  export type { Events };
@@ -1,11 +1,12 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, ValueOf } from '../../utils/types';
2
+ import type ButtonSimple from './buttonsimple.component';
2
3
  import { BUTTON_TYPE, BUTTON_SIZES } from './buttonsimple.constants';
3
4
  type ButtonSize = ValueOf<typeof BUTTON_SIZES>;
4
5
  type ButtonType = ValueOf<typeof BUTTON_TYPE>;
5
6
  interface Events {
6
- onClickEvent: MouseEvent;
7
- onKeyDownEvent: KeyboardEvent;
8
- onKeyUpEvent: KeyboardEvent;
9
- onFocusEvent: FocusEvent;
7
+ onClickEvent: OverrideEventTarget<MouseEvent, ButtonSimple>;
8
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, ButtonSimple>;
9
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, ButtonSimple>;
10
+ onFocusEvent: OverrideEventTarget<FocusEvent, ButtonSimple>;
10
11
  }
11
12
  export type { ButtonSize, ButtonType, Events };
@@ -1,7 +1,9 @@
1
+ import type { OverrideEventTarget } from "../../utils/types";
2
+ import type CardButton from "./cardbutton.component";
1
3
  interface Events {
2
- onClickEvent: MouseEvent;
3
- onKeyDownEvent: KeyboardEvent;
4
- onKeyUpEvent: KeyboardEvent;
5
- onFocusEvent: FocusEvent;
4
+ onClickEvent: OverrideEventTarget<MouseEvent, CardButton>;
5
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, CardButton>;
6
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, CardButton>;
7
+ onFocusEvent: OverrideEventTarget<FocusEvent, CardButton>;
6
8
  }
7
9
  export type { Events };
@@ -46,7 +46,6 @@ declare const CardCheckbox_base: import("../../utils/mixins/index.types").Constr
46
46
  * It toggles the checked state when enter key is used.
47
47
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the card.
48
48
  * It toggles the checked state when space key is used.
49
- * @event change - (React: onChange) Event that gets dispatched when the card state changes.
50
49
  * @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
51
50
  *
52
51
  */
@@ -60,7 +60,6 @@ import styles from './cardcheckbox.styles';
60
60
  * It toggles the checked state when enter key is used.
61
61
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the card.
62
62
  * It toggles the checked state when space key is used.
63
- * @event change - (React: onChange) Event that gets dispatched when the card state changes.
64
63
  * @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
65
64
  *
66
65
  */
@@ -1,11 +1,11 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, ValueOf } from '../../utils/types';
2
+ import type CardCheckbox from './cardcheckbox.component';
2
3
  import { SELECTION_TYPE } from './cardcheckbox.constants';
3
4
  type SelectionType = ValueOf<typeof SELECTION_TYPE>;
4
5
  interface Events {
5
- onClickEvent: MouseEvent;
6
- onKeyDownEvent: KeyboardEvent;
7
- onKeyUpEvent: KeyboardEvent;
8
- onFocusEvent: FocusEvent;
9
- onChangeEvent: Event;
6
+ onClickEvent: OverrideEventTarget<MouseEvent, CardCheckbox>;
7
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, CardCheckbox>;
8
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, CardCheckbox>;
9
+ onFocusEvent: OverrideEventTarget<FocusEvent, CardCheckbox>;
10
10
  }
11
11
  export { SelectionType, Events };
@@ -45,7 +45,6 @@ declare const CardRadio_base: import("../../utils/mixins/index.types").Construct
45
45
  * It toggles the checked state when enter key is used.
46
46
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the card.
47
47
  * It toggles the checked state when space key is used.
48
- * @event change - (React: onChange) Event that gets dispatched when the card state changes.
49
48
  * @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
50
49
  *
51
50
  */
@@ -60,7 +60,6 @@ import styles from './cardradio.styles';
60
60
  * It toggles the checked state when enter key is used.
61
61
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the card.
62
62
  * It toggles the checked state when space key is used.
63
- * @event change - (React: onChange) Event that gets dispatched when the card state changes.
64
63
  * @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
65
64
  *
66
65
  */
@@ -1,8 +1,9 @@
1
+ import type { OverrideEventTarget } from '../../utils/types';
2
+ import type CardRadio from './cardradio.component';
1
3
  interface Events {
2
- onClickEvent: MouseEvent;
3
- onKeyDownEvent: KeyboardEvent;
4
- onKeyUpEvent: KeyboardEvent;
5
- onFocusEvent: FocusEvent;
6
- onChangeEvent: Event;
4
+ onClickEvent: OverrideEventTarget<MouseEvent, CardRadio>;
5
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, CardRadio>;
6
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, CardRadio>;
7
+ onFocusEvent: OverrideEventTarget<FocusEvent, CardRadio>;
7
8
  }
8
9
  export type { Events };
@@ -1,5 +1,7 @@
1
+ import type { OverrideEventTarget, TypedCustomEvent } from "../../utils/types";
2
+ import type Checkbox from "./checkbox.component";
1
3
  interface Events {
2
- onChangeEvent: Event;
3
- onFocusEvent: FocusEvent;
4
+ onChangeEvent: TypedCustomEvent<Checkbox>;
5
+ onFocusEvent: OverrideEventTarget<FocusEvent, Checkbox>;
4
6
  }
5
7
  export type { Events };
@@ -1,13 +1,24 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type Dialog from './dialog.component';
2
3
  import { DIALOG_ROLE, DIALOG_SIZE, DIALOG_VARIANT } from './dialog.constants';
3
4
  type DialogRole = (typeof DIALOG_ROLE)[number];
4
5
  type DialogSize = ValueOf<typeof DIALOG_SIZE>;
5
6
  type DialogVariant = ValueOf<typeof DIALOG_VARIANT>;
6
7
  interface Events {
7
- onShownEvent: Event;
8
- onHiddenEvent: Event;
9
- onCreatedEvent: Event;
10
- onDestroyedEvent: Event;
11
- onCloseEvent: Event;
8
+ onShownEvent: TypedCustomEvent<Dialog, {
9
+ show: boolean;
10
+ }>;
11
+ onHiddenEvent: TypedCustomEvent<Dialog, {
12
+ show: boolean;
13
+ }>;
14
+ onCreatedEvent: TypedCustomEvent<Dialog, {
15
+ show: boolean;
16
+ }>;
17
+ onDestroyedEvent: TypedCustomEvent<Dialog, {
18
+ show: boolean;
19
+ }>;
20
+ onCloseEvent: TypedCustomEvent<Dialog, {
21
+ show: boolean;
22
+ }>;
12
23
  }
13
24
  export type { DialogSize, DialogRole, DialogVariant, Events };
@@ -1,16 +1,16 @@
1
- import type { TypedEvent, ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, TypedCustomEvent, ValueOf } from '../../utils/types';
2
2
  import type Input from './input.component';
3
3
  import { AUTO_CAPITALIZE, AUTO_COMPLETE, INPUT_TYPE } from './input.constants';
4
4
  type AutoCapitalizeType = ValueOf<typeof AUTO_CAPITALIZE>;
5
5
  type AutoCompleteType = ValueOf<typeof AUTO_COMPLETE>;
6
6
  type InputType = ValueOf<typeof INPUT_TYPE>;
7
- type InputClearEvent = TypedEvent<Input>;
8
- type InputChangeEvent = TypedEvent<Input>;
7
+ type InputClearEvent = TypedCustomEvent<Input>;
8
+ type InputChangeEvent = TypedCustomEvent<Input>;
9
9
  interface Events {
10
- onInputEvent: InputEvent;
10
+ onInputEvent: OverrideEventTarget<InputEvent, Input>;
11
11
  onChangeEvent: InputChangeEvent;
12
- onFocusEvent: FocusEvent;
13
- onBlurEvent: FocusEvent;
12
+ onFocusEvent: OverrideEventTarget<FocusEvent, Input>;
13
+ onBlurEvent: OverrideEventTarget<FocusEvent, Input>;
14
14
  onClearEvent: InputClearEvent;
15
15
  }
16
16
  export type { AutoCapitalizeType, AutoCompleteType, InputType, InputClearEvent, InputChangeEvent, Events };
@@ -1,4 +1,6 @@
1
+ import type { TypedCustomEvent } from "../../utils/types";
2
+ import type InputChip from "./inputchip.component";
1
3
  interface Events {
2
- onRemoveEvent: Event;
4
+ onRemoveEvent: TypedCustomEvent<InputChip>;
3
5
  }
4
6
  export type { Events };
@@ -1,10 +1,11 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, ValueOf } from '../../utils/types';
2
+ import type Link from './link.component';
2
3
  import { LINK_SIZES } from './link.constants';
3
4
  type LinkSize = ValueOf<typeof LINK_SIZES>;
4
5
  interface Events {
5
- onClickEvent: MouseEvent;
6
- onBlurEvent: Event;
7
- onKeyDownEvent: KeyboardEvent;
8
- onFocusEvent: FocusEvent;
6
+ onClickEvent: OverrideEventTarget<MouseEvent, Link>;
7
+ onBlurEvent: OverrideEventTarget<FocusEvent, Link>;
8
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, Link>;
9
+ onFocusEvent: OverrideEventTarget<FocusEvent, Link>;
9
10
  }
10
11
  export type { LinkSize, Events };
@@ -1,10 +1,11 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, ValueOf } from '../../utils/types';
2
+ import type LinkButton from './linkbutton.component';
2
3
  import { LINKBUTTON_SIZES } from './linkbutton.constants';
3
4
  type LinkButtonSize = ValueOf<typeof LINKBUTTON_SIZES>;
4
5
  interface Events {
5
- onClickEvent: MouseEvent;
6
- onKeyDownEvent: KeyboardEvent;
7
- onFocusEvent: FocusEvent;
8
- onBlurEvent: Event;
6
+ onClickEvent: OverrideEventTarget<MouseEvent, LinkButton>;
7
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, LinkButton>;
8
+ onFocusEvent: OverrideEventTarget<FocusEvent, LinkButton>;
9
+ onBlurEvent: OverrideEventTarget<FocusEvent, LinkButton>;
9
10
  }
10
11
  export type { Events, LinkButtonSize };
@@ -1,7 +1,9 @@
1
+ import type { OverrideEventTarget } from "../../utils/types";
2
+ import type LinkSimple from "./linksimple.component";
1
3
  interface Events {
2
- onClickEvent: MouseEvent;
3
- onBlurEvent: Event;
4
- onKeyDownEvent: KeyboardEvent;
5
- onFocusEvent: FocusEvent;
4
+ onClickEvent: OverrideEventTarget<MouseEvent, LinkSimple>;
5
+ onBlurEvent: OverrideEventTarget<FocusEvent, LinkSimple>;
6
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, LinkSimple>;
7
+ onFocusEvent: OverrideEventTarget<FocusEvent, LinkSimple>;
6
8
  }
7
9
  export type { Events };
@@ -1,21 +1,22 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type ListItem from './listitem.component';
2
3
  import { LISTITEM_VARIANTS } from './listitem.constants';
3
4
  export type ListItemVariants = ValueOf<typeof LISTITEM_VARIANTS>;
4
5
  export interface Events {
5
- onClickEvent: MouseEvent;
6
- onKeyDownEvent: KeyboardEvent;
7
- onKeyUpEvent: KeyboardEvent;
8
- onFocusEvent: FocusEvent;
9
- onEnabledEvent: Event;
10
- onDisabledEvent: Event;
11
- onCreatedEvent: Event;
12
- onDestroyedEvent: Event;
6
+ onClickEvent: OverrideEventTarget<MouseEvent, ListItem>;
7
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, ListItem>;
8
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, ListItem>;
9
+ onFocusEvent: OverrideEventTarget<FocusEvent, ListItem>;
10
+ onEnabledEvent: TypedCustomEvent<ListItem>;
11
+ onDisabledEvent: TypedCustomEvent<ListItem>;
12
+ onCreatedEvent: TypedCustomEvent<ListItem>;
13
+ onDestroyedEvent: TypedCustomEvent<ListItem>;
13
14
  }
14
15
  declare global {
15
16
  interface GlobalEventHandlersEventMap {
16
- disabled: Event;
17
- enabled: Event;
18
- created: Event;
19
- destroyed: Event;
17
+ disabled: TypedCustomEvent<ListItem>;
18
+ enabled: TypedCustomEvent<ListItem>;
19
+ created: TypedCustomEvent<ListItem>;
20
+ destroyed: TypedCustomEvent<ListItem>;
20
21
  }
21
22
  }
@@ -31,6 +31,10 @@ import type { ArrowPositions, ArrowDirections } from './menuitem.types';
31
31
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the menuitem.
32
32
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the menuitem.
33
33
  * @event focus - (React: onFocus) This event is dispatched when the menuitem receives focus.
34
+ * @event enabled - (React: onEnabled) This event is dispatched after the menuitem is enabled
35
+ * @event disabled - (React: onDisabled) This event is dispatched after the menuitem is disabled
36
+ * @event created - (React: onCreated) This event is dispatched after the menuitem is created (added to the DOM)
37
+ * @event destroyed - (React: onDestroyed) This event is dispatched after the menuitem is destroyed (removed from the DOM)
34
38
  */
35
39
  declare class MenuItem extends ListItem {
36
40
  /**
@@ -45,6 +45,10 @@ import styles from './menuitem.styles';
45
45
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the menuitem.
46
46
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the menuitem.
47
47
  * @event focus - (React: onFocus) This event is dispatched when the menuitem receives focus.
48
+ * @event enabled - (React: onEnabled) This event is dispatched after the menuitem is enabled
49
+ * @event disabled - (React: onDisabled) This event is dispatched after the menuitem is disabled
50
+ * @event created - (React: onCreated) This event is dispatched after the menuitem is created (added to the DOM)
51
+ * @event destroyed - (React: onDestroyed) This event is dispatched after the menuitem is destroyed (removed from the DOM)
48
52
  */
49
53
  class MenuItem extends ListItem {
50
54
  constructor() {
@@ -1,9 +1,15 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type MenuItem from './menuitem.component';
2
3
  import { ARROW_POSITIONS, ARROW_DIRECTIONS } from './menuitem.constants';
3
4
  interface Events {
4
- onChangeEvent: Event;
5
- onClickEvent: MouseEvent;
6
- onFocusEvent: FocusEvent;
5
+ onClickEvent: OverrideEventTarget<MouseEvent, MenuItem>;
6
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, MenuItem>;
7
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, MenuItem>;
8
+ onFocusEvent: OverrideEventTarget<FocusEvent, MenuItem>;
9
+ onEnabledEvent: TypedCustomEvent<MenuItem>;
10
+ onDisabledEvent: TypedCustomEvent<MenuItem>;
11
+ onCreatedEvent: TypedCustomEvent<MenuItem>;
12
+ onDestroyedEvent: TypedCustomEvent<MenuItem>;
7
13
  }
8
14
  type ArrowPositions = ValueOf<typeof ARROW_POSITIONS>;
9
15
  type ArrowDirections = ValueOf<typeof ARROW_DIRECTIONS>;
@@ -1,9 +1,10 @@
1
- import { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type MenuItemCheckbox from './menuitemcheckbox.component';
2
3
  import { INDICATOR } from './menuitemcheckbox.constants';
3
4
  type Indicator = ValueOf<typeof INDICATOR>;
4
5
  interface Events {
5
- onChangeEvent: Event;
6
- onClickEvent: MouseEvent;
7
- onFocusEvent: FocusEvent;
6
+ onChangeEvent: TypedCustomEvent<MenuItemCheckbox>;
7
+ onClickEvent: OverrideEventTarget<MouseEvent, MenuItemCheckbox>;
8
+ onFocusEvent: OverrideEventTarget<FocusEvent, MenuItemCheckbox>;
8
9
  }
9
10
  export type { Events, Indicator };
@@ -1,9 +1,10 @@
1
- import { ValueOf } from '../../utils/types';
1
+ import type { TypedCustomEvent, OverrideEventTarget, ValueOf } from '../../utils/types';
2
+ import type MenuItemRadio from './menuitemradio.component';
2
3
  import { INDICATOR } from './menuitemradio.constants';
3
4
  type Indicator = ValueOf<typeof INDICATOR>;
4
5
  interface Events {
5
- onChangeEvent: Event;
6
- onClickEvent: MouseEvent;
7
- onFocusEvent: FocusEvent;
6
+ onChangeEvent: TypedCustomEvent<MenuItemRadio>;
7
+ onClickEvent: OverrideEventTarget<MouseEvent, MenuItemRadio>;
8
+ onFocusEvent: OverrideEventTarget<FocusEvent, MenuItemRadio>;
8
9
  }
9
10
  export type { Events, Indicator };
@@ -1,10 +1,7 @@
1
- import type MenuItem from '../menuitem';
2
- export type MenuPopoverChangeEvent = Event & {
3
- target: MenuItem;
4
- };
5
- export type MenuPopoverActionEvent = Event & {
6
- target: MenuItem;
7
- };
1
+ import type { TypedCustomEvent } from '../../utils/types';
2
+ import type MenuItem from '../menuitem/menuitem.component';
3
+ export type MenuPopoverChangeEvent = TypedCustomEvent<MenuItem>;
4
+ export type MenuPopoverActionEvent = TypedCustomEvent<MenuItem>;
8
5
  export interface Events {
9
6
  onChangeEvent: MenuPopoverChangeEvent;
10
7
  onActionEvent: MenuPopoverActionEvent;
@@ -1,7 +1,6 @@
1
- import type MenuItem from '../menuitem';
2
- export type MenuSectionChangeEvent = Event & {
3
- target: MenuItem;
4
- };
1
+ import type { TypedCustomEvent } from '../../utils/types';
2
+ import type MenuItem from '../menuitem/menuitem.component';
3
+ export type MenuSectionChangeEvent = TypedCustomEvent<MenuItem>;
5
4
  export interface Events {
6
5
  onChangeEvent: MenuSectionChangeEvent;
7
6
  }
@@ -1,11 +1,15 @@
1
- import { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type NavMenuItem from './navmenuitem.component';
2
3
  import { ALLOWED_BADGE_TYPES } from './navmenuitem.constants';
3
4
  type BadgeType = ValueOf<typeof ALLOWED_BADGE_TYPES>;
4
5
  interface Events {
5
- onClickEvent: MouseEvent;
6
- onKeyDownEvent: KeyboardEvent;
7
- onKeyUpEvent: KeyboardEvent;
8
- onFocusEvent: FocusEvent;
9
- onActiveChangeEvent: Event;
6
+ onClickEvent: OverrideEventTarget<MouseEvent, NavMenuItem>;
7
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, NavMenuItem>;
8
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, NavMenuItem>;
9
+ onFocusEvent: OverrideEventTarget<FocusEvent, NavMenuItem>;
10
+ onActiveChangeEvent: TypedCustomEvent<NavMenuItem, {
11
+ navId: string;
12
+ active: boolean;
13
+ }>;
10
14
  }
11
15
  export type { Events, BadgeType };
@@ -1,7 +1,9 @@
1
+ import type { OverrideEventTarget } from "../../utils/types";
2
+ import type Option from "./option.component";
1
3
  interface Events {
2
- onClickEvent: MouseEvent;
3
- onKeyDownEvent: KeyboardEvent;
4
- onKeyUpEvent: KeyboardEvent;
5
- onFocusEvent: FocusEvent;
4
+ onClickEvent: OverrideEventTarget<MouseEvent, Option>;
5
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, Option>;
6
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, Option>;
7
+ onFocusEvent: OverrideEventTarget<FocusEvent, Option>;
6
8
  }
7
9
  export type { Events };
@@ -1,7 +1,9 @@
1
+ import type { OverrideEventTarget, TypedCustomEvent } from "../../utils/types";
2
+ import type Password from "./password.component";
1
3
  interface Events {
2
- onInputEvent: InputEvent;
3
- onChangeEvent: Event;
4
- onFocusEvent: FocusEvent;
5
- onBlurEvent: FocusEvent;
4
+ onInputEvent: OverrideEventTarget<InputEvent, Password>;
5
+ onChangeEvent: TypedCustomEvent<Password>;
6
+ onFocusEvent: OverrideEventTarget<FocusEvent, Password>;
7
+ onBlurEvent: OverrideEventTarget<FocusEvent, Password>;
6
8
  }
7
9
  export type { Events };
@@ -1,19 +1,19 @@
1
- import type { ValueOf, TypedEvent } from '../../utils/types';
1
+ import type { ValueOf, TypedCustomEvent } from '../../utils/types';
2
2
  import type Popover from './popover.component';
3
3
  import { POPOVER_PLACEMENT, TRIGGER, COLOR } from './popover.constants';
4
4
  type PopoverPlacement = ValueOf<typeof POPOVER_PLACEMENT>;
5
5
  type PopoverColor = ValueOf<typeof COLOR>;
6
6
  type PopoverTrigger = ValueOf<typeof TRIGGER> | `${ValueOf<typeof TRIGGER>} ${ValueOf<typeof TRIGGER>}`;
7
- type PopoverShownEvent = TypedEvent<Popover, {
7
+ type PopoverShownEvent = TypedCustomEvent<Popover, {
8
8
  show: boolean;
9
9
  }>;
10
- type PopoverHiddenEvent = TypedEvent<Popover, {
10
+ type PopoverHiddenEvent = TypedCustomEvent<Popover, {
11
11
  show: boolean;
12
12
  }>;
13
- type PopoverCreatedEvent = TypedEvent<Popover, {
13
+ type PopoverCreatedEvent = TypedCustomEvent<Popover, {
14
14
  show: boolean;
15
15
  }>;
16
- type PopoverDestroyedEvent = TypedEvent<Popover, {
16
+ type PopoverDestroyedEvent = TypedCustomEvent<Popover, {
17
17
  show: boolean;
18
18
  }>;
19
19
  interface Events {
@@ -1,5 +1,7 @@
1
+ import type { OverrideEventTarget, TypedCustomEvent } from "../../utils/types";
2
+ import type Radio from "./radio.component";
1
3
  interface Events {
2
- onChangeEvent: Event;
3
- onFocusEvent: FocusEvent;
4
+ onChangeEvent: TypedCustomEvent<Radio>;
5
+ onFocusEvent: OverrideEventTarget<FocusEvent, Radio>;
4
6
  }
5
7
  export type { Events };
@@ -1,21 +1,21 @@
1
- import type { ValueOf, TypedEvent } from '../../utils/types';
1
+ import type { ValueOf, TypedCustomEvent, OverrideEventTarget } from '../../utils/types';
2
2
  import type { PopoverPlacement, PopoverShownEvent, PopoverHiddenEvent } from '../popover/popover.types';
3
3
  import type Select from './select.component';
4
4
  import { ARROW_ICON } from './select.constants';
5
- type SelectChangeEvent = TypedEvent<Select, {
5
+ type SelectChangeEvent = TypedCustomEvent<Select, {
6
6
  value: string;
7
7
  label?: string;
8
8
  }>;
9
- type SelectInputEvent = TypedEvent<Select, {
9
+ type SelectInputEvent = TypedCustomEvent<Select, {
10
10
  value: string;
11
11
  label?: string;
12
12
  }>;
13
13
  interface Events {
14
- onClickEvent: MouseEvent;
14
+ onClickEvent: OverrideEventTarget<MouseEvent, Select>;
15
15
  onChangeEvent: SelectChangeEvent;
16
16
  onInputEvent: SelectInputEvent;
17
- onKeyDownEvent: KeyboardEvent;
18
- onFocusEvent: FocusEvent;
17
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, Select>;
18
+ onFocusEvent: OverrideEventTarget<FocusEvent, Select>;
19
19
  onShownEvent: PopoverShownEvent;
20
20
  onHiddenEvent: PopoverHiddenEvent;
21
21
  }
@@ -1,7 +1,11 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type SideNavigation from './sidenavigation.component';
2
3
  import { VARIANTS } from './sidenavigation.constants';
3
4
  type SideNavigationVariant = ValueOf<typeof VARIANTS>;
4
5
  interface Events {
5
- onActiveChangeEvent: Event;
6
+ onActiveChangeEvent: TypedCustomEvent<SideNavigation, {
7
+ navId: string;
8
+ active: boolean;
9
+ }>;
6
10
  }
7
11
  export type { SideNavigationVariant, Events };
@@ -1,11 +1,12 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { OverrideEventTarget, ValueOf } from '../../utils/types';
2
2
  import { VARIANT, STATUS } from './stepperitem.constants';
3
+ import type StepperItem from './stepperitem.component';
3
4
  type VariantType = ValueOf<typeof VARIANT>;
4
5
  type StatusType = ValueOf<typeof STATUS>;
5
6
  type StatusIconType = ValueOf<typeof STATUS>;
6
7
  interface Events {
7
- onClickEvent: MouseEvent;
8
- onKeyDownEvent: KeyboardEvent;
9
- onKeyUpEvent: KeyboardEvent;
8
+ onClickEvent: OverrideEventTarget<MouseEvent, StepperItem>;
9
+ onKeyDownEvent: OverrideEventTarget<KeyboardEvent, StepperItem>;
10
+ onKeyUpEvent: OverrideEventTarget<KeyboardEvent, StepperItem>;
10
11
  }
11
12
  export type { VariantType, StatusType, StatusIconType, Events };
@@ -1,7 +1,11 @@
1
- import { ValueOf } from '../../utils/types';
1
+ import { TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type Tab from './tab.component';
2
3
  import { TAB_VARIANTS } from './tab.constants';
3
4
  type Variant = ValueOf<typeof TAB_VARIANTS>;
4
5
  interface Events {
5
- onActiveChangeEvent: Event;
6
+ onActiveChangeEvent: TypedCustomEvent<Tab, {
7
+ tabId: string;
8
+ active: boolean;
9
+ }>;
6
10
  }
7
11
  export type { Variant, Events };
@@ -1,7 +1,10 @@
1
- import type { ValueOf } from '../../utils/types';
1
+ import type { TypedCustomEvent, ValueOf } from '../../utils/types';
2
+ import type TabList from './tablist.component';
2
3
  import { ARROW_BUTTON_DIRECTION } from './tablist.constants';
3
4
  interface Events {
4
- onChangeEvent: CustomEvent;
5
+ onChangeEvent: TypedCustomEvent<TabList, {
6
+ tabId: string;
7
+ }>;
5
8
  }
6
9
  type ArrowButtonDirectionType = ValueOf<typeof ARROW_BUTTON_DIRECTION>;
7
10
  export { ArrowButtonDirectionType, Events };