@apolitical/component-library 1.12.1 → 1.12.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/discussion.helpers.d.ts +1 -0
- package/form/types/index.d.ts +1 -0
- package/form/types/invite-form/index.d.ts +1 -0
- package/form/types/invite-form/invite-form.d.ts +30 -0
- package/index.js +35 -35
- package/index.mjs +6070 -5719
- package/modals/index.d.ts +1 -0
- package/modals/invite-modal/index.d.ts +1 -0
- package/modals/invite-modal/invite-modal.d.ts +31 -0
- package/modals/overlay/overlay.d.ts +5 -1
- package/package.json +2 -1
- package/style.css +1 -1
- package/styles/variables/colors/_theme.scss +19 -57
package/modals/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as InviteModal } from './invite-modal';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** The ID of the element */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Additional classes */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Optional styling */
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
/** Whether the modal is open on page load */
|
|
10
|
+
showModal?: boolean;
|
|
11
|
+
/** Function to close the modal */
|
|
12
|
+
onClose(): void;
|
|
13
|
+
/** Function to report errors */
|
|
14
|
+
reportError?(error: unknown): void;
|
|
15
|
+
/** Title displayed on the modal */
|
|
16
|
+
title?: string;
|
|
17
|
+
/** Title on the form */
|
|
18
|
+
formTitle?: string;
|
|
19
|
+
/** Form input label */
|
|
20
|
+
formLabel?: string;
|
|
21
|
+
/** CTA button text displayed on the form */
|
|
22
|
+
ctaMessage: string;
|
|
23
|
+
/** Function to send the invites */
|
|
24
|
+
sendInvites(emails: string[]): void;
|
|
25
|
+
/** Whether to show the check icon */
|
|
26
|
+
showIcon?: boolean;
|
|
27
|
+
/** Whether to show the modal header */
|
|
28
|
+
showHeader?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare const InviteModal: ({ className, showModal, title, formTitle, formLabel, ctaMessage, showIcon, onClose, reportError, sendInvites, }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default InviteModal;
|
|
@@ -5,6 +5,8 @@ interface Props {
|
|
|
5
5
|
id?: string;
|
|
6
6
|
/** If the overlay is showing or not */
|
|
7
7
|
isOpen?: boolean;
|
|
8
|
+
/** If the header divider is showing be or not */
|
|
9
|
+
showDivider?: boolean;
|
|
8
10
|
/** The maximum width of the modal */
|
|
9
11
|
maxWidth?: number;
|
|
10
12
|
/** Functions to handle the overlay */
|
|
@@ -19,6 +21,8 @@ interface Props {
|
|
|
19
21
|
/** If an error, created externally, should always show */
|
|
20
22
|
error?: false | string;
|
|
21
23
|
};
|
|
24
|
+
/** Whether to show the check icon */
|
|
25
|
+
showIcon?: boolean;
|
|
22
26
|
/** The title to show */
|
|
23
27
|
title?: string | undefined;
|
|
24
28
|
/** The content to show */
|
|
@@ -32,5 +36,5 @@ interface Props {
|
|
|
32
36
|
/** Language to use */
|
|
33
37
|
locale?: string;
|
|
34
38
|
}
|
|
35
|
-
declare const Overlay: ({ id, isOpen, maxWidth, functions: { onOpen, onClose }, forceShow: { error }, title, children, buttons, className, gtmContext }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare const Overlay: ({ id, isOpen, showDivider, maxWidth, functions: { onOpen, onClose }, forceShow: { error }, title, children, buttons, className, gtmContext, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
36
40
|
export default Overlay;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apolitical/component-library",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.3",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"react-dom": "18.2.0",
|
|
26
26
|
"react-error-boundary": "4.0.11",
|
|
27
27
|
"react-intl": "6.4.4",
|
|
28
|
+
"react-multi-email": "1.0.17",
|
|
28
29
|
"react-textarea-autosize": "8.5.3",
|
|
29
30
|
"truncate": "3.0.0",
|
|
30
31
|
"tslib": "2.6.2"
|