@trackunit/react-form-components 0.0.262 → 0.0.263

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/index.cjs.js CHANGED
@@ -695,7 +695,7 @@ const EmailInput = React__namespace.forwardRef((_a, ref) => {
695
695
  return window.open(`mailto:${email}`);
696
696
  };
697
697
  const renderAsInvalid = (email && !validateEmailAddress(email)) || isInvalid;
698
- return (jsxRuntime.jsx(BaseInput, Object.assign({ dataTestId: dataTestId, ref: ref, type: "email", placeholder: rest.placeholder || "mail@example.com", onChange: e => setEmail(e.target.value), isInvalid: renderAsInvalid }, rest, { actions: jsxRuntime.jsx(ActionButton, { disabled: disabled, value: email, type: "EMAIL", onClick: sendEmail, dataTestId: dataTestId && `${dataTestId}-emailIcon`, iconSize: fieldSize }) })));
698
+ return (jsxRuntime.jsx(BaseInput, Object.assign({ dataTestId: dataTestId, ref: ref, type: "email", placeholder: rest.placeholder || "mail@example.com", onChange: e => setEmail(e.target.value), isInvalid: renderAsInvalid, actions: jsxRuntime.jsx(ActionButton, { disabled: disabled, value: email, type: "EMAIL", onClick: sendEmail, dataTestId: dataTestId && `${dataTestId}-emailIcon`, iconSize: fieldSize }) }, rest)));
699
699
  });
700
700
 
701
701
  /**
package/index.esm.js CHANGED
@@ -665,7 +665,7 @@ const EmailInput = React.forwardRef((_a, ref) => {
665
665
  return window.open(`mailto:${email}`);
666
666
  };
667
667
  const renderAsInvalid = (email && !validateEmailAddress(email)) || isInvalid;
668
- return (jsx(BaseInput, Object.assign({ dataTestId: dataTestId, ref: ref, type: "email", placeholder: rest.placeholder || "mail@example.com", onChange: e => setEmail(e.target.value), isInvalid: renderAsInvalid }, rest, { actions: jsx(ActionButton, { disabled: disabled, value: email, type: "EMAIL", onClick: sendEmail, dataTestId: dataTestId && `${dataTestId}-emailIcon`, iconSize: fieldSize }) })));
668
+ return (jsx(BaseInput, Object.assign({ dataTestId: dataTestId, ref: ref, type: "email", placeholder: rest.placeholder || "mail@example.com", onChange: e => setEmail(e.target.value), isInvalid: renderAsInvalid, actions: jsx(ActionButton, { disabled: disabled, value: email, type: "EMAIL", onClick: sendEmail, dataTestId: dataTestId && `${dataTestId}-emailIcon`, iconSize: fieldSize }) }, rest)));
669
669
  });
670
670
 
671
671
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-components",
3
- "version": "0.0.262",
3
+ "version": "0.0.263",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -42,6 +42,11 @@ export interface PhoneInputProps extends BaseInputExposedProps {
42
42
  */
43
43
  onChangeValue?: ({ phone, national, countryCode }: PhoneNumberValue) => void;
44
44
  isCountryCodeClearable?: boolean;
45
+ /**
46
+ * A ReactNode to render at the end of the input field before the addonAfter.
47
+ * Mainly meant for the icon button actions for special input types.
48
+ */
49
+ actions?: React.ReactNode;
45
50
  }
46
51
  /**
47
52
  * A component for inputting phone numbers with an optional action button for initiating a phone call.