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
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import { Icon, Bottom, Team } from '@linagora/twake-icons'
|
|
1
2
|
import React, { useState, useRef } from 'react'
|
|
2
3
|
|
|
3
4
|
import { useClient, generateWebLink } from 'cozy-client'
|
|
4
5
|
import { CONTACTS_DOCTYPE } from 'cozy-client/dist/models/contact'
|
|
5
6
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
6
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom'
|
|
8
|
-
import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team'
|
|
9
7
|
import Link from 'cozy-ui/transpiled/react/Link'
|
|
10
8
|
import ActionMenu, {
|
|
11
9
|
ActionMenuItem
|
|
@@ -37,7 +35,7 @@ const ImportDropdown = ({ onContactImport }) => {
|
|
|
37
35
|
ref={anchorRef}
|
|
38
36
|
variant="secondary"
|
|
39
37
|
label={t('Contacts.Header.import.title')}
|
|
40
|
-
endIcon={<Icon icon={
|
|
38
|
+
endIcon={<Icon icon={Bottom} />}
|
|
41
39
|
fullWidth
|
|
42
40
|
onClick={() => setShowMenu(v => !v)}
|
|
43
41
|
/>
|
|
@@ -48,10 +46,7 @@ const ImportDropdown = ({ onContactImport }) => {
|
|
|
48
46
|
popperOptions={{ placement: 'bottom-end' }}
|
|
49
47
|
onClose={() => setShowMenu(false)}
|
|
50
48
|
>
|
|
51
|
-
<ActionMenuItem
|
|
52
|
-
left={<Icon icon={TeamIcon} />}
|
|
53
|
-
onClick={onContactImport}
|
|
54
|
-
>
|
|
49
|
+
<ActionMenuItem left={<Icon icon={Team} />} onClick={onContactImport}>
|
|
55
50
|
{t('Contacts.Header.import.vcard')}
|
|
56
51
|
</ActionMenuItem>
|
|
57
52
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { Icon, PersonAdd } 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 Button from 'cozy-ui/transpiled/react/Buttons'
|
|
6
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import PersonAddIcon from 'cozy-ui/transpiled/react/Icons/PersonAdd'
|
|
8
7
|
import { useBreakpoints } from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
9
8
|
import { useI18n, useExtendI18n } from 'twake-i18n'
|
|
10
9
|
|
|
@@ -37,7 +36,7 @@ const Header = ({
|
|
|
37
36
|
<Button
|
|
38
37
|
className="u-mr-half"
|
|
39
38
|
variant="ghost"
|
|
40
|
-
startIcon={<Icon icon={
|
|
39
|
+
startIcon={<Icon icon={PersonAdd} />}
|
|
41
40
|
label={t('Contacts.Header.create')}
|
|
42
41
|
fullWidth
|
|
43
42
|
onClick={onContactCreate}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { Icon, People } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
|
-
import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People'
|
|
6
5
|
import TextField from 'cozy-ui/transpiled/react/TextField'
|
|
7
6
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
8
7
|
import { Media, Img, Bd } from 'cozy-ui/transpiled/react/deprecated/Media'
|
|
@@ -21,7 +20,7 @@ const AddContactContent = ({ t, setContactValues }) => {
|
|
|
21
20
|
<Typography variant="h5">{t('coordinates')}</Typography>
|
|
22
21
|
<Media>
|
|
23
22
|
<Img className={styles.icon}>
|
|
24
|
-
<Icon icon={
|
|
23
|
+
<Icon icon={People} />
|
|
25
24
|
</Img>
|
|
26
25
|
<Bd className="u-mr-1">
|
|
27
26
|
<TextField
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Icon, Plus } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import PropTypes from 'prop-types'
|
|
3
4
|
import React, { useState } from 'react'
|
|
@@ -10,8 +11,6 @@ import {
|
|
|
10
11
|
useCozyDialog
|
|
11
12
|
} from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
12
13
|
import { DialogTitle, DialogContent } from 'cozy-ui/transpiled/react/Dialog'
|
|
13
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
14
|
-
import PlusIcon from 'cozy-ui/transpiled/react/Icons/Plus'
|
|
15
14
|
import TextField from 'cozy-ui/transpiled/react/TextField'
|
|
16
15
|
import useEventListener from 'cozy-ui/transpiled/react/hooks/useEventListener'
|
|
17
16
|
import useRealtime from 'cozy-ui/transpiled/react/hooks/useRealtime'
|
|
@@ -97,9 +96,9 @@ const ContactsListModal = ({
|
|
|
97
96
|
className={isMobile && 'u-mt-1'}
|
|
98
97
|
variant="secondary"
|
|
99
98
|
theme="secondary"
|
|
100
|
-
label={selfAddContactLabel || <Icon icon={
|
|
99
|
+
label={selfAddContactLabel || <Icon icon={Plus} />}
|
|
101
100
|
{...(selfAddContactLabel && {
|
|
102
|
-
startIcon: <Icon icon={
|
|
101
|
+
startIcon: <Icon icon={Plus} />
|
|
103
102
|
})}
|
|
104
103
|
onClick={setShowAddDialog}
|
|
105
104
|
/>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { Icon, Previous } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
5
|
import IconButton from 'cozy-ui/transpiled/react/IconButton'
|
|
6
|
-
import PreviousIcon from 'cozy-ui/transpiled/react/Icons/Previous'
|
|
7
6
|
import Input from 'cozy-ui/transpiled/react/Input'
|
|
8
7
|
import Paper from 'cozy-ui/transpiled/react/Paper'
|
|
9
8
|
|
|
@@ -20,7 +19,7 @@ const MobileHeader = ({ filter, placeholder, onChange, onDismiss }) => {
|
|
|
20
19
|
style={barStyle}
|
|
21
20
|
>
|
|
22
21
|
<IconButton className="u-mr-half" onClick={onDismiss} size="medium">
|
|
23
|
-
<Icon icon={
|
|
22
|
+
<Icon icon={Previous} />
|
|
24
23
|
</IconButton>
|
|
25
24
|
<Input
|
|
26
25
|
type="text"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { CozyAuthentification } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React, { useMemo, useState } from 'react'
|
|
3
4
|
|
|
4
5
|
import { useClient } from 'cozy-client'
|
|
5
6
|
import Buttons from 'cozy-ui/transpiled/react/Buttons'
|
|
6
7
|
import PermissionDialog from 'cozy-ui/transpiled/react/CozyDialogs/PermissionDialog'
|
|
7
|
-
import CozyAuthentificationIcon from 'cozy-ui/transpiled/react/Icons/CozyAuthentification'
|
|
8
8
|
import PasswordField from 'cozy-ui/transpiled/react/PasswordField'
|
|
9
9
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
10
10
|
import { useI18n } from 'twake-i18n'
|
|
@@ -49,7 +49,7 @@ const AuthentificationDialog = ({
|
|
|
49
49
|
open
|
|
50
50
|
onClose={onClose}
|
|
51
51
|
title={t(`authentification-dialog.${isOIDC ? 'title-oidc' : 'title'}`)}
|
|
52
|
-
icon={
|
|
52
|
+
icon={CozyAuthentification}
|
|
53
53
|
content={
|
|
54
54
|
<form onSubmit={handleSubmit}>
|
|
55
55
|
<Typography variant="body1" className="u-ta-center">
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Icon, FileTypeFolder, FileTypeText } from '@linagora/twake-icons'
|
|
1
2
|
import cx from 'classnames'
|
|
2
3
|
import filesize from 'filesize'
|
|
3
4
|
import PropTypes from 'prop-types'
|
|
@@ -6,9 +7,6 @@ import React from 'react'
|
|
|
6
7
|
import { models } from 'cozy-client'
|
|
7
8
|
import Checkbox from 'cozy-ui/transpiled/react/Checkbox'
|
|
8
9
|
import Divider from 'cozy-ui/transpiled/react/Divider'
|
|
9
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
10
|
-
import FileTypeFolder from 'cozy-ui/transpiled/react/Icons/FileTypeFolder'
|
|
11
|
-
import FileTypeText from 'cozy-ui/transpiled/react/Icons/FileTypeText'
|
|
12
10
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
13
11
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
14
12
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { Icon, Right } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React, { Fragment, useCallback, memo } from 'react'
|
|
3
4
|
|
|
4
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
|
-
import RightIcon from 'cozy-ui/transpiled/react/Icons/Right'
|
|
6
5
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
7
6
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
8
7
|
|
|
@@ -33,7 +32,7 @@ const FilePickerBreadcrumb = ({ path, onBreadcrumbClick }) => {
|
|
|
33
32
|
{folder.name}
|
|
34
33
|
</span>
|
|
35
34
|
<Icon
|
|
36
|
-
icon={
|
|
35
|
+
icon={Right}
|
|
37
36
|
className={styles['filePickerBreadcrumb-icon']}
|
|
38
37
|
/>
|
|
39
38
|
</Fragment>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { Icon, Previous } from '@linagora/twake-icons'
|
|
1
2
|
import get from 'lodash/get'
|
|
2
3
|
import uniqBy from 'lodash/uniqBy'
|
|
3
4
|
import PropTypes from 'prop-types'
|
|
4
5
|
import React, { useCallback, memo } from 'react'
|
|
5
6
|
|
|
6
7
|
import { useQuery, hasQueryBeenLoaded } from 'cozy-client'
|
|
7
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
8
8
|
import IconButton from 'cozy-ui/transpiled/react/IconButton'
|
|
9
|
-
import Previous from 'cozy-ui/transpiled/react/Icons/Previous'
|
|
10
9
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
11
10
|
|
|
12
11
|
import { ROOT_DIR_ID } from '.'
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { Icon, Copy } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
|
-
import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy'
|
|
6
5
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
7
6
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
8
7
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
@@ -21,7 +20,7 @@ const ExpandedAttribute = ({ label, value, setAlertProps }) => {
|
|
|
21
20
|
onClick={copyToClipboard({ value, setAlertProps, t })}
|
|
22
21
|
>
|
|
23
22
|
<ListItemIcon>
|
|
24
|
-
<Icon icon={
|
|
23
|
+
<Icon icon={Copy} />
|
|
25
24
|
</ListItemIcon>
|
|
26
25
|
<ListItemText
|
|
27
26
|
primary={<Typography variant="caption">{label}</Typography>}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { Icon, Dots } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React, { useState, useRef } from 'react'
|
|
3
4
|
|
|
4
5
|
import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
|
|
5
6
|
import ActionsMenuMobileHeader from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuMobileHeader'
|
|
6
7
|
import Checkbox from 'cozy-ui/transpiled/react/Checkbox'
|
|
7
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
8
8
|
import IconButton from 'cozy-ui/transpiled/react/IconButton'
|
|
9
|
-
import DotsIcon from 'cozy-ui/transpiled/react/Icons/Dots'
|
|
10
9
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
11
10
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
12
11
|
import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
|
|
@@ -58,7 +57,7 @@ const ListItemBase = ({
|
|
|
58
57
|
{actions && !isSelectActive && (
|
|
59
58
|
<ListItemSecondaryAction>
|
|
60
59
|
<IconButton ref={anchorRef} onClick={toggleMenu}>
|
|
61
|
-
<Icon icon={
|
|
60
|
+
<Icon icon={Dots} />
|
|
62
61
|
</IconButton>
|
|
63
62
|
</ListItemSecondaryAction>
|
|
64
63
|
)}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { Icon, Contacts } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
5
|
import { getDisplayName } from 'cozy-client/dist/models/contact'
|
|
5
6
|
import Filename from 'cozy-ui/transpiled/react/Filename'
|
|
6
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import ContactsIcon from 'cozy-ui/transpiled/react/Icons/Contacts'
|
|
8
7
|
|
|
9
8
|
import useActions from './useActions'
|
|
10
9
|
import ListItemBase from '../ListItemBase'
|
|
@@ -22,7 +21,7 @@ const ListItemContact = ({
|
|
|
22
21
|
const defaultActions = useActions(contact)
|
|
23
22
|
const primaryText = primary || getDisplayName(contact)
|
|
24
23
|
const secondaryText = secondary || contact.email?.[0]?.address
|
|
25
|
-
const itemIcon = icon || <Icon icon={
|
|
24
|
+
const itemIcon = icon || <Icon icon={Contacts} width="32" height="32" />
|
|
26
25
|
|
|
27
26
|
const itemActions = defaultActions.concat(actions)
|
|
28
27
|
|
|
@@ -34,7 +33,7 @@ const ListItemContact = ({
|
|
|
34
33
|
icon={itemIcon}
|
|
35
34
|
actions={itemActions}
|
|
36
35
|
actionMenuComp={{
|
|
37
|
-
Header: <Filename icon={
|
|
36
|
+
Header: <Filename icon={Contacts} filename={primaryText} />
|
|
38
37
|
}}
|
|
39
38
|
selectProps={selectProps}
|
|
40
39
|
expandedAttributesProps={expandedAttributesProps}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import { Icon, FileTypeNote, FileTypeText } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
5
|
import { useClient } from 'cozy-client'
|
|
5
6
|
import { isNote } from 'cozy-client/dist/models/file'
|
|
6
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import FiletypeNoteIcon from 'cozy-ui/transpiled/react/Icons/FileTypeNote'
|
|
8
|
-
import FiletypeTextIcon from 'cozy-ui/transpiled/react/Icons/FileTypeText'
|
|
9
7
|
import Skeleton from 'cozy-ui/transpiled/react/Skeleton'
|
|
10
8
|
|
|
11
9
|
import FileImageLoader from '../../FileImageLoader'
|
|
@@ -42,7 +40,7 @@ const ItemIcon = ({ icon, file }) => {
|
|
|
42
40
|
}}
|
|
43
41
|
renderFallback={() => (
|
|
44
42
|
<div className="u-flex u-w-2 u-h-2 u-flex-items-center u-flex-justify-center">
|
|
45
|
-
<Icon icon={isNote(file) ?
|
|
43
|
+
<Icon icon={isNote(file) ? FileTypeNote : FileTypeText} />
|
|
46
44
|
</div>
|
|
47
45
|
)}
|
|
48
46
|
/>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { FileTypePdf } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
|
|
4
5
|
import { splitFilename } from 'cozy-client/dist/models/file'
|
|
5
6
|
import Filename from 'cozy-ui/transpiled/react/Filename'
|
|
6
|
-
import FiletypePdfIcon from 'cozy-ui/transpiled/react/Icons/FileTypePdf'
|
|
7
7
|
|
|
8
8
|
import ItemIcon from './ItemIcon'
|
|
9
9
|
import PrimaryText from './PrimaryText'
|
|
@@ -35,7 +35,7 @@ const ListItemFile = ({
|
|
|
35
35
|
actionMenuComp={{
|
|
36
36
|
Header: (
|
|
37
37
|
<Filename
|
|
38
|
-
icon={
|
|
38
|
+
icon={FileTypePdf}
|
|
39
39
|
filename={filename}
|
|
40
40
|
extension={extension}
|
|
41
41
|
/>
|
package/src/Paywall/Paywall.jsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Icon, CozyUpgrade } from '@linagora/twake-icons'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
import React, { useEffect, useState } from 'react'
|
|
3
4
|
|
|
@@ -7,8 +8,6 @@ import { isFlagshipApp } from 'cozy-device-helper'
|
|
|
7
8
|
import { useWebviewIntent } from 'cozy-intent'
|
|
8
9
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
9
10
|
import { IllustrationDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
10
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
11
|
-
import CozyUpgradeIcon from 'cozy-ui/transpiled/react/Icons/CozyUpgrade'
|
|
12
11
|
import Markdown from 'cozy-ui/transpiled/react/Markdown'
|
|
13
12
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
14
13
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
@@ -77,7 +76,7 @@ const Paywall = ({
|
|
|
77
76
|
actionsLayout="column"
|
|
78
77
|
title={
|
|
79
78
|
<div className="u-flex u-flex-column u-flex-items-center">
|
|
80
|
-
<Icon icon={
|
|
79
|
+
<Icon icon={CozyUpgrade} width={128} height={128} />
|
|
81
80
|
<Typography variant="h3" className="u-mt-1">
|
|
82
81
|
{t(`${variant}Paywall.${type}.title`)}
|
|
83
82
|
</Typography>
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Bank,
|
|
3
|
+
Bill,
|
|
4
|
+
Car,
|
|
5
|
+
Chess,
|
|
6
|
+
Dots,
|
|
7
|
+
Heart,
|
|
8
|
+
Home,
|
|
9
|
+
People,
|
|
10
|
+
Team,
|
|
11
|
+
Work
|
|
12
|
+
} from '@linagora/twake-icons'
|
|
1
13
|
import PropTypes from 'prop-types'
|
|
2
14
|
import React, { Fragment, useState } from 'react'
|
|
3
15
|
|
|
4
16
|
import Grid from 'cozy-ui/transpiled/react/Grid'
|
|
5
|
-
import BankIcon from 'cozy-ui/transpiled/react/Icons/Bank'
|
|
6
|
-
import BillIcon from 'cozy-ui/transpiled/react/Icons/Bill'
|
|
7
|
-
import CarIcon from 'cozy-ui/transpiled/react/Icons/Car'
|
|
8
|
-
import ChessIcon from 'cozy-ui/transpiled/react/Icons/Chess'
|
|
9
|
-
import DotsIcon from 'cozy-ui/transpiled/react/Icons/Dots'
|
|
10
|
-
import HeartIcon from 'cozy-ui/transpiled/react/Icons/Heart'
|
|
11
|
-
import HomeIcon from 'cozy-ui/transpiled/react/Icons/Home'
|
|
12
|
-
import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People'
|
|
13
|
-
import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team'
|
|
14
|
-
import WorkIcon from 'cozy-ui/transpiled/react/Icons/Work'
|
|
15
17
|
import { useI18n } from 'twake-i18n'
|
|
16
18
|
|
|
17
19
|
import { getThemesList } from './helpers'
|
|
@@ -19,16 +21,16 @@ import QualificationItem from '../QualificationItem'
|
|
|
19
21
|
import withLocales from './locales/withLocales'
|
|
20
22
|
|
|
21
23
|
const IconByName = {
|
|
22
|
-
people:
|
|
23
|
-
team:
|
|
24
|
-
work:
|
|
25
|
-
heart:
|
|
26
|
-
home:
|
|
27
|
-
car:
|
|
28
|
-
chess:
|
|
29
|
-
bank:
|
|
30
|
-
bill:
|
|
31
|
-
dots:
|
|
24
|
+
people: People,
|
|
25
|
+
team: Team,
|
|
26
|
+
work: Work,
|
|
27
|
+
heart: Heart,
|
|
28
|
+
home: Home,
|
|
29
|
+
car: Car,
|
|
30
|
+
chess: Chess,
|
|
31
|
+
bank: Bank,
|
|
32
|
+
bill: Bill,
|
|
33
|
+
dots: Dots
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
const QualificationGrid = ({ noUndefined, noOthers, noHealth, onClick }) => {
|
|
@@ -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
|
})
|