@mgdis/mg-components 6.16.0 → 6.18.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 (160) hide show
  1. package/dist/cjs/{index-T3-qWqFE.js → index-DCZEYvlH.js} +51 -28
  2. package/dist/cjs/{index-YM1EJx9X.js → index-TUElr4Wv.js} +10 -10
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/mg-action-more_37.cjs.entry.js +443 -228
  5. package/dist/cjs/mg-alert.cjs.entry.js +3 -3
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +141 -0
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +73 -57
  9. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +36 -23
  10. package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-HYIzRsy7.js} +5 -0
  11. package/dist/cjs/mg-loader.cjs.entry.js +3 -3
  12. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  13. package/dist/collection/collection-manifest.json +2 -1
  14. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +5 -5
  15. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +7 -7
  16. package/dist/collection/components/atoms/mg-badge/mg-badge.js +6 -6
  17. package/dist/collection/components/atoms/mg-button/mg-button.js +13 -13
  18. package/dist/collection/components/atoms/mg-card/mg-card.js +2 -2
  19. package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +1 -1
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.js +32 -26
  22. package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -3
  23. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -2
  24. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -6
  25. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +4 -0
  26. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +193 -33
  27. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +7 -9
  28. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +65 -46
  29. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +106 -86
  30. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +67 -65
  31. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +71 -66
  32. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +56 -38
  33. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +53 -35
  34. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +66 -47
  35. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +58 -40
  36. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +77 -59
  37. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +63 -45
  38. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +54 -30
  39. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +2 -4
  40. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +9 -6
  41. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +7 -7
  42. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -5
  43. package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -5
  44. package/dist/collection/components/molecules/mg-details/mg-details.js +7 -7
  45. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +404 -0
  46. package/dist/collection/components/molecules/mg-form/mg-form.js +26 -17
  47. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +3 -3
  48. package/dist/collection/components/molecules/mg-loader/mg-loader.js +4 -4
  49. package/dist/collection/components/molecules/mg-message/mg-message.js +4 -4
  50. package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -8
  51. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +7 -8
  52. package/dist/collection/components/molecules/mg-panel/mg-panel.js +53 -22
  53. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -2
  54. package/dist/collection/components/molecules/mg-popover/mg-popover.js +7 -7
  55. package/dist/collection/components/molecules/mg-progress/mg-progress.js +7 -7
  56. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -2
  57. package/dist/collection/components/molecules/mg-table/mg-table.js +2 -3
  58. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +7 -8
  59. package/dist/collection/locales/en/messages.json +5 -5
  60. package/dist/collection/locales/fr/messages.json +5 -5
  61. package/dist/components/index3.js +10 -10
  62. package/dist/components/mg-action-more.js +5 -3
  63. package/dist/components/mg-alert.js +5 -3
  64. package/dist/components/mg-badge2.js +4 -2
  65. package/dist/components/mg-button2.js +4 -2
  66. package/dist/components/mg-card2.js +4 -2
  67. package/dist/components/mg-character-left2.js +4 -2
  68. package/dist/components/mg-details.js +5 -3
  69. package/dist/components/mg-divider2.js +4 -2
  70. package/dist/components/mg-fieldset.d.ts +11 -0
  71. package/dist/components/mg-fieldset.js +209 -0
  72. package/dist/components/mg-form.js +8 -5
  73. package/dist/components/mg-icon2.js +29 -21
  74. package/dist/components/mg-illustrated-message.js +5 -3
  75. package/dist/components/mg-input-checkbox-paginated2.js +6 -6
  76. package/dist/components/mg-input-checkbox.js +32 -17
  77. package/dist/components/mg-input-combobox.js +75 -57
  78. package/dist/components/mg-input-date.js +39 -42
  79. package/dist/components/mg-input-numeric.js +30 -30
  80. package/dist/components/mg-input-password.js +26 -13
  81. package/dist/components/mg-input-radio.js +27 -13
  82. package/dist/components/mg-input-rich-text-editor.js +37 -22
  83. package/dist/components/mg-input-select2.js +28 -14
  84. package/dist/components/mg-input-text2.js +40 -26
  85. package/dist/components/mg-input-textarea.js +27 -14
  86. package/dist/components/mg-input-title2.js +4 -2
  87. package/dist/components/mg-input-toggle.js +39 -12
  88. package/dist/components/mg-input2.js +121 -20
  89. package/dist/components/mg-item-more2.js +13 -5
  90. package/dist/components/mg-loader2.js +5 -3
  91. package/dist/components/mg-menu-item2.js +4 -2
  92. package/dist/components/mg-message2.js +6 -4
  93. package/dist/components/mg-modal.js +6 -4
  94. package/dist/components/mg-pagination.js +4 -2
  95. package/dist/components/mg-panel.js +40 -9
  96. package/dist/components/mg-popover-content2.js +5 -3
  97. package/dist/components/mg-popover2.js +5 -3
  98. package/dist/components/mg-progress.js +5 -3
  99. package/dist/components/mg-skip-links.js +5 -3
  100. package/dist/components/mg-table.js +4 -2
  101. package/dist/components/mg-tabs2.js +5 -3
  102. package/dist/components/mg-tag.js +4 -2
  103. package/dist/components/mg-tooltip-content2.js +4 -2
  104. package/dist/components/mg-tooltip2.js +4 -2
  105. package/dist/esm/{index-WtiuOkLj.js → index-C7xjtdiw.js} +1 -1
  106. package/dist/esm/{index-Bab8_u8S.js → index-CNX6lq0x.js} +10 -10
  107. package/dist/esm/{index-JHj_9FSs.js → index-T6kOJXP1.js} +51 -28
  108. package/dist/esm/loader.js +3 -3
  109. package/dist/esm/mg-action-more_37.entry.js +444 -229
  110. package/dist/esm/mg-alert.entry.js +4 -4
  111. package/dist/esm/mg-components.js +4 -4
  112. package/dist/esm/mg-fieldset.entry.js +139 -0
  113. package/dist/esm/mg-input-combobox.entry.js +74 -58
  114. package/dist/esm/mg-input-rich-text-editor.entry.js +37 -24
  115. package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-D9V2v4n2.js} +5 -1
  116. package/dist/esm/mg-loader.entry.js +4 -4
  117. package/dist/esm/mg-progress.entry.js +3 -3
  118. package/dist/mg-components/locales/en/messages.json +5 -5
  119. package/dist/mg-components/locales/fr/messages.json +5 -5
  120. package/dist/mg-components/mg-components.esm.js +1 -1
  121. package/dist/mg-components/p-2bab89c2.entry.js +1 -0
  122. package/dist/mg-components/{p-658f828c.entry.js → p-5abc77cd.entry.js} +1 -1
  123. package/dist/mg-components/p-7d2e43b2.entry.js +1 -0
  124. package/dist/mg-components/{p-c85b5d10.entry.js → p-92e5e5a6.entry.js} +1 -1
  125. package/dist/mg-components/{p-42a90251.entry.js → p-952288bd.entry.js} +1 -1
  126. package/dist/mg-components/{p-WtiuOkLj.js → p-C7xjtdiw.js} +1 -1
  127. package/dist/mg-components/p-CNX6lq0x.js +1 -0
  128. package/dist/mg-components/p-D9V2v4n2.js +1 -0
  129. package/dist/mg-components/p-T6kOJXP1.js +2 -0
  130. package/dist/mg-components/p-f2cddd52.entry.js +1 -0
  131. package/dist/mg-components/{p-82455ac7.entry.js → p-f6afaeb8.entry.js} +1 -1
  132. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
  133. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +0 -5
  134. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +5 -0
  135. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +32 -1
  136. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +4 -3
  137. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +4 -2
  138. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -2
  139. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +4 -2
  140. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -2
  141. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -2
  142. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -2
  143. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -2
  144. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +4 -2
  145. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -2
  146. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -2
  147. package/dist/types/components/molecules/mg-fieldset/mg-fieldset.d.ts +105 -0
  148. package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
  149. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +8 -1
  150. package/dist/types/components.d.ts +168 -18
  151. package/dist/types/stencil-public-runtime.d.ts +39 -2
  152. package/dist/types/types/index.d.ts +1 -1
  153. package/ide/intellij/web-types.json +289 -181
  154. package/ide/vscode/html-custom-data.json +259 -18
  155. package/package.json +23 -23
  156. package/dist/mg-components/p-54156253.entry.js +0 -1
  157. package/dist/mg-components/p-Bab8_u8S.js +0 -1
  158. package/dist/mg-components/p-CNgv8hc5.js +0 -1
  159. package/dist/mg-components/p-JHj_9FSs.js +0 -2
  160. package/dist/mg-components/p-abbd151c.entry.js +0 -1
@@ -60,7 +60,6 @@ export class MgInputTitle {
60
60
  return {
61
61
  "identifier": {
62
62
  "type": "string",
63
- "attribute": "identifier",
64
63
  "mutable": false,
65
64
  "complexType": {
66
65
  "original": "string",
@@ -75,11 +74,11 @@ export class MgInputTitle {
75
74
  },
76
75
  "getter": false,
77
76
  "setter": false,
78
- "reflect": false
77
+ "reflect": false,
78
+ "attribute": "identifier"
79
79
  },
80
80
  "required": {
81
81
  "type": "boolean",
82
- "attribute": "required",
83
82
  "mutable": false,
84
83
  "complexType": {
85
84
  "original": "boolean",
@@ -94,11 +93,11 @@ export class MgInputTitle {
94
93
  },
95
94
  "getter": false,
96
95
  "setter": false,
97
- "reflect": false
96
+ "reflect": false,
97
+ "attribute": "required"
98
98
  },
99
99
  "readonly": {
100
100
  "type": "boolean",
101
- "attribute": "readonly",
102
101
  "mutable": false,
103
102
  "complexType": {
104
103
  "original": "boolean",
@@ -113,11 +112,11 @@ export class MgInputTitle {
113
112
  },
114
113
  "getter": false,
115
114
  "setter": false,
116
- "reflect": false
115
+ "reflect": false,
116
+ "attribute": "readonly"
117
117
  },
118
118
  "isLegend": {
119
119
  "type": "boolean",
120
- "attribute": "is-legend",
121
120
  "mutable": false,
122
121
  "complexType": {
123
122
  "original": "boolean",
@@ -133,6 +132,7 @@ export class MgInputTitle {
133
132
  "getter": false,
134
133
  "setter": false,
135
134
  "reflect": false,
135
+ "attribute": "is-legend",
136
136
  "defaultValue": "false"
137
137
  }
138
138
  };
@@ -80,7 +80,6 @@ export class MgBadge {
80
80
  return {
81
81
  "value": {
82
82
  "type": "any",
83
- "attribute": "value",
84
83
  "mutable": false,
85
84
  "complexType": {
86
85
  "original": "string | number",
@@ -95,11 +94,11 @@ export class MgBadge {
95
94
  },
96
95
  "getter": false,
97
96
  "setter": false,
98
- "reflect": false
97
+ "reflect": false,
98
+ "attribute": "value"
99
99
  },
100
100
  "label": {
101
101
  "type": "string",
102
- "attribute": "label",
103
102
  "mutable": false,
104
103
  "complexType": {
105
104
  "original": "string",
@@ -114,11 +113,11 @@ export class MgBadge {
114
113
  },
115
114
  "getter": false,
116
115
  "setter": false,
117
- "reflect": false
116
+ "reflect": false,
117
+ "attribute": "label"
118
118
  },
119
119
  "variant": {
120
120
  "type": "string",
121
- "attribute": "variant",
122
121
  "mutable": false,
123
122
  "complexType": {
124
123
  "original": "BadgeVariantType",
@@ -140,11 +139,11 @@ export class MgBadge {
140
139
  "getter": false,
141
140
  "setter": false,
142
141
  "reflect": false,
142
+ "attribute": "variant",
143
143
  "defaultValue": "'info'"
144
144
  },
145
145
  "outline": {
146
146
  "type": "boolean",
147
- "attribute": "outline",
148
147
  "mutable": false,
149
148
  "complexType": {
150
149
  "original": "boolean",
@@ -160,6 +159,7 @@ export class MgBadge {
160
159
  "getter": false,
161
160
  "setter": false,
162
161
  "reflect": false,
162
+ "attribute": "outline",
163
163
  "defaultValue": "false"
164
164
  }
165
165
  };
@@ -223,7 +223,6 @@ export class MgButton {
223
223
  return {
224
224
  "variant": {
225
225
  "type": "string",
226
- "attribute": "variant",
227
226
  "mutable": true,
228
227
  "complexType": {
229
228
  "original": "VariantType",
@@ -245,11 +244,11 @@ export class MgButton {
245
244
  "getter": false,
246
245
  "setter": false,
247
246
  "reflect": false,
247
+ "attribute": "variant",
248
248
  "defaultValue": "'primary'"
249
249
  },
250
250
  "label": {
251
251
  "type": "string",
252
- "attribute": "label",
253
252
  "mutable": false,
254
253
  "complexType": {
255
254
  "original": "string",
@@ -264,11 +263,11 @@ export class MgButton {
264
263
  },
265
264
  "getter": false,
266
265
  "setter": false,
267
- "reflect": false
266
+ "reflect": false,
267
+ "attribute": "label"
268
268
  },
269
269
  "type": {
270
270
  "type": "string",
271
- "attribute": "type",
272
271
  "mutable": false,
273
272
  "complexType": {
274
273
  "original": "ButtonType",
@@ -289,11 +288,11 @@ export class MgButton {
289
288
  },
290
289
  "getter": false,
291
290
  "setter": false,
292
- "reflect": false
291
+ "reflect": false,
292
+ "attribute": "type"
293
293
  },
294
294
  "size": {
295
295
  "type": "string",
296
- "attribute": "size",
297
296
  "mutable": false,
298
297
  "complexType": {
299
298
  "original": "SizeType",
@@ -315,11 +314,11 @@ export class MgButton {
315
314
  "getter": false,
316
315
  "setter": false,
317
316
  "reflect": false,
317
+ "attribute": "size",
318
318
  "defaultValue": "'medium'"
319
319
  },
320
320
  "fullWidth": {
321
321
  "type": "boolean",
322
- "attribute": "full-width",
323
322
  "mutable": false,
324
323
  "complexType": {
325
324
  "original": "boolean",
@@ -335,11 +334,11 @@ export class MgButton {
335
334
  "getter": false,
336
335
  "setter": false,
337
336
  "reflect": false,
337
+ "attribute": "full-width",
338
338
  "defaultValue": "false"
339
339
  },
340
340
  "form": {
341
341
  "type": "string",
342
- "attribute": "form",
343
342
  "mutable": false,
344
343
  "complexType": {
345
344
  "original": "string",
@@ -354,11 +353,11 @@ export class MgButton {
354
353
  },
355
354
  "getter": false,
356
355
  "setter": false,
357
- "reflect": false
356
+ "reflect": false,
357
+ "attribute": "form"
358
358
  },
359
359
  "disabled": {
360
360
  "type": "boolean",
361
- "attribute": "disabled",
362
361
  "mutable": true,
363
362
  "complexType": {
364
363
  "original": "boolean",
@@ -373,11 +372,11 @@ export class MgButton {
373
372
  },
374
373
  "getter": false,
375
374
  "setter": false,
376
- "reflect": false
375
+ "reflect": false,
376
+ "attribute": "disabled"
377
377
  },
378
378
  "isIcon": {
379
379
  "type": "boolean",
380
- "attribute": "is-icon",
381
380
  "mutable": false,
382
381
  "complexType": {
383
382
  "original": "boolean",
@@ -393,11 +392,11 @@ export class MgButton {
393
392
  "getter": false,
394
393
  "setter": false,
395
394
  "reflect": false,
395
+ "attribute": "is-icon",
396
396
  "defaultValue": "false"
397
397
  },
398
398
  "disableOnClick": {
399
399
  "type": "boolean",
400
- "attribute": "disable-on-click",
401
400
  "mutable": false,
402
401
  "complexType": {
403
402
  "original": "boolean",
@@ -413,6 +412,7 @@ export class MgButton {
413
412
  "getter": false,
414
413
  "setter": false,
415
414
  "reflect": false,
415
+ "attribute": "disable-on-click",
416
416
  "defaultValue": "false"
417
417
  }
418
418
  };
@@ -68,7 +68,6 @@ export class MgCard {
68
68
  return {
69
69
  "shadow": {
70
70
  "type": "boolean",
71
- "attribute": "shadow",
72
71
  "mutable": false,
73
72
  "complexType": {
74
73
  "original": "boolean",
@@ -84,11 +83,11 @@ export class MgCard {
84
83
  "getter": false,
85
84
  "setter": false,
86
85
  "reflect": false,
86
+ "attribute": "shadow",
87
87
  "defaultValue": "false"
88
88
  },
89
89
  "radiusSize": {
90
90
  "type": "string",
91
- "attribute": "radius-size",
92
91
  "mutable": false,
93
92
  "complexType": {
94
93
  "original": "RadiusSizeType",
@@ -110,6 +109,7 @@ export class MgCard {
110
109
  "getter": false,
111
110
  "setter": false,
112
111
  "reflect": false,
112
+ "attribute": "radius-size",
113
113
  "defaultValue": "'medium'"
114
114
  }
115
115
  };
@@ -35,7 +35,6 @@ export class MgDivider {
35
35
  return {
36
36
  "fullWidth": {
37
37
  "type": "boolean",
38
- "attribute": "full-width",
39
38
  "mutable": false,
40
39
  "complexType": {
41
40
  "original": "boolean",
@@ -51,6 +50,7 @@ export class MgDivider {
51
50
  "getter": false,
52
51
  "setter": false,
53
52
  "reflect": false,
53
+ "attribute": "full-width",
54
54
  "defaultValue": "false"
55
55
  }
56
56
  };
@@ -5,7 +5,7 @@ export const sizes = ['small', 'medium', 'large', 'xlarge', 'xxlarge'];
5
5
  /**
6
6
  * List of all possibles variants
7
7
  */
8
- export const variants = ['success', 'warning', 'danger', 'info', 'app'];
8
+ export const variants = ['success', 'warning', 'danger', 'info', 'app', 'neutral'];
9
9
  /**
10
10
  * List of all possibles variants styles
11
11
  */
@@ -15,14 +15,6 @@ export class MgIcon {
15
15
  * Component classes
16
16
  */
17
17
  this.classCollection = new ClassList(['mg-c-icon']);
18
- /**
19
- * Method to set default varianStyle props
20
- * needeed has stencil doesn't know that props is mutated when updated in prop watcher
21
- */
22
- this.setDefaultVariantStyle = () => {
23
- if (this.variantStyle === undefined)
24
- this.variantStyle = 'background';
25
- };
26
18
  /**
27
19
  * Render icon in shadowroot
28
20
  * @param icon - icon to render
@@ -71,24 +63,38 @@ export class MgIcon {
71
63
  }
72
64
  }
73
65
  validateVariant(newValue, oldValue) {
74
- if (newValue !== undefined) {
75
- if (!variants.includes(newValue))
66
+ var _a;
67
+ // Remove old variant if exists
68
+ if (oldValue !== undefined) {
69
+ this.classCollection.delete(`mg-c-icon--variant-${oldValue}`);
70
+ }
71
+ // Set new variant
72
+ const variant = newValue === 'neutral' ? 'dark' : newValue;
73
+ if (variant !== undefined) {
74
+ if (![...variants, 'dark'].includes(variant)) {
76
75
  throw new Error(`<mg-icon> prop "variant" must be one of: ${variants.join(', ')}. Passed value: ${toString(newValue)}.`);
76
+ }
77
77
  else {
78
- this.setDefaultVariantStyle();
79
- if (oldValue !== undefined)
80
- this.classCollection.delete(`mg-c-icon--variant-${oldValue}`);
81
- this.classCollection.add(`mg-c-icon--variant-${newValue}`);
78
+ (_a = this.variantStyle) !== null && _a !== void 0 ? _a : (this.variantStyle = 'background');
79
+ this.classCollection.add(`mg-c-icon--variant-${variant}`);
82
80
  }
83
81
  }
82
+ else {
83
+ // remove variantStyle if variant is undefined
84
+ this.variantStyle = undefined;
85
+ }
84
86
  }
85
87
  validateVariantStyle(newValue, oldValue) {
88
+ // Remove old variantStyle if exists
89
+ if (oldValue !== undefined) {
90
+ this.classCollection.delete(`mg-c-icon--variant-style-${oldValue}`);
91
+ }
92
+ // Set new variantStyle
86
93
  if (newValue !== undefined) {
87
- if (!variantStyles.includes(newValue))
94
+ if (!variantStyles.includes(newValue)) {
88
95
  throw new Error(`<mg-icon> prop "variantStyle" must be one of: ${variantStyles.join(', ')}. Passed value: ${toString(newValue)}.`);
96
+ }
89
97
  else {
90
- if (oldValue !== undefined)
91
- this.classCollection.delete(`mg-c-icon--variant-style-${oldValue}`);
92
98
  this.classCollection.add(`mg-c-icon--variant-style-${newValue}`);
93
99
  }
94
100
  }
@@ -135,7 +141,6 @@ export class MgIcon {
135
141
  return {
136
142
  "icon": {
137
143
  "type": "string",
138
- "attribute": "icon",
139
144
  "mutable": false,
140
145
  "complexType": {
141
146
  "original": "IconType",
@@ -156,11 +161,11 @@ export class MgIcon {
156
161
  },
157
162
  "getter": false,
158
163
  "setter": false,
159
- "reflect": false
164
+ "reflect": false,
165
+ "attribute": "icon"
160
166
  },
161
167
  "size": {
162
168
  "type": "string",
163
- "attribute": "size",
164
169
  "mutable": false,
165
170
  "complexType": {
166
171
  "original": "IconSizeType",
@@ -182,15 +187,15 @@ export class MgIcon {
182
187
  "getter": false,
183
188
  "setter": false,
184
189
  "reflect": false,
190
+ "attribute": "size",
185
191
  "defaultValue": "'medium'"
186
192
  },
187
193
  "variant": {
188
194
  "type": "string",
189
- "attribute": "variant",
190
195
  "mutable": false,
191
196
  "complexType": {
192
197
  "original": "IconVariantType",
193
- "resolved": "\"app\" | \"danger\" | \"info\" | \"success\" | \"warning\"",
198
+ "resolved": "\"app\" | \"danger\" | \"info\" | \"neutral\" | \"success\" | \"warning\"",
194
199
  "references": {
195
200
  "IconVariantType": {
196
201
  "location": "import",
@@ -207,11 +212,11 @@ export class MgIcon {
207
212
  },
208
213
  "getter": false,
209
214
  "setter": false,
210
- "reflect": false
215
+ "reflect": false,
216
+ "attribute": "variant"
211
217
  },
212
218
  "variantStyle": {
213
219
  "type": "string",
214
- "attribute": "variant-style",
215
220
  "mutable": true,
216
221
  "complexType": {
217
222
  "original": "IconVariantStyleType",
@@ -232,11 +237,11 @@ export class MgIcon {
232
237
  },
233
238
  "getter": false,
234
239
  "setter": false,
235
- "reflect": false
240
+ "reflect": false,
241
+ "attribute": "variant-style"
236
242
  },
237
243
  "spin": {
238
244
  "type": "boolean",
239
- "attribute": "spin",
240
245
  "mutable": false,
241
246
  "complexType": {
242
247
  "original": "boolean",
@@ -252,6 +257,7 @@ export class MgIcon {
252
257
  "getter": false,
253
258
  "setter": false,
254
259
  "reflect": false,
260
+ "attribute": "spin",
255
261
  "defaultValue": "false"
256
262
  }
257
263
  };
@@ -102,7 +102,6 @@ export class MgTag {
102
102
  return {
103
103
  "variant": {
104
104
  "type": "string",
105
- "attribute": "variant",
106
105
  "mutable": false,
107
106
  "complexType": {
108
107
  "original": "TagVariantType",
@@ -124,11 +123,11 @@ export class MgTag {
124
123
  "getter": false,
125
124
  "setter": false,
126
125
  "reflect": false,
126
+ "attribute": "variant",
127
127
  "defaultValue": "'primary'"
128
128
  },
129
129
  "outline": {
130
130
  "type": "boolean",
131
- "attribute": "outline",
132
131
  "mutable": false,
133
132
  "complexType": {
134
133
  "original": "boolean",
@@ -144,11 +143,11 @@ export class MgTag {
144
143
  "getter": false,
145
144
  "setter": false,
146
145
  "reflect": false,
146
+ "attribute": "outline",
147
147
  "defaultValue": "false"
148
148
  },
149
149
  "soft": {
150
150
  "type": "boolean",
151
- "attribute": "soft",
152
151
  "mutable": false,
153
152
  "complexType": {
154
153
  "original": "boolean",
@@ -164,6 +163,7 @@ export class MgTag {
164
163
  "getter": false,
165
164
  "setter": false,
166
165
  "reflect": false,
166
+ "attribute": "soft",
167
167
  "defaultValue": "false"
168
168
  }
169
169
  };
@@ -29,7 +29,6 @@ export class MgTooltipContent {
29
29
  return {
30
30
  "message": {
31
31
  "type": "string",
32
- "attribute": "message",
33
32
  "mutable": false,
34
33
  "complexType": {
35
34
  "original": "string",
@@ -44,7 +43,8 @@ export class MgTooltipContent {
44
43
  },
45
44
  "getter": false,
46
45
  "setter": false,
47
- "reflect": false
46
+ "reflect": false,
47
+ "attribute": "message"
48
48
  }
49
49
  };
50
50
  }
@@ -382,7 +382,6 @@ export class MgTooltip {
382
382
  return {
383
383
  "identifier": {
384
384
  "type": "string",
385
- "attribute": "identifier",
386
385
  "mutable": false,
387
386
  "complexType": {
388
387
  "original": "string",
@@ -398,11 +397,11 @@ export class MgTooltip {
398
397
  "getter": false,
399
398
  "setter": false,
400
399
  "reflect": false,
400
+ "attribute": "identifier",
401
401
  "defaultValue": "createID('mg-tooltip')"
402
402
  },
403
403
  "message": {
404
404
  "type": "string",
405
- "attribute": "message",
406
405
  "mutable": false,
407
406
  "complexType": {
408
407
  "original": "string",
@@ -417,11 +416,11 @@ export class MgTooltip {
417
416
  },
418
417
  "getter": false,
419
418
  "setter": false,
420
- "reflect": false
419
+ "reflect": false,
420
+ "attribute": "message"
421
421
  },
422
422
  "placement": {
423
423
  "type": "string",
424
- "attribute": "placement",
425
424
  "mutable": false,
426
425
  "complexType": {
427
426
  "original": "Placement",
@@ -443,11 +442,11 @@ export class MgTooltip {
443
442
  "getter": false,
444
443
  "setter": false,
445
444
  "reflect": false,
445
+ "attribute": "placement",
446
446
  "defaultValue": "'bottom'"
447
447
  },
448
448
  "display": {
449
449
  "type": "boolean",
450
- "attribute": "display",
451
450
  "mutable": true,
452
451
  "complexType": {
453
452
  "original": "boolean",
@@ -463,11 +462,11 @@ export class MgTooltip {
463
462
  "getter": false,
464
463
  "setter": false,
465
464
  "reflect": false,
465
+ "attribute": "display",
466
466
  "defaultValue": "false"
467
467
  },
468
468
  "disabled": {
469
469
  "type": "boolean",
470
- "attribute": "disabled",
471
470
  "mutable": false,
472
471
  "complexType": {
473
472
  "original": "boolean",
@@ -483,6 +482,7 @@ export class MgTooltip {
483
482
  "getter": false,
484
483
  "setter": false,
485
484
  "reflect": false,
485
+ "attribute": "disabled",
486
486
  "defaultValue": "false"
487
487
  }
488
488
  };
@@ -6,6 +6,10 @@ export const widths = [2, 4, 16, 'full'];
6
6
  * Possible tootltip postions
7
7
  */
8
8
  export const tooltipPositions = ['input', 'label'];
9
+ /**
10
+ * Possible label headings
11
+ */
12
+ export const labelHeadings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
9
13
  export const classFieldset = 'mg-c-input--fieldset';
10
14
  export const classDisabled = 'mg-c-input--disabled';
11
15
  export const classReadonly = 'mg-c-input--readonly';