@manuscripts/style-guide 1.7.1 → 1.7.2-LEAN-3083

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 (95) hide show
  1. package/dist/cjs/components/Comments/CommentBody.js +3 -3
  2. package/dist/cjs/components/Comments/CommentUser.js +1 -1
  3. package/dist/cjs/components/Comments/ResolveButton.js +3 -3
  4. package/dist/cjs/components/FileManager/FileCreatedDate.js +3 -3
  5. package/dist/cjs/components/FileManager/FileManager.js +7 -7
  6. package/dist/cjs/components/FileManager/OtherFilesSection.js +2 -2
  7. package/dist/cjs/components/FileManager/SupplementsSection.js +1 -2
  8. package/dist/cjs/components/References/CitationEditor.js +2 -2
  9. package/dist/cjs/components/References/ReferenceForm.js +8 -9
  10. package/dist/cjs/components/References/ReferenceSearch.js +2 -2
  11. package/dist/cjs/components/References/ReferencesModal.js +5 -5
  12. package/dist/cjs/components/RelativeDate.js +23 -6
  13. package/dist/cjs/components/{FileManager/Tooltip.js → Tooltip.js} +12 -7
  14. package/dist/cjs/index.js +1 -5
  15. package/dist/cjs/lib/files.js +4 -5
  16. package/dist/es/components/Comments/CommentBody.js +3 -3
  17. package/dist/es/components/Comments/CommentUser.js +1 -1
  18. package/dist/es/components/Comments/ResolveButton.js +3 -3
  19. package/dist/es/components/FileManager/FileCreatedDate.js +3 -3
  20. package/dist/es/components/FileManager/FileManager.js +7 -7
  21. package/dist/es/components/FileManager/OtherFilesSection.js +2 -2
  22. package/dist/es/components/FileManager/SupplementsSection.js +2 -3
  23. package/dist/es/components/References/CitationEditor.js +1 -1
  24. package/dist/es/components/References/ReferenceForm.js +6 -7
  25. package/dist/es/components/References/ReferenceSearch.js +1 -1
  26. package/dist/es/components/References/ReferencesModal.js +5 -5
  27. package/dist/es/components/RelativeDate.js +23 -6
  28. package/dist/es/components/Tooltip.js +25 -0
  29. package/dist/es/index.js +1 -5
  30. package/dist/es/lib/files.js +1 -2
  31. package/dist/types/components/AlertMessage.d.ts +1 -1
  32. package/dist/types/components/AuthorForm/RemoveAuthorButton.d.ts +1 -1
  33. package/dist/types/components/AutoSaveInput.d.ts +1 -1
  34. package/dist/types/components/Comments/CommentUser.d.ts +2 -3
  35. package/dist/types/components/Dialog.d.ts +1 -1
  36. package/dist/types/components/Dropdown.d.ts +1 -1
  37. package/dist/types/components/EditorHeader/EditorHeader.d.ts +1 -2
  38. package/dist/types/components/FileManager/FileActions.d.ts +1 -1
  39. package/dist/types/components/FileManager/FileManager.d.ts +1 -2
  40. package/dist/types/components/FileManager/util.d.ts +1 -0
  41. package/dist/types/components/Form.d.ts +1 -1
  42. package/dist/types/components/Inspector.d.ts +7 -9
  43. package/dist/types/components/NavDropdown.d.ts +1 -1
  44. package/dist/types/components/References/ReferenceForm.d.ts +1 -1
  45. package/dist/types/components/RelativeDate.d.ts +15 -1
  46. package/dist/types/components/Resizer/Resizer.d.ts +1 -1
  47. package/dist/types/components/Resizer/ResizerButton.d.ts +1 -1
  48. package/dist/types/components/Tooltip.d.ts +5 -0
  49. package/dist/types/components/icons/add-author.d.ts +2 -1
  50. package/dist/types/components/icons/add-comment-icon.d.ts +2 -1
  51. package/dist/types/components/icons/add-icon-active.d.ts +2 -1
  52. package/dist/types/components/icons/add-icon-inverted.d.ts +2 -1
  53. package/dist/types/components/icons/back-arrow.d.ts +2 -1
  54. package/dist/types/components/icons/bookmark.d.ts +2 -1
  55. package/dist/types/components/icons/google.d.ts +2 -1
  56. package/dist/types/components/icons/orcid.d.ts +2 -1
  57. package/dist/types/components/icons/project-notification.d.ts +2 -1
  58. package/dist/types/components/icons/project.d.ts +2 -1
  59. package/dist/types/components/icons/projects-list.d.ts +2 -1
  60. package/dist/types/components/icons/search.d.ts +2 -1
  61. package/dist/types/components/icons/tick-mark.d.ts +2 -1
  62. package/dist/types/components/icons/user.d.ts +2 -1
  63. package/dist/types/index.d.ts +1 -5
  64. package/dist/types/lib/capabilities.d.ts +3 -4
  65. package/package.json +30 -41
  66. package/dist/cjs/components/AffiliationsList.js +0 -43
  67. package/dist/cjs/components/AuthorsContainer.js +0 -71
  68. package/dist/cjs/components/AuthorsList/Author.js +0 -99
  69. package/dist/cjs/components/AuthorsList/AuthorsList.js +0 -52
  70. package/dist/cjs/components/AuthorsList/index.js +0 -32
  71. package/dist/cjs/components/ColorField/ColorField.js +0 -49
  72. package/dist/cjs/components/ColorField/ColorSelector.js +0 -115
  73. package/dist/cjs/components/ColorField/index.js +0 -32
  74. package/dist/cjs/components/Tip.js +0 -83
  75. package/dist/es/components/AffiliationsList.js +0 -36
  76. package/dist/es/components/AuthorsContainer.js +0 -41
  77. package/dist/es/components/AuthorsList/Author.js +0 -69
  78. package/dist/es/components/AuthorsList/AuthorsList.js +0 -45
  79. package/dist/es/components/AuthorsList/index.js +0 -16
  80. package/dist/es/components/ColorField/ColorField.js +0 -42
  81. package/dist/es/components/ColorField/ColorSelector.js +0 -85
  82. package/dist/es/components/ColorField/index.js +0 -16
  83. package/dist/es/components/FileManager/Tooltip.js +0 -20
  84. package/dist/es/components/Tip.js +0 -53
  85. package/dist/types/components/AffiliationsList.d.ts +0 -22
  86. package/dist/types/components/AuthorsContainer.d.ts +0 -25
  87. package/dist/types/components/AuthorsList/Author.d.ts +0 -29
  88. package/dist/types/components/AuthorsList/AuthorsList.d.ts +0 -28
  89. package/dist/types/components/AuthorsList/index.d.ts +0 -16
  90. package/dist/types/components/ColorField/ColorField.d.ts +0 -27
  91. package/dist/types/components/ColorField/ColorSelector.d.ts +0 -19
  92. package/dist/types/components/ColorField/index.d.ts +0 -16
  93. package/dist/types/components/FileManager/Tooltip.d.ts +0 -2
  94. package/dist/types/components/Tip.d.ts +0 -18
  95. package/styles/tip.css +0 -82
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /*!
3
- * © 2019 Atypon Systems LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- var __importDefault = (this && this.__importDefault) || function (mod) {
41
- return (mod && mod.__esModule) ? mod : { "default": mod };
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.Tip = void 0;
45
- const react_1 = __importStar(require("react"));
46
- const styled_components_1 = __importDefault(require("styled-components"));
47
- const tooltip_js_1 = __importDefault(require("tooltip.js"));
48
- const TipContainer = styled_components_1.default.div `
49
- align-items: center;
50
- display: flex;
51
- font-family: ${(props) => props.theme.font.family.sans};
52
- justify-content: center;
53
- `;
54
- const Tip = ({ children, placement, title, }) => {
55
- const [tooltip, setTooltip] = (0, react_1.useState)();
56
- (0, react_1.useEffect)(() => () => {
57
- if (tooltip) {
58
- tooltip.dispose();
59
- }
60
- }, [tooltip]);
61
- const createTooltip = (0, react_1.useCallback)((node) => {
62
- if (node) {
63
- setTooltip(new tooltip_js_1.default(node, {
64
- placement,
65
- title,
66
- container: document.body,
67
- boundariesElement: 'window',
68
- }));
69
- }
70
- }, [setTooltip, placement, title]);
71
- const show = (0, react_1.useCallback)(() => {
72
- if (tooltip) {
73
- tooltip.show();
74
- }
75
- }, [tooltip]);
76
- const hide = (0, react_1.useCallback)(() => {
77
- if (tooltip) {
78
- tooltip.hide();
79
- }
80
- }, [tooltip]);
81
- return (react_1.default.createElement(TipContainer, { ref: createTooltip, onMouseEnter: show, onMouseLeave: hide }, children));
82
- };
83
- exports.Tip = Tip;
@@ -1,36 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
17
- import styled from 'styled-components';
18
- import formatAddress from '../lib/formatAddress';
19
- const Container = styled.table `
20
- border-collapse: collapse;
21
- font: inherit;
22
- color: ${(props) => props.theme.colors.text.secondary};
23
- margin-top: ${(props) => props.theme.grid.unit * 4}px;
24
- `;
25
- const Header = styled.th `
26
- font-weight: ${(props) => props.theme.font.weight.normal}
27
- padding: 0 4px 0 0;
28
- vertical-align: top;
29
- `;
30
- const Body = styled.td `
31
- padding: 0;
32
- `;
33
- export const AffiliationsList = ({ affiliations, }) => (React.createElement(Container, null,
34
- React.createElement("tbody", null, Array.from(affiliations.values()).map((affiliation, index) => (React.createElement("tr", { key: affiliation._id },
35
- React.createElement(Header, null, index + 1),
36
- React.createElement(Body, null, formatAddress(affiliation))))))));
@@ -1,41 +0,0 @@
1
- /*!
2
- * © 2021 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React, { useMemo } from 'react';
17
- import styled from 'styled-components';
18
- import { AffiliationsList } from './AffiliationsList';
19
- import { AuthorsList } from './AuthorsList';
20
- export const AuthorsContainer = ({ authorData, showEditButton, startEditing, selectAuthor, disableEditButton, }) => {
21
- const authorAffiliations = useMemo(() => authorData.authors.filter((author) => author.role === 'author'), [authorData.authors]);
22
- const isThereJointContributor = useMemo(() => authorData.authors.find((contributor) => contributor.isJointContributor), [authorData.authors]);
23
- return (React.createElement(Container, { "data-cy": 'author-container' },
24
- React.createElement(AuthorsList, { authors: authorAffiliations, authorAffiliations: authorData.authorAffiliations, startEditing: startEditing, showEditButton: showEditButton, selectAuthor: selectAuthor, disableEditButton: disableEditButton }),
25
- React.createElement(AffiliationsList, { affiliations: authorData.affiliations }),
26
- isThereJointContributor && (React.createElement(LegendWrapper, null,
27
- React.createElement(Legend, null, "\u2020"),
28
- "These authors contributed equally to this work."))));
29
- };
30
- const Container = styled.div `
31
- margin-top: ${(props) => props.theme.grid.unit * 4}px;
32
- `;
33
- const LegendWrapper = styled.p `
34
- margin: ${(props) => props.theme.grid.unit * 4}px 0 0 0;
35
- `;
36
- const Legend = styled.span `
37
- display: inline-block;
38
- font-size: 0.75em;
39
- line-height: 1;
40
- vertical-align: top;
41
- `;
@@ -1,69 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
17
- import styled, { css } from 'styled-components';
18
- import { AuthorName } from '../AuthorName';
19
- const AuthorNotes = styled.span `
20
- display: inline-block;
21
- font-size: 0.75em;
22
- line-height: 1;
23
- vertical-align: top;
24
- `;
25
- const LinkSharedStyles = css `
26
- text-decoration: none;
27
- color: inherit;
28
- outline: none;
29
-
30
- &:not(:disabled) {
31
- &:hover,
32
- &:focus {
33
- &,
34
- span {
35
- color: ${(props) => props.theme.colors.text.tertiary};
36
- }
37
- }
38
- }
39
- `;
40
- const AuthorAffiliation = styled.span `
41
- ${LinkSharedStyles}
42
- `;
43
- const AuthorsContainer = styled.button `
44
- display: inline-flex;
45
- background: transparent;
46
- border: 0;
47
- font-size: 1rem;
48
- ${LinkSharedStyles}
49
-
50
- &:not(:disabled) {
51
- &:hover {
52
- text-decoration: underline;
53
- cursor: pointer !important;
54
- }
55
- }
56
- `;
57
- export const Author = ({ author, affiliations, jointFirstAuthor, startEditing, selectAuthor, showEditButton, disableEditButton, }) => (React.createElement("span", { key: author._id },
58
- showEditButton ? (React.createElement(AuthorsContainer, { disabled: disableEditButton, onClick: (e) => {
59
- e.preventDefault();
60
- startEditing && startEditing();
61
- selectAuthor && selectAuthor(author);
62
- } },
63
- React.createElement(AuthorName, { name: author.bibliographicName, email: (author.isCorresponding && author.email) || undefined }))) : (React.createElement(AuthorName, { name: author.bibliographicName, email: (author.isCorresponding && author.email) || undefined })),
64
- affiliations && (React.createElement(AuthorNotes, null, affiliations.map((affiliation, index) => (React.createElement(React.Fragment, { key: affiliation.data._id },
65
- !!index && ',',
66
- React.createElement(AuthorAffiliation, null, affiliation.ordinal)))))),
67
- author.isCorresponding && (React.createElement(AuthorNotes, { title: 'Corresponding author' }, "*")),
68
- jointFirstAuthor && (React.createElement(AuthorNotes, { title: 'Joint contributor' }, "\u2020"))));
69
- export default Author;
@@ -1,45 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
17
- import styled from 'styled-components';
18
- import { isJointFirstAuthor } from '../../lib/authors';
19
- import { PrimaryButton } from '../Button';
20
- import { Author } from './Author';
21
- const AuthorsContainer = styled.div `
22
- align-items: center;
23
- display: flex;
24
-
25
- @media (min-width: 768px) {
26
- & ${PrimaryButton} {
27
- display: ${(props) => (props.isEmpty ? 'initial' : 'none')};
28
- }
29
-
30
- &:hover ${PrimaryButton} {
31
- display: initial;
32
- }
33
- }
34
- `;
35
- const AuthorsActions = styled.div `
36
- align-items: center;
37
- display: flex;
38
- margin-left: ${(props) => props.theme.grid.unit * 2}px;
39
- `;
40
- export const AuthorsList = ({ authors, authorAffiliations, startEditing, showEditButton, disableEditButton, selectAuthor, }) => (React.createElement(AuthorsContainer, { isEmpty: !authors.length },
41
- React.createElement("div", null, authors.map((author, index) => (React.createElement(React.Fragment, { key: author._id },
42
- !!index && ', ',
43
- React.createElement(Author, { author: author, jointFirstAuthor: isJointFirstAuthor(authors, index), affiliations: authorAffiliations.get(author._id), selectAuthor: selectAuthor, startEditing: startEditing, showEditButton: showEditButton, disableEditButton: disableEditButton }))))),
44
- showEditButton && startEditing && (React.createElement(AuthorsActions, null,
45
- React.createElement(PrimaryButton, { mini: true, onClick: startEditing, className: 'edit_authors_button', disabled: disableEditButton }, "Edit Authors")))));
@@ -1,16 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export * from './AuthorsList';
@@ -1,42 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
17
- import styled from 'styled-components';
18
- import { ColorSelector } from './ColorSelector';
19
- export const ColorField = ({ options, value, handleChange, }) => (React.createElement(Container, null,
20
- options.map((color) => (React.createElement(ItemButton, { key: color.value, type: "button", color: color.value, isActive: value === color.value, onClick: () => handleChange(color.value) }))),
21
- React.createElement(ColorSelector, { handleChange: handleChange })));
22
- const Container = styled.div `
23
- display: flex;
24
- flex-wrap: wrap;
25
- align-items: center;
26
- `;
27
- const ItemButton = styled.button `
28
- background: ${(props) => props.color};
29
- box-shadow: ${(props) => (props.isActive ? '0 0 1px 1px #000' : 'none')};
30
- height: ${(props) => props.theme.grid.unit * 3}px;
31
- width: ${(props) => props.theme.grid.unit * 3}px;
32
- border-radius: 50%;
33
- margin: 2px;
34
- padding: 0;
35
- border: 1px solid ${(props) => props.theme.colors.border.tertiary};
36
- cursor: pointer;
37
- flex-shrink: 0;
38
-
39
- /* &:focus {
40
- outline: none;
41
- }*/
42
- `;
@@ -1,85 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React, { useCallback, useState } from 'react';
17
- import { ChromePicker } from 'react-color';
18
- import { Manager, Popper, Reference } from 'react-popper';
19
- import styled from 'styled-components';
20
- import { PrimaryButton, SecondaryButton } from '../Button';
21
- export const ColorSelector = ({ handleChange }) => {
22
- const [open, setOpen] = useState(false);
23
- const [color, setColor] = useState('#ffffff');
24
- const toggleOpen = useCallback(() => {
25
- setOpen((open) => !open);
26
- }, [setOpen]);
27
- const handleSave = useCallback(() => {
28
- if (color) {
29
- handleChange(color);
30
- }
31
- setOpen(false);
32
- }, [color, handleChange, setOpen]);
33
- const handleColorChange = useCallback((color) => {
34
- setColor(color.hex);
35
- }, [setColor]);
36
- const handleCancel = useCallback(() => {
37
- setOpen(false);
38
- }, [setOpen]);
39
- return (React.createElement(Manager, null,
40
- React.createElement(Reference, null, ({ ref }) => (React.createElement(AddButton, { ref: ref, type: 'button', onClick: toggleOpen }, "+"))),
41
- open && (React.createElement(Popper, { placement: 'left' }, ({ ref, style, placement }) => (React.createElement("div", { ref: ref, style: Object.assign(Object.assign({}, style), { zIndex: 10 }), "data-placement": placement },
42
- React.createElement(PopperContent, null,
43
- React.createElement(ChromePicker, { onChangeComplete: handleColorChange, color: color }),
44
- React.createElement(Actions, null,
45
- React.createElement(PrimaryButton, { mini: true, onClick: handleSave }, "Add color"),
46
- React.createElement(SecondaryButton, { mini: true, onClick: handleCancel }, "Cancel")))))))));
47
- };
48
- const Actions = styled.div `
49
- display: flex;
50
- justify-content: center;
51
- align-items: center;
52
- `;
53
- const PopperContent = styled.div `
54
- border: 1px solid ${(props) => props.theme.colors.text.muted};
55
- border-radius: ${(props) => props.theme.grid.radius.small};
56
- box-shadow: ${(props) => props.theme.shadow.dropShadow};
57
- background: ${(props) => props.theme.colors.background.primary};
58
- padding: ${(props) => props.theme.grid.unit * 2}px;
59
-
60
- .chrome-picker {
61
- box-shadow: none !important;
62
- }
63
- `;
64
- const AddButton = styled.button `
65
- display: inline-flex;
66
- align-items: center;
67
- justify-content: center;
68
- background: transparent;
69
- border: 1px solid transparent;
70
- border-radius: 50%;
71
- width: ${(props) => props.theme.grid.unit * 4}px;
72
- height: ${(props) => props.theme.grid.unit * 4}px;
73
- margin: 2px;
74
- cursor: pointer;
75
- line-height: 0;
76
- font-size: ${(props) => props.theme.font.size.medium};
77
-
78
- :hover {
79
- border-color: ${(props) => props.theme.colors.border.secondary};
80
- }
81
-
82
- :focus {
83
- outline: none;
84
- }
85
- `;
@@ -1,16 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export * from './ColorField';
@@ -1,20 +0,0 @@
1
- import ReactTooltip from 'react-tooltip';
2
- import styled from 'styled-components';
3
- export const Tooltip = styled(ReactTooltip) `
4
- &.tooltip {
5
- font-size: 12px;
6
- line-height: 16px;
7
- font-family: ${(props) => props.theme.font.family.Lato};
8
- padding: 8px;
9
- border-radius: 6px;
10
- background: #353535;
11
- color: ${(props) => props.theme.colors.text.onDark};
12
- text-align: center;
13
- white-space: nowrap;
14
- pointer-events: none;
15
-
16
- &.place-bottom::after {
17
- background: #353535;
18
- }
19
- }
20
- `;
@@ -1,53 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React, { useCallback, useEffect, useState } from 'react';
17
- import styled from 'styled-components';
18
- import Tooltip from 'tooltip.js';
19
- const TipContainer = styled.div `
20
- align-items: center;
21
- display: flex;
22
- font-family: ${(props) => props.theme.font.family.sans};
23
- justify-content: center;
24
- `;
25
- export const Tip = ({ children, placement, title, }) => {
26
- const [tooltip, setTooltip] = useState();
27
- useEffect(() => () => {
28
- if (tooltip) {
29
- tooltip.dispose();
30
- }
31
- }, [tooltip]);
32
- const createTooltip = useCallback((node) => {
33
- if (node) {
34
- setTooltip(new Tooltip(node, {
35
- placement,
36
- title,
37
- container: document.body,
38
- boundariesElement: 'window',
39
- }));
40
- }
41
- }, [setTooltip, placement, title]);
42
- const show = useCallback(() => {
43
- if (tooltip) {
44
- tooltip.show();
45
- }
46
- }, [tooltip]);
47
- const hide = useCallback(() => {
48
- if (tooltip) {
49
- tooltip.hide();
50
- }
51
- }, [tooltip]);
52
- return (React.createElement(TipContainer, { ref: createTooltip, onMouseEnter: show, onMouseLeave: hide }, children));
53
- };
@@ -1,22 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import React from 'react';
17
- import { AffiliationMap } from '../types';
18
- interface Props {
19
- affiliations: AffiliationMap;
20
- }
21
- export declare const AffiliationsList: React.FunctionComponent<Props>;
22
- export {};
@@ -1,25 +0,0 @@
1
- /*!
2
- * © 2021 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Contributor } from '@manuscripts/json-schema';
17
- import React from 'react';
18
- import { AuthorData } from '../types';
19
- export declare const AuthorsContainer: React.FC<{
20
- authorData: AuthorData;
21
- showEditButton: boolean;
22
- disableEditButton?: boolean;
23
- startEditing: () => void;
24
- selectAuthor: (data: Contributor) => void;
25
- }>;
@@ -1,29 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Contributor } from '@manuscripts/json-schema';
17
- import React from 'react';
18
- import { AuthorAffiliation as AuthorAffiliationT } from '../../types';
19
- interface AuthorProps {
20
- author: Contributor;
21
- affiliations?: AuthorAffiliationT[];
22
- jointFirstAuthor: boolean;
23
- showEditButton?: boolean;
24
- disableEditButton?: boolean;
25
- selectAuthor?: (data: Contributor) => void;
26
- startEditing?: () => void;
27
- }
28
- export declare const Author: React.FunctionComponent<AuthorProps>;
29
- export default Author;
@@ -1,28 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Contributor } from '@manuscripts/json-schema';
17
- import React from 'react';
18
- import { AuthorAffiliation } from '../../types';
19
- interface Props {
20
- authors: Contributor[];
21
- authorAffiliations: Map<string, AuthorAffiliation[]>;
22
- showEditButton?: boolean;
23
- disableEditButton?: boolean;
24
- startEditing?: () => void;
25
- selectAuthor?: (data: Contributor) => void;
26
- }
27
- export declare const AuthorsList: React.FunctionComponent<Props>;
28
- export {};
@@ -1,16 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export * from './AuthorsList';
@@ -1,27 +0,0 @@
1
- /*!
2
- * © 2019 Atypon Systems LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Color } from '@manuscripts/json-schema';
17
- import React from 'react';
18
- type ColorReq = Partial<Color> & {
19
- value: string;
20
- };
21
- interface Props {
22
- options: ColorReq[];
23
- value: string;
24
- handleChange: (color?: string) => void;
25
- }
26
- export declare const ColorField: React.FC<Props>;
27
- export {};