@momentum-design/components 0.104.1 → 0.104.3
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 +35 -30
- package/dist/browser/index.js.map +2 -2
- package/dist/components/accordionbutton/accordionbutton.types.d.ts +5 -2
- package/dist/components/animation/animation.types.d.ts +11 -3
- package/dist/components/brandvisual/brandvisual.types.d.ts +8 -2
- package/dist/components/buttonlink/buttonlink.types.d.ts +6 -4
- package/dist/components/buttonsimple/buttonsimple.types.d.ts +6 -5
- package/dist/components/cardbutton/cardbutton.types.d.ts +6 -4
- package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +0 -1
- package/dist/components/cardcheckbox/cardcheckbox.component.js +0 -1
- package/dist/components/cardcheckbox/cardcheckbox.types.d.ts +6 -6
- package/dist/components/cardradio/cardradio.component.d.ts +0 -1
- package/dist/components/cardradio/cardradio.component.js +0 -1
- package/dist/components/cardradio/cardradio.types.d.ts +6 -5
- package/dist/components/checkbox/checkbox.types.d.ts +4 -2
- package/dist/components/dialog/dialog.types.d.ts +17 -6
- package/dist/components/input/input.types.d.ts +6 -6
- package/dist/components/inputchip/inputchip.types.d.ts +3 -1
- package/dist/components/link/link.types.d.ts +6 -5
- package/dist/components/linkbutton/linkbutton.types.d.ts +6 -5
- package/dist/components/linksimple/linksimple.types.d.ts +6 -4
- package/dist/components/listitem/listitem.types.d.ts +14 -13
- package/dist/components/menuitem/menuitem.component.d.ts +4 -0
- package/dist/components/menuitem/menuitem.component.js +4 -0
- package/dist/components/menuitem/menuitem.types.d.ts +10 -4
- package/dist/components/menuitemcheckbox/menuitemcheckbox.types.d.ts +5 -4
- package/dist/components/menuitemradio/menuitemradio.types.d.ts +5 -4
- package/dist/components/menupopover/menupopover.types.d.ts +4 -7
- package/dist/components/menusection/menusection.types.d.ts +3 -4
- package/dist/components/navmenuitem/navmenuitem.types.d.ts +10 -6
- package/dist/components/option/option.types.d.ts +6 -4
- package/dist/components/password/password.types.d.ts +6 -4
- package/dist/components/popover/popover.types.d.ts +5 -5
- package/dist/components/radio/radio.types.d.ts +4 -2
- package/dist/components/select/select.component.d.ts +2 -6
- package/dist/components/select/select.component.js +2 -11
- package/dist/components/select/select.styles.js +8 -2
- package/dist/components/select/select.types.d.ts +6 -6
- package/dist/components/sidenavigation/sidenavigation.types.d.ts +6 -2
- package/dist/components/stepperitem/stepperitem.types.d.ts +5 -4
- package/dist/components/tab/tab.types.d.ts +6 -2
- package/dist/components/tablist/tablist.types.d.ts +5 -2
- package/dist/components/textarea/textarea.types.d.ts +7 -6
- package/dist/components/toast/toast.types.d.ts +3 -2
- package/dist/components/toggle/toggle.types.d.ts +4 -3
- package/dist/components/toggletip/toggletip.types.d.ts +6 -4
- package/dist/components/typewriter/typewriter.types.d.ts +3 -5
- package/dist/components/virtualizedlist/virtualizedlist.types.d.ts +3 -1
- package/dist/custom-elements.json +3705 -3726
- package/dist/react/accordion/index.d.ts +3 -1
- package/dist/react/accordionbutton/index.d.ts +3 -1
- package/dist/react/alertchip/index.d.ts +4 -4
- package/dist/react/animation/index.d.ts +9 -3
- package/dist/react/avatarbutton/index.d.ts +4 -4
- package/dist/react/brandvisual/index.d.ts +6 -2
- package/dist/react/button/index.d.ts +4 -4
- package/dist/react/buttonlink/index.d.ts +4 -4
- package/dist/react/buttonsimple/index.d.ts +4 -4
- package/dist/react/cardbutton/index.d.ts +4 -4
- package/dist/react/cardcheckbox/index.d.ts +4 -6
- package/dist/react/cardcheckbox/index.js +0 -2
- package/dist/react/cardradio/index.d.ts +4 -6
- package/dist/react/cardradio/index.js +0 -2
- package/dist/react/checkbox/index.d.ts +2 -2
- package/dist/react/chip/index.d.ts +4 -4
- package/dist/react/dialog/index.d.ts +15 -5
- package/dist/react/filterchip/index.d.ts +4 -4
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +6 -6
- package/dist/react/input/index.d.ts +3 -3
- package/dist/react/inputchip/index.d.ts +1 -1
- package/dist/react/link/index.d.ts +4 -4
- package/dist/react/linkbutton/index.d.ts +4 -4
- package/dist/react/linksimple/index.d.ts +4 -4
- package/dist/react/listitem/index.d.ts +8 -8
- package/dist/react/menuitem/index.d.ts +12 -8
- package/dist/react/menuitem/index.js +4 -0
- package/dist/react/menuitemcheckbox/index.d.ts +9 -9
- package/dist/react/menuitemradio/index.d.ts +9 -9
- package/dist/react/navmenuitem/index.d.ts +12 -9
- package/dist/react/option/index.d.ts +8 -8
- package/dist/react/password/index.d.ts +3 -3
- package/dist/react/radio/index.d.ts +2 -2
- package/dist/react/searchfield/index.d.ts +3 -3
- package/dist/react/select/index.d.ts +5 -3
- package/dist/react/select/index.js +2 -0
- package/dist/react/sidenavigation/index.d.ts +4 -1
- package/dist/react/stepperitem/index.d.ts +3 -3
- package/dist/react/tab/index.d.ts +8 -5
- package/dist/react/tablist/index.d.ts +3 -1
- package/dist/react/textarea/index.d.ts +5 -5
- package/dist/react/toast/index.d.ts +1 -1
- package/dist/react/toggle/index.d.ts +2 -2
- package/dist/react/virtualizedlist/index.d.ts +1 -1
- package/dist/utils/types.d.ts +9 -1
- package/package.json +1 -1
- package/dist/components/selectlistbox/selectlistbox.types.d.ts +0 -3
- 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:
|
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:
|
7
|
+
onLoadEvent: TypedCustomEvent<Animation, {
|
8
|
+
name: AnimationNames;
|
9
|
+
}>;
|
6
10
|
/** This event is dispatched when all animation loops completed */
|
7
|
-
onCompleteEvent:
|
11
|
+
onCompleteEvent: TypedCustomEvent<Animation, {
|
12
|
+
name: AnimationNames;
|
13
|
+
}>;
|
8
14
|
/** This event is dispatched when animation loading failed */
|
9
|
-
onErrorEvent:
|
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:
|
4
|
-
|
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:
|
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:
|
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:
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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 {
|
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 =
|
8
|
-
type InputChangeEvent =
|
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,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:
|
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:
|
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:
|
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:
|
10
|
-
onDisabledEvent:
|
11
|
-
onCreatedEvent:
|
12
|
-
onDestroyedEvent:
|
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:
|
17
|
-
enabled:
|
18
|
-
created:
|
19
|
-
destroyed:
|
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
|
-
|
5
|
-
|
6
|
-
|
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:
|
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:
|
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
|
2
|
-
|
3
|
-
|
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
|
2
|
-
|
3
|
-
|
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:
|
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:
|
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,
|
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 =
|
7
|
+
type PopoverShownEvent = TypedCustomEvent<Popover, {
|
8
8
|
show: boolean;
|
9
9
|
}>;
|
10
|
-
type PopoverHiddenEvent =
|
10
|
+
type PopoverHiddenEvent = TypedCustomEvent<Popover, {
|
11
11
|
show: boolean;
|
12
12
|
}>;
|
13
|
-
type PopoverCreatedEvent =
|
13
|
+
type PopoverCreatedEvent = TypedCustomEvent<Popover, {
|
14
14
|
show: boolean;
|
15
15
|
}>;
|
16
|
-
type PopoverDestroyedEvent =
|
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:
|
3
|
-
onFocusEvent: FocusEvent
|
4
|
+
onChangeEvent: TypedCustomEvent<Radio>;
|
5
|
+
onFocusEvent: OverrideEventTarget<FocusEvent, Radio>;
|
4
6
|
}
|
5
7
|
export type { Events };
|
@@ -46,6 +46,8 @@ declare const Select_base: import("../../utils/mixins/index.types").Constructor<
|
|
46
46
|
* @cssproperty --mdc-select-border-color-warning - The border color of the select when in warning state.
|
47
47
|
* @cssproperty --mdc-select-border-color-error - The border color of the select when in error state.
|
48
48
|
* @cssproperty --mdc-select-width - The width of the select.
|
49
|
+
* @cssproperty --mdc-select-listbox-height - The height of the listbox inside the select.
|
50
|
+
* @cssproperty --mdc-select-listbox-width - The width of the listbox inside the select (default: `--mdc-select-width`).
|
49
51
|
*/
|
50
52
|
declare class Select extends Select_base implements AssociatedFormControl {
|
51
53
|
/**
|
@@ -57,12 +59,6 @@ declare class Select extends Select_base implements AssociatedFormControl {
|
|
57
59
|
* @default false
|
58
60
|
*/
|
59
61
|
readonly: boolean;
|
60
|
-
/**
|
61
|
-
* height attribute of the select field. If set,
|
62
|
-
* then a scroll bar will be visible when there more options than the adjusted height.
|
63
|
-
* @default auto
|
64
|
-
*/
|
65
|
-
height: string;
|
66
62
|
/**
|
67
63
|
* The placeholder text which will be shown on the text if provided.
|
68
64
|
*/
|
@@ -62,6 +62,8 @@ import styles from './select.styles';
|
|
62
62
|
* @cssproperty --mdc-select-border-color-warning - The border color of the select when in warning state.
|
63
63
|
* @cssproperty --mdc-select-border-color-error - The border color of the select when in error state.
|
64
64
|
* @cssproperty --mdc-select-width - The width of the select.
|
65
|
+
* @cssproperty --mdc-select-listbox-height - The height of the listbox inside the select.
|
66
|
+
* @cssproperty --mdc-select-listbox-width - The width of the listbox inside the select (default: `--mdc-select-width`).
|
65
67
|
*/
|
66
68
|
class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
67
69
|
constructor() {
|
@@ -71,12 +73,6 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
|
71
73
|
* @default false
|
72
74
|
*/
|
73
75
|
this.readonly = false;
|
74
|
-
/**
|
75
|
-
* height attribute of the select field. If set,
|
76
|
-
* then a scroll bar will be visible when there more options than the adjusted height.
|
77
|
-
* @default auto
|
78
|
-
*/
|
79
|
-
this.height = 'auto';
|
80
76
|
/**
|
81
77
|
* The placeholder text which will be shown on the text if provided.
|
82
78
|
*/
|
@@ -563,7 +559,6 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
|
563
559
|
@closebyoutsideclick="${() => {
|
564
560
|
this.displayPopover = false;
|
565
561
|
}}"
|
566
|
-
style="--mdc-popover-max-width: var(--mdc-select-width); --mdc-popover-max-height: ${this.height};"
|
567
562
|
>
|
568
563
|
<slot @click="${this.handleOptionsClick}"></slot>
|
569
564
|
</mdc-popover>
|
@@ -581,10 +576,6 @@ __decorate([
|
|
581
576
|
property({ type: Boolean }),
|
582
577
|
__metadata("design:type", Object)
|
583
578
|
], Select.prototype, "readonly", void 0);
|
584
|
-
__decorate([
|
585
|
-
property({ type: String }),
|
586
|
-
__metadata("design:type", Object)
|
587
|
-
], Select.prototype, "height", void 0);
|
588
579
|
__decorate([
|
589
580
|
property({ type: String, reflect: true }),
|
590
581
|
__metadata("design:type", String)
|
@@ -15,6 +15,8 @@ const styles = css `
|
|
15
15
|
--mdc-select-border-color-warning: var(--mds-color-theme-text-warning-normal);
|
16
16
|
--mdc-select-border-color-error: var(--mds-color-theme-text-error-normal);
|
17
17
|
--mdc-select-width: 100%;
|
18
|
+
--mdc-select-listbox-width: var(--mdc-select-width);
|
19
|
+
--mdc-select-listbox-height: auto;
|
18
20
|
|
19
21
|
display: flex;
|
20
22
|
flex-direction: column;
|
@@ -79,9 +81,13 @@ const styles = css `
|
|
79
81
|
display: flex;
|
80
82
|
padding: 2px;
|
81
83
|
}
|
84
|
+
|
85
|
+
/* Popover height, width & padding overrides */
|
86
|
+
:host mdc-popover {
|
87
|
+
--mdc-popover-max-width: var(--mdc-select-listbox-width);
|
88
|
+
--mdc-popover-max-height: var(--mdc-select-listbox-height);
|
89
|
+
}
|
82
90
|
:host mdc-popover::part(popover-content) {
|
83
|
-
min-width: auto;
|
84
|
-
width: var(--mdc-select-width);
|
85
91
|
max-height: var(--mdc-popover-max-height);
|
86
92
|
padding: 0.75rem 0.5rem;
|
87
93
|
}
|