@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.
Files changed (66) hide show
  1. package/FormBuilder/FormBuilder.mdx +4 -7
  2. package/MultiplicityField/__stories__/PreviewDisplay.js +1 -1
  3. package/Questions/Step/StepArrayReview.js +2 -2
  4. package/Questions/Step/StepTitle.d.ts +2 -2
  5. package/Questions/Step/StepTitle.js +9 -3
  6. package/Questions/Step/index.d.ts +4 -4
  7. package/Questions/Step/index.js +53 -36
  8. package/Questions/__snapshots__/index.spec.tsx.snap +69 -356
  9. package/Questions/__stories__/Default.js +1 -1
  10. package/Questions/index.mdx +4 -4
  11. package/es/FormBuilder/FormBuilder.mdx +4 -7
  12. package/es/MultiplicityField/__stories__/PreviewDisplay.js +1 -1
  13. package/es/Questions/Step/StepArrayReview.js +2 -2
  14. package/es/Questions/Step/StepTitle.js +7 -3
  15. package/es/Questions/Step/index.js +4 -4
  16. package/es/Questions/__snapshots__/index.spec.tsx.snap +69 -356
  17. package/es/Questions/__stories__/Default.js +1 -1
  18. package/es/Questions/index.mdx +4 -4
  19. package/es/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
  20. package/es/inputs/DateInput/__stories__/Default.js +0 -18
  21. package/es/inputs/FileInput/index.js +1 -1
  22. package/es/inputs/OtpInput/index.js +5 -5
  23. package/es/inputs/Radio/__stories__/Default.js +1 -1
  24. package/es/inputs/Radio/__stories__/WithDivider.js +2 -2
  25. package/es/inputs/Select/__stories__/Default.js +1 -1
  26. package/esm/FormBuilder/FormBuilder.mdx +4 -7
  27. package/esm/MultiplicityField/__stories__/PreviewDisplay.js +1 -1
  28. package/esm/Questions/Step/StepArrayReview.js +2 -2
  29. package/esm/Questions/Step/StepTitle.js +7 -3
  30. package/esm/Questions/Step/index.js +4 -4
  31. package/esm/Questions/__snapshots__/index.spec.tsx.snap +69 -356
  32. package/esm/Questions/__stories__/Default.js +1 -1
  33. package/esm/Questions/index.mdx +4 -4
  34. package/esm/index.js +1 -1
  35. package/esm/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
  36. package/esm/inputs/DateInput/__stories__/Default.js +0 -18
  37. package/esm/inputs/FileInput/index.js +1 -1
  38. package/esm/inputs/OtpInput/index.js +5 -5
  39. package/esm/inputs/Radio/__stories__/Default.js +1 -1
  40. package/esm/inputs/Radio/__stories__/WithDivider.js +2 -2
  41. package/esm/inputs/Select/__stories__/Default.js +1 -1
  42. package/inputs/Checkboxes/__stories__/WithDivider.js +1 -1
  43. package/inputs/DateInput/__stories__/Default.js +0 -18
  44. package/inputs/FileInput/index.js +1 -1
  45. package/inputs/OtpInput/index.js +5 -5
  46. package/inputs/Radio/__stories__/Default.js +1 -1
  47. package/inputs/Radio/__stories__/WithDivider.js +2 -2
  48. package/inputs/Select/__stories__/Default.js +1 -1
  49. package/package.json +4 -4
  50. package/src/FormBuilder/FormBuilder.mdx +4 -7
  51. package/src/MultiplicityField/__stories__/PreviewDisplay.tsx +4 -4
  52. package/src/Questions/Step/StepArrayReview.tsx +3 -3
  53. package/src/Questions/Step/StepTitle.tsx +11 -14
  54. package/src/Questions/Step/index.ts +4 -4
  55. package/src/Questions/__snapshots__/index.spec.tsx.snap +69 -356
  56. package/src/Questions/__stories__/Default.tsx +4 -4
  57. package/src/Questions/index.mdx +4 -4
  58. package/src/inputs/Checkboxes/__stories__/WithDivider.tsx +1 -1
  59. package/src/inputs/DateInput/__stories__/Default.tsx +0 -16
  60. package/src/inputs/FileInput/index.tsx +1 -1
  61. package/src/inputs/OtpInput/index.tsx +8 -8
  62. package/src/inputs/Radio/__stories__/Default.tsx +1 -1
  63. package/src/inputs/Radio/__stories__/WithDivider.tsx +2 -2
  64. package/src/inputs/Select/__stories__/Default.tsx +1 -1
  65. package/src/types.tsx +1 -1
  66. 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
- divider: 'ή'
43
+ dividerText: 'ή'
44
44
  }]
45
45
  }
46
46
  }), _ref);
@@ -17,7 +17,7 @@ export var Default = function Default() {
17
17
  type: "choice:single",
18
18
  required: true,
19
19
  label: {
20
- primary: 'Ποια ειναι η χώρα της διαμονής σας;'
20
+ primary: 'Ποιά είναι η χώρα της διαμονής σας;'
21
21
  },
22
22
  extra: {
23
23
  component: 'Select',
@@ -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 PageTitle, {
99
- PageTitleSection,
98
+ import PageTitleContainer, {
100
99
  PageTitleCaption,
101
100
  PageTitleHeading,
102
- } from '@digigov/ui/app/PageTitle';
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
- <PageTitle>
232
- <PageTitleSection>
230
+ <PageTitleContainer>
233
231
  <PageTitleCaption>Before we start</PageTitleCaption>
234
- </PageTitleSection>
235
232
  <PageTitleHeading>Submit a form</PageTitleHeading>
236
- </PageTitle>
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(HeaderSection, null, /*#__PURE__*/React.createElement(HeaderContent, null, /*#__PURE__*/React.createElement(GovGRLogo, {
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 PageTitle, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
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(PageTitle, 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) {
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 PageTitle, { PageTitleHeading, PageTitleSection, PageTitleCaption } from '@digigov/ui/app/PageTitle';
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(PageTitleHeading, null, props.children);
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.button')), /*#__PURE__*/React.createElement(PageTitle, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PageTitleSection, null, /*#__PURE__*/React.createElement(PageTitleCaption, null, caption && t(caption)), step && /*#__PURE__*/React.createElement(PageTitleCaption, null, step)), /*#__PURE__*/React.createElement(StepTitleHeading, null, title && t(title)))));
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 { default as StepDescription } from '@digigov/form/Questions/Step/StepDescription';
6
- export { default as StepForm } from '@digigov/form/Questions/Step/StepForm';
7
- export { default as StepQuote } from '@digigov/form/Questions/Step/StepQuote';
8
- export { default as StepTitle } from '@digigov/form/Questions/Step/StepTitle';
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';