@mgdis/mg-components 5.20.0 → 5.21.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_34.cjs.entry.js +226 -198
- package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +30 -15
- package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
- package/dist/collection/assets/icons/index.js +189 -189
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.conf.js +9 -0
- package/dist/collection/components/molecules/mg-form/mg-form.conf.js.map +1 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +81 -8
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +30 -15
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
- package/dist/collection/utils/behaviors.utils.spec.js +4 -0
- package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
- package/dist/components/mg-form.js +40 -8
- package/dist/components/mg-form.js.map +1 -1
- package/dist/components/mg-icon2.js +189 -189
- package/dist/components/mg-icon2.js.map +1 -1
- package/dist/components/mg-item-more.js +30 -15
- package/dist/components/mg-item-more.js.map +1 -1
- package/dist/components/mg-menu-item2.js +2 -2
- package/dist/components/mg-menu-item2.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_34.entry.js +226 -198
- package/dist/esm/mg-action-more_34.entry.js.map +1 -1
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +30 -15
- package/dist/esm/mg-item-more.entry.js.map +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.esm.js.map +1 -1
- package/dist/mg-components/{p-e0fb0f3c.entry.js → p-ce356bc0.entry.js} +2 -2
- package/dist/mg-components/p-ce356bc0.entry.js.map +1 -0
- package/dist/mg-components/p-e591ba8f.entry.js +2 -0
- package/dist/mg-components/p-e591ba8f.entry.js.map +1 -0
- package/dist/types/components/molecules/mg-form/mg-form.conf.d.ts +16 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +18 -1
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +13 -7
- package/dist/types/components.d.ts +18 -0
- package/package.json +6 -6
- package/dist/mg-components/p-629454f7.entry.js +0 -2
- package/dist/mg-components/p-629454f7.entry.js.map +0 -1
- package/dist/mg-components/p-e0fb0f3c.entry.js.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of all possibles roles
|
|
3
|
+
*/
|
|
4
|
+
export declare const roles: readonly ["form", "search", "none", "presentation"];
|
|
5
|
+
/**
|
|
6
|
+
* Aria Role type from roles
|
|
7
|
+
*/
|
|
8
|
+
export type AriaRoleType = (typeof roles)[number];
|
|
9
|
+
/**
|
|
10
|
+
* List of all possibles required message status
|
|
11
|
+
*/
|
|
12
|
+
export declare const requiredMessageStatus: readonly ["default", "hide"];
|
|
13
|
+
/**
|
|
14
|
+
* RequiredMessageStatus type from requiredMessageStatus
|
|
15
|
+
*/
|
|
16
|
+
export type RequiredMessageStatusType = (typeof requiredMessageStatus)[number];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
2
|
import { ClassList } from '../../../utils/components.utils';
|
|
3
|
+
import { AriaRoleType, RequiredMessageStatusType } from './mg-form.conf';
|
|
3
4
|
export declare class MgForm {
|
|
4
5
|
/************
|
|
5
6
|
* Internal *
|
|
@@ -29,6 +30,22 @@ export declare class MgForm {
|
|
|
29
30
|
* Define if form is readonly
|
|
30
31
|
*/
|
|
31
32
|
readonly: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Define when required message is display.
|
|
35
|
+
* When it is unset, component use it internal logic to manage "required message" help text display.
|
|
36
|
+
* When you set the prop to `default`, you override the component internal logique to torce it display "required message" help text.
|
|
37
|
+
* When you set the prop to `hide`, it will prevent the rendering of the message in the component's DOM.
|
|
38
|
+
* As **this element is an accessibility requirement in the view**,
|
|
39
|
+
* you **MUST*** re-implement this message on your own and display it when your form contains required inputs.
|
|
40
|
+
*/
|
|
41
|
+
requiredMessage: RequiredMessageStatusType;
|
|
42
|
+
validateRequiredMessage(newValue: any): void;
|
|
43
|
+
/**
|
|
44
|
+
* Define `<form/>` element aria role
|
|
45
|
+
* see more about aria roles use case: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
|
|
46
|
+
*/
|
|
47
|
+
ariaRole: AriaRoleType;
|
|
48
|
+
validateAriaRole(newValue: MgForm['ariaRole']): void;
|
|
32
49
|
/**
|
|
33
50
|
* Define if form is disabled
|
|
34
51
|
*/
|
|
@@ -49,7 +66,7 @@ export declare class MgForm {
|
|
|
49
66
|
/**
|
|
50
67
|
* Required message
|
|
51
68
|
*/
|
|
52
|
-
|
|
69
|
+
requiredMessageText: string;
|
|
53
70
|
/**
|
|
54
71
|
* Emitted event on form validity check
|
|
55
72
|
* Tells if form is valid or not
|
|
@@ -5,8 +5,10 @@ export declare class MgItemMore {
|
|
|
5
5
|
************/
|
|
6
6
|
private readonly name;
|
|
7
7
|
private messages;
|
|
8
|
-
private
|
|
8
|
+
private parentMenuItems;
|
|
9
|
+
private moreElementMenuItem;
|
|
9
10
|
private overflowBehavior;
|
|
11
|
+
private canRenderMgMenuItemOverflowElement;
|
|
10
12
|
/**************
|
|
11
13
|
* Decorators *
|
|
12
14
|
**************/
|
|
@@ -44,18 +46,22 @@ export declare class MgItemMore {
|
|
|
44
46
|
/*************
|
|
45
47
|
* Lifecycle *
|
|
46
48
|
*************/
|
|
47
|
-
/**
|
|
48
|
-
* Disconnect overflow ResizeObserver
|
|
49
|
-
*/
|
|
50
|
-
disconnectedCallback(): void;
|
|
51
49
|
/**
|
|
52
50
|
* Set variables and validate props
|
|
53
51
|
*/
|
|
54
52
|
componentWillLoad(): void;
|
|
55
53
|
/**
|
|
56
|
-
*
|
|
54
|
+
* Ensure parent DOM is fully rendered with timeout method before parse elements
|
|
55
|
+
*/
|
|
56
|
+
componentDidLoad(): ReturnType<typeof setTimeout>;
|
|
57
|
+
/**
|
|
58
|
+
* Set OverflowBehavior when parentMenu state is upate AND defined
|
|
57
59
|
*/
|
|
58
|
-
|
|
60
|
+
componentDidUpdate(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Disconnect overflow ResizeObserver
|
|
63
|
+
*/
|
|
64
|
+
disconnectedCallback(): void;
|
|
59
65
|
/**
|
|
60
66
|
* Render
|
|
61
67
|
* @returns HTML Element
|
|
@@ -9,6 +9,7 @@ import { MgActionMoreButtonType, MgActionMoreIconType, MgActionMoreItemType } fr
|
|
|
9
9
|
import { BadgeVariantType } from "./components/atoms/mg-badge/mg-badge.conf";
|
|
10
10
|
import { ButtonType, VariantType } from "./components/atoms/mg-button/mg-button.conf";
|
|
11
11
|
import { VariantStyleType, VariantType as VariantType1 } from "./components/atoms/mg-card/mg-card.conf";
|
|
12
|
+
import { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/mg-form/mg-form.conf";
|
|
12
13
|
import { IconSizeType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
|
|
13
14
|
import { CheckboxItem, CheckboxType, CheckboxValue, SectionKind } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
|
|
14
15
|
import { Width } from "./components/molecules/inputs/MgInput.conf";
|
|
@@ -30,6 +31,7 @@ export { MgActionMoreButtonType, MgActionMoreIconType, MgActionMoreItemType } fr
|
|
|
30
31
|
export { BadgeVariantType } from "./components/atoms/mg-badge/mg-badge.conf";
|
|
31
32
|
export { ButtonType, VariantType } from "./components/atoms/mg-button/mg-button.conf";
|
|
32
33
|
export { VariantStyleType, VariantType as VariantType1 } from "./components/atoms/mg-card/mg-card.conf";
|
|
34
|
+
export { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/mg-form/mg-form.conf";
|
|
33
35
|
export { IconSizeType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
|
|
34
36
|
export { CheckboxItem, CheckboxType, CheckboxValue, SectionKind } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
|
|
35
37
|
export { Width } from "./components/molecules/inputs/MgInput.conf";
|
|
@@ -171,6 +173,10 @@ export namespace Components {
|
|
|
171
173
|
"size": 'regular' | 'full';
|
|
172
174
|
}
|
|
173
175
|
interface MgForm {
|
|
176
|
+
/**
|
|
177
|
+
* Define `<form/>` element aria role see more about aria roles use case: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
|
|
178
|
+
*/
|
|
179
|
+
"ariaRole": AriaRoleType;
|
|
174
180
|
/**
|
|
175
181
|
* Define if form is disabled
|
|
176
182
|
*/
|
|
@@ -195,6 +201,10 @@ export namespace Components {
|
|
|
195
201
|
* Define if form is readonly
|
|
196
202
|
*/
|
|
197
203
|
"readonly": boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Define when required message is display. When it is unset, component use it internal logic to manage "required message" help text display. When you set the prop to `default`, you override the component internal logique to torce it display "required message" help text. When you set the prop to `hide`, it will prevent the rendering of the message in the component's DOM. As **this element is an accessibility requirement in the view**, you **MUST*** re-implement this message on your own and display it when your form contains required inputs.
|
|
206
|
+
*/
|
|
207
|
+
"requiredMessage": RequiredMessageStatusType;
|
|
198
208
|
/**
|
|
199
209
|
* Define form valid state
|
|
200
210
|
*/
|
|
@@ -2008,6 +2018,10 @@ declare namespace LocalJSX {
|
|
|
2008
2018
|
"size"?: 'regular' | 'full';
|
|
2009
2019
|
}
|
|
2010
2020
|
interface MgForm {
|
|
2021
|
+
/**
|
|
2022
|
+
* Define `<form/>` element aria role see more about aria roles use case: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
|
|
2023
|
+
*/
|
|
2024
|
+
"ariaRole"?: AriaRoleType;
|
|
2011
2025
|
/**
|
|
2012
2026
|
* Define if form is disabled
|
|
2013
2027
|
*/
|
|
@@ -2036,6 +2050,10 @@ declare namespace LocalJSX {
|
|
|
2036
2050
|
* Define if form is readonly
|
|
2037
2051
|
*/
|
|
2038
2052
|
"readonly"?: boolean;
|
|
2053
|
+
/**
|
|
2054
|
+
* Define when required message is display. When it is unset, component use it internal logic to manage "required message" help text display. When you set the prop to `default`, you override the component internal logique to torce it display "required message" help text. When you set the prop to `hide`, it will prevent the rendering of the message in the component's DOM. As **this element is an accessibility requirement in the view**, you **MUST*** re-implement this message on your own and display it when your form contains required inputs.
|
|
2055
|
+
*/
|
|
2056
|
+
"requiredMessage"?: RequiredMessageStatusType;
|
|
2039
2057
|
/**
|
|
2040
2058
|
* Define form valid state
|
|
2041
2059
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgdis/mg-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.21.0",
|
|
4
4
|
"description": "MG Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@popperjs/core": "^2.11.8",
|
|
27
27
|
"@stencil/core": "4.8.2",
|
|
28
|
-
"@mgdis/img": "1.
|
|
29
|
-
"@mgdis/styles": "1.0.
|
|
28
|
+
"@mgdis/img": "1.6.0",
|
|
29
|
+
"@mgdis/styles": "1.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@playwright/test": "1.40.1",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"sass": "^1.69.5",
|
|
59
59
|
"storybook": "^7.5.3",
|
|
60
60
|
"ts-node": "^10.9.1",
|
|
61
|
-
"typescript": "5.
|
|
62
|
-
"@mgdis/playwright-helpers": "1.0.0",
|
|
63
|
-
"tsconfig": "1.0.0",
|
|
61
|
+
"typescript": "5.3.3",
|
|
64
62
|
"eslint-config-stencil": "1.1.1",
|
|
63
|
+
"tsconfig": "1.0.0",
|
|
64
|
+
"@mgdis/playwright-helpers": "1.0.0",
|
|
65
65
|
"@mgdis/linting-stencil": "1.1.0"
|
|
66
66
|
},
|
|
67
67
|
"license": "BSD-3-Clause",
|