From a7e6337d971fd43eb77f6bb3f7693b810efc4252 Mon Sep 17 00:00:00 2001 From: JF-Cozy Date: Wed, 28 Jun 2023 11:49:05 +0200 Subject: [PATCH] feat: Deprecates some component BREAKING CHANGE: This is the list of deprecated component `ActionMenu`, `Alerter`, `BottomDrawer`, `Button`, `ButtonAction`, `Chip`, `CompositeRow`, `GridItem`, `Infos`, `InfosCarrousel`, `InlineCard`, `IntentModal`, `IntentOpener`, `Media`, `Menus`, `Modal`, `NarrowContent`, `Overlay`, `PercentageBar`, `PercentageLine`, `PushClientButton`, `QuotaAlert`, `Radio`, `RaisedList`, `ViewStack` These components are now in a `deprecated` subfolder. Use this codemods to migrate: ``` $ yarn global add @cozy/codemods $ jscodeshift -t $(yarn global dir)/node_modules/@cozy/codemods/src/transforms/transform-ui-deprecated-imports.js src --parser babel --ignore-pattern=src/targets/ --extensions js,jsx ``` --- docs/README.md | 2 +- docs/components/Wrapper.jsx | 2 +- docs/styleguide.config.js | 50 +- .../Actions/locales/withActionsLocales.jsx | 4 +- react/ActionsMenu/ActionsMenuWrapper.jsx | 2 +- react/Banner/Readme.md | 2 +- react/Card/Readme.md | 2 +- .../AddContact/AddContactContent.jsx | 2 +- react/CozyDialogs/Readme.md | 8 +- react/CozyTheme/Readme.md | 2 +- react/DateMonthPicker/Readme.md | 4 +- react/Dialog/Readme.md | 6 +- react/Empty/Readme.md | 2 +- react/Field/Readme.md | 2 +- react/FilePicker/FilePickerFooter.jsx | 2 +- react/FilePicker/Readme.md | 2 +- react/Filename/index.jsx | 2 +- react/Hero/Readme.md | 2 +- react/HistoryRow/index.jsx | 2 +- react/Input/Readme.md | 2 +- react/IntentWrapper/index.jsx | 2 +- react/Labs/CollectionField/index.jsx | 2 +- react/LoadMore/index.jsx | 2 +- react/MuiCozyTheme/List/Readme.md | 2 +- .../ListItem/ListItemBase/Renaming/helpers.js | 2 +- react/MuiCozyTheme/Switch/Readme.md | 2 +- react/NestedSelect/Modal.jsx | 2 +- react/NestedSelect/NestedSelect.md | 2 +- react/Overlay/styles.styl | 4 - react/PasswordExample/index.jsx | 2 +- react/PushClientButton/styles.styl | 4 - react/Radio/styles.styl | 4 - react/SelectBox/Readme.md | 2 +- react/SelectionBar/SelectionBarMore.jsx | 2 +- react/UploadQueue/index.jsx | 4 +- react/Viewer/Footer/DownloadButton.jsx | 2 +- react/Viewer/Footer/ForwardButton.jsx | 2 +- react/Viewer/Footer/helpers.js | 2 +- react/Viewer/NoViewer/DownloadButton.jsx | 2 +- .../__snapshots__/NoViewer.spec.jsx.snap | 2 +- react/Viewer/Panel/ActionMenuDesktop.jsx | 2 +- react/Viewer/Panel/Certifications.jsx | 2 +- react/Viewer/Readme.md | 4 +- .../Viewer/ViewersByFile/NoNetworkViewer.jsx | 2 +- .../Viewer/ViewersByFile/OnlyOfficeViewer.jsx | 2 +- .../Viewer/ViewersByFile/PdfMobileViewer.jsx | 4 +- react/Viewer/ViewersByFile/ShortcutViewer.jsx | 2 +- .../ShortcutViewer.spec.jsx.snap | 2 +- react/Viewer/components/PdfToolbarButton.jsx | 2 +- react/Viewer/components/Toolbar.jsx | 2 +- react/Wizard/Readme.md | 2 +- react/Wizard/index.jsx | 2 +- react/__snapshots__/examples.spec.jsx.snap | 456 ++---------------- .../ActionMenu/ActionMenuEffects.ts | 4 +- .../ActionMenu/ActionMenuHeader.jsx | 0 .../ActionMenu/ActionMenuItem.jsx | 2 +- .../ActionMenu/ActionMenuItemWrapper.jsx | 6 +- .../ActionMenu/ActionMenuRadio.jsx | 0 .../ActionMenu/ActionMenuWithClose.jsx | 0 .../ActionMenu/ActionMenuWrapper.jsx | 6 +- .../ActionMenu/Actions/ActionsItems.jsx | 2 +- .../ActionMenu/Actions/call.js | 4 +- .../ActionMenu/Actions/emailTo.js | 4 +- .../ActionMenu/Actions/helpers.js | 0 .../ActionMenu/Actions/helpers.spec.js | 0 .../{ => deprecated}/ActionMenu/Actions/hr.js | 0 .../ActionMenu/Actions/index.js | 0 .../ActionMenu/Actions/locales/en.json | 0 .../ActionMenu/Actions/locales/fr.json | 0 .../Actions/locales/withActionsLocales.jsx | 2 +- .../ActionMenu/Actions/modify.js | 6 +- .../ActionMenu/Actions/smsTo.js | 4 +- .../ActionMenu/Actions/viewInContacts.js | 6 +- .../ActionMenu/NotInlineWrapper.jsx | 2 +- react/{ => deprecated}/ActionMenu/Readme.md | 8 +- .../__snapshots__/index.spec.jsx.snap | 0 react/{ => deprecated}/ActionMenu/index.jsx | 4 +- .../ActionMenu/index.spec.jsx | 12 +- react/{ => deprecated}/ActionMenu/styles.styl | 2 +- react/{ => deprecated}/Alerter/Alert.jsx | 0 react/{ => deprecated}/Alerter/Readme.md | 6 +- .../__snapshots__/alerter.spec.js.snap | 24 +- .../{ => deprecated}/Alerter/alerter.spec.js | 0 react/{ => deprecated}/Alerter/index.jsx | 2 +- react/{ => deprecated}/Alerter/styles.styl | 6 +- react/{ => deprecated}/BottomDrawer/Readme.md | 2 +- react/{ => deprecated}/BottomDrawer/index.jsx | 0 .../{ => deprecated}/BottomDrawer/styles.styl | 0 react/{ => deprecated}/Button/Readme.md | 32 +- react/{ => deprecated}/Button/index.jsx | 4 +- react/{ => deprecated}/Button/styles.styl | 2 +- react/{ => deprecated}/ButtonAction/index.jsx | 2 +- .../{ => deprecated}/ButtonAction/styles.styl | 2 +- react/{ => deprecated}/Chip/Readme.md | 20 +- react/{ => deprecated}/Chip/index.jsx | 0 react/{ => deprecated}/Chip/styles.styl | 2 +- react/{ => deprecated}/CompositeRow/Readme.md | 6 +- react/{ => deprecated}/CompositeRow/index.jsx | 2 +- .../{ => deprecated}/CompositeRow/styles.styl | 0 react/{Labs => deprecated}/GridItem/Readme.md | 2 +- react/{Labs => deprecated}/GridItem/index.jsx | 0 .../{Labs => deprecated}/GridItem/styles.styl | 0 react/{ => deprecated}/Infos/Readme.md | 4 +- react/{ => deprecated}/Infos/index.jsx | 12 +- react/{ => deprecated}/Infos/styles.styl | 0 .../{ => deprecated}/InfosCarrousel/Readme.md | 12 +- .../{ => deprecated}/InfosCarrousel/index.jsx | 8 +- .../InfosCarrousel/index.spec.jsx | 4 +- .../InfosCarrousel/styles.styl | 0 react/{ => deprecated}/InlineCard/Readme.md | 2 +- react/{ => deprecated}/InlineCard/index.jsx | 0 react/{ => deprecated}/InlineCard/styles.styl | 0 .../IntentModal/IntentModal.jsx | 4 +- .../IntentModal/IntentModal.md | 2 +- react/{ => deprecated}/IntentModal/index.js | 0 .../{ => deprecated}/IntentModal/styles.styl | 0 .../IntentOpener/IntentOpener.jsx | 2 +- .../IntentOpener/IntentOpener.md | 2 +- react/{ => deprecated}/IntentOpener/index.js | 0 react/{ => deprecated}/Media/Media.jsx | 0 react/{ => deprecated}/Media/Readme.md | 6 +- react/{ => deprecated}/Media/index.js | 0 react/{ => deprecated}/Media/styles.styl | 2 +- .../Menus/Readme.md | 9 +- .../Menus/index.js | 2 +- .../Modal/AnimatedContentHeader.jsx | 0 .../Modal/ModalBackButton.jsx | 6 +- react/{ => deprecated}/Modal/ModalButtons.jsx | 2 +- react/{ => deprecated}/Modal/ModalContent.jsx | 0 react/{ => deprecated}/Modal/ModalCross.jsx | 8 +- react/{ => deprecated}/Modal/ModalEffects.ts | 2 +- react/{ => deprecated}/Modal/ModalFooter.jsx | 0 react/{ => deprecated}/Modal/ModalHeader.jsx | 0 react/{ => deprecated}/Modal/ModalSection.jsx | 0 react/{ => deprecated}/Modal/Readme.md | 38 +- react/{ => deprecated}/Modal/index.jsx | 4 +- react/{ => deprecated}/Modal/index.spec.jsx | 5 +- react/{ => deprecated}/Modal/styles.styl | 6 +- .../{ => deprecated}/NarrowContent/Readme.md | 2 +- .../{ => deprecated}/NarrowContent/index.jsx | 0 .../NarrowContent/styles.styl | 0 react/{ => deprecated}/Overlay/Readme.md | 4 +- react/{ => deprecated}/Overlay/index.jsx | 0 react/deprecated/Overlay/styles.styl | 4 + .../{ => deprecated}/PercentageBar/Readme.md | 2 +- .../{ => deprecated}/PercentageBar/index.jsx | 0 .../PercentageBar/styles.styl | 0 .../PercentageLine/PercentageLine.styl | 0 .../{ => deprecated}/PercentageLine/Readme.md | 2 +- .../{ => deprecated}/PercentageLine/index.jsx | 0 .../PushClientButton/Readme.md | 2 +- .../PushClientButton/index.jsx | 4 +- .../PushClientButton/index.spec.jsx | 2 +- react/deprecated/PushClientButton/styles.styl | 4 + react/{ => deprecated}/QuotaAlert/Readme.md | 4 +- react/{ => deprecated}/QuotaAlert/index.jsx | 6 +- .../QuotaAlert/locales/en.json | 0 .../QuotaAlert/locales/fr.json | 0 react/{ => deprecated}/Radio/Readme.md | 6 +- react/{ => deprecated}/Radio/index.jsx | 2 +- react/{ => deprecated}/Radio/index.spec.jsx | 4 +- react/deprecated/Radio/styles.styl | 4 + .../RaisedList/README.md | 10 +- .../RaisedList/index.js | 1 + .../{ => deprecated}/ViewStack/ModalStack.jsx | 0 react/{ => deprecated}/ViewStack/Readme.md | 2 +- .../{ => deprecated}/ViewStack/ViewStack.jsx | 0 react/{ => deprecated}/ViewStack/context.js | 0 react/{ => deprecated}/ViewStack/example.jsx | 0 react/{ => deprecated}/ViewStack/hooks.js | 0 react/{ => deprecated}/ViewStack/index.js | 0 .../{ => deprecated}/ViewStack/index.spec.jsx | 0 react/deprecated/readme.md | 1 + react/examples.spec.jsx | 10 - react/hooks/useConfirmExit/Readme.md | 5 +- react/hooks/useConfirmExit/index.jsx | 2 +- react/index.js | 32 +- stylus/cozy-ui/build.styl | 6 +- 178 files changed, 350 insertions(+), 735 deletions(-) delete mode 100644 react/Overlay/styles.styl delete mode 100644 react/PushClientButton/styles.styl delete mode 100644 react/Radio/styles.styl rename react/{ => deprecated}/ActionMenu/ActionMenuEffects.ts (89%) rename react/{ => deprecated}/ActionMenu/ActionMenuHeader.jsx (100%) rename react/{ => deprecated}/ActionMenu/ActionMenuItem.jsx (95%) rename react/{ => deprecated}/ActionMenu/ActionMenuItemWrapper.jsx (92%) rename react/{ => deprecated}/ActionMenu/ActionMenuRadio.jsx (100%) rename react/{ => deprecated}/ActionMenu/ActionMenuWithClose.jsx (100%) rename react/{ => deprecated}/ActionMenu/ActionMenuWrapper.jsx (84%) rename react/{ => deprecated}/ActionMenu/Actions/ActionsItems.jsx (96%) rename react/{ => deprecated}/ActionMenu/Actions/call.js (87%) rename react/{ => deprecated}/ActionMenu/Actions/emailTo.js (89%) rename react/{ => deprecated}/ActionMenu/Actions/helpers.js (100%) rename react/{ => deprecated}/ActionMenu/Actions/helpers.spec.js (100%) rename react/{ => deprecated}/ActionMenu/Actions/hr.js (100%) rename react/{ => deprecated}/ActionMenu/Actions/index.js (100%) rename react/{ => deprecated}/ActionMenu/Actions/locales/en.json (100%) rename react/{ => deprecated}/ActionMenu/Actions/locales/fr.json (100%) rename react/{ => deprecated}/ActionMenu/Actions/locales/withActionsLocales.jsx (70%) rename react/{ => deprecated}/ActionMenu/Actions/modify.js (89%) rename react/{ => deprecated}/ActionMenu/Actions/smsTo.js (88%) rename react/{ => deprecated}/ActionMenu/Actions/viewInContacts.js (89%) rename react/{ => deprecated}/ActionMenu/NotInlineWrapper.jsx (95%) rename react/{ => deprecated}/ActionMenu/Readme.md (96%) rename react/{ => deprecated}/ActionMenu/__snapshots__/index.spec.jsx.snap (100%) rename react/{ => deprecated}/ActionMenu/index.jsx (96%) rename react/{ => deprecated}/ActionMenu/index.spec.jsx (92%) rename react/{ => deprecated}/ActionMenu/styles.styl (84%) rename react/{ => deprecated}/Alerter/Alert.jsx (100%) rename react/{ => deprecated}/Alerter/Readme.md (91%) rename react/{ => deprecated}/Alerter/__snapshots__/alerter.spec.js.snap (55%) rename react/{ => deprecated}/Alerter/alerter.spec.js (100%) rename react/{ => deprecated}/Alerter/index.jsx (98%) rename react/{ => deprecated}/Alerter/styles.styl (80%) rename react/{ => deprecated}/BottomDrawer/Readme.md (93%) rename react/{ => deprecated}/BottomDrawer/index.jsx (100%) rename react/{ => deprecated}/BottomDrawer/styles.styl (100%) rename react/{ => deprecated}/Button/Readme.md (86%) rename react/{ => deprecated}/Button/index.jsx (97%) rename react/{ => deprecated}/Button/styles.styl (97%) rename react/{ => deprecated}/ButtonAction/index.jsx (98%) rename react/{ => deprecated}/ButtonAction/styles.styl (89%) rename react/{ => deprecated}/Chip/Readme.md (87%) rename react/{ => deprecated}/Chip/index.jsx (100%) rename react/{ => deprecated}/Chip/styles.styl (96%) rename react/{ => deprecated}/CompositeRow/Readme.md (92%) rename react/{ => deprecated}/CompositeRow/index.jsx (98%) rename react/{ => deprecated}/CompositeRow/styles.styl (100%) rename react/{Labs => deprecated}/GridItem/Readme.md (89%) rename react/{Labs => deprecated}/GridItem/index.jsx (100%) rename react/{Labs => deprecated}/GridItem/styles.styl (100%) rename react/{ => deprecated}/Infos/Readme.md (91%) rename react/{ => deprecated}/Infos/index.jsx (92%) rename react/{ => deprecated}/Infos/styles.styl (100%) rename react/{ => deprecated}/InfosCarrousel/Readme.md (80%) rename react/{ => deprecated}/InfosCarrousel/index.jsx (95%) rename react/{ => deprecated}/InfosCarrousel/index.spec.jsx (96%) rename react/{ => deprecated}/InfosCarrousel/styles.styl (100%) rename react/{ => deprecated}/InlineCard/Readme.md (67%) rename react/{ => deprecated}/InlineCard/index.jsx (100%) rename react/{ => deprecated}/InlineCard/styles.styl (100%) rename react/{ => deprecated}/IntentModal/IntentModal.jsx (95%) rename react/{ => deprecated}/IntentModal/IntentModal.md (92%) rename react/{ => deprecated}/IntentModal/index.js (100%) rename react/{ => deprecated}/IntentModal/styles.styl (100%) rename react/{ => deprecated}/IntentOpener/IntentOpener.jsx (96%) rename react/{ => deprecated}/IntentOpener/IntentOpener.md (85%) rename react/{ => deprecated}/IntentOpener/index.js (100%) rename react/{ => deprecated}/Media/Media.jsx (100%) rename react/{ => deprecated}/Media/Readme.md (88%) rename react/{ => deprecated}/Media/index.js (100%) rename react/{ => deprecated}/Media/styles.styl (81%) rename react/{MuiCozyTheme => deprecated}/Menus/Readme.md (54%) rename react/{MuiCozyTheme => deprecated}/Menus/index.js (98%) rename react/{ => deprecated}/Modal/AnimatedContentHeader.jsx (100%) rename react/{ => deprecated}/Modal/ModalBackButton.jsx (83%) rename react/{ => deprecated}/Modal/ModalButtons.jsx (96%) rename react/{ => deprecated}/Modal/ModalContent.jsx (100%) rename react/{ => deprecated}/Modal/ModalCross.jsx (78%) rename react/{ => deprecated}/Modal/ModalEffects.ts (94%) rename react/{ => deprecated}/Modal/ModalFooter.jsx (100%) rename react/{ => deprecated}/Modal/ModalHeader.jsx (100%) rename react/{ => deprecated}/Modal/ModalSection.jsx (100%) rename react/{ => deprecated}/Modal/Readme.md (93%) rename react/{ => deprecated}/Modal/index.jsx (99%) rename react/{ => deprecated}/Modal/index.spec.jsx (94%) rename react/{ => deprecated}/Modal/styles.styl (94%) rename react/{ => deprecated}/NarrowContent/Readme.md (94%) rename react/{ => deprecated}/NarrowContent/index.jsx (100%) rename react/{ => deprecated}/NarrowContent/styles.styl (100%) rename react/{ => deprecated}/Overlay/Readme.md (86%) rename react/{ => deprecated}/Overlay/index.jsx (100%) create mode 100644 react/deprecated/Overlay/styles.styl rename react/{ => deprecated}/PercentageBar/Readme.md (83%) rename react/{ => deprecated}/PercentageBar/index.jsx (100%) rename react/{ => deprecated}/PercentageBar/styles.styl (100%) rename react/{ => deprecated}/PercentageLine/PercentageLine.styl (100%) rename react/{ => deprecated}/PercentageLine/Readme.md (76%) rename react/{ => deprecated}/PercentageLine/index.jsx (100%) rename react/{ => deprecated}/PushClientButton/Readme.md (92%) rename react/{ => deprecated}/PushClientButton/index.jsx (92%) rename react/{ => deprecated}/PushClientButton/index.spec.jsx (93%) create mode 100644 react/deprecated/PushClientButton/styles.styl rename react/{ => deprecated}/QuotaAlert/Readme.md (88%) rename react/{ => deprecated}/QuotaAlert/index.jsx (92%) rename react/{ => deprecated}/QuotaAlert/locales/en.json (100%) rename react/{ => deprecated}/QuotaAlert/locales/fr.json (100%) rename react/{ => deprecated}/Radio/Readme.md (93%) rename react/{ => deprecated}/Radio/index.jsx (96%) rename react/{ => deprecated}/Radio/index.spec.jsx (98%) create mode 100644 react/deprecated/Radio/styles.styl rename react/{MuiCozyTheme => deprecated}/RaisedList/README.md (79%) rename react/{MuiCozyTheme => deprecated}/RaisedList/index.js (99%) rename react/{ => deprecated}/ViewStack/ModalStack.jsx (100%) rename react/{ => deprecated}/ViewStack/Readme.md (81%) rename react/{ => deprecated}/ViewStack/ViewStack.jsx (100%) rename react/{ => deprecated}/ViewStack/context.js (100%) rename react/{ => deprecated}/ViewStack/example.jsx (100%) rename react/{ => deprecated}/ViewStack/hooks.js (100%) rename react/{ => deprecated}/ViewStack/index.js (100%) rename react/{ => deprecated}/ViewStack/index.spec.jsx (100%) create mode 100644 react/deprecated/readme.md diff --git a/docs/README.md b/docs/README.md index 9ebc22adff..e980727025 100644 --- a/docs/README.md +++ b/docs/README.md @@ -34,7 +34,7 @@ yarn add cozy-ui If you use the transpiled components (from `cozy-ui/transpiled/react`), you need to import the stylesheet (once): ``` -import Button from 'cozy-ui/transpiled/react/Button' +import Button from 'cozy-ui/transpiled/react/deprecated/Button' import 'cozy-ui/transpiled/react/stylesheet.css' +
@@ -425,160 +425,6 @@ exports[`BarButton should render examples: BarButton 4`] = ` " `; -exports[`Button should render examples: Button 1`] = ` -"
-
-

-

-

-

-

-

-

-

-
-
" -`; - -exports[`Button should render examples: Button 2`] = ` -"
-
-

-

-

-

-

-
-
" -`; - -exports[`Button should render examples: Button 3`] = ` -"
-
-
" -`; - -exports[`Button should render examples: Button 4`] = ` -"
-
-

-

-

-

-
-
" -`; - -exports[`Button should render examples: Button 5`] = ` -"
-
-

-
-
" -`; - -exports[`Button should render examples: Button 6`] = `"
"`; - -exports[`Button should render examples: Button 7`] = ` -"
" -`; - -exports[`Button should render examples: Button 8`] = `"
"`; - -exports[`Button should render examples: Button 9`] = ` -"
-
Go to Cozy website
-
" -`; - -exports[`Button should render examples: Button 10`] = ` -"
-
-
" -`; - -exports[`Button should render examples: Button 11`] = ` -"
-
-
" -`; - -exports[`Button should render examples: Button 12`] = ` -"
-
-
" -`; - -exports[`Button should render examples: Button 13`] = ` -"
-
-

-

-

-

-

-

-
-
" -`; - -exports[`Button should render examples: Button 14`] = ` -"
-
-

Link to Cozy.io

-

Link to Cozy.io

-

Link to Cozy.io

-

Link to Cozy.io

-

Link to Cozy.io

-
-
" -`; - -exports[`Button should render examples: Button 15`] = ` -"
-
I'm a (false) NavLink
-
" -`; - exports[`Buttons should render examples: Buttons 1`] = ` "
@@ -875,7 +721,7 @@ exports[`Card should render examples: Card 1`] = ` "
This is a card
-

This is some card content. Content can be small or huge.

+

This is some card content. Content can be small or huge.

" `; @@ -1128,41 +974,6 @@ exports[`Chips should render examples: Chips 2`] = `
" `; -exports[`CompositeRow should render examples: CompositeRow 1`] = ` -"
-
-
Variant selector
-
-
-
-
-
-
-
-
-
-

Primary text

Secondary Text -
-
-
12,15€
-
-
- -
-
-
-
-
Fnac
-
Fnac
-
-
Extra information to the right of the card
-
-
-
-
-
" -`; - exports[`ContactsList should render examples: ContactsList 1`] = ` "
@@ -2701,134 +2512,134 @@ exports[`Hero should render examples: Hero 1`] = `

Automatic follow-up of your medical expenses

-

+

" `; exports[`HistoryRow should render examples: HistoryRow 1`] = ` "
-
+
-
+
-
+
12/12/12 12:12
Current Version
10ko
-
+
-
+
-
+
-
+
12/12/12 12:10
9ko
-
+
-
+
-
+
-
+
12/12/12 12:09
V2
9ko
-
+
-
+
-
+
-
+
12/12/12 12:07
9ko
-
+
-
+
-
+
-
+
12/12/12 12:05
9ko
-
+
-
+
-
+
-
+
12/12/12 12:04
9ko
-
+
-
+
-
+
-
+
12/12/12 12:03
V1
9ko
-
+
@@ -2854,125 +2665,6 @@ exports[`IconStack should render examples: IconStack 1`] = `
" `; -exports[`Infos should render examples: Infos 1`] = ` -"
-
-
-
Variant selector
-
-
-
-
-
-
Date of birth
-

10 December 1815

-
-
-
-
-
-
Variant selector
-
-
-
-
-
-
Date of birth
-

10 December 1815

-
-
-
-
-
-
-
Variant selector
-
-
-
-
-
-
Date of birth
-

10 December 1815

-
-
-
-
-
-
-
-
" -`; - -exports[`InfosCarrousel should render examples: InfosCarrousel 1`] = ` -"
-

-
-
-
-
-
-
-
-
-
News 1
-

Breaking news 1

-
-
-
-
-
-
-
-
-
-
-
-
-
News 2
-

Breaking news 2

-
-
-
-
-
-
-
-
-
-
-
-
-
" -`; - -exports[`InfosCarrousel should render examples: InfosCarrousel 2`] = ` -"
-
-
-
-
-
-
-
-
-
-
News 1
-

Breaking news 1

-
-
-
-
-
-
-
-
-
-
-
" -`; - -exports[`InlineCard should render examples: InlineCard 1`] = `"
I am an inline card
"`; - exports[`InputGroup should render examples: InputGroup 1`] = ` "
@@ -3122,8 +2814,8 @@ exports[`Labs/CollectionField should render examples: Labs/CollectionField 1`] =
-
-
+
+
" @@ -3148,45 +2840,6 @@ exports[`ListItemText should render examples: ListItemText 3`] = `
" `; -exports[`Media should render examples: Media 1`] = ` -"
-
-
- -
-
-

Augusta Ada King-Noel, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852) was an English mathematician and writer, chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine. She was the first to recognise that the machine had applications beyond pure calculation, and published the first algorithm intended to be carried out by such a machine. As a result, she is often regarded as the first to recognise the full potential of a \\"computing machine\\" and the first computer programmer.

-
-
-
" -`; - -exports[`Media should render examples: Media 2`] = ` -"
-
-
- -
-
-

Augusta Ada King-Noel, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852) was an English mathematician and writer, chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine. She was the first to recognise that the machine had applications beyond pure calculation, and published the first algorithm intended to be carried out by such a machine. As a result, she is often regarded as the first to recognise the full potential of a \\"computing machine\\" and the first computer programmer.

-
-
-
" -`; - -exports[`Media should render examples: Media 3`] = ` -"
-
-
- -
-
-

Augusta Ada King-Noel, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852) was an English mathematician and writer, chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine. She was the first to recognise that the machine had applications beyond pure calculation, and published the first algorithm intended to be carried out by such a machine. As a result, she is often regarded as the first to recognise the full potential of a \\"computing machine\\" and the first computer programmer.

-
-
-
" -`; - exports[`MuiCozyTheme/Switch should render examples: MuiCozyTheme/Switch 1`] = ` "
@@ -3203,18 +2856,6 @@ exports[`MuiCozyTheme/Switch should render examples: MuiCozyTheme/Switch 1`] = `
" `; -exports[`NarrowContent should render examples: NarrowContent 1`] = ` -"
-
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non, soluta. Voluptas ipsa ullam a totam veniam itaque, iusto ducimus, sequi eveniet debitis recusandae incidunt, fugiat architecto et distinctio, optio! Deserunt.
-
Velit neque, repellendus explicabo voluptates veritatis itaque saepe nemo et! Impedit veniam, voluptates. Aliquid laborum voluptate, non commodi magnam, soluta perferendis sapiente nemo harum, eligendi saepe beatae cum quam fugiat.
-
Quam tempora, similique pariatur, vitae atque ducimus. Quidem tempore, nulla est. Dolor quisquam quia placeat molestiae, nulla beatae voluptatem labore sit mollitia repudiandae animi iure maxime maiores quidem delectus ad.
-
Iste reiciendis reprehenderit et similique, rem. Architecto quasi debitis hic, voluptatum in possimus soluta sit, praesentium nisi provident pariatur culpa mollitia repellendus earum reiciendis animi. Sunt voluptates, assumenda esse perspiciatis.
-
Alias quae sequi aliquid sed, nobis veniam magnam rerum amet velit dignissimos dicta a dolorem! Dolorem soluta perferendis error, voluptate dolorum quas, fuga ad repellendus tenetur amet sit assumenda dignissimos.
-
-
" -`; - exports[`OrderedList should render examples: OrderedList 1`] = ` "
    @@ -3277,24 +2918,9 @@ exports[`Paper should render examples: Paper 1`] = `
" `; -exports[`PasswordExample should render examples: PasswordExample 1`] = `"
Cl4udest1Nu@ge
"`; +exports[`PasswordExample should render examples: PasswordExample 1`] = `"
Cl4udest1Nu@ge
"`; -exports[`PasswordExample should render examples: PasswordExample 2`] = `"
Claude est le meilleur nuage !
"`; - -exports[`PercentageBar should render examples: PercentageBar 1`] = ` -"
50.00%
-
-
-
-
-
-
" -`; - -exports[`PercentageLine should render examples: PercentageLine 1`] = ` -"
50.00%
-
" -`; +exports[`PasswordExample should render examples: PasswordExample 2`] = `"
Claude est le meilleur nuage !
"`; exports[`PieChart should render examples: PieChart 1`] = ` "
@@ -3367,12 +2993,6 @@ exports[`ProgressionBanner should render examples: ProgressionBanner 1`] = `
" `; -exports[`QuotaAlert should render examples: QuotaAlert 1`] = ` -"
-
-
" -`; - exports[`Radios should render examples: Radios 1`] = ` "
@@ -3940,7 +3560,7 @@ exports[`Wizard should render examples: Wizard 1`] = ` "

-
+

Connect to your Cozy

@@ -3948,9 +3568,9 @@ exports[`Wizard should render examples: Wizard 1`] = `

There is an error

-
+
" diff --git a/react/ActionMenu/ActionMenuEffects.ts b/react/deprecated/ActionMenu/ActionMenuEffects.ts similarity index 89% rename from react/ActionMenu/ActionMenuEffects.ts rename to react/deprecated/ActionMenu/ActionMenuEffects.ts index 1a2669b5f2..7e474caa65 100644 --- a/react/ActionMenu/ActionMenuEffects.ts +++ b/react/deprecated/ActionMenu/ActionMenuEffects.ts @@ -6,8 +6,8 @@ import { Theme, useTheme } from '@material-ui/core' import { isFlagshipApp } from 'cozy-device-helper' -import { getCssVariableValue } from '../utils/color' -import { useSetFlagshipUI } from '../hooks/useSetFlagshipUi/useSetFlagshipUI' +import { getCssVariableValue } from '../../utils/color' +import { useSetFlagshipUI } from '../../hooks/useSetFlagshipUi/useSetFlagshipUI' const getBottomBackground = (theme: Theme): string => { const sidebar = document.getElementById('sidebar') diff --git a/react/ActionMenu/ActionMenuHeader.jsx b/react/deprecated/ActionMenu/ActionMenuHeader.jsx similarity index 100% rename from react/ActionMenu/ActionMenuHeader.jsx rename to react/deprecated/ActionMenu/ActionMenuHeader.jsx diff --git a/react/ActionMenu/ActionMenuItem.jsx b/react/deprecated/ActionMenu/ActionMenuItem.jsx similarity index 95% rename from react/ActionMenu/ActionMenuItem.jsx rename to react/deprecated/ActionMenu/ActionMenuItem.jsx index a02cf973d6..ea4b0ad0c4 100644 --- a/react/ActionMenu/ActionMenuItem.jsx +++ b/react/deprecated/ActionMenu/ActionMenuItem.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import cx from 'classnames' import { Media, Bd, Img } from '../Media' -import { spacingProp } from '../Stack' +import { spacingProp } from '../../Stack' import styles from './styles.styl' diff --git a/react/ActionMenu/ActionMenuItemWrapper.jsx b/react/deprecated/ActionMenu/ActionMenuItemWrapper.jsx similarity index 92% rename from react/ActionMenu/ActionMenuItemWrapper.jsx rename to react/deprecated/ActionMenu/ActionMenuItemWrapper.jsx index ae242718a9..060e1c756d 100644 --- a/react/ActionMenu/ActionMenuItemWrapper.jsx +++ b/react/deprecated/ActionMenu/ActionMenuItemWrapper.jsx @@ -2,9 +2,9 @@ import React from 'react' import cx from 'classnames' import PropTypes from 'prop-types' -import { makeStyles } from '../styles' -import Typography from '../Typography' -import Icon, { iconPropType } from '../Icon' +import { makeStyles } from '../../styles' +import Typography from '../../Typography' +import Icon, { iconPropType } from '../../Icon' import { ActionMenuItem } from '.' const useStyles = makeStyles(theme => ({ diff --git a/react/ActionMenu/ActionMenuRadio.jsx b/react/deprecated/ActionMenu/ActionMenuRadio.jsx similarity index 100% rename from react/ActionMenu/ActionMenuRadio.jsx rename to react/deprecated/ActionMenu/ActionMenuRadio.jsx diff --git a/react/ActionMenu/ActionMenuWithClose.jsx b/react/deprecated/ActionMenu/ActionMenuWithClose.jsx similarity index 100% rename from react/ActionMenu/ActionMenuWithClose.jsx rename to react/deprecated/ActionMenu/ActionMenuWithClose.jsx diff --git a/react/ActionMenu/ActionMenuWrapper.jsx b/react/deprecated/ActionMenu/ActionMenuWrapper.jsx similarity index 84% rename from react/ActionMenu/ActionMenuWrapper.jsx rename to react/deprecated/ActionMenu/ActionMenuWrapper.jsx index bbb1b813f7..cce5d6092f 100644 --- a/react/ActionMenu/ActionMenuWrapper.jsx +++ b/react/deprecated/ActionMenu/ActionMenuWrapper.jsx @@ -1,8 +1,8 @@ import React from 'react' -import useBreakpoints from '../hooks/useBreakpoints' -import isTesting from '../helpers/isTesting' -import BottomSheet from '../BottomSheet' +import useBreakpoints from '../../hooks/useBreakpoints' +import isTesting from '../../helpers/isTesting' +import BottomSheet from '../../BottomSheet' import NotInlineWrapper from './NotInlineWrapper' diff --git a/react/ActionMenu/Actions/ActionsItems.jsx b/react/deprecated/ActionMenu/Actions/ActionsItems.jsx similarity index 96% rename from react/ActionMenu/Actions/ActionsItems.jsx rename to react/deprecated/ActionMenu/Actions/ActionsItems.jsx index 747372333c..f78a8bd1f8 100644 --- a/react/ActionMenu/Actions/ActionsItems.jsx +++ b/react/deprecated/ActionMenu/Actions/ActionsItems.jsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react' import PropTypes from 'prop-types' -import { useI18n } from '../../I18n' +import { useI18n } from '../../../I18n' import { getActionName, getOnlyNeededActions } from './helpers' const ActionsItems = ({ doc, actions, isLast, setIsRenaming, onClose }) => { diff --git a/react/ActionMenu/Actions/call.js b/react/deprecated/ActionMenu/Actions/call.js similarity index 87% rename from react/ActionMenu/Actions/call.js rename to react/deprecated/ActionMenu/Actions/call.js index a51852d1d2..76d75c8cce 100644 --- a/react/ActionMenu/Actions/call.js +++ b/react/deprecated/ActionMenu/Actions/call.js @@ -1,7 +1,7 @@ import React from 'react' -import { useI18n } from '../../I18n' -import TelephoneIcon from '../../Icons/Telephone' +import { useI18n } from '../../../I18n' +import TelephoneIcon from '../../../Icons/Telephone' import ActionMenuItemWrapper from '../ActionMenuItemWrapper' import withActionsLocales from './locales/withActionsLocales' diff --git a/react/ActionMenu/Actions/emailTo.js b/react/deprecated/ActionMenu/Actions/emailTo.js similarity index 89% rename from react/ActionMenu/Actions/emailTo.js rename to react/deprecated/ActionMenu/Actions/emailTo.js index fb4e882981..c3c9eb9214 100644 --- a/react/ActionMenu/Actions/emailTo.js +++ b/react/deprecated/ActionMenu/Actions/emailTo.js @@ -1,7 +1,7 @@ import React from 'react' -import { useI18n } from '../../I18n' -import EmailIcon from '../../Icons/Email' +import { useI18n } from '../../../I18n' +import EmailIcon from '../../../Icons/Email' import ActionMenuItemWrapper from '../ActionMenuItemWrapper' import withActionsLocales from './locales/withActionsLocales' diff --git a/react/ActionMenu/Actions/helpers.js b/react/deprecated/ActionMenu/Actions/helpers.js similarity index 100% rename from react/ActionMenu/Actions/helpers.js rename to react/deprecated/ActionMenu/Actions/helpers.js diff --git a/react/ActionMenu/Actions/helpers.spec.js b/react/deprecated/ActionMenu/Actions/helpers.spec.js similarity index 100% rename from react/ActionMenu/Actions/helpers.spec.js rename to react/deprecated/ActionMenu/Actions/helpers.spec.js diff --git a/react/ActionMenu/Actions/hr.js b/react/deprecated/ActionMenu/Actions/hr.js similarity index 100% rename from react/ActionMenu/Actions/hr.js rename to react/deprecated/ActionMenu/Actions/hr.js diff --git a/react/ActionMenu/Actions/index.js b/react/deprecated/ActionMenu/Actions/index.js similarity index 100% rename from react/ActionMenu/Actions/index.js rename to react/deprecated/ActionMenu/Actions/index.js diff --git a/react/ActionMenu/Actions/locales/en.json b/react/deprecated/ActionMenu/Actions/locales/en.json similarity index 100% rename from react/ActionMenu/Actions/locales/en.json rename to react/deprecated/ActionMenu/Actions/locales/en.json diff --git a/react/ActionMenu/Actions/locales/fr.json b/react/deprecated/ActionMenu/Actions/locales/fr.json similarity index 100% rename from react/ActionMenu/Actions/locales/fr.json rename to react/deprecated/ActionMenu/Actions/locales/fr.json diff --git a/react/ActionMenu/Actions/locales/withActionsLocales.jsx b/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.jsx similarity index 70% rename from react/ActionMenu/Actions/locales/withActionsLocales.jsx rename to react/deprecated/ActionMenu/Actions/locales/withActionsLocales.jsx index 10e8556eae..c628da07d1 100644 --- a/react/ActionMenu/Actions/locales/withActionsLocales.jsx +++ b/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.jsx @@ -1,4 +1,4 @@ -import withLocales from '../../../I18n/withLocales' +import withLocales from '../../../../I18n/withLocales' import en from './en.json' import fr from './fr.json' diff --git a/react/ActionMenu/Actions/modify.js b/react/deprecated/ActionMenu/Actions/modify.js similarity index 89% rename from react/ActionMenu/Actions/modify.js rename to react/deprecated/ActionMenu/Actions/modify.js index 096651caa6..3e450c96f2 100644 --- a/react/ActionMenu/Actions/modify.js +++ b/react/deprecated/ActionMenu/Actions/modify.js @@ -2,9 +2,9 @@ import React from 'react' import { generateWebLink, useClient } from 'cozy-client' -import Link from '../../Link' -import { useI18n } from '../../I18n' -import PenIcon from '../../Icons/Pen' +import Link from '../../../Link' +import { useI18n } from '../../../I18n' +import PenIcon from '../../../Icons/Pen' import ActionMenuItemWrapper from '../ActionMenuItemWrapper' import withActionsLocales from './locales/withActionsLocales' diff --git a/react/ActionMenu/Actions/smsTo.js b/react/deprecated/ActionMenu/Actions/smsTo.js similarity index 88% rename from react/ActionMenu/Actions/smsTo.js rename to react/deprecated/ActionMenu/Actions/smsTo.js index 44ba21e389..d0e7a681d6 100644 --- a/react/ActionMenu/Actions/smsTo.js +++ b/react/deprecated/ActionMenu/Actions/smsTo.js @@ -1,7 +1,7 @@ import React from 'react' -import { useI18n } from '../../I18n' -import CommentIcon from '../../Icons/Comment' +import { useI18n } from '../../../I18n' +import CommentIcon from '../../../Icons/Comment' import ActionMenuItemWrapper from '../ActionMenuItemWrapper' import withActionsLocales from './locales/withActionsLocales' diff --git a/react/ActionMenu/Actions/viewInContacts.js b/react/deprecated/ActionMenu/Actions/viewInContacts.js similarity index 89% rename from react/ActionMenu/Actions/viewInContacts.js rename to react/deprecated/ActionMenu/Actions/viewInContacts.js index 298d911da6..aee9ec9005 100644 --- a/react/ActionMenu/Actions/viewInContacts.js +++ b/react/deprecated/ActionMenu/Actions/viewInContacts.js @@ -2,9 +2,9 @@ import React from 'react' import { generateWebLink, useClient } from 'cozy-client' -import Link from '../../Link' -import { useI18n } from '../../I18n' -import OpenappIcon from '../../Icons/Openapp' +import Link from '../../../Link' +import { useI18n } from '../../../I18n' +import OpenappIcon from '../../../Icons/Openapp' import ActionMenuItemWrapper from '../ActionMenuItemWrapper' import withActionsLocales from './locales/withActionsLocales' diff --git a/react/ActionMenu/NotInlineWrapper.jsx b/react/deprecated/ActionMenu/NotInlineWrapper.jsx similarity index 95% rename from react/ActionMenu/NotInlineWrapper.jsx rename to react/deprecated/ActionMenu/NotInlineWrapper.jsx index b59e85c1b1..fe592a960f 100644 --- a/react/ActionMenu/NotInlineWrapper.jsx +++ b/react/deprecated/ActionMenu/NotInlineWrapper.jsx @@ -2,7 +2,7 @@ import React, { useState } from 'react' import { usePopper } from 'react-popper' import ClickAwayListener from '@material-ui/core/ClickAwayListener' -import { getCssVariableValue } from '../utils/color' +import { getCssVariableValue } from '../../utils/color' const NotInlineWrapper = ({ anchorElRef, diff --git a/react/ActionMenu/Readme.md b/react/deprecated/ActionMenu/Readme.md similarity index 96% rename from react/ActionMenu/Readme.md rename to react/deprecated/ActionMenu/Readme.md index be9e2c31be..c98460210b 100644 --- a/react/ActionMenu/Readme.md +++ b/react/deprecated/ActionMenu/Readme.md @@ -34,8 +34,8 @@ import DemoProvider from 'cozy-ui/docs/components/DemoProvider' import Variants from 'cozy-ui/docs/components/Variants' import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton' import FileIcon from 'cozy-ui/transpiled/react/Icons/File' -import { ActionMenuItemWrapper, ActionMenuWithClose, ActionsItems } from 'cozy-ui/transpiled/react/ActionMenu' -import { makeActions, hr, modify, call } from 'cozy-ui/transpiled/react/ActionMenu/Actions' +import { ActionMenuItemWrapper, ActionMenuWithClose, ActionsItems } from 'cozy-ui/transpiled/react/deprecated/ActionMenu' +import { makeActions, hr, modify, call } from 'cozy-ui/transpiled/react/deprecated/ActionMenu/Actions' initialState = { showMenu: isTesting() } @@ -85,7 +85,7 @@ const actions = makeActions([ modify, hr, call, customAction ]) ### With a manual creation of the actions ```jsx -import ActionMenu, { ActionMenuItem, ActionMenuRadio, ActionMenuHeader } from 'cozy-ui/transpiled/react/ActionMenu' +import ActionMenu, { ActionMenuItem, ActionMenuRadio, ActionMenuHeader } from 'cozy-ui/transpiled/react/deprecated/ActionMenu' import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton' import Icon from 'cozy-ui/transpiled/react/Icon' import Typography from 'cozy-ui/transpiled/react/Typography' @@ -97,7 +97,7 @@ import Filename from 'cozy-ui/transpiled/react/Filename' import WarningIcon from 'cozy-ui/transpiled/react/Icons/Warning' import Variants from 'cozy-ui/docs/components/Variants' import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs' -import Button from 'cozy-ui/transpiled/react/Button' +import Button from 'cozy-ui/transpiled/react/deprecated/Button' initialState = { menuDisplayed: isTesting(), modalOpened: false } diff --git a/react/ActionMenu/__snapshots__/index.spec.jsx.snap b/react/deprecated/ActionMenu/__snapshots__/index.spec.jsx.snap similarity index 100% rename from react/ActionMenu/__snapshots__/index.spec.jsx.snap rename to react/deprecated/ActionMenu/__snapshots__/index.spec.jsx.snap diff --git a/react/ActionMenu/index.jsx b/react/deprecated/ActionMenu/index.jsx similarity index 96% rename from react/ActionMenu/index.jsx rename to react/deprecated/ActionMenu/index.jsx index 6f7f5173e3..d5a404161f 100644 --- a/react/ActionMenu/index.jsx +++ b/react/deprecated/ActionMenu/index.jsx @@ -2,8 +2,8 @@ import React from 'react' import PropTypes from 'prop-types' import cx from 'classnames' -import createDepreciationLogger from '../helpers/createDepreciationLogger' -import useBreakpoints from '../hooks/useBreakpoints' +import createDepreciationLogger from '../../helpers/createDepreciationLogger' +import useBreakpoints from '../../hooks/useBreakpoints' import ActionMenuWrapper from './ActionMenuWrapper' import { ActionMenuHeader } from './ActionMenuHeader' diff --git a/react/ActionMenu/index.spec.jsx b/react/deprecated/ActionMenu/index.spec.jsx similarity index 92% rename from react/ActionMenu/index.spec.jsx rename to react/deprecated/ActionMenu/index.spec.jsx index 32f22dcc3f..cb7e60c4d0 100644 --- a/react/ActionMenu/index.spec.jsx +++ b/react/deprecated/ActionMenu/index.spec.jsx @@ -3,12 +3,12 @@ import { mount } from 'enzyme' import { render } from '@testing-library/react' import { act } from 'react-dom/test-utils' -import { fixPopperTesting } from '../Popper/testing' -import { BreakpointsProvider } from '../hooks/useBreakpoints' -import Typography from '../Typography' -import Icon from '../Icon' -import FileIcon from '../Icons/File' -import WarningIcon from '../Icons/Warning' +import { fixPopperTesting } from '../../Popper/testing' +import { BreakpointsProvider } from '../../hooks/useBreakpoints' +import Typography from '../../Typography' +import Icon from '../../Icon' +import FileIcon from '../../Icons/File' +import WarningIcon from '../../Icons/Warning' import ActionMenu, { ActionMenuItem, ActionMenuRadio } from '.' diff --git a/react/ActionMenu/styles.styl b/react/deprecated/ActionMenu/styles.styl similarity index 84% rename from react/ActionMenu/styles.styl rename to react/deprecated/ActionMenu/styles.styl index deffb02f32..975ebac1d8 100644 --- a/react/ActionMenu/styles.styl +++ b/react/deprecated/ActionMenu/styles.styl @@ -1,4 +1,4 @@ -@require '../../stylus/components/action-menu' +@require 'components/action-menu' .c-actionmenu @extends $actionmenu diff --git a/react/Alerter/Alert.jsx b/react/deprecated/Alerter/Alert.jsx similarity index 100% rename from react/Alerter/Alert.jsx rename to react/deprecated/Alerter/Alert.jsx diff --git a/react/Alerter/Readme.md b/react/deprecated/Alerter/Readme.md similarity index 91% rename from react/Alerter/Readme.md rename to react/deprecated/Alerter/Readme.md index ae52216bba..16205eeeba 100644 --- a/react/Alerter/Readme.md +++ b/react/deprecated/Alerter/Readme.md @@ -2,7 +2,7 @@ Display notications! Include the `` component somewhere in your app, but only once. After that, you can use the static methods `Alerter.info`, `Alerter.success` and `Alerter.error` to trigger a notification. ```jsx -import Alerter from 'cozy-ui/transpiled/react/Alerter'; +import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'; if (isTesting()) { setTimeout(() => { @@ -24,7 +24,7 @@ if (isTesting()) { The `Alerter` methods support an optionnal second parameter, which can be used to add a button to the notification, with the `buttonText` and `buttonAction` keys: ```jsx -import Alerter from 'cozy-ui/transpiled/react/Alerter'; +import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'; const triggerAlert = () => { Alerter.info("Accept our terms and conditions and subscribe to our newsletter", { buttonText: "ok", @@ -57,7 +57,7 @@ const triggerAlertSuccess = () => { A dismiss function is provided to the `buttonAction` as argument which allow you to dismiss the alert before the duration ends from anywhere in your `buttonAction` code: ```jsx -import Alerter from 'cozy-ui/transpiled/react/Alerter'; +import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'; const triggerAlertWithDismiss = () => { Alerter.info("This is an alert with a dismiss button. Dismiss me ->", { diff --git a/react/Alerter/__snapshots__/alerter.spec.js.snap b/react/deprecated/Alerter/__snapshots__/alerter.spec.js.snap similarity index 55% rename from react/Alerter/__snapshots__/alerter.spec.js.snap rename to react/deprecated/Alerter/__snapshots__/alerter.spec.js.snap index 088ca47411..b3fbc3d047 100644 --- a/react/Alerter/__snapshots__/alerter.spec.js.snap +++ b/react/deprecated/Alerter/__snapshots__/alerter.spec.js.snap @@ -2,17 +2,17 @@ exports[`Alerter component handles dismiss provided to buttonAction 1`] = `

Test alert with button

Test alert with button

Test error alert @@ -59,11 +59,11 @@ exports[`Alerter component renders correctly an error alert 1`] = ` exports[`Alerter component renders correctly an info alert 1`] = `

Test info alert @@ -74,11 +74,11 @@ exports[`Alerter component renders correctly an info alert 1`] = ` exports[`Alerter component renders correctly an success alert 1`] = `

Test success alert diff --git a/react/Alerter/alerter.spec.js b/react/deprecated/Alerter/alerter.spec.js similarity index 100% rename from react/Alerter/alerter.spec.js rename to react/deprecated/Alerter/alerter.spec.js diff --git a/react/Alerter/index.jsx b/react/deprecated/Alerter/index.jsx similarity index 98% rename from react/Alerter/index.jsx rename to react/deprecated/Alerter/index.jsx index 669b1395dc..3994409a18 100644 --- a/react/Alerter/index.jsx +++ b/react/deprecated/Alerter/index.jsx @@ -1,6 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import Portal from '../Portal' +import Portal from '../../Portal' import Alert from './Alert' const MINIMUM_ALERT_DURATION = 2000 diff --git a/react/Alerter/styles.styl b/react/deprecated/Alerter/styles.styl similarity index 80% rename from react/Alerter/styles.styl rename to react/deprecated/Alerter/styles.styl index 4879d7c97e..079b58deb9 100644 --- a/react/Alerter/styles.styl +++ b/react/deprecated/Alerter/styles.styl @@ -1,6 +1,6 @@ -@require '../../stylus/tools/mixins' -@require '../../stylus/components/alerts' -@require '../../stylus/components/button' +@require 'tools/mixins' +@require 'components/alerts' +@require 'components/button' .c-alert @extend $alert diff --git a/react/BottomDrawer/Readme.md b/react/deprecated/BottomDrawer/Readme.md similarity index 93% rename from react/BottomDrawer/Readme.md rename to react/deprecated/BottomDrawer/Readme.md index 81dcf5933f..68c0c42034 100644 --- a/react/BottomDrawer/Readme.md +++ b/react/deprecated/BottomDrawer/Readme.md @@ -1,7 +1,7 @@ Displays content coming up from the bottom of the screen. ```jsx -import BottomDrawer from 'cozy-ui/transpiled/react/BottomDrawer' +import BottomDrawer from 'cozy-ui/transpiled/react/deprecated/BottomDrawer' import Paper from 'cozy-ui/transpiled/react/Paper' import Button from 'cozy-ui/transpiled/react/Buttons' import Typography from "cozy-ui/transpiled/react/Typography" diff --git a/react/BottomDrawer/index.jsx b/react/deprecated/BottomDrawer/index.jsx similarity index 100% rename from react/BottomDrawer/index.jsx rename to react/deprecated/BottomDrawer/index.jsx diff --git a/react/BottomDrawer/styles.styl b/react/deprecated/BottomDrawer/styles.styl similarity index 100% rename from react/BottomDrawer/styles.styl rename to react/deprecated/BottomDrawer/styles.styl diff --git a/react/Button/Readme.md b/react/deprecated/Button/Readme.md similarity index 86% rename from react/Button/Readme.md rename to react/deprecated/Button/Readme.md index e413f8da8b..4338c6a6ec 100644 --- a/react/Button/Readme.md +++ b/react/deprecated/Button/Readme.md @@ -16,7 +16,7 @@ when `` has: #### Themes ```jsx -import Button from 'cozy-ui/transpiled/react/Button'; +import Button from 'cozy-ui/transpiled/react/deprecated/Button'; const props = [{}, { disabled: true}, { busy: true }]; const themes = ['regular', 'ghost', 'danger', 'highlight', 'secondary', 'danger-outline', 'alpha', 'text']; @@ -34,7 +34,7 @@ const themes = ['regular', 'ghost', 'danger', 'highlight', 'secondary', 'danger- #### Sizes ```jsx -import Button from 'cozy-ui/transpiled/react/Button'; +import Button from 'cozy-ui/transpiled/react/deprecated/Button';