cozy-ui 110.7.1 → 110.8.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/MuiCozyTheme/overrides/makeLightNormalOverrides.js +4 -1
- package/react/providers/Alert/index.jsx +7 -2
- package/transpiled/react/MuiCozyTheme/overrides/makeDarkInvertedOverrides.d.ts +3 -0
- package/transpiled/react/MuiCozyTheme/overrides/makeDarkNormalOverrides.d.ts +3 -0
- package/transpiled/react/MuiCozyTheme/overrides/makeLightInvertedOverrides.d.ts +3 -0
- package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.d.ts +3 -0
- package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +5 -1
- package/transpiled/react/providers/Alert/index.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [110.8.1](https://github.com/cozy/cozy-ui/compare/v110.8.0...v110.8.1) (2024-07-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **PermissionDialog:** Show overflow icon on iOS ([f9f6073](https://github.com/cozy/cozy-ui/commit/f9f6073))
|
|
7
|
+
|
|
8
|
+
# [110.8.0](https://github.com/cozy/cozy-ui/compare/v110.7.1...v110.8.0) (2024-07-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **AlertProvider:** Add `duration` prop ([03b2f0e](https://github.com/cozy/cozy-ui/commit/03b2f0e))
|
|
14
|
+
|
|
1
15
|
## [110.7.1](https://github.com/cozy/cozy-ui/compare/v110.7.0...v110.7.1) (2024-07-09)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -456,7 +456,10 @@ export const makeLightNormalOverrides = theme => ({
|
|
|
456
456
|
}
|
|
457
457
|
},
|
|
458
458
|
'&.overflow': {
|
|
459
|
-
overflowY: 'visible !important' // Allow the icon to overflow the dialog, otherwise it will be cut off
|
|
459
|
+
overflowY: 'visible !important', // Allow the icon to overflow the dialog, otherwise it will be cut off,
|
|
460
|
+
'& .cozyDialogContent': {
|
|
461
|
+
overflowY: 'visible !important' // This allow the overflow to work also on iOS
|
|
462
|
+
}
|
|
460
463
|
}
|
|
461
464
|
},
|
|
462
465
|
scrollPaper: {
|
|
@@ -29,6 +29,7 @@ export const useAlert = () => {
|
|
|
29
29
|
const defaultState = {
|
|
30
30
|
title: '',
|
|
31
31
|
message: '',
|
|
32
|
+
duration: null,
|
|
32
33
|
open: false
|
|
33
34
|
}
|
|
34
35
|
const handleClose = (state, setState) => () => {
|
|
@@ -37,7 +38,7 @@ const handleClose = (state, setState) => () => {
|
|
|
37
38
|
|
|
38
39
|
const AlertProvider = ({ children }) => {
|
|
39
40
|
const [state, setState] = useState(defaultState)
|
|
40
|
-
const { open, message, title, ...alertProps } = state
|
|
41
|
+
const { open, message, title, duration, ...alertProps } = state
|
|
41
42
|
|
|
42
43
|
const value = useMemo(
|
|
43
44
|
() => ({
|
|
@@ -54,7 +55,11 @@ const AlertProvider = ({ children }) => {
|
|
|
54
55
|
return (
|
|
55
56
|
<AlertContext.Provider value={value}>
|
|
56
57
|
{children}
|
|
57
|
-
<Snackbar
|
|
58
|
+
<Snackbar
|
|
59
|
+
open={open}
|
|
60
|
+
autoHideDuration={duration}
|
|
61
|
+
onClose={handleClose(state, setState)}
|
|
62
|
+
>
|
|
58
63
|
<Alert
|
|
59
64
|
variant="filled"
|
|
60
65
|
elevation={6}
|
|
@@ -426,8 +426,12 @@ export var makeLightNormalOverrides = function makeLightNormalOverrides(theme) {
|
|
|
426
426
|
maxWidth: '800px'
|
|
427
427
|
}),
|
|
428
428
|
'&.overflow': {
|
|
429
|
-
overflowY: 'visible !important'
|
|
429
|
+
overflowY: 'visible !important',
|
|
430
|
+
// Allow the icon to overflow the dialog, otherwise it will be cut off,
|
|
431
|
+
'& .cozyDialogContent': {
|
|
432
|
+
overflowY: 'visible !important' // This allow the overflow to work also on iOS
|
|
430
433
|
|
|
434
|
+
}
|
|
431
435
|
}
|
|
432
436
|
},
|
|
433
437
|
scrollPaper: {
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
var _excluded = ["open", "message", "title"];
|
|
5
|
+
var _excluded = ["open", "message", "title", "duration"];
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
|
|
@@ -38,6 +38,7 @@ export var useAlert = function useAlert() {
|
|
|
38
38
|
var defaultState = {
|
|
39
39
|
title: '',
|
|
40
40
|
message: '',
|
|
41
|
+
duration: null,
|
|
41
42
|
open: false
|
|
42
43
|
};
|
|
43
44
|
|
|
@@ -60,6 +61,7 @@ var AlertProvider = function AlertProvider(_ref) {
|
|
|
60
61
|
var open = state.open,
|
|
61
62
|
message = state.message,
|
|
62
63
|
title = state.title,
|
|
64
|
+
duration = state.duration,
|
|
63
65
|
alertProps = _objectWithoutProperties(state, _excluded);
|
|
64
66
|
|
|
65
67
|
var value = useMemo(function () {
|
|
@@ -78,6 +80,7 @@ var AlertProvider = function AlertProvider(_ref) {
|
|
|
78
80
|
value: value
|
|
79
81
|
}, children, /*#__PURE__*/React.createElement(Snackbar, {
|
|
80
82
|
open: open,
|
|
83
|
+
autoHideDuration: duration,
|
|
81
84
|
onClose: handleClose(state, setState)
|
|
82
85
|
}, /*#__PURE__*/React.createElement(Alert, _extends({
|
|
83
86
|
variant: "filled",
|