ywana-core8 0.0.787 → 0.0.789

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.
@@ -4344,7 +4344,10 @@ var UploadDialog = function UploadDialog(_ref) {
4344
4344
  onClose = _ref.onClose,
4345
4345
  children = _ref.children,
4346
4346
  className = _ref.className,
4347
- disabled = _ref.disabled;
4347
+ disabled = _ref.disabled,
4348
+ onCanClose = _ref.onCanClose,
4349
+ _ref$overlayCanClose = _ref.overlayCanClose,
4350
+ overlayCanClose = _ref$overlayCanClose === void 0 ? true : _ref$overlayCanClose;
4348
4351
  var site = useContext(SiteContext);
4349
4352
 
4350
4353
  function success(file, message) {
@@ -4362,11 +4365,16 @@ var UploadDialog = function UploadDialog(_ref) {
4362
4365
  }
4363
4366
  }
4364
4367
 
4368
+ function canClose() {
4369
+ return onCanClose ? onCanClose() : true;
4370
+ }
4371
+
4365
4372
  var actions = /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Button, {
4366
4373
  label: "CERRAR",
4367
4374
  action: function action() {
4368
4375
  return onAction("CLOSE");
4369
- }
4376
+ },
4377
+ disabled: canClose()
4370
4378
  }));
4371
4379
  var title = /*#__PURE__*/React.createElement(Text, {
4372
4380
  use: "headline6"
@@ -4376,7 +4384,8 @@ var UploadDialog = function UploadDialog(_ref) {
4376
4384
  open: true,
4377
4385
  onAction: onAction,
4378
4386
  actions: actions,
4379
- className: className
4387
+ className: className,
4388
+ overlayCanClose: overlayCanClose
4380
4389
  }, disabled ? "" : /*#__PURE__*/React.createElement(Uploader, {
4381
4390
  label: label,
4382
4391
  accept: accept,