@vinyasa/feedback 1.0.21 → 1.0.23
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/alert.cjs +72 -32
- package/dist/cjs/banner.cjs +31 -14
- package/dist/cjs/circular-progress.cjs +74 -37
- package/dist/cjs/empty-state.cjs +47 -23
- package/dist/cjs/error-boundary.cjs +72 -32
- package/dist/cjs/index.cjs +593 -269
- package/dist/cjs/index.css +54 -32
- package/dist/cjs/inline-message.cjs +32 -15
- package/dist/cjs/loading-overlay.cjs +41 -17
- package/dist/cjs/progress-bar.cjs +143 -48
- package/dist/cjs/progress-bar.css +7 -2
- package/dist/cjs/toaster.cjs +202 -87
- package/dist/cjs/toaster.css +47 -30
- package/dist/esm/147.css +47 -30
- package/dist/esm/147.js +103 -89
- package/dist/esm/158.js +31 -19
- package/dist/esm/266.js +67 -37
- package/dist/esm/277.js +5 -1
- package/dist/esm/288.js +25 -20
- package/dist/esm/516.js +24 -17
- package/dist/esm/872.css +4 -2
- package/dist/esm/872.js +54 -19
- package/dist/esm/880.js +32 -13
- package/dist/esm/903.js +41 -31
- package/dist/esm/989.js +23 -16
- package/dist/esm/alert.js +1 -1
- package/dist/esm/banner.js +1 -1
- package/dist/esm/circular-progress.js +1 -1
- package/dist/esm/components/alert/Alert.d.ts +23 -7
- package/dist/esm/components/alert/index.d.ts +1 -1
- package/dist/esm/components/banner/Banner.d.ts +8 -5
- package/dist/esm/components/banner/index.d.ts +1 -1
- package/dist/esm/components/circular-progress/CircularProgress.d.ts +11 -3
- package/dist/esm/components/circular-progress/index.d.ts +1 -1
- package/dist/esm/components/empty-state/EmptyState.d.ts +24 -13
- package/dist/esm/components/empty-state/index.d.ts +1 -1
- package/dist/esm/components/error-boundary/ErrorBoundary.d.ts +16 -9
- package/dist/esm/components/error-boundary/index.d.ts +1 -1
- package/dist/esm/components/inline-message/InlineMessage.d.ts +5 -0
- package/dist/esm/components/inline-message/index.d.ts +1 -1
- package/dist/esm/components/loading-overlay/LoadingOverlay.d.ts +11 -1
- package/dist/esm/components/loading-overlay/index.d.ts +1 -1
- package/dist/esm/components/progress-bar/ProgressBar.d.ts +11 -4
- package/dist/esm/components/progress-bar/index.d.ts +1 -1
- package/dist/esm/components/spinner/Spinner.d.ts +1 -1
- package/dist/esm/components/toaster/Toaster.css.d.ts +2 -5
- package/dist/esm/components/toaster/Toaster.d.ts +3 -0
- package/dist/esm/components/toaster/ToasterItem.d.ts +18 -0
- package/dist/esm/components/toaster/index.d.ts +1 -1
- package/dist/esm/components/toaster/toastStore.d.ts +2 -2
- package/dist/esm/empty-state.js +1 -1
- package/dist/esm/error-boundary.js +1 -1
- package/dist/esm/index.d.ts +9 -9
- package/dist/esm/index.js +9 -9
- package/dist/esm/inline-message.js +1 -1
- package/dist/esm/loading-overlay.js +1 -1
- package/dist/esm/progress-bar.js +1 -1
- package/dist/esm/status.d.ts +3 -1
- package/dist/esm/toaster.js +1 -1
- package/package.json +15 -11
- package/dist/esm/components/toaster/ToastItemView.d.ts +0 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -38,15 +38,35 @@ var __webpack_exports__ = {};
|
|
|
38
38
|
__webpack_require__.r(__webpack_exports__);
|
|
39
39
|
__webpack_require__.d(__webpack_exports__, {
|
|
40
40
|
Alert: ()=>alert_Alert,
|
|
41
|
+
AlertBody: ()=>AlertBody,
|
|
42
|
+
AlertDescription: ()=>AlertDescription,
|
|
43
|
+
AlertIcon: ()=>AlertIcon,
|
|
44
|
+
AlertTitle: ()=>AlertTitle,
|
|
41
45
|
Banner: ()=>banner_Banner,
|
|
46
|
+
BannerIcon: ()=>BannerIcon,
|
|
42
47
|
CircularProgress: ()=>circular_progress_CircularProgress,
|
|
48
|
+
CircularProgressIndicator: ()=>CircularProgressIndicator,
|
|
43
49
|
EmptyState: ()=>empty_state_EmptyState,
|
|
50
|
+
EmptyStateAction: ()=>EmptyStateAction,
|
|
51
|
+
EmptyStateDescription: ()=>EmptyStateDescription,
|
|
52
|
+
EmptyStateIcon: ()=>EmptyStateIcon,
|
|
53
|
+
EmptyStateTitle: ()=>EmptyStateTitle,
|
|
44
54
|
ErrorBoundary: ()=>error_boundary_ErrorBoundary,
|
|
55
|
+
ErrorBoundaryContent: ()=>ErrorBoundaryContent,
|
|
56
|
+
ErrorBoundaryFallback: ()=>ErrorBoundaryFallback,
|
|
45
57
|
InlineMessage: ()=>inline_message_InlineMessage,
|
|
58
|
+
InlineMessageIcon: ()=>InlineMessageIcon,
|
|
46
59
|
LoadingOverlay: ()=>loading_overlay_LoadingOverlay,
|
|
60
|
+
LoadingOverlayBackdrop: ()=>LoadingOverlayBackdrop,
|
|
61
|
+
LoadingOverlayContent: ()=>LoadingOverlayContent,
|
|
47
62
|
ProgressBar: ()=>progress_bar_ProgressBar,
|
|
63
|
+
ProgressBarIndicator: ()=>ProgressBarIndicator,
|
|
48
64
|
Skeleton: ()=>skeleton_Skeleton,
|
|
49
65
|
Spinner: ()=>spinner_Spinner,
|
|
66
|
+
ToastAction: ()=>ToastAction,
|
|
67
|
+
ToastClose: ()=>ToastClose,
|
|
68
|
+
ToastDescription: ()=>ToastDescription,
|
|
69
|
+
ToastTitle: ()=>ToastTitle,
|
|
50
70
|
Toaster: ()=>toaster_Toaster,
|
|
51
71
|
toast: ()=>toast
|
|
52
72
|
});
|
|
@@ -61,6 +81,9 @@ const statusIcons = {
|
|
|
61
81
|
warning: icons_namespaceObject.AlertTriangleIcon,
|
|
62
82
|
error: icons_namespaceObject.XIcon
|
|
63
83
|
};
|
|
84
|
+
const StatusContext = (0, external_react_namespaceObject.createContext)('info');
|
|
85
|
+
const StatusProvider = StatusContext.Provider;
|
|
86
|
+
const useStatusContext = ()=>(0, external_react_namespaceObject.useContext)(StatusContext);
|
|
64
87
|
function toPrimitive(t, r) {
|
|
65
88
|
if ("object" != typeof t || !t) return t;
|
|
66
89
|
var e = t[Symbol.toPrimitive];
|
|
@@ -163,9 +186,9 @@ var Alert_css_alert = createRuntimeFn({
|
|
|
163
186
|
compoundVariants: []
|
|
164
187
|
});
|
|
165
188
|
var body = '_1313gq6';
|
|
166
|
-
var
|
|
167
|
-
var
|
|
168
|
-
var
|
|
189
|
+
var description = '_1313gq8';
|
|
190
|
+
var icon = '_1313gq5';
|
|
191
|
+
var title = '_1313gq7';
|
|
169
192
|
function _define_property(obj, key, value) {
|
|
170
193
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
171
194
|
value: value,
|
|
@@ -248,46 +271,71 @@ const Alert = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0,
|
|
|
248
271
|
let _ref = [
|
|
249
272
|
_0,
|
|
250
273
|
_1
|
|
251
|
-
], [_ref1, ..._rest] = _ref, { status = 'info',
|
|
274
|
+
], [_ref1, ..._rest] = _ref, { status = 'info', className, children } = _ref1, rest = _object_without_properties(_ref1, [
|
|
252
275
|
"status",
|
|
253
|
-
"
|
|
254
|
-
"
|
|
255
|
-
"className"
|
|
276
|
+
"className",
|
|
277
|
+
"children"
|
|
256
278
|
]), [ref] = _rest;
|
|
257
|
-
const Icon = statusIcons[status];
|
|
258
279
|
const classes = className ? `${Alert_css_alert({
|
|
259
280
|
status
|
|
260
281
|
})} ${className}` : Alert_css_alert({
|
|
261
282
|
status
|
|
262
283
|
});
|
|
263
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
274
|
-
className: body,
|
|
275
|
-
children: [
|
|
276
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
277
|
-
className: Alert_css_title,
|
|
278
|
-
children: title
|
|
279
|
-
}),
|
|
280
|
-
description ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
281
|
-
className: Alert_css_description,
|
|
282
|
-
children: description
|
|
283
|
-
}) : null
|
|
284
|
-
]
|
|
285
|
-
})
|
|
286
|
-
]
|
|
287
|
-
}));
|
|
284
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StatusProvider, {
|
|
285
|
+
value: status,
|
|
286
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(box_default(), _object_spread_props(_object_spread({
|
|
287
|
+
ref: ref,
|
|
288
|
+
role: "alert",
|
|
289
|
+
className: classes
|
|
290
|
+
}, rest), {
|
|
291
|
+
children: children
|
|
292
|
+
}))
|
|
293
|
+
});
|
|
288
294
|
});
|
|
289
295
|
Alert.displayName = 'Alert';
|
|
290
296
|
const alert_Alert = Alert;
|
|
297
|
+
const AlertIcon = (_0)=>{
|
|
298
|
+
let { className, children } = _0, rest = _object_without_properties(_0, [
|
|
299
|
+
"className",
|
|
300
|
+
"children"
|
|
301
|
+
]);
|
|
302
|
+
const status = useStatusContext();
|
|
303
|
+
const StatusIcon = statusIcons[status];
|
|
304
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", _object_spread_props(_object_spread({
|
|
305
|
+
className: className ? `${icon} ${className}` : icon,
|
|
306
|
+
"aria-hidden": "true"
|
|
307
|
+
}, rest), {
|
|
308
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StatusIcon, {})
|
|
309
|
+
}));
|
|
310
|
+
};
|
|
311
|
+
AlertIcon.displayName = 'AlertIcon';
|
|
312
|
+
const AlertBody = (_0)=>{
|
|
313
|
+
let { className } = _0, rest = _object_without_properties(_0, [
|
|
314
|
+
"className"
|
|
315
|
+
]);
|
|
316
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", _object_spread({
|
|
317
|
+
className: className ? `${body} ${className}` : body
|
|
318
|
+
}, rest));
|
|
319
|
+
};
|
|
320
|
+
AlertBody.displayName = 'AlertBody';
|
|
321
|
+
const AlertTitle = (_0)=>{
|
|
322
|
+
let { className } = _0, rest = _object_without_properties(_0, [
|
|
323
|
+
"className"
|
|
324
|
+
]);
|
|
325
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", _object_spread({
|
|
326
|
+
className: className ? `${title} ${className}` : title
|
|
327
|
+
}, rest));
|
|
328
|
+
};
|
|
329
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
330
|
+
const AlertDescription = (_0)=>{
|
|
331
|
+
let { className } = _0, rest = _object_without_properties(_0, [
|
|
332
|
+
"className"
|
|
333
|
+
]);
|
|
334
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", _object_spread({
|
|
335
|
+
className: className ? `${description} ${className}` : description
|
|
336
|
+
}, rest));
|
|
337
|
+
};
|
|
338
|
+
AlertDescription.displayName = "AlertDescription";
|
|
291
339
|
var banner = createRuntimeFn({
|
|
292
340
|
defaultClassName: 'a1nlu90',
|
|
293
341
|
variantClassNames: {
|
|
@@ -391,28 +439,40 @@ const Banner = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0,
|
|
|
391
439
|
"className",
|
|
392
440
|
"children"
|
|
393
441
|
]), [ref] = _rest;
|
|
394
|
-
const Icon = statusIcons[status];
|
|
395
442
|
const classes = className ? `${banner({
|
|
396
443
|
status
|
|
397
444
|
})} ${className}` : banner({
|
|
398
445
|
status
|
|
399
446
|
});
|
|
400
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
children
|
|
411
|
-
]
|
|
412
|
-
}));
|
|
447
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StatusProvider, {
|
|
448
|
+
value: status,
|
|
449
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(box_default(), Banner_object_spread_props(Banner_object_spread({
|
|
450
|
+
ref: ref,
|
|
451
|
+
role: "alert",
|
|
452
|
+
className: classes
|
|
453
|
+
}, rest), {
|
|
454
|
+
children: children
|
|
455
|
+
}))
|
|
456
|
+
});
|
|
413
457
|
});
|
|
414
458
|
Banner.displayName = 'Banner';
|
|
415
459
|
const banner_Banner = Banner;
|
|
460
|
+
const BannerIcon = (_0)=>{
|
|
461
|
+
let { className, children } = _0, rest = Banner_object_without_properties(_0, [
|
|
462
|
+
"className",
|
|
463
|
+
"children"
|
|
464
|
+
]);
|
|
465
|
+
const status = useStatusContext();
|
|
466
|
+
const StatusIcon = statusIcons[status];
|
|
467
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", Banner_object_spread_props(Banner_object_spread({
|
|
468
|
+
className: className ? `${Banner_css_icon} ${className}` : Banner_css_icon,
|
|
469
|
+
"aria-hidden": "true"
|
|
470
|
+
}, rest), {
|
|
471
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StatusIcon, {})
|
|
472
|
+
}));
|
|
473
|
+
};
|
|
474
|
+
BannerIcon.displayName = 'BannerIcon';
|
|
475
|
+
const react_progress_namespaceObject = require("@radix-ui/react-progress");
|
|
416
476
|
const tokens_namespaceObject = require("@vinyasa/tokens");
|
|
417
477
|
const space = {
|
|
418
478
|
1: tokens_namespaceObject.themeContract.space1,
|
|
@@ -570,11 +630,17 @@ function CircularProgress_object_without_properties_loose(source, excluded) {
|
|
|
570
630
|
}
|
|
571
631
|
return target;
|
|
572
632
|
}
|
|
633
|
+
const CircularProgressContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({
|
|
634
|
+
value: null,
|
|
635
|
+
max: 100,
|
|
636
|
+
size: 32,
|
|
637
|
+
strokeWidth: 4
|
|
638
|
+
});
|
|
573
639
|
const CircularProgress = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
574
640
|
let _ref = [
|
|
575
641
|
_0,
|
|
576
642
|
_1
|
|
577
|
-
], [_ref1, ..._rest] = _ref, { value, max = 100, size = 32, strokeWidth = 4, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style } = _ref1, rest = CircularProgress_object_without_properties(_ref1, [
|
|
643
|
+
], [_ref1, ..._rest] = _ref, { value, max = 100, size = 32, strokeWidth = 4, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = CircularProgress_object_without_properties(_ref1, [
|
|
578
644
|
"value",
|
|
579
645
|
"max",
|
|
580
646
|
"size",
|
|
@@ -594,13 +660,10 @@ const CircularProgress = /*#__PURE__*/ (0, external_react_namespaceObject.forwar
|
|
|
594
660
|
"px",
|
|
595
661
|
"py",
|
|
596
662
|
"className",
|
|
597
|
-
"style"
|
|
663
|
+
"style",
|
|
664
|
+
"children"
|
|
598
665
|
]), [ref] = _rest;
|
|
599
|
-
const radius = (size - strokeWidth) / 2;
|
|
600
|
-
const circumference = 2 * Math.PI * radius;
|
|
601
666
|
const isIndeterminate = void 0 === value;
|
|
602
|
-
const percent = isIndeterminate ? 25 : Math.min(100, Math.max(0, value / max * 100));
|
|
603
|
-
const dashOffset = circumference - percent / 100 * circumference;
|
|
604
667
|
const computedStyle = CircularProgress_object_spread({}, resolveSpacingStyle({
|
|
605
668
|
m,
|
|
606
669
|
mt,
|
|
@@ -623,41 +686,71 @@ const CircularProgress = /*#__PURE__*/ (0, external_react_namespaceObject.forwar
|
|
|
623
686
|
className
|
|
624
687
|
].filter(Boolean).join(' ');
|
|
625
688
|
const center = size / 2;
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
689
|
+
const radius = (size - strokeWidth) / 2;
|
|
690
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CircularProgressContext.Provider, {
|
|
691
|
+
value: {
|
|
692
|
+
value: isIndeterminate ? null : value,
|
|
693
|
+
max,
|
|
694
|
+
size,
|
|
695
|
+
strokeWidth
|
|
696
|
+
},
|
|
697
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_progress_namespaceObject.Root, CircularProgress_object_spread_props(CircularProgress_object_spread({
|
|
698
|
+
value: isIndeterminate ? null : value,
|
|
699
|
+
max: max
|
|
700
|
+
}, rest), {
|
|
701
|
+
asChild: true,
|
|
702
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
|
|
703
|
+
ref: ref,
|
|
704
|
+
width: size,
|
|
705
|
+
height: size,
|
|
706
|
+
viewBox: `0 0 ${String(size)} ${String(size)}`,
|
|
707
|
+
className: classes,
|
|
708
|
+
style: computedStyle,
|
|
709
|
+
children: [
|
|
710
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("circle", {
|
|
711
|
+
className: track,
|
|
712
|
+
cx: center,
|
|
713
|
+
cy: center,
|
|
714
|
+
r: radius,
|
|
715
|
+
strokeWidth: strokeWidth
|
|
716
|
+
}),
|
|
717
|
+
children
|
|
718
|
+
]
|
|
655
719
|
})
|
|
656
|
-
|
|
657
|
-
})
|
|
720
|
+
}))
|
|
721
|
+
});
|
|
658
722
|
});
|
|
659
723
|
CircularProgress.displayName = 'CircularProgress';
|
|
660
724
|
const circular_progress_CircularProgress = CircularProgress;
|
|
725
|
+
const CircularProgressIndicator = (_0)=>{
|
|
726
|
+
let { className, style } = _0, rest = CircularProgress_object_without_properties(_0, [
|
|
727
|
+
"className",
|
|
728
|
+
"style"
|
|
729
|
+
]);
|
|
730
|
+
const { value, max, size, strokeWidth } = (0, external_react_namespaceObject.useContext)(CircularProgressContext);
|
|
731
|
+
const isIndeterminate = null === value;
|
|
732
|
+
const radius = (size - strokeWidth) / 2;
|
|
733
|
+
const circumference = 2 * Math.PI * radius;
|
|
734
|
+
const percent = isIndeterminate ? 25 : Math.min(100, Math.max(0, value / max * 100));
|
|
735
|
+
const dashOffset = circumference - percent / 100 * circumference;
|
|
736
|
+
const center = size / 2;
|
|
737
|
+
const classes = className ? `${fill} ${className}` : fill;
|
|
738
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_progress_namespaceObject.Indicator, {
|
|
739
|
+
asChild: true,
|
|
740
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("circle", CircularProgress_object_spread({
|
|
741
|
+
className: classes,
|
|
742
|
+
cx: center,
|
|
743
|
+
cy: center,
|
|
744
|
+
r: radius,
|
|
745
|
+
strokeWidth: strokeWidth,
|
|
746
|
+
strokeDasharray: circumference,
|
|
747
|
+
strokeDashoffset: dashOffset,
|
|
748
|
+
transform: `rotate(-90 ${String(center)} ${String(center)})`,
|
|
749
|
+
style: style
|
|
750
|
+
}, rest))
|
|
751
|
+
});
|
|
752
|
+
};
|
|
753
|
+
CircularProgressIndicator.displayName = 'CircularProgressIndicator';
|
|
661
754
|
const layout_namespaceObject = require("@vinyasa/layout");
|
|
662
755
|
const typography_namespaceObject = require("@vinyasa/typography");
|
|
663
756
|
var iconWrapper = 'dmnndp0';
|
|
@@ -743,45 +836,57 @@ const EmptyState = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
|
|
|
743
836
|
let _ref = [
|
|
744
837
|
_0,
|
|
745
838
|
_1
|
|
746
|
-
], [_ref1, ..._rest] = _ref, {
|
|
747
|
-
"
|
|
748
|
-
"
|
|
749
|
-
"description",
|
|
750
|
-
"action",
|
|
751
|
-
"p"
|
|
839
|
+
], [_ref1, ..._rest] = _ref, { p = 6, children } = _ref1, rest = EmptyState_object_without_properties(_ref1, [
|
|
840
|
+
"p",
|
|
841
|
+
"children"
|
|
752
842
|
]), [ref] = _rest;
|
|
753
843
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_namespaceObject.Center, EmptyState_object_spread_props(EmptyState_object_spread({
|
|
754
844
|
ref: ref,
|
|
755
845
|
p: p
|
|
756
846
|
}, rest), {
|
|
757
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
847
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_namespaceObject.Stack, {
|
|
758
848
|
gap: 2,
|
|
759
849
|
align: "center",
|
|
760
850
|
style: {
|
|
761
851
|
textAlign: 'center',
|
|
762
852
|
maxWidth: '24rem'
|
|
763
853
|
},
|
|
764
|
-
children:
|
|
765
|
-
icon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
766
|
-
className: iconWrapper,
|
|
767
|
-
children: icon
|
|
768
|
-
}) : null,
|
|
769
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(typography_namespaceObject.Heading, {
|
|
770
|
-
as: "h3",
|
|
771
|
-
size: "lg",
|
|
772
|
-
children: title
|
|
773
|
-
}),
|
|
774
|
-
description ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(typography_namespaceObject.Paragraph, {
|
|
775
|
-
color: "muted",
|
|
776
|
-
children: description
|
|
777
|
-
}) : null,
|
|
778
|
-
action
|
|
779
|
-
]
|
|
854
|
+
children: children
|
|
780
855
|
})
|
|
781
856
|
}));
|
|
782
857
|
});
|
|
783
858
|
EmptyState.displayName = 'EmptyState';
|
|
784
859
|
const empty_state_EmptyState = EmptyState;
|
|
860
|
+
const EmptyStateIcon = (_0)=>{
|
|
861
|
+
let { className } = _0, rest = EmptyState_object_without_properties(_0, [
|
|
862
|
+
"className"
|
|
863
|
+
]);
|
|
864
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", EmptyState_object_spread({
|
|
865
|
+
className: className ? `${iconWrapper} ${className}` : iconWrapper
|
|
866
|
+
}, rest));
|
|
867
|
+
};
|
|
868
|
+
EmptyStateIcon.displayName = 'EmptyStateIcon';
|
|
869
|
+
const EmptyStateTitle = (_0)=>{
|
|
870
|
+
let { size = 'lg' } = _0, rest = EmptyState_object_without_properties(_0, [
|
|
871
|
+
"size"
|
|
872
|
+
]);
|
|
873
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(typography_namespaceObject.Heading, EmptyState_object_spread({
|
|
874
|
+
as: "h3",
|
|
875
|
+
size: size
|
|
876
|
+
}, rest));
|
|
877
|
+
};
|
|
878
|
+
EmptyStateTitle.displayName = 'EmptyStateTitle';
|
|
879
|
+
const EmptyStateDescription = (_0)=>{
|
|
880
|
+
let { color = 'muted' } = _0, rest = EmptyState_object_without_properties(_0, [
|
|
881
|
+
"color"
|
|
882
|
+
]);
|
|
883
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(typography_namespaceObject.Paragraph, EmptyState_object_spread({
|
|
884
|
+
color: color
|
|
885
|
+
}, rest));
|
|
886
|
+
};
|
|
887
|
+
EmptyStateDescription.displayName = "EmptyStateDescription";
|
|
888
|
+
const EmptyStateAction = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", EmptyState_object_spread({}, props));
|
|
889
|
+
EmptyStateAction.displayName = 'EmptyStateAction';
|
|
785
890
|
const button_namespaceObject = require("@vinyasa/button");
|
|
786
891
|
var button_default = /*#__PURE__*/ __webpack_require__.n(button_namespaceObject);
|
|
787
892
|
function ErrorBoundary_define_property(obj, key, value) {
|
|
@@ -794,6 +899,27 @@ function ErrorBoundary_define_property(obj, key, value) {
|
|
|
794
899
|
else obj[key] = value;
|
|
795
900
|
return obj;
|
|
796
901
|
}
|
|
902
|
+
const ErrorBoundaryContent = ({ children })=>children;
|
|
903
|
+
ErrorBoundaryContent.displayName = 'ErrorBoundaryContent';
|
|
904
|
+
const ErrorBoundaryFallback = (props)=>null;
|
|
905
|
+
ErrorBoundaryFallback.displayName = 'ErrorBoundaryFallback';
|
|
906
|
+
const findSlot = (children, type)=>external_react_namespaceObject.Children.toArray(children).find((child)=>/*#__PURE__*/ (0, external_react_namespaceObject.isValidElement)(child) && child.type === type);
|
|
907
|
+
const defaultFallback = ({ error, resetErrorBoundary })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(empty_state_EmptyState, {
|
|
908
|
+
children: [
|
|
909
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(EmptyStateTitle, {
|
|
910
|
+
children: "Something went wrong"
|
|
911
|
+
}),
|
|
912
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(EmptyStateDescription, {
|
|
913
|
+
children: error.message
|
|
914
|
+
}),
|
|
915
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(EmptyStateAction, {
|
|
916
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_default(), {
|
|
917
|
+
onClick: resetErrorBoundary,
|
|
918
|
+
children: "Try again"
|
|
919
|
+
})
|
|
920
|
+
})
|
|
921
|
+
]
|
|
922
|
+
});
|
|
797
923
|
class ErrorBoundary extends external_react_namespaceObject.Component {
|
|
798
924
|
static getDerivedStateFromError(error) {
|
|
799
925
|
return {
|
|
@@ -814,19 +940,20 @@ class ErrorBoundary extends external_react_namespaceObject.Component {
|
|
|
814
940
|
}
|
|
815
941
|
render() {
|
|
816
942
|
const { error } = this.state;
|
|
817
|
-
|
|
818
|
-
|
|
943
|
+
const { children } = this.props;
|
|
944
|
+
if (!error) {
|
|
945
|
+
var _findSlot;
|
|
946
|
+
return null != (_findSlot = findSlot(children, ErrorBoundaryContent)) ? _findSlot : null;
|
|
947
|
+
}
|
|
948
|
+
const fallbackSlot = findSlot(children, ErrorBoundaryFallback);
|
|
949
|
+
const fallback = null == fallbackSlot ? void 0 : fallbackSlot.props.children;
|
|
819
950
|
if ('function' == typeof fallback) return fallback({
|
|
820
951
|
error,
|
|
821
952
|
resetErrorBoundary: this.reset
|
|
822
953
|
});
|
|
823
|
-
return null != fallback ? fallback :
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
action: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_default(), {
|
|
827
|
-
onClick: this.reset,
|
|
828
|
-
children: "Try again"
|
|
829
|
-
})
|
|
954
|
+
return null != fallback ? fallback : defaultFallback({
|
|
955
|
+
error,
|
|
956
|
+
resetErrorBoundary: this.reset
|
|
830
957
|
});
|
|
831
958
|
}
|
|
832
959
|
constructor(...args){
|
|
@@ -960,7 +1087,6 @@ const InlineMessage = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
|
|
|
960
1087
|
"style",
|
|
961
1088
|
"children"
|
|
962
1089
|
]), [ref] = _rest;
|
|
963
|
-
const Icon = statusIcons[status];
|
|
964
1090
|
const classes = className ? `${inlineMessage({
|
|
965
1091
|
status
|
|
966
1092
|
})} ${className}` : inlineMessage({
|
|
@@ -982,23 +1108,35 @@ const InlineMessage = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
|
|
|
982
1108
|
px,
|
|
983
1109
|
py
|
|
984
1110
|
}), style);
|
|
985
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
children
|
|
997
|
-
]
|
|
998
|
-
}));
|
|
1111
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StatusProvider, {
|
|
1112
|
+
value: status,
|
|
1113
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", InlineMessage_object_spread_props(InlineMessage_object_spread({
|
|
1114
|
+
ref: ref,
|
|
1115
|
+
role: "alert",
|
|
1116
|
+
className: classes,
|
|
1117
|
+
style: computedStyle
|
|
1118
|
+
}, rest), {
|
|
1119
|
+
children: children
|
|
1120
|
+
}))
|
|
1121
|
+
});
|
|
999
1122
|
});
|
|
1000
1123
|
InlineMessage.displayName = 'InlineMessage';
|
|
1001
1124
|
const inline_message_InlineMessage = InlineMessage;
|
|
1125
|
+
const InlineMessageIcon = (_0)=>{
|
|
1126
|
+
let { className, children } = _0, rest = InlineMessage_object_without_properties(_0, [
|
|
1127
|
+
"className",
|
|
1128
|
+
"children"
|
|
1129
|
+
]);
|
|
1130
|
+
const status = useStatusContext();
|
|
1131
|
+
const StatusIcon = statusIcons[status];
|
|
1132
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", InlineMessage_object_spread_props(InlineMessage_object_spread({
|
|
1133
|
+
className: className ? `${InlineMessage_css_icon} ${className}` : InlineMessage_css_icon,
|
|
1134
|
+
"aria-hidden": "true"
|
|
1135
|
+
}, rest), {
|
|
1136
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StatusIcon, {})
|
|
1137
|
+
}));
|
|
1138
|
+
};
|
|
1139
|
+
InlineMessageIcon.displayName = 'InlineMessageIcon';
|
|
1002
1140
|
var spinner = createRuntimeFn({
|
|
1003
1141
|
defaultClassName: '_8naz5u1',
|
|
1004
1142
|
variantClassNames: {
|
|
@@ -1207,6 +1345,7 @@ function LoadingOverlay_object_without_properties_loose(source, excluded) {
|
|
|
1207
1345
|
}
|
|
1208
1346
|
return target;
|
|
1209
1347
|
}
|
|
1348
|
+
const LoadingOverlayContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(false);
|
|
1210
1349
|
const LoadingOverlay = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
1211
1350
|
let _ref = [
|
|
1212
1351
|
_0,
|
|
@@ -1217,26 +1356,43 @@ const LoadingOverlay = /*#__PURE__*/ (0, external_react_namespaceObject.forwardR
|
|
|
1217
1356
|
"children"
|
|
1218
1357
|
]), [ref] = _rest;
|
|
1219
1358
|
const classes = className ? `${wrapper} ${className}` : wrapper;
|
|
1220
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
1230
|
-
className: backdrop
|
|
1231
|
-
}),
|
|
1232
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(spinner_Spinner, {})
|
|
1233
|
-
]
|
|
1234
|
-
}) : null
|
|
1235
|
-
]
|
|
1236
|
-
}));
|
|
1359
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(LoadingOverlayContext.Provider, {
|
|
1360
|
+
value: visible,
|
|
1361
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(box_default(), LoadingOverlay_object_spread_props(LoadingOverlay_object_spread({
|
|
1362
|
+
ref: ref,
|
|
1363
|
+
className: classes
|
|
1364
|
+
}, rest), {
|
|
1365
|
+
children: children
|
|
1366
|
+
}))
|
|
1367
|
+
});
|
|
1237
1368
|
});
|
|
1238
1369
|
LoadingOverlay.displayName = 'LoadingOverlay';
|
|
1239
1370
|
const loading_overlay_LoadingOverlay = LoadingOverlay;
|
|
1371
|
+
const LoadingOverlayBackdrop = (_0)=>{
|
|
1372
|
+
let { className } = _0, rest = LoadingOverlay_object_without_properties(_0, [
|
|
1373
|
+
"className"
|
|
1374
|
+
]);
|
|
1375
|
+
const visible = (0, external_react_namespaceObject.useContext)(LoadingOverlayContext);
|
|
1376
|
+
if (!visible) return null;
|
|
1377
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", LoadingOverlay_object_spread({
|
|
1378
|
+
className: className ? `${backdrop} ${className}` : backdrop
|
|
1379
|
+
}, rest));
|
|
1380
|
+
};
|
|
1381
|
+
LoadingOverlayBackdrop.displayName = 'LoadingOverlayBackdrop';
|
|
1382
|
+
const LoadingOverlayContent = (_0)=>{
|
|
1383
|
+
let { className, children } = _0, rest = LoadingOverlay_object_without_properties(_0, [
|
|
1384
|
+
"className",
|
|
1385
|
+
"children"
|
|
1386
|
+
]);
|
|
1387
|
+
const visible = (0, external_react_namespaceObject.useContext)(LoadingOverlayContext);
|
|
1388
|
+
if (!visible) return null;
|
|
1389
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", LoadingOverlay_object_spread_props(LoadingOverlay_object_spread({
|
|
1390
|
+
className: className ? `${overlay} ${className}` : overlay
|
|
1391
|
+
}, rest), {
|
|
1392
|
+
children: null != children ? children : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(spinner_Spinner, {})
|
|
1393
|
+
}));
|
|
1394
|
+
};
|
|
1395
|
+
LoadingOverlayContent.displayName = 'LoadingOverlayContent';
|
|
1240
1396
|
var ProgressBar_css_fill = '_1ie0lek1';
|
|
1241
1397
|
var ProgressBar_css_track = '_1ie0lek0';
|
|
1242
1398
|
function ProgressBar_define_property(obj, key, value) {
|
|
@@ -1262,25 +1418,6 @@ function ProgressBar_object_spread(target) {
|
|
|
1262
1418
|
}
|
|
1263
1419
|
return target;
|
|
1264
1420
|
}
|
|
1265
|
-
function ProgressBar_ownKeys(object, enumerableOnly) {
|
|
1266
|
-
var keys = Object.keys(object);
|
|
1267
|
-
if (Object.getOwnPropertySymbols) {
|
|
1268
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1269
|
-
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
1270
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1271
|
-
});
|
|
1272
|
-
keys.push.apply(keys, symbols);
|
|
1273
|
-
}
|
|
1274
|
-
return keys;
|
|
1275
|
-
}
|
|
1276
|
-
function ProgressBar_object_spread_props(target, source) {
|
|
1277
|
-
source = null != source ? source : {};
|
|
1278
|
-
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1279
|
-
else ProgressBar_ownKeys(Object(source)).forEach(function(key) {
|
|
1280
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1281
|
-
});
|
|
1282
|
-
return target;
|
|
1283
|
-
}
|
|
1284
1421
|
function ProgressBar_object_without_properties(source, excluded) {
|
|
1285
1422
|
if (null == source) return {};
|
|
1286
1423
|
var target = {}, sourceKeys, key, i;
|
|
@@ -1317,37 +1454,83 @@ function ProgressBar_object_without_properties_loose(source, excluded) {
|
|
|
1317
1454
|
}
|
|
1318
1455
|
return target;
|
|
1319
1456
|
}
|
|
1457
|
+
const ProgressBarContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({
|
|
1458
|
+
value: 0,
|
|
1459
|
+
max: 100
|
|
1460
|
+
});
|
|
1320
1461
|
const ProgressBar = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
1321
1462
|
let _ref = [
|
|
1322
1463
|
_0,
|
|
1323
1464
|
_1
|
|
1324
|
-
], [_ref1, ..._rest] = _ref, { value, max = 100, className, style } = _ref1, rest = ProgressBar_object_without_properties(_ref1, [
|
|
1465
|
+
], [_ref1, ..._rest] = _ref, { value, max = 100, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style } = _ref1, rest = ProgressBar_object_without_properties(_ref1, [
|
|
1325
1466
|
"value",
|
|
1326
1467
|
"max",
|
|
1468
|
+
"m",
|
|
1469
|
+
"mt",
|
|
1470
|
+
"mr",
|
|
1471
|
+
"mb",
|
|
1472
|
+
"ml",
|
|
1473
|
+
"mx",
|
|
1474
|
+
"my",
|
|
1475
|
+
"p",
|
|
1476
|
+
"pt",
|
|
1477
|
+
"pr",
|
|
1478
|
+
"pb",
|
|
1479
|
+
"pl",
|
|
1480
|
+
"px",
|
|
1481
|
+
"py",
|
|
1327
1482
|
"className",
|
|
1328
1483
|
"style"
|
|
1329
1484
|
]), [ref] = _rest;
|
|
1485
|
+
const computedStyle = ProgressBar_object_spread({}, resolveSpacingStyle({
|
|
1486
|
+
m,
|
|
1487
|
+
mt,
|
|
1488
|
+
mr,
|
|
1489
|
+
mb,
|
|
1490
|
+
ml,
|
|
1491
|
+
mx,
|
|
1492
|
+
my,
|
|
1493
|
+
p,
|
|
1494
|
+
pt,
|
|
1495
|
+
pr,
|
|
1496
|
+
pb,
|
|
1497
|
+
pl,
|
|
1498
|
+
px,
|
|
1499
|
+
py
|
|
1500
|
+
}), style);
|
|
1330
1501
|
const classes = className ? `${ProgressBar_css_track} ${className}` : ProgressBar_css_track;
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
width: `${String(percent)}%`
|
|
1345
|
-
}
|
|
1346
|
-
})
|
|
1347
|
-
}));
|
|
1502
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProgressBarContext.Provider, {
|
|
1503
|
+
value: {
|
|
1504
|
+
value,
|
|
1505
|
+
max
|
|
1506
|
+
},
|
|
1507
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_progress_namespaceObject.Root, ProgressBar_object_spread({
|
|
1508
|
+
ref: ref,
|
|
1509
|
+
value: value,
|
|
1510
|
+
max: max,
|
|
1511
|
+
className: classes,
|
|
1512
|
+
style: computedStyle
|
|
1513
|
+
}, rest))
|
|
1514
|
+
});
|
|
1348
1515
|
});
|
|
1349
1516
|
ProgressBar.displayName = 'ProgressBar';
|
|
1350
1517
|
const progress_bar_ProgressBar = ProgressBar;
|
|
1518
|
+
const ProgressBarIndicator = (_0)=>{
|
|
1519
|
+
let { className, style } = _0, rest = ProgressBar_object_without_properties(_0, [
|
|
1520
|
+
"className",
|
|
1521
|
+
"style"
|
|
1522
|
+
]);
|
|
1523
|
+
const { value, max } = (0, external_react_namespaceObject.useContext)(ProgressBarContext);
|
|
1524
|
+
const percent = Math.min(100, Math.max(0, value / max * 100));
|
|
1525
|
+
const classes = className ? `${ProgressBar_css_fill} ${className}` : ProgressBar_css_fill;
|
|
1526
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_progress_namespaceObject.Indicator, ProgressBar_object_spread({
|
|
1527
|
+
className: classes,
|
|
1528
|
+
style: ProgressBar_object_spread({
|
|
1529
|
+
transform: `translateX(-${String(100 - percent)}%)`
|
|
1530
|
+
}, style)
|
|
1531
|
+
}, rest));
|
|
1532
|
+
};
|
|
1533
|
+
ProgressBarIndicator.displayName = 'ProgressBarIndicator';
|
|
1351
1534
|
var hiddenContent = 'i625lp6';
|
|
1352
1535
|
var Skeleton_css_overlay = 'i625lp5';
|
|
1353
1536
|
var skeleton = createRuntimeFn({
|
|
@@ -1492,15 +1675,29 @@ const Skeleton = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_
|
|
|
1492
1675
|
});
|
|
1493
1676
|
Skeleton.displayName = 'Skeleton';
|
|
1494
1677
|
const skeleton_Skeleton = Skeleton;
|
|
1495
|
-
|
|
1496
|
-
var
|
|
1497
|
-
var
|
|
1498
|
-
var
|
|
1499
|
-
var
|
|
1500
|
-
var
|
|
1501
|
-
var
|
|
1502
|
-
var
|
|
1503
|
-
|
|
1678
|
+
const react_toast_namespaceObject = require("@radix-ui/react-toast");
|
|
1679
|
+
var action = '_1xil9gel';
|
|
1680
|
+
var Toaster_css_body = '_1xil9geh';
|
|
1681
|
+
var closeButton = '_1xil9gek';
|
|
1682
|
+
var Toaster_css_description = '_1xil9gej';
|
|
1683
|
+
var Toaster_css_icon = '_1xil9geg';
|
|
1684
|
+
var Toaster_css_title = '_1xil9gei';
|
|
1685
|
+
var toastCard = createRuntimeFn({
|
|
1686
|
+
defaultClassName: '_1xil9geb',
|
|
1687
|
+
variantClassNames: {
|
|
1688
|
+
status: {
|
|
1689
|
+
info: '_1xil9gec',
|
|
1690
|
+
success: '_1xil9ged',
|
|
1691
|
+
warning: '_1xil9gee',
|
|
1692
|
+
error: '_1xil9gef'
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
defaultVariants: {
|
|
1696
|
+
status: 'info'
|
|
1697
|
+
},
|
|
1698
|
+
compoundVariants: []
|
|
1699
|
+
});
|
|
1700
|
+
var viewport = createRuntimeFn({
|
|
1504
1701
|
defaultClassName: '_1xil9ge0',
|
|
1505
1702
|
variantClassNames: {
|
|
1506
1703
|
position: {
|
|
@@ -1517,22 +1714,152 @@ var stack = createRuntimeFn({
|
|
|
1517
1714
|
},
|
|
1518
1715
|
compoundVariants: []
|
|
1519
1716
|
});
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1717
|
+
function ToasterItem_define_property(obj, key, value) {
|
|
1718
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
1719
|
+
value: value,
|
|
1720
|
+
enumerable: true,
|
|
1721
|
+
configurable: true,
|
|
1722
|
+
writable: true
|
|
1723
|
+
});
|
|
1724
|
+
else obj[key] = value;
|
|
1725
|
+
return obj;
|
|
1726
|
+
}
|
|
1727
|
+
function ToasterItem_object_spread(target) {
|
|
1728
|
+
for(var i = 1; i < arguments.length; i++){
|
|
1729
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
1730
|
+
var ownKeys = Object.keys(source);
|
|
1731
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1732
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1733
|
+
}));
|
|
1734
|
+
ownKeys.forEach(function(key) {
|
|
1735
|
+
ToasterItem_define_property(target, key, source[key]);
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
return target;
|
|
1739
|
+
}
|
|
1740
|
+
function ToasterItem_object_without_properties(source, excluded) {
|
|
1741
|
+
if (null == source) return {};
|
|
1742
|
+
var target = {}, sourceKeys, key, i;
|
|
1743
|
+
if ("u" > typeof Reflect && Reflect.ownKeys) {
|
|
1744
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
1745
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1746
|
+
key = sourceKeys[i];
|
|
1747
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
1748
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
1749
|
+
}
|
|
1529
1750
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1751
|
+
return target;
|
|
1752
|
+
}
|
|
1753
|
+
target = ToasterItem_object_without_properties_loose(source, excluded);
|
|
1754
|
+
if (Object.getOwnPropertySymbols) {
|
|
1755
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
1756
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1757
|
+
key = sourceKeys[i];
|
|
1758
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
1759
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
return target;
|
|
1764
|
+
}
|
|
1765
|
+
function ToasterItem_object_without_properties_loose(source, excluded) {
|
|
1766
|
+
if (null == source) return {};
|
|
1767
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
1768
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1769
|
+
key = sourceKeys[i];
|
|
1770
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
1771
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
return target;
|
|
1775
|
+
}
|
|
1776
|
+
const ToastTitle = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
1777
|
+
let _ref = [
|
|
1778
|
+
_0,
|
|
1779
|
+
_1
|
|
1780
|
+
], [_ref1, ..._rest] = _ref, { className } = _ref1, rest = ToasterItem_object_without_properties(_ref1, [
|
|
1781
|
+
"className"
|
|
1782
|
+
]), [ref] = _rest;
|
|
1783
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toast_namespaceObject.Title, ToasterItem_object_spread({
|
|
1784
|
+
ref: ref,
|
|
1785
|
+
className: className ? `${Toaster_css_title} ${className}` : Toaster_css_title
|
|
1786
|
+
}, rest));
|
|
1787
|
+
});
|
|
1788
|
+
ToastTitle.displayName = 'ToastTitle';
|
|
1789
|
+
const ToastDescription = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
1790
|
+
let _ref = [
|
|
1791
|
+
_0,
|
|
1792
|
+
_1
|
|
1793
|
+
], [_ref1, ..._rest] = _ref, { className } = _ref1, rest = ToasterItem_object_without_properties(_ref1, [
|
|
1794
|
+
"className"
|
|
1795
|
+
]), [ref] = _rest;
|
|
1796
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toast_namespaceObject.Description, ToasterItem_object_spread({
|
|
1797
|
+
ref: ref,
|
|
1798
|
+
className: className ? `${Toaster_css_description} ${className}` : Toaster_css_description
|
|
1799
|
+
}, rest));
|
|
1800
|
+
});
|
|
1801
|
+
ToastDescription.displayName = "ToastDescription";
|
|
1802
|
+
const ToastAction = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
1803
|
+
let _ref = [
|
|
1804
|
+
_0,
|
|
1805
|
+
_1
|
|
1806
|
+
], [_ref1, ..._rest] = _ref, { className } = _ref1, rest = ToasterItem_object_without_properties(_ref1, [
|
|
1807
|
+
"className"
|
|
1808
|
+
]), [ref] = _rest;
|
|
1809
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toast_namespaceObject.Action, ToasterItem_object_spread({
|
|
1810
|
+
ref: ref,
|
|
1811
|
+
className: className ? `${action} ${className}` : action
|
|
1812
|
+
}, rest));
|
|
1535
1813
|
});
|
|
1814
|
+
ToastAction.displayName = 'ToastAction';
|
|
1815
|
+
const ToastClose = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
1816
|
+
let _ref = [
|
|
1817
|
+
_0,
|
|
1818
|
+
_1
|
|
1819
|
+
], [_ref1, ..._rest] = _ref, { className } = _ref1, rest = ToasterItem_object_without_properties(_ref1, [
|
|
1820
|
+
"className"
|
|
1821
|
+
]), [ref] = _rest;
|
|
1822
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toast_namespaceObject.Close, ToasterItem_object_spread({
|
|
1823
|
+
ref: ref,
|
|
1824
|
+
className: className ? `${closeButton} ${className}` : closeButton
|
|
1825
|
+
}, rest));
|
|
1826
|
+
});
|
|
1827
|
+
ToastClose.displayName = 'ToastClose';
|
|
1828
|
+
const ToasterItem = ({ status, title: itemTitle, description: itemDescription, duration, open, edge, onOpenChange })=>{
|
|
1829
|
+
const Icon = statusIcons[status];
|
|
1830
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_toast_namespaceObject.Root, {
|
|
1831
|
+
className: toastCard({
|
|
1832
|
+
status
|
|
1833
|
+
}),
|
|
1834
|
+
"data-edge": edge,
|
|
1835
|
+
open: open,
|
|
1836
|
+
duration: 0 === duration ? 1 / 0 : duration,
|
|
1837
|
+
onOpenChange: onOpenChange,
|
|
1838
|
+
forceMount: true,
|
|
1839
|
+
children: [
|
|
1840
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
|
|
1841
|
+
className: Toaster_css_icon,
|
|
1842
|
+
"aria-hidden": "true"
|
|
1843
|
+
}),
|
|
1844
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
1845
|
+
className: Toaster_css_body,
|
|
1846
|
+
children: [
|
|
1847
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToastTitle, {
|
|
1848
|
+
children: itemTitle
|
|
1849
|
+
}),
|
|
1850
|
+
itemDescription ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToastDescription, {
|
|
1851
|
+
children: itemDescription
|
|
1852
|
+
}) : null
|
|
1853
|
+
]
|
|
1854
|
+
}),
|
|
1855
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToastClose, {
|
|
1856
|
+
"aria-label": "Dismiss",
|
|
1857
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.XIcon, {})
|
|
1858
|
+
})
|
|
1859
|
+
]
|
|
1860
|
+
});
|
|
1861
|
+
};
|
|
1862
|
+
const toaster_ToasterItem = ToasterItem;
|
|
1536
1863
|
function toastStore_define_property(obj, key, value) {
|
|
1537
1864
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
1538
1865
|
value: value,
|
|
@@ -1599,7 +1926,7 @@ const show = (options)=>{
|
|
|
1599
1926
|
title: options.title,
|
|
1600
1927
|
description: options.description,
|
|
1601
1928
|
duration: null != (_options_duration = options.duration) ? _options_duration : 4000,
|
|
1602
|
-
|
|
1929
|
+
open: true
|
|
1603
1930
|
};
|
|
1604
1931
|
toasts = [
|
|
1605
1932
|
...toasts,
|
|
@@ -1610,9 +1937,9 @@ const show = (options)=>{
|
|
|
1610
1937
|
};
|
|
1611
1938
|
const dismiss = (id)=>{
|
|
1612
1939
|
const target = toasts.find((item)=>item.id === id);
|
|
1613
|
-
if (!target
|
|
1940
|
+
if (!(null == target ? void 0 : target.open)) return;
|
|
1614
1941
|
toasts = toasts.map((item)=>item.id === id ? toastStore_object_spread_props(toastStore_object_spread({}, item), {
|
|
1615
|
-
|
|
1942
|
+
open: false
|
|
1616
1943
|
}) : item);
|
|
1617
1944
|
notify();
|
|
1618
1945
|
setTimeout(()=>{
|
|
@@ -1624,57 +1951,6 @@ const toast = {
|
|
|
1624
1951
|
show,
|
|
1625
1952
|
dismiss
|
|
1626
1953
|
};
|
|
1627
|
-
const ToastItemView = ({ id, status, title: itemTitle, description: itemDescription, duration, exiting, edge })=>{
|
|
1628
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
1629
|
-
if (duration <= 0) return;
|
|
1630
|
-
const timer = setTimeout(()=>{
|
|
1631
|
-
dismiss(id);
|
|
1632
|
-
}, duration);
|
|
1633
|
-
return ()=>{
|
|
1634
|
-
clearTimeout(timer);
|
|
1635
|
-
};
|
|
1636
|
-
}, [
|
|
1637
|
-
id,
|
|
1638
|
-
duration
|
|
1639
|
-
]);
|
|
1640
|
-
const Icon = statusIcons[status];
|
|
1641
|
-
const animationClass = exiting ? 'top' === edge ? exitToTop : exitToBottom : 'top' === edge ? enterFromTop : enterFromBottom;
|
|
1642
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
1643
|
-
className: `${toastCard({
|
|
1644
|
-
status
|
|
1645
|
-
})} ${animationClass}`,
|
|
1646
|
-
role: "status",
|
|
1647
|
-
children: [
|
|
1648
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
|
|
1649
|
-
className: Toaster_css_icon,
|
|
1650
|
-
"aria-hidden": "true"
|
|
1651
|
-
}),
|
|
1652
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
1653
|
-
className: Toaster_css_body,
|
|
1654
|
-
children: [
|
|
1655
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
1656
|
-
className: Toaster_css_title,
|
|
1657
|
-
children: itemTitle
|
|
1658
|
-
}),
|
|
1659
|
-
itemDescription ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
1660
|
-
className: Toaster_css_description,
|
|
1661
|
-
children: itemDescription
|
|
1662
|
-
}) : null
|
|
1663
|
-
]
|
|
1664
|
-
}),
|
|
1665
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
1666
|
-
type: "button",
|
|
1667
|
-
className: closeButton,
|
|
1668
|
-
onClick: ()=>{
|
|
1669
|
-
dismiss(id);
|
|
1670
|
-
},
|
|
1671
|
-
"aria-label": "Dismiss",
|
|
1672
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.XIcon, {})
|
|
1673
|
-
})
|
|
1674
|
-
]
|
|
1675
|
-
});
|
|
1676
|
-
};
|
|
1677
|
-
const toaster_ToastItemView = ToastItemView;
|
|
1678
1954
|
function Toaster_define_property(obj, key, value) {
|
|
1679
1955
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
1680
1956
|
value: value,
|
|
@@ -1721,40 +1997,88 @@ const emptySnapshot = [];
|
|
|
1721
1997
|
const Toaster = ({ position = 'bottom-right' })=>{
|
|
1722
1998
|
const items = (0, external_react_namespaceObject.useSyncExternalStore)(subscribe, getSnapshot, ()=>emptySnapshot);
|
|
1723
1999
|
const edge = position.startsWith('top') ? 'top' : 'bottom';
|
|
1724
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
2000
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_toast_namespaceObject.Provider, {
|
|
2001
|
+
duration: 4000,
|
|
2002
|
+
children: [
|
|
2003
|
+
items.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(toaster_ToasterItem, Toaster_object_spread_props(Toaster_object_spread({}, item), {
|
|
2004
|
+
edge: edge,
|
|
2005
|
+
onOpenChange: (open)=>{
|
|
2006
|
+
if (!open) dismiss(item.id);
|
|
2007
|
+
}
|
|
2008
|
+
}), item.id)),
|
|
2009
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toast_namespaceObject.Viewport, {
|
|
2010
|
+
className: viewport({
|
|
2011
|
+
position
|
|
2012
|
+
})
|
|
2013
|
+
})
|
|
2014
|
+
]
|
|
1731
2015
|
});
|
|
1732
2016
|
};
|
|
1733
2017
|
Toaster.displayName = 'Toaster';
|
|
1734
2018
|
const toaster_Toaster = Toaster;
|
|
1735
2019
|
exports.Alert = __webpack_exports__.Alert;
|
|
2020
|
+
exports.AlertBody = __webpack_exports__.AlertBody;
|
|
2021
|
+
exports.AlertDescription = __webpack_exports__.AlertDescription;
|
|
2022
|
+
exports.AlertIcon = __webpack_exports__.AlertIcon;
|
|
2023
|
+
exports.AlertTitle = __webpack_exports__.AlertTitle;
|
|
1736
2024
|
exports.Banner = __webpack_exports__.Banner;
|
|
2025
|
+
exports.BannerIcon = __webpack_exports__.BannerIcon;
|
|
1737
2026
|
exports.CircularProgress = __webpack_exports__.CircularProgress;
|
|
2027
|
+
exports.CircularProgressIndicator = __webpack_exports__.CircularProgressIndicator;
|
|
1738
2028
|
exports.EmptyState = __webpack_exports__.EmptyState;
|
|
2029
|
+
exports.EmptyStateAction = __webpack_exports__.EmptyStateAction;
|
|
2030
|
+
exports.EmptyStateDescription = __webpack_exports__.EmptyStateDescription;
|
|
2031
|
+
exports.EmptyStateIcon = __webpack_exports__.EmptyStateIcon;
|
|
2032
|
+
exports.EmptyStateTitle = __webpack_exports__.EmptyStateTitle;
|
|
1739
2033
|
exports.ErrorBoundary = __webpack_exports__.ErrorBoundary;
|
|
2034
|
+
exports.ErrorBoundaryContent = __webpack_exports__.ErrorBoundaryContent;
|
|
2035
|
+
exports.ErrorBoundaryFallback = __webpack_exports__.ErrorBoundaryFallback;
|
|
1740
2036
|
exports.InlineMessage = __webpack_exports__.InlineMessage;
|
|
2037
|
+
exports.InlineMessageIcon = __webpack_exports__.InlineMessageIcon;
|
|
1741
2038
|
exports.LoadingOverlay = __webpack_exports__.LoadingOverlay;
|
|
2039
|
+
exports.LoadingOverlayBackdrop = __webpack_exports__.LoadingOverlayBackdrop;
|
|
2040
|
+
exports.LoadingOverlayContent = __webpack_exports__.LoadingOverlayContent;
|
|
1742
2041
|
exports.ProgressBar = __webpack_exports__.ProgressBar;
|
|
2042
|
+
exports.ProgressBarIndicator = __webpack_exports__.ProgressBarIndicator;
|
|
1743
2043
|
exports.Skeleton = __webpack_exports__.Skeleton;
|
|
1744
2044
|
exports.Spinner = __webpack_exports__.Spinner;
|
|
2045
|
+
exports.ToastAction = __webpack_exports__.ToastAction;
|
|
2046
|
+
exports.ToastClose = __webpack_exports__.ToastClose;
|
|
2047
|
+
exports.ToastDescription = __webpack_exports__.ToastDescription;
|
|
2048
|
+
exports.ToastTitle = __webpack_exports__.ToastTitle;
|
|
1745
2049
|
exports.Toaster = __webpack_exports__.Toaster;
|
|
1746
2050
|
exports.toast = __webpack_exports__.toast;
|
|
1747
2051
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
1748
2052
|
"Alert",
|
|
2053
|
+
"AlertBody",
|
|
2054
|
+
"AlertDescription",
|
|
2055
|
+
"AlertIcon",
|
|
2056
|
+
"AlertTitle",
|
|
1749
2057
|
"Banner",
|
|
2058
|
+
"BannerIcon",
|
|
1750
2059
|
"CircularProgress",
|
|
2060
|
+
"CircularProgressIndicator",
|
|
1751
2061
|
"EmptyState",
|
|
2062
|
+
"EmptyStateAction",
|
|
2063
|
+
"EmptyStateDescription",
|
|
2064
|
+
"EmptyStateIcon",
|
|
2065
|
+
"EmptyStateTitle",
|
|
1752
2066
|
"ErrorBoundary",
|
|
2067
|
+
"ErrorBoundaryContent",
|
|
2068
|
+
"ErrorBoundaryFallback",
|
|
1753
2069
|
"InlineMessage",
|
|
2070
|
+
"InlineMessageIcon",
|
|
1754
2071
|
"LoadingOverlay",
|
|
2072
|
+
"LoadingOverlayBackdrop",
|
|
2073
|
+
"LoadingOverlayContent",
|
|
1755
2074
|
"ProgressBar",
|
|
2075
|
+
"ProgressBarIndicator",
|
|
1756
2076
|
"Skeleton",
|
|
1757
2077
|
"Spinner",
|
|
2078
|
+
"ToastAction",
|
|
2079
|
+
"ToastClose",
|
|
2080
|
+
"ToastDescription",
|
|
2081
|
+
"ToastTitle",
|
|
1758
2082
|
"Toaster",
|
|
1759
2083
|
"toast"
|
|
1760
2084
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|