@adyen/kyc-components 2.41.4 → 2.42.1

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 (28) hide show
  1. package/dist/es/adyen-kyc-components.es.js +334 -570
  2. package/dist/style.css +1 -0
  3. package/dist/types/components/BankDocument/types.d.ts +1 -2
  4. package/dist/types/components/BankVerification/BankVerification.d.ts +1 -1
  5. package/dist/types/components/BankVerification/types.d.ts +5 -5
  6. package/dist/types/components/CompanyBasics/types.d.ts +3 -3
  7. package/dist/types/components/CompanyLookup/types.d.ts +4 -4
  8. package/dist/types/components/Individual/types.d.ts +2 -2
  9. package/dist/types/components/PayoutDetails/types.d.ts +2 -2
  10. package/dist/types/components/TaskList/types.d.ts +2 -2
  11. package/dist/types/components/internal/Address/constants.d.ts +1 -0
  12. package/dist/types/components/internal/BusinessRegistrationNumberField/types.d.ts +2 -2
  13. package/dist/types/components/internal/DocumentGuidance/DocumentGuidance.d.ts +1 -1
  14. package/dist/types/components/internal/DocumentGuidance/{type.d.ts → types.d.ts} +5 -0
  15. package/dist/types/components/internal/EntityAssociation/types.d.ts +2 -2
  16. package/dist/types/components/internal/Remove/types.d.ts +3 -3
  17. package/dist/types/components/internal/TaxInformationField/types.d.ts +2 -2
  18. package/dist/types/components/internal/VatNumberField/types.d.ts +2 -2
  19. package/dist/types/core/hooks/introduction/useHasSeenIntroduction.d.ts +1 -1
  20. package/dist/types/core/hooks/singpass/useHasSeenSingpassSelection.d.ts +1 -1
  21. package/dist/types/core/hooks/useCompanySearch/types.d.ts +2 -2
  22. package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +3 -3
  23. package/dist/types/core/hooks/useForm/types.d.ts +8 -8
  24. package/dist/types/core/hooks/useFormComposer.d.ts +2 -2
  25. package/dist/types/core/hooks/useIsElementVisible.d.ts +2 -2
  26. package/dist/types/core/hooks/useLocalStorage.d.ts +2 -2
  27. package/dist/types/utils/useStateFromProp.d.ts +2 -2
  28. package/package.json +1 -1
package/dist/style.css CHANGED
@@ -2786,6 +2786,7 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
2786
2786
  gap: 24px;
2787
2787
  justify-content: space-between;
2788
2788
  min-width: 576px;
2789
+ min-height: 150px;
2789
2790
  }
2790
2791
 
2791
2792
  .adl-document-guidance__item {
@@ -18,8 +18,7 @@ export declare enum BankDocumentTypes {
18
18
  DEPOSIT_SLIP = "depositSlip",
19
19
  SCREENSHOT_OF_BANK = "screenshotOfOnlineBankingEnviroment",
20
20
  OFFICIAL_EMAIL = "officialEmailOrALetterFromYourBank",
21
- CHECK = "check",
22
- RELEVE_DIDENTITE = "releveDidentiteBancaire"
21
+ CHECK = "check"
23
22
  }
24
23
  export interface DocumentsModifiers {
25
24
  rootEntityType: LegalEntityType;
@@ -2,7 +2,7 @@ import './BankVerification.scss';
2
2
  import type { AccountVerificationSchema, InstantVerificationErrorNotification, PayoutAccountVerificationProps } from './types';
3
3
  export declare const accountVerificationFields: Array<keyof AccountVerificationSchema>;
4
4
  export declare const InstantVerificationErrorContext: import("preact").Context<InstantVerificationErrorNotification>;
5
- export declare const useInstantVerificationErrorNotification: (notificationVisibilityDuration: number) => readonly [InstantVerificationErrorNotification, import("preact/hooks").StateUpdater<InstantVerificationErrorNotification>];
5
+ export declare const useInstantVerificationErrorNotification: (notificationVisibilityDuration: number) => readonly [InstantVerificationErrorNotification, import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<InstantVerificationErrorNotification>>];
6
6
  declare function BankVerification(props: PayoutAccountVerificationProps): import("preact").JSX.Element;
7
7
  declare const _default: typeof BankVerification;
8
8
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseInnerFormProps } from '../../core/hooks/useForm';
3
3
  import type { BankVerificationVendorsResponse } from '../../core/models/api/get-bankVerification-providers';
4
4
  import type { LegalEntity } from '../../core/models/api/legal-entity';
@@ -22,13 +22,13 @@ export interface AccountVerificationSchema {
22
22
  }
23
23
  export interface PayoutAccountVerificationProps extends BaseInnerFormProps<AccountVerificationSchema> {
24
24
  getBankVerificationVendors: DropinAPIHandlers['handleGetBankVerificationVendors'];
25
- setBankVerificationError: StateUpdater<InstantVerificationErrorNotification | null>;
25
+ setBankVerificationError: Dispatch<StateUpdater<InstantVerificationErrorNotification | null>>;
26
26
  onBack?: () => void;
27
27
  country: CountryCode;
28
- hideDropinLayout?: StateUpdater<boolean>;
28
+ hideDropinLayout?: Dispatch<StateUpdater<boolean>>;
29
29
  bankInfoValidated?: boolean;
30
- setBankInfoValidated?: StateUpdater<boolean>;
31
- hideOnHomeButton?: StateUpdater<boolean>;
30
+ setBankInfoValidated?: Dispatch<StateUpdater<boolean>>;
31
+ hideOnHomeButton?: Dispatch<StateUpdater<boolean>>;
32
32
  formIsActive: boolean;
33
33
  refreshLegalEntity?(): Promise<LegalEntity>;
34
34
  createTrustedTransferInstrument?: (code: string, state: string) => Promise<CreateTrustedTransferInstrumentResponse>;
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseInnerFormProps } from '../../core/hooks/useForm';
3
3
  import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
4
4
  import type { CountryCode } from '../../core/models/country-code';
@@ -17,8 +17,8 @@ export interface CompanyBasicsProps extends BaseInnerFormProps<CompanyBasicsSche
17
17
  isTopLevelEntity: boolean;
18
18
  baseTrackingPayload: BaseTrackingPayload;
19
19
  kompanyVerifiedData: CompanySearchSchema | undefined;
20
- setKompanyAddress: StateUpdater<string | undefined>;
21
- setKompanyVerifiedData: StateUpdater<CompanySearchSchema | undefined>;
20
+ setKompanyAddress: Dispatch<StateUpdater<string | undefined>>;
21
+ setKompanyVerifiedData: Dispatch<StateUpdater<CompanySearchSchema | undefined>>;
22
22
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
23
23
  handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
24
24
  handleGetCompanyDataset: DropinAPIHandlers['handleGetCompanyDataset'];
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { HookStatus } from '../../core/hooks/types';
3
3
  import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
4
4
  import type { CountryCode } from '../../core/models/country-code';
@@ -54,9 +54,9 @@ export interface CompanyLookupComponentProps {
54
54
  baseTrackingPayload: BaseTrackingPayload;
55
55
  stateOrProvince?: StateCode | ProvinceCode;
56
56
  taxInformationNumber?: string;
57
- setLoading: StateUpdater<boolean>;
58
- setKompanyAddress: StateUpdater<string | undefined>;
59
- setKompanyVerifiedData: StateUpdater<CompanySearchSchema | undefined>;
57
+ setLoading: Dispatch<StateUpdater<boolean>>;
58
+ setKompanyAddress: Dispatch<StateUpdater<string | undefined>>;
59
+ setKompanyVerifiedData: Dispatch<StateUpdater<CompanySearchSchema | undefined>>;
60
60
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
61
61
  handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
62
62
  handleGetCompanyDataset: DropinAPIHandlers['handleGetCompanyDataset'];
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseOuterFormProps } from '../../core/hooks/useForm';
3
3
  import type { DecisionMakerType } from '../../core/models/api/decision-maker-type';
4
4
  import type { InstantIdVerificationTokenRequest, InstantIdVerificationTokenResponse } from '../../core/models/api/instant-id-verification';
@@ -35,7 +35,7 @@ export interface IndividualProps extends BaseOuterFormProps<IndividualSchema> {
35
35
  taskType?: TaskTypes;
36
36
  allowedRoles?: DecisionMakerType[];
37
37
  onTypeSwitch?(legalEntityType: LegalEntityType): void;
38
- onCountryChange?: StateUpdater<CountryCode>;
38
+ onCountryChange?: Dispatch<StateUpdater<CountryCode>>;
39
39
  onNext?(e: any, callbacks: any, isValid: any): void;
40
40
  onBack?(): void;
41
41
  hideNavigation?: boolean;
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseOuterFormProps } from '../../core/hooks/useForm';
3
3
  import type { CapabilityName } from '../../core/models/api/capability';
4
4
  import type { ExistingLegalEntity, LegalEntity } from '../../core/models/api/legal-entity';
@@ -44,7 +44,7 @@ export type PayoutDropinApiHandlers = Required<Pick<DropinAPIHandlers, 'handleCr
44
44
  export interface PayoutDetailsDropinProps extends Omit<PayoutDetailsProps, 'country' | 'accountHolder'>, Omit<DropinProps, 'legalEntityResponse'>, PayoutDropinApiHandlers {
45
45
  accountHolder?: string;
46
46
  transferInstrument?: TransferInstrument;
47
- setTransferInstrument?: StateUpdater<TransferInstrument>;
47
+ setTransferInstrument?: Dispatch<StateUpdater<TransferInstrument>>;
48
48
  navigateBackToTaskList?(): void;
49
49
  hideNavigation?: boolean;
50
50
  onSubmit?: (data: PayoutDetailsSchema & {
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { PciStatus } from '../../core/models/api/contracts';
3
3
  import type { ExistingLegalEntity } from '../../core/models/api/legal-entity';
4
4
  import type { CapabilityProblems } from '../../core/models/errors/capability-problems';
@@ -90,5 +90,5 @@ export interface TaskListItemProps extends TaskStatusProps {
90
90
  warningMessage?: string;
91
91
  removeEntity?: () => void;
92
92
  isRemoveDisabled?: boolean;
93
- handleIsRemoveDisabled?: StateUpdater<boolean>;
93
+ handleIsRemoveDisabled?: Dispatch<StateUpdater<boolean>>;
94
94
  }
@@ -3,5 +3,6 @@ import type { AddressLabels, AddressSchemas } from './types';
3
3
  export declare const ADDRESS_SCHEMA: readonly ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
4
4
  export declare const COUNTRIES_WITH_STATES_DATASET: CountryCode[];
5
5
  export declare const COUNTRIES_WITH_HOUSE_NUMBER_FIRST: CountryCode[];
6
+ export declare const COUNTRIES_WITH_COMMA_SEPARATED: CountryCode[];
6
7
  export declare const ADDRESS_SCHEMAS: AddressSchemas;
7
8
  export declare const LABELS: AddressLabels;
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
3
3
  import type { CompanyTypesValue } from '../../../core/models/api/company-types-value';
4
4
  import type { CountryCode } from '../../../core/models/country-code';
@@ -13,5 +13,5 @@ export interface BusinessRegistrationNumberFieldProps extends BaseFormFieldProps
13
13
  companyType?: CompanyTypesValue | 'trust';
14
14
  registrationNumberOptions: readonly CompanyRegistrationNumberOption[] | undefined;
15
15
  registrationNumberType: CompanyRegistrationNumberType | undefined;
16
- setRegistrationNumberType: StateUpdater<CompanyRegistrationNumberType | undefined>;
16
+ setRegistrationNumberType: Dispatch<StateUpdater<CompanyRegistrationNumberType | undefined>>;
17
17
  }
@@ -1,4 +1,4 @@
1
1
  import './_document-guidance.component.scss';
2
- import type { DocumentGuidanceProps } from './type';
2
+ import type { DocumentGuidanceProps } from './types';
3
3
  declare function DocumentGuidance({ type, className }: DocumentGuidanceProps): import("preact").JSX.Element;
4
4
  export default DocumentGuidance;
@@ -1,5 +1,10 @@
1
1
  import type { DocumentType } from '../../../core/models/api/document';
2
+ import type { Translatable } from '../../../language/types';
2
3
  export interface DocumentGuidanceProps {
3
4
  type?: DocumentType;
4
5
  className?: string;
5
6
  }
7
+ export interface DocumentGuidanceItem {
8
+ type: string;
9
+ translationKey: Translatable;
10
+ }
@@ -1,5 +1,5 @@
1
1
  import type { ComponentChild } from 'preact';
2
- import type { StateUpdater } from 'preact/hooks';
2
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
3
3
  import type { LegalEntityAssociation } from '../../../core/models/api/legal-entity-association';
4
4
  import type { LegalEntityType } from '../../../core/models/api/legal-entity-type';
5
5
  import type { EntityProblems } from '../../../core/models/errors/entity-problems';
@@ -15,7 +15,7 @@ export interface EntityAssociationProps {
15
15
  onNavigateToEntity?: () => void;
16
16
  removeEntity?: () => void;
17
17
  isRemoveDisabled?: boolean;
18
- handleIsRemoveDisabled?: StateUpdater<boolean>;
18
+ handleIsRemoveDisabled?: Dispatch<StateUpdater<boolean>>;
19
19
  }
20
20
  export interface UniqueEntityAssociation {
21
21
  /**
@@ -1,9 +1,9 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { TranslationKey } from '../../../language/types';
3
3
  export interface RemoveProps {
4
4
  onRemove: () => void | Promise<void>;
5
- onRemoveStatusChange?: StateUpdater<boolean>;
5
+ onRemoveStatusChange?: Dispatch<StateUpdater<boolean>>;
6
6
  isRemoveDisabled?: boolean;
7
- handleIsRemoveDisabled?: StateUpdater<boolean>;
7
+ handleIsRemoveDisabled?: Dispatch<StateUpdater<boolean>>;
8
8
  label?: TranslationKey;
9
9
  }
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
3
3
  import type { CompanyTypesValue } from '../../../core/models/api/company-types-value';
4
4
  import type { LegalEntityType } from '../../../core/models/api/legal-entity-type';
@@ -14,7 +14,7 @@ export interface TaxInformationFieldProps extends BaseFormFieldProps<TaxInformat
14
14
  country: CountryCode;
15
15
  canExempt: boolean;
16
16
  taxIdNumberType: TaxIdNumberType | undefined;
17
- setTaxIdNumberType: StateUpdater<TaxIdNumberType | undefined>;
17
+ setTaxIdNumberType: Dispatch<StateUpdater<TaxIdNumberType | undefined>>;
18
18
  companyType?: CompanyTypesValue | LegalEntityType.TRUST;
19
19
  isUen?: boolean;
20
20
  }
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
3
3
  import type { CountryCode } from '../../../core/models/country-code';
4
4
  import type { TaxIdNumberType } from '../IdFieldTypeSelector/countryIdNumberTypes';
@@ -11,5 +11,5 @@ export interface VatNumberFieldProps extends BaseFormFieldProps<VatNumberFieldSc
11
11
  country: CountryCode;
12
12
  canExempt: boolean;
13
13
  vatNumberType: TaxIdNumberType | undefined;
14
- setVatNumberType: StateUpdater<TaxIdNumberType | undefined>;
14
+ setVatNumberType: Dispatch<StateUpdater<TaxIdNumberType | undefined>>;
15
15
  }
@@ -3,5 +3,5 @@ export interface UseHasSeenIntroductionProps {
3
3
  }
4
4
  export declare const useHasSeenIntroduction: ({ legalEntityId }: UseHasSeenIntroductionProps) => {
5
5
  hasSeenIntroduction: boolean;
6
- setHasSeenIntroduction: import("preact/hooks").StateUpdater<boolean>;
6
+ setHasSeenIntroduction: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
7
7
  };
@@ -3,5 +3,5 @@ export interface UseHasSeenSingpassSelectionProps {
3
3
  }
4
4
  export declare const useHasSeenSingpassSelection: ({ legalEntityId, }: UseHasSeenSingpassSelectionProps) => {
5
5
  hasSeenSingpassSelection: boolean;
6
- setHasSeenSingpassSelection: import("preact/hooks").StateUpdater<boolean>;
6
+ setHasSeenSingpassSelection: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import type { AxiosError } from 'axios';
2
- import type { StateUpdater } from 'preact/hooks';
2
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
3
3
  import type { CompanyBasicsSchema } from '../../../components/CompanyBasics/types';
4
4
  import type { DropinAPIHandlers } from '../../../components/Dropins/types';
5
5
  import type { ValidatorMode } from '../../../utils/validation/types';
@@ -26,7 +26,7 @@ export interface UseCompanySearchOptions {
26
26
  canVerify: boolean;
27
27
  baseTrackingPayload: BaseTrackingPayload;
28
28
  limit?: number;
29
- setKompanyAddress: StateUpdater<string | undefined>;
29
+ setKompanyAddress: Dispatch<StateUpdater<string | undefined>>;
30
30
  handleChangeFor: (key: keyof CompanyBasicsSchema, mode?: ValidatorMode) => (e: any) => void;
31
31
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
32
32
  handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { CompanySearchSchema } from '../../components/CompanySearch/types';
3
3
  import type { DropinAPIHandlers } from '../../components/Dropins/types';
4
4
  import type { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
@@ -23,8 +23,8 @@ export interface FormTaskSubmitOptions {
23
23
  baseTrackingPayload: BaseTrackingPayload;
24
24
  isTargetLegalEntityType: boolean;
25
25
  documentUtils: DocumentApiUtils;
26
- setProblems: StateUpdater<EntityProblems | undefined>;
27
- setLoadingStatus: StateUpdater<LoadingStatus>;
26
+ setProblems: Dispatch<StateUpdater<EntityProblems | undefined>>;
27
+ setLoadingStatus: Dispatch<StateUpdater<LoadingStatus>>;
28
28
  onExternalSubmit?: (company: CompanySearchSchema) => void;
29
29
  handleUpdateLegalEntity: Required<DropinAPIHandlers>['handleUpdateLegalEntity'];
30
30
  }
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { Translatable, TranslationKey } from '../../../language/types';
3
3
  import type { Mask } from '../../../utils/masking/maskTypes';
4
4
  import type { ValidationRuleResult, ValidatorMode, ValidatorRules } from '../../../utils/validation/types';
@@ -108,13 +108,13 @@ export interface BaseOuterFormProps<FormSchema> extends BaseFormProps<FormSchema
108
108
  };
109
109
  evaluateConfiguration?: (data: FormSchema) => void;
110
110
  setCustomFormNavigationHandlers?(formId: string, onNext: () => void, onBack: () => void): void;
111
- setHideDropinLayout?: StateUpdater<boolean>;
112
- setHideNavigation?: StateUpdater<boolean>;
113
- setHideFooter?: StateUpdater<boolean>;
114
- setHideOnHomeButton?: StateUpdater<boolean>;
115
- setHideBackButton?: StateUpdater<boolean>;
116
- setSubmitButtonLabel?: StateUpdater<TranslationKey>;
117
- setSkipSubmit?: StateUpdater<boolean>;
111
+ setHideDropinLayout?: Dispatch<StateUpdater<boolean>>;
112
+ setHideNavigation?: Dispatch<StateUpdater<boolean>>;
113
+ setHideFooter?: Dispatch<StateUpdater<boolean>>;
114
+ setHideOnHomeButton?: Dispatch<StateUpdater<boolean>>;
115
+ setHideBackButton?: Dispatch<StateUpdater<boolean>>;
116
+ setSubmitButtonLabel?: Dispatch<StateUpdater<TranslationKey>>;
117
+ setSkipSubmit?: Dispatch<StateUpdater<boolean>>;
118
118
  }
119
119
  export interface BaseInnerFormProps<FormSchema> extends BaseFormProps<FormSchema> {
120
120
  formVerificationErrors?: FormVerificationErrors;
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { TranslationKey } from '../../language/types';
3
3
  import type { EntityProblems } from '../models/errors/entity-problems';
4
4
  import type { FormModelWithValidity } from '../models/form';
@@ -10,7 +10,7 @@ export interface FormComposer {
10
10
  gotoFormByFormIndex(index: number): void;
11
11
  activeForm: FormModelWithValidity;
12
12
  shouldValidate: boolean;
13
- setShouldValidate: StateUpdater<boolean>;
13
+ setShouldValidate: Dispatch<StateUpdater<boolean>>;
14
14
  }
15
15
  export declare const useFormComposer: ({ problems, baseTrackingPayload, forms, formRef, submitButtonLabel, externalBackClick, onSubmit, skipSubmit, onSkipSubmit, }: {
16
16
  problems?: EntityProblems;
@@ -1,2 +1,2 @@
1
- import type { Ref } from 'preact/hooks';
2
- export declare function useIsElementVisible(ref: Ref<Element>, fallback?: boolean): boolean;
1
+ import type { MutableRef } from 'preact/hooks';
2
+ export declare function useIsElementVisible(ref: MutableRef<Element>, fallback?: boolean): boolean;
@@ -1,4 +1,4 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  type Serializer<T> = (object: T | undefined) => string;
3
3
  type Parser<T> = (val: string) => T | undefined;
4
4
  type Options<T> = Partial<{
@@ -10,5 +10,5 @@ export declare const useLocalStorage: <T>(key: string, defaultValue: T, options?
10
10
  serializer: Serializer<T>;
11
11
  parser: Parser<T>;
12
12
  syncData: boolean;
13
- }>) => [T, StateUpdater<T>];
13
+ }>) => [T, Dispatch<StateUpdater<T>>];
14
14
  export {};
@@ -1,9 +1,9 @@
1
- import type { StateUpdater } from 'preact/hooks';
1
+ import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  type UseStateFromPropParams<T> = {
3
3
  initialValue?: T;
4
4
  passedValue: T;
5
5
  skipUpdate?: boolean;
6
6
  };
7
- type UseStateFromPropReturn<T> = [T | undefined, StateUpdater<T | undefined>];
7
+ type UseStateFromPropReturn<T> = [T | undefined, Dispatch<StateUpdater<T | undefined>>];
8
8
  declare const useStateFromProp: <T>({ initialValue, passedValue, skipUpdate, }: UseStateFromPropParams<T>) => UseStateFromPropReturn<T>;
9
9
  export default useStateFromProp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.41.4",
3
+ "version": "2.42.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [