nexaas-ui-components 1.0.36 → 1.0.38

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/dist/index.cjs CHANGED
@@ -12,7 +12,7 @@ var react$1 = require('@headlessui-float/react');
12
12
  var IntlCurrencyInputRaw = require('react-intl-currency-input');
13
13
  var lodashNamespace = require('lodash');
14
14
  var InputMask = require('react-input-mask');
15
- var ReactModalNamespace = require('react-modal');
15
+ var Modal = require('react-modal');
16
16
  var reactTooltip = require('react-tooltip');
17
17
  var Select = require('react-select');
18
18
  var AsyncSelect = require('react-select/async');
@@ -47,7 +47,7 @@ var clsx9__default = /*#__PURE__*/_interopDefault(clsx9);
47
47
  var IntlCurrencyInputRaw__default = /*#__PURE__*/_interopDefault(IntlCurrencyInputRaw);
48
48
  var lodashNamespace__namespace = /*#__PURE__*/_interopNamespace(lodashNamespace);
49
49
  var InputMask__default = /*#__PURE__*/_interopDefault(InputMask);
50
- var ReactModalNamespace__namespace = /*#__PURE__*/_interopNamespace(ReactModalNamespace);
50
+ var Modal__default = /*#__PURE__*/_interopDefault(Modal);
51
51
  var Select__default = /*#__PURE__*/_interopDefault(Select);
52
52
  var AsyncSelect__default = /*#__PURE__*/_interopDefault(AsyncSelect);
53
53
  var Fuse__default = /*#__PURE__*/_interopDefault(Fuse);
@@ -229,7 +229,13 @@ var Button = ({
229
229
  "div",
230
230
  {
231
231
  className: `flex items-center justify-center ${appliedSize.icon}`,
232
- children: props.icon && !props.loading ? props.icon : props.loadingIcon && props.loading ? props.loadingIcon : /* @__PURE__ */ jsxRuntime.jsx(SpinnerIcon, { className: "animate-spin w-4 h-4" })
232
+ children: props.icon && !props.loading ? props.icon : props.loadingIcon && props.loading ? props.loadingIcon : /* @__PURE__ */ jsxRuntime.jsx(
233
+ SpinnerIcon,
234
+ {
235
+ className: "animate-spin w-4 h-4",
236
+ fill: "currentColor"
237
+ }
238
+ )
233
239
  }
234
240
  ),
235
241
  props.children,
@@ -2506,7 +2512,6 @@ var MaskedInput = ({
2506
2512
  }
2507
2513
  );
2508
2514
  };
2509
- var Modal = ReactModalNamespace__namespace.default || ReactModalNamespace__namespace;
2510
2515
  var alertTypes = {
2511
2516
  success: "text-success-500",
2512
2517
  error: "text-dangerous-500",
@@ -2538,7 +2543,8 @@ var ModalDialog = ({
2538
2543
  description,
2539
2544
  children,
2540
2545
  showFooter = true,
2541
- showHeader = true
2546
+ showHeader = true,
2547
+ closeOnOverlayClick = true
2542
2548
  }) => {
2543
2549
  const customStyles6 = {
2544
2550
  content: {
@@ -2566,11 +2572,13 @@ var ModalDialog = ({
2566
2572
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2567
2573
  trigger,
2568
2574
  /* @__PURE__ */ jsxRuntime.jsx(
2569
- Modal,
2575
+ Modal__default.default,
2570
2576
  {
2571
2577
  ariaHideApp: false,
2572
2578
  isOpen: open,
2573
- onRequestClose: onClose,
2579
+ onRequestClose: closeOnOverlayClick ? onClose || onCancel : void 0,
2580
+ shouldCloseOnOverlayClick: closeOnOverlayClick,
2581
+ shouldCloseOnEsc: closeOnOverlayClick,
2574
2582
  style: customStyles6,
2575
2583
  contentLabel: "Example Modal",
2576
2584
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx9__default.default(sizes3[size]), children: [