cozy-ui 134.1.0 → 135.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 (130) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/assets/icons/ui/database.svg +1 -0
  3. package/assets/icons/ui/expert.svg +8 -0
  4. package/package.json +4 -2
  5. package/react/ActionsBar/index.jsx +1 -1
  6. package/react/ActionsBar/locales/withActionsLocales.jsx +2 -1
  7. package/react/ActionsMenu/Actions/locales/withActionsLocales.jsx +2 -2
  8. package/react/ActionsMenu/ActionsItems.jsx +1 -1
  9. package/react/ActionsMenu/ActionsMenuButton.jsx +1 -1
  10. package/react/CozyDialogs/DialogBackButton.jsx +1 -1
  11. package/react/CozyDialogs/DialogCloseButton.jsx +1 -1
  12. package/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.jsx +1 -1
  13. package/react/CozyDialogs/SpecificDialogs/InstallFlagshipAppDialog.jsx +1 -1
  14. package/react/CozyDialogs/SpecificDialogs/ShortcutDialog.jsx +1 -1
  15. package/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.jsx +2 -1
  16. package/react/DateMonthPicker/Readme.md +1 -1
  17. package/react/DateMonthPicker/index.jsx +1 -1
  18. package/react/DateMonthPicker/index.spec.jsx +1 -1
  19. package/react/DatePicker/index.jsx +1 -1
  20. package/react/DatePicker/locales/withOwnLocales.jsx +2 -1
  21. package/react/EditBadge/EditMenu.jsx +1 -1
  22. package/react/Icon/Readme.md +5 -1
  23. package/react/Icons/Database.jsx +14 -0
  24. package/react/Icons/Expert.jsx +17 -0
  25. package/react/Labs/PasswordInput/index.jsx +1 -1
  26. package/react/Nav/index.jsx +1 -1
  27. package/react/Nav/locales/withNavLocales.jsx +2 -1
  28. package/react/PasswordField/index.jsx +1 -2
  29. package/react/SearchBar/index.jsx +1 -1
  30. package/react/SearchBar/locales/withOnlyLocales.jsx +2 -1
  31. package/react/SelectionBar/SelectionBarAction.jsx +1 -1
  32. package/react/SelectionBar/SelectionBarMore.jsx +1 -1
  33. package/react/SelectionBar/index.jsx +1 -1
  34. package/react/Spinner/Readme.md +1 -1
  35. package/react/Spinner/index.jsx +1 -1
  36. package/react/Table/Virtualized/Dnd/TableRow.jsx +1 -2
  37. package/react/Wizard/index.jsx +1 -1
  38. package/react/deprecated/ActionMenu/Actions/ActionsItems.jsx +1 -1
  39. package/react/deprecated/ActionMenu/Actions/call.js +1 -1
  40. package/react/deprecated/ActionMenu/Actions/emailTo.js +1 -1
  41. package/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.jsx +2 -1
  42. package/react/deprecated/ActionMenu/Actions/smsTo.js +1 -1
  43. package/react/hooks/useConfirmExit/index.jsx +1 -1
  44. package/react/index.js +0 -1
  45. package/react/jestLib/I18n.js +1 -1
  46. package/react/providers/DemoProvider.jsx +1 -1
  47. package/transpiled/react/ActionsBar/index.js +1 -1
  48. package/transpiled/react/ActionsBar/locales/withActionsLocales.js +1 -1
  49. package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.d.ts +1 -1
  50. package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.js +1 -2
  51. package/transpiled/react/ActionsMenu/ActionsItems.js +1 -1
  52. package/transpiled/react/ActionsMenu/ActionsMenuButton.js +1 -1
  53. package/transpiled/react/CozyDialogs/DialogBackButton.js +1 -1
  54. package/transpiled/react/CozyDialogs/DialogCloseButton.js +1 -1
  55. package/transpiled/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.js +1 -1
  56. package/transpiled/react/CozyDialogs/SpecificDialogs/InstallFlagshipAppDialog.js +1 -1
  57. package/transpiled/react/CozyDialogs/SpecificDialogs/ShortcutDialog.js +1 -1
  58. package/transpiled/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.js +1 -1
  59. package/transpiled/react/DateMonthPicker/index.js +1 -1
  60. package/transpiled/react/DatePicker/index.js +1 -1
  61. package/transpiled/react/DatePicker/locales/withOwnLocales.js +1 -1
  62. package/transpiled/react/EditBadge/EditMenu.js +1 -1
  63. package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
  64. package/transpiled/react/Icon/icons-sprite.js +1 -1
  65. package/transpiled/react/Icons/Database.d.ts +2 -0
  66. package/transpiled/react/Icons/Database.js +17 -0
  67. package/transpiled/react/Icons/Expert.d.ts +2 -0
  68. package/transpiled/react/Icons/Expert.js +19 -0
  69. package/transpiled/react/Labs/PasswordInput/index.js +1 -1
  70. package/transpiled/react/Nav/index.js +1 -1
  71. package/transpiled/react/Nav/locales/withNavLocales.js +1 -1
  72. package/transpiled/react/PasswordField/index.js +1 -2
  73. package/transpiled/react/SearchBar/index.js +1 -1
  74. package/transpiled/react/SearchBar/locales/withOnlyLocales.js +1 -1
  75. package/transpiled/react/SelectionBar/SelectionBarAction.js +1 -1
  76. package/transpiled/react/SelectionBar/SelectionBarMore.js +1 -1
  77. package/transpiled/react/SelectionBar/index.js +1 -1
  78. package/transpiled/react/Spinner/index.js +1 -1
  79. package/transpiled/react/Table/Virtualized/Dnd/TableRow.js +1 -1
  80. package/transpiled/react/Wizard/index.js +1 -1
  81. package/transpiled/react/deprecated/ActionMenu/Actions/ActionsItems.js +1 -1
  82. package/transpiled/react/deprecated/ActionMenu/Actions/call.js +1 -1
  83. package/transpiled/react/deprecated/ActionMenu/Actions/emailTo.js +1 -1
  84. package/transpiled/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.js +1 -1
  85. package/transpiled/react/deprecated/ActionMenu/Actions/smsTo.js +1 -1
  86. package/transpiled/react/hooks/useConfirmExit/index.js +1 -1
  87. package/transpiled/react/index.d.ts +0 -1
  88. package/transpiled/react/index.js +0 -1
  89. package/transpiled/react/jestLib/I18n.d.ts +1 -1
  90. package/transpiled/react/jestLib/I18n.js +1 -1
  91. package/transpiled/react/providers/DemoProvider.js +1 -1
  92. package/react/I18n/index.js +0 -25
  93. package/react/I18n/withLocales.js +0 -14
  94. package/react/providers/I18n/createUseI18n.jsx +0 -32
  95. package/react/providers/I18n/format.jsx +0 -62
  96. package/react/providers/I18n/format.spec.jsx +0 -73
  97. package/react/providers/I18n/helpers.js +0 -33
  98. package/react/providers/I18n/index.jsx +0 -107
  99. package/react/providers/I18n/index.spec.jsx +0 -135
  100. package/react/providers/I18n/translate.jsx +0 -28
  101. package/react/providers/I18n/translation.jsx +0 -42
  102. package/react/providers/I18n/useExtendI18n.jsx +0 -37
  103. package/react/providers/I18n/withLocales.jsx +0 -47
  104. package/react/providers/I18n/withLocales.spec.jsx +0 -58
  105. package/react/providers/I18n/withOnlyLocales.jsx +0 -38
  106. package/transpiled/react/I18n/index.d.ts +0 -3
  107. package/transpiled/react/I18n/index.js +0 -16
  108. package/transpiled/react/I18n/withLocales.d.ts +0 -2
  109. package/transpiled/react/I18n/withLocales.js +0 -10
  110. package/transpiled/react/providers/I18n/createUseI18n.d.ts +0 -6
  111. package/transpiled/react/providers/I18n/createUseI18n.js +0 -39
  112. package/transpiled/react/providers/I18n/format.d.ts +0 -3
  113. package/transpiled/react/providers/I18n/format.js +0 -72
  114. package/transpiled/react/providers/I18n/format.spec.d.ts +0 -1
  115. package/transpiled/react/providers/I18n/helpers.d.ts +0 -5
  116. package/transpiled/react/providers/I18n/helpers.js +0 -35
  117. package/transpiled/react/providers/I18n/index.d.ts +0 -62
  118. package/transpiled/react/providers/I18n/index.js +0 -132
  119. package/transpiled/react/providers/I18n/index.spec.d.ts +0 -1
  120. package/transpiled/react/providers/I18n/translate.d.ts +0 -3
  121. package/transpiled/react/providers/I18n/translate.js +0 -21
  122. package/transpiled/react/providers/I18n/translation.d.ts +0 -3
  123. package/transpiled/react/providers/I18n/translation.js +0 -40
  124. package/transpiled/react/providers/I18n/useExtendI18n.d.ts +0 -7
  125. package/transpiled/react/providers/I18n/useExtendI18n.js +0 -42
  126. package/transpiled/react/providers/I18n/withLocales.d.ts +0 -8
  127. package/transpiled/react/providers/I18n/withLocales.js +0 -69
  128. package/transpiled/react/providers/I18n/withLocales.spec.d.ts +0 -1
  129. package/transpiled/react/providers/I18n/withOnlyLocales.d.ts +0 -8
  130. package/transpiled/react/providers/I18n/withOnlyLocales.js +0 -39
package/CHANGELOG.md CHANGED
@@ -1,3 +1,35 @@
1
+ # [135.0.0](https://github.com/cozy/cozy-ui/compare/v134.2.0...v135.0.0) (2025-12-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * Add twake-i18n package ([7b9ff5f](https://github.com/cozy/cozy-ui/commit/7b9ff5f))
7
+ * Remove I18n ([df09711](https://github.com/cozy/cozy-ui/commit/df09711))
8
+ * Replace I18n stuff by twake-i18n ([ab99763](https://github.com/cozy/cozy-ui/commit/ab99763))
9
+
10
+
11
+ ### BREAKING CHANGES
12
+
13
+ * No longer expose I18n provider. You must import everything previously based on `providers/I18n` from `twake-i18n`.
14
+ You can use this codemods to migrate:
15
+
16
+ ```
17
+ yarn add twake-i18n
18
+ yarn global add @cozy/codemods
19
+ yarn global add jscodeshift@0.13.1
20
+ jscodeshift -t $(yarn global dir)/node_modules/@cozy/codemods/src/transforms/transform-ui-bc-135.js src babel --ignore-pattern=src/targets/ --extensions js,jsx,tsx --parser tsx
21
+ ```
22
+
23
+ You probably will need to fix linter issue after that with something like `yarn lint --fix`.
24
+ * you must have `twake-i18n >= 0.3.0`
25
+
26
+ # [134.2.0](https://github.com/cozy/cozy-ui/compare/v134.1.0...v134.2.0) (2025-12-04)
27
+
28
+
29
+ ### Features
30
+
31
+ * **Icon:** Add database and expert ([1032391](https://github.com/cozy/cozy-ui/commit/1032391))
32
+
1
33
  # [134.1.0](https://github.com/cozy/cozy-ui/compare/v134.0.0...v134.1.0) (2025-12-04)
2
34
 
3
35
 
@@ -0,0 +1 @@
1
+ <svg width="14" height="16" viewBox="0 0 14 16" xmlns="http://www.w3.org/2000/svg"><path d="M14 3.46c0 1.91-3.134 3.459-7 3.459S0 5.37 0 3.459C0 1.55 3.134 0 7 0s7 1.549 7 3.46zM14 13.89C12.691 15.142 10.049 16 7 16s-5.691-.857-7-2.11v-1.729c1.308 1.253 3.951 2.11 7 2.11s5.692-.858 7-2.11v1.73z" /><path d="M14 10.863c-1.309 1.253-3.951 2.11-7 2.11s-5.691-.857-7-2.11V9.134c1.308 1.253 3.951 2.11 7 2.11s5.692-.858 7-2.11v1.73z" /><path d="M14 7.836c-1.309 1.252-3.951 2.11-7 2.11s-5.691-.858-7-2.11V6.107c1.308 1.253 3.951 2.11 7 2.11s5.692-.858 7-2.11v1.73z" /></svg>
@@ -0,0 +1,8 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
2
+ <path
3
+ d="M10.838 12.894a.455.455 0 01.377.12l.538.516-.91 2.47-.585-1.239-1.254.578.85-2.309.985-.136zM13.695 12.894l1.015.141c.074.01.146 0 .212-.023l.858 2.326-1.254-.576L13.941 16l-.976-2.649.354-.336c.1-.096.238-.14.376-.121zM12.01 7.552c.08-.246.433-.246.514 0l.231.702c.036.11.14.186.257.186h.748c.263 0 .371.33.16.483l-.605.433a.267.267 0 00-.098.3l.23.702c.082.246-.204.451-.416.3l-.605-.435a.274.274 0 00-.319 0l-.605.434c-.212.152-.497-.053-.417-.299l.232-.702a.267.267 0 00-.098-.3l-.605-.433c-.212-.152-.103-.483.159-.483h.748a.271.271 0 00.257-.186l.231-.702z" />
4
+ <path clip-rule="evenodd"
5
+ d="M11.953 5.458a.457.457 0 01.628 0l.536.513c.1.095.24.14.377.12l.738-.102a.451.451 0 01.508.364l.129.725c.024.135.11.252.232.317l.66.345c.214.112.3.373.193.59l-.328.66a.442.442 0 000 .392l.328.66a.444.444 0 01-.194.59l-.659.346a.447.447 0 00-.232.317l-.13.725a.45.45 0 01-.507.363l-.738-.102a.455.455 0 00-.377.12l-.536.513a.457.457 0 01-.628 0l-.536-.513a.455.455 0 00-.376-.12l-.739.102a.45.45 0 01-.507-.363l-.13-.725a.446.446 0 00-.233-.317l-.66-.346a.444.444 0 01-.193-.59l.328-.66a.442.442 0 000-.391l-.328-.662a.444.444 0 01.194-.59l.66-.344a.446.446 0 00.232-.317l.13-.725a.45.45 0 01.507-.364l.739.103a.456.456 0 00.376-.121l.536-.513zm.314 1.312c-1.352 0-2.447 1.082-2.447 2.416 0 1.335 1.095 2.416 2.447 2.416 1.35 0 2.447-1.082 2.448-2.416 0-1.334-1.097-2.416-2.448-2.416z" />
6
+ <path
7
+ d="M6.4 8c.555 0 1.094.036 1.607.102-.022.222.014.453.12.669l.237.478-.237.48a1.24 1.24 0 00.535 1.64l.477.253.093.526c.027.148.079.287.151.41l-.088.242H0v-1.6C0 9.432 2.864 8 6.4 8zM6.4 0a3.202 3.202 0 013.2 3.2A3.2 3.2 0 116.4 0z" />
8
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "134.1.0",
3
+ "version": "135.0.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -151,6 +151,7 @@
151
151
  "svg-sprite-loader": "4.1.6",
152
152
  "svgo": "2.8.0",
153
153
  "svgstore-cli": "1.3.2",
154
+ "twake-i18n": "^0.3.0",
154
155
  "url-loader": "1.1.2",
155
156
  "webpack": "4.39.3",
156
157
  "whatwg-fetch": "3.5.0"
@@ -187,7 +188,8 @@
187
188
  "react": "^16 || ^17 || ^18",
188
189
  "react-dnd": "^16.0.1",
189
190
  "react-dnd-html5-backend": "^16.0.1",
190
- "react-dom": "^16 || ^17 || ^18"
191
+ "react-dom": "^16 || ^17 || ^18",
192
+ "twake-i18n": ">=0.3.0"
191
193
  },
192
194
  "eslintConfig": {
193
195
  "extends": [
@@ -1,5 +1,6 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useRef, useState, useMemo } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import ResponsiveAction from './ResponsiveAction'
5
6
  import withActionsLocales from './locales/withActionsLocales'
@@ -19,7 +20,6 @@ import Toolbar from '../Toolbar'
19
20
  import Typography from '../Typography'
20
21
  import useBreakpoints from '../providers/Breakpoints'
21
22
  import CozyTheme, { useCozyTheme } from '../providers/CozyTheme'
22
- import { useI18n } from '../providers/I18n'
23
23
  import { makeStyles } from '../styles'
24
24
 
25
25
  const useStyles = makeStyles({
@@ -1,8 +1,9 @@
1
+ import { withOnlyLocales } from 'twake-i18n'
2
+
1
3
  import en from './en.json'
2
4
  import fr from './fr.json'
3
5
  import ru from './ru.json'
4
6
  import vi from './vi.json'
5
- import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
6
7
 
7
8
  export const locales = {
8
9
  en,
@@ -1,9 +1,9 @@
1
+ import { withOnlyLocales, getI18n } from 'twake-i18n'
2
+
1
3
  import en from './en.json'
2
4
  import fr from './fr.json'
3
5
  import ru from './ru.json'
4
6
  import vi from './vi.json'
5
- import { getI18n } from '../../../providers/I18n/helpers'
6
- import withOnlyLocales from '../../../providers/I18n/withOnlyLocales'
7
7
 
8
8
  export const locales = {
9
9
  en,
@@ -1,10 +1,10 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { forwardRef, useMemo } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import { useWebviewIntent } from 'cozy-intent'
5
6
 
6
7
  import { getActionName, getOnlyNeededActions } from './Actions/helpers'
7
- import { useI18n } from '../providers/I18n'
8
8
 
9
9
  const ActionsItems = forwardRef(
10
10
  (
@@ -1,4 +1,5 @@
1
1
  import React, { useState, useRef } from 'react'
2
+ import { useI18n, useExtendI18n } from 'twake-i18n'
2
3
 
3
4
  import ActionsMenu from '.'
4
5
  import { locales } from './Actions/locales/withActionsLocales'
@@ -6,7 +7,6 @@ import Icon from '../Icon'
6
7
  import IconButton from '../IconButton'
7
8
  import DotsIcon from '../Icons/Dots'
8
9
  import ListItemIcon from '../ListItemIcon'
9
- import { useI18n, useExtendI18n } from '../providers/I18n'
10
10
 
11
11
  const ActionsMenuButton = ({ docs, actions }) => {
12
12
  const [showActions, setShowActions] = useState(false)
@@ -1,12 +1,12 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
+ import { createUseI18n } from 'twake-i18n'
3
4
 
4
5
  import locales from './locales'
5
6
  import styles from './styles.styl'
6
7
  import Icon from '../Icon'
7
8
  import IconButton from '../IconButton'
8
9
  import PreviousIcon from '../Icons/Previous'
9
- import { createUseI18n } from '../providers/I18n'
10
10
 
11
11
  const useI18n = createUseI18n(locales)
12
12
 
@@ -1,12 +1,12 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
+ import { createUseI18n } from 'twake-i18n'
3
4
 
4
5
  import locales from './locales'
5
6
  import styles from './styles.styl'
6
7
  import Icon from '../Icon'
7
8
  import IconButton from '../IconButton'
8
9
  import CrossMediumIcon from '../Icons/CrossMedium'
9
- import { createUseI18n } from '../providers/I18n'
10
10
 
11
11
  const useI18n = createUseI18n(locales)
12
12
 
@@ -1,5 +1,6 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { forwardRef } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import CozyLocation from './icons/CozyLocation'
5
6
  import withSpecificDialogsLocales from './withSpecificDialogsLocales'
@@ -7,7 +8,6 @@ import { IllustrationDialog } from '..'
7
8
  import Button from '../../Buttons'
8
9
  import Icon from '../../Icon'
9
10
  import Typography from '../../Typography'
10
- import { useI18n } from '../../providers/I18n'
11
11
 
12
12
  const createStyles = () => ({
13
13
  typography: {
@@ -1,5 +1,6 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { forwardRef } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import DefaultQRCode from './icons/QRCodeInstallFlagshipAppDialog.png'
5
6
  import appStoreIcon from './icons/appstore.png'
@@ -8,7 +9,6 @@ import withSpecificDialogsLocales from './withSpecificDialogsLocales'
8
9
  import { IllustrationDialog } from '..'
9
10
  import Link from '../../Link'
10
11
  import Typography from '../../Typography'
11
- import { useI18n } from '../../providers/I18n'
12
12
 
13
13
  const InstallFlagshipAppDialog = forwardRef(
14
14
  ({ onClose, playStoreUrl, appStoreUrl, QRCode }, ref) => {
@@ -1,5 +1,6 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useState } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import {
5
6
  checkAndSaveShortcut,
@@ -11,7 +12,6 @@ import Button from '../../Buttons'
11
12
  import Stack from '../../Stack'
12
13
  import TextField from '../../TextField'
13
14
  import { useAlert } from '../../providers/Alert'
14
- import { useI18n } from '../../providers/I18n'
15
15
 
16
16
  const ENTER_KEY = 13
17
17
 
@@ -1,8 +1,9 @@
1
+ import { withOnlyLocales } from 'twake-i18n'
2
+
1
3
  import en from './locales/en.json'
2
4
  import fr from './locales/fr.json'
3
5
  import ru from './locales/ru.json'
4
6
  import vi from './locales/vi.json'
5
- import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
6
7
 
7
8
  export const locales = {
8
9
  en,
@@ -1,5 +1,5 @@
1
1
  ```jsx
2
- import I18n from 'cozy-ui/transpiled/react/providers/I18n';
2
+ import I18n from 'twake-i18n';
3
3
  import DateMonthPicker from 'cozy-ui/transpiled/react/DateMonthPicker';
4
4
  import Stack from 'cozy-ui/transpiled/react/Stack';
5
5
  import Button from 'cozy-ui/transpiled/react/deprecated/Button';
@@ -3,12 +3,12 @@ import format from 'date-fns/format'
3
3
  import range from 'lodash/range'
4
4
  import PropTypes from 'prop-types'
5
5
  import React, { useState } from 'react'
6
+ import { useI18n } from 'twake-i18n'
6
7
 
7
8
  import styles from './styles.styl'
8
9
  import Icon from '../Icon'
9
10
  import LeftIcon from '../Icons/Left'
10
11
  import RightIcon from '../Icons/Right'
11
- import { useI18n } from '../providers/I18n'
12
12
 
13
13
  const MonthButton = ({ monthNum, onClick, isSelected }) => {
14
14
  const { f } = useI18n()
@@ -1,8 +1,8 @@
1
1
  import { fireEvent, render, screen } from '@testing-library/react'
2
2
  import React from 'react'
3
+ import I18n from 'twake-i18n'
3
4
 
4
5
  import DateMonthPicker from '.'
5
- import I18n from '../providers/I18n'
6
6
 
7
7
  describe('DateMonthPicker', () => {
8
8
  const setup = ({ initialValue }) => {
@@ -16,11 +16,11 @@ import LocaleFR from 'date-fns/locale/fr'
16
16
  import subDays from 'date-fns/subDays'
17
17
  import PropTypes from 'prop-types'
18
18
  import React, { forwardRef, useState } from 'react'
19
+ import { useI18n } from 'twake-i18n'
19
20
 
20
21
  import { makeFormat } from './helpers'
21
22
  import withOwnLocales from './locales/withOwnLocales'
22
23
  import useBreakpoints from '../providers/Breakpoints'
23
- import { useI18n } from '../providers/I18n'
24
24
  import { makeStyles } from '../styles'
25
25
 
26
26
  const localesFNS = {
@@ -1,8 +1,9 @@
1
+ import { withOnlyLocales } from 'twake-i18n'
2
+
1
3
  import en from './en.json'
2
4
  import fr from './fr.json'
3
5
  import ru from './ru.json'
4
6
  import vi from './vi.json'
5
- import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
6
7
 
7
8
  export const locales = {
8
9
  en,
@@ -1,4 +1,5 @@
1
1
  import React, { useRef } from 'react'
2
+ import { useI18n, useExtendI18n } from 'twake-i18n'
2
3
 
3
4
  import { handleDelete, handleUpload } from './helpers'
4
5
  import { locales } from './locales'
@@ -10,7 +11,6 @@ import ListItemText from '../ListItemText'
10
11
  import Menu from '../Menu'
11
12
  import MenuItem from '../MenuItem'
12
13
  import { useAlert } from '../providers/Alert'
13
- import { useI18n, useExtendI18n } from '../providers/I18n'
14
14
 
15
15
  const EditMenu = ({
16
16
  anchorRef,
@@ -146,6 +146,7 @@ import CrossSmall from 'cozy-ui/transpiled/react/Icons/CrossSmall'
146
146
  import Cube from 'cozy-ui/transpiled/react/Icons/Cube'
147
147
  import Dash from 'cozy-ui/transpiled/react/Icons/Dash'
148
148
  import Dashboard from 'cozy-ui/transpiled/react/Icons/Dashboard'
149
+ import Database from 'cozy-ui/transpiled/react/Icons/Database'
149
150
  import DataControl from 'cozy-ui/transpiled/react/Icons/DataControl'
150
151
  import Debit from 'cozy-ui/transpiled/react/Icons/Debit'
151
152
  import DesktopDownload from 'cozy-ui/transpiled/react/Icons/DesktopDownload'
@@ -168,6 +169,7 @@ import EmailOpen from 'cozy-ui/transpiled/react/Icons/EmailOpen'
168
169
  import Eu from 'cozy-ui/transpiled/react/Icons/Eu'
169
170
  import Euro from 'cozy-ui/transpiled/react/Icons/Euro'
170
171
  import Exchange from 'cozy-ui/transpiled/react/Icons/Exchange'
172
+ import Expert from 'cozy-ui/transpiled/react/Icons/Expert'
171
173
  import Eye from 'cozy-ui/transpiled/react/Icons/Eye'
172
174
  import EyeClosed from 'cozy-ui/transpiled/react/Icons/EyeClosed'
173
175
  import FaceId from 'cozy-ui/transpiled/react/Icons/FaceId'
@@ -431,6 +433,7 @@ const icons = [
431
433
  Cube,
432
434
  Dash,
433
435
  Dashboard,
436
+ Database,
434
437
  DataControl,
435
438
  Debit,
436
439
  DesktopDownload,
@@ -453,6 +456,7 @@ const icons = [
453
456
  Eu,
454
457
  Euro,
455
458
  Exchange,
459
+ Expert,
456
460
  Eye,
457
461
  EyeClosed,
458
462
  FaceId,
@@ -1000,7 +1004,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
1000
1004
 
1001
1005
  const colors = ['#297EF2', '#08b442', '#B449E7', '#F52D2D', '#FF962F']
1002
1006
  let i = 0
1003
- const availableIcons = ['album-add','album-remove','album','answer','apple','archive','arrowUp','assign-admin','assign-moderator','attachment','attention','bank-check','bank','banking-add','banking','bell','benefit','bike','bill','bottom','browser-brave','browser-chrome','browser-duckduckgo','browser-edge','browser-edge-chromium','browser-firefox','browser-ie','browser-opera','browser-safari','burger','bus','calendar','camera','car','carbonCopy','carpooling','categories','certified','check-circle','check-list','check-square','check','checkbox','chess','child','circle-filled','clock','clock-outline','cloud-happy','cloud-rainbow','cloud-plus-outlined','cloud','cloud2','collect','cocktail','comment','company','compare','compass','connector','contract','contrast','copy','cozy-circle','cozy-laugh', 'cozy-lock', 'cozy-text', 'cozy-release', 'credit-card-add','credit-card','credit','crop','cross-circle-outline','cross-circle','cross-medium','cross-small','cross','cube','dash','dashboard','data-control','debit','desktop-download','devices','discuss','dots','down','download','drawing-arrow-up','dropdown-close','dropdown-open','dropdown','dropup','electric-bike','electric-car','electric-scooter','email-notification','email-open','email','eu','euro','exchange','eye-closed','eye','face-id','file-add','file-duotone','file-new','file-none','file-outline','file','filter','fingerprint','fitness','flag-outlined','flag','flash-auto','flashlight','folder-add','folder-moveto','folder-open','folder','forbidden','from-user','gear','globe','gouv','graph-circle','grid','group-list','groups','growth','hand','heart','help','help-outlined','history','home','hourglass','image','info-outlined','info','justice','key','key2','label-outlined','laudry','laptop','left','library','lightbulb','lightning','link-out','link','list','list-min','location','lock', 'lock-screen', 'logout','magic-trick','magnet','magnifier','matrix','merge','moped','mosaic','mosaic-min','motorcycle','mountain','movement-in','movement-out','mouvement','moveto','multi-files','music','new','next','note','notification-email','number','offline','online', 'openapp', 'openwith','palette','paper','paperplane','password','pen','people','peoples','percent-circle','percent','person-add','personal-data','phone-download','phone-upload','phone','pie-chart','pin','plane','planet','plus-small','plus', 'pop-inside', 'previous','printer','qualify','radio-checked','radio-unchecked','refresh','relationship','remboursement','rename','repare','reply','restaurant','restore-straight','restore','right','rise','rotate-left','rotate-right','sad-cozy','safe','school','scooter','secutiry','select-all','server','setting','share-circle','share','shield','shop','sound','spinner','sport-bag','stack','star','star-outline','stats','stop', 'subway', 'support', 'swap', 'sync-cozy','sync','tab','tag','target','task','team','telecom','telephone','text','text-info','to-the-cloud','top','train','tram','trash','trophy', 'uncloud', 'unknow','unlink','unlock','up','upload','videos','walk','wallet-add','wallet-new','wallet','warn','warning-circle','warning','water','wrench-circle','work']
1007
+ const availableIcons = ['album-add','album-remove','album','answer','apple','archive','arrowUp','assign-admin','assign-moderator','attachment','attention','bank-check','bank','banking-add','banking','bell','benefit','bike','bill','bottom','browser-brave','browser-chrome','browser-duckduckgo','browser-edge','browser-edge-chromium','browser-firefox','browser-ie','browser-opera','browser-safari','burger','bus','calendar','camera','car','carbonCopy','carpooling','categories','certified','check-circle','check-list','check-square','check','checkbox','chess','child','circle-filled','clock','clock-outline','cloud-happy','cloud-rainbow','cloud-plus-outlined','cloud','cloud2','collect','cocktail','comment','company','compare','compass','connector','contract','contrast','copy','cozy-circle','cozy-laugh', 'cozy-lock', 'cozy-text', 'cozy-release', 'credit-card-add','credit-card','credit','crop','cross-circle-outline','cross-circle','cross-medium','cross-small','cross','cube','dash','dashboard','data-control','database','debit','desktop-download','devices','discuss','dots','down','download','drawing-arrow-up','dropdown-close','dropdown-open','dropdown','dropup','electric-bike','electric-car','electric-scooter','email-notification','email-open','email','eu','euro','exchange','expert','eye-closed','eye','face-id','file-add','file-duotone','file-new','file-none','file-outline','file','filter','fingerprint','fitness','flag-outlined','flag','flash-auto','flashlight','folder-add','folder-moveto','folder-open','folder','forbidden','from-user','gear','globe','gouv','graph-circle','grid','group-list','groups','growth','hand','heart','help','help-outlined','history','home','hourglass','image','info-outlined','info','justice','key','key2','label-outlined','laudry','laptop','left','library','lightbulb','lightning','link-out','link','list','list-min','location','lock', 'lock-screen', 'logout','magic-trick','magnet','magnifier','matrix','merge','moped','mosaic','mosaic-min','motorcycle','mountain','movement-in','movement-out','mouvement','moveto','multi-files','music','new','next','note','notification-email','number','offline','online', 'openapp', 'openwith','palette','paper','paperplane','password','pen','people','peoples','percent-circle','percent','person-add','personal-data','phone-download','phone-upload','phone','pie-chart','pin','plane','planet','plus-small','plus', 'pop-inside', 'previous','printer','qualify','radio-checked','radio-unchecked','refresh','relationship','remboursement','rename','repare','reply','restaurant','restore-straight','restore','right','rise','rotate-left','rotate-right','sad-cozy','safe','school','scooter','secutiry','select-all','server','setting','share-circle','share','shield','shop','sound','spinner','sport-bag','stack','star','star-outline','stats','stop', 'subway', 'support', 'swap', 'sync-cozy','sync','tab','tag','target','task','team','telecom','telephone','text','text-info','to-the-cloud','top','train','tram','trash','trophy', 'uncloud', 'unknow','unlink','unlock','up','upload','videos','walk','wallet-add','wallet-new','wallet','warn','warning-circle','warning','water','wrench-circle','work']
1004
1008
  ;
1005
1009
 
1006
1010
  <Grid container spacing={2}>
@@ -0,0 +1,14 @@
1
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/database.svg` to regenerate;
2
+ import React from 'react'
3
+
4
+ function SvgDatabase(props) {
5
+ return (
6
+ <svg viewBox="0 0 14 16" {...props}>
7
+ <path d="M14 3.46c0 1.91-3.134 3.459-7 3.459S0 5.37 0 3.459C0 1.55 3.134 0 7 0s7 1.549 7 3.46zm0 10.43C12.691 15.142 10.049 16 7 16s-5.691-.857-7-2.11v-1.729c1.308 1.253 3.951 2.11 7 2.11s5.692-.858 7-2.11v1.73z" />
8
+ <path d="M14 10.863c-1.309 1.253-3.951 2.11-7 2.11s-5.691-.857-7-2.11V9.134c1.308 1.253 3.951 2.11 7 2.11s5.692-.858 7-2.11v1.73z" />
9
+ <path d="M14 7.836c-1.309 1.252-3.951 2.11-7 2.11s-5.691-.858-7-2.11V6.107c1.308 1.253 3.951 2.11 7 2.11s5.692-.858 7-2.11v1.73z" />
10
+ </svg>
11
+ )
12
+ }
13
+
14
+ export default SvgDatabase
@@ -0,0 +1,17 @@
1
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/expert.svg` to regenerate;
2
+ import React from 'react'
3
+
4
+ function SvgExpert(props) {
5
+ return (
6
+ <svg viewBox="0 0 16 16" fill="none" {...props}>
7
+ <path d="M10.838 12.894a.455.455 0 01.377.12l.538.516-.91 2.47-.585-1.239-1.254.578.85-2.309.985-.136zm2.857 0l1.015.141c.074.01.146 0 .212-.023l.858 2.326-1.254-.576L13.941 16l-.976-2.649.354-.336c.1-.096.238-.14.376-.121zM12.01 7.552c.08-.246.433-.246.514 0l.231.702c.036.11.14.186.257.186h.748c.263 0 .371.33.16.483l-.605.433a.267.267 0 00-.098.3l.23.702c.082.246-.204.451-.416.3l-.605-.435a.274.274 0 00-.319 0l-.605.434c-.212.152-.497-.053-.417-.299l.232-.702a.267.267 0 00-.098-.3l-.605-.433c-.212-.152-.103-.483.159-.483h.748a.271.271 0 00.257-.186l.231-.702z" />
8
+ <path
9
+ clipRule="evenodd"
10
+ d="M11.953 5.458a.457.457 0 01.628 0l.536.513c.1.095.24.14.377.12l.738-.102a.451.451 0 01.508.364l.129.725a.45.45 0 00.232.317l.66.345c.214.112.3.373.193.59l-.328.66a.442.442 0 000 .392l.328.66a.444.444 0 01-.194.59l-.659.346a.447.447 0 00-.232.317l-.13.725a.45.45 0 01-.507.363l-.738-.102a.455.455 0 00-.377.12l-.536.513a.457.457 0 01-.628 0l-.536-.513a.455.455 0 00-.376-.12l-.739.102a.45.45 0 01-.507-.363l-.13-.725a.446.446 0 00-.233-.317l-.66-.346a.444.444 0 01-.193-.59l.328-.66a.442.442 0 000-.391l-.328-.662a.444.444 0 01.194-.59l.66-.344a.446.446 0 00.232-.317l.13-.725a.45.45 0 01.507-.364l.739.103a.456.456 0 00.376-.121l.536-.513zm.314 1.312c-1.352 0-2.447 1.082-2.447 2.416 0 1.335 1.095 2.416 2.447 2.416 1.35 0 2.447-1.082 2.448-2.416 0-1.334-1.097-2.416-2.448-2.416z"
11
+ />
12
+ <path d="M6.4 8c.555 0 1.094.036 1.607.102-.022.222.014.453.12.669l.237.478-.237.48a1.24 1.24 0 00.535 1.64l.477.253.093.526c.027.148.079.287.151.41l-.088.242H0v-1.6C0 9.432 2.864 8 6.4 8zm0-8a3.202 3.202 0 013.2 3.2A3.2 3.2 0 116.4 0z" />
13
+ </svg>
14
+ )
15
+ }
16
+
17
+ export default SvgExpert
@@ -7,8 +7,8 @@ import styles from './styles.styl'
7
7
  import Icon from '../../Icon'
8
8
  import EyeIcon from '../../Icons/Eye'
9
9
  import EyeClosedIcon from '../../Icons/EyeClosed'
10
- import Input from '../../legacy/Input'
11
10
  import InputGroup from '../../InputGroup'
11
+ import Input from '../../legacy/Input'
12
12
 
13
13
  const HideShowButton = props => {
14
14
  const { hidden, className, ...rest } = props
@@ -1,5 +1,6 @@
1
1
  import cx from 'classnames'
2
2
  import React, { Children, isValidElement, useState, forwardRef } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import withNavLocales from './locales/withNavLocales'
5
6
  import styles from './styles.styl'
@@ -9,7 +10,6 @@ import BottomIcon from '../Icons/Bottom'
9
10
  import TopIcon from '../Icons/Top'
10
11
  import ListItem from '../ListItem'
11
12
  import useBreakpoints from '../providers/Breakpoints'
12
- import { useI18n } from '../providers/I18n'
13
13
 
14
14
  export const NavItem = ({ className, children, secondary, ...restProps }) => (
15
15
  <li
@@ -1,8 +1,9 @@
1
+ import { withOnlyLocales } from 'twake-i18n'
2
+
1
3
  import en from './en.json'
2
4
  import fr from './fr.json'
3
5
  import ru from './ru.json'
4
6
  import vi from './vi.json'
5
- import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
6
7
 
7
8
  export const locales = {
8
9
  en,
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from 'react'
2
+ import { useI18n, withOnlyLocales } from 'twake-i18n'
2
3
 
3
4
  import en from './locales/en.json'
4
5
  import fr from './locales/fr.json'
@@ -10,8 +11,6 @@ import EyeIcon from '../Icons/Eye'
10
11
  import EyeClosedIcon from '../Icons/EyeClosed'
11
12
  import InputAdornment from '../InputAdornment'
12
13
  import TextField from '../TextField'
13
- import { useI18n } from '../providers/I18n'
14
- import withOnlyLocales from '../providers/I18n/withOnlyLocales'
15
14
 
16
15
  export const locales = {
17
16
  en,
@@ -2,6 +2,7 @@ import cx from 'classnames'
2
2
  import debounce from 'lodash/debounce'
3
3
  import PropTypes from 'prop-types'
4
4
  import React, { forwardRef, useState, useMemo } from 'react'
5
+ import { useI18n, useExtendI18n } from 'twake-i18n'
5
6
 
6
7
  import { locales } from './locales/withOnlyLocales'
7
8
  import ButtonBase from '../ButtonBase'
@@ -13,7 +14,6 @@ import MagnifierIcon from '../Icons/Magnifier'
13
14
  import InputBase from '../InputBase'
14
15
  import Paper from '../Paper'
15
16
  import Typography from '../Typography'
16
- import { useI18n, useExtendI18n } from '../providers/I18n'
17
17
  import { makeStyles } from '../styles'
18
18
 
19
19
  const sizeToPixel = {
@@ -1,8 +1,9 @@
1
+ import { withOnlyLocales } from 'twake-i18n'
2
+
1
3
  import en from './en.json'
2
4
  import fr from './fr.json'
3
5
  import ru from './ru.json'
4
6
  import vi from './vi.json'
5
- import withOnlyLocales from '../../providers/I18n/withOnlyLocales'
6
7
 
7
8
  export const locales = {
8
9
  en,
@@ -1,13 +1,13 @@
1
1
  import cx from 'classnames'
2
2
  import PropTypes from 'prop-types'
3
3
  import React from 'react'
4
+ import { useI18n } from 'twake-i18n'
4
5
 
5
6
  import styles from './styles.styl'
6
7
  import Button from '../Button'
7
8
  import Icon from '../Icon'
8
9
  import IconButton from '../IconButton'
9
10
  import useBreakpoints from '../providers/Breakpoints'
10
- import { useI18n } from '../providers/I18n'
11
11
 
12
12
  const SelectionBarAction = ({ selectedCount, selected, action }) => {
13
13
  const { isDesktop } = useBreakpoints()
@@ -1,12 +1,12 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useState, useRef } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import styles from './styles.styl'
5
6
  import Icon from '../Icon'
6
7
  import IconButton from '../IconButton'
7
8
  import DotsIcon from '../Icons/Dots'
8
9
  import { ActionMenuWithClose, ActionMenuItem } from '../deprecated/ActionMenu'
9
- import { useI18n } from '../providers/I18n'
10
10
 
11
11
  const SelectionBarMore = ({ actions, selectedCount, selected }) => {
12
12
  const { t } = useI18n()
@@ -1,6 +1,7 @@
1
1
  import { useTheme } from '@material-ui/core'
2
2
  import PropTypes from 'prop-types'
3
3
  import React, { useEffect } from 'react'
4
+ import { useI18n } from 'twake-i18n'
4
5
 
5
6
  import { useWebviewIntent } from 'cozy-intent'
6
7
 
@@ -12,7 +13,6 @@ import Icon from '../Icon'
12
13
  import IconButton from '../IconButton'
13
14
  import CrossIcon from '../Icons/Cross'
14
15
  import useBreakpoints from '../providers/Breakpoints'
15
- import { useI18n } from '../providers/I18n'
16
16
 
17
17
  /*
18
18
 
@@ -52,7 +52,7 @@ When you use `loadingType`, `<Spinner />` needs to be in an `<I18n />` wrapper a
52
52
 
53
53
  ```jsx
54
54
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
55
- import I18n from 'cozy-ui/transpiled/react/providers/I18n'
55
+ import I18n from 'twake-i18n'
56
56
 
57
57
  ;
58
58
 
@@ -1,12 +1,12 @@
1
1
  import cx from 'classnames'
2
2
  import PropTypes from 'prop-types'
3
3
  import React from 'react'
4
+ import { translate } from 'twake-i18n'
4
5
 
5
6
  import styles from './styles.styl'
6
7
  import Icon from '../Icon'
7
8
  import SpinnerIcon from '../Icons/Spinner'
8
9
  import Typography from '../Typography'
9
- import { translate } from '../providers/I18n'
10
10
 
11
11
  export const Spinner = ({
12
12
  t,
@@ -1,6 +1,5 @@
1
- import React, { useEffect } from 'react'
2
1
  import cx from 'classnames'
3
-
2
+ import React, { useEffect } from 'react'
4
3
  import { useDrag, useDrop } from 'react-dnd'
5
4
  import { getEmptyImage } from 'react-dnd-html5-backend'
6
5
 
@@ -4,9 +4,9 @@ import React from 'react'
4
4
  import styles from './styles.styl'
5
5
  import Icon from '../Icon'
6
6
  import CloudIcon from '../Icons/Cloud'
7
- import Input from '../legacy/Input'
8
7
  import Typography from '../Typography'
9
8
  import Button from '../deprecated/Button'
9
+ import Input from '../legacy/Input'
10
10
 
11
11
  export const Wizard = ({ children, tag, ...props }) => {
12
12
  const Component = tag || 'div'
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useMemo } from 'react'
3
+ import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import { getActionName, getOnlyNeededActions } from './helpers'
5
- import { useI18n } from '../../../providers/I18n'
6
6
 
7
7
  const ActionsItems = ({ doc, actions, isLast, setIsRenaming, onClose }) => {
8
8
  const { t } = useI18n()
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
+ import { useI18n } from 'twake-i18n'
2
3
 
3
4
  import withActionsLocales from './locales/withActionsLocales'
4
5
  import TelephoneIcon from '../../../Icons/Telephone'
5
- import { useI18n } from '../../../providers/I18n'
6
6
  import ActionMenuItemWrapper from '../ActionMenuItemWrapper'
7
7
 
8
8
  export const call = () => {
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
+ import { useI18n } from 'twake-i18n'
2
3
 
3
4
  import withActionsLocales from './locales/withActionsLocales'
4
5
  import EmailIcon from '../../../Icons/Email'
5
- import { useI18n } from '../../../providers/I18n'
6
6
  import ActionMenuItemWrapper from '../ActionMenuItemWrapper'
7
7
 
8
8
  export const emailTo = () => {
@@ -1,8 +1,9 @@
1
+ import { withLocales } from 'twake-i18n'
2
+
1
3
  import en from './en.json'
2
4
  import fr from './fr.json'
3
5
  import ru from './ru.json'
4
6
  import vi from './vi.json'
5
- import withLocales from '../../../../providers/I18n/withLocales'
6
7
 
7
8
  export const locales = {
8
9
  en,