@digigov/form 1.0.0-002c630d → 1.0.0-00643e1d
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/FormBuilder/FormBuilder.mdx +4 -7
- package/MultiplicityField/__stories__/PreviewDisplay.js +1 -1
- package/Questions/Step/StepArrayReview.js +2 -2
- package/Questions/Step/StepTitle.d.ts +2 -2
- package/Questions/Step/StepTitle.js +9 -3
- package/Questions/Step/index.d.ts +4 -4
- package/Questions/Step/index.js +53 -36
- package/Questions/__snapshots__/index.spec.tsx.snap +69 -356
- package/Questions/__stories__/Default.js +1 -1
- package/Questions/index.mdx +4 -4
- package/es/FormBuilder/FormBuilder.mdx +4 -7
- package/es/MultiplicityField/__stories__/PreviewDisplay.js +1 -1
- package/es/Questions/Step/StepArrayReview.js +2 -2
- package/es/Questions/Step/StepTitle.js +7 -3
- package/es/Questions/Step/index.js +4 -4
- package/es/Questions/__snapshots__/index.spec.tsx.snap +69 -356
- package/es/Questions/__stories__/Default.js +1 -1
- package/es/Questions/index.mdx +4 -4
- package/es/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
- package/es/inputs/DateInput/__stories__/Default.js +0 -18
- package/es/inputs/FileInput/index.js +1 -1
- package/es/inputs/OtpInput/index.js +5 -5
- package/es/inputs/Radio/__stories__/Default.js +1 -1
- package/es/inputs/Radio/__stories__/WithDivider.js +2 -2
- package/es/inputs/Select/__stories__/Default.js +1 -1
- package/esm/FormBuilder/FormBuilder.mdx +4 -7
- package/esm/MultiplicityField/__stories__/PreviewDisplay.js +1 -1
- package/esm/Questions/Step/StepArrayReview.js +2 -2
- package/esm/Questions/Step/StepTitle.js +7 -3
- package/esm/Questions/Step/index.js +4 -4
- package/esm/Questions/__snapshots__/index.spec.tsx.snap +69 -356
- package/esm/Questions/__stories__/Default.js +1 -1
- package/esm/Questions/index.mdx +4 -4
- package/esm/index.js +1 -1
- package/esm/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
- package/esm/inputs/DateInput/__stories__/Default.js +0 -18
- package/esm/inputs/FileInput/index.js +1 -1
- package/esm/inputs/OtpInput/index.js +5 -5
- package/esm/inputs/Radio/__stories__/Default.js +1 -1
- package/esm/inputs/Radio/__stories__/WithDivider.js +2 -2
- package/esm/inputs/Select/__stories__/Default.js +1 -1
- package/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
- package/inputs/DateInput/__stories__/Default.js +0 -18
- package/inputs/FileInput/index.js +1 -1
- package/inputs/OtpInput/index.js +5 -5
- package/inputs/Radio/__stories__/Default.js +1 -1
- package/inputs/Radio/__stories__/WithDivider.js +2 -2
- package/inputs/Select/__stories__/Default.js +1 -1
- package/package.json +4 -4
- package/src/FormBuilder/FormBuilder.mdx +4 -7
- package/src/MultiplicityField/__stories__/PreviewDisplay.tsx +4 -4
- package/src/Questions/Step/StepArrayReview.tsx +3 -3
- package/src/Questions/Step/StepTitle.tsx +11 -14
- package/src/Questions/Step/index.ts +4 -4
- package/src/Questions/__snapshots__/index.spec.tsx.snap +69 -356
- package/src/Questions/__stories__/Default.tsx +4 -4
- package/src/Questions/index.mdx +4 -4
- package/src/inputs/Checkboxes/__stories__/WithDivider.tsx +1 -1
- package/src/inputs/DateInput/__stories__/Default.tsx +0 -16
- package/src/inputs/FileInput/index.tsx +1 -1
- package/src/inputs/OtpInput/index.tsx +8 -8
- package/src/inputs/Radio/__stories__/Default.tsx +1 -1
- package/src/inputs/Radio/__stories__/WithDivider.tsx +2 -2
- package/src/inputs/Select/__stories__/Default.tsx +1 -1
- package/src/types.tsx +1 -1
- package/types.d.ts +1 -1
|
@@ -17,7 +17,7 @@ export var WithDivider = function WithDivider() {
|
|
|
17
17
|
type: "choice:single",
|
|
18
18
|
required: true,
|
|
19
19
|
label: {
|
|
20
|
-
primary: '
|
|
20
|
+
primary: 'Ποιά είναι η χώρα της διαμονής σας;'
|
|
21
21
|
},
|
|
22
22
|
extra: {
|
|
23
23
|
options: [{
|
|
@@ -40,7 +40,7 @@ export var WithDivider = function WithDivider() {
|
|
|
40
40
|
primary: 'Ηνωμένες Πολιτείες της Αμερικής'
|
|
41
41
|
},
|
|
42
42
|
value: 'usa',
|
|
43
|
-
|
|
43
|
+
dividerText: 'ή'
|
|
44
44
|
}]
|
|
45
45
|
}
|
|
46
46
|
}), _ref);
|
|
@@ -95,11 +95,10 @@ import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
|
95
95
|
import GovGRLogo from '@digigov/ui/govgr/GovGRLogo';
|
|
96
96
|
import GovGRFooter from '@digigov/ui/govgr/Footer';
|
|
97
97
|
import Button from '@digigov/ui/form/Button';
|
|
98
|
-
import
|
|
99
|
-
PageTitleSection,
|
|
98
|
+
import PageTitleContainer, {
|
|
100
99
|
PageTitleCaption,
|
|
101
100
|
PageTitleHeading,
|
|
102
|
-
} from '@digigov/ui/app/
|
|
101
|
+
} from '@digigov/ui/app/PageTitleContainer';
|
|
103
102
|
import BackButton from '@digigov/ui/form/Button/BackButton';
|
|
104
103
|
import FormBuilder, { Fieldset, FieldsetLabel, Field } from '@digigov/form';
|
|
105
104
|
import { useTranslation } from '@digigov/ui/i18n';
|
|
@@ -228,12 +227,10 @@ export default function Index() {
|
|
|
228
227
|
<Content>
|
|
229
228
|
<Main className={styles.main}>
|
|
230
229
|
<BackButton>{t('button.back')}</BackButton>
|
|
231
|
-
<
|
|
232
|
-
<PageTitleSection>
|
|
230
|
+
<PageTitleContainer>
|
|
233
231
|
<PageTitleCaption>Before we start</PageTitleCaption>
|
|
234
|
-
</PageTitleSection>
|
|
235
232
|
<PageTitleHeading>Submit a form</PageTitleHeading>
|
|
236
|
-
</
|
|
233
|
+
</PageTitleContainer>
|
|
237
234
|
<FormBuilder
|
|
238
235
|
fields={FIELDS}
|
|
239
236
|
onSubmit={setData}
|
|
@@ -33,7 +33,7 @@ var fields = [{
|
|
|
33
33
|
value: 'ΚΑΡΤΑ'
|
|
34
34
|
}];
|
|
35
35
|
|
|
36
|
-
var _ref = /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(
|
|
36
|
+
var _ref = /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(HeaderContent, null, /*#__PURE__*/React.createElement(HeaderSection, null, /*#__PURE__*/React.createElement(GovGRLogo, {
|
|
37
37
|
href: "#"
|
|
38
38
|
}), /*#__PURE__*/React.createElement(HeaderTitle, null, "\u03A0\u03C1\u03CC\u03C4\u03C5\u03C0\u03BF-\u0391\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC\u03C2"))));
|
|
39
39
|
|
|
@@ -5,7 +5,7 @@ import FormBuilder from '@digigov/form/FormBuilder';
|
|
|
5
5
|
import Label from '@digigov/form/inputs/Label';
|
|
6
6
|
import { QuestionsContext } from '@digigov/form/Questions/QuestionsContext';
|
|
7
7
|
import { getAddMoreFields } from '@digigov/form/Questions/Step/getAddMoreFields';
|
|
8
|
-
import
|
|
8
|
+
import PageTitleContainer, { PageTitleHeading } from '@digigov/ui/app/PageTitleContainer';
|
|
9
9
|
import { SummaryList, SummaryListItem, SummaryListItemKey, SummaryListItemValue, SummaryListItemAction } from '@digigov/ui/content/SummaryList';
|
|
10
10
|
import Button from '@digigov/ui/form/Button';
|
|
11
11
|
import { useTranslation } from '@digigov/ui/i18n';
|
|
@@ -24,7 +24,7 @@ export var StepArrayReview = function StepArrayReview(props) {
|
|
|
24
24
|
|
|
25
25
|
return field.key === ((_currentStep$review = currentStep.review) === null || _currentStep$review === void 0 ? void 0 : _currentStep$review.primaryFieldKey);
|
|
26
26
|
}) || {};
|
|
27
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
27
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PageTitleContainer, null, /*#__PURE__*/React.createElement(PageTitleHeading, null, ((_currentStep$review2 = currentStep.review) === null || _currentStep$review2 === void 0 ? void 0 : _currentStep$review2.title) && t((_currentStep$review3 = currentStep.review) === null || _currentStep$review3 === void 0 ? void 0 : _currentStep$review3.title))), /*#__PURE__*/React.createElement(SummaryList, null, props.array.map(function (item, idx) {
|
|
28
28
|
return /*#__PURE__*/React.createElement(SummaryListItem, {
|
|
29
29
|
key: idx
|
|
30
30
|
}, /*#__PURE__*/React.createElement(SummaryListItemKey, null, t(primaryField.label.primary)), /*#__PURE__*/React.createElement(SummaryListItemValue, null, item[primaryField.key]), /*#__PURE__*/React.createElement(SummaryListItemAction, {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { StepContext } from '@digigov/form/Questions/Step/StepContext';
|
|
3
|
-
import
|
|
3
|
+
import PageTitleContainer, { PageTitleCaption } from '@digigov/ui/app/PageTitleContainer';
|
|
4
4
|
import BackButton from '@digigov/ui/form/Button/BackButton';
|
|
5
5
|
import { useTranslation } from '@digigov/ui/i18n';
|
|
6
|
+
import HeadingCaption from '@digigov/react-core/HeadingCaption';
|
|
7
|
+
import Heading from '@digigov/react-core/Heading';
|
|
6
8
|
export var StepTitleHeading = function StepTitleHeading(props) {
|
|
7
|
-
return /*#__PURE__*/React.createElement(
|
|
9
|
+
return /*#__PURE__*/React.createElement(Heading, null, props.children);
|
|
8
10
|
};
|
|
9
11
|
export var StepTitleBase = function StepTitleBase(_ref) {
|
|
10
12
|
var caption = _ref.caption,
|
|
@@ -16,7 +18,9 @@ export var StepTitleBase = function StepTitleBase(_ref) {
|
|
|
16
18
|
var _useTranslation = useTranslation(),
|
|
17
19
|
t = _useTranslation.t;
|
|
18
20
|
|
|
19
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackButton, null, backButton || t('back
|
|
21
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackButton, null, backButton || t('button.back')), /*#__PURE__*/React.createElement(PageTitleContainer, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeadingCaption, {
|
|
22
|
+
size: "xl"
|
|
23
|
+
}, caption && t(caption)), step && /*#__PURE__*/React.createElement(PageTitleCaption, null, step), /*#__PURE__*/React.createElement(StepTitleHeading, null, title && t(title)))));
|
|
20
24
|
};
|
|
21
25
|
/**
|
|
22
26
|
* The StepTitle component accepts a title, a caption and a step indicator
|
|
@@ -2,10 +2,10 @@ export * from '@digigov/form/Questions/Step/ReviewStep';
|
|
|
2
2
|
export * from '@digigov/form/Questions/Step/Step';
|
|
3
3
|
export * from '@digigov/form/Questions/Step/StepArrayReview';
|
|
4
4
|
export * from '@digigov/form/Questions/Step/StepContext';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
export * from '@digigov/form/Questions/Step/StepDescription';
|
|
6
|
+
export * from '@digigov/form/Questions/Step/StepForm';
|
|
7
|
+
export * from '@digigov/form/Questions/Step/StepQuote';
|
|
8
|
+
export * from '@digigov/form/Questions/Step/StepTitle';
|
|
9
9
|
export * from '@digigov/form/Questions/Step/getAddMoreFields';
|
|
10
10
|
export * from '@digigov/form/Questions/Step/';
|
|
11
11
|
export * from '@digigov/form/Questions/Step/types';
|