@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,6 +1,6 @@
1
- import { Component, Element, h, Prop, State, Watch } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { variants } from './mg-button.conf';
3
- import { ClassList, createID } from '../../../utils/components.utils';
3
+ import { ClassList } from '../../../utils/components.utils';
4
4
  export class MgButton {
5
5
  constructor() {
6
6
  /************
@@ -11,11 +11,6 @@ export class MgButton {
11
11
  * Define button variant
12
12
  */
13
13
  this.variant = variants[0]; // Primary
14
- /**
15
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
16
- * If not set, it will be created.
17
- */
18
- this.identifier = createID('mg-button');
19
14
  /**
20
15
  * Define if button is round.
21
16
  * Used for icon button.
@@ -90,7 +85,7 @@ export class MgButton {
90
85
  this.validateVariant(this.variant);
91
86
  if (this.isIcon) {
92
87
  this.classList.add(`mg-button--icon`);
93
- if (typeof this.label !== 'string' || this.label === '') {
88
+ if (typeof this.label !== 'string' || this.label.trim() === '') {
94
89
  throw new Error(`<mg-button> prop "label" is mandatory when prop "isIcon" is set to true.`);
95
90
  }
96
91
  }
@@ -104,233 +99,239 @@ export class MgButton {
104
99
  * @returns {HTMLElement} html element
105
100
  */
106
101
  render() {
107
- return (h("button", { id: this.identifier, class: this.classList.join(), type: this.type, "aria-label": this.label, "aria-disabled": this.disabled !== undefined && this.disabled.toString(), "aria-expanded": this.expanded !== undefined && this.expanded.toString(), "aria-controls": this.controls, "aria-haspopup": this.haspopup !== undefined && this.haspopup.toString(), onClick: this.handleClick,
102
+ return (h("button", { id: this.identifier, class: this.classList.join(), type: this.type, "aria-label": this.label, "aria-disabled": this.disabled !== undefined && this.disabled.toString(), "aria-expanded": this.expanded !== undefined && this.expanded.toString(), "aria-controls": this.controls, "aria-haspopup": this.haspopup !== undefined && this.haspopup.toString(), onClick: this.handleClick,
108
103
  // has stencil does not support form attribute on button, we set the attribute from the ref
109
104
  // https://github.com/ionic-team/stencil/issues/2703#issuecomment-1050943715
110
- ref: btn => this.form && btn.setAttribute('form', this.form) },
111
- this.loading && h("mg-icon", { icon: "loader", spin: true }),
112
- h("div", { class: "mg-button__content" },
113
- h("slot", null))));
105
+ ref: btn => this.form && btn.setAttribute('form', this.form) }, this.loading && h("mg-icon", { icon: "loader", spin: true }), h("div", { class: "mg-button__content" }, h("slot", null))));
114
106
  }
115
107
  static get is() { return "mg-button"; }
116
108
  static get encapsulation() { return "scoped"; }
117
- static get originalStyleUrls() { return {
118
- "$": ["mg-button.scss"]
119
- }; }
120
- static get styleUrls() { return {
121
- "$": ["mg-button.css"]
122
- }; }
123
- static get properties() { return {
124
- "variant": {
125
- "type": "string",
126
- "mutable": false,
127
- "complexType": {
128
- "original": "string",
129
- "resolved": "string",
130
- "references": {}
131
- },
132
- "required": false,
133
- "optional": false,
134
- "docs": {
135
- "tags": [],
136
- "text": "Define button variant"
137
- },
138
- "attribute": "variant",
139
- "reflect": false,
140
- "defaultValue": "variants[0]"
141
- },
142
- "identifier": {
143
- "type": "string",
144
- "mutable": false,
145
- "complexType": {
146
- "original": "string",
147
- "resolved": "string",
148
- "references": {}
149
- },
150
- "required": false,
151
- "optional": false,
152
- "docs": {
153
- "tags": [],
154
- "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
109
+ static get originalStyleUrls() {
110
+ return {
111
+ "$": ["mg-button.scss"]
112
+ };
113
+ }
114
+ static get styleUrls() {
115
+ return {
116
+ "$": ["mg-button.css"]
117
+ };
118
+ }
119
+ static get properties() {
120
+ return {
121
+ "variant": {
122
+ "type": "string",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "string",
126
+ "resolved": "string",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": false,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": "Define button variant"
134
+ },
135
+ "attribute": "variant",
136
+ "reflect": false,
137
+ "defaultValue": "variants[0]"
155
138
  },
156
- "attribute": "identifier",
157
- "reflect": false,
158
- "defaultValue": "createID('mg-button')"
159
- },
160
- "label": {
161
- "type": "string",
162
- "mutable": false,
163
- "complexType": {
164
- "original": "string",
165
- "resolved": "string",
166
- "references": {}
139
+ "identifier": {
140
+ "type": "string",
141
+ "mutable": false,
142
+ "complexType": {
143
+ "original": "string",
144
+ "resolved": "string",
145
+ "references": {}
146
+ },
147
+ "required": false,
148
+ "optional": false,
149
+ "docs": {
150
+ "tags": [],
151
+ "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)"
152
+ },
153
+ "attribute": "identifier",
154
+ "reflect": false
167
155
  },
168
- "required": false,
169
- "optional": false,
170
- "docs": {
171
- "tags": [],
172
- "text": "aria-label\nIn case button text is not explicit enough"
156
+ "label": {
157
+ "type": "string",
158
+ "mutable": false,
159
+ "complexType": {
160
+ "original": "string",
161
+ "resolved": "string",
162
+ "references": {}
163
+ },
164
+ "required": false,
165
+ "optional": false,
166
+ "docs": {
167
+ "tags": [],
168
+ "text": "aria-label\nIn case button text is not explicit enough"
169
+ },
170
+ "attribute": "label",
171
+ "reflect": false
173
172
  },
174
- "attribute": "label",
175
- "reflect": false
176
- },
177
- "type": {
178
- "type": "string",
179
- "mutable": false,
180
- "complexType": {
181
- "original": "ButtonType",
182
- "resolved": "\"button\" | \"reset\" | \"submit\"",
183
- "references": {
184
- "ButtonType": {
185
- "location": "import",
186
- "path": "./mg-button.conf"
173
+ "type": {
174
+ "type": "string",
175
+ "mutable": false,
176
+ "complexType": {
177
+ "original": "ButtonType",
178
+ "resolved": "\"button\" | \"reset\" | \"submit\"",
179
+ "references": {
180
+ "ButtonType": {
181
+ "location": "import",
182
+ "path": "./mg-button.conf"
183
+ }
187
184
  }
188
- }
189
- },
190
- "required": false,
191
- "optional": false,
192
- "docs": {
193
- "tags": [],
194
- "text": "Define button type\nDefault: 'submit', as HTMLButtonElement type is submit by default"
195
- },
196
- "attribute": "type",
197
- "reflect": false
198
- },
199
- "form": {
200
- "type": "string",
201
- "mutable": true,
202
- "complexType": {
203
- "original": "string",
204
- "resolved": "string",
205
- "references": {}
206
- },
207
- "required": false,
208
- "optional": false,
209
- "docs": {
210
- "tags": [],
211
- "text": "Define form id to attach button with.\nIf this attribute is not set, the <button> is associated with its ancestor <form> element."
212
- },
213
- "attribute": "form",
214
- "reflect": false
215
- },
216
- "disabled": {
217
- "type": "boolean",
218
- "mutable": true,
219
- "complexType": {
220
- "original": "boolean",
221
- "resolved": "boolean",
222
- "references": {}
185
+ },
186
+ "required": false,
187
+ "optional": false,
188
+ "docs": {
189
+ "tags": [],
190
+ "text": "Define button type\nDefault: 'submit', as HTMLButtonElement type is submit by default"
191
+ },
192
+ "attribute": "type",
193
+ "reflect": false
223
194
  },
224
- "required": false,
225
- "optional": false,
226
- "docs": {
227
- "tags": [],
228
- "text": "Disable button"
195
+ "form": {
196
+ "type": "string",
197
+ "mutable": true,
198
+ "complexType": {
199
+ "original": "string",
200
+ "resolved": "string",
201
+ "references": {}
202
+ },
203
+ "required": false,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": "Define form id to attach button with.\nIf this attribute is not set, the <button> is associated with its ancestor <form> element."
208
+ },
209
+ "attribute": "form",
210
+ "reflect": false
229
211
  },
230
- "attribute": "disabled",
231
- "reflect": false
232
- },
233
- "isIcon": {
234
- "type": "boolean",
235
- "mutable": false,
236
- "complexType": {
237
- "original": "boolean",
238
- "resolved": "boolean",
239
- "references": {}
212
+ "disabled": {
213
+ "type": "boolean",
214
+ "mutable": true,
215
+ "complexType": {
216
+ "original": "boolean",
217
+ "resolved": "boolean",
218
+ "references": {}
219
+ },
220
+ "required": false,
221
+ "optional": false,
222
+ "docs": {
223
+ "tags": [],
224
+ "text": "Disable button"
225
+ },
226
+ "attribute": "disabled",
227
+ "reflect": false
240
228
  },
241
- "required": false,
242
- "optional": false,
243
- "docs": {
244
- "tags": [],
245
- "text": "Define if button is round.\nUsed for icon button."
229
+ "isIcon": {
230
+ "type": "boolean",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "boolean",
234
+ "resolved": "boolean",
235
+ "references": {}
236
+ },
237
+ "required": false,
238
+ "optional": false,
239
+ "docs": {
240
+ "tags": [],
241
+ "text": "Define if button is round.\nUsed for icon button."
242
+ },
243
+ "attribute": "is-icon",
244
+ "reflect": false,
245
+ "defaultValue": "false"
246
246
  },
247
- "attribute": "is-icon",
248
- "reflect": false,
249
- "defaultValue": "false"
250
- },
251
- "disableOnClick": {
252
- "type": "boolean",
253
- "mutable": false,
254
- "complexType": {
255
- "original": "boolean",
256
- "resolved": "boolean",
257
- "references": {}
247
+ "disableOnClick": {
248
+ "type": "boolean",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "boolean",
252
+ "resolved": "boolean",
253
+ "references": {}
254
+ },
255
+ "required": false,
256
+ "optional": false,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Option to set input disable on click, in order to prevent multi-click.\nParent component have to remove the attribute 'disabled' when the process ends."
260
+ },
261
+ "attribute": "disable-on-click",
262
+ "reflect": false,
263
+ "defaultValue": "false"
258
264
  },
259
- "required": false,
260
- "optional": false,
261
- "docs": {
262
- "tags": [],
263
- "text": "Option to set input disable on click, in order to prevent multi-click.\nParent component have to remove the attribute 'disabled' when the process ends."
265
+ "expanded": {
266
+ "type": "boolean",
267
+ "mutable": false,
268
+ "complexType": {
269
+ "original": "boolean",
270
+ "resolved": "boolean",
271
+ "references": {}
272
+ },
273
+ "required": false,
274
+ "optional": false,
275
+ "docs": {
276
+ "tags": [],
277
+ "text": "Prop to set aria-expanded on button element"
278
+ },
279
+ "attribute": "expanded",
280
+ "reflect": false
264
281
  },
265
- "attribute": "disable-on-click",
266
- "reflect": false,
267
- "defaultValue": "false"
268
- },
269
- "expanded": {
270
- "type": "boolean",
271
- "mutable": false,
272
- "complexType": {
273
- "original": "boolean",
274
- "resolved": "boolean",
275
- "references": {}
282
+ "controls": {
283
+ "type": "string",
284
+ "mutable": false,
285
+ "complexType": {
286
+ "original": "string",
287
+ "resolved": "string",
288
+ "references": {}
289
+ },
290
+ "required": false,
291
+ "optional": false,
292
+ "docs": {
293
+ "tags": [],
294
+ "text": "Prop to set aria-controls on button element"
295
+ },
296
+ "attribute": "controls",
297
+ "reflect": false
276
298
  },
277
- "required": false,
278
- "optional": false,
279
- "docs": {
280
- "tags": [],
281
- "text": "Prop to set aria-expanded on button element"
282
- },
283
- "attribute": "expanded",
284
- "reflect": false
285
- },
286
- "controls": {
287
- "type": "string",
288
- "mutable": false,
289
- "complexType": {
290
- "original": "string",
291
- "resolved": "string",
292
- "references": {}
293
- },
294
- "required": false,
295
- "optional": false,
296
- "docs": {
297
- "tags": [],
298
- "text": "Prop to set aria-controls on button element"
299
- },
300
- "attribute": "controls",
301
- "reflect": false
302
- },
303
- "haspopup": {
304
- "type": "any",
305
- "mutable": false,
306
- "complexType": {
307
- "original": "boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'",
308
- "resolved": "\"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | boolean",
309
- "references": {}
310
- },
311
- "required": false,
312
- "optional": false,
313
- "docs": {
314
- "tags": [],
315
- "text": "Option to set aria-haspopup\nThe aria-haspopup state informs assistive technology users that there is a popup and the type of popup it is, but provides no interactivity."
316
- },
317
- "attribute": "haspopup",
318
- "reflect": false
319
- }
320
- }; }
321
- static get states() { return {
322
- "loading": {},
323
- "classList": {}
324
- }; }
299
+ "haspopup": {
300
+ "type": "any",
301
+ "mutable": false,
302
+ "complexType": {
303
+ "original": "boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'",
304
+ "resolved": "\"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | boolean",
305
+ "references": {}
306
+ },
307
+ "required": false,
308
+ "optional": false,
309
+ "docs": {
310
+ "tags": [],
311
+ "text": "Option to set aria-haspopup\nThe aria-haspopup state informs assistive technology users that there is a popup and the type of popup it is, but provides no interactivity."
312
+ },
313
+ "attribute": "haspopup",
314
+ "reflect": false
315
+ }
316
+ };
317
+ }
318
+ static get states() {
319
+ return {
320
+ "loading": {},
321
+ "classList": {}
322
+ };
323
+ }
325
324
  static get elementRef() { return "element"; }
326
- static get watchers() { return [{
327
- "propName": "variant",
328
- "methodName": "validateVariant"
329
- }, {
330
- "propName": "disabled",
331
- "methodName": "disabledHandler"
332
- }, {
333
- "propName": "loading",
334
- "methodName": "loadingHandler"
335
- }]; }
325
+ static get watchers() {
326
+ return [{
327
+ "propName": "variant",
328
+ "methodName": "validateVariant"
329
+ }, {
330
+ "propName": "disabled",
331
+ "methodName": "disabledHandler"
332
+ }, {
333
+ "propName": "loading",
334
+ "methodName": "loadingHandler"
335
+ }];
336
+ }
336
337
  }
@@ -1,4 +1,4 @@
1
- import { Component, Element, h, Prop, Watch } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { initLocales } from '../../../locales';
3
3
  export class MgCharacterLeft {
4
4
  constructor() {
@@ -30,78 +30,81 @@ export class MgCharacterLeft {
30
30
  * @returns {HTMLElement} HTML Element
31
31
  */
32
32
  render() {
33
- return (h("span", { id: this.identifier, "aria-live": "polite" },
34
- h("span", { "aria-hidden": "true" },
35
- this.maxlength - this.characters.length,
36
- "/",
37
- this.maxlength),
38
- h("span", { class: "sr-only" }, this.messages.nbCharLeft.replace('{counter}', this.maxlength - this.characters.length))));
33
+ return (h("span", { id: this.identifier, "aria-live": "polite" }, h("span", { "aria-hidden": "true" }, this.maxlength - this.characters.length, "/", this.maxlength), h("span", { class: "sr-only" }, this.messages.nbCharLeft.replace('{counter}', this.maxlength - this.characters.length))));
39
34
  }
40
35
  static get is() { return "mg-character-left"; }
41
36
  static get encapsulation() { return "scoped"; }
42
- static get originalStyleUrls() { return {
43
- "$": ["mg-character-left.scss"]
44
- }; }
45
- static get styleUrls() { return {
46
- "$": ["mg-character-left.css"]
47
- }; }
48
- static get properties() { return {
49
- "identifier": {
50
- "type": "string",
51
- "mutable": false,
52
- "complexType": {
53
- "original": "string",
54
- "resolved": "string",
55
- "references": {}
56
- },
57
- "required": false,
58
- "optional": false,
59
- "docs": {
60
- "tags": [],
61
- "text": "Sets an `id` attribute.\nNeeded by the input for accessibility `aria-decribedby`."
62
- },
63
- "attribute": "identifier",
64
- "reflect": false
65
- },
66
- "characters": {
67
- "type": "string",
68
- "mutable": false,
69
- "complexType": {
70
- "original": "string",
71
- "resolved": "string",
72
- "references": {}
73
- },
74
- "required": false,
75
- "optional": false,
76
- "docs": {
77
- "tags": [],
78
- "text": "Sets the characters to count"
79
- },
80
- "attribute": "characters",
81
- "reflect": false,
82
- "defaultValue": "''"
83
- },
84
- "maxlength": {
85
- "type": "number",
86
- "mutable": false,
87
- "complexType": {
88
- "original": "number",
89
- "resolved": "number",
90
- "references": {}
37
+ static get originalStyleUrls() {
38
+ return {
39
+ "$": ["mg-character-left.scss"]
40
+ };
41
+ }
42
+ static get styleUrls() {
43
+ return {
44
+ "$": ["mg-character-left.css"]
45
+ };
46
+ }
47
+ static get properties() {
48
+ return {
49
+ "identifier": {
50
+ "type": "string",
51
+ "mutable": false,
52
+ "complexType": {
53
+ "original": "string",
54
+ "resolved": "string",
55
+ "references": {}
56
+ },
57
+ "required": false,
58
+ "optional": false,
59
+ "docs": {
60
+ "tags": [],
61
+ "text": "Sets an `id` attribute.\nNeeded by the input for accessibility `aria-decribedby`."
62
+ },
63
+ "attribute": "identifier",
64
+ "reflect": false
91
65
  },
92
- "required": true,
93
- "optional": false,
94
- "docs": {
95
- "tags": [],
96
- "text": "Add maximum length"
66
+ "characters": {
67
+ "type": "string",
68
+ "mutable": false,
69
+ "complexType": {
70
+ "original": "string",
71
+ "resolved": "string",
72
+ "references": {}
73
+ },
74
+ "required": false,
75
+ "optional": false,
76
+ "docs": {
77
+ "tags": [],
78
+ "text": "Sets the characters to count"
79
+ },
80
+ "attribute": "characters",
81
+ "reflect": false,
82
+ "defaultValue": "''"
97
83
  },
98
- "attribute": "maxlength",
99
- "reflect": false
100
- }
101
- }; }
84
+ "maxlength": {
85
+ "type": "number",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "number",
89
+ "resolved": "number",
90
+ "references": {}
91
+ },
92
+ "required": true,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "Add maximum length"
97
+ },
98
+ "attribute": "maxlength",
99
+ "reflect": false
100
+ }
101
+ };
102
+ }
102
103
  static get elementRef() { return "element"; }
103
- static get watchers() { return [{
104
- "propName": "maxlength",
105
- "methodName": "validateMaxlength"
106
- }]; }
104
+ static get watchers() {
105
+ return [{
106
+ "propName": "maxlength",
107
+ "methodName": "validateMaxlength"
108
+ }];
109
+ }
107
110
  }
@@ -30,8 +30,7 @@ const Template = (args) => {
30
30
  const color = args.color;
31
31
  delete args.color;
32
32
  // return element
33
- return (h("div", { style: { color } },
34
- h("mg-icon", Object.assign({}, filterArgs(args, { size: sizes[1] })))));
33
+ return (h("div", { style: { color } }, h("mg-icon", Object.assign({}, filterArgs(args, { size: sizes[1] })))));
35
34
  };
36
35
  export const MgIcon = Template.bind({});
37
36
  MgIcon.args = {