@apolitical/component-library 5.5.4-beta.0 → 5.5.5-SW.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.
- package/form/types/password-form/index.d.ts +1 -1
- package/form/types/password-form/password-form.d.ts +6 -2
- package/form/types/profile-form/profile-form.d.ts +8 -2
- package/general/progress-tracker/index.d.ts +1 -1
- package/general/progress-tracker/progress-tracker.d.ts +2 -2
- package/index.js +8 -8
- package/index.mjs +208 -193
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as PasswordForm } from './password-form';
|
|
1
|
+
export { default as PasswordForm, type IPasswordFormProps } from './password-form';
|
|
2
2
|
export * from './helper';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormValues, IFormValues } from '../../components/form/form.types';
|
|
3
|
-
interface
|
|
3
|
+
export interface IPasswordFormProps {
|
|
4
4
|
/** Indicated for whether to show the current password field */
|
|
5
5
|
isPasswordChange?: boolean;
|
|
6
6
|
/** The functions being passed to the form */
|
|
@@ -16,6 +16,10 @@ interface Props {
|
|
|
16
16
|
/** The function to call when the cancel button is clicked */
|
|
17
17
|
onCancel?: () => void;
|
|
18
18
|
};
|
|
19
|
+
/** Specify custom text for the submit button */
|
|
20
|
+
button?: {
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
19
23
|
}
|
|
20
|
-
declare const PasswordForm: React.FC<
|
|
24
|
+
declare const PasswordForm: React.FC<IPasswordFormProps>;
|
|
21
25
|
export default PasswordForm;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { IFormValues, IFormMeta } from './../../components/form/form.types';
|
|
2
2
|
export interface IProfileFormProps<OnSuccessArgs = IFormValues> {
|
|
3
|
+
/** Indicated for whether to the form is for creating the profile */
|
|
4
|
+
isCreateProfile?: boolean;
|
|
3
5
|
/** The hooks used in the form */
|
|
4
6
|
hooks: {
|
|
5
7
|
/** The hook to predict the user's location */
|
|
@@ -16,7 +18,7 @@ export interface IProfileFormProps<OnSuccessArgs = IFormValues> {
|
|
|
16
18
|
/** The functions to call */
|
|
17
19
|
functions: {
|
|
18
20
|
/** The function to upload the user's profile image */
|
|
19
|
-
uploadImage
|
|
21
|
+
uploadImage?: () => Promise<unknown>;
|
|
20
22
|
/** The function to call on success */
|
|
21
23
|
onSuccess?: (data: OnSuccessArgs) => Promise<void>;
|
|
22
24
|
/** The function to call when the form is cancelled, e.g. the user presses a cancel button */
|
|
@@ -31,6 +33,10 @@ export interface IProfileFormProps<OnSuccessArgs = IFormValues> {
|
|
|
31
33
|
context?: string;
|
|
32
34
|
event?: string;
|
|
33
35
|
};
|
|
36
|
+
/** Specify custom text for the submit button */
|
|
37
|
+
button?: {
|
|
38
|
+
text: string;
|
|
39
|
+
};
|
|
34
40
|
}
|
|
35
|
-
declare const ProfileForm: ({ hooks, functions, meta, gtm }: IProfileFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
declare const ProfileForm: ({ isCreateProfile, hooks, functions, meta, gtm, ...props }: IProfileFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
42
|
export default ProfileForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ProgressTracker } from './progress-tracker';
|
|
1
|
+
export { default as ProgressTracker, type INavigationDotsProps as IProgressTrackerProps, } from './progress-tracker';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface
|
|
2
|
+
export interface INavigationDotsProps {
|
|
3
3
|
/** The current step */
|
|
4
4
|
currentStep?: number;
|
|
5
5
|
/** The total number of steps */
|
|
6
6
|
steps?: number;
|
|
7
7
|
}
|
|
8
|
-
declare const NavigationDots: React.FC<
|
|
8
|
+
declare const NavigationDots: React.FC<INavigationDotsProps>;
|
|
9
9
|
export default NavigationDots;
|