@mgdis/mg-components 4.1.0 → 4.2.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/{index-88560a66.js → index-64cee0c8.js} +248 -81
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{mg-badge_24.cjs.entry.js → mg-badge_23.cjs.entry.js} +206 -2180
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-modal.cjs.entry.js +8 -1
- package/dist/cjs/mg-popover.cjs.entry.js +171 -0
- package/dist/cjs/popper-71bf3058.js +1790 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +116 -99
- package/dist/collection/components/atoms/mg-button/mg-button.js +221 -220
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +72 -69
- package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +1 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +102 -92
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +83 -67
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +64 -55
- package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +3 -6
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +120 -106
- package/dist/collection/components/molecules/inputs/MgInput.js +8 -17
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +323 -318
- package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +356 -361
- package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +1 -2
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +462 -456
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +347 -340
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +348 -343
- package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +406 -401
- package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +12 -15
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +2 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +476 -473
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +461 -456
- package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +2 -8
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +299 -298
- package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +1 -3
- package/dist/collection/components/molecules/mg-details/mg-details.js +95 -93
- package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +13 -27
- package/dist/collection/components/molecules/mg-form/mg-form.js +175 -166
- package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +2 -6
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +37 -37
- package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +1 -3
- package/dist/collection/components/molecules/mg-message/mg-message.js +154 -153
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +11 -15
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +147 -134
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +5 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +112 -117
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +1 -8
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +192 -189
- package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +1 -4
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +129 -127
- package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +1 -5
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +150 -135
- package/dist/collection/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/collection/locales/en/messages.json +50 -0
- package/dist/collection/locales/fr/messages.json +50 -0
- package/dist/collection/stories/grids.stories.js +1 -44
- package/dist/collection/stories/helpers.stories.js +1 -19
- package/dist/collection/stories/icons.stories.js +1 -4
- package/dist/collection/stories/typography.stories.js +1 -12
- package/dist/collection/variables.css +3 -2
- package/dist/collection/variables.scss +3 -2
- package/dist/components/MgInput.js +6 -3
- package/dist/components/mg-badge2.js +7 -0
- package/dist/components/mg-button2.js +2 -7
- package/dist/components/mg-input-checkbox.js +1 -6
- package/dist/components/mg-input-date.js +10 -27
- package/dist/components/mg-input-numeric.js +1 -6
- package/dist/components/mg-input-password.js +1 -6
- package/dist/components/mg-input-radio.js +1 -6
- package/dist/components/mg-input-select2.js +1 -6
- package/dist/components/mg-input-text2.js +3 -8
- package/dist/components/mg-input-textarea.js +2 -7
- package/dist/components/mg-input-title2.js +9 -0
- package/dist/components/mg-input-toggle.js +2 -7
- package/dist/components/mg-modal.js +7 -0
- package/dist/components/mg-pagination.js +3 -3
- package/dist/components/mg-panel.js +8 -4
- package/dist/components/mg-tabs.js +8 -1
- package/dist/components/mg-tooltip2.js +7 -0
- package/dist/esm/{index-bca81100.js → index-120f47fd.js} +248 -81
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-badge_24.entry.js → mg-badge_23.entry.js} +207 -2180
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-modal.entry.js +8 -1
- package/dist/esm/mg-popover.entry.js +167 -0
- package/dist/esm/popper-93ecb064.js +1788 -0
- package/dist/mg-components/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/mg-components/locales/en/messages.json +50 -0
- package/dist/mg-components/locales/fr/messages.json +50 -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-21991be8.entry.js +1 -0
- package/dist/mg-components/p-36a64f8c.entry.js +1 -0
- package/dist/mg-components/p-4c66f794.js +1 -0
- package/dist/mg-components/{p-b14a3443.js → p-7bc32a2f.js} +0 -0
- package/dist/mg-components/p-b380a0df.entry.js +1 -0
- package/dist/mg-components/variables.css +3 -2
- package/dist/mg-components/variables.scss +3 -2
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -1
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +1 -10
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -0
- package/dist/types/components.d.ts +29 -29
- package/loader/package.json +1 -0
- package/package.json +8 -8
- package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/p-a2883dc7.entry.js +0 -1
- package/dist/mg-components/p-cffe0519.entry.js +0 -1
|
@@ -22,7 +22,6 @@ export declare class MgInputDate {
|
|
|
22
22
|
validateValue(newValue: string): void;
|
|
23
23
|
/**
|
|
24
24
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
25
|
-
* If not set, it will be created.
|
|
26
25
|
*/
|
|
27
26
|
identifier: string;
|
|
28
27
|
/**
|
|
@@ -75,13 +74,12 @@ export declare class MgInputDate {
|
|
|
75
74
|
* format: yyyy-mm-dd
|
|
76
75
|
*/
|
|
77
76
|
min: string;
|
|
78
|
-
validateMin(newValue: string): void;
|
|
79
77
|
/**
|
|
80
78
|
* Define input maximum date
|
|
81
79
|
* format: yyyy-mm-dd
|
|
82
80
|
*/
|
|
83
81
|
max: string;
|
|
84
|
-
|
|
82
|
+
validateMinMax(newValue: string): void;
|
|
85
83
|
/**
|
|
86
84
|
* Component classes
|
|
87
85
|
*/
|
|
@@ -112,13 +110,6 @@ export declare class MgInputDate {
|
|
|
112
110
|
* Handle blur event
|
|
113
111
|
*/
|
|
114
112
|
private handleBlur;
|
|
115
|
-
/**
|
|
116
|
-
* Date format validation
|
|
117
|
-
*
|
|
118
|
-
* @param {string} date date to validate
|
|
119
|
-
* @returns {void}
|
|
120
|
-
*/
|
|
121
|
-
private validateDateFormat;
|
|
122
113
|
/**
|
|
123
114
|
* Check if input is valid
|
|
124
115
|
*/
|
|
@@ -60,7 +60,7 @@ export namespace Components {
|
|
|
60
60
|
*/
|
|
61
61
|
"haspopup": boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
62
62
|
/**
|
|
63
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
63
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
64
64
|
*/
|
|
65
65
|
"identifier": string;
|
|
66
66
|
/**
|
|
@@ -178,7 +178,7 @@ export namespace Components {
|
|
|
178
178
|
*/
|
|
179
179
|
"helpText": string;
|
|
180
180
|
/**
|
|
181
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
181
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
182
182
|
*/
|
|
183
183
|
"identifier": string;
|
|
184
184
|
/**
|
|
@@ -241,7 +241,7 @@ export namespace Components {
|
|
|
241
241
|
*/
|
|
242
242
|
"helpText": string;
|
|
243
243
|
/**
|
|
244
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
244
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
245
245
|
*/
|
|
246
246
|
"identifier": string;
|
|
247
247
|
/**
|
|
@@ -316,7 +316,7 @@ export namespace Components {
|
|
|
316
316
|
*/
|
|
317
317
|
"helpText": string;
|
|
318
318
|
/**
|
|
319
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
319
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
320
320
|
*/
|
|
321
321
|
"identifier": string;
|
|
322
322
|
/**
|
|
@@ -399,7 +399,7 @@ export namespace Components {
|
|
|
399
399
|
*/
|
|
400
400
|
"helpText": string;
|
|
401
401
|
/**
|
|
402
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
402
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
403
403
|
*/
|
|
404
404
|
"identifier": string;
|
|
405
405
|
/**
|
|
@@ -466,7 +466,7 @@ export namespace Components {
|
|
|
466
466
|
*/
|
|
467
467
|
"helpText": string;
|
|
468
468
|
/**
|
|
469
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
469
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
470
470
|
*/
|
|
471
471
|
"identifier": string;
|
|
472
472
|
/**
|
|
@@ -533,7 +533,7 @@ export namespace Components {
|
|
|
533
533
|
*/
|
|
534
534
|
"helpText": string;
|
|
535
535
|
/**
|
|
536
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
536
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
537
537
|
*/
|
|
538
538
|
"identifier": string;
|
|
539
539
|
/**
|
|
@@ -620,7 +620,7 @@ export namespace Components {
|
|
|
620
620
|
*/
|
|
621
621
|
"icon": string;
|
|
622
622
|
/**
|
|
623
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
623
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
624
624
|
*/
|
|
625
625
|
"identifier": string;
|
|
626
626
|
/**
|
|
@@ -712,7 +712,7 @@ export namespace Components {
|
|
|
712
712
|
*/
|
|
713
713
|
"helpText": string;
|
|
714
714
|
/**
|
|
715
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
715
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
716
716
|
*/
|
|
717
717
|
"identifier": string;
|
|
718
718
|
/**
|
|
@@ -808,7 +808,7 @@ export namespace Components {
|
|
|
808
808
|
*/
|
|
809
809
|
"helpText": string;
|
|
810
810
|
/**
|
|
811
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
811
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
812
812
|
*/
|
|
813
813
|
"identifier": string;
|
|
814
814
|
/**
|
|
@@ -1310,7 +1310,7 @@ declare namespace LocalJSX {
|
|
|
1310
1310
|
*/
|
|
1311
1311
|
"haspopup"?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
1312
1312
|
/**
|
|
1313
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1313
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1314
1314
|
*/
|
|
1315
1315
|
"identifier"?: string;
|
|
1316
1316
|
/**
|
|
@@ -1430,9 +1430,9 @@ declare namespace LocalJSX {
|
|
|
1430
1430
|
*/
|
|
1431
1431
|
"helpText"?: string;
|
|
1432
1432
|
/**
|
|
1433
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1433
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1434
1434
|
*/
|
|
1435
|
-
"identifier"
|
|
1435
|
+
"identifier": string;
|
|
1436
1436
|
/**
|
|
1437
1437
|
* Define if inputs are display verticaly
|
|
1438
1438
|
*/
|
|
@@ -1496,9 +1496,9 @@ declare namespace LocalJSX {
|
|
|
1496
1496
|
*/
|
|
1497
1497
|
"helpText"?: string;
|
|
1498
1498
|
/**
|
|
1499
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1499
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1500
1500
|
*/
|
|
1501
|
-
"identifier"
|
|
1501
|
+
"identifier": string;
|
|
1502
1502
|
/**
|
|
1503
1503
|
* Define input invalid state
|
|
1504
1504
|
*/
|
|
@@ -1574,9 +1574,9 @@ declare namespace LocalJSX {
|
|
|
1574
1574
|
*/
|
|
1575
1575
|
"helpText"?: string;
|
|
1576
1576
|
/**
|
|
1577
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1577
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1578
1578
|
*/
|
|
1579
|
-
"identifier"
|
|
1579
|
+
"identifier": string;
|
|
1580
1580
|
/**
|
|
1581
1581
|
* Override integer length integer is the number before the decimal point
|
|
1582
1582
|
*/
|
|
@@ -1660,9 +1660,9 @@ declare namespace LocalJSX {
|
|
|
1660
1660
|
*/
|
|
1661
1661
|
"helpText"?: string;
|
|
1662
1662
|
/**
|
|
1663
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1663
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1664
1664
|
*/
|
|
1665
|
-
"identifier"
|
|
1665
|
+
"identifier": string;
|
|
1666
1666
|
/**
|
|
1667
1667
|
* Define input invalid state
|
|
1668
1668
|
*/
|
|
@@ -1730,9 +1730,9 @@ declare namespace LocalJSX {
|
|
|
1730
1730
|
*/
|
|
1731
1731
|
"helpText"?: string;
|
|
1732
1732
|
/**
|
|
1733
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1733
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1734
1734
|
*/
|
|
1735
|
-
"identifier"
|
|
1735
|
+
"identifier": string;
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Define if inputs are display verticaly
|
|
1738
1738
|
*/
|
|
@@ -1800,9 +1800,9 @@ declare namespace LocalJSX {
|
|
|
1800
1800
|
*/
|
|
1801
1801
|
"helpText"?: string;
|
|
1802
1802
|
/**
|
|
1803
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1803
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1804
1804
|
*/
|
|
1805
|
-
"identifier"
|
|
1805
|
+
"identifier": string;
|
|
1806
1806
|
/**
|
|
1807
1807
|
* Define input invalid state
|
|
1808
1808
|
*/
|
|
@@ -1890,9 +1890,9 @@ declare namespace LocalJSX {
|
|
|
1890
1890
|
*/
|
|
1891
1891
|
"icon"?: string;
|
|
1892
1892
|
/**
|
|
1893
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1893
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1894
1894
|
*/
|
|
1895
|
-
"identifier"
|
|
1895
|
+
"identifier": string;
|
|
1896
1896
|
/**
|
|
1897
1897
|
* Define input invalid state
|
|
1898
1898
|
*/
|
|
@@ -1980,9 +1980,9 @@ declare namespace LocalJSX {
|
|
|
1980
1980
|
*/
|
|
1981
1981
|
"helpText"?: string;
|
|
1982
1982
|
/**
|
|
1983
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1983
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
1984
1984
|
*/
|
|
1985
|
-
"identifier"
|
|
1985
|
+
"identifier": string;
|
|
1986
1986
|
/**
|
|
1987
1987
|
* Define input invalid state
|
|
1988
1988
|
*/
|
|
@@ -2084,9 +2084,9 @@ declare namespace LocalJSX {
|
|
|
2084
2084
|
*/
|
|
2085
2085
|
"helpText"?: string;
|
|
2086
2086
|
/**
|
|
2087
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
2087
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
2088
2088
|
*/
|
|
2089
|
-
"identifier"
|
|
2089
|
+
"identifier": string;
|
|
2090
2090
|
/**
|
|
2091
2091
|
* Define if toggle display icon
|
|
2092
2092
|
*/
|
package/loader/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgdis/mg-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "MG Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@popperjs/core": "^2.11.2",
|
|
45
|
-
"@stencil/core": "^2.
|
|
45
|
+
"@stencil/core": "^2.18.0",
|
|
46
46
|
"normalize.css": "^8.0.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@pxtrn/storybook-addon-docs-stencil": "^6.4.1",
|
|
52
52
|
"@stencil/eslint-plugin": "^0.4.0",
|
|
53
53
|
"@stencil/sass": "^1.5.2",
|
|
54
|
-
"@storybook/addon-a11y": "^6.5.
|
|
55
|
-
"@storybook/addon-actions": "^6.5.
|
|
56
|
-
"@storybook/addon-docs": "^6.5.
|
|
57
|
-
"@storybook/addon-essentials": "^6.5.
|
|
58
|
-
"@storybook/addon-links": "^6.5.
|
|
59
|
-
"@storybook/html": "^6.5.
|
|
54
|
+
"@storybook/addon-a11y": "^6.5.12",
|
|
55
|
+
"@storybook/addon-actions": "^6.5.12",
|
|
56
|
+
"@storybook/addon-docs": "^6.5.12",
|
|
57
|
+
"@storybook/addon-essentials": "^6.5.12",
|
|
58
|
+
"@storybook/addon-links": "^6.5.12",
|
|
59
|
+
"@storybook/html": "^6.5.12",
|
|
60
60
|
"@storybook/preset-scss": "^1.0.3",
|
|
61
61
|
"@types/jest": "^26.0.24",
|
|
62
62
|
"@types/jest-image-snapshot": "^4.3.1",
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,g as a}from"./p-b14a3443.js";import{c as s,C as e,i as l}from"./p-5f89600c.js";const m=class{constructor(o){t(this,o),this.componentShow=i(this,"component-show",7),this.componentHide=i(this,"component-hide",7),this.classHide="mg-modal--hide",this.closeButtonId="",this.titleId="",this.identifier=s("mg-modal"),this.closeButton=!1,this.hide=!1,this.hasActions=!1,this.hasContent=!1,this.classList=new e(["mg-modal"]),this.handleClose=()=>{this.hide=!0}}validateHide(t){t?(this.componentHide.emit(),this.classList.add(this.classHide)):(this.componentShow.emit(),this.classList.delete(this.classHide))}handleKeyDown(t){this.closeButton&&"Escape"===t.key&&(this.hide=!0)}componentWillLoad(){this.messages=l(this.element).messages,this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.hasContent=null!==this.element.querySelector('[slot="content"]'),this.closeButton&&(this.closeButtonId=`${this.identifier}-close-button`),this.titleId=`${this.identifier}-title`,this.validateHide(this.hide)}render(){return o("section",{role:"dialog",id:this.identifier,class:this.classList.join(),tabindex:"-1","aria-labelledby":this.titleId,"aria-modal":"true","aria-hidden":this.hide},o("article",{class:"mg-modal__dialog"},o("header",{class:"mg-modal__header"},this.closeButton&&o("span",{class:"mg-modal__close-button"},o("mg-button",{identifier:this.closeButtonId,"is-icon":!0,variant:"flat",label:this.messages.modal.closeButton,onClick:this.handleClose},o("mg-icon",{icon:"cross"}))),o("h1",{class:"mg-modal__title",id:this.titleId},this.modalTitle)),this.hasContent&&o("article",{class:"mg-modal__content"},o("slot",{name:"content"})),this.hasActions&&o("footer",{class:"mg-modal__footer"},o("slot",{name:"actions"}))))}get element(){return a(this)}static get watchers(){return{hide:["validateHide"]}}};m.style=".mg-modal{display:flex;justify-content:center;align-items:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;padding:2rem 0;background-color:hsla(var(--color-light), 85%)}.mg-modal__dialog{display:flex;flex-direction:column;align-self:center;row-gap:3rem;padding:1.5rem 2.5rem;width:60rem;height:fit-content;max-width:100%;max-height:100%;box-sizing:border-box;background-color:hsl(var(--color-light));box-shadow:var(--box-shadow);border-radius:var(--mg-modal-border-radius)}.mg-modal__header{margin-bottom:0.5rem}.mg-modal__title{margin:0;font-family:var(--font-family-heading);font-size:var(--mg-modal-title-font-size);font-weight:600}.mg-modal__close-button{float:right;height:var(--mg-modal-title-font-size);margin-top:calc((var(--default-size) - var(--mg-modal-title-font-size) * var(--line-height)) / 2 * -1);margin-right:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2 * -1)}.mg-modal .mg-modal__content{overflow-y:auto}.mg-modal .mg-modal__content::slotted(*){font-size:var(--mg-modal-content-font-size)}.mg-modal.mg-modal--hide{display:none}";export{m as mg_modal}
|