@digigov/react-core 0.4.0 → 0.5.2
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/Button/index.d.ts +5 -1
- package/Button/index.js +4 -2
- package/CHANGELOG.md +33 -1
- package/CheckboxConditional/__snapshots__/index.test.tsx.snap +2 -11
- package/CheckboxConditional/index.d.ts +1 -1
- package/CheckboxConditional/index.js +2 -6
- package/CheckboxItem/__snapshots__/index.test.tsx.snap +14 -14
- package/CheckboxItem/index.d.ts +5 -5
- package/CheckboxItem/index.js +6 -6
- package/DateInputItem/__snapshots__/index.test.tsx.snap +37 -13
- package/DateInputItem/index.d.ts +12 -2
- package/DateInputItem/index.js +7 -4
- package/DateInputItem/index.test.js +9 -0
- package/Field/__snapshots__/index.test.tsx.snap +35 -0
- package/Field/index.d.ts +13 -0
- package/{FormGroup → Field}/index.js +6 -6
- package/{FormGroup → Field}/index.test.d.ts +0 -0
- package/Field/index.test.js +31 -0
- package/FieldsetLegend/__snapshots__/index.test.tsx.snap +102 -876
- package/FieldsetLegend/index.d.ts +4 -4
- package/FieldsetLegend/index.js +9 -8
- package/FieldsetLegend/index.test.js +48 -144
- package/FileUpload/index.d.ts +3 -3
- package/FileUpload/index.js +3 -3
- package/FooterImage/index.d.ts +1 -1
- package/GovGRLogo/index.js +1 -1
- package/Grid/index.d.ts +1 -1
- package/Header/index.js +1 -1
- package/HellenicRepublicLogo/index.d.ts +1 -1
- package/Hidden/index.d.ts +17 -0
- package/Hidden/index.js +47 -0
- package/Hidden/index.test.d.ts +1 -0
- package/Hidden/index.test.js +49 -0
- package/Label/index.d.ts +1 -6
- package/Label/index.js +3 -5
- package/LabelTitle/__snapshots__/index.test.tsx.snap +133 -0
- package/LabelTitle/index.d.ts +19 -0
- package/LabelTitle/index.js +41 -0
- package/LabelTitle/index.test.d.ts +1 -0
- package/LabelTitle/index.test.js +91 -0
- package/RadioConditional/__snapshots__/index.test.tsx.snap +39 -0
- package/RadioConditional/index.d.ts +15 -0
- package/RadioConditional/index.js +42 -0
- package/RadioConditional/index.test.d.ts +1 -0
- package/RadioConditional/index.test.js +23 -0
- package/RadioItem/__snapshots__/index.test.tsx.snap +20 -20
- package/RadioItem/index.d.ts +5 -5
- package/RadioItem/index.js +6 -6
- package/Select/index.d.ts +1 -1
- package/TextArea/index.d.ts +1 -1
- package/TextInput/index.d.ts +1 -1
- package/es/Button/index.js +4 -2
- package/es/CheckboxConditional/__snapshots__/index.test.tsx.snap +2 -11
- package/es/CheckboxConditional/index.js +2 -6
- package/es/CheckboxItem/__snapshots__/index.test.tsx.snap +14 -14
- package/es/CheckboxItem/index.js +6 -6
- package/es/DateInputItem/__snapshots__/index.test.tsx.snap +37 -13
- package/es/DateInputItem/index.js +7 -4
- package/es/DateInputItem/index.test.js +9 -0
- package/es/Field/__snapshots__/index.test.tsx.snap +35 -0
- package/es/{FormGroup → Field}/index.js +4 -4
- package/es/Field/index.test.js +25 -0
- package/es/FieldsetLegend/__snapshots__/index.test.tsx.snap +102 -876
- package/es/FieldsetLegend/index.js +9 -8
- package/es/FieldsetLegend/index.test.js +48 -139
- package/es/FileUpload/index.js +3 -3
- package/es/GovGRLogo/index.js +1 -1
- package/es/Header/index.js +1 -1
- package/es/Hidden/index.js +32 -0
- package/es/Hidden/index.test.js +43 -0
- package/es/Label/index.js +3 -5
- package/es/LabelTitle/__snapshots__/index.test.tsx.snap +133 -0
- package/es/LabelTitle/index.js +26 -0
- package/es/LabelTitle/index.test.js +85 -0
- package/es/RadioConditional/__snapshots__/index.test.tsx.snap +39 -0
- package/es/RadioConditional/index.js +27 -0
- package/es/RadioConditional/index.test.js +17 -0
- package/es/RadioItem/__snapshots__/index.test.tsx.snap +20 -20
- package/es/RadioItem/index.js +6 -6
- package/es/index.js +4 -1
- package/esm/Button/index.js +4 -2
- package/esm/CheckboxConditional/__snapshots__/index.test.tsx.snap +2 -11
- package/esm/CheckboxConditional/index.js +2 -6
- package/esm/CheckboxItem/__snapshots__/index.test.tsx.snap +14 -14
- package/esm/CheckboxItem/index.js +6 -6
- package/esm/DateInputItem/__snapshots__/index.test.tsx.snap +37 -13
- package/esm/DateInputItem/index.js +7 -4
- package/esm/DateInputItem/index.test.js +9 -0
- package/esm/Field/__snapshots__/index.test.tsx.snap +35 -0
- package/esm/{FormGroup → Field}/index.js +4 -4
- package/esm/Field/index.test.js +25 -0
- package/esm/FieldsetLegend/__snapshots__/index.test.tsx.snap +102 -876
- package/esm/FieldsetLegend/index.js +9 -8
- package/esm/FieldsetLegend/index.test.js +48 -139
- package/esm/FileUpload/index.js +3 -3
- package/esm/GovGRLogo/index.js +1 -1
- package/esm/Header/index.js +1 -1
- package/esm/Hidden/index.js +32 -0
- package/esm/Hidden/index.test.js +43 -0
- package/esm/Label/index.js +3 -5
- package/esm/LabelTitle/__snapshots__/index.test.tsx.snap +133 -0
- package/esm/LabelTitle/index.js +26 -0
- package/esm/LabelTitle/index.test.js +85 -0
- package/esm/RadioConditional/__snapshots__/index.test.tsx.snap +39 -0
- package/esm/RadioConditional/index.js +27 -0
- package/esm/RadioConditional/index.test.js +17 -0
- package/esm/RadioItem/__snapshots__/index.test.tsx.snap +20 -20
- package/esm/RadioItem/index.js +6 -6
- package/esm/index.js +5 -2
- package/index.d.ts +4 -1
- package/index.js +31 -7
- package/package.json +2 -2
- package/FormGroup/__snapshots__/index.test.tsx.snap +0 -35
- package/FormGroup/index.d.ts +0 -13
- package/FormGroup/index.test.js +0 -31
- package/es/FormGroup/__snapshots__/index.test.tsx.snap +0 -35
- package/es/FormGroup/index.test.js +0 -25
- package/esm/FormGroup/__snapshots__/index.test.tsx.snap +0 -35
- package/esm/FormGroup/index.test.js +0 -25
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the Blockquote with name prop 1`] = `
|
|
4
|
+
<ForwardRef(RadioConditional)
|
|
5
|
+
name="some-name"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
className="govgr-radios__conditional"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
className="govgr-field"
|
|
12
|
+
>
|
|
13
|
+
<label
|
|
14
|
+
className="govgr-label"
|
|
15
|
+
>
|
|
16
|
+
hello
|
|
17
|
+
</label>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</ForwardRef(RadioConditional)>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
exports[`renders the Blockquote with no props 1`] = `
|
|
24
|
+
<ForwardRef(RadioConditional)>
|
|
25
|
+
<div
|
|
26
|
+
className="govgr-radios__conditional"
|
|
27
|
+
>
|
|
28
|
+
<div
|
|
29
|
+
className="govgr-field"
|
|
30
|
+
>
|
|
31
|
+
<label
|
|
32
|
+
className="govgr-label"
|
|
33
|
+
>
|
|
34
|
+
hello
|
|
35
|
+
</label>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</ForwardRef(RadioConditional)>
|
|
39
|
+
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["name", "className", "children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* RadioConditional asks the user a related question when they select a particular radios,
|
|
9
|
+
* so they only see the question when it’s relevant to them.
|
|
10
|
+
* RadioConditional must be used inside Radio component
|
|
11
|
+
*/
|
|
12
|
+
export var RadioConditional = /*#__PURE__*/React.forwardRef(function RadioConditional(_ref, ref) {
|
|
13
|
+
var name = _ref.name,
|
|
14
|
+
className = _ref.className,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: clsx(className, true && 'govgr-radios__conditional')
|
|
21
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: clsx(true && 'govgr-field')
|
|
23
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
24
|
+
className: clsx(true && 'govgr-label')
|
|
25
|
+
}, children)));
|
|
26
|
+
});
|
|
27
|
+
export default RadioConditional;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import RadioConditional from '@digigov/react-core/RadioConditional';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(RadioConditional, null, "hello");
|
|
6
|
+
|
|
7
|
+
it('renders the Blockquote with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(RadioConditional, {
|
|
12
|
+
name: 'some-name'
|
|
13
|
+
}, "hello");
|
|
14
|
+
|
|
15
|
+
it('renders the Blockquote with name prop', function () {
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
+
});
|
|
@@ -7,15 +7,15 @@ exports[`renders the RadioItem value props 1`] = `
|
|
|
7
7
|
<div
|
|
8
8
|
className="govgr-radios__item"
|
|
9
9
|
>
|
|
10
|
-
<input
|
|
11
|
-
className="govgr-radios__input"
|
|
12
|
-
type="radio"
|
|
13
|
-
value="someValue"
|
|
14
|
-
/>
|
|
15
10
|
<label
|
|
16
11
|
className="govgr-label govgr-radios__label"
|
|
17
12
|
>
|
|
18
13
|
hello
|
|
14
|
+
<input
|
|
15
|
+
className="govgr-radios__input"
|
|
16
|
+
type="radio"
|
|
17
|
+
value="someValue"
|
|
18
|
+
/>
|
|
19
19
|
</label>
|
|
20
20
|
</div>
|
|
21
21
|
</ForwardRef(RadioItem)>
|
|
@@ -28,15 +28,15 @@ exports[`renders the RadioItem with name props 1`] = `
|
|
|
28
28
|
<div
|
|
29
29
|
className="govgr-radios__item"
|
|
30
30
|
>
|
|
31
|
-
<input
|
|
32
|
-
className="govgr-radios__input"
|
|
33
|
-
name="name"
|
|
34
|
-
type="radio"
|
|
35
|
-
/>
|
|
36
31
|
<label
|
|
37
32
|
className="govgr-label govgr-radios__label"
|
|
38
33
|
>
|
|
39
34
|
hello
|
|
35
|
+
<input
|
|
36
|
+
className="govgr-radios__input"
|
|
37
|
+
name="name"
|
|
38
|
+
type="radio"
|
|
39
|
+
/>
|
|
40
40
|
</label>
|
|
41
41
|
</div>
|
|
42
42
|
</ForwardRef(RadioItem)>
|
|
@@ -50,16 +50,16 @@ exports[`renders the RadioItem with name and value props 1`] = `
|
|
|
50
50
|
<div
|
|
51
51
|
className="govgr-radios__item"
|
|
52
52
|
>
|
|
53
|
-
<input
|
|
54
|
-
className="govgr-radios__input"
|
|
55
|
-
name="name"
|
|
56
|
-
type="radio"
|
|
57
|
-
value="someValue"
|
|
58
|
-
/>
|
|
59
53
|
<label
|
|
60
54
|
className="govgr-label govgr-radios__label"
|
|
61
55
|
>
|
|
62
56
|
hello
|
|
57
|
+
<input
|
|
58
|
+
className="govgr-radios__input"
|
|
59
|
+
name="name"
|
|
60
|
+
type="radio"
|
|
61
|
+
value="someValue"
|
|
62
|
+
/>
|
|
63
63
|
</label>
|
|
64
64
|
</div>
|
|
65
65
|
</ForwardRef(RadioItem)>
|
|
@@ -70,14 +70,14 @@ exports[`renders the RadioItem with no props 1`] = `
|
|
|
70
70
|
<div
|
|
71
71
|
className="govgr-radios__item"
|
|
72
72
|
>
|
|
73
|
-
<input
|
|
74
|
-
className="govgr-radios__input"
|
|
75
|
-
type="radio"
|
|
76
|
-
/>
|
|
77
73
|
<label
|
|
78
74
|
className="govgr-label govgr-radios__label"
|
|
79
75
|
>
|
|
80
76
|
hello
|
|
77
|
+
<input
|
|
78
|
+
className="govgr-radios__input"
|
|
79
|
+
type="radio"
|
|
80
|
+
/>
|
|
81
81
|
</label>
|
|
82
82
|
</div>
|
|
83
83
|
</ForwardRef(RadioItem)>
|
package/esm/RadioItem/index.js
CHANGED
|
@@ -15,16 +15,16 @@ export var RadioItem = /*#__PURE__*/React.forwardRef(function RadioItem(_ref, re
|
|
|
15
15
|
children = _ref.children,
|
|
16
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
17
|
|
|
18
|
-
return /*#__PURE__*/React.createElement("div",
|
|
19
|
-
ref: ref,
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
19
|
className: clsx(className, true && 'govgr-radios__item')
|
|
21
|
-
},
|
|
20
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
21
|
+
className: clsx(true && 'govgr-label govgr-radios__label')
|
|
22
|
+
}, children, /*#__PURE__*/React.createElement("input", _extends({
|
|
23
|
+
ref: ref,
|
|
22
24
|
type: "radio",
|
|
23
25
|
name: name,
|
|
24
26
|
value: value,
|
|
25
27
|
className: clsx(true && 'govgr-radios__input')
|
|
26
|
-
}
|
|
27
|
-
className: clsx(true && 'govgr-label govgr-radios__label')
|
|
28
|
-
}, children));
|
|
28
|
+
}, props))));
|
|
29
29
|
});
|
|
30
30
|
export default RadioItem;
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Digigov v0.
|
|
1
|
+
/** @license Digigov v0.5.2
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -57,7 +57,7 @@ export { default as FooterMeta } from '@digigov/react-core/FooterMeta';
|
|
|
57
57
|
export { default as FooterMetaItem } from '@digigov/react-core/FooterMetaItem';
|
|
58
58
|
export { default as FooterNavigation } from '@digigov/react-core/FooterNavigation';
|
|
59
59
|
export { default as FooterSection } from '@digigov/react-core/FooterSection';
|
|
60
|
-
export { default as
|
|
60
|
+
export { default as Field } from '@digigov/react-core/Field';
|
|
61
61
|
export { default as GovGRFooter } from '@digigov/react-core/GovGRFooter';
|
|
62
62
|
export { default as GovGRLogo } from '@digigov/react-core/GovGRLogo';
|
|
63
63
|
export { default as Grid } from '@digigov/react-core/Grid';
|
|
@@ -71,8 +71,10 @@ export { default as HeaderTitle } from '@digigov/react-core/HeaderTitle';
|
|
|
71
71
|
export { default as Heading } from '@digigov/react-core/Heading';
|
|
72
72
|
export { default as HeadingCaption } from '@digigov/react-core/HeadingCaption';
|
|
73
73
|
export { default as HellenicRepublicLogo } from '@digigov/react-core/HellenicRepublicLogo';
|
|
74
|
+
export { default as Hidden } from '@digigov/react-core/Hidden';
|
|
74
75
|
export { default as Hint } from '@digigov/react-core/Hint';
|
|
75
76
|
export { default as Label } from '@digigov/react-core/Label';
|
|
77
|
+
export { default as LabelTitle } from '@digigov/react-core/LabelTitle';
|
|
76
78
|
export { default as Layout } from '@digigov/react-core/Layout';
|
|
77
79
|
export { default as Link } from '@digigov/react-core/Link';
|
|
78
80
|
export { default as List } from '@digigov/react-core/List';
|
|
@@ -101,6 +103,7 @@ export { default as PhaseBannerTag } from '@digigov/react-core/PhaseBannerTag';
|
|
|
101
103
|
export { default as PhaseBannerText } from '@digigov/react-core/PhaseBannerText';
|
|
102
104
|
export { default as Radio } from '@digigov/react-core/Radio';
|
|
103
105
|
export { default as RadioItem } from '@digigov/react-core/RadioItem';
|
|
106
|
+
export { default as RadioConditional } from '@digigov/react-core/RadioConditional';
|
|
104
107
|
export { default as SectionBreak } from '@digigov/react-core/SectionBreak';
|
|
105
108
|
export { default as Select } from '@digigov/react-core/Select';
|
|
106
109
|
export { default as SelectOption } from '@digigov/react-core/SelectOption';
|
package/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export { default as FooterMeta } from '@digigov/react-core/FooterMeta';
|
|
|
52
52
|
export { default as FooterMetaItem } from '@digigov/react-core/FooterMetaItem';
|
|
53
53
|
export { default as FooterNavigation } from '@digigov/react-core/FooterNavigation';
|
|
54
54
|
export { default as FooterSection } from '@digigov/react-core/FooterSection';
|
|
55
|
-
export { default as
|
|
55
|
+
export { default as Field } from '@digigov/react-core/Field';
|
|
56
56
|
export { default as GovGRFooter } from '@digigov/react-core/GovGRFooter';
|
|
57
57
|
export { default as GovGRLogo } from '@digigov/react-core/GovGRLogo';
|
|
58
58
|
export { default as Grid } from '@digigov/react-core/Grid';
|
|
@@ -66,8 +66,10 @@ export { default as HeaderTitle } from '@digigov/react-core/HeaderTitle';
|
|
|
66
66
|
export { default as Heading } from '@digigov/react-core/Heading';
|
|
67
67
|
export { default as HeadingCaption } from '@digigov/react-core/HeadingCaption';
|
|
68
68
|
export { default as HellenicRepublicLogo } from '@digigov/react-core/HellenicRepublicLogo';
|
|
69
|
+
export { default as Hidden } from '@digigov/react-core/Hidden';
|
|
69
70
|
export { default as Hint } from '@digigov/react-core/Hint';
|
|
70
71
|
export { default as Label } from '@digigov/react-core/Label';
|
|
72
|
+
export { default as LabelTitle } from '@digigov/react-core/LabelTitle';
|
|
71
73
|
export { default as Layout } from '@digigov/react-core/Layout';
|
|
72
74
|
export { default as Link } from '@digigov/react-core/Link';
|
|
73
75
|
export { default as List } from '@digigov/react-core/List';
|
|
@@ -96,6 +98,7 @@ export { default as PhaseBannerTag } from '@digigov/react-core/PhaseBannerTag';
|
|
|
96
98
|
export { default as PhaseBannerText } from '@digigov/react-core/PhaseBannerText';
|
|
97
99
|
export { default as Radio } from '@digigov/react-core/Radio';
|
|
98
100
|
export { default as RadioItem } from '@digigov/react-core/RadioItem';
|
|
101
|
+
export { default as RadioConditional } from '@digigov/react-core/RadioConditional';
|
|
99
102
|
export { default as SectionBreak } from '@digigov/react-core/SectionBreak';
|
|
100
103
|
export { default as Select } from '@digigov/react-core/Select';
|
|
101
104
|
export { default as SelectOption } from '@digigov/react-core/SelectOption';
|
package/index.js
CHANGED
|
@@ -221,6 +221,12 @@ Object.defineProperty(exports, "ErrorSummary", {
|
|
|
221
221
|
return _ErrorSummary["default"];
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
|
+
Object.defineProperty(exports, "Field", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function get() {
|
|
227
|
+
return _Field["default"];
|
|
228
|
+
}
|
|
229
|
+
});
|
|
224
230
|
Object.defineProperty(exports, "Fieldset", {
|
|
225
231
|
enumerable: true,
|
|
226
232
|
get: function get() {
|
|
@@ -329,12 +335,6 @@ Object.defineProperty(exports, "FooterSection", {
|
|
|
329
335
|
return _FooterSection["default"];
|
|
330
336
|
}
|
|
331
337
|
});
|
|
332
|
-
Object.defineProperty(exports, "FormGroup", {
|
|
333
|
-
enumerable: true,
|
|
334
|
-
get: function get() {
|
|
335
|
-
return _FormGroup["default"];
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
338
|
Object.defineProperty(exports, "GovGRFooter", {
|
|
339
339
|
enumerable: true,
|
|
340
340
|
get: function get() {
|
|
@@ -413,6 +413,12 @@ Object.defineProperty(exports, "HellenicRepublicLogo", {
|
|
|
413
413
|
return _HellenicRepublicLogo["default"];
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
|
+
Object.defineProperty(exports, "Hidden", {
|
|
417
|
+
enumerable: true,
|
|
418
|
+
get: function get() {
|
|
419
|
+
return _Hidden["default"];
|
|
420
|
+
}
|
|
421
|
+
});
|
|
416
422
|
Object.defineProperty(exports, "Hint", {
|
|
417
423
|
enumerable: true,
|
|
418
424
|
get: function get() {
|
|
@@ -425,6 +431,12 @@ Object.defineProperty(exports, "Label", {
|
|
|
425
431
|
return _Label["default"];
|
|
426
432
|
}
|
|
427
433
|
});
|
|
434
|
+
Object.defineProperty(exports, "LabelTitle", {
|
|
435
|
+
enumerable: true,
|
|
436
|
+
get: function get() {
|
|
437
|
+
return _LabelTitle["default"];
|
|
438
|
+
}
|
|
439
|
+
});
|
|
428
440
|
Object.defineProperty(exports, "Layout", {
|
|
429
441
|
enumerable: true,
|
|
430
442
|
get: function get() {
|
|
@@ -587,6 +599,12 @@ Object.defineProperty(exports, "Radio", {
|
|
|
587
599
|
return _Radio["default"];
|
|
588
600
|
}
|
|
589
601
|
});
|
|
602
|
+
Object.defineProperty(exports, "RadioConditional", {
|
|
603
|
+
enumerable: true,
|
|
604
|
+
get: function get() {
|
|
605
|
+
return _RadioConditional["default"];
|
|
606
|
+
}
|
|
607
|
+
});
|
|
590
608
|
Object.defineProperty(exports, "RadioItem", {
|
|
591
609
|
enumerable: true,
|
|
592
610
|
get: function get() {
|
|
@@ -858,7 +876,7 @@ var _FooterNavigation = _interopRequireDefault(require("@digigov/react-core/Foot
|
|
|
858
876
|
|
|
859
877
|
var _FooterSection = _interopRequireDefault(require("@digigov/react-core/FooterSection"));
|
|
860
878
|
|
|
861
|
-
var
|
|
879
|
+
var _Field = _interopRequireDefault(require("@digigov/react-core/Field"));
|
|
862
880
|
|
|
863
881
|
var _GovGRFooter = _interopRequireDefault(require("@digigov/react-core/GovGRFooter"));
|
|
864
882
|
|
|
@@ -886,10 +904,14 @@ var _HeadingCaption = _interopRequireDefault(require("@digigov/react-core/Headin
|
|
|
886
904
|
|
|
887
905
|
var _HellenicRepublicLogo = _interopRequireDefault(require("@digigov/react-core/HellenicRepublicLogo"));
|
|
888
906
|
|
|
907
|
+
var _Hidden = _interopRequireDefault(require("@digigov/react-core/Hidden"));
|
|
908
|
+
|
|
889
909
|
var _Hint = _interopRequireDefault(require("@digigov/react-core/Hint"));
|
|
890
910
|
|
|
891
911
|
var _Label = _interopRequireDefault(require("@digigov/react-core/Label"));
|
|
892
912
|
|
|
913
|
+
var _LabelTitle = _interopRequireDefault(require("@digigov/react-core/LabelTitle"));
|
|
914
|
+
|
|
893
915
|
var _Layout = _interopRequireDefault(require("@digigov/react-core/Layout"));
|
|
894
916
|
|
|
895
917
|
var _Link = _interopRequireDefault(require("@digigov/react-core/Link"));
|
|
@@ -946,6 +968,8 @@ var _Radio = _interopRequireDefault(require("@digigov/react-core/Radio"));
|
|
|
946
968
|
|
|
947
969
|
var _RadioItem = _interopRequireDefault(require("@digigov/react-core/RadioItem"));
|
|
948
970
|
|
|
971
|
+
var _RadioConditional = _interopRequireDefault(require("@digigov/react-core/RadioConditional"));
|
|
972
|
+
|
|
949
973
|
var _SectionBreak = _interopRequireDefault(require("@digigov/react-core/SectionBreak"));
|
|
950
974
|
|
|
951
975
|
var _Select = _interopRequireDefault(require("@digigov/react-core/Select"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "@digigov react core components",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "dist"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@digigov/css": "0.
|
|
14
|
+
"@digigov/css": "0.7.2",
|
|
15
15
|
"clsx": "~1.1.1",
|
|
16
16
|
"react": "16.14.0",
|
|
17
17
|
"react-dom": "16.14.0"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the FormGroup with error=false 1`] = `
|
|
4
|
-
<ForwardRef(FormGroup)
|
|
5
|
-
error={false}
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
className="govgr-form-group"
|
|
9
|
-
>
|
|
10
|
-
hello
|
|
11
|
-
</div>
|
|
12
|
-
</ForwardRef(FormGroup)>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`renders the FormGroup with error=true 1`] = `
|
|
16
|
-
<ForwardRef(FormGroup)
|
|
17
|
-
error={true}
|
|
18
|
-
>
|
|
19
|
-
<div
|
|
20
|
-
className="govgr-form-group__error govgr-form-group"
|
|
21
|
-
>
|
|
22
|
-
hello
|
|
23
|
-
</div>
|
|
24
|
-
</ForwardRef(FormGroup)>
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports[`renders the FormGroup with no props 1`] = `
|
|
28
|
-
<ForwardRef(FormGroup)>
|
|
29
|
-
<div
|
|
30
|
-
className="govgr-form-group"
|
|
31
|
-
>
|
|
32
|
-
hello
|
|
33
|
-
</div>
|
|
34
|
-
</ForwardRef(FormGroup)>
|
|
35
|
-
`;
|
package/FormGroup/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
|
-
export interface FormGroupProps extends DivElementAttributes {
|
|
4
|
-
/**
|
|
5
|
-
* error is optional.
|
|
6
|
-
*/
|
|
7
|
-
error?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* FormGroup component wraps components such as Checkbox.
|
|
11
|
-
*/
|
|
12
|
-
export declare const FormGroup: React.ForwardRefExoticComponent<Pick<FormGroupProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "error"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export default FormGroup;
|
package/FormGroup/index.test.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
|
-
var _enzyme = require("enzyme");
|
|
8
|
-
|
|
9
|
-
var _FormGroup = _interopRequireDefault(require("@digigov/react-core/FormGroup"));
|
|
10
|
-
|
|
11
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_FormGroup["default"], null, "hello");
|
|
12
|
-
|
|
13
|
-
it('renders the FormGroup with no props', function () {
|
|
14
|
-
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
var _ref2 = /*#__PURE__*/_react["default"].createElement(_FormGroup["default"], {
|
|
18
|
-
error: true
|
|
19
|
-
}, "hello");
|
|
20
|
-
|
|
21
|
-
it('renders the FormGroup with error=true', function () {
|
|
22
|
-
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
var _ref3 = /*#__PURE__*/_react["default"].createElement(_FormGroup["default"], {
|
|
26
|
-
error: false
|
|
27
|
-
}, "hello");
|
|
28
|
-
|
|
29
|
-
it('renders the FormGroup with error=false', function () {
|
|
30
|
-
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
31
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the FormGroup with error=false 1`] = `
|
|
4
|
-
<ForwardRef(FormGroup)
|
|
5
|
-
error={false}
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
className="govgr-form-group"
|
|
9
|
-
>
|
|
10
|
-
hello
|
|
11
|
-
</div>
|
|
12
|
-
</ForwardRef(FormGroup)>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`renders the FormGroup with error=true 1`] = `
|
|
16
|
-
<ForwardRef(FormGroup)
|
|
17
|
-
error={true}
|
|
18
|
-
>
|
|
19
|
-
<div
|
|
20
|
-
className="govgr-form-group__error govgr-form-group"
|
|
21
|
-
>
|
|
22
|
-
hello
|
|
23
|
-
</div>
|
|
24
|
-
</ForwardRef(FormGroup)>
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports[`renders the FormGroup with no props 1`] = `
|
|
28
|
-
<ForwardRef(FormGroup)>
|
|
29
|
-
<div
|
|
30
|
-
className="govgr-form-group"
|
|
31
|
-
>
|
|
32
|
-
hello
|
|
33
|
-
</div>
|
|
34
|
-
</ForwardRef(FormGroup)>
|
|
35
|
-
`;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import FormGroup from '@digigov/react-core/FormGroup';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(FormGroup, null, "hello");
|
|
6
|
-
|
|
7
|
-
it('renders the FormGroup with no props', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
var _ref2 = /*#__PURE__*/React.createElement(FormGroup, {
|
|
12
|
-
error: true
|
|
13
|
-
}, "hello");
|
|
14
|
-
|
|
15
|
-
it('renders the FormGroup with error=true', function () {
|
|
16
|
-
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
var _ref3 = /*#__PURE__*/React.createElement(FormGroup, {
|
|
20
|
-
error: false
|
|
21
|
-
}, "hello");
|
|
22
|
-
|
|
23
|
-
it('renders the FormGroup with error=false', function () {
|
|
24
|
-
expect(mount(_ref3)).toMatchSnapshot();
|
|
25
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the FormGroup with error=false 1`] = `
|
|
4
|
-
<ForwardRef(FormGroup)
|
|
5
|
-
error={false}
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
className="govgr-form-group"
|
|
9
|
-
>
|
|
10
|
-
hello
|
|
11
|
-
</div>
|
|
12
|
-
</ForwardRef(FormGroup)>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`renders the FormGroup with error=true 1`] = `
|
|
16
|
-
<ForwardRef(FormGroup)
|
|
17
|
-
error={true}
|
|
18
|
-
>
|
|
19
|
-
<div
|
|
20
|
-
className="govgr-form-group__error govgr-form-group"
|
|
21
|
-
>
|
|
22
|
-
hello
|
|
23
|
-
</div>
|
|
24
|
-
</ForwardRef(FormGroup)>
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports[`renders the FormGroup with no props 1`] = `
|
|
28
|
-
<ForwardRef(FormGroup)>
|
|
29
|
-
<div
|
|
30
|
-
className="govgr-form-group"
|
|
31
|
-
>
|
|
32
|
-
hello
|
|
33
|
-
</div>
|
|
34
|
-
</ForwardRef(FormGroup)>
|
|
35
|
-
`;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import FormGroup from '@digigov/react-core/FormGroup';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(FormGroup, null, "hello");
|
|
6
|
-
|
|
7
|
-
it('renders the FormGroup with no props', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
var _ref2 = /*#__PURE__*/React.createElement(FormGroup, {
|
|
12
|
-
error: true
|
|
13
|
-
}, "hello");
|
|
14
|
-
|
|
15
|
-
it('renders the FormGroup with error=true', function () {
|
|
16
|
-
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
var _ref3 = /*#__PURE__*/React.createElement(FormGroup, {
|
|
20
|
-
error: false
|
|
21
|
-
}, "hello");
|
|
22
|
-
|
|
23
|
-
it('renders the FormGroup with error=false', function () {
|
|
24
|
-
expect(mount(_ref3)).toMatchSnapshot();
|
|
25
|
-
});
|