@apolitical/component-library 4.9.0 → 4.9.1-jc.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/discussion/likes-modal/index.d.ts +3 -0
- package/discussion/likes-modal/likes-modal-spec.d.ts +0 -0
- package/discussion/likes-modal/likes-modal.context.d.ts +9 -0
- package/discussion/likes-modal/likes-modal.d.ts +25 -0
- package/general/link/link.d.ts +2 -2
- package/general/tooltip/index.d.ts +3 -0
- package/general/tooltip/tooltip-button.d.ts +5 -0
- package/general/tooltip/tooltip-link.d.ts +5 -0
- package/general/tooltip/tooltip-linkset.context.d.ts +10 -0
- package/helpers/intl.d.ts +1 -1
- package/index.js +49 -49
- package/index.mjs +3705 -3620
- package/package.json +1 -1
- package/style.css +1 -1
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ILikesModalProps } from './likes-modal';
|
|
3
|
+
interface ILikesModalContext {
|
|
4
|
+
setLikesModalData: (data: ILikesModalData) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const LikesModalContext: import("react").Context<ILikesModalContext>;
|
|
7
|
+
type ILikesModalData = Pick<ILikesModalProps, 'likes' | 'peopleWhoLiked' | 'postId' | 'commentId' | 'showModal'>;
|
|
8
|
+
export declare function LikesModalProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MemberProps } from '../../user';
|
|
2
|
+
import { IBadgesOption } from '../../user/badges';
|
|
3
|
+
export interface ILikesModalProps {
|
|
4
|
+
/** Whether the modal is open on page load */
|
|
5
|
+
showModal?: boolean;
|
|
6
|
+
/** The number of likes */
|
|
7
|
+
likes?: number;
|
|
8
|
+
/** Information about the people who have liked the content */
|
|
9
|
+
peopleWhoLiked?: false | MemberProps[];
|
|
10
|
+
/** The ID of the post to show likes for */
|
|
11
|
+
postId?: string;
|
|
12
|
+
/** Whether to show badges and the scope of the badge */
|
|
13
|
+
badges?: IBadgesOption;
|
|
14
|
+
/** The ID of the comment to show likes for */
|
|
15
|
+
commentId?: string;
|
|
16
|
+
/** Functions used inside the modal */
|
|
17
|
+
functions: {
|
|
18
|
+
/** Function to call when the modal is closed */
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
};
|
|
21
|
+
/** Additional classes */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const LikesModal: ({ showModal, functions: modalFunctions, peopleWhoLiked, badges, likes, className, }: ILikesModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default LikesModal;
|
package/general/link/link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface ILinkProps {
|
|
3
3
|
/** URL for link */
|
|
4
4
|
href?: string | undefined;
|
|
5
5
|
/** Content to rendered */
|
|
@@ -33,5 +33,5 @@ interface Props {
|
|
|
33
33
|
/** Data attributes for the link */
|
|
34
34
|
'data-before'?: string;
|
|
35
35
|
}
|
|
36
|
-
declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }:
|
|
36
|
+
declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }: ILinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export default Link;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ButtonPropsType } from '../../index';
|
|
2
|
+
interface ITooltipLinkProps extends Omit<ButtonPropsType, 'onKeyDown'> {
|
|
3
|
+
}
|
|
4
|
+
export declare function TooltipLink({ onClick, className, ...rest }: ITooltipLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default TooltipLink;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ILinkProps } from '../../general/link/link';
|
|
2
|
+
interface ITooltipLinkProps extends Omit<ILinkProps, 'onKeyDown'> {
|
|
3
|
+
}
|
|
4
|
+
export declare function TooltipLink({ onClick, ...rest }: ITooltipLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default TooltipLink;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
interface ITooltipLinksetContext {
|
|
3
|
+
tooltipLink: number;
|
|
4
|
+
setTooltipLink: (index: number) => void;
|
|
5
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLElement> | undefined) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const TooltipLinksetContext: import("react").Context<ITooltipLinksetContext>;
|
|
8
|
+
type Props = PropsWithChildren & Pick<ITooltipLinksetContext, 'tooltipLink' | 'setTooltipLink'>;
|
|
9
|
+
export declare function TooltipLinksetProvider({ tooltipLink, setTooltipLink, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
package/helpers/intl.d.ts
CHANGED
|
@@ -154,7 +154,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
154
154
|
discussion_form_explainer_question: string;
|
|
155
155
|
discussion_likes: string;
|
|
156
156
|
discussion_likes_short: string;
|
|
157
|
-
|
|
157
|
+
discussion_likes_show_all: string;
|
|
158
158
|
discussion_likes_like: string;
|
|
159
159
|
discussion_likes_unlike: string;
|
|
160
160
|
discussion_likes_show: string;
|