@mgdis/mg-components 3.1.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/LICENSE +29 -0
- package/dist/cjs/css-shim-a22512c4.js +6 -0
- package/dist/cjs/index-85a4a0b6.js +1674 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +35 -0
- package/dist/cjs/mg-badge_20.cjs.entry.js +4661 -0
- package/dist/cjs/mg-components.cjs.js +23 -0
- package/dist/cjs/shadow-css-8940f82d.js +390 -0
- package/dist/collection/collection-manifest.json +31 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +4 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +99 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +148 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.stories.js +27 -0
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
- package/dist/collection/components/atoms/mg-button/mg-button.css +134 -0
- package/dist/collection/components/atoms/mg-button/mg-button.js +236 -0
- package/dist/collection/components/atoms/mg-button/mg-button.stories.js +38 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.css +3 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +133 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.stories.js +15 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +54 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +57 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +155 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.stories.js +34 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +12 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +95 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.stories.js +21 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js +4 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +73 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +94 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.stories.js +25 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +44 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +225 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.stories.js +26 -0
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +7 -0
- package/dist/collection/components/molecules/inputs/MgInput.js +130 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +156 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +444 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.js +57 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +7 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +171 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +467 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.stories.js +46 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +11 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +199 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +633 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.js +68 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +195 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +401 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.stories.js +43 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +156 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +443 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.js +65 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +201 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +532 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.stories.js +70 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +222 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +589 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.stories.js +115 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +217 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +553 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.js +52 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +213 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +457 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.js +73 -0
- package/dist/collection/components/molecules/mg-message/mg-message.conf.js +4 -0
- package/dist/collection/components/molecules/mg-message/mg-message.css +94 -0
- package/dist/collection/components/molecules/mg-message/mg-message.js +285 -0
- package/dist/collection/components/molecules/mg-message/mg-message.stories.js +43 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +5 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +39 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +218 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.stories.js +23 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +59 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +249 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.stories.js +36 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +30 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +212 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.stories.js +40 -0
- package/dist/collection/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/collection/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/locales/index.js +4 -0
- package/dist/collection/stories/buttons.stories.js +43 -0
- package/dist/collection/stories/grids.stories.js +50 -0
- package/dist/collection/stories/icons.stories.js +20 -0
- package/dist/collection/stories/messages.stories.js +44 -0
- package/dist/collection/stories/tags.stories.js +13 -0
- package/dist/collection/stories/typography.stories.js +28 -0
- package/dist/collection/utils/components.utils.js +67 -0
- package/dist/collection/utils/locale.utils.js +32 -0
- package/dist/collection/utils/test.utils.js +26 -0
- package/dist/collection/variables.css +177 -0
- package/dist/collection/variables.scss +177 -0
- package/dist/components/MgInput.js +140 -0
- package/dist/components/components.utils.js +69 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +54 -0
- package/dist/components/locale.utils.js +35 -0
- package/dist/components/mg-badge.d.ts +11 -0
- package/dist/components/mg-badge.js +6 -0
- package/dist/components/mg-badge2.js +82 -0
- package/dist/components/mg-button.d.ts +11 -0
- package/dist/components/mg-button.js +6 -0
- package/dist/components/mg-button2.js +148 -0
- package/dist/components/mg-character-left.d.ts +11 -0
- package/dist/components/mg-character-left.js +6 -0
- package/dist/components/mg-character-left2.js +77 -0
- package/dist/components/mg-icon.d.ts +11 -0
- package/dist/components/mg-icon.js +6 -0
- package/dist/components/mg-icon2.js +147 -0
- package/dist/components/mg-input-checkbox.d.ts +11 -0
- package/dist/components/mg-input-checkbox.js +222 -0
- package/dist/components/mg-input-date.d.ts +11 -0
- package/dist/components/mg-input-date.js +245 -0
- package/dist/components/mg-input-numeric.d.ts +11 -0
- package/dist/components/mg-input-numeric.js +324 -0
- package/dist/components/mg-input-password.d.ts +11 -0
- package/dist/components/mg-input-password.js +171 -0
- package/dist/components/mg-input-radio.d.ts +11 -0
- package/dist/components/mg-input-radio.js +211 -0
- package/dist/components/mg-input-select.d.ts +11 -0
- package/dist/components/mg-input-select.js +6 -0
- package/dist/components/mg-input-select2.js +243 -0
- package/dist/components/mg-input-text.d.ts +11 -0
- package/dist/components/mg-input-text.js +242 -0
- package/dist/components/mg-input-textarea.d.ts +11 -0
- package/dist/components/mg-input-textarea.js +224 -0
- package/dist/components/mg-input-title.d.ts +11 -0
- package/dist/components/mg-input-title.js +6 -0
- package/dist/components/mg-input-title2.js +55 -0
- package/dist/components/mg-input-toggle.d.ts +11 -0
- package/dist/components/mg-input-toggle.js +247 -0
- package/dist/components/mg-message.d.ts +11 -0
- package/dist/components/mg-message.js +183 -0
- package/dist/components/mg-pagination.d.ts +11 -0
- package/dist/components/mg-pagination.js +175 -0
- package/dist/components/mg-popover.d.ts +11 -0
- package/dist/components/mg-popover.js +183 -0
- package/dist/components/mg-tabs.d.ts +11 -0
- package/dist/components/mg-tabs.js +160 -0
- package/dist/components/mg-tag.d.ts +11 -0
- package/dist/components/mg-tag.js +76 -0
- package/dist/components/mg-tooltip.d.ts +11 -0
- package/dist/components/mg-tooltip.js +6 -0
- package/dist/components/mg-tooltip2.js +150 -0
- package/dist/components/popper.js +1784 -0
- package/dist/esm/css-shim-7c240feb.js +4 -0
- package/dist/esm/index-e3e84606.js +1643 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +31 -0
- package/dist/esm/mg-badge_20.entry.js +4638 -0
- package/dist/esm/mg-components.js +21 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/shadow-css-5d2d01ce.js +388 -0
- package/dist/esm-es5/css-shim-7c240feb.js +1 -0
- package/dist/esm-es5/index-e3e84606.js +1 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +1 -0
- package/dist/esm-es5/mg-badge_20.entry.js +2 -0
- package/dist/esm-es5/mg-components.js +1 -0
- package/dist/esm-es5/shadow-css-5d2d01ce.js +12 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/mg-components/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/mg-components/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/index.esm.js +0 -0
- package/dist/mg-components/mg-components.css +1 -0
- package/dist/mg-components/mg-components.esm.js +1 -0
- package/dist/mg-components/mg-components.js +132 -0
- package/dist/mg-components/p-1cd24462.system.js +1 -0
- package/dist/mg-components/p-2e2f6b27.system.entry.js +2 -0
- package/dist/mg-components/p-366a224e.js +1 -0
- package/dist/mg-components/p-422c429b.system.js +1 -0
- package/dist/mg-components/p-50ea2036.system.js +1 -0
- package/dist/mg-components/p-62fa3797.js +1 -0
- package/dist/mg-components/p-71d57b8b.system.js +13 -0
- package/dist/mg-components/p-9a215712.system.js +1 -0
- package/dist/mg-components/p-cbf0464b.entry.js +1 -0
- package/dist/mg-components/p-f6455ab3.js +12 -0
- package/dist/mg-components/variables.css +177 -0
- package/dist/mg-components/variables.scss +177 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.conf.d.ts +8 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +36 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.stories.d.ts +19 -0
- package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +4 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +67 -0
- package/dist/types/components/atoms/mg-button/mg-button.stories.d.ts +16 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +39 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.stories.d.ts +7 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +12 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +36 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.stories.d.ts +26 -0
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +24 -0
- package/dist/types/components/atoms/mg-input-title/mg-input-title.stories.d.ts +6 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.conf.d.ts +4 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +25 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.stories.d.ts +14 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +56 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +11 -0
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +10 -0
- package/dist/types/components/molecules/inputs/MgInput.d.ts +35 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +19 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +120 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +128 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.stories.d.ts +7 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.d.ts +10 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +173 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.d.ts +21 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +111 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +9 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +9 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +121 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.d.ts +15 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +18 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +133 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +14 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +160 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.stories.d.ts +26 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +150 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +117 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.d.ts +7 -0
- package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +4 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +76 -0
- package/dist/types/components/molecules/mg-message/mg-message.stories.d.ts +16 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.conf.d.ts +4 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +53 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.stories.d.ts +6 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +62 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.stories.d.ts +12 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +10 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +63 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +7 -0
- package/dist/types/components.d.ts +1987 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/locales/index.d.ts +44 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/stories/buttons.stories.d.ts +13 -0
- package/dist/types/stories/grids.stories.d.ts +5 -0
- package/dist/types/stories/icons.stories.d.ts +13 -0
- package/dist/types/stories/messages.stories.d.ts +13 -0
- package/dist/types/stories/tags.stories.d.ts +5 -0
- package/dist/types/stories/typography.stories.d.ts +5 -0
- package/dist/types/utils/components.utils.d.ts +43 -0
- package/dist/types/utils/locale.utils.d.ts +22 -0
- package/dist/types/utils/test.utils.d.ts +5 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +86 -0
- package/readme.md +159 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
|
+
import { ClassList } from '../../../../utils/components.utils';
|
|
4
|
+
import { RadioOption } from './mg-input-radio.conf';
|
|
5
|
+
export declare class MgInputRadio {
|
|
6
|
+
/************
|
|
7
|
+
* Internal *
|
|
8
|
+
************/
|
|
9
|
+
private classError;
|
|
10
|
+
private inputs;
|
|
11
|
+
/**************
|
|
12
|
+
* Decorators *
|
|
13
|
+
**************/
|
|
14
|
+
/**
|
|
15
|
+
* Component value
|
|
16
|
+
*/
|
|
17
|
+
value: any;
|
|
18
|
+
/**
|
|
19
|
+
* Items are the possible options to select
|
|
20
|
+
* Required
|
|
21
|
+
*/
|
|
22
|
+
items: string[] | RadioOption[];
|
|
23
|
+
validateItems(newValue: any): void;
|
|
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
|
+
identifier: string;
|
|
29
|
+
/**
|
|
30
|
+
* Input name
|
|
31
|
+
* If not set the value equals the identifier
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Input label
|
|
36
|
+
* Required
|
|
37
|
+
*/
|
|
38
|
+
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* Define if label is displayed on top
|
|
41
|
+
*/
|
|
42
|
+
labelOnTop: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Define if label is visible
|
|
45
|
+
*/
|
|
46
|
+
labelHide: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Define if inputs are display verticaly
|
|
49
|
+
*/
|
|
50
|
+
inputVerticalList: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Define if input is required
|
|
53
|
+
*/
|
|
54
|
+
required: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Define if input is readonly
|
|
57
|
+
*/
|
|
58
|
+
readonly: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Define if input is disabled
|
|
61
|
+
*/
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Add a tooltip message next to the input
|
|
65
|
+
*/
|
|
66
|
+
tooltip: string;
|
|
67
|
+
/**
|
|
68
|
+
* Add a help text under the input, usually expected data format and example
|
|
69
|
+
*/
|
|
70
|
+
helpText: string;
|
|
71
|
+
/**
|
|
72
|
+
* Force valid component
|
|
73
|
+
*/
|
|
74
|
+
valid: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Force invalid component
|
|
77
|
+
*/
|
|
78
|
+
invalid: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Component classes
|
|
81
|
+
*/
|
|
82
|
+
classList: ClassList;
|
|
83
|
+
/**
|
|
84
|
+
* Error message to display
|
|
85
|
+
*/
|
|
86
|
+
errorMessage: string;
|
|
87
|
+
/**
|
|
88
|
+
* Formated items for display
|
|
89
|
+
*/
|
|
90
|
+
options: RadioOption[];
|
|
91
|
+
/**
|
|
92
|
+
* Emitted event when value change
|
|
93
|
+
*/
|
|
94
|
+
valueChange: EventEmitter<any>;
|
|
95
|
+
/**
|
|
96
|
+
* Handle input event
|
|
97
|
+
*/
|
|
98
|
+
private handleInput;
|
|
99
|
+
/**
|
|
100
|
+
* Handle blur event
|
|
101
|
+
*/
|
|
102
|
+
private handleBlur;
|
|
103
|
+
/**
|
|
104
|
+
* Check if input is valid
|
|
105
|
+
*/
|
|
106
|
+
private checkValidity;
|
|
107
|
+
/**
|
|
108
|
+
* Check input errors
|
|
109
|
+
*/
|
|
110
|
+
private checkError;
|
|
111
|
+
/**
|
|
112
|
+
* get invalid element
|
|
113
|
+
* @returns element: HTMLInputElement
|
|
114
|
+
*/
|
|
115
|
+
private getInvalidElement;
|
|
116
|
+
/*************
|
|
117
|
+
* Lifecycle *
|
|
118
|
+
*************/
|
|
119
|
+
componentWillLoad(): NodeJS.Timeout;
|
|
120
|
+
render(): any;
|
|
121
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: string;
|
|
3
|
+
title: string;
|
|
4
|
+
argTypes: {
|
|
5
|
+
value: {
|
|
6
|
+
options: string[];
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const MgInputRadio: any;
|
|
15
|
+
export declare const ItemsWithOptions: any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* type SelectOption
|
|
3
|
+
* use to match select>option attributes
|
|
4
|
+
*/
|
|
5
|
+
export declare type SelectOption = {
|
|
6
|
+
title: string;
|
|
7
|
+
value: any;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
group?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* type OptGroup
|
|
13
|
+
* use to match select>optgroup attributes
|
|
14
|
+
*/
|
|
15
|
+
export declare type OptGroup = {
|
|
16
|
+
group: string;
|
|
17
|
+
options: SelectOption[];
|
|
18
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
|
+
import { Width } from '../MgInput.conf';
|
|
4
|
+
import { ClassList } from '../../../../utils/components.utils';
|
|
5
|
+
import { SelectOption, OptGroup } from './mg-input-select.conf';
|
|
6
|
+
export declare class MgInputSelect {
|
|
7
|
+
/************
|
|
8
|
+
* Internal *
|
|
9
|
+
************/
|
|
10
|
+
private classError;
|
|
11
|
+
private input;
|
|
12
|
+
/**************
|
|
13
|
+
* Decorators *
|
|
14
|
+
**************/
|
|
15
|
+
/**
|
|
16
|
+
* Component value
|
|
17
|
+
*/
|
|
18
|
+
value: any;
|
|
19
|
+
/**
|
|
20
|
+
* Items are the possible options to select
|
|
21
|
+
*/
|
|
22
|
+
items: string[] | SelectOption[];
|
|
23
|
+
validateItems(newValue: any): void;
|
|
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
|
+
identifier: string;
|
|
29
|
+
/**
|
|
30
|
+
* Input name
|
|
31
|
+
* If not set the value equals the identifier
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Input label
|
|
36
|
+
* Required
|
|
37
|
+
*/
|
|
38
|
+
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* Define if label is displayed on top
|
|
41
|
+
*/
|
|
42
|
+
labelOnTop: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Define if label is visible
|
|
45
|
+
*/
|
|
46
|
+
labelHide: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Input placeholder.
|
|
49
|
+
* It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.
|
|
50
|
+
*/
|
|
51
|
+
placeholder: string;
|
|
52
|
+
/**
|
|
53
|
+
* Option to remove placeholder
|
|
54
|
+
*/
|
|
55
|
+
placeholderHide: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Option to disable placeholder
|
|
58
|
+
*/
|
|
59
|
+
placeholderDisabled: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Define if input is required
|
|
62
|
+
*/
|
|
63
|
+
required: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Define if input is readonly
|
|
66
|
+
*/
|
|
67
|
+
readonly: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Define if input is disabled
|
|
70
|
+
*/
|
|
71
|
+
disabled: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Define input width
|
|
74
|
+
*/
|
|
75
|
+
width: Width;
|
|
76
|
+
/**
|
|
77
|
+
* Add a tooltip message next to the input
|
|
78
|
+
*/
|
|
79
|
+
tooltip: string;
|
|
80
|
+
/**
|
|
81
|
+
* Add a help text under the input, usually expected data format and example
|
|
82
|
+
*/
|
|
83
|
+
helpText: string;
|
|
84
|
+
/**
|
|
85
|
+
* Define input valid state
|
|
86
|
+
*/
|
|
87
|
+
valid: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Define input invalid state
|
|
90
|
+
*/
|
|
91
|
+
invalid: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Component classes
|
|
94
|
+
*/
|
|
95
|
+
classList: ClassList;
|
|
96
|
+
/**
|
|
97
|
+
* Error message to display
|
|
98
|
+
*/
|
|
99
|
+
errorMessage: string;
|
|
100
|
+
/**
|
|
101
|
+
* Formated items for display
|
|
102
|
+
*/
|
|
103
|
+
options: (SelectOption | OptGroup)[];
|
|
104
|
+
/**
|
|
105
|
+
* Does value match any item option
|
|
106
|
+
*/
|
|
107
|
+
valueExist: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Emmited event when value change
|
|
110
|
+
*/
|
|
111
|
+
valueChange: EventEmitter<string>;
|
|
112
|
+
/**
|
|
113
|
+
* Handle input event
|
|
114
|
+
*/
|
|
115
|
+
private handleInput;
|
|
116
|
+
/**
|
|
117
|
+
* Handle blur event
|
|
118
|
+
*/
|
|
119
|
+
private handleBlur;
|
|
120
|
+
/**
|
|
121
|
+
* Check if input is valid
|
|
122
|
+
*/
|
|
123
|
+
private checkValidity;
|
|
124
|
+
/**
|
|
125
|
+
* Check input errors
|
|
126
|
+
*/
|
|
127
|
+
private checkError;
|
|
128
|
+
/*************
|
|
129
|
+
* Lifecycle *
|
|
130
|
+
*************/
|
|
131
|
+
componentWillLoad(): NodeJS.Timeout;
|
|
132
|
+
render(): any;
|
|
133
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: string;
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const MgInputSelect: any;
|
|
7
|
+
/**
|
|
8
|
+
* Using object
|
|
9
|
+
*/
|
|
10
|
+
export declare const WithObjectItems: any;
|
|
11
|
+
/**
|
|
12
|
+
* Using group object
|
|
13
|
+
*/
|
|
14
|
+
export declare const WithGroups: any;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
|
+
import { Width } from '../MgInput.conf';
|
|
4
|
+
import { ClassList } from '../../../../utils/components.utils';
|
|
5
|
+
export declare class MgInputText {
|
|
6
|
+
/************
|
|
7
|
+
* Internal *
|
|
8
|
+
************/
|
|
9
|
+
private classFocus;
|
|
10
|
+
private classError;
|
|
11
|
+
private input;
|
|
12
|
+
/**************
|
|
13
|
+
* Decorators *
|
|
14
|
+
**************/
|
|
15
|
+
/**
|
|
16
|
+
* Get component DOM element
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLMgInputTextElement;
|
|
19
|
+
/**
|
|
20
|
+
* Component value
|
|
21
|
+
*/
|
|
22
|
+
value: string;
|
|
23
|
+
/**
|
|
24
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
25
|
+
* If not set, it will be created.
|
|
26
|
+
*/
|
|
27
|
+
identifier?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Input name
|
|
30
|
+
* If not set the value equals the identifier
|
|
31
|
+
*/
|
|
32
|
+
name?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Input label
|
|
35
|
+
* Required
|
|
36
|
+
*/
|
|
37
|
+
label: string;
|
|
38
|
+
/**
|
|
39
|
+
* Input type
|
|
40
|
+
*/
|
|
41
|
+
type: 'text' | 'search';
|
|
42
|
+
/**
|
|
43
|
+
* Input icon
|
|
44
|
+
*/
|
|
45
|
+
icon: string;
|
|
46
|
+
/**
|
|
47
|
+
* Define if label is displayed on top
|
|
48
|
+
*/
|
|
49
|
+
labelOnTop: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Define if label is visible
|
|
52
|
+
*/
|
|
53
|
+
labelHide: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Input placeholder.
|
|
56
|
+
* It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.
|
|
57
|
+
*/
|
|
58
|
+
placeholder: string;
|
|
59
|
+
/**
|
|
60
|
+
* Input max length
|
|
61
|
+
*/
|
|
62
|
+
maxlength: number;
|
|
63
|
+
/**
|
|
64
|
+
* Define if input is required
|
|
65
|
+
*/
|
|
66
|
+
required: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Define if input is readonly
|
|
69
|
+
*/
|
|
70
|
+
readonly: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Define if input is disabled
|
|
73
|
+
*/
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Define input width
|
|
77
|
+
*/
|
|
78
|
+
width: Width;
|
|
79
|
+
/**
|
|
80
|
+
* Define input pattern to validate
|
|
81
|
+
*/
|
|
82
|
+
pattern: string;
|
|
83
|
+
/**
|
|
84
|
+
* Define input pattern error message
|
|
85
|
+
*/
|
|
86
|
+
patternErrorMessage: string;
|
|
87
|
+
/**
|
|
88
|
+
* Add a tooltip message next to the input
|
|
89
|
+
*/
|
|
90
|
+
tooltip: string;
|
|
91
|
+
/**
|
|
92
|
+
* Define if component should display character left
|
|
93
|
+
*/
|
|
94
|
+
displayCharacterLeft: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Template to use for characters left sentence
|
|
97
|
+
*/
|
|
98
|
+
characterLeftTemplate: string;
|
|
99
|
+
/**
|
|
100
|
+
* Add a help text under the input, usually expected data format and example
|
|
101
|
+
*/
|
|
102
|
+
helpText: string;
|
|
103
|
+
/**
|
|
104
|
+
* Define input pattern to validate
|
|
105
|
+
*/
|
|
106
|
+
valid: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Define input pattern error message
|
|
109
|
+
*/
|
|
110
|
+
invalid: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Component classes
|
|
113
|
+
*/
|
|
114
|
+
classList: ClassList;
|
|
115
|
+
/**
|
|
116
|
+
* Error message to display
|
|
117
|
+
*/
|
|
118
|
+
errorMessage: string;
|
|
119
|
+
/**
|
|
120
|
+
* Emmited event when value change
|
|
121
|
+
*/
|
|
122
|
+
valueChange: EventEmitter<string>;
|
|
123
|
+
/**
|
|
124
|
+
* Handle input event
|
|
125
|
+
*/
|
|
126
|
+
private handleInput;
|
|
127
|
+
/**
|
|
128
|
+
* Handle focus event
|
|
129
|
+
*/
|
|
130
|
+
private handleFocus;
|
|
131
|
+
/**
|
|
132
|
+
* Handle blur event
|
|
133
|
+
*/
|
|
134
|
+
private handleBlur;
|
|
135
|
+
/**
|
|
136
|
+
* Check if input is valid
|
|
137
|
+
*/
|
|
138
|
+
private checkValidity;
|
|
139
|
+
/**
|
|
140
|
+
* Check input errors
|
|
141
|
+
*/
|
|
142
|
+
private checkError;
|
|
143
|
+
/**
|
|
144
|
+
* Validate patern configuration
|
|
145
|
+
*/
|
|
146
|
+
private validatePattern;
|
|
147
|
+
/**
|
|
148
|
+
* Validate append slot
|
|
149
|
+
*/
|
|
150
|
+
private validateAppendSlot;
|
|
151
|
+
/*************
|
|
152
|
+
* Lifecycle *
|
|
153
|
+
*************/
|
|
154
|
+
/**
|
|
155
|
+
* Check if component props are well configured on init
|
|
156
|
+
*/
|
|
157
|
+
componentWillLoad(): NodeJS.Timeout;
|
|
158
|
+
componentDidLoad(): void;
|
|
159
|
+
render(): any;
|
|
160
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: string;
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
/**
|
|
7
|
+
* Global use
|
|
8
|
+
*/
|
|
9
|
+
export declare const MgInputText: any;
|
|
10
|
+
/**
|
|
11
|
+
* Email
|
|
12
|
+
*/
|
|
13
|
+
export declare const Email: any;
|
|
14
|
+
/**
|
|
15
|
+
* Emails
|
|
16
|
+
*/
|
|
17
|
+
export declare const Emails: any;
|
|
18
|
+
/**
|
|
19
|
+
* RNA
|
|
20
|
+
*/
|
|
21
|
+
export declare const RNA: any;
|
|
22
|
+
/**
|
|
23
|
+
* URL
|
|
24
|
+
*/
|
|
25
|
+
export declare const URL: any;
|
|
26
|
+
export declare const Search: any;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
3
|
+
import { Width } from '../MgInput.conf';
|
|
4
|
+
import { ClassList } from '../../../../utils/components.utils';
|
|
5
|
+
export declare class MgInputTextarea {
|
|
6
|
+
/************
|
|
7
|
+
* Internal *
|
|
8
|
+
************/
|
|
9
|
+
private classFocus;
|
|
10
|
+
private classError;
|
|
11
|
+
private input;
|
|
12
|
+
/**************
|
|
13
|
+
* Decorators *
|
|
14
|
+
**************/
|
|
15
|
+
/**
|
|
16
|
+
* Component value
|
|
17
|
+
*/
|
|
18
|
+
value: string;
|
|
19
|
+
/**
|
|
20
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
21
|
+
* If not set, it will be created.
|
|
22
|
+
*/
|
|
23
|
+
identifier?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Input name
|
|
26
|
+
* If not set the value equals the identifier
|
|
27
|
+
*/
|
|
28
|
+
name?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Input label
|
|
31
|
+
* Required
|
|
32
|
+
*/
|
|
33
|
+
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* Define if label is displayed on top
|
|
36
|
+
*/
|
|
37
|
+
labelOnTop: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Define if label is visible
|
|
40
|
+
*/
|
|
41
|
+
labelHide: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Input placeholder.
|
|
44
|
+
* It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.
|
|
45
|
+
*/
|
|
46
|
+
placeholder: string;
|
|
47
|
+
/**
|
|
48
|
+
* Input max length
|
|
49
|
+
*/
|
|
50
|
+
maxlength: number;
|
|
51
|
+
/**
|
|
52
|
+
* Define if input is required
|
|
53
|
+
*/
|
|
54
|
+
required: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Define if input is readonly
|
|
57
|
+
*/
|
|
58
|
+
readonly: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Define if input is disabled
|
|
61
|
+
*/
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Define input width
|
|
65
|
+
*/
|
|
66
|
+
width: Width;
|
|
67
|
+
/**
|
|
68
|
+
* Define input pattern to validate
|
|
69
|
+
*/
|
|
70
|
+
pattern: string;
|
|
71
|
+
/**
|
|
72
|
+
* Define input pattern error message
|
|
73
|
+
*/
|
|
74
|
+
patternErrorMessage: string;
|
|
75
|
+
/**
|
|
76
|
+
* Define input pattern error message
|
|
77
|
+
*/
|
|
78
|
+
rows: number;
|
|
79
|
+
/**
|
|
80
|
+
* Add a tooltip message next to the input
|
|
81
|
+
*/
|
|
82
|
+
tooltip: string;
|
|
83
|
+
/**
|
|
84
|
+
* Define if component should display character left
|
|
85
|
+
*/
|
|
86
|
+
displayCharacterLeft: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Template to use for characters left sentence
|
|
89
|
+
*/
|
|
90
|
+
characterLeftTemplate: string;
|
|
91
|
+
/**
|
|
92
|
+
* Add a help text under the input, usually expected data format and example
|
|
93
|
+
*/
|
|
94
|
+
helpText: string;
|
|
95
|
+
/**
|
|
96
|
+
* Define input pattern to validate
|
|
97
|
+
*/
|
|
98
|
+
valid: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Define input pattern error message
|
|
101
|
+
*/
|
|
102
|
+
invalid: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Component classes
|
|
105
|
+
*/
|
|
106
|
+
classList: ClassList;
|
|
107
|
+
/**
|
|
108
|
+
* Error message to display
|
|
109
|
+
*/
|
|
110
|
+
errorMessage: string;
|
|
111
|
+
/**
|
|
112
|
+
* Emmited event when value change
|
|
113
|
+
*/
|
|
114
|
+
valueChange: EventEmitter<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Handle input event
|
|
117
|
+
*/
|
|
118
|
+
private handleInput;
|
|
119
|
+
/**
|
|
120
|
+
* Handle focus event
|
|
121
|
+
*/
|
|
122
|
+
private handleFocus;
|
|
123
|
+
/**
|
|
124
|
+
* Handle blur event
|
|
125
|
+
*/
|
|
126
|
+
private handleBlur;
|
|
127
|
+
/**
|
|
128
|
+
* Get pattern validity
|
|
129
|
+
* Pattern is not defined on textarea field : https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
|
|
130
|
+
* @returns {boolean}
|
|
131
|
+
*/
|
|
132
|
+
private getPatternValidity;
|
|
133
|
+
/**
|
|
134
|
+
* Check if input is valid
|
|
135
|
+
*/
|
|
136
|
+
private checkValidity;
|
|
137
|
+
/**
|
|
138
|
+
* Check input errors
|
|
139
|
+
*/
|
|
140
|
+
private checkError;
|
|
141
|
+
/**
|
|
142
|
+
* Validate pattern configuration
|
|
143
|
+
*/
|
|
144
|
+
private validatePattern;
|
|
145
|
+
/*************
|
|
146
|
+
* Lifecycle *
|
|
147
|
+
*************/
|
|
148
|
+
componentWillLoad(): NodeJS.Timeout;
|
|
149
|
+
render(): any;
|
|
150
|
+
}
|