@apolitical/component-library 5.5.1-SW.0 → 5.5.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/types/publish-article-form/index.d.ts +1 -0
- package/general/progress-tracker/index.d.ts +1 -1
- package/general/progress-tracker/progress-tracker.d.ts +2 -2
- package/index.mjs +6 -5
- package/loaders/loading-block/index.d.ts +1 -1
- package/loaders/loading-block/loading-block.d.ts +2 -2
- package/package.json +1 -1
- package/user/member/index.d.ts +1 -1
- package/user/member/member.d.ts +3 -75
- package/user/member/member.helpers.d.ts +1 -1
- package/user/member/member.types.d.ts +72 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ProgressTracker
|
|
1
|
+
export { default as ProgressTracker } from './progress-tracker';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
/** The current step */
|
|
4
4
|
currentStep?: number;
|
|
5
5
|
/** The total number of steps */
|
|
6
6
|
steps?: number;
|
|
7
7
|
}
|
|
8
|
-
declare const NavigationDots: React.FC<
|
|
8
|
+
declare const NavigationDots: React.FC<Props>;
|
|
9
9
|
export default NavigationDots;
|
package/index.mjs
CHANGED
|
@@ -1991,10 +1991,7 @@ const am = Js(
|
|
|
1991
1991
|
__proto__: null,
|
|
1992
1992
|
default: Xr
|
|
1993
1993
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1994
|
-
const q_ = ({
|
|
1995
|
-
currentStep: e = 1,
|
|
1996
|
-
steps: t = 1
|
|
1997
|
-
}) => /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
1994
|
+
const q_ = ({ currentStep: e = 1, steps: t = 1 }) => /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
1998
1995
|
/* @__PURE__ */ c.jsx(qe, { children: /* @__PURE__ */ c.jsx(
|
|
1999
1996
|
mt,
|
|
2000
1997
|
{
|
|
@@ -2740,7 +2737,11 @@ const Nm = ({
|
|
|
2740
2737
|
}
|
|
2741
2738
|
);
|
|
2742
2739
|
}, td = Xt(Nm);
|
|
2743
|
-
const Ea = "loadingBlock_", Mm = ({
|
|
2740
|
+
const Ea = "loadingBlock_", Mm = ({
|
|
2741
|
+
progress: e = 0,
|
|
2742
|
+
steps: t = !1,
|
|
2743
|
+
className: n = ""
|
|
2744
|
+
}) => {
|
|
2744
2745
|
const r = ce();
|
|
2745
2746
|
t || (t = {
|
|
2746
2747
|
0: { text: r.formatMessage({ id: `${Ea}loading` }) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as LoadingBlock } from './loading-block';
|
|
1
|
+
export { default as LoadingBlock, type ILoadingBlockProps } from './loading-block';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface ILoadingBlockProps {
|
|
3
3
|
/** The amount of progress, shown as a percent */
|
|
4
4
|
progress?: number;
|
|
5
5
|
/** The text and icons to show at different progress points */
|
|
@@ -14,5 +14,5 @@ interface Props {
|
|
|
14
14
|
/** The language for the text */
|
|
15
15
|
locale?: string;
|
|
16
16
|
}
|
|
17
|
-
declare const _default: React.MemoExoticComponent<({ progress, steps, className }:
|
|
17
|
+
declare const _default: React.MemoExoticComponent<({ progress, steps, className, }: ILoadingBlockProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
18
|
export default _default;
|
package/package.json
CHANGED
package/user/member/index.d.ts
CHANGED
package/user/member/member.d.ts
CHANGED
|
@@ -1,81 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { IBadgesOption } from '../badges';
|
|
5
|
-
export type MemberDetailsProps = {
|
|
6
|
-
/** The user's unique ID */
|
|
7
|
-
id?: string;
|
|
8
|
-
/** The user's name */
|
|
9
|
-
name?: string;
|
|
10
|
-
/** The user's profile URL; we usually get this from the ID, but we won't if `false` is passed in */
|
|
11
|
-
link?: false | string;
|
|
12
|
-
/** The user's job title */
|
|
13
|
-
jobTitle?: string;
|
|
14
|
-
/** The organisation the user works for */
|
|
15
|
-
organization?: string;
|
|
16
|
-
/** The user's location */
|
|
17
|
-
location?: {
|
|
18
|
-
country?: string;
|
|
19
|
-
en?: string;
|
|
20
|
-
};
|
|
21
|
-
/** The user's profile picture */
|
|
22
|
-
image?: {
|
|
23
|
-
thumbnail?: string;
|
|
24
|
-
};
|
|
25
|
-
/** An error, shown if the user doesn't exist */
|
|
26
|
-
error?: string;
|
|
27
|
-
/** The user's badges */
|
|
28
|
-
badges?: IBadgesObject;
|
|
29
|
-
};
|
|
30
|
-
export type MemberProps = 'apolitical' | 'community' | 'deleted' | MemberDetailsProps;
|
|
31
|
-
interface Props {
|
|
32
|
-
/** The element to render around the content */
|
|
33
|
-
element?: 'li' | 'div';
|
|
34
|
-
/** Details about the Apolitical member */
|
|
35
|
-
member?: MemberProps;
|
|
36
|
-
/** The alt text for the image */
|
|
37
|
-
alt?: string;
|
|
38
|
-
/** Additional content to show with the member details */
|
|
39
|
-
additionalContent?: false | {
|
|
40
|
-
createdAt?: Date | string;
|
|
41
|
-
didEdit?: boolean;
|
|
42
|
-
customMessage?: string;
|
|
43
|
-
};
|
|
44
|
-
/** Whether to show badges and the scope of the badge */
|
|
45
|
-
badges?: IBadgesOption;
|
|
46
|
-
/** Optional styling */
|
|
47
|
-
styling?: {
|
|
48
|
-
/** The size of the component */
|
|
49
|
-
size?: 'medium' | 'large';
|
|
50
|
-
/** The type of component to render, e.g. with card styling */
|
|
51
|
-
variant?: 'inline' | 'card';
|
|
52
|
-
/** Whether the user details should be condensed into one line */
|
|
53
|
-
isCondensed?: boolean;
|
|
54
|
-
/** Whether to shift the additional content onto a new line after the badges. Hide the Job title + Organisation */
|
|
55
|
-
additionalContentNewLine?: boolean;
|
|
56
|
-
};
|
|
57
|
-
/** Optional functions for the wrapper */
|
|
58
|
-
functions?: {
|
|
59
|
-
/** Optional onclick function */
|
|
60
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
61
|
-
/** Props for the profile modal */
|
|
62
|
-
profile?: IProfileFormProps;
|
|
63
|
-
};
|
|
64
|
-
/** The optional test ID for Jest */
|
|
65
|
-
'data-testid'?: string;
|
|
66
|
-
/** The GTM context to use */
|
|
67
|
-
gtmContext?: string;
|
|
68
|
-
/** The GTM event to use */
|
|
69
|
-
gtmType?: string;
|
|
70
|
-
/** Additional classes */
|
|
71
|
-
className?: string;
|
|
72
|
-
}
|
|
73
|
-
declare const Member: ({ element, member: memberDetails, alt, additionalContent, styling, functions, gtmContext, gtmType, className, badges, ...props }: Props) => React.DetailedReactHTMLElement<{
|
|
2
|
+
import { IMemberComponentProps } from './member.types';
|
|
3
|
+
declare const Member: ({ element, member: memberDetails, alt, additionalContent, styling, functions, gtmContext, gtmType, className, badges, ...props }: IMemberComponentProps) => React.DetailedReactHTMLElement<{
|
|
74
4
|
children: import("react/jsx-runtime").JSX.Element;
|
|
75
|
-
|
|
76
|
-
onClick?: ((e: React.MouseEvent) => void) | undefined;
|
|
5
|
+
onClick?: ((e: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
77
6
|
className: string;
|
|
78
|
-
/** The optional test ID for Jest */
|
|
79
7
|
'data-testid'?: string | undefined;
|
|
80
8
|
}, HTMLElement>;
|
|
81
9
|
export default Member;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type IProfileFormProps } from '../../form';
|
|
3
|
+
import { IBadgesObject } from '../badge';
|
|
4
|
+
import { IBadgesOption } from '../badges';
|
|
5
|
+
export type MemberDetailsProps = {
|
|
6
|
+
/** The user's unique ID */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** The user's name */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** The user's profile URL; we usually get this from the ID, but we won't if `false` is passed in */
|
|
11
|
+
link?: false | string;
|
|
12
|
+
/** The user's job title */
|
|
13
|
+
jobTitle?: string;
|
|
14
|
+
/** The organisation the user works for */
|
|
15
|
+
organization?: string;
|
|
16
|
+
/** The user's location */
|
|
17
|
+
location?: {
|
|
18
|
+
country?: string;
|
|
19
|
+
en?: string;
|
|
20
|
+
};
|
|
21
|
+
/** The user's profile picture */
|
|
22
|
+
image?: {
|
|
23
|
+
thumbnail?: string;
|
|
24
|
+
};
|
|
25
|
+
/** An error, shown if the user doesn't exist */
|
|
26
|
+
error?: string;
|
|
27
|
+
/** The user's badges */
|
|
28
|
+
badges?: IBadgesObject;
|
|
29
|
+
};
|
|
30
|
+
export type MemberProps = 'apolitical' | 'community' | 'deleted' | MemberDetailsProps;
|
|
31
|
+
export interface IMemberComponentProps {
|
|
32
|
+
/** The element to render around the content */
|
|
33
|
+
element?: 'li' | 'div';
|
|
34
|
+
/** Details about the Apolitical member */
|
|
35
|
+
member?: MemberProps;
|
|
36
|
+
/** The alt text for the image */
|
|
37
|
+
alt?: string;
|
|
38
|
+
/** Additional content to show with the member details */
|
|
39
|
+
additionalContent?: false | {
|
|
40
|
+
createdAt?: Date | string;
|
|
41
|
+
didEdit?: boolean;
|
|
42
|
+
customMessage?: string;
|
|
43
|
+
};
|
|
44
|
+
/** Whether to show badges and the scope of the badge */
|
|
45
|
+
badges?: IBadgesOption;
|
|
46
|
+
/** Optional styling */
|
|
47
|
+
styling?: {
|
|
48
|
+
/** The size of the component */
|
|
49
|
+
size?: 'medium' | 'large';
|
|
50
|
+
/** The type of component to render, e.g. with card styling */
|
|
51
|
+
variant?: 'inline' | 'card';
|
|
52
|
+
/** Whether the user details should be condensed into one line */
|
|
53
|
+
isCondensed?: boolean;
|
|
54
|
+
/** Whether to shift the additional content onto a new line after the badges. Hide the Job title + Organisation */
|
|
55
|
+
additionalContentNewLine?: boolean;
|
|
56
|
+
};
|
|
57
|
+
/** Optional functions for the wrapper */
|
|
58
|
+
functions?: {
|
|
59
|
+
/** Optional onclick function */
|
|
60
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
61
|
+
/** Props for the profile modal */
|
|
62
|
+
profile?: IProfileFormProps;
|
|
63
|
+
};
|
|
64
|
+
/** The optional test ID for Jest */
|
|
65
|
+
'data-testid'?: string;
|
|
66
|
+
/** The GTM context to use */
|
|
67
|
+
gtmContext?: string;
|
|
68
|
+
/** The GTM event to use */
|
|
69
|
+
gtmType?: string;
|
|
70
|
+
/** Additional classes */
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|