@canonical/react-components 3.4.0 → 3.4.2

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.
@@ -24,7 +24,7 @@ export type Props = PropsWithSpread<{
24
24
  /**
25
25
  * Optional class(es) to pass to the help text element.
26
26
  */
27
- helpClassName?: ReactNode;
27
+ helpClassName?: string;
28
28
  /**
29
29
  * The id of the input.
30
30
  */
@@ -90,7 +90,7 @@ const Input = _ref => {
90
90
  error: error,
91
91
  forId: inputId,
92
92
  help: help,
93
- helpClassName: helpClassName + "",
93
+ helpClassName: helpClassName,
94
94
  helpId: helpId,
95
95
  isTickElement: type === "checkbox" || type === "radio",
96
96
  label: fieldLabel,
@@ -84,7 +84,8 @@ const Select = _ref2 => {
84
84
  className: (0, _classnames.default)("p-form-validation__input", className),
85
85
  id: selectId,
86
86
  onChange: evt => onChange && onChange(evt),
87
- ref: selectRef
87
+ ref: selectRef,
88
+ required: required
88
89
  }, selectProps), generateOptions(options)));
89
90
  };
90
91
  var _default = exports.default = Select;
@@ -108,7 +108,8 @@ const Textarea = _ref => {
108
108
  overflow: "hidden",
109
109
  boxSizing: "border-box",
110
110
  ...style
111
- } || style
111
+ } || style,
112
+ required: required
112
113
  }, props, {
113
114
  value: (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : innerValue
114
115
  })));
@@ -24,7 +24,7 @@ export type Props = PropsWithSpread<{
24
24
  /**
25
25
  * Optional class(es) to pass to the help text element.
26
26
  */
27
- helpClassName?: ReactNode;
27
+ helpClassName?: string;
28
28
  /**
29
29
  * The id of the input.
30
30
  */
@@ -89,7 +89,7 @@ var Input = _ref => {
89
89
  error: error,
90
90
  forId: inputId,
91
91
  help: help,
92
- helpClassName: helpClassName + "",
92
+ helpClassName: helpClassName,
93
93
  helpId: helpId,
94
94
  isTickElement: type === "checkbox" || type === "radio",
95
95
  label: fieldLabel,
@@ -80,7 +80,8 @@ var Select = _ref2 => {
80
80
  className: classNames("p-form-validation__input", className),
81
81
  id: selectId,
82
82
  onChange: evt => _onChange && _onChange(evt),
83
- ref: selectRef
83
+ ref: selectRef,
84
+ required: required
84
85
  }, selectProps), generateOptions(options)));
85
86
  };
86
87
  export default Select;
@@ -107,7 +107,8 @@ var Textarea = _ref => {
107
107
  resize: "none",
108
108
  overflow: "hidden",
109
109
  boxSizing: "border-box"
110
- }, style) || style
110
+ }, style) || style,
111
+ required: required
111
112
  }, props, {
112
113
  value: (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : innerValue
113
114
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": {