@manuscripts/style-guide 1.13.16 → 2.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.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.LoadingOverlay = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const react_modal_1 = __importDefault(require("react-modal"));
9
- const LoadingOverlay = ({ children }) => (react_1.default.createElement(react_1.default.Fragment, null,
9
+ const LoadingOverlay = ({ children, }) => (react_1.default.createElement(react_1.default.Fragment, null,
10
10
  react_1.default.createElement(react_modal_1.default, { isOpen: true, style: {
11
11
  overlay: {
12
12
  position: 'fixed',
@@ -23,7 +23,7 @@ const react_1 = __importDefault(require("react"));
23
23
  const TextField_1 = require("./TextField");
24
24
  const TextFieldError_1 = require("./TextFieldError");
25
25
  const TextFieldContainer = ({ label, error, children }) => {
26
- const childrenWithErrorProp = react_1.default.Children.map(children, (child) => react_1.default.cloneElement(child, { error }));
26
+ const childrenWithErrorProp = react_1.default.Children.map(children, (child) => react_1.default.cloneElement(child, { error: String(error) }));
27
27
  return (react_1.default.createElement(react_1.default.Fragment, null,
28
28
  label ? (react_1.default.createElement(TextField_1.TextFieldLabel, null,
29
29
  label,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Modal from 'react-modal';
3
- export const LoadingOverlay = ({ children }) => (React.createElement(React.Fragment, null,
3
+ export const LoadingOverlay = ({ children, }) => (React.createElement(React.Fragment, null,
4
4
  React.createElement(Modal, { isOpen: true, style: {
5
5
  overlay: {
6
6
  position: 'fixed',
@@ -17,7 +17,7 @@ import React from 'react';
17
17
  import { TextFieldLabel } from './TextField';
18
18
  import { TextFieldError, TextFieldErrorItem } from './TextFieldError';
19
19
  export const TextFieldContainer = ({ label, error, children }) => {
20
- const childrenWithErrorProp = React.Children.map(children, (child) => React.cloneElement(child, { error }));
20
+ const childrenWithErrorProp = React.Children.map(children, (child) => React.cloneElement(child, { error: String(error) }));
21
21
  return (React.createElement(React.Fragment, null,
22
22
  label ? (React.createElement(TextFieldLabel, null,
23
23
  label,
@@ -38,6 +38,7 @@ interface Props {
38
38
  type: AlertMessageType;
39
39
  dismissButton?: Dismiss;
40
40
  hideCloseButton?: boolean;
41
+ children: React.ReactNode;
41
42
  }
42
43
  export declare class AlertMessage extends React.Component<Props, State> {
43
44
  state: State;
@@ -33,6 +33,7 @@ export declare const Field: import("styled-components").StyledComponent<"div", i
33
33
  interface Props {
34
34
  title: React.ReactNode;
35
35
  contentStyles?: CSSProperties;
36
+ children?: React.ReactNode;
36
37
  }
37
38
  export declare const InspectorSection: React.FC<Props>;
38
39
  export {};
@@ -1,2 +1,4 @@
1
1
  import React from 'react';
2
- export declare const LoadingOverlay: React.FC;
2
+ export declare const LoadingOverlay: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
@@ -51,6 +51,7 @@ interface DropdownButtonProps {
51
51
  notificationsCount?: number;
52
52
  onClick?: React.MouseEventHandler;
53
53
  removeChevron?: boolean;
54
+ children: React.ReactNode;
54
55
  }
55
56
  export declare const NavDropdownButton: React.FunctionComponent<DropdownButtonProps>;
56
57
  export {};
@@ -21,4 +21,5 @@ export declare const TextFieldGroup: import("styled-components").StyledComponent
21
21
  export declare const TextFieldLabel: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
22
22
  export declare const TextFieldWrapper: React.FC<{
23
23
  leftIcon: JSX.Element;
24
+ children: React.ReactNode;
24
25
  }>;
@@ -17,7 +17,7 @@ import React from 'react';
17
17
  import { ErrorProps } from './Form';
18
18
  interface TextFieldContainerProps {
19
19
  label?: string;
20
- error?: string | null | Record<string, unknown>;
20
+ error?: React.ReactNode | undefined;
21
21
  children: React.ReactElement<ErrorProps>;
22
22
  }
23
23
  export declare const TextFieldContainer: React.FunctionComponent<TextFieldContainerProps>;
@@ -15,4 +15,6 @@
15
15
  */
16
16
  import React from 'react';
17
17
  export declare const TextFieldErrorItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
18
- export declare const TextFieldError: React.FunctionComponent;
18
+ export declare const TextFieldError: React.FunctionComponent<{
19
+ children: React.ReactNode;
20
+ }>;
@@ -15,10 +15,11 @@
15
15
  */
16
16
  import React from 'react';
17
17
  interface Errors {
18
- [key: string]: string | Record<string, unknown> | undefined;
18
+ [key: string]: React.ReactNode | undefined;
19
19
  }
20
20
  interface TextFieldGroupContainerProps {
21
21
  errors?: Errors;
22
+ children: React.ReactNode;
22
23
  }
23
24
  export declare const TextFieldGroupContainer: React.FunctionComponent<TextFieldGroupContainerProps>;
24
25
  export {};
@@ -52,4 +52,5 @@ export declare const usePermissions: () => Capabilities;
52
52
  export declare const useCalcPermission: ({ project, profile, role, permittedActions, }: ProviderProps) => Capabilities;
53
53
  export declare const CapabilitiesProvider: React.FC<{
54
54
  can: Capabilities;
55
+ children: React.ReactNode;
55
56
  }>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/style-guide",
3
3
  "description": "Shared components for Manuscripts applications",
4
- "version": "1.13.16",
4
+ "version": "2.0.0",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -39,7 +39,7 @@
39
39
  "formik": "^2.2.9",
40
40
  "fuzzysort": "^2.0.4",
41
41
  "lodash": "^4.17.21",
42
- "react": "^17.0.2",
42
+ "react": "^18.3.1",
43
43
  "prosemirror-view": "1.32.7",
44
44
  "prosemirror-state": "1.4.3",
45
45
  "prosemirror-model": "1.19.4",
@@ -48,8 +48,8 @@
48
48
  "prosemirror-commands": "1.5.2",
49
49
  "react-dnd": "^16.0.1",
50
50
  "react-dnd-html5-backend": "^16.0.1",
51
- "react-dom": "^17.0.2",
52
- "react-is": "^17.0.2",
51
+ "react-dom": "^18.3.1",
52
+ "react-is": "^18.3.1",
53
53
  "react-modal": "^3.16.1",
54
54
  "react-modern-calendar-datepicker": "^3.1.6",
55
55
  "react-router-dom": "^5.3.4",
@@ -74,8 +74,8 @@
74
74
  "@types/jest": "^29.2.4",
75
75
  "@types/lodash": "^4.14.202",
76
76
  "@types/styled-components": "^5.1.4",
77
- "@types/react": "^17.0.2",
78
- "@types/react-dom": "^17.0.2",
77
+ "@types/react": "^18.3.1",
78
+ "@types/react-dom": "^18.3.0",
79
79
  "@types/react-modal": "^3.16.3",
80
80
  "@types/react-router-dom": "^5.3.3",
81
81
  "@typescript-eslint/eslint-plugin": "^5.47.0",
@@ -106,7 +106,7 @@
106
106
  "typescript": "^4.4.4"
107
107
  },
108
108
  "resolutions": {
109
- "@types/react": "^17.0.2",
109
+ "@types/react": "^18.3.1",
110
110
  "jackspeak": "2.1.1"
111
111
  }
112
112
  }