@apolitical/component-library 6.6.14 → 6.6.16-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.
@@ -223,6 +223,8 @@ export interface IFormMeta {
223
223
  showSuccessMessage?: boolean | string;
224
224
  /** Whether the form should show cancel button */
225
225
  shouldShowCancelButton?: boolean;
226
+ /** Whether the form should scroll up when there are no errors */
227
+ shouldScrollOnSuccess?: boolean;
226
228
  }
227
229
  export interface IFormProps {
228
230
  /** The form submit button */
@@ -1,19 +1,24 @@
1
1
  import React from 'react';
2
+ type LinkOnClick = ((e?: React.MouseEvent<HTMLElement>) => void) | undefined;
2
3
  export interface ILinkProps {
3
4
  /** URL for link */
4
5
  href?: string | undefined;
5
6
  /** Content to rendered */
6
7
  children: JSX.Element | JSX.Element[] | string;
7
8
  /** The element the content should be wrapped in, if it is not a link; nothing is rendered if it's undefined */
8
- fallbackElement?: 'span' | 'strong' | 'li';
9
+ fallbackElement?: 'div' | 'li' | 'span' | 'strong';
9
10
  /** Additonal classes */
10
11
  className?: string;
11
12
  /** Function to be called when clicked */
12
- onClick?: ((e?: React.MouseEvent<HTMLElement>) => void) | undefined;
13
+ onClick?: LinkOnClick;
13
14
  /** Function to be called when focused */
14
15
  onFocus?: ((e?: React.FocusEvent<HTMLElement>) => void) | undefined;
15
16
  /** Function to be called when key is pressed */
16
17
  onKeyDown?: ((e?: React.KeyboardEvent<HTMLElement>) => void) | undefined;
18
+ meta?: {
19
+ /** Whether to force the onClick event to fire, even if the element is not a link */
20
+ forceOnClick?: boolean;
21
+ };
17
22
  /** GTM event context */
18
23
  gtmContext?: string;
19
24
  /** GTM event type */
@@ -33,5 +38,5 @@ export interface ILinkProps {
33
38
  /** Data attributes for the link */
34
39
  'data-before'?: string;
35
40
  }
36
- declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }: ILinkProps) => import("react/jsx-runtime").JSX.Element;
41
+ declare const Link: ({ href, children, fallbackElement, meta, className, onClick, gtmContext, gtmType, ...props }: ILinkProps) => import("react/jsx-runtime").JSX.Element;
37
42
  export default Link;
@@ -1 +1 @@
1
- export { default as Portal } from './portal';
1
+ export { default as Portal, type IPortalProps } from './portal';
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- declare const Portal: ({ parent, children, }: {
3
- parent?: Element | HTMLElement | DocumentFragment | undefined;
2
+ export interface IPortalProps {
3
+ parent?: HTMLElement | Element | DocumentFragment;
4
4
  children?: ReactNode;
5
- }) => import("react").ReactPortal | null;
5
+ }
6
+ declare const Portal: ({ parent, children }: IPortalProps) => import("react").ReactPortal | null;
6
7
  export default Portal;
package/helpers/intl.d.ts CHANGED
@@ -129,6 +129,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
129
129
  discussion_report_subject: string;
130
130
  discussion_report_body: string;
131
131
  discussionFormCard_placeholder: string;
132
+ discussionFormCard_placeholder_long: string;
132
133
  discussionFormCard_overlay_title: string;
133
134
  discussionFormCard_overlay_text: string;
134
135
  discussionFormCard_overlay_cta_discard: string;
@@ -471,6 +472,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
471
472
  'header_account_log-out': string;
472
473
  header_buttons_login: string;
473
474
  header_buttons_signup: string;
475
+ pageLayout_browserTooSmall: string;
474
476
  pageLayout_error: string;
475
477
  loadingBlock_loading: string;
476
478
  loadingBlock_almostDone: string;