diff --git a/react/Accordion/index.jsx b/react/Accordion/index.jsx index c5b32daeb2..bd5fb51b45 100644 --- a/react/Accordion/index.jsx +++ b/react/Accordion/index.jsx @@ -5,6 +5,8 @@ import cx from 'classnames' import Icon from '../Icon' import styles from './styles.styl' +import RightIcon from 'cozy-ui/transpiled/react/Icons/Right' + class AccordionItem extends Component { constructor(props) { super(props) @@ -40,7 +42,7 @@ class AccordionItem extends Component { aria-expanded={selected} aria-controls={contentID} > - + {label} diff --git a/react/AppSections/components/DropdownFilter.jsx b/react/AppSections/components/DropdownFilter.jsx index 76f108e2a1..96a3053439 100644 --- a/react/AppSections/components/DropdownFilter.jsx +++ b/react/AppSections/components/DropdownFilter.jsx @@ -6,10 +6,12 @@ import PropTypes from 'prop-types' import styles from './DropdownFilter.styl' import cx from 'classnames' +import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom' + const SmallArrow = () => ( { const colors = [ palette['azure'], @@ -60,7 +62,7 @@ export const Avatar = ({ {!image && text && ( {text} )} - {!image && !text && } + {!image && !text && } ) } diff --git a/react/Button/index.jsx b/react/Button/index.jsx index 1915e4251c..00b8ac492c 100644 --- a/react/Button/index.jsx +++ b/react/Button/index.jsx @@ -4,6 +4,8 @@ import PropTypes from 'prop-types' import styles from './styles.styl' import Icon, { iconPropType } from '../Icon' +import SpinnerIcon from 'cozy-ui/transpiled/react/Icons/Spinner' + const btnClass = function(options) { const { className, extension, size, theme, variant, round, align } = options return cx( @@ -101,7 +103,7 @@ const BaseButton = props => { {restProps.busy && ( - + ) } diff --git a/react/ContextHeader/index.jsx b/react/ContextHeader/index.jsx index 25a216ff0a..6273551093 100644 --- a/react/ContextHeader/index.jsx +++ b/react/ContextHeader/index.jsx @@ -7,6 +7,8 @@ import styles from './styles.styl' import palette from '../palette' import cx from 'classnames' +import CrossIcon from 'cozy-ui/transpiled/react/Icons/Cross' + const ContextHeader = ({ icon, title, text, onClose, className }) => { return (
@@ -24,7 +26,7 @@ const ContextHeader = ({ icon, title, text, onClose, className }) => { type="button" > { return ( ) diff --git a/react/CozyDialogs/DialogCloseButton.jsx b/react/CozyDialogs/DialogCloseButton.jsx index 8c90c1c033..9adecc7da5 100644 --- a/react/CozyDialogs/DialogCloseButton.jsx +++ b/react/CozyDialogs/DialogCloseButton.jsx @@ -5,6 +5,8 @@ import IconButton from 'cozy-ui/transpiled/react/IconButton' import Icon from 'cozy-ui/transpiled/react/Icon' import styles from './styles.styl' +import CrossMediumIcon from 'cozy-ui/transpiled/react/Icons/CrossMedium' + const CloseButton = ({ onClick, ...props }) => { return ( { className={styles.DialogCloseButton} {...props} > - + ) } diff --git a/react/DateMonthPicker/index.jsx b/react/DateMonthPicker/index.jsx index e0d47ad0ea..698e7114d1 100644 --- a/react/DateMonthPicker/index.jsx +++ b/react/DateMonthPicker/index.jsx @@ -7,6 +7,9 @@ import { format } from 'date-fns' import styles from './styles.styl' import cx from 'classnames' +import LeftIcon from 'cozy-ui/transpiled/react/Icons/Left' +import RightIcon from 'cozy-ui/transpiled/react/Icons/Right' + const MonthButton = translate()(({ monthNum, f, onClick, isSelected }) => { // We do not care care about year and day since we are creating the date // only to be able to format it into a monthName @@ -56,7 +59,7 @@ const DateMonthPicker = ({ initialValue, onSelect }) => { title={year - 1} onClick={decreaseYear} > - +
{year}
diff --git a/react/DateMonthPicker/index.spec.jsx b/react/DateMonthPicker/index.spec.jsx index 37c2259f5e..067068d894 100644 --- a/react/DateMonthPicker/index.spec.jsx +++ b/react/DateMonthPicker/index.spec.jsx @@ -3,6 +3,8 @@ import React from 'react' import DateMonthPicker from './index' import I18n from '../I18n' import { act } from 'react-dom/test-utils' +import LeftIcon from 'cozy-ui/transpiled/react/Icons/Left' +import RightIcon from 'cozy-ui/transpiled/react/Icons/Right' const findButtonWithLabel = (root, label) => root.findWhere(n => n.type() == 'button' && n.props().children === label) @@ -46,7 +48,7 @@ describe('DateMonthPicker', () => { it('should be able to go to previous year', async () => { const { root, handleSelect } = setup({ initialValue: '2015-08' }) - const prevYearButton = findButtonWithIcon(root, 'left') + const prevYearButton = findButtonWithIcon(root, LeftIcon) act(() => { prevYearButton.props().onClick() }) @@ -59,7 +61,7 @@ describe('DateMonthPicker', () => { it('should be able to go to next year', async () => { const { root, handleSelect } = setup({ initialValue: '2015-08' }) - const nextYearButton = findButtonWithIcon(root, 'right') + const nextYearButton = findButtonWithIcon(root, RightIcon) act(() => { nextYearButton.props().onClick() }) diff --git a/react/DropdownButton/index.jsx b/react/DropdownButton/index.jsx index f2ba5ccd59..3b9d4d03e3 100644 --- a/react/DropdownButton/index.jsx +++ b/react/DropdownButton/index.jsx @@ -3,6 +3,8 @@ import cx from 'classnames' import styles from './styles.styl' import Icon from '../Icon' +import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom' + const DropdownButton = React.forwardRef( ({ children, className, ...props }, ref) => ( )}
diff --git a/react/InfosCarrousel/index.jsx b/react/InfosCarrousel/index.jsx index eeca6d5231..19ca06b023 100644 --- a/react/InfosCarrousel/index.jsx +++ b/react/InfosCarrousel/index.jsx @@ -8,6 +8,9 @@ import styles from './styles.styl' import Icon from '../Icon' import IconButton from '../IconButton' +import LeftIcon from 'cozy-ui/transpiled/react/Icons/Left' +import RightIcon from 'cozy-ui/transpiled/react/Icons/Right' + const useClampedValue = (initialValue, min, max) => { const [value, setValue] = useState(initialValue) @@ -54,11 +57,11 @@ const InfosCarrousel = ({ children, theme, className, swipeableProps }) => { {React.Children.count(children) > 1 ? (
- + - +
) : null} diff --git a/react/Labs/CollectionField/index.jsx b/react/Labs/CollectionField/index.jsx index 95432f7825..f8c8248858 100644 --- a/react/Labs/CollectionField/index.jsx +++ b/react/Labs/CollectionField/index.jsx @@ -7,6 +7,9 @@ import Stack from '../../Stack' import Icon from '../../Icon' import { FieldContainer } from '../../Field' +import CrossSmallIcon from 'cozy-ui/transpiled/react/Icons/CrossSmall' +import PlusIcon from 'cozy-ui/transpiled/react/Icons/Plus' + /** * Handles a collection of form fields. * This is a controlled component. You have to give it some values and handle @@ -85,7 +88,9 @@ const CollectionField = props => { label={removeButtonLabel} iconOnly round - icon={} + icon={ + + } onClick={() => handleRemove(index)} /> @@ -100,7 +105,7 @@ const CollectionField = props => { theme="text" icon={ } diff --git a/react/Modal/ModalCross.jsx b/react/Modal/ModalCross.jsx index da166f2b60..ae84c5b4b2 100644 --- a/react/Modal/ModalCross.jsx +++ b/react/Modal/ModalCross.jsx @@ -5,6 +5,8 @@ import Icon from '../Icon' import palette from '../palette' import withBreakpoints from '../helpers/withBreakpoints' +import CrossIcon from 'cozy-ui/transpiled/react/Icons/Cross' + export const ModalCrossIcon = withBreakpoints()(props => { const { color, @@ -12,7 +14,7 @@ export const ModalCrossIcon = withBreakpoints()(props => { } = props return ( diff --git a/react/NestedSelect/Modal.jsx b/react/NestedSelect/Modal.jsx index 09261b0ec1..24e2a054c8 100644 --- a/react/NestedSelect/Modal.jsx +++ b/react/NestedSelect/Modal.jsx @@ -10,11 +10,13 @@ import NestedSelect from './NestedSelect' import styles from './styles.styl' +import LeftIcon from 'cozy-ui/transpiled/react/Icons/Left' + const ModalTitle = ({ showBack, onClickBack, title }) => ( {showBack && ( - + )} diff --git a/react/NestedSelect/NestedSelect.jsx b/react/NestedSelect/NestedSelect.jsx index a25043bb90..ca574086ba 100644 --- a/react/NestedSelect/NestedSelect.jsx +++ b/react/NestedSelect/NestedSelect.jsx @@ -8,6 +8,8 @@ import cx from 'classnames' import omit from 'lodash/omit' import palette from '../palette' +import RightIcon from 'cozy-ui/transpiled/react/Icons/Right' + /** * Select like component to choose an option among a list of options. * Options can have children; selecting an option that has children @@ -217,7 +219,7 @@ export const ItemRow = ({ item, onClick, isSelected, radioPosition }) => { onClick={() => onClick(item)} right={ item.children && item.children.length > 0 ? ( - + ) : radioPosition !== 'right' ? null : ( ( {children} ) @@ -32,7 +34,7 @@ const Row = ({ {children} {hasArrow && ( - + )} diff --git a/react/PushClientBanner/index.jsx b/react/PushClientBanner/index.jsx index 62efc9ad41..f87eeac3bb 100644 --- a/react/PushClientBanner/index.jsx +++ b/react/PushClientBanner/index.jsx @@ -8,6 +8,9 @@ import PropTypes from 'prop-types' import { Button, ButtonLink } from '../Button' import Icon from '../Icon' +import CozyIcon from 'cozy-ui/transpiled/react/Icons/Cozy' +import CrossIcon from 'cozy-ui/transpiled/react/Icons/Cross' + const BannerClient = props => { const { text, @@ -31,7 +34,7 @@ const BannerClient = props => { />
- +
{text} { extension="narrow" className={styles['close-banner']} onClick={onClick} - icon={} + icon={} iconOnly label="Close" /> diff --git a/react/PushClientButton/index.jsx b/react/PushClientButton/index.jsx index f650a263a5..9fc260e212 100644 --- a/react/PushClientButton/index.jsx +++ b/react/PushClientButton/index.jsx @@ -5,6 +5,8 @@ import PropTypes from 'prop-types' import cx from 'classnames' import Icon from '../Icon' +import DeviceLaptopIcon from 'cozy-ui/transpiled/react/Icons/DeviceLaptop' + const ButtonClient = props => { const { label, href, onClick, className } = props return ( @@ -16,7 +18,7 @@ const ButtonClient = props => { onClick={onClick} >
- +
{label} diff --git a/react/SelectionBar/index.jsx b/react/SelectionBar/index.jsx index cdedeb8bc9..f040f0cbee 100644 --- a/react/SelectionBar/index.jsx +++ b/react/SelectionBar/index.jsx @@ -6,6 +6,8 @@ import useBreakpoints from '../hooks/useBreakpoints' import styles from './styles.styl' +import CrossIcon from 'cozy-ui/transpiled/react/Icons/Cross' + /* If you want use SelectionBar component, you must have `actions` parameter, like : @@ -64,7 +66,7 @@ const SelectionBar = ({ actions, selected, hideSelectionBar }) => { onClick={hideSelectionBar} extension="narrow" > - +
) diff --git a/react/Spinner/index.jsx b/react/Spinner/index.jsx index 7d49b8fa89..d5447a7bf8 100644 --- a/react/Spinner/index.jsx +++ b/react/Spinner/index.jsx @@ -5,6 +5,7 @@ import cx from 'classnames' import PropTypes from 'prop-types' import styles from './styles.styl' import palette from '../palette' +import SpinnerIcon from 'cozy-ui/transpiled/react/Icons/Spinner' export const Spinner = ({ t, loadingType, @@ -35,7 +36,7 @@ export const Spinner = ({ className )} > - + {loadingType &&

{t(`loading.${loadingType}`)}

} ) diff --git a/react/UploadQueue/index.jsx b/react/UploadQueue/index.jsx index 59c2636789..2af65e5281 100644 --- a/react/UploadQueue/index.jsx +++ b/react/UploadQueue/index.jsx @@ -18,6 +18,10 @@ import localeEn from './locales/en.json' import localeEs from './locales/es.json' import localeFr from './locales/fr.json' +import CrossIcon from 'cozy-ui/transpiled/react/Icons/Cross' +import WarningIcon from 'cozy-ui/transpiled/react/Icons/Warning' +import CheckIcon from 'cozy-ui/transpiled/react/Icons/Check' + const locales = { en: localeEn, es: localeEs, @@ -108,17 +112,25 @@ const Item = translate()( ) : null } else if (statusToUse === CANCEL) { statusIcon = ( - + ) } else if (ERROR_STATUSES.includes(statusToUse)) { error = true statusIcon = ( - + ) } else if (DONE_STATUSES.includes(statusToUse)) { done = true statusIcon = ( - + ) } else if (statusToUse === PENDING) { statusIcon = diff --git a/react/Viewer/AudioViewer.jsx b/react/Viewer/AudioViewer.jsx index 9d3716b6b2..31824abc90 100644 --- a/react/Viewer/AudioViewer.jsx +++ b/react/Viewer/AudioViewer.jsx @@ -4,9 +4,11 @@ import Icon from '../Icon' import withFileUrl from './withFileUrl' import styles from './styles.styl' +import FileTypeAudioIcon from 'cozy-ui/transpiled/react/Icons/FileTypeAudio' + const AudioViewer = ({ file, url }) => (
- +

{file.name}

diff --git a/react/Viewer/NoNetworkViewer.jsx b/react/Viewer/NoNetworkViewer.jsx index cd39e4cccd..0fb1f0de2a 100644 --- a/react/Viewer/NoNetworkViewer.jsx +++ b/react/Viewer/NoNetworkViewer.jsx @@ -5,9 +5,11 @@ import { translate } from '../I18n' import styles from './styles.styl' +import CloudBrokenIcon from 'cozy-ui/transpiled/react/Icons/CloudBroken' + const NoNetworkViewer = ({ t, onReload }) => (
- +

{t('Viewer.error')}

diff --git a/react/Viewer/ViewerControls.jsx b/react/Viewer/ViewerControls.jsx index 5a3b4693b5..c09b0d0e71 100644 --- a/react/Viewer/ViewerControls.jsx +++ b/react/Viewer/ViewerControls.jsx @@ -10,6 +10,9 @@ import Icon from '../Icon' import styles from './styles.styl' +import PreviousIcon from 'cozy-ui/transpiled/react/Icons/Previous' +import NextIcon from 'cozy-ui/transpiled/react/Icons/Next' + const ACTIONS_HIDE_DELAY = 3000 class ViewerControls extends Component { @@ -155,7 +158,7 @@ class ViewerControls extends Component { onMouseLeave={this.hideControls} > @@ -177,7 +180,7 @@ class ViewerControls extends Component { onMouseLeave={this.hideControls} > diff --git a/react/Wizard/index.jsx b/react/Wizard/index.jsx index db3a97d4b8..bf0731c4d6 100644 --- a/react/Wizard/index.jsx +++ b/react/Wizard/index.jsx @@ -8,6 +8,8 @@ import Input from 'cozy-ui/transpiled/react/Input' import styles from './styles.styl' +import CloudIcon from 'cozy-ui/transpiled/react/Icons/Cloud' + export const Wizard = ({ children, tag, ...props }) => { const Component = tag || 'div' return ( @@ -75,7 +77,7 @@ export const WizardLogo = ({ src, badgeIcon, badgeColor }) => ( focusable="false" />
- +
) diff --git a/react/__snapshots__/examples.spec.jsx.snap b/react/__snapshots__/examples.spec.jsx.snap index 61c5524685..6ccf5b916d 100644 --- a/react/__snapshots__/examples.spec.jsx.snap +++ b/react/__snapshots__/examples.spec.jsx.snap @@ -2,8 +2,8 @@ exports[`ActionMenu should render examples: ActionMenu 1`] = ` "
-
@@ -39,8 +39,8 @@ exports[`ActionMenu should render examples: ActionMenu 1`] = ` exports[`ActionMenu should render examples: ActionMenu 2`] = ` "
-
@@ -72,8 +72,8 @@ exports[`ActionMenu should render examples: ActionMenu 2`] = ` exports[`ActionMenu should render examples: ActionMenu 3`] = ` "
-
@@ -93,8 +93,8 @@ exports[`ActionMenu should render examples: ActionMenu 3`] = ` exports[`ActionMenu should render examples: ActionMenu 4`] = ` "
-
@@ -114,8 +114,8 @@ exports[`ActionMenu should render examples: ActionMenu 4`] = ` exports[`ActionMenu should render examples: ActionMenu 5`] = ` "
-
@@ -141,8 +141,8 @@ exports[`AppTitle should render examples: AppTitle 1`] = ` exports[`Avatar should render examples: Avatar 1`] = ` "
-
- +
+
" `; @@ -162,8 +162,8 @@ exports[`Avatar should render examples: Avatar 3`] = ` exports[`Avatar should render examples: Avatar 4`] = ` "
-
- +
+
CD
\\"\\"
@@ -175,36 +175,36 @@ exports[`Avatar should render examples: Avatar 5`] = ` "
-
- +
+
CD
\\"\\"
-
- +
+
CD
\\"\\"
-
- +
+
CD
\\"\\"
-
- +
+
CD
\\"\\"
-
- +
+
CD
\\"\\"
@@ -264,29 +264,37 @@ exports[`BarButton should render examples: BarButton 4`] = ` exports[`Button should render examples: Button 1`] = ` "
-

-

-

-

-

-

-

-

" @@ -332,8 +340,9 @@ exports[`Button should render examples: Button 5`] = ` exports[`Button should render examples: Button 6`] = `"
"`; exports[`Button should render examples: Button 7`] = ` -"
" `; @@ -369,14 +378,18 @@ exports[`Button should render examples: Button 13`] = `

-

@@ -2068,11 +2081,11 @@ exports[`ContactsListModal should render examples: ContactsListModal 1`] = `"
-
-
2019
@@ -2331,8 +2344,8 @@ exports[`HistoryRow should render examples: HistoryRow 1`] = `
12/12/12 12:12
Current Version
-
- +
+
10ko
@@ -2352,8 +2365,8 @@ exports[`HistoryRow should render examples: HistoryRow 1`] = `
12/12/12 12:10
-
- +
+
9ko
@@ -2373,8 +2386,8 @@ exports[`HistoryRow should render examples: HistoryRow 1`] = `
12/12/12 12:09
V2
-
- +
+
9ko
@@ -2394,8 +2407,8 @@ exports[`HistoryRow should render examples: HistoryRow 1`] = `
12/12/12 12:07
-
- +
+
9ko
@@ -2415,8 +2428,8 @@ exports[`HistoryRow should render examples: HistoryRow 1`] = `
12/12/12 12:05
-
- +
+
9ko
@@ -2436,8 +2449,8 @@ exports[`HistoryRow should render examples: HistoryRow 1`] = `
12/12/12 12:04
-
- +
+
9ko
@@ -2457,8 +2470,8 @@ exports[`HistoryRow should render examples: HistoryRow 1`] = `
12/12/12 12:03
V1
-
- +
+
9ko
@@ -6306,8 +6319,8 @@ exports[`Infos should render examples: Infos 1`] = `
-
@@ -6348,10 +6361,10 @@ exports[`InfosCarrousel should render examples: InfosCarrousel 1`] = `
-
@@ -6533,8 +6546,8 @@ exports[`Labs/CollectionField should render examples: Labs/CollectionField 1`] =
-
-
+
+
" @@ -7161,24 +7174,30 @@ exports[`Sidebar should render examples: Sidebar 1`] = ` exports[`Spinner should render examples: Spinner 1`] = ` "
-
- +
+ +
" `; exports[`Spinner should render examples: Spinner 2`] = ` "
-
blue (default):
- -
or
- -
grey:
- -
white:
- -
red:
- +
blue (default):
+ + +
or
+ + +
grey:
+ + +
white:
+ + +
red:
+ +
" @@ -7187,8 +7206,9 @@ exports[`Spinner should render examples: Spinner 2`] = ` exports[`Spinner should render examples: Spinner 3`] = ` "
-
- +
+ +
" @@ -7196,20 +7216,27 @@ exports[`Spinner should render examples: Spinner 3`] = ` exports[`Spinner should render examples: Spinner 4`] = ` "
-
tiny:
- -

small:
- -

medium (default):
- -
or
- -

large:
- -

xlarge:
- -

xxlarge:
- +
tiny:
+ + +

small:
+ + +

medium (default):
+ + +
or
+ + +

large:
+ + +

xlarge:
+ + +

xxlarge:
+ +
" @@ -7218,8 +7245,9 @@ exports[`Spinner should render examples: Spinner 4`] = ` exports[`Spinner should render examples: Spinner 5`] = ` "
-
- +
+ +

Hello world !