@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.
Files changed (123) hide show
  1. package/dist/cjs/{index-88560a66.js → index-64cee0c8.js} +248 -81
  2. package/dist/cjs/loader.cjs.js +3 -3
  3. package/dist/cjs/{mg-badge_24.cjs.entry.js → mg-badge_23.cjs.entry.js} +206 -2180
  4. package/dist/cjs/mg-components.cjs.js +3 -3
  5. package/dist/cjs/mg-modal.cjs.entry.js +8 -1
  6. package/dist/cjs/mg-popover.cjs.entry.js +171 -0
  7. package/dist/cjs/popper-71bf3058.js +1790 -0
  8. package/dist/collection/collection-manifest.json +2 -2
  9. package/dist/collection/components/atoms/mg-badge/mg-badge.js +116 -99
  10. package/dist/collection/components/atoms/mg-button/mg-button.js +221 -220
  11. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +72 -69
  12. package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +1 -2
  13. package/dist/collection/components/atoms/mg-icon/mg-icon.js +102 -92
  14. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +83 -67
  15. package/dist/collection/components/atoms/mg-tag/mg-tag.js +64 -55
  16. package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +3 -6
  17. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +120 -106
  18. package/dist/collection/components/molecules/inputs/MgInput.js +8 -17
  19. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +323 -318
  20. package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +3 -2
  21. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +356 -361
  22. package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +1 -2
  23. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +462 -456
  24. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +347 -340
  25. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +348 -343
  26. package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +4 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +406 -401
  28. package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +12 -15
  29. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +2 -0
  30. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +476 -473
  31. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +461 -456
  32. package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +2 -8
  33. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +1 -0
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +299 -298
  35. package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +1 -3
  36. package/dist/collection/components/molecules/mg-details/mg-details.js +95 -93
  37. package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +13 -27
  38. package/dist/collection/components/molecules/mg-form/mg-form.js +175 -166
  39. package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +2 -6
  40. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +37 -37
  41. package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +1 -3
  42. package/dist/collection/components/molecules/mg-message/mg-message.js +154 -153
  43. package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +11 -15
  44. package/dist/collection/components/molecules/mg-modal/mg-modal.js +147 -134
  45. package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +5 -6
  46. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +112 -117
  47. package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +1 -8
  48. package/dist/collection/components/molecules/mg-panel/mg-panel.css +2 -2
  49. package/dist/collection/components/molecules/mg-panel/mg-panel.js +192 -189
  50. package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +1 -4
  51. package/dist/collection/components/molecules/mg-popover/mg-popover.js +129 -127
  52. package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +1 -5
  53. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
  54. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +150 -135
  55. package/dist/collection/fonts/OpenSans-Bold.ttf +0 -0
  56. package/dist/collection/locales/en/messages.json +50 -0
  57. package/dist/collection/locales/fr/messages.json +50 -0
  58. package/dist/collection/stories/grids.stories.js +1 -44
  59. package/dist/collection/stories/helpers.stories.js +1 -19
  60. package/dist/collection/stories/icons.stories.js +1 -4
  61. package/dist/collection/stories/typography.stories.js +1 -12
  62. package/dist/collection/variables.css +3 -2
  63. package/dist/collection/variables.scss +3 -2
  64. package/dist/components/MgInput.js +6 -3
  65. package/dist/components/mg-badge2.js +7 -0
  66. package/dist/components/mg-button2.js +2 -7
  67. package/dist/components/mg-input-checkbox.js +1 -6
  68. package/dist/components/mg-input-date.js +10 -27
  69. package/dist/components/mg-input-numeric.js +1 -6
  70. package/dist/components/mg-input-password.js +1 -6
  71. package/dist/components/mg-input-radio.js +1 -6
  72. package/dist/components/mg-input-select2.js +1 -6
  73. package/dist/components/mg-input-text2.js +3 -8
  74. package/dist/components/mg-input-textarea.js +2 -7
  75. package/dist/components/mg-input-title2.js +9 -0
  76. package/dist/components/mg-input-toggle.js +2 -7
  77. package/dist/components/mg-modal.js +7 -0
  78. package/dist/components/mg-pagination.js +3 -3
  79. package/dist/components/mg-panel.js +8 -4
  80. package/dist/components/mg-tabs.js +8 -1
  81. package/dist/components/mg-tooltip2.js +7 -0
  82. package/dist/esm/{index-bca81100.js → index-120f47fd.js} +248 -81
  83. package/dist/esm/loader.js +3 -3
  84. package/dist/esm/{mg-badge_24.entry.js → mg-badge_23.entry.js} +207 -2180
  85. package/dist/esm/mg-components.js +3 -3
  86. package/dist/esm/mg-modal.entry.js +8 -1
  87. package/dist/esm/mg-popover.entry.js +167 -0
  88. package/dist/esm/popper-93ecb064.js +1788 -0
  89. package/dist/mg-components/fonts/OpenSans-Bold.ttf +0 -0
  90. package/dist/mg-components/locales/en/messages.json +50 -0
  91. package/dist/mg-components/locales/fr/messages.json +50 -0
  92. package/dist/mg-components/mg-components.css +1 -1
  93. package/dist/mg-components/mg-components.esm.js +1 -1
  94. package/dist/mg-components/p-21991be8.entry.js +1 -0
  95. package/dist/mg-components/p-36a64f8c.entry.js +1 -0
  96. package/dist/mg-components/p-4c66f794.js +1 -0
  97. package/dist/mg-components/{p-b14a3443.js → p-7bc32a2f.js} +0 -0
  98. package/dist/mg-components/p-b380a0df.entry.js +1 -0
  99. package/dist/mg-components/variables.css +3 -2
  100. package/dist/mg-components/variables.scss +3 -2
  101. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -0
  102. package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -1
  103. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -0
  104. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +1 -0
  105. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -1
  106. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +1 -10
  107. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -1
  108. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -1
  109. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
  110. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -1
  111. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -1
  112. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -1
  113. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -1
  114. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -0
  115. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
  116. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -0
  117. package/dist/types/components.d.ts +29 -29
  118. package/loader/package.json +1 -0
  119. package/package.json +8 -8
  120. package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
  121. package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
  122. package/dist/mg-components/p-a2883dc7.entry.js +0 -1
  123. 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
- validateMax(newValue: string): void;
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
  */
@@ -26,7 +26,6 @@ export declare class MgInputNumeric {
26
26
  validateValue(newValue: string): void;
27
27
  /**
28
28
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
29
- * If not set, it will be created.
30
29
  */
31
30
  identifier: string;
32
31
  /**
@@ -22,7 +22,6 @@ export declare class MgInputPassword {
22
22
  handleValue(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
  /**
@@ -27,7 +27,6 @@ export declare class MgInputRadio {
27
27
  validateItems(newValue: string[] | RadioOption[]): void;
28
28
  /**
29
29
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
30
- * If not set, it will be created.
31
30
  */
32
31
  identifier: string;
33
32
  /**
@@ -28,7 +28,6 @@ export declare class MgInputSelect {
28
28
  validateItems(newValue: string[] | SelectOption[]): void;
29
29
  /**
30
30
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
31
- * If not set, it will be created.
32
31
  */
33
32
  identifier: string;
34
33
  /**
@@ -26,7 +26,6 @@ export declare class MgInputText {
26
26
  handleValue(newValue: string): void;
27
27
  /**
28
28
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
29
- * If not set, it will be created.
30
29
  */
31
30
  identifier: string;
32
31
  /**
@@ -25,7 +25,6 @@ export declare class MgInputTextarea {
25
25
  handleValue(newValue: string): void;
26
26
  /**
27
27
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
28
- * If not set, it will be created.
29
28
  */
30
29
  identifier: string;
31
30
  /**
@@ -31,7 +31,6 @@ export declare class MgInputToggle {
31
31
  validateItems(newValue: string[] | ToggleValue[]): void;
32
32
  /**
33
33
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
34
- * If not set, it will be created.
35
34
  */
36
35
  identifier: string;
37
36
  /**
@@ -22,6 +22,7 @@ export declare class MgModal {
22
22
  * required
23
23
  */
24
24
  modalTitle: string;
25
+ validateModalTitle(newValue: string): void;
25
26
  /**
26
27
  * Define if modal has a cross button
27
28
  */
@@ -22,7 +22,7 @@ export declare class MgPanel {
22
22
  * Panel title
23
23
  */
24
24
  panelTitle: string;
25
- handelTileChange(newValue: string): void;
25
+ validatePanelTitle(newValue: string): void;
26
26
  /**
27
27
  * Panel title pattern
28
28
  */
@@ -25,6 +25,7 @@ export declare class MgTabs {
25
25
  * Required for accessibility
26
26
  */
27
27
  label: string;
28
+ validateLabel(newValue: string): void;
28
29
  /**
29
30
  * Define tabs size
30
31
  */
@@ -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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
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) If not set, it will be created.
1433
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1434
1434
  */
1435
- "identifier"?: string;
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) If not set, it will be created.
1499
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1500
1500
  */
1501
- "identifier"?: string;
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) If not set, it will be created.
1577
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1578
1578
  */
1579
- "identifier"?: string;
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) If not set, it will be created.
1663
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1664
1664
  */
1665
- "identifier"?: string;
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) If not set, it will be created.
1733
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1734
1734
  */
1735
- "identifier"?: string;
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) If not set, it will be created.
1803
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1804
1804
  */
1805
- "identifier"?: string;
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) If not set, it will be created.
1893
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1894
1894
  */
1895
- "identifier"?: string;
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) If not set, it will be created.
1983
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
1984
1984
  */
1985
- "identifier"?: string;
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) If not set, it will be created.
2087
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
2088
2088
  */
2089
- "identifier"?: string;
2089
+ "identifier": string;
2090
2090
  /**
2091
2091
  * Define if toggle display icon
2092
2092
  */
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "mg-components-loader",
3
+ "private": true,
3
4
  "typings": "./index.d.ts",
4
5
  "module": "./index.js",
5
6
  "main": "./index.cjs.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgdis/mg-components",
3
- "version": "4.1.0",
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.17.4",
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.10",
55
- "@storybook/addon-actions": "^6.5.10",
56
- "@storybook/addon-docs": "^6.5.10",
57
- "@storybook/addon-essentials": "^6.5.10",
58
- "@storybook/addon-links": "^6.5.10",
59
- "@storybook/html": "^6.5.10",
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",
@@ -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}