@swan-io/shared-business 2.7.23 → 2.7.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/shared-business",
3
- "version": "2.7.23",
3
+ "version": "2.7.24",
4
4
  "engines": {
5
5
  "node": ">=18.0.0",
6
6
  "yarn": "^1.22.0"
@@ -1,3 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { TextInput } from "react-native";
1
3
  import { AccountCountry } from "../utils/templateTranslations";
2
4
  type Props = {
3
5
  value: string;
@@ -11,5 +13,5 @@ type Props = {
11
13
  required?: boolean;
12
14
  label?: string;
13
15
  };
14
- export declare const TaxIdentificationNumberInput: ({ value, error, valid, disabled, onChange, onBlur, accountCountry, isCompany, required, label, }: Props) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const TaxIdentificationNumberInput: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<TextInput | null>>;
15
17
  export {};
@@ -4,13 +4,14 @@ import { LakeLabel } from "@swan-io/lake/src/components/LakeLabel";
4
4
  import { LakeTextInput } from "@swan-io/lake/src/components/LakeTextInput";
5
5
  import { LakeTooltip } from "@swan-io/lake/src/components/LakeTooltip";
6
6
  import { colors } from "@swan-io/lake/src/constants/design";
7
+ import { forwardRef } from "react";
7
8
  import { t } from "../utils/i18n";
8
9
  import { getCompanyTaxNumberHelp, getCompanyTaxNumberPlaceholder, getIndividualTaxNumberHelp, getIndividualTaxNumberPlaceholder, getTaxNumberTooltip, } from "../utils/templateTranslations";
9
- export const TaxIdentificationNumberInput = ({ value, error, valid, disabled, onChange, onBlur, accountCountry, isCompany, required, label = t("beneficiaryForm.beneficiary.taxIdentificationNumber"), }) => {
10
+ export const TaxIdentificationNumberInput = forwardRef(({ value, error, valid, disabled, onChange, onBlur, accountCountry, isCompany, required, label = t("beneficiaryForm.beneficiary.taxIdentificationNumber"), }, ref) => {
10
11
  const tooltipContents = getTaxNumberTooltip(accountCountry);
11
- return (_jsx(LakeLabel, { label: label, optionalLabel: required === true ? undefined : t("common.optional"), help: tooltipContents != null ? (_jsx(LakeTooltip, { content: tooltipContents, placement: "top", width: accountCountry === "DEU" ? 800 : undefined, children: _jsx(Icon, { name: "question-circle-regular", size: 16, color: colors.gray[600] }) })) : null, render: id => (_jsx(LakeTextInput, { id: id, placeholder: isCompany
12
+ return (_jsx(LakeLabel, { label: label, optionalLabel: required === true ? undefined : t("common.optional"), help: tooltipContents != null ? (_jsx(LakeTooltip, { content: tooltipContents, placement: "top", width: accountCountry === "DEU" ? 800 : undefined, children: _jsx(Icon, { name: "question-circle-regular", size: 16, color: colors.gray[600] }) })) : null, render: id => (_jsx(LakeTextInput, { id: id, ref: ref, placeholder: isCompany
12
13
  ? getCompanyTaxNumberPlaceholder(accountCountry)
13
14
  : getIndividualTaxNumberPlaceholder(accountCountry), help: isCompany
14
15
  ? getCompanyTaxNumberHelp(accountCountry)
15
16
  : getIndividualTaxNumberHelp(accountCountry), value: value, error: error, valid: valid, disabled: disabled, onChangeText: onChange, onBlur: onBlur })) }));
16
- };
17
+ });