@apolitical/component-library 4.1.6-SW.0 → 4.1.6-beta.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.
@@ -68,8 +68,6 @@ export interface CardType {
68
68
  isMember: boolean;
69
69
  count: number;
70
70
  };
71
- /** Is the content private */
72
- isPrivate?: boolean;
73
71
  }
74
72
  export interface MockCardType extends CardType {
75
73
  cardType?: string;
@@ -3,8 +3,6 @@ import { IJoinButtonProps } from './../join-button';
3
3
  interface Props extends IJoinButtonProps {
4
4
  /** If the user is a member of the community */
5
5
  isMember?: boolean;
6
- /** If the community is open */
7
- isOpen?: boolean;
8
6
  /** The slug for the community */
9
7
  slug: string;
10
8
  /** Details about members in the community */
@@ -21,5 +19,5 @@ interface Props extends IJoinButtonProps {
21
19
  /** Additional classes */
22
20
  className?: string;
23
21
  }
24
- declare const CommunityDetails: ({ className, isMember, isOpen, slug, members: { number: membersCount, data: membersData }, functions: { invite, ...membershipFunctions }, }: Props) => import("react/jsx-runtime").JSX.Element;
22
+ declare const CommunityDetails: ({ className, isMember, slug, members: { number: membersCount, data: membersData }, functions: { invite, ...membershipFunctions }, }: Props) => import("react/jsx-runtime").JSX.Element;
25
23
  export default CommunityDetails;
@@ -1,12 +1,8 @@
1
1
  export interface IJoinButtonProps {
2
2
  /** If the user is a member of the community */
3
3
  isMember?: boolean;
4
- /** If the community is open */
5
- isOpen?: boolean;
6
4
  /** If the button should use the short version of the text */
7
5
  isShort?: boolean;
8
- /** If the button is disabled */
9
- disabled?: boolean;
10
6
  /** The function to call when the user clicks the button */
11
7
  functions?: {
12
8
  /** The function to request to join */
@@ -17,5 +13,5 @@ export interface IJoinButtonProps {
17
13
  /** The language to use */
18
14
  locale?: string;
19
15
  }
20
- declare const JoinButton: ({ isMember: userIsMember, isOpen, isShort, disabled, functions: { join, leave }, }: IJoinButtonProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const JoinButton: ({ isMember: userIsMember, isShort, functions: { join, leave }, }: IJoinButtonProps) => import("react/jsx-runtime").JSX.Element;
21
17
  export default JoinButton;
@@ -1,3 +1,4 @@
1
- import { Dispatch } from 'react';
2
- import { BaseEditor } from 'slate';
3
- export declare const handleHotKeys: (e: React.KeyboardEvent<HTMLDivElement> | React.KeyboardEvent<HTMLTextAreaElement>, editor: BaseEditor, dispatch: Dispatch<any>, reportError: (message: string) => void) => void;
1
+ declare const HOTKEYS: {
2
+ [key: string]: string;
3
+ };
4
+ export default HOTKEYS;
@@ -1,2 +1 @@
1
- export * from './hot-keys';
2
- export { default as HOTKEYS } from './hot-keys.config';
1
+ export { default as HOTKEYS } from './hot-keys';
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import addClasses from 'classnames';
2
3
  export type ButtonIconType = false | string | {
3
4
  icon: string;
4
5
  position?: 'left' | 'right';
@@ -41,8 +42,6 @@ export interface ButtonPropsType {
41
42
  disabled?: boolean | {
42
43
  isClickable: boolean;
43
44
  };
44
- /** An optional tooltip for the button. This will only apply when disabled is true */
45
- tooltip?: string;
46
45
  /** This is an optional way to pass in text which is only for screen readers
47
46
  * It's rendered on the page (so the page is still functional without CSS, unlike ARIA labels) but hidden
48
47
  * with CSS, for cases where the whole button should be an icon
@@ -67,5 +66,7 @@ export interface ButtonPropsType {
67
66
  /** The test ID for Jest tests */
68
67
  'data-testid'?: string;
69
68
  }
70
- declare const Button: ({ variant, size, styling, icon, href, element, onClick, className, disabled, tooltip, screenreaderText, children, ...rest }: ButtonPropsType) => import("react/jsx-runtime").JSX.Element;
69
+ declare const Button: ({ variant, size, styling, icon, href, element, onClick, className, disabled, screenreaderText, children, ...rest }: ButtonPropsType) => React.DOMElement<{
70
+ [key: string]: string | boolean | addClasses.ArgumentArray | (() => void) | ((e: React.KeyboardEvent<HTMLElement>) => void) | ((e: React.MouseEvent<HTMLElement>) => void) | React.RefObject<HTMLButtonElement>;
71
+ }, Element>;
71
72
  export default Button;
@@ -25,5 +25,4 @@ export declare const getShortDateHowLongAgo: IGetShortDateHowLongAgo;
25
25
  export declare const getDateWithDelta: IGetDateWithDelta;
26
26
  export declare const dateToUTC: (date?: Date) => Date;
27
27
  export declare const dateWithin: (dateInPast: DateType, number: number, unit: 'seconds' | 'minutes' | 'hours') => boolean;
28
- export declare const isDateWithinXDays: (dateInPast: DateType, days: number) => boolean;
29
28
  export {};
package/helpers/intl.d.ts CHANGED
@@ -51,7 +51,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
51
51
  joinCommunityButton_member_aria: string;
52
52
  joinCommunityButton_leave: string;
53
53
  joinCommunityButton_leaving: string;
54
- joinCommunityButton_closed_tooltip: string;
55
54
  member_apolitical: string;
56
55
  member_community: string;
57
56
  membersList: string;
@@ -230,7 +229,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
230
229
  richTextEditor_strikeThrough: string;
231
230
  richTextEditor_link: string;
232
231
  richTextEditor_link_text: string;
233
- richTextEditor_link_text_aria: string;
234
232
  richTextEditor_link_url: string;
235
233
  richTextEditor_link_placeholder: string;
236
234
  richTextEditor_link_error_required: string;