@apolitical/component-library 3.3.1-beta.0 → 3.3.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.
- package/cards/cards.types.d.ts +2 -0
- package/form/components/form/components/fields/checkbox/checkbox.d.ts +1 -1
- package/form/components/form/components/fields/input/input.d.ts +1 -1
- package/form/components/form/form.types.d.ts +1 -1
- package/form/components/password-rules/password-rules.d.ts +1 -1
- package/form/types/index.d.ts +1 -0
- package/form/types/password-form/helper.d.ts +1 -0
- package/form/types/password-form/index.d.ts +2 -0
- package/form/types/password-form/password-form.d.ts +21 -0
- package/general/index.d.ts +1 -0
- package/general/progress-tracker/index.d.ts +1 -0
- package/general/progress-tracker/progress-tracker.d.ts +9 -0
- package/helpers/intl.d.ts +5 -2
- package/index.js +18 -18
- package/index.mjs +3306 -3188
- package/layout/page-layout/page-layout.d.ts +2 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/variables/colors/theme/_general.scss +5 -0
- package/user/contributors/contributors.d.ts +1 -3
package/cards/cards.types.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ export interface CarouselTitleProps {
|
|
|
92
92
|
size?: 'medium' | 'large';
|
|
93
93
|
/** The `href` to point the 'view all' link to; it won't show unless this is defined */
|
|
94
94
|
link?: string;
|
|
95
|
+
/** Whether the title should be hidden */
|
|
96
|
+
hidden?: boolean;
|
|
95
97
|
}
|
|
96
98
|
export interface BaseCarouselProps {
|
|
97
99
|
/** A function to parse and build the card data - this is especially needed in carousels to hydrate the cards */
|
|
@@ -27,7 +27,7 @@ export declare const Checkbox: ({ className, disabled, element, functions: allFu
|
|
|
27
27
|
options?: import("../../../form.types").IFieldOption[] | undefined;
|
|
28
28
|
placeholder?: string | undefined;
|
|
29
29
|
props?: {
|
|
30
|
-
[key: string]: string | boolean | React.RefObject<any> | (() => void);
|
|
30
|
+
[key: string]: string | boolean | object | React.RefObject<any> | (() => void);
|
|
31
31
|
} | undefined;
|
|
32
32
|
required?: boolean | undefined;
|
|
33
33
|
validation?: import("../../../form.types").IFieldValidation[] | undefined;
|
|
@@ -35,7 +35,7 @@ export declare const Input: ({ className, element, id, inputRef: ref, functions,
|
|
|
35
35
|
} | undefined;
|
|
36
36
|
options?: import("../../../form.types").IFieldOption[] | undefined;
|
|
37
37
|
props?: {
|
|
38
|
-
[key: string]: string | boolean | React.RefObject<any> | (() => void);
|
|
38
|
+
[key: string]: string | boolean | object | React.RefObject<any> | (() => void);
|
|
39
39
|
} | undefined;
|
|
40
40
|
required?: boolean | undefined;
|
|
41
41
|
shownValue?: InputValues | undefined;
|
|
@@ -134,7 +134,7 @@ export interface IField {
|
|
|
134
134
|
placeholder?: string;
|
|
135
135
|
/** Additional props to be passed to the field */
|
|
136
136
|
props?: {
|
|
137
|
-
[key: string]: string | boolean | (() => void) | React.RefObject<any>;
|
|
137
|
+
[key: string]: string | boolean | object | (() => void) | React.RefObject<any>;
|
|
138
138
|
};
|
|
139
139
|
/** Whether the field is required */
|
|
140
140
|
required?: boolean;
|
package/form/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function generateConditions(conditions: any): any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormValues, IFormValues } from '../../components/form/form.types';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Indicated for whether to show the current password field */
|
|
5
|
+
isPasswordChange?: boolean;
|
|
6
|
+
/** The functions being passed to the form */
|
|
7
|
+
functions: {
|
|
8
|
+
/** The function to call to create the password */
|
|
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
|
+
};
|
|
19
|
+
}
|
|
20
|
+
declare const PasswordForm: React.FC<Props>;
|
|
21
|
+
export default PasswordForm;
|
package/general/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './buttons';
|
|
|
2
2
|
export * from './divider';
|
|
3
3
|
export * from './image-container';
|
|
4
4
|
export * from './link';
|
|
5
|
+
export * from './progress-tracker';
|
|
5
6
|
export * from './responsive-image';
|
|
6
7
|
export * from './return-to-nav-button';
|
|
7
8
|
export * from './table-of-contents';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ProgressTracker } from './progress-tracker';
|
package/helpers/intl.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
10
10
|
card_ended: string;
|
|
11
11
|
card_registered: string;
|
|
12
12
|
card_partner: string;
|
|
13
|
-
card_contributors_event: string;
|
|
14
|
-
card_contributors_solutionArticle: string;
|
|
15
13
|
card_answers: string;
|
|
16
14
|
card_time_ago: string;
|
|
17
15
|
card_time_read: string;
|
|
@@ -187,12 +185,16 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
187
185
|
inviteForm_ctaSendMoreInvites: string;
|
|
188
186
|
inviteForm_ctaDone: string;
|
|
189
187
|
inputAutocomplete_placeholder: string;
|
|
188
|
+
passwordRules_unmatched_text: string;
|
|
190
189
|
passwordRules_intro: string;
|
|
191
190
|
passwordRules_rule_label: string;
|
|
192
191
|
passwordRules_rule_8Characters: string;
|
|
193
192
|
passwordRules_rule_numberSymbol: string;
|
|
194
193
|
passwordRules_rule_lowercaseUppercase: string;
|
|
195
194
|
passwordRules_notMet: string;
|
|
195
|
+
passwordRules_currentPassword_label: string;
|
|
196
|
+
passwordRules_newPassword_label: string;
|
|
197
|
+
passwordRules_confirmPassword_label: string;
|
|
196
198
|
profile_image_change_uploading_text: string;
|
|
197
199
|
profile_image_change_cta_with_picture: string;
|
|
198
200
|
profile_image_change_cta_without_picture: string;
|
|
@@ -239,6 +241,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
239
241
|
timeToComplete_range_aria: string;
|
|
240
242
|
tooltip_loading: string;
|
|
241
243
|
return_to_nav_button: string;
|
|
244
|
+
progress_tracker_steps: string;
|
|
242
245
|
cookieBanner_title: string;
|
|
243
246
|
cookieBanner_text: string;
|
|
244
247
|
cookieBanner_buttons_settings: string;
|