@apolitical/component-library 4.9.0 → 4.9.1-jc.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.
@@ -0,0 +1,3 @@
1
+ export { default as LikesModal } from './likes-modal';
2
+ export { LikesModalProvider } from './likes-modal.context';
3
+ export { useLikesModal } from './likes-modal.hooks';
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;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface Props {
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 }: Props) => import("react/jsx-runtime").JSX.Element;
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,3 @@
1
+ export { default as TooltipLink } from './tooltip-link';
2
+ export { default as TooltipButton } from './tooltip-button';
3
+ export { TooltipLinksetProvider } from './tooltip-linkset.context';
@@ -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
- discussion_likes_more: string;
157
+ discussion_likes_show_all: string;
158
158
  discussion_likes_like: string;
159
159
  discussion_likes_unlike: string;
160
160
  discussion_likes_show: string;