@momentum-design/components 0.95.1 → 0.95.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 +46 -42
- package/dist/browser/index.js.map +4 -4
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +2 -2
- package/dist/components/card/card.styles.js +4 -0
- package/dist/components/dialog/dialog.component.d.ts +1 -1
- package/dist/components/dialog/dialog.component.js +2 -2
- package/dist/components/select/select.types.d.ts +9 -7
- package/dist/custom-elements.json +310 -310
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/select/index.d.ts +2 -6
- package/dist/utils/mixins/CardComponentMixin.js +2 -2
- package/dist/utils/mixins/{CardAndDialogFooterMixin.d.ts → FooterMixin.d.ts} +2 -2
- package/dist/utils/mixins/{CardAndDialogFooterMixin.js → FooterMixin.js} +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CSSResult, nothing, PropertyValues } from 'lit';
|
2
2
|
import { Component } from '../../models';
|
3
|
-
declare const Card_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/CardComponentMixin").CardComponentMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/
|
3
|
+
declare const Card_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/CardComponentMixin").CardComponentMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FooterMixin").FooterMixinInterface> & typeof Component;
|
4
4
|
/**
|
5
5
|
* The card component allows users to organize information in a structured and tangible
|
6
6
|
* format that is visually appealing. `mdc-card` is a static component that supports
|
@@ -12,7 +12,7 @@ import { queryAssignedElements } from 'lit/decorators.js';
|
|
12
12
|
import { Component } from '../../models';
|
13
13
|
import { BUTTON_VARIANTS } from '../button/button.constants';
|
14
14
|
import { CardComponentMixin } from '../../utils/mixins/CardComponentMixin';
|
15
|
-
import {
|
15
|
+
import { FooterMixin } from '../../utils/mixins/FooterMixin';
|
16
16
|
import { DEFAULTS } from './card.constants';
|
17
17
|
import styles from './card.styles';
|
18
18
|
/**
|
@@ -61,7 +61,7 @@ import styles from './card.styles';
|
|
61
61
|
* @slot after-body - This slot is for passing the content after the body
|
62
62
|
*
|
63
63
|
*/
|
64
|
-
class Card extends CardComponentMixin(
|
64
|
+
class Card extends CardComponentMixin(FooterMixin(Component)) {
|
65
65
|
constructor() {
|
66
66
|
super(...arguments);
|
67
67
|
/**
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { CSSResult, PropertyValues } from 'lit';
|
2
2
|
import { Component } from '../../models';
|
3
3
|
import type { DialogRole, DialogSize, DialogVariant } from './dialog.types';
|
4
|
-
declare const Dialog_base: import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/PreventScrollMixin").PreventScrollMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/FocusTrapMixin").FocusTrapClassInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/
|
4
|
+
declare const Dialog_base: import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/PreventScrollMixin").PreventScrollMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/FocusTrapMixin").FocusTrapClassInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FooterMixin").FooterMixinInterface> & typeof Component;
|
5
5
|
/**
|
6
6
|
* Dialog component is a modal dialog that can be used to display information or prompt the user for input.
|
7
7
|
* It can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.
|
@@ -15,7 +15,7 @@ import { FocusTrapMixin } from '../../utils/mixins/FocusTrapMixin';
|
|
15
15
|
import { PreventScrollMixin } from '../../utils/mixins/PreventScrollMixin';
|
16
16
|
import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
|
17
17
|
import { BUTTON_VARIANTS, ICON_BUTTON_SIZES } from '../button/button.constants';
|
18
|
-
import {
|
18
|
+
import { FooterMixin } from '../../utils/mixins/FooterMixin';
|
19
19
|
import { DEFAULTS } from './dialog.constants';
|
20
20
|
import { DialogEventManager } from './dialog.events';
|
21
21
|
import styles from './dialog.styles';
|
@@ -74,7 +74,7 @@ import styles from './dialog.styles';
|
|
74
74
|
* @slot footer - This slot is for passing custom footer content. Only use this if really needed,
|
75
75
|
* using the footer-link and footer-button slots is preferred
|
76
76
|
*/
|
77
|
-
class Dialog extends PreventScrollMixin(FocusTrapMixin(
|
77
|
+
class Dialog extends PreventScrollMixin(FocusTrapMixin(FooterMixin(Component))) {
|
78
78
|
constructor() {
|
79
79
|
super(...arguments);
|
80
80
|
/**
|
@@ -2,17 +2,19 @@ import type { ValueOf, TypedEvent } from '../../utils/types';
|
|
2
2
|
import type { PopoverPlacement } 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, {
|
6
|
+
value: string;
|
7
|
+
}>;
|
8
|
+
type SelectInputEvent = TypedEvent<Select, {
|
9
|
+
value: string;
|
10
|
+
}>;
|
5
11
|
interface Events {
|
6
12
|
onClickEvent: MouseEvent;
|
7
|
-
onChangeEvent:
|
8
|
-
|
9
|
-
}>;
|
10
|
-
onInputEvent: TypedEvent<Select, {
|
11
|
-
value: string;
|
12
|
-
}>;
|
13
|
+
onChangeEvent: SelectChangeEvent;
|
14
|
+
onInputEvent: SelectInputEvent;
|
13
15
|
onKeyDownEvent: KeyboardEvent;
|
14
16
|
onFocusEvent: FocusEvent;
|
15
17
|
}
|
16
18
|
type Placement = Extract<PopoverPlacement, 'bottom-start' | 'top-start'>;
|
17
19
|
type ArrowIcon = ValueOf<typeof ARROW_ICON>;
|
18
|
-
export type { Events, ArrowIcon, Placement };
|
20
|
+
export type { Events, ArrowIcon, Placement, SelectChangeEvent, SelectInputEvent };
|