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 +15 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -400,6 +400,7 @@ type ModalProps = {
|
|
|
400
400
|
children?: ReactNode;
|
|
401
401
|
showHeader?: boolean;
|
|
402
402
|
showFooter?: boolean;
|
|
403
|
+
closeOnOverlayClick?: boolean;
|
|
403
404
|
};
|
|
404
405
|
declare const alertTypes: {
|
|
405
406
|
success: string;
|
|
@@ -415,7 +416,7 @@ declare const sizes: {
|
|
|
415
416
|
lg: string;
|
|
416
417
|
null: string;
|
|
417
418
|
};
|
|
418
|
-
declare const ModalDialog: ({ open, onOpen, onClose, onCancel, triggerButton, confirmButton, title, cancelButton, icon, alertType, size, info, description, children, showFooter, showHeader, }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
419
|
+
declare const ModalDialog: ({ open, onOpen, onClose, onCancel, triggerButton, confirmButton, title, cancelButton, icon, alertType, size, info, description, children, showFooter, showHeader, closeOnOverlayClick, }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
419
420
|
|
|
420
421
|
interface Props$3 {
|
|
421
422
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -400,6 +400,7 @@ type ModalProps = {
|
|
|
400
400
|
children?: ReactNode;
|
|
401
401
|
showHeader?: boolean;
|
|
402
402
|
showFooter?: boolean;
|
|
403
|
+
closeOnOverlayClick?: boolean;
|
|
403
404
|
};
|
|
404
405
|
declare const alertTypes: {
|
|
405
406
|
success: string;
|
|
@@ -415,7 +416,7 @@ declare const sizes: {
|
|
|
415
416
|
lg: string;
|
|
416
417
|
null: string;
|
|
417
418
|
};
|
|
418
|
-
declare const ModalDialog: ({ open, onOpen, onClose, onCancel, triggerButton, confirmButton, title, cancelButton, icon, alertType, size, info, description, children, showFooter, showHeader, }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
419
|
+
declare const ModalDialog: ({ open, onOpen, onClose, onCancel, triggerButton, confirmButton, title, cancelButton, icon, alertType, size, info, description, children, showFooter, showHeader, closeOnOverlayClick, }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
419
420
|
|
|
420
421
|
interface Props$3 {
|
|
421
422
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { Float } from '@headlessui-float/react';
|
|
|
11
11
|
import IntlCurrencyInputRaw from 'react-intl-currency-input';
|
|
12
12
|
import * as lodashNamespace from 'lodash';
|
|
13
13
|
import InputMask from 'react-input-mask';
|
|
14
|
-
import
|
|
14
|
+
import Modal from 'react-modal';
|
|
15
15
|
import { Tooltip } from 'react-tooltip';
|
|
16
16
|
import Select, { components } from 'react-select';
|
|
17
17
|
import AsyncSelect from 'react-select/async';
|
|
@@ -197,7 +197,13 @@ var Button = ({
|
|
|
197
197
|
"div",
|
|
198
198
|
{
|
|
199
199
|
className: `flex items-center justify-center ${appliedSize.icon}`,
|
|
200
|
-
children: props.icon && !props.loading ? props.icon : props.loadingIcon && props.loading ? props.loadingIcon : /* @__PURE__ */ jsx(
|
|
200
|
+
children: props.icon && !props.loading ? props.icon : props.loadingIcon && props.loading ? props.loadingIcon : /* @__PURE__ */ jsx(
|
|
201
|
+
SpinnerIcon,
|
|
202
|
+
{
|
|
203
|
+
className: "animate-spin w-4 h-4",
|
|
204
|
+
fill: "currentColor"
|
|
205
|
+
}
|
|
206
|
+
)
|
|
201
207
|
}
|
|
202
208
|
),
|
|
203
209
|
props.children,
|
|
@@ -2474,7 +2480,6 @@ var MaskedInput = ({
|
|
|
2474
2480
|
}
|
|
2475
2481
|
);
|
|
2476
2482
|
};
|
|
2477
|
-
var Modal = ReactModalNamespace.default || ReactModalNamespace;
|
|
2478
2483
|
var alertTypes = {
|
|
2479
2484
|
success: "text-success-500",
|
|
2480
2485
|
error: "text-dangerous-500",
|
|
@@ -2506,7 +2511,8 @@ var ModalDialog = ({
|
|
|
2506
2511
|
description,
|
|
2507
2512
|
children,
|
|
2508
2513
|
showFooter = true,
|
|
2509
|
-
showHeader = true
|
|
2514
|
+
showHeader = true,
|
|
2515
|
+
closeOnOverlayClick = true
|
|
2510
2516
|
}) => {
|
|
2511
2517
|
const customStyles6 = {
|
|
2512
2518
|
content: {
|
|
@@ -2538,7 +2544,9 @@ var ModalDialog = ({
|
|
|
2538
2544
|
{
|
|
2539
2545
|
ariaHideApp: false,
|
|
2540
2546
|
isOpen: open,
|
|
2541
|
-
onRequestClose: onClose,
|
|
2547
|
+
onRequestClose: closeOnOverlayClick ? onClose || onCancel : void 0,
|
|
2548
|
+
shouldCloseOnOverlayClick: closeOnOverlayClick,
|
|
2549
|
+
shouldCloseOnEsc: closeOnOverlayClick,
|
|
2542
2550
|
style: customStyles6,
|
|
2543
2551
|
contentLabel: "Example Modal",
|
|
2544
2552
|
children: /* @__PURE__ */ jsxs("div", { className: clsx9(sizes3[size]), children: [
|