@apolitical/component-library 4.5.0-beta.1 → 4.5.0-beta.3
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/discussion/components/form/form.d.ts +3 -0
- package/form/components/rich-text-editor/components/context/context.d.ts +2 -0
- package/form/components/rich-text-editor/rich-text-editor.d.ts +6 -1
- package/general/portal/portal.d.ts +2 -1
- package/index.js +30 -30
- package/index.mjs +2809 -2789
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -15,6 +15,9 @@ export interface IDiscussionFormMeta {
|
|
|
15
15
|
/** Whether the form is in a wrapper or not - used for styling */
|
|
16
16
|
isInWrapper?: boolean;
|
|
17
17
|
|
|
18
|
+
/** Whether the form is in a modal or not - used to handle portals */
|
|
19
|
+
isInOverlay?: false | string;
|
|
20
|
+
|
|
18
21
|
/** Whether the form should be autofocused. (It will always be autofocused when `isEditing`. */
|
|
19
22
|
isAutoFocused?: boolean;
|
|
20
23
|
|
|
@@ -16,6 +16,8 @@ declare const RichTextEditorContext: import("react").Context<{
|
|
|
16
16
|
mentionPopover: IMentionPopOver;
|
|
17
17
|
/** The last anchor point (used for Slate to know where the cursor is) */
|
|
18
18
|
lastAnchor: Point | null;
|
|
19
|
+
/** Whether the editor is inside a modal, used to handle portals for focus trap */
|
|
20
|
+
isInOverlay?: string | false | undefined;
|
|
19
21
|
/** The function to update the state */
|
|
20
22
|
dispatch: Dispatch<any>;
|
|
21
23
|
/** The function to report an error */
|
|
@@ -9,6 +9,11 @@ interface Props {
|
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
/** The maximum length of the rich text editor */
|
|
11
11
|
maxLength?: number;
|
|
12
|
+
/** Information about the rich text editor */
|
|
13
|
+
meta?: {
|
|
14
|
+
/** Whether the rich text editor is inside a modal */
|
|
15
|
+
isInOverlay?: false | 'string';
|
|
16
|
+
};
|
|
12
17
|
/** Optional functions */
|
|
13
18
|
functions?: {
|
|
14
19
|
/** An optional function to get a filtered list of members when the user starts typing a mention */
|
|
@@ -30,5 +35,5 @@ interface Props {
|
|
|
30
35
|
mentions?: IMentions;
|
|
31
36
|
};
|
|
32
37
|
}
|
|
33
|
-
declare const RichTextEditor: ({ id, value, placeholder, maxLength, functions, autoFocus, data, ...props }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
38
|
+
declare const RichTextEditor: ({ id, value, placeholder, maxLength, meta, functions, autoFocus, data, ...props }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
34
39
|
export default RichTextEditor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
declare const Portal: ({ children }: {
|
|
2
|
+
declare const Portal: ({ parent, children, }: {
|
|
3
|
+
parent?: Element | HTMLElement | DocumentFragment | undefined;
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
}) => import("react").ReactPortal | null;
|
|
5
6
|
export default Portal;
|