@apolitical/component-library 5.0.0 → 5.0.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/card-block/card-block.d.ts +2 -2
- package/cards/card-block/index.d.ts +1 -0
- package/discussion/sections/activity-section/activity-section.d.ts +2 -2
- package/discussion/sections/activity-section/index.d.ts +1 -0
- package/form/components/form/index.d.ts +1 -1
- package/form/types/profile-form/profile-form.d.ts +3 -3
- package/general/tooltip/tooltip.d.ts +7 -2
- package/helpers/intl.d.ts +6 -2
- package/index.js +52 -52
- package/index.mjs +5754 -5659
- package/layout/content-layout/columns/columns.d.ts +2 -2
- package/layout/content-layout/columns/index.d.ts +1 -0
- package/navigation/load-more/index.d.ts +1 -1
- package/navigation/load-more/load-more.d.ts +3 -3
- package/navigation/tabs/index.d.ts +1 -0
- package/navigation/tabs/tabs.d.ts +6 -6
- package/package.json +1 -1
- package/sections/edit-section/edit-section.d.ts +2 -2
- package/sections/edit-section/index.d.ts +1 -0
- package/style.css +1 -1
- package/styles/variables/colors/theme/_base.scss +1 -0
- package/text/empty-state-box/empty-state-box.d.ts +2 -2
- package/text/empty-state-box/index.d.ts +1 -0
- package/text/helper-text-box/helper-text-box.d.ts +2 -0
- package/text/hide-show-text-box/hide-show-text-box.d.ts +2 -2
- package/text/hide-show-text-box/index.d.ts +1 -0
- package/text/highlighted-text-box/highlighted-text-box.d.ts +2 -2
- package/text/highlighted-text-box/index.d.ts +1 -0
- package/user/profile-picture/index.d.ts +1 -0
- package/user/profile-picture/profile-picture.d.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CardType, CardContentType, BuildCardDataType } from '../../cards/cards.types';
|
|
2
|
-
interface
|
|
2
|
+
export interface ICardBlockProps {
|
|
3
3
|
/** The card data, from Contentful */
|
|
4
4
|
cards: CardType[];
|
|
5
5
|
/** The types for each card, from Contentful */
|
|
@@ -12,5 +12,5 @@ interface Props {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
focusCardIndex?: number;
|
|
14
14
|
}
|
|
15
|
-
declare const CardBlock: ({ cards, cardTypes, className, ...props }:
|
|
15
|
+
declare const CardBlock: ({ cards, cardTypes, className, ...props }: ICardBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default CardBlock;
|
|
@@ -6,7 +6,7 @@ import { type IQueryFns } from './cache';
|
|
|
6
6
|
interface IActivitySectionQueryFns extends IQueryFns {
|
|
7
7
|
remove: () => Promise<void>;
|
|
8
8
|
}
|
|
9
|
-
interface
|
|
9
|
+
export interface IActivitySectionProps {
|
|
10
10
|
basePath: string;
|
|
11
11
|
parentId: string;
|
|
12
12
|
activityId: string;
|
|
@@ -21,5 +21,5 @@ interface Props {
|
|
|
21
21
|
};
|
|
22
22
|
profile: IProfileFormProps;
|
|
23
23
|
}
|
|
24
|
-
declare const ActivitySection: React.FC<
|
|
24
|
+
declare const ActivitySection: React.FC<IActivitySectionProps>;
|
|
25
25
|
export default ActivitySection;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Form } from './form';
|
|
2
|
-
export type { IField, FormValues, IFormMeta } from './form.types';
|
|
2
|
+
export type { IField, FormValues, IFormMeta, IFormProps } from './form.types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IFormValues, IFormMeta } from './../../components/form/form.types';
|
|
2
|
-
export interface IProfileFormProps {
|
|
2
|
+
export interface IProfileFormProps<OnSuccessArgs = IFormValues> {
|
|
3
3
|
/** The hooks used in the form */
|
|
4
4
|
hooks: {
|
|
5
5
|
/** The hook to predict the user's location */
|
|
@@ -16,9 +16,9 @@ export interface IProfileFormProps {
|
|
|
16
16
|
/** The functions to call */
|
|
17
17
|
functions: {
|
|
18
18
|
/** The function to upload the user's profile image */
|
|
19
|
-
uploadImage: () => Promise<
|
|
19
|
+
uploadImage: () => Promise<unknown>;
|
|
20
20
|
/** The function to call on success */
|
|
21
|
-
onSuccess?: (data:
|
|
21
|
+
onSuccess?: (data: OnSuccessArgs) => Promise<void>;
|
|
22
22
|
/** The function to call when the form is cancelled, e.g. the user presses a cancel button */
|
|
23
23
|
onCancel?: () => void;
|
|
24
24
|
/** The function to call on failure */
|
|
@@ -28,8 +28,13 @@ interface Props {
|
|
|
28
28
|
/** The callback to fire when the tooltip is closed */
|
|
29
29
|
onClose?: () => void;
|
|
30
30
|
};
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/** Optional props for accessibility */
|
|
32
|
+
accessibility?: {
|
|
33
|
+
/** Whether this should use `hidden` on content, or if screenreaders should be able to access the full text, even when the tooltip is closed, e.g. for tooltips on buttons and pills */
|
|
34
|
+
readToScreenreadersWhenClosed?: boolean;
|
|
35
|
+
/** Whether the tooltip is hidden from screen readers or not */
|
|
36
|
+
'aria-hidden'?: boolean;
|
|
37
|
+
};
|
|
33
38
|
/** The id of the tooltip */
|
|
34
39
|
id?: string;
|
|
35
40
|
}
|
package/helpers/intl.d.ts
CHANGED
|
@@ -38,9 +38,12 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
38
38
|
card_cta_event_done: string;
|
|
39
39
|
card_cta_microcourse_done: string;
|
|
40
40
|
carousel_pagination_previous: string;
|
|
41
|
+
carousel_pagination_previousSlide: string;
|
|
41
42
|
carousel_pagination_next: string;
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
carousel_pagination_nextSlide: string;
|
|
44
|
+
carousel_pagination_slide: string;
|
|
45
|
+
carousel_pagination_ariaLive: string;
|
|
46
|
+
carousel_pagination_ariaLive_slide: string;
|
|
44
47
|
activitySection_notFoundError: string;
|
|
45
48
|
activitiesFeed_sorting_label: string;
|
|
46
49
|
activitiesFeed_rankingMethod_recent: string;
|
|
@@ -50,6 +53,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
50
53
|
communityDetails_viewAll: string;
|
|
51
54
|
communityDetails_invite: string;
|
|
52
55
|
community_joinToPost: string;
|
|
56
|
+
community_sortSuccess: string;
|
|
53
57
|
joinCommunityButton: string;
|
|
54
58
|
joinCommunityButton_short: string;
|
|
55
59
|
joinCommunityButton_joining: string;
|