@apolitical/component-library 5.0.1 → 5.0.2-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.
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IAriaLive } from '../../types';
2
3
  interface Props {
3
4
  /** The ID of the element */
4
5
  id?: string;
@@ -25,7 +26,7 @@ interface Props {
25
26
  /** Additional aria props */
26
27
  'aria-expanded'?: boolean;
27
28
  'aria-controls'?: string;
28
- 'aria-live'?: 'off' | 'polite' | 'assertive';
29
+ 'aria-live'?: IAriaLive;
29
30
  }
30
31
  declare const _default: React.MemoExoticComponent<({ element, showOnFocus, children, className, ...props }: Props) => React.DetailedReactHTMLElement<{
31
32
  className: string;
@@ -47,6 +48,6 @@ declare const _default: React.MemoExoticComponent<({ element, showOnFocus, child
47
48
  /** Additional aria props */
48
49
  'aria-expanded'?: boolean | undefined;
49
50
  'aria-controls'?: string | undefined;
50
- 'aria-live'?: "off" | "polite" | "assertive" | undefined;
51
+ 'aria-live'?: IAriaLive | undefined;
51
52
  }, HTMLElement>>;
52
53
  export default _default;
@@ -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;
@@ -1 +1,2 @@
1
1
  export { default as Tooltip } from './tooltip';
2
+ export * from './tooltip-linkset.hook';
@@ -0,0 +1 @@
1
+ export declare function useTooltipLinkset(setTooltipLink: (index: number) => void): (e: React.KeyboardEvent<HTMLElement> | undefined) => void;
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_showAll: string;
158
158
  discussion_likes_like: string;
159
159
  discussion_likes_unlike: string;
160
160
  discussion_likes_show: string;