cozy-ui 111.17.0 → 111.18.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 CHANGED
@@ -1,3 +1,18 @@
1
+ ## [111.18.1](https://github.com/cozy/cozy-ui/compare/v111.18.0...v111.18.1) (2024-10-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Dialog:** Classnames wasn't merged if set ([8a9453c](https://github.com/cozy/cozy-ui/commit/8a9453c))
7
+ * **FixedDialog:** Bottom divider wasn't fullwidth when small size dialog ([ecceb97](https://github.com/cozy/cozy-ui/commit/ecceb97))
8
+
9
+ # [111.18.0](https://github.com/cozy/cozy-ui/compare/v111.17.0...v111.18.0) (2024-10-14)
10
+
11
+
12
+ ### Features
13
+
14
+ * **Dialogs:** Spread dialogActions classname to allow override ([fc2c414](https://github.com/cozy/cozy-ui/commit/fc2c414))
15
+
1
16
  # [111.17.0](https://github.com/cozy/cozy-ui/compare/v111.16.0...v111.17.0) (2024-10-14)
2
17
 
3
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "111.17.0",
3
+ "version": "111.18.1",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -58,9 +58,13 @@ const ConfirmDialog = props => {
58
58
  <DialogActions
59
59
  {...dialogActionsProps}
60
60
  disableSpacing
61
- className={cx('dialogActionsFluid', {
62
- columnLayout: actionsLayout == 'column'
63
- })}
61
+ className={cx(
62
+ 'dialogActionsFluid',
63
+ {
64
+ columnLayout: actionsLayout == 'column'
65
+ },
66
+ dialogActionsProps.className
67
+ )}
64
68
  >
65
69
  {actions}
66
70
  </DialogActions>
@@ -61,9 +61,13 @@ const Dialog = props => {
61
61
  <DialogActions
62
62
  {...dialogActionsProps}
63
63
  disableSpacing
64
- className={cx('dialogActionsFluid', {
65
- columnLayout: actionsLayout == 'column'
66
- })}
64
+ className={cx(
65
+ 'dialogActionsFluid',
66
+ {
67
+ columnLayout: actionsLayout == 'column'
68
+ },
69
+ dialogActionsProps.className
70
+ )}
67
71
  >
68
72
  {actions}
69
73
  </DialogActions>
@@ -57,7 +57,10 @@ const FixedActionsDialog = props => {
57
57
  <DialogActions
58
58
  {...dialogActionsProps}
59
59
  disableSpacing
60
- className={cx({ columnLayout: actionsLayout == 'column' })}
60
+ className={cx(
61
+ { columnLayout: actionsLayout == 'column' },
62
+ dialogActionsProps.className
63
+ )}
61
64
  >
62
65
  {actions}
63
66
  </DialogActions>
@@ -51,12 +51,15 @@ const FixedDialog = props => {
51
51
  <DialogContent {...dialogContentProps}>
52
52
  <div className="dialogContentInner">{content}</div>
53
53
  </DialogContent>
54
- <Divider />
54
+ <Divider {...dividerProps} />
55
55
  {actions && (
56
56
  <DialogActions
57
57
  {...dialogActionsProps}
58
58
  disableSpacing
59
- className={cx({ columnLayout: actionsLayout == 'column' })}
59
+ className={cx(
60
+ { columnLayout: actionsLayout == 'column' },
61
+ dialogActionsProps.className
62
+ )}
60
63
  >
61
64
  {actions}
62
65
  </DialogActions>
@@ -70,9 +70,13 @@ const IllustrationDialog = props => {
70
70
  <DialogActions
71
71
  {...dialogActionsProps}
72
72
  disableSpacing
73
- className={cx('dialogActionsFluid', {
74
- columnLayout: actionsLayout == 'column'
75
- })}
73
+ className={cx(
74
+ 'dialogActionsFluid',
75
+ {
76
+ columnLayout: actionsLayout == 'column'
77
+ },
78
+ dialogActionsProps.className
79
+ )}
76
80
  >
77
81
  {actions}
78
82
  </DialogActions>
@@ -1,15 +1,21 @@
1
1
  import { default as MUIDialog } from '@material-ui/core/Dialog'
2
+ import cx from 'classnames'
2
3
  import React from 'react'
3
4
 
4
5
  import { useDialogEffects } from './DialogEffects'
5
6
  import { useCozyTheme } from '../providers/CozyTheme'
6
7
 
7
- const Dialog = props => {
8
+ const Dialog = ({ className, ...props }) => {
8
9
  const { type, variant } = useCozyTheme()
9
10
 
10
11
  useDialogEffects(props.open, props.fullScreen)
11
12
 
12
- return <MUIDialog className={`CozyTheme--${type}-${variant}`} {...props} />
13
+ return (
14
+ <MUIDialog
15
+ className={cx(`CozyTheme--${type}-${variant}`, className)}
16
+ {...props}
17
+ />
18
+ )
13
19
  }
14
20
 
15
21
  Dialog.defaultProps = {
@@ -53,7 +53,7 @@ var ConfirmDialog = function ConfirmDialog(props) {
53
53
  disableSpacing: true,
54
54
  className: cx('dialogActionsFluid', {
55
55
  columnLayout: actionsLayout == 'column'
56
- })
56
+ }, dialogActionsProps.className)
57
57
  }), actions))));
58
58
  };
59
59
 
@@ -45,7 +45,7 @@ var Dialog = function Dialog(props) {
45
45
  disableSpacing: true,
46
46
  className: cx('dialogActionsFluid', {
47
47
  columnLayout: actionsLayout == 'column'
48
- })
48
+ }, dialogActionsProps.className)
49
49
  }), actions))));
50
50
  };
51
51
 
@@ -51,7 +51,7 @@ var FixedActionsDialog = function FixedActionsDialog(props) {
51
51
  disableSpacing: true,
52
52
  className: cx({
53
53
  columnLayout: actionsLayout == 'column'
54
- })
54
+ }, dialogActionsProps.className)
55
55
  }), actions));
56
56
  };
57
57
 
@@ -37,11 +37,11 @@ var FixedDialog = function FixedDialog(props) {
37
37
  onClick: onBackOrClose
38
38
  }), title && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DialogTitle, dialogTitleProps, title), /*#__PURE__*/React.createElement(Divider, dividerProps)), /*#__PURE__*/React.createElement(DialogContent, dialogContentProps, /*#__PURE__*/React.createElement("div", {
39
39
  className: "dialogContentInner"
40
- }, content)), /*#__PURE__*/React.createElement(Divider, null), actions && /*#__PURE__*/React.createElement(DialogActions, _extends({}, dialogActionsProps, {
40
+ }, content)), /*#__PURE__*/React.createElement(Divider, dividerProps), actions && /*#__PURE__*/React.createElement(DialogActions, _extends({}, dialogActionsProps, {
41
41
  disableSpacing: true,
42
42
  className: cx({
43
43
  columnLayout: actionsLayout == 'column'
44
- })
44
+ }, dialogActionsProps.className)
45
45
  }), actions));
46
46
  };
47
47
 
@@ -56,7 +56,7 @@ var IllustrationDialog = function IllustrationDialog(props) {
56
56
  disableSpacing: true,
57
57
  className: cx('dialogActionsFluid', {
58
58
  columnLayout: actionsLayout == 'column'
59
- })
59
+ }, dialogActionsProps.className)
60
60
  }), actions))));
61
61
  };
62
62
 
@@ -1,17 +1,23 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["className"];
2
4
  import { default as MUIDialog } from '@material-ui/core/Dialog';
5
+ import cx from 'classnames';
3
6
  import React from 'react';
4
7
  import { useDialogEffects } from "cozy-ui/transpiled/react/Dialog/DialogEffects";
5
8
  import { useCozyTheme } from "cozy-ui/transpiled/react/providers/CozyTheme";
6
9
 
7
- var Dialog = function Dialog(props) {
10
+ var Dialog = function Dialog(_ref) {
11
+ var className = _ref.className,
12
+ props = _objectWithoutProperties(_ref, _excluded);
13
+
8
14
  var _useCozyTheme = useCozyTheme(),
9
15
  type = _useCozyTheme.type,
10
16
  variant = _useCozyTheme.variant;
11
17
 
12
18
  useDialogEffects(props.open, props.fullScreen);
13
19
  return /*#__PURE__*/React.createElement(MUIDialog, _extends({
14
- className: "CozyTheme--".concat(type, "-").concat(variant)
20
+ className: cx("CozyTheme--".concat(type, "-").concat(variant), className)
15
21
  }, props));
16
22
  };
17
23