@apolitical/component-library 1.2.0 → 1.3.0-beta.2

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.
@@ -21,4 +21,4 @@ $icons: ('arrow_left', (d, d, 3, 8), (d, d, 3, 8), (d, d, 4, 7)),
21
21
  ('speech-bubble_square_thick', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
22
22
  ('star', (16, 16, 0, 0), (d, d, 0, 0), (16, 16, 0, 0)),
23
23
  ('star_empty', (16, 16, 0, 0), (d, d, 0, 0), (16, 16, 0, 0)),
24
- ('tick', (14, 11, 8, 10), (12, 9, 7, 8), (9, 7, 6, 6));
24
+ ('tick', (14, 11, 8, 10), (14, 11, 5, 8), (9, 7, 6, 6));
@@ -235,6 +235,12 @@ $theme: (
235
235
  pill_bg: map.get($c, 'y300'),
236
236
 
237
237
  // User
238
+ contributor: map.get($c, 'n700'),
239
+ contributor_bg: map.get($c, 'white'),
240
+ contributor_border: map.get($c, 'white'),
241
+ contributor_inner-border: map.get($c, 'n200'),
242
+ contributor_label: map.get($c, 'n600'),
243
+
238
244
  member_highlighted_name: map.get($c, 'p500'),
239
245
  member_additional-content: map.get($c, 'n700'),
240
246
  member_small: map.get($c, 'n700')
@@ -1,19 +1,17 @@
1
- import { ButtonVariantType } from '../../general';
1
+ import { ButtonPropsType } from '../../general';
2
+ interface ButtonType extends ButtonPropsType {
3
+ text: string;
4
+ breakpoints?: {
5
+ [key: string]: boolean;
6
+ };
7
+ }
2
8
  interface Props {
3
9
  /** Box styling */
4
10
  variant?: 'empty' | 'error';
5
11
  /** Optional text */
6
12
  text?: false | string;
7
13
  /** Optional button. The button can also show depending on the viewport size */
8
- button?: false | {
9
- url: string;
10
- text: string;
11
- variant?: ButtonVariantType;
12
- gtmContext: string;
13
- breakpoints?: {
14
- [key: string]: boolean;
15
- };
16
- };
14
+ button?: false | ButtonType;
17
15
  /** Additional classes */
18
16
  className?: string;
19
17
  }
@@ -5,7 +5,7 @@ interface Props {
5
5
  /** Additional classes to add to the box */
6
6
  className?: string;
7
7
  /** The content to display */
8
- children: React.ReactNode;
8
+ children: React.ReactNode | JSX.Element;
9
9
  /** Additional props to pass to the box */
10
10
  style?: React.CSSProperties;
11
11
  }
@@ -0,0 +1,26 @@
1
+ import { MemberProps } from './../member';
2
+ interface Props {
3
+ /** The element that will render around the content */
4
+ element?: 'div' | 'section' | 'aside' | 'li';
5
+ /** Information about the contributors */
6
+ contributors: Array<MemberProps>;
7
+ /** Information on the style of the component */
8
+ styling?: {
9
+ /** The size of the images */
10
+ size?: 'small' | 'medium';
11
+ /** Whether to show a gap between the images */
12
+ showGap?: boolean;
13
+ /** The text to show, defaulting to the contributor's name when there's only one */
14
+ showText?: boolean | string;
15
+ /** Whether to show placeholders */
16
+ showPlaceholders?: boolean;
17
+ };
18
+ /** The number of contributors to show before we switch to showing a number */
19
+ cutoff?: number;
20
+ /** Additional classes */
21
+ className?: string;
22
+ /** The language to use */
23
+ locale?: string;
24
+ }
25
+ declare const ContributorsWrapper: ({ locale, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
26
+ export default ContributorsWrapper;
@@ -0,0 +1 @@
1
+ export { default as Contributors } from './contributors';
package/user/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export * from './contributors';
1
2
  export * from './member';
2
3
  export * from './profile-picture';
@@ -1 +1,3 @@
1
+ export type { MemberProps } from './member';
1
2
  export { default as Member } from './member';
3
+ export { getMember } from './member.helpers';