@apolitical/component-library 4.1.6-SW.1 → 4.1.6-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/cards/cards.types.d.ts +0 -2
- package/communities/community-details/community-details.d.ts +1 -3
- package/communities/join-button/join-button.d.ts +1 -5
- package/form/components/rich-text-editor/helpers/hot-keys/hot-keys.d.ts +4 -3
- package/form/components/rich-text-editor/helpers/hot-keys/index.d.ts +1 -2
- package/general/buttons/button/button.d.ts +4 -3
- package/helpers/dates.d.ts +0 -1
- package/helpers/intl.d.ts +0 -2
- package/index.js +33 -33
- package/index.mjs +3692 -3735
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/variables/colors/theme/_text.scss +0 -1
- package/text/content-type-label/content-type-label.types.d.ts +1 -1
- package/text/pill/pill.d.ts +2 -4
- package/form/components/rich-text-editor/helpers/hot-keys/hot-keys.config.d.ts +0 -4
package/cards/cards.types.d.ts
CHANGED
|
@@ -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,
|
|
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,
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare const HOTKEYS: {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
};
|
|
4
|
+
export default HOTKEYS;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
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,
|
|
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;
|
package/helpers/dates.d.ts
CHANGED
|
@@ -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;
|