@deepnoid/ui 0.0.83 → 0.0.86
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-GJKNTX2T.mjs → chunk-AHORH5PH.mjs} +6 -4
- package/dist/{chunk-7LYJAJIS.mjs → chunk-EWKYBS7I.mjs} +13 -6
- package/dist/chunk-FRIK4CS7.mjs +83 -0
- package/dist/chunk-HH2LF2SU.mjs +113 -0
- package/dist/{chunk-H737LHAY.mjs → chunk-KA4L5SCT.mjs} +8 -8
- package/dist/{chunk-BHSCW5D6.mjs → chunk-LGELMZCN.mjs} +1 -1
- package/dist/{chunk-6U736HAX.mjs → chunk-PSXPOYLX.mjs} +1 -1
- package/dist/{chunk-WIKB37T7.mjs → chunk-QCOPD2HG.mjs} +1 -1
- package/dist/{chunk-TLYAFXE2.mjs → chunk-QURXBWKK.mjs} +1902 -746
- package/dist/{chunk-KWOLWE6I.mjs → chunk-RVGOARET.mjs} +2 -2
- package/dist/{chunk-FLJ4ZZXV.mjs → chunk-SQLRQTFC.mjs} +1 -1
- package/dist/chunk-ZOTHPHXA.mjs +41 -0
- package/dist/chunk-ZYIIXWVY.mjs +1 -0
- package/dist/components/accordion/accordionItem.js +1905 -749
- package/dist/components/accordion/accordionItem.mjs +4 -4
- package/dist/components/accordion/index.js +1905 -749
- package/dist/components/accordion/index.mjs +4 -4
- package/dist/components/icon/Icon.d.mts +499 -1
- package/dist/components/icon/Icon.d.ts +499 -1
- package/dist/components/icon/Icon.js +1940 -778
- package/dist/components/icon/Icon.mjs +6 -4
- package/dist/components/icon/index.d.mts +1 -1
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js +1910 -751
- package/dist/components/icon/index.mjs +7 -5
- package/dist/components/icon/template.d.mts +98 -61
- package/dist/components/icon/template.d.ts +98 -61
- package/dist/components/icon/template.js +1902 -746
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +1912 -756
- package/dist/components/input/index.mjs +4 -4
- package/dist/components/input/input.js +1912 -756
- package/dist/components/input/input.mjs +4 -4
- package/dist/components/input/input.test.js +1919 -763
- package/dist/components/input/input.test.mjs +4 -4
- package/dist/components/modal/index.js +1942 -779
- package/dist/components/modal/index.mjs +3 -3
- package/dist/components/modal/modal.js +1942 -779
- package/dist/components/modal/modal.mjs +3 -3
- package/dist/components/modal/modal.test.js +1942 -779
- package/dist/components/modal/modal.test.mjs +3 -3
- package/dist/components/select/index.js +1905 -749
- package/dist/components/select/index.mjs +5 -5
- package/dist/components/select/option.js +1905 -749
- package/dist/components/select/option.mjs +4 -4
- package/dist/components/select/select.js +1905 -749
- package/dist/components/select/select.mjs +5 -5
- package/dist/components/select/select.test.js +1912 -756
- package/dist/components/select/select.test.mjs +5 -5
- package/dist/components/table/index.js +1905 -749
- package/dist/components/table/index.mjs +5 -5
- package/dist/components/table/table-body.js +1905 -749
- package/dist/components/table/table-body.mjs +4 -4
- package/dist/components/table/table.js +1905 -749
- package/dist/components/table/table.mjs +5 -5
- package/dist/components/table/table.test.js +1912 -756
- package/dist/components/table/table.test.mjs +5 -5
- package/dist/components/toast/index.d.mts +9 -0
- package/dist/components/toast/index.d.ts +9 -0
- package/dist/components/toast/index.js +3830 -0
- package/dist/components/toast/index.mjs +21 -0
- package/dist/components/toast/toast-utils.d.mts +9 -0
- package/dist/components/toast/toast-utils.d.ts +9 -0
- package/dist/components/toast/toast-utils.js +64 -0
- package/dist/components/toast/toast-utils.mjs +8 -0
- package/dist/components/toast/toast.d.mts +207 -0
- package/dist/components/toast/toast.d.ts +207 -0
- package/dist/components/toast/toast.js +3711 -0
- package/dist/components/toast/toast.mjs +13 -0
- package/dist/components/toast/toast.test.d.mts +2 -0
- package/dist/components/toast/toast.test.d.ts +2 -0
- package/dist/components/toast/toast.test.js +16594 -0
- package/dist/components/toast/toast.test.mjs +28 -0
- package/dist/components/toast/use-toast.d.mts +31 -0
- package/dist/components/toast/use-toast.d.ts +31 -0
- package/dist/components/toast/use-toast.js +3826 -0
- package/dist/components/toast/use-toast.mjs +17 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +2244 -764
- package/dist/index.mjs +133 -19
- package/package.json +3 -2
- /package/dist/{chunk-M5PMA3CT.mjs → chunk-LUWGOKLG.mjs} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
toast_default
|
|
4
|
+
} from "../../chunk-HH2LF2SU.mjs";
|
|
5
|
+
import {
|
|
6
|
+
render
|
|
7
|
+
} from "../../chunk-FNPWLOGV.mjs";
|
|
8
|
+
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
|
+
import "../../chunk-AHORH5PH.mjs";
|
|
10
|
+
import "../../chunk-QURXBWKK.mjs";
|
|
11
|
+
import "../../chunk-E3G5QXSH.mjs";
|
|
12
|
+
import "../../chunk-J725QONZ.mjs";
|
|
13
|
+
import "../../chunk-IZ6II3QA.mjs";
|
|
14
|
+
|
|
15
|
+
// src/components/toast/toast.test.tsx
|
|
16
|
+
import * as React from "react";
|
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
|
18
|
+
describe("Toast", () => {
|
|
19
|
+
it("should render correctly", () => {
|
|
20
|
+
const wrapper = render(/* @__PURE__ */ jsx(toast_default, { content: "toast content" }));
|
|
21
|
+
expect(() => wrapper.unmount()).not.toThrow();
|
|
22
|
+
});
|
|
23
|
+
it("ref should be forwarded", () => {
|
|
24
|
+
const ref = React.createRef();
|
|
25
|
+
render(/* @__PURE__ */ jsx(toast_default, { ref, content: "toast content" }));
|
|
26
|
+
expect(ref.current).not.toBeNull();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ToastPlacement } from './toast-utils.mjs';
|
|
4
|
+
import { IconName } from '../icon/Icon.mjs';
|
|
5
|
+
import '../icon/template.mjs';
|
|
6
|
+
|
|
7
|
+
interface ToastOptions {
|
|
8
|
+
id: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
duration?: number;
|
|
11
|
+
type?: "default" | "info" | "success" | "warning" | "error";
|
|
12
|
+
color?: "primary" | "secondary" | "default" | "info" | "success" | "warning" | "danger";
|
|
13
|
+
placement?: ToastPlacement;
|
|
14
|
+
icon?: IconName;
|
|
15
|
+
showIcon?: boolean;
|
|
16
|
+
showCloseButton?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface ToastContextValue {
|
|
19
|
+
default: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
20
|
+
info: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
21
|
+
success: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
22
|
+
warning: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
23
|
+
error: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
24
|
+
}
|
|
25
|
+
declare const useToast: () => ToastContextValue;
|
|
26
|
+
declare const ToastProvider: ({ globalOptions, children, }: {
|
|
27
|
+
globalOptions?: Omit<ToastOptions, "id">;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { ToastProvider, useToast };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ToastPlacement } from './toast-utils.js';
|
|
4
|
+
import { IconName } from '../icon/Icon.js';
|
|
5
|
+
import '../icon/template.js';
|
|
6
|
+
|
|
7
|
+
interface ToastOptions {
|
|
8
|
+
id: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
duration?: number;
|
|
11
|
+
type?: "default" | "info" | "success" | "warning" | "error";
|
|
12
|
+
color?: "primary" | "secondary" | "default" | "info" | "success" | "warning" | "danger";
|
|
13
|
+
placement?: ToastPlacement;
|
|
14
|
+
icon?: IconName;
|
|
15
|
+
showIcon?: boolean;
|
|
16
|
+
showCloseButton?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface ToastContextValue {
|
|
19
|
+
default: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
20
|
+
info: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
21
|
+
success: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
22
|
+
warning: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
23
|
+
error: (content: ReactNode, options?: Omit<ToastOptions, "id" | "placement" | "width">) => void;
|
|
24
|
+
}
|
|
25
|
+
declare const useToast: () => ToastContextValue;
|
|
26
|
+
declare const ToastProvider: ({ globalOptions, children, }: {
|
|
27
|
+
globalOptions?: Omit<ToastOptions, "id">;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { ToastProvider, useToast };
|