@swan-io/shared-business 11.4.1 → 11.4.3

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": "11.4.1",
3
+ "version": "11.4.3",
4
4
  "engines": {
5
5
  "node": "^22.12.0",
6
6
  "pnpm": "^10.2.0"
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "license": "MIT",
28
28
  "peerDependencies": {
29
- "@swan-io/lake": "11.4.1"
29
+ "@swan-io/lake": "11.4.3"
30
30
  },
31
31
  "dependencies": {
32
32
  "@formatjs/intl": "^3.1.4",
@@ -52,6 +52,6 @@
52
52
  "@types/react-native": "^0.72.8",
53
53
  "jsdom": "^26.0.0",
54
54
  "vitest": "^2.1.8",
55
- "@swan-io/lake": "11.4.1"
55
+ "@swan-io/lake": "11.4.3"
56
56
  }
57
57
  }
@@ -11,6 +11,7 @@ type Props = {
11
11
  isCompany: boolean;
12
12
  required?: boolean;
13
13
  label?: string;
14
+ placeholder?: string;
14
15
  };
15
16
  export declare const TaxIdentificationNumberInput: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<TextInput | null>>;
16
17
  export {};
@@ -7,11 +7,11 @@ import { colors } from "@swan-io/lake/src/constants/design";
7
7
  import { forwardRef } from "react";
8
8
  import { t } from "../utils/i18n";
9
9
  import { getCompanyTaxNumberHelp, getCompanyTaxNumberPlaceholder, getIndividualTaxNumberHelp, getIndividualTaxNumberPlaceholder, getTaxNumberTooltip, } from "../utils/templateTranslations";
10
- export const TaxIdentificationNumberInput = forwardRef(({ value, error, valid, disabled, onChange, onBlur, accountCountry, isCompany, required, label = t("taxIdentificationNumber.label"), }, ref) => {
10
+ export const TaxIdentificationNumberInput = forwardRef(({ value, error, valid, disabled, onChange, onBlur, accountCountry, isCompany, required, label = t("taxIdentificationNumber.label"), placeholder = isCompany
11
+ ? getCompanyTaxNumberPlaceholder(accountCountry)
12
+ : getIndividualTaxNumberPlaceholder(accountCountry), }, ref) => {
11
13
  const tooltipContents = getTaxNumberTooltip(accountCountry);
12
- return (_jsx(LakeLabel, { label: label, optionalLabel: required === true ? undefined : t("common.optional"), help: tooltipContents != null ? (_jsx(LakeTooltip, { content: tooltipContents, placement: "right", 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
13
- ? getCompanyTaxNumberPlaceholder(accountCountry)
14
- : getIndividualTaxNumberPlaceholder(accountCountry), help: isCompany
14
+ return (_jsx(LakeLabel, { label: label, optionalLabel: required === true ? undefined : t("common.optional"), help: tooltipContents != null ? (_jsx(LakeTooltip, { content: tooltipContents, placement: "right", 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: placeholder, help: isCompany
15
15
  ? getCompanyTaxNumberHelp(accountCountry)
16
16
  : getIndividualTaxNumberHelp(accountCountry), value: value, error: error, valid: valid, disabled: disabled, onChangeText: onChange, onBlur: onBlur })) }));
17
17
  });