@fuf-stack/pixels 0.41.0 → 0.41.1
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/Toast/index.cjs +14 -0
- package/dist/Toast/index.cjs.map +1 -0
- package/dist/Toast/index.d.cts +11 -0
- package/dist/Toast/index.d.ts +11 -0
- package/dist/Toast/index.js +14 -0
- package/dist/Toast/index.js.map +1 -0
- package/dist/ToastProvider-CL1v-bkE.d.cts +295 -0
- package/dist/ToastProvider-CL1v-bkE.d.ts +295 -0
- package/dist/chunk-5XFAJUE5.cjs +170 -0
- package/dist/chunk-5XFAJUE5.cjs.map +1 -0
- package/dist/chunk-KSAL4SBX.js +170 -0
- package/dist/chunk-KSAL4SBX.js.map +1 -0
- package/dist/index.cjs +7 -160
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -295
- package/dist/index.d.ts +6 -295
- package/dist/index.js +6 -159
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk5XFAJUE5cjs = require('../chunk-5XFAJUE5.cjs');
|
|
7
|
+
require('../chunk-D4TLDLEX.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.ToastProvider = _chunk5XFAJUE5cjs.ToastProvider_default; exports.addToast = _chunk5XFAJUE5cjs.addToast; exports.default = _chunk5XFAJUE5cjs.Toast_default; exports.toastVariants = _chunk5XFAJUE5cjs.toastVariants;
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Toast/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,2NAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/Toast/index.cjs"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { T as ToastProvider } from '../ToastProvider-CL1v-bkE.cjs';
|
|
2
|
+
export { A as AddToastVariantProps, b as ToastProps, c as ToastProviderProps, a as addToast, t as toastVariants } from '../ToastProvider-CL1v-bkE.cjs';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants';
|
|
5
|
+
import 'tailwind-variants/dist/config.js';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
7
|
+
import 'react';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export { ToastProvider, ToastProvider as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { T as ToastProvider } from '../ToastProvider-CL1v-bkE.js';
|
|
2
|
+
export { A as AddToastVariantProps, b as ToastProps, c as ToastProviderProps, a as addToast, t as toastVariants } from '../ToastProvider-CL1v-bkE.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants';
|
|
5
|
+
import 'tailwind-variants/dist/config.js';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
7
|
+
import 'react';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export { ToastProvider, ToastProvider as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToastProvider_default,
|
|
3
|
+
Toast_default,
|
|
4
|
+
addToast,
|
|
5
|
+
toastVariants
|
|
6
|
+
} from "../chunk-KSAL4SBX.js";
|
|
7
|
+
import "../chunk-J7N2552D.js";
|
|
8
|
+
export {
|
|
9
|
+
ToastProvider_default as ToastProvider,
|
|
10
|
+
addToast,
|
|
11
|
+
Toast_default as default,
|
|
12
|
+
toastVariants
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
|
|
7
|
+
declare const toastVariants: tailwind_variants.TVReturnType<{
|
|
8
|
+
color: {
|
|
9
|
+
default: string;
|
|
10
|
+
foreground: {
|
|
11
|
+
progressIndicator: string;
|
|
12
|
+
};
|
|
13
|
+
primary: {
|
|
14
|
+
progressIndicator: string;
|
|
15
|
+
};
|
|
16
|
+
secondary: {
|
|
17
|
+
progressIndicator: string;
|
|
18
|
+
};
|
|
19
|
+
success: {
|
|
20
|
+
progressIndicator: string;
|
|
21
|
+
};
|
|
22
|
+
warning: {
|
|
23
|
+
progressIndicator: string;
|
|
24
|
+
};
|
|
25
|
+
danger: {
|
|
26
|
+
progressIndicator: string;
|
|
27
|
+
};
|
|
28
|
+
info: {};
|
|
29
|
+
};
|
|
30
|
+
variant: {
|
|
31
|
+
flat: string;
|
|
32
|
+
solid: string;
|
|
33
|
+
bordered: string;
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
base: string;
|
|
37
|
+
title: string;
|
|
38
|
+
description: string;
|
|
39
|
+
icon: string;
|
|
40
|
+
loadingIcon: string;
|
|
41
|
+
content: string;
|
|
42
|
+
motionDiv: string;
|
|
43
|
+
progressTrack: string;
|
|
44
|
+
progressIndicator: string;
|
|
45
|
+
closeButton: string;
|
|
46
|
+
closeIcon: string;
|
|
47
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
48
|
+
color: {
|
|
49
|
+
default: string;
|
|
50
|
+
foreground: {
|
|
51
|
+
progressIndicator: string;
|
|
52
|
+
};
|
|
53
|
+
primary: {
|
|
54
|
+
progressIndicator: string;
|
|
55
|
+
};
|
|
56
|
+
secondary: {
|
|
57
|
+
progressIndicator: string;
|
|
58
|
+
};
|
|
59
|
+
success: {
|
|
60
|
+
progressIndicator: string;
|
|
61
|
+
};
|
|
62
|
+
warning: {
|
|
63
|
+
progressIndicator: string;
|
|
64
|
+
};
|
|
65
|
+
danger: {
|
|
66
|
+
progressIndicator: string;
|
|
67
|
+
};
|
|
68
|
+
info: {};
|
|
69
|
+
};
|
|
70
|
+
variant: {
|
|
71
|
+
flat: string;
|
|
72
|
+
solid: string;
|
|
73
|
+
bordered: string;
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
color: {
|
|
77
|
+
default: string;
|
|
78
|
+
foreground: {
|
|
79
|
+
progressIndicator: string;
|
|
80
|
+
};
|
|
81
|
+
primary: {
|
|
82
|
+
progressIndicator: string;
|
|
83
|
+
};
|
|
84
|
+
secondary: {
|
|
85
|
+
progressIndicator: string;
|
|
86
|
+
};
|
|
87
|
+
success: {
|
|
88
|
+
progressIndicator: string;
|
|
89
|
+
};
|
|
90
|
+
warning: {
|
|
91
|
+
progressIndicator: string;
|
|
92
|
+
};
|
|
93
|
+
danger: {
|
|
94
|
+
progressIndicator: string;
|
|
95
|
+
};
|
|
96
|
+
info: {};
|
|
97
|
+
};
|
|
98
|
+
variant: {
|
|
99
|
+
flat: string;
|
|
100
|
+
solid: string;
|
|
101
|
+
bordered: string;
|
|
102
|
+
};
|
|
103
|
+
}>, {
|
|
104
|
+
color: {
|
|
105
|
+
default: string;
|
|
106
|
+
foreground: {
|
|
107
|
+
progressIndicator: string;
|
|
108
|
+
};
|
|
109
|
+
primary: {
|
|
110
|
+
progressIndicator: string;
|
|
111
|
+
};
|
|
112
|
+
secondary: {
|
|
113
|
+
progressIndicator: string;
|
|
114
|
+
};
|
|
115
|
+
success: {
|
|
116
|
+
progressIndicator: string;
|
|
117
|
+
};
|
|
118
|
+
warning: {
|
|
119
|
+
progressIndicator: string;
|
|
120
|
+
};
|
|
121
|
+
danger: {
|
|
122
|
+
progressIndicator: string;
|
|
123
|
+
};
|
|
124
|
+
info: {};
|
|
125
|
+
};
|
|
126
|
+
variant: {
|
|
127
|
+
flat: string;
|
|
128
|
+
solid: string;
|
|
129
|
+
bordered: string;
|
|
130
|
+
};
|
|
131
|
+
}, {
|
|
132
|
+
base: string;
|
|
133
|
+
title: string;
|
|
134
|
+
description: string;
|
|
135
|
+
icon: string;
|
|
136
|
+
loadingIcon: string;
|
|
137
|
+
content: string;
|
|
138
|
+
motionDiv: string;
|
|
139
|
+
progressTrack: string;
|
|
140
|
+
progressIndicator: string;
|
|
141
|
+
closeButton: string;
|
|
142
|
+
closeIcon: string;
|
|
143
|
+
}, tailwind_variants.TVReturnType<{
|
|
144
|
+
color: {
|
|
145
|
+
default: string;
|
|
146
|
+
foreground: {
|
|
147
|
+
progressIndicator: string;
|
|
148
|
+
};
|
|
149
|
+
primary: {
|
|
150
|
+
progressIndicator: string;
|
|
151
|
+
};
|
|
152
|
+
secondary: {
|
|
153
|
+
progressIndicator: string;
|
|
154
|
+
};
|
|
155
|
+
success: {
|
|
156
|
+
progressIndicator: string;
|
|
157
|
+
};
|
|
158
|
+
warning: {
|
|
159
|
+
progressIndicator: string;
|
|
160
|
+
};
|
|
161
|
+
danger: {
|
|
162
|
+
progressIndicator: string;
|
|
163
|
+
};
|
|
164
|
+
info: {};
|
|
165
|
+
};
|
|
166
|
+
variant: {
|
|
167
|
+
flat: string;
|
|
168
|
+
solid: string;
|
|
169
|
+
bordered: string;
|
|
170
|
+
};
|
|
171
|
+
}, {
|
|
172
|
+
base: string;
|
|
173
|
+
title: string;
|
|
174
|
+
description: string;
|
|
175
|
+
icon: string;
|
|
176
|
+
loadingIcon: string;
|
|
177
|
+
content: string;
|
|
178
|
+
motionDiv: string;
|
|
179
|
+
progressTrack: string;
|
|
180
|
+
progressIndicator: string;
|
|
181
|
+
closeButton: string;
|
|
182
|
+
closeIcon: string;
|
|
183
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
184
|
+
color: {
|
|
185
|
+
default: string;
|
|
186
|
+
foreground: {
|
|
187
|
+
progressIndicator: string;
|
|
188
|
+
};
|
|
189
|
+
primary: {
|
|
190
|
+
progressIndicator: string;
|
|
191
|
+
};
|
|
192
|
+
secondary: {
|
|
193
|
+
progressIndicator: string;
|
|
194
|
+
};
|
|
195
|
+
success: {
|
|
196
|
+
progressIndicator: string;
|
|
197
|
+
};
|
|
198
|
+
warning: {
|
|
199
|
+
progressIndicator: string;
|
|
200
|
+
};
|
|
201
|
+
danger: {
|
|
202
|
+
progressIndicator: string;
|
|
203
|
+
};
|
|
204
|
+
info: {};
|
|
205
|
+
};
|
|
206
|
+
variant: {
|
|
207
|
+
flat: string;
|
|
208
|
+
solid: string;
|
|
209
|
+
bordered: string;
|
|
210
|
+
};
|
|
211
|
+
}, {
|
|
212
|
+
color: {
|
|
213
|
+
default: string;
|
|
214
|
+
foreground: {
|
|
215
|
+
progressIndicator: string;
|
|
216
|
+
};
|
|
217
|
+
primary: {
|
|
218
|
+
progressIndicator: string;
|
|
219
|
+
};
|
|
220
|
+
secondary: {
|
|
221
|
+
progressIndicator: string;
|
|
222
|
+
};
|
|
223
|
+
success: {
|
|
224
|
+
progressIndicator: string;
|
|
225
|
+
};
|
|
226
|
+
warning: {
|
|
227
|
+
progressIndicator: string;
|
|
228
|
+
};
|
|
229
|
+
danger: {
|
|
230
|
+
progressIndicator: string;
|
|
231
|
+
};
|
|
232
|
+
info: {};
|
|
233
|
+
};
|
|
234
|
+
variant: {
|
|
235
|
+
flat: string;
|
|
236
|
+
solid: string;
|
|
237
|
+
bordered: string;
|
|
238
|
+
};
|
|
239
|
+
}>, unknown, unknown, undefined>>;
|
|
240
|
+
type AddToastVariantProps = TVProps<typeof toastVariants>;
|
|
241
|
+
type ClassName = TVClassName<typeof toastVariants>;
|
|
242
|
+
interface ToastProps extends AddToastVariantProps {
|
|
243
|
+
/** CSS class name */
|
|
244
|
+
className?: ClassName;
|
|
245
|
+
/** Icon displayed at the end of the Alert */
|
|
246
|
+
closeIcon?: ReactNode;
|
|
247
|
+
/** Color of the alert */
|
|
248
|
+
color?: AddToastVariantProps['color'];
|
|
249
|
+
/** Content displayed inside the Alert */
|
|
250
|
+
description?: ReactNode;
|
|
251
|
+
/** Content displayed at the end of the Alert */
|
|
252
|
+
endContent?: ReactNode;
|
|
253
|
+
/** Icon displayed at the start of the Alert */
|
|
254
|
+
icon?: ReactNode;
|
|
255
|
+
/** Icon or animation displayed until promise is resolved */
|
|
256
|
+
loadingIcon?: ReactNode;
|
|
257
|
+
/** Callback function called when the toast is closed */
|
|
258
|
+
onClose?: () => void;
|
|
259
|
+
/** Promise based on which the notification will be styled */
|
|
260
|
+
promise?: Promise<void>;
|
|
261
|
+
/** Whether the toast should show a progress bar */
|
|
262
|
+
shouldShowTimeoutProgress?: boolean;
|
|
263
|
+
/** Whether the toast should show a close button */
|
|
264
|
+
showCloseButton?: boolean;
|
|
265
|
+
/** Whether the toast should show an icon */
|
|
266
|
+
showIcon?: boolean;
|
|
267
|
+
/** Time the toast is displayed */
|
|
268
|
+
timeout?: number;
|
|
269
|
+
/** Content displayed at the top of the toast */
|
|
270
|
+
title?: ReactNode;
|
|
271
|
+
/** Variant of the toast */
|
|
272
|
+
variant?: AddToastVariantProps['variant'];
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
|
|
276
|
+
*/
|
|
277
|
+
declare const addToast: ({ className, closeIcon, color, description, endContent, icon, loadingIcon, onClose, promise, shouldShowTimeoutProgress, showCloseButton, showIcon, timeout, title, variant, }: ToastProps) => void;
|
|
278
|
+
|
|
279
|
+
type ToastProviderToastProps = Omit<ToastProps, 'description' | 'endContent' | 'title'>;
|
|
280
|
+
interface ToastProviderProps {
|
|
281
|
+
disableAnimation?: boolean;
|
|
282
|
+
maxVisibleToasts?: number;
|
|
283
|
+
placement?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
|
|
284
|
+
toastProps?: ToastProviderToastProps;
|
|
285
|
+
toastOffset?: number;
|
|
286
|
+
regionProps?: {
|
|
287
|
+
classNames?: Record<'base', string>;
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* ToastProvider component based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
|
|
292
|
+
*/
|
|
293
|
+
declare const ToastProvider: ({ disableAnimation, maxVisibleToasts, placement, toastProps, toastOffset, regionProps, }: ToastProviderProps) => react_jsx_runtime.JSX.Element;
|
|
294
|
+
|
|
295
|
+
export { type AddToastVariantProps as A, ToastProvider as T, addToast as a, type ToastProps as b, type ToastProviderProps as c, toastVariants as t };
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
|
|
7
|
+
declare const toastVariants: tailwind_variants.TVReturnType<{
|
|
8
|
+
color: {
|
|
9
|
+
default: string;
|
|
10
|
+
foreground: {
|
|
11
|
+
progressIndicator: string;
|
|
12
|
+
};
|
|
13
|
+
primary: {
|
|
14
|
+
progressIndicator: string;
|
|
15
|
+
};
|
|
16
|
+
secondary: {
|
|
17
|
+
progressIndicator: string;
|
|
18
|
+
};
|
|
19
|
+
success: {
|
|
20
|
+
progressIndicator: string;
|
|
21
|
+
};
|
|
22
|
+
warning: {
|
|
23
|
+
progressIndicator: string;
|
|
24
|
+
};
|
|
25
|
+
danger: {
|
|
26
|
+
progressIndicator: string;
|
|
27
|
+
};
|
|
28
|
+
info: {};
|
|
29
|
+
};
|
|
30
|
+
variant: {
|
|
31
|
+
flat: string;
|
|
32
|
+
solid: string;
|
|
33
|
+
bordered: string;
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
base: string;
|
|
37
|
+
title: string;
|
|
38
|
+
description: string;
|
|
39
|
+
icon: string;
|
|
40
|
+
loadingIcon: string;
|
|
41
|
+
content: string;
|
|
42
|
+
motionDiv: string;
|
|
43
|
+
progressTrack: string;
|
|
44
|
+
progressIndicator: string;
|
|
45
|
+
closeButton: string;
|
|
46
|
+
closeIcon: string;
|
|
47
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
48
|
+
color: {
|
|
49
|
+
default: string;
|
|
50
|
+
foreground: {
|
|
51
|
+
progressIndicator: string;
|
|
52
|
+
};
|
|
53
|
+
primary: {
|
|
54
|
+
progressIndicator: string;
|
|
55
|
+
};
|
|
56
|
+
secondary: {
|
|
57
|
+
progressIndicator: string;
|
|
58
|
+
};
|
|
59
|
+
success: {
|
|
60
|
+
progressIndicator: string;
|
|
61
|
+
};
|
|
62
|
+
warning: {
|
|
63
|
+
progressIndicator: string;
|
|
64
|
+
};
|
|
65
|
+
danger: {
|
|
66
|
+
progressIndicator: string;
|
|
67
|
+
};
|
|
68
|
+
info: {};
|
|
69
|
+
};
|
|
70
|
+
variant: {
|
|
71
|
+
flat: string;
|
|
72
|
+
solid: string;
|
|
73
|
+
bordered: string;
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
color: {
|
|
77
|
+
default: string;
|
|
78
|
+
foreground: {
|
|
79
|
+
progressIndicator: string;
|
|
80
|
+
};
|
|
81
|
+
primary: {
|
|
82
|
+
progressIndicator: string;
|
|
83
|
+
};
|
|
84
|
+
secondary: {
|
|
85
|
+
progressIndicator: string;
|
|
86
|
+
};
|
|
87
|
+
success: {
|
|
88
|
+
progressIndicator: string;
|
|
89
|
+
};
|
|
90
|
+
warning: {
|
|
91
|
+
progressIndicator: string;
|
|
92
|
+
};
|
|
93
|
+
danger: {
|
|
94
|
+
progressIndicator: string;
|
|
95
|
+
};
|
|
96
|
+
info: {};
|
|
97
|
+
};
|
|
98
|
+
variant: {
|
|
99
|
+
flat: string;
|
|
100
|
+
solid: string;
|
|
101
|
+
bordered: string;
|
|
102
|
+
};
|
|
103
|
+
}>, {
|
|
104
|
+
color: {
|
|
105
|
+
default: string;
|
|
106
|
+
foreground: {
|
|
107
|
+
progressIndicator: string;
|
|
108
|
+
};
|
|
109
|
+
primary: {
|
|
110
|
+
progressIndicator: string;
|
|
111
|
+
};
|
|
112
|
+
secondary: {
|
|
113
|
+
progressIndicator: string;
|
|
114
|
+
};
|
|
115
|
+
success: {
|
|
116
|
+
progressIndicator: string;
|
|
117
|
+
};
|
|
118
|
+
warning: {
|
|
119
|
+
progressIndicator: string;
|
|
120
|
+
};
|
|
121
|
+
danger: {
|
|
122
|
+
progressIndicator: string;
|
|
123
|
+
};
|
|
124
|
+
info: {};
|
|
125
|
+
};
|
|
126
|
+
variant: {
|
|
127
|
+
flat: string;
|
|
128
|
+
solid: string;
|
|
129
|
+
bordered: string;
|
|
130
|
+
};
|
|
131
|
+
}, {
|
|
132
|
+
base: string;
|
|
133
|
+
title: string;
|
|
134
|
+
description: string;
|
|
135
|
+
icon: string;
|
|
136
|
+
loadingIcon: string;
|
|
137
|
+
content: string;
|
|
138
|
+
motionDiv: string;
|
|
139
|
+
progressTrack: string;
|
|
140
|
+
progressIndicator: string;
|
|
141
|
+
closeButton: string;
|
|
142
|
+
closeIcon: string;
|
|
143
|
+
}, tailwind_variants.TVReturnType<{
|
|
144
|
+
color: {
|
|
145
|
+
default: string;
|
|
146
|
+
foreground: {
|
|
147
|
+
progressIndicator: string;
|
|
148
|
+
};
|
|
149
|
+
primary: {
|
|
150
|
+
progressIndicator: string;
|
|
151
|
+
};
|
|
152
|
+
secondary: {
|
|
153
|
+
progressIndicator: string;
|
|
154
|
+
};
|
|
155
|
+
success: {
|
|
156
|
+
progressIndicator: string;
|
|
157
|
+
};
|
|
158
|
+
warning: {
|
|
159
|
+
progressIndicator: string;
|
|
160
|
+
};
|
|
161
|
+
danger: {
|
|
162
|
+
progressIndicator: string;
|
|
163
|
+
};
|
|
164
|
+
info: {};
|
|
165
|
+
};
|
|
166
|
+
variant: {
|
|
167
|
+
flat: string;
|
|
168
|
+
solid: string;
|
|
169
|
+
bordered: string;
|
|
170
|
+
};
|
|
171
|
+
}, {
|
|
172
|
+
base: string;
|
|
173
|
+
title: string;
|
|
174
|
+
description: string;
|
|
175
|
+
icon: string;
|
|
176
|
+
loadingIcon: string;
|
|
177
|
+
content: string;
|
|
178
|
+
motionDiv: string;
|
|
179
|
+
progressTrack: string;
|
|
180
|
+
progressIndicator: string;
|
|
181
|
+
closeButton: string;
|
|
182
|
+
closeIcon: string;
|
|
183
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
184
|
+
color: {
|
|
185
|
+
default: string;
|
|
186
|
+
foreground: {
|
|
187
|
+
progressIndicator: string;
|
|
188
|
+
};
|
|
189
|
+
primary: {
|
|
190
|
+
progressIndicator: string;
|
|
191
|
+
};
|
|
192
|
+
secondary: {
|
|
193
|
+
progressIndicator: string;
|
|
194
|
+
};
|
|
195
|
+
success: {
|
|
196
|
+
progressIndicator: string;
|
|
197
|
+
};
|
|
198
|
+
warning: {
|
|
199
|
+
progressIndicator: string;
|
|
200
|
+
};
|
|
201
|
+
danger: {
|
|
202
|
+
progressIndicator: string;
|
|
203
|
+
};
|
|
204
|
+
info: {};
|
|
205
|
+
};
|
|
206
|
+
variant: {
|
|
207
|
+
flat: string;
|
|
208
|
+
solid: string;
|
|
209
|
+
bordered: string;
|
|
210
|
+
};
|
|
211
|
+
}, {
|
|
212
|
+
color: {
|
|
213
|
+
default: string;
|
|
214
|
+
foreground: {
|
|
215
|
+
progressIndicator: string;
|
|
216
|
+
};
|
|
217
|
+
primary: {
|
|
218
|
+
progressIndicator: string;
|
|
219
|
+
};
|
|
220
|
+
secondary: {
|
|
221
|
+
progressIndicator: string;
|
|
222
|
+
};
|
|
223
|
+
success: {
|
|
224
|
+
progressIndicator: string;
|
|
225
|
+
};
|
|
226
|
+
warning: {
|
|
227
|
+
progressIndicator: string;
|
|
228
|
+
};
|
|
229
|
+
danger: {
|
|
230
|
+
progressIndicator: string;
|
|
231
|
+
};
|
|
232
|
+
info: {};
|
|
233
|
+
};
|
|
234
|
+
variant: {
|
|
235
|
+
flat: string;
|
|
236
|
+
solid: string;
|
|
237
|
+
bordered: string;
|
|
238
|
+
};
|
|
239
|
+
}>, unknown, unknown, undefined>>;
|
|
240
|
+
type AddToastVariantProps = TVProps<typeof toastVariants>;
|
|
241
|
+
type ClassName = TVClassName<typeof toastVariants>;
|
|
242
|
+
interface ToastProps extends AddToastVariantProps {
|
|
243
|
+
/** CSS class name */
|
|
244
|
+
className?: ClassName;
|
|
245
|
+
/** Icon displayed at the end of the Alert */
|
|
246
|
+
closeIcon?: ReactNode;
|
|
247
|
+
/** Color of the alert */
|
|
248
|
+
color?: AddToastVariantProps['color'];
|
|
249
|
+
/** Content displayed inside the Alert */
|
|
250
|
+
description?: ReactNode;
|
|
251
|
+
/** Content displayed at the end of the Alert */
|
|
252
|
+
endContent?: ReactNode;
|
|
253
|
+
/** Icon displayed at the start of the Alert */
|
|
254
|
+
icon?: ReactNode;
|
|
255
|
+
/** Icon or animation displayed until promise is resolved */
|
|
256
|
+
loadingIcon?: ReactNode;
|
|
257
|
+
/** Callback function called when the toast is closed */
|
|
258
|
+
onClose?: () => void;
|
|
259
|
+
/** Promise based on which the notification will be styled */
|
|
260
|
+
promise?: Promise<void>;
|
|
261
|
+
/** Whether the toast should show a progress bar */
|
|
262
|
+
shouldShowTimeoutProgress?: boolean;
|
|
263
|
+
/** Whether the toast should show a close button */
|
|
264
|
+
showCloseButton?: boolean;
|
|
265
|
+
/** Whether the toast should show an icon */
|
|
266
|
+
showIcon?: boolean;
|
|
267
|
+
/** Time the toast is displayed */
|
|
268
|
+
timeout?: number;
|
|
269
|
+
/** Content displayed at the top of the toast */
|
|
270
|
+
title?: ReactNode;
|
|
271
|
+
/** Variant of the toast */
|
|
272
|
+
variant?: AddToastVariantProps['variant'];
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
|
|
276
|
+
*/
|
|
277
|
+
declare const addToast: ({ className, closeIcon, color, description, endContent, icon, loadingIcon, onClose, promise, shouldShowTimeoutProgress, showCloseButton, showIcon, timeout, title, variant, }: ToastProps) => void;
|
|
278
|
+
|
|
279
|
+
type ToastProviderToastProps = Omit<ToastProps, 'description' | 'endContent' | 'title'>;
|
|
280
|
+
interface ToastProviderProps {
|
|
281
|
+
disableAnimation?: boolean;
|
|
282
|
+
maxVisibleToasts?: number;
|
|
283
|
+
placement?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
|
|
284
|
+
toastProps?: ToastProviderToastProps;
|
|
285
|
+
toastOffset?: number;
|
|
286
|
+
regionProps?: {
|
|
287
|
+
classNames?: Record<'base', string>;
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* ToastProvider component based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
|
|
292
|
+
*/
|
|
293
|
+
declare const ToastProvider: ({ disableAnimation, maxVisibleToasts, placement, toastProps, toastOffset, regionProps, }: ToastProviderProps) => react_jsx_runtime.JSX.Element;
|
|
294
|
+
|
|
295
|
+
export { type AddToastVariantProps as A, ToastProvider as T, addToast as a, type ToastProps as b, type ToastProviderProps as c, toastVariants as t };
|