@taxbit/react-sdk 2.2.0-beta.1 → 2.3.0-beta.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 (69) hide show
  1. package/README.md +8 -0
  2. package/dist/src/components/Section/Section.d.ts +1 -1
  3. package/dist/src/contexts/QuestionnaireStep/QuestionnaireStepProvider.d.ts +2 -2
  4. package/dist/src/contexts/QuestionnaireStep/getLocal.d.ts +3 -3
  5. package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStep.d.ts +3 -3
  6. package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +7 -4
  7. package/dist/src/i18n/json/bg.json.d.ts +5 -6
  8. package/dist/src/i18n/json/cs.json.d.ts +6 -7
  9. package/dist/src/i18n/json/da.json.d.ts +6 -7
  10. package/dist/src/i18n/json/de-AT.json.d.ts +1 -3
  11. package/dist/src/i18n/json/de.json.d.ts +5 -6
  12. package/dist/src/i18n/json/el-CY.json.d.ts +0 -1
  13. package/dist/src/i18n/json/el.json.d.ts +5 -6
  14. package/dist/src/i18n/json/en.json.d.ts +12 -13
  15. package/dist/src/i18n/json/es.json.d.ts +9 -10
  16. package/dist/src/i18n/json/et.json.d.ts +5 -6
  17. package/dist/src/i18n/json/fi.json.d.ts +5 -6
  18. package/dist/src/i18n/json/fr-LU.json.d.ts +0 -1
  19. package/dist/src/i18n/json/fr.json.d.ts +8 -9
  20. package/dist/src/i18n/json/ga.json.d.ts +5 -6
  21. package/dist/src/i18n/json/hr.json.d.ts +5 -6
  22. package/dist/src/i18n/json/hu.json.d.ts +6 -7
  23. package/dist/src/i18n/json/it.json.d.ts +5 -6
  24. package/dist/src/i18n/json/lt.json.d.ts +6 -7
  25. package/dist/src/i18n/json/lv.json.d.ts +6 -7
  26. package/dist/src/i18n/json/mt.json.d.ts +6 -7
  27. package/dist/src/i18n/json/nl.json.d.ts +6 -7
  28. package/dist/src/i18n/json/no.json.d.ts +5 -6
  29. package/dist/src/i18n/json/pl.json.d.ts +6 -7
  30. package/dist/src/i18n/json/pt.json.d.ts +5 -6
  31. package/dist/src/i18n/json/ro.json.d.ts +6 -7
  32. package/dist/src/i18n/json/sk.json.d.ts +7 -8
  33. package/dist/src/i18n/json/sl.json.d.ts +7 -8
  34. package/dist/src/i18n/json/sv.json.d.ts +6 -7
  35. package/dist/src/i18n/types/LocalizationKey.d.ts +3 -3
  36. package/dist/src/i18n/types/PropertyFile.d.ts +3 -3
  37. package/dist/src/i18n/utils/getText.d.ts +3 -3
  38. package/dist/src/test/StepWrapper.d.ts +11 -0
  39. package/dist/src/test/Wrapper.d.ts +19 -1
  40. package/dist/src/test/getWrapper.d.ts +5 -3
  41. package/dist/src/test/renderWithWrapper.d.ts +3 -0
  42. package/dist/src/test/utils/helpers.d.ts +2 -0
  43. package/dist/src/types/TaxDocumentation.d.ts +5 -4
  44. package/dist/src/ui/CheckBox/CheckBox.d.ts +2 -1
  45. package/dist/src/ui/DateOfBirthInput/__tests__/DateOfBirthInput.test.d.ts +1 -1
  46. package/dist/src/ui/PasswordInput/__tests__/PasswordInput.test.d.ts +1 -0
  47. package/dist/src/ui/PhoneNumberInput/__tests__/PhoneNumberInput.test.d.ts +1 -0
  48. package/dist/src/ui/Select/__tests__/Select.test.d.ts +1 -0
  49. package/dist/src/ui/TextArea/__tests__/TextArea.test.d.ts +1 -0
  50. package/dist/src/ui/index.d.ts +1 -0
  51. package/dist/src/ui/useAriaAttributes.d.ts +11 -0
  52. package/dist/src/utils/getDataFields.d.ts +489 -0
  53. package/dist/src/utils/getErrorMessageId.d.ts +3 -0
  54. package/dist/src/utils/index.d.ts +2 -0
  55. package/dist/src/utils/transformInbound/transformInboundControllingPersons.d.ts +2 -3
  56. package/dist/src/wizard/RowInput/CheckBoxRow/CheckBoxRow.d.ts +2 -1
  57. package/dist/src/wizard/RowInput/ErrorRow/__tests__/ErrorRow.test.d.ts +1 -0
  58. package/dist/src/wizard/RowInput/HiddenInputRow/HiddenInputRow.d.ts +1 -1
  59. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.WForm.Summary.test.d.ts +1 -0
  60. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.WForm.TreatyClaims.test.d.ts +1 -0
  61. package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.WForm.test.d.ts +1 -0
  62. package/dist/taxbit-react-sdk.js +4483 -4534
  63. package/dist/taxbit-react-sdk.umd.cjs +1 -1
  64. package/package.json +1 -1
  65. package/style/basic.css +3 -0
  66. package/style/inline.css +3 -0
  67. /package/dist/src/{ui/TextArea/__tests__/TextInput.test.d.ts → components/ErrorMessage/__tests__/ErrorMessage.test.d.ts} +0 -0
  68. /package/dist/src/{wizard/TaxbitQuestionnaireUI/__tests__/TaxbitWFormQuestionnaireUI.test.d.ts → ui/CheckBox/__tests__/CheckBox.test.d.ts} +0 -0
  69. /package/dist/src/{wizard/TaxbitQuestionnaireUI/__tests__/TaxbitWFormQuestionnaireUI.treatyClaims.test.d.ts → ui/FormattedInput/__tests__/FormattedInput.test.d.ts} +0 -0
@@ -34,11 +34,11 @@ export type PropertyFile = {
34
34
  };
35
35
  export type ForeignPropertyFile = {
36
36
  button: PropertyFile['button'];
37
- prompt: Pick<PropertyFile['prompt'], 'addAdditionalResidence' | 'addControllingPerson' | 'foreignAccountType' | 'financialInstitutionType' | 'activeNonFinancialEntityType' | 'passiveEntityType' | 'managedEntityType' | 'investmentEntityManaged' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iAcknowledgeESignIsOKForeign' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iCertifyIWillNotifyPersons' | 'iDeclareStatementsAreCorrect' | 'iWillNotifyChangeInCircumstanceForIndividual' | 'iWillNotifyChangeInCircumstanceForAccountHolder' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'relatedCorporation' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'address' | 'mailingAddressIsDifferent' | 'businessRegistrationCountry' | 'businessRegistrationNumber' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'emailAddress' | 'iCertifyToAll' | 'iConfirmTheInformationIsCorrectComplete' | 'iHaveCapacityToSignForEntity' | 'iHaveCapacityToSignForIndividual' | 'isIndividual' | 'month' | 'name' | 'nameOfEntity' | 'nameOfIndividual' | 'phoneNumber' | 'phoneNumberCode' | 'phoneNumberNumber' | 'province' | 'removeResidence' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'signature' | 'signatureCapacity' | 'signatureCapacityOther' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'tin' | 'tinUkCrn' | 'tinUkNino' | 'type' | 'usTin' | 'vatCountry' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'year' | 'zip'>;
37
+ prompt: Pick<PropertyFile['prompt'], 'addAdditionalResidence' | 'addControllingPerson' | 'foreignAccountType' | 'financialInstitutionType' | 'activeNonFinancialEntityType' | 'passiveEntityType' | 'managedEntityType' | 'investmentEntityManaged' | 'iUnderstandTheInformationIsCovered' | 'iAcknowledgeTheInformationMayBeProvided' | 'iCertifyIAmAccountHolder' | 'iCertifyIAmAuthorizedToSignForAccountHolder' | 'iDeclareStatementsAreCorrect' | 'iWillNotifyChangeInCircumstance' | 'otherRole' | 'otherEquivalentRole' | 'ownershipPercentage' | 'relatedCorporation' | 'removeControllingPerson' | 'role' | 'securitiesMarket' | 'taxIdNumberIsNotRequiredReason' | 'taxIdNumberIsNotRequiredReasonOther' | 'address' | 'mailingAddressIsDifferent' | 'businessRegistrationCountry' | 'businessRegistrationNumber' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'dateOfBirth' | 'day' | 'emailAddress' | 'isIndividual' | 'month' | 'name' | 'nameOfEntity' | 'nameOfIndividual' | 'phoneNumber' | 'phoneNumberCode' | 'phoneNumberNumber' | 'province' | 'removeResidence' | 'countyRegion' | 'stateProvince' | 'street' | 'street2' | 'signature' | 'signatureCapacity' | 'signatureCapacityOther' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'tin' | 'tinUkCrn' | 'tinUkNino' | 'type' | 'usTin' | 'vatCountry' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'year' | 'zip'>;
38
38
  subPrompt: Pick<PropertyFile['subPrompt'], 'financialInstitutionType' | 'isIndividual' | 'placeOfBirth' | 'relatedCorporation' | 'role' | 'securitiesMarket' | 'signatureCapacityOther' | 'streetIsPermanent' | 'vatIdentificationNumber'>;
39
39
  subTitle: Pick<PropertyFile['subTitle'], 'taxResidences' | 'controllingPersonDetails' | 'permanentAddress'>;
40
- title: Pick<PropertyFile['title'], 'acknowledge' | 'certify' | 'carfClassificationDetails' | 'controllingPersonDetails' | 'controllingPersons' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5' | 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderAdditionalInfo' | 'address' | 'confirmation' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'placeOfBirth' | 'mailingAddress' | 'permanentAddress' | 'primaryAddress' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5'>;
41
- text: Pick<PropertyFile['text'], 'eSignActReference' | 'interviewIsComplete' | 'notRequired' | 'notRequiredOrNotIssued' | 'retrievingInterviewStatus' | 'taxDocumentationSaved'>;
40
+ title: Pick<PropertyFile['title'], 'certify' | 'carfClassificationDetails' | 'controllingPersonDetails' | 'controllingPersons' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5' | 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderAdditionalInfo' | 'address' | 'confirmation' | 'countryOfCitizenship' | 'countryOfIncorporation' | 'placeOfBirth' | 'mailingAddress' | 'permanentAddress' | 'primaryAddress' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5'>;
41
+ text: Pick<PropertyFile['text'], 'interviewIsComplete' | 'notRequired' | 'notRequiredOrNotIssued' | 'retrievingInterviewStatus' | 'taxDocumentationSaved' | 'iCertifyIsCorrect' | 'iCertifyHaveCapacity'>;
42
42
  error: Pick<PropertyFile['error'], 'countryMustBeAResidenceCountry' | 'formHasErrors' | 'invalid' | 'invalidDate' | 'invalidVat' | 'mustBeABNFormat' | 'mustBeAtLeast18' | 'mustBeFiveOrNineDigits' | 'mustBeInDateFormat' | 'mustBeInVatinFormat' | 'mustBeNineDigits' | 'mustBeNinoFormat' | 'mustBeCaPostalCodeFormat' | 'mustBeValidBirthDate' | 'mustNotMatchVatin' | 'required' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry' | 'residencesMustIncludeVatCountry' | 'residencesMustIncludeBusinessRegistrationCountry' | 'tooLong' | 'tooShort' | 'vatinMustNotMatchResidencyTin'>;
43
43
  option: Pick<PropertyFile['option'], 'no' | 'yes' | 'isIndividual_yes' | 'isIndividual_no' | 'investmentEntityManaged_yes' | 'investmentEntityManaged_no' | 'ACTIVE_NON_FINANCIAL_ENTITY' | 'PASSIVE_NON_FINANCIAL_ENTITY' | 'CUSTODIAL_INSTITUTION' | 'accountHolderActiveNonFinancialEntityType_GOVERNMENT_ENTITY' | 'INSURANCE_COMPANY' | 'INVESTMENT_ENTITY' | 'entityType_TRUST' | 'entityType_SIMILAR_TO_TRUST' | 'entityType_OTHER' | 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'accountHolderActiveNonFinancialEntityType_INTERNATIONAL_ORGANIZATION' | 'signatureCapacity_EXECUTOR' | 'signatureCapacity_OFFICER' | 'signatureCapacity_OTHER_CAPACITY' | 'DEPOSITORY_INSTITUTION' | 'FINANCIAL_INSTITUTION' | 'controllingPersonRole_SETTLOR' | 'controllingPersonRole_TRUSTEE' | 'controllingPersonRole_PROTECTOR' | 'controllingPersonRole_BENEFICIARY' | 'controllingPersonRole_OTHER' | 'controllingPersonRole_SETTLOR_EQUIVALENT' | 'controllingPersonRole_TRUSTEE_EQUIVALENT' | 'controllingPersonRole_PROTECTOR_EQUIVALENT' | 'controllingPersonRole_BENEFICIARY_EQUIVALENT' | 'controllingPersonRole_OTHER_EQUIVALENT' | 'controllingPersonRole_OWNER' | 'controllingPersonRole_OTHER_MEANS' | 'controllingPersonRole_SENIOR_MANAGING_OFFICIAL' | 'missingTinNotRequiredReason_NOT_ISSUED' | 'missingTinNotRequiredReason_NOT_REQUIRED' | 'missingTinNotRequiredReason_OTHER'>;
44
44
  subOption: Pick<PropertyFile['subOption'], 'accountHolderActiveNonFinancialEntityType_PUBLIC_CORPORATION' | 'accountHolderActiveNonFinancialEntityType_OTHER' | 'accountHolderSelfCertificationAccountType_FINANCIAL_INSTITUTION' | 'accountHolderSelfCertificationAccountType_ACTIVE_NON_FINANCIAL_ENTITY' | 'accountHolderSelfCertificationAccountType_PASSIVE_NON_FINANCIAL_ENTITY'>;
@@ -1,13 +1,13 @@
1
1
  import { Locale, TaxDocumentation } from '../../types';
2
- import { ButtonKey, ErrorKey, OptionKey, PromptKey, SubOptionKey, SubPromptKey, SubTitleKey, TextKey } from '../types';
2
+ import { ButtonKey, ErrorKey, OptionKey, PromptKey, SubOptionKey, SubPromptKey } from '../types';
3
3
 
4
4
  export declare const getPromptText: (key: PromptKey, data: TaxDocumentation, locale: Locale | undefined) => string;
5
5
  export declare const getSubPromptText: (key: SubPromptKey, data: TaxDocumentation, locale: Locale | undefined) => string;
6
6
  export declare const getErrorText: (key: ErrorKey, data: TaxDocumentation, locale: Locale | undefined) => string;
7
7
  export declare const getBadgeText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
8
- export declare const getTextText: (key: TextKey, data: TaxDocumentation, locale: Locale | undefined) => string;
8
+ export declare const getTextText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
9
9
  export declare const getTitleText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
10
- export declare const getSubTitleText: (key: SubTitleKey, data: TaxDocumentation, locale: Locale | undefined) => string;
10
+ export declare const getSubTitleText: (key: string, data: TaxDocumentation, locale: Locale | undefined) => string;
11
11
  export declare const getButtonText: (key: ButtonKey, data: TaxDocumentation, locale: Locale | undefined) => string;
12
12
  export declare const getOptionText: (key: OptionKey | undefined, data: TaxDocumentation, locale: Locale | undefined) => string;
13
13
  export declare const getSubOptionText: (key: SubOptionKey | undefined, data: TaxDocumentation, locale: Locale | undefined) => string | undefined;
@@ -0,0 +1,11 @@
1
+ import { QuestionnaireStepContextValue } from 'contexts/QuestionnaireStep/useQuestionnaireStepContext';
2
+ import { default as React } from 'react';
3
+
4
+ /**
5
+ * A wrapper for unit testing questionnaire components that combines a real value from the
6
+ * `useQuestionnaireStep` hook with the provided context value overrides.
7
+ */
8
+ export declare const StepWrapper: ({ contextValue, children, }: {
9
+ contextValue: Partial<QuestionnaireStepContextValue>;
10
+ children: React.ReactNode;
11
+ }) => React.JSX.Element;
@@ -1,8 +1,26 @@
1
1
  import { ClientTaxDocumentation } from '@taxbit/utilities';
2
+ import { QuestionnaireStepContextValue } from 'contexts';
2
3
  import { default as React } from 'react';
3
4
  import { QuestionnaireProp } from '../types';
4
5
 
5
- export declare const Wrapper: React.FC<React.PropsWithChildren & {
6
+ export type WrapperProps = React.PropsWithChildren<{
7
+ /**
8
+ * Initial data for the questionnaire.
9
+ */
6
10
  initialData?: ClientTaxDocumentation;
11
+ /**
12
+ * The type of questionnaire to render. Defaults to 'W-FORM'.
13
+ */
7
14
  questionnaire?: QuestionnaireProp;
15
+ /**
16
+ * Overrides for the context value of the `QuestionnaireStepProvider`. When provided, these
17
+ * overrides will be combined with the real output of a `useQuestionnaireStep` hook to produce
18
+ * a complete context value. When not provided, an actual provider with complete stateful data
19
+ * will be rendered.
20
+ */
21
+ contextValue?: Partial<QuestionnaireStepContextValue>;
8
22
  }>;
23
+ /**
24
+ * A test wrapper for unit testing questionnaire components.
25
+ */
26
+ export declare const Wrapper: React.FC<WrapperProps>;
@@ -1,5 +1,7 @@
1
- import { ClientTaxDocumentation } from '@taxbit/utilities';
2
1
  import { default as React } from 'react';
3
- import { QuestionnaireProp } from '../types';
2
+ import { WrapperProps } from './Wrapper';
4
3
 
5
- export declare const getWrapper: (initialData?: ClientTaxDocumentation, questionnaire?: QuestionnaireProp) => ({ children }: React.PropsWithChildren) => React.ReactNode | Promise<React.ReactNode>;
4
+ /**
5
+ * A helper function to create a test wrapper for unit testing questionnaire components.
6
+ */
7
+ export declare const getWrapper: (initialData?: WrapperProps["initialData"], questionnaire?: WrapperProps["questionnaire"], contextValue?: WrapperProps["contextValue"]) => ({ children }: React.PropsWithChildren) => React.ReactNode | Promise<React.ReactNode>;
@@ -0,0 +1,3 @@
1
+ import { WrapperProps } from './Wrapper';
2
+
3
+ export declare const renderWithWrapper: ({ contextValue, children, initialData, questionnaire, }: WrapperProps) => import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
@@ -13,6 +13,8 @@ export declare const expectSection: (title: string) => void;
13
13
  export declare const expectNoSection: (title: string) => void;
14
14
  export declare const expectDisabledInput: (ariaLabel: string) => void;
15
15
  export declare const expectInputValue: (ariaLabel: string, value: string) => void;
16
+ export declare const expectChecked: (label: string) => void;
17
+ export declare const expectUnchecked: (ariaLabel: string) => void;
16
18
  export declare const clickLabel: (ariaLabel: string) => void;
17
19
  export declare const clickShow: (text: string) => void;
18
20
  export declare const changeInput: (ariaLabel: string, value: string) => void;
@@ -208,12 +208,10 @@ export type RegardedOwnerTaxData = {
208
208
  export type SummaryData = {
209
209
  exemptFatcaCode?: string;
210
210
  exemptPayeeCode?: string;
211
- iAcknowledgeESignIsOk?: Yes;
212
211
  iAmACitizenOfTheUs?: Yes;
213
212
  iAmExemptFromFatcaReporting?: Yes;
214
213
  iAmNotSubjectToBackupWithholding?: Yes;
215
214
  iAuthorizeWithholdingAgent?: Yes;
216
- iCertifyToAll?: Yes;
217
215
  iConfirmIncomeIsNonUs?: Yes;
218
216
  iConfirmTheBeneficialOwnerIsExempt?: Yes;
219
217
  iConfirmNotAUsPerson?: Yes;
@@ -226,7 +224,6 @@ export type SummaryData = {
226
224
  iUnderstandTheInformationIsCovered?: Yes;
227
225
  iAcknowledgeTheInformationMayBeProvided?: Yes;
228
226
  iCertifyIAmAccountHolder?: Yes;
229
- iCertifyIWillNotifyPersons?: Yes;
230
227
  iDeclareStatementsAreCorrect?: Yes;
231
228
  iWillNotifyChangeInCircumstance?: Yes;
232
229
  signature?: string;
@@ -241,6 +238,10 @@ export type CalculatedData = {
241
238
  regardedOwnerAddress?: string;
242
239
  regardedOwnerMailingAddress?: string;
243
240
  };
244
- export type TaxDocumentation = AccountHolderContactData & AccountHolderCertifications & AccountHolderTaxData & AccountHolderClassificationData & RegardedOwnerCertifications & RegardedOwnerContactData & RegardedOwnerClassificationData & RegardedOwnerTaxData & SummaryData & CalculatedData & AccountHolderTreatyClaimData & RegardedOwnerTreatyClaimData & ControllingPersonClassificationData;
241
+ export type InformationalText = {
242
+ subjectToBackupWithholding?: undefined;
243
+ irsRequiresBackupWithholdingConsent?: undefined;
244
+ };
245
+ export type TaxDocumentation = AccountHolderContactData & AccountHolderCertifications & AccountHolderTaxData & AccountHolderClassificationData & RegardedOwnerCertifications & RegardedOwnerContactData & RegardedOwnerClassificationData & RegardedOwnerTaxData & SummaryData & CalculatedData & AccountHolderTreatyClaimData & RegardedOwnerTreatyClaimData & ControllingPersonClassificationData & InformationalText;
245
246
  export type TaxDocumentationKey = keyof TaxDocumentation;
246
247
  export {};
@@ -9,5 +9,6 @@ export type CheckBoxProps = {
9
9
  onClick?: (val: Yes | undefined) => void;
10
10
  disabled?: boolean;
11
11
  indicateRequired?: boolean;
12
+ defaultChecked?: boolean;
12
13
  };
13
- export declare const CheckBox: ({ label, subLabel, name, onClick, disabled, indicateRequired, }: CheckBoxProps) => React.JSX.Element;
14
+ export declare const CheckBox: ({ label, subLabel, name, onClick, disabled, indicateRequired, defaultChecked, }: CheckBoxProps) => React.JSX.Element;
@@ -13,4 +13,5 @@ export * from './ShowHideInput';
13
13
  export * from './TextArea';
14
14
  export * from './TextInput';
15
15
  export * from './ToggleButton';
16
+ export * from './useAriaAttributes';
16
17
  export * from './WithholdingInput';
@@ -0,0 +1,11 @@
1
+ import { TaxDocumentationKey } from '../types/TaxDocumentation';
2
+
3
+ /**
4
+ * Hook that returns any aria attributes needed to properly set up the given
5
+ * field for assistive technologies.
6
+ */
7
+ export declare const useAriaAttributes: (fieldName: TaxDocumentationKey) => {
8
+ 'aria-invalid': boolean;
9
+ 'aria-describedby': string | undefined;
10
+ 'aria-required': boolean;
11
+ };