@trackunit/react-form-components 0.0.261 → 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/README.md +1 -1
- package/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/package.json +1 -1
- package/src/components/PhoneInput/PhoneInput.d.ts +5 -0
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ This library is exposed publicly for use in the the Trackunit [Iris App SDK](ht
|
|
|
9
9
|
|
|
10
10
|
To view other Trackunit public react components, visit this [repository](https://www.npmjs.com/package/@trackunit/react-components).
|
|
11
11
|
|
|
12
|
-
To browse all available components visit our [Public Storybook](https://
|
|
12
|
+
To browse all available components visit our [Public Storybook](https://apps.iris.trackunit.com/storybook/).
|
|
13
13
|
|
|
14
14
|
For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
|
|
15
15
|
|
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
|
|
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
|
|
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
|
@@ -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.
|