@apolitical/component-library 9.1.0 → 10.0.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.
Files changed (28) hide show
  1. package/accessibility/visually-hidden/visually-hidden.d.ts +1 -1
  2. package/discussion/components/thread/thread.d.ts +1 -1
  3. package/discussion/feeds/replies-feed/components/add-reply-form/add-reply-form.d.ts +1 -1
  4. package/discussion/feeds/replies-feed/components/load-more-replies-button/load-more-replies-button.d.ts +1 -1
  5. package/discussion/feeds/replies-feed/components/reply-item/reply-item.d.ts +1 -1
  6. package/form/components/form/components/fields/input/input.d.ts +3 -3
  7. package/form/components/form/form.types.d.ts +1 -1
  8. package/form/components/rich-text-editor/helpers/transform/transform.d.ts +1 -1
  9. package/form/types/signup-form/signup-form.helpers.get-fields.d.ts +2 -7
  10. package/general/buttons/button-wrapper/button-wrapper.d.ts +1 -1
  11. package/general/link/link.d.ts +1 -1
  12. package/general/tooltip/tooltip.d.ts +1 -1
  13. package/helpers/intl.d.ts +1 -1
  14. package/helpers/pass-props-to-children.d.ts +1 -1
  15. package/index.js +160 -163
  16. package/index.mjs +15500 -15536
  17. package/layout/content-layout/columns/columns.d.ts +1 -1
  18. package/layout/page-layout/page-layout.d.ts +1 -1
  19. package/modals/components/modal/modal.d.ts +1 -1
  20. package/modals/components/overlay/overlay.d.ts +1 -1
  21. package/navigation/tabs/tabs.d.ts +1 -1
  22. package/package.json +5 -5
  23. package/sections/edit-section/edit-section.d.ts +1 -1
  24. package/sections/full-width-section/full-width-section.d.ts +1 -1
  25. package/style.css +1 -1
  26. package/text/helper-text-box/helper-text-box.d.ts +1 -1
  27. package/text/highlighted-text-box/highlighted-text-box.d.ts +1 -1
  28. package/text/icon-bulleted-list/icon-bulleted-list.d.ts +1 -1
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  import { type IAriaLive } from '../../types';
3
3
  interface Props {
4
4
  /** The ID of the element */
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  import { IDiscussionForm } from './../form';
3
3
  interface Props {
4
4
  /** Props for the load more button */
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { IDiscussionFormFunctions } from '../../../../../discussion/shared';
2
+ import type { JSX } from "react";
3
3
  interface Props {
4
4
  /** Whether the user is a member of the community */
5
5
  isMember: boolean;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import type { JSX } from "react";
2
2
  interface Props {
3
3
  /** Whether there is a next page */
4
4
  hasNextPage: boolean;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { ILikesFeedQueryFns } from '../../../../../discussion/feeds/likes-feed';
3
2
  import { DiscussionType, type IDiscussionFormFns } from '../../../../../discussion/shared';
4
3
  import type { IParsedReplies, IQueryFns } from '../../cache';
4
+ import type { JSX } from "react";
5
5
  interface IMutations {
6
6
  edit: (params: {
7
7
  replyId: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IField, InputTypes, InputValues } from '../../../form.types';
3
- export declare const Input: ({ className, element, id, inputRef: ref, functions, name, placeholder, type, value, autoFocus, label, styling, ...props }: IField) => React.DOMElement<{
3
+ export declare const Input: ({ className, element, id, inputRef: ref, functions, name, placeholder, type, value, autoFocus, label, styling, ...props }: IField) => React.ReactElement<{
4
4
  onChange: (e: React.FormEvent<HTMLInputElement>) => void;
5
5
  onMultiSelectSubmit?: ((arg1: import("../../../form.types").FormValues) => void) | undefined;
6
6
  onBlur?: (() => void) | undefined;
@@ -60,6 +60,6 @@ export declare const Input: ({ className, element, id, inputRef: ref, functions,
60
60
  shownValue?: InputValues | undefined;
61
61
  submitOnEnter?: boolean | undefined;
62
62
  validation?: import("../../../form.types").IFieldValidation[] | undefined;
63
- ref: React.RefObject<HTMLInputElement>;
64
- }, HTMLInputElement>;
63
+ ref: React.RefObject<HTMLInputElement | null>;
64
+ }, string | React.JSXElementConstructor<any>>;
65
65
  export default Input;
@@ -238,7 +238,7 @@ export interface IFormProps {
238
238
  /** The fields to render in the form */
239
239
  fields: IField[];
240
240
  /** An optional `ref` for the form, in case we need to interact with it in another file */
241
- formRef?: React.RefObject<HTMLFormElement>;
241
+ formRef?: React.RefObject<HTMLFormElement | null>;
242
242
  /** The functions being passed to the form */
243
243
  functions: {
244
244
  /** The function to call when onSuccess fails */
@@ -12,8 +12,8 @@ export default function transform<T extends InputNodeTypes>(node: MdastNode, opt
12
12
  position?: any;
13
13
  ordered?: boolean | undefined;
14
14
  checked?: any;
15
- lang?: string | undefined;
16
15
  depth?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
16
+ lang?: string | undefined;
17
17
  spread?: any;
18
18
  indent?: any;
19
19
  text: string | undefined;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { IntlShape } from 'react-intl';
2
3
  import { IField } from '../../../form/components/form/form.types';
3
4
  import { IShouldShowProps } from './signup-form';
4
5
  interface Props {
@@ -43,13 +44,7 @@ interface Props {
43
44
  dataToSubmit: {
44
45
  [key: string]: string;
45
46
  };
46
- intl: {
47
- formatMessage: (arg: {
48
- [key: string]: string;
49
- }, arg2?: {
50
- [key: string]: (arg: string) => React.ReactNode;
51
- }) => string;
52
- };
47
+ intl: IntlShape;
53
48
  }
54
49
  declare const _default: ({ shouldShow, placeholders, labels, functions: { validateEmail, resendVerificationCode }, refs, state, dispatch, dataToSubmit, intl, }: Props) => IField[];
55
50
  export default _default;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  import { ButtonPropsType } from './../button';
3
3
  interface Props {
4
4
  /** The props for each button */
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  type LinkOnClick = ((e?: React.MouseEvent<HTMLElement>) => void) | undefined;
3
3
  export interface ILinkProps {
4
4
  /** URL for link */
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  interface Props {
3
3
  /** Optional styling */
4
4
  styling?: {
package/helpers/intl.d.ts CHANGED
@@ -613,4 +613,4 @@ export declare const checkIntlPathExists: (path: string, language?: {
613
613
  }) => boolean;
614
614
  export declare const getIntlPath: (callback: (args1: {
615
615
  id: string;
616
- }, args2?: object) => string, path: string, key: string, value: string, args?: object) => string;
616
+ }, args2?: Record<string, any>) => string, path: string, key: string, value: string, args?: Record<string, any>) => string;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const passPropsToChildren: (children: React.ReactElement, props: object) => React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
2
+ declare const passPropsToChildren: (children: React.ReactNode, props: Record<string, unknown>) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>)[] | null | undefined;
3
3
  export default passPropsToChildren;