cozy-ui 104.3.0 → 105.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/package.json +1 -1
  3. package/react/ContactsList/Contacts/ContactCozy.jsx +1 -1
  4. package/react/ContactsList/Contacts/ContactEmail.jsx +1 -1
  5. package/react/ContactsList/Contacts/ContactIdentity.jsx +1 -1
  6. package/react/ContactsList/Contacts/ContactPhone.jsx +1 -1
  7. package/react/ContactsList/ContactsList.jsx +1 -1
  8. package/react/ContactsList/__snapshots__/ContactRow.spec.js.snap +4 -4
  9. package/react/Table/index.js +3 -0
  10. package/react/TableBody/index.js +3 -0
  11. package/react/TableCell/index.js +3 -0
  12. package/react/TableContainer/index.js +3 -0
  13. package/react/TableFooter/index.js +3 -0
  14. package/react/TableHead/index.js +3 -0
  15. package/react/TablePagination/index.js +3 -0
  16. package/react/TableRow/index.js +3 -0
  17. package/react/TableSortLabel/index.js +3 -0
  18. package/react/__snapshots__/examples.spec.jsx.snap +506 -529
  19. package/react/{Table → deprecated/Table}/Readme.md +1 -1
  20. package/react/examples.spec.jsx +0 -1
  21. package/transpiled/react/ContactsList/Contacts/ContactCozy.js +1 -1
  22. package/transpiled/react/ContactsList/Contacts/ContactEmail.js +1 -1
  23. package/transpiled/react/ContactsList/Contacts/ContactIdentity.js +1 -1
  24. package/transpiled/react/ContactsList/Contacts/ContactPhone.js +1 -1
  25. package/transpiled/react/ContactsList/ContactsList.js +1 -1
  26. package/transpiled/react/Table/index.js +2 -103
  27. package/transpiled/react/TableBody/index.js +2 -0
  28. package/transpiled/react/TableCell/index.js +2 -0
  29. package/transpiled/react/TableContainer/index.js +2 -0
  30. package/transpiled/react/TableFooter/index.js +2 -0
  31. package/transpiled/react/TableHead/index.js +2 -0
  32. package/transpiled/react/TablePagination/index.js +2 -0
  33. package/transpiled/react/TableRow/index.js +2 -0
  34. package/transpiled/react/TableSortLabel/index.js +2 -0
  35. package/transpiled/react/deprecated/Table/index.js +103 -0
  36. package/transpiled/react/stylesheet.css +1 -1
  37. /package/react/{Table → deprecated/Table}/index.jsx +0 -0
  38. /package/react/{Table → deprecated/Table}/styles.styl +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # [105.0.0](https://github.com/cozy/cozy-ui/compare/v104.3.0...v105.0.0) (2024-03-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * Add all Table components from MUI ([5c6438f](https://github.com/cozy/cozy-ui/commit/5c6438f))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * `Table` component has been deprecated. Use codemods to deal with the change.
12
+
13
+ ```
14
+ yarn global add @cozy/codemods
15
+ yarn global add jscodeshift@0.13.1
16
+ jscodeshift -t $(yarn global dir)/node_modules/@cozy/codemods/src/transforms/transform-ui-deprecated-table.js src babel --ignore-pattern=src/targets/ --extensions js,jsx,tsx --parser tsx
17
+ ```
18
+
1
19
  # [104.3.0](https://github.com/cozy/cozy-ui/compare/v104.2.0...v104.3.0) (2024-03-13)
2
20
 
3
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "104.3.0",
3
+ "version": "105.0.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
 
4
- import { TableCell } from '../../Table'
4
+ import { TableCell } from '../../deprecated/Table'
5
5
  import styles from '../styles.styl'
6
6
 
7
7
  const ContactCozy = ({ cozyUrl }) => (
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
 
4
- import { TableCell } from '../../Table'
4
+ import { TableCell } from '../../deprecated/Table'
5
5
  import styles from '../styles.styl'
6
6
 
7
7
  const ContactEmail = ({ email }) => (
@@ -3,7 +3,7 @@ import { models } from 'cozy-client'
3
3
  import PropTypes from 'prop-types'
4
4
 
5
5
  import { Avatar } from '../../Avatar'
6
- import { TableCell } from '../../Table'
6
+ import { TableCell } from '../../deprecated/Table'
7
7
  import ContactName from './ContactName'
8
8
  import styles from '../styles.styl'
9
9
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
 
4
- import { TableCell } from '../../Table'
4
+ import { TableCell } from '../../deprecated/Table'
5
5
  import styles from '../styles.styl'
6
6
 
7
7
  const ContactPhone = ({ phone }) => (
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
 
4
4
  import { useI18n } from '../providers/I18n'
5
- import { Table } from '../Table'
5
+ import { Table } from '../deprecated/Table'
6
6
  import List from '../List'
7
7
  import ListSubheader from '../ListSubheader'
8
8
  import { sortContacts, categorizeContacts, sortHeaders } from './helpers'
@@ -9,7 +9,7 @@ exports[`ContactRow should match the contact snapshot 1`] = `
9
9
  size="medium"
10
10
  >
11
11
  <div
12
- className="styles__TableCell___yJCq7 styles__contact-identity___mL3IJ u-flex u-flex-items-center u-ellipsis u-p-0"
12
+ className="styles__TableCell___3vgVE styles__contact-identity___mL3IJ u-flex u-flex-items-center u-ellipsis u-p-0"
13
13
  data-testid="ContactIdentity"
14
14
  >
15
15
  <div
@@ -48,19 +48,19 @@ exports[`ContactRow should match the contact snapshot 1`] = `
48
48
  </p>
49
49
  </div>
50
50
  <div
51
- className="styles__TableCell___yJCq7 styles__contact-email___3n3q2 u-ellipsis u-p-0"
51
+ className="styles__TableCell___3vgVE styles__contact-email___3n3q2 u-ellipsis u-p-0"
52
52
  data-testid="ContactEmail"
53
53
  >
54
54
  johndoe@localhost
55
55
  </div>
56
56
  <div
57
- className="styles__TableCell___yJCq7 styles__contact-phone___1sA_m u-ellipsis u-p-0"
57
+ className="styles__TableCell___3vgVE styles__contact-phone___1sA_m u-ellipsis u-p-0"
58
58
  data-testid="ContactPhone"
59
59
  >
60
60
  0123456789
61
61
  </div>
62
62
  <div
63
- className="styles__TableCell___yJCq7 styles__contact-cozyurl___3kBp5 u-ellipsis u-p-0"
63
+ className="styles__TableCell___3vgVE styles__contact-cozyurl___3kBp5 u-ellipsis u-p-0"
64
64
  data-testid="ContactCozy"
65
65
  >
66
66
  http://johndoe.mycozy.cloud
@@ -0,0 +1,3 @@
1
+ import Table from '@material-ui/core/Table'
2
+
3
+ export default Table
@@ -0,0 +1,3 @@
1
+ import TableBody from '@material-ui/core/TableBody'
2
+
3
+ export default TableBody
@@ -0,0 +1,3 @@
1
+ import TableCell from '@material-ui/core/TableCell'
2
+
3
+ export default TableCell
@@ -0,0 +1,3 @@
1
+ import TableContainer from '@material-ui/core/TableContainer'
2
+
3
+ export default TableContainer
@@ -0,0 +1,3 @@
1
+ import TableFooter from '@material-ui/core/TableFooter'
2
+
3
+ export default TableFooter
@@ -0,0 +1,3 @@
1
+ import TableHead from '@material-ui/core/TableHead'
2
+
3
+ export default TableHead
@@ -0,0 +1,3 @@
1
+ import TablePagination from '@material-ui/core/TablePagination'
2
+
3
+ export default TablePagination
@@ -0,0 +1,3 @@
1
+ import TableRow from '@material-ui/core/TableRow'
2
+
3
+ export default TableRow
@@ -0,0 +1,3 @@
1
+ import TableSortLabel from '@material-ui/core/TableSortLabel'
2
+
3
+ export default TableSortLabel