@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
@@ -1,4 +1,4 @@
1
- import { Component, Element, h, Prop } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { isTagName } from '../../../utils/components.utils';
3
3
  export class MgIllustratedMessage {
4
4
  constructor() {
@@ -31,44 +31,44 @@ export class MgIllustratedMessage {
31
31
  * @returns {HTMLElement} HTML Element
32
32
  */
33
33
  render() {
34
- return (h("div", { class: "mg-illustrated-message" },
35
- h("div", { class: {
36
- 'mg-illustrated-message__illustration': true,
37
- 'mg-illustrated-message__illustration--small': this.size === 'small',
38
- } },
39
- h("slot", { name: "illustration" })),
40
- h("div", { class: "mg-illustrated-message__title" },
41
- h("slot", { name: "title" })),
42
- h("div", { class: "mg-illustrated-message__details" },
43
- h("slot", { name: "details" }))));
34
+ return (h("div", { class: "mg-illustrated-message" }, h("div", { class: {
35
+ 'mg-illustrated-message__illustration': true,
36
+ 'mg-illustrated-message__illustration--small': this.size === 'small',
37
+ } }, h("slot", { name: "illustration" })), h("div", { class: "mg-illustrated-message__title" }, h("slot", { name: "title" })), h("div", { class: "mg-illustrated-message__details" }, h("slot", { name: "details" }))));
44
38
  }
45
39
  static get is() { return "mg-illustrated-message"; }
46
40
  static get encapsulation() { return "shadow"; }
47
- static get originalStyleUrls() { return {
48
- "$": ["mg-illustrated-message.scss"]
49
- }; }
50
- static get styleUrls() { return {
51
- "$": ["mg-illustrated-message.css"]
52
- }; }
53
- static get properties() { return {
54
- "size": {
55
- "type": "string",
56
- "mutable": false,
57
- "complexType": {
58
- "original": "'regular' | 'small'",
59
- "resolved": "\"regular\" | \"small\"",
60
- "references": {}
61
- },
62
- "required": false,
63
- "optional": false,
64
- "docs": {
65
- "tags": [],
66
- "text": "Define illustration size"
67
- },
68
- "attribute": "size",
69
- "reflect": false,
70
- "defaultValue": "'regular'"
71
- }
72
- }; }
41
+ static get originalStyleUrls() {
42
+ return {
43
+ "$": ["mg-illustrated-message.scss"]
44
+ };
45
+ }
46
+ static get styleUrls() {
47
+ return {
48
+ "$": ["mg-illustrated-message.css"]
49
+ };
50
+ }
51
+ static get properties() {
52
+ return {
53
+ "size": {
54
+ "type": "string",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "'regular' | 'small'",
58
+ "resolved": "\"regular\" | \"small\"",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": "Define illustration size"
66
+ },
67
+ "attribute": "size",
68
+ "reflect": false,
69
+ "defaultValue": "'regular'"
70
+ }
71
+ };
72
+ }
73
73
  static get elementRef() { return "element"; }
74
74
  }
@@ -22,9 +22,7 @@ export default {
22
22
  * @returns {HTMLElement} HTMLElement
23
23
  */
24
24
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
- const Template = (args) => (h("mg-message", Object.assign({}, filterArgs(args, { variant: variants[0] })),
26
- args.slotContent && h("span", { innerHTML: args.slotContent }),
27
- args.slotActions && h("span", { slot: "actions", innerHTML: args.slotActions })));
25
+ const Template = (args) => (h("mg-message", Object.assign({}, filterArgs(args, { variant: variants[0] })), args.slotContent && h("span", { innerHTML: args.slotContent }), args.slotActions && h("span", { slot: "actions", innerHTML: args.slotActions })));
28
26
  export const MgMessage = Template.bind({});
29
27
  MgMessage.args = {
30
28
  slotContent: `<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>`,
@@ -1,4 +1,4 @@
1
- import { Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { createID, ClassList } from '../../../utils/components.utils';
3
3
  import { variants } from './mg-message.conf';
4
4
  import { initLocales } from '../../../locales';
@@ -136,165 +136,166 @@ export class MgMessage {
136
136
  * @returns {HTMLElement} HTML Element
137
137
  */
138
138
  render() {
139
- return (h("div", { id: this.identifier, class: this.classList.join(), role: this.variant === 'info' ? 'status' : 'alert' },
140
- h("span", { class: "mg-message__icon" },
141
- h("mg-icon", { icon: this.getIcon() })),
142
- h("div", { class: "mg-message__content" },
143
- h("span", { class: "mg-message__content-slot" },
144
- h("slot", null)),
145
- this.hasActions && h("span", { class: "mg-message__content-separator" }),
146
- this.hasActions && (h("span", { class: "mg-message__content-actions-slot" },
147
- h("slot", { name: "actions" })))),
148
- this.closeButton && (h("span", { class: "mg-message__close-button" },
149
- h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.message.closeButton, onClick: this.handleClose },
150
- h("mg-icon", { icon: "cross" }))))));
139
+ return (h("div", { id: this.identifier, class: this.classList.join(), role: this.variant === 'info' ? 'status' : 'alert' }, 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" }))))));
151
140
  }
152
141
  static get is() { return "mg-message"; }
153
142
  static get encapsulation() { return "shadow"; }
154
- static get originalStyleUrls() { return {
155
- "$": ["mg-message.scss"]
156
- }; }
157
- static get styleUrls() { return {
158
- "$": ["mg-message.css"]
159
- }; }
160
- static get properties() { return {
161
- "identifier": {
162
- "type": "string",
163
- "mutable": false,
164
- "complexType": {
165
- "original": "string",
166
- "resolved": "string",
167
- "references": {}
168
- },
169
- "required": false,
170
- "optional": false,
171
- "docs": {
172
- "tags": [],
173
- "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
174
- },
175
- "attribute": "identifier",
176
- "reflect": false,
177
- "defaultValue": "createID('mg-message')"
178
- },
179
- "delay": {
180
- "type": "number",
181
- "mutable": false,
182
- "complexType": {
183
- "original": "number",
184
- "resolved": "number",
185
- "references": {}
186
- },
187
- "required": false,
188
- "optional": false,
189
- "docs": {
190
- "tags": [],
191
- "text": "Add a delay to hide/close message when it passed\nValue is defined in seconds and must greater than 2 seconds (PDA9-314 RG-06)"
192
- },
193
- "attribute": "delay",
194
- "reflect": false
195
- },
196
- "variant": {
197
- "type": "string",
198
- "mutable": false,
199
- "complexType": {
200
- "original": "string",
201
- "resolved": "string",
202
- "references": {}
203
- },
204
- "required": false,
205
- "optional": false,
206
- "docs": {
207
- "tags": [],
208
- "text": "Message variant"
209
- },
210
- "attribute": "variant",
211
- "reflect": false,
212
- "defaultValue": "variants[0]"
213
- },
214
- "closeButton": {
215
- "type": "boolean",
216
- "mutable": true,
217
- "complexType": {
218
- "original": "boolean",
219
- "resolved": "boolean",
220
- "references": {}
221
- },
222
- "required": false,
223
- "optional": false,
224
- "docs": {
225
- "tags": [],
226
- "text": "Define if message has a cross button\nRG 01: https://jira.mgdis.fr/browse/PDA9-140"
227
- },
228
- "attribute": "close-button",
229
- "reflect": false,
230
- "defaultValue": "false"
231
- },
232
- "hide": {
233
- "type": "boolean",
234
- "mutable": true,
235
- "complexType": {
236
- "original": "boolean",
237
- "resolved": "boolean",
238
- "references": {}
143
+ static get originalStyleUrls() {
144
+ return {
145
+ "$": ["mg-message.scss"]
146
+ };
147
+ }
148
+ static get styleUrls() {
149
+ return {
150
+ "$": ["mg-message.css"]
151
+ };
152
+ }
153
+ static get properties() {
154
+ return {
155
+ "identifier": {
156
+ "type": "string",
157
+ "mutable": false,
158
+ "complexType": {
159
+ "original": "string",
160
+ "resolved": "string",
161
+ "references": {}
162
+ },
163
+ "required": false,
164
+ "optional": false,
165
+ "docs": {
166
+ "tags": [],
167
+ "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
168
+ },
169
+ "attribute": "identifier",
170
+ "reflect": false,
171
+ "defaultValue": "createID('mg-message')"
239
172
  },
240
- "required": false,
241
- "optional": false,
242
- "docs": {
243
- "tags": [],
244
- "text": "Define if message is hidden"
173
+ "delay": {
174
+ "type": "number",
175
+ "mutable": false,
176
+ "complexType": {
177
+ "original": "number",
178
+ "resolved": "number",
179
+ "references": {}
180
+ },
181
+ "required": false,
182
+ "optional": false,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": "Add a delay to hide/close message when it passed\nValue is defined in seconds and must greater than 2 seconds (PDA9-314 RG-06)"
186
+ },
187
+ "attribute": "delay",
188
+ "reflect": false
245
189
  },
246
- "attribute": "hide",
247
- "reflect": false,
248
- "defaultValue": "false"
249
- }
250
- }; }
251
- static get states() { return {
252
- "classList": {},
253
- "hasActions": {}
254
- }; }
255
- static get events() { return [{
256
- "method": "componentShow",
257
- "name": "component-show",
258
- "bubbles": true,
259
- "cancelable": true,
260
- "composed": true,
261
- "docs": {
262
- "tags": [],
263
- "text": "Emited event when message is diplayed"
190
+ "variant": {
191
+ "type": "string",
192
+ "mutable": false,
193
+ "complexType": {
194
+ "original": "string",
195
+ "resolved": "string",
196
+ "references": {}
197
+ },
198
+ "required": false,
199
+ "optional": false,
200
+ "docs": {
201
+ "tags": [],
202
+ "text": "Message variant"
203
+ },
204
+ "attribute": "variant",
205
+ "reflect": false,
206
+ "defaultValue": "variants[0]"
264
207
  },
265
- "complexType": {
266
- "original": "string",
267
- "resolved": "string",
268
- "references": {}
269
- }
270
- }, {
271
- "method": "componentHide",
272
- "name": "component-hide",
273
- "bubbles": true,
274
- "cancelable": true,
275
- "composed": true,
276
- "docs": {
277
- "tags": [],
278
- "text": "Emited event when message is hidden"
208
+ "closeButton": {
209
+ "type": "boolean",
210
+ "mutable": true,
211
+ "complexType": {
212
+ "original": "boolean",
213
+ "resolved": "boolean",
214
+ "references": {}
215
+ },
216
+ "required": false,
217
+ "optional": false,
218
+ "docs": {
219
+ "tags": [],
220
+ "text": "Define if message has a cross button\nRG 01: https://jira.mgdis.fr/browse/PDA9-140"
221
+ },
222
+ "attribute": "close-button",
223
+ "reflect": false,
224
+ "defaultValue": "false"
279
225
  },
280
- "complexType": {
281
- "original": "string",
282
- "resolved": "string",
283
- "references": {}
226
+ "hide": {
227
+ "type": "boolean",
228
+ "mutable": true,
229
+ "complexType": {
230
+ "original": "boolean",
231
+ "resolved": "boolean",
232
+ "references": {}
233
+ },
234
+ "required": false,
235
+ "optional": false,
236
+ "docs": {
237
+ "tags": [],
238
+ "text": "Define if message is hidden"
239
+ },
240
+ "attribute": "hide",
241
+ "reflect": false,
242
+ "defaultValue": "false"
284
243
  }
285
- }]; }
244
+ };
245
+ }
246
+ static get states() {
247
+ return {
248
+ "classList": {},
249
+ "hasActions": {}
250
+ };
251
+ }
252
+ static get events() {
253
+ return [{
254
+ "method": "componentShow",
255
+ "name": "component-show",
256
+ "bubbles": true,
257
+ "cancelable": true,
258
+ "composed": true,
259
+ "docs": {
260
+ "tags": [],
261
+ "text": "Emited event when message is diplayed"
262
+ },
263
+ "complexType": {
264
+ "original": "string",
265
+ "resolved": "string",
266
+ "references": {}
267
+ }
268
+ }, {
269
+ "method": "componentHide",
270
+ "name": "component-hide",
271
+ "bubbles": true,
272
+ "cancelable": true,
273
+ "composed": true,
274
+ "docs": {
275
+ "tags": [],
276
+ "text": "Emited event when message is hidden"
277
+ },
278
+ "complexType": {
279
+ "original": "string",
280
+ "resolved": "string",
281
+ "references": {}
282
+ }
283
+ }];
284
+ }
286
285
  static get elementRef() { return "element"; }
287
- static get watchers() { return [{
288
- "propName": "delay",
289
- "methodName": "validateDelay"
290
- }, {
291
- "propName": "variant",
292
- "methodName": "validateVariant"
293
- }, {
294
- "propName": "closeButton",
295
- "methodName": "validateCloseButton"
296
- }, {
297
- "propName": "hide",
298
- "methodName": "validateHide"
299
- }]; }
286
+ static get watchers() {
287
+ return [{
288
+ "propName": "delay",
289
+ "methodName": "validateDelay"
290
+ }, {
291
+ "propName": "variant",
292
+ "methodName": "validateVariant"
293
+ }, {
294
+ "propName": "closeButton",
295
+ "methodName": "validateCloseButton"
296
+ }, {
297
+ "propName": "hide",
298
+ "methodName": "validateHide"
299
+ }];
300
+ }
300
301
  }
@@ -13,21 +13,17 @@ export default {
13
13
  * @returns {HTMLElement} HTMLElement
14
14
  */
15
15
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- const Template = (args) => (h("div", null,
17
- h("mg-button", { controls: "identifier", haspopup: "dialog", onClick: () => {
18
- const mgModal = document.querySelector('mg-modal');
19
- const isHide = mgModal.hide === true;
20
- if (isHide) {
21
- mgModal.removeAttribute('hide'); // storybook first render is an attribute then we use property
22
- mgModal.hide = false;
23
- }
24
- else {
25
- mgModal.hide = true;
26
- }
27
- } }, "Open modal"),
28
- h("mg-modal", Object.assign({}, filterArgs(args)),
29
- args.slotContent && h("div", { slot: "content", innerHTML: args.slotContent }),
30
- args.slotActions && h("div", { slot: "actions", innerHTML: args.slotActions }))));
16
+ const Template = (args) => (h("div", null, h("mg-button", { controls: "identifier", haspopup: "dialog", onClick: () => {
17
+ const mgModal = document.querySelector('mg-modal');
18
+ const isHide = mgModal.hide === true;
19
+ if (isHide) {
20
+ mgModal.removeAttribute('hide'); // storybook first render is an attribute then we use property
21
+ mgModal.hide = false;
22
+ }
23
+ else {
24
+ mgModal.hide = true;
25
+ }
26
+ } }, "Open modal"), h("mg-modal", Object.assign({}, filterArgs(args)), args.slotContent && h("div", { slot: "content", innerHTML: args.slotContent }), args.slotActions && h("div", { slot: "actions", innerHTML: args.slotActions }))));
31
27
  export const MgModal = Template.bind({});
32
28
  MgModal.args = {
33
29
  slotContent: `<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>`,