@manuscripts/style-guide 3.2.0 → 3.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.
- package/dist/cjs/components/AlertMessage.js +18 -8
- package/dist/cjs/components/Avatar.js +17 -7
- package/dist/cjs/components/Button.js +17 -7
- package/dist/cjs/components/ContextMenu.js +17 -7
- package/dist/cjs/components/DatePicker/CalendarDatePicker.js +17 -7
- package/dist/cjs/components/Dialog.js +1 -1
- package/dist/cjs/components/DraggableModal.js +17 -7
- package/dist/cjs/components/Drawer.js +17 -7
- package/dist/cjs/components/InspectorSection.js +17 -7
- package/dist/cjs/components/MultiValueInput.js +17 -7
- package/dist/cjs/components/NavDropdown.js +17 -7
- package/dist/cjs/components/RelativeDate.js +20 -5
- package/dist/cjs/components/RichText/RichText.js +17 -7
- package/dist/cjs/components/RichText/RichTextField.js +17 -7
- package/dist/cjs/components/Sidebar.js +17 -7
- package/dist/cjs/components/SystemUserAvatar.js +17 -7
- package/dist/cjs/components/TextField.js +17 -7
- package/dist/cjs/components/icons/circle-tick-animation.js +17 -7
- package/dist/cjs/lib/files.js +1 -1
- package/dist/es/components/RelativeDate.js +20 -5
- package/dist/types/components/AlertMessage.d.ts +3 -3
- package/dist/types/components/Button.d.ts +42 -42
- package/dist/types/components/Checkbox.d.ts +2 -2
- package/dist/types/components/Drawer.d.ts +1 -1
- package/dist/types/components/Dropdown.d.ts +4 -4
- package/dist/types/components/Form.d.ts +0 -1
- package/dist/types/components/InspectorSection.d.ts +6 -6
- package/dist/types/components/NavDropdown.d.ts +8 -8
- package/dist/types/components/StyledModal.d.ts +7 -7
- package/dist/types/hooks/use-dropdown.d.ts +0 -1
- package/dist/types/hooks/use-menus.d.ts +0 -1
- package/dist/types/lib/capabilities.d.ts +1 -1
- package/dist/types/lib/files.d.ts +0 -1
- package/package.json +6 -6
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -128,7 +138,7 @@ var AlertMessageType;
|
|
|
128
138
|
AlertMessageType["error"] = "error";
|
|
129
139
|
AlertMessageType["warning"] = "warning";
|
|
130
140
|
AlertMessageType["info"] = "info";
|
|
131
|
-
})(AlertMessageType
|
|
141
|
+
})(AlertMessageType || (exports.AlertMessageType = AlertMessageType = {}));
|
|
132
142
|
const alertIcons = {
|
|
133
143
|
success: SuccessIcon,
|
|
134
144
|
error: icons_1.AttentionRedIcon,
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
51
|
exports.IconButtonGroup = exports.ButtonGroup = exports.SecondaryIconButton = exports.RoundIconButton = exports.IconButton = exports.ToggleButtonAlt = exports.ToggleButton = exports.IconTextButton = exports.TertiaryButton = exports.LoginButton = exports.PrimaryButton = exports.SecondaryButton = void 0;
|
|
42
52
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -76,7 +76,7 @@ var Category;
|
|
|
76
76
|
Category["confirmation"] = "confirmation";
|
|
77
77
|
Category["warning"] = "warning";
|
|
78
78
|
Category["success"] = "success";
|
|
79
|
-
})(Category
|
|
79
|
+
})(Category || (exports.Category = Category = {}));
|
|
80
80
|
const PrimaryAction = (props) => props.isDestructive ? (props.hasForm ? (react_1.default.createElement(Button_1.PrimaryButton, { danger: true, disabled: props.disabled, form: "formDialog", type: "submit" }, props.title)) : (react_1.default.createElement(Button_1.PrimaryButton, { danger: true, disabled: props.disabled, onClick: props.action, autoFocus: true }, props.title))) : props.hasForm ? (react_1.default.createElement(Button_1.PrimaryButton, { disabled: props.disabled, form: "formDialog", type: "submit" }, props.title)) : (react_1.default.createElement(Button_1.PrimaryButton, { disabled: props.disabled, onClick: props.action, autoFocus: true }, props.title));
|
|
81
81
|
const SecondaryAction = (props) => (react_1.default.createElement(Button_1.SecondaryButton, { disabled: props.disabled, onClick: props.action }, props.title));
|
|
82
82
|
class Dialog extends react_1.default.Component {
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -25,12 +25,27 @@ const RelativeDate = ({ date, ...props }) => {
|
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
const formatter = new Intl.RelativeTimeFormat('en', { style: 'short' });
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const msAgo = Date.now() - date;
|
|
29
|
+
const minutesAgo = msAgo / 60000;
|
|
30
|
+
const HOUR = 60;
|
|
31
|
+
const DAY = 24 * 60;
|
|
32
|
+
let value;
|
|
33
|
+
let unit;
|
|
34
|
+
if (minutesAgo < 1) {
|
|
35
|
+
return react_1.default.createElement("span", { ...props }, "just now");
|
|
36
|
+
}
|
|
37
|
+
else if (minutesAgo < HOUR) {
|
|
38
|
+
value = Math.round(minutesAgo);
|
|
39
|
+
unit = 'minute';
|
|
40
|
+
}
|
|
41
|
+
else if (minutesAgo < DAY) {
|
|
42
|
+
value = Math.round(minutesAgo / HOUR);
|
|
43
|
+
unit = 'hour';
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
value = Math.round(minutesAgo / DAY);
|
|
32
47
|
unit = 'day';
|
|
33
48
|
}
|
|
34
|
-
return react_1.default.createElement("span", { ...props }, formatter.format(value, unit));
|
|
49
|
+
return react_1.default.createElement("span", { ...props }, formatter.format(-value, unit));
|
|
35
50
|
};
|
|
36
51
|
exports.RelativeDate = RelativeDate;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.RichText = void 0;
|
|
27
37
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.SidebarContent = exports.SidebarStyles = void 0;
|
|
27
37
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/dist/cjs/lib/files.js
CHANGED
|
@@ -20,7 +20,7 @@ var FileType;
|
|
|
20
20
|
FileType[FileType["PlainText"] = 9] = "PlainText";
|
|
21
21
|
FileType[FileType["Figure"] = 10] = "Figure";
|
|
22
22
|
FileType[FileType["GraphicalAbstract"] = 11] = "GraphicalAbstract";
|
|
23
|
-
})(FileType
|
|
23
|
+
})(FileType || (exports.FileType = FileType = {}));
|
|
24
24
|
const extension2type = new Map([
|
|
25
25
|
['png', FileType.Image],
|
|
26
26
|
['jpg', FileType.Image],
|
|
@@ -19,11 +19,26 @@ export const RelativeDate = ({ date, ...props }) => {
|
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
const formatter = new Intl.RelativeTimeFormat('en', { style: 'short' });
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const msAgo = Date.now() - date;
|
|
23
|
+
const minutesAgo = msAgo / 60000;
|
|
24
|
+
const HOUR = 60;
|
|
25
|
+
const DAY = 24 * 60;
|
|
26
|
+
let value;
|
|
27
|
+
let unit;
|
|
28
|
+
if (minutesAgo < 1) {
|
|
29
|
+
return React.createElement("span", { ...props }, "just now");
|
|
30
|
+
}
|
|
31
|
+
else if (minutesAgo < HOUR) {
|
|
32
|
+
value = Math.round(minutesAgo);
|
|
33
|
+
unit = 'minute';
|
|
34
|
+
}
|
|
35
|
+
else if (minutesAgo < DAY) {
|
|
36
|
+
value = Math.round(minutesAgo / HOUR);
|
|
37
|
+
unit = 'hour';
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
value = Math.round(minutesAgo / DAY);
|
|
26
41
|
unit = 'day';
|
|
27
42
|
}
|
|
28
|
-
return React.createElement("span", { ...props }, formatter.format(value, unit));
|
|
43
|
+
return React.createElement("span", { ...props }, formatter.format(-value, unit));
|
|
29
44
|
};
|
|
@@ -17,9 +17,9 @@ import React from 'react';
|
|
|
17
17
|
export declare const TextButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
18
18
|
type: "button" | "submit" | "reset";
|
|
19
19
|
} & {
|
|
20
|
-
danger?: boolean
|
|
21
|
-
disabled?: boolean
|
|
22
|
-
mini?: boolean
|
|
20
|
+
danger?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
mini?: boolean;
|
|
23
23
|
}, "type">;
|
|
24
24
|
interface State {
|
|
25
25
|
isOpen: boolean;
|
|
@@ -16,92 +16,92 @@
|
|
|
16
16
|
export declare const SecondaryButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
17
17
|
type: "button" | "submit" | "reset";
|
|
18
18
|
} & {
|
|
19
|
-
danger?: boolean
|
|
20
|
-
disabled?: boolean
|
|
21
|
-
mini?: boolean
|
|
19
|
+
danger?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
mini?: boolean;
|
|
22
22
|
}, "type">;
|
|
23
23
|
export declare const PrimaryButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
24
24
|
type: "button" | "submit" | "reset";
|
|
25
25
|
} & {
|
|
26
|
-
danger?: boolean
|
|
27
|
-
disabled?: boolean
|
|
28
|
-
mini?: boolean
|
|
26
|
+
danger?: boolean;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
mini?: boolean;
|
|
29
29
|
}, "type">;
|
|
30
30
|
export declare const LoginButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
31
31
|
type: "button" | "submit" | "reset";
|
|
32
32
|
} & {
|
|
33
|
-
danger?: boolean
|
|
34
|
-
disabled?: boolean
|
|
35
|
-
mini?: boolean
|
|
33
|
+
danger?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
mini?: boolean;
|
|
36
36
|
}, "type">;
|
|
37
37
|
export declare const TertiaryButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
38
38
|
type: "button" | "submit" | "reset";
|
|
39
39
|
} & {
|
|
40
|
-
danger?: boolean
|
|
41
|
-
disabled?: boolean
|
|
42
|
-
mini?: boolean
|
|
40
|
+
danger?: boolean;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
mini?: boolean;
|
|
43
43
|
}, "type">;
|
|
44
44
|
export declare const IconTextButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
45
45
|
type: "button" | "submit" | "reset";
|
|
46
46
|
} & {
|
|
47
|
-
danger?: boolean
|
|
48
|
-
disabled?: boolean
|
|
49
|
-
mini?: boolean
|
|
47
|
+
danger?: boolean;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
mini?: boolean;
|
|
50
50
|
}, "type">;
|
|
51
51
|
export declare const ToggleButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
52
52
|
type: "button" | "submit" | "reset";
|
|
53
53
|
} & {
|
|
54
|
-
danger?: boolean
|
|
55
|
-
disabled?: boolean
|
|
56
|
-
mini?: boolean
|
|
54
|
+
danger?: boolean;
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
mini?: boolean;
|
|
57
57
|
} & {
|
|
58
|
-
selected?: boolean
|
|
58
|
+
selected?: boolean;
|
|
59
59
|
}, "type">;
|
|
60
60
|
export declare const ToggleButtonAlt: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
61
61
|
type: "button" | "submit" | "reset";
|
|
62
62
|
} & {
|
|
63
|
-
danger?: boolean
|
|
64
|
-
disabled?: boolean
|
|
65
|
-
mini?: boolean
|
|
63
|
+
danger?: boolean;
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
mini?: boolean;
|
|
66
66
|
} & {
|
|
67
|
-
selected?: boolean
|
|
67
|
+
selected?: boolean;
|
|
68
68
|
}, "type">;
|
|
69
69
|
export declare const IconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
70
70
|
type: "button" | "submit" | "reset";
|
|
71
71
|
} & {
|
|
72
|
-
danger?: boolean
|
|
73
|
-
disabled?: boolean
|
|
74
|
-
mini?: boolean
|
|
72
|
+
danger?: boolean;
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
mini?: boolean;
|
|
75
75
|
} & {
|
|
76
|
-
defaultColor?: boolean
|
|
77
|
-
size?: number
|
|
78
|
-
iconColor?: string
|
|
76
|
+
defaultColor?: boolean;
|
|
77
|
+
size?: number;
|
|
78
|
+
iconColor?: string;
|
|
79
79
|
}, "type">;
|
|
80
80
|
export declare const RoundIconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
81
81
|
type: "button" | "submit" | "reset";
|
|
82
82
|
} & {
|
|
83
|
-
danger?: boolean
|
|
84
|
-
disabled?: boolean
|
|
85
|
-
mini?: boolean
|
|
83
|
+
danger?: boolean;
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
mini?: boolean;
|
|
86
86
|
} & {
|
|
87
|
-
defaultColor?: boolean
|
|
88
|
-
size?: number
|
|
89
|
-
iconColor?: string
|
|
87
|
+
defaultColor?: boolean;
|
|
88
|
+
size?: number;
|
|
89
|
+
iconColor?: string;
|
|
90
90
|
} & {
|
|
91
91
|
defaultColor: boolean;
|
|
92
92
|
}, "type" | "defaultColor">;
|
|
93
93
|
export declare const SecondaryIconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
94
94
|
type: "button" | "submit" | "reset";
|
|
95
95
|
} & {
|
|
96
|
-
danger?: boolean
|
|
97
|
-
disabled?: boolean
|
|
98
|
-
mini?: boolean
|
|
96
|
+
danger?: boolean;
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
mini?: boolean;
|
|
99
99
|
} & {
|
|
100
|
-
defaultColor?: boolean
|
|
101
|
-
size?: number
|
|
102
|
-
iconColor?: string
|
|
100
|
+
defaultColor?: boolean;
|
|
101
|
+
size?: number;
|
|
102
|
+
iconColor?: string;
|
|
103
103
|
}, "type">;
|
|
104
104
|
export declare const ButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
105
105
|
export declare const IconButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
106
|
-
size?: number
|
|
106
|
+
size?: number;
|
|
107
107
|
}, never>;
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export declare const CheckboxLabel: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {
|
|
17
|
-
disabled?: boolean
|
|
17
|
+
disabled?: boolean;
|
|
18
18
|
}, never>;
|
|
19
19
|
export declare const CheckboxField: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
20
20
|
type: "checkbox";
|
|
21
21
|
} & {
|
|
22
|
-
type?: string
|
|
22
|
+
type?: string;
|
|
23
23
|
}, "type">;
|
|
@@ -7,7 +7,7 @@ export interface DrawerProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const DrawerItemsList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
9
9
|
export declare const DrawerListItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {
|
|
10
|
-
selected?: boolean
|
|
10
|
+
selected?: boolean;
|
|
11
11
|
}, never>;
|
|
12
12
|
export declare const DrawerIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
13
13
|
export declare const DrawerLabelContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const DropdownList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
2
|
'data-cy': string;
|
|
3
3
|
} & {
|
|
4
|
-
direction?: "
|
|
5
|
-
width?: number
|
|
6
|
-
height?: number
|
|
7
|
-
top?: number
|
|
4
|
+
direction?: "left" | "right";
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
top?: number;
|
|
8
8
|
}, "data-cy">;
|
|
9
9
|
export declare const DropdownContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
10
|
export declare const DropdownButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/// <reference types="react" />
|
|
17
16
|
export declare const CenteredForm: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import("react").RefAttributes<HTMLFormElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
18
17
|
export declare const FormHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
18
|
export declare const FormActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -17,13 +17,13 @@ import React, { CSSProperties } from 'react';
|
|
|
17
17
|
export declare const ExpanderButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
18
18
|
type: "button" | "submit" | "reset";
|
|
19
19
|
} & {
|
|
20
|
-
danger?: boolean
|
|
21
|
-
disabled?: boolean
|
|
22
|
-
mini?: boolean
|
|
20
|
+
danger?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
mini?: boolean;
|
|
23
23
|
} & {
|
|
24
|
-
defaultColor?: boolean
|
|
25
|
-
size?: number
|
|
26
|
-
iconColor?: string
|
|
24
|
+
defaultColor?: boolean;
|
|
25
|
+
size?: number;
|
|
26
|
+
iconColor?: string;
|
|
27
27
|
} & {
|
|
28
28
|
size: number;
|
|
29
29
|
defaultColor: boolean;
|
|
@@ -17,16 +17,16 @@ import React from 'react';
|
|
|
17
17
|
import { NavLink } from 'react-router-dom';
|
|
18
18
|
export declare const NavDropdownContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
19
|
export declare const NavDropdown: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
20
|
-
direction?: "
|
|
21
|
-
minWidth?: number
|
|
22
|
-
top?: number
|
|
20
|
+
direction?: "left" | "right";
|
|
21
|
+
minWidth?: number;
|
|
22
|
+
top?: number;
|
|
23
23
|
}, never>;
|
|
24
24
|
export declare const InvitedBy: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
25
25
|
export declare const NavDropdownLink: import("styled-components").StyledComponent<typeof NavLink, import("styled-components").DefaultTheme, {
|
|
26
|
-
disabled?: boolean
|
|
26
|
+
disabled?: boolean;
|
|
27
27
|
}, never>;
|
|
28
28
|
export declare const NavDropdownElement: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
29
|
-
disabled?: boolean
|
|
29
|
+
disabled?: boolean;
|
|
30
30
|
}, never>;
|
|
31
31
|
export declare const NavDropdownSeparator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
32
32
|
export declare const NavDropdownButtonText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -38,9 +38,9 @@ export declare const NotificationsBadge: import("styled-components").StyledCompo
|
|
|
38
38
|
export declare const NavDropdownButtonContainer: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
39
39
|
type: "button" | "submit" | "reset";
|
|
40
40
|
} & {
|
|
41
|
-
danger?: boolean
|
|
42
|
-
disabled?: boolean
|
|
43
|
-
mini?: boolean
|
|
41
|
+
danger?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
mini?: boolean;
|
|
44
44
|
} & {
|
|
45
45
|
selected: boolean;
|
|
46
46
|
} & DropdownProps, "type" | "selected">;
|
|
@@ -25,17 +25,17 @@ export declare const ModalHeader: import("styled-components").StyledComponent<"d
|
|
|
25
25
|
export declare const CloseButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
26
26
|
type: "button" | "submit" | "reset";
|
|
27
27
|
} & {
|
|
28
|
-
danger?: boolean
|
|
29
|
-
disabled?: boolean
|
|
30
|
-
mini?: boolean
|
|
28
|
+
danger?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
mini?: boolean;
|
|
31
31
|
} & {
|
|
32
|
-
defaultColor?: boolean
|
|
33
|
-
size?: number
|
|
34
|
-
iconColor?: string
|
|
32
|
+
defaultColor?: boolean;
|
|
33
|
+
size?: number;
|
|
34
|
+
iconColor?: string;
|
|
35
35
|
} & {
|
|
36
36
|
defaultColor: boolean;
|
|
37
37
|
} & {
|
|
38
|
-
size?: number
|
|
38
|
+
size?: number;
|
|
39
39
|
}, "type" | "defaultColor">;
|
|
40
40
|
export declare const ModalBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
41
41
|
export declare const ModalSidebar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -31,7 +31,7 @@ export interface ProviderProps {
|
|
|
31
31
|
children?: React.ReactNode;
|
|
32
32
|
isViewingMode?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export declare const getCapabilities: (project?: Project, profile?: UserProfile, role?: ProviderProps[
|
|
34
|
+
export declare const getCapabilities: (project?: Project, profile?: UserProfile, role?: ProviderProps["role"], actions?: string[], isViewingMode?: boolean) => Capabilities;
|
|
35
35
|
export declare const getAllPermitted: () => Capabilities;
|
|
36
36
|
export declare const usePermissions: () => Capabilities;
|
|
37
37
|
export declare const useCalcPermission: ({ project, profile, role, permittedActions, isViewingMode, }: ProviderProps) => Capabilities;
|
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": "3.2.
|
|
4
|
+
"version": "3.2.2",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@storybook/react": "7.6.10",
|
|
70
70
|
"@storybook/react-webpack5": "7.6.10",
|
|
71
71
|
"@storybook/test": "7.6.10",
|
|
72
|
-
"@types/jest": "
|
|
72
|
+
"@types/jest": "30.0.0",
|
|
73
73
|
"@types/lodash": "4.17.16",
|
|
74
74
|
"@types/react": "18.3.21",
|
|
75
75
|
"@types/react-dom": "18.3.7",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@types/styled-components": "5.1.34",
|
|
79
79
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
80
80
|
"@typescript-eslint/parser": "5.62.0",
|
|
81
|
-
"babel-jest": "
|
|
81
|
+
"babel-jest": "30.0.5",
|
|
82
82
|
"eslint": "8.57.1",
|
|
83
83
|
"eslint-config-prettier": "8.10.0",
|
|
84
84
|
"eslint-plugin-header": "3.1.1",
|
|
@@ -94,14 +94,14 @@
|
|
|
94
94
|
"eslint-plugin-simple-import-sort": "8.0.0",
|
|
95
95
|
"eslint-plugin-storybook": "0.12.0",
|
|
96
96
|
"husky": "8.0.3",
|
|
97
|
-
"jest": "
|
|
98
|
-
"jest-environment-jsdom": "
|
|
97
|
+
"jest": "30.0.5",
|
|
98
|
+
"jest-environment-jsdom": "30.0.5",
|
|
99
99
|
"npm-run-all": "4.1.5",
|
|
100
100
|
"prettier": "2.8.8",
|
|
101
101
|
"rimraf": "6.0.1",
|
|
102
102
|
"storybook": "7.6.10",
|
|
103
103
|
"typeface-lato": "1.1.13",
|
|
104
|
-
"typescript": "
|
|
104
|
+
"typescript": "5.9.2"
|
|
105
105
|
},
|
|
106
106
|
"engines": {
|
|
107
107
|
"node": ">=20.16.0"
|