@apolitical/component-library 8.7.25 → 9.0.0-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.
- package/accessibility/visually-hidden/visually-hidden.d.ts +1 -1
- package/discussion/components/thread/thread.d.ts +1 -1
- package/discussion/feeds/replies-feed/components/add-reply-form/add-reply-form.d.ts +1 -1
- package/discussion/feeds/replies-feed/components/load-more-replies-button/load-more-replies-button.d.ts +1 -1
- package/discussion/feeds/replies-feed/components/reply-item/reply-item.d.ts +1 -1
- package/form/components/form/components/fields/input/input.d.ts +1 -1
- package/form/components/form/form.types.d.ts +2 -2
- package/form/components/rich-text-editor/hooks/use-positioned-element/use-positioned-element.d.ts +1 -1
- package/form/types/signup-form/signup-form.helpers.get-fields.d.ts +2 -7
- package/general/buttons/button-wrapper/button-wrapper.d.ts +1 -1
- package/general/link/link.d.ts +1 -1
- package/general/tooltip/tooltip.d.ts +2 -2
- package/helpers/intl.d.ts +1 -1
- package/helpers/pass-props-to-children.d.ts +1 -1
- package/hooks/use-auto-resize/use-auto-resize.d.ts +2 -2
- package/index.js +133 -138
- package/index.mjs +12669 -13010
- package/layout/page-layout/page-layout.d.ts +1 -1
- package/modals/components/modal/modal.d.ts +2 -2
- package/modals/components/overlay/overlay.d.ts +1 -1
- package/navigation/more-menu/more-menu.d.ts +2 -2
- package/navigation/tabs/tabs.d.ts +1 -1
- package/package.json +4 -4
- package/sections/edit-section/edit-section.d.ts +1 -1
- package/sections/full-width-section/full-width-section.d.ts +1 -1
- package/style.css +1 -1
- package/text/helper-text-box/helper-text-box.d.ts +1 -1
- package/text/highlighted-text-box/highlighted-text-box.d.ts +1 -1
- package/text/icon-bulleted-list/icon-bulleted-list.d.ts +1 -1
- package/text/markdown-text/components/div/div.d.ts +1 -1
- package/text/markdown-text/components/empty-component/empty-component.d.ts +1 -3
- package/text/markdown-text/components/link/link.d.ts +1 -1
|
@@ -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;
|
|
@@ -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>;
|
|
63
|
+
ref: React.RefObject<HTMLInputElement | null>;
|
|
64
64
|
}, HTMLInputElement>;
|
|
65
65
|
export default Input;
|
|
@@ -131,7 +131,7 @@ export interface IField {
|
|
|
131
131
|
/** The initial value of the field, for dropdown fields */
|
|
132
132
|
initialValue?: FormValues;
|
|
133
133
|
/** An optional `ref` for the field, in case we need to interact with it in another file */
|
|
134
|
-
inputRef?: React.RefObject<HTMLInputElement>;
|
|
134
|
+
inputRef?: React.RefObject<HTMLInputElement | null>;
|
|
135
135
|
/** The internationalisation path for the field */
|
|
136
136
|
intlPath?: string | false;
|
|
137
137
|
/** The label for the field */
|
|
@@ -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 */
|
package/form/components/rich-text-editor/hooks/use-positioned-element/use-positioned-element.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseEditor } from 'slate';
|
|
3
|
-
declare const usePositionedElement: (editor: BaseEditor, element: string, fallback: string) => import("react").
|
|
3
|
+
declare const usePositionedElement: (editor: BaseEditor, element: string, fallback: string) => import("react").RefObject<HTMLElement | null>;
|
|
4
4
|
export default usePositionedElement;
|
|
@@ -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;
|
package/general/link/link.d.ts
CHANGED
|
@@ -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?: {
|
|
@@ -38,5 +38,5 @@ interface Props {
|
|
|
38
38
|
/** The id of the tooltip */
|
|
39
39
|
id?: string;
|
|
40
40
|
}
|
|
41
|
-
declare const _default: React.
|
|
41
|
+
declare const _default: React.NamedExoticComponent<Props & React.RefAttributes<HTMLElement | null>>;
|
|
42
42
|
export default _default;
|
package/helpers/intl.d.ts
CHANGED
|
@@ -610,4 +610,4 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
610
610
|
}) => boolean;
|
|
611
611
|
export declare const getIntlPath: (callback: (args1: {
|
|
612
612
|
id: string;
|
|
613
|
-
}, args2?:
|
|
613
|
+
}, 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<
|
|
2
|
+
declare const passPropsToChildren: (children: React.ReactElement, props: object) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>[];
|
|
3
3
|
export default passPropsToChildren;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: (shouldResize: boolean, inputRef?:
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
declare const _default: (shouldResize: boolean, inputRef?: RefObject<HTMLTextAreaElement | HTMLInputElement | null>) => false | RefObject<HTMLTextAreaElement | HTMLInputElement | null>;
|
|
3
3
|
export default _default;
|