cozy-ui 110.4.0 → 110.6.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.
- package/CHANGELOG.md +19 -0
- package/assets/icons/ui/star-outline.svg +1 -0
- package/package.json +1 -1
- package/react/Backdrop/index.js +28 -1
- package/react/Empty/index.jsx +27 -4
- package/react/Icon/Readme.md +3 -1
- package/react/Icon/icons-sprite.js +1 -1
- package/react/Icons/StarOutline.jsx +16 -0
- package/react/IntentDialogOpener/IntentDialogOpener.jsx +10 -9
- package/react/IntentDialogOpener/IntentDialogOpener.md +10 -17
- package/react/IntentIframe/IntentIframe.jsx +11 -6
- package/react/IntentIframe/index.js +1 -1
- package/react/Viewer/ViewersByFile/BlankPaperViewer.jsx +48 -0
- package/react/Viewer/assets/IlluGenericNewPage.svg +10 -0
- package/react/Viewer/components/ViewerByFile.jsx +8 -3
- package/react/Viewer/locales/en.json +2 -0
- package/react/Viewer/locales/fr.json +2 -0
- package/react/providers/Intent/index.jsx +83 -0
- package/transpiled/react/Backdrop/index.js +30 -1
- package/transpiled/react/Empty/index.js +19 -7
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/StarOutline.js +15 -0
- package/transpiled/react/IntentDialogOpener/IntentDialogOpener.js +11 -9
- package/transpiled/react/IntentIframe/IntentIframe.js +17 -6
- package/transpiled/react/IntentIframe/index.js +1 -1
- package/transpiled/react/Viewer/ViewersByFile/BlankPaperViewer.js +74 -0
- package/transpiled/react/Viewer/assets/IlluGenericNewPage.svg +10 -0
- package/transpiled/react/Viewer/components/ViewerByFile.js +10 -3
- package/transpiled/react/Viewer/locales/index.js +4 -0
- package/transpiled/react/providers/Intent/index.js +104 -0
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["icon", "iconSize", "title", "text", "children", "className", "centered"];
|
|
4
|
+
var _excluded = ["icon", "iconSize", "title", "text", "children", "className", "centered", "componentsProps"];
|
|
5
|
+
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
+
|
|
5
10
|
import React from 'react';
|
|
6
11
|
import cx from 'classnames';
|
|
7
12
|
import PropTypes from 'prop-types';
|
|
@@ -26,27 +31,28 @@ export var Empty = function Empty(_ref) {
|
|
|
26
31
|
children = _ref.children,
|
|
27
32
|
className = _ref.className,
|
|
28
33
|
centered = _ref.centered,
|
|
34
|
+
componentsProps = _ref.componentsProps,
|
|
29
35
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
30
36
|
|
|
31
37
|
var isReactIconElement = typeof icon === 'object' && !!icon.props;
|
|
32
38
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
33
39
|
className: cx(styles['c-empty'], _defineProperty({}, styles['c-empty--centered'], centered), className)
|
|
34
|
-
}, restProps), icon && (isReactIconElement ? /*#__PURE__*/React.cloneElement(icon, {
|
|
40
|
+
}, restProps), icon && (isReactIconElement ? /*#__PURE__*/React.cloneElement(icon, _objectSpread({
|
|
35
41
|
className: cx(styles['c-empty-img'], _defineProperty({}, styles["c-empty-img--".concat(iconSize)], iconSize !== 'normal'), (_icon$props = icon.props) === null || _icon$props === void 0 ? void 0 : _icon$props.className),
|
|
36
42
|
size: ((_icon$props2 = icon.props) === null || _icon$props2 === void 0 ? void 0 : _icon$props2.size) || (icon.type === Icon ? '100%' : undefined)
|
|
37
|
-
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
43
|
+
}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.icon)) : /*#__PURE__*/React.createElement(Icon, _extends({
|
|
38
44
|
className: cx(styles['c-empty-img'], _defineProperty({}, styles["c-empty-img--".concat(iconSize)], iconSize !== 'normal')),
|
|
39
45
|
icon: icon,
|
|
40
46
|
size: "100%"
|
|
41
|
-
})), title && /*#__PURE__*/React.createElement(Typography, {
|
|
47
|
+
}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.icon))), title && /*#__PURE__*/React.createElement(Typography, _extends({
|
|
42
48
|
gutterBottom: true,
|
|
43
49
|
variant: "h3",
|
|
44
50
|
color: "textPrimary"
|
|
45
|
-
}, title), text && /*#__PURE__*/React.createElement(EmptySubTitle, {
|
|
51
|
+
}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.title), title), text && /*#__PURE__*/React.createElement(EmptySubTitle, _extends({
|
|
46
52
|
gutterBottom: true
|
|
47
|
-
}, text), /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.text), text), /*#__PURE__*/React.createElement("div", _extends({
|
|
48
54
|
className: styles['c-empty-text']
|
|
49
|
-
}, children));
|
|
55
|
+
}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.childrenContainer), children));
|
|
50
56
|
};
|
|
51
57
|
Empty.propTypes = {
|
|
52
58
|
icon: iconPropType,
|
|
@@ -57,6 +63,12 @@ Empty.propTypes = {
|
|
|
57
63
|
/** Sets horizontal and vertical centring. The reference element is that of a fixed position */
|
|
58
64
|
centered: PropTypes.bool,
|
|
59
65
|
children: PropTypes.node,
|
|
66
|
+
componentsProps: PropTypes.shape({
|
|
67
|
+
icon: PropTypes.object,
|
|
68
|
+
title: PropTypes.object,
|
|
69
|
+
text: PropTypes.object,
|
|
70
|
+
childrenContainer: PropTypes.object
|
|
71
|
+
}),
|
|
60
72
|
className: PropTypes.string
|
|
61
73
|
};
|
|
62
74
|
Empty.defaultProps = {
|