cozy-ui 134.2.0 → 135.1.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.
- package/CHANGELOG.md +32 -0
- package/assets/icons/ui/send.svg +1 -0
- package/package.json +4 -2
- package/react/ActionsBar/index.jsx +1 -1
- package/react/ActionsBar/locales/withActionsLocales.jsx +2 -1
- package/react/ActionsMenu/Actions/locales/withActionsLocales.jsx +2 -2
- package/react/ActionsMenu/ActionsItems.jsx +1 -1
- package/react/ActionsMenu/ActionsMenuButton.jsx +1 -1
- package/react/CozyDialogs/DialogBackButton.jsx +1 -1
- package/react/CozyDialogs/DialogCloseButton.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/InstallFlagshipAppDialog.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/ShortcutDialog.jsx +1 -1
- package/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.jsx +2 -1
- package/react/DateMonthPicker/Readme.md +1 -1
- package/react/DateMonthPicker/index.jsx +1 -1
- package/react/DateMonthPicker/index.spec.jsx +1 -1
- package/react/DatePicker/index.jsx +1 -1
- package/react/DatePicker/locales/withOwnLocales.jsx +2 -1
- package/react/EditBadge/EditMenu.jsx +1 -1
- package/react/Icon/Readme.md +3 -1
- package/react/Icons/Send.jsx +12 -0
- package/react/Labs/PasswordInput/index.jsx +1 -1
- package/react/Nav/index.jsx +1 -1
- package/react/Nav/locales/withNavLocales.jsx +2 -1
- package/react/PasswordField/index.jsx +1 -2
- package/react/SearchBar/index.jsx +1 -1
- package/react/SearchBar/locales/withOnlyLocales.jsx +2 -1
- package/react/SelectionBar/SelectionBarAction.jsx +1 -1
- package/react/SelectionBar/SelectionBarMore.jsx +1 -1
- package/react/SelectionBar/index.jsx +1 -1
- package/react/Spinner/Readme.md +1 -1
- package/react/Spinner/index.jsx +1 -1
- package/react/Table/Virtualized/Dnd/TableRow.jsx +1 -2
- package/react/Wizard/index.jsx +1 -1
- package/react/deprecated/ActionMenu/Actions/ActionsItems.jsx +1 -1
- package/react/deprecated/ActionMenu/Actions/call.js +1 -1
- package/react/deprecated/ActionMenu/Actions/emailTo.js +1 -1
- package/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.jsx +2 -1
- package/react/deprecated/ActionMenu/Actions/smsTo.js +1 -1
- package/react/hooks/useConfirmExit/index.jsx +1 -1
- package/react/index.js +0 -1
- package/react/jestLib/I18n.js +1 -1
- package/react/providers/DemoProvider.jsx +1 -1
- package/transpiled/react/ActionsBar/index.js +1 -1
- package/transpiled/react/ActionsBar/locales/withActionsLocales.js +1 -1
- package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.d.ts +1 -1
- package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.js +1 -2
- package/transpiled/react/ActionsMenu/ActionsItems.js +1 -1
- package/transpiled/react/ActionsMenu/ActionsMenuButton.js +1 -1
- package/transpiled/react/CozyDialogs/DialogBackButton.js +1 -1
- package/transpiled/react/CozyDialogs/DialogCloseButton.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/AllowLocationDialog.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/InstallFlagshipAppDialog.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/ShortcutDialog.js +1 -1
- package/transpiled/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.js +1 -1
- package/transpiled/react/DateMonthPicker/index.js +1 -1
- package/transpiled/react/DatePicker/index.js +1 -1
- package/transpiled/react/DatePicker/locales/withOwnLocales.js +1 -1
- package/transpiled/react/EditBadge/EditMenu.js +1 -1
- package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/Send.d.ts +2 -0
- package/transpiled/react/Icons/Send.js +13 -0
- package/transpiled/react/Labs/PasswordInput/index.js +1 -1
- package/transpiled/react/Nav/index.js +1 -1
- package/transpiled/react/Nav/locales/withNavLocales.js +1 -1
- package/transpiled/react/PasswordField/index.js +1 -2
- package/transpiled/react/SearchBar/index.js +1 -1
- package/transpiled/react/SearchBar/locales/withOnlyLocales.js +1 -1
- package/transpiled/react/SelectionBar/SelectionBarAction.js +1 -1
- package/transpiled/react/SelectionBar/SelectionBarMore.js +1 -1
- package/transpiled/react/SelectionBar/index.js +1 -1
- package/transpiled/react/Spinner/index.js +1 -1
- package/transpiled/react/Table/Virtualized/Dnd/TableRow.js +1 -1
- package/transpiled/react/Wizard/index.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/ActionsItems.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/call.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/emailTo.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.js +1 -1
- package/transpiled/react/deprecated/ActionMenu/Actions/smsTo.js +1 -1
- package/transpiled/react/hooks/useConfirmExit/index.js +1 -1
- package/transpiled/react/index.d.ts +0 -1
- package/transpiled/react/index.js +0 -1
- package/transpiled/react/jestLib/I18n.d.ts +1 -1
- package/transpiled/react/jestLib/I18n.js +1 -1
- package/transpiled/react/providers/DemoProvider.js +1 -1
- package/react/I18n/index.js +0 -25
- package/react/I18n/withLocales.js +0 -14
- package/react/providers/I18n/createUseI18n.jsx +0 -32
- package/react/providers/I18n/format.jsx +0 -62
- package/react/providers/I18n/format.spec.jsx +0 -73
- package/react/providers/I18n/helpers.js +0 -33
- package/react/providers/I18n/index.jsx +0 -107
- package/react/providers/I18n/index.spec.jsx +0 -135
- package/react/providers/I18n/translate.jsx +0 -28
- package/react/providers/I18n/translation.jsx +0 -42
- package/react/providers/I18n/useExtendI18n.jsx +0 -37
- package/react/providers/I18n/withLocales.jsx +0 -47
- package/react/providers/I18n/withLocales.spec.jsx +0 -58
- package/react/providers/I18n/withOnlyLocales.jsx +0 -38
- package/transpiled/react/I18n/index.d.ts +0 -3
- package/transpiled/react/I18n/index.js +0 -16
- package/transpiled/react/I18n/withLocales.d.ts +0 -2
- package/transpiled/react/I18n/withLocales.js +0 -10
- package/transpiled/react/providers/I18n/createUseI18n.d.ts +0 -6
- package/transpiled/react/providers/I18n/createUseI18n.js +0 -39
- package/transpiled/react/providers/I18n/format.d.ts +0 -3
- package/transpiled/react/providers/I18n/format.js +0 -72
- package/transpiled/react/providers/I18n/format.spec.d.ts +0 -1
- package/transpiled/react/providers/I18n/helpers.d.ts +0 -5
- package/transpiled/react/providers/I18n/helpers.js +0 -35
- package/transpiled/react/providers/I18n/index.d.ts +0 -62
- package/transpiled/react/providers/I18n/index.js +0 -132
- package/transpiled/react/providers/I18n/index.spec.d.ts +0 -1
- package/transpiled/react/providers/I18n/translate.d.ts +0 -3
- package/transpiled/react/providers/I18n/translate.js +0 -21
- package/transpiled/react/providers/I18n/translation.d.ts +0 -3
- package/transpiled/react/providers/I18n/translation.js +0 -40
- package/transpiled/react/providers/I18n/useExtendI18n.d.ts +0 -7
- package/transpiled/react/providers/I18n/useExtendI18n.js +0 -42
- package/transpiled/react/providers/I18n/withLocales.d.ts +0 -8
- package/transpiled/react/providers/I18n/withLocales.js +0 -69
- package/transpiled/react/providers/I18n/withLocales.spec.d.ts +0 -1
- package/transpiled/react/providers/I18n/withOnlyLocales.d.ts +0 -8
- package/transpiled/react/providers/I18n/withOnlyLocales.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
# [135.1.0](https://github.com/cozy/cozy-ui/compare/v135.0.0...v135.1.0) (2025-12-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **Icon:** Add Send ([9dc2177](https://github.com/cozy/cozy-ui/commit/9dc2177))
|
|
7
|
+
|
|
8
|
+
# [135.0.0](https://github.com/cozy/cozy-ui/compare/v134.2.0...v135.0.0) (2025-12-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Add twake-i18n package ([7b9ff5f](https://github.com/cozy/cozy-ui/commit/7b9ff5f))
|
|
14
|
+
* Remove I18n ([df09711](https://github.com/cozy/cozy-ui/commit/df09711))
|
|
15
|
+
* Replace I18n stuff by twake-i18n ([ab99763](https://github.com/cozy/cozy-ui/commit/ab99763))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* No longer expose I18n provider. You must import everything previously based on `providers/I18n` from `twake-i18n`.
|
|
21
|
+
You can use this codemods to migrate:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
yarn add twake-i18n
|
|
25
|
+
yarn global add @cozy/codemods
|
|
26
|
+
yarn global add jscodeshift@0.13.1
|
|
27
|
+
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
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
You probably will need to fix linter issue after that with something like `yarn lint --fix`.
|
|
31
|
+
* you must have `twake-i18n >= 0.3.0`
|
|
32
|
+
|
|
1
33
|
# [134.2.0](https://github.com/cozy/cozy-ui/compare/v134.1.0...v134.2.0) (2025-12-04)
|
|
2
34
|
|
|
3
35
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15.594 1.252 9.75 14.927a.88.88 0 0 1-.66.53.821.821 0 0 1-.799-.253L.252 6.88a.821.821 0 0 1-.224-.807.88.88 0 0 1 .553-.64L14.45.067c.374-.137.696-.067.965.212.27.279.329.603.178.972ZM8.74 13.55 13.7 1.938 1.92 6.488 4.44 9.095l4.722-2.774-2.938 4.621 2.518 2.608Z"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "135.1.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 '
|
|
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,
|
package/react/Icon/Readme.md
CHANGED
|
@@ -298,6 +298,7 @@ import School from 'cozy-ui/transpiled/react/Icons/School'
|
|
|
298
298
|
import Scooter from 'cozy-ui/transpiled/react/Icons/Scooter'
|
|
299
299
|
import Security from 'cozy-ui/transpiled/react/Icons/Security'
|
|
300
300
|
import SelectAll from 'cozy-ui/transpiled/react/Icons/SelectAll'
|
|
301
|
+
import Send from 'cozy-ui/transpiled/react/Icons/Send'
|
|
301
302
|
import Server from 'cozy-ui/transpiled/react/Icons/Server'
|
|
302
303
|
import Setting from 'cozy-ui/transpiled/react/Icons/Setting'
|
|
303
304
|
import Share from 'cozy-ui/transpiled/react/Icons/Share'
|
|
@@ -585,6 +586,7 @@ const icons = [
|
|
|
585
586
|
Scooter,
|
|
586
587
|
Security,
|
|
587
588
|
SelectAll,
|
|
589
|
+
Send,
|
|
588
590
|
Server,
|
|
589
591
|
Setting,
|
|
590
592
|
Share,
|
|
@@ -1004,7 +1006,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
|
1004
1006
|
|
|
1005
1007
|
const colors = ['#297EF2', '#08b442', '#B449E7', '#F52D2D', '#FF962F']
|
|
1006
1008
|
let i = 0
|
|
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']
|
|
1009
|
+
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','send','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']
|
|
1008
1010
|
;
|
|
1009
1011
|
|
|
1010
1012
|
<Grid container spacing={2}>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/send.svg` to regenerate;
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
function SvgSend(props) {
|
|
5
|
+
return (
|
|
6
|
+
<svg viewBox="0 0 16 16" {...props}>
|
|
7
|
+
<path d="M15.594 1.252L9.75 14.927a.88.88 0 01-.66.53.821.821 0 01-.799-.253L.252 6.88a.821.821 0 01-.224-.807.88.88 0 01.553-.64L14.45.067c.374-.137.696-.067.965.212.27.279.329.603.178.972zM8.74 13.55L13.7 1.938 1.92 6.488l2.52 2.607 4.722-2.774-2.938 4.621 2.518 2.608z" />
|
|
8
|
+
</svg>
|
|
9
|
+
)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default SvgSend
|
|
@@ -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
|
package/react/Nav/index.jsx
CHANGED
|
@@ -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
|
|
package/react/Spinner/Readme.md
CHANGED
package/react/Spinner/index.jsx
CHANGED
|
@@ -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,
|
package/react/Wizard/index.jsx
CHANGED
|
@@ -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,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 CommentIcon from '../../../Icons/Comment'
|
|
5
|
-
import { useI18n } from '../../../providers/I18n'
|
|
6
6
|
import ActionMenuItemWrapper from '../ActionMenuItemWrapper'
|
|
7
7
|
|
|
8
8
|
export const smsTo = () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { useCallback, useRef, useState } from 'react'
|
|
3
|
+
import { withLocales } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import en from './locales/en.json'
|
|
5
6
|
import fr from './locales/fr.json'
|
|
@@ -7,7 +8,6 @@ import ru from './locales/ru.json'
|
|
|
7
8
|
import vi from './locales/vi.json'
|
|
8
9
|
import { ConfirmDialog } from '../../CozyDialogs'
|
|
9
10
|
import Button from '../../deprecated/Button'
|
|
10
|
-
import withLocales from '../../providers/I18n/withLocales'
|
|
11
11
|
import useEventListener from '../useEventListener'
|
|
12
12
|
|
|
13
13
|
/**
|
package/react/index.js
CHANGED
|
@@ -6,7 +6,6 @@ export { default as Banner } from './Banner'
|
|
|
6
6
|
export { default as ButtonAction } from './deprecated/ButtonAction'
|
|
7
7
|
export { default as BottomDrawer } from './deprecated/BottomDrawer'
|
|
8
8
|
export { default as BarButton } from './BarButton'
|
|
9
|
-
export { default as I18n, translate, useI18n } from './providers/I18n'
|
|
10
9
|
export { default as Icon } from './Icon'
|
|
11
10
|
export { default as Sprite } from './Icon/Sprite'
|
|
12
11
|
export { default as Sidebar } from './Sidebar'
|