@taxbit/react-sdk 0.0.0

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.
Files changed (165) hide show
  1. package/README.md +20 -0
  2. package/dist/App.d.ts +5 -0
  3. package/dist/Component.d.ts +2 -0
  4. package/dist/components/Address/Address.d.ts +17 -0
  5. package/dist/components/Address/index.d.ts +1 -0
  6. package/dist/components/ErrorMessage/ErrorMessage.d.ts +6 -0
  7. package/dist/components/ErrorMessage/index.d.ts +1 -0
  8. package/dist/components/InputStatus/InputStatus.d.ts +5 -0
  9. package/dist/components/InputStatus/index.d.ts +1 -0
  10. package/dist/components/Page/Page.d.ts +6 -0
  11. package/dist/components/Page/index.d.ts +1 -0
  12. package/dist/components/Row/Row.d.ts +12 -0
  13. package/dist/components/Row/index.d.ts +1 -0
  14. package/dist/components/Section/Section.d.ts +8 -0
  15. package/dist/components/Section/index.d.ts +1 -0
  16. package/dist/components/Title/Title.d.ts +5 -0
  17. package/dist/components/Title/index.d.ts +1 -0
  18. package/dist/components/index.d.ts +7 -0
  19. package/dist/contexts/FormUI/FormUIProvider.d.ts +6 -0
  20. package/dist/contexts/FormUI/index.d.ts +3 -0
  21. package/dist/contexts/FormUI/useFormUI.d.ts +137 -0
  22. package/dist/contexts/FormUI/useFormUIContext.d.ts +650 -0
  23. package/dist/contexts/TaxDocumentation/TaxDocumentationPathProvider.d.ts +13 -0
  24. package/dist/contexts/TaxDocumentation/index.d.ts +2 -0
  25. package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +33 -0
  26. package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +44 -0
  27. package/dist/contexts/createCtx.d.ts +2 -0
  28. package/dist/contexts/index.d.ts +2 -0
  29. package/dist/entry/index.d.ts +2 -0
  30. package/dist/hooks/index.d.ts +1 -0
  31. package/dist/hooks/useTaxBit/index.d.ts +1 -0
  32. package/dist/hooks/useTaxBit/useTaxBit.d.ts +5 -0
  33. package/dist/i18n/i18n.d.ts +7 -0
  34. package/dist/i18n/index.d.ts +2 -0
  35. package/dist/i18n/locales/de-de.d.ts +2 -0
  36. package/dist/i18n/locales/en-gb.d.ts +2 -0
  37. package/dist/i18n/locales/en-us.d.ts +2 -0
  38. package/dist/i18n/locales/es-es.d.ts +2 -0
  39. package/dist/i18n/locales/fr-fr.d.ts +2 -0
  40. package/dist/i18n/locales/index.d.ts +9 -0
  41. package/dist/i18n/locales/it-it.d.ts +2 -0
  42. package/dist/i18n/locales/nl-nl.d.ts +2 -0
  43. package/dist/i18n/locales/no-no.d.ts +2 -0
  44. package/dist/i18n/locales/sv-se.d.ts +2 -0
  45. package/dist/i18n/types/LocalizationKey.d.ts +8 -0
  46. package/dist/i18n/types/PropertyFile.d.ts +39 -0
  47. package/dist/i18n/types/index.d.ts +1 -0
  48. package/dist/i18n/utils/getText.d.ts +16 -0
  49. package/dist/i18n/utils/index.d.ts +1 -0
  50. package/dist/index.css +12 -0
  51. package/dist/lookups/caProvinceOptions.d.ts +4 -0
  52. package/dist/lookups/countryOptions.d.ts +7 -0
  53. package/dist/lookups/fatcaCodeOptions.d.ts +4 -0
  54. package/dist/lookups/foreignAccountHolderAccountTypeOptions.d.ts +13 -0
  55. package/dist/lookups/foreignOtherAccountTypeOptions.d.ts +15 -0
  56. package/dist/lookups/foreignRegardedOwnerAccountTypeOptions.d.ts +11 -0
  57. package/dist/lookups/foreignTrustAccountTypeOptions.d.ts +7 -0
  58. package/dist/lookups/index.d.ts +12 -0
  59. package/dist/lookups/payeeCodeOptions.d.ts +4 -0
  60. package/dist/lookups/usAccountHolderAccountTypeOptions.d.ts +21 -0
  61. package/dist/lookups/usLlcAccountTypeOptions.d.ts +7 -0
  62. package/dist/lookups/usRegardedOwnerAccountTypeOptions.d.ts +15 -0
  63. package/dist/lookups/usStateOptions.d.ts +4 -0
  64. package/dist/main.d.ts +1 -0
  65. package/dist/minimal.css +33 -0
  66. package/dist/paths/AddressInput/AddressInput.d.ts +8 -0
  67. package/dist/paths/AddressInput/index.d.ts +1 -0
  68. package/dist/paths/FinancialAccountInput/FinancialAccountInput.d.ts +6 -0
  69. package/dist/paths/FinancialAccountInput/index.d.ts +1 -0
  70. package/dist/paths/PlaceOfBirthInput/PlaceOfBirthInput.d.ts +2 -0
  71. package/dist/paths/PlaceOfBirthInput/index.d.ts +1 -0
  72. package/dist/paths/ResidenceInput/ResidenceInput.d.ts +10 -0
  73. package/dist/paths/ResidenceInput/index.d.ts +1 -0
  74. package/dist/paths/RowInput/CheckBoxRow/CheckBoxRow.d.ts +8 -0
  75. package/dist/paths/RowInput/CheckBoxRow/index.d.ts +1 -0
  76. package/dist/paths/RowInput/ErrorRow/ErrorRow.d.ts +2 -0
  77. package/dist/paths/RowInput/ErrorRow/index.d.ts +1 -0
  78. package/dist/paths/RowInput/RadioButtonRow/RadioButtonRow.d.ts +8 -0
  79. package/dist/paths/RowInput/RadioButtonRow/index.d.ts +1 -0
  80. package/dist/paths/RowInput/SelectRow/SelectRow.d.ts +9 -0
  81. package/dist/paths/RowInput/SelectRow/index.d.ts +1 -0
  82. package/dist/paths/RowInput/TextInputRow/TextInputRow.d.ts +10 -0
  83. package/dist/paths/RowInput/TextInputRow/index.d.ts +1 -0
  84. package/dist/paths/RowInput/ToggleButtonRow/ToggleButtonRow.d.ts +3 -0
  85. package/dist/paths/RowInput/ToggleButtonRow/index.d.ts +1 -0
  86. package/dist/paths/RowInput/VisibleRow/VisibleRow.d.ts +9 -0
  87. package/dist/paths/RowInput/VisibleRow/index.d.ts +1 -0
  88. package/dist/paths/RowInput/index.d.ts +6 -0
  89. package/dist/paths/TaxDocumentationPath/AccountHolderClassification/AccountHolderClassification.d.ts +2 -0
  90. package/dist/paths/TaxDocumentationPath/AccountHolderClassification/index.d.ts +1 -0
  91. package/dist/paths/TaxDocumentationPath/AccountHolderContact/AccountHolderContact.d.ts +2 -0
  92. package/dist/paths/TaxDocumentationPath/AccountHolderContact/index.d.ts +1 -0
  93. package/dist/paths/TaxDocumentationPath/AccountHolderTax/AccountHolderTax.d.ts +2 -0
  94. package/dist/paths/TaxDocumentationPath/AccountHolderTax/index.d.ts +1 -0
  95. package/dist/paths/TaxDocumentationPath/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +2 -0
  96. package/dist/paths/TaxDocumentationPath/AccountHolderTaxClarification/index.d.ts +1 -0
  97. package/dist/paths/TaxDocumentationPath/Exemptions/Exemptions.d.ts +2 -0
  98. package/dist/paths/TaxDocumentationPath/Exemptions/index.d.ts +1 -0
  99. package/dist/paths/TaxDocumentationPath/RegardedOwnerClassification/RegardedOwnerClassification.d.ts +2 -0
  100. package/dist/paths/TaxDocumentationPath/RegardedOwnerClassification/index.d.ts +1 -0
  101. package/dist/paths/TaxDocumentationPath/RegardedOwnerContact/RegardedOwnerContact.d.ts +2 -0
  102. package/dist/paths/TaxDocumentationPath/RegardedOwnerContact/index.d.ts +1 -0
  103. package/dist/paths/TaxDocumentationPath/RegardedOwnerTax/RegardedOwnerTax.d.ts +2 -0
  104. package/dist/paths/TaxDocumentationPath/RegardedOwnerTax/index.d.ts +1 -0
  105. package/dist/paths/TaxDocumentationPath/Summary/Recap.d.ts +2 -0
  106. package/dist/paths/TaxDocumentationPath/Summary/Summary.d.ts +3 -0
  107. package/dist/paths/TaxDocumentationPath/Summary/index.d.ts +1 -0
  108. package/dist/paths/TaxDocumentationPath/TaxDocumentationDAC7Path.d.ts +10 -0
  109. package/dist/paths/TaxDocumentationPath/TaxDocumentationPath.d.ts +12 -0
  110. package/dist/paths/TaxDocumentationPath/index.d.ts +1 -0
  111. package/dist/paths/TaxDocumentationPath/steps.d.ts +8 -0
  112. package/dist/paths/VatInput/VatInput.d.ts +8 -0
  113. package/dist/paths/VatInput/index.d.ts +1 -0
  114. package/dist/paths/index.d.ts +1 -0
  115. package/dist/services/api.d.ts +5 -0
  116. package/dist/taxbit-basic-horizontal.css +190 -0
  117. package/dist/taxbit-basic.css +189 -0
  118. package/dist/taxbit-collect-components.es.d.ts +1 -0
  119. package/dist/taxbit-collect-components.es.js +9342 -0
  120. package/dist/taxbit-collect-components.umd.js +43 -0
  121. package/dist/types/AccountType.d.ts +6 -0
  122. package/dist/types/CaProvinceCode.d.ts +1 -0
  123. package/dist/types/CountryCode.d.ts +3 -0
  124. package/dist/types/Form.d.ts +1 -0
  125. package/dist/types/TaxDocumentation.d.ts +118 -0
  126. package/dist/types/UsStateCode.d.ts +1 -0
  127. package/dist/types/Utilities.d.ts +4 -0
  128. package/dist/types/Yes.d.ts +1 -0
  129. package/dist/types/YesNo.d.ts +6 -0
  130. package/dist/types/external/ComprehensiveTaxDocumentation.d.ts +76 -0
  131. package/dist/types/external/index.d.ts +1 -0
  132. package/dist/types/index.d.ts +9 -0
  133. package/dist/ui/Actions/Actions.d.ts +10 -0
  134. package/dist/ui/Actions/index.d.ts +1 -0
  135. package/dist/ui/CheckBox/CheckBox.d.ts +8 -0
  136. package/dist/ui/CheckBox/index.d.ts +1 -0
  137. package/dist/ui/RadioButtons/RadioButtons.d.ts +13 -0
  138. package/dist/ui/RadioButtons/index.d.ts +1 -0
  139. package/dist/ui/Select/Select.d.ts +27 -0
  140. package/dist/ui/Select/index.d.ts +1 -0
  141. package/dist/ui/TextInput/TextInput.d.ts +9 -0
  142. package/dist/ui/TextInput/index.d.ts +1 -0
  143. package/dist/ui/ToggleButton/ToggleButton.d.ts +6 -0
  144. package/dist/ui/ToggleButton/index.d.ts +1 -0
  145. package/dist/ui/index.d.ts +6 -0
  146. package/dist/utils/cx.d.ts +1 -0
  147. package/dist/utils/date.d.ts +3 -0
  148. package/dist/utils/getFieldsState.d.ts +10 -0
  149. package/dist/utils/getHintKeyMap.d.ts +103 -0
  150. package/dist/utils/getPromptKeyMap.d.ts +103 -0
  151. package/dist/utils/getSupportedFields.d.ts +6 -0
  152. package/dist/utils/getVerboseDate.d.ts +1 -0
  153. package/dist/utils/getVisibleQuestions.d.ts +6 -0
  154. package/dist/utils/index.d.ts +9 -0
  155. package/dist/utils/isBlank.d.ts +2 -0
  156. package/dist/utils/transformInbound.d.ts +2 -0
  157. package/dist/utils/transformOutbound.d.ts +3 -0
  158. package/dist/validations/__tests__/validations.test.d.ts +1 -0
  159. package/dist/validations/index.d.ts +1 -0
  160. package/dist/validations/validations.d.ts +7 -0
  161. package/dist/widgets/TaxDocumentationWidget/TaxDocumentationDAC7Widget.d.ts +12 -0
  162. package/dist/widgets/TaxDocumentationWidget/TaxDocumentationWidget.d.ts +12 -0
  163. package/dist/widgets/TaxDocumentationWidget/index.d.ts +2 -0
  164. package/dist/widgets/index.d.ts +1 -0
  165. package/package.json +54 -0
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import type { Locale } from "i18n";
3
+ import type { Form } from "types/Form";
4
+ import type { TaxDocumentation } from "types";
5
+ type TaxDocumentationProviderProps = {
6
+ data?: TaxDocumentation;
7
+ onSubmit: (data: TaxDocumentation) => void;
8
+ language?: Locale;
9
+ children: React.ReactNode;
10
+ forms?: Form[];
11
+ };
12
+ export declare const TaxDocumentationPathProvider: ({ data, onSubmit, language, forms, children, }: TaxDocumentationProviderProps) => React.JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./useTaxDocumentationContext";
2
+ export * from "./TaxDocumentationPathProvider";
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import type { Form, TaxDocumentation } from "types";
3
+ import { Locale } from "i18n";
4
+ type InputStep = "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
5
+ type UseTaxDocumentationProps = {
6
+ initialData: TaxDocumentation;
7
+ onSubmit: (transformedData: TaxDocumentation) => void;
8
+ initialLanguage?: Locale;
9
+ supportedForms?: Form[];
10
+ };
11
+ export declare const useTaxDocumentation: ({ initialData, onSubmit, initialLanguage, supportedForms, }: UseTaxDocumentationProps) => {
12
+ isW9: boolean;
13
+ isW8: boolean;
14
+ isW8Ben: boolean;
15
+ isW8BenE: boolean;
16
+ isDac7: boolean;
17
+ onPersistAccountHolderData: (newData: TaxDocumentation) => void;
18
+ onPersistCollectedData: (newData: TaxDocumentation) => void;
19
+ onSubmitTaxDocumentation: (newData: TaxDocumentation) => void;
20
+ onResetTaxDocumentation: () => void;
21
+ editTo: (form: InputStep) => void;
22
+ onCancel: (() => void) | undefined;
23
+ goTo: (form: InputStep) => void;
24
+ goBack: (() => void) | undefined;
25
+ goToNext: (data: TaxDocumentation) => void;
26
+ stepName: InputStep;
27
+ data: TaxDocumentation;
28
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es">>;
29
+ language: "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es";
30
+ supportedForms: Form[];
31
+ setSupportedForms: import("react").Dispatch<import("react").SetStateAction<Form[]>>;
32
+ };
33
+ export {};
@@ -0,0 +1,44 @@
1
+ /// <reference types="react" />
2
+ export declare const useTaxDocumentationContext: () => {
3
+ isW9: boolean;
4
+ isW8: boolean;
5
+ isW8Ben: boolean;
6
+ isW8BenE: boolean;
7
+ isDac7: boolean;
8
+ onPersistAccountHolderData: (newData: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
9
+ onPersistCollectedData: (newData: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
10
+ onSubmitTaxDocumentation: (newData: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
11
+ onResetTaxDocumentation: () => void;
12
+ editTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
13
+ onCancel: (() => void) | undefined;
14
+ goTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
15
+ goBack: (() => void) | undefined;
16
+ goToNext: (data: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
17
+ stepName: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax";
18
+ data: import("../../types/TaxDocumentation.ts").TaxDocumentation;
19
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es">>;
20
+ language: "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es";
21
+ supportedForms: import("../../types/Form.ts").Form[];
22
+ setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types/Form.ts").Form[]>>;
23
+ }, TaxDocumentationContextProvider: import("react").Provider<{
24
+ isW9: boolean;
25
+ isW8: boolean;
26
+ isW8Ben: boolean;
27
+ isW8BenE: boolean;
28
+ isDac7: boolean;
29
+ onPersistAccountHolderData: (newData: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
30
+ onPersistCollectedData: (newData: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
31
+ onSubmitTaxDocumentation: (newData: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
32
+ onResetTaxDocumentation: () => void;
33
+ editTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
34
+ onCancel: (() => void) | undefined;
35
+ goTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
36
+ goBack: (() => void) | undefined;
37
+ goToNext: (data: import("../../types/TaxDocumentation.ts").TaxDocumentation) => void;
38
+ stepName: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax";
39
+ data: import("../../types/TaxDocumentation.ts").TaxDocumentation;
40
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es">>;
41
+ language: "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es";
42
+ supportedForms: import("../../types/Form.ts").Form[];
43
+ setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types/Form.ts").Form[]>>;
44
+ } | undefined>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const createCtx: <A extends Record<string, unknown> | null>() => readonly [() => A, import("react").Provider<A | undefined>];
@@ -0,0 +1,2 @@
1
+ export * from "./TaxDocumentation";
2
+ export * from "./FormUI";
@@ -0,0 +1,2 @@
1
+ export * from "../paths/TaxDocumentationPath";
2
+ export * from "../widgets/TaxDocumentationWidget";
@@ -0,0 +1 @@
1
+ export * from "./useTaxBit";
@@ -0,0 +1 @@
1
+ export * from "./useTaxBit.ts";
@@ -0,0 +1,5 @@
1
+ import { TaxDocumentation } from "types";
2
+ export declare const useTaxBit: (environment: "PRODUCTION" | "STAGING", bearerToken: string) => {
3
+ submitTaxDocumentation: import("@tanstack/react-query").UseMutationResult<Response, unknown, TaxDocumentation, unknown>;
4
+ taxDocumentationStatus: string;
5
+ };
@@ -0,0 +1,7 @@
1
+ import type { PropertyFile } from "./types/PropertyFile.ts";
2
+ export type Locale = "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es";
3
+ type LocalizationFile = {
4
+ [locale in Locale]: PropertyFile;
5
+ };
6
+ export declare const i18n: LocalizationFile;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export { getButtonText, getCaProvinceText, getCountryText, getErrorText, getHintText, getOptionText, getPromptText, getSubPromptText, getTitleText, getUsStateText, } from "./utils";
2
+ export type { Locale } from "./i18n.ts";
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const deDe: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const enGb: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const enUs: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const esEs: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile.ts";
2
+ export declare const frFr: PropertyFile;
@@ -0,0 +1,9 @@
1
+ export * from "./de-de.ts";
2
+ export * from "./en-gb.ts";
3
+ export * from "./en-us.ts";
4
+ export * from "./es-es.ts";
5
+ export * from "./fr-fr.ts";
6
+ export * from "./it-it.ts";
7
+ export * from "./nl-nl.ts";
8
+ export * from "./no-no.ts";
9
+ export * from "./sv-se.ts";
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const itIt: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const nlNl: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const noNo: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const svSe: PropertyFile;
@@ -0,0 +1,8 @@
1
+ export type ButtonKey = "edit" | "back" | "next" | "reset" | "submit" | "cancel";
2
+ export type ErrorKey = "required" | "invalid" | "invalidDate" | "mustBeSixCharacters" | "mustBeNineDigits" | "mustBeFiveOrNineDigits" | "mustMatchName" | "mustBeInDateFormat" | "mustBeValidBirthDate";
3
+ export type OptionKey = "usPerson_yes" | "usPerson_no" | "regardedOwnerUsPerson_yes" | "regardedOwnerUsPerson_no" | "isIndividual_yes" | "isIndividual_no" | "cCorporation" | "centralBankOfIssue" | "complexTrust" | "corporation" | "disregardedEntity" | "estate" | "foreignGovernmentControlledEntity" | "foreignGovernmentIntegralPart" | "grantorTrust" | "individual" | "internationalOrganization" | "llc" | "no" | "other" | "partnership" | "privateFoundation" | "sCorporation" | "simpleTrust" | "smllc" | "soleProprietor" | "taxExemptOrganization" | "trust" | "trustEstate" | "yes";
4
+ export type PromptKey = "addAdditional" | "address" | "businessRegistrationNumber" | "city" | "cityOfBirth" | "country" | "countryOfBirth" | "countryOfCitizenship" | "dateOfBirth" | "dbaName" | "exemptPayeeCode" | "exemptFatcaCode" | "financialAccountIdentifier" | "financialAccountName" | "foreignAccountType" | "foreignOtherClassification" | "foreignTin" | "foreignTinIsNotRequired" | "foreignTrustClassification" | "isEuResident" | "isIndividual" | "iAcknowlegeESignIsOk" | "iAmACitizenOfTheUs" | "iAmExemptFromFatcaReporting" | "iAmNotSubjectToBackupWithholding" | "iAuthorizeWithholdingAgent" | "iCertifyToAll" | "iConfirmIncomeIsNonUs" | "iConfirmTheBeneficialOwnerIsExempt" | "iConfirmTheEntityIsNotAUsPerson" | "iConfirmTheEntityIsTheBeneficialOwner" | "iConfirmTheTaxIdIsCorrect" | "iHaveLegalCapacityToSign" | "mailingAddress" | "mailingAddressIsDifferent" | "name" | "nameOfBusiness" | "nameOfCCorporation" | "nameOfCorporation" | "nameOfIndividual" | "nameOfLlc" | "nameOfOrganization" | "nameOfPartnership" | "nameOfSCorporation" | "nameOfSoleProprietor" | "nameOfTrustEstate" | "nameOfTrust" | "province" | "regardedOwnerUsPerson" | "removeAdditional" | "signature" | "smllcElection" | "state" | "stateProvince" | "street" | "street2" | "taxIdNumber" | "taxIdNumberIsNotRequired" | "tin" | "usAccountType" | "usLlcClassification" | "usOtherClassification" | "usPerson" | "usEin" | "usSsn" | "usTin" | "usTrustEstateEin" | "vatIdentificationNumber" | "vatCountry" | "zip";
5
+ export type SubPromptKey = "smllcElection" | "iConfirmIncomeIsNonUs";
6
+ export type TitleKey = "accountHolder" | "accountHolderClassification" | "accountHolderContactInformation" | "accountHolderTaxInformation" | "address" | "mailingAddress" | "permanentAddress" | "placeOfBirth" | "regardedOwner" | "regardedOwnerClassification" | "regardedOwnerContactInformation" | "regardedOwnerTaxInformation" | "signature" | "summary" | "taxResidences" | "taxResidence1" | "taxResidence2" | "taxResidence3" | "taxResidence4" | "taxResidence5";
7
+ export type TextKey = "eSignActReference" | "notRequired";
8
+ export type HintKey = "dateOfBirth";
@@ -0,0 +1,39 @@
1
+ import { ButtonKey, ErrorKey, HintKey, OptionKey, PromptKey, SubPromptKey, TextKey, TitleKey } from "./LocalizationKey.ts";
2
+ import { CountryCode } from "types/CountryCode";
3
+ import { UsStateCode } from "types/UsStateCode";
4
+ import { CaProvinceCode } from "types/CaProvinceCode";
5
+ export type PropertyFile = {
6
+ button: {
7
+ [key in ButtonKey]: string;
8
+ };
9
+ error: {
10
+ [key in ErrorKey]: string;
11
+ };
12
+ prompt: {
13
+ [key in PromptKey]: string;
14
+ };
15
+ subPrompt: {
16
+ [key in SubPromptKey]: string;
17
+ };
18
+ title: {
19
+ [key in TitleKey]: string;
20
+ };
21
+ option: {
22
+ [key in OptionKey]: string;
23
+ };
24
+ country: {
25
+ [key in CountryCode]: string;
26
+ };
27
+ usState: {
28
+ [key in UsStateCode]: string;
29
+ };
30
+ caProvince: {
31
+ [key in CaProvinceCode]: string;
32
+ };
33
+ text: {
34
+ [key in TextKey]: string;
35
+ };
36
+ hint: {
37
+ [key in HintKey]: string;
38
+ };
39
+ };
@@ -0,0 +1 @@
1
+ export * from "./LocalizationKey.ts";
@@ -0,0 +1,16 @@
1
+ import { ButtonKey, ErrorKey, OptionKey, PromptKey, SubPromptKey, TextKey, TitleKey } from "../types";
2
+ import { CountryCode } from "types/CountryCode";
3
+ import { UsStateCode } from "types/UsStateCode";
4
+ import { CaProvinceCode } from "types/CaProvinceCode";
5
+ import { Locale } from "../i18n.ts";
6
+ export declare const getPromptText: (key: PromptKey, locale?: Locale | undefined) => string;
7
+ export declare const getSubPromptText: (key: SubPromptKey, locale?: Locale | undefined) => string;
8
+ export declare const getErrorText: (key: ErrorKey, locale?: Locale | undefined) => string;
9
+ export declare const getHintText: (key: string | undefined, locale?: Locale | undefined) => string | undefined;
10
+ export declare const getTextText: (key: TextKey, locale?: Locale | undefined) => string;
11
+ export declare const getTitleText: (key: TitleKey, locale?: Locale | undefined) => string;
12
+ export declare const getButtonText: (key: ButtonKey, locale?: Locale | undefined) => string;
13
+ export declare const getOptionText: (key: OptionKey | undefined, locale?: Locale | undefined) => string;
14
+ export declare const getCountryText: (key: CountryCode, locale?: Locale | undefined) => string;
15
+ export declare const getUsStateText: (key: UsStateCode, locale?: Locale | undefined) => string;
16
+ export declare const getCaProvinceText: (key: CaProvinceCode, locale?: Locale | undefined) => string;
@@ -0,0 +1 @@
1
+ export * from "./getText.ts";
package/dist/index.css ADDED
@@ -0,0 +1,12 @@
1
+ :root {
2
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3
+ line-height: 24px;
4
+ font-weight: 400;
5
+
6
+ color: #12263F;
7
+ font-synthesis: none;
8
+ text-rendering: optimizeLegibility;
9
+ -webkit-font-smoothing: antialiased;
10
+ -moz-osx-font-smoothing: grayscale;
11
+ -webkit-text-size-adjust: 100%;
12
+ }
@@ -0,0 +1,4 @@
1
+ import { CaProvinceCode } from "types/CaProvinceCode";
2
+ export declare const caProvinceOptions: {
3
+ value: CaProvinceCode;
4
+ }[];
@@ -0,0 +1,7 @@
1
+ import { CountryCode } from "types/CountryCode";
2
+ export declare const countryOptions: {
3
+ value: CountryCode;
4
+ }[];
5
+ export declare const eUCountryOptions: {
6
+ value: "NL" | "SK" | "AT" | "BE" | "BG" | "CY" | "CZ" | "DE" | "DK" | "EE" | "ES" | "FI" | "FR" | "GR" | "HR" | "HU" | "IE" | "IT" | "LT" | "LU" | "LV" | "MT" | "PL" | "PT" | "RO" | "SE" | "SI";
7
+ }[];
@@ -0,0 +1,4 @@
1
+ export type FatcaCode = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M";
2
+ export declare const fatcaCodeOptions: {
3
+ value: FatcaCode;
4
+ }[];
@@ -0,0 +1,13 @@
1
+ export declare const foreignAccountHolderAccountTypeOptions: readonly [{
2
+ readonly value: "individual";
3
+ }, {
4
+ readonly value: "corporation";
5
+ }, {
6
+ readonly value: "partnership";
7
+ }, {
8
+ readonly value: "trust";
9
+ }, {
10
+ readonly value: "other";
11
+ }, {
12
+ readonly value: "disregardedEntity";
13
+ }];
@@ -0,0 +1,15 @@
1
+ export declare const foreignOtherAccountTypeOptions: readonly [{
2
+ readonly value: "taxExemptOrganization";
3
+ }, {
4
+ readonly value: "privateFoundation";
5
+ }, {
6
+ readonly value: "internationalOrganization";
7
+ }, {
8
+ readonly value: "centralBankOfIssue";
9
+ }, {
10
+ readonly value: "foreignGovernmentControlledEntity";
11
+ }, {
12
+ readonly value: "foreignGovernmentIntegralPart";
13
+ }, {
14
+ readonly value: "estate";
15
+ }];
@@ -0,0 +1,11 @@
1
+ export declare const foreignRegardedOwnerAccountTypeOptions: readonly [{
2
+ readonly value: "individual";
3
+ }, {
4
+ readonly value: "corporation";
5
+ }, {
6
+ readonly value: "partnership";
7
+ }, {
8
+ readonly value: "trust";
9
+ }, {
10
+ readonly value: "other";
11
+ }];
@@ -0,0 +1,7 @@
1
+ export declare const foreignTrustAccountTypeOptions: readonly [{
2
+ readonly value: "simpleTrust";
3
+ }, {
4
+ readonly value: "complexTrust";
5
+ }, {
6
+ readonly value: "grantorTrust";
7
+ }];
@@ -0,0 +1,12 @@
1
+ export * from "./caProvinceOptions";
2
+ export * from "./countryOptions";
3
+ export * from "./fatcaCodeOptions";
4
+ export * from "./foreignAccountHolderAccountTypeOptions";
5
+ export * from "./foreignOtherAccountTypeOptions";
6
+ export * from "./foreignRegardedOwnerAccountTypeOptions";
7
+ export * from "./foreignTrustAccountTypeOptions";
8
+ export * from "./payeeCodeOptions";
9
+ export * from "./usAccountHolderAccountTypeOptions";
10
+ export * from "./usLlcAccountTypeOptions";
11
+ export * from "./usRegardedOwnerAccountTypeOptions";
12
+ export * from "./usStateOptions";
@@ -0,0 +1,4 @@
1
+ export type PayeeCode = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M";
2
+ export declare const payeeCodeOptions: {
3
+ value: PayeeCode;
4
+ }[];
@@ -0,0 +1,21 @@
1
+ export declare const usAccountHolderAccountTypeOptions: readonly [{
2
+ readonly value: "individual";
3
+ }, {
4
+ readonly value: "soleProprietor";
5
+ }, {
6
+ readonly value: "llc";
7
+ }, {
8
+ readonly value: "smllc";
9
+ }, {
10
+ readonly value: "cCorporation";
11
+ }, {
12
+ readonly value: "sCorporation";
13
+ }, {
14
+ readonly value: "partnership";
15
+ }, {
16
+ readonly value: "trustEstate";
17
+ }, {
18
+ readonly value: "other";
19
+ }, {
20
+ readonly value: "disregardedEntity";
21
+ }];
@@ -0,0 +1,7 @@
1
+ export declare const usLlcAccountTypeOptions: readonly [{
2
+ readonly value: "cCorporation";
3
+ }, {
4
+ readonly value: "sCorporation";
5
+ }, {
6
+ readonly value: "partnership";
7
+ }];
@@ -0,0 +1,15 @@
1
+ export declare const usRegardedOwnerAccountTypeOptions: readonly [{
2
+ readonly value: "individual";
3
+ }, {
4
+ readonly value: "llc";
5
+ }, {
6
+ readonly value: "cCorporation";
7
+ }, {
8
+ readonly value: "sCorporation";
9
+ }, {
10
+ readonly value: "partnership";
11
+ }, {
12
+ readonly value: "trustEstate";
13
+ }, {
14
+ readonly value: "other";
15
+ }];
@@ -0,0 +1,4 @@
1
+ import { UsStateCode } from "types/UsStateCode";
2
+ export declare const usStateOptions: {
3
+ value: UsStateCode;
4
+ }[];
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ :root {
2
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3
+ line-height: 24px;
4
+ font-weight: 400;
5
+
6
+ color: #12263F;
7
+ font-synthesis: none;
8
+ text-rendering: optimizeLegibility;
9
+ -webkit-font-smoothing: antialiased;
10
+ -moz-osx-font-smoothing: grayscale;
11
+ -webkit-text-size-adjust: 100%;
12
+ }
13
+
14
+ .taxbit-page {
15
+ max-width: 600px;
16
+ padding: 12px;
17
+ margin-bottom: 100px;
18
+ }
19
+
20
+ .taxbit-row {
21
+ margin: 10px 0;
22
+ }
23
+
24
+ .taxbit-errorMessage {
25
+ color: red;
26
+ }
27
+
28
+
29
+ .taxbit-stepActions {
30
+ display: flex;
31
+ justify-content: space-between;
32
+ margin-top: 20px;
33
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ type AddressProps = {
3
+ prompt: string;
4
+ showIf?: boolean;
5
+ prefix: "accountHolderAddress" | "accountHolderMailingAddress" | "regardedOwnerAddress" | "regardedOwnerMailingAddress";
6
+ };
7
+ export declare const AddressInput: ({ prompt, prefix, showIf, }: AddressProps) => React.JSX.Element | undefined;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./AddressInput.tsx";
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ type AddressProps = {
3
+ showIf?: boolean;
4
+ };
5
+ export declare const FinancialAccountInput: ({ showIf }: AddressProps) => React.JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./FinancialAccountInput.tsx";
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const PlaceOfBirthInput: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./PlaceOfBirthInput.tsx";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { SelectProps } from "ui";
3
+ type AddressProps = {
4
+ index: 1 | 2 | 3 | 4 | 5;
5
+ showIf?: boolean;
6
+ more?: true;
7
+ countryOptions: SelectProps["options"];
8
+ };
9
+ export declare const ResidenceInput: ({ index, showIf, more, countryOptions, }: AddressProps) => React.JSX.Element | undefined;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./ResidenceInput.tsx";
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { CheckBoxProps } from "ui";
3
+ type CheckBoxRowProps = {
4
+ label?: true;
5
+ subLabel?: true;
6
+ };
7
+ export declare const CheckBoxRow: ({ name, label, subLabel, }: CheckBoxProps & CheckBoxRowProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./CheckBoxRow.tsx";
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const ErrorRow: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./ErrorRow.tsx";
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { RadioButtonsProps } from "ui";
3
+ type RadioButtonRowProps = {
4
+ label?: true;
5
+ subLabel?: true;
6
+ };
7
+ export declare const RadioButtonRow: ({ name, label, subLabel, options, }: RadioButtonsProps & RadioButtonRowProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./RadioButtonRow.tsx";
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { SelectProps } from "ui";
3
+ type SelectRowProps = {
4
+ label?: true;
5
+ subLabel?: true;
6
+ onChange?: () => void;
7
+ };
8
+ export declare const SelectRow: ({ name, label, options, subLabel, addBlank, onChange, }: SelectProps & SelectRowProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./SelectRow.tsx";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { TextInputProps } from "ui";
3
+ type TextInputRowProps = {
4
+ label?: true;
5
+ subLabel?: true;
6
+ hint?: true;
7
+ onChange?: (val: string) => string;
8
+ };
9
+ export declare const TextInputRow: ({ name, label, hint, subLabel, onChange, }: TextInputProps & TextInputRowProps) => React.JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./TextInputRow.tsx";
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { ToggleButtonProps } from "ui";
3
+ export declare const ToggleButtonRow: ({ name }: ToggleButtonProps) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./ToggleButtonRow";
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { TaxDocumentationKey } from "types";
3
+ export declare const VisibleRow: ({ label, subLabel, name, children, onEdit, }: {
4
+ label?: boolean | undefined;
5
+ subLabel?: boolean | undefined;
6
+ name: TaxDocumentationKey;
7
+ children: React.ReactNode;
8
+ onEdit?: (() => void) | undefined;
9
+ }) => React.JSX.Element | undefined;
@@ -0,0 +1 @@
1
+ export * from "./VisibleRow.tsx";
@@ -0,0 +1,6 @@
1
+ export * from "./CheckBoxRow";
2
+ export * from "./ErrorRow";
3
+ export * from "./RadioButtonRow";
4
+ export * from "./SelectRow";
5
+ export * from "./TextInputRow";
6
+ export * from "./ToggleButtonRow";
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const AccountHolderClassification: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./AccountHolderClassification.tsx";