@trops/dash-core 0.1.331 → 0.1.332
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/index.esm.js +56 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +56 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -52278,20 +52278,65 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
|
|
|
52278
52278
|
scrollable: false,
|
|
52279
52279
|
grow: true,
|
|
52280
52280
|
children: [toasts.length > 0 && /*#__PURE__*/jsx("div", {
|
|
52281
|
-
className: "fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 pointer-events-none",
|
|
52281
|
+
className: "fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 pointer-events-none w-80",
|
|
52282
52282
|
children: toasts.map(function (t) {
|
|
52283
|
+
var typeStyles = {
|
|
52284
|
+
success: {
|
|
52285
|
+
bg: "bg-emerald-950/95",
|
|
52286
|
+
border: "border-emerald-500",
|
|
52287
|
+
accent: "text-emerald-400",
|
|
52288
|
+
icon: "circle-check"
|
|
52289
|
+
},
|
|
52290
|
+
error: {
|
|
52291
|
+
bg: "bg-rose-950/95",
|
|
52292
|
+
border: "border-rose-500",
|
|
52293
|
+
accent: "text-rose-400",
|
|
52294
|
+
icon: "circle-xmark"
|
|
52295
|
+
},
|
|
52296
|
+
warning: {
|
|
52297
|
+
bg: "bg-amber-950/95",
|
|
52298
|
+
border: "border-amber-500",
|
|
52299
|
+
accent: "text-amber-400",
|
|
52300
|
+
icon: "triangle-exclamation"
|
|
52301
|
+
},
|
|
52302
|
+
info: {
|
|
52303
|
+
bg: "bg-sky-950/95",
|
|
52304
|
+
border: "border-sky-500",
|
|
52305
|
+
accent: "text-sky-400",
|
|
52306
|
+
icon: "circle-info"
|
|
52307
|
+
}
|
|
52308
|
+
};
|
|
52309
|
+
var style = typeStyles[t.type] || typeStyles.info;
|
|
52283
52310
|
return /*#__PURE__*/jsx("div", {
|
|
52284
|
-
className: "pointer-events-auto",
|
|
52285
|
-
|
|
52286
|
-
|
|
52287
|
-
|
|
52288
|
-
|
|
52289
|
-
|
|
52290
|
-
|
|
52291
|
-
|
|
52311
|
+
className: "pointer-events-auto rounded-md border-l-4 ".concat(style.border, " ").concat(style.bg, " shadow-lg p-3 text-white animate-in slide-in-from-right"),
|
|
52312
|
+
role: "status",
|
|
52313
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
52314
|
+
className: "flex items-start gap-3",
|
|
52315
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
52316
|
+
icon: style.icon,
|
|
52317
|
+
className: "h-4 w-4 mt-0.5 flex-shrink-0 ".concat(style.accent)
|
|
52318
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
52319
|
+
className: "flex-1 min-w-0",
|
|
52320
|
+
children: [t.title && /*#__PURE__*/jsx("div", {
|
|
52321
|
+
className: "font-semibold text-sm ".concat(style.accent),
|
|
52322
|
+
children: t.title
|
|
52323
|
+
}), t.message && /*#__PURE__*/jsx("div", {
|
|
52324
|
+
className: "text-sm text-white/90 break-words",
|
|
52325
|
+
children: t.message
|
|
52326
|
+
})]
|
|
52327
|
+
}), /*#__PURE__*/jsx("button", {
|
|
52328
|
+
type: "button",
|
|
52329
|
+
onClick: function onClick() {
|
|
52330
|
+
return setToasts(function (prev) {
|
|
52331
|
+
return prev.filter(function (x) {
|
|
52332
|
+
return x.id !== t.id;
|
|
52333
|
+
});
|
|
52292
52334
|
});
|
|
52293
|
-
}
|
|
52294
|
-
|
|
52335
|
+
},
|
|
52336
|
+
className: "text-white/60 hover:text-white text-lg leading-none flex-shrink-0",
|
|
52337
|
+
"aria-label": "Close toast",
|
|
52338
|
+
children: "\xD7"
|
|
52339
|
+
})]
|
|
52295
52340
|
})
|
|
52296
52341
|
}, t.id);
|
|
52297
52342
|
})
|