cozy-ui 126.5.0 → 127.0.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 +46 -0
- package/package.json +1 -1
- package/react/ActionsMenu/index.jsx +10 -0
- package/react/Avatar/index.jsx +6 -0
- package/react/Checkbox/Readme.md +12 -0
- package/react/Checkbox/index.jsx +25 -3
- package/react/ContactsList/ContactRow.jsx +1 -1
- package/react/ContactsList/Contacts/ContactIdentity.jsx +34 -15
- package/react/ContactsList/Contacts/ContactName.jsx +22 -18
- package/react/ContactsList/locales/withContactsListLocales.jsx +1 -1
- package/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +50 -25
- package/react/Table/Readme.md +39 -1
- package/react/Table/Virtualized/Cell.jsx +8 -6
- package/react/Table/Virtualized/Dnd/TableRow.jsx +14 -6
- package/react/Table/Virtualized/Dnd/index.jsx +35 -0
- package/react/Table/Virtualized/Dnd/virtuosoComponents.jsx +25 -0
- package/react/Table/Virtualized/FixedHeaderContent.jsx +7 -1
- package/react/Table/Virtualized/RowContent.jsx +19 -4
- package/react/Table/Virtualized/TableRow.jsx +20 -0
- package/react/Table/Virtualized/helpers.js +4 -2
- package/react/Table/Virtualized/index.jsx +13 -30
- package/react/Table/Virtualized/virtuosoComponents.jsx +23 -49
- package/react/TableContainer/index.js +16 -1
- package/react/utils/index.js +1 -0
- package/transpiled/react/ActionsMenu/index.js +13 -2
- package/transpiled/react/Avatar/index.d.ts +5 -1
- package/transpiled/react/Avatar/index.js +13 -5
- package/transpiled/react/Checkbox/index.d.ts +6 -0
- package/transpiled/react/Checkbox/index.js +18 -5
- package/transpiled/react/ContactsList/ContactRow.js +1 -1
- package/transpiled/react/ContactsList/Contacts/ContactIdentity.d.ts +7 -7
- package/transpiled/react/ContactsList/Contacts/ContactIdentity.js +39 -22
- package/transpiled/react/ContactsList/Contacts/ContactName.d.ts +3 -9
- package/transpiled/react/ContactsList/Contacts/ContactName.js +12 -13
- package/transpiled/react/ContactsList/locales/withContactsListLocales.d.ts +6 -0
- package/transpiled/react/ContactsList/locales/withContactsListLocales.js +1 -1
- package/transpiled/react/MuiCozyTheme/overrides/makeDarkInvertedOverrides.d.ts +46 -21
- package/transpiled/react/MuiCozyTheme/overrides/makeDarkNormalOverrides.d.ts +46 -21
- package/transpiled/react/MuiCozyTheme/overrides/makeLightInvertedOverrides.d.ts +46 -21
- package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.d.ts +46 -21
- package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +50 -25
- package/transpiled/react/Table/Virtualized/Cell.d.ts +2 -1
- package/transpiled/react/Table/Virtualized/Cell.js +24 -17
- package/transpiled/react/Table/Virtualized/Dnd/TableRow.d.ts +1 -3
- package/transpiled/react/Table/Virtualized/Dnd/TableRow.js +9 -7
- package/transpiled/react/Table/Virtualized/Dnd/index.d.ts +7 -0
- package/transpiled/react/Table/Virtualized/Dnd/index.js +47 -0
- package/transpiled/react/Table/Virtualized/Dnd/virtuosoComponents.d.ts +14 -0
- package/transpiled/react/Table/Virtualized/Dnd/virtuosoComponents.js +39 -0
- package/transpiled/react/Table/Virtualized/FixedHeaderContent.d.ts +2 -2
- package/transpiled/react/Table/Virtualized/FixedHeaderContent.js +7 -1
- package/transpiled/react/Table/Virtualized/RowContent.d.ts +3 -2
- package/transpiled/react/Table/Virtualized/RowContent.js +13 -4
- package/transpiled/react/Table/Virtualized/TableRow.d.ts +3 -0
- package/transpiled/react/Table/Virtualized/TableRow.js +21 -0
- package/transpiled/react/Table/Virtualized/helpers.js +4 -2
- package/transpiled/react/Table/Virtualized/index.d.ts +3 -2
- package/transpiled/react/Table/Virtualized/index.js +17 -38
- package/transpiled/react/Table/Virtualized/virtuosoComponents.js +37 -65
- package/transpiled/react/TableContainer/index.d.ts +2 -1
- package/transpiled/react/TableContainer/index.js +20 -1
- package/transpiled/react/utils/index.d.ts +1 -0
- package/transpiled/react/utils/index.js +1 -0
|
@@ -1,100 +1,72 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["context"],
|
|
5
|
-
_excluded2 = ["
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
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; }
|
|
4
|
+
_excluded2 = ["context"],
|
|
5
|
+
_excluded3 = ["context", "className"],
|
|
6
|
+
_excluded4 = ["context"],
|
|
7
|
+
_excluded5 = ["context"];
|
|
10
8
|
|
|
9
|
+
/* eslint-disable no-unused-vars */
|
|
10
|
+
import cx from 'classnames';
|
|
11
11
|
import React, { forwardRef } from 'react';
|
|
12
|
-
import
|
|
13
|
-
import TableRowDnD from "cozy-ui/transpiled/react/Table/Virtualized/Dnd/TableRow";
|
|
12
|
+
import TableRow from "cozy-ui/transpiled/react/Table/Virtualized/TableRow";
|
|
14
13
|
import Table from "cozy-ui/transpiled/react/Table";
|
|
15
|
-
import Paper from "cozy-ui/transpiled/react/Paper";
|
|
16
14
|
import TableBody from "cozy-ui/transpiled/react/TableBody";
|
|
17
15
|
import TableContainer from "cozy-ui/transpiled/react/TableContainer";
|
|
18
16
|
import TableFooter from "cozy-ui/transpiled/react/TableFooter";
|
|
19
17
|
import TableHead from "cozy-ui/transpiled/react/TableHead";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ref: ref,
|
|
25
|
-
component: Paper,
|
|
26
|
-
style: _objectSpread({
|
|
27
|
-
zIndex: 'var(--zIndex-app)'
|
|
28
|
-
}, props.style),
|
|
29
|
-
elevation: 0
|
|
30
|
-
}));
|
|
31
|
-
});
|
|
18
|
+
/**
|
|
19
|
+
Be aware that context is spread to every components but should not be spread to Table components
|
|
20
|
+
so we desctrure it from props, but don't spread to child to avoid its presence in DOM
|
|
21
|
+
*/
|
|
32
22
|
|
|
33
|
-
_TableContainer.displayName = '_TableContainer';
|
|
34
23
|
var virtuosoComponents = {
|
|
35
24
|
Scroller: /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
36
|
-
var _context$dragProps;
|
|
37
|
-
|
|
38
25
|
var context = _ref.context,
|
|
39
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}));
|
|
45
|
-
} else {
|
|
46
|
-
return /*#__PURE__*/React.createElement(DnDConfigWrapper, {
|
|
47
|
-
ref: ref
|
|
48
|
-
}, /*#__PURE__*/React.createElement(_TableContainer, _extends({}, props, {
|
|
49
|
-
ref: ref
|
|
50
|
-
})));
|
|
51
|
-
}
|
|
28
|
+
return /*#__PURE__*/React.createElement(TableContainer, _extends({}, props, {
|
|
29
|
+
ref: ref
|
|
30
|
+
}));
|
|
52
31
|
}),
|
|
53
|
-
Table: /*#__PURE__*/forwardRef(function (
|
|
32
|
+
Table: /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
33
|
+
var context = _ref2.context,
|
|
34
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
35
|
+
|
|
54
36
|
return /*#__PURE__*/React.createElement(Table, _extends({}, props, {
|
|
55
37
|
ref: ref
|
|
56
38
|
}));
|
|
57
39
|
}),
|
|
58
|
-
TableHead: /*#__PURE__*/forwardRef(function (
|
|
40
|
+
TableHead: /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
41
|
+
var context = _ref3.context,
|
|
42
|
+
className = _ref3.className,
|
|
43
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
44
|
+
|
|
59
45
|
return /*#__PURE__*/React.createElement(TableHead, _extends({}, props, {
|
|
46
|
+
className: cx(className, 'virtualized'),
|
|
60
47
|
ref: ref
|
|
61
48
|
}));
|
|
62
49
|
}),
|
|
63
|
-
TableBody: /*#__PURE__*/forwardRef(function (
|
|
50
|
+
TableBody: /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
51
|
+
var context = _ref4.context,
|
|
52
|
+
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
53
|
+
|
|
64
54
|
return /*#__PURE__*/React.createElement(TableBody, _extends({}, props, {
|
|
65
55
|
ref: ref
|
|
66
56
|
}));
|
|
67
57
|
}),
|
|
68
|
-
TableFooter: /*#__PURE__*/forwardRef(function (
|
|
58
|
+
TableFooter: /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
59
|
+
var context = _ref5.context,
|
|
60
|
+
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
61
|
+
|
|
69
62
|
return /*#__PURE__*/React.createElement(TableFooter, _extends({}, props, {
|
|
70
63
|
ref: ref
|
|
71
64
|
}));
|
|
72
65
|
}),
|
|
73
|
-
TableRow: /*#__PURE__*/forwardRef(function (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
context = _ref2.context,
|
|
78
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
79
|
-
|
|
80
|
-
var isSelected = context === null || context === void 0 ? void 0 : context.isSelectedItem(item);
|
|
81
|
-
var isDisabled = context === null || context === void 0 ? void 0 : context.itemsInDropProcess.includes(item._id);
|
|
82
|
-
|
|
83
|
-
if (!((_context$dragProps2 = context.dragProps) !== null && _context$dragProps2 !== void 0 && _context$dragProps2.enabled)) {
|
|
84
|
-
return /*#__PURE__*/React.createElement(TableRow, _extends({}, props, {
|
|
85
|
-
ref: ref,
|
|
86
|
-
selected: isSelected,
|
|
87
|
-
hover: true
|
|
88
|
-
}));
|
|
89
|
-
} else {
|
|
90
|
-
return /*#__PURE__*/React.createElement(TableRowDnD, _extends({}, props, {
|
|
91
|
-
item: item,
|
|
92
|
-
context: context,
|
|
93
|
-
selected: isSelected,
|
|
94
|
-
disabled: isDisabled,
|
|
95
|
-
hover: true
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
66
|
+
TableRow: /*#__PURE__*/forwardRef(function (props, ref) {
|
|
67
|
+
return /*#__PURE__*/React.createElement(TableRow, _extends({}, props, {
|
|
68
|
+
ref: ref
|
|
69
|
+
}));
|
|
98
70
|
})
|
|
99
71
|
};
|
|
100
72
|
export default virtuosoComponents;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
|
|
4
|
+
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; }
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
|
|
8
|
+
import MuiTableContainer from '@material-ui/core/TableContainer';
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import Paper from "cozy-ui/transpiled/react/Paper";
|
|
11
|
+
var TableContainer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
12
|
+
return /*#__PURE__*/React.createElement(MuiTableContainer, _extends({}, props, {
|
|
13
|
+
ref: ref,
|
|
14
|
+
component: Paper,
|
|
15
|
+
style: _objectSpread({
|
|
16
|
+
zIndex: 'var(--zIndex-app)'
|
|
17
|
+
}, props.style),
|
|
18
|
+
elevation: 0
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
2
21
|
export default TableContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@material-ui/core/utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@material-ui/core/utils';
|