@mgdis/mg-components 3.1.0 → 4.0.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-85a4a0b6.js → index-88560a66.js} +123 -48
- package/dist/cjs/index-a39c5567.js +233 -0
- package/dist/cjs/loader.cjs.js +3 -17
- package/dist/cjs/mg-badge_21.cjs.entry.js +3538 -0
- package/dist/cjs/mg-components.cjs.js +3 -7
- package/dist/cjs/mg-modal.cjs.entry.js +117 -0
- package/dist/cjs/mg-popover.cjs.entry.js +170 -0
- package/dist/cjs/popper-71bf3058.js +1790 -0
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/atoms/mg-badge/{mg-badge.stories.js → doc/mg-badge.stories.js} +4 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +26 -10
- package/dist/collection/components/atoms/mg-button/{mg-button.stories.js → doc/mg-button.stories.js} +7 -2
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.css +46 -49
- package/dist/collection/components/atoms/mg-button/mg-button.js +78 -4
- package/dist/collection/components/atoms/mg-character-left/{mg-character-left.stories.js → doc/mg-character-left.stories.js} +8 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +20 -46
- package/dist/collection/components/atoms/mg-icon/{mg-icon.stories.js → doc/mg-icon.stories.js} +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +104 -9
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +9 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +33 -7
- package/dist/collection/components/atoms/mg-input-title/{mg-input-title.stories.js → doc/mg-input-title.stories.js} +0 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +4 -4
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +14 -3
- package/dist/collection/components/atoms/mg-tag/{mg-tag.stories.js → doc/mg-tag.stories.js} +4 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +28 -6
- package/dist/collection/components/atoms/mg-tooltip/{mg-tooltip.stories.js → doc/mg-tooltip.stories.js} +14 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +20 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +16 -2
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -7
- package/dist/collection/components/molecules/inputs/MgInput.js +25 -29
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.js → doc/mg-input-checkbox.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +25 -11
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +102 -52
- package/dist/collection/components/molecules/inputs/mg-input-date/{mg-input-date.stories.js → doc/mg-input-date.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +37 -9
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +136 -66
- package/dist/collection/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.js → doc/mg-input-numeric.stories.js} +15 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +38 -10
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +180 -80
- package/dist/collection/components/molecules/inputs/mg-input-password/{mg-input-password.stories.js → doc/mg-input-password.stories.js} +16 -2
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +37 -9
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +108 -47
- package/dist/collection/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.js → doc/mg-input-radio.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +25 -11
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +113 -42
- package/dist/collection/components/molecules/inputs/mg-input-select/{mg-input-select.stories.js → doc/mg-input-select.stories.js} +22 -2
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +39 -10
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +145 -71
- package/dist/collection/components/molecules/inputs/mg-input-text/{mg-input-text.stories.js → doc/mg-input-text.stories.js} +17 -8
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +69 -19
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +184 -83
- package/dist/collection/components/molecules/inputs/mg-input-textarea/{mg-input-textarea.stories.js → doc/mg-input-textarea.stories.js} +16 -5
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +69 -13
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +163 -70
- package/dist/collection/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.js → doc/mg-input-toggle.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +22 -10
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +68 -33
- package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +58 -0
- package/dist/collection/components/molecules/mg-form/mg-form.css +19 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +271 -0
- package/dist/collection/components/molecules/mg-message/{mg-message.stories.js → doc/mg-message.stories.js} +6 -2
- package/dist/collection/components/molecules/mg-message/mg-message.css +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +26 -11
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +51 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +52 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +240 -0
- package/dist/collection/components/molecules/mg-pagination/{mg-pagination.stories.js → doc/mg-pagination.stories.js} +1 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +47 -28
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +39 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +53 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +356 -0
- package/dist/collection/components/molecules/mg-popover/{mg-popover.stories.js → doc/mg-popover.stories.js} +10 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +20 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +37 -12
- package/dist/collection/components/molecules/mg-tabs/{mg-tabs.stories.js → doc/mg-tabs.stories.js} +20 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +11 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +17 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +139 -26
- package/dist/collection/locales/index.js +33 -4
- package/dist/collection/stories/helpers.stories.js +33 -0
- package/dist/collection/utils/components.utils.js +16 -9
- package/dist/collection/utils/locale.utils.js +13 -7
- package/dist/collection/utils/test.utils.js +27 -15
- package/dist/collection/variables.css +39 -5
- package/dist/collection/variables.scss +39 -5
- package/dist/components/MgInput.js +26 -37
- package/dist/components/components.utils.js +16 -9
- package/dist/components/index.d.ts +24 -6
- package/dist/components/index.js +23 -0
- package/dist/components/index2.js +116 -17
- package/dist/components/locale.utils.js +13 -8
- package/dist/components/mg-badge2.js +25 -9
- package/dist/components/mg-button2.js +29 -5
- package/dist/components/mg-character-left2.js +14 -26
- package/dist/components/mg-form.d.ts +11 -0
- package/dist/components/mg-form.js +148 -0
- package/dist/components/mg-icon2.js +138 -17
- package/dist/components/mg-input-checkbox.js +66 -53
- package/dist/components/mg-input-date.js +100 -69
- package/dist/components/mg-input-numeric.js +125 -81
- package/dist/components/mg-input-password.js +69 -48
- package/dist/components/mg-input-radio.js +74 -46
- package/dist/components/mg-input-select2.js +103 -71
- package/dist/components/mg-input-text.js +1 -237
- package/dist/components/mg-input-text2.js +300 -0
- package/dist/components/mg-input-textarea.js +100 -46
- package/dist/components/mg-input-title2.js +13 -4
- package/dist/components/mg-input-toggle.js +39 -31
- package/dist/components/mg-message.js +25 -10
- package/dist/components/mg-modal.d.ts +11 -0
- package/dist/components/mg-modal.js +153 -0
- package/dist/components/mg-pagination.js +45 -31
- package/dist/components/mg-panel.d.ts +11 -0
- package/dist/components/mg-panel.js +244 -0
- package/dist/components/mg-popover.js +31 -11
- package/dist/components/mg-tabs.js +113 -23
- package/dist/components/mg-tag.js +27 -5
- package/dist/components/mg-tooltip2.js +10 -1
- package/dist/components/popper.js +6 -2
- package/dist/esm/{index-e3e84606.js → index-bca81100.js} +124 -46
- package/dist/esm/index-e51ae032.js +228 -0
- package/dist/esm/loader.js +3 -17
- package/dist/esm/mg-badge_21.entry.js +3514 -0
- package/dist/esm/mg-components.js +3 -7
- package/dist/esm/mg-modal.entry.js +113 -0
- package/dist/esm/mg-popover.entry.js +166 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/popper-93ecb064.js +1788 -0
- package/dist/index.js +1 -1
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-003a1344.entry.js +1 -0
- package/dist/mg-components/p-462d648a.entry.js +1 -0
- package/dist/mg-components/p-4c66f794.js +1 -0
- package/dist/mg-components/p-5126ab10.entry.js +1 -0
- package/dist/mg-components/p-780bd52d.js +1 -0
- package/dist/mg-components/p-b14a3443.js +2 -0
- package/dist/mg-components/variables.css +39 -5
- package/dist/mg-components/variables.scss +39 -5
- package/dist/types/components/atoms/mg-badge/{mg-badge.stories.d.ts → doc/mg-badge.stories.d.ts} +5 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +16 -5
- package/dist/types/components/atoms/mg-button/{mg-button.stories.d.ts → doc/mg-button.stories.d.ts} +5 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +23 -3
- package/dist/types/components/atoms/mg-character-left/{mg-character-left.stories.d.ts → doc/mg-character-left.stories.d.ts} +9 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +16 -13
- package/dist/types/components/atoms/mg-icon/{mg-icon.stories.d.ts → doc/mg-icon.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +14 -4
- package/dist/types/components/atoms/mg-input-title/{mg-input-title.stories.d.ts → doc/mg-input-title.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +11 -1
- package/dist/types/components/atoms/mg-tag/{mg-tag.stories.d.ts → doc/mg-tag.stories.d.ts} +5 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +18 -4
- package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +29 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +8 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +13 -3
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +6 -4
- package/dist/types/components/molecules/inputs/MgInput.d.ts +7 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.d.ts → doc/mg-input-checkbox.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +36 -13
- package/dist/types/components/molecules/inputs/mg-input-date/{mg-input-date.stories.d.ts → doc/mg-input-date.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +46 -15
- package/dist/types/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.d.ts → doc/mg-input-numeric.stories.d.ts} +11 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +61 -16
- package/dist/types/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.d.ts +22 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +35 -11
- package/dist/types/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.d.ts → doc/mg-input-radio.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +42 -9
- package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts +34 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +37 -9
- package/dist/types/components/molecules/inputs/mg-input-text/{mg-input-text.stories.d.ts → doc/mg-input-text.stories.d.ts} +13 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +52 -16
- package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +19 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +45 -17
- package/dist/types/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.d.ts → doc/mg-input-toggle.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +29 -12
- package/dist/types/components/molecules/{mg-popover/mg-popover.stories.d.ts → mg-form/doc/mg-form.stories.d.ts} +3 -4
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +83 -0
- package/dist/types/components/molecules/mg-message/{mg-message.stories.d.ts → doc/mg-message.stories.d.ts} +10 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +13 -4
- package/dist/types/components/molecules/mg-modal/doc/mg-modal.stories.d.ts +13 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +85 -0
- package/dist/types/components/molecules/mg-pagination/{mg-pagination.stories.d.ts → doc/mg-pagination.stories.d.ts} +5 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +31 -7
- package/dist/types/components/molecules/mg-panel/doc/mg-panel.stories.d.ts +11 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +139 -0
- package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +25 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +8 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +27 -4
- package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +20 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +11 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +70 -6
- package/dist/types/components.d.ts +528 -211
- package/dist/types/locales/index.d.ts +108 -38
- package/dist/types/stories/{buttons.stories.d.ts → helpers.stories.d.ts} +1 -1
- package/dist/types/utils/components.utils.d.ts +16 -9
- package/dist/types/utils/locale.utils.d.ts +13 -6
- package/dist/types/utils/test.utils.d.ts +13 -1
- package/loader/index.js +1 -1
- package/package.json +45 -14
- package/readme.md +9 -35
- package/dist/cjs/css-shim-a22512c4.js +0 -6
- package/dist/cjs/mg-badge_20.cjs.entry.js +0 -4661
- package/dist/cjs/shadow-css-8940f82d.js +0 -390
- package/dist/collection/stories/buttons.stories.js +0 -43
- package/dist/collection/stories/messages.stories.js +0 -44
- package/dist/collection/stories/tags.stories.js +0 -13
- package/dist/esm/css-shim-7c240feb.js +0 -4
- package/dist/esm/mg-badge_20.entry.js +0 -4638
- package/dist/esm/shadow-css-5d2d01ce.js +0 -388
- package/dist/esm-es5/css-shim-7c240feb.js +0 -1
- package/dist/esm-es5/index-e3e84606.js +0 -1
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +0 -1
- package/dist/esm-es5/mg-badge_20.entry.js +0 -2
- package/dist/esm-es5/mg-components.js +0 -1
- package/dist/esm-es5/shadow-css-5d2d01ce.js +0 -12
- package/dist/mg-components/mg-components.js +0 -132
- package/dist/mg-components/p-1cd24462.system.js +0 -1
- package/dist/mg-components/p-2e2f6b27.system.entry.js +0 -2
- package/dist/mg-components/p-366a224e.js +0 -1
- package/dist/mg-components/p-422c429b.system.js +0 -1
- package/dist/mg-components/p-50ea2036.system.js +0 -1
- package/dist/mg-components/p-62fa3797.js +0 -1
- package/dist/mg-components/p-71d57b8b.system.js +0 -13
- package/dist/mg-components/p-9a215712.system.js +0 -1
- package/dist/mg-components/p-cbf0464b.entry.js +0 -1
- package/dist/mg-components/p-f6455ab3.js +0 -12
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +0 -11
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +0 -9
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +0 -14
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +0 -6
- package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +0 -7
- package/dist/types/stories/messages.stories.d.ts +0 -13
- package/dist/types/stories/tags.stories.d.ts +0 -5
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
2
|
import { ClassList } from '../../../../utils/components.utils';
|
|
4
3
|
import { RadioOption } from './mg-input-radio.conf';
|
|
@@ -6,21 +5,26 @@ export declare class MgInputRadio {
|
|
|
6
5
|
/************
|
|
7
6
|
* Internal *
|
|
8
7
|
************/
|
|
9
|
-
private classError;
|
|
10
8
|
private inputs;
|
|
9
|
+
private messages;
|
|
11
10
|
/**************
|
|
12
11
|
* Decorators *
|
|
13
12
|
**************/
|
|
13
|
+
/**
|
|
14
|
+
* Get component DOM element
|
|
15
|
+
*/
|
|
16
|
+
element: HTMLMgInputRadioElement;
|
|
14
17
|
/**
|
|
15
18
|
* Component value
|
|
16
19
|
*/
|
|
17
20
|
value: any;
|
|
21
|
+
handleValue(newValue: any): void;
|
|
18
22
|
/**
|
|
19
23
|
* Items are the possible options to select
|
|
20
24
|
* Required
|
|
21
25
|
*/
|
|
22
26
|
items: string[] | RadioOption[];
|
|
23
|
-
validateItems(newValue:
|
|
27
|
+
validateItems(newValue: string[] | RadioOption[]): void;
|
|
24
28
|
/**
|
|
25
29
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
26
30
|
* If not set, it will be created.
|
|
@@ -33,7 +37,6 @@ export declare class MgInputRadio {
|
|
|
33
37
|
name: string;
|
|
34
38
|
/**
|
|
35
39
|
* Input label
|
|
36
|
-
* Required
|
|
37
40
|
*/
|
|
38
41
|
label: string;
|
|
39
42
|
/**
|
|
@@ -69,11 +72,11 @@ export declare class MgInputRadio {
|
|
|
69
72
|
*/
|
|
70
73
|
helpText: string;
|
|
71
74
|
/**
|
|
72
|
-
*
|
|
75
|
+
* Define input valid state
|
|
73
76
|
*/
|
|
74
77
|
valid: boolean;
|
|
75
78
|
/**
|
|
76
|
-
*
|
|
79
|
+
* Define input invalid state
|
|
77
80
|
*/
|
|
78
81
|
invalid: boolean;
|
|
79
82
|
/**
|
|
@@ -92,30 +95,60 @@ export declare class MgInputRadio {
|
|
|
92
95
|
* Emitted event when value change
|
|
93
96
|
*/
|
|
94
97
|
valueChange: EventEmitter<any>;
|
|
98
|
+
/**
|
|
99
|
+
* Emited event when checking validity
|
|
100
|
+
*/
|
|
101
|
+
inputValid: EventEmitter<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* Public method to display errors
|
|
104
|
+
*
|
|
105
|
+
* @returns {Promise<void>}
|
|
106
|
+
*/
|
|
107
|
+
displayError(): Promise<void>;
|
|
95
108
|
/**
|
|
96
109
|
* Handle input event
|
|
110
|
+
*
|
|
111
|
+
* @param {event} event input event
|
|
112
|
+
* @returns {void}
|
|
97
113
|
*/
|
|
98
114
|
private handleInput;
|
|
99
115
|
/**
|
|
100
116
|
* Handle blur event
|
|
117
|
+
*
|
|
118
|
+
* @returns {void}
|
|
101
119
|
*/
|
|
102
120
|
private handleBlur;
|
|
103
121
|
/**
|
|
104
122
|
* Check if input is valid
|
|
123
|
+
*
|
|
124
|
+
* @returns {void}
|
|
105
125
|
*/
|
|
106
126
|
private checkValidity;
|
|
107
127
|
/**
|
|
108
128
|
* Check input errors
|
|
129
|
+
*
|
|
130
|
+
* @returns {void}
|
|
109
131
|
*/
|
|
110
132
|
private checkError;
|
|
111
133
|
/**
|
|
112
134
|
* get invalid element
|
|
113
|
-
*
|
|
135
|
+
*
|
|
136
|
+
* @returns {HTMLInputElement} element
|
|
114
137
|
*/
|
|
115
138
|
private getInvalidElement;
|
|
116
139
|
/*************
|
|
117
140
|
* Lifecycle *
|
|
118
141
|
*************/
|
|
119
|
-
|
|
120
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Check if component props are well configured on init
|
|
144
|
+
*
|
|
145
|
+
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
146
|
+
*/
|
|
147
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
148
|
+
/**
|
|
149
|
+
* Render
|
|
150
|
+
*
|
|
151
|
+
* @returns {HTMLElement} HTML Element
|
|
152
|
+
*/
|
|
153
|
+
render(): HTMLElement;
|
|
121
154
|
}
|
package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: string;
|
|
3
|
+
title: string;
|
|
4
|
+
argTypes: {
|
|
5
|
+
placeholder: {
|
|
6
|
+
table: {
|
|
7
|
+
defaultValue: {
|
|
8
|
+
summary: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
mgWidth: {
|
|
13
|
+
options: (string | number)[];
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
parameters: {
|
|
20
|
+
actions: {
|
|
21
|
+
handles: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
export declare const MgInputSelect: any;
|
|
27
|
+
/**
|
|
28
|
+
* Using object
|
|
29
|
+
*/
|
|
30
|
+
export declare const WithObjectItems: any;
|
|
31
|
+
/**
|
|
32
|
+
* Using group object
|
|
33
|
+
*/
|
|
34
|
+
export declare const WithGroups: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
2
|
import { Width } from '../MgInput.conf';
|
|
4
3
|
import { ClassList } from '../../../../utils/components.utils';
|
|
@@ -7,20 +6,26 @@ export declare class MgInputSelect {
|
|
|
7
6
|
/************
|
|
8
7
|
* Internal *
|
|
9
8
|
************/
|
|
10
|
-
private classError;
|
|
11
9
|
private input;
|
|
10
|
+
private messages;
|
|
11
|
+
private hasError;
|
|
12
12
|
/**************
|
|
13
13
|
* Decorators *
|
|
14
14
|
**************/
|
|
15
|
+
/**
|
|
16
|
+
* Get component DOM element
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLMgInputSelectElement;
|
|
15
19
|
/**
|
|
16
20
|
* Component value
|
|
17
21
|
*/
|
|
18
22
|
value: any;
|
|
23
|
+
handleValue(newValue: any): void;
|
|
19
24
|
/**
|
|
20
25
|
* Items are the possible options to select
|
|
21
26
|
*/
|
|
22
27
|
items: string[] | SelectOption[];
|
|
23
|
-
validateItems(newValue:
|
|
28
|
+
validateItems(newValue: string[] | SelectOption[]): void;
|
|
24
29
|
/**
|
|
25
30
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
26
31
|
* If not set, it will be created.
|
|
@@ -33,7 +38,6 @@ export declare class MgInputSelect {
|
|
|
33
38
|
name: string;
|
|
34
39
|
/**
|
|
35
40
|
* Input label
|
|
36
|
-
* Required
|
|
37
41
|
*/
|
|
38
42
|
label: string;
|
|
39
43
|
/**
|
|
@@ -72,7 +76,7 @@ export declare class MgInputSelect {
|
|
|
72
76
|
/**
|
|
73
77
|
* Define input width
|
|
74
78
|
*/
|
|
75
|
-
|
|
79
|
+
mgWidth: Width;
|
|
76
80
|
/**
|
|
77
81
|
* Add a tooltip message next to the input
|
|
78
82
|
*/
|
|
@@ -106,9 +110,23 @@ export declare class MgInputSelect {
|
|
|
106
110
|
*/
|
|
107
111
|
valueExist: boolean;
|
|
108
112
|
/**
|
|
109
|
-
*
|
|
113
|
+
* Does value match any item option
|
|
114
|
+
*/
|
|
115
|
+
readonlyValue: string;
|
|
116
|
+
/**
|
|
117
|
+
* Emited event when value change
|
|
118
|
+
*/
|
|
119
|
+
valueChange: EventEmitter<any>;
|
|
120
|
+
/**
|
|
121
|
+
* Emited event when checking validity
|
|
110
122
|
*/
|
|
111
|
-
|
|
123
|
+
inputValid: EventEmitter<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Public method to display errors
|
|
126
|
+
*
|
|
127
|
+
* @returns {Promise<void>}
|
|
128
|
+
*/
|
|
129
|
+
displayError(): Promise<void>;
|
|
112
130
|
/**
|
|
113
131
|
* Handle input event
|
|
114
132
|
*/
|
|
@@ -128,6 +146,16 @@ export declare class MgInputSelect {
|
|
|
128
146
|
/*************
|
|
129
147
|
* Lifecycle *
|
|
130
148
|
*************/
|
|
131
|
-
|
|
132
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Check if component props are well configured on init
|
|
151
|
+
*
|
|
152
|
+
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
153
|
+
*/
|
|
154
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
155
|
+
/**
|
|
156
|
+
* Render
|
|
157
|
+
*
|
|
158
|
+
* @returns {HTMLElement} HTML Element
|
|
159
|
+
*/
|
|
160
|
+
render(): HTMLElement;
|
|
133
161
|
}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
component: string;
|
|
3
3
|
title: string;
|
|
4
|
+
argTypes: {
|
|
5
|
+
mgWidth: {
|
|
6
|
+
options: (string | number)[];
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
parameters: {
|
|
13
|
+
actions: {
|
|
14
|
+
handles: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
4
17
|
};
|
|
5
18
|
export default _default;
|
|
6
19
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
2
|
import { Width } from '../MgInput.conf';
|
|
4
3
|
import { ClassList } from '../../../../utils/components.utils';
|
|
@@ -7,8 +6,12 @@ export declare class MgInputText {
|
|
|
7
6
|
* Internal *
|
|
8
7
|
************/
|
|
9
8
|
private classFocus;
|
|
10
|
-
private
|
|
9
|
+
private classIsInputGroupAppend;
|
|
10
|
+
private classHasIcon;
|
|
11
|
+
private characterLeftId;
|
|
11
12
|
private input;
|
|
13
|
+
private messages;
|
|
14
|
+
private hasError;
|
|
12
15
|
/**************
|
|
13
16
|
* Decorators *
|
|
14
17
|
**************/
|
|
@@ -20,19 +23,19 @@ export declare class MgInputText {
|
|
|
20
23
|
* Component value
|
|
21
24
|
*/
|
|
22
25
|
value: string;
|
|
26
|
+
handleValue(newValue: string): void;
|
|
23
27
|
/**
|
|
24
28
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
25
29
|
* If not set, it will be created.
|
|
26
30
|
*/
|
|
27
|
-
identifier
|
|
31
|
+
identifier: string;
|
|
28
32
|
/**
|
|
29
33
|
* Input name
|
|
30
34
|
* If not set the value equals the identifier
|
|
31
35
|
*/
|
|
32
|
-
name
|
|
36
|
+
name: string;
|
|
33
37
|
/**
|
|
34
38
|
* Input label
|
|
35
|
-
* Required
|
|
36
39
|
*/
|
|
37
40
|
label: string;
|
|
38
41
|
/**
|
|
@@ -43,6 +46,7 @@ export declare class MgInputText {
|
|
|
43
46
|
* Input icon
|
|
44
47
|
*/
|
|
45
48
|
icon: string;
|
|
49
|
+
validateIcon(newValue: string): void;
|
|
46
50
|
/**
|
|
47
51
|
* Define if label is displayed on top
|
|
48
52
|
*/
|
|
@@ -75,7 +79,7 @@ export declare class MgInputText {
|
|
|
75
79
|
/**
|
|
76
80
|
* Define input width
|
|
77
81
|
*/
|
|
78
|
-
|
|
82
|
+
mgWidth: Width;
|
|
79
83
|
/**
|
|
80
84
|
* Define input pattern to validate
|
|
81
85
|
*/
|
|
@@ -92,20 +96,16 @@ export declare class MgInputText {
|
|
|
92
96
|
* Define if component should display character left
|
|
93
97
|
*/
|
|
94
98
|
displayCharacterLeft: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Template to use for characters left sentence
|
|
97
|
-
*/
|
|
98
|
-
characterLeftTemplate: string;
|
|
99
99
|
/**
|
|
100
100
|
* Add a help text under the input, usually expected data format and example
|
|
101
101
|
*/
|
|
102
102
|
helpText: string;
|
|
103
103
|
/**
|
|
104
|
-
* Define input
|
|
104
|
+
* Define input valid state
|
|
105
105
|
*/
|
|
106
106
|
valid: boolean;
|
|
107
107
|
/**
|
|
108
|
-
* Define input
|
|
108
|
+
* Define input invalid state
|
|
109
109
|
*/
|
|
110
110
|
invalid: boolean;
|
|
111
111
|
/**
|
|
@@ -117,35 +117,65 @@ export declare class MgInputText {
|
|
|
117
117
|
*/
|
|
118
118
|
errorMessage: string;
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
120
|
+
* Emited event when value change
|
|
121
121
|
*/
|
|
122
122
|
valueChange: EventEmitter<string>;
|
|
123
|
+
/**
|
|
124
|
+
* Emited event when checking validity
|
|
125
|
+
*/
|
|
126
|
+
inputValid: EventEmitter<boolean>;
|
|
127
|
+
/**
|
|
128
|
+
* Public method to play input focus
|
|
129
|
+
*
|
|
130
|
+
* @returns {Promise<void>}
|
|
131
|
+
*/
|
|
132
|
+
setFocus(): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Public method to display errors
|
|
135
|
+
*
|
|
136
|
+
* @returns {Promise<void>}
|
|
137
|
+
*/
|
|
138
|
+
displayError(): Promise<void>;
|
|
123
139
|
/**
|
|
124
140
|
* Handle input event
|
|
141
|
+
*
|
|
142
|
+
* @returns {void}
|
|
125
143
|
*/
|
|
126
144
|
private handleInput;
|
|
127
145
|
/**
|
|
128
146
|
* Handle focus event
|
|
147
|
+
*
|
|
148
|
+
* @returns {void}
|
|
129
149
|
*/
|
|
130
150
|
private handleFocus;
|
|
131
151
|
/**
|
|
132
152
|
* Handle blur event
|
|
153
|
+
*
|
|
154
|
+
* @returns {void}
|
|
133
155
|
*/
|
|
134
156
|
private handleBlur;
|
|
135
157
|
/**
|
|
136
158
|
* Check if input is valid
|
|
159
|
+
*
|
|
160
|
+
* @returns {void}
|
|
137
161
|
*/
|
|
138
162
|
private checkValidity;
|
|
139
163
|
/**
|
|
140
164
|
* Check input errors
|
|
165
|
+
*
|
|
166
|
+
* @returns {void}
|
|
141
167
|
*/
|
|
142
168
|
private checkError;
|
|
143
169
|
/**
|
|
144
170
|
* Validate patern configuration
|
|
171
|
+
*
|
|
172
|
+
* @returns {void}
|
|
145
173
|
*/
|
|
146
174
|
private validatePattern;
|
|
147
175
|
/**
|
|
148
176
|
* Validate append slot
|
|
177
|
+
*
|
|
178
|
+
* @returns {void}
|
|
149
179
|
*/
|
|
150
180
|
private validateAppendSlot;
|
|
151
181
|
/*************
|
|
@@ -153,8 +183,14 @@ export declare class MgInputText {
|
|
|
153
183
|
*************/
|
|
154
184
|
/**
|
|
155
185
|
* Check if component props are well configured on init
|
|
186
|
+
*
|
|
187
|
+
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
188
|
+
*/
|
|
189
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
190
|
+
/**
|
|
191
|
+
* Render
|
|
192
|
+
*
|
|
193
|
+
* @returns {HTMLElement} HTML Element
|
|
156
194
|
*/
|
|
157
|
-
|
|
158
|
-
componentDidLoad(): void;
|
|
159
|
-
render(): any;
|
|
195
|
+
render(): HTMLElement;
|
|
160
196
|
}
|
package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: string;
|
|
3
|
+
title: string;
|
|
4
|
+
argTypes: {
|
|
5
|
+
mgWidth: {
|
|
6
|
+
options: (string | number)[];
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
parameters: {
|
|
13
|
+
actions: {
|
|
14
|
+
handles: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
export declare const MgInputTextarea: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
2
|
import { Width } from '../MgInput.conf';
|
|
4
3
|
import { ClassList } from '../../../../utils/components.utils';
|
|
@@ -7,28 +6,35 @@ export declare class MgInputTextarea {
|
|
|
7
6
|
* Internal *
|
|
8
7
|
************/
|
|
9
8
|
private classFocus;
|
|
10
|
-
private
|
|
9
|
+
private classHasDisplayCharacterLeft;
|
|
10
|
+
private characterLeftId;
|
|
11
11
|
private input;
|
|
12
|
+
private messages;
|
|
13
|
+
private hasError;
|
|
12
14
|
/**************
|
|
13
15
|
* Decorators *
|
|
14
16
|
**************/
|
|
17
|
+
/**
|
|
18
|
+
* Get component DOM element
|
|
19
|
+
*/
|
|
20
|
+
element: HTMLMgInputTextareaElement;
|
|
15
21
|
/**
|
|
16
22
|
* Component value
|
|
17
23
|
*/
|
|
18
24
|
value: string;
|
|
25
|
+
handleValue(newValue: string): void;
|
|
19
26
|
/**
|
|
20
27
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
21
28
|
* If not set, it will be created.
|
|
22
29
|
*/
|
|
23
|
-
identifier
|
|
30
|
+
identifier: string;
|
|
24
31
|
/**
|
|
25
32
|
* Input name
|
|
26
33
|
* If not set the value equals the identifier
|
|
27
34
|
*/
|
|
28
|
-
name
|
|
35
|
+
name: string;
|
|
29
36
|
/**
|
|
30
37
|
* Input label
|
|
31
|
-
* Required
|
|
32
38
|
*/
|
|
33
39
|
label: string;
|
|
34
40
|
/**
|
|
@@ -63,7 +69,7 @@ export declare class MgInputTextarea {
|
|
|
63
69
|
/**
|
|
64
70
|
* Define input width
|
|
65
71
|
*/
|
|
66
|
-
|
|
72
|
+
mgWidth: Width;
|
|
67
73
|
/**
|
|
68
74
|
* Define input pattern to validate
|
|
69
75
|
*/
|
|
@@ -73,7 +79,7 @@ export declare class MgInputTextarea {
|
|
|
73
79
|
*/
|
|
74
80
|
patternErrorMessage: string;
|
|
75
81
|
/**
|
|
76
|
-
* Define
|
|
82
|
+
* Define the number of visible text lines for the control
|
|
77
83
|
*/
|
|
78
84
|
rows: number;
|
|
79
85
|
/**
|
|
@@ -84,22 +90,23 @@ export declare class MgInputTextarea {
|
|
|
84
90
|
* Define if component should display character left
|
|
85
91
|
*/
|
|
86
92
|
displayCharacterLeft: boolean;
|
|
87
|
-
|
|
88
|
-
* Template to use for characters left sentence
|
|
89
|
-
*/
|
|
90
|
-
characterLeftTemplate: string;
|
|
93
|
+
validateDisplayCharacterLeft(newValue: boolean): void;
|
|
91
94
|
/**
|
|
92
95
|
* Add a help text under the input, usually expected data format and example
|
|
93
96
|
*/
|
|
94
97
|
helpText: string;
|
|
95
98
|
/**
|
|
96
|
-
* Define input
|
|
99
|
+
* Define input valid state
|
|
97
100
|
*/
|
|
98
101
|
valid: boolean;
|
|
99
102
|
/**
|
|
100
|
-
* Define input
|
|
103
|
+
* Define input invalid state
|
|
101
104
|
*/
|
|
102
105
|
invalid: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Define if input is resizable
|
|
108
|
+
*/
|
|
109
|
+
resizable: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
103
110
|
/**
|
|
104
111
|
* Component classes
|
|
105
112
|
*/
|
|
@@ -109,9 +116,19 @@ export declare class MgInputTextarea {
|
|
|
109
116
|
*/
|
|
110
117
|
errorMessage: string;
|
|
111
118
|
/**
|
|
112
|
-
*
|
|
119
|
+
* Emited event when value change
|
|
113
120
|
*/
|
|
114
121
|
valueChange: EventEmitter<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Emited event when checking validity
|
|
124
|
+
*/
|
|
125
|
+
inputValid: EventEmitter<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Public method to display errors
|
|
128
|
+
*
|
|
129
|
+
* @returns {Promise<void>}
|
|
130
|
+
*/
|
|
131
|
+
displayError(): Promise<void>;
|
|
115
132
|
/**
|
|
116
133
|
* Handle input event
|
|
117
134
|
*/
|
|
@@ -127,7 +144,8 @@ export declare class MgInputTextarea {
|
|
|
127
144
|
/**
|
|
128
145
|
* Get pattern validity
|
|
129
146
|
* Pattern is not defined on textarea field : https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
|
|
130
|
-
*
|
|
147
|
+
*
|
|
148
|
+
* @returns {boolean} is pattern valid
|
|
131
149
|
*/
|
|
132
150
|
private getPatternValidity;
|
|
133
151
|
/**
|
|
@@ -145,6 +163,16 @@ export declare class MgInputTextarea {
|
|
|
145
163
|
/*************
|
|
146
164
|
* Lifecycle *
|
|
147
165
|
*************/
|
|
148
|
-
|
|
149
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Check if component props are well configured on init
|
|
168
|
+
*
|
|
169
|
+
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
170
|
+
*/
|
|
171
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
172
|
+
/**
|
|
173
|
+
* Render
|
|
174
|
+
*
|
|
175
|
+
* @returns {HTMLElement} HTML Element
|
|
176
|
+
*/
|
|
177
|
+
render(): HTMLElement;
|
|
150
178
|
}
|