@apolitical/component-library 5.5.1-SW.0 → 5.5.1-bht.0

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.
@@ -1 +1,2 @@
1
1
  export { default as PublishArticleForm } from './publish-article-form';
2
+ export type { IPublishArticleFormProps } from './publish-article-form.types';
@@ -1 +1 @@
1
- export { default as ProgressTracker, type INavigationDotsProps as IProgressTrackerProps, } from './progress-tracker';
1
+ export { default as ProgressTracker } from './progress-tracker';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- export interface INavigationDotsProps {
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<INavigationDotsProps>;
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
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "5.5.1-SW.0",
3
+ "version": "5.5.1-bht.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,3 +1,3 @@
1
- export type { MemberProps, MemberDetailsProps } from './member';
2
1
  export { default as Member } from './member';
2
+ export type { IMemberComponentProps, MemberProps, MemberDetailsProps, } from './member.types';
3
3
  export { getMember } from './member.helpers';
@@ -1,81 +1,9 @@
1
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
- 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
- /** Optional onclick function */
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;
@@ -1,4 +1,4 @@
1
- import { MemberProps } from './member';
1
+ import type { MemberProps } from './member.types';
2
2
  export declare const getMember: (member: MemberProps) => {
3
3
  image: string;
4
4
  name?: undefined;
@@ -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
+ }