@digigov/form 1.0.0-480e3d97 → 1.0.0-758a1807
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/Questions/Step/StepTitle.d.ts +2 -2
- package/Questions/Step/StepTitle.js +8 -2
- package/Questions/Step/index.d.ts +4 -4
- package/Questions/Step/index.js +53 -36
- package/es/Questions/Step/StepTitle.js +7 -3
- package/es/Questions/Step/index.js +4 -4
- package/esm/Questions/Step/StepTitle.js +7 -3
- package/esm/Questions/Step/index.js +4 -4
- package/esm/index.js +1 -1
- package/package.json +4 -4
- package/src/Questions/Step/StepTitle.tsx +5 -5
- package/src/Questions/Step/index.ts +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { HeadingProps } from '@digigov/react-core/Heading';
|
|
3
3
|
export interface StepTitleInterface {
|
|
4
4
|
title?: string;
|
|
5
5
|
backButton?: string;
|
|
6
6
|
caption?: string;
|
|
7
7
|
step?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const StepTitleHeading: React.FC<
|
|
9
|
+
export declare const StepTitleHeading: React.FC<HeadingProps>;
|
|
10
10
|
export declare const StepTitleBase: React.FC<StepTitleInterface>;
|
|
11
11
|
/**
|
|
12
12
|
* The StepTitle component accepts a title, a caption and a step indicator
|
|
@@ -19,12 +19,16 @@ var _BackButton = _interopRequireDefault(require("@digigov/ui/form/Button/BackBu
|
|
|
19
19
|
|
|
20
20
|
var _i18n = require("@digigov/ui/i18n");
|
|
21
21
|
|
|
22
|
+
var _HeadingCaption = _interopRequireDefault(require("@digigov/react-core/HeadingCaption"));
|
|
23
|
+
|
|
24
|
+
var _Heading = _interopRequireDefault(require("@digigov/react-core/Heading"));
|
|
25
|
+
|
|
22
26
|
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
27
|
|
|
24
28
|
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; }
|
|
25
29
|
|
|
26
30
|
var StepTitleHeading = function StepTitleHeading(props) {
|
|
27
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(_Heading["default"], null, props.children);
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
exports.StepTitleHeading = StepTitleHeading;
|
|
@@ -39,7 +43,9 @@ var StepTitleBase = function StepTitleBase(_ref) {
|
|
|
39
43
|
var _useTranslation = (0, _i18n.useTranslation)(),
|
|
40
44
|
t = _useTranslation.t;
|
|
41
45
|
|
|
42
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_BackButton["default"], null, backButton || t('button.back')), /*#__PURE__*/_react["default"].createElement(_PageTitleContainer["default"], null, children || /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(
|
|
46
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_BackButton["default"], null, backButton || t('button.back')), /*#__PURE__*/_react["default"].createElement(_PageTitleContainer["default"], null, children || /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_HeadingCaption["default"], {
|
|
47
|
+
size: "xl"
|
|
48
|
+
}, caption && t(caption)), step && /*#__PURE__*/_react["default"].createElement(_PageTitleContainer.PageTitleCaption, null, step), /*#__PURE__*/_react["default"].createElement(StepTitleHeading, null, title && t(title)))));
|
|
43
49
|
};
|
|
44
50
|
/**
|
|
45
51
|
* 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';
|
package/Questions/Step/index.js
CHANGED
|
@@ -1,42 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
4
|
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
var _exportNames = {
|
|
11
|
-
StepDescription: true,
|
|
12
|
-
StepForm: true,
|
|
13
|
-
StepQuote: true,
|
|
14
|
-
StepTitle: true
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "StepDescription", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function get() {
|
|
19
|
-
return _StepDescription["default"];
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(exports, "StepForm", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return _StepForm["default"];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(exports, "StepQuote", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function get() {
|
|
31
|
-
return _StepQuote["default"];
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
Object.defineProperty(exports, "StepTitle", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function get() {
|
|
37
|
-
return _StepTitle["default"];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
8
|
+
var _exportNames = {};
|
|
40
9
|
exports["default"] = void 0;
|
|
41
10
|
|
|
42
11
|
var _ReviewStep = require("@digigov/form/Questions/Step/ReviewStep");
|
|
@@ -95,13 +64,61 @@ Object.keys(_StepContext).forEach(function (key) {
|
|
|
95
64
|
});
|
|
96
65
|
});
|
|
97
66
|
|
|
98
|
-
var _StepDescription =
|
|
67
|
+
var _StepDescription = require("@digigov/form/Questions/Step/StepDescription");
|
|
99
68
|
|
|
100
|
-
|
|
69
|
+
Object.keys(_StepDescription).forEach(function (key) {
|
|
70
|
+
if (key === "default" || key === "__esModule") return;
|
|
71
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
72
|
+
if (key in exports && exports[key] === _StepDescription[key]) return;
|
|
73
|
+
Object.defineProperty(exports, key, {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function get() {
|
|
76
|
+
return _StepDescription[key];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
101
80
|
|
|
102
|
-
var
|
|
81
|
+
var _StepForm = require("@digigov/form/Questions/Step/StepForm");
|
|
103
82
|
|
|
104
|
-
|
|
83
|
+
Object.keys(_StepForm).forEach(function (key) {
|
|
84
|
+
if (key === "default" || key === "__esModule") return;
|
|
85
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
86
|
+
if (key in exports && exports[key] === _StepForm[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function get() {
|
|
90
|
+
return _StepForm[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var _StepQuote = require("@digigov/form/Questions/Step/StepQuote");
|
|
96
|
+
|
|
97
|
+
Object.keys(_StepQuote).forEach(function (key) {
|
|
98
|
+
if (key === "default" || key === "__esModule") return;
|
|
99
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
100
|
+
if (key in exports && exports[key] === _StepQuote[key]) return;
|
|
101
|
+
Object.defineProperty(exports, key, {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function get() {
|
|
104
|
+
return _StepQuote[key];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
var _StepTitle = require("@digigov/form/Questions/Step/StepTitle");
|
|
110
|
+
|
|
111
|
+
Object.keys(_StepTitle).forEach(function (key) {
|
|
112
|
+
if (key === "default" || key === "__esModule") return;
|
|
113
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
114
|
+
if (key in exports && exports[key] === _StepTitle[key]) return;
|
|
115
|
+
Object.defineProperty(exports, key, {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function get() {
|
|
118
|
+
return _StepTitle[key];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
105
122
|
|
|
106
123
|
var _getAddMoreFields = require("@digigov/form/Questions/Step/getAddMoreFields");
|
|
107
124
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { StepContext } from '@digigov/form/Questions/Step/StepContext';
|
|
3
|
-
import PageTitleContainer, {
|
|
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('button.back')), /*#__PURE__*/React.createElement(PageTitleContainer, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
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';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { StepContext } from '@digigov/form/Questions/Step/StepContext';
|
|
3
|
-
import PageTitleContainer, {
|
|
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('button.back')), /*#__PURE__*/React.createElement(PageTitleContainer, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
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';
|
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-758a1807",
|
|
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-758a1807"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@digigov/ui": "1.0.0-
|
|
24
|
-
"@digigov/react-core": "1.0.0-
|
|
23
|
+
"@digigov/ui": "1.0.0-758a1807",
|
|
24
|
+
"@digigov/react-core": "1.0.0-758a1807",
|
|
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"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { StepContext } from '@digigov/form/Questions/Step/StepContext';
|
|
3
3
|
import PageTitleContainer, {
|
|
4
|
-
PageTitleHeading,
|
|
5
|
-
PageTitleHeadingProps,
|
|
6
4
|
PageTitleCaption,
|
|
7
5
|
} from '@digigov/ui/app/PageTitleContainer';
|
|
8
6
|
import BackButton from '@digigov/ui/form/Button/BackButton';
|
|
9
7
|
import { useTranslation } from '@digigov/ui/i18n';
|
|
8
|
+
import HeadingCaption from '@digigov/react-core/HeadingCaption';
|
|
9
|
+
import Heading, { HeadingProps } from '@digigov/react-core/Heading';
|
|
10
10
|
|
|
11
11
|
export interface StepTitleInterface {
|
|
12
12
|
title?: string;
|
|
@@ -15,8 +15,8 @@ export interface StepTitleInterface {
|
|
|
15
15
|
step?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export const StepTitleHeading: React.FC<
|
|
19
|
-
return <
|
|
18
|
+
export const StepTitleHeading: React.FC<HeadingProps> = (props) => {
|
|
19
|
+
return <Heading>{props.children}</Heading>;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const StepTitleBase: React.FC<StepTitleInterface> = ({
|
|
@@ -33,7 +33,7 @@ export const StepTitleBase: React.FC<StepTitleInterface> = ({
|
|
|
33
33
|
<PageTitleContainer>
|
|
34
34
|
{children || (
|
|
35
35
|
<>
|
|
36
|
-
<
|
|
36
|
+
<HeadingCaption size="xl">{caption && t(caption)}</HeadingCaption>
|
|
37
37
|
{step && <PageTitleCaption>{step}</PageTitleCaption>}
|
|
38
38
|
<StepTitleHeading>{title && t(title)}</StepTitleHeading>
|
|
39
39
|
</>
|
|
@@ -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';
|