@festo-ui/react 8.2.0-dev.625 → 8.2.0-dev.627

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.
@@ -16,6 +16,7 @@ interface TextInputProps {
16
16
  hint?: string;
17
17
  error?: string;
18
18
  labelClassName?: string;
19
+ icon?: React.ReactNode;
19
20
  }
20
21
  declare const TextInput: (props: TextInputProps & React.HTMLProps<HTMLInputElement> & React.RefAttributes<HTMLLabelElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
21
22
  export default TextInput;
@@ -20,6 +20,7 @@ const TextInput = /*#__PURE__*/forwardRef((_ref, ref) => {
20
20
  hint,
21
21
  label,
22
22
  labelClassName,
23
+ icon,
23
24
  id: idProps,
24
25
  ...props
25
26
  } = _ref;
@@ -30,7 +31,9 @@ const TextInput = /*#__PURE__*/forwardRef((_ref, ref) => {
30
31
  }, [value]);
31
32
  const supported = ["text", "number", "password", "datetime-local"];
32
33
  const innerType = type && supported.indexOf(type) !== -1 ? type : "text";
33
- const labelClasses = classNames("fwe-input-text", labelClassName);
34
+ const labelClasses = classNames("fwe-input-text", {
35
+ "fwe-input-text-icon": icon
36
+ }, labelClassName);
34
37
  const hintClasses = classNames("fwe-input-text-info");
35
38
  function handleChange(e) {
36
39
  setInnerValue(e.target.value);
@@ -59,7 +62,7 @@ const TextInput = /*#__PURE__*/forwardRef((_ref, ref) => {
59
62
  value: innerValue,
60
63
  id: id,
61
64
  ...props
62
- }), /*#__PURE__*/_jsx("span", {
65
+ }), icon, /*#__PURE__*/_jsx("span", {
63
66
  className: "fwe-input-text-label",
64
67
  children: label
65
68
  }), hint && /*#__PURE__*/_jsx("span", {
@@ -29,6 +29,7 @@ const TextInput = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
29
29
  hint,
30
30
  label,
31
31
  labelClassName,
32
+ icon,
32
33
  id: idProps,
33
34
  ...props
34
35
  } = _ref;
@@ -39,7 +40,9 @@ const TextInput = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
39
40
  }, [value]);
40
41
  const supported = ["text", "number", "password", "datetime-local"];
41
42
  const innerType = type && supported.indexOf(type) !== -1 ? type : "text";
42
- const labelClasses = (0, _classnames.default)("fwe-input-text", labelClassName);
43
+ const labelClasses = (0, _classnames.default)("fwe-input-text", {
44
+ "fwe-input-text-icon": icon
45
+ }, labelClassName);
43
46
  const hintClasses = (0, _classnames.default)("fwe-input-text-info");
44
47
  function handleChange(e) {
45
48
  setInnerValue(e.target.value);
@@ -68,7 +71,7 @@ const TextInput = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
68
71
  value: innerValue,
69
72
  id: id,
70
73
  ...props
71
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
74
+ }), icon, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
72
75
  className: "fwe-input-text-label",
73
76
  children: label
74
77
  }), hint && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "8.2.0-dev.625",
3
+ "version": "8.2.0-dev.627",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "copyright": "Copyright (c) 2025 Festo SE & Co. KG. All rights reserved.",
6
6
  "license": "apache-2.0",