@mindly/ui-components 5.1.1 → 5.2.0
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/configs/tailwind/colors.d.ts +8 -0
- package/dist/cjs/index.js +13 -4
- package/dist/cjs/lib2/shared/hooks/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/hooks/useToastContext.d.ts +3 -0
- package/dist/cjs/lib2/shared/providers/ToastProvider/ToastProvider.d.ts +5 -0
- package/dist/cjs/lib2/shared/providers/ToastProvider/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/providers/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/ui/Toast/Toast.d.ts +4 -0
- package/dist/cjs/lib2/shared/ui/Toast/ToastCloseButton.d.ts +5 -0
- package/dist/cjs/lib2/shared/ui/Toast/ToastRegion.d.ts +3 -0
- package/dist/cjs/lib2/shared/ui/Toast/index.d.ts +2 -0
- package/dist/cjs/lib2/shared/ui/Toast/styles.d.ts +50 -0
- package/dist/cjs/lib2/shared/ui/Toast/types.d.ts +13 -0
- package/dist/cjs/lib2/shared/ui/index.d.ts +1 -0
- package/dist/esm/configs/tailwind/colors.d.ts +8 -0
- package/dist/esm/index.js +13 -4
- package/dist/esm/lib2/shared/hooks/index.d.ts +1 -0
- package/dist/esm/lib2/shared/hooks/useToastContext.d.ts +3 -0
- package/dist/esm/lib2/shared/providers/ToastProvider/ToastProvider.d.ts +5 -0
- package/dist/esm/lib2/shared/providers/ToastProvider/index.d.ts +1 -0
- package/dist/esm/lib2/shared/providers/index.d.ts +1 -0
- package/dist/esm/lib2/shared/ui/Toast/Toast.d.ts +4 -0
- package/dist/esm/lib2/shared/ui/Toast/ToastCloseButton.d.ts +5 -0
- package/dist/esm/lib2/shared/ui/Toast/ToastRegion.d.ts +3 -0
- package/dist/esm/lib2/shared/ui/Toast/index.d.ts +2 -0
- package/dist/esm/lib2/shared/ui/Toast/styles.d.ts +50 -0
- package/dist/esm/lib2/shared/ui/Toast/types.d.ts +13 -0
- package/dist/esm/lib2/shared/ui/index.d.ts +1 -0
- package/dist/index.d.ts +19 -1
- package/package.json +3 -1
- package/src/configs/tailwind/colors.ts +8 -0
- package/src/lib2/shared/css/tailwind.css +3 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ToastState } from '@react-stately/toast';
|
|
3
|
+
import { MindlyToastProps, ToastProviderProps } from '../../ui/Toast/types';
|
|
4
|
+
export declare const ToastContext: React.Context<ToastState<MindlyToastProps> | undefined>;
|
|
5
|
+
export declare function ToastProvider({ children, ...props }: React.PropsWithChildren<ToastProviderProps>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ToastProvider';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const toastStyles: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
type: {
|
|
3
|
+
success: "bg-badges-success-main";
|
|
4
|
+
error: "bg-color-info-red-not-red";
|
|
5
|
+
attention: "bg-badges-attention-main";
|
|
6
|
+
info: "bg-color-info-blue";
|
|
7
|
+
};
|
|
8
|
+
}, undefined, "toast fixed left-0 right-0 w-full h-[80px]", import("tailwind-variants/dist/config").TVConfig<{
|
|
9
|
+
type: {
|
|
10
|
+
success: "bg-badges-success-main";
|
|
11
|
+
error: "bg-color-info-red-not-red";
|
|
12
|
+
attention: "bg-badges-attention-main";
|
|
13
|
+
info: "bg-color-info-blue";
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
type: {
|
|
17
|
+
success: "bg-badges-success-main";
|
|
18
|
+
error: "bg-color-info-red-not-red";
|
|
19
|
+
attention: "bg-badges-attention-main";
|
|
20
|
+
info: "bg-color-info-blue";
|
|
21
|
+
};
|
|
22
|
+
}>, {
|
|
23
|
+
type: {
|
|
24
|
+
success: "bg-badges-success-main";
|
|
25
|
+
error: "bg-color-info-red-not-red";
|
|
26
|
+
attention: "bg-badges-attention-main";
|
|
27
|
+
info: "bg-color-info-blue";
|
|
28
|
+
};
|
|
29
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
30
|
+
type: {
|
|
31
|
+
success: "bg-badges-success-main";
|
|
32
|
+
error: "bg-color-info-red-not-red";
|
|
33
|
+
attention: "bg-badges-attention-main";
|
|
34
|
+
info: "bg-color-info-blue";
|
|
35
|
+
};
|
|
36
|
+
}, undefined, "toast fixed left-0 right-0 w-full h-[80px]", import("tailwind-variants/dist/config").TVConfig<{
|
|
37
|
+
type: {
|
|
38
|
+
success: "bg-badges-success-main";
|
|
39
|
+
error: "bg-color-info-red-not-red";
|
|
40
|
+
attention: "bg-badges-attention-main";
|
|
41
|
+
info: "bg-color-info-blue";
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
type: {
|
|
45
|
+
success: "bg-badges-success-main";
|
|
46
|
+
error: "bg-color-info-red-not-red";
|
|
47
|
+
attention: "bg-badges-attention-main";
|
|
48
|
+
info: "bg-color-info-blue";
|
|
49
|
+
};
|
|
50
|
+
}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ToastState, ToastStateProps } from '@react-stately/toast';
|
|
2
|
+
import { AriaToastProps, AriaToastRegionProps } from '@react-aria/toast';
|
|
3
|
+
export type ToastProviderProps = ToastStateProps;
|
|
4
|
+
export type MindlyToastProps = {
|
|
5
|
+
type?: 'success' | 'error' | 'attention' | 'info';
|
|
6
|
+
text: string;
|
|
7
|
+
};
|
|
8
|
+
export interface ToastRegionProps<T> extends AriaToastRegionProps {
|
|
9
|
+
state: ToastState<T>;
|
|
10
|
+
}
|
|
11
|
+
export interface ToastProps<T> extends AriaToastProps<T> {
|
|
12
|
+
state: ToastState<T>;
|
|
13
|
+
}
|