@digigov/form 1.0.0-002c630d → 1.0.0-6b93ebf2
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 +7 -8
- package/Questions/Step/StepTitle.js +3 -1
- package/Questions/__snapshots__/index.spec.tsx.snap +4 -4
- package/es/FormBuilder/FormBuilder.mdx +7 -8
- package/es/Questions/Step/StepArrayReview.js +2 -2
- package/es/Questions/Step/StepTitle.js +3 -2
- package/es/Questions/__snapshots__/index.spec.tsx.snap +4 -4
- package/es/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
- package/es/inputs/Radio/__stories__/WithDivider.js +1 -1
- package/esm/FormBuilder/FormBuilder.mdx +7 -8
- package/esm/Questions/Step/StepArrayReview.js +2 -2
- package/esm/Questions/Step/StepTitle.js +3 -2
- package/esm/Questions/__snapshots__/index.spec.tsx.snap +4 -4
- package/esm/index.js +1 -1
- package/esm/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
- package/esm/inputs/Radio/__stories__/WithDivider.js +1 -1
- package/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
- package/inputs/Radio/__stories__/WithDivider.js +1 -1
- package/package.json +4 -4
- package/src/FormBuilder/FormBuilder.mdx +7 -8
- package/src/Questions/Step/StepArrayReview.tsx +3 -3
- package/src/Questions/Step/StepTitle.tsx +8 -9
- package/src/Questions/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/inputs/Checkboxes/__stories__/WithDivider.tsx +1 -1
- package/src/inputs/Radio/__stories__/WithDivider.tsx +1 -1
|
@@ -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,
|
|
100
|
-
PageTitleCaption,
|
|
98
|
+
import Section, {
|
|
101
99
|
PageTitleHeading,
|
|
102
100
|
} from '@digigov/ui/app/PageTitle';
|
|
101
|
+
import { HeadingCaption } from '@digigov/ui/typography/HeadingCaption';
|
|
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,12 @@ export default function Index() {
|
|
|
228
227
|
<Content>
|
|
229
228
|
<Main className={styles.main}>
|
|
230
229
|
<BackButton>{t('button.back')}</BackButton>
|
|
231
|
-
<
|
|
232
|
-
<
|
|
233
|
-
<
|
|
234
|
-
</
|
|
230
|
+
<Section>
|
|
231
|
+
<Section>
|
|
232
|
+
<HeadingCaption>Before we start</HeadingCaption>
|
|
233
|
+
</Section>
|
|
235
234
|
<PageTitleHeading>Submit a form</PageTitleHeading>
|
|
236
|
-
</
|
|
235
|
+
</Section>
|
|
237
236
|
<FormBuilder
|
|
238
237
|
fields={FIELDS}
|
|
239
238
|
onSubmit={setData}
|
|
@@ -19,6 +19,8 @@ var _BackButton = _interopRequireDefault(require("@digigov/ui/form/Button/BackBu
|
|
|
19
19
|
|
|
20
20
|
var _i18n = require("@digigov/ui/i18n");
|
|
21
21
|
|
|
22
|
+
var _HeadingCaption = require("@digigov/ui/typography/HeadingCaption");
|
|
23
|
+
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
25
|
|
|
24
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -39,7 +41,7 @@ var StepTitleBase = function StepTitleBase(_ref) {
|
|
|
39
41
|
var _useTranslation = (0, _i18n.useTranslation)(),
|
|
40
42
|
t = _useTranslation.t;
|
|
41
43
|
|
|
42
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_BackButton["default"], null, backButton || t('back.button')), /*#__PURE__*/_react["default"].createElement(_PageTitle["default"], null, children || /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_PageTitle
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_BackButton["default"], null, backButton || t('back.button')), /*#__PURE__*/_react["default"].createElement(_PageTitle["default"], null, children || /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_PageTitle["default"], null, /*#__PURE__*/_react["default"].createElement(_HeadingCaption.HeadingCaption, null, caption && t(caption)), step && /*#__PURE__*/_react["default"].createElement(_HeadingCaption.HeadingCaption, null, step)), /*#__PURE__*/_react["default"].createElement(StepTitleHeading, null, title && t(title)))));
|
|
43
45
|
};
|
|
44
46
|
/**
|
|
45
47
|
* The StepTitle component accepts a title, a caption and a step indicator
|
|
@@ -102,7 +102,7 @@ exports[`renders the Questions 1`] = `
|
|
|
102
102
|
<div
|
|
103
103
|
className=""
|
|
104
104
|
>
|
|
105
|
-
<ForwardRef(
|
|
105
|
+
<ForwardRef(PageTitle)>
|
|
106
106
|
<ForwardRef(Base)
|
|
107
107
|
as="div"
|
|
108
108
|
className=""
|
|
@@ -110,7 +110,7 @@ exports[`renders the Questions 1`] = `
|
|
|
110
110
|
<div
|
|
111
111
|
className=""
|
|
112
112
|
>
|
|
113
|
-
<ForwardRef(
|
|
113
|
+
<ForwardRef(HeadingCaption)>
|
|
114
114
|
<ForwardRef(Base)
|
|
115
115
|
as="span"
|
|
116
116
|
className="govgr-caption-lg"
|
|
@@ -121,10 +121,10 @@ exports[`renders the Questions 1`] = `
|
|
|
121
121
|
intro.caption
|
|
122
122
|
</span>
|
|
123
123
|
</ForwardRef(Base)>
|
|
124
|
-
</ForwardRef(
|
|
124
|
+
</ForwardRef(HeadingCaption)>
|
|
125
125
|
</div>
|
|
126
126
|
</ForwardRef(Base)>
|
|
127
|
-
</ForwardRef(
|
|
127
|
+
</ForwardRef(PageTitle)>
|
|
128
128
|
<StepTitleHeading>
|
|
129
129
|
<ForwardRef(PageTitleHeading)>
|
|
130
130
|
<ForwardRef(Base)
|
|
@@ -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,
|
|
100
|
-
PageTitleCaption,
|
|
98
|
+
import Section, {
|
|
101
99
|
PageTitleHeading,
|
|
102
100
|
} from '@digigov/ui/app/PageTitle';
|
|
101
|
+
import { HeadingCaption } from '@digigov/ui/typography/HeadingCaption';
|
|
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,12 @@ export default function Index() {
|
|
|
228
227
|
<Content>
|
|
229
228
|
<Main className={styles.main}>
|
|
230
229
|
<BackButton>{t('button.back')}</BackButton>
|
|
231
|
-
<
|
|
232
|
-
<
|
|
233
|
-
<
|
|
234
|
-
</
|
|
230
|
+
<Section>
|
|
231
|
+
<Section>
|
|
232
|
+
<HeadingCaption>Before we start</HeadingCaption>
|
|
233
|
+
</Section>
|
|
235
234
|
<PageTitleHeading>Submit a form</PageTitleHeading>
|
|
236
|
-
</
|
|
235
|
+
</Section>
|
|
237
236
|
<FormBuilder
|
|
238
237
|
fields={FIELDS}
|
|
239
238
|
onSubmit={setData}
|
|
@@ -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 Section, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
|
|
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(Section, 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,8 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { StepContext } from '@digigov/form/Questions/Step/StepContext';
|
|
3
|
-
import
|
|
3
|
+
import Section, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
|
|
4
4
|
import BackButton from '@digigov/ui/form/Button/BackButton';
|
|
5
5
|
import { useTranslation } from '@digigov/ui/i18n';
|
|
6
|
+
import { HeadingCaption } from '@digigov/ui/typography/HeadingCaption';
|
|
6
7
|
export var StepTitleHeading = function StepTitleHeading(props) {
|
|
7
8
|
return /*#__PURE__*/React.createElement(PageTitleHeading, null, props.children);
|
|
8
9
|
};
|
|
@@ -16,7 +17,7 @@ export var StepTitleBase = function StepTitleBase(_ref) {
|
|
|
16
17
|
var _useTranslation = useTranslation(),
|
|
17
18
|
t = _useTranslation.t;
|
|
18
19
|
|
|
19
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackButton, null, backButton || t('back.button')), /*#__PURE__*/React.createElement(
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackButton, null, backButton || t('back.button')), /*#__PURE__*/React.createElement(Section, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Section, null, /*#__PURE__*/React.createElement(HeadingCaption, null, caption && t(caption)), step && /*#__PURE__*/React.createElement(HeadingCaption, null, step)), /*#__PURE__*/React.createElement(StepTitleHeading, null, title && t(title)))));
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
23
|
* The StepTitle component accepts a title, a caption and a step indicator
|
|
@@ -102,7 +102,7 @@ exports[`renders the Questions 1`] = `
|
|
|
102
102
|
<div
|
|
103
103
|
className=""
|
|
104
104
|
>
|
|
105
|
-
<ForwardRef(
|
|
105
|
+
<ForwardRef(PageTitle)>
|
|
106
106
|
<ForwardRef(Base)
|
|
107
107
|
as="div"
|
|
108
108
|
className=""
|
|
@@ -110,7 +110,7 @@ exports[`renders the Questions 1`] = `
|
|
|
110
110
|
<div
|
|
111
111
|
className=""
|
|
112
112
|
>
|
|
113
|
-
<ForwardRef(
|
|
113
|
+
<ForwardRef(HeadingCaption)>
|
|
114
114
|
<ForwardRef(Base)
|
|
115
115
|
as="span"
|
|
116
116
|
className="govgr-caption-lg"
|
|
@@ -121,10 +121,10 @@ exports[`renders the Questions 1`] = `
|
|
|
121
121
|
intro.caption
|
|
122
122
|
</span>
|
|
123
123
|
</ForwardRef(Base)>
|
|
124
|
-
</ForwardRef(
|
|
124
|
+
</ForwardRef(HeadingCaption)>
|
|
125
125
|
</div>
|
|
126
126
|
</ForwardRef(Base)>
|
|
127
|
-
</ForwardRef(
|
|
127
|
+
</ForwardRef(PageTitle)>
|
|
128
128
|
<StepTitleHeading>
|
|
129
129
|
<ForwardRef(PageTitleHeading)>
|
|
130
130
|
<ForwardRef(Base)
|
|
@@ -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,
|
|
100
|
-
PageTitleCaption,
|
|
98
|
+
import Section, {
|
|
101
99
|
PageTitleHeading,
|
|
102
100
|
} from '@digigov/ui/app/PageTitle';
|
|
101
|
+
import { HeadingCaption } from '@digigov/ui/typography/HeadingCaption';
|
|
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,12 @@ export default function Index() {
|
|
|
228
227
|
<Content>
|
|
229
228
|
<Main className={styles.main}>
|
|
230
229
|
<BackButton>{t('button.back')}</BackButton>
|
|
231
|
-
<
|
|
232
|
-
<
|
|
233
|
-
<
|
|
234
|
-
</
|
|
230
|
+
<Section>
|
|
231
|
+
<Section>
|
|
232
|
+
<HeadingCaption>Before we start</HeadingCaption>
|
|
233
|
+
</Section>
|
|
235
234
|
<PageTitleHeading>Submit a form</PageTitleHeading>
|
|
236
|
-
</
|
|
235
|
+
</Section>
|
|
237
236
|
<FormBuilder
|
|
238
237
|
fields={FIELDS}
|
|
239
238
|
onSubmit={setData}
|
|
@@ -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 Section, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
|
|
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(Section, 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,8 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { StepContext } from '@digigov/form/Questions/Step/StepContext';
|
|
3
|
-
import
|
|
3
|
+
import Section, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
|
|
4
4
|
import BackButton from '@digigov/ui/form/Button/BackButton';
|
|
5
5
|
import { useTranslation } from '@digigov/ui/i18n';
|
|
6
|
+
import { HeadingCaption } from '@digigov/ui/typography/HeadingCaption';
|
|
6
7
|
export var StepTitleHeading = function StepTitleHeading(props) {
|
|
7
8
|
return /*#__PURE__*/React.createElement(PageTitleHeading, null, props.children);
|
|
8
9
|
};
|
|
@@ -16,7 +17,7 @@ export var StepTitleBase = function StepTitleBase(_ref) {
|
|
|
16
17
|
var _useTranslation = useTranslation(),
|
|
17
18
|
t = _useTranslation.t;
|
|
18
19
|
|
|
19
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackButton, null, backButton || t('back.button')), /*#__PURE__*/React.createElement(
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackButton, null, backButton || t('back.button')), /*#__PURE__*/React.createElement(Section, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Section, null, /*#__PURE__*/React.createElement(HeadingCaption, null, caption && t(caption)), step && /*#__PURE__*/React.createElement(HeadingCaption, null, step)), /*#__PURE__*/React.createElement(StepTitleHeading, null, title && t(title)))));
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
23
|
* The StepTitle component accepts a title, a caption and a step indicator
|
|
@@ -102,7 +102,7 @@ exports[`renders the Questions 1`] = `
|
|
|
102
102
|
<div
|
|
103
103
|
className=""
|
|
104
104
|
>
|
|
105
|
-
<ForwardRef(
|
|
105
|
+
<ForwardRef(PageTitle)>
|
|
106
106
|
<ForwardRef(Base)
|
|
107
107
|
as="div"
|
|
108
108
|
className=""
|
|
@@ -110,7 +110,7 @@ exports[`renders the Questions 1`] = `
|
|
|
110
110
|
<div
|
|
111
111
|
className=""
|
|
112
112
|
>
|
|
113
|
-
<ForwardRef(
|
|
113
|
+
<ForwardRef(HeadingCaption)>
|
|
114
114
|
<ForwardRef(Base)
|
|
115
115
|
as="span"
|
|
116
116
|
className="govgr-caption-lg"
|
|
@@ -121,10 +121,10 @@ exports[`renders the Questions 1`] = `
|
|
|
121
121
|
intro.caption
|
|
122
122
|
</span>
|
|
123
123
|
</ForwardRef(Base)>
|
|
124
|
-
</ForwardRef(
|
|
124
|
+
</ForwardRef(HeadingCaption)>
|
|
125
125
|
</div>
|
|
126
126
|
</ForwardRef(Base)>
|
|
127
|
-
</ForwardRef(
|
|
127
|
+
</ForwardRef(PageTitle)>
|
|
128
128
|
<StepTitleHeading>
|
|
129
129
|
<ForwardRef(PageTitleHeading)>
|
|
130
130
|
<ForwardRef(Base)
|
package/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/form",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-6b93ebf2",
|
|
4
4
|
"description": "@digigov form builder",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"dayjs": "1.10.4",
|
|
18
18
|
"@hookform/resolvers": "2.9.6",
|
|
19
19
|
"publint": "0.1.8",
|
|
20
|
-
"@digigov/react-icons": "1.0.0-
|
|
20
|
+
"@digigov/react-icons": "1.0.0-6b93ebf2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@digigov/ui": "1.0.0-
|
|
24
|
-
"@digigov/react-core": "1.0.0-
|
|
23
|
+
"@digigov/ui": "1.0.0-6b93ebf2",
|
|
24
|
+
"@digigov/react-core": "1.0.0-6b93ebf2",
|
|
25
25
|
"clsx": "1.1.1",
|
|
26
26
|
"react": "^16.8.0 || ^17.0.0",
|
|
27
27
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
@@ -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,
|
|
100
|
-
PageTitleCaption,
|
|
98
|
+
import Section, {
|
|
101
99
|
PageTitleHeading,
|
|
102
100
|
} from '@digigov/ui/app/PageTitle';
|
|
101
|
+
import { HeadingCaption } from '@digigov/ui/typography/HeadingCaption';
|
|
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,12 @@ export default function Index() {
|
|
|
228
227
|
<Content>
|
|
229
228
|
<Main className={styles.main}>
|
|
230
229
|
<BackButton>{t('button.back')}</BackButton>
|
|
231
|
-
<
|
|
232
|
-
<
|
|
233
|
-
<
|
|
234
|
-
</
|
|
230
|
+
<Section>
|
|
231
|
+
<Section>
|
|
232
|
+
<HeadingCaption>Before we start</HeadingCaption>
|
|
233
|
+
</Section>
|
|
235
234
|
<PageTitleHeading>Submit a form</PageTitleHeading>
|
|
236
|
-
</
|
|
235
|
+
</Section>
|
|
237
236
|
<FormBuilder
|
|
238
237
|
fields={FIELDS}
|
|
239
238
|
onSubmit={setData}
|
|
@@ -7,7 +7,7 @@ import { QuestionsContext } from '@digigov/form/Questions/QuestionsContext';
|
|
|
7
7
|
import { getAddMoreFields } from '@digigov/form/Questions/Step/getAddMoreFields';
|
|
8
8
|
import { StepArrayReviewInterface } from '@digigov/form/Questions/Step/types';
|
|
9
9
|
import { FieldSpec } from '@digigov/form/types';
|
|
10
|
-
import
|
|
10
|
+
import Section, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
|
|
11
11
|
import {
|
|
12
12
|
SummaryList,
|
|
13
13
|
SummaryListItem,
|
|
@@ -28,11 +28,11 @@ export const StepArrayReview: React.FC<StepArrayReviewInterface> = (props) => {
|
|
|
28
28
|
) || {};
|
|
29
29
|
return (
|
|
30
30
|
<>
|
|
31
|
-
<
|
|
31
|
+
<Section>
|
|
32
32
|
<PageTitleHeading>
|
|
33
33
|
{currentStep.review?.title && t(currentStep.review?.title)}
|
|
34
34
|
</PageTitleHeading>
|
|
35
|
-
</
|
|
35
|
+
</Section>
|
|
36
36
|
<SummaryList>
|
|
37
37
|
{props.array.map(
|
|
38
38
|
(item: { [x: string]: React.ReactNode }, idx: number) => (
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { StepContext } from '@digigov/form/Questions/Step/StepContext';
|
|
3
|
-
import
|
|
3
|
+
import Section, {
|
|
4
4
|
PageTitleHeading,
|
|
5
5
|
PageTitleHeadingProps,
|
|
6
|
-
PageTitleSection,
|
|
7
|
-
PageTitleCaption,
|
|
8
6
|
} from '@digigov/ui/app/PageTitle';
|
|
9
7
|
import BackButton from '@digigov/ui/form/Button/BackButton';
|
|
10
8
|
import { useTranslation } from '@digigov/ui/i18n';
|
|
9
|
+
import { HeadingCaption } from '@digigov/ui/typography/HeadingCaption';
|
|
11
10
|
|
|
12
11
|
export interface StepTitleInterface {
|
|
13
12
|
title?: string;
|
|
@@ -31,17 +30,17 @@ export const StepTitleBase: React.FC<StepTitleInterface> = ({
|
|
|
31
30
|
return (
|
|
32
31
|
<>
|
|
33
32
|
<BackButton>{backButton || t('back.button')}</BackButton>
|
|
34
|
-
<
|
|
33
|
+
<Section>
|
|
35
34
|
{children || (
|
|
36
35
|
<>
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
{step && <
|
|
40
|
-
</
|
|
36
|
+
<Section>
|
|
37
|
+
<HeadingCaption>{caption && t(caption)}</HeadingCaption>
|
|
38
|
+
{step && <HeadingCaption>{step}</HeadingCaption>}
|
|
39
|
+
</Section>
|
|
41
40
|
<StepTitleHeading>{title && t(title)}</StepTitleHeading>
|
|
42
41
|
</>
|
|
43
42
|
)}
|
|
44
|
-
</
|
|
43
|
+
</Section>
|
|
45
44
|
</>
|
|
46
45
|
);
|
|
47
46
|
};
|
|
@@ -102,7 +102,7 @@ exports[`renders the Questions 1`] = `
|
|
|
102
102
|
<div
|
|
103
103
|
className=""
|
|
104
104
|
>
|
|
105
|
-
<ForwardRef(
|
|
105
|
+
<ForwardRef(PageTitle)>
|
|
106
106
|
<ForwardRef(Base)
|
|
107
107
|
as="div"
|
|
108
108
|
className=""
|
|
@@ -110,7 +110,7 @@ exports[`renders the Questions 1`] = `
|
|
|
110
110
|
<div
|
|
111
111
|
className=""
|
|
112
112
|
>
|
|
113
|
-
<ForwardRef(
|
|
113
|
+
<ForwardRef(HeadingCaption)>
|
|
114
114
|
<ForwardRef(Base)
|
|
115
115
|
as="span"
|
|
116
116
|
className="govgr-caption-lg"
|
|
@@ -121,10 +121,10 @@ exports[`renders the Questions 1`] = `
|
|
|
121
121
|
intro.caption
|
|
122
122
|
</span>
|
|
123
123
|
</ForwardRef(Base)>
|
|
124
|
-
</ForwardRef(
|
|
124
|
+
</ForwardRef(HeadingCaption)>
|
|
125
125
|
</div>
|
|
126
126
|
</ForwardRef(Base)>
|
|
127
|
-
</ForwardRef(
|
|
127
|
+
</ForwardRef(PageTitle)>
|
|
128
128
|
<StepTitleHeading>
|
|
129
129
|
<ForwardRef(PageTitleHeading)>
|
|
130
130
|
<ForwardRef(Base)
|