@apolitical/component-library 4.7.14 → 4.7.15-beta.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/form/components/rich-text-editor/helpers/transform/transform.d.ts +1 -1
- package/helpers/intl.d.ts +1 -1
- package/index.js +38 -38
- package/index.mjs +5097 -5035
- package/layout/content-layout/top-level-page/top-level-page.d.ts +4 -1
- package/navigation/navigation-menu/navigation-menu.d.ts +4 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/variables/colors/theme/_navigation.scss +0 -1
- package/styles/variables/colors/theme/_user.scss +3 -0
- package/user/member/member.d.ts +14 -5
- package/user/member/member.helpers.d.ts +1 -1
- package/user/member/member.mock.d.ts +13 -0
|
@@ -30,7 +30,6 @@ $navigation: (
|
|
|
30
30
|
navigation-menu_link_hover_bg: get-map($c, 'n50'),
|
|
31
31
|
navigation-menu_link_active_bg: get-map($c, 'b100'),
|
|
32
32
|
navigation-menu_link_active_box-shadow: get-map($c, 'b300'),
|
|
33
|
-
navigation-menu_profile-picture_border: get-map($c, 'n700'),
|
|
34
33
|
share-links: get-map($c, 'n800'),
|
|
35
34
|
share-links_muted: get-map($c, 'n600'),
|
|
36
35
|
tabs: get-map($c, 'n700'),
|
|
@@ -13,5 +13,8 @@ $user: (
|
|
|
13
13
|
member_highlighted_name: get-map($c, 'p500'),
|
|
14
14
|
member_additional-content: get-map($c, 'n700'),
|
|
15
15
|
member_small: get-map($c, 'n700'),
|
|
16
|
+
member_card: get-map($c, 'n900'),
|
|
17
|
+
member_card_profile-picture_border: get-map($c, 'n700'),
|
|
18
|
+
member_card_border: get-map($c, 'n200'),
|
|
16
19
|
profile-picture_img_bg: get-map($c, 'b50'),
|
|
17
20
|
);
|
package/user/member/member.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type IProfileFormProps } from '../../form';
|
|
2
3
|
export type MemberDetailsProps = {
|
|
3
4
|
/** The user's unique ID */
|
|
4
5
|
id?: string;
|
|
@@ -26,6 +27,8 @@ interface Props {
|
|
|
26
27
|
element?: 'li' | 'div';
|
|
27
28
|
/** Details about the Apolitical member */
|
|
28
29
|
member?: MemberProps;
|
|
30
|
+
/** The alt text for the image */
|
|
31
|
+
alt?: string;
|
|
29
32
|
/** Additional content to show with the member details */
|
|
30
33
|
additionalContent?: false | {
|
|
31
34
|
createdAt?: Date | string;
|
|
@@ -35,27 +38,33 @@ interface Props {
|
|
|
35
38
|
styling?: {
|
|
36
39
|
/** The size of the component */
|
|
37
40
|
size?: 'medium' | 'large';
|
|
41
|
+
/** The type of component to render, e.g. with card styling */
|
|
42
|
+
variant?: 'inline' | 'card';
|
|
43
|
+
/** Whether the user details should be condensed into one line */
|
|
44
|
+
isCondensed?: boolean;
|
|
38
45
|
};
|
|
39
46
|
/** Optional functions for the wrapper */
|
|
40
47
|
functions?: {
|
|
41
48
|
/** Optional onclick function */
|
|
42
49
|
onClick?: (e: React.MouseEvent) => void;
|
|
50
|
+
/** Props for the profile modal */
|
|
51
|
+
profile?: IProfileFormProps;
|
|
43
52
|
};
|
|
53
|
+
/** The optional test ID for Jest */
|
|
54
|
+
'data-testid'?: string;
|
|
44
55
|
/** The GTM context to use */
|
|
45
56
|
gtmContext?: string;
|
|
46
57
|
/** The GTM event to use */
|
|
47
58
|
gtmType?: string;
|
|
48
59
|
/** Additional classes */
|
|
49
60
|
className?: string;
|
|
50
|
-
/** The language to use for the text */
|
|
51
|
-
locale?: string;
|
|
52
|
-
/** The alt text for the image */
|
|
53
|
-
alt?: string;
|
|
54
61
|
}
|
|
55
|
-
declare const Member: ({ element, member: memberDetails, additionalContent, styling, functions, gtmContext, gtmType, className,
|
|
62
|
+
declare const Member: ({ element, member: memberDetails, alt, additionalContent, styling, functions, gtmContext, gtmType, className, ...props }: Props) => React.DetailedReactHTMLElement<{
|
|
56
63
|
children: import("react/jsx-runtime").JSX.Element;
|
|
57
64
|
/** Optional onclick function */
|
|
58
65
|
onClick?: ((e: React.MouseEvent) => void) | undefined;
|
|
59
66
|
className: string;
|
|
67
|
+
/** The optional test ID for Jest */
|
|
68
|
+
'data-testid'?: string | undefined;
|
|
60
69
|
}, HTMLElement>;
|
|
61
70
|
export default Member;
|
|
@@ -14,7 +14,7 @@ export declare const getMember: (member: MemberProps) => {
|
|
|
14
14
|
url: string;
|
|
15
15
|
image: string | undefined;
|
|
16
16
|
};
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const getUserDetails: ({ role, organisation, country, maximumCharacters, }: {
|
|
18
18
|
role?: string | undefined;
|
|
19
19
|
organisation?: string | undefined;
|
|
20
20
|
country?: string | undefined;
|