@fuf-stack/pixels 1.7.4 → 1.8.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/Alert/index.cjs +2 -2
- package/dist/Alert/index.d.cts +2 -2
- package/dist/Alert/index.d.ts +2 -2
- package/dist/Alert/index.js +1 -1
- package/dist/{Alert-Dc0RSQaB.d.cts → Alert-BidIEsLA.d.cts} +21 -53
- package/dist/{Alert-Dc0RSQaB.d.ts → Alert-BidIEsLA.d.ts} +21 -53
- package/dist/Toast/index.cjs +3 -6
- package/dist/Toast/index.cjs.map +1 -1
- package/dist/Toast/index.d.cts +6 -5
- package/dist/Toast/index.d.ts +6 -5
- package/dist/Toast/index.js +7 -10
- package/dist/Toaster-DVX4ebm4.d.ts +75 -0
- package/dist/Toaster-M8hrHJ-J.d.cts +75 -0
- package/dist/{chunk-K25U4BJO.cjs → chunk-LUAK6GQG.cjs} +20 -42
- package/dist/chunk-LUAK6GQG.cjs.map +1 -0
- package/dist/{chunk-565TFIAK.js → chunk-PKG3L2TJ.js} +20 -42
- package/dist/chunk-PKG3L2TJ.js.map +1 -0
- package/dist/chunk-VEXCTG6K.js +103 -0
- package/dist/chunk-VEXCTG6K.js.map +1 -0
- package/dist/chunk-YNA3GBAI.cjs +103 -0
- package/dist/chunk-YNA3GBAI.cjs.map +1 -0
- package/dist/index.cjs +5 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -14
- package/package.json +4 -3
- package/dist/ToastProvider-BaynjNgq.d.cts +0 -182
- package/dist/ToastProvider-BaynjNgq.d.ts +0 -182
- package/dist/chunk-565TFIAK.js.map +0 -1
- package/dist/chunk-56CIU4EG.cjs +0 -174
- package/dist/chunk-56CIU4EG.cjs.map +0 -1
- package/dist/chunk-7IFOMPCK.js +0 -174
- package/dist/chunk-7IFOMPCK.js.map +0 -1
- package/dist/chunk-K25U4BJO.cjs.map +0 -1
package/dist/Alert/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkLUAK6GQGcjs = require('../chunk-LUAK6GQG.cjs');
|
|
6
6
|
require('../chunk-AHEA4IJV.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.Alert =
|
|
11
|
+
exports.Alert = _chunkLUAK6GQGcjs.Alert_default; exports.alertVariants = _chunkLUAK6GQGcjs.alertVariants; exports.default = _chunkLUAK6GQGcjs.Alert_default2;
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Alert/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Alert } from '../Alert-
|
|
2
|
-
export { b as AlertProps, a as alertVariants } from '../Alert-
|
|
1
|
+
import { A as Alert } from '../Alert-BidIEsLA.cjs';
|
|
2
|
+
export { b as AlertProps, a as alertVariants } from '../Alert-BidIEsLA.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import '@fuf-stack/pixel-utils';
|
package/dist/Alert/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Alert } from '../Alert-
|
|
2
|
-
export { b as AlertProps, a as alertVariants } from '../Alert-
|
|
1
|
+
import { A as Alert } from '../Alert-BidIEsLA.js';
|
|
2
|
+
export { b as AlertProps, a as alertVariants } from '../Alert-BidIEsLA.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import '@fuf-stack/pixel-utils';
|
package/dist/Alert/index.js
CHANGED
|
@@ -4,6 +4,11 @@ import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
7
|
+
hasTitleAndChildren: {
|
|
8
|
+
true: {
|
|
9
|
+
iconWrapper: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
7
12
|
color: {
|
|
8
13
|
default: {};
|
|
9
14
|
primary: {};
|
|
@@ -18,25 +23,10 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
18
23
|
};
|
|
19
24
|
};
|
|
20
25
|
variant: {
|
|
21
|
-
solid: {};
|
|
22
|
-
flat: {};
|
|
23
|
-
faded: {
|
|
24
|
-
base: string;
|
|
25
|
-
};
|
|
26
26
|
bordered: {
|
|
27
27
|
base: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
sizeLimit: {
|
|
31
|
-
height: {
|
|
32
|
-
base: string;
|
|
33
|
-
};
|
|
34
|
-
width: {
|
|
35
|
-
base: string;
|
|
36
|
-
};
|
|
37
|
-
both: {
|
|
38
|
-
base: string;
|
|
39
|
-
};
|
|
29
|
+
solid: {};
|
|
40
30
|
};
|
|
41
31
|
}, {
|
|
42
32
|
base: string;
|
|
@@ -47,6 +37,11 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
47
37
|
iconWrapper: string;
|
|
48
38
|
alertIcon: string;
|
|
49
39
|
}, undefined, {
|
|
40
|
+
hasTitleAndChildren: {
|
|
41
|
+
true: {
|
|
42
|
+
iconWrapper: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
50
45
|
color: {
|
|
51
46
|
default: {};
|
|
52
47
|
primary: {};
|
|
@@ -61,25 +56,10 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
61
56
|
};
|
|
62
57
|
};
|
|
63
58
|
variant: {
|
|
64
|
-
solid: {};
|
|
65
|
-
flat: {};
|
|
66
|
-
faded: {
|
|
67
|
-
base: string;
|
|
68
|
-
};
|
|
69
59
|
bordered: {
|
|
70
60
|
base: string;
|
|
71
61
|
};
|
|
72
|
-
|
|
73
|
-
sizeLimit: {
|
|
74
|
-
height: {
|
|
75
|
-
base: string;
|
|
76
|
-
};
|
|
77
|
-
width: {
|
|
78
|
-
base: string;
|
|
79
|
-
};
|
|
80
|
-
both: {
|
|
81
|
-
base: string;
|
|
82
|
-
};
|
|
62
|
+
solid: {};
|
|
83
63
|
};
|
|
84
64
|
}, {
|
|
85
65
|
base: string;
|
|
@@ -90,6 +70,11 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
90
70
|
iconWrapper: string;
|
|
91
71
|
alertIcon: string;
|
|
92
72
|
}, tailwind_variants.TVReturnType<{
|
|
73
|
+
hasTitleAndChildren: {
|
|
74
|
+
true: {
|
|
75
|
+
iconWrapper: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
93
78
|
color: {
|
|
94
79
|
default: {};
|
|
95
80
|
primary: {};
|
|
@@ -104,25 +89,10 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
104
89
|
};
|
|
105
90
|
};
|
|
106
91
|
variant: {
|
|
107
|
-
solid: {};
|
|
108
|
-
flat: {};
|
|
109
|
-
faded: {
|
|
110
|
-
base: string;
|
|
111
|
-
};
|
|
112
92
|
bordered: {
|
|
113
93
|
base: string;
|
|
114
94
|
};
|
|
115
|
-
|
|
116
|
-
sizeLimit: {
|
|
117
|
-
height: {
|
|
118
|
-
base: string;
|
|
119
|
-
};
|
|
120
|
-
width: {
|
|
121
|
-
base: string;
|
|
122
|
-
};
|
|
123
|
-
both: {
|
|
124
|
-
base: string;
|
|
125
|
-
};
|
|
95
|
+
solid: {};
|
|
126
96
|
};
|
|
127
97
|
}, {
|
|
128
98
|
base: string;
|
|
@@ -135,7 +105,7 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
135
105
|
}, undefined, unknown, unknown, undefined>>;
|
|
136
106
|
type VariantProps = TVProps<typeof alertVariants>;
|
|
137
107
|
type ClassName = TVClassName<typeof alertVariants>;
|
|
138
|
-
interface AlertProps extends VariantProps {
|
|
108
|
+
interface AlertProps extends Omit<VariantProps, 'hasTitleAndChildren'> {
|
|
139
109
|
/** Content displayed inside the Alert if no description is given! */
|
|
140
110
|
children?: ReactNode;
|
|
141
111
|
/** CSS class name */
|
|
@@ -147,13 +117,11 @@ interface AlertProps extends VariantProps {
|
|
|
147
117
|
/** Icon displayed at the start of the Alert */
|
|
148
118
|
icon?: ReactNode;
|
|
149
119
|
/** Whether the Alert can be closed */
|
|
150
|
-
|
|
120
|
+
closable?: boolean;
|
|
151
121
|
/** Callback fired when the close button is clicked */
|
|
152
122
|
onClose?: () => void;
|
|
153
123
|
/** Whether to show the icon at the start */
|
|
154
124
|
showIcon?: boolean;
|
|
155
|
-
/** limit height to 150px or width to 480px or both */
|
|
156
|
-
sizeLimit?: VariantProps['sizeLimit'];
|
|
157
125
|
/** HTML data-testid attribute used in e2e tests */
|
|
158
126
|
testId?: string;
|
|
159
127
|
/** Title displayed in the Alert above the content */
|
|
@@ -164,6 +132,6 @@ interface AlertProps extends VariantProps {
|
|
|
164
132
|
/**
|
|
165
133
|
* Alert component based on [HeroUI Alert](https://www.heroui.com//docs/components/alert)
|
|
166
134
|
*/
|
|
167
|
-
declare const Alert: ({ children, className, color, endContent, icon,
|
|
135
|
+
declare const Alert: ({ children, className, color, endContent, icon, closable, onClose, showIcon, testId, title, variant, }: AlertProps) => react_jsx_runtime.JSX.Element;
|
|
168
136
|
|
|
169
137
|
export { Alert as A, alertVariants as a, type AlertProps as b };
|
|
@@ -4,6 +4,11 @@ import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
7
|
+
hasTitleAndChildren: {
|
|
8
|
+
true: {
|
|
9
|
+
iconWrapper: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
7
12
|
color: {
|
|
8
13
|
default: {};
|
|
9
14
|
primary: {};
|
|
@@ -18,25 +23,10 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
18
23
|
};
|
|
19
24
|
};
|
|
20
25
|
variant: {
|
|
21
|
-
solid: {};
|
|
22
|
-
flat: {};
|
|
23
|
-
faded: {
|
|
24
|
-
base: string;
|
|
25
|
-
};
|
|
26
26
|
bordered: {
|
|
27
27
|
base: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
sizeLimit: {
|
|
31
|
-
height: {
|
|
32
|
-
base: string;
|
|
33
|
-
};
|
|
34
|
-
width: {
|
|
35
|
-
base: string;
|
|
36
|
-
};
|
|
37
|
-
both: {
|
|
38
|
-
base: string;
|
|
39
|
-
};
|
|
29
|
+
solid: {};
|
|
40
30
|
};
|
|
41
31
|
}, {
|
|
42
32
|
base: string;
|
|
@@ -47,6 +37,11 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
47
37
|
iconWrapper: string;
|
|
48
38
|
alertIcon: string;
|
|
49
39
|
}, undefined, {
|
|
40
|
+
hasTitleAndChildren: {
|
|
41
|
+
true: {
|
|
42
|
+
iconWrapper: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
50
45
|
color: {
|
|
51
46
|
default: {};
|
|
52
47
|
primary: {};
|
|
@@ -61,25 +56,10 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
61
56
|
};
|
|
62
57
|
};
|
|
63
58
|
variant: {
|
|
64
|
-
solid: {};
|
|
65
|
-
flat: {};
|
|
66
|
-
faded: {
|
|
67
|
-
base: string;
|
|
68
|
-
};
|
|
69
59
|
bordered: {
|
|
70
60
|
base: string;
|
|
71
61
|
};
|
|
72
|
-
|
|
73
|
-
sizeLimit: {
|
|
74
|
-
height: {
|
|
75
|
-
base: string;
|
|
76
|
-
};
|
|
77
|
-
width: {
|
|
78
|
-
base: string;
|
|
79
|
-
};
|
|
80
|
-
both: {
|
|
81
|
-
base: string;
|
|
82
|
-
};
|
|
62
|
+
solid: {};
|
|
83
63
|
};
|
|
84
64
|
}, {
|
|
85
65
|
base: string;
|
|
@@ -90,6 +70,11 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
90
70
|
iconWrapper: string;
|
|
91
71
|
alertIcon: string;
|
|
92
72
|
}, tailwind_variants.TVReturnType<{
|
|
73
|
+
hasTitleAndChildren: {
|
|
74
|
+
true: {
|
|
75
|
+
iconWrapper: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
93
78
|
color: {
|
|
94
79
|
default: {};
|
|
95
80
|
primary: {};
|
|
@@ -104,25 +89,10 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
104
89
|
};
|
|
105
90
|
};
|
|
106
91
|
variant: {
|
|
107
|
-
solid: {};
|
|
108
|
-
flat: {};
|
|
109
|
-
faded: {
|
|
110
|
-
base: string;
|
|
111
|
-
};
|
|
112
92
|
bordered: {
|
|
113
93
|
base: string;
|
|
114
94
|
};
|
|
115
|
-
|
|
116
|
-
sizeLimit: {
|
|
117
|
-
height: {
|
|
118
|
-
base: string;
|
|
119
|
-
};
|
|
120
|
-
width: {
|
|
121
|
-
base: string;
|
|
122
|
-
};
|
|
123
|
-
both: {
|
|
124
|
-
base: string;
|
|
125
|
-
};
|
|
95
|
+
solid: {};
|
|
126
96
|
};
|
|
127
97
|
}, {
|
|
128
98
|
base: string;
|
|
@@ -135,7 +105,7 @@ declare const alertVariants: tailwind_variants.TVReturnType<{
|
|
|
135
105
|
}, undefined, unknown, unknown, undefined>>;
|
|
136
106
|
type VariantProps = TVProps<typeof alertVariants>;
|
|
137
107
|
type ClassName = TVClassName<typeof alertVariants>;
|
|
138
|
-
interface AlertProps extends VariantProps {
|
|
108
|
+
interface AlertProps extends Omit<VariantProps, 'hasTitleAndChildren'> {
|
|
139
109
|
/** Content displayed inside the Alert if no description is given! */
|
|
140
110
|
children?: ReactNode;
|
|
141
111
|
/** CSS class name */
|
|
@@ -147,13 +117,11 @@ interface AlertProps extends VariantProps {
|
|
|
147
117
|
/** Icon displayed at the start of the Alert */
|
|
148
118
|
icon?: ReactNode;
|
|
149
119
|
/** Whether the Alert can be closed */
|
|
150
|
-
|
|
120
|
+
closable?: boolean;
|
|
151
121
|
/** Callback fired when the close button is clicked */
|
|
152
122
|
onClose?: () => void;
|
|
153
123
|
/** Whether to show the icon at the start */
|
|
154
124
|
showIcon?: boolean;
|
|
155
|
-
/** limit height to 150px or width to 480px or both */
|
|
156
|
-
sizeLimit?: VariantProps['sizeLimit'];
|
|
157
125
|
/** HTML data-testid attribute used in e2e tests */
|
|
158
126
|
testId?: string;
|
|
159
127
|
/** Title displayed in the Alert above the content */
|
|
@@ -164,6 +132,6 @@ interface AlertProps extends VariantProps {
|
|
|
164
132
|
/**
|
|
165
133
|
* Alert component based on [HeroUI Alert](https://www.heroui.com//docs/components/alert)
|
|
166
134
|
*/
|
|
167
|
-
declare const Alert: ({ children, className, color, endContent, icon,
|
|
135
|
+
declare const Alert: ({ children, className, color, endContent, icon, closable, onClose, showIcon, testId, title, variant, }: AlertProps) => react_jsx_runtime.JSX.Element;
|
|
168
136
|
|
|
169
137
|
export { Alert as A, alertVariants as a, type AlertProps as b };
|
package/dist/Toast/index.cjs
CHANGED
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunk56CIU4EGcjs = require('../chunk-56CIU4EG.cjs');
|
|
5
|
+
var _chunkYNA3GBAIcjs = require('../chunk-YNA3GBAI.cjs');
|
|
6
|
+
require('../chunk-LUAK6GQG.cjs');
|
|
8
7
|
require('../chunk-AHEA4IJV.cjs');
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.Toast = _chunk56CIU4EGcjs.Toast; exports.ToastProvider = _chunk56CIU4EGcjs.ToastProvider_default; exports.addToast = _chunk56CIU4EGcjs.addToast; exports.default = _chunk56CIU4EGcjs.Toast_default; exports.toastVariants = _chunk56CIU4EGcjs.toastVariants;
|
|
12
|
+
exports.Toaster = _chunkYNA3GBAIcjs.Toaster_default; exports.default = _chunkYNA3GBAIcjs.Toast_default2; exports.toast = _chunkYNA3GBAIcjs.Toast_default;
|
|
16
13
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Toast/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Toast/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Toast/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACF,yJAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/Toast/index.cjs"}
|
package/dist/Toast/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { t as toast } from '../Toaster-M8hrHJ-J.cjs';
|
|
2
|
+
export { a as ToastOptions, b as ToastRenderProps, T as Toaster, c as ToasterProps } from '../Toaster-M8hrHJ-J.cjs';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'sonner';
|
|
5
|
+
import '../Alert-BidIEsLA.cjs';
|
|
4
6
|
import 'react/jsx-runtime';
|
|
5
7
|
import 'tailwind-variants';
|
|
6
8
|
import '@fuf-stack/pixel-utils';
|
|
7
|
-
import 'react';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
export {
|
|
12
|
+
export { toast as default, toast };
|
package/dist/Toast/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { t as toast } from '../Toaster-DVX4ebm4.js';
|
|
2
|
+
export { a as ToastOptions, b as ToastRenderProps, T as Toaster, c as ToasterProps } from '../Toaster-DVX4ebm4.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'sonner';
|
|
5
|
+
import '../Alert-BidIEsLA.js';
|
|
4
6
|
import 'react/jsx-runtime';
|
|
5
7
|
import 'tailwind-variants';
|
|
6
8
|
import '@fuf-stack/pixel-utils';
|
|
7
|
-
import 'react';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
export {
|
|
12
|
+
export { toast as default, toast };
|
package/dist/Toast/index.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Toast,
|
|
3
|
-
ToastProvider_default,
|
|
4
2
|
Toast_default,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "../chunk-
|
|
3
|
+
Toast_default2,
|
|
4
|
+
Toaster_default
|
|
5
|
+
} from "../chunk-VEXCTG6K.js";
|
|
6
|
+
import "../chunk-PKG3L2TJ.js";
|
|
8
7
|
import "../chunk-OAIRL2FN.js";
|
|
9
8
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Toast_default as default,
|
|
14
|
-
toastVariants
|
|
9
|
+
Toaster_default as Toaster,
|
|
10
|
+
Toast_default2 as default,
|
|
11
|
+
Toast_default as toast
|
|
15
12
|
};
|
|
16
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ReactNode, ReactElement, ComponentProps } from 'react';
|
|
2
|
+
import { ExternalToast, Toaster as Toaster$1 } from 'sonner';
|
|
3
|
+
import { b as AlertProps } from './Alert-BidIEsLA.js';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
type AlertColor = NonNullable<AlertProps['color']>;
|
|
7
|
+
/** Props passed to a custom render function */
|
|
8
|
+
interface ToastRenderProps {
|
|
9
|
+
/** The toast message */
|
|
10
|
+
message: ReactNode;
|
|
11
|
+
/** The color/severity of the toast */
|
|
12
|
+
color: AlertColor;
|
|
13
|
+
/** Function to close the toast */
|
|
14
|
+
close: () => void;
|
|
15
|
+
/** Whether the toast can be closed by the user */
|
|
16
|
+
closable?: boolean;
|
|
17
|
+
/** Title displayed above the toast message */
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
/** Content displayed at the end of the toast */
|
|
20
|
+
endContent?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/** Options passed to each toast method */
|
|
23
|
+
interface ToastOptions {
|
|
24
|
+
/** Title displayed above the toast message */
|
|
25
|
+
title?: ReactNode;
|
|
26
|
+
/** Whether the toast can be closed by the user */
|
|
27
|
+
closable?: boolean;
|
|
28
|
+
/** Duration in milliseconds before the toast auto-closes */
|
|
29
|
+
duration?: number;
|
|
30
|
+
/** Position of the toast on the screen */
|
|
31
|
+
position?: ExternalToast['position'];
|
|
32
|
+
/** Callback fired when the toast auto-closes */
|
|
33
|
+
onAutoClose?: ExternalToast['onAutoClose'];
|
|
34
|
+
/** Callback fired when the toast is closed */
|
|
35
|
+
onClose?: ExternalToast['onDismiss'];
|
|
36
|
+
/** Content displayed at the end of the toast */
|
|
37
|
+
endContent?: ReactNode;
|
|
38
|
+
/** Custom render function to override the default AlertComponent */
|
|
39
|
+
render?: (props: ToastRenderProps) => ReactElement;
|
|
40
|
+
}
|
|
41
|
+
/** Toast object with convenience methods for different severity levels */
|
|
42
|
+
declare const toast: {
|
|
43
|
+
/**
|
|
44
|
+
* Show a default toast.
|
|
45
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
46
|
+
*/
|
|
47
|
+
default: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
48
|
+
/**
|
|
49
|
+
* Show an info toast.
|
|
50
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
51
|
+
*/
|
|
52
|
+
info: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
53
|
+
/**
|
|
54
|
+
* Show a warning toast.
|
|
55
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
56
|
+
*/
|
|
57
|
+
warn: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
58
|
+
/**
|
|
59
|
+
* Show a success toast.
|
|
60
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
61
|
+
*/
|
|
62
|
+
success: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
63
|
+
/**
|
|
64
|
+
* Show an error toast.
|
|
65
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
66
|
+
*/
|
|
67
|
+
error: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
68
|
+
/** Close a toast by its id */
|
|
69
|
+
close: (toastId: string | number) => void;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type ToasterProps = Pick<ComponentProps<typeof Toaster$1>, 'visibleToasts' | 'position'>;
|
|
73
|
+
declare const Toaster: (props: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
74
|
+
|
|
75
|
+
export { Toaster as T, type ToastOptions as a, type ToastRenderProps as b, type ToasterProps as c, toast as t };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ReactNode, ReactElement, ComponentProps } from 'react';
|
|
2
|
+
import { ExternalToast, Toaster as Toaster$1 } from 'sonner';
|
|
3
|
+
import { b as AlertProps } from './Alert-BidIEsLA.cjs';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
type AlertColor = NonNullable<AlertProps['color']>;
|
|
7
|
+
/** Props passed to a custom render function */
|
|
8
|
+
interface ToastRenderProps {
|
|
9
|
+
/** The toast message */
|
|
10
|
+
message: ReactNode;
|
|
11
|
+
/** The color/severity of the toast */
|
|
12
|
+
color: AlertColor;
|
|
13
|
+
/** Function to close the toast */
|
|
14
|
+
close: () => void;
|
|
15
|
+
/** Whether the toast can be closed by the user */
|
|
16
|
+
closable?: boolean;
|
|
17
|
+
/** Title displayed above the toast message */
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
/** Content displayed at the end of the toast */
|
|
20
|
+
endContent?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/** Options passed to each toast method */
|
|
23
|
+
interface ToastOptions {
|
|
24
|
+
/** Title displayed above the toast message */
|
|
25
|
+
title?: ReactNode;
|
|
26
|
+
/** Whether the toast can be closed by the user */
|
|
27
|
+
closable?: boolean;
|
|
28
|
+
/** Duration in milliseconds before the toast auto-closes */
|
|
29
|
+
duration?: number;
|
|
30
|
+
/** Position of the toast on the screen */
|
|
31
|
+
position?: ExternalToast['position'];
|
|
32
|
+
/** Callback fired when the toast auto-closes */
|
|
33
|
+
onAutoClose?: ExternalToast['onAutoClose'];
|
|
34
|
+
/** Callback fired when the toast is closed */
|
|
35
|
+
onClose?: ExternalToast['onDismiss'];
|
|
36
|
+
/** Content displayed at the end of the toast */
|
|
37
|
+
endContent?: ReactNode;
|
|
38
|
+
/** Custom render function to override the default AlertComponent */
|
|
39
|
+
render?: (props: ToastRenderProps) => ReactElement;
|
|
40
|
+
}
|
|
41
|
+
/** Toast object with convenience methods for different severity levels */
|
|
42
|
+
declare const toast: {
|
|
43
|
+
/**
|
|
44
|
+
* Show a default toast.
|
|
45
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
46
|
+
*/
|
|
47
|
+
default: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
48
|
+
/**
|
|
49
|
+
* Show an info toast.
|
|
50
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
51
|
+
*/
|
|
52
|
+
info: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
53
|
+
/**
|
|
54
|
+
* Show a warning toast.
|
|
55
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
56
|
+
*/
|
|
57
|
+
warn: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
58
|
+
/**
|
|
59
|
+
* Show a success toast.
|
|
60
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
61
|
+
*/
|
|
62
|
+
success: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
63
|
+
/**
|
|
64
|
+
* Show an error toast.
|
|
65
|
+
* @returns The toast id which can be passed to `toast.close()`
|
|
66
|
+
*/
|
|
67
|
+
error: (message: ReactNode, options?: ToastOptions) => string | number;
|
|
68
|
+
/** Close a toast by its id */
|
|
69
|
+
close: (toastId: string | number) => void;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type ToasterProps = Pick<ComponentProps<typeof Toaster$1>, 'visibleToasts' | 'position'>;
|
|
73
|
+
declare const Toaster: (props: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
74
|
+
|
|
75
|
+
export { Toaster as T, type ToastOptions as a, type ToastRenderProps as b, type ToasterProps as c, toast as t };
|