@mgdis/mg-components 5.8.2 → 5.10.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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_31.cjs.entry.js +216 -277
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +1 -16
- package/dist/cjs/{mg-menu.conf-9afe6571.js → mg-menu.conf-1942ac70.js} +0 -5
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -3
- package/dist/collection/components/atoms/mg-button/mg-button.js +2 -7
- package/dist/collection/components/atoms/mg-card/mg-card.conf.js +8 -0
- package/dist/collection/components/atoms/mg-card/mg-card.css +54 -0
- package/dist/collection/components/atoms/mg-card/mg-card.js +113 -2
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +0 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +38 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +70 -11
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +65 -24
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +0 -2
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +12 -12
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +0 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +42 -15
- package/dist/collection/components/molecules/inputs/MgInput.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +0 -5
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +12 -21
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +0 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +0 -9
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +0 -13
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -12
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -5
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +0 -5
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -12
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +1 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -19
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +1 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +0 -8
- package/dist/collection/components/molecules/mg-details/mg-details.css +0 -3
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -4
- package/dist/collection/components/molecules/mg-form/mg-form.js +0 -8
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -2
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +0 -5
- package/dist/collection/components/molecules/mg-message/mg-message.css +1 -19
- package/dist/collection/components/molecules/mg-message/mg-message.js +11 -11
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +1 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +0 -6
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +1 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -15
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -8
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +0 -12
- package/dist/collection/locales/index.js +0 -1
- package/dist/collection/styles/reset-mg-card-slotted-variables.scss +1 -0
- package/dist/collection/utils/behaviors.utils.js +0 -10
- package/dist/collection/utils/components.utils.js +1 -10
- package/dist/collection/utils/locale.utils.js +0 -4
- package/dist/collection/utils/unit.test.utils.js +0 -5
- package/dist/collection/variables.css +7 -1
- package/dist/components/MgInput.js +0 -6
- package/dist/components/components.utils.js +1 -10
- package/dist/components/index2.js +0 -5
- package/dist/components/mg-action-more.js +1 -9
- package/dist/components/mg-badge2.js +1 -3
- package/dist/components/mg-button2.js +2 -7
- package/dist/components/mg-card2.js +67 -4
- package/dist/components/mg-character-left2.js +0 -2
- package/dist/components/mg-details.js +2 -5
- package/dist/components/mg-divider.js +0 -1
- package/dist/components/mg-form.js +0 -8
- package/dist/components/mg-icon2.js +74 -25
- package/dist/components/mg-illustrated-message.js +0 -2
- package/dist/components/mg-input-checkbox.js +0 -6
- package/dist/components/mg-input-date.js +0 -5
- package/dist/components/mg-input-numeric.js +12 -21
- package/dist/components/mg-input-password.js +0 -3
- package/dist/components/mg-input-radio.js +0 -9
- package/dist/components/mg-input-select2.js +0 -13
- package/dist/components/mg-input-text2.js +1 -12
- package/dist/components/mg-input-textarea.js +1 -5
- package/dist/components/mg-input-title2.js +0 -2
- package/dist/components/mg-input-toggle.js +0 -5
- package/dist/components/mg-item-more.js +0 -15
- package/dist/components/mg-menu-item2.js +2 -20
- package/dist/components/mg-menu2.js +0 -11
- package/dist/components/mg-message.js +4 -9
- package/dist/components/mg-modal.js +2 -7
- package/dist/components/mg-pagination.js +0 -6
- package/dist/components/mg-panel.js +6 -16
- package/dist/components/mg-popover2.js +2 -9
- package/dist/components/mg-skip-links.js +1 -4
- package/dist/components/mg-tabs.js +0 -12
- package/dist/components/mg-tag.js +1 -4
- package/dist/components/mg-tooltip2.js +42 -15
- package/dist/components/popper.js +3 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_31.entry.js +216 -277
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +1 -16
- package/dist/esm/{mg-menu.conf-881fbd82.js → mg-menu.conf-2cc1bb67.js} +0 -5
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-67ce7cb8.entry.js → p-a56a3157.entry.js} +1 -1
- package/dist/mg-components/p-eb32bb18.entry.js +1 -0
- package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +1 -0
- package/dist/mg-components/variables.css +7 -1
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +0 -2
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -5
- package/dist/types/components/atoms/mg-card/mg-card.conf.d.ts +16 -0
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +37 -1
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +0 -2
- package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +0 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +10 -2
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +19 -8
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +0 -2
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +0 -3
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +18 -9
- package/dist/types/components/molecules/inputs/MgInput.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +5 -17
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -3
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -8
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -11
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -4
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -5
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +0 -11
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +0 -18
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +0 -5
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +0 -3
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +0 -8
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +0 -2
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +0 -5
- package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +5 -1
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +7 -11
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -5
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +0 -5
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +0 -10
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +0 -7
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +0 -3
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -11
- package/dist/types/components.d.ts +35 -9
- package/dist/types/locales/index.d.ts +0 -1
- package/dist/types/utils/behaviors.utils.d.ts +0 -9
- package/dist/types/utils/components.utils.d.ts +1 -9
- package/dist/types/utils/locale.utils.d.ts +0 -4
- package/dist/types/utils/unit.test.utils.d.ts +0 -7
- package/package.json +15 -16
- package/dist/mg-components/p-0b68c4b4.entry.js +0 -1
- /package/dist/mg-components/{p-367f92d2.js → p-73156ac9.js} +0 -0
|
@@ -98,6 +98,9 @@
|
|
|
98
98
|
/* Shadow */
|
|
99
99
|
--box-shadow: 0 0.3rem 0.8rem 0 hsl(var(--color-dark), 0.15);
|
|
100
100
|
|
|
101
|
+
/* Soft style */
|
|
102
|
+
--mg-color-soft-l: 90%;
|
|
103
|
+
|
|
101
104
|
/*
|
|
102
105
|
Global
|
|
103
106
|
*/
|
|
@@ -109,8 +112,10 @@
|
|
|
109
112
|
*/
|
|
110
113
|
--mg-icon-small-size: 1.2rem;
|
|
111
114
|
--mg-icon-regular-size: 1.6rem;
|
|
115
|
+
--mg-icon-medium-size: 2rem;
|
|
112
116
|
--mg-icon-large-size: 2.4rem;
|
|
113
|
-
--mg-icon-extra-large-size: 3.
|
|
117
|
+
--mg-icon-extra-large-size: 3.2rem;
|
|
118
|
+
--mg-icon-border-radius: 50%;
|
|
114
119
|
|
|
115
120
|
/*
|
|
116
121
|
<mg-button>
|
|
@@ -160,6 +165,7 @@
|
|
|
160
165
|
--mg-popover-background-color: var(--color-light);
|
|
161
166
|
--mg-popover-font-color: var(--color-font-dark);
|
|
162
167
|
--mg-popover-title-font-size: 1.4rem;
|
|
168
|
+
--mg-popover-max-width: 40rem;
|
|
163
169
|
|
|
164
170
|
/*
|
|
165
171
|
<mg-message>
|
|
@@ -35,13 +35,11 @@ export declare class MgBadge {
|
|
|
35
35
|
classList: ClassList;
|
|
36
36
|
/**
|
|
37
37
|
* Check if props are well configured on init
|
|
38
|
-
*
|
|
39
38
|
* @returns {void}
|
|
40
39
|
*/
|
|
41
40
|
componentWillLoad(): void;
|
|
42
41
|
/**
|
|
43
42
|
* Render
|
|
44
|
-
*
|
|
45
43
|
* @returns {HTMLElement} HTML Element
|
|
46
44
|
*/
|
|
47
45
|
render(): HTMLElement;
|
|
@@ -76,34 +76,29 @@ export declare class MgButton {
|
|
|
76
76
|
disabledChange: EventEmitter<MgButton['disabled']>;
|
|
77
77
|
/**
|
|
78
78
|
* Trigger actions onClick event
|
|
79
|
-
*
|
|
80
79
|
* @param {MouseEvent} event click event
|
|
81
80
|
* @returns {void}
|
|
82
81
|
*/
|
|
83
82
|
private handleClick;
|
|
84
83
|
/**
|
|
85
84
|
* Handle onKeydown event
|
|
86
|
-
*
|
|
87
85
|
* @param {KeyboardEvent} event keyboard event
|
|
88
86
|
* @returns {void}
|
|
89
87
|
*/
|
|
90
88
|
private handleKeydown;
|
|
91
89
|
/**
|
|
92
90
|
* Handle onKeyup event
|
|
93
|
-
*
|
|
94
91
|
* @param {KeyboardEvent} event keyboard event
|
|
95
92
|
* @returns {void}
|
|
96
93
|
*/
|
|
97
94
|
private handleKeyup;
|
|
98
95
|
/**
|
|
99
96
|
* Check if props are well configured on init
|
|
100
|
-
*
|
|
101
97
|
* @returns {void}
|
|
102
98
|
*/
|
|
103
99
|
componentWillLoad(): void;
|
|
104
100
|
/**
|
|
105
101
|
* Render component
|
|
106
|
-
*
|
|
107
102
|
* @returns {HTMLElement} html element
|
|
108
103
|
*/
|
|
109
104
|
render(): HTMLElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List available variants
|
|
3
|
+
*/
|
|
4
|
+
export declare const variants: readonly ["info", "warning", "success", "danger", "app"];
|
|
5
|
+
/**
|
|
6
|
+
* Variant type
|
|
7
|
+
*/
|
|
8
|
+
export type VariantType = (typeof variants)[number];
|
|
9
|
+
/**
|
|
10
|
+
* List available variant styles
|
|
11
|
+
*/
|
|
12
|
+
export declare const variantStyles: readonly ["bar-left", "fill"];
|
|
13
|
+
/**
|
|
14
|
+
* VariantStyle type
|
|
15
|
+
*/
|
|
16
|
+
export type VariantStyleType = (typeof variantStyles)[number];
|
|
@@ -1,10 +1,46 @@
|
|
|
1
|
+
import { ClassList } from '../../../utils/components.utils';
|
|
2
|
+
import { type VariantStyleType, type VariantType } from './mg-card.conf';
|
|
1
3
|
export declare class MgCard {
|
|
4
|
+
/*************
|
|
5
|
+
* Private *
|
|
6
|
+
*************/
|
|
7
|
+
private readonly name;
|
|
8
|
+
private readonly baseClass;
|
|
9
|
+
/*************
|
|
10
|
+
* Decorators *
|
|
11
|
+
*************/
|
|
12
|
+
/**
|
|
13
|
+
* Define variant prop
|
|
14
|
+
* Default: undefined
|
|
15
|
+
*/
|
|
16
|
+
variant: undefined | VariantType;
|
|
17
|
+
validateVariant(newValue: MgCard['variant'], oldValue?: MgCard['variant']): void;
|
|
18
|
+
/**
|
|
19
|
+
* Define variantStyle prop
|
|
20
|
+
* Default: undefined
|
|
21
|
+
*/
|
|
22
|
+
variantStyle: undefined | VariantStyleType;
|
|
23
|
+
validateVariantStyle(newValue: MgCard['variantStyle'], oldValue?: MgCard['variantStyle']): void;
|
|
24
|
+
/**
|
|
25
|
+
* Component classes
|
|
26
|
+
*/
|
|
27
|
+
classList: ClassList;
|
|
28
|
+
/**
|
|
29
|
+
* Methode to set default varianStyle props
|
|
30
|
+
* needeed has stencil doesn't know that props is mutated when updated in prop watcher
|
|
31
|
+
* @returns {void}
|
|
32
|
+
*/
|
|
33
|
+
private setDefaultVariantStyle;
|
|
2
34
|
/*************
|
|
3
35
|
* Lifecycle *
|
|
4
36
|
*************/
|
|
37
|
+
/**
|
|
38
|
+
* Check if props are well configured on init
|
|
39
|
+
* @returns {void}
|
|
40
|
+
*/
|
|
41
|
+
componentWillLoad(): void;
|
|
5
42
|
/**
|
|
6
43
|
* Render
|
|
7
|
-
*
|
|
8
44
|
* @returns {HTMLElement} HTML Element
|
|
9
45
|
*/
|
|
10
46
|
render(): HTMLElement;
|
|
@@ -29,13 +29,11 @@ export declare class MgCharacterLeft {
|
|
|
29
29
|
*************/
|
|
30
30
|
/**
|
|
31
31
|
* Check if props are well configured on init
|
|
32
|
-
*
|
|
33
32
|
* @returns {void}
|
|
34
33
|
*/
|
|
35
34
|
componentWillLoad(): void;
|
|
36
35
|
/**
|
|
37
36
|
* Render component
|
|
38
|
-
*
|
|
39
37
|
* @returns {HTMLElement} HTML Element
|
|
40
38
|
*/
|
|
41
39
|
render(): HTMLElement;
|
|
@@ -5,7 +5,7 @@ export declare const icons: unknown;
|
|
|
5
5
|
/**
|
|
6
6
|
* List of all possibles sizes
|
|
7
7
|
*/
|
|
8
|
-
export declare const sizes: readonly ["small", "regular", "large", "extra-large"];
|
|
8
|
+
export declare const sizes: readonly ["small", "regular", "medium", "large", "extra-large"];
|
|
9
9
|
/**
|
|
10
10
|
* Icon Size from sizes
|
|
11
11
|
*/
|
|
@@ -13,8 +13,16 @@ export type IconSizeType = (typeof sizes)[number];
|
|
|
13
13
|
/**
|
|
14
14
|
* List of all possibles variants
|
|
15
15
|
*/
|
|
16
|
-
export declare const variants: readonly ["success", "warning", "danger", "info"];
|
|
16
|
+
export declare const variants: readonly ["success", "warning", "danger", "info", "app"];
|
|
17
17
|
/**
|
|
18
18
|
* Variant type from variants
|
|
19
19
|
*/
|
|
20
20
|
export type IconVariantType = (typeof variants)[number];
|
|
21
|
+
/**
|
|
22
|
+
* List of all possibles variants styles
|
|
23
|
+
*/
|
|
24
|
+
export declare const variantStyles: readonly ["icon", "background", "full"];
|
|
25
|
+
/**
|
|
26
|
+
* Variant style type from variant style
|
|
27
|
+
*/
|
|
28
|
+
export type IconVariantStyleType = (typeof variantStyles)[number];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IconVariantType, IconSizeType } from './mg-icon.conf';
|
|
1
|
+
import { IconVariantType, IconSizeType, IconVariantStyleType } from './mg-icon.conf';
|
|
2
2
|
import { ClassList } from '../../../utils/components.utils';
|
|
3
3
|
export declare class MgIcon {
|
|
4
4
|
/**
|
|
5
|
-
* Icon to display
|
|
5
|
+
* Icon to display.
|
|
6
6
|
*/
|
|
7
7
|
icon: string;
|
|
8
8
|
validateIcon(newValue: MgIcon['icon'], oldValue?: MgIcon['icon']): void;
|
|
@@ -12,11 +12,19 @@ export declare class MgIcon {
|
|
|
12
12
|
size: IconSizeType;
|
|
13
13
|
validateSize(newValue: MgIcon['size'], oldValue?: MgIcon['size']): void;
|
|
14
14
|
/**
|
|
15
|
-
* Define icon variant
|
|
16
|
-
* Add a background to the icon based on variant color
|
|
15
|
+
* Define icon variant color
|
|
17
16
|
*/
|
|
18
|
-
variant
|
|
17
|
+
variant: IconVariantType;
|
|
19
18
|
validateVariant(newValue: MgIcon['variant'], oldValue?: MgIcon['variant']): void;
|
|
19
|
+
/**
|
|
20
|
+
* Define icon color variant style
|
|
21
|
+
* Add a color to the icon based on variant color with given style
|
|
22
|
+
* 'full': Used to set a circular background with variant soft color and icon variant color
|
|
23
|
+
* 'background': Used to set a circular background with variant soft color
|
|
24
|
+
* 'icon': Used to set a color only to the icon
|
|
25
|
+
*/
|
|
26
|
+
variantStyle: IconVariantStyleType;
|
|
27
|
+
validateVariantStyle(newValue: MgIcon['variantStyle'], oldValue?: MgIcon['variantStyle']): void;
|
|
20
28
|
/**
|
|
21
29
|
* Make the icon spin
|
|
22
30
|
*/
|
|
@@ -28,19 +36,22 @@ export declare class MgIcon {
|
|
|
28
36
|
classList: ClassList;
|
|
29
37
|
/**
|
|
30
38
|
* getIcon
|
|
31
|
-
*
|
|
32
39
|
* @returns {HTMLElement} icon html
|
|
33
40
|
*/
|
|
34
41
|
private getIcon;
|
|
42
|
+
/**
|
|
43
|
+
* Method to set default varianStyle props
|
|
44
|
+
* needeed has stencil doesn't know that props is mutated when updated in prop watcher
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*/
|
|
47
|
+
private setDefaultVariantStyle;
|
|
35
48
|
/**
|
|
36
49
|
* Check if props are well configured on init
|
|
37
|
-
*
|
|
38
50
|
* @returns {void}
|
|
39
51
|
*/
|
|
40
52
|
componentWillLoad(): void;
|
|
41
53
|
/**
|
|
42
54
|
* Render component
|
|
43
|
-
*
|
|
44
55
|
* @returns {HTMLElement} HTML Element
|
|
45
56
|
*/
|
|
46
57
|
render(): HTMLElement;
|
|
@@ -37,7 +37,6 @@ export declare class MgTag {
|
|
|
37
37
|
*************/
|
|
38
38
|
/**
|
|
39
39
|
* Validate the given textContent
|
|
40
|
-
*
|
|
41
40
|
* @param {string} textContent html element textContent property
|
|
42
41
|
* @returns {void}
|
|
43
42
|
*/
|
|
@@ -47,13 +46,11 @@ export declare class MgTag {
|
|
|
47
46
|
*************/
|
|
48
47
|
/**
|
|
49
48
|
* Check if props are well configured on init
|
|
50
|
-
*
|
|
51
49
|
* @returns {void}
|
|
52
50
|
*/
|
|
53
51
|
componentWillLoad(): void;
|
|
54
52
|
/**
|
|
55
53
|
* Render
|
|
56
|
-
*
|
|
57
54
|
* @returns {HTMLElement} HTML Element
|
|
58
55
|
*/
|
|
59
56
|
render(): HTMLElement;
|
|
@@ -6,6 +6,7 @@ export declare class MgTooltip {
|
|
|
6
6
|
private popper;
|
|
7
7
|
private tooltip;
|
|
8
8
|
private tooltipedElement;
|
|
9
|
+
private windows;
|
|
9
10
|
private guard;
|
|
10
11
|
/**************
|
|
11
12
|
* Decorators *
|
|
@@ -39,19 +40,28 @@ export declare class MgTooltip {
|
|
|
39
40
|
disabled: boolean;
|
|
40
41
|
/**
|
|
41
42
|
* Show tooltip
|
|
42
|
-
*
|
|
43
43
|
* @returns {void}
|
|
44
44
|
*/
|
|
45
45
|
private show;
|
|
46
46
|
/**
|
|
47
47
|
* Hide tooltip
|
|
48
|
-
*
|
|
49
48
|
* @returns {void}
|
|
50
49
|
*/
|
|
51
50
|
private hide;
|
|
51
|
+
/**
|
|
52
|
+
* Check if clicked outside of component and hidde tooltip
|
|
53
|
+
* @param {MouseEvent} event mouse event
|
|
54
|
+
* @returns {void}
|
|
55
|
+
*/
|
|
56
|
+
private clickOutside;
|
|
57
|
+
/**
|
|
58
|
+
* Check if 'Escape' key is pressed of component and hidde tooltip
|
|
59
|
+
* @param {KeyboardEvent} event keyboard event
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*/
|
|
62
|
+
private pressEscape;
|
|
52
63
|
/**
|
|
53
64
|
* Method to set display prop
|
|
54
|
-
*
|
|
55
65
|
* @param {boolean} newValue display prop new value
|
|
56
66
|
* @param {boolean} condition additionnal condition to apply display prop newValue
|
|
57
67
|
* @returns {void}
|
|
@@ -59,7 +69,6 @@ export declare class MgTooltip {
|
|
|
59
69
|
private setDisplay;
|
|
60
70
|
/**
|
|
61
71
|
* Action for tooltip element and tooltiped element mouse listener
|
|
62
|
-
*
|
|
63
72
|
* @param {Guard} elementGuard tooltip element guard
|
|
64
73
|
* @param {boolean} isMouseenter mouseenter validation
|
|
65
74
|
* @param {Guard} conditionalGuard guard condition
|
|
@@ -68,20 +77,17 @@ export declare class MgTooltip {
|
|
|
68
77
|
private tooltipMouseListenerAction;
|
|
69
78
|
/**
|
|
70
79
|
* Method to reset guard value
|
|
71
|
-
*
|
|
72
80
|
* @returns {void}
|
|
73
81
|
*/
|
|
74
82
|
private resetGuard;
|
|
75
83
|
/**
|
|
76
84
|
* Update slot content when it is a mg-button
|
|
77
|
-
*
|
|
78
85
|
* @param {HTMLMgButtonElement} mgButton slotted mg-button
|
|
79
86
|
* @returns {void}
|
|
80
87
|
*/
|
|
81
88
|
private setMgButtonWrapper;
|
|
82
89
|
/**
|
|
83
90
|
* Init tooltip
|
|
84
|
-
*
|
|
85
91
|
* @param {HTMLElement} slotElement slotted element
|
|
86
92
|
* @param {HTMLElement} interactiveElement interactive element
|
|
87
93
|
*/
|
|
@@ -89,17 +95,20 @@ export declare class MgTooltip {
|
|
|
89
95
|
/*************
|
|
90
96
|
* Lifecycle *
|
|
91
97
|
*************/
|
|
98
|
+
/**
|
|
99
|
+
* set variables
|
|
100
|
+
* @returns {void}
|
|
101
|
+
*/
|
|
102
|
+
componentWillLoad(): void;
|
|
92
103
|
/**
|
|
93
104
|
* Get slotted element
|
|
94
105
|
* Check if it already contain an interactive element, if not we need to add a tabIndex attribute
|
|
95
106
|
* We need to attach the focused element to the tooltip (aria-describedby)
|
|
96
|
-
*
|
|
97
107
|
* @returns {void}
|
|
98
108
|
*/
|
|
99
109
|
componentDidLoad(): void;
|
|
100
110
|
/**
|
|
101
111
|
* Render
|
|
102
|
-
*
|
|
103
112
|
* @returns {HTMLElement} HTML Element
|
|
104
113
|
*/
|
|
105
114
|
render(): HTMLElement;
|
|
@@ -98,13 +98,11 @@ export declare class MgInputCheckbox {
|
|
|
98
98
|
inputValid: EventEmitter<MgInputCheckbox['valid']>;
|
|
99
99
|
/**
|
|
100
100
|
* Public method to display errors
|
|
101
|
-
*
|
|
102
101
|
* @returns {Promise<void>}
|
|
103
102
|
*/
|
|
104
103
|
displayError(): Promise<void>;
|
|
105
104
|
/**
|
|
106
105
|
* Handle input event
|
|
107
|
-
*
|
|
108
106
|
* @param {InputEvent} event input event
|
|
109
107
|
*/
|
|
110
108
|
private handleInput;
|
|
@@ -114,7 +112,6 @@ export declare class MgInputCheckbox {
|
|
|
114
112
|
private handleBlur;
|
|
115
113
|
/**
|
|
116
114
|
* get invalid element
|
|
117
|
-
*
|
|
118
115
|
* @returns {HTMLInputElement} element
|
|
119
116
|
*/
|
|
120
117
|
private getInvalidElement;
|
|
@@ -131,13 +128,11 @@ export declare class MgInputCheckbox {
|
|
|
131
128
|
*************/
|
|
132
129
|
/**
|
|
133
130
|
* Check if component props are well configured on init
|
|
134
|
-
*
|
|
135
131
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
136
132
|
*/
|
|
137
133
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
138
134
|
/**
|
|
139
135
|
* Render
|
|
140
|
-
*
|
|
141
136
|
* @returns {HTMLElement} HTML Element
|
|
142
137
|
*/
|
|
143
138
|
render(): HTMLElement;
|
|
@@ -99,7 +99,6 @@ export declare class MgInputDate {
|
|
|
99
99
|
inputValid: EventEmitter<boolean>;
|
|
100
100
|
/**
|
|
101
101
|
* Public method to display errors
|
|
102
|
-
*
|
|
103
102
|
* @returns {Promise<void>}
|
|
104
103
|
*/
|
|
105
104
|
displayError(): Promise<void>;
|
|
@@ -117,13 +116,11 @@ export declare class MgInputDate {
|
|
|
117
116
|
private checkValidity;
|
|
118
117
|
/**
|
|
119
118
|
* get input error code
|
|
120
|
-
*
|
|
121
119
|
* @returns {null | InputError} error code
|
|
122
120
|
*/
|
|
123
121
|
private getInputError;
|
|
124
122
|
/**
|
|
125
123
|
* Check input errors
|
|
126
|
-
*
|
|
127
124
|
* @returns {void}
|
|
128
125
|
*/
|
|
129
126
|
private setErrorMessage;
|
|
@@ -132,13 +129,11 @@ export declare class MgInputDate {
|
|
|
132
129
|
*************/
|
|
133
130
|
/**
|
|
134
131
|
* Check if component props are well configured on init
|
|
135
|
-
*
|
|
136
132
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
137
133
|
*/
|
|
138
134
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
139
135
|
/**
|
|
140
136
|
* Render
|
|
141
|
-
*
|
|
142
137
|
* @returns {HTMLElement} HTML Element
|
|
143
138
|
*/
|
|
144
139
|
render(): HTMLElement;
|
|
@@ -23,7 +23,7 @@ export declare class MgInputNumeric {
|
|
|
23
23
|
* Component value
|
|
24
24
|
*/
|
|
25
25
|
value: string;
|
|
26
|
-
validateValue(newValue:
|
|
26
|
+
validateValue(newValue: MgInputNumeric['value']): void;
|
|
27
27
|
/**
|
|
28
28
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
29
29
|
*/
|
|
@@ -79,7 +79,7 @@ export declare class MgInputNumeric {
|
|
|
79
79
|
* Define numeric type
|
|
80
80
|
*/
|
|
81
81
|
type: string;
|
|
82
|
-
validateType(newValue:
|
|
82
|
+
validateType(newValue: MgInputNumeric['type']): void;
|
|
83
83
|
/**
|
|
84
84
|
* Define currency
|
|
85
85
|
*/
|
|
@@ -97,13 +97,13 @@ export declare class MgInputNumeric {
|
|
|
97
97
|
* integer is the number before the decimal point
|
|
98
98
|
*/
|
|
99
99
|
integerLength: number;
|
|
100
|
-
validateIntegerLength(newValue:
|
|
100
|
+
validateIntegerLength(newValue: MgInputNumeric['integerLength']): void;
|
|
101
101
|
/**
|
|
102
102
|
* Override decimal length
|
|
103
103
|
* decimal is the number after the decimal point
|
|
104
104
|
*/
|
|
105
105
|
decimalLength: number;
|
|
106
|
-
validateDecimalLength(newValue:
|
|
106
|
+
validateDecimalLength(newValue: MgInputNumeric['decimalLength']): void;
|
|
107
107
|
/**
|
|
108
108
|
* Define input pattern to validate
|
|
109
109
|
*/
|
|
@@ -134,63 +134,53 @@ export declare class MgInputNumeric {
|
|
|
134
134
|
inputValid: EventEmitter<boolean>;
|
|
135
135
|
/**
|
|
136
136
|
* Public method to display errors
|
|
137
|
-
*
|
|
138
137
|
* @returns {Promise<void>}
|
|
139
138
|
*/
|
|
140
139
|
displayError(): Promise<void>;
|
|
141
140
|
/**
|
|
142
141
|
* Displayed value in input
|
|
143
142
|
* Change on focus/blur
|
|
144
|
-
*
|
|
145
|
-
* @returns {string} display value
|
|
143
|
+
* @returns {MgInputNumeric['value'] | MgInputNumeric['readonlyValue']} display value
|
|
146
144
|
*/
|
|
147
145
|
private displayValue;
|
|
148
146
|
/**
|
|
149
147
|
* Handle input event
|
|
150
|
-
*
|
|
151
148
|
* @returns {void}
|
|
152
149
|
*/
|
|
153
150
|
private handleInput;
|
|
154
151
|
/**
|
|
155
152
|
* Handle focus event
|
|
156
|
-
*
|
|
157
153
|
* @returns {void}
|
|
158
154
|
*/
|
|
159
155
|
private handleFocus;
|
|
160
156
|
/**
|
|
161
157
|
* Handle blur event
|
|
162
|
-
*
|
|
163
158
|
* @returns {void}
|
|
164
159
|
*/
|
|
165
160
|
private handleBlur;
|
|
166
161
|
/**
|
|
167
162
|
* Check if input is valid
|
|
168
|
-
*
|
|
169
163
|
* @returns {void}
|
|
170
164
|
*/
|
|
171
165
|
private checkValidity;
|
|
172
166
|
/**
|
|
173
167
|
* Set input error message
|
|
174
|
-
*
|
|
175
168
|
* @returns {void}
|
|
176
169
|
*/
|
|
177
170
|
private setErrorMessage;
|
|
178
171
|
/**
|
|
179
172
|
* Get input error code
|
|
180
|
-
*
|
|
181
173
|
* @returns {null | InputError} error code
|
|
182
174
|
*/
|
|
183
175
|
private getInputError;
|
|
184
176
|
/**
|
|
185
177
|
* Format value based on type
|
|
186
|
-
*
|
|
187
178
|
* @param {number} value value to format
|
|
188
179
|
* @returns {string} formated local value
|
|
189
180
|
*/
|
|
190
181
|
private formatValue;
|
|
191
182
|
/**
|
|
192
183
|
* Validate append slot
|
|
193
|
-
*
|
|
194
184
|
* @returns {void}
|
|
195
185
|
*/
|
|
196
186
|
private validateAppendSlot;
|
|
@@ -199,13 +189,11 @@ export declare class MgInputNumeric {
|
|
|
199
189
|
*************/
|
|
200
190
|
/**
|
|
201
191
|
* Check if component props are well configured on init
|
|
202
|
-
*
|
|
203
192
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
204
193
|
*/
|
|
205
194
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
206
195
|
/**
|
|
207
196
|
* Render
|
|
208
|
-
*
|
|
209
197
|
* @returns {HTMLElement} HTML Element
|
|
210
198
|
*/
|
|
211
199
|
render(): HTMLElement;
|
|
@@ -97,7 +97,6 @@ export declare class MgInputPassword {
|
|
|
97
97
|
inputValid: EventEmitter<boolean>;
|
|
98
98
|
/**
|
|
99
99
|
* Public method to display errors
|
|
100
|
-
*
|
|
101
100
|
* @returns {Promise<void>}
|
|
102
101
|
*/
|
|
103
102
|
displayError(): Promise<void>;
|
|
@@ -122,13 +121,11 @@ export declare class MgInputPassword {
|
|
|
122
121
|
*************/
|
|
123
122
|
/**
|
|
124
123
|
* Check if component props are well configured on init
|
|
125
|
-
*
|
|
126
124
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
127
125
|
*/
|
|
128
126
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
129
127
|
/**
|
|
130
128
|
* Render
|
|
131
|
-
*
|
|
132
129
|
* @returns {HTMLElement} HTML Element
|
|
133
130
|
*/
|
|
134
131
|
render(): HTMLElement;
|
|
@@ -102,38 +102,32 @@ export declare class MgInputRadio {
|
|
|
102
102
|
inputValid: EventEmitter<boolean>;
|
|
103
103
|
/**
|
|
104
104
|
* Public method to display errors
|
|
105
|
-
*
|
|
106
105
|
* @returns {Promise<void>}
|
|
107
106
|
*/
|
|
108
107
|
displayError(): Promise<void>;
|
|
109
108
|
/**
|
|
110
109
|
* Handle input event
|
|
111
|
-
*
|
|
112
110
|
* @param {event} event input event
|
|
113
111
|
* @returns {void}
|
|
114
112
|
*/
|
|
115
113
|
private handleInput;
|
|
116
114
|
/**
|
|
117
115
|
* Handle blur event
|
|
118
|
-
*
|
|
119
116
|
* @returns {void}
|
|
120
117
|
*/
|
|
121
118
|
private handleBlur;
|
|
122
119
|
/**
|
|
123
120
|
* Check if input is valid
|
|
124
|
-
*
|
|
125
121
|
* @returns {void}
|
|
126
122
|
*/
|
|
127
123
|
private checkValidity;
|
|
128
124
|
/**
|
|
129
125
|
* Set input error message
|
|
130
|
-
*
|
|
131
126
|
* @returns {void}
|
|
132
127
|
*/
|
|
133
128
|
private setErrorMessage;
|
|
134
129
|
/**
|
|
135
130
|
* get invalid element
|
|
136
|
-
*
|
|
137
131
|
* @returns {HTMLInputElement} element
|
|
138
132
|
*/
|
|
139
133
|
private getInvalidElement;
|
|
@@ -142,13 +136,11 @@ export declare class MgInputRadio {
|
|
|
142
136
|
*************/
|
|
143
137
|
/**
|
|
144
138
|
* Check if component props are well configured on init
|
|
145
|
-
*
|
|
146
139
|
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
147
140
|
*/
|
|
148
141
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
149
142
|
/**
|
|
150
143
|
* Render
|
|
151
|
-
*
|
|
152
144
|
* @returns {HTMLElement} HTML Element
|
|
153
145
|
*/
|
|
154
146
|
render(): HTMLElement;
|