@manuscripts/style-guide 1.7.11 → 1.8.0-LEAN-3423-5
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/dist/cjs/components/Button.js +12 -1
- package/dist/cjs/components/ContextMenu.js +52 -0
- package/dist/cjs/components/{FileManager/DragLayer.js → DragLayer.js} +26 -50
- package/dist/cjs/components/FileManager/FileManager.js +1 -1
- package/dist/cjs/components/Menus/Menus.js +54 -1
- package/dist/cjs/components/Menus/Submenu.js +13 -3
- package/dist/cjs/components/References/CitationEditor.js +1 -4
- package/dist/cjs/components/icons/index.js +3 -1
- package/dist/cjs/hooks/use-dropdown.js +1 -2
- package/dist/cjs/hooks/use-menus.js +3 -0
- package/dist/cjs/index.js +3 -6
- package/dist/cjs/lib/capabilities.js +1 -1
- package/dist/es/components/Button.js +11 -0
- package/dist/es/components/ContextMenu.js +45 -0
- package/dist/es/components/{FileManager/DragLayer.js → DragLayer.js} +26 -27
- package/dist/es/components/FileManager/FileManager.js +1 -1
- package/dist/es/components/Menus/Menus.js +53 -0
- package/dist/es/components/Menus/Submenu.js +13 -3
- package/dist/es/components/References/CitationEditor.js +1 -4
- package/dist/es/components/icons/index.js +1 -0
- package/dist/es/hooks/use-dropdown.js +1 -2
- package/dist/es/hooks/use-menus.js +3 -0
- package/dist/es/index.js +3 -6
- package/dist/es/lib/capabilities.js +1 -1
- package/dist/types/components/AlertMessage.d.ts +1 -1
- package/dist/types/components/Button.d.ts +10 -9
- package/dist/types/components/{AuthorName.d.ts → ContextMenu.d.ts} +9 -6
- package/dist/types/components/EditorHeader/EditorHeader.d.ts +1 -1
- package/dist/types/components/InspectorSection.d.ts +1 -1
- package/dist/types/components/Menus/Menus.d.ts +15 -0
- package/dist/types/components/NavDropdown.d.ts +1 -1
- package/dist/types/components/StyledModal.d.ts +1 -1
- package/dist/types/components/icons/index.d.ts +1 -0
- package/dist/types/hooks/use-dropdown.d.ts +1 -1
- package/dist/types/index.d.ts +3 -6
- package/dist/types/lib/capabilities.d.ts +1 -1
- package/dist/types/lib/menus.d.ts +5 -0
- package/package.json +4 -4
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditor.js +0 -62
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorItem.js +0 -176
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorProfile.js +0 -62
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorView.js +0 -80
- package/dist/cjs/components/AffiliationsEditor/index.js +0 -25
- package/dist/cjs/components/AffiliationsEditor/styles.js +0 -56
- package/dist/cjs/components/AuthorForm/AuthorForm.js +0 -99
- package/dist/cjs/components/AuthorForm/AuthorFormComponents.js +0 -63
- package/dist/cjs/components/AuthorForm/ContributorRolesSelect.js +0 -100
- package/dist/cjs/components/AuthorForm/RemoveAuthorButton.js +0 -45
- package/dist/cjs/components/AuthorForm/index.js +0 -32
- package/dist/cjs/components/AuthorName.js +0 -52
- package/dist/cjs/components/AuthorsDND/AuthorItemComponents.js +0 -22
- package/dist/cjs/components/AuthorsDND/AuthorsDND.js +0 -68
- package/dist/cjs/components/AuthorsDND/DraggableAuthorItem.js +0 -197
- package/dist/cjs/components/AuthorsDND/index.js +0 -23
- package/dist/cjs/lib/authors.js +0 -110
- package/dist/cjs/lib/formatAddress.js +0 -31
- package/dist/cjs/lib/name.js +0 -26
- package/dist/cjs/types.js +0 -17
- package/dist/es/components/AffiliationsEditor/AffiliationsEditor.js +0 -34
- package/dist/es/components/AffiliationsEditor/AffiliationsEditorItem.js +0 -146
- package/dist/es/components/AffiliationsEditor/AffiliationsEditorProfile.js +0 -34
- package/dist/es/components/AffiliationsEditor/AffiliationsEditorView.js +0 -52
- package/dist/es/components/AffiliationsEditor/index.js +0 -17
- package/dist/es/components/AffiliationsEditor/styles.js +0 -49
- package/dist/es/components/AuthorForm/AuthorForm.js +0 -92
- package/dist/es/components/AuthorForm/AuthorFormComponents.js +0 -57
- package/dist/es/components/AuthorForm/ContributorRolesSelect.js +0 -70
- package/dist/es/components/AuthorForm/RemoveAuthorButton.js +0 -40
- package/dist/es/components/AuthorForm/index.js +0 -16
- package/dist/es/components/AuthorName.js +0 -23
- package/dist/es/components/AuthorsDND/AuthorItemComponents.js +0 -19
- package/dist/es/components/AuthorsDND/AuthorsDND.js +0 -40
- package/dist/es/components/AuthorsDND/DraggableAuthorItem.js +0 -192
- package/dist/es/components/AuthorsDND/index.js +0 -16
- package/dist/es/lib/authors.js +0 -98
- package/dist/es/lib/formatAddress.js +0 -29
- package/dist/es/lib/name.js +0 -22
- package/dist/es/types.js +0 -16
- package/dist/types/components/AffiliationsEditor/AffiliationsEditor.d.ts +0 -31
- package/dist/types/components/AffiliationsEditor/AffiliationsEditorItem.d.ts +0 -26
- package/dist/types/components/AffiliationsEditor/AffiliationsEditorProfile.d.ts +0 -30
- package/dist/types/components/AffiliationsEditor/AffiliationsEditorView.d.ts +0 -34
- package/dist/types/components/AffiliationsEditor/index.d.ts +0 -17
- package/dist/types/components/AffiliationsEditor/styles.d.ts +0 -23
- package/dist/types/components/AuthorForm/AuthorForm.d.ts +0 -29
- package/dist/types/components/AuthorForm/AuthorFormComponents.d.ts +0 -31
- package/dist/types/components/AuthorForm/ContributorRolesSelect.d.ts +0 -23
- package/dist/types/components/AuthorForm/RemoveAuthorButton.d.ts +0 -27
- package/dist/types/components/AuthorForm/index.d.ts +0 -16
- package/dist/types/components/AuthorsDND/AuthorItemComponents.d.ts +0 -24
- package/dist/types/components/AuthorsDND/AuthorsDND.d.ts +0 -28
- package/dist/types/components/AuthorsDND/DraggableAuthorItem.d.ts +0 -50
- package/dist/types/components/AuthorsDND/index.d.ts +0 -16
- package/dist/types/lib/authors.d.ts +0 -30
- package/dist/types/lib/formatAddress.d.ts +0 -18
- package/dist/types/lib/name.d.ts +0 -17
- package/dist/types/types.d.ts +0 -80
- /package/dist/types/components/{FileManager/DragLayer.d.ts → DragLayer.d.ts} +0 -0
|
@@ -38,7 +38,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.ButtonGroup = exports.SecondaryIconButton = exports.RoundIconButton = exports.IconButton = exports.ToggleButtonAlt = exports.ToggleButton = exports.IconTextButton = exports.TertiaryButton = exports.PrimaryButton = exports.SecondaryButton = void 0;
|
|
41
|
+
exports.IconButtonGroup = exports.ButtonGroup = exports.SecondaryIconButton = exports.RoundIconButton = exports.IconButton = exports.ToggleButtonAlt = exports.ToggleButton = exports.IconTextButton = exports.TertiaryButton = exports.PrimaryButton = exports.SecondaryButton = void 0;
|
|
42
42
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
43
43
|
const dangerBtnStyles = (0, styled_components_1.css) `
|
|
44
44
|
${(props) => btnColors(props.theme.colors.button.error.color.default, props.theme.colors.button.error.background.default, props.theme.colors.button.error.border.default, true)}
|
|
@@ -288,3 +288,14 @@ exports.ButtonGroup = styled_components_1.default.div `
|
|
|
288
288
|
margin-left: ${(props) => props.theme.grid.unit}px;
|
|
289
289
|
}
|
|
290
290
|
`;
|
|
291
|
+
exports.IconButtonGroup = styled_components_1.default.div `
|
|
292
|
+
display: flex;
|
|
293
|
+
flex-direction: row;
|
|
294
|
+
justify-content: flex-start;
|
|
295
|
+
align-items: center;
|
|
296
|
+
|
|
297
|
+
button {
|
|
298
|
+
width: 28px;
|
|
299
|
+
height: 28px;
|
|
300
|
+
}
|
|
301
|
+
`;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2024 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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ContextMenu = void 0;
|
|
22
|
+
const react_1 = __importDefault(require("react"));
|
|
23
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
24
|
+
const Button_1 = require("./Button");
|
|
25
|
+
const icons_1 = require("./icons");
|
|
26
|
+
const Tooltip_1 = require("./Tooltip");
|
|
27
|
+
const ContextMenuIconButton = (0, styled_components_1.default)(Button_1.IconButton) `
|
|
28
|
+
color: #6e6e6e;
|
|
29
|
+
&:not([disabled]):hover,
|
|
30
|
+
&:not([disabled]):focus {
|
|
31
|
+
color: #363636;
|
|
32
|
+
background-color: #f2f2f2;
|
|
33
|
+
border-color: #f2f2f2;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
const ContextMenu = ({ actions }) => {
|
|
37
|
+
const IconSelector = ({ iconName }) => {
|
|
38
|
+
const icons = {
|
|
39
|
+
AddComment: icons_1.AddComment,
|
|
40
|
+
EditIcon: icons_1.EditIcon,
|
|
41
|
+
};
|
|
42
|
+
const Icon = icons[iconName];
|
|
43
|
+
return react_1.default.createElement(Icon, null);
|
|
44
|
+
};
|
|
45
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
46
|
+
react_1.default.createElement(Button_1.IconButtonGroup, null, actions.map((action) => {
|
|
47
|
+
return (react_1.default.createElement(ContextMenuIconButton, { key: action.icon, "data-tooltip-id": action.icon, onClick: action.action },
|
|
48
|
+
react_1.default.createElement(IconSelector, { iconName: action.icon }),
|
|
49
|
+
react_1.default.createElement(Tooltip_1.Tooltip, { id: action.icon, place: "bottom" }, action.label)));
|
|
50
|
+
}))));
|
|
51
|
+
};
|
|
52
|
+
exports.ContextMenu = ContextMenu;
|
|
@@ -1,40 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
exports.DragLayer = void 0;
|
|
30
|
-
const react_1 =
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
31
8
|
const react_dnd_1 = require("react-dnd");
|
|
32
9
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
33
|
-
const FileContainer_1 = require("./FileContainer");
|
|
34
|
-
const FileCreatedDate_1 = require("./FileCreatedDate");
|
|
35
|
-
const FileName_1 = require("./FileName");
|
|
36
|
-
|
|
37
|
-
|
|
10
|
+
const FileContainer_1 = require("./FileManager/FileContainer");
|
|
11
|
+
const FileCreatedDate_1 = require("./FileManager/FileCreatedDate");
|
|
12
|
+
const FileName_1 = require("./FileManager/FileName");
|
|
13
|
+
const Container = styled_components_1.default.div `
|
|
14
|
+
position: fixed;
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
z-index: 999;
|
|
17
|
+
left: 0;
|
|
18
|
+
top: 0;
|
|
19
|
+
max-width: 400px;
|
|
20
|
+
`;
|
|
21
|
+
const DraggableFileContainer = (0, styled_components_1.default)(FileContainer_1.FileContainer) `
|
|
22
|
+
padding: 16px 32px;
|
|
23
|
+
background: #f2fbfc;
|
|
24
|
+
border: 1px solid #bce7f6;
|
|
25
|
+
box-shadow: 0 4px 9px rgba(0, 0, 0, 0.3);
|
|
26
|
+
border-radius: 6px;
|
|
27
|
+
`;
|
|
28
|
+
const getItemStyles = (currentOffset) => {
|
|
29
|
+
if (!currentOffset) {
|
|
38
30
|
return {
|
|
39
31
|
display: 'none',
|
|
40
32
|
};
|
|
@@ -45,16 +37,15 @@ function getItemStyles(initialOffset, currentOffset) {
|
|
|
45
37
|
transform,
|
|
46
38
|
WebkitTransform: transform,
|
|
47
39
|
};
|
|
48
|
-
}
|
|
40
|
+
};
|
|
49
41
|
const DragLayer = () => {
|
|
50
|
-
const { itemType, isDragging, item,
|
|
42
|
+
const { itemType, isDragging, item, currentOffset } = (0, react_dnd_1.useDragLayer)((monitor) => ({
|
|
51
43
|
item: monitor.getItem(),
|
|
52
44
|
itemType: monitor.getItemType(),
|
|
53
|
-
initialOffset: monitor.getInitialSourceClientOffset(),
|
|
54
45
|
currentOffset: monitor.getSourceClientOffset(),
|
|
55
46
|
isDragging: monitor.isDragging(),
|
|
56
47
|
}));
|
|
57
|
-
const renderItem = (
|
|
48
|
+
const renderItem = () => {
|
|
58
49
|
switch (itemType) {
|
|
59
50
|
case 'file':
|
|
60
51
|
return (react_1.default.createElement(DraggableFileContainer, null,
|
|
@@ -63,25 +54,10 @@ const DragLayer = () => {
|
|
|
63
54
|
default:
|
|
64
55
|
return null;
|
|
65
56
|
}
|
|
66
|
-
}
|
|
57
|
+
};
|
|
67
58
|
if (!isDragging) {
|
|
68
59
|
return null;
|
|
69
60
|
}
|
|
70
|
-
return (react_1.default.createElement(Container, { style: getItemStyles(
|
|
61
|
+
return (react_1.default.createElement(Container, { style: getItemStyles(currentOffset) }, renderItem()));
|
|
71
62
|
};
|
|
72
63
|
exports.DragLayer = DragLayer;
|
|
73
|
-
const Container = styled_components_1.default.div `
|
|
74
|
-
position: fixed;
|
|
75
|
-
pointer-events: none;
|
|
76
|
-
z-index: 999;
|
|
77
|
-
left: 0;
|
|
78
|
-
top: 0;
|
|
79
|
-
max-width: 400px;
|
|
80
|
-
`;
|
|
81
|
-
const DraggableFileContainer = (0, styled_components_1.default)(FileContainer_1.FileContainer) `
|
|
82
|
-
padding: 16px 32px;
|
|
83
|
-
background: #f2fbfc;
|
|
84
|
-
border: 1px solid #bce7f6;
|
|
85
|
-
box-shadow: 0 4px 9px rgba(0, 0, 0, 0.3);
|
|
86
|
-
border-radius: 6px;
|
|
87
|
-
`;
|
|
@@ -26,10 +26,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.FileManager = exports.PermissionsContext = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const index_1 = require("../../index");
|
|
29
|
+
const DragLayer_1 = require("../DragLayer");
|
|
29
30
|
const Inspector_1 = require("../Inspector");
|
|
30
31
|
const InspectorSection_1 = require("../InspectorSection");
|
|
31
32
|
const Tooltip_1 = require("../Tooltip");
|
|
32
|
-
const DragLayer_1 = require("./DragLayer");
|
|
33
33
|
const FileManagerProvider_1 = require("./FileManagerProvider");
|
|
34
34
|
const InlineFilesSection_1 = require("./InlineFilesSection");
|
|
35
35
|
const OtherFilesSection_1 = require("./OtherFilesSection");
|
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.Menus = void 0;
|
|
21
|
+
exports.Label = exports.Block = exports.BlockItem = exports.StyleBlock = exports.ListContainer = exports.bulletListContextMenu = exports.orderedListContextMenu = exports.Menus = void 0;
|
|
22
22
|
const react_1 = __importDefault(require("react"));
|
|
23
23
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
24
24
|
const Submenu_1 = require("./Submenu");
|
|
@@ -58,3 +58,56 @@ const Menus = ({ menus, innerRef, handleClick, }) => {
|
|
|
58
58
|
})));
|
|
59
59
|
};
|
|
60
60
|
exports.Menus = Menus;
|
|
61
|
+
exports.orderedListContextMenu = [
|
|
62
|
+
{ items: ['1.', '2.', '3.'], type: 'order' },
|
|
63
|
+
{ items: ['A.', 'B.', 'C.'], type: 'alpha-upper' },
|
|
64
|
+
{ items: ['a.', 'b.', 'c.'], type: 'alpha-lower' },
|
|
65
|
+
{ items: ['I.', 'II.', 'III.'], type: 'roman-upper' },
|
|
66
|
+
{ items: ['i.', 'ii.', 'iii.'], type: 'roman-lower' },
|
|
67
|
+
];
|
|
68
|
+
exports.bulletListContextMenu = [
|
|
69
|
+
{ items: ['•', '•', '•'], type: 'bullet' },
|
|
70
|
+
{ items: ['-', '-', '-'], type: 'simple' },
|
|
71
|
+
];
|
|
72
|
+
exports.ListContainer = styled_components_1.default.div `
|
|
73
|
+
padding: ${(props) => props.theme.grid.unit * 4}px;
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-columns:
|
|
76
|
+
${(props) => props.theme.grid.unit * 21}px
|
|
77
|
+
${(props) => props.theme.grid.unit * 21}px;
|
|
78
|
+
gap: 6px;
|
|
79
|
+
`;
|
|
80
|
+
exports.StyleBlock = styled_components_1.default.div `
|
|
81
|
+
border: 1px solid ${(props) => props.theme.colors.border.tertiary};
|
|
82
|
+
padding: ${(props) => props.theme.grid.unit * 2}px;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
row-gap: ${(props) => props.theme.grid.unit * 2}px;
|
|
87
|
+
|
|
88
|
+
&:hover {
|
|
89
|
+
background: ${(props) => props.theme.colors.button.default.border.hover};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:active {
|
|
93
|
+
border-color: ${(props) => props.theme.colors.border.primary};
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
exports.BlockItem = styled_components_1.default.div `
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
gap: 6px;
|
|
100
|
+
`;
|
|
101
|
+
exports.Block = styled_components_1.default.div `
|
|
102
|
+
height: 3px;
|
|
103
|
+
width: ${(props) => props.theme.grid.unit * 14}px;
|
|
104
|
+
background: ${(props) => props.theme.colors.border.tertiary};
|
|
105
|
+
`;
|
|
106
|
+
exports.Label = styled_components_1.default.div `
|
|
107
|
+
font-family: Lato, serif;
|
|
108
|
+
font-size: ${(props) => props.theme.font.size.small};
|
|
109
|
+
font-weight: ${(props) => props.theme.font.weight.normal};
|
|
110
|
+
line-height: ${(props) => props.theme.font.lineHeight.small};
|
|
111
|
+
font-style: normal;
|
|
112
|
+
color: ${(props) => (props.hide && 'white') || 'initial'};
|
|
113
|
+
`;
|
|
@@ -23,6 +23,7 @@ const TriangleCollapsed_1 = __importDefault(require("@manuscripts/assets/react/T
|
|
|
23
23
|
const react_1 = __importDefault(require("react"));
|
|
24
24
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
25
25
|
const menus_1 = require("../../lib/menus");
|
|
26
|
+
const Menus_1 = require("./Menus");
|
|
26
27
|
const Shortcut_1 = require("./Shortcut");
|
|
27
28
|
exports.Text = styled_components_1.default.div `
|
|
28
29
|
flex: 1 0 auto;
|
|
@@ -37,8 +38,6 @@ exports.SubmenusContainer = styled_components_1.default.div `
|
|
|
37
38
|
box-shadow: 0 4px 9px 0 rgba(84, 83, 83, 0.3);
|
|
38
39
|
color: #353535;
|
|
39
40
|
min-width: 150px;
|
|
40
|
-
max-height: 70vh;
|
|
41
|
-
overflow-y: auto;
|
|
42
41
|
padding: 4px 0;
|
|
43
42
|
white-space: nowrap;
|
|
44
43
|
width: auto;
|
|
@@ -96,7 +95,7 @@ const Submenu = ({ menu, handleClick }) => {
|
|
|
96
95
|
if ((0, menus_1.isMenuSeparator)(menu)) {
|
|
97
96
|
return react_1.default.createElement(Separator, null);
|
|
98
97
|
}
|
|
99
|
-
if (!menu.submenu) {
|
|
98
|
+
if (!menu.submenu && !menu.options) {
|
|
100
99
|
return (react_1.default.createElement(Container, { isOpen: menu.isOpen, className: menu.isEnabled ? '' : 'disabled', onMouseDown: (e) => {
|
|
101
100
|
e.preventDefault();
|
|
102
101
|
handleClick([]);
|
|
@@ -105,6 +104,17 @@ const Submenu = ({ menu, handleClick }) => {
|
|
|
105
104
|
react_1.default.createElement(exports.Text, null, menu.label),
|
|
106
105
|
menu.shortcut && react_1.default.createElement(Shortcut_1.Shortcut, { shortcut: menu.shortcut })));
|
|
107
106
|
}
|
|
107
|
+
if (menu.options) {
|
|
108
|
+
const styles = menu.id === 'bullet-list-context-menu'
|
|
109
|
+
? Menus_1.bulletListContextMenu
|
|
110
|
+
: Menus_1.orderedListContextMenu;
|
|
111
|
+
return (react_1.default.createElement(Menus_1.ListContainer, null, styles.map((style, index) => (react_1.default.createElement(Menus_1.StyleBlock, { key: index, onClick: () => {
|
|
112
|
+
menu.options && menu.options[style.type]();
|
|
113
|
+
handleClick([-1, -1]);
|
|
114
|
+
} }, style.items.map((style, index) => (react_1.default.createElement(Menus_1.BlockItem, { key: index },
|
|
115
|
+
react_1.default.createElement(Menus_1.Label, { hide: style === '-' }, style),
|
|
116
|
+
react_1.default.createElement(Menus_1.Block, null)))))))));
|
|
117
|
+
}
|
|
108
118
|
return (react_1.default.createElement(SubmenuContainer, null,
|
|
109
119
|
react_1.default.createElement(Container, { onMouseDown: (e) => {
|
|
110
120
|
e.preventDefault();
|
|
@@ -34,7 +34,6 @@ const react_1 = __importStar(require("react"));
|
|
|
34
34
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
35
35
|
const Button_1 = require("../Button");
|
|
36
36
|
const Dialog_1 = require("../Dialog");
|
|
37
|
-
const icons_1 = require("../icons");
|
|
38
37
|
const CitationViewer_1 = require("./CitationViewer");
|
|
39
38
|
const ReferenceLine_1 = require("./ReferenceLine");
|
|
40
39
|
const ReferenceSearch_1 = require("./ReferenceSearch");
|
|
@@ -136,9 +135,7 @@ const CitationEditor = ({ query, rids, items, citationCounts, sources, onCite, o
|
|
|
136
135
|
react_1.default.createElement(CloseIconDark_1.default, { className: 'remove-icon' }))))))),
|
|
137
136
|
react_1.default.createElement(ReferencesModal_1.ReferencesModal, { isOpen: editingForm.show, onCancel: () => setEditingForm({ show: false }), items: items, citationCounts: citationCounts, item: editingForm.item, onSave: onSave, onDelete: onDelete }),
|
|
138
137
|
react_1.default.createElement(Actions, null,
|
|
139
|
-
react_1.default.createElement(Button_1.IconTextButton,
|
|
140
|
-
react_1.default.createElement(icons_1.AddComment, null),
|
|
141
|
-
react_1.default.createElement(AddCommentButtonText, null, "Add Comment")),
|
|
138
|
+
react_1.default.createElement(Button_1.IconTextButton, null),
|
|
142
139
|
react_1.default.createElement(Button_1.ButtonGroup, null,
|
|
143
140
|
react_1.default.createElement(Button_1.SecondaryButton, { onClick: onCancel }, "Done"),
|
|
144
141
|
react_1.default.createElement(Button_1.PrimaryButton, { disabled: !canEdit, onClick: () => setSearching(true) }, "Add Citation")))));
|
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.PlusIcon = exports.PullQuoteIcon = exports.BlockQuoteIcon = exports.LeftArrow = exports.AnnotatorIcon = exports.ReadingIcon = exports.EditIcon = exports.UnsupportedFormatFileIcon = exports.MissingImage = exports.UploadIcon = exports.AttachIcon = exports.TaskStepNextIcon = exports.TaskStepDoneIcon = exports.TaskStepCurrentIcon = exports.ZoomOutIcon = exports.ZoomInIcon = exports.UserIcon = exports.TickMarkIcon = exports.SearchIcon = exports.ProjectsListIcon = exports.ProjectIcon = exports.ProjectNotificationIcon = exports.OrcidIcon = exports.GoogleIcon = exports.AddComment = exports.CloseOIcon = exports.CloseIcon = exports.BookmarkIcon = exports.BackArrowIcon = exports.AddIconInverted = exports.AddIconActive = exports.AddAuthor = void 0;
|
|
21
|
+
exports.DeleteIcon = exports.PlusIcon = exports.PullQuoteIcon = exports.BlockQuoteIcon = exports.LeftArrow = exports.AnnotatorIcon = exports.ReadingIcon = exports.EditIcon = exports.UnsupportedFormatFileIcon = exports.MissingImage = exports.UploadIcon = exports.AttachIcon = exports.TaskStepNextIcon = exports.TaskStepDoneIcon = exports.TaskStepCurrentIcon = exports.ZoomOutIcon = exports.ZoomInIcon = exports.UserIcon = exports.TickMarkIcon = exports.SearchIcon = exports.ProjectsListIcon = exports.ProjectIcon = exports.ProjectNotificationIcon = exports.OrcidIcon = exports.GoogleIcon = exports.AddComment = exports.CloseOIcon = exports.CloseIcon = exports.BookmarkIcon = exports.BackArrowIcon = exports.AddIconInverted = exports.AddIconActive = exports.AddAuthor = void 0;
|
|
22
22
|
var add_author_1 = require("./add-author");
|
|
23
23
|
Object.defineProperty(exports, "AddAuthor", { enumerable: true, get: function () { return __importDefault(add_author_1).default; } });
|
|
24
24
|
var add_icon_active_1 = require("./add-icon-active");
|
|
@@ -83,3 +83,5 @@ var pull_quote_icon_1 = require("./pull-quote-icon");
|
|
|
83
83
|
Object.defineProperty(exports, "PullQuoteIcon", { enumerable: true, get: function () { return __importDefault(pull_quote_icon_1).default; } });
|
|
84
84
|
var plus_icon_1 = require("./plus-icon");
|
|
85
85
|
Object.defineProperty(exports, "PlusIcon", { enumerable: true, get: function () { return __importDefault(plus_icon_1).default; } });
|
|
86
|
+
var delete_icon_1 = require("./delete-icon");
|
|
87
|
+
Object.defineProperty(exports, "DeleteIcon", { enumerable: true, get: function () { return delete_icon_1.DeleteIcon; } });
|
|
@@ -19,8 +19,7 @@ exports.useDropdown = void 0;
|
|
|
19
19
|
const react_1 = require("react");
|
|
20
20
|
const useDropdown = () => {
|
|
21
21
|
const [isOpen, setOpen] = (0, react_1.useState)(false);
|
|
22
|
-
const toggleOpen = (0, react_1.useCallback)((
|
|
23
|
-
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
22
|
+
const toggleOpen = (0, react_1.useCallback)(() => {
|
|
24
23
|
setOpen((open) => !open);
|
|
25
24
|
}, []);
|
|
26
25
|
const wrapperRef = (0, react_1.useRef)(null);
|
|
@@ -67,6 +67,9 @@ const useMenus = (menus) => {
|
|
|
67
67
|
const index = indices[depth];
|
|
68
68
|
setPointer(transformPointer(depth, index));
|
|
69
69
|
}
|
|
70
|
+
if (menu.options) {
|
|
71
|
+
setPointer([-1, -1, -1]);
|
|
72
|
+
}
|
|
70
73
|
}, [state]);
|
|
71
74
|
const ref = (0, react_1.useRef)(null);
|
|
72
75
|
(0, react_1.useEffect)(() => {
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,12 +33,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
exports.errorsDecoder = exports.useDeepCompareCallback = exports.useDeepCompareMemo = void 0;
|
|
36
|
-
__exportStar(require("./components/AffiliationsEditor"), exports);
|
|
37
|
-
__exportStar(require("./components/AuthorForm"), exports);
|
|
38
|
-
__exportStar(require("./components/AuthorName"), exports);
|
|
39
|
-
__exportStar(require("./components/AuthorsDND"), exports);
|
|
40
36
|
__exportStar(require("./components/AlertMessage"), exports);
|
|
41
37
|
__exportStar(require("./components/Button"), exports);
|
|
38
|
+
__exportStar(require("./components/ContextMenu"), exports);
|
|
42
39
|
__exportStar(require("./components/RadioButton"), exports);
|
|
43
40
|
__exportStar(require("./components/AutoSaveInput"), exports);
|
|
44
41
|
__exportStar(require("./components/Avatar"), exports);
|
|
@@ -51,6 +48,8 @@ __exportStar(require("./components/Resizer"), exports);
|
|
|
51
48
|
__exportStar(require("./components/SaveStatus"), exports);
|
|
52
49
|
__exportStar(require("./components/StyledModal"), exports);
|
|
53
50
|
__exportStar(require("./components/TableFootnotesSelector"), exports);
|
|
51
|
+
__exportStar(require("./components/Sidebar"), exports);
|
|
52
|
+
__exportStar(require("./components/DragLayer"), exports);
|
|
54
53
|
__exportStar(require("./components/TextField"), exports);
|
|
55
54
|
__exportStar(require("./components/TextFieldContainer"), exports);
|
|
56
55
|
__exportStar(require("./components/TextFieldError"), exports);
|
|
@@ -77,11 +76,9 @@ __exportStar(require("./hooks/use-menus"), exports);
|
|
|
77
76
|
var use_deep_compare_1 = require("./hooks/use-deep-compare");
|
|
78
77
|
Object.defineProperty(exports, "useDeepCompareMemo", { enumerable: true, get: function () { return use_deep_compare_1.useDeepCompareMemo; } });
|
|
79
78
|
Object.defineProperty(exports, "useDeepCompareCallback", { enumerable: true, get: function () { return use_deep_compare_1.useDeepCompareCallback; } });
|
|
80
|
-
__exportStar(require("./lib/authors"), exports);
|
|
81
79
|
__exportStar(require("./lib/capabilities"), exports);
|
|
82
80
|
__exportStar(require("./lib/files"), exports);
|
|
83
81
|
__exportStar(require("./lib/comments"), exports);
|
|
84
82
|
__exportStar(require("./lib/menus"), exports);
|
|
85
83
|
var errors_decoder_1 = require("./lib/errors-decoder");
|
|
86
84
|
Object.defineProperty(exports, "errorsDecoder", { enumerable: true, get: function () { return __importDefault(errors_decoder_1).default; } });
|
|
87
|
-
__exportStar(require("./types"), exports);
|
|
@@ -23,6 +23,7 @@ const getCapabilities = (project, profile, role, actions) => {
|
|
|
23
23
|
const allowed = (action) => !!(actions === null || actions === void 0 ? void 0 : actions.includes(action));
|
|
24
24
|
return {
|
|
25
25
|
handleSuggestion: isOwner() || isEditor() || isWriter(),
|
|
26
|
+
editWithoutTracking: isWriter(),
|
|
26
27
|
rejectOwnSuggestion: !isViewer(),
|
|
27
28
|
createSuggestion: !isViewer(),
|
|
28
29
|
viewSuggestion: true,
|
|
@@ -52,7 +53,6 @@ const getCapabilities = (project, profile, role, actions) => {
|
|
|
52
53
|
putOnHoldTask: isProdEditor(),
|
|
53
54
|
changeDueDate: isProdEditor() && allowed(Actions.updateDueDate),
|
|
54
55
|
previewAccess: true,
|
|
55
|
-
editNotTracked: false,
|
|
56
56
|
accessEditor: true,
|
|
57
57
|
formatArticle: !isViewer(),
|
|
58
58
|
editArticle: !isViewer(),
|
|
@@ -262,3 +262,14 @@ export const ButtonGroup = styled.div `
|
|
|
262
262
|
margin-left: ${(props) => props.theme.grid.unit}px;
|
|
263
263
|
}
|
|
264
264
|
`;
|
|
265
|
+
export const IconButtonGroup = styled.div `
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: row;
|
|
268
|
+
justify-content: flex-start;
|
|
269
|
+
align-items: center;
|
|
270
|
+
|
|
271
|
+
button {
|
|
272
|
+
width: 28px;
|
|
273
|
+
height: 28px;
|
|
274
|
+
}
|
|
275
|
+
`;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 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 { IconButton, IconButtonGroup } from './Button';
|
|
19
|
+
import { AddComment, EditIcon } from './icons';
|
|
20
|
+
import { Tooltip } from './Tooltip';
|
|
21
|
+
const ContextMenuIconButton = styled(IconButton) `
|
|
22
|
+
color: #6e6e6e;
|
|
23
|
+
&:not([disabled]):hover,
|
|
24
|
+
&:not([disabled]):focus {
|
|
25
|
+
color: #363636;
|
|
26
|
+
background-color: #f2f2f2;
|
|
27
|
+
border-color: #f2f2f2;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
export const ContextMenu = ({ actions }) => {
|
|
31
|
+
const IconSelector = ({ iconName }) => {
|
|
32
|
+
const icons = {
|
|
33
|
+
AddComment: AddComment,
|
|
34
|
+
EditIcon: EditIcon,
|
|
35
|
+
};
|
|
36
|
+
const Icon = icons[iconName];
|
|
37
|
+
return React.createElement(Icon, null);
|
|
38
|
+
};
|
|
39
|
+
return (React.createElement(React.Fragment, null,
|
|
40
|
+
React.createElement(IconButtonGroup, null, actions.map((action) => {
|
|
41
|
+
return (React.createElement(ContextMenuIconButton, { key: action.icon, "data-tooltip-id": action.icon, onClick: action.action },
|
|
42
|
+
React.createElement(IconSelector, { iconName: action.icon }),
|
|
43
|
+
React.createElement(Tooltip, { id: action.icon, place: "bottom" }, action.label)));
|
|
44
|
+
}))));
|
|
45
|
+
};
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { useDragLayer } from 'react-dnd';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { FileContainer } from './FileContainer';
|
|
5
|
-
import { FileCreatedDate } from './FileCreatedDate';
|
|
6
|
-
import { FileName } from './FileName';
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { FileContainer } from './FileManager/FileContainer';
|
|
5
|
+
import { FileCreatedDate } from './FileManager/FileCreatedDate';
|
|
6
|
+
import { FileName } from './FileManager/FileName';
|
|
7
|
+
const Container = styled.div `
|
|
8
|
+
position: fixed;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
z-index: 999;
|
|
11
|
+
left: 0;
|
|
12
|
+
top: 0;
|
|
13
|
+
max-width: 400px;
|
|
14
|
+
`;
|
|
15
|
+
const DraggableFileContainer = styled(FileContainer) `
|
|
16
|
+
padding: 16px 32px;
|
|
17
|
+
background: #f2fbfc;
|
|
18
|
+
border: 1px solid #bce7f6;
|
|
19
|
+
box-shadow: 0 4px 9px rgba(0, 0, 0, 0.3);
|
|
20
|
+
border-radius: 6px;
|
|
21
|
+
`;
|
|
22
|
+
const getItemStyles = (currentOffset) => {
|
|
23
|
+
if (!currentOffset) {
|
|
9
24
|
return {
|
|
10
25
|
display: 'none',
|
|
11
26
|
};
|
|
@@ -16,16 +31,15 @@ function getItemStyles(initialOffset, currentOffset) {
|
|
|
16
31
|
transform,
|
|
17
32
|
WebkitTransform: transform,
|
|
18
33
|
};
|
|
19
|
-
}
|
|
34
|
+
};
|
|
20
35
|
export const DragLayer = () => {
|
|
21
|
-
const { itemType, isDragging, item,
|
|
36
|
+
const { itemType, isDragging, item, currentOffset } = useDragLayer((monitor) => ({
|
|
22
37
|
item: monitor.getItem(),
|
|
23
38
|
itemType: monitor.getItemType(),
|
|
24
|
-
initialOffset: monitor.getInitialSourceClientOffset(),
|
|
25
39
|
currentOffset: monitor.getSourceClientOffset(),
|
|
26
40
|
isDragging: monitor.isDragging(),
|
|
27
41
|
}));
|
|
28
|
-
const renderItem =
|
|
42
|
+
const renderItem = () => {
|
|
29
43
|
switch (itemType) {
|
|
30
44
|
case 'file':
|
|
31
45
|
return (React.createElement(DraggableFileContainer, null,
|
|
@@ -34,24 +48,9 @@ export const DragLayer = () => {
|
|
|
34
48
|
default:
|
|
35
49
|
return null;
|
|
36
50
|
}
|
|
37
|
-
}
|
|
51
|
+
};
|
|
38
52
|
if (!isDragging) {
|
|
39
53
|
return null;
|
|
40
54
|
}
|
|
41
|
-
return (React.createElement(Container, { style: getItemStyles(
|
|
55
|
+
return (React.createElement(Container, { style: getItemStyles(currentOffset) }, renderItem()));
|
|
42
56
|
};
|
|
43
|
-
const Container = styled.div `
|
|
44
|
-
position: fixed;
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
z-index: 999;
|
|
47
|
-
left: 0;
|
|
48
|
-
top: 0;
|
|
49
|
-
max-width: 400px;
|
|
50
|
-
`;
|
|
51
|
-
const DraggableFileContainer = styled(FileContainer) `
|
|
52
|
-
padding: 16px 32px;
|
|
53
|
-
background: #f2fbfc;
|
|
54
|
-
border: 1px solid #bce7f6;
|
|
55
|
-
box-shadow: 0 4px 9px rgba(0, 0, 0, 0.3);
|
|
56
|
-
border-radius: 6px;
|
|
57
|
-
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { createContext } from 'react';
|
|
2
2
|
import { useFiles } from '../../index';
|
|
3
|
+
import { DragLayer } from '../DragLayer';
|
|
3
4
|
import { InspectorTab, InspectorTabList, InspectorTabPanel, InspectorTabPanels, InspectorTabs, } from '../Inspector';
|
|
4
5
|
import { InspectorSection } from '../InspectorSection';
|
|
5
6
|
import { Tooltip } from '../Tooltip';
|
|
6
|
-
import { DragLayer } from './DragLayer';
|
|
7
7
|
import { FileManagerProvider } from './FileManagerProvider';
|
|
8
8
|
import { InlineFilesSection } from './InlineFilesSection';
|
|
9
9
|
import { OtherFilesSection } from './OtherFilesSection';
|
|
@@ -51,3 +51,56 @@ export const Menus = ({ menus, innerRef, handleClick, }) => {
|
|
|
51
51
|
})))));
|
|
52
52
|
})));
|
|
53
53
|
};
|
|
54
|
+
export const orderedListContextMenu = [
|
|
55
|
+
{ items: ['1.', '2.', '3.'], type: 'order' },
|
|
56
|
+
{ items: ['A.', 'B.', 'C.'], type: 'alpha-upper' },
|
|
57
|
+
{ items: ['a.', 'b.', 'c.'], type: 'alpha-lower' },
|
|
58
|
+
{ items: ['I.', 'II.', 'III.'], type: 'roman-upper' },
|
|
59
|
+
{ items: ['i.', 'ii.', 'iii.'], type: 'roman-lower' },
|
|
60
|
+
];
|
|
61
|
+
export const bulletListContextMenu = [
|
|
62
|
+
{ items: ['•', '•', '•'], type: 'bullet' },
|
|
63
|
+
{ items: ['-', '-', '-'], type: 'simple' },
|
|
64
|
+
];
|
|
65
|
+
export const ListContainer = styled.div `
|
|
66
|
+
padding: ${(props) => props.theme.grid.unit * 4}px;
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-template-columns:
|
|
69
|
+
${(props) => props.theme.grid.unit * 21}px
|
|
70
|
+
${(props) => props.theme.grid.unit * 21}px;
|
|
71
|
+
gap: 6px;
|
|
72
|
+
`;
|
|
73
|
+
export const StyleBlock = styled.div `
|
|
74
|
+
border: 1px solid ${(props) => props.theme.colors.border.tertiary};
|
|
75
|
+
padding: ${(props) => props.theme.grid.unit * 2}px;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
row-gap: ${(props) => props.theme.grid.unit * 2}px;
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
background: ${(props) => props.theme.colors.button.default.border.hover};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:active {
|
|
86
|
+
border-color: ${(props) => props.theme.colors.border.primary};
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
export const BlockItem = styled.div `
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 6px;
|
|
93
|
+
`;
|
|
94
|
+
export const Block = styled.div `
|
|
95
|
+
height: 3px;
|
|
96
|
+
width: ${(props) => props.theme.grid.unit * 14}px;
|
|
97
|
+
background: ${(props) => props.theme.colors.border.tertiary};
|
|
98
|
+
`;
|
|
99
|
+
export const Label = styled.div `
|
|
100
|
+
font-family: Lato, serif;
|
|
101
|
+
font-size: ${(props) => props.theme.font.size.small};
|
|
102
|
+
font-weight: ${(props) => props.theme.font.weight.normal};
|
|
103
|
+
line-height: ${(props) => props.theme.font.lineHeight.small};
|
|
104
|
+
font-style: normal;
|
|
105
|
+
color: ${(props) => (props.hide && 'white') || 'initial'};
|
|
106
|
+
`;
|