@manuscripts/style-guide 1.2.1-LEAN-2669-v1 → 1.2.2
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.
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.FileDate = exports.FileDateContainer = exports.InlineFilesSection = void 0;
|
|
30
30
|
const date_fns_1 = require("date-fns");
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
|
+
const react_tooltip_1 = __importDefault(require("react-tooltip"));
|
|
32
33
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
33
34
|
const use_dropdown_1 = require("../../hooks/use-dropdown");
|
|
34
35
|
const dots_icon_1 = __importDefault(require("../icons/dots-icon"));
|
|
@@ -73,8 +74,9 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
73
74
|
react_1.default.createElement(Container, null,
|
|
74
75
|
util_1.fileTypesWithIconMap.get(util_1.extensionsWithFileTypesMap.get(fileExtension)),
|
|
75
76
|
react_1.default.createElement(FileReferenceName, null, attachment.name)),
|
|
76
|
-
attachment.createdDate && (react_1.default.createElement(exports.FileDateContainer,
|
|
77
|
-
react_1.default.createElement(exports.FileDate, null, (0, date_fns_1.format)(new Date(attachment.createdDate), 'M/d/yy, HH:mm'))
|
|
77
|
+
attachment.createdDate && (react_1.default.createElement(exports.FileDateContainer, { "data-tip": "tooltip-content" },
|
|
78
|
+
react_1.default.createElement(exports.FileDate, null, (0, date_fns_1.format)(new Date(attachment.createdDate), 'M/d/yy, HH:mm')),
|
|
79
|
+
react_1.default.createElement(react_tooltip_1.default, { place: "bottom", offset: { top: 0 }, effect: "solid", className: "tooltip" }, "File Uploaded"))),
|
|
78
80
|
handleDownload && handleReplace && (react_1.default.createElement(DropdownContainer, { ref: wrapperRef },
|
|
79
81
|
react_1.default.createElement(FileSectionItem_1.ActionsIcon, { onClick: toggleOpen, type: "button", className: 'external_file_dropdown', "aria-label": "Download or Replace or Detach", "aria-pressed": isOpen },
|
|
80
82
|
react_1.default.createElement(dots_icon_1.default, null)),
|
|
@@ -87,8 +89,8 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
87
89
|
exports.FileDateContainer = styled_components_1.default.div `
|
|
88
90
|
overflow: hidden;
|
|
89
91
|
display: none;
|
|
90
|
-
width:
|
|
91
|
-
|
|
92
|
+
width: 100%;
|
|
93
|
+
justify-content: flex-end;
|
|
92
94
|
`;
|
|
93
95
|
const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
94
96
|
display: flex;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { format } from 'date-fns';
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
|
+
import ReactTooltip from 'react-tooltip';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import { useDropdown } from '../../hooks/use-dropdown';
|
|
5
6
|
import DotsIcon from '../icons/dots-icon';
|
|
@@ -43,8 +44,9 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
43
44
|
React.createElement(Container, null,
|
|
44
45
|
fileTypesWithIconMap.get(extensionsWithFileTypesMap.get(fileExtension)),
|
|
45
46
|
React.createElement(FileReferenceName, null, attachment.name)),
|
|
46
|
-
attachment.createdDate && (React.createElement(FileDateContainer,
|
|
47
|
-
React.createElement(FileDate, null, format(new Date(attachment.createdDate), 'M/d/yy, HH:mm'))
|
|
47
|
+
attachment.createdDate && (React.createElement(FileDateContainer, { "data-tip": "tooltip-content" },
|
|
48
|
+
React.createElement(FileDate, null, format(new Date(attachment.createdDate), 'M/d/yy, HH:mm')),
|
|
49
|
+
React.createElement(ReactTooltip, { place: "bottom", offset: { top: 0 }, effect: "solid", className: "tooltip" }, "File Uploaded"))),
|
|
48
50
|
handleDownload && handleReplace && (React.createElement(DropdownContainer, { ref: wrapperRef },
|
|
49
51
|
React.createElement(ActionsIcon, { onClick: toggleOpen, type: "button", className: 'external_file_dropdown', "aria-label": "Download or Replace or Detach", "aria-pressed": isOpen },
|
|
50
52
|
React.createElement(DotsIcon, null)),
|
|
@@ -57,8 +59,8 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
57
59
|
export const FileDateContainer = styled.div `
|
|
58
60
|
overflow: hidden;
|
|
59
61
|
display: none;
|
|
60
|
-
width:
|
|
61
|
-
|
|
62
|
+
width: 100%;
|
|
63
|
+
justify-content: flex-end;
|
|
62
64
|
`;
|
|
63
65
|
const ElementItem = styled(Item) `
|
|
64
66
|
display: flex;
|
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.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|