cozy-ui 90.6.0 → 90.7.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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/react/ContactsList/Contacts/ContactIdentity.jsx +5 -1
- package/react/ContactsList/__snapshots__/ContactRow.spec.js.snap +1 -0
- package/react/ListItem/ListItemFile/PrimaryText.jsx +24 -9
- package/react/__snapshots__/examples.spec.jsx.snap +126 -126
- package/transpiled/react/ContactsList/Contacts/ContactIdentity.js +3 -0
- package/transpiled/react/ListItem/ListItemFile/PrimaryText.js +19 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [90.7.1](https://github.com/cozy/cozy-ui/compare/v90.7.0...v90.7.1) (2023-08-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **ContactsList:** Avatar is no longer above list subheader ([a3310d3](https://github.com/cozy/cozy-ui/commit/a3310d3))
|
|
7
|
+
|
|
8
|
+
# [90.7.0](https://github.com/cozy/cozy-ui/compare/v90.6.0...v90.7.0) (2023-08-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **ListItemFile:** Use Filename to show the primary text ([38c2bd2](https://github.com/cozy/cozy-ui/commit/38c2bd2))
|
|
14
|
+
|
|
1
15
|
# [90.6.0](https://github.com/cozy/cozy-ui/compare/v90.5.0...v90.6.0) (2023-08-08)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -25,7 +25,11 @@ const ContactIdentity = ({ contact }) => {
|
|
|
25
25
|
styles['contact-identity']
|
|
26
26
|
} u-flex u-flex-items-center u-ellipsis`}
|
|
27
27
|
>
|
|
28
|
-
<Avatar
|
|
28
|
+
<Avatar
|
|
29
|
+
style={{ zIndex: 'auto' }}
|
|
30
|
+
text={getInitials(contact)}
|
|
31
|
+
size="small"
|
|
32
|
+
/>
|
|
29
33
|
<ContactName displayName={displayName} familyName={name.familyName} />
|
|
30
34
|
{isMyself && <MyselfMarker />}
|
|
31
35
|
</TableCell>
|
|
@@ -1,19 +1,34 @@
|
|
|
1
|
+
import React from 'react'
|
|
1
2
|
import PropTypes from 'prop-types'
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { splitFilename } from 'cozy-client/dist/models/file'
|
|
4
5
|
|
|
5
|
-
import
|
|
6
|
+
import Filename from '../../Filename'
|
|
7
|
+
import useBreakpoints from '../../hooks/useBreakpoints'
|
|
6
8
|
|
|
7
9
|
const PrimaryText = ({ primary, file }) => {
|
|
8
|
-
const {
|
|
10
|
+
const { isMobile } = useBreakpoints()
|
|
9
11
|
|
|
10
12
|
if (primary) return primary
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
return (
|
|
15
|
+
<Filename
|
|
16
|
+
variant="body1"
|
|
17
|
+
midEllipsis={isMobile}
|
|
18
|
+
filename={
|
|
19
|
+
splitFilename({
|
|
20
|
+
name: file.name,
|
|
21
|
+
type: 'file'
|
|
22
|
+
}).filename
|
|
23
|
+
}
|
|
24
|
+
extension={
|
|
25
|
+
splitFilename({
|
|
26
|
+
name: file.name,
|
|
27
|
+
type: 'file'
|
|
28
|
+
}).extension
|
|
29
|
+
}
|
|
30
|
+
/>
|
|
31
|
+
)
|
|
17
32
|
}
|
|
18
33
|
|
|
19
34
|
PrimaryText.propTypes = {
|
|
@@ -21,4 +36,4 @@ PrimaryText.propTypes = {
|
|
|
21
36
|
file: PropTypes.object
|
|
22
37
|
}
|
|
23
38
|
|
|
24
|
-
export default
|
|
39
|
+
export default PrimaryText
|