@deepnoid/ui 0.0.84 → 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-XTJL67KM.mjs → chunk-2COCX2VX.mjs} +37 -47
- package/dist/{chunk-KA4L5SCT.mjs → chunk-4DLTBZUQ.mjs} +1 -1
- package/dist/{chunk-RTH3FPAS.mjs → chunk-4SWFYTMR.mjs} +3 -3
- package/dist/{chunk-463XE4SI.mjs → chunk-4VIEZ5FT.mjs} +4 -4
- package/dist/{chunk-NTTHTGDK.mjs → chunk-FNPWLOGV.mjs} +37 -39
- package/dist/{chunk-ILMIS63S.mjs → chunk-H7BLXC5M.mjs} +14 -14
- 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-QX6VJLEM.mjs +83 -0
- package/dist/{chunk-ADDUBJ4I.mjs → chunk-S4DTK5GI.mjs} +1 -1
- package/dist/{chunk-QCOPD2HG.mjs → chunk-SFNR4F3J.mjs} +1 -1
- package/dist/chunk-ZOTHPHXA.mjs +41 -0
- package/dist/components/accordion/accordion.d.mts +154 -0
- package/dist/components/accordion/accordion.test.js +37 -39
- package/dist/components/accordion/accordion.test.mjs +1 -1
- package/dist/components/accordion/accordionItem.d.mts +282 -0
- package/dist/components/accordion/accordionItem.js +323 -331
- package/dist/components/accordion/accordionItem.mjs +3 -3
- package/dist/components/accordion/index.d.mts +6 -0
- package/dist/components/accordion/index.js +323 -331
- package/dist/components/accordion/index.mjs +3 -3
- package/dist/components/button/button-group.d.mts +14 -0
- package/dist/components/button/button-group.test.d.mts +2 -0
- package/dist/components/button/button-group.test.js +37 -39
- package/dist/components/button/button-group.test.mjs +2 -2
- package/dist/components/button/button.d.mts +18 -0
- package/dist/components/button/button.test.d.mts +2 -0
- package/dist/components/button/button.test.js +50 -52
- package/dist/components/button/button.test.mjs +2 -2
- package/dist/components/button/index.d.mts +3 -0
- package/dist/components/card/card.d.mts +124 -0
- package/dist/components/card/card.test.d.mts +2 -0
- package/dist/components/card/card.test.js +37 -39
- package/dist/components/card/card.test.mjs +1 -1
- package/dist/components/card/index.d.mts +5 -0
- package/dist/components/card/index.d.ts +5 -0
- package/dist/components/checkbox/checkbox.d.mts +349 -0
- package/dist/components/checkbox/checkbox.test.d.mts +2 -0
- package/dist/components/checkbox/checkbox.test.js +37 -39
- package/dist/components/checkbox/checkbox.test.mjs +2 -2
- package/dist/components/checkbox/index.d.mts +5 -0
- package/dist/components/checkbox/index.d.ts +5 -0
- package/dist/components/icon/Icon.d.mts +513 -0
- package/dist/components/icon/Icon.js +323 -331
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.d.mts +4 -0
- package/dist/components/icon/index.d.ts +4 -0
- package/dist/components/icon/index.js +323 -331
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +134 -0
- package/dist/components/icon/template.js +323 -331
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.d.mts +5 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.js +323 -331
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.d.mts +437 -0
- package/dist/components/input/input.js +323 -331
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/input/input.test.d.mts +2 -0
- package/dist/components/input/input.test.js +373 -383
- package/dist/components/input/input.test.mjs +5 -5
- package/dist/components/list/index.d.mts +6 -0
- package/dist/components/list/index.mjs +3 -3
- package/dist/components/{dropdown/dropdown.d.ts → list/list.d.mts} +9 -9
- package/dist/components/list/list.test.d.mts +2 -0
- package/dist/components/list/list.test.js +37 -39
- package/dist/components/list/list.test.mjs +1 -1
- package/dist/components/list/listItem.d.mts +183 -0
- package/dist/components/modal/index.d.mts +8 -0
- package/dist/components/modal/index.d.ts +8 -0
- package/dist/components/modal/index.js +323 -331
- package/dist/components/modal/index.mjs +3 -3
- package/dist/components/modal/modal.d.mts +214 -0
- package/dist/components/modal/modal.js +323 -331
- package/dist/components/modal/modal.mjs +3 -3
- package/dist/components/modal/modal.test.d.mts +2 -0
- package/dist/components/modal/modal.test.js +360 -370
- package/dist/components/modal/modal.test.mjs +4 -4
- package/dist/components/pagination/index.d.mts +4 -0
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/pagination.d.mts +186 -0
- package/dist/components/pagination/pagination.test.d.mts +2 -0
- package/dist/components/pagination/pagination.test.js +37 -39
- package/dist/components/pagination/pagination.test.mjs +1 -1
- package/dist/components/pagination/usePagination.d.mts +16 -0
- package/dist/components/progress/index.d.mts +5 -0
- package/dist/components/progress/index.d.ts +5 -0
- package/dist/components/progress/progress.d.mts +281 -0
- package/dist/components/progress/progress.test.d.mts +2 -0
- package/dist/components/progress/progress.test.d.ts +2 -0
- package/dist/components/progress/progress.test.js +37 -39
- package/dist/components/progress/progress.test.mjs +1 -1
- package/dist/components/radio/index.d.mts +5 -0
- package/dist/components/radio/index.d.ts +5 -0
- package/dist/components/radio/radio.d.mts +278 -0
- package/dist/components/radio/radio.test.d.mts +2 -0
- package/dist/components/radio/radio.test.js +37 -39
- package/dist/components/radio/radio.test.mjs +1 -1
- package/dist/components/select/index.d.mts +5 -0
- package/dist/components/select/index.d.ts +5 -0
- package/dist/components/select/index.js +323 -331
- package/dist/components/select/index.mjs +4 -4
- package/dist/components/select/option.d.mts +18 -0
- package/dist/components/select/option.js +323 -331
- package/dist/components/select/option.mjs +3 -3
- package/dist/components/select/select.d.mts +449 -0
- package/dist/components/select/select.js +323 -331
- package/dist/components/select/select.mjs +4 -4
- package/dist/components/select/select.test.d.mts +2 -0
- package/dist/components/select/select.test.js +360 -370
- package/dist/components/select/select.test.mjs +6 -6
- package/dist/components/select/useSelect.d.mts +32 -0
- package/dist/components/slider/index.d.mts +5 -0
- package/dist/components/slider/index.d.ts +5 -0
- package/dist/components/slider/slider.d.mts +333 -0
- package/dist/components/slider/slider.test.d.mts +2 -0
- package/dist/components/slider/slider.test.d.ts +2 -0
- package/dist/components/slider/slider.test.js +37 -39
- package/dist/components/slider/slider.test.mjs +1 -1
- package/dist/components/switch/index.d.mts +5 -0
- package/dist/components/switch/index.d.ts +5 -0
- package/dist/components/switch/switch.d.mts +304 -0
- package/dist/components/switch/switch.test.d.mts +2 -0
- package/dist/components/switch/switch.test.d.ts +2 -0
- package/dist/components/switch/switch.test.js +37 -39
- package/dist/components/switch/switch.test.mjs +1 -1
- package/dist/components/table/index.d.mts +5 -0
- package/dist/components/table/index.d.ts +5 -0
- package/dist/components/table/index.js +323 -331
- package/dist/components/table/index.mjs +4 -4
- package/dist/components/table/table-body.d.mts +26 -0
- package/dist/components/table/table-body.js +323 -331
- package/dist/components/table/table-body.mjs +3 -3
- package/dist/components/table/table-head.d.mts +21 -0
- package/dist/components/table/table.d.mts +583 -0
- package/dist/components/table/table.js +323 -331
- package/dist/components/table/table.mjs +4 -4
- package/dist/components/table/table.test.d.mts +2 -0
- package/dist/components/table/table.test.d.ts +2 -0
- package/dist/components/table/table.test.js +360 -370
- package/dist/components/table/table.test.mjs +5 -5
- package/dist/components/tabs/index.d.mts +5 -0
- package/dist/components/tabs/index.d.ts +5 -0
- package/dist/components/tabs/tabs.d.mts +241 -0
- package/dist/components/tabs/tabs.test.d.mts +2 -0
- package/dist/components/tabs/tabs.test.d.ts +2 -0
- package/dist/components/tabs/tabs.test.js +37 -39
- package/dist/components/tabs/tabs.test.mjs +2 -2
- package/dist/components/textarea/index.d.mts +2 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/textarea.d.mts +17 -0
- package/dist/components/textarea/textarea.test.d.mts +2 -0
- package/dist/components/textarea/textarea.test.d.ts +2 -0
- package/dist/components/textarea/textarea.test.js +50 -52
- package/dist/components/textarea/textarea.test.mjs +2 -2
- package/dist/components/toast/index.d.mts +9 -0
- package/dist/components/toast/index.d.ts +9 -0
- package/dist/components/toast/index.js +474 -458
- package/dist/components/toast/index.mjs +12 -7
- 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 +25 -45
- package/dist/components/toast/toast-utils.mjs +1 -1
- package/dist/components/toast/toast.d.mts +208 -0
- package/dist/components/toast/toast.d.ts +14 -10
- package/dist/components/toast/toast.js +359 -456
- package/dist/components/toast/toast.mjs +3 -5
- 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 +400 -499
- package/dist/components/toast/toast.test.mjs +6 -8
- 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 +3822 -0
- package/dist/components/toast/use-toast.mjs +17 -0
- package/dist/components/tooltip/index.d.mts +6 -0
- package/dist/components/tooltip/index.d.ts +6 -0
- package/dist/components/tooltip/tooltip-utils.d.mts +2 -0
- package/dist/components/tooltip/tooltip-utils.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.mts +143 -0
- package/dist/components/tooltip/tooltip.test.d.mts +2 -0
- package/dist/components/tooltip/tooltip.test.d.ts +2 -0
- package/dist/components/tooltip/tooltip.test.js +37 -39
- package/dist/components/tooltip/tooltip.test.mjs +1 -1
- package/dist/components/tooltip/useTooltip.d.mts +2 -0
- package/dist/components/tooltip/useTooltip.d.ts +2 -0
- package/dist/index.d.mts +33 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +576 -511
- package/dist/index.mjs +139 -39
- package/dist/tooltip-utils-DCKA5gnI.d.mts +30 -0
- package/dist/tooltip-utils-DCKA5gnI.d.ts +30 -0
- package/dist/utils/clsx.d.mts +3 -0
- package/dist/utils/props.d.mts +3 -0
- package/dist/utils/tailwind-variants.d.mts +26 -0
- package/dist/utils/types.d.mts +10 -0
- package/package.json +3 -2
- package/dist/chunk-5T5F5WVS.mjs +0 -32
- package/dist/chunk-LXPWTJ3F.mjs +0 -58
- package/dist/chunk-SDNTEP5C.mjs +0 -61
- package/dist/chunk-W7ABNK3K.mjs +0 -1
- package/dist/components/dropdown/dropdown.js +0 -122
- package/dist/components/dropdown/dropdown.mjs +0 -10
- package/dist/components/dropdown/dropdown.test.js +0 -12997
- package/dist/components/dropdown/dropdown.test.mjs +0 -25
- package/dist/components/dropdown/index.js +0 -128
- package/dist/components/dropdown/index.mjs +0 -11
- package/dist/components/toast/useToast.d.ts +0 -0
- package/dist/components/toast/useToast.js +0 -110
- package/dist/components/toast/useToast.mjs +0 -9
- /package/dist/{chunk-RDEWIZV3.mjs → chunk-LUWGOKLG.mjs} +0 -0
- /package/dist/components/{dropdown/dropdown.test.d.ts → accordion/accordion.test.d.mts} +0 -0
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "../../chunk-
|
|
2
|
+
import "../../chunk-LUWGOKLG.mjs";
|
|
3
|
+
import {
|
|
4
|
+
ToastProvider,
|
|
5
|
+
useToast
|
|
6
|
+
} from "../../chunk-QX6VJLEM.mjs";
|
|
7
|
+
import "../../chunk-ZOTHPHXA.mjs";
|
|
3
8
|
import {
|
|
4
9
|
toast_default
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-5T5F5WVS.mjs";
|
|
7
|
-
import "../../chunk-SDNTEP5C.mjs";
|
|
10
|
+
} from "../../chunk-2COCX2VX.mjs";
|
|
8
11
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-PRUAIZTU.mjs";
|
|
13
|
+
import "../../chunk-IOV7MEPG.mjs";
|
|
11
14
|
import "../../chunk-E3G5QXSH.mjs";
|
|
12
15
|
import "../../chunk-J725QONZ.mjs";
|
|
13
16
|
import "../../chunk-IZ6II3QA.mjs";
|
|
14
17
|
export {
|
|
15
|
-
toast_default as Toast
|
|
18
|
+
toast_default as Toast,
|
|
19
|
+
ToastProvider,
|
|
20
|
+
useToast
|
|
16
21
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ToastPlacement = "top-left" | "top-right" | "top-center" | "bottom-left" | "bottom-right" | "bottom-center";
|
|
2
|
+
declare const getToastPosition: (placement: ToastPlacement, width: number, offset: number) => {
|
|
3
|
+
top: number | undefined;
|
|
4
|
+
left: number | undefined;
|
|
5
|
+
bottom: number | undefined;
|
|
6
|
+
right: number | undefined;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { type ToastPlacement, getToastPosition };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ToastPlacement = "top-left" | "top-right" | "top-center" | "bottom-left" | "bottom-right" | "bottom-center";
|
|
2
|
+
declare const getToastPosition: (placement: ToastPlacement, width: number, offset: number) => {
|
|
3
|
+
top: number | undefined;
|
|
4
|
+
left: number | undefined;
|
|
5
|
+
bottom: number | undefined;
|
|
6
|
+
right: number | undefined;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { type ToastPlacement, getToastPosition };
|
|
@@ -24,59 +24,39 @@ __export(toast_utils_exports, {
|
|
|
24
24
|
getToastPosition: () => getToastPosition
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(toast_utils_exports);
|
|
27
|
-
var getToastPosition = (placement,
|
|
28
|
-
let
|
|
27
|
+
var getToastPosition = (placement, width, offset) => {
|
|
28
|
+
let top = void 0;
|
|
29
|
+
let left = void 0;
|
|
30
|
+
let bottom = void 0;
|
|
31
|
+
let right = void 0;
|
|
32
|
+
const viewportWidth = window.innerWidth;
|
|
29
33
|
switch (placement) {
|
|
30
|
-
case "top":
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
case "top-left":
|
|
35
|
+
top = offset;
|
|
36
|
+
left = offset;
|
|
33
37
|
break;
|
|
34
|
-
case "
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
case "top-right":
|
|
39
|
+
top = offset;
|
|
40
|
+
right = offset;
|
|
37
41
|
break;
|
|
38
|
-
case "
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
case "top-center":
|
|
43
|
+
top = offset;
|
|
44
|
+
left = (viewportWidth - width) / 2;
|
|
41
45
|
break;
|
|
42
|
-
case "bottom":
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
case "bottom-left":
|
|
47
|
+
bottom = offset;
|
|
48
|
+
left = offset;
|
|
45
49
|
break;
|
|
46
|
-
case "
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
case "bottom-right":
|
|
51
|
+
bottom = offset;
|
|
52
|
+
right = offset;
|
|
49
53
|
break;
|
|
50
|
-
case "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
break;
|
|
54
|
-
case "bottom-start":
|
|
55
|
-
x = targetRect.left;
|
|
56
|
-
y = targetRect.bottom + offset;
|
|
57
|
-
break;
|
|
58
|
-
case "bottom-end":
|
|
59
|
-
x = targetRect.right - width;
|
|
60
|
-
y = targetRect.bottom + offset;
|
|
61
|
-
break;
|
|
62
|
-
case "left-start":
|
|
63
|
-
x = targetRect.left - width - offset;
|
|
64
|
-
y = targetRect.top;
|
|
65
|
-
break;
|
|
66
|
-
case "left-end":
|
|
67
|
-
x = targetRect.left - width - offset;
|
|
68
|
-
y = targetRect.bottom - height;
|
|
69
|
-
break;
|
|
70
|
-
case "right-start":
|
|
71
|
-
x = targetRect.right + offset;
|
|
72
|
-
y = targetRect.top;
|
|
73
|
-
break;
|
|
74
|
-
case "right-end":
|
|
75
|
-
x = targetRect.right + offset;
|
|
76
|
-
y = targetRect.bottom - height;
|
|
54
|
+
case "bottom-center":
|
|
55
|
+
bottom = offset;
|
|
56
|
+
left = (viewportWidth - width) / 2;
|
|
77
57
|
break;
|
|
78
58
|
}
|
|
79
|
-
return {
|
|
59
|
+
return { top, left, bottom, right };
|
|
80
60
|
};
|
|
81
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
82
62
|
0 && (module.exports = {
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
import { ToastPlacement } from './toast-utils.mjs';
|
|
7
|
+
import { IconName } from '../icon/Icon.mjs';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import '../icon/template.mjs';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
width?: number;
|
|
13
|
+
icon?: IconName;
|
|
14
|
+
content?: ReactNode | string;
|
|
15
|
+
placement?: ToastPlacement;
|
|
16
|
+
classNames?: Record<string, string>;
|
|
17
|
+
showIcon?: boolean;
|
|
18
|
+
showCloseButton?: boolean;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
}
|
|
21
|
+
type ToastProps = Props & ToastVariantProps;
|
|
22
|
+
declare const Toast: react.ForwardRefExoticComponent<Props & ToastVariantProps & react.RefAttributes<any>>;
|
|
23
|
+
|
|
24
|
+
declare const toast: tailwind_variants.TVReturnType<{
|
|
25
|
+
color: {
|
|
26
|
+
primary: {
|
|
27
|
+
base: string;
|
|
28
|
+
};
|
|
29
|
+
secondary: {
|
|
30
|
+
base: string;
|
|
31
|
+
};
|
|
32
|
+
default: {
|
|
33
|
+
base: string;
|
|
34
|
+
};
|
|
35
|
+
success: {
|
|
36
|
+
base: string;
|
|
37
|
+
};
|
|
38
|
+
info: {
|
|
39
|
+
base: string;
|
|
40
|
+
};
|
|
41
|
+
warning: {
|
|
42
|
+
base: string;
|
|
43
|
+
};
|
|
44
|
+
danger: {
|
|
45
|
+
base: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
disableAnimation: {
|
|
49
|
+
true: {
|
|
50
|
+
base: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
base: string[];
|
|
55
|
+
content: string[];
|
|
56
|
+
}, undefined, {
|
|
57
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
|
58
|
+
color?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
59
|
+
disableAnimation?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
} & tailwind_variants_dist_config.TWMConfig & {
|
|
62
|
+
twMergeConfig: {
|
|
63
|
+
classGroups: {
|
|
64
|
+
fontSize: {
|
|
65
|
+
text: string[];
|
|
66
|
+
}[];
|
|
67
|
+
borderRadius: {
|
|
68
|
+
rounded: string[];
|
|
69
|
+
}[];
|
|
70
|
+
boxShadow: {
|
|
71
|
+
shadow: string[];
|
|
72
|
+
}[];
|
|
73
|
+
padding: {
|
|
74
|
+
p: string[];
|
|
75
|
+
}[];
|
|
76
|
+
gap: {
|
|
77
|
+
gap: string[];
|
|
78
|
+
}[];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}, {
|
|
82
|
+
color: {
|
|
83
|
+
primary: {
|
|
84
|
+
base: string;
|
|
85
|
+
};
|
|
86
|
+
secondary: {
|
|
87
|
+
base: string;
|
|
88
|
+
};
|
|
89
|
+
default: {
|
|
90
|
+
base: string;
|
|
91
|
+
};
|
|
92
|
+
success: {
|
|
93
|
+
base: string;
|
|
94
|
+
};
|
|
95
|
+
info: {
|
|
96
|
+
base: string;
|
|
97
|
+
};
|
|
98
|
+
warning: {
|
|
99
|
+
base: string;
|
|
100
|
+
};
|
|
101
|
+
danger: {
|
|
102
|
+
base: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
disableAnimation: {
|
|
106
|
+
true: {
|
|
107
|
+
base: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}, {
|
|
111
|
+
base: string[];
|
|
112
|
+
content: string[];
|
|
113
|
+
}, tailwind_variants.TVReturnType<{
|
|
114
|
+
color: {
|
|
115
|
+
primary: {
|
|
116
|
+
base: string;
|
|
117
|
+
};
|
|
118
|
+
secondary: {
|
|
119
|
+
base: string;
|
|
120
|
+
};
|
|
121
|
+
default: {
|
|
122
|
+
base: string;
|
|
123
|
+
};
|
|
124
|
+
success: {
|
|
125
|
+
base: string;
|
|
126
|
+
};
|
|
127
|
+
info: {
|
|
128
|
+
base: string;
|
|
129
|
+
};
|
|
130
|
+
warning: {
|
|
131
|
+
base: string;
|
|
132
|
+
};
|
|
133
|
+
danger: {
|
|
134
|
+
base: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
disableAnimation: {
|
|
138
|
+
true: {
|
|
139
|
+
base: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
}, {
|
|
143
|
+
base: string[];
|
|
144
|
+
content: string[];
|
|
145
|
+
}, undefined, tailwind_variants_dist_config.TVConfig<{
|
|
146
|
+
color: {
|
|
147
|
+
primary: {
|
|
148
|
+
base: string;
|
|
149
|
+
};
|
|
150
|
+
secondary: {
|
|
151
|
+
base: string;
|
|
152
|
+
};
|
|
153
|
+
default: {
|
|
154
|
+
base: string;
|
|
155
|
+
};
|
|
156
|
+
success: {
|
|
157
|
+
base: string;
|
|
158
|
+
};
|
|
159
|
+
info: {
|
|
160
|
+
base: string;
|
|
161
|
+
};
|
|
162
|
+
warning: {
|
|
163
|
+
base: string;
|
|
164
|
+
};
|
|
165
|
+
danger: {
|
|
166
|
+
base: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
disableAnimation: {
|
|
170
|
+
true: {
|
|
171
|
+
base: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
}, {
|
|
175
|
+
color: {
|
|
176
|
+
primary: {
|
|
177
|
+
base: string;
|
|
178
|
+
};
|
|
179
|
+
secondary: {
|
|
180
|
+
base: string;
|
|
181
|
+
};
|
|
182
|
+
default: {
|
|
183
|
+
base: string;
|
|
184
|
+
};
|
|
185
|
+
success: {
|
|
186
|
+
base: string;
|
|
187
|
+
};
|
|
188
|
+
info: {
|
|
189
|
+
base: string;
|
|
190
|
+
};
|
|
191
|
+
warning: {
|
|
192
|
+
base: string;
|
|
193
|
+
};
|
|
194
|
+
danger: {
|
|
195
|
+
base: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
disableAnimation: {
|
|
199
|
+
true: {
|
|
200
|
+
base: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
}>, unknown, unknown, undefined>>;
|
|
204
|
+
type ToastVariantProps = VariantProps<typeof toast>;
|
|
205
|
+
type ToastSlots = keyof ReturnType<typeof toast>;
|
|
206
|
+
type ToastReturnType = ReturnType<typeof toast>;
|
|
207
|
+
|
|
208
|
+
export { type Props, type ToastProps, type ToastReturnType, type ToastSlots, type ToastVariantProps, Toast as default };
|
|
@@ -3,21 +3,25 @@ import { VariantProps } from 'tailwind-variants';
|
|
|
3
3
|
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { ToastPlacement } from './toast-utils.js';
|
|
7
|
+
import { IconName } from '../icon/Icon.js';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import '../icon/template.js';
|
|
8
10
|
|
|
9
11
|
interface Props {
|
|
12
|
+
width?: number;
|
|
13
|
+
icon?: IconName;
|
|
10
14
|
content?: ReactNode | string;
|
|
11
|
-
offset?: number;
|
|
12
15
|
placement?: ToastPlacement;
|
|
13
|
-
classNames?:
|
|
14
|
-
|
|
16
|
+
classNames?: Record<string, string>;
|
|
17
|
+
showIcon?: boolean;
|
|
15
18
|
showCloseButton?: boolean;
|
|
19
|
+
onClose?: () => void;
|
|
16
20
|
}
|
|
17
21
|
type ToastProps = Props & ToastVariantProps;
|
|
18
|
-
declare const Toast: react.ForwardRefExoticComponent<Props & ToastVariantProps & react.RefAttributes<
|
|
22
|
+
declare const Toast: react.ForwardRefExoticComponent<Props & ToastVariantProps & react.RefAttributes<any>>;
|
|
19
23
|
|
|
20
|
-
declare const
|
|
24
|
+
declare const toast: tailwind_variants.TVReturnType<{
|
|
21
25
|
color: {
|
|
22
26
|
primary: {
|
|
23
27
|
base: string;
|
|
@@ -197,8 +201,8 @@ declare const tooltip: tailwind_variants.TVReturnType<{
|
|
|
197
201
|
};
|
|
198
202
|
};
|
|
199
203
|
}>, unknown, unknown, undefined>>;
|
|
200
|
-
type ToastVariantProps = VariantProps<typeof
|
|
201
|
-
type ToastSlots = keyof ReturnType<typeof
|
|
202
|
-
type ToastReturnType = ReturnType<typeof
|
|
204
|
+
type ToastVariantProps = VariantProps<typeof toast>;
|
|
205
|
+
type ToastSlots = keyof ReturnType<typeof toast>;
|
|
206
|
+
type ToastReturnType = ReturnType<typeof toast>;
|
|
203
207
|
|
|
204
208
|
export { type Props, type ToastProps, type ToastReturnType, type ToastSlots, type ToastVariantProps, Toast as default };
|