@manuscripts/style-guide 2.0.35-LEAN-4304-v0.0 → 2.0.35-LEAN-4314.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.
@@ -14,29 +14,6 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
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
17
  var __importDefault = (this && this.__importDefault) || function (mod) {
41
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
42
19
  };
@@ -45,7 +22,7 @@ exports.ContextMenu = void 0;
45
22
  const react_1 = __importDefault(require("react"));
46
23
  const styled_components_1 = __importDefault(require("styled-components"));
47
24
  const Button_1 = require("./Button");
48
- const Icons = __importStar(require("./icons"));
25
+ const icons_1 = require("./icons");
49
26
  const Tooltip_1 = require("./Tooltip");
50
27
  const ContextMenuIconButton = (0, styled_components_1.default)(Button_1.IconButton) `
51
28
  color: #6e6e6e;
@@ -59,15 +36,20 @@ const ContextMenuIconButton = (0, styled_components_1.default)(Button_1.IconButt
59
36
  border-color: #f2f2f2;
60
37
  }
61
38
  `;
62
- const icons = Object.entries(Icons).reduce((acc, [name, IconComponent]) => {
63
- const iconName = name.replace(/Icon$/, '');
64
- acc[iconName] = IconComponent;
65
- return acc;
66
- }, {});
39
+ const icons = {
40
+ AddComment: icons_1.AddCommentIcon,
41
+ Edit: icons_1.EditIcon,
42
+ AddOutline: icons_1.AddOutlineIcon,
43
+ Scroll: icons_1.ScrollIcon,
44
+ Delete: icons_1.DeleteIcon,
45
+ ImageDefault: icons_1.ImageDefaultIcon,
46
+ ImageLeft: icons_1.ImageLeftIcon,
47
+ ImageRight: icons_1.ImageRightIcon,
48
+ };
67
49
  const ContextMenu = ({ actions }) => (react_1.default.createElement(Button_1.IconButtonGroup, { size: 32 }, actions.map((action) => {
68
50
  const Icon = icons[action.icon];
69
51
  return (react_1.default.createElement(ContextMenuIconButton, { key: action.icon, "data-tooltip-id": action.icon, onClick: action.action, className: action.selected ? 'selected' : '' },
70
- react_1.default.createElement(Icon, { width: 18, height: 18 }),
52
+ react_1.default.createElement(Icon, null),
71
53
  react_1.default.createElement(Tooltip_1.Tooltip, { id: action.icon, place: "bottom" }, action.label)));
72
54
  })));
73
55
  exports.ContextMenu = ContextMenu;
@@ -19,7 +19,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.ImageDefaultIcon = exports.ImageLeftIcon = exports.HelpIcon = exports.HandleOutlineIcon = exports.HandleInspectorIcon = exports.FileVideoIcon = exports.FileUnknownIcon = exports.FileTableIcon = exports.FilePdfIcon = exports.FileMainDocumentIcon = exports.FileLatexIcon = exports.FileImageIcon = exports.FileGraphicalAbstractIcon = exports.FileFigureIcon = exports.FileDocumentIcon = exports.FileCorruptedIcon = exports.FileCompressedIcon = exports.FileCodeIcon = exports.FileAudioIcon = exports.EditAttrsTrackingIcon = exports.EditIcon = exports.DraggableIcon = exports.DotsIcon = exports.DeleteIcon = exports.DeleteSolidIcon = exports.CorrespondingAuthorIcon = exports.CommentResolveIcon = exports.CommentReplyIcon = exports.CitationCountIcon = exports.SystemUserAvatarIcon = exports.AffiliationPlaceholderIcon = exports.AuthorPlaceholderIcon = exports.AffiliationIcon = exports.AlertIcon = exports.AvatarIcon = exports.AttentionRedIcon = exports.AttentionOrangeIcon = exports.AttentionGreenIcon = exports.AttentionBlueIcon = exports.AttachIcon = exports.ArrowUpIcon = exports.ArrowLeftIcon = exports.ArrowDownCircleIcon = exports.ArrowDownIcon = exports.AddIcon = exports.AddOutlineIcon = exports.AddNewIcon = exports.AddedIcon = exports.AddCommentIcon = exports.AddAuthorIcon = void 0;
22
- exports.AddInstitutionIcon = exports.AddUserIcon = exports.ProfileIcon = exports.CrclTickAnimation = exports.VerticalEllipsisIcon = exports.UploadIcon = exports.TriangleExpandedIcon = exports.TriangleCollapsedIcon = exports.ToolbarUnorderedListIcon = exports.ToolbarUnderlineIcon = exports.ToolbarTableIcon = exports.ToolbarSymbolIcon = exports.ToolbarSuperscriptIcon = exports.ToolbarSubscriptIcon = exports.ToolbarOrderedListIcon = exports.ToolbarItalicIcon = exports.ToolbarFigureIcon = exports.ToolbarEquationIcon = exports.ToolbarCodeIcon = exports.ToolbarCitationIcon = exports.ToolbarBoldIcon = exports.TaskStepDoneIcon = exports.SliderOnIcon = exports.SliderOffIcon = exports.SectionCategoryIcon = exports.SearchIcon = exports.ScrollIcon = exports.SaveStatusSavingIcon = exports.SaveStatusSavedIcon = exports.SaveStatusOfflineIcon = exports.RoleReadingIcon = exports.RoleAnnotatingIcon = exports.PlusIcon = exports.OutlineUnorderedListIcon = exports.OutlineTableIcon = exports.OutlineSectionIcon = exports.OutlinePullQuoteIcon = exports.OutlineParagraphIcon = exports.OutlineOrderedListIcon = exports.OutlineManuscriptIcon = exports.OutlineFigureIcon = exports.OutlineEmbedIcon = exports.OutlineEquationIcon = exports.OutlineCodeIcon = exports.OutlineBlockQuoteIcon = exports.LogoutIcon = exports.LinkIcon = exports.ImageRightIcon = void 0;
22
+ exports.AddInstitutionIcon = exports.AddUserIcon = exports.ProfileIcon = exports.CrclTickAnimation = exports.VerticalEllipsisIcon = exports.UploadIcon = exports.TriangleExpandedIcon = exports.TriangleCollapsedIcon = exports.ToolbarUnorderedListIcon = exports.ToolbarUnderlineIcon = exports.ToolbarTableIcon = exports.ToolbarSymbolIcon = exports.ToolbarSuperscriptIcon = exports.ToolbarSubscriptIcon = exports.ToolbarOrderedListIcon = exports.ToolbarItalicIcon = exports.ToolbarFigureIcon = exports.ToolbarEquationIcon = exports.ToolbarCodeIcon = exports.ToolbarCitationIcon = exports.ToolbarBoldIcon = exports.TickIcon = exports.TaskStepDoneIcon = exports.SliderOnIcon = exports.SliderOffIcon = exports.SectionCategoryIcon = exports.SearchIcon = exports.ScrollIcon = exports.SaveStatusSavingIcon = exports.SaveStatusSavedIcon = exports.SaveStatusOfflineIcon = exports.RoleReadingIcon = exports.RoleAnnotatingIcon = exports.PlusIcon = exports.OutlineUnorderedListIcon = exports.OutlineTableIcon = exports.OutlineSectionIcon = exports.OutlinePullQuoteIcon = exports.OutlineParagraphIcon = exports.OutlineOrderedListIcon = exports.OutlineManuscriptIcon = exports.OutlineFigureIcon = exports.OutlineEmbedIcon = exports.OutlineEquationIcon = exports.OutlineCodeIcon = exports.OutlineBlockQuoteIcon = exports.LogoutIcon = exports.LinkIcon = exports.ImageRightIcon = void 0;
23
23
  var add_author_1 = require("./add-author");
24
24
  Object.defineProperty(exports, "AddAuthorIcon", { enumerable: true, get: function () { return __importDefault(add_author_1).default; } });
25
25
  var add_comment_1 = require("./add-comment");
@@ -174,6 +174,8 @@ var slider_on_1 = require("./slider-on");
174
174
  Object.defineProperty(exports, "SliderOnIcon", { enumerable: true, get: function () { return __importDefault(slider_on_1).default; } });
175
175
  var task_step_done_1 = require("./task-step-done");
176
176
  Object.defineProperty(exports, "TaskStepDoneIcon", { enumerable: true, get: function () { return __importDefault(task_step_done_1).default; } });
177
+ var tick_1 = require("./tick");
178
+ Object.defineProperty(exports, "TickIcon", { enumerable: true, get: function () { return __importDefault(tick_1).default; } });
177
179
  var toolbar_bold_1 = require("./toolbar-bold");
178
180
  Object.defineProperty(exports, "ToolbarBoldIcon", { enumerable: true, get: function () { return __importDefault(toolbar_bold_1).default; } });
179
181
  var toolbar_citation_1 = require("./toolbar-citation");
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const TickIcon = (props) => (react_1.default.createElement("svg", { width: "14", height: "12", viewBox: "0 0 14 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
8
+ react_1.default.createElement("path", { d: "M2.26296 5.27695C1.76426 4.67329 0.958698 4.6576 0.453885 5.25348L0.738765 4.91721C0.238342 5.50791 0.239155 6.4752 0.735001 7.07101L4.1106 11.1271C4.60894 11.726 5.43049 11.7459 5.94204 11.1756L13.2477 3.03111C13.7608 2.45906 13.7755 1.52164 13.2707 0.925762L13.5556 1.26203C13.0552 0.671335 12.228 0.656796 11.7131 1.22411L5.01293 8.60571L2.26296 5.27695Z", fill: "#36B260" })));
9
+ exports.default = TickIcon;
@@ -16,7 +16,7 @@
16
16
  import React from 'react';
17
17
  import styled from 'styled-components';
18
18
  import { IconButton, IconButtonGroup } from './Button';
19
- import * as Icons from './icons';
19
+ import { AddCommentIcon, AddOutlineIcon, DeleteIcon, EditIcon, ImageDefaultIcon, ImageLeftIcon, ImageRightIcon, ScrollIcon, } from './icons';
20
20
  import { Tooltip } from './Tooltip';
21
21
  const ContextMenuIconButton = styled(IconButton) `
22
22
  color: #6e6e6e;
@@ -30,14 +30,19 @@ const ContextMenuIconButton = styled(IconButton) `
30
30
  border-color: #f2f2f2;
31
31
  }
32
32
  `;
33
- const icons = Object.entries(Icons).reduce((acc, [name, IconComponent]) => {
34
- const iconName = name.replace(/Icon$/, '');
35
- acc[iconName] = IconComponent;
36
- return acc;
37
- }, {});
33
+ const icons = {
34
+ AddComment: AddCommentIcon,
35
+ Edit: EditIcon,
36
+ AddOutline: AddOutlineIcon,
37
+ Scroll: ScrollIcon,
38
+ Delete: DeleteIcon,
39
+ ImageDefault: ImageDefaultIcon,
40
+ ImageLeft: ImageLeftIcon,
41
+ ImageRight: ImageRightIcon,
42
+ };
38
43
  export const ContextMenu = ({ actions }) => (React.createElement(IconButtonGroup, { size: 32 }, actions.map((action) => {
39
44
  const Icon = icons[action.icon];
40
45
  return (React.createElement(ContextMenuIconButton, { key: action.icon, "data-tooltip-id": action.icon, onClick: action.action, className: action.selected ? 'selected' : '' },
41
- React.createElement(Icon, { width: 18, height: 18 }),
46
+ React.createElement(Icon, null),
42
47
  React.createElement(Tooltip, { id: action.icon, place: "bottom" }, action.label)));
43
48
  })));
@@ -90,6 +90,7 @@ export { default as SectionCategoryIcon } from './section-category';
90
90
  export { default as SliderOffIcon } from './slider-off';
91
91
  export { default as SliderOnIcon } from './slider-on';
92
92
  export { default as TaskStepDoneIcon } from './task-step-done';
93
+ export { default as TickIcon } from './tick';
93
94
  export { default as ToolbarBoldIcon } from './toolbar-bold';
94
95
  export { default as ToolbarCitationIcon } from './toolbar-citation';
95
96
  export { default as ToolbarCodeIcon } from './toolbar-code';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ const TickIcon = (props) => (React.createElement("svg", { width: "14", height: "12", viewBox: "0 0 14 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
3
+ React.createElement("path", { d: "M2.26296 5.27695C1.76426 4.67329 0.958698 4.6576 0.453885 5.25348L0.738765 4.91721C0.238342 5.50791 0.239155 6.4752 0.735001 7.07101L4.1106 11.1271C4.60894 11.726 5.43049 11.7459 5.94204 11.1756L13.2477 3.03111C13.7608 2.45906 13.7755 1.52164 13.2707 0.925762L13.5556 1.26203C13.0552 0.671335 12.228 0.656796 11.7131 1.22411L5.01293 8.60571L2.26296 5.27695Z", fill: "#36B260" })));
4
+ export default TickIcon;
@@ -23,9 +23,4 @@ export interface Actions {
23
23
  export interface ContextMenuProps {
24
24
  actions: Actions[];
25
25
  }
26
- export interface IconProps {
27
- width?: number | string;
28
- height?: number | string;
29
- color?: string;
30
- }
31
26
  export declare const ContextMenu: React.FC<ContextMenuProps>;
@@ -90,6 +90,7 @@ export { default as SectionCategoryIcon } from './section-category';
90
90
  export { default as SliderOffIcon } from './slider-off';
91
91
  export { default as SliderOnIcon } from './slider-on';
92
92
  export { default as TaskStepDoneIcon } from './task-step-done';
93
+ export { default as TickIcon } from './tick';
93
94
  export { default as ToolbarBoldIcon } from './toolbar-bold';
94
95
  export { default as ToolbarCitationIcon } from './toolbar-citation';
95
96
  export { default as ToolbarCodeIcon } from './toolbar-code';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ declare const TickIcon: React.FC<IconProps>;
4
+ export default TickIcon;
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": "2.0.35-LEAN-4304-v0.0",
4
+ "version": "2.0.35-LEAN-4314.0",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",