cozy-ui 58.1.2 → 58.4.1
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/.nvmrc +1 -0
- package/CHANGELOG.md +29 -0
- package/package.json +3 -3
- package/react/Alerter/Readme.md +3 -3
- package/react/AppLinker/Readme.md +1 -1
- package/react/AppSections/Readme.md +2 -2
- package/react/AppTile/Readme.md +2 -2
- package/react/AppTitle/Readme.md +1 -1
- package/react/BarTitle/Readme.md +14 -4
- package/react/BarTitle/index.jsx +18 -4
- package/react/BottomDrawer/Readme.md +1 -1
- package/react/Breadcrumbs/Readme.md +3 -3
- package/react/Button/Readme.md +15 -15
- package/react/Card/Readme.md +3 -3
- package/react/Chip/Readme.md +10 -10
- package/react/CipherIcon/Readme.md +1 -1
- package/react/CompositeRow/Readme.md +5 -5
- package/react/ContactPicker/Readme.md +1 -1
- package/react/ContactPicker/index.spec.jsx +1 -1
- package/react/ContactsList/Readme.md +2 -2
- package/react/ContactsList/{data.json → _mockContacts.json} +0 -0
- package/react/ContactsListModal/DemoProvider.jsx +1 -1
- package/react/Counter/Readme.md +2 -2
- package/react/DateMonthPicker/Readme.md +1 -1
- package/react/DropdownButton/Readme.md +1 -1
- package/react/Field/Readme.md +2 -2
- package/react/FileImageLoader/Readme.md +1 -1
- package/react/Filename/Readme.md +2 -2
- package/react/GhostFileBadge/Readme.md +1 -1
- package/react/IconStack/Readme.md +1 -1
- package/react/InfosCarrousel/Readme.md +2 -2
- package/react/InlineCard/Readme.md +1 -1
- package/react/Input/Readme.md +7 -7
- package/react/InputGroup/Readme.md +7 -7
- package/react/Label/Readme.md +3 -3
- package/react/Labs/CollectionField/Readme.md +2 -2
- package/react/Labs/GridItem/Readme.md +1 -1
- package/react/Labs/IconGrid/Readme.md +1 -1
- package/react/ListItemText/Readme.md +3 -3
- package/react/LoadMore/Readme.md +2 -2
- package/react/Menu/Readme.md +4 -4
- package/react/MuiCozyTheme/Accordion/Readme.md +1 -1
- package/react/MuiCozyTheme/Grid/Readme.md +4 -4
- package/react/MuiCozyTheme/List/Readme.md +4 -4
- package/react/MuiCozyTheme/Menus/Readme.md +1 -1
- package/react/MuiCozyTheme/RaisedList/README.md +1 -1
- package/react/MuiCozyTheme/Switch/Readme.md +2 -2
- package/react/MuiCozyTheme/TextField/Readme.md +1 -1
- package/react/MuiTabs/Readme.md +1 -1
- package/react/NavigationList/Readme.md +1 -1
- package/react/Overlay/Readme.md +2 -2
- package/react/PasswordExample/Readme.md +1 -1
- package/react/PercentageBar/Readme.md +1 -1
- package/react/PercentageLine/Readme.md +1 -1
- package/react/Popup/Readme.md +1 -1
- package/react/PopupOpener/Readme.md +1 -1
- package/react/SelectBox/Readme.md +13 -13
- package/react/Sidebar/Readme.md +1 -1
- package/react/Spinner/Readme.md +5 -5
- package/react/Stepper/Readme.md +1 -1
- package/react/Text/Readme.md +9 -9
- package/react/Textarea/Readme.md +6 -6
- package/react/Typography/Readme.md +33 -33
- package/react/ViewStack/Readme.md +1 -1
- package/react/Viewer/Footer/BottomSheetContent.jsx +33 -25
- package/react/Viewer/Footer/FooterContent.jsx +34 -5
- package/react/Viewer/Panel/Certifications.jsx +2 -2
- package/react/Viewer/Panel/PanelContent.jsx +1 -1
- package/react/Viewer/Panel/Qualification.jsx +79 -0
- package/react/Viewer/Panel/QualificationListItemText.jsx +23 -0
- package/react/Viewer/Panel/getPanelBlocks.jsx +10 -1
- package/react/Viewer/Readme.md +12 -125
- package/react/Viewer/helpers.js +15 -1
- package/react/Viewer/helpers.spec.js +37 -31
- package/react/Viewer/index.jsx +22 -7
- package/react/Viewer/locales/en.json +19 -0
- package/react/Viewer/locales/fr.json +19 -0
- package/react/Viewer/queries.js +11 -0
- package/react/Wizard/Readme.md +1 -1
- package/react/hooks/useBreakpoints/Readme.md +3 -3
- package/react/hooks/useConfirmExit/Readme.md +1 -1
- package/transpiled/react/BarTitle/index.js +15 -4
- package/transpiled/react/Viewer/Footer/BottomSheetContent.js +10 -5
- package/transpiled/react/Viewer/Footer/FooterContent.js +26 -4
- package/transpiled/react/Viewer/Panel/Certifications.js +1 -3
- package/transpiled/react/Viewer/Panel/PanelContent.js +2 -1
- package/transpiled/react/Viewer/Panel/Qualification.js +55 -0
- package/transpiled/react/Viewer/Panel/QualificationListItemText.js +25 -0
- package/transpiled/react/Viewer/Panel/getPanelBlocks.js +6 -1
- package/transpiled/react/Viewer/helpers.js +18 -6
- package/transpiled/react/Viewer/index.js +15 -7
- package/transpiled/react/Viewer/queries.js +14 -0
- package/transpiled/react/Viewer/withViewerLocales.js +38 -0
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
10
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
## [58.4.1](https://github.com/cozy/cozy-ui/compare/v58.4.0...v58.4.1) (2022-01-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* BottomSheet no longer opens fully ([ddb8715](https://github.com/cozy/cozy-ui/commit/ddb8715))
|
|
7
|
+
|
|
8
|
+
# [58.4.0](https://github.com/cozy/cozy-ui/compare/v58.3.0...v58.4.0) (2021-12-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Added Qualification panel block ([9fbaaa6](https://github.com/cozy/cozy-ui/commit/9fbaaa6))
|
|
14
|
+
* Upgrade cozy-client ([8820f81](https://github.com/cozy/cozy-ui/commit/8820f81))
|
|
15
|
+
|
|
16
|
+
# [58.3.0](https://github.com/cozy/cozy-ui/compare/v58.2.0...v58.3.0) (2021-12-13)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* Disable sharing button on Viewer ([c7303b3](https://github.com/cozy/cozy-ui/commit/c7303b3))
|
|
22
|
+
|
|
23
|
+
# [58.2.0](https://github.com/cozy/cozy-ui/compare/v58.1.2...v58.2.0) (2021-12-08)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* Add `noWrap` prop on BarTitle ([74e3742](https://github.com/cozy/cozy-ui/commit/74e3742))
|
|
29
|
+
|
|
1
30
|
## [58.1.2](https://github.com/cozy/cozy-ui/compare/v58.1.1...v58.1.2) (2021-12-07)
|
|
2
31
|
|
|
3
32
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "58.1
|
|
3
|
+
"version": "58.4.1",
|
|
4
4
|
"description": "Cozy apps UI SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"commitlint": "7.6.1",
|
|
88
88
|
"commitlint-config-cozy": "0.6.0",
|
|
89
89
|
"copyfiles": "2.1.1",
|
|
90
|
-
"cozy-client": "^
|
|
90
|
+
"cozy-client": "^27.5.1",
|
|
91
91
|
"cozy-device-helper": "1.12.0",
|
|
92
92
|
"cozy-doctypes": "^1.69.0",
|
|
93
93
|
"cozy-harvest-lib": "^6.7.3",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
},
|
|
165
165
|
"peerDependencies": {
|
|
166
166
|
"@material-ui/core": "4",
|
|
167
|
-
"cozy-client": ">=
|
|
167
|
+
"cozy-client": ">=27.5.1",
|
|
168
168
|
"cozy-device-helper": "^1.10.0",
|
|
169
169
|
"cozy-doctypes": "^1.69.0",
|
|
170
170
|
"cozy-harvest-lib": "^6.7.3",
|
package/react/Alerter/Readme.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Display notications!
|
|
2
2
|
Include the `<Alerter />` 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.
|
|
3
3
|
|
|
4
|
-
```
|
|
4
|
+
```jsx
|
|
5
5
|
import Alerter from 'cozy-ui/transpiled/react/Alerter';
|
|
6
6
|
|
|
7
7
|
if (isTesting()) {
|
|
@@ -23,7 +23,7 @@ if (isTesting()) {
|
|
|
23
23
|
|
|
24
24
|
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:
|
|
25
25
|
|
|
26
|
-
```
|
|
26
|
+
```jsx
|
|
27
27
|
import Alerter from 'cozy-ui/transpiled/react/Alerter';
|
|
28
28
|
const triggerAlert = () => {
|
|
29
29
|
Alerter.info("Accept our terms and conditions and subscribe to our newsletter", {
|
|
@@ -56,7 +56,7 @@ const triggerAlertSuccess = () => {
|
|
|
56
56
|
|
|
57
57
|
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:
|
|
58
58
|
|
|
59
|
-
```
|
|
59
|
+
```jsx
|
|
60
60
|
import Alerter from 'cozy-ui/transpiled/react/Alerter';
|
|
61
61
|
|
|
62
62
|
const triggerAlertWithDismiss = () => {
|
|
@@ -14,7 +14,7 @@ Handles several cases:
|
|
|
14
14
|
As it uses the render props pattern, it is flexible and can be used to build components that are more complex than a simple
|
|
15
15
|
anchor.
|
|
16
16
|
|
|
17
|
-
```
|
|
17
|
+
```jsx
|
|
18
18
|
import AppLinker from 'cozy-ui/transpiled/react/AppLinker';
|
|
19
19
|
<AppLinker slug='banks' href='http://dalailama-banks.mycozy.cloud'>{
|
|
20
20
|
({ onClick, href, name }) => (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
```jsx
|
|
2
2
|
import { useState } from 'react'
|
|
3
3
|
import mockApps from './_mockApps'
|
|
4
|
-
import { I18n } from '
|
|
5
|
-
import { BreakpointsProvider } from '
|
|
4
|
+
import { I18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
|
|
6
6
|
import Sections from 'cozy-ui/transpiled/react/AppSections'
|
|
7
7
|
import Variants from 'cozy-ui/docs/components/Variants'
|
|
8
8
|
|
package/react/AppTile/Readme.md
CHANGED
|
@@ -2,9 +2,9 @@ Component used to show an app status, can be used in
|
|
|
2
2
|
a list of apps for example in the Store.
|
|
3
3
|
|
|
4
4
|
```jsx
|
|
5
|
-
import AppTile from '
|
|
5
|
+
import AppTile from 'cozy-ui/transpiled/react/AppTile'
|
|
6
6
|
import mockApps from '../AppSections/_mockApps'
|
|
7
|
-
import { I18n } from '
|
|
7
|
+
import { I18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
8
|
import Grid from 'cozy-ui/transpiled/react/MuiCozyTheme/Grid'
|
|
9
9
|
|
|
10
10
|
const locale = {}
|
package/react/AppTitle/Readme.md
CHANGED
package/react/BarTitle/Readme.md
CHANGED
|
@@ -15,12 +15,22 @@ const MyPage = () => {
|
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
###
|
|
18
|
+
### Basic usage
|
|
19
19
|
|
|
20
|
-
The border is here to show the area of the bar.
|
|
20
|
+
The red border is here only to show the area of the bar.
|
|
21
21
|
|
|
22
|
-
```
|
|
23
|
-
<div style={{
|
|
22
|
+
```jsx
|
|
23
|
+
<div style={{ border: '1px solid red' }}>
|
|
24
24
|
<BarTitle>My transactions</BarTitle>
|
|
25
25
|
</div>
|
|
26
26
|
```
|
|
27
|
+
|
|
28
|
+
### Long title with ellipsis
|
|
29
|
+
|
|
30
|
+
The red border is here only to show the area of the bar.
|
|
31
|
+
|
|
32
|
+
```jsx
|
|
33
|
+
<div style={{ border: '1px solid red' }}>
|
|
34
|
+
<BarTitle noWrap>{content.ada.short}</BarTitle>
|
|
35
|
+
</div>
|
|
36
|
+
```
|
package/react/BarTitle/index.jsx
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
|
|
2
4
|
import Typography from '../Typography'
|
|
5
|
+
|
|
3
6
|
import styles from './styles.styl'
|
|
4
7
|
|
|
5
|
-
const BarTitle = ({ children }) => {
|
|
8
|
+
const BarTitle = ({ noWrap, children }) => {
|
|
6
9
|
return (
|
|
7
|
-
<
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
+
<div className={styles.BarTitle}>
|
|
11
|
+
<Typography variant="h5" component="h1" noWrap={noWrap}>
|
|
12
|
+
{children}
|
|
13
|
+
</Typography>
|
|
14
|
+
</div>
|
|
10
15
|
)
|
|
11
16
|
}
|
|
12
17
|
|
|
18
|
+
BarTitle.defaultProps = {
|
|
19
|
+
noWrap: false
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
BarTitle.propTypes = {
|
|
23
|
+
/** Add an ellipsis like `noWrap` prop on Typography component does */
|
|
24
|
+
noWrap: PropTypes.bool
|
|
25
|
+
}
|
|
26
|
+
|
|
13
27
|
export default BarTitle
|
|
@@ -4,10 +4,10 @@ of the application.
|
|
|
4
4
|
Below is an example where the breadcrumbs are used in a file application
|
|
5
5
|
context.
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```jsx
|
|
8
8
|
import { Component } from 'react'
|
|
9
|
-
import Breadcrumbs from '
|
|
10
|
-
import Icon from '
|
|
9
|
+
import Breadcrumbs from 'cozy-ui/transpiled/react/Breadcrumbs';
|
|
10
|
+
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
11
11
|
import FileIcon from 'cozy-ui/transpiled/react/Icons/File'
|
|
12
12
|
import FolderIcon from 'cozy-ui/transpiled/react/Icons/Folder'
|
|
13
13
|
|
package/react/Button/Readme.md
CHANGED
|
@@ -15,7 +15,7 @@ when `<ButtonLink>` has:
|
|
|
15
15
|
|
|
16
16
|
#### Themes
|
|
17
17
|
|
|
18
|
-
```
|
|
18
|
+
```jsx
|
|
19
19
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
20
20
|
const props = [{}, { disabled: true}, { busy: true }];
|
|
21
21
|
const themes = ['regular', 'ghost', 'danger', 'highlight', 'secondary', 'danger-outline', 'alpha', 'text'];
|
|
@@ -33,7 +33,7 @@ const themes = ['regular', 'ghost', 'danger', 'highlight', 'secondary', 'danger-
|
|
|
33
33
|
|
|
34
34
|
#### Sizes
|
|
35
35
|
|
|
36
|
-
```
|
|
36
|
+
```jsx
|
|
37
37
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
38
38
|
|
|
39
39
|
<div>
|
|
@@ -50,7 +50,7 @@ import Button from 'cozy-ui/transpiled/react/Button';
|
|
|
50
50
|
* `narrow` to ignore Button's `min-width`
|
|
51
51
|
* `full` to enable full width
|
|
52
52
|
|
|
53
|
-
```
|
|
53
|
+
```jsx
|
|
54
54
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
55
55
|
import Stack from 'cozy-ui/transpiled/react/Stack';
|
|
56
56
|
|
|
@@ -67,7 +67,7 @@ import Stack from 'cozy-ui/transpiled/react/Stack';
|
|
|
67
67
|
* `right` to align the label to the right
|
|
68
68
|
* `center` to center the label (default)
|
|
69
69
|
|
|
70
|
-
```
|
|
70
|
+
```jsx
|
|
71
71
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
72
72
|
|
|
73
73
|
<div>
|
|
@@ -80,7 +80,7 @@ import Button from 'cozy-ui/transpiled/react/Button';
|
|
|
80
80
|
|
|
81
81
|
#### Extra right content
|
|
82
82
|
|
|
83
|
-
```
|
|
83
|
+
```jsx
|
|
84
84
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
85
85
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
86
86
|
|
|
@@ -91,19 +91,19 @@ import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
|
91
91
|
|
|
92
92
|
#### Add a action on click
|
|
93
93
|
|
|
94
|
-
```
|
|
94
|
+
```jsx
|
|
95
95
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
96
96
|
<Button theme='danger-outline' onClick={ () => alert('yay !') } label='Show alert' />
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
#### When loading, put a spinner
|
|
100
100
|
|
|
101
|
-
```
|
|
101
|
+
```jsx
|
|
102
102
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
103
103
|
<Button busy label='Loading'/>
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
```
|
|
106
|
+
```jsx
|
|
107
107
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
108
108
|
initialState = { busy:false };
|
|
109
109
|
<Button onClick={() => {setState(state => ({busy: !state.busy}))}} busy={state.busy} label='Toggle busy'/>
|
|
@@ -111,7 +111,7 @@ initialState = { busy:false };
|
|
|
111
111
|
|
|
112
112
|
#### Disable a button
|
|
113
113
|
|
|
114
|
-
```
|
|
114
|
+
```jsx
|
|
115
115
|
import Button, { ButtonLink } from 'cozy-ui/transpiled/react/Button';
|
|
116
116
|
<div>
|
|
117
117
|
<Button disabled label='Loading' />
|
|
@@ -124,7 +124,7 @@ import Button, { ButtonLink } from 'cozy-ui/transpiled/react/Button';
|
|
|
124
124
|
The color of the icon is taken care of by the button style, there's no need to specify it.
|
|
125
125
|
If you want a button with only an icon as content, you must set the `iconOnly` prop.
|
|
126
126
|
|
|
127
|
-
```
|
|
127
|
+
```jsx
|
|
128
128
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
129
129
|
import TrashIcon from "cozy-ui/transpiled/react/Icons/Trash";
|
|
130
130
|
import DotsIcon from "cozy-ui/transpiled/react/Icons/Dots";
|
|
@@ -136,7 +136,7 @@ import DotsIcon from "cozy-ui/transpiled/react/Icons/Dots";
|
|
|
136
136
|
|
|
137
137
|
You can also pass an Icon directly if you need more flexibility.
|
|
138
138
|
|
|
139
|
-
```
|
|
139
|
+
```jsx
|
|
140
140
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
141
141
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
142
142
|
import TrashIcon from "cozy-ui/transpiled/react/Icons/Trash";
|
|
@@ -147,7 +147,7 @@ import TrashIcon from "cozy-ui/transpiled/react/Icons/Trash";
|
|
|
147
147
|
|
|
148
148
|
#### Create a round button with an icon
|
|
149
149
|
|
|
150
|
-
```
|
|
150
|
+
```jsx
|
|
151
151
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
152
152
|
import PlusIcon from "cozy-ui/transpiled/react/Icons/Plus";
|
|
153
153
|
import CrossIcon from "cozy-ui/transpiled/react/Icons/Cross";
|
|
@@ -161,7 +161,7 @@ import CrossIcon from "cozy-ui/transpiled/react/Icons/Cross";
|
|
|
161
161
|
|
|
162
162
|
Subtle buttons are buttons without background and borders, wich look "inverted" compared to the basic Buttons.
|
|
163
163
|
|
|
164
|
-
```
|
|
164
|
+
```jsx
|
|
165
165
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
166
166
|
import PlusIcon from "cozy-ui/transpiled/react/Icons/Plus";
|
|
167
167
|
import CozyIcon from "cozy-ui/transpiled/react/Icons/Cozy";
|
|
@@ -197,7 +197,7 @@ import CozyIcon from "cozy-ui/transpiled/react/Icons/Cozy";
|
|
|
197
197
|
|
|
198
198
|
#### Using Links
|
|
199
199
|
|
|
200
|
-
```
|
|
200
|
+
```jsx
|
|
201
201
|
import { ButtonLink } from 'cozy-ui/transpiled/react/Button';
|
|
202
202
|
import CozyIcon from "cozy-ui/transpiled/react/Icons/Cozy";
|
|
203
203
|
<div>
|
|
@@ -226,7 +226,7 @@ Sometimes you want to change the tag or component used to render the Button. For
|
|
|
226
226
|
You can pass `tag={NavLink}` and `NavLink` will be used. Any props that you
|
|
227
227
|
pass to the `Button` will be passed down to the component.
|
|
228
228
|
|
|
229
|
-
```
|
|
229
|
+
```jsx
|
|
230
230
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
231
231
|
const NavLink = props => (
|
|
232
232
|
<span onClick={() => alert(`Navigating to ${props.to}`)} {...props}>{
|
package/react/Card/Readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
A card is a small block used to separate some content from the rest of the UI.
|
|
2
2
|
|
|
3
|
-
```
|
|
3
|
+
```jsx
|
|
4
4
|
import Card from 'cozy-ui/transpiled/react/Card';
|
|
5
5
|
import Button from 'cozy-ui/transpiled/react/Button';
|
|
6
6
|
import Typography from "cozy-ui/transpiled/react/Typography";
|
|
@@ -18,7 +18,7 @@ import Typography from "cozy-ui/transpiled/react/Typography";
|
|
|
18
18
|
|
|
19
19
|
Renders the Card with increased margins.
|
|
20
20
|
|
|
21
|
-
```
|
|
21
|
+
```jsx
|
|
22
22
|
import Card from 'cozy-ui/transpiled/react/Card';
|
|
23
23
|
import Typography from "cozy-ui/transpiled/react/Typography";
|
|
24
24
|
|
|
@@ -31,7 +31,7 @@ import Typography from "cozy-ui/transpiled/react/Typography";
|
|
|
31
31
|
|
|
32
32
|
Uses the provided tag to render the root element of the Card
|
|
33
33
|
|
|
34
|
-
```
|
|
34
|
+
```jsx
|
|
35
35
|
import Card from 'cozy-ui/transpiled/react/Card';
|
|
36
36
|
import Typography from "cozy-ui/transpiled/react/Typography";
|
|
37
37
|
|
package/react/Chip/Readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Chips represent complex entities in small blocks, such as a contact.
|
|
2
2
|
|
|
3
|
-
```
|
|
3
|
+
```jsx
|
|
4
4
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
5
5
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
6
6
|
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
@@ -26,7 +26,7 @@ const ContactChip = ({ contact }) => (
|
|
|
26
26
|
|
|
27
27
|
### Round chip
|
|
28
28
|
|
|
29
|
-
```
|
|
29
|
+
```jsx
|
|
30
30
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
31
31
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
32
32
|
import RightIcon from "cozy-ui/transpiled/react/Icons/Right";
|
|
@@ -37,7 +37,7 @@ import RightIcon from "cozy-ui/transpiled/react/Icons/Right";
|
|
|
37
37
|
|
|
38
38
|
### Chip separator
|
|
39
39
|
|
|
40
|
-
```
|
|
40
|
+
```jsx
|
|
41
41
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
42
42
|
<Chip>
|
|
43
43
|
Something
|
|
@@ -48,7 +48,7 @@ import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
|
48
48
|
|
|
49
49
|
### Chip buttons
|
|
50
50
|
|
|
51
|
-
```
|
|
51
|
+
```jsx
|
|
52
52
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
53
53
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
54
54
|
import RightIcon from "cozy-ui/transpiled/react/Icons/Right";
|
|
@@ -61,7 +61,7 @@ import LeftIcon from "cozy-ui/transpiled/react/Icons/Left";
|
|
|
61
61
|
|
|
62
62
|
### Specify underlying tag/component
|
|
63
63
|
|
|
64
|
-
```
|
|
64
|
+
```jsx
|
|
65
65
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
66
66
|
<div>
|
|
67
67
|
<Chip component="button" onClick={() => alert('You clicked')}>This is a button</Chip>
|
|
@@ -72,7 +72,7 @@ import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
|
72
72
|
|
|
73
73
|
### Sizes
|
|
74
74
|
|
|
75
|
-
```
|
|
75
|
+
```jsx
|
|
76
76
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
77
77
|
<div>
|
|
78
78
|
<Chip size="tiny">This is a tiny Chip</Chip>
|
|
@@ -83,7 +83,7 @@ import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
|
83
83
|
|
|
84
84
|
### Variants
|
|
85
85
|
|
|
86
|
-
```
|
|
86
|
+
```jsx
|
|
87
87
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
88
88
|
<div>
|
|
89
89
|
<Chip variant="normal">This is a normal Chip (default)</Chip>
|
|
@@ -94,7 +94,7 @@ import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
|
94
94
|
|
|
95
95
|
### Themes
|
|
96
96
|
|
|
97
|
-
```
|
|
97
|
+
```jsx
|
|
98
98
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
99
99
|
<div>
|
|
100
100
|
<div>
|
|
@@ -117,7 +117,7 @@ import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
|
117
117
|
|
|
118
118
|
### Mix sizes, variants and themes
|
|
119
119
|
|
|
120
|
-
```
|
|
120
|
+
```jsx
|
|
121
121
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
122
122
|
<div>
|
|
123
123
|
<div>
|
|
@@ -140,7 +140,7 @@ import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
|
140
140
|
|
|
141
141
|
### Complete example
|
|
142
142
|
|
|
143
|
-
```
|
|
143
|
+
```jsx
|
|
144
144
|
import Chip from 'cozy-ui/transpiled/react/Chip';
|
|
145
145
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
146
146
|
import FileIcon from "cozy-ui/transpiled/react/Icons/File";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
```
|
|
2
|
-
import { Media, Bd, Img } from '
|
|
3
|
-
import UIChip from '
|
|
4
|
-
import Icon from '
|
|
5
|
-
import Circle from '
|
|
1
|
+
```jsx
|
|
2
|
+
import { Media, Bd, Img } from 'cozy-ui/transpiled/react/Media'
|
|
3
|
+
import UIChip from 'cozy-ui/transpiled/react/Chip'
|
|
4
|
+
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
|
+
import Circle from 'cozy-ui/transpiled/react/Circle'
|
|
6
6
|
import Variants from 'cozy-ui/docs/components/Variants'
|
|
7
7
|
import CompositeRow from 'cozy-ui/transpiled/react/CompositeRow'
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
```jsx
|
|
2
2
|
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
|
|
3
3
|
import ContactPicker from 'cozy-ui/transpiled/react/ContactPicker'
|
|
4
|
-
import DemoProvider from '
|
|
4
|
+
import DemoProvider from 'cozy-ui/transpiled/react/ContactsListModal/DemoProvider'
|
|
5
5
|
|
|
6
6
|
initialState = { selectedContact: null }
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import DemoProvider from '../ContactsListModal/DemoProvider'
|
|
5
5
|
import { BreakpointsProvider } from '../hooks/useBreakpoints'
|
|
6
|
-
import contacts from '../ContactsList/
|
|
6
|
+
import contacts from '../ContactsList/_mockContacts.json'
|
|
7
7
|
|
|
8
8
|
import ContactPicker from '.'
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
```jsx
|
|
4
4
|
import ContactsList from 'cozy-ui/transpiled/react/ContactsList';
|
|
5
5
|
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints';
|
|
6
|
-
import contacts from './
|
|
6
|
+
import contacts from './_mockContacts.json';
|
|
7
7
|
|
|
8
8
|
<BreakpointsProvider>
|
|
9
9
|
<div style={{ height: 500, overflowY: 'scroll' }}>
|
|
@@ -16,7 +16,7 @@ import contacts from './data.json';
|
|
|
16
16
|
|
|
17
17
|
```jsx
|
|
18
18
|
import ContactsList from 'cozy-ui/transpiled/react/ContactsList';
|
|
19
|
-
import contacts from './
|
|
19
|
+
import contacts from './_mockContacts.json';
|
|
20
20
|
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints';
|
|
21
21
|
|
|
22
22
|
initialState = { contact: null };
|
|
File without changes
|
package/react/Counter/Readme.md
CHANGED
|
@@ -2,7 +2,7 @@ A simple way to show how many _things_ there are.
|
|
|
2
2
|
|
|
3
3
|
### Default
|
|
4
4
|
|
|
5
|
-
```
|
|
5
|
+
```jsx
|
|
6
6
|
import Counter from 'cozy-ui/transpiled/react/Counter';
|
|
7
7
|
<div >
|
|
8
8
|
<Counter count={42} />
|
|
@@ -13,7 +13,7 @@ import Counter from 'cozy-ui/transpiled/react/Counter';
|
|
|
13
13
|
|
|
14
14
|
Above a certain number, an approximation is displayed. The default treshold is 99.
|
|
15
15
|
|
|
16
|
-
```
|
|
16
|
+
```jsx
|
|
17
17
|
import Counter from 'cozy-ui/transpiled/react/Counter';
|
|
18
18
|
<div >
|
|
19
19
|
<Counter count={14} max={5} />
|
package/react/Field/Readme.md
CHANGED
|
@@ -169,8 +169,8 @@ const options = [
|
|
|
169
169
|
|
|
170
170
|
```jsx
|
|
171
171
|
import Field from 'cozy-ui/transpiled/react/Field'
|
|
172
|
-
import DemoProvider from '
|
|
173
|
-
import { BreakpointsProvider } from '
|
|
172
|
+
import DemoProvider from 'cozy-ui/transpiled/react/ContactsListModal/DemoProvider'
|
|
173
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
|
|
174
174
|
|
|
175
175
|
initialState = { selectedContact: null }
|
|
176
176
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A component to get the image in `links` prop of a file, according to its class (could be `image` or `pdf`).
|
|
4
4
|
|
|
5
5
|
```jsx
|
|
6
|
-
import DemoProvider from '
|
|
6
|
+
import DemoProvider from 'cozy-ui/transpiled/react/Viewer/docs/DemoProvider'
|
|
7
7
|
|
|
8
8
|
import FileImageLoader from 'cozy-ui/transpiled/react/FileImageLoader'
|
|
9
9
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
package/react/Filename/Readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#### Filename with extension (ellipsis by default)
|
|
2
2
|
|
|
3
|
-
```
|
|
3
|
+
```jsx
|
|
4
4
|
import Filename from 'cozy-ui/transpiled/react/Filename';
|
|
5
5
|
<div>
|
|
6
6
|
<Filename filename="Lacinia condimentum potenti id est tortor dictumst lectus tincidunt hac ultricies, curae mattis nisi neque sodales sagittis dui nulla aliquam turpis eros, finibus ac iaculis dictum et orci elit posuere ex" extension=".pdf" />
|
|
@@ -9,7 +9,7 @@ import Filename from 'cozy-ui/transpiled/react/Filename';
|
|
|
9
9
|
|
|
10
10
|
#### Filename with extension and icon
|
|
11
11
|
|
|
12
|
-
```
|
|
12
|
+
```jsx
|
|
13
13
|
import Filename from 'cozy-ui/transpiled/react/Filename';
|
|
14
14
|
import FileIcon from 'cozy-ui/transpiled/react/Icons/File';
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Ghost badges are specifically used to indicate that a file in a Cozy is a ghost file — it is not truly in the Cozy (usually it is shared from another instance).
|
|
2
2
|
|
|
3
|
-
```
|
|
3
|
+
```jsx
|
|
4
4
|
import GhostFileBadge from 'cozy-ui/transpiled/react/GhostFileBadge';
|
|
5
5
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
6
6
|
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
@@ -5,7 +5,7 @@ other component on the foreground.
|
|
|
5
5
|
|
|
6
6
|
Use IconStack when the resulting combination of icons is considered a single entity.
|
|
7
7
|
|
|
8
|
-
```
|
|
8
|
+
```jsx
|
|
9
9
|
import IconStack from 'cozy-ui/transpiled/react/IconStack';
|
|
10
10
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
11
11
|
import FileDuotoneIcon from "cozy-ui/transpiled/react/Icons/FileDuotone";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Displays several Infos component in a Carrousel. [react-swipeable-views](https://react-swipeable-views.com/) is used under the hood and can be configured.
|
|
4
4
|
|
|
5
|
-
```
|
|
5
|
+
```jsx
|
|
6
6
|
import InfosCarrousel from 'cozy-ui/transpiled/react/InfosCarrousel'
|
|
7
7
|
import Infos from 'cozy-ui/transpiled/react/Infos'
|
|
8
8
|
import Button from 'cozy-ui/transpiled/react/Button'
|
|
@@ -41,7 +41,7 @@ const handleDismissAction = () => {
|
|
|
41
41
|
|
|
42
42
|
Arrows are not displayed if there is only 1 info.
|
|
43
43
|
|
|
44
|
-
```
|
|
44
|
+
```jsx
|
|
45
45
|
import InfosCarrousel from 'cozy-ui/transpiled/react/InfosCarrousel'
|
|
46
46
|
import Infos from 'cozy-ui/transpiled/react/Infos'
|
|
47
47
|
import Button from 'cozy-ui/transpiled/react/Button'
|