cozy-ui-plus 8.0.0 → 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 +16 -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/providers/CozyTheme/CozyThemeWithQuery.js +3 -1
- 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/src/providers/CozyTheme/CozyThemeWithQuery.jsx +3 -1
- package/test/__mocks__/twake-icons.js +23 -0
|
@@ -1,74 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Icon,
|
|
3
|
+
Bank,
|
|
4
|
+
BankCheck,
|
|
5
|
+
Benefit,
|
|
6
|
+
Bill,
|
|
7
|
+
Car,
|
|
8
|
+
Chess,
|
|
9
|
+
Child,
|
|
10
|
+
Dots,
|
|
11
|
+
Email,
|
|
12
|
+
Euro,
|
|
13
|
+
Exchange,
|
|
14
|
+
Fitness,
|
|
15
|
+
Globe,
|
|
16
|
+
Gouv,
|
|
17
|
+
Heart,
|
|
18
|
+
Home,
|
|
19
|
+
Image,
|
|
20
|
+
Justice,
|
|
21
|
+
Laudry,
|
|
22
|
+
Lightning,
|
|
23
|
+
Note,
|
|
24
|
+
People,
|
|
25
|
+
Plane,
|
|
26
|
+
Remboursement,
|
|
27
|
+
Restaurant,
|
|
28
|
+
School,
|
|
29
|
+
Shop,
|
|
30
|
+
Team,
|
|
31
|
+
Telecom,
|
|
32
|
+
Telephone,
|
|
33
|
+
Water,
|
|
34
|
+
Work
|
|
35
|
+
} from '@linagora/twake-icons'
|
|
1
36
|
import PropTypes from 'prop-types'
|
|
2
37
|
import React from 'react'
|
|
3
38
|
|
|
4
39
|
import { getIconByLabel } from 'cozy-client/dist/models/document/qualification'
|
|
5
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
-
import BankIcon from 'cozy-ui/transpiled/react/Icons/Bank'
|
|
7
|
-
import BankCheckIcon from 'cozy-ui/transpiled/react/Icons/BankCheck'
|
|
8
|
-
import BenefitIcon from 'cozy-ui/transpiled/react/Icons/Benefit'
|
|
9
|
-
import BillIcon from 'cozy-ui/transpiled/react/Icons/Bill'
|
|
10
|
-
import CarIcon from 'cozy-ui/transpiled/react/Icons/Car'
|
|
11
|
-
import ChessIcon from 'cozy-ui/transpiled/react/Icons/Chess'
|
|
12
|
-
import ChildIcon from 'cozy-ui/transpiled/react/Icons/Child'
|
|
13
|
-
import DotsIcon from 'cozy-ui/transpiled/react/Icons/Dots'
|
|
14
|
-
import EmailIcon from 'cozy-ui/transpiled/react/Icons/Email'
|
|
15
|
-
import EuroIcon from 'cozy-ui/transpiled/react/Icons/Euro'
|
|
16
|
-
import ExchangeIcon from 'cozy-ui/transpiled/react/Icons/Exchange'
|
|
17
|
-
import FitnessIcon from 'cozy-ui/transpiled/react/Icons/Fitness'
|
|
18
|
-
import GlobeIcon from 'cozy-ui/transpiled/react/Icons/Globe'
|
|
19
|
-
import GouvIcon from 'cozy-ui/transpiled/react/Icons/Gouv'
|
|
20
|
-
import HeartIcon from 'cozy-ui/transpiled/react/Icons/Heart'
|
|
21
|
-
import HomeIcon from 'cozy-ui/transpiled/react/Icons/Home'
|
|
22
|
-
import ImageIcon from 'cozy-ui/transpiled/react/Icons/Image'
|
|
23
|
-
import JusticeIcon from 'cozy-ui/transpiled/react/Icons/Justice'
|
|
24
|
-
import LaudryIcon from 'cozy-ui/transpiled/react/Icons/Laudry'
|
|
25
|
-
import LightningIcon from 'cozy-ui/transpiled/react/Icons/Lightning'
|
|
26
|
-
import NoteIcon from 'cozy-ui/transpiled/react/Icons/Note'
|
|
27
|
-
import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People'
|
|
28
|
-
import PlaneIcon from 'cozy-ui/transpiled/react/Icons/Plane'
|
|
29
|
-
import RemboursementIcon from 'cozy-ui/transpiled/react/Icons/Remboursement'
|
|
30
|
-
import RestaurantIcon from 'cozy-ui/transpiled/react/Icons/Restaurant'
|
|
31
|
-
import SchoolIcon from 'cozy-ui/transpiled/react/Icons/School'
|
|
32
|
-
import ShopIcon from 'cozy-ui/transpiled/react/Icons/Shop'
|
|
33
|
-
import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team'
|
|
34
|
-
import TelecomIcon from 'cozy-ui/transpiled/react/Icons/Telecom'
|
|
35
|
-
import TelephoneIcon from 'cozy-ui/transpiled/react/Icons/Telephone'
|
|
36
|
-
import WaterIcon from 'cozy-ui/transpiled/react/Icons/Water'
|
|
37
|
-
import WorkIcon from 'cozy-ui/transpiled/react/Icons/Work'
|
|
38
40
|
|
|
39
41
|
const IconByLabel = {
|
|
40
|
-
'bank-check':
|
|
41
|
-
bank:
|
|
42
|
-
benefit:
|
|
43
|
-
bill:
|
|
44
|
-
car:
|
|
45
|
-
chess:
|
|
46
|
-
child:
|
|
47
|
-
dots:
|
|
48
|
-
email:
|
|
49
|
-
euro:
|
|
50
|
-
exchange:
|
|
51
|
-
'file-type-note':
|
|
52
|
-
fitness:
|
|
53
|
-
globe:
|
|
54
|
-
gouv:
|
|
55
|
-
heart:
|
|
56
|
-
home:
|
|
57
|
-
image:
|
|
58
|
-
justice:
|
|
59
|
-
laudry:
|
|
60
|
-
lightning:
|
|
61
|
-
people:
|
|
62
|
-
plane:
|
|
63
|
-
remboursement:
|
|
64
|
-
restaurant:
|
|
65
|
-
school:
|
|
66
|
-
shop:
|
|
67
|
-
team:
|
|
68
|
-
telecom:
|
|
69
|
-
telephone:
|
|
70
|
-
water:
|
|
71
|
-
work:
|
|
42
|
+
'bank-check': BankCheck,
|
|
43
|
+
bank: Bank,
|
|
44
|
+
benefit: Benefit,
|
|
45
|
+
bill: Bill,
|
|
46
|
+
car: Car,
|
|
47
|
+
chess: Chess,
|
|
48
|
+
child: Child,
|
|
49
|
+
dots: Dots,
|
|
50
|
+
email: Email,
|
|
51
|
+
euro: Euro,
|
|
52
|
+
exchange: Exchange,
|
|
53
|
+
'file-type-note': Note,
|
|
54
|
+
fitness: Fitness,
|
|
55
|
+
globe: Globe,
|
|
56
|
+
gouv: Gouv,
|
|
57
|
+
heart: Heart,
|
|
58
|
+
home: Home,
|
|
59
|
+
image: Image,
|
|
60
|
+
justice: Justice,
|
|
61
|
+
laudry: Laudry,
|
|
62
|
+
lightning: Lightning,
|
|
63
|
+
people: People,
|
|
64
|
+
plane: Plane,
|
|
65
|
+
remboursement: Remboursement,
|
|
66
|
+
restaurant: Restaurant,
|
|
67
|
+
school: School,
|
|
68
|
+
shop: Shop,
|
|
69
|
+
team: Team,
|
|
70
|
+
telecom: Telecom,
|
|
71
|
+
telephone: Telephone,
|
|
72
|
+
water: Water,
|
|
73
|
+
work: Work
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
const themeIconByLabel = {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { Icon, FileDuotone } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
5
|
import ButtonBase from 'cozy-ui/transpiled/react/ButtonBase'
|
|
5
|
-
import Icon, { iconPropType } from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
-
import FileDuotoneIcon from 'cozy-ui/transpiled/react/Icons/FileDuotone'
|
|
7
6
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
8
7
|
import { makeStyles } from 'cozy-ui/transpiled/react/styles'
|
|
9
8
|
|
|
@@ -36,7 +35,7 @@ const QualificationItem = ({ icon, label, isSelected, onClick, ...props }) => {
|
|
|
36
35
|
/>
|
|
37
36
|
) : (
|
|
38
37
|
<Icon
|
|
39
|
-
icon={
|
|
38
|
+
icon={FileDuotone}
|
|
40
39
|
size="32"
|
|
41
40
|
color={
|
|
42
41
|
isSelected ? 'var(--primaryColor)' : 'var(--secondaryTextColor)'
|
|
@@ -50,7 +49,12 @@ const QualificationItem = ({ icon, label, isSelected, onClick, ...props }) => {
|
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
QualificationItem.propTypes = {
|
|
53
|
-
icon: PropTypes.oneOfType([
|
|
52
|
+
icon: PropTypes.oneOfType([
|
|
53
|
+
PropTypes.string,
|
|
54
|
+
PropTypes.node,
|
|
55
|
+
PropTypes.object,
|
|
56
|
+
PropTypes.func
|
|
57
|
+
]),
|
|
54
58
|
label: PropTypes.string,
|
|
55
59
|
isSelected: PropTypes.bool,
|
|
56
60
|
onClick: PropTypes.func
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { Icon, Note } from '@linagora/twake-icons'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
|
|
3
4
|
import { themesList } from 'cozy-client/dist/models/document/documentTypeData'
|
|
4
5
|
import { isQualificationNote } from 'cozy-client/dist/models/document/documentTypeDataHelpers'
|
|
5
6
|
import { getBoundT } from 'cozy-client/dist/models/document/locales'
|
|
6
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import NoteIcon from 'cozy-ui/transpiled/react/Icons/Note'
|
|
8
7
|
|
|
9
8
|
import QualificationIcon from '../QualificationIcon'
|
|
10
9
|
|
|
@@ -27,7 +26,7 @@ export const makeOptions = lang => {
|
|
|
27
26
|
item,
|
|
28
27
|
title: qualifT(`Scan.items.${item.label}`),
|
|
29
28
|
icon: isQualificationNote(item) ? (
|
|
30
|
-
<Icon icon={
|
|
29
|
+
<Icon icon={Note} color="#E049BF" size={16} />
|
|
31
30
|
) : (
|
|
32
31
|
<QualificationIcon qualification={item.label} />
|
|
33
32
|
)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { Icon, Cozy } from '@linagora/twake-icons'
|
|
1
2
|
import { render } from '@testing-library/react'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
|
-
import CozyIcon from 'cozy-ui/transpiled/react/Icons/Cozy'
|
|
6
5
|
import DemoProvider from 'cozy-ui/transpiled/react/providers/DemoProvider'
|
|
7
6
|
|
|
8
7
|
import SquareAppIcon from '.'
|
|
@@ -69,7 +68,7 @@ describe('SquareAppIcon component', () => {
|
|
|
69
68
|
<Wrapper
|
|
70
69
|
variant="shortcut"
|
|
71
70
|
name="shortcut"
|
|
72
|
-
IconContent={<Icon data-testid="icon-content" icon={
|
|
71
|
+
IconContent={<Icon data-testid="icon-content" icon={Cozy} />}
|
|
73
72
|
/>
|
|
74
73
|
)
|
|
75
74
|
expect(queryByTestId('icon-content')).toBeTruthy()
|
|
@@ -77,7 +76,7 @@ describe('SquareAppIcon component', () => {
|
|
|
77
76
|
|
|
78
77
|
it('should render correctly an app with custom content', () => {
|
|
79
78
|
const root = render(
|
|
80
|
-
<Wrapper name="custom icon" IconContent={<Icon icon={
|
|
79
|
+
<Wrapper name="custom icon" IconContent={<Icon icon={Cozy} />} />
|
|
81
80
|
)
|
|
82
81
|
expect(root.getByTestId('square-app-icon')).toMatchSnapshot()
|
|
83
82
|
})
|
|
@@ -21,16 +21,12 @@ exports[`SquareAppIcon component should render an app correctly with the app nam
|
|
|
21
21
|
class="u-w-2 u-h-2"
|
|
22
22
|
>
|
|
23
23
|
<svg
|
|
24
|
-
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5
|
|
24
|
+
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5"
|
|
25
|
+
color="var(--coolGrey)"
|
|
26
|
+
data-icon="true"
|
|
25
27
|
height="100%"
|
|
26
|
-
style="fill: var(--coolGrey);"
|
|
27
|
-
viewBox="0 0 15 16"
|
|
28
28
|
width="100%"
|
|
29
|
-
|
|
30
|
-
<path
|
|
31
|
-
d="M14.4 4L7.2 0 0 4v8l7.2 4 7.2-4V4zM7.2 1.832l4.728 2.624L9.52 5.792a3.213 3.213 0 00-4.64 0L2.472 4.456 7.2 1.832zm-.8 11.896l-4.8-2.664V5.808L4.104 7.2A3.193 3.193 0 006.4 11.096v2.632zM5.6 8c0-.88.72-1.6 1.6-1.6.88 0 1.6.72 1.6 1.6 0 .88-.72 1.6-1.6 1.6-.88 0-1.6-.72-1.6-1.6zM8 13.728v-2.624a3.193 3.193 0 002.4-3.096c0-.28-.032-.552-.104-.808L12.8 5.808v5.256L8 13.728z"
|
|
32
|
-
/>
|
|
33
|
-
</svg>
|
|
29
|
+
/>
|
|
34
30
|
</div>
|
|
35
31
|
</div>
|
|
36
32
|
<span
|
|
@@ -70,16 +66,12 @@ exports[`SquareAppIcon component should render an app correctly with the given n
|
|
|
70
66
|
class="u-w-2 u-h-2"
|
|
71
67
|
>
|
|
72
68
|
<svg
|
|
73
|
-
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5
|
|
69
|
+
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5"
|
|
70
|
+
color="var(--coolGrey)"
|
|
71
|
+
data-icon="true"
|
|
74
72
|
height="100%"
|
|
75
|
-
style="fill: var(--coolGrey);"
|
|
76
|
-
viewBox="0 0 15 16"
|
|
77
73
|
width="100%"
|
|
78
|
-
|
|
79
|
-
<path
|
|
80
|
-
d="M14.4 4L7.2 0 0 4v8l7.2 4 7.2-4V4zM7.2 1.832l4.728 2.624L9.52 5.792a3.213 3.213 0 00-4.64 0L2.472 4.456 7.2 1.832zm-.8 11.896l-4.8-2.664V5.808L4.104 7.2A3.193 3.193 0 006.4 11.096v2.632zM5.6 8c0-.88.72-1.6 1.6-1.6.88 0 1.6.72 1.6 1.6 0 .88-.72 1.6-1.6 1.6-.88 0-1.6-.72-1.6-1.6zM8 13.728v-2.624a3.193 3.193 0 002.4-3.096c0-.28-.032-.552-.104-.808L12.8 5.808v5.256L8 13.728z"
|
|
81
|
-
/>
|
|
82
|
-
</svg>
|
|
74
|
+
/>
|
|
83
75
|
</div>
|
|
84
76
|
</div>
|
|
85
77
|
<span
|
|
@@ -119,16 +111,12 @@ exports[`SquareAppIcon component should render an app with the app slug if no na
|
|
|
119
111
|
class="u-w-2 u-h-2"
|
|
120
112
|
>
|
|
121
113
|
<svg
|
|
122
|
-
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5
|
|
114
|
+
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5"
|
|
115
|
+
color="var(--coolGrey)"
|
|
116
|
+
data-icon="true"
|
|
123
117
|
height="100%"
|
|
124
|
-
style="fill: var(--coolGrey);"
|
|
125
|
-
viewBox="0 0 15 16"
|
|
126
118
|
width="100%"
|
|
127
|
-
|
|
128
|
-
<path
|
|
129
|
-
d="M14.4 4L7.2 0 0 4v8l7.2 4 7.2-4V4zM7.2 1.832l4.728 2.624L9.52 5.792a3.213 3.213 0 00-4.64 0L2.472 4.456 7.2 1.832zm-.8 11.896l-4.8-2.664V5.808L4.104 7.2A3.193 3.193 0 006.4 11.096v2.632zM5.6 8c0-.88.72-1.6 1.6-1.6.88 0 1.6.72 1.6 1.6 0 .88-.72 1.6-1.6 1.6-.88 0-1.6-.72-1.6-1.6zM8 13.728v-2.624a3.193 3.193 0 002.4-3.096c0-.28-.032-.552-.104-.808L12.8 5.808v5.256L8 13.728z"
|
|
130
|
-
/>
|
|
131
|
-
</svg>
|
|
119
|
+
/>
|
|
132
120
|
</div>
|
|
133
121
|
</div>
|
|
134
122
|
<span
|
|
@@ -165,16 +153,9 @@ exports[`SquareAppIcon component should render correctly an app in add state 1`]
|
|
|
165
153
|
class="styles__onEnd___1mc8z"
|
|
166
154
|
/>
|
|
167
155
|
<svg
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
viewBox="0 0 14 14"
|
|
172
|
-
width="16"
|
|
173
|
-
>
|
|
174
|
-
<path
|
|
175
|
-
d="M6 8H1a.968.968 0 01-.713-.287A.968.968 0 010 7c0-.283.096-.52.287-.713A.968.968 0 011 6h5V1c0-.283.096-.52.287-.713A.968.968 0 017 0c.283 0 .52.096.713.287A.975.975 0 018 1v5h5c.283 0 .52.096.713.287.191.192.287.43.287.713s-.096.52-.287.713A.968.968 0 0113 8H8v5c0 .283-.096.52-.287.713A.967.967 0 017 14a.967.967 0 01-.713-.287A.968.968 0 016 13V8z"
|
|
176
|
-
/>
|
|
177
|
-
</svg>
|
|
156
|
+
color="var(--primaryColor)"
|
|
157
|
+
data-icon="true"
|
|
158
|
+
/>
|
|
178
159
|
</div>
|
|
179
160
|
<span
|
|
180
161
|
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangular"
|
|
@@ -211,31 +192,22 @@ exports[`SquareAppIcon component should render correctly an app in error state 1
|
|
|
211
192
|
class="u-w-2 u-h-2"
|
|
212
193
|
>
|
|
213
194
|
<svg
|
|
214
|
-
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5
|
|
195
|
+
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5"
|
|
196
|
+
color="var(--coolGrey)"
|
|
197
|
+
data-icon="true"
|
|
215
198
|
height="100%"
|
|
216
|
-
style="fill: var(--coolGrey);"
|
|
217
|
-
viewBox="0 0 15 16"
|
|
218
199
|
width="100%"
|
|
219
|
-
|
|
220
|
-
<path
|
|
221
|
-
d="M14.4 4L7.2 0 0 4v8l7.2 4 7.2-4V4zM7.2 1.832l4.728 2.624L9.52 5.792a3.213 3.213 0 00-4.64 0L2.472 4.456 7.2 1.832zm-.8 11.896l-4.8-2.664V5.808L4.104 7.2A3.193 3.193 0 006.4 11.096v2.632zM5.6 8c0-.88.72-1.6 1.6-1.6.88 0 1.6.72 1.6 1.6 0 .88-.72 1.6-1.6 1.6-.88 0-1.6-.72-1.6-1.6zM8 13.728v-2.624a3.193 3.193 0 002.4-3.096c0-.28-.032-.552-.104-.808L12.8 5.808v5.256L8 13.728z"
|
|
222
|
-
/>
|
|
223
|
-
</svg>
|
|
200
|
+
/>
|
|
224
201
|
</div>
|
|
225
202
|
</div>
|
|
226
203
|
<span
|
|
227
204
|
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangular MuiBadge-colorError"
|
|
228
205
|
>
|
|
229
206
|
<svg
|
|
230
|
-
class="makeStyles-errorIcon-34
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
>
|
|
235
|
-
<path
|
|
236
|
-
d="M8 0C3.584 0 0 3.584 0 8s3.584 8 8 8 8-3.584 8-8-3.584-8-8-8zm.8 12H7.2v-1.6h1.6V12zm0-3.2H7.2V4h1.6v4.8z"
|
|
237
|
-
/>
|
|
238
|
-
</svg>
|
|
207
|
+
class="makeStyles-errorIcon-34"
|
|
208
|
+
data-icon="true"
|
|
209
|
+
size="16"
|
|
210
|
+
/>
|
|
239
211
|
</span>
|
|
240
212
|
</span>
|
|
241
213
|
<span
|
|
@@ -271,16 +243,12 @@ exports[`SquareAppIcon component should render correctly an app in ghost state 1
|
|
|
271
243
|
class="u-w-2 u-h-2"
|
|
272
244
|
>
|
|
273
245
|
<svg
|
|
274
|
-
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5
|
|
246
|
+
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5"
|
|
247
|
+
color="var(--coolGrey)"
|
|
248
|
+
data-icon="true"
|
|
275
249
|
height="100%"
|
|
276
|
-
style="fill: var(--coolGrey);"
|
|
277
|
-
viewBox="0 0 15 16"
|
|
278
250
|
width="100%"
|
|
279
|
-
|
|
280
|
-
<path
|
|
281
|
-
d="M14.4 4L7.2 0 0 4v8l7.2 4 7.2-4V4zM7.2 1.832l4.728 2.624L9.52 5.792a3.213 3.213 0 00-4.64 0L2.472 4.456 7.2 1.832zm-.8 11.896l-4.8-2.664V5.808L4.104 7.2A3.193 3.193 0 006.4 11.096v2.632zM5.6 8c0-.88.72-1.6 1.6-1.6.88 0 1.6.72 1.6 1.6 0 .88-.72 1.6-1.6 1.6-.88 0-1.6-.72-1.6-1.6zM8 13.728v-2.624a3.193 3.193 0 002.4-3.096c0-.28-.032-.552-.104-.808L12.8 5.808v5.256L8 13.728z"
|
|
282
|
-
/>
|
|
283
|
-
</svg>
|
|
251
|
+
/>
|
|
284
252
|
</div>
|
|
285
253
|
</div>
|
|
286
254
|
<span
|
|
@@ -320,16 +288,12 @@ exports[`SquareAppIcon component should render correctly an app in maintenance s
|
|
|
320
288
|
class="u-w-2 u-h-2"
|
|
321
289
|
>
|
|
322
290
|
<svg
|
|
323
|
-
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5
|
|
291
|
+
class="styles__c-app-icon___2W1cp styles__c-app-icon-default___1Bus5"
|
|
292
|
+
color="var(--coolGrey)"
|
|
293
|
+
data-icon="true"
|
|
324
294
|
height="100%"
|
|
325
|
-
style="fill: var(--coolGrey);"
|
|
326
|
-
viewBox="0 0 15 16"
|
|
327
295
|
width="100%"
|
|
328
|
-
|
|
329
|
-
<path
|
|
330
|
-
d="M14.4 4L7.2 0 0 4v8l7.2 4 7.2-4V4zM7.2 1.832l4.728 2.624L9.52 5.792a3.213 3.213 0 00-4.64 0L2.472 4.456 7.2 1.832zm-.8 11.896l-4.8-2.664V5.808L4.104 7.2A3.193 3.193 0 006.4 11.096v2.632zM5.6 8c0-.88.72-1.6 1.6-1.6.88 0 1.6.72 1.6 1.6 0 .88-.72 1.6-1.6 1.6-.88 0-1.6-.72-1.6-1.6zM8 13.728v-2.624a3.193 3.193 0 002.4-3.096c0-.28-.032-.552-.104-.808L12.8 5.808v5.256L8 13.728z"
|
|
331
|
-
/>
|
|
332
|
-
</svg>
|
|
296
|
+
/>
|
|
333
297
|
</div>
|
|
334
298
|
</div>
|
|
335
299
|
<span
|
|
@@ -377,15 +341,9 @@ exports[`SquareAppIcon component should render correctly an app in shortcut stat
|
|
|
377
341
|
style="background-color: var(--paperBackgroundColor); color: var(--iconTextColor); box-shadow: var(--shadow3);"
|
|
378
342
|
>
|
|
379
343
|
<svg
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
width="10"
|
|
384
|
-
>
|
|
385
|
-
<path
|
|
386
|
-
d="M14.222 14.222H1.778V1.778H8V0H1.778C.79 0 0 .8 0 1.778v12.444C0 15.2.791 16 1.778 16h12.444C15.2 16 16 15.2 16 14.222V8h-1.778v6.222zM9.778 0v1.778h3.19l-8.737 8.738 1.253 1.253 8.738-8.738v3.191H16V0H9.778z"
|
|
387
|
-
/>
|
|
388
|
-
</svg>
|
|
344
|
+
data-icon="true"
|
|
345
|
+
size="10"
|
|
346
|
+
/>
|
|
389
347
|
</div>
|
|
390
348
|
</span>
|
|
391
349
|
</span>
|
|
@@ -415,17 +373,8 @@ exports[`SquareAppIcon component should render correctly an app with custom cont
|
|
|
415
373
|
class="styles__onEnd___1mc8z"
|
|
416
374
|
/>
|
|
417
375
|
<svg
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
viewBox="0 0 52 52"
|
|
421
|
-
width="16"
|
|
422
|
-
>
|
|
423
|
-
<path
|
|
424
|
-
d="M38.231 44H13.769C6.175 44 0 37.756 0 30.08c0-3.66 1.394-7.117 3.927-9.733 2.219-2.29 5.093-3.715 8.203-4.086a13.887 13.887 0 014.042-8.292A13.608 13.608 0 0125.801 4c3.62 0 7.04 1.407 9.629 3.968a13.897 13.897 0 014.038 8.25C46.482 16.853 52 22.828 52 30.082 52 37.756 45.82 44 38.23 44h.001zm-.163-3.001h.104c5.97 0 10.828-4.91 10.828-10.947 0-6.035-4.857-10.946-10.828-10.946h-.11c-.779 0-1.417-.627-1.435-1.417C36.492 11.794 31.637 7 25.803 7c-5.835 0-10.692 4.796-10.826 10.69a1.445 1.445 0 01-1.403 1.42C7.744 19.244 3 24.153 3 30.052 3 36.09 7.857 41 13.828 41h.088l.035-.002c.03 0 .062 0 .093.002h24.021l.003-.001zm-4.302-11.776c-.875-.585-.918-1.659-.92-1.706A.52.52 0 0032.32 27a.523.523 0 00-.506.536c.002.039.016.543.251 1.137a7.99 7.99 0 01-11.138.019 3.554 3.554 0 00.257-1.155.523.523 0 00-.503-.536.526.526 0 00-.528.515c0 .043-.042 1.121-.92 1.706a.536.536 0 00-.15.731.51.51 0 00.714.154c.225-.15.414-.322.572-.505a9.006 9.006 0 0012.251-.01c.16.184.35.36.582.515a.503.503 0 00.281.085.516.516 0 00.432-.24.537.537 0 00-.15-.731v.002z"
|
|
425
|
-
fill="#297EF2"
|
|
426
|
-
fill-rule="evenodd"
|
|
427
|
-
/>
|
|
428
|
-
</svg>
|
|
376
|
+
data-icon="true"
|
|
377
|
+
/>
|
|
429
378
|
</div>
|
|
430
379
|
<span
|
|
431
380
|
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangular"
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Icon,
|
|
3
|
+
IconCheckAnimated,
|
|
4
|
+
IconCrossAnimated,
|
|
5
|
+
LinkOut,
|
|
6
|
+
Plus,
|
|
7
|
+
WarningCircle
|
|
8
|
+
} from '@linagora/twake-icons'
|
|
1
9
|
import cx from 'classnames'
|
|
2
10
|
import get from 'lodash/get'
|
|
3
11
|
import PropTypes from 'prop-types'
|
|
@@ -5,12 +13,6 @@ import React, { useEffect, useState } from 'react'
|
|
|
5
13
|
|
|
6
14
|
import { nameToColor } from 'cozy-ui/transpiled/react/Avatar/helpers'
|
|
7
15
|
import Badge from 'cozy-ui/transpiled/react/Badge'
|
|
8
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
9
|
-
import IconCheckAnimated from 'cozy-ui/transpiled/react/Icons/IconCheckAnimated'
|
|
10
|
-
import SvgIconCrossAnimated from 'cozy-ui/transpiled/react/Icons/IconCrossAnimated'
|
|
11
|
-
import iconOut from 'cozy-ui/transpiled/react/Icons/LinkOut'
|
|
12
|
-
import iconPlus from 'cozy-ui/transpiled/react/Icons/Plus'
|
|
13
|
-
import iconWarning from 'cozy-ui/transpiled/react/Icons/WarningCircle'
|
|
14
16
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
15
17
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
16
18
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
@@ -145,7 +147,7 @@ export const SquareAppIcon = ({
|
|
|
145
147
|
boxShadow: 'var(--shadow3)'
|
|
146
148
|
}}
|
|
147
149
|
>
|
|
148
|
-
<Icon size="10" icon={
|
|
150
|
+
<Icon size="10" icon={LinkOut} />
|
|
149
151
|
</div>
|
|
150
152
|
) : null
|
|
151
153
|
}
|
|
@@ -173,7 +175,7 @@ export const SquareAppIcon = ({
|
|
|
173
175
|
<Icon
|
|
174
176
|
size={16}
|
|
175
177
|
className={cx(classes.errorIcon)}
|
|
176
|
-
icon={
|
|
178
|
+
icon={WarningCircle}
|
|
177
179
|
/>
|
|
178
180
|
) : (
|
|
179
181
|
''
|
|
@@ -215,14 +217,14 @@ export const SquareAppIcon = ({
|
|
|
215
217
|
icon={
|
|
216
218
|
animationState === 'success'
|
|
217
219
|
? IconCheckAnimated
|
|
218
|
-
:
|
|
220
|
+
: IconCrossAnimated
|
|
219
221
|
}
|
|
220
222
|
/>
|
|
221
223
|
)}
|
|
222
224
|
</div>
|
|
223
225
|
|
|
224
226
|
{variant === 'add' ? (
|
|
225
|
-
<Icon icon={
|
|
227
|
+
<Icon icon={Plus} color="var(--primaryColor)" />
|
|
226
228
|
) : IconContent ? (
|
|
227
229
|
IconContent
|
|
228
230
|
) : (
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { Icon, TwakeWorkplace } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
5
|
import { useInstanceInfo } from 'cozy-client'
|
|
5
6
|
import { buildPremiumLink } from 'cozy-client/dist/models/instance'
|
|
6
7
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
7
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
8
|
-
import TwakeWorkplaceIcon from 'cozy-ui/transpiled/react/Icons/TwakeWorkplace'
|
|
9
8
|
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
10
9
|
|
|
11
10
|
import { locales } from './locales'
|
|
@@ -20,7 +19,7 @@ const StorageButton = ({ className }) => {
|
|
|
20
19
|
className={cx('u-bdrs-4', className)}
|
|
21
20
|
variant="secondary"
|
|
22
21
|
label={t('Storage.increase')}
|
|
23
|
-
startIcon={<Icon icon={
|
|
22
|
+
startIcon={<Icon icon={TwakeWorkplace} size={22} />}
|
|
24
23
|
size="small"
|
|
25
24
|
height="auto"
|
|
26
25
|
fullWidth
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { Icon, Cloud } from '@linagora/twake-icons'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
|
|
3
4
|
import { useInstanceInfo } from 'cozy-client'
|
|
4
5
|
import { makeDiskInfos } from 'cozy-client/dist/models/instance'
|
|
5
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
-
import CloudIcon from 'cozy-ui/transpiled/react/Icons/Cloud'
|
|
7
6
|
import LinearProgress from 'cozy-ui/transpiled/react/LinearProgress'
|
|
8
7
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
9
8
|
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
@@ -29,7 +28,7 @@ const StorageProgress = () => {
|
|
|
29
28
|
<div className="u-flex u-flex-items-center">
|
|
30
29
|
<Icon
|
|
31
30
|
className="u-mr-half"
|
|
32
|
-
icon={
|
|
31
|
+
icon={Cloud}
|
|
33
32
|
size={24}
|
|
34
33
|
color="var(--iconTextColor)"
|
|
35
34
|
/>
|
|
@@ -19,7 +19,9 @@ const CozyThemeWithQuery = props => {
|
|
|
19
19
|
return null
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const _type = props.type || instance?.colorScheme
|
|
23
|
+
|
|
24
|
+
return <DumbCozyTheme {...props} type={_type} />
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export default CozyThemeWithQuery
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const React = require('react')
|
|
2
|
+
|
|
3
|
+
const Icon = ({ icon, iconRef, ...props }) =>
|
|
4
|
+
React.createElement('svg', { 'data-icon': true, ...props })
|
|
5
|
+
|
|
6
|
+
const Sprite = () => null
|
|
7
|
+
|
|
8
|
+
const getFileTypeIcon = () =>
|
|
9
|
+
function FileTypeIcon() {
|
|
10
|
+
return React.createElement('svg', { 'data-filetypeicon': true })
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const proxyHandler = {
|
|
14
|
+
get: function (target, prop) {
|
|
15
|
+
if (prop in target) return target[prop]
|
|
16
|
+
if (prop === 'default') return target.Icon
|
|
17
|
+
return function IconMock({ iconRef, ...props }) {
|
|
18
|
+
return React.createElement('svg', { 'data-mock-icon': prop, ...props })
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = new Proxy({ Icon, Sprite, getFileTypeIcon }, proxyHandler)
|