@digigov/form 1.0.0-480e3d97 → 1.0.0-55e4210c

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.
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- import { PageTitleHeadingProps } from '@digigov/ui/app/PageTitleContainer';
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<PageTitleHeadingProps>;
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(_PageTitleContainer.PageTitleHeading, null, props.children);
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(_PageTitleContainer.PageTitleCaption, null, caption && t(caption)), step && /*#__PURE__*/_react["default"].createElement(_PageTitleContainer.PageTitleCaption, null, step), /*#__PURE__*/_react["default"].createElement(StepTitleHeading, null, title && t(title)))));
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
@@ -1,10 +1,12 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { StepContext } from '@digigov/form/Questions/Step/StepContext';
3
- import PageTitleContainer, { PageTitleHeading, PageTitleCaption } from '@digigov/ui/app/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(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('button.back')), /*#__PURE__*/React.createElement(PageTitleContainer, null, children || /*#__PURE__*/React.createElement(React.Fragment, 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
@@ -1,10 +1,12 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { StepContext } from '@digigov/form/Questions/Step/StepContext';
3
- import PageTitleContainer, { PageTitleHeading, PageTitleCaption } from '@digigov/ui/app/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(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('button.back')), /*#__PURE__*/React.createElement(PageTitleContainer, null, children || /*#__PURE__*/React.createElement(React.Fragment, 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
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v1.0.0-480e3d97
1
+ /** @license Digigov v1.0.0-55e4210c
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/form",
3
- "version": "1.0.0-480e3d97",
3
+ "version": "1.0.0-55e4210c",
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-480e3d97"
20
+ "@digigov/react-icons": "1.0.0-55e4210c"
21
21
  },
22
22
  "peerDependencies": {
23
- "@digigov/ui": "1.0.0-480e3d97",
24
- "@digigov/react-core": "1.0.0-480e3d97",
23
+ "@digigov/ui": "1.0.0-55e4210c",
24
+ "@digigov/react-core": "1.0.0-55e4210c",
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<PageTitleHeadingProps> = (props) => {
19
- return <PageTitleHeading>{props.children}</PageTitleHeading>;
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
- <PageTitleCaption>{caption && t(caption)}</PageTitleCaption>
36
+ <HeadingCaption size="xl">{caption && t(caption)}</HeadingCaption>
37
37
  {step && <PageTitleCaption>{step}</PageTitleCaption>}
38
38
  <StepTitleHeading>{title && t(title)}</StepTitleHeading>
39
39
  </>