@deepnoid/ui 0.0.86 → 0.0.87
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/{chunk-HH2LF2SU.mjs → chunk-2COCX2VX.mjs} +9 -5
- package/dist/{chunk-KA4L5SCT.mjs → chunk-4DLTBZUQ.mjs} +1 -1
- package/dist/{chunk-PSXPOYLX.mjs → chunk-4SWFYTMR.mjs} +1 -1
- package/dist/{chunk-RVGOARET.mjs → chunk-4VIEZ5FT.mjs} +2 -2
- package/dist/{chunk-QURXBWKK.mjs → chunk-IOV7MEPG.mjs} +323 -331
- package/dist/{chunk-SQLRQTFC.mjs → chunk-LY6LJRUX.mjs} +1 -1
- package/dist/{chunk-EWKYBS7I.mjs → chunk-PHQY5T3E.mjs} +1 -1
- package/dist/{chunk-AHORH5PH.mjs → chunk-PRUAIZTU.mjs} +1 -1
- package/dist/{chunk-LGELMZCN.mjs → chunk-QIZOXBOY.mjs} +1 -1
- package/dist/{chunk-FRIK4CS7.mjs → chunk-QX6VJLEM.mjs} +3 -3
- package/dist/{chunk-QCOPD2HG.mjs → chunk-SFNR4F3J.mjs} +1 -1
- package/dist/components/accordion/accordionItem.js +323 -331
- package/dist/components/accordion/accordionItem.mjs +3 -3
- package/dist/components/accordion/index.js +323 -331
- package/dist/components/accordion/index.mjs +3 -3
- package/dist/components/icon/Icon.js +323 -331
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +323 -331
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.js +323 -331
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +323 -331
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.js +323 -331
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/input/input.test.js +323 -331
- package/dist/components/input/input.test.mjs +3 -3
- package/dist/components/modal/index.js +323 -331
- package/dist/components/modal/index.mjs +3 -3
- package/dist/components/modal/modal.js +323 -331
- package/dist/components/modal/modal.mjs +3 -3
- package/dist/components/modal/modal.test.js +323 -331
- package/dist/components/modal/modal.test.mjs +3 -3
- package/dist/components/select/index.js +323 -331
- package/dist/components/select/index.mjs +4 -4
- package/dist/components/select/option.js +323 -331
- package/dist/components/select/option.mjs +3 -3
- package/dist/components/select/select.js +323 -331
- package/dist/components/select/select.mjs +4 -4
- package/dist/components/select/select.test.js +323 -331
- package/dist/components/select/select.test.mjs +4 -4
- package/dist/components/table/index.js +323 -331
- package/dist/components/table/index.mjs +4 -4
- package/dist/components/table/table-body.js +323 -331
- package/dist/components/table/table-body.mjs +3 -3
- package/dist/components/table/table.js +323 -331
- package/dist/components/table/table.mjs +4 -4
- package/dist/components/table/table.test.js +323 -331
- package/dist/components/table/table.test.mjs +4 -4
- package/dist/components/toast/index.js +333 -337
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.d.mts +1 -0
- package/dist/components/toast/toast.d.ts +1 -0
- package/dist/components/toast/toast.js +331 -335
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/toast.test.js +331 -335
- package/dist/components/toast/toast.test.mjs +3 -3
- package/dist/components/toast/use-toast.js +333 -337
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/index.js +333 -337
- package/dist/index.mjs +11 -11
- package/package.json +2 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZOTHPHXA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
toast_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2COCX2VX.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/toast/use-toast.tsx
|
|
10
10
|
import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
|
|
@@ -25,7 +25,7 @@ var ToastProvider = ({
|
|
|
25
25
|
const [containerStyle, setContainerStyle] = useState({});
|
|
26
26
|
const toastRef = useRef();
|
|
27
27
|
const addToast = useCallback((content, options) => {
|
|
28
|
-
const id = Date.now();
|
|
28
|
+
const id = Date.now() + toasts.length;
|
|
29
29
|
const newToast = {
|
|
30
30
|
id,
|
|
31
31
|
content,
|
|
@@ -54,7 +54,7 @@ var ToastProvider = ({
|
|
|
54
54
|
};
|
|
55
55
|
useEffect(() => {
|
|
56
56
|
var _a;
|
|
57
|
-
const width = typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() :
|
|
57
|
+
const width = (globalOptions == null ? void 0 : globalOptions.width) ? globalOptions == null ? void 0 : globalOptions.width : typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : 300;
|
|
58
58
|
const offset = 20;
|
|
59
59
|
const calculatePosition = () => {
|
|
60
60
|
const placement = (globalOptions == null ? void 0 : globalOptions.placement) || "bottom-right";
|