cozy-ui-plus 8.0.1 → 9.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 +10 -0
- package/dist/AppIcon/index.js +5 -7
- package/dist/AppSections/components/DropdownFilter.js +4 -6
- package/dist/AppTile/index.js +4 -6
- package/dist/CipherIcon/index.js +4 -6
- package/dist/CollectionField/index.js +6 -10
- package/dist/Contacts/AddModal/ContactForm/FieldInputAccordion.js +4 -8
- package/dist/Contacts/AddModal/ContactForm/FieldInputArray.js +4 -6
- package/dist/Contacts/AddModal/ContactForm/FieldInputLayout.js +3 -3
- package/dist/Contacts/AddModal/ContactForm/RemoveButton.js +4 -6
- package/dist/Contacts/AddModal/ContactForm/fieldsConfig.js +14 -36
- package/dist/Contacts/AddModal/types.js +1 -3
- package/dist/Contacts/GroupsSelect/GroupCreation.js +4 -6
- package/dist/Contacts/GroupsSelect/SelectBox/Control.js +4 -6
- package/dist/Contacts/Header/ImportDropdown.js +6 -10
- package/dist/Contacts/Header/index.js +4 -6
- package/dist/ContactsListModal/AddContact/AddContactContent.js +4 -6
- package/dist/ContactsListModal/ContactsListModal.js +6 -8
- package/dist/ContactsListModal/MobileHeader.js +4 -6
- package/dist/Dialogs/AuthentificationDialog/index.js +3 -3
- package/dist/FilePicker/FilePickerBodyItem.js +4 -8
- package/dist/FilePicker/FilePickerBreadcrumb.js +4 -6
- package/dist/FilePicker/FilePickerHeader.js +4 -6
- package/dist/ListItem/ExpandedAttributes/ExpandedAttribute.js +4 -6
- package/dist/ListItem/ListItemBase/index.js +4 -6
- package/dist/ListItem/ListItemContact/index.js +5 -7
- package/dist/ListItem/ListItemFile/ItemIcon.js +4 -8
- package/dist/ListItem/ListItemFile/index.js +3 -3
- package/dist/Paywall/Paywall.js +4 -6
- package/dist/Qualification/QualificationGrid/index.js +12 -30
- package/dist/Qualification/QualificationIcon/index.js +35 -99
- package/dist/Qualification/QualificationItem/index.js +6 -13
- package/dist/Qualification/QualificationModal/helpers.js +4 -6
- package/dist/SquareAppIcon/index.js +10 -20
- package/dist/Storage/StorageButton.js +4 -6
- package/dist/Storage/StorageProgress.js +4 -6
- package/dist/src/AppIcon/index.d.ts +9 -10
- package/dist/src/Contacts/AddModal/ContactAddressDialog/index.d.ts +1 -1
- package/dist/src/Contacts/AddModal/types.d.ts +1 -1
- package/jest.config.js +2 -1
- package/package.json +4 -2
- package/src/AppIcon/index.jsx +7 -4
- package/src/AppIcon/index.spec.js +9 -7
- package/src/AppSections/components/DropdownFilter.jsx +2 -3
- package/src/AppTile/index.jsx +2 -3
- package/src/CipherIcon/index.jsx +2 -3
- package/src/CollectionField/index.jsx +3 -7
- package/src/Contacts/AddModal/ContactForm/FieldInputAccordion.jsx +2 -4
- package/src/Contacts/AddModal/ContactForm/FieldInputArray.jsx +2 -3
- package/src/Contacts/AddModal/ContactForm/FieldInputLayout.jsx +1 -1
- package/src/Contacts/AddModal/ContactForm/RemoveButton.jsx +2 -3
- package/src/Contacts/AddModal/ContactForm/fieldsConfig.jsx +25 -23
- package/src/Contacts/AddModal/types.js +5 -3
- package/src/Contacts/GroupsSelect/GroupCreation.jsx +2 -3
- package/src/Contacts/GroupsSelect/SelectBox/Control.jsx +2 -3
- package/src/Contacts/Header/ImportDropdown.jsx +3 -8
- package/src/Contacts/Header/index.jsx +2 -3
- package/src/ContactsListModal/AddContact/AddContactContent.jsx +2 -3
- package/src/ContactsListModal/ContactsListModal.jsx +3 -4
- package/src/ContactsListModal/MobileHeader.jsx +2 -3
- package/src/Dialogs/AuthentificationDialog/index.jsx +2 -2
- package/src/FilePicker/FilePickerBodyItem.jsx +1 -3
- package/src/FilePicker/FilePickerBreadcrumb.jsx +2 -3
- package/src/FilePicker/FilePickerHeader.jsx +1 -2
- package/src/ListItem/ExpandedAttributes/ExpandedAttribute.jsx +2 -3
- package/src/ListItem/ListItemBase/index.jsx +2 -3
- package/src/ListItem/ListItemContact/index.jsx +3 -4
- package/src/ListItem/ListItemFile/ItemIcon.jsx +2 -4
- package/src/ListItem/ListItemFile/index.jsx +2 -2
- package/src/Paywall/Paywall.jsx +2 -3
- package/src/Qualification/QualificationGrid/index.jsx +22 -20
- package/src/Qualification/QualificationIcon/index.jsx +67 -65
- package/src/Qualification/QualificationItem/index.jsx +8 -4
- package/src/Qualification/QualificationModal/helpers.js +2 -3
- package/src/SquareAppIcon/SquareAppIcon.spec.js +3 -4
- package/src/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap +36 -87
- package/src/SquareAppIcon/index.jsx +12 -10
- package/src/Storage/StorageButton.jsx +2 -3
- package/src/Storage/StorageProgress.jsx +2 -3
- package/test/__mocks__/twake-icons.js +23 -0
|
@@ -13,6 +13,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
13
13
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
|
|
16
|
+
var _twakeIcons = require("@linagora/twake-icons");
|
|
17
|
+
|
|
16
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
19
|
|
|
18
20
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
@@ -25,18 +27,6 @@ var _helpers = require("cozy-ui/transpiled/react/Avatar/helpers");
|
|
|
25
27
|
|
|
26
28
|
var _Badge = _interopRequireDefault(require("cozy-ui/transpiled/react/Badge"));
|
|
27
29
|
|
|
28
|
-
var _Icon = _interopRequireDefault(require("cozy-ui/transpiled/react/Icon"));
|
|
29
|
-
|
|
30
|
-
var _IconCheckAnimated = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/IconCheckAnimated"));
|
|
31
|
-
|
|
32
|
-
var _IconCrossAnimated = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/IconCrossAnimated"));
|
|
33
|
-
|
|
34
|
-
var _LinkOut = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/LinkOut"));
|
|
35
|
-
|
|
36
|
-
var _Plus = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/Plus"));
|
|
37
|
-
|
|
38
|
-
var _WarningCircle = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/WarningCircle"));
|
|
39
|
-
|
|
40
30
|
var _ListItemText = _interopRequireDefault(require("cozy-ui/transpiled/react/ListItemText"));
|
|
41
31
|
|
|
42
32
|
var _Spinner = _interopRequireDefault(require("cozy-ui/transpiled/react/Spinner"));
|
|
@@ -188,9 +178,9 @@ var SquareAppIcon = function SquareAppIcon(_ref2) {
|
|
|
188
178
|
color: 'var(--iconTextColor)',
|
|
189
179
|
boxShadow: 'var(--shadow3)'
|
|
190
180
|
}
|
|
191
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
181
|
+
}, /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
192
182
|
size: "10",
|
|
193
|
-
icon:
|
|
183
|
+
icon: _twakeIcons.LinkOut
|
|
194
184
|
})) : null,
|
|
195
185
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, 'u-mr-1', display === 'detailed')),
|
|
196
186
|
overlap: "rectangular",
|
|
@@ -204,10 +194,10 @@ var SquareAppIcon = function SquareAppIcon(_ref2) {
|
|
|
204
194
|
animationState: animationState
|
|
205
195
|
}), /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
206
196
|
className: (0, _classnames.default)(styles["SquareAppIcon-wrapper"], styles["SquareAppIcon-wrapper-".concat(variant)], styles["SquareAppIcon-wrapper--".concat(type)], (_cx3 = {}, (0, _defineProperty2.default)(_cx3, classes.squareAppIconGhost, exceptionVariant.includes(variant)), (0, _defineProperty2.default)(_cx3, classes.shadow, !exceptionVariant.includes(variant)), _cx3)),
|
|
207
|
-
badgeContent: variant === 'error' ? /*#__PURE__*/_react.default.createElement(
|
|
197
|
+
badgeContent: variant === 'error' ? /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
208
198
|
size: 16,
|
|
209
199
|
className: (0, _classnames.default)(classes.errorIcon),
|
|
210
|
-
icon:
|
|
200
|
+
icon: _twakeIcons.WarningCircle
|
|
211
201
|
}) : '',
|
|
212
202
|
color: variant === 'error' ? 'error' : undefined,
|
|
213
203
|
withBorder: false,
|
|
@@ -223,11 +213,11 @@ var SquareAppIcon = function SquareAppIcon(_ref2) {
|
|
|
223
213
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
224
214
|
className: (0, _classnames.default)(styles['onEnd'], (0, _defineProperty2.default)({}, styles['isSuccess'], animationState === 'success'), (0, _defineProperty2.default)({}, styles['isFailed'], animationState === 'failed')),
|
|
225
215
|
onAnimationEnd: handleAnimationEnd
|
|
226
|
-
}, animationState && /*#__PURE__*/_react.default.createElement(
|
|
216
|
+
}, animationState && /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
227
217
|
size: 32,
|
|
228
|
-
icon: animationState === 'success' ?
|
|
229
|
-
})), variant === 'add' ? /*#__PURE__*/_react.default.createElement(
|
|
230
|
-
icon:
|
|
218
|
+
icon: animationState === 'success' ? _twakeIcons.IconCheckAnimated : _twakeIcons.IconCrossAnimated
|
|
219
|
+
})), variant === 'add' ? /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
220
|
+
icon: _twakeIcons.Plus,
|
|
231
221
|
color: "var(--primaryColor)"
|
|
232
222
|
}) : IconContent ? IconContent : /*#__PURE__*/_react.default.createElement("div", {
|
|
233
223
|
className: "u-w-2 u-h-2"
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _twakeIcons = require("@linagora/twake-icons");
|
|
11
|
+
|
|
10
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
13
|
|
|
12
14
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -17,10 +19,6 @@ var _instance = require("cozy-client/dist/models/instance");
|
|
|
17
19
|
|
|
18
20
|
var _Buttons = _interopRequireDefault(require("cozy-ui/transpiled/react/Buttons"));
|
|
19
21
|
|
|
20
|
-
var _Icon = _interopRequireDefault(require("cozy-ui/transpiled/react/Icon"));
|
|
21
|
-
|
|
22
|
-
var _TwakeWorkplace = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/TwakeWorkplace"));
|
|
23
|
-
|
|
24
22
|
var _twakeI18n = require("twake-i18n");
|
|
25
23
|
|
|
26
24
|
var _locales = require("./locales");
|
|
@@ -37,8 +35,8 @@ var StorageButton = function StorageButton(_ref) {
|
|
|
37
35
|
className: (0, _classnames.default)('u-bdrs-4', className),
|
|
38
36
|
variant: "secondary",
|
|
39
37
|
label: t('Storage.increase'),
|
|
40
|
-
startIcon: /*#__PURE__*/_react.default.createElement(
|
|
41
|
-
icon:
|
|
38
|
+
startIcon: /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
39
|
+
icon: _twakeIcons.TwakeWorkplace,
|
|
42
40
|
size: 22
|
|
43
41
|
}),
|
|
44
42
|
size: "small",
|
|
@@ -7,16 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _twakeIcons = require("@linagora/twake-icons");
|
|
11
|
+
|
|
10
12
|
var _react = _interopRequireDefault(require("react"));
|
|
11
13
|
|
|
12
14
|
var _cozyClient = require("cozy-client");
|
|
13
15
|
|
|
14
16
|
var _instance = require("cozy-client/dist/models/instance");
|
|
15
17
|
|
|
16
|
-
var _Icon = _interopRequireDefault(require("cozy-ui/transpiled/react/Icon"));
|
|
17
|
-
|
|
18
|
-
var _Cloud = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/Cloud"));
|
|
19
|
-
|
|
20
18
|
var _LinearProgress = _interopRequireDefault(require("cozy-ui/transpiled/react/LinearProgress"));
|
|
21
19
|
|
|
22
20
|
var _Typography = _interopRequireDefault(require("cozy-ui/transpiled/react/Typography"));
|
|
@@ -46,9 +44,9 @@ var StorageProgress = function StorageProgress() {
|
|
|
46
44
|
|
|
47
45
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
46
|
className: "u-flex u-flex-items-center"
|
|
49
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
50
48
|
className: "u-mr-half",
|
|
51
|
-
icon:
|
|
49
|
+
icon: _twakeIcons.Cloud,
|
|
52
50
|
size: 24,
|
|
53
51
|
color: "var(--iconTextColor)"
|
|
54
52
|
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
@@ -16,8 +16,8 @@ export class AppIcon extends React.Component<any, any, any> {
|
|
|
16
16
|
}
|
|
17
17
|
export namespace AppIcon {
|
|
18
18
|
namespace propTypes {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
let alt: PropTypes.Requireable<string>;
|
|
20
|
+
let app: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
21
21
|
name: PropTypes.Requireable<string>;
|
|
22
22
|
slug: PropTypes.Requireable<string>;
|
|
23
23
|
developer: PropTypes.Requireable<object>;
|
|
@@ -28,13 +28,13 @@ export namespace AppIcon {
|
|
|
28
28
|
version: PropTypes.Requireable<string>;
|
|
29
29
|
}>>;
|
|
30
30
|
}>>>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
let fallbackIcon: PropTypes.Requireable<NonNullable<string | object>>;
|
|
32
|
+
let fetchIcon: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
+
let client: PropTypes.Validator<object>;
|
|
34
|
+
let className: PropTypes.Requireable<string>;
|
|
35
|
+
let onReady: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
|
+
let type: PropTypes.Requireable<string>;
|
|
37
|
+
let priority: PropTypes.Requireable<string>;
|
|
38
38
|
}
|
|
39
39
|
namespace defaultProps {
|
|
40
40
|
let type_1: string;
|
|
@@ -47,4 +47,3 @@ declare const _default: Function;
|
|
|
47
47
|
export default _default;
|
|
48
48
|
import React from 'react';
|
|
49
49
|
import PropTypes from 'prop-types';
|
|
50
|
-
import { iconPropType } from 'cozy-ui/transpiled/react/Icon';
|
|
@@ -10,7 +10,7 @@ declare namespace ContactAddressModal {
|
|
|
10
10
|
let name: PropTypes.Validator<string>;
|
|
11
11
|
let subFields: PropTypes.Validator<PropTypes.InferProps<{
|
|
12
12
|
name: PropTypes.Requireable<string>;
|
|
13
|
-
icon: PropTypes.Requireable<string | object
|
|
13
|
+
icon: PropTypes.Requireable<NonNullable<string | object>>;
|
|
14
14
|
type: PropTypes.Requireable<string>;
|
|
15
15
|
label: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
16
|
name: PropTypes.Requireable<string>;
|
|
@@ -51,7 +51,7 @@ export const labelPropTypes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
|
51
51
|
}>>;
|
|
52
52
|
export const fieldInputAttributesTypes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
53
53
|
name: PropTypes.Requireable<string>;
|
|
54
|
-
icon: PropTypes.Requireable<string | object
|
|
54
|
+
icon: PropTypes.Requireable<NonNullable<string | object>>;
|
|
55
55
|
type: PropTypes.Requireable<string>;
|
|
56
56
|
label: PropTypes.Requireable<PropTypes.InferProps<{
|
|
57
57
|
name: PropTypes.Requireable<string>;
|
package/jest.config.js
CHANGED
|
@@ -11,7 +11,8 @@ module.exports = {
|
|
|
11
11
|
'^cozy-client$': '<rootDir>/node_modules/cozy-client/dist/index',
|
|
12
12
|
'^cozy-client/dist/types$':
|
|
13
13
|
'<rootDir>/node_modules/cozy-client/dist/types.js',
|
|
14
|
-
'^cozy-ui(.*)': '<rootDir>/node_modules/cozy-ui/$1'
|
|
14
|
+
'^cozy-ui(.*)': '<rootDir>/node_modules/cozy-ui/$1',
|
|
15
|
+
'^@linagora/twake-icons$': '<rootDir>/test/__mocks__/twake-icons.js'
|
|
15
16
|
},
|
|
16
17
|
transformIgnorePatterns: ['node_modules/(?!(cozy-ui))'],
|
|
17
18
|
testPathIgnorePatterns: ['node_modules', 'dist'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui-plus",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Cozy-ui-plus is an extension of cozy-ui and provides components based on cozy-client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/cli": "7.16.8",
|
|
26
26
|
"@babel/core": "7.16.12",
|
|
27
|
+
"@linagora/twake-icons": "^2.6.2",
|
|
27
28
|
"@testing-library/jest-dom": "5.17.0",
|
|
28
29
|
"@testing-library/react": "12.1.5",
|
|
29
30
|
"@testing-library/react-hooks": "8.0.1",
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"rooks": "7.14.1"
|
|
65
66
|
},
|
|
66
67
|
"peerDependencies": {
|
|
68
|
+
"@linagora/twake-icons": ">=2.6.2",
|
|
67
69
|
"cozy-client": ">=60.21.3",
|
|
68
70
|
"cozy-device-helper": ">=2.0.0",
|
|
69
71
|
"cozy-intent": ">=2.30.0",
|
|
@@ -74,5 +76,5 @@
|
|
|
74
76
|
"react-dom": "^16 || ^17 || ^18",
|
|
75
77
|
"twake-i18n": ">=0.3.0"
|
|
76
78
|
},
|
|
77
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "1526f0d72beb8a728568c4bccdf7e658b5c9e389"
|
|
78
80
|
}
|
package/src/AppIcon/index.jsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { Icon, Cube } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import PropTypes from 'prop-types'
|
|
3
4
|
import React, { Component } from 'react'
|
|
4
5
|
|
|
5
6
|
import { withClient } from 'cozy-client'
|
|
6
|
-
import Icon, { iconPropType } from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import CubeIcon from 'cozy-ui/transpiled/react/Icons/Cube'
|
|
8
7
|
|
|
9
8
|
import styles from './styles.styl'
|
|
10
9
|
import { isShortcutFile } from '../AppSections/helpers'
|
|
@@ -133,7 +132,7 @@ export class AppIcon extends Component {
|
|
|
133
132
|
className
|
|
134
133
|
)}
|
|
135
134
|
height="100%"
|
|
136
|
-
icon={fallbackIcon ||
|
|
135
|
+
icon={fallbackIcon || Cube}
|
|
137
136
|
width="100%"
|
|
138
137
|
color="var(--coolGrey)"
|
|
139
138
|
iconRef={this.props.iconRef}
|
|
@@ -148,7 +147,11 @@ AppIcon.propTypes = {
|
|
|
148
147
|
/** Required if fetchIcon is not provided */
|
|
149
148
|
app: PropTypes.oneOfType([AppDoctype, PropTypes.string]),
|
|
150
149
|
/** Icon to fallback on error (optional), default cube icon */
|
|
151
|
-
fallbackIcon:
|
|
150
|
+
fallbackIcon: PropTypes.oneOfType([
|
|
151
|
+
PropTypes.string,
|
|
152
|
+
PropTypes.object,
|
|
153
|
+
PropTypes.func
|
|
154
|
+
]),
|
|
152
155
|
/** Custom implementation of how to fetch icon */
|
|
153
156
|
fetchIcon: PropTypes.func,
|
|
154
157
|
client: PropTypes.object.isRequired,
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict'
|
|
4
4
|
|
|
5
|
+
import { Icon } from '@linagora/twake-icons'
|
|
5
6
|
import { render, screen } from '@testing-library/react'
|
|
6
7
|
import React from 'react'
|
|
7
8
|
|
|
8
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
9
|
-
|
|
10
9
|
import { AppIcon } from '.'
|
|
11
10
|
|
|
12
|
-
jest.mock('
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
jest.mock('@linagora/twake-icons', () => {
|
|
12
|
+
const React = require('react')
|
|
13
|
+
return {
|
|
14
|
+
__esModule: true,
|
|
15
|
+
Icon: jest.fn(() => <div data-testid="icon-component" />),
|
|
16
|
+
Cube: () => null
|
|
17
|
+
}
|
|
18
|
+
})
|
|
17
19
|
|
|
18
20
|
describe('AppIcon component', () => {
|
|
19
21
|
const app = {}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { Icon, Bottom } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import PropTypes from 'prop-types'
|
|
3
4
|
import React, { Component } from 'react'
|
|
4
5
|
|
|
5
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
-
import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom'
|
|
7
6
|
import SelectBox from 'cozy-ui/transpiled/react/SelectBox'
|
|
8
7
|
|
|
9
8
|
import styles from './DropdownFilter.styl'
|
|
@@ -11,7 +10,7 @@ import styles from './DropdownFilter.styl'
|
|
|
11
10
|
const SmallArrow = () => (
|
|
12
11
|
<Icon
|
|
13
12
|
className={cx(styles.DropdownFilter__icon, 'u-mr-1')}
|
|
14
|
-
icon={
|
|
13
|
+
icon={Bottom}
|
|
15
14
|
color="var(--coolGrey)"
|
|
16
15
|
width={16}
|
|
17
16
|
height={16}
|
package/src/AppTile/index.jsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { Icon, WrenchCircle } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import PropTypes from 'prop-types'
|
|
3
4
|
import React from 'react'
|
|
4
5
|
|
|
5
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
-
import WrenchCircleIcon from 'cozy-ui/transpiled/react/Icons/WrenchCircle'
|
|
7
6
|
import Tile, {
|
|
8
7
|
TileTitle,
|
|
9
8
|
TileSubtitle,
|
|
@@ -96,7 +95,7 @@ export const AppTile = ({
|
|
|
96
95
|
{isInMaintenanceWithSpecificDisplay && (
|
|
97
96
|
<Icon
|
|
98
97
|
data-testid="icon-maintenance"
|
|
99
|
-
icon={
|
|
98
|
+
icon={WrenchCircle}
|
|
100
99
|
color="var(--coolGrey)"
|
|
101
100
|
className={styles['AppTile-icon-maintenance']}
|
|
102
101
|
/>
|
package/src/CipherIcon/index.jsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { Icon, Keychain } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import PropTypes from 'prop-types'
|
|
3
4
|
import React from 'react'
|
|
4
5
|
|
|
5
6
|
import { withClient } from 'cozy-client'
|
|
6
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import KeychainIcon from 'cozy-ui/transpiled/react/Icons/Keychain'
|
|
8
7
|
|
|
9
8
|
import AppIcon from '../AppIcon'
|
|
10
9
|
import { AppDoctype } from '../proptypes'
|
|
@@ -30,7 +29,7 @@ class CipherIcon extends React.PureComponent {
|
|
|
30
29
|
|
|
31
30
|
return (
|
|
32
31
|
<div className={cx('u-dib u-pos-relative', className)} {...rest}>
|
|
33
|
-
<Icon icon={
|
|
32
|
+
<Icon icon={Keychain} size={32} />
|
|
34
33
|
<div className="u-pos-absolute u-right-0 u-bottom-0">
|
|
35
34
|
<AppIcon fetchIcon={this.fetchIcon} className="u-w-1 u-h-1" />
|
|
36
35
|
</div>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import { Icon, CrossSmall, Plus } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React, { useRef } from 'react'
|
|
3
4
|
|
|
4
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
|
-
import CrossSmallIcon from 'cozy-ui/transpiled/react/Icons/CrossSmall'
|
|
6
|
-
import PlusIcon from 'cozy-ui/transpiled/react/Icons/Plus'
|
|
7
5
|
import InputLabel from 'cozy-ui/transpiled/react/InputLabel'
|
|
8
6
|
import Stack from 'cozy-ui/transpiled/react/Stack'
|
|
9
7
|
import Button from 'cozy-ui/transpiled/react/deprecated/Button'
|
|
@@ -89,9 +87,7 @@ const CollectionField = props => {
|
|
|
89
87
|
label={removeButtonLabel}
|
|
90
88
|
iconOnly
|
|
91
89
|
round
|
|
92
|
-
icon={
|
|
93
|
-
<Icon icon={CrossSmallIcon} color="var(--slateGrey)" />
|
|
94
|
-
}
|
|
90
|
+
icon={<Icon icon={CrossSmall} color="var(--slateGrey)" />}
|
|
95
91
|
onClick={() => handleRemove(index)}
|
|
96
92
|
/>
|
|
97
93
|
</div>
|
|
@@ -106,7 +102,7 @@ const CollectionField = props => {
|
|
|
106
102
|
theme="text"
|
|
107
103
|
icon={
|
|
108
104
|
<Icon
|
|
109
|
-
icon={
|
|
105
|
+
icon={Plus}
|
|
110
106
|
className={styles.CollectionField__addBtnIcon}
|
|
111
107
|
/>
|
|
112
108
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import { Icon, Dropdown, Dropup } from '@linagora/twake-icons'
|
|
1
2
|
import React, { useState } from 'react'
|
|
2
3
|
|
|
3
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
4
4
|
import IconButton from 'cozy-ui/transpiled/react/IconButton'
|
|
5
|
-
import DropdownIcon from 'cozy-ui/transpiled/react/Icons/Dropdown'
|
|
6
|
-
import DropupIcon from 'cozy-ui/transpiled/react/Icons/Dropup'
|
|
7
5
|
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
8
6
|
|
|
9
7
|
import FieldInput from './FieldInput'
|
|
@@ -38,7 +36,7 @@ const FieldInputAccordion = ({
|
|
|
38
36
|
size="medium"
|
|
39
37
|
onClick={() => setShowExtended(v => !v)}
|
|
40
38
|
>
|
|
41
|
-
<Icon icon={showExtended ?
|
|
39
|
+
<Icon icon={showExtended ? Dropup : Dropdown} />
|
|
42
40
|
</IconButton>
|
|
43
41
|
</div>
|
|
44
42
|
{subFields.map(({ name, ...attributes }, index) => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { Icon, Plus } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { FieldArray } from 'react-final-form-arrays'
|
|
4
5
|
|
|
5
6
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
6
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import PlusIcon from 'cozy-ui/transpiled/react/Icons/Plus'
|
|
8
7
|
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
9
8
|
|
|
10
9
|
import FieldInput from './FieldInput'
|
|
@@ -63,7 +62,7 @@ const FieldInputArray = ({
|
|
|
63
62
|
})}
|
|
64
63
|
<Button
|
|
65
64
|
variant="text"
|
|
66
|
-
startIcon={<Icon icon={
|
|
65
|
+
startIcon={<Icon icon={Plus} />}
|
|
67
66
|
onClick={() => addField(fields)}
|
|
68
67
|
label={t(`Contacts.AddModal.ContactForm.addLabel.${name}`)}
|
|
69
68
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Icon } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import PropTypes from 'prop-types'
|
|
3
4
|
import React from 'react'
|
|
4
5
|
|
|
5
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
6
|
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
7
7
|
|
|
8
8
|
import FieldInput from './FieldInput'
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { Icon, CrossCircle } from '@linagora/twake-icons'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
|
|
3
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
4
4
|
import IconButton from 'cozy-ui/transpiled/react/IconButton'
|
|
5
|
-
import CrossCircleIcon from 'cozy-ui/transpiled/react/Icons/CrossCircle'
|
|
6
5
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
7
6
|
|
|
8
7
|
const RemoveButton = ({ onRemove }) => {
|
|
9
8
|
return (
|
|
10
9
|
<ListItemIcon className="u-ml-half">
|
|
11
10
|
<IconButton aria-label="delete" size="medium" onClick={onRemove}>
|
|
12
|
-
<Icon icon={
|
|
11
|
+
<Icon icon={CrossCircle} />
|
|
13
12
|
</IconButton>
|
|
14
13
|
</ListItemIcon>
|
|
15
14
|
)
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Icon,
|
|
3
|
+
Bottom,
|
|
4
|
+
Calendar,
|
|
5
|
+
Cloud,
|
|
6
|
+
Comment,
|
|
7
|
+
Company,
|
|
8
|
+
Email,
|
|
9
|
+
Location,
|
|
10
|
+
Matrix,
|
|
11
|
+
People,
|
|
12
|
+
Relationship,
|
|
13
|
+
Telephone
|
|
14
|
+
} from '@linagora/twake-icons'
|
|
1
15
|
import React from 'react'
|
|
2
16
|
|
|
3
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
4
|
-
import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom'
|
|
5
|
-
import CalendarIcon from 'cozy-ui/transpiled/react/Icons/Calendar'
|
|
6
|
-
import CloudIcon from 'cozy-ui/transpiled/react/Icons/Cloud'
|
|
7
|
-
import CommentIcon from 'cozy-ui/transpiled/react/Icons/Comment'
|
|
8
|
-
import CompanyIcon from 'cozy-ui/transpiled/react/Icons/Company'
|
|
9
|
-
import EmailIcon from 'cozy-ui/transpiled/react/Icons/Email'
|
|
10
|
-
import LocationIcon from 'cozy-ui/transpiled/react/Icons/Location'
|
|
11
|
-
import MatrixIcon from 'cozy-ui/transpiled/react/Icons/Matrix'
|
|
12
|
-
import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People'
|
|
13
|
-
import RelationshipIcon from 'cozy-ui/transpiled/react/Icons/Relationship'
|
|
14
|
-
import TelephoneIcon from 'cozy-ui/transpiled/react/Icons/Telephone'
|
|
15
17
|
import InputAdornment from 'cozy-ui/transpiled/react/InputAdornment'
|
|
16
18
|
|
|
17
19
|
import TextFieldPhone from './TextFieldPhone/index'
|
|
@@ -22,7 +24,7 @@ import TextFieldPhone from './TextFieldPhone/index'
|
|
|
22
24
|
export const fields = [
|
|
23
25
|
{
|
|
24
26
|
name: 'gender',
|
|
25
|
-
icon:
|
|
27
|
+
icon: People,
|
|
26
28
|
select: true,
|
|
27
29
|
options: [
|
|
28
30
|
{
|
|
@@ -62,7 +64,7 @@ export const fields = [
|
|
|
62
64
|
},
|
|
63
65
|
{
|
|
64
66
|
name: 'company',
|
|
65
|
-
icon:
|
|
67
|
+
icon: Company,
|
|
66
68
|
type: 'text',
|
|
67
69
|
layout: 'accordion',
|
|
68
70
|
subFields: [
|
|
@@ -75,7 +77,7 @@ export const fields = [
|
|
|
75
77
|
},
|
|
76
78
|
{
|
|
77
79
|
name: 'phone',
|
|
78
|
-
icon:
|
|
80
|
+
icon: Telephone,
|
|
79
81
|
type: 'tel',
|
|
80
82
|
layout: 'array',
|
|
81
83
|
component: TextFieldPhone,
|
|
@@ -119,7 +121,7 @@ export const fields = [
|
|
|
119
121
|
},
|
|
120
122
|
{
|
|
121
123
|
name: 'email',
|
|
122
|
-
icon:
|
|
124
|
+
icon: Email,
|
|
123
125
|
type: 'email',
|
|
124
126
|
layout: 'array',
|
|
125
127
|
label: {
|
|
@@ -146,12 +148,12 @@ export const fields = [
|
|
|
146
148
|
},
|
|
147
149
|
{
|
|
148
150
|
name: 'matrix',
|
|
149
|
-
icon:
|
|
151
|
+
icon: Matrix,
|
|
150
152
|
type: 'text'
|
|
151
153
|
},
|
|
152
154
|
{
|
|
153
155
|
name: 'address',
|
|
154
|
-
icon:
|
|
156
|
+
icon: Location,
|
|
155
157
|
type: 'text',
|
|
156
158
|
layout: 'array',
|
|
157
159
|
InputProps: {
|
|
@@ -243,13 +245,13 @@ export const fields = [
|
|
|
243
245
|
},
|
|
244
246
|
{
|
|
245
247
|
name: 'note',
|
|
246
|
-
icon:
|
|
248
|
+
icon: Comment,
|
|
247
249
|
type: 'text',
|
|
248
250
|
multiline: true
|
|
249
251
|
},
|
|
250
252
|
{
|
|
251
253
|
name: 'cozy',
|
|
252
|
-
icon:
|
|
254
|
+
icon: Cloud,
|
|
253
255
|
type: 'url',
|
|
254
256
|
isSecondary: true,
|
|
255
257
|
label: {
|
|
@@ -276,7 +278,7 @@ export const fields = [
|
|
|
276
278
|
},
|
|
277
279
|
{
|
|
278
280
|
name: 'birthday',
|
|
279
|
-
icon:
|
|
281
|
+
icon: Calendar,
|
|
280
282
|
type: 'date',
|
|
281
283
|
isSecondary: true,
|
|
282
284
|
InputLabelProps: { shrink: true }
|
|
@@ -289,14 +291,14 @@ export const fields = [
|
|
|
289
291
|
},
|
|
290
292
|
{
|
|
291
293
|
name: 'relatedContact',
|
|
292
|
-
icon:
|
|
294
|
+
icon: Relationship,
|
|
293
295
|
layout: 'array',
|
|
294
296
|
isSecondary: true,
|
|
295
297
|
InputProps: {
|
|
296
298
|
readOnly: true,
|
|
297
299
|
endAdornment: (
|
|
298
300
|
<InputAdornment position="end">
|
|
299
|
-
<Icon icon={
|
|
301
|
+
<Icon icon={Bottom} color="var(--iconTextColor)" />
|
|
300
302
|
</InputAdornment>
|
|
301
303
|
)
|
|
302
304
|
},
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
|
|
3
|
-
import { iconPropType } from 'cozy-ui/transpiled/react/Icon'
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
* @typedef {'text'|'tel'|'email'|'button'|'url'|'date'} FieldType
|
|
7
5
|
*/
|
|
@@ -64,7 +62,11 @@ export const labelPropTypes = PropTypes.shape({
|
|
|
64
62
|
|
|
65
63
|
export const fieldInputAttributesTypes = PropTypes.shape({
|
|
66
64
|
name: PropTypes.string,
|
|
67
|
-
icon:
|
|
65
|
+
icon: PropTypes.oneOfType([
|
|
66
|
+
PropTypes.string,
|
|
67
|
+
PropTypes.object,
|
|
68
|
+
PropTypes.func
|
|
69
|
+
]),
|
|
68
70
|
type: PropTypes.string,
|
|
69
71
|
label: labelPropTypes,
|
|
70
72
|
layout: PropTypes.string,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { Icon, Plus } from '@linagora/twake-icons'
|
|
1
2
|
import classNames from 'classnames'
|
|
2
3
|
import React, { Component } from 'react'
|
|
3
4
|
|
|
4
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
|
-
import PlusIcon from 'cozy-ui/transpiled/react/Icons/Plus'
|
|
6
5
|
import Input from 'cozy-ui/transpiled/react/legacy/Input'
|
|
7
6
|
import { translate } from 'twake-i18n'
|
|
8
7
|
|
|
@@ -66,7 +65,7 @@ class GroupCreation extends Component {
|
|
|
66
65
|
onClick={this.handleClick}
|
|
67
66
|
className={styles['contact-group-create-div-icon']}
|
|
68
67
|
>
|
|
69
|
-
<Icon icon={
|
|
68
|
+
<Icon icon={Plus} />
|
|
70
69
|
<span className="u-pl-half">
|
|
71
70
|
{t('Contacts.GroupsSelect.create')}
|
|
72
71
|
</span>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { Icon, BottomSelect } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
5
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
5
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
-
import BottomSelectIcon from 'cozy-ui/transpiled/react/Icons/BottomSelect'
|
|
7
6
|
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
8
7
|
|
|
9
8
|
import { locales } from '../locales'
|
|
@@ -24,7 +23,7 @@ const Control = ({
|
|
|
24
23
|
onClick={onControlClicked}
|
|
25
24
|
onTouchStart={onControlClicked}
|
|
26
25
|
label={t('Contacts.GroupsSelect.manage')}
|
|
27
|
-
startIcon={<Icon icon={
|
|
26
|
+
startIcon={<Icon icon={BottomSelect} width="12" />}
|
|
28
27
|
/>
|
|
29
28
|
</div>
|
|
30
29
|
)
|