@mezzanine-ui/react 0.12.5 → 0.12.7

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.
@@ -10,9 +10,10 @@ import ConfirmActions from '../ConfirmActions/ConfirmActions.js';
10
10
  */
11
11
  const ModalActions = forwardRef(function ModalActions(props, ref) {
12
12
  const { cancelButtonProps, cancelText, children, confirmButtonProps, confirmText, hideCancelButton, hideConfirmButton, onCancel, onConfirm, ...rest } = props;
13
+ const { loading: confirmButtonLoading, ...restConfirmButtonProps } = confirmButtonProps || {};
13
14
  const { loading, severity, } = useContext(ModalControlContext);
14
15
  const danger = severity === 'error';
15
- return (jsxs(ModalFooter, { ...rest, ref: ref, children: [children, jsx(ConfirmActions, { cancelButtonProps: cancelButtonProps, cancelText: cancelText, className: modalClasses.actions, confirmButtonProps: confirmButtonProps, confirmText: confirmText, danger: danger, hideCancelButton: hideCancelButton, hideConfirmButton: hideConfirmButton, loading: loading, onCancel: onCancel, onConfirm: onConfirm })] }));
16
+ return (jsxs(ModalFooter, { ...rest, ref: ref, children: [children, jsx(ConfirmActions, { cancelButtonProps: cancelButtonProps, cancelText: cancelText, className: modalClasses.actions, confirmButtonProps: restConfirmButtonProps, confirmText: confirmText, danger: danger, hideCancelButton: hideCancelButton, hideConfirmButton: hideConfirmButton, loading: confirmButtonLoading !== null && confirmButtonLoading !== void 0 ? confirmButtonLoading : loading, onCancel: onCancel, onConfirm: onConfirm })] }));
16
17
  });
17
18
  var ModalActions$1 = ModalActions;
18
19
 
@@ -12,7 +12,7 @@ import Icon from '../../Icon/Icon.js';
12
12
  import cx from 'clsx';
13
13
 
14
14
  const TableRowSelection = forwardRef(function TableRowSelection(props, ref) {
15
- var _a;
15
+ var _a, _b;
16
16
  const { rowKey, setChecked, showDropdownIcon, ...rest } = props;
17
17
  const { rowSelection, expanding, } = useContext(TableContext) || {};
18
18
  const { dataSource = [], } = useContext(TableDataContext) || {};
@@ -72,14 +72,14 @@ const TableRowSelection = forwardRef(function TableRowSelection(props, ref) {
72
72
  const actionMenu = (jsx(Menu, { size: "medium", children: ((_a = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.actions) !== null && _a !== void 0 ? _a : []).map(((action) => (jsx(MenuItem, { className: action.className, onClick: (evt) => onMenuItemClicked(evt, action), children: action.text }, action.key)))) }));
73
73
  return (jsxs("div", { ref: ref, ...rest, className: tableClasses.selections, style: hiddenIconWithExpandableStyle.host, children: [jsx(Checkbox, { checked: checked, disabled: false, indeterminate: indeterminate, inputProps: {
74
74
  name,
75
- }, onChange: onSelected, size: "medium" }), jsx("div", { className: tableClasses.icon, style: hiddenIconWithExpandableStyle.icon, children: showDropdownIcon ? (jsx(Dropdown, { menu: actionMenu, onClose: () => toggleOpen(false), popperProps: {
75
+ }, onChange: onSelected, size: "medium" }), ((_b = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.actions) === null || _b === void 0 ? void 0 : _b.length) ? (jsx("div", { className: tableClasses.icon, style: hiddenIconWithExpandableStyle.icon, children: showDropdownIcon ? (jsx(Dropdown, { menu: actionMenu, onClose: () => toggleOpen(false), popperProps: {
76
76
  open,
77
77
  options: {
78
78
  placement: 'bottom-start',
79
79
  },
80
80
  }, children: (dropdownRef) => (jsx(Icon, { ref: dropdownRef, className: cx(tableClasses.icon, {
81
81
  [tableClasses.iconClickable]: isMenuAllowOpen,
82
- }), color: isMenuAllowOpen ? 'primary' : 'disabled', icon: MoreVerticalIcon, onClick: onIconClicked })) })) : null })] }));
82
+ }), color: isMenuAllowOpen ? 'primary' : 'disabled', icon: MoreVerticalIcon, onClick: onIconClicked })) })) : null })) : null] }));
83
83
  });
84
84
  var TableRowSelection$1 = TableRowSelection;
85
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/react",
3
- "version": "0.12.5",
3
+ "version": "0.12.7",
4
4
  "description": "React components for mezzanine-ui",
5
5
  "author": "Mezzanine",
6
6
  "repository": {
@@ -31,9 +31,9 @@
31
31
  "react-dom": "^18.2.0"
32
32
  },
33
33
  "dependencies": {
34
- "@mezzanine-ui/core": "^0.12.5",
35
- "@mezzanine-ui/icons": "^0.12.5",
36
- "@mezzanine-ui/system": "^0.12.5",
34
+ "@mezzanine-ui/core": "^0.12.7",
35
+ "@mezzanine-ui/icons": "^0.12.7",
36
+ "@mezzanine-ui/system": "^0.12.7",
37
37
  "@popperjs/core": "^2.11.6",
38
38
  "@types/react-transition-group": "^4.4.5",
39
39
  "clsx": "^1.2.1",