@apolitical/component-library 6.0.4 → 6.1.0-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/password-form.d.ts +3 -11
- package/helpers/intl.d.ts +4 -0
- package/index.d.ts +1 -0
- package/index.js +38 -38
- package/index.mjs +3716 -3537
- package/package.json +1 -1
- package/polls/index.d.ts +1 -0
- package/polls/poll/components/index.d.ts +1 -0
- package/polls/poll/components/poll-option/index.d.ts +1 -0
- package/polls/poll/components/poll-option/poll-option.d.ts +18 -0
- package/polls/poll/index.d.ts +3 -0
- package/polls/poll/poll.d.ts +18 -0
- package/polls/poll/poll.enums.d.ts +4 -0
- package/polls/poll/poll.helpers.d.ts +9 -0
- package/polls/poll/poll.mocks.d.ts +58 -0
- package/polls/poll/poll.types.d.ts +10 -0
- package/style.css +1 -1
- package/styles/variables/colors/theme/_index.scss +3 -3
- package/styles/variables/colors/theme/_polls.scss +10 -0
- 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,20 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface IPasswordFormProps {
|
|
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
|
/** Specify custom text for the submit button */
|
|
20
12
|
button?: {
|
package/helpers/intl.d.ts
CHANGED
|
@@ -345,6 +345,10 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
345
345
|
signup_submitting: string;
|
|
346
346
|
signup_success_title: string;
|
|
347
347
|
signup_success_text: string;
|
|
348
|
+
poll_instructions: string;
|
|
349
|
+
poll_num_votes: string;
|
|
350
|
+
poll_remove_vote_button: string;
|
|
351
|
+
poll_aria_votes: string;
|
|
348
352
|
tableOfContents: string;
|
|
349
353
|
timeToComplete_hours: string;
|
|
350
354
|
timeToComplete_hours_short: string;
|