@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.
Files changed (149) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_31.cjs.entry.js +216 -277
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/cjs/mg-item-more.cjs.entry.js +1 -16
  5. package/dist/cjs/{mg-menu.conf-9afe6571.js → mg-menu.conf-1942ac70.js} +0 -5
  6. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -3
  7. package/dist/collection/components/atoms/mg-button/mg-button.js +2 -7
  8. package/dist/collection/components/atoms/mg-card/mg-card.conf.js +8 -0
  9. package/dist/collection/components/atoms/mg-card/mg-card.css +54 -0
  10. package/dist/collection/components/atoms/mg-card/mg-card.js +113 -2
  11. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +0 -2
  12. package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -1
  13. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +38 -7
  14. package/dist/collection/components/atoms/mg-icon/mg-icon.css +70 -11
  15. package/dist/collection/components/atoms/mg-icon/mg-icon.js +65 -24
  16. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +0 -2
  17. package/dist/collection/components/atoms/mg-tag/mg-tag.css +12 -12
  18. package/dist/collection/components/atoms/mg-tag/mg-tag.js +0 -3
  19. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +42 -15
  20. package/dist/collection/components/molecules/inputs/MgInput.js +0 -6
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +0 -6
  22. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +0 -5
  23. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +12 -21
  24. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +0 -3
  25. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +0 -9
  26. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +0 -13
  27. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -12
  28. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -5
  29. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +0 -5
  30. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -12
  31. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +1 -0
  32. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -19
  33. package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +1 -0
  34. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +0 -8
  35. package/dist/collection/components/molecules/mg-details/mg-details.css +0 -3
  36. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -4
  37. package/dist/collection/components/molecules/mg-form/mg-form.js +0 -8
  38. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -2
  39. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +0 -5
  40. package/dist/collection/components/molecules/mg-message/mg-message.css +1 -19
  41. package/dist/collection/components/molecules/mg-message/mg-message.js +11 -11
  42. package/dist/collection/components/molecules/mg-modal/mg-modal.css +1 -0
  43. package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -6
  44. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +0 -6
  45. package/dist/collection/components/molecules/mg-panel/mg-panel.css +1 -0
  46. package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -15
  47. package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -0
  48. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -8
  49. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -4
  50. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +0 -12
  51. package/dist/collection/locales/index.js +0 -1
  52. package/dist/collection/styles/reset-mg-card-slotted-variables.scss +1 -0
  53. package/dist/collection/utils/behaviors.utils.js +0 -10
  54. package/dist/collection/utils/components.utils.js +1 -10
  55. package/dist/collection/utils/locale.utils.js +0 -4
  56. package/dist/collection/utils/unit.test.utils.js +0 -5
  57. package/dist/collection/variables.css +7 -1
  58. package/dist/components/MgInput.js +0 -6
  59. package/dist/components/components.utils.js +1 -10
  60. package/dist/components/index2.js +0 -5
  61. package/dist/components/mg-action-more.js +1 -9
  62. package/dist/components/mg-badge2.js +1 -3
  63. package/dist/components/mg-button2.js +2 -7
  64. package/dist/components/mg-card2.js +67 -4
  65. package/dist/components/mg-character-left2.js +0 -2
  66. package/dist/components/mg-details.js +2 -5
  67. package/dist/components/mg-divider.js +0 -1
  68. package/dist/components/mg-form.js +0 -8
  69. package/dist/components/mg-icon2.js +74 -25
  70. package/dist/components/mg-illustrated-message.js +0 -2
  71. package/dist/components/mg-input-checkbox.js +0 -6
  72. package/dist/components/mg-input-date.js +0 -5
  73. package/dist/components/mg-input-numeric.js +12 -21
  74. package/dist/components/mg-input-password.js +0 -3
  75. package/dist/components/mg-input-radio.js +0 -9
  76. package/dist/components/mg-input-select2.js +0 -13
  77. package/dist/components/mg-input-text2.js +1 -12
  78. package/dist/components/mg-input-textarea.js +1 -5
  79. package/dist/components/mg-input-title2.js +0 -2
  80. package/dist/components/mg-input-toggle.js +0 -5
  81. package/dist/components/mg-item-more.js +0 -15
  82. package/dist/components/mg-menu-item2.js +2 -20
  83. package/dist/components/mg-menu2.js +0 -11
  84. package/dist/components/mg-message.js +4 -9
  85. package/dist/components/mg-modal.js +2 -7
  86. package/dist/components/mg-pagination.js +0 -6
  87. package/dist/components/mg-panel.js +6 -16
  88. package/dist/components/mg-popover2.js +2 -9
  89. package/dist/components/mg-skip-links.js +1 -4
  90. package/dist/components/mg-tabs.js +0 -12
  91. package/dist/components/mg-tag.js +1 -4
  92. package/dist/components/mg-tooltip2.js +42 -15
  93. package/dist/components/popper.js +3 -4
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/esm/mg-action-more_31.entry.js +216 -277
  96. package/dist/esm/mg-components.js +1 -1
  97. package/dist/esm/mg-item-more.entry.js +1 -16
  98. package/dist/esm/{mg-menu.conf-881fbd82.js → mg-menu.conf-2cc1bb67.js} +0 -5
  99. package/dist/mg-components/mg-components.css +1 -1
  100. package/dist/mg-components/mg-components.esm.js +1 -1
  101. package/dist/mg-components/{p-67ce7cb8.entry.js → p-a56a3157.entry.js} +1 -1
  102. package/dist/mg-components/p-eb32bb18.entry.js +1 -0
  103. package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +1 -0
  104. package/dist/mg-components/variables.css +7 -1
  105. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +0 -2
  106. package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -5
  107. package/dist/types/components/atoms/mg-card/mg-card.conf.d.ts +16 -0
  108. package/dist/types/components/atoms/mg-card/mg-card.d.ts +37 -1
  109. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +0 -2
  110. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +0 -1
  111. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +10 -2
  112. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +19 -8
  113. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +0 -2
  114. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +0 -3
  115. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +18 -9
  116. package/dist/types/components/molecules/inputs/MgInput.d.ts +0 -1
  117. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -5
  118. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +0 -5
  119. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +5 -17
  120. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -3
  121. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -8
  122. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
  123. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -11
  124. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -4
  125. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -5
  126. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +0 -11
  127. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +0 -18
  128. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +0 -5
  129. package/dist/types/components/molecules/mg-details/mg-details.d.ts +0 -3
  130. package/dist/types/components/molecules/mg-form/mg-form.d.ts +0 -8
  131. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +0 -2
  132. package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +0 -5
  133. package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +5 -1
  134. package/dist/types/components/molecules/mg-message/mg-message.d.ts +7 -11
  135. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -5
  136. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +0 -5
  137. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +0 -10
  138. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +0 -7
  139. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +0 -3
  140. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -11
  141. package/dist/types/components.d.ts +35 -9
  142. package/dist/types/locales/index.d.ts +0 -1
  143. package/dist/types/utils/behaviors.utils.d.ts +0 -9
  144. package/dist/types/utils/components.utils.d.ts +1 -9
  145. package/dist/types/utils/locale.utils.d.ts +0 -4
  146. package/dist/types/utils/unit.test.utils.d.ts +0 -7
  147. package/package.json +15 -16
  148. package/dist/mg-components/p-0b68c4b4.entry.js +0 -1
  149. /package/dist/mg-components/{p-367f92d2.js → p-73156ac9.js} +0 -0
@@ -15,7 +15,6 @@ export class MgMenuItem {
15
15
  **********/
16
16
  /**
17
17
  * Toggle expanded prop value
18
- *
19
18
  * @returns {void}
20
19
  */
21
20
  this.toggleExpanded = () => {
@@ -23,7 +22,6 @@ export class MgMenuItem {
23
22
  };
24
23
  /**
25
24
  * Does an Element have given Status
26
- *
27
25
  * @param {HTMLMgMenuItemElement} mgMenuItemElement to parse
28
26
  * @param {MgMenuItem['status']} status to check
29
27
  * @returns {boolean} true if element with status is found
@@ -31,7 +29,6 @@ export class MgMenuItem {
31
29
  this.hasStatus = (mgMenuItemElement, status) => mgMenuItemElement.status === status;
32
30
  /**
33
31
  * Is component contextual direction match the given direction
34
- *
35
32
  * @param {MgMenuItem['direction']} direction in parent menu
36
33
  * @param {MgMenuItem['direction']} compareWith direction to compare with. Default: `this.direction`
37
34
  * @returns {boolean} true is direction match the direction propertie
@@ -40,7 +37,6 @@ export class MgMenuItem {
40
37
  /**
41
38
  * Update displayNotificationBadge
42
39
  * current component notification badge have priority over the slot badge when submenu contain badge
43
- *
44
40
  * @returns {void} update displayNotificationBadge value
45
41
  */
46
42
  this.updateDisplayNotificationBadge = () => {
@@ -51,7 +47,6 @@ export class MgMenuItem {
51
47
  };
52
48
  /**
53
49
  * Method to control if one of component children have active status
54
- *
55
50
  * @returns {boolean} truthy if component has active child
56
51
  */
57
52
  this.hasActiveChild = () => {
@@ -60,7 +55,6 @@ export class MgMenuItem {
60
55
  };
61
56
  /**
62
57
  * Validate slots
63
- *
64
58
  * @param {boolean} guard prevent action whith guard. Default: false.
65
59
  * @returns {void}
66
60
  */
@@ -80,7 +74,6 @@ export class MgMenuItem {
80
74
  };
81
75
  /**
82
76
  * Update status
83
- *
84
77
  * @param {Status[]} guard status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].
85
78
  * @returns {void}
86
79
  */
@@ -91,7 +84,6 @@ export class MgMenuItem {
91
84
  };
92
85
  /**
93
86
  * Init event-listeners
94
- *
95
87
  * @returns {void}
96
88
  */
97
89
  this.initListeners = () => {
@@ -108,13 +100,11 @@ export class MgMenuItem {
108
100
  };
109
101
  /**
110
102
  * Get mg-popover identifier
111
- *
112
103
  * @returns {MgPopover['identifier']} generated mg-popover identifier
113
104
  */
114
105
  this.getPopoverIdentifier = () => `${this.identifier}-popover`;
115
106
  /**
116
107
  * Condition to know if component should display a mg-popover
117
- *
118
108
  * @returns {boolean} truthy if component display popover
119
109
  */
120
110
  this.displayPopover = () => this.isDirection(Direction.HORIZONTAL) && this.hasChildren && this.href === undefined;
@@ -123,7 +113,6 @@ export class MgMenuItem {
123
113
  ************/
124
114
  /**
125
115
  * Handle interacrtive element click
126
- *
127
116
  * @param {MouseEvent} event click on element
128
117
  * @returns {void}
129
118
  */
@@ -138,7 +127,6 @@ export class MgMenuItem {
138
127
  };
139
128
  /**
140
129
  * Handle popover element display-change event
141
- *
142
130
  * @param {CustomEvent} event popover display event
143
131
  * @returns {void}
144
132
  */
@@ -147,7 +135,6 @@ export class MgMenuItem {
147
135
  };
148
136
  /**
149
137
  * Render slot
150
- *
151
138
  * @returns {HTMLElement} HTML Element
152
139
  */
153
140
  this.renderSlot = () => h("slot", null);
@@ -214,7 +201,6 @@ export class MgMenuItem {
214
201
  }
215
202
  /**
216
203
  * Render popover clickoutside guard for content slot
217
- *
218
204
  * @returns {void}
219
205
  */
220
206
  updatePopoverGuard() {
@@ -228,7 +214,6 @@ export class MgMenuItem {
228
214
  *************/
229
215
  /**
230
216
  * Validate props
231
- *
232
217
  * @returns {void}
233
218
  */
234
219
  componentWillLoad() {
@@ -245,7 +230,6 @@ export class MgMenuItem {
245
230
  }
246
231
  /**
247
232
  * Check if component slots configuration
248
- *
249
233
  * @returns {ReturnType<typeof setTimeout>} timeout
250
234
  */
251
235
  componentDidLoad() {
@@ -285,7 +269,6 @@ export class MgMenuItem {
285
269
  }
286
270
  /**
287
271
  * Render ineractive element
288
- *
289
272
  * @returns {HTMLElement} HTML Element
290
273
  */
291
274
  renderInteractiveElement() {
@@ -294,11 +277,10 @@ export class MgMenuItem {
294
277
  [`${this.navigationButton}-chevron`]: true,
295
278
  [`${this.navigationButton}-chevron--rotate`]: this.expanded === true,
296
279
  'mg-a11y-animation': true,
297
- } }, h("mg-icon", { icon: "chevron-down" })))));
280
+ } }, h("mg-icon", { icon: "chevron-down", size: "small" })))));
298
281
  }
299
282
  /**
300
283
  * Render
301
- *
302
284
  * @returns {HTMLElement} HTML Element
303
285
  */
304
286
  render() {
@@ -28,6 +28,7 @@
28
28
  :host {
29
29
  --mg-popover-padding-vertical: 1rem;
30
30
  --mg-popover-padding-horizontal: 0;
31
+ --mg-popover-max-width: unset;
31
32
  }
32
33
 
33
34
  .mg-action-more__chevron {
@@ -5,7 +5,6 @@ import { Direction } from '../menu/mg-menu/mg-menu.conf';
5
5
  import { createID } from '../../../utils/components.utils';
6
6
  /**
7
7
  * MgActionMore['items'] type guard
8
- *
9
8
  * @param {unknown} prop commponent items prop
10
9
  * @returns {boolean} return true if type is valid
11
10
  */
@@ -15,7 +14,6 @@ const isMgActionMoreItems = (prop) => {
15
14
  };
16
15
  /**
17
16
  * MgActionMore['button'] type guard
18
- *
19
17
  * @param {unknown} prop commponent button prop
20
18
  * @returns {boolean} return true if type is valid
21
19
  */
@@ -25,7 +23,6 @@ const isMgActionMoreButton = (prop) => {
25
23
  };
26
24
  /**
27
25
  * MgActionMore['icon'] type guard
28
- *
29
26
  * @param {unknown} prop commponent icon prop
30
27
  * @returns {boolean} return true if type is valid
31
28
  */
@@ -45,7 +42,6 @@ export class MgActionMore {
45
42
  ***********/
46
43
  /**
47
44
  * Toogle expanded props
48
- *
49
45
  * @returns {void}
50
46
  */
51
47
  this.toggleExpanded = () => {
@@ -53,7 +49,6 @@ export class MgActionMore {
53
49
  };
54
50
  /**
55
51
  * Button click handler
56
- *
57
52
  * @returns {void}
58
53
  */
59
54
  this.handleButton = () => {
@@ -61,7 +56,6 @@ export class MgActionMore {
61
56
  };
62
57
  /**
63
58
  * Item click handler
64
- *
65
59
  * @param {MouseEvent} event click event
66
60
  * @param {MgActionMoreItemType['mouseEventHandler']} customHandler item['mouseEventHandler']
67
61
  * @returns {void}
@@ -101,7 +95,6 @@ export class MgActionMore {
101
95
  *************/
102
96
  /**
103
97
  * Validate props
104
- *
105
98
  * @returns {void}
106
99
  */
107
100
  componentWillLoad() {
@@ -113,7 +106,6 @@ export class MgActionMore {
113
106
  }
114
107
  /**
115
108
  * Render
116
- *
117
109
  * @returns {HTMLElement} HTML Element
118
110
  */
119
111
  render() {
@@ -40,9 +40,6 @@
40
40
  gap: 0.6rem;
41
41
  min-height: calc(var(--font-size) * var(--line-height));
42
42
  }
43
- .mg-details__toggle mg-icon {
44
- align-self: self-end;
45
- }
46
43
 
47
44
  .mg-details__details {
48
45
  margin-top: 1.5rem;
@@ -3,7 +3,6 @@ export class MgDetails {
3
3
  constructor() {
4
4
  /**
5
5
  * Handle details toggle
6
- *
7
6
  * @returns {void}
8
7
  */
9
8
  this.handleToggle = () => {
@@ -27,7 +26,6 @@ export class MgDetails {
27
26
  *************/
28
27
  /**
29
28
  * Check if component props are well configured on init
30
- *
31
29
  * @returns {void}
32
30
  */
33
31
  componentWillLoad() {
@@ -36,11 +34,10 @@ export class MgDetails {
36
34
  }
37
35
  /**
38
36
  * Render
39
- *
40
37
  * @returns {HTMLElement} HTML Element
41
38
  */
42
39
  render() {
43
- return (h("details", { class: "mg-details", onToggle: this.handleToggle, open: this.expanded, ref: el => (this.details = el) }, h("summary", null, h("slot", { name: "summary" }), h("span", { class: "mg-details__toggle" }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), h("span", { class: { 'sr-only': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { class: "mg-details__details" }, h("slot", { name: "details" }))));
40
+ return (h("details", { class: "mg-details", onToggle: this.handleToggle, open: this.expanded, ref: el => (this.details = el) }, h("summary", null, h("slot", { name: "summary" }), h("span", { class: "mg-details__toggle" }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down', size: "small" }), h("span", { class: { 'sr-only': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { class: "mg-details__details" }, h("slot", { name: "details" }))));
44
41
  }
45
42
  static get is() { return "mg-details"; }
46
43
  static get encapsulation() { return "shadow"; }
@@ -8,7 +8,6 @@ export class MgForm {
8
8
  /**
9
9
  * Define required message based on mg-inputs required elements
10
10
  * Also
11
- *
12
11
  * @returns {void}
13
12
  */
14
13
  this.setRequiredMessage = () => {
@@ -34,7 +33,6 @@ export class MgForm {
34
33
  };
35
34
  /**
36
35
  * Check if form is valid
37
- *
38
36
  * @returns {void}
39
37
  */
40
38
  this.checkValidity = () => {
@@ -47,7 +45,6 @@ export class MgForm {
47
45
  };
48
46
  /**
49
47
  * Handle Form Submit
50
- *
51
48
  * @param {SubmitEvent} event submit event
52
49
  * @returns {void}
53
50
  */
@@ -57,7 +54,6 @@ export class MgForm {
57
54
  };
58
55
  /**
59
56
  * Set mgInputs
60
- *
61
57
  * @returns {void}
62
58
  */
63
59
  this.setMgInputs = () => {
@@ -89,7 +85,6 @@ export class MgForm {
89
85
  }
90
86
  /**
91
87
  * Public method to display errors
92
- *
93
88
  * @returns {Promise<void>}
94
89
  */
95
90
  async displayError() {
@@ -105,7 +100,6 @@ export class MgForm {
105
100
  *************/
106
101
  /**
107
102
  * Check if component props are well configured on init
108
- *
109
103
  * @returns {void}
110
104
  */
111
105
  componentWillLoad() {
@@ -133,7 +127,6 @@ export class MgForm {
133
127
  }
134
128
  /**
135
129
  * Add slot listeners
136
- *
137
130
  * @returns {void}
138
131
  */
139
132
  componentDidLoad() {
@@ -152,7 +145,6 @@ export class MgForm {
152
145
  }
153
146
  /**
154
147
  * Render
155
- *
156
148
  * @returns {HTMLElement} HTML Element
157
149
  */
158
150
  render() {
@@ -10,7 +10,6 @@ export class MgIllustratedMessage {
10
10
  *************/
11
11
  /**
12
12
  * Check if component props are well configured on init
13
- *
14
13
  * @returns {void}
15
14
  */
16
15
  componentDidLoad() {
@@ -26,7 +25,6 @@ export class MgIllustratedMessage {
26
25
  }
27
26
  /**
28
27
  * Render
29
- *
30
28
  * @returns {HTMLElement} HTML Element
31
29
  */
32
30
  render() {
@@ -13,7 +13,6 @@ export class MgItemMore {
13
13
  ***********/
14
14
  /**
15
15
  * render mg-item-more overflow element
16
- *
17
16
  * @returns {HTMLMgItemMoreElement} mg-item-more element
18
17
  */
19
18
  this.renderMgMenuItemOverflowElement = () => {
@@ -63,7 +62,6 @@ export class MgItemMore {
63
62
  *************/
64
63
  /**
65
64
  * Disconnect overflow ResizeObserver
66
- *
67
65
  * @returns {void} run overflow resize obeserver disconnexion
68
66
  */
69
67
  disconnectedCallback() {
@@ -71,7 +69,6 @@ export class MgItemMore {
71
69
  }
72
70
  /**
73
71
  * Set variables and validate props
74
- *
75
72
  * @returns {void}
76
73
  */
77
74
  componentWillLoad() {
@@ -86,7 +83,6 @@ export class MgItemMore {
86
83
  }
87
84
  /**
88
85
  * Add overflow behavior
89
- *
90
86
  * @returns {void}
91
87
  */
92
88
  componentDidLoad() {
@@ -94,7 +90,6 @@ export class MgItemMore {
94
90
  }
95
91
  /**
96
92
  * Render
97
- *
98
93
  * @returns {HTMLElement} HTML Element
99
94
  */
100
95
  render() {
@@ -9,34 +9,15 @@
9
9
  display: inline-block;
10
10
  min-height: var(--default-size);
11
11
  }
12
- .mg-message__bar {
13
- position: absolute;
14
- top: 0;
15
- left: 0;
16
- width: 0.3rem;
17
- height: 100%;
18
- }
19
- .mg-message.mg-message--info .mg-message__bar {
20
- background-color: hsl(var(--color-info));
21
- }
22
12
  .mg-message.mg-message--info .mg-message__icon {
23
13
  color: hsl(var(--color-info));
24
14
  }
25
- .mg-message.mg-message--warning .mg-message__bar {
26
- background-color: hsl(var(--color-warning));
27
- }
28
15
  .mg-message.mg-message--warning .mg-message__icon {
29
16
  color: hsl(var(--color-warning));
30
17
  }
31
- .mg-message.mg-message--success .mg-message__bar {
32
- background-color: hsl(var(--color-success));
33
- }
34
18
  .mg-message.mg-message--success .mg-message__icon {
35
19
  color: hsl(var(--color-success));
36
20
  }
37
- .mg-message.mg-message--danger .mg-message__bar {
38
- background-color: hsl(var(--color-danger));
39
- }
40
21
  .mg-message.mg-message--danger .mg-message__icon {
41
22
  color: hsl(var(--color-danger));
42
23
  }
@@ -87,6 +68,7 @@
87
68
  --mg-card-border-radius: var(--mg-card-border-radius-default);
88
69
  --mg-card-background: var(--mg-card-background-default);
89
70
  --mg-card-box-shadow: var(--mg-card-box-shadow-default);
71
+ --mg-card-max-width: unset;
90
72
  }
91
73
 
92
74
  .mg-message,
@@ -18,7 +18,6 @@ export class MgMessage {
18
18
  this.isHovered = false;
19
19
  /**
20
20
  * Set timer
21
- *
22
21
  * @returns {void}
23
22
  */
24
23
  this.setTimer = () => {
@@ -26,7 +25,6 @@ export class MgMessage {
26
25
  };
27
26
  /**
28
27
  * Clear timer
29
- *
30
28
  * @returns {void}
31
29
  */
32
30
  this.clearTimer = () => {
@@ -34,7 +32,6 @@ export class MgMessage {
34
32
  };
35
33
  /**
36
34
  * Event to add on element
37
- *
38
35
  * @param {MouseEvent | FocusEvent} event event
39
36
  * @returns {void}
40
37
  */
@@ -59,8 +56,7 @@ export class MgMessage {
59
56
  };
60
57
  /**
61
58
  * Get icon corresponding to variant
62
- *
63
- * @returns {string} icon
59
+ * @returns {MgIcon['icon'] | undefined} icon
64
60
  */
65
61
  this.getIcon = () => {
66
62
  switch (this.variant) {
@@ -85,7 +81,7 @@ export class MgMessage {
85
81
  this.hasActions = false;
86
82
  }
87
83
  validateDelay(newValue) {
88
- if (newValue && newValue < 2) {
84
+ if (newValue !== undefined && newValue < 2) {
89
85
  throw new Error(`<mg-message> prop "delay" must be greater than 2 seconds.`);
90
86
  }
91
87
  }
@@ -154,11 +150,10 @@ export class MgMessage {
154
150
  }
155
151
  /**
156
152
  * Render
157
- *
158
153
  * @returns {HTMLElement} HTML Element
159
154
  */
160
155
  render() {
161
- return (h("div", { id: this.identifier, class: this.classList.join(), role: this.variant === 'info' ? 'status' : 'alert' }, h("mg-card", null, h("span", { class: "mg-message__bar" }), h("span", { class: "mg-message__icon" }, h("mg-icon", { icon: this.getIcon() })), h("div", { class: "mg-message__content" }, h("span", { class: "mg-message__content-slot" }, h("slot", null)), this.hasActions && h("span", { class: "mg-message__content-separator" }), this.hasActions && (h("span", { class: "mg-message__content-actions-slot" }, h("slot", { name: "actions" })))), this.closeButton && (h("span", { class: "mg-message__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.message.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" })))))));
156
+ return (h("div", { id: this.identifier, class: this.classList.join(), role: this.variant === 'info' ? 'status' : 'alert' }, h("mg-card", { variant: this.variant, "variant-style": "bar-left" }, h("span", { class: "mg-message__icon" }, h("mg-icon", { icon: this.getIcon() })), h("div", { class: "mg-message__content" }, h("span", { class: "mg-message__content-slot" }, h("slot", null)), this.hasActions && h("span", { class: "mg-message__content-separator" }), this.hasActions && (h("span", { class: "mg-message__content-actions-slot" }, h("slot", { name: "actions" })))), this.closeButton && (h("span", { class: "mg-message__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.message.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" })))))));
162
157
  }
163
158
  static get is() { return "mg-message"; }
164
159
  static get encapsulation() { return "shadow"; }
@@ -213,9 +208,14 @@ export class MgMessage {
213
208
  "type": "string",
214
209
  "mutable": false,
215
210
  "complexType": {
216
- "original": "string",
217
- "resolved": "string",
218
- "references": {}
211
+ "original": "VariantType",
212
+ "resolved": "\"danger\" | \"info\" | \"success\" | \"warning\"",
213
+ "references": {
214
+ "VariantType": {
215
+ "location": "import",
216
+ "path": "./mg-message.conf"
217
+ }
218
+ }
219
219
  },
220
220
  "required": false,
221
221
  "optional": false,
@@ -62,4 +62,5 @@
62
62
  --mg-card-border-radius: var(--mg-card-border-radius-default);
63
63
  --mg-card-background: var(--mg-card-background-default);
64
64
  --mg-card-box-shadow: var(--mg-card-box-shadow-default);
65
+ --mg-card-max-width: unset;
65
66
  }
@@ -44,7 +44,6 @@ export class MgModal {
44
44
  *************/
45
45
  /**
46
46
  * Handle close button
47
- *
48
47
  * @returns {void}
49
48
  */
50
49
  this.handleClose = () => {
@@ -77,7 +76,6 @@ export class MgModal {
77
76
  }
78
77
  /**
79
78
  * Handle 'escape' key down
80
- *
81
79
  * @param {KeyboardEvent} event keydown event
82
80
  * @returns {void}
83
81
  */
@@ -92,7 +90,6 @@ export class MgModal {
92
90
  *************/
93
91
  /**
94
92
  * Check if component props are well configured on init
95
- *
96
93
  * @returns {void}
97
94
  */
98
95
  componentWillLoad() {
@@ -112,7 +109,6 @@ export class MgModal {
112
109
  }
113
110
  /**
114
111
  * Add observer on component to set focus when displayed
115
- *
116
112
  * @returns {void}
117
113
  */
118
114
  componentDidLoad() {
@@ -128,7 +124,6 @@ export class MgModal {
128
124
  }
129
125
  /**
130
126
  * Render
131
- *
132
127
  * @returns {HTMLElement} HTML Element
133
128
  */
134
129
  render() {
@@ -185,7 +180,7 @@ export class MgModal {
185
180
  },
186
181
  "closeButton": {
187
182
  "type": "boolean",
188
- "mutable": true,
183
+ "mutable": false,
189
184
  "complexType": {
190
185
  "original": "boolean",
191
186
  "resolved": "boolean",
@@ -16,7 +16,6 @@ import { initLocales } from './../../../locales';
16
16
  * range(1, 1) = [1]
17
17
  * range(1, 5) = [1, 2, 3, 4, 5]
18
18
  * range(10, 20, 2) = [10, 12, 14, 16, 18, 20]
19
- *
20
19
  * @param {number} start start range
21
20
  * @param {number} end start end
22
21
  * @param {number} step step size
@@ -27,7 +26,6 @@ export class MgPagination {
27
26
  constructor() {
28
27
  /**
29
28
  * Change current page from target
30
- *
31
29
  * @param {number} target target page
32
30
  * @returns {void}
33
31
  */
@@ -39,7 +37,6 @@ export class MgPagination {
39
37
  ************/
40
38
  /**
41
39
  * select handler
42
- *
43
40
  * @param {InputEvent} event value change event
44
41
  * @returns {void}
45
42
  */
@@ -49,7 +46,6 @@ export class MgPagination {
49
46
  };
50
47
  /**
51
48
  * Go to 'previous/next' page button handler
52
- *
53
49
  * @param {string} action navigation action
54
50
  * @param {boolean} disabled button disable state
55
51
  * @returns {void}
@@ -82,7 +78,6 @@ export class MgPagination {
82
78
  *************/
83
79
  /**
84
80
  * Check if props are well configured on init
85
- *
86
81
  * @returns {void}
87
82
  */
88
83
  componentWillLoad() {
@@ -98,7 +93,6 @@ export class MgPagination {
98
93
  }
99
94
  /**
100
95
  * Render
101
- *
102
96
  * @returns {HTMLElement} HTML Element
103
97
  */
104
98
  render() {
@@ -52,4 +52,5 @@
52
52
  --mg-card-border-radius: var(--mg-card-border-radius-default);
53
53
  --mg-card-background: var(--mg-card-background-default);
54
54
  --mg-card-box-shadow: var(--mg-card-box-shadow-default);
55
+ --mg-card-max-width: unset;
55
56
  }