@tecsinapse/cortex-react 1.9.42 → 1.9.44
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/cjs/components/Uploader/Modal.js +1 -1
- package/dist/cjs/service/SnackbarSonner.js +6 -1
- package/dist/esm/components/Uploader/Modal.js +1 -1
- package/dist/esm/service/SnackbarSonner.js +6 -1
- package/dist/types/provider/SnackbarProvider.d.ts +3 -3
- package/dist/types/service/IExternalToast.d.ts +4 -0
- package/dist/types/service/SnackbarSonner.d.ts +5 -4
- package/package.json +2 -2
|
@@ -18,7 +18,7 @@ const Modal = ({
|
|
|
18
18
|
{
|
|
19
19
|
open,
|
|
20
20
|
onClose,
|
|
21
|
-
className: "flex flex-col bg-secondary-xlight rounded-mili min-w-[
|
|
21
|
+
className: "flex flex-col bg-secondary-xlight rounded-mili min-w-[70vw] max-w-[95vh] max-h-[95vh] overflow-auto"
|
|
22
22
|
},
|
|
23
23
|
/* @__PURE__ */ React.createElement("div", { className: "flex w-full items-center justify-between mb-deca" }, /* @__PURE__ */ React.createElement("div", null), /* @__PURE__ */ React.createElement("h2", { className: "text-deca font-semibold" }, title), /* @__PURE__ */ React.createElement(
|
|
24
24
|
"button",
|
|
@@ -23,7 +23,12 @@ class SnackbarSonner {
|
|
|
23
23
|
{
|
|
24
24
|
text: message,
|
|
25
25
|
variants: { intent: type },
|
|
26
|
-
onDismiss: () =>
|
|
26
|
+
onDismiss: () => {
|
|
27
|
+
sonner.toast.dismiss(t);
|
|
28
|
+
if (options?.onDismiss && typeof options?.onDismiss === "function") {
|
|
29
|
+
options.onDismiss();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
);
|
|
29
34
|
},
|
|
@@ -16,7 +16,7 @@ const Modal = ({
|
|
|
16
16
|
{
|
|
17
17
|
open,
|
|
18
18
|
onClose,
|
|
19
|
-
className: "flex flex-col bg-secondary-xlight rounded-mili min-w-[
|
|
19
|
+
className: "flex flex-col bg-secondary-xlight rounded-mili min-w-[70vw] max-w-[95vh] max-h-[95vh] overflow-auto"
|
|
20
20
|
},
|
|
21
21
|
/* @__PURE__ */ React__default.createElement("div", { className: "flex w-full items-center justify-between mb-deca" }, /* @__PURE__ */ React__default.createElement("div", null), /* @__PURE__ */ React__default.createElement("h2", { className: "text-deca font-semibold" }, title), /* @__PURE__ */ React__default.createElement(
|
|
22
22
|
"button",
|
|
@@ -21,7 +21,12 @@ class SnackbarSonner {
|
|
|
21
21
|
{
|
|
22
22
|
text: message,
|
|
23
23
|
variants: { intent: type },
|
|
24
|
-
onDismiss: () =>
|
|
24
|
+
onDismiss: () => {
|
|
25
|
+
toast.dismiss(t);
|
|
26
|
+
if (options?.onDismiss && typeof options?.onDismiss === "function") {
|
|
27
|
+
options.onDismiss();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
25
30
|
}
|
|
26
31
|
);
|
|
27
32
|
},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { SnackbarSonner } from '../service';
|
|
3
|
+
import { IExternalToast } from '../service/IExternalToast';
|
|
4
4
|
interface SnackbarProviderProps {
|
|
5
5
|
snackbar: SnackbarSonner;
|
|
6
6
|
}
|
|
7
7
|
export declare const SnackbarProvider: ({ children, options, }: {
|
|
8
8
|
children: ReactNode;
|
|
9
|
-
options?:
|
|
9
|
+
options?: IExternalToast;
|
|
10
10
|
}) => React.JSX.Element;
|
|
11
11
|
export declare const useSnackbar: () => SnackbarProviderProps;
|
|
12
12
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExternalToast } from 'sonner';
|
|
3
3
|
import { ISnackbar, TypeSnack } from './ISnackbar';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { IExternalToast } from './IExternalToast';
|
|
5
|
+
export declare class SnackbarSonner implements ISnackbar<IExternalToast> {
|
|
6
|
+
_options?: IExternalToast;
|
|
7
|
+
constructor(options?: IExternalToast);
|
|
7
8
|
custom(Component: React.ReactElement, options?: ExternalToast): string | number;
|
|
8
|
-
show(type: TypeSnack, message: string, options?: Omit<
|
|
9
|
+
show(type: TypeSnack, message: string, options?: Omit<IExternalToast, 'className' | 'style'>): string | number;
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/cortex-react",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.44",
|
|
4
4
|
"description": "React components based in @tecsinapse/cortex-core",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"react-dom": ">=18.0.0",
|
|
49
49
|
"tailwind": ">=3.3.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "ca199698f75cef58551010a38d9272039c655bdb"
|
|
52
52
|
}
|