@rhc-shared-components/form-group-container 0.3.2 → 0.4.0

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/dist/index.js CHANGED
@@ -36,7 +36,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
36
36
  return target;
37
37
  }
38
38
 
39
- var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-c-form__helper-text--FontSize);\n margin-top: var(--pf-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-c-form--m-error--Color);\n}";
39
+ var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-v5-c-form__helper-text--FontSize);\n margin-top: var(--pf-v5-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-v5-c-form--m-error--Color);\n}";
40
40
 
41
41
  var _excluded = ["children", "helperTextInvalid", "isValid", "helperText", "labelIcon", "onClick"];
42
42
 
@@ -52,14 +52,14 @@ var FormGroupContainer = function FormGroupContainer(_ref) {
52
52
  InsertCss();
53
53
  return React__namespace.createElement(reactCore.FormGroup, Object.assign({
54
54
  className: 'form-group',
55
- helperTextInvalid: helperTextInvalid,
56
- helperText: helperText,
57
55
  validated: isValid ? reactCore.ValidatedOptions["default"] : reactCore.ValidatedOptions.error
58
56
  }, labelIcon && {
59
57
  labelIcon: labelIcon
60
58
  }, onClick && {
61
59
  onClick: onClick
62
- }, rest), children);
60
+ }, rest), children, React__namespace.createElement(reactCore.FormHelperText, null, React__namespace.createElement(reactCore.HelperText, null, React__namespace.createElement(reactCore.HelperTextItem, {
61
+ variant: isValid ? reactCore.ValidatedOptions["default"] : reactCore.ValidatedOptions.error
62
+ }, isValid ? helperText : helperTextInvalid))));
63
63
  };
64
64
 
65
65
  var InsertCss = function InsertCss() {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FormGroup, ValidatedOptions } from '@patternfly/react-core';
2
+ import { FormGroup, ValidatedOptions, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core';
3
3
 
4
4
  function _objectWithoutPropertiesLoose(source, excluded) {
5
5
  if (source == null) return {};
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
16
16
  return target;
17
17
  }
18
18
 
19
- var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-c-form__helper-text--FontSize);\n margin-top: var(--pf-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-c-form--m-error--Color);\n}";
19
+ var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-v5-c-form__helper-text--FontSize);\n margin-top: var(--pf-v5-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-v5-c-form--m-error--Color);\n}";
20
20
 
21
21
  const _excluded = ["children", "helperTextInvalid", "isValid", "helperText", "labelIcon", "onClick"];
22
22
 
@@ -34,14 +34,14 @@ const FormGroupContainer = _ref => {
34
34
  InsertCss();
35
35
  return React.createElement(FormGroup, Object.assign({
36
36
  className: 'form-group',
37
- helperTextInvalid: helperTextInvalid,
38
- helperText: helperText,
39
37
  validated: isValid ? ValidatedOptions.default : ValidatedOptions.error
40
38
  }, labelIcon && {
41
39
  labelIcon: labelIcon
42
40
  }, onClick && {
43
41
  onClick
44
- }, rest), children);
42
+ }, rest), children, React.createElement(FormHelperText, null, React.createElement(HelperText, null, React.createElement(HelperTextItem, {
43
+ variant: isValid ? ValidatedOptions.default : ValidatedOptions.error
44
+ }, isValid ? helperText : helperTextInvalid))));
45
45
  };
46
46
 
47
47
  const InsertCss = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhc-shared-components/form-group-container",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Form group container for Red Hat certified technology apps",
5
5
  "author": "gautamkrishnar",
6
6
  "license": "MIT",
@@ -65,7 +65,7 @@
65
65
  "dist"
66
66
  ],
67
67
  "dependencies": {
68
- "@patternfly/react-core": "^4.276.6",
68
+ "@patternfly/react-core": "^5.3.1",
69
69
  "formik": "^2.1.4",
70
70
  "react": "^16.13.1",
71
71
  "react-dom": "^16.13.1"