@mgdis/mg-components 5.7.0 → 5.8.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 -565
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +273 -0
- package/dist/cjs/mg-menu.conf-9afe6571.js +242 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +24 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +8 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -2
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +0 -13
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +39 -67
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +3 -3
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +156 -77
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.conf.js +1 -0
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.css +30 -0
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +200 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +0 -2
- package/dist/collection/styles/navigation-button.scss +1 -1
- package/dist/collection/utils/behaviors.utils.js +33 -29
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/mg-action-more.js +2 -1
- package/dist/components/mg-button2.js +4 -1
- package/dist/components/mg-icon2.js +8 -0
- package/dist/components/mg-item-more.d.ts +11 -0
- package/dist/components/mg-item-more.js +336 -0
- package/dist/components/mg-menu-item2.js +134 -250
- package/dist/components/mg-menu.conf.js +14 -0
- package/dist/components/mg-menu2.js +35 -102
- package/dist/components/mg-tabs.js +1 -1
- package/dist/components/mg-tooltip2.js +6 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_31.entry.js +185 -534
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +269 -0
- package/dist/esm/mg-menu.conf-881fbd82.js +235 -0
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-1221773c.entry.js +1 -0
- package/dist/mg-components/p-367f92d2.js +1 -0
- package/dist/mg-components/p-6aeded97.entry.js +1 -0
- package/dist/mg-components/styles/navigation-button.scss +1 -1
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +5 -0
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +3 -27
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +9 -27
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +5 -0
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +65 -16
- package/dist/types/components/molecules/mg-item-more/mg-item-more.conf.d.ts +26 -0
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +74 -0
- package/dist/types/components.d.ts +66 -12
- package/dist/types/utils/behaviors.utils.d.ts +12 -5
- package/package.json +1 -1
- package/dist/mg-components/p-4cfd5423.entry.js +0 -1
|
@@ -9,7 +9,7 @@ $navigation-button-column-gap: 1rem;
|
|
|
9
9
|
.#{$element}.#{$element}--size-#{$name} .#{$element}__navigation-button,
|
|
10
10
|
.#{$element}__navigation-button.#{$element}__navigation-button--size-#{$name} {
|
|
11
11
|
padding: #{map.get($size, 'vertical')} #{map.get($size, 'horizontal')};
|
|
12
|
-
height:
|
|
12
|
+
height: #{map.get($size, 'height')};
|
|
13
13
|
&,
|
|
14
14
|
::slotted([slot='label']),
|
|
15
15
|
::slotted([slot='metadata']) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
1
2
|
import { VariantType, ButtonType } from './mg-button.conf';
|
|
2
3
|
import { ClassList } from '../../../utils/components.utils';
|
|
3
4
|
export declare class MgButton {
|
|
@@ -69,6 +70,10 @@ export declare class MgButton {
|
|
|
69
70
|
* Component classes
|
|
70
71
|
*/
|
|
71
72
|
classList: ClassList;
|
|
73
|
+
/**
|
|
74
|
+
* Emmited event when disabled change
|
|
75
|
+
*/
|
|
76
|
+
disabledChange: EventEmitter<MgButton['disabled']>;
|
|
72
77
|
/**
|
|
73
78
|
* Trigger actions onClick event
|
|
74
79
|
*
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MgMenu } from './mg-menu';
|
|
1
|
+
import { MgItemMore } from '../../mg-item-more/mg-item-more';
|
|
3
2
|
/**
|
|
4
3
|
* Menu direction type
|
|
5
4
|
*/
|
|
@@ -8,32 +7,9 @@ export declare enum Direction {
|
|
|
8
7
|
HORIZONTAL = "horizontal"
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
10
|
+
* ItemMore prop type
|
|
12
11
|
*/
|
|
13
|
-
export type
|
|
14
|
-
moreLabel: string;
|
|
15
|
-
badgeLabel: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* more item type
|
|
19
|
-
*/
|
|
20
|
-
export type MoreItemType = {
|
|
21
|
-
mgIcon?: {
|
|
22
|
-
icon: MgIcon['icon'];
|
|
23
|
-
};
|
|
24
|
-
slotLabel?: {
|
|
25
|
-
label?: string;
|
|
26
|
-
display?: boolean;
|
|
27
|
-
};
|
|
28
|
-
size?: MgMenu['size'];
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* More item type guard
|
|
32
|
-
*
|
|
33
|
-
* @param {unknown} element element to control
|
|
34
|
-
* @returns {boolean} truthy if element is more-item
|
|
35
|
-
*/
|
|
36
|
-
export declare const isMoreItem: (element: unknown) => element is MoreItemType;
|
|
12
|
+
export type ItemMoreType = Pick<MgItemMore, 'icon' | 'slotlabel' | 'size'>;
|
|
37
13
|
/**
|
|
38
14
|
* List of all possibles sizes
|
|
39
15
|
*/
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { Direction
|
|
1
|
+
import { Direction } from './mg-menu.conf';
|
|
2
|
+
import type { MenuSizeType, ItemMoreType } from './mg-menu.conf';
|
|
2
3
|
export declare class MgMenu {
|
|
3
4
|
/************
|
|
4
5
|
* Internal *
|
|
5
6
|
************/
|
|
6
7
|
private readonly name;
|
|
7
|
-
private messages;
|
|
8
8
|
private menuItems;
|
|
9
9
|
private focusedMenuItem;
|
|
10
|
-
private overflowBehavior;
|
|
11
10
|
/**************
|
|
12
11
|
* Decorators *
|
|
13
12
|
**************/
|
|
@@ -27,11 +26,11 @@ export declare class MgMenu {
|
|
|
27
26
|
direction: Direction;
|
|
28
27
|
validateDirection(newValue: MgMenu['direction']): void;
|
|
29
28
|
/**
|
|
30
|
-
* Customize mg-
|
|
29
|
+
* Customize "mg-item-more" element
|
|
31
30
|
* Used with direction: 'vertical' to manage overflow
|
|
32
31
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
itemMore: ItemMoreType;
|
|
33
|
+
validateItemMore(newValue: MgMenu['itemMore']): void;
|
|
35
34
|
/**
|
|
36
35
|
* Define mg-menu size
|
|
37
36
|
* Default: 'regular'
|
|
@@ -42,11 +41,6 @@ export declare class MgMenu {
|
|
|
42
41
|
* is this menu a child menu. Used for conditional render.
|
|
43
42
|
*/
|
|
44
43
|
isChildMenu: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Define if component manage child overflow
|
|
47
|
-
* Default: false
|
|
48
|
-
*/
|
|
49
|
-
hasOverflow: boolean;
|
|
50
44
|
/**
|
|
51
45
|
* Close matching menu-item
|
|
52
46
|
*
|
|
@@ -65,11 +59,11 @@ export declare class MgMenu {
|
|
|
65
59
|
*/
|
|
66
60
|
private initMenuItemsListeners;
|
|
67
61
|
/**
|
|
68
|
-
* render mg-
|
|
62
|
+
* render mg-item-more
|
|
69
63
|
*
|
|
70
|
-
* @returns {
|
|
64
|
+
* @returns {void}
|
|
71
65
|
*/
|
|
72
|
-
private
|
|
66
|
+
private renderMgItemMore;
|
|
73
67
|
/*************
|
|
74
68
|
* Lifecycle *
|
|
75
69
|
*************/
|
|
@@ -86,23 +80,11 @@ export declare class MgMenu {
|
|
|
86
80
|
*/
|
|
87
81
|
componentDidLoad(): ReturnType<typeof setTimeout>;
|
|
88
82
|
/**
|
|
89
|
-
*
|
|
83
|
+
* Add listeners to items
|
|
90
84
|
*
|
|
91
85
|
* @returns {void}
|
|
92
86
|
*/
|
|
93
87
|
componentDidRender(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Disconnect overflow ResizeObserver
|
|
96
|
-
*
|
|
97
|
-
* @returns {void} run overflow resize obeserver disconnexion
|
|
98
|
-
*/
|
|
99
|
-
disconnectedCallback(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Render mg-menu-item more element for overflow behavior
|
|
102
|
-
*
|
|
103
|
-
* @returns {HTMLElement} rendered mg-menu-item more element
|
|
104
|
-
*/
|
|
105
|
-
private renderMgMenuItemMore;
|
|
106
88
|
/**
|
|
107
89
|
* Render
|
|
108
90
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MgMenu } from '../mg-menu/mg-menu';
|
|
1
2
|
/**
|
|
2
3
|
* Available menu-item positions
|
|
3
4
|
*/
|
|
@@ -14,3 +15,7 @@ export declare enum Status {
|
|
|
14
15
|
DISABLED = "disabled",
|
|
15
16
|
ACTIVE = "active"
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Direction type
|
|
20
|
+
*/
|
|
21
|
+
export type DirectionType = MgMenu['direction'];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { ClassList } from '../../../../utils/components.utils';
|
|
3
|
-
import { MgMenu } from '../mg-menu/mg-menu';
|
|
4
|
-
import { MenuSizeType } from '../mg-menu/mg-menu.conf';
|
|
5
3
|
import { Status } from './mg-menu-item.conf';
|
|
4
|
+
import type { MenuSizeType } from '../mg-menu/mg-menu.conf';
|
|
5
|
+
import type { DirectionType } from './mg-menu-item.conf';
|
|
6
6
|
export declare class MgMenuItem {
|
|
7
7
|
/************
|
|
8
8
|
* Internal *
|
|
@@ -20,6 +20,11 @@ export declare class MgMenuItem {
|
|
|
20
20
|
/************
|
|
21
21
|
* Props *
|
|
22
22
|
************/
|
|
23
|
+
/**
|
|
24
|
+
* Identifier is used to control mg-popover
|
|
25
|
+
* Default: createID('mg-menu-item');
|
|
26
|
+
*/
|
|
27
|
+
identifier: string;
|
|
23
28
|
/**
|
|
24
29
|
* Define menu-item href
|
|
25
30
|
* when defined menu-item contain an anchor instead of button
|
|
@@ -57,11 +62,16 @@ export declare class MgMenuItem {
|
|
|
57
62
|
/**
|
|
58
63
|
* Parent menu direction
|
|
59
64
|
*/
|
|
60
|
-
direction:
|
|
65
|
+
direction: DirectionType;
|
|
66
|
+
validateDirection(newValue: MgMenuItem['direction']): void;
|
|
61
67
|
/**
|
|
62
68
|
* Does component is in main menu
|
|
63
69
|
*/
|
|
64
70
|
isInMainMenu: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Does element is item-more
|
|
73
|
+
*/
|
|
74
|
+
isItemMore: boolean;
|
|
65
75
|
/**
|
|
66
76
|
* Does component have children. Default: false.
|
|
67
77
|
*/
|
|
@@ -92,9 +102,61 @@ export declare class MgMenuItem {
|
|
|
92
102
|
* Is component contextual direction match the given direction
|
|
93
103
|
*
|
|
94
104
|
* @param {MgMenuItem['direction']} direction in parent menu
|
|
105
|
+
* @param {MgMenuItem['direction']} compareWith direction to compare with. Default: `this.direction`
|
|
95
106
|
* @returns {boolean} true is direction match the direction propertie
|
|
96
107
|
*/
|
|
97
108
|
private isDirection;
|
|
109
|
+
/**
|
|
110
|
+
* Update displayNotificationBadge
|
|
111
|
+
* current component notification badge have priority over the slot badge when submenu contain badge
|
|
112
|
+
*
|
|
113
|
+
* @returns {void} update displayNotificationBadge value
|
|
114
|
+
*/
|
|
115
|
+
private updateDisplayNotificationBadge;
|
|
116
|
+
/**
|
|
117
|
+
* Method to control if one of component children have active status
|
|
118
|
+
*
|
|
119
|
+
* @returns {boolean} truthy if component has active child
|
|
120
|
+
*/
|
|
121
|
+
private hasActiveChild;
|
|
122
|
+
/**
|
|
123
|
+
* Validate slots
|
|
124
|
+
*
|
|
125
|
+
* @param {boolean} guard prevent action whith guard. Default: false.
|
|
126
|
+
* @returns {void}
|
|
127
|
+
*/
|
|
128
|
+
private validateSlot;
|
|
129
|
+
/**
|
|
130
|
+
* Update status
|
|
131
|
+
*
|
|
132
|
+
* @param {Status[]} guard status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].
|
|
133
|
+
* @returns {void}
|
|
134
|
+
*/
|
|
135
|
+
private updateStatus;
|
|
136
|
+
/**
|
|
137
|
+
* Init event-listeners
|
|
138
|
+
*
|
|
139
|
+
* @returns {void}
|
|
140
|
+
*/
|
|
141
|
+
private initListeners;
|
|
142
|
+
/**
|
|
143
|
+
* Get mg-popover identifier
|
|
144
|
+
*
|
|
145
|
+
* @returns {MgPopover['identifier']} generated mg-popover identifier
|
|
146
|
+
*/
|
|
147
|
+
private getPopoverIdentifier;
|
|
148
|
+
/**
|
|
149
|
+
* Render popover clickoutside guard for content slot
|
|
150
|
+
*
|
|
151
|
+
* @returns {void}
|
|
152
|
+
*/
|
|
153
|
+
private updatePopoverGuard;
|
|
154
|
+
/**
|
|
155
|
+
* Condition to know if component should display a mg-popover
|
|
156
|
+
*
|
|
157
|
+
* @returns {boolean} truthy if component display popover
|
|
158
|
+
*/
|
|
159
|
+
private displayPopover;
|
|
98
160
|
/************
|
|
99
161
|
* Handlers *
|
|
100
162
|
************/
|
|
@@ -112,19 +174,6 @@ export declare class MgMenuItem {
|
|
|
112
174
|
* @returns {void}
|
|
113
175
|
*/
|
|
114
176
|
private handlePopoverDisplay;
|
|
115
|
-
/**
|
|
116
|
-
* Update displayNotificationBadge
|
|
117
|
-
* current component notification badge have priority over the slot badge when submenu contain badge
|
|
118
|
-
*
|
|
119
|
-
* @returns {void} update displayNotificationBadge value
|
|
120
|
-
*/
|
|
121
|
-
private updateDisplayNotificationBadge;
|
|
122
|
-
/**
|
|
123
|
-
* Method to control if one of component children have active status
|
|
124
|
-
*
|
|
125
|
-
* @returns {boolean} truthy if component has active child
|
|
126
|
-
*/
|
|
127
|
-
private hasActiveChild;
|
|
128
177
|
/*************
|
|
129
178
|
* Lifecycle *
|
|
130
179
|
*************/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MgIcon } from '../../atoms/mg-icon/mg-icon';
|
|
2
|
+
import { MgMenu } from '../menu/mg-menu/mg-menu';
|
|
3
|
+
/**
|
|
4
|
+
* message type
|
|
5
|
+
*/
|
|
6
|
+
export type MessageType = {
|
|
7
|
+
moreLabel: string;
|
|
8
|
+
badgeLabel: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* SlotLabel prop type
|
|
12
|
+
*/
|
|
13
|
+
export type SlotLabelType = {
|
|
14
|
+
label?: string;
|
|
15
|
+
display?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* icon prop type
|
|
19
|
+
*/
|
|
20
|
+
export type IconType = {
|
|
21
|
+
icon: MgIcon['icon'];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* size type
|
|
25
|
+
*/
|
|
26
|
+
export type SizeType = MgMenu['size'];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { IconType, SizeType, SlotLabelType } from './mg-item-more.conf';
|
|
2
|
+
export declare class MgItemMore {
|
|
3
|
+
/************
|
|
4
|
+
* Internal *
|
|
5
|
+
************/
|
|
6
|
+
private readonly name;
|
|
7
|
+
private messages;
|
|
8
|
+
private menuItems;
|
|
9
|
+
private overflowBehavior;
|
|
10
|
+
/**************
|
|
11
|
+
* Decorators *
|
|
12
|
+
**************/
|
|
13
|
+
/**
|
|
14
|
+
* Get component DOM element
|
|
15
|
+
*/
|
|
16
|
+
element: HTMLMgItemMoreElement;
|
|
17
|
+
/**
|
|
18
|
+
* Define icon
|
|
19
|
+
* Default: {icon: 'ellipsis-vertical'}
|
|
20
|
+
*/
|
|
21
|
+
icon: IconType;
|
|
22
|
+
validateIcon(newValue: MgItemMore['icon']): void;
|
|
23
|
+
/**
|
|
24
|
+
* Define slot label element
|
|
25
|
+
* Default: {display: false}
|
|
26
|
+
*/
|
|
27
|
+
slotlabel: SlotLabelType;
|
|
28
|
+
validateSlotLabel(newValue: MgItemMore['slotlabel']): void;
|
|
29
|
+
/**
|
|
30
|
+
* Define component child menu size.
|
|
31
|
+
*/
|
|
32
|
+
size: SizeType;
|
|
33
|
+
validateSize(newValue: MgItemMore['size']): void;
|
|
34
|
+
/**
|
|
35
|
+
* Define component parent menu.
|
|
36
|
+
*/
|
|
37
|
+
parentMenu: HTMLMgMenuElement;
|
|
38
|
+
/***********
|
|
39
|
+
* Methods *
|
|
40
|
+
***********/
|
|
41
|
+
/**
|
|
42
|
+
* render mg-item-more overflow element
|
|
43
|
+
*
|
|
44
|
+
* @returns {HTMLMgItemMoreElement} mg-item-more element
|
|
45
|
+
*/
|
|
46
|
+
private renderMgMenuItemOverflowElement;
|
|
47
|
+
/*************
|
|
48
|
+
* Lifecycle *
|
|
49
|
+
*************/
|
|
50
|
+
/**
|
|
51
|
+
* Disconnect overflow ResizeObserver
|
|
52
|
+
*
|
|
53
|
+
* @returns {void} run overflow resize obeserver disconnexion
|
|
54
|
+
*/
|
|
55
|
+
disconnectedCallback(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Set variables and validate props
|
|
58
|
+
*
|
|
59
|
+
* @returns {void}
|
|
60
|
+
*/
|
|
61
|
+
componentWillLoad(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Add overflow behavior
|
|
64
|
+
*
|
|
65
|
+
* @returns {void}
|
|
66
|
+
*/
|
|
67
|
+
componentDidLoad(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Render
|
|
70
|
+
*
|
|
71
|
+
* @returns {HTMLElement} HTML Element
|
|
72
|
+
*/
|
|
73
|
+
render(): HTMLElement;
|
|
74
|
+
}
|
|
@@ -14,11 +14,12 @@ import { Width } from "./components/molecules/inputs/MgInput.conf";
|
|
|
14
14
|
import { RadioOption } from "./components/molecules/inputs/mg-input-radio/mg-input-radio.conf";
|
|
15
15
|
import { SelectOption } from "./components/molecules/inputs/mg-input-select/mg-input-select.conf";
|
|
16
16
|
import { ToggleValue } from "./components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf";
|
|
17
|
-
import {
|
|
17
|
+
import { IconType, SizeType, SlotLabelType } from "./components/molecules/mg-item-more/mg-item-more.conf";
|
|
18
|
+
import { Direction, ItemMoreType, MenuSizeType } from "./components/molecules/menu/mg-menu/mg-menu.conf";
|
|
18
19
|
import { Status } from "./components/molecules/menu/mg-menu-item/mg-menu-item.conf";
|
|
19
20
|
import { Placement } from "@popperjs/core";
|
|
20
21
|
import { SkipLink } from "./components/molecules/mg-skip-links/mg-skip-links.conf";
|
|
21
|
-
import { SizeType, TabItem } from "./components/molecules/mg-tabs/mg-tabs.conf";
|
|
22
|
+
import { SizeType as SizeType1, TabItem } from "./components/molecules/mg-tabs/mg-tabs.conf";
|
|
22
23
|
import { TagVariantType } from "./components/atoms/mg-tag/mg-tag.conf";
|
|
23
24
|
export namespace Components {
|
|
24
25
|
interface MgActionMore {
|
|
@@ -884,19 +885,33 @@ export namespace Components {
|
|
|
884
885
|
*/
|
|
885
886
|
"value": any;
|
|
886
887
|
}
|
|
888
|
+
interface MgItemMore {
|
|
889
|
+
/**
|
|
890
|
+
* Define icon Default: {icon: 'ellipsis-vertical'}
|
|
891
|
+
*/
|
|
892
|
+
"icon": IconType;
|
|
893
|
+
/**
|
|
894
|
+
* Define component child menu size.
|
|
895
|
+
*/
|
|
896
|
+
"size": SizeType;
|
|
897
|
+
/**
|
|
898
|
+
* Define slot label element Default: {display: false}
|
|
899
|
+
*/
|
|
900
|
+
"slotlabel": SlotLabelType;
|
|
901
|
+
}
|
|
887
902
|
interface MgMenu {
|
|
888
903
|
/**
|
|
889
904
|
* Component display direction. Default: "horizontal"
|
|
890
905
|
*/
|
|
891
906
|
"direction": Direction;
|
|
892
907
|
/**
|
|
893
|
-
*
|
|
908
|
+
* Customize "mg-item-more" element Used with direction: 'vertical' to manage overflow
|
|
894
909
|
*/
|
|
895
|
-
"
|
|
910
|
+
"itemMore": ItemMoreType;
|
|
896
911
|
/**
|
|
897
|
-
*
|
|
912
|
+
* Menu label. Include short menu description. Required for accessibility
|
|
898
913
|
*/
|
|
899
|
-
"
|
|
914
|
+
"label": string;
|
|
900
915
|
/**
|
|
901
916
|
* Define mg-menu size Default: 'regular'
|
|
902
917
|
*/
|
|
@@ -911,6 +926,10 @@ export namespace Components {
|
|
|
911
926
|
* Define menu-item href when defined menu-item contain an anchor instead of button
|
|
912
927
|
*/
|
|
913
928
|
"href": string;
|
|
929
|
+
/**
|
|
930
|
+
* Identifier is used to control mg-popover Default: createID('mg-menu-item');
|
|
931
|
+
*/
|
|
932
|
+
"identifier": string;
|
|
914
933
|
/**
|
|
915
934
|
* Define menu-item status. Default: "visible"
|
|
916
935
|
*/
|
|
@@ -1060,7 +1079,7 @@ export namespace Components {
|
|
|
1060
1079
|
/**
|
|
1061
1080
|
* Define tabs size
|
|
1062
1081
|
*/
|
|
1063
|
-
"size":
|
|
1082
|
+
"size": SizeType1;
|
|
1064
1083
|
}
|
|
1065
1084
|
interface MgTag {
|
|
1066
1085
|
/**
|
|
@@ -1099,6 +1118,10 @@ export namespace Components {
|
|
|
1099
1118
|
"placement": Placement;
|
|
1100
1119
|
}
|
|
1101
1120
|
}
|
|
1121
|
+
export interface MgButtonCustomEvent<T> extends CustomEvent<T> {
|
|
1122
|
+
detail: T;
|
|
1123
|
+
target: HTMLMgButtonElement;
|
|
1124
|
+
}
|
|
1102
1125
|
export interface MgDetailsCustomEvent<T> extends CustomEvent<T> {
|
|
1103
1126
|
detail: T;
|
|
1104
1127
|
target: HTMLMgDetailsElement;
|
|
@@ -1296,6 +1319,12 @@ declare global {
|
|
|
1296
1319
|
prototype: HTMLMgInputToggleElement;
|
|
1297
1320
|
new (): HTMLMgInputToggleElement;
|
|
1298
1321
|
};
|
|
1322
|
+
interface HTMLMgItemMoreElement extends Components.MgItemMore, HTMLStencilElement {
|
|
1323
|
+
}
|
|
1324
|
+
var HTMLMgItemMoreElement: {
|
|
1325
|
+
prototype: HTMLMgItemMoreElement;
|
|
1326
|
+
new (): HTMLMgItemMoreElement;
|
|
1327
|
+
};
|
|
1299
1328
|
interface HTMLMgMenuElement extends Components.MgMenu, HTMLStencilElement {
|
|
1300
1329
|
}
|
|
1301
1330
|
var HTMLMgMenuElement: {
|
|
@@ -1383,6 +1412,7 @@ declare global {
|
|
|
1383
1412
|
"mg-input-textarea": HTMLMgInputTextareaElement;
|
|
1384
1413
|
"mg-input-title": HTMLMgInputTitleElement;
|
|
1385
1414
|
"mg-input-toggle": HTMLMgInputToggleElement;
|
|
1415
|
+
"mg-item-more": HTMLMgItemMoreElement;
|
|
1386
1416
|
"mg-menu": HTMLMgMenuElement;
|
|
1387
1417
|
"mg-menu-item": HTMLMgMenuItemElement;
|
|
1388
1418
|
"mg-message": HTMLMgMessageElement;
|
|
@@ -1462,6 +1492,10 @@ declare namespace LocalJSX {
|
|
|
1462
1492
|
* aria-label In case button text is not explicit enough
|
|
1463
1493
|
*/
|
|
1464
1494
|
"label"?: string;
|
|
1495
|
+
/**
|
|
1496
|
+
* Emmited event when disabled change
|
|
1497
|
+
*/
|
|
1498
|
+
"onDisabled-change"?: (event: MgButtonCustomEvent<MgButton['disabled']>) => void;
|
|
1465
1499
|
/**
|
|
1466
1500
|
* Define button type
|
|
1467
1501
|
*/
|
|
@@ -2294,19 +2328,33 @@ declare namespace LocalJSX {
|
|
|
2294
2328
|
*/
|
|
2295
2329
|
"value"?: any;
|
|
2296
2330
|
}
|
|
2331
|
+
interface MgItemMore {
|
|
2332
|
+
/**
|
|
2333
|
+
* Define icon Default: {icon: 'ellipsis-vertical'}
|
|
2334
|
+
*/
|
|
2335
|
+
"icon"?: IconType;
|
|
2336
|
+
/**
|
|
2337
|
+
* Define component child menu size.
|
|
2338
|
+
*/
|
|
2339
|
+
"size"?: SizeType;
|
|
2340
|
+
/**
|
|
2341
|
+
* Define slot label element Default: {display: false}
|
|
2342
|
+
*/
|
|
2343
|
+
"slotlabel"?: SlotLabelType;
|
|
2344
|
+
}
|
|
2297
2345
|
interface MgMenu {
|
|
2298
2346
|
/**
|
|
2299
2347
|
* Component display direction. Default: "horizontal"
|
|
2300
2348
|
*/
|
|
2301
2349
|
"direction"?: Direction;
|
|
2302
2350
|
/**
|
|
2303
|
-
*
|
|
2351
|
+
* Customize "mg-item-more" element Used with direction: 'vertical' to manage overflow
|
|
2304
2352
|
*/
|
|
2305
|
-
"
|
|
2353
|
+
"itemMore"?: ItemMoreType;
|
|
2306
2354
|
/**
|
|
2307
|
-
*
|
|
2355
|
+
* Menu label. Include short menu description. Required for accessibility
|
|
2308
2356
|
*/
|
|
2309
|
-
"
|
|
2357
|
+
"label": string;
|
|
2310
2358
|
/**
|
|
2311
2359
|
* Define mg-menu size Default: 'regular'
|
|
2312
2360
|
*/
|
|
@@ -2321,6 +2369,10 @@ declare namespace LocalJSX {
|
|
|
2321
2369
|
* Define menu-item href when defined menu-item contain an anchor instead of button
|
|
2322
2370
|
*/
|
|
2323
2371
|
"href"?: string;
|
|
2372
|
+
/**
|
|
2373
|
+
* Identifier is used to control mg-popover Default: createID('mg-menu-item');
|
|
2374
|
+
*/
|
|
2375
|
+
"identifier"?: string;
|
|
2324
2376
|
/**
|
|
2325
2377
|
* Emited event when status change
|
|
2326
2378
|
*/
|
|
@@ -2514,7 +2566,7 @@ declare namespace LocalJSX {
|
|
|
2514
2566
|
/**
|
|
2515
2567
|
* Define tabs size
|
|
2516
2568
|
*/
|
|
2517
|
-
"size"?:
|
|
2569
|
+
"size"?: SizeType1;
|
|
2518
2570
|
}
|
|
2519
2571
|
interface MgTag {
|
|
2520
2572
|
/**
|
|
@@ -2573,6 +2625,7 @@ declare namespace LocalJSX {
|
|
|
2573
2625
|
"mg-input-textarea": MgInputTextarea;
|
|
2574
2626
|
"mg-input-title": MgInputTitle;
|
|
2575
2627
|
"mg-input-toggle": MgInputToggle;
|
|
2628
|
+
"mg-item-more": MgItemMore;
|
|
2576
2629
|
"mg-menu": MgMenu;
|
|
2577
2630
|
"mg-menu-item": MgMenuItem;
|
|
2578
2631
|
"mg-message": MgMessage;
|
|
@@ -2610,6 +2663,7 @@ declare module "@stencil/core" {
|
|
|
2610
2663
|
"mg-input-textarea": LocalJSX.MgInputTextarea & JSXBase.HTMLAttributes<HTMLMgInputTextareaElement>;
|
|
2611
2664
|
"mg-input-title": LocalJSX.MgInputTitle & JSXBase.HTMLAttributes<HTMLMgInputTitleElement>;
|
|
2612
2665
|
"mg-input-toggle": LocalJSX.MgInputToggle & JSXBase.HTMLAttributes<HTMLMgInputToggleElement>;
|
|
2666
|
+
"mg-item-more": LocalJSX.MgItemMore & JSXBase.HTMLAttributes<HTMLMgItemMoreElement>;
|
|
2613
2667
|
"mg-menu": LocalJSX.MgMenu & JSXBase.HTMLAttributes<HTMLMgMenuElement>;
|
|
2614
2668
|
"mg-menu-item": LocalJSX.MgMenuItem & JSXBase.HTMLAttributes<HTMLMgMenuItemElement>;
|
|
2615
2669
|
"mg-message": LocalJSX.MgMessage & JSXBase.HTMLAttributes<HTMLMgMessageElement>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare enum OverflowBehaviorElements {
|
|
2
|
-
MORE = "data-overflow-more",
|
|
3
2
|
BASE_INDEX = "data-overflow-base-index",
|
|
4
3
|
PROXY_INDEX = "data-overflow-proxy-index"
|
|
5
4
|
}
|
|
6
5
|
export declare class OverflowBehavior {
|
|
7
6
|
private element;
|
|
8
7
|
private render;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private
|
|
8
|
+
private _resizeObserver;
|
|
9
|
+
private _moreElement;
|
|
10
|
+
private _baseChildren;
|
|
11
|
+
private _proxyChildren;
|
|
12
12
|
constructor(element: Element, render: () => HTMLElement);
|
|
13
13
|
/**********
|
|
14
14
|
* Public *
|
|
@@ -25,10 +25,17 @@ export declare class OverflowBehavior {
|
|
|
25
25
|
/**
|
|
26
26
|
* run overflow behavior
|
|
27
27
|
*
|
|
28
|
-
* @param {number} width width of the container
|
|
28
|
+
* @param {number} width width of the container. Optional.
|
|
29
29
|
* @returns {void}
|
|
30
30
|
*/
|
|
31
31
|
private run;
|
|
32
|
+
/**
|
|
33
|
+
* Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']
|
|
34
|
+
*
|
|
35
|
+
* @param {Element} element element to parse
|
|
36
|
+
* @returns {Element[]} children
|
|
37
|
+
*/
|
|
38
|
+
private getInteractiveItems;
|
|
32
39
|
/**
|
|
33
40
|
* Update displayed items in container from a given available space
|
|
34
41
|
*
|