@fuf-stack/pixels 0.40.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.
Files changed (78) hide show
  1. package/dist/Avatar/index.d.cts +2 -2
  2. package/dist/Avatar/index.d.ts +2 -2
  3. package/dist/AvatarGroup/index.d.cts +3 -3
  4. package/dist/AvatarGroup/index.d.ts +3 -3
  5. package/dist/{AvatarGroup-BMKOfE_a.d.ts → AvatarGroup-BfOtqfJy.d.ts} +1 -1
  6. package/dist/{AvatarGroup-2Lmu_V2d.d.cts → AvatarGroup-CUyQwK3t.d.cts} +1 -1
  7. package/dist/Button/index.cjs +2 -2
  8. package/dist/Button/index.js +1 -1
  9. package/dist/Drawer/index.d.cts +2 -2
  10. package/dist/Drawer/index.d.ts +2 -2
  11. package/dist/Json/index.cjs +3 -3
  12. package/dist/Json/index.js +2 -2
  13. package/dist/Progress/index.cjs +5 -82
  14. package/dist/Progress/index.cjs.map +1 -1
  15. package/dist/Progress/index.d.cts +9 -222
  16. package/dist/Progress/index.d.ts +9 -222
  17. package/dist/Progress/index.js +5 -82
  18. package/dist/Progress/index.js.map +1 -1
  19. package/dist/Progress-7yXUVioO.d.cts +228 -0
  20. package/dist/Progress-7yXUVioO.d.ts +228 -0
  21. package/dist/ProgressCircular/index.cjs +12 -0
  22. package/dist/ProgressCircular/index.cjs.map +1 -0
  23. package/dist/ProgressCircular/index.d.cts +11 -0
  24. package/dist/ProgressCircular/index.d.ts +11 -0
  25. package/dist/ProgressCircular/index.js +12 -0
  26. package/dist/ProgressCircular-U4kPZ1T1.d.cts +414 -0
  27. package/dist/ProgressCircular-U4kPZ1T1.d.ts +414 -0
  28. package/dist/Toast/index.cjs +14 -0
  29. package/dist/Toast/index.cjs.map +1 -0
  30. package/dist/Toast/index.d.cts +11 -0
  31. package/dist/Toast/index.d.ts +11 -0
  32. package/dist/Toast/index.js +14 -0
  33. package/dist/Toast/index.js.map +1 -0
  34. package/dist/ToastProvider-CL1v-bkE.d.cts +295 -0
  35. package/dist/ToastProvider-CL1v-bkE.d.ts +295 -0
  36. package/dist/chunk-5XFAJUE5.cjs +170 -0
  37. package/dist/chunk-5XFAJUE5.cjs.map +1 -0
  38. package/dist/{chunk-HHCDSQ6N.cjs → chunk-FLPLJTAC.cjs} +2 -2
  39. package/dist/{chunk-HHCDSQ6N.cjs.map → chunk-FLPLJTAC.cjs.map} +1 -1
  40. package/dist/chunk-GJQTAEHH.js +113 -0
  41. package/dist/chunk-GJQTAEHH.js.map +1 -0
  42. package/dist/{chunk-374SO74F.cjs → chunk-J63YGHTG.cjs} +3 -3
  43. package/dist/{chunk-374SO74F.cjs.map → chunk-J63YGHTG.cjs.map} +1 -1
  44. package/dist/chunk-KSAL4SBX.js +170 -0
  45. package/dist/chunk-KSAL4SBX.js.map +1 -0
  46. package/dist/{chunk-Q5DUSUCZ.js → chunk-MAKWBTTW.js} +2 -2
  47. package/dist/{chunk-Q5DUSUCZ.js.map → chunk-MAKWBTTW.js.map} +1 -1
  48. package/dist/chunk-RV7YPQXI.js +95 -0
  49. package/dist/chunk-RV7YPQXI.js.map +1 -0
  50. package/dist/chunk-VGXW3PSF.cjs +95 -0
  51. package/dist/chunk-VGXW3PSF.cjs.map +1 -0
  52. package/dist/{chunk-L3DEBOPG.js → chunk-VRPX6QUG.js} +2 -2
  53. package/dist/chunk-WCRVH4DS.cjs +113 -0
  54. package/dist/chunk-WCRVH4DS.cjs.map +1 -0
  55. package/dist/index.cjs +19 -170
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.cts +11 -299
  58. package/dist/index.d.ts +11 -299
  59. package/dist/index.js +23 -174
  60. package/dist/index.js.map +1 -1
  61. package/package.json +32 -27
  62. package/dist/CircularProgress/index.cjs +0 -14
  63. package/dist/CircularProgress/index.cjs.map +0 -1
  64. package/dist/CircularProgress/index.d.cts +0 -11
  65. package/dist/CircularProgress/index.d.ts +0 -11
  66. package/dist/CircularProgress/index.js +0 -14
  67. package/dist/CircularProgress-DHrnT6wz.d.cts +0 -182
  68. package/dist/CircularProgress-DHrnT6wz.d.ts +0 -182
  69. package/dist/chunk-37WQ3CBA.cjs +0 -98
  70. package/dist/chunk-37WQ3CBA.cjs.map +0 -1
  71. package/dist/chunk-M3PL6G7W.js +0 -98
  72. package/dist/chunk-M3PL6G7W.js.map +0 -1
  73. package/dist/{Avatar-B8lVnLpp.d.cts → Avatar-ylNJ_-dY.d.cts} +5 -5
  74. package/dist/{Avatar-B8lVnLpp.d.ts → Avatar-ylNJ_-dY.d.ts} +5 -5
  75. package/dist/{Drawer-DmwcvuKe.d.cts → Drawer-BnV9qxPA.d.cts} +5 -5
  76. package/dist/{Drawer-DmwcvuKe.d.ts → Drawer-BnV9qxPA.d.ts} +5 -5
  77. /package/dist/{CircularProgress → ProgressCircular}/index.js.map +0 -0
  78. /package/dist/{chunk-L3DEBOPG.js.map → chunk-VRPX6QUG.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,30 +1,32 @@
1
1
  export { A as Accordion, c as AccordionItemProps, b as AccordionProps, a as accordionVariants } from './Accordion-rA715N0Z.js';
2
2
  export { A as Alert, b as AlertProps, a as alertVariants } from './Alert-DELD9ZWe.js';
3
- export { A as Avatar, a as AvatarProps } from './Avatar-B8lVnLpp.js';
4
- export { A as AvatarGroup, a as AvatarGroupProps } from './AvatarGroup-BMKOfE_a.js';
3
+ export { A as Avatar, a as AvatarProps } from './Avatar-ylNJ_-dY.js';
4
+ export { A as AvatarGroup, a as AvatarGroupProps } from './AvatarGroup-BfOtqfJy.js';
5
5
  export { A as Badge, B as BadgeProps } from './Badge-CvXzljaJ.js';
6
6
  export { B as Breadcrumb, c as BreadcrumbItemProps, a as BreadcrumbProps, b as breadcrumbVariants } from './Breadcrumb-1cB54eJk.js';
7
7
  export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-Bm0yKM7X.js';
8
8
  export { B as ButtonGroup } from './ButtonGroup-CUxpALRo.js';
9
9
  export { C as Card, a as CardProps, c as cardVariants } from './Card-BdciRqJz.js';
10
- export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-DmwcvuKe.js';
10
+ export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-BnV9qxPA.js';
11
11
  export { J as Json, a as JsonProps } from './Json-Dny90Wml.js';
12
12
  export { L as Label, a as LabelProps, l as labelVariants } from './Label-Bp9WZiDB.js';
13
13
  export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-DYi8oagz.js';
14
14
  export { M as Modal, a as ModalProps, m as modalVariants } from './Modal-DI5ZdS_3.js';
15
15
  export { _ as Popover, P as PopoverProps } from './Popover-DcZ3qt-u.js';
16
- export { C as CircularProgress, b as CircularProgressProps, d as CircularProgressStyleVariant, V as CircularProgressVariantProps, a as circularProgressStyleVariantOptions, c as circularProgressVariants } from './CircularProgress-DHrnT6wz.js';
16
+ export { P as ProgressCircular, a as ProgressCircularProps, p as progressCircularVariants } from './ProgressCircular-U4kPZ1T1.js';
17
+ export { P as Progress, a as ProgressProps, p as progressVariants } from './Progress-7yXUVioO.js';
17
18
  export { T as Table, c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from './Table-D19f5nrd.js';
18
19
  export { b as TabProps, T as Tabs, a as TabsProps, t as tabsVariants } from './Tabs-xUYwXMX9.js';
19
- import * as tailwind_variants from 'tailwind-variants';
20
- import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
21
- import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
22
- import { ReactNode } from 'react';
23
- import * as react_jsx_runtime from 'react/jsx-runtime';
20
+ export { A as AddToastVariantProps, b as ToastProps, T as ToastProvider, c as ToastProviderProps, a as addToast, t as toastVariants } from './ToastProvider-CL1v-bkE.js';
24
21
  export { T as Tooltip, b as TooltipPlacement, a as TooltipProps } from './Tooltip-Bu71AKvn.js';
25
22
  export { useDebounce, useLocalStorage } from './hooks/index.js';
26
23
  export { ButtonGroupProps } from '@heroui/button';
24
+ import 'react/jsx-runtime';
25
+ import 'tailwind-variants';
26
+ import 'tailwind-variants/dist/config.js';
27
+ import '@fuf-stack/pixel-utils';
27
28
  import '@heroui/divider';
29
+ import 'react';
28
30
  import '@heroui/badge';
29
31
  import '@heroui/system';
30
32
  import '@heroui/drawer';
@@ -33,293 +35,3 @@ import '@heroui/dropdown';
33
35
  import '@heroui/modal';
34
36
  import '@heroui/popover';
35
37
  import '@heroui/tooltip';
36
-
37
- declare const toastVariants: tailwind_variants.TVReturnType<{
38
- color: {
39
- default: string;
40
- foreground: {
41
- progressIndicator: string;
42
- };
43
- primary: {
44
- progressIndicator: string;
45
- };
46
- secondary: {
47
- progressIndicator: string;
48
- };
49
- success: {
50
- progressIndicator: string;
51
- };
52
- warning: {
53
- progressIndicator: string;
54
- };
55
- danger: {
56
- progressIndicator: string;
57
- };
58
- info: {};
59
- };
60
- variant: {
61
- flat: string;
62
- solid: string;
63
- bordered: string;
64
- };
65
- }, {
66
- base: string;
67
- title: string;
68
- description: string;
69
- icon: string;
70
- loadingIcon: string;
71
- content: string;
72
- motionDiv: string;
73
- progressTrack: string;
74
- progressIndicator: string;
75
- closeButton: string;
76
- closeIcon: string;
77
- }, undefined, tailwind_variants_dist_config_js.TVConfig<{
78
- color: {
79
- default: string;
80
- foreground: {
81
- progressIndicator: string;
82
- };
83
- primary: {
84
- progressIndicator: string;
85
- };
86
- secondary: {
87
- progressIndicator: string;
88
- };
89
- success: {
90
- progressIndicator: string;
91
- };
92
- warning: {
93
- progressIndicator: string;
94
- };
95
- danger: {
96
- progressIndicator: string;
97
- };
98
- info: {};
99
- };
100
- variant: {
101
- flat: string;
102
- solid: string;
103
- bordered: string;
104
- };
105
- }, {
106
- color: {
107
- default: string;
108
- foreground: {
109
- progressIndicator: string;
110
- };
111
- primary: {
112
- progressIndicator: string;
113
- };
114
- secondary: {
115
- progressIndicator: string;
116
- };
117
- success: {
118
- progressIndicator: string;
119
- };
120
- warning: {
121
- progressIndicator: string;
122
- };
123
- danger: {
124
- progressIndicator: string;
125
- };
126
- info: {};
127
- };
128
- variant: {
129
- flat: string;
130
- solid: string;
131
- bordered: string;
132
- };
133
- }>, {
134
- color: {
135
- default: string;
136
- foreground: {
137
- progressIndicator: string;
138
- };
139
- primary: {
140
- progressIndicator: string;
141
- };
142
- secondary: {
143
- progressIndicator: string;
144
- };
145
- success: {
146
- progressIndicator: string;
147
- };
148
- warning: {
149
- progressIndicator: string;
150
- };
151
- danger: {
152
- progressIndicator: string;
153
- };
154
- info: {};
155
- };
156
- variant: {
157
- flat: string;
158
- solid: string;
159
- bordered: string;
160
- };
161
- }, {
162
- base: string;
163
- title: string;
164
- description: string;
165
- icon: string;
166
- loadingIcon: string;
167
- content: string;
168
- motionDiv: string;
169
- progressTrack: string;
170
- progressIndicator: string;
171
- closeButton: string;
172
- closeIcon: string;
173
- }, tailwind_variants.TVReturnType<{
174
- color: {
175
- default: string;
176
- foreground: {
177
- progressIndicator: string;
178
- };
179
- primary: {
180
- progressIndicator: string;
181
- };
182
- secondary: {
183
- progressIndicator: string;
184
- };
185
- success: {
186
- progressIndicator: string;
187
- };
188
- warning: {
189
- progressIndicator: string;
190
- };
191
- danger: {
192
- progressIndicator: string;
193
- };
194
- info: {};
195
- };
196
- variant: {
197
- flat: string;
198
- solid: string;
199
- bordered: string;
200
- };
201
- }, {
202
- base: string;
203
- title: string;
204
- description: string;
205
- icon: string;
206
- loadingIcon: string;
207
- content: string;
208
- motionDiv: string;
209
- progressTrack: string;
210
- progressIndicator: string;
211
- closeButton: string;
212
- closeIcon: string;
213
- }, undefined, tailwind_variants_dist_config_js.TVConfig<{
214
- color: {
215
- default: string;
216
- foreground: {
217
- progressIndicator: string;
218
- };
219
- primary: {
220
- progressIndicator: string;
221
- };
222
- secondary: {
223
- progressIndicator: string;
224
- };
225
- success: {
226
- progressIndicator: string;
227
- };
228
- warning: {
229
- progressIndicator: string;
230
- };
231
- danger: {
232
- progressIndicator: string;
233
- };
234
- info: {};
235
- };
236
- variant: {
237
- flat: string;
238
- solid: string;
239
- bordered: string;
240
- };
241
- }, {
242
- color: {
243
- default: string;
244
- foreground: {
245
- progressIndicator: string;
246
- };
247
- primary: {
248
- progressIndicator: string;
249
- };
250
- secondary: {
251
- progressIndicator: string;
252
- };
253
- success: {
254
- progressIndicator: string;
255
- };
256
- warning: {
257
- progressIndicator: string;
258
- };
259
- danger: {
260
- progressIndicator: string;
261
- };
262
- info: {};
263
- };
264
- variant: {
265
- flat: string;
266
- solid: string;
267
- bordered: string;
268
- };
269
- }>, unknown, unknown, undefined>>;
270
- type AddToastVariantProps = TVProps<typeof toastVariants>;
271
- type ClassName = TVClassName<typeof toastVariants>;
272
- interface ToastProps extends AddToastVariantProps {
273
- /** CSS class name */
274
- className?: ClassName;
275
- /** Icon displayed at the end of the Alert */
276
- closeIcon?: ReactNode;
277
- /** Color of the alert */
278
- color?: AddToastVariantProps['color'];
279
- /** Content displayed inside the Alert */
280
- description?: ReactNode;
281
- /** Content displayed at the end of the Alert */
282
- endContent?: ReactNode;
283
- /** Icon displayed at the start of the Alert */
284
- icon?: ReactNode;
285
- /** Icon or animation displayed until promise is resolved */
286
- loadingIcon?: ReactNode;
287
- /** Callback function called when the toast is closed */
288
- onClose?: () => void;
289
- /** Promise based on which the notification will be styled */
290
- promise?: Promise<void>;
291
- /** Whether the toast should show a progress bar */
292
- shouldShowTimeoutProgress?: boolean;
293
- /** Whether the toast should show a close button */
294
- showCloseButton?: boolean;
295
- /** Whether the toast should show an icon */
296
- showIcon?: boolean;
297
- /** Time the toast is displayed */
298
- timeout?: number;
299
- /** Content displayed at the top of the toast */
300
- title?: ReactNode;
301
- /** Variant of the toast */
302
- variant?: AddToastVariantProps['variant'];
303
- }
304
- /**
305
- * addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
306
- */
307
- declare const addToast: ({ className, closeIcon, color, description, endContent, icon, loadingIcon, onClose, promise, shouldShowTimeoutProgress, showCloseButton, showIcon, timeout, title, variant, }: ToastProps) => void;
308
-
309
- type ToastProviderToastProps = Omit<ToastProps, 'description' | 'endContent' | 'title'>;
310
- interface ToastProviderProps {
311
- disableAnimation?: boolean;
312
- maxVisibleToasts?: number;
313
- placement?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
314
- toastProps?: ToastProviderToastProps;
315
- toastOffset?: number;
316
- regionProps?: {
317
- classNames?: Record<'base', string>;
318
- };
319
- }
320
- /**
321
- * ToastProvider component based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
322
- */
323
- declare const ToastProvider: ({ disableAnimation, maxVisibleToasts, placement, toastProps, toastOffset, regionProps, }: ToastProviderProps) => react_jsx_runtime.JSX.Element;
324
-
325
- export { type AddToastVariantProps, type ToastProps, ToastProvider, type ToastProviderProps, addToast, toastVariants };
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  import {
2
- Popover_default
3
- } from "./chunk-5TOE75VE.js";
4
- import "./chunk-EQVC4PJE.js";
2
+ Progress_default,
3
+ progressVariants
4
+ } from "./chunk-RV7YPQXI.js";
5
+ import {
6
+ ProgressCircular_default,
7
+ progressCircularVariants
8
+ } from "./chunk-GJQTAEHH.js";
5
9
  import {
6
10
  Table_default,
7
11
  tableVariants
@@ -10,6 +14,11 @@ import {
10
14
  Tabs_default,
11
15
  tabsVariants
12
16
  } from "./chunk-JZHEG3SM.js";
17
+ import {
18
+ ToastProvider_default,
19
+ addToast,
20
+ toastVariants
21
+ } from "./chunk-KSAL4SBX.js";
13
22
  import {
14
23
  Tooltip_default
15
24
  } from "./chunk-YXWPOEX6.js";
@@ -24,11 +33,6 @@ import {
24
33
  Card_default,
25
34
  cardVariants
26
35
  } from "./chunk-ABKT5UKM.js";
27
- import {
28
- CircularProgress_default,
29
- circularProgressStyleVariantOptions,
30
- circularProgressVariants
31
- } from "./chunk-M3PL6G7W.js";
32
36
  import {
33
37
  Drawer_default,
34
38
  drawerBackdrops,
@@ -39,7 +43,7 @@ import {
39
43
  } from "./chunk-VBOUHWXM.js";
40
44
  import {
41
45
  Json_default
42
- } from "./chunk-L3DEBOPG.js";
46
+ } from "./chunk-VRPX6QUG.js";
43
47
  import {
44
48
  Label_default,
45
49
  labelVariants
@@ -51,6 +55,10 @@ import {
51
55
  Modal_default,
52
56
  modalVariants
53
57
  } from "./chunk-RW4WTSLJ.js";
58
+ import {
59
+ Popover_default
60
+ } from "./chunk-5TOE75VE.js";
61
+ import "./chunk-EQVC4PJE.js";
54
62
  import {
55
63
  Accordion_default,
56
64
  accordionVariants
@@ -75,168 +83,8 @@ import {
75
83
  import {
76
84
  Button_default,
77
85
  buttonVariants
78
- } from "./chunk-Q5DUSUCZ.js";
79
- import {
80
- __spreadProps,
81
- __spreadValues
82
- } from "./chunk-J7N2552D.js";
83
-
84
- // src/Toast/addToast.tsx
85
- import { toast as heroToastVariants } from "@heroui/theme";
86
- import { addToast as heroAddToast } from "@heroui/toast";
87
- import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
88
- var toastVariants = tv({
89
- slots: {
90
- base: "",
91
- title: "",
92
- description: "",
93
- icon: "",
94
- loadingIcon: "",
95
- content: "",
96
- motionDiv: "",
97
- progressTrack: "",
98
- progressIndicator: "",
99
- closeButton: "",
100
- closeIcon: ""
101
- },
102
- variants: {
103
- // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/toast.ts
104
- color: __spreadValues({
105
- info: {}
106
- }, heroToastVariants.variants.color),
107
- variant: __spreadValues({}, heroToastVariants.variants.variant)
108
- },
109
- compoundVariants: [
110
- ...heroToastVariants.compoundVariants,
111
- {
112
- variant: "solid",
113
- color: "info",
114
- className: {
115
- base: "bg-info text-info-foreground",
116
- title: "text-info-foreground",
117
- description: "text-info-foreground",
118
- icon: "text-info-foreground",
119
- closeIcon: "border-info-400 bg-info-100",
120
- closeButton: "text-info-400 hover:text-info-600",
121
- progressIndicator: "bg-info-400"
122
- }
123
- },
124
- {
125
- color: "info",
126
- variant: "flat",
127
- className: {
128
- base: "dark:bg-info-50/50 bg-info-50 text-info-600",
129
- title: "text-info-600",
130
- description: "text-info-500",
131
- icon: "text-info-600",
132
- closeIcon: "border-info-400 bg-info-100",
133
- closeButton: "text-info-400 hover:text-info-600",
134
- progressIndicator: "bg-info-400"
135
- }
136
- },
137
- {
138
- color: "info",
139
- variant: "bordered",
140
- className: {
141
- base: "border-small border-info text-info-600",
142
- title: "text-info-600",
143
- description: "text-info-500",
144
- icon: "text-info-600",
145
- closeIcon: "border-info-400 bg-info-100",
146
- closeButton: "text-info-400 hover:text-info-600",
147
- progressIndicator: "bg-info-400"
148
- }
149
- }
150
- ]
151
- });
152
- var addToast = ({
153
- className = void 0,
154
- closeIcon = void 0,
155
- color = "default",
156
- description = void 0,
157
- endContent = void 0,
158
- icon = void 0,
159
- loadingIcon = void 0,
160
- onClose = void 0,
161
- promise = void 0,
162
- shouldShowTimeoutProgress = false,
163
- showCloseButton = true,
164
- showIcon = true,
165
- timeout = 5e3,
166
- title = void 0,
167
- variant = "bordered"
168
- }) => {
169
- const variants = toastVariants({
170
- color,
171
- variant
172
- });
173
- const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(
174
- color
175
- );
176
- const classNames = variantsToClassNames(variants, className, "base");
177
- heroAddToast({
178
- classNames,
179
- closeIcon,
180
- color: isHeroUIColor ? color : void 0,
181
- // TODO: 'data-testid': testId,
182
- // https://github.com/heroui-inc/heroui/issues/5033
183
- // @ts-expect-error bug in hero-toast: description should be ReactNode
184
- description,
185
- endContent,
186
- hideCloseButton: !showCloseButton,
187
- hideIcon: !showIcon,
188
- icon,
189
- loadingIcon,
190
- onClose,
191
- promise,
192
- shouldShowTimeoutProgress,
193
- timeout,
194
- title,
195
- variant
196
- });
197
- };
198
-
199
- // src/Toast/ToastProvider.tsx
200
- import { toast as heroToastVariants2 } from "@heroui/theme";
201
- import { ToastProvider as HeroToastProvider } from "@heroui/toast";
202
- import { variantsToClassNames as variantsToClassNames2 } from "@fuf-stack/pixel-utils";
203
- import { jsx } from "react/jsx-runtime";
204
- var ToastProvider = ({
205
- disableAnimation = false,
206
- maxVisibleToasts = 5,
207
- placement = "top-center",
208
- toastProps = void 0,
209
- toastOffset = 26,
210
- regionProps = void 0
211
- }) => {
212
- const variants = toastVariants({
213
- color: toastProps == null ? void 0 : toastProps.color,
214
- variant: toastProps == null ? void 0 : toastProps.variant
215
- });
216
- const isHeroUIColor = Object.keys(heroToastVariants2.variants.color).includes(
217
- (toastProps == null ? void 0 : toastProps.color) || ""
218
- );
219
- const classNames = variantsToClassNames2(
220
- variants,
221
- toastProps == null ? void 0 : toastProps.className,
222
- "base"
223
- );
224
- return /* @__PURE__ */ jsx(
225
- HeroToastProvider,
226
- {
227
- disableAnimation,
228
- maxVisibleToasts,
229
- placement,
230
- regionProps,
231
- toastOffset,
232
- toastProps: __spreadProps(__spreadValues({}, toastProps), {
233
- classNames,
234
- color: isHeroUIColor ? toastProps == null ? void 0 : toastProps.color : void 0
235
- })
236
- }
237
- );
238
- };
239
- var ToastProvider_default = ToastProvider;
86
+ } from "./chunk-MAKWBTTW.js";
87
+ import "./chunk-J7N2552D.js";
240
88
  export {
241
89
  Accordion_default as Accordion,
242
90
  Alert_default as Alert,
@@ -247,13 +95,14 @@ export {
247
95
  Button_default as Button,
248
96
  ButtonGroup_default as ButtonGroup,
249
97
  Card_default as Card,
250
- CircularProgress_default as CircularProgress,
251
98
  Drawer_default as Drawer,
252
99
  Json_default as Json,
253
100
  Label_default as Label,
254
101
  Menu_default as Menu,
255
102
  Modal_default as Modal,
256
103
  Popover_default as Popover,
104
+ Progress_default as Progress,
105
+ ProgressCircular_default as ProgressCircular,
257
106
  Table_default as Table,
258
107
  Tabs_default as Tabs,
259
108
  ToastProvider_default as ToastProvider,
@@ -264,8 +113,6 @@ export {
264
113
  breadcrumbVariants,
265
114
  buttonVariants,
266
115
  cardVariants,
267
- circularProgressStyleVariantOptions,
268
- circularProgressVariants,
269
116
  drawerBackdrops,
270
117
  drawerPlacements,
271
118
  drawerRadii,
@@ -273,6 +120,8 @@ export {
273
120
  drawerVariants,
274
121
  labelVariants,
275
122
  modalVariants,
123
+ progressCircularVariants,
124
+ progressVariants,
276
125
  tableVariants,
277
126
  tabsVariants,
278
127
  toastVariants,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Toast/addToast.tsx","../src/Toast/ToastProvider.tsx"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ToastProps as HeroToastProps } from '@heroui/toast';\nimport type { ReactNode } from 'react';\n\nimport { toast as heroToastVariants } from '@heroui/theme';\nimport { addToast as heroAddToast } from '@heroui/toast';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const toastVariants = tv({\n slots: {\n base: '',\n title: '',\n description: '',\n icon: '',\n loadingIcon: '',\n content: '',\n motionDiv: '',\n progressTrack: '',\n progressIndicator: '',\n closeButton: '',\n closeIcon: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/toast.ts\n color: {\n info: {},\n ...heroToastVariants.variants.color,\n },\n variant: {\n ...heroToastVariants.variants.variant,\n },\n },\n compoundVariants: [\n ...heroToastVariants.compoundVariants,\n {\n variant: 'solid',\n color: 'info',\n className: {\n base: 'bg-info text-info-foreground',\n title: 'text-info-foreground',\n description: 'text-info-foreground',\n icon: 'text-info-foreground',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n {\n color: 'info',\n variant: 'flat',\n className: {\n base: 'dark:bg-info-50/50 bg-info-50 text-info-600',\n title: 'text-info-600',\n description: 'text-info-500',\n icon: 'text-info-600',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n\n {\n color: 'info',\n variant: 'bordered',\n className: {\n base: 'border-small border-info text-info-600',\n title: 'text-info-600',\n description: 'text-info-500',\n icon: 'text-info-600',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n ],\n});\n\nexport type AddToastVariantProps = TVProps<typeof toastVariants>;\ntype ClassName = TVClassName<typeof toastVariants>;\n\nexport interface ToastProps extends AddToastVariantProps {\n /** CSS class name */\n className?: ClassName;\n /** Icon displayed at the end of the Alert */\n closeIcon?: ReactNode;\n /** Color of the alert */\n color?: AddToastVariantProps['color'];\n /** Content displayed inside the Alert */\n description?: ReactNode;\n /** Content displayed at the end of the Alert */\n endContent?: ReactNode;\n /** Icon displayed at the start of the Alert */\n icon?: ReactNode;\n /** Icon or animation displayed until promise is resolved */\n loadingIcon?: ReactNode;\n /** Callback function called when the toast is closed */\n onClose?: () => void;\n /** Promise based on which the notification will be styled */\n promise?: Promise<void>;\n /** Whether the toast should show a progress bar */\n shouldShowTimeoutProgress?: boolean;\n /** Whether the toast should show a close button */\n showCloseButton?: boolean;\n /** Whether the toast should show an icon */\n showIcon?: boolean;\n /** Time the toast is displayed */\n timeout?: number;\n /** Content displayed at the top of the toast */\n title?: ReactNode;\n /** Variant of the toast */\n variant?: AddToastVariantProps['variant'];\n}\n\n/**\n * addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)\n */\nexport const addToast = ({\n className = undefined,\n closeIcon = undefined,\n color = 'default',\n description = undefined,\n endContent = undefined,\n icon = undefined,\n loadingIcon = undefined,\n onClose = undefined,\n promise = undefined,\n shouldShowTimeoutProgress = false,\n showCloseButton = true,\n showIcon = true,\n timeout = 5000,\n title = undefined,\n variant = 'bordered',\n}: ToastProps) => {\n const variants = toastVariants({\n color,\n variant,\n });\n const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(\n color,\n );\n const classNames = variantsToClassNames(variants, className, 'base');\n heroAddToast({\n classNames,\n closeIcon,\n color: isHeroUIColor ? (color as HeroToastProps['color']) : undefined,\n // TODO: 'data-testid': testId,\n // https://github.com/heroui-inc/heroui/issues/5033\n // @ts-expect-error bug in hero-toast: description should be ReactNode\n description,\n endContent,\n hideCloseButton: !showCloseButton,\n hideIcon: !showIcon,\n icon,\n loadingIcon,\n onClose,\n promise,\n shouldShowTimeoutProgress,\n timeout,\n title,\n variant,\n });\n};\n\nexport default addToast;\n","import type { ToastProps as HeroToastProps } from '@heroui/toast';\nimport type { ToastProps } from './addToast';\n\nimport { toast as heroToastVariants } from '@heroui/theme';\nimport { ToastProvider as HeroToastProvider } from '@heroui/toast';\n\nimport { variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { toastVariants } from './addToast';\n\nexport type ToastProviderToastProps = Omit<\n ToastProps,\n 'description' | 'endContent' | 'title'\n>;\n\nexport interface ToastProviderProps {\n disableAnimation?: boolean;\n maxVisibleToasts?: number;\n placement?:\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'top-right'\n | 'top-left'\n | 'top-center';\n\n toastProps?: ToastProviderToastProps;\n toastOffset?: number;\n regionProps?: { classNames?: Record<'base', string> };\n}\n\n/**\n * ToastProvider component based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)\n */\nconst ToastProvider = ({\n disableAnimation = false,\n maxVisibleToasts = 5,\n placement = 'top-center',\n toastProps = undefined,\n toastOffset = 26,\n regionProps = undefined,\n}: ToastProviderProps) => {\n const variants = toastVariants({\n color: toastProps?.color,\n variant: toastProps?.variant,\n });\n const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(\n toastProps?.color || '',\n );\n const classNames = variantsToClassNames(\n variants,\n toastProps?.className,\n 'base',\n );\n return (\n <HeroToastProvider\n disableAnimation={disableAnimation}\n maxVisibleToasts={maxVisibleToasts}\n placement={placement}\n regionProps={regionProps}\n toastOffset={toastOffset}\n toastProps={{\n ...toastProps,\n classNames,\n color: isHeroUIColor\n ? (toastProps?.color as HeroToastProps['color'])\n : undefined,\n }}\n />\n );\n};\n\nexport default ToastProvider;\n"],"mappings":"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","names":["heroToastVariants","variantsToClassNames","heroToastVariants","variantsToClassNames"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}