@apolitical/component-library 4.5.0-beta.6 → 4.5.0-beta.8

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,5 +1,7 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ /** The ID of the element */
4
+ id?: string;
3
5
  /** The element that will render around the content. */
4
6
  element?: 'span' | 'small' | 'strong' | 'em' | 'sup' | 'sub' | 'div' | 'p' | 'label' | 'legend' | 'a' | 'button';
5
7
  /** Whether the content should be shown on focus. */
@@ -28,6 +30,8 @@ interface Props {
28
30
  declare const _default: React.MemoExoticComponent<({ element, showOnFocus, children, className, ...props }: Props) => React.DetailedReactHTMLElement<{
29
31
  className: string;
30
32
  children: React.ReactNode | JSX.Element;
33
+ /** The ID of the element */
34
+ id?: string | undefined;
31
35
  /** An `href`, for links */
32
36
  href?: string | undefined;
33
37
  /** An `onBlur`, for buttons */
@@ -1,6 +1,7 @@
1
1
  import type { IMutationContext } from '../../../../../../discussion/shared';
2
2
  import type { ICache, ICacheItem } from '../..';
3
3
  interface ICreateVars {
4
+ title?: string;
4
5
  content: string;
5
6
  }
6
7
  export declare function useCreateActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, user, }: IMutationContext<ICacheItem, Error, ICreateVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IActivity, Error, ICreateVars, ICache>;
@@ -1,8 +1,10 @@
1
1
  type Props = {
2
+ /** The ID of the CharacterLimit */
3
+ id?: string;
2
4
  /** The limit of characters allowed in the field */
3
5
  limit: number;
4
6
  /** The number of characters in the field value */
5
7
  valueLength: number;
6
8
  };
7
- declare const CharacterLimit: ({ limit, valueLength }: Props) => import("react/jsx-runtime").JSX.Element | null;
9
+ declare const CharacterLimit: ({ id, limit, valueLength, ...props }: Props) => import("react/jsx-runtime").JSX.Element | null;
8
10
  export default CharacterLimit;
@@ -1,4 +1,6 @@
1
1
  interface Props {
2
+ /** The ID of the EmailHelperTextBox */
3
+ id?: string;
2
4
  /** The type of content to show */
3
5
  type: '' | 'gov' | 'nonGov' | 'pending' | 'verify' | 'exists';
4
6
  /** The user's email address */
@@ -10,5 +12,5 @@ interface Props {
10
12
  /** The language to use */
11
13
  locale?: string;
12
14
  }
13
- declare const EmailHelperTextBox: ({ type: content, email, redirectPath, resendVerificationCode, }: Props) => import("react/jsx-runtime").JSX.Element;
15
+ declare const EmailHelperTextBox: ({ id, type: content, email, redirectPath, resendVerificationCode, }: Props) => import("react/jsx-runtime").JSX.Element;
14
16
  export default EmailHelperTextBox;
@@ -8,6 +8,7 @@ export declare const Checkbox: ({ className, disabled, element, functions: allFu
8
8
  onKeyDown?: ((e: React.KeyboardEvent<HTMLElement>) => void) | undefined;
9
9
  submitForm?: ((arg: import("../../../form.types").IFormValues) => void) | undefined;
10
10
  'aria-describedby'?: string | undefined;
11
+ 'aria-errormessage'?: string | undefined;
11
12
  'aria-invalid'?: boolean | undefined;
12
13
  'aria-required'?: boolean | undefined;
13
14
  autoComplete?: string | undefined;
@@ -16,6 +16,7 @@ export declare const Input: ({ className, element, id, inputRef: ref, functions,
16
16
  placeholder: string | undefined;
17
17
  autoFocus: boolean | undefined;
18
18
  'aria-describedby'?: string | undefined;
19
+ 'aria-errormessage'?: string | undefined;
19
20
  'aria-invalid'?: boolean | undefined;
20
21
  'aria-required'?: boolean | undefined;
21
22
  autoComplete?: string | undefined;
@@ -1,3 +1,3 @@
1
1
  import { IField } from '../../../form.types';
2
- export declare const Password: ({ inputRef: ref, type, gtm: { context }, ...props }: IField) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Password: ({ inputRef: ref, type, gtm: { context }, autoComplete, ...props }: IField) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Password;
@@ -84,6 +84,8 @@ export interface IFieldFunctions {
84
84
  export interface IField {
85
85
  /** Optional ID of the element which describes this field, for screen readers */
86
86
  'aria-describedby'?: string;
87
+ /** Optional ID of the element which provides an error message for this field */
88
+ 'aria-errormessage'?: string;
87
89
  /** Optional data for screen readers on if the field content is invalid */
88
90
  'aria-invalid'?: boolean;
89
91
  /** Optional data for screen readers on if the field is required */
package/helpers/intl.d.ts CHANGED
@@ -193,6 +193,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
193
193
  form_fieldWrapper_characterLimit: string;
194
194
  form_fieldWrapper_characterLimit_aria_default: string;
195
195
  form_fieldWrapper_characterLimit_aria_over: string;
196
+ form_fieldWrapper_characterLimit_info: string;
196
197
  form_error_generalError: string;
197
198
  form_error_required: string;
198
199
  form_error_numbers: string;