@causw/core 0.0.18 → 0.0.20
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/components/Avatar/Avatar.d.cts +2 -2
- package/dist/components/Avatar/Avatar.d.mts +2 -2
- package/dist/components/Avatar/Avatar.styles.d.cts +3 -3
- package/dist/components/Avatar/Avatar.styles.d.cts.map +1 -1
- package/dist/components/Avatar/Avatar.styles.d.mts +3 -3
- package/dist/components/BottomNavigation/BottomNavigation.cjs +8 -8
- package/dist/components/BottomNavigation/BottomNavigation.d.cts +9 -5
- package/dist/components/BottomNavigation/BottomNavigation.d.cts.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.d.mts +9 -5
- package/dist/components/BottomNavigation/BottomNavigation.d.mts.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.mjs +8 -8
- package/dist/components/BottomNavigation/BottomNavigation.mjs.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.styles.cjs +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.styles.d.cts +3 -3
- package/dist/components/BottomNavigation/BottomNavigation.styles.d.mts +3 -3
- package/dist/components/BottomNavigation/BottomNavigation.styles.mjs +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.styles.mjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +6 -6
- package/dist/components/BottomSheet/BottomSheet.d.cts +7 -7
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.mts +7 -7
- package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.mjs +3 -3
- package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.styles.cjs +8 -3
- package/dist/components/BottomSheet/BottomSheet.styles.d.cts +9 -6
- package/dist/components/BottomSheet/BottomSheet.styles.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.styles.d.mts +9 -6
- package/dist/components/BottomSheet/BottomSheet.styles.d.mts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.styles.mjs +8 -3
- package/dist/components/BottomSheet/BottomSheet.styles.mjs.map +1 -1
- package/dist/components/Box/Box.styles.d.cts +3 -3
- package/dist/components/Box/Box.styles.d.mts +3 -3
- package/dist/components/Button/Button.d.cts +2 -2
- package/dist/components/Button/Button.styles.d.cts +3 -3
- package/dist/components/CTAButton/CTAButton.d.cts +2 -2
- package/dist/components/CTAButton/CTAButton.styles.d.cts +3 -3
- package/dist/components/Calendar/Calendar.d.cts +2 -2
- package/dist/components/Calendar/Calendar.d.mts +2 -2
- package/dist/components/Calendar/Calendar.styles.d.cts +3 -3
- package/dist/components/Calendar/Calendar.styles.d.mts +3 -3
- package/dist/components/Checkbox/Checkbox.d.mts +4 -4
- package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
- package/dist/components/Checkbox/Checkbox.styles.d.cts +3 -3
- package/dist/components/Checkbox/Checkbox.styles.d.mts +3 -3
- package/dist/components/Chip/Chip.d.cts +2 -2
- package/dist/components/Chip/Chip.d.mts +2 -2
- package/dist/components/Chip/Chip.styles.d.cts +3 -3
- package/dist/components/Chip/Chip.styles.d.cts.map +1 -1
- package/dist/components/Chip/Chip.styles.d.mts +3 -3
- package/dist/components/DatePicker/DatePicker.d.cts +2 -2
- package/dist/components/DatePicker/DatePicker.d.mts +2 -2
- package/dist/components/DatePicker/DatePicker.styles.d.cts +3 -3
- package/dist/components/Dialog/Dialog.d.cts +13 -13
- package/dist/components/Dialog/Dialog.d.cts.map +1 -1
- package/dist/components/Dialog/Dialog.styles.d.cts +3 -3
- package/dist/components/Dialog/Dialog.styles.d.cts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.cts +3 -3
- package/dist/components/Dropdown/Dropdown.d.mts +3 -3
- package/dist/components/Dropdown/Dropdown.styles.d.cts +3 -3
- package/dist/components/Dropdown/Dropdown.styles.d.cts.map +1 -1
- package/dist/components/Dropdown/Dropdown.styles.d.mts +3 -3
- package/dist/components/Field/Field.d.cts +5 -5
- package/dist/components/Field/Field.d.cts.map +1 -1
- package/dist/components/FloatingActionButton/FloatingActionButton.d.cts +2 -2
- package/dist/components/FloatingActionButton/FloatingActionButton.d.cts.map +1 -1
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.cts +3 -3
- package/dist/components/Grid/Grid.styles.d.cts +3 -3
- package/dist/components/HStack/HStack.d.cts +2 -2
- package/dist/components/HStack/HStack.d.mts +2 -2
- package/dist/components/Modal/Modal.d.cts +10 -10
- package/dist/components/Modal/Modal.d.mts +7 -7
- package/dist/components/Modal/Modal.styles.d.cts +3 -3
- package/dist/components/Primitive/Primitive.d.cts +16 -16
- package/dist/components/Primitive/Primitive.d.mts +16 -16
- package/dist/components/PullToRefresh/PullToRefresh.d.cts +2 -2
- package/dist/components/PullToRefresh/PullToRefresh.styles.d.cts +3 -3
- package/dist/components/PullToRefresh/PullToRefresh.styles.d.mts +3 -3
- package/dist/components/Radio/Radio.d.cts +3 -3
- package/dist/components/Radio/Radio.d.cts.map +1 -1
- package/dist/components/RatioChart/RatioChart.d.cts +5 -5
- package/dist/components/RatioChart/RatioChart.d.mts +5 -5
- package/dist/components/RatioChart/RatioChartEditor.d.cts +2 -2
- package/dist/components/RatioChart/RatioChartEditor.d.mts +2 -2
- package/dist/components/Select/Select.d.cts +5 -5
- package/dist/components/Select/Select.d.mts +5 -5
- package/dist/components/Select/Select.styles.d.cts +3 -3
- package/dist/components/Select/Select.styles.d.mts +3 -3
- package/dist/components/Select/Select.styles.d.mts.map +1 -1
- package/dist/components/Separator/Separator.styles.d.cts +3 -3
- package/dist/components/Separator/Separator.styles.d.mts +3 -3
- package/dist/components/Sidebar/Sidebar.d.cts +8 -8
- package/dist/components/Sidebar/Sidebar.d.mts +8 -8
- package/dist/components/Sidebar/Sidebar.styles.d.cts +3 -3
- package/dist/components/Skeleton/Skeleton.d.cts +2 -2
- package/dist/components/Skeleton/Skeleton.d.mts +2 -2
- package/dist/components/Skeleton/Skeleton.styles.d.cts +3 -3
- package/dist/components/Skeleton/Skeleton.styles.d.mts +3 -3
- package/dist/components/Spacer/Spacer.styles.d.cts +3 -3
- package/dist/components/Spacer/Spacer.styles.d.cts.map +1 -1
- package/dist/components/Spacer/Spacer.styles.d.mts +3 -3
- package/dist/components/Spacer/Spacer.styles.d.mts.map +1 -1
- package/dist/components/Spinner/Spinner.d.cts +2 -2
- package/dist/components/Spinner/Spinner.d.mts +2 -2
- package/dist/components/Spinner/Spinner.styles.d.cts +3 -3
- package/dist/components/Spinner/Spinner.styles.d.mts +3 -3
- package/dist/components/Stack/Stack.styles.d.cts +3 -3
- package/dist/components/Stack/Stack.styles.d.cts.map +1 -1
- package/dist/components/Stack/Stack.styles.d.mts +3 -3
- package/dist/components/Tab/Tab.d.cts +6 -6
- package/dist/components/Tab/Tab.d.mts +6 -6
- package/dist/components/Tab/Tab.styles.d.cts +3 -3
- package/dist/components/Tab/Tab.styles.d.cts.map +1 -1
- package/dist/components/Tab/Tab.styles.d.mts +3 -3
- package/dist/components/Text/Text.d.cts +3 -3
- package/dist/components/Text/Text.d.mts +1 -1
- package/dist/components/Text/Text.styles.d.cts +3 -3
- package/dist/components/Text/Text.styles.d.cts.map +1 -1
- package/dist/components/Text/Text.styles.d.mts +3 -3
- package/dist/components/TextArea/TextArea.d.cts +4 -4
- package/dist/components/TextArea/TextArea.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.styles.d.cts +3 -3
- package/dist/components/TextInput/TextInput.d.cts +2 -2
- package/dist/components/TextInput/TextInput.d.mts +2 -2
- package/dist/components/TextInput/TextInput.styles.d.cts +3 -3
- package/dist/components/TextInput/TextInput.styles.d.mts +3 -3
- package/dist/components/Toast/Toast.d.cts +5 -5
- package/dist/components/Toast/Toast.d.cts.map +1 -1
- package/dist/components/Toast/Toast.d.mts +3 -3
- package/dist/components/Toast/Toast.styles.d.cts +3 -3
- package/dist/components/Toast/Toast.styles.d.mts +3 -3
- package/dist/components/Toast/Toaster.cjs +39 -0
- package/dist/components/Toast/Toaster.d.cts +7 -0
- package/dist/components/Toast/Toaster.d.cts.map +1 -0
- package/dist/components/Toast/Toaster.d.mts +7 -0
- package/dist/components/Toast/Toaster.d.mts.map +1 -0
- package/dist/components/Toast/Toaster.mjs +39 -0
- package/dist/components/Toast/Toaster.mjs.map +1 -0
- package/dist/components/Toast/index.d.cts +2 -1
- package/dist/components/Toast/index.d.mts +2 -1
- package/dist/components/Toast/toastStore.cjs +11 -1
- package/dist/components/Toast/toastStore.mjs +10 -2
- package/dist/components/Toast/toastStore.mjs.map +1 -1
- package/dist/components/Toggle/Toggle.d.cts +4 -4
- package/dist/components/Toggle/Toggle.d.mts +4 -4
- package/dist/components/Toggle/Toggle.d.mts.map +1 -1
- package/dist/components/Toggle/Toggle.styles.d.cts +3 -3
- package/dist/components/Toggle/Toggle.styles.d.mts +3 -3
- package/dist/components/VStack/VStack.d.cts +2 -2
- package/dist/components/VStack/VStack.d.mts +2 -2
- package/dist/components/index.d.cts +1 -2
- package/dist/components/index.d.mts +1 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +4 -3
- package/src/styles/global.css +1 -1
- package/dist/components/Drawer/Drawer.cjs +0 -41
- package/dist/components/Drawer/Drawer.d.cts +0 -29
- package/dist/components/Drawer/Drawer.d.cts.map +0 -1
- package/dist/components/Drawer/Drawer.d.mts +0 -29
- package/dist/components/Drawer/Drawer.d.mts.map +0 -1
- package/dist/components/Drawer/Drawer.mjs +0 -40
- package/dist/components/Drawer/Drawer.mjs.map +0 -1
- package/dist/components/Drawer/Drawer.styles.cjs +0 -23
- package/dist/components/Drawer/Drawer.styles.d.cts +0 -36
- package/dist/components/Drawer/Drawer.styles.d.cts.map +0 -1
- package/dist/components/Drawer/Drawer.styles.d.mts +0 -36
- package/dist/components/Drawer/Drawer.styles.d.mts.map +0 -1
- package/dist/components/Drawer/Drawer.styles.mjs +0 -23
- package/dist/components/Drawer/Drawer.styles.mjs.map +0 -1
- package/dist/components/Drawer/index.d.cts +0 -1
- package/dist/components/Drawer/index.d.mts +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants55 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Spinner/Spinner.styles.d.ts
|
|
5
|
-
declare const spinner:
|
|
5
|
+
declare const spinner: tailwind_variants55.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
primary: string;
|
|
8
8
|
white: string;
|
|
@@ -38,7 +38,7 @@ declare const spinner: tailwind_variants57.TVReturnType<{
|
|
|
38
38
|
normal: string;
|
|
39
39
|
fast: string;
|
|
40
40
|
};
|
|
41
|
-
}, undefined,
|
|
41
|
+
}, undefined, tailwind_variants55.TVReturnType<{
|
|
42
42
|
color: {
|
|
43
43
|
primary: string;
|
|
44
44
|
white: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants3 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Stack/Stack.styles.d.ts
|
|
5
|
-
declare const stack:
|
|
5
|
+
declare const stack: tailwind_variants3.TVReturnType<{
|
|
6
6
|
direction: {
|
|
7
7
|
horizontal: string;
|
|
8
8
|
vertical: string;
|
|
@@ -52,7 +52,7 @@ declare const stack: tailwind_variants13.TVReturnType<{
|
|
|
52
52
|
end: string;
|
|
53
53
|
between: string;
|
|
54
54
|
};
|
|
55
|
-
}, undefined,
|
|
55
|
+
}, undefined, tailwind_variants3.TVReturnType<{
|
|
56
56
|
direction: {
|
|
57
57
|
horizontal: string;
|
|
58
58
|
vertical: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.styles.d.cts","names":[],"sources":["../../../src/components/Stack/Stack.styles.ts"],"mappings":";;;;cAEa,KAAA,EAkCX,
|
|
1
|
+
{"version":3,"file":"Stack.styles.d.cts","names":[],"sources":["../../../src/components/Stack/Stack.styles.ts"],"mappings":";;;;cAEa,KAAA,EAkCX,kBAAA,CAlCgB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkChB,kBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KAEU,aAAA,GAAgB,YAAA,QAAoB,KAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants3 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Stack/Stack.styles.d.ts
|
|
5
|
-
declare const stack:
|
|
5
|
+
declare const stack: tailwind_variants3.TVReturnType<{
|
|
6
6
|
direction: {
|
|
7
7
|
horizontal: string;
|
|
8
8
|
vertical: string;
|
|
@@ -52,7 +52,7 @@ declare const stack: tailwind_variants5.TVReturnType<{
|
|
|
52
52
|
end: string;
|
|
53
53
|
between: string;
|
|
54
54
|
};
|
|
55
|
-
}, undefined,
|
|
55
|
+
}, undefined, tailwind_variants3.TVReturnType<{
|
|
56
56
|
direction: {
|
|
57
57
|
horizontal: string;
|
|
58
58
|
vertical: string;
|
|
@@ -2,7 +2,7 @@ import { PrimitiveProps } from "../Primitive/Primitive.cjs";
|
|
|
2
2
|
import "../Primitive/index.cjs";
|
|
3
3
|
import { TabVariants } from "./Tab.styles.cjs";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime36 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Tab/Tab.d.ts
|
|
8
8
|
interface TabRootProps extends TabVariants {
|
|
@@ -35,7 +35,7 @@ declare const Tab: {
|
|
|
35
35
|
id,
|
|
36
36
|
className,
|
|
37
37
|
children
|
|
38
|
-
}: TabRootProps):
|
|
38
|
+
}: TabRootProps): react_jsx_runtime36.JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
} & {
|
|
41
41
|
Root: {
|
|
@@ -48,14 +48,14 @@ declare const Tab: {
|
|
|
48
48
|
id,
|
|
49
49
|
className,
|
|
50
50
|
children
|
|
51
|
-
}: TabRootProps):
|
|
51
|
+
}: TabRootProps): react_jsx_runtime36.JSX.Element;
|
|
52
52
|
displayName: string;
|
|
53
53
|
};
|
|
54
54
|
List: {
|
|
55
55
|
({
|
|
56
56
|
className,
|
|
57
57
|
...props
|
|
58
|
-
}: TabListProps):
|
|
58
|
+
}: TabListProps): react_jsx_runtime36.JSX.Element;
|
|
59
59
|
displayName: string;
|
|
60
60
|
};
|
|
61
61
|
TabItem: {
|
|
@@ -65,7 +65,7 @@ declare const Tab: {
|
|
|
65
65
|
className,
|
|
66
66
|
onClick,
|
|
67
67
|
...props
|
|
68
|
-
}: TabTabItemProps):
|
|
68
|
+
}: TabTabItemProps): react_jsx_runtime36.JSX.Element;
|
|
69
69
|
displayName: string;
|
|
70
70
|
};
|
|
71
71
|
Content: {
|
|
@@ -76,7 +76,7 @@ declare const Tab: {
|
|
|
76
76
|
className,
|
|
77
77
|
children,
|
|
78
78
|
...props
|
|
79
|
-
}: TabContentProps):
|
|
79
|
+
}: TabContentProps): react_jsx_runtime36.JSX.Element | null;
|
|
80
80
|
displayName: string;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
@@ -2,7 +2,7 @@ import { PrimitiveProps } from "../Primitive/Primitive.mjs";
|
|
|
2
2
|
import "../Primitive/index.mjs";
|
|
3
3
|
import { TabVariants } from "./Tab.styles.mjs";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime40 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Tab/Tab.d.ts
|
|
8
8
|
interface TabRootProps extends TabVariants {
|
|
@@ -35,7 +35,7 @@ declare const Tab: {
|
|
|
35
35
|
id,
|
|
36
36
|
className,
|
|
37
37
|
children
|
|
38
|
-
}: TabRootProps):
|
|
38
|
+
}: TabRootProps): react_jsx_runtime40.JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
} & {
|
|
41
41
|
Root: {
|
|
@@ -48,14 +48,14 @@ declare const Tab: {
|
|
|
48
48
|
id,
|
|
49
49
|
className,
|
|
50
50
|
children
|
|
51
|
-
}: TabRootProps):
|
|
51
|
+
}: TabRootProps): react_jsx_runtime40.JSX.Element;
|
|
52
52
|
displayName: string;
|
|
53
53
|
};
|
|
54
54
|
List: {
|
|
55
55
|
({
|
|
56
56
|
className,
|
|
57
57
|
...props
|
|
58
|
-
}: TabListProps):
|
|
58
|
+
}: TabListProps): react_jsx_runtime40.JSX.Element;
|
|
59
59
|
displayName: string;
|
|
60
60
|
};
|
|
61
61
|
TabItem: {
|
|
@@ -65,7 +65,7 @@ declare const Tab: {
|
|
|
65
65
|
className,
|
|
66
66
|
onClick,
|
|
67
67
|
...props
|
|
68
|
-
}: TabTabItemProps):
|
|
68
|
+
}: TabTabItemProps): react_jsx_runtime40.JSX.Element;
|
|
69
69
|
displayName: string;
|
|
70
70
|
};
|
|
71
71
|
Content: {
|
|
@@ -76,7 +76,7 @@ declare const Tab: {
|
|
|
76
76
|
className,
|
|
77
77
|
children,
|
|
78
78
|
...props
|
|
79
|
-
}: TabContentProps):
|
|
79
|
+
}: TabContentProps): react_jsx_runtime40.JSX.Element | null;
|
|
80
80
|
displayName: string;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants17 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Tab/Tab.styles.d.ts
|
|
5
|
-
declare const tabs:
|
|
5
|
+
declare const tabs: tailwind_variants17.TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
underline: {
|
|
8
8
|
list: string;
|
|
@@ -30,7 +30,7 @@ declare const tabs: tailwind_variants7.TVReturnType<{
|
|
|
30
30
|
}, {
|
|
31
31
|
list: string;
|
|
32
32
|
item: string;
|
|
33
|
-
},
|
|
33
|
+
}, tailwind_variants17.TVReturnType<{
|
|
34
34
|
variant: {
|
|
35
35
|
underline: {
|
|
36
36
|
list: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.styles.d.cts","names":[],"sources":["../../../src/components/Tab/Tab.styles.ts"],"mappings":";;;;cAEa,IAAA,EA+BX,
|
|
1
|
+
{"version":3,"file":"Tab.styles.d.cts","names":[],"sources":["../../../src/components/Tab/Tab.styles.ts"],"mappings":";;;;cAEa,IAAA,EA+BX,mBAAA,CA/Be,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+Bf,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;KAEU,WAAA,GAAc,YAAA,QAAoB,IAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants23 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Tab/Tab.styles.d.ts
|
|
5
|
-
declare const tabs:
|
|
5
|
+
declare const tabs: tailwind_variants23.TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
underline: {
|
|
8
8
|
list: string;
|
|
@@ -30,7 +30,7 @@ declare const tabs: tailwind_variants21.TVReturnType<{
|
|
|
30
30
|
}, {
|
|
31
31
|
list: string;
|
|
32
32
|
item: string;
|
|
33
|
-
},
|
|
33
|
+
}, tailwind_variants23.TVReturnType<{
|
|
34
34
|
variant: {
|
|
35
35
|
underline: {
|
|
36
36
|
list: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextVariants } from "./Text.styles.cjs";
|
|
2
2
|
import { PolymorphicProps } from "../../utils/polymorphic/polymorphic.cjs";
|
|
3
3
|
import "../../utils/polymorphic/index.cjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react0 from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Text/Text.d.ts
|
|
7
7
|
type TextElement = 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'label' | 'a';
|
|
@@ -15,9 +15,9 @@ declare const Text: {
|
|
|
15
15
|
as,
|
|
16
16
|
className,
|
|
17
17
|
...props
|
|
18
|
-
}: TextProps<E>):
|
|
18
|
+
}: TextProps<E>): react0.DetailedReactHTMLElement<{
|
|
19
19
|
className: string;
|
|
20
|
-
} & Omit<TextProps<E>, "
|
|
20
|
+
} & Omit<TextProps<E>, "className" | "typography" | "textColor" | "align" | "children" | "as">, HTMLSpanElement>;
|
|
21
21
|
displayName: string;
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
@@ -17,7 +17,7 @@ declare const Text: {
|
|
|
17
17
|
...props
|
|
18
18
|
}: TextProps<E>): react0.DetailedReactHTMLElement<{
|
|
19
19
|
className: string;
|
|
20
|
-
} & Omit<TextProps<E>, "
|
|
20
|
+
} & Omit<TextProps<E>, "className" | "typography" | "textColor" | "align" | "children" | "as">, HTMLSpanElement>;
|
|
21
21
|
displayName: string;
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants0 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Text/Text.styles.d.ts
|
|
5
|
-
declare const text:
|
|
5
|
+
declare const text: tailwind_variants0.TVReturnType<{
|
|
6
6
|
typography: {
|
|
7
7
|
'title-48-bold': string;
|
|
8
8
|
'title-32-bold': string;
|
|
@@ -98,7 +98,7 @@ declare const text: tailwind_variants19.TVReturnType<{
|
|
|
98
98
|
right: string;
|
|
99
99
|
justify: string;
|
|
100
100
|
};
|
|
101
|
-
}, undefined,
|
|
101
|
+
}, undefined, tailwind_variants0.TVReturnType<{
|
|
102
102
|
typography: {
|
|
103
103
|
'title-48-bold': string;
|
|
104
104
|
'title-32-bold': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.styles.d.cts","names":[],"sources":["../../../src/components/Text/Text.styles.ts"],"mappings":";;;;cAEa,IAAA,EAmDX,
|
|
1
|
+
{"version":3,"file":"Text.styles.d.cts","names":[],"sources":["../../../src/components/Text/Text.styles.ts"],"mappings":";;;;cAEa,IAAA,EAmDX,kBAAA,CAnDe,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmDf,kBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEU,YAAA,GAAe,YAAA,QAAoB,IAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants1 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Text/Text.styles.d.ts
|
|
5
|
-
declare const text:
|
|
5
|
+
declare const text: tailwind_variants1.TVReturnType<{
|
|
6
6
|
typography: {
|
|
7
7
|
'title-48-bold': string;
|
|
8
8
|
'title-32-bold': string;
|
|
@@ -98,7 +98,7 @@ declare const text: tailwind_variants0.TVReturnType<{
|
|
|
98
98
|
right: string;
|
|
99
99
|
justify: string;
|
|
100
100
|
};
|
|
101
|
-
}, undefined,
|
|
101
|
+
}, undefined, tailwind_variants1.TVReturnType<{
|
|
102
102
|
typography: {
|
|
103
103
|
'title-48-bold': string;
|
|
104
104
|
'title-32-bold': string;
|
|
@@ -2,7 +2,7 @@ import { PrimitiveProps } from "../Primitive/Primitive.cjs";
|
|
|
2
2
|
import "../Primitive/index.cjs";
|
|
3
3
|
import { TextAreaVariants } from "./TextArea.styles.cjs";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/TextArea/TextArea.d.ts
|
|
8
8
|
interface TextAreaProps extends React.HTMLAttributes<HTMLDivElement>, PrimitiveProps {
|
|
@@ -17,7 +17,7 @@ declare const TextArea: {
|
|
|
17
17
|
className,
|
|
18
18
|
children,
|
|
19
19
|
...props
|
|
20
|
-
}: TextAreaProps):
|
|
20
|
+
}: TextAreaProps): react_jsx_runtime12.JSX.Element;
|
|
21
21
|
displayName: string;
|
|
22
22
|
} & {
|
|
23
23
|
Input: {
|
|
@@ -26,7 +26,7 @@ declare const TextArea: {
|
|
|
26
26
|
disabled: disabledProp,
|
|
27
27
|
className,
|
|
28
28
|
...props
|
|
29
|
-
}: TextAreaInputProps):
|
|
29
|
+
}: TextAreaInputProps): react_jsx_runtime12.JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
32
|
Footer: {
|
|
@@ -34,7 +34,7 @@ declare const TextArea: {
|
|
|
34
34
|
className,
|
|
35
35
|
children,
|
|
36
36
|
...props
|
|
37
|
-
}: TextAreaFooterProps):
|
|
37
|
+
}: TextAreaFooterProps): react_jsx_runtime12.JSX.Element;
|
|
38
38
|
displayName: string;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.cts","names":[],"sources":["../../../src/components/TextArea/TextArea.tsx"],"mappings":";;;;;;;UAMiB,aAAA,SACP,KAAA,CAAM,cAAA,CAAe,cAAA,GAAiB,cAAA;EAC9C,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAmBD,kBAAA,SACP,KAAA,CAAM,cAAA,cAA4B,IAAA,CAAK,gBAAA;AAAA,UAmBhC,mBAAA,SACP,KAAA,CAAM,cAAA,CAAe,cAAA,GAAiB,cAAA;EAC9C,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAqBL,QAAA;EAAA;;;;KA3D4C,aAAA,GAAa,
|
|
1
|
+
{"version":3,"file":"TextArea.d.cts","names":[],"sources":["../../../src/components/TextArea/TextArea.tsx"],"mappings":";;;;;;;UAMiB,aAAA,SACP,KAAA,CAAM,cAAA,CAAe,cAAA,GAAiB,cAAA;EAC9C,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAmBD,kBAAA,SACP,KAAA,CAAM,cAAA,cAA4B,IAAA,CAAK,gBAAA;AAAA,UAmBhC,mBAAA,SACP,KAAA,CAAM,cAAA,CAAe,cAAA,GAAiB,cAAA;EAC9C,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAqBL,QAAA;EAAA;;;;KA3D4C,aAAA,GAAa,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;OAwBnE,kBAAA,GAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;OAqBlB,mBAAA,GAAmB,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants41 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TextArea/TextArea.styles.d.ts
|
|
5
|
-
declare const textArea:
|
|
5
|
+
declare const textArea: tailwind_variants41.TVReturnType<{
|
|
6
6
|
disabled: {
|
|
7
7
|
true: {
|
|
8
8
|
root: string;
|
|
@@ -52,7 +52,7 @@ declare const textArea: tailwind_variants31.TVReturnType<{
|
|
|
52
52
|
root: string;
|
|
53
53
|
input: string;
|
|
54
54
|
footer: string;
|
|
55
|
-
},
|
|
55
|
+
}, tailwind_variants41.TVReturnType<{
|
|
56
56
|
disabled: {
|
|
57
57
|
true: {
|
|
58
58
|
root: string;
|
|
@@ -2,7 +2,7 @@ import { TextVariants } from "../Text/Text.styles.cjs";
|
|
|
2
2
|
import "../Text/index.cjs";
|
|
3
3
|
import { TextInputVariants } from "./TextInput.styles.cjs";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/TextInput/TextInput.d.ts
|
|
8
8
|
interface TextInputProps extends React.ComponentProps<'input'>, TextVariants, TextInputVariants {
|
|
@@ -25,7 +25,7 @@ declare const TextInput: {
|
|
|
25
25
|
typography,
|
|
26
26
|
textColor,
|
|
27
27
|
...props
|
|
28
|
-
}: TextInputProps):
|
|
28
|
+
}: TextInputProps): react_jsx_runtime18.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
@@ -2,7 +2,7 @@ import { TextVariants } from "../Text/Text.styles.mjs";
|
|
|
2
2
|
import "../Text/index.mjs";
|
|
3
3
|
import { TextInputVariants } from "./TextInput.styles.mjs";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/TextInput/TextInput.d.ts
|
|
8
8
|
interface TextInputProps extends React.ComponentProps<'input'>, TextVariants, TextInputVariants {
|
|
@@ -25,7 +25,7 @@ declare const TextInput: {
|
|
|
25
25
|
typography,
|
|
26
26
|
textColor,
|
|
27
27
|
...props
|
|
28
|
-
}: TextInputProps):
|
|
28
|
+
}: TextInputProps): react_jsx_runtime0.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants1 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TextInput/TextInput.styles.d.ts
|
|
5
|
-
declare const textInput:
|
|
5
|
+
declare const textInput: tailwind_variants1.TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
default: {
|
|
8
8
|
root: string;
|
|
@@ -50,7 +50,7 @@ declare const textInput: tailwind_variants0.TVReturnType<{
|
|
|
50
50
|
input: string;
|
|
51
51
|
leftIcon: string;
|
|
52
52
|
rightIcon: string;
|
|
53
|
-
},
|
|
53
|
+
}, tailwind_variants1.TVReturnType<{
|
|
54
54
|
variant: {
|
|
55
55
|
default: {
|
|
56
56
|
root: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants0 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TextInput/TextInput.styles.d.ts
|
|
5
|
-
declare const textInput:
|
|
5
|
+
declare const textInput: tailwind_variants0.TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
default: {
|
|
8
8
|
root: string;
|
|
@@ -50,7 +50,7 @@ declare const textInput: tailwind_variants1.TVReturnType<{
|
|
|
50
50
|
input: string;
|
|
51
51
|
leftIcon: string;
|
|
52
52
|
rightIcon: string;
|
|
53
|
-
},
|
|
53
|
+
}, tailwind_variants0.TVReturnType<{
|
|
54
54
|
variant: {
|
|
55
55
|
default: {
|
|
56
56
|
root: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToastVariants } from "./Toast.styles.cjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as react11 from "react";
|
|
3
|
+
import * as react_jsx_runtime50 from "react/jsx-runtime";
|
|
4
4
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Toast/Toast.d.ts
|
|
@@ -15,13 +15,13 @@ declare const Toast: ({
|
|
|
15
15
|
message,
|
|
16
16
|
icon,
|
|
17
17
|
...props
|
|
18
|
-
}: ToastProps) =>
|
|
18
|
+
}: ToastProps) => react_jsx_runtime50.JSX.Element;
|
|
19
19
|
type ToastViewportProps = React.ComponentProps<typeof ToastPrimitives.Viewport>;
|
|
20
20
|
declare const ToastViewport: ({
|
|
21
21
|
className,
|
|
22
22
|
...props
|
|
23
|
-
}: ToastViewportProps) =>
|
|
24
|
-
declare const ToastProvider:
|
|
23
|
+
}: ToastViewportProps) => react_jsx_runtime50.JSX.Element;
|
|
24
|
+
declare const ToastProvider: react11.FC<ToastPrimitives.ToastProviderProps>;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { Toast, ToastProps, ToastProvider, ToastViewport, ToastViewportProps };
|
|
27
27
|
//# sourceMappingURL=Toast.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.cts","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"mappings":";;;;;;UAKiB,UAAA,SAAmB,KAAA,CAAM,cAAA,QACjC,eAAA,CAAgB,IAAA;EAEvB,OAAA,GAAU,aAAA;EACV,OAAA;EACA,IAAA,GAAO,KAAA,CAAM,SAAA;AAAA;AAAA,cAGF,KAAA;EAAS,SAAA;EAAA,OAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAMnB,UAAA,KAAU,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAmBD,kBAAA,GAAqB,KAAA,CAAM,cAAA,QAC9B,eAAA,CAAgB,QAAA;AAAA,cAGZ,aAAA;EAAiB,SAAA;EAAA,GAAA;AAAA,GAAyB,kBAAA,KAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAQ5D,aAAA,EAAa,
|
|
1
|
+
{"version":3,"file":"Toast.d.cts","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"mappings":";;;;;;UAKiB,UAAA,SAAmB,KAAA,CAAM,cAAA,QACjC,eAAA,CAAgB,IAAA;EAEvB,OAAA,GAAU,aAAA;EACV,OAAA;EACA,IAAA,GAAO,KAAA,CAAM,SAAA;AAAA;AAAA,cAGF,KAAA;EAAS,SAAA;EAAA,OAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAMnB,UAAA,KAAU,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAmBD,kBAAA,GAAqB,KAAA,CAAM,cAAA,QAC9B,eAAA,CAAgB,QAAA;AAAA,cAGZ,aAAA;EAAiB,SAAA;EAAA,GAAA;AAAA,GAAyB,kBAAA,KAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAQ5D,aAAA,EAAa,OAAA,CAAA,EAAA,CAAA,eAAA,CAAA,kBAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToastVariants } from "./Toast.styles.mjs";
|
|
2
2
|
import * as react11 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime38 from "react/jsx-runtime";
|
|
4
4
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Toast/Toast.d.ts
|
|
@@ -15,12 +15,12 @@ declare const Toast: ({
|
|
|
15
15
|
message,
|
|
16
16
|
icon,
|
|
17
17
|
...props
|
|
18
|
-
}: ToastProps) =>
|
|
18
|
+
}: ToastProps) => react_jsx_runtime38.JSX.Element;
|
|
19
19
|
type ToastViewportProps = React.ComponentProps<typeof ToastPrimitives.Viewport>;
|
|
20
20
|
declare const ToastViewport: ({
|
|
21
21
|
className,
|
|
22
22
|
...props
|
|
23
|
-
}: ToastViewportProps) =>
|
|
23
|
+
}: ToastViewportProps) => react_jsx_runtime38.JSX.Element;
|
|
24
24
|
declare const ToastProvider: react11.FC<ToastPrimitives.ToastProviderProps>;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { Toast, ToastProps, ToastProvider, ToastViewport, ToastViewportProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants25 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Toast/Toast.styles.d.ts
|
|
5
|
-
declare const toast:
|
|
5
|
+
declare const toast: tailwind_variants25.TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
default: {
|
|
8
8
|
root: string;
|
|
@@ -20,7 +20,7 @@ declare const toast: tailwind_variants11.TVReturnType<{
|
|
|
20
20
|
}, {
|
|
21
21
|
root: string[];
|
|
22
22
|
viewport: string[];
|
|
23
|
-
},
|
|
23
|
+
}, tailwind_variants25.TVReturnType<{
|
|
24
24
|
variant: {
|
|
25
25
|
default: {
|
|
26
26
|
root: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants21 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Toast/Toast.styles.d.ts
|
|
5
|
-
declare const toast:
|
|
5
|
+
declare const toast: tailwind_variants21.TVReturnType<{
|
|
6
6
|
variant: {
|
|
7
7
|
default: {
|
|
8
8
|
root: string;
|
|
@@ -20,7 +20,7 @@ declare const toast: tailwind_variants23.TVReturnType<{
|
|
|
20
20
|
}, {
|
|
21
21
|
root: string[];
|
|
22
22
|
viewport: string[];
|
|
23
|
-
},
|
|
23
|
+
}, tailwind_variants21.TVReturnType<{
|
|
24
24
|
variant: {
|
|
25
25
|
default: {
|
|
26
26
|
root: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_Toast = require('./Toast.cjs');
|
|
3
|
+
const require_toastStore = require('./toastStore.cjs');
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let _causw_icons = require("@causw/icons");
|
|
6
|
+
|
|
7
|
+
//#region src/components/Toast/Toaster.tsx
|
|
8
|
+
const Icons = {
|
|
9
|
+
success: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_causw_icons.SuccessColored, { size: 20 }),
|
|
10
|
+
error: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_causw_icons.ErrorColored, { size: 20 }),
|
|
11
|
+
loading: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_causw_icons.LoadingColored, {
|
|
12
|
+
size: 20,
|
|
13
|
+
className: "animate-spin"
|
|
14
|
+
})
|
|
15
|
+
};
|
|
16
|
+
const toastIconMap = {
|
|
17
|
+
success: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icons.success, {}),
|
|
18
|
+
error: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icons.error, {}),
|
|
19
|
+
loading: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icons.loading, {}),
|
|
20
|
+
default: void 0
|
|
21
|
+
};
|
|
22
|
+
const Toaster = () => {
|
|
23
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Toast.ToastProvider, { children: [require_toastStore.useToastStore().map((t) => {
|
|
24
|
+
const iconToRender = t.icon || toastIconMap[t.type];
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Toast.Toast, {
|
|
26
|
+
message: t.message,
|
|
27
|
+
icon: iconToRender,
|
|
28
|
+
variant: "default",
|
|
29
|
+
duration: t.duration || 3e3,
|
|
30
|
+
open: true,
|
|
31
|
+
onOpenChange: (open) => {
|
|
32
|
+
if (!open) require_toastStore.toast.dismiss(t.id);
|
|
33
|
+
}
|
|
34
|
+
}, t.id);
|
|
35
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Toast.ToastViewport, {})] });
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.Toaster = Toaster;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.d.cts","names":[],"sources":["../../../src/components/Toast/Toaster.tsx"],"mappings":";;;cAiBa,OAAA,QAAO,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.d.mts","names":[],"sources":["../../../src/components/Toast/Toaster.tsx"],"mappings":";;;cAiBa,OAAA,QAAO,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Toast, ToastProvider, ToastViewport } from "./Toast.mjs";
|
|
2
|
+
import { toast, useToastStore } from "./toastStore.mjs";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ErrorColored, LoadingColored, SuccessColored } from "@causw/icons";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Toast/Toaster.tsx
|
|
7
|
+
const Icons = {
|
|
8
|
+
success: () => /* @__PURE__ */ jsx(SuccessColored, { size: 20 }),
|
|
9
|
+
error: () => /* @__PURE__ */ jsx(ErrorColored, { size: 20 }),
|
|
10
|
+
loading: () => /* @__PURE__ */ jsx(LoadingColored, {
|
|
11
|
+
size: 20,
|
|
12
|
+
className: "animate-spin"
|
|
13
|
+
})
|
|
14
|
+
};
|
|
15
|
+
const toastIconMap = {
|
|
16
|
+
success: /* @__PURE__ */ jsx(Icons.success, {}),
|
|
17
|
+
error: /* @__PURE__ */ jsx(Icons.error, {}),
|
|
18
|
+
loading: /* @__PURE__ */ jsx(Icons.loading, {}),
|
|
19
|
+
default: void 0
|
|
20
|
+
};
|
|
21
|
+
const Toaster = () => {
|
|
22
|
+
return /* @__PURE__ */ jsxs(ToastProvider, { children: [useToastStore().map((t) => {
|
|
23
|
+
const iconToRender = t.icon || toastIconMap[t.type];
|
|
24
|
+
return /* @__PURE__ */ jsx(Toast, {
|
|
25
|
+
message: t.message,
|
|
26
|
+
icon: iconToRender,
|
|
27
|
+
variant: "default",
|
|
28
|
+
duration: t.duration || 3e3,
|
|
29
|
+
open: true,
|
|
30
|
+
onOpenChange: (open) => {
|
|
31
|
+
if (!open) toast.dismiss(t.id);
|
|
32
|
+
}
|
|
33
|
+
}, t.id);
|
|
34
|
+
}), /* @__PURE__ */ jsx(ToastViewport, {})] });
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Toaster };
|
|
39
|
+
//# sourceMappingURL=Toaster.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.mjs","names":[],"sources":["../../../src/components/Toast/Toaster.tsx"],"sourcesContent":["import { Toast, ToastProvider, ToastViewport } from './Toast';\nimport { useToastStore, toast, ToastType } from './toastStore';\nimport { SuccessColored, ErrorColored, LoadingColored } from '@causw/icons';\n\nconst Icons = {\n success: () => <SuccessColored size={20} />,\n error: () => <ErrorColored size={20} />,\n loading: () => <LoadingColored size={20} className=\"animate-spin\" />,\n};\n\nconst toastIconMap: Record<ToastType, React.ReactNode> = {\n success: <Icons.success />,\n error: <Icons.error />,\n loading: <Icons.loading />,\n default: undefined,\n};\n\nexport const Toaster = () => {\n const toasts = useToastStore();\n\n return (\n <ToastProvider>\n {toasts.map((t) => {\n const iconToRender = t.icon || toastIconMap[t.type];\n\n return (\n <Toast\n key={t.id}\n message={t.message}\n icon={iconToRender}\n variant=\"default\"\n duration={t.duration || 3000}\n open={true}\n onOpenChange={(open) => {\n if (!open) toast.dismiss(t.id);\n }}\n />\n );\n })}\n <ToastViewport />\n </ToastProvider>\n );\n};\n"],"mappings":";;;;;;AAIA,MAAM,QAAQ;CACZ,eAAe,oBAAC,kBAAe,MAAM,KAAM;CAC3C,aAAa,oBAAC,gBAAa,MAAM,KAAM;CACvC,eAAe,oBAAC;EAAe,MAAM;EAAI,WAAU;GAAiB;CACrE;AAED,MAAM,eAAmD;CACvD,SAAS,oBAAC,MAAM,YAAU;CAC1B,OAAO,oBAAC,MAAM,UAAQ;CACtB,SAAS,oBAAC,MAAM,YAAU;CAC1B,SAAS;CACV;AAED,MAAa,gBAAgB;AAG3B,QACE,qBAAC,4BAHY,eAAe,CAIlB,KAAK,MAAM;EACjB,MAAM,eAAe,EAAE,QAAQ,aAAa,EAAE;AAE9C,SACE,oBAAC;GAEC,SAAS,EAAE;GACX,MAAM;GACN,SAAQ;GACR,UAAU,EAAE,YAAY;GACxB,MAAM;GACN,eAAe,SAAS;AACtB,QAAI,CAAC,KAAM,OAAM,QAAQ,EAAE,GAAG;;KAP3B,EAAE,GASP;GAEJ,EACF,oBAAC,kBAAgB,IACH"}
|