@apolitical/component-library 5.5.1 → 5.5.2-jc.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/components/form/form.types.d.ts +1 -1
- package/form/types/password-form/index.d.ts +1 -0
- package/form/types/password-form/password-form.d.ts +4 -12
- package/helpers/intl.d.ts +1 -0
- package/index.js +21 -21
- package/index.mjs +100 -98
- package/package.json +1 -1
- package/text/pill/index.d.ts +1 -0
- package/text/pill/pill.d.ts +2 -2
- package/text/status-banner/index.d.ts +1 -0
- package/text/status-banner/status-banner.d.ts +2 -2
|
@@ -13,7 +13,7 @@ export interface ILabel {
|
|
|
13
13
|
htmlFor?: string;
|
|
14
14
|
}
|
|
15
15
|
export type FormActionTypes = 'addError' | 'formSubmitted' | 'formSubmittedAndReset' | 'removeError' | 'submitForm' | 'updateValue';
|
|
16
|
-
export type FieldValidationConditions = boolean | 'no-numbers' | 'required' | 'valid-email' | 'valid-url' | 'custom-validation' | ((arg: IFormValues) => boolean);
|
|
16
|
+
export type FieldValidationConditions = boolean | 'no-numbers' | 'required' | 'valid-email' | 'valid-url' | 'custom-validation' | ((arg: IFormValues) => boolean | null | string);
|
|
17
17
|
export interface IFieldOption {
|
|
18
18
|
/** The ID of the option */
|
|
19
19
|
id: string;
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
2
|
+
import type { IFormProps, IFormValues } from '../../components/form/form.types';
|
|
3
|
+
export interface IPasswordFormProps extends Omit<IFormProps, 'id' | 'fields'> {
|
|
4
4
|
/** Indicated for whether to show the current password field */
|
|
5
5
|
isPasswordChange?: boolean;
|
|
6
6
|
/** The functions being passed to the form */
|
|
7
|
-
functions: {
|
|
7
|
+
functions: IFormProps['functions'] & {
|
|
8
8
|
/** The function to call to create the password */
|
|
9
9
|
createPassword: (arg: IFormValues) => Promise<void>;
|
|
10
|
-
/** The function to call when onSuccess fails */
|
|
11
|
-
onCatch?: (error?: unknown) => void;
|
|
12
|
-
/** The function to call when the form submission fails */
|
|
13
|
-
onFailure?: (arg: IFormValues, arg2?: FormValues) => void;
|
|
14
|
-
/** The function to call when the form is successfully submitted */
|
|
15
|
-
onSuccess?: (arg: IFormValues) => Promise<void>;
|
|
16
|
-
/** The function to call when the cancel button is clicked */
|
|
17
|
-
onCancel?: () => void;
|
|
18
10
|
};
|
|
19
11
|
}
|
|
20
|
-
declare const PasswordForm: React.FC<
|
|
12
|
+
declare const PasswordForm: React.FC<IPasswordFormProps>;
|
|
21
13
|
export default PasswordForm;
|
package/helpers/intl.d.ts
CHANGED
|
@@ -278,6 +278,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
278
278
|
publishArticleForm_subtitle_label: string;
|
|
279
279
|
publishArticleForm_subtitle_placeholder: string;
|
|
280
280
|
publishArticleForm_body_label: string;
|
|
281
|
+
publishArticleForm_body_placeholder: string;
|
|
281
282
|
publishArticleForm_disclaimer: string;
|
|
282
283
|
publishArticleForm_cta_submit: string;
|
|
283
284
|
publishArticleForm_cta_submitting: string;
|