@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.
- package/dist/cjs/{index-88560a66.js → index-64cee0c8.js} +248 -81
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{mg-badge_24.cjs.entry.js → mg-badge_23.cjs.entry.js} +206 -2180
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-modal.cjs.entry.js +8 -1
- package/dist/cjs/mg-popover.cjs.entry.js +171 -0
- package/dist/cjs/popper-71bf3058.js +1790 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +116 -99
- package/dist/collection/components/atoms/mg-button/mg-button.js +221 -220
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +72 -69
- package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +1 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +102 -92
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +83 -67
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +64 -55
- package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +3 -6
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +120 -106
- package/dist/collection/components/molecules/inputs/MgInput.js +8 -17
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +323 -318
- package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +356 -361
- package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +1 -2
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +462 -456
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +347 -340
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +348 -343
- package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +406 -401
- package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +12 -15
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +2 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +476 -473
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +461 -456
- package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +2 -8
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +299 -298
- package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +1 -3
- package/dist/collection/components/molecules/mg-details/mg-details.js +95 -93
- package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +13 -27
- package/dist/collection/components/molecules/mg-form/mg-form.js +175 -166
- package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +2 -6
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +37 -37
- package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +1 -3
- package/dist/collection/components/molecules/mg-message/mg-message.js +154 -153
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +11 -15
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +147 -134
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +5 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +112 -117
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +1 -8
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +192 -189
- package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +1 -4
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +129 -127
- package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +1 -5
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +150 -135
- package/dist/collection/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/collection/locales/en/messages.json +50 -0
- package/dist/collection/locales/fr/messages.json +50 -0
- package/dist/collection/stories/grids.stories.js +1 -44
- package/dist/collection/stories/helpers.stories.js +1 -19
- package/dist/collection/stories/icons.stories.js +1 -4
- package/dist/collection/stories/typography.stories.js +1 -12
- package/dist/collection/variables.css +3 -2
- package/dist/collection/variables.scss +3 -2
- package/dist/components/MgInput.js +6 -3
- package/dist/components/mg-badge2.js +7 -0
- package/dist/components/mg-button2.js +2 -7
- package/dist/components/mg-input-checkbox.js +1 -6
- package/dist/components/mg-input-date.js +10 -27
- package/dist/components/mg-input-numeric.js +1 -6
- package/dist/components/mg-input-password.js +1 -6
- package/dist/components/mg-input-radio.js +1 -6
- package/dist/components/mg-input-select2.js +1 -6
- package/dist/components/mg-input-text2.js +3 -8
- package/dist/components/mg-input-textarea.js +2 -7
- package/dist/components/mg-input-title2.js +9 -0
- package/dist/components/mg-input-toggle.js +2 -7
- package/dist/components/mg-modal.js +7 -0
- package/dist/components/mg-pagination.js +3 -3
- package/dist/components/mg-panel.js +8 -4
- package/dist/components/mg-tabs.js +8 -1
- package/dist/components/mg-tooltip2.js +7 -0
- package/dist/esm/{index-bca81100.js → index-120f47fd.js} +248 -81
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-badge_24.entry.js → mg-badge_23.entry.js} +207 -2180
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-modal.entry.js +8 -1
- package/dist/esm/mg-popover.entry.js +167 -0
- package/dist/esm/popper-93ecb064.js +1788 -0
- package/dist/mg-components/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/mg-components/locales/en/messages.json +50 -0
- package/dist/mg-components/locales/fr/messages.json +50 -0
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-21991be8.entry.js +1 -0
- package/dist/mg-components/p-36a64f8c.entry.js +1 -0
- package/dist/mg-components/p-4c66f794.js +1 -0
- package/dist/mg-components/{p-b14a3443.js → p-7bc32a2f.js} +0 -0
- package/dist/mg-components/p-b380a0df.entry.js +1 -0
- package/dist/mg-components/variables.css +3 -2
- package/dist/mg-components/variables.scss +3 -2
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -1
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +1 -10
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -0
- package/dist/types/components.d.ts +29 -29
- package/loader/package.json +1 -0
- package/package.json +8 -8
- package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/p-a2883dc7.entry.js +0 -1
- package/dist/mg-components/p-cffe0519.entry.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
import {
|
|
3
|
+
import { h } from '@stencil/core';
|
|
4
4
|
import { MgInput } from '../MgInput';
|
|
5
|
-
import {
|
|
5
|
+
import { ClassList, allItemsAreString } from '../../../../utils/components.utils';
|
|
6
6
|
/**
|
|
7
7
|
* type Option validation function
|
|
8
8
|
*
|
|
@@ -21,11 +21,6 @@ export class MgInputToggle {
|
|
|
21
21
|
this.classIsActive = 'mg-input--toggle-is-active';
|
|
22
22
|
this.classOnOff = 'mg-input--toggle-on-off';
|
|
23
23
|
this.classIcon = 'mg-input--toggle-icon';
|
|
24
|
-
/**
|
|
25
|
-
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
26
|
-
* If not set, it will be created.
|
|
27
|
-
*/
|
|
28
|
-
this.identifier = createID('mg-input-toggle');
|
|
29
24
|
/**
|
|
30
25
|
* Input name
|
|
31
26
|
* If not set the value equals the identifier
|
|
@@ -188,314 +183,320 @@ export class MgInputToggle {
|
|
|
188
183
|
* @returns {HTMLElement} HTML Element
|
|
189
184
|
*/
|
|
190
185
|
render() {
|
|
191
|
-
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: !this.readonly && this.tooltip, helpText: this.helpText, errorMessage: undefined, isFieldset: false },
|
|
192
|
-
h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked },
|
|
193
|
-
h("span", { "aria-hidden": "true", class: "mg-input__toggle-item-container" },
|
|
194
|
-
h("slot", { name: "item-1" })),
|
|
195
|
-
h("span", { "aria-hidden": "true", class: "mg-input__toggle-item-container" },
|
|
196
|
-
h("slot", { name: "item-2" })))));
|
|
186
|
+
return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: !this.readonly && this.tooltip, helpText: this.helpText, errorMessage: undefined, isFieldset: false }, h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked }, h("span", { "aria-hidden": "true", class: "mg-input__toggle-item-container" }, h("slot", { name: "item-1" })), h("span", { "aria-hidden": "true", class: "mg-input__toggle-item-container" }, h("slot", { name: "item-2" })))));
|
|
197
187
|
}
|
|
198
188
|
static get is() { return "mg-input-toggle"; }
|
|
199
189
|
static get encapsulation() { return "shadow"; }
|
|
200
|
-
static get originalStyleUrls() {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
"
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
190
|
+
static get originalStyleUrls() {
|
|
191
|
+
return {
|
|
192
|
+
"$": ["mg-input-toggle.scss"]
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
static get styleUrls() {
|
|
196
|
+
return {
|
|
197
|
+
"$": ["mg-input-toggle.css"]
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
static get properties() {
|
|
201
|
+
return {
|
|
202
|
+
"value": {
|
|
203
|
+
"type": "any",
|
|
204
|
+
"mutable": true,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "any",
|
|
207
|
+
"resolved": "any",
|
|
208
|
+
"references": {}
|
|
209
|
+
},
|
|
210
|
+
"required": false,
|
|
211
|
+
"optional": false,
|
|
212
|
+
"docs": {
|
|
213
|
+
"tags": [],
|
|
214
|
+
"text": "Component value"
|
|
215
|
+
},
|
|
216
|
+
"attribute": "value",
|
|
217
|
+
"reflect": false
|
|
220
218
|
},
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
"location": "import",
|
|
233
|
-
"path": "./mg-input-toggle.conf"
|
|
219
|
+
"items": {
|
|
220
|
+
"type": "unknown",
|
|
221
|
+
"mutable": false,
|
|
222
|
+
"complexType": {
|
|
223
|
+
"original": "string[] | ToggleValue[]",
|
|
224
|
+
"resolved": "ToggleValue[] | string[]",
|
|
225
|
+
"references": {
|
|
226
|
+
"ToggleValue": {
|
|
227
|
+
"location": "import",
|
|
228
|
+
"path": "./mg-input-toggle.conf"
|
|
229
|
+
}
|
|
234
230
|
}
|
|
231
|
+
},
|
|
232
|
+
"required": true,
|
|
233
|
+
"optional": false,
|
|
234
|
+
"docs": {
|
|
235
|
+
"tags": [{
|
|
236
|
+
"name": "returns",
|
|
237
|
+
"text": undefined
|
|
238
|
+
}],
|
|
239
|
+
"text": "Items are the possible options to select"
|
|
235
240
|
}
|
|
236
241
|
},
|
|
237
|
-
"
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
"references": {}
|
|
254
|
-
},
|
|
255
|
-
"required": false,
|
|
256
|
-
"optional": false,
|
|
257
|
-
"docs": {
|
|
258
|
-
"tags": [],
|
|
259
|
-
"text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
|
|
260
|
-
},
|
|
261
|
-
"attribute": "identifier",
|
|
262
|
-
"reflect": false,
|
|
263
|
-
"defaultValue": "createID('mg-input-toggle')"
|
|
264
|
-
},
|
|
265
|
-
"name": {
|
|
266
|
-
"type": "string",
|
|
267
|
-
"mutable": false,
|
|
268
|
-
"complexType": {
|
|
269
|
-
"original": "string",
|
|
270
|
-
"resolved": "string",
|
|
271
|
-
"references": {}
|
|
272
|
-
},
|
|
273
|
-
"required": false,
|
|
274
|
-
"optional": false,
|
|
275
|
-
"docs": {
|
|
276
|
-
"tags": [],
|
|
277
|
-
"text": "Input name\nIf not set the value equals the identifier"
|
|
278
|
-
},
|
|
279
|
-
"attribute": "name",
|
|
280
|
-
"reflect": false,
|
|
281
|
-
"defaultValue": "this.identifier"
|
|
282
|
-
},
|
|
283
|
-
"label": {
|
|
284
|
-
"type": "string",
|
|
285
|
-
"mutable": false,
|
|
286
|
-
"complexType": {
|
|
287
|
-
"original": "string",
|
|
288
|
-
"resolved": "string",
|
|
289
|
-
"references": {}
|
|
290
|
-
},
|
|
291
|
-
"required": true,
|
|
292
|
-
"optional": false,
|
|
293
|
-
"docs": {
|
|
294
|
-
"tags": [],
|
|
295
|
-
"text": "Input label"
|
|
296
|
-
},
|
|
297
|
-
"attribute": "label",
|
|
298
|
-
"reflect": false
|
|
299
|
-
},
|
|
300
|
-
"labelOnTop": {
|
|
301
|
-
"type": "boolean",
|
|
302
|
-
"mutable": false,
|
|
303
|
-
"complexType": {
|
|
304
|
-
"original": "boolean",
|
|
305
|
-
"resolved": "boolean",
|
|
306
|
-
"references": {}
|
|
307
|
-
},
|
|
308
|
-
"required": false,
|
|
309
|
-
"optional": false,
|
|
310
|
-
"docs": {
|
|
311
|
-
"tags": [],
|
|
312
|
-
"text": "Define if label is displayed on top"
|
|
313
|
-
},
|
|
314
|
-
"attribute": "label-on-top",
|
|
315
|
-
"reflect": false
|
|
316
|
-
},
|
|
317
|
-
"labelHide": {
|
|
318
|
-
"type": "boolean",
|
|
319
|
-
"mutable": false,
|
|
320
|
-
"complexType": {
|
|
321
|
-
"original": "boolean",
|
|
322
|
-
"resolved": "boolean",
|
|
323
|
-
"references": {}
|
|
242
|
+
"identifier": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "string",
|
|
247
|
+
"resolved": "string",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": true,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)"
|
|
255
|
+
},
|
|
256
|
+
"attribute": "identifier",
|
|
257
|
+
"reflect": false
|
|
324
258
|
},
|
|
325
|
-
"
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
"
|
|
329
|
-
|
|
259
|
+
"name": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "string",
|
|
264
|
+
"resolved": "string",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": false,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": "Input name\nIf not set the value equals the identifier"
|
|
272
|
+
},
|
|
273
|
+
"attribute": "name",
|
|
274
|
+
"reflect": false,
|
|
275
|
+
"defaultValue": "this.identifier"
|
|
330
276
|
},
|
|
331
|
-
"
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
"
|
|
340
|
-
"
|
|
341
|
-
"
|
|
277
|
+
"label": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"mutable": false,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "string",
|
|
282
|
+
"resolved": "string",
|
|
283
|
+
"references": {}
|
|
284
|
+
},
|
|
285
|
+
"required": true,
|
|
286
|
+
"optional": false,
|
|
287
|
+
"docs": {
|
|
288
|
+
"tags": [],
|
|
289
|
+
"text": "Input label"
|
|
290
|
+
},
|
|
291
|
+
"attribute": "label",
|
|
292
|
+
"reflect": false
|
|
342
293
|
},
|
|
343
|
-
"
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
"
|
|
347
|
-
|
|
294
|
+
"labelOnTop": {
|
|
295
|
+
"type": "boolean",
|
|
296
|
+
"mutable": false,
|
|
297
|
+
"complexType": {
|
|
298
|
+
"original": "boolean",
|
|
299
|
+
"resolved": "boolean",
|
|
300
|
+
"references": {}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": false,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "Define if label is displayed on top"
|
|
307
|
+
},
|
|
308
|
+
"attribute": "label-on-top",
|
|
309
|
+
"reflect": false
|
|
348
310
|
},
|
|
349
|
-
"
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
"
|
|
358
|
-
"
|
|
359
|
-
"
|
|
311
|
+
"labelHide": {
|
|
312
|
+
"type": "boolean",
|
|
313
|
+
"mutable": false,
|
|
314
|
+
"complexType": {
|
|
315
|
+
"original": "boolean",
|
|
316
|
+
"resolved": "boolean",
|
|
317
|
+
"references": {}
|
|
318
|
+
},
|
|
319
|
+
"required": false,
|
|
320
|
+
"optional": false,
|
|
321
|
+
"docs": {
|
|
322
|
+
"tags": [],
|
|
323
|
+
"text": "Define if label is visible"
|
|
324
|
+
},
|
|
325
|
+
"attribute": "label-hide",
|
|
326
|
+
"reflect": false,
|
|
327
|
+
"defaultValue": "false"
|
|
360
328
|
},
|
|
361
|
-
"
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
"
|
|
365
|
-
|
|
329
|
+
"isOnOff": {
|
|
330
|
+
"type": "boolean",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "boolean",
|
|
334
|
+
"resolved": "boolean",
|
|
335
|
+
"references": {}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": false,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"text": "Define if toggle have on/off style"
|
|
342
|
+
},
|
|
343
|
+
"attribute": "is-on-off",
|
|
344
|
+
"reflect": false,
|
|
345
|
+
"defaultValue": "false"
|
|
366
346
|
},
|
|
367
|
-
"
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
"
|
|
376
|
-
"
|
|
377
|
-
"
|
|
347
|
+
"isIcon": {
|
|
348
|
+
"type": "boolean",
|
|
349
|
+
"mutable": false,
|
|
350
|
+
"complexType": {
|
|
351
|
+
"original": "boolean",
|
|
352
|
+
"resolved": "boolean",
|
|
353
|
+
"references": {}
|
|
354
|
+
},
|
|
355
|
+
"required": false,
|
|
356
|
+
"optional": false,
|
|
357
|
+
"docs": {
|
|
358
|
+
"tags": [],
|
|
359
|
+
"text": "Define if toggle display icon"
|
|
360
|
+
},
|
|
361
|
+
"attribute": "is-icon",
|
|
362
|
+
"reflect": false,
|
|
363
|
+
"defaultValue": "false"
|
|
378
364
|
},
|
|
379
|
-
"
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
"
|
|
383
|
-
|
|
365
|
+
"readonly": {
|
|
366
|
+
"type": "boolean",
|
|
367
|
+
"mutable": false,
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "boolean",
|
|
370
|
+
"resolved": "boolean",
|
|
371
|
+
"references": {}
|
|
372
|
+
},
|
|
373
|
+
"required": false,
|
|
374
|
+
"optional": false,
|
|
375
|
+
"docs": {
|
|
376
|
+
"tags": [],
|
|
377
|
+
"text": "Define if input is readonly"
|
|
378
|
+
},
|
|
379
|
+
"attribute": "readonly",
|
|
380
|
+
"reflect": false,
|
|
381
|
+
"defaultValue": "false"
|
|
384
382
|
},
|
|
385
|
-
"
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
"
|
|
394
|
-
"
|
|
395
|
-
"
|
|
383
|
+
"disabled": {
|
|
384
|
+
"type": "boolean",
|
|
385
|
+
"mutable": false,
|
|
386
|
+
"complexType": {
|
|
387
|
+
"original": "boolean",
|
|
388
|
+
"resolved": "boolean",
|
|
389
|
+
"references": {}
|
|
390
|
+
},
|
|
391
|
+
"required": false,
|
|
392
|
+
"optional": false,
|
|
393
|
+
"docs": {
|
|
394
|
+
"tags": [],
|
|
395
|
+
"text": "Define if input is disabled"
|
|
396
|
+
},
|
|
397
|
+
"attribute": "disabled",
|
|
398
|
+
"reflect": false,
|
|
399
|
+
"defaultValue": "false"
|
|
396
400
|
},
|
|
397
|
-
"
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
"
|
|
401
|
-
|
|
401
|
+
"tooltip": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"mutable": false,
|
|
404
|
+
"complexType": {
|
|
405
|
+
"original": "string",
|
|
406
|
+
"resolved": "string",
|
|
407
|
+
"references": {}
|
|
408
|
+
},
|
|
409
|
+
"required": false,
|
|
410
|
+
"optional": false,
|
|
411
|
+
"docs": {
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": "Add a tooltip message next to the input"
|
|
414
|
+
},
|
|
415
|
+
"attribute": "tooltip",
|
|
416
|
+
"reflect": false
|
|
402
417
|
},
|
|
403
|
-
"
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
"
|
|
412
|
-
"
|
|
413
|
-
"
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
"
|
|
419
|
-
"text": "Add a tooltip message next to the input"
|
|
420
|
-
},
|
|
421
|
-
"attribute": "tooltip",
|
|
422
|
-
"reflect": false
|
|
423
|
-
},
|
|
424
|
-
"helpText": {
|
|
425
|
-
"type": "string",
|
|
426
|
-
"mutable": false,
|
|
427
|
-
"complexType": {
|
|
428
|
-
"original": "string",
|
|
429
|
-
"resolved": "string",
|
|
430
|
-
"references": {}
|
|
431
|
-
},
|
|
432
|
-
"required": false,
|
|
433
|
-
"optional": false,
|
|
434
|
-
"docs": {
|
|
435
|
-
"tags": [],
|
|
436
|
-
"text": "Add a help text under the input, usually expected data format and example"
|
|
437
|
-
},
|
|
438
|
-
"attribute": "help-text",
|
|
439
|
-
"reflect": false
|
|
440
|
-
}
|
|
441
|
-
}; }
|
|
442
|
-
static get states() { return {
|
|
443
|
-
"classList": {},
|
|
444
|
-
"options": {},
|
|
445
|
-
"checked": {}
|
|
446
|
-
}; }
|
|
447
|
-
static get events() { return [{
|
|
448
|
-
"method": "valueChange",
|
|
449
|
-
"name": "value-change",
|
|
450
|
-
"bubbles": true,
|
|
451
|
-
"cancelable": true,
|
|
452
|
-
"composed": true,
|
|
453
|
-
"docs": {
|
|
454
|
-
"tags": [],
|
|
455
|
-
"text": "Emited event when value change"
|
|
456
|
-
},
|
|
457
|
-
"complexType": {
|
|
458
|
-
"original": "any",
|
|
459
|
-
"resolved": "any",
|
|
460
|
-
"references": {}
|
|
461
|
-
}
|
|
462
|
-
}, {
|
|
463
|
-
"method": "inputValid",
|
|
464
|
-
"name": "input-valid",
|
|
465
|
-
"bubbles": true,
|
|
466
|
-
"cancelable": true,
|
|
467
|
-
"composed": true,
|
|
468
|
-
"docs": {
|
|
469
|
-
"tags": [],
|
|
470
|
-
"text": "Emited event when checking validity"
|
|
471
|
-
},
|
|
472
|
-
"complexType": {
|
|
473
|
-
"original": "boolean",
|
|
474
|
-
"resolved": "boolean",
|
|
475
|
-
"references": {}
|
|
418
|
+
"helpText": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"mutable": false,
|
|
421
|
+
"complexType": {
|
|
422
|
+
"original": "string",
|
|
423
|
+
"resolved": "string",
|
|
424
|
+
"references": {}
|
|
425
|
+
},
|
|
426
|
+
"required": false,
|
|
427
|
+
"optional": false,
|
|
428
|
+
"docs": {
|
|
429
|
+
"tags": [],
|
|
430
|
+
"text": "Add a help text under the input, usually expected data format and example"
|
|
431
|
+
},
|
|
432
|
+
"attribute": "help-text",
|
|
433
|
+
"reflect": false
|
|
476
434
|
}
|
|
477
|
-
}
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
static get states() {
|
|
438
|
+
return {
|
|
439
|
+
"classList": {},
|
|
440
|
+
"options": {},
|
|
441
|
+
"checked": {}
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
static get events() {
|
|
445
|
+
return [{
|
|
446
|
+
"method": "valueChange",
|
|
447
|
+
"name": "value-change",
|
|
448
|
+
"bubbles": true,
|
|
449
|
+
"cancelable": true,
|
|
450
|
+
"composed": true,
|
|
451
|
+
"docs": {
|
|
452
|
+
"tags": [],
|
|
453
|
+
"text": "Emited event when value change"
|
|
454
|
+
},
|
|
455
|
+
"complexType": {
|
|
456
|
+
"original": "any",
|
|
457
|
+
"resolved": "any",
|
|
458
|
+
"references": {}
|
|
459
|
+
}
|
|
460
|
+
}, {
|
|
461
|
+
"method": "inputValid",
|
|
462
|
+
"name": "input-valid",
|
|
463
|
+
"bubbles": true,
|
|
464
|
+
"cancelable": true,
|
|
465
|
+
"composed": true,
|
|
466
|
+
"docs": {
|
|
467
|
+
"tags": [],
|
|
468
|
+
"text": "Emited event when checking validity"
|
|
469
|
+
},
|
|
470
|
+
"complexType": {
|
|
471
|
+
"original": "boolean",
|
|
472
|
+
"resolved": "boolean",
|
|
473
|
+
"references": {}
|
|
474
|
+
}
|
|
475
|
+
}];
|
|
476
|
+
}
|
|
478
477
|
static get elementRef() { return "element"; }
|
|
479
|
-
static get watchers() {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
478
|
+
static get watchers() {
|
|
479
|
+
return [{
|
|
480
|
+
"propName": "value",
|
|
481
|
+
"methodName": "handleValue"
|
|
482
|
+
}, {
|
|
483
|
+
"propName": "items",
|
|
484
|
+
"methodName": "validateItems"
|
|
485
|
+
}, {
|
|
486
|
+
"propName": "isOnOff",
|
|
487
|
+
"methodName": "handleIsOnOff"
|
|
488
|
+
}, {
|
|
489
|
+
"propName": "isIcon",
|
|
490
|
+
"methodName": "handleIsIcon"
|
|
491
|
+
}, {
|
|
492
|
+
"propName": "readonly",
|
|
493
|
+
"methodName": "handleReadonly"
|
|
494
|
+
}, {
|
|
495
|
+
"propName": "disabled",
|
|
496
|
+
"methodName": "handleDisabled"
|
|
497
|
+
}, {
|
|
498
|
+
"propName": "checked",
|
|
499
|
+
"methodName": "handleChecked"
|
|
500
|
+
}];
|
|
501
|
+
}
|
|
501
502
|
}
|
|
@@ -12,9 +12,7 @@ export default {
|
|
|
12
12
|
* @returns {HTMLElement} HTMLElement
|
|
13
13
|
*/
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
-
const Template = (args) => (h("mg-details", Object.assign({}, filterArgs(args)),
|
|
16
|
-
args.slotSummary && h("span", { slot: "summary", innerHTML: args.slotSummary }),
|
|
17
|
-
args.slotDetails && h("p", { slot: "details", innerHTML: args.slotDetails })));
|
|
15
|
+
const Template = (args) => (h("mg-details", Object.assign({}, filterArgs(args)), args.slotSummary && h("span", { slot: "summary", innerHTML: args.slotSummary }), args.slotDetails && h("p", { slot: "details", innerHTML: args.slotDetails })));
|
|
18
16
|
export const MgDetails = Template.bind({});
|
|
19
17
|
MgDetails.args = {
|
|
20
18
|
slotSummary: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|