@apolitical/component-library 4.8.8 → 4.8.9
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 +0 -1
- package/discussion/sections/activity-section/activity-section.d.ts +2 -2
- package/discussion/sections/activity-section/index.d.ts +0 -1
- package/form/components/form/index.d.ts +1 -1
- package/form/types/profile-form/profile-form.d.ts +3 -3
- package/layout/content-layout/columns/columns.d.ts +2 -2
- package/layout/content-layout/columns/index.d.ts +0 -1
- 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 +0 -1
- 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 +0 -1
- package/style.css +1 -1
- package/text/empty-state-box/empty-state-box.d.ts +2 -2
- package/text/empty-state-box/index.d.ts +0 -1
- package/text/hide-show-text-box/hide-show-text-box.d.ts +2 -2
- package/text/hide-show-text-box/index.d.ts +0 -1
- package/text/highlighted-text-box/highlighted-text-box.d.ts +2 -2
- package/text/highlighted-text-box/index.d.ts +0 -1
- package/user/profile-picture/index.d.ts +0 -1
- 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
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
/** The card data, from Contentful */
|
|
4
4
|
cards: CardType[];
|
|
5
5
|
/** The types for each card, from Contentful */
|
|
@@ -12,5 +12,5 @@ export interface ICardBlockProps {
|
|
|
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 }: Props) => 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
|
-
|
|
9
|
+
interface Props {
|
|
10
10
|
basePath: string;
|
|
11
11
|
parentId: string;
|
|
12
12
|
activityId: string;
|
|
@@ -21,5 +21,5 @@ export interface IActivitySectionProps {
|
|
|
21
21
|
};
|
|
22
22
|
profile: IProfileFormProps;
|
|
23
23
|
}
|
|
24
|
-
declare const ActivitySection: React.FC<
|
|
24
|
+
declare const ActivitySection: React.FC<Props>;
|
|
25
25
|
export default ActivitySection;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Form } from './form';
|
|
2
|
-
export type { IField, FormValues, IFormMeta
|
|
2
|
+
export type { IField, FormValues, IFormMeta } 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 {
|
|
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<OnSuccessArgs = IFormValues> {
|
|
|
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<void>;
|
|
20
20
|
/** The function to call on success */
|
|
21
|
-
onSuccess?: (data:
|
|
21
|
+
onSuccess?: (data: IFormValues) => 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 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
/** The layout for the columns */
|
|
4
4
|
layout?: '2-1' | '1-3' | '1-1';
|
|
5
5
|
/** If the columns should be hidden until they'd show in a row */
|
|
@@ -11,5 +11,5 @@ export interface IColumnsProps {
|
|
|
11
11
|
/** The content to be rendered */
|
|
12
12
|
children: React.ReactElement;
|
|
13
13
|
}
|
|
14
|
-
declare const Columns: ({ layout, hideOnMobile, hasCSSContainers, className, children, }:
|
|
14
|
+
declare const Columns: ({ layout, hideOnMobile, hasCSSContainers, className, children, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export default Columns;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { PaginationType } from './load-more';
|
|
2
2
|
export { default as LoadMore } from './load-more';
|
|
@@ -13,13 +13,13 @@ export interface PaginationType {
|
|
|
13
13
|
error: string;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
interface Props extends PaginationType {
|
|
17
17
|
/** Additional classes */
|
|
18
18
|
className?: string;
|
|
19
19
|
/** GTM event context */
|
|
20
20
|
gtmContext?: string;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
interface Props extends ButtonPropsType {
|
|
23
23
|
}
|
|
24
|
-
declare const LoadMore: ({ hasNextPage, loadNextPage, isLoading, variant, size, styling, icon, messages, className, gtmContext, }:
|
|
24
|
+
declare const LoadMore: ({ hasNextPage, loadNextPage, isLoading, variant, size, styling, icon, messages, className, gtmContext, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
25
25
|
export default LoadMore;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface TabBreakPoint {
|
|
3
3
|
target: 'min-width' | 'max-width';
|
|
4
4
|
value: number;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
interface TabType {
|
|
7
7
|
/** An ID for the tab - this is used to create an anchor on the page */
|
|
8
8
|
id?: string;
|
|
9
9
|
/** The text to show for the tab */
|
|
@@ -17,15 +17,15 @@ export interface ITab {
|
|
|
17
17
|
/** Whether the tab has carousels - this is needed to ensure the carousel width loads as expected */
|
|
18
18
|
hasCarousel?: boolean;
|
|
19
19
|
/** The breakpoint at which the tab should be shown. If not specified, always show */
|
|
20
|
-
breakpoint?:
|
|
20
|
+
breakpoint?: TabBreakPoint;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
interface Props {
|
|
23
23
|
/** The tab details */
|
|
24
|
-
tabs:
|
|
24
|
+
tabs: TabType[];
|
|
25
25
|
/** Additional classes */
|
|
26
26
|
className?: string;
|
|
27
27
|
/** Prevent window move by not jumping to the tab on click */
|
|
28
28
|
preventLocationChange?: boolean;
|
|
29
29
|
}
|
|
30
|
-
declare const Tabs: ({ tabs, className, preventLocationChange }:
|
|
30
|
+
declare const Tabs: ({ tabs, className, preventLocationChange }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export default Tabs;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ interface IPlaceholder {
|
|
|
9
9
|
/** Cta message showing on a button */
|
|
10
10
|
ctaMessage?: string;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
interface Props {
|
|
13
13
|
/** Additional classes */
|
|
14
14
|
className?: string;
|
|
15
15
|
/** Content to be rendered */
|
|
@@ -33,5 +33,5 @@ export interface IEditSectionProps {
|
|
|
33
33
|
/** Placeholder settings */
|
|
34
34
|
placeholder?: IPlaceholder;
|
|
35
35
|
}
|
|
36
|
-
declare const EditSection: ({ children, className, formProps, formComponent: originalFormComponent, href, title, showTitle, modalTitle, placeholder, showDivider, }:
|
|
36
|
+
declare const EditSection: ({ children, className, formProps, formComponent: originalFormComponent, href, title, showTitle, modalTitle, placeholder, showDivider, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export default EditSection;
|