@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.js
CHANGED
|
@@ -52296,20 +52296,65 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
|
|
|
52296
52296
|
scrollable: false,
|
|
52297
52297
|
grow: true,
|
|
52298
52298
|
children: [toasts.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
52299
|
-
className: "fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 pointer-events-none",
|
|
52299
|
+
className: "fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 pointer-events-none w-80",
|
|
52300
52300
|
children: toasts.map(function (t) {
|
|
52301
|
+
var typeStyles = {
|
|
52302
|
+
success: {
|
|
52303
|
+
bg: "bg-emerald-950/95",
|
|
52304
|
+
border: "border-emerald-500",
|
|
52305
|
+
accent: "text-emerald-400",
|
|
52306
|
+
icon: "circle-check"
|
|
52307
|
+
},
|
|
52308
|
+
error: {
|
|
52309
|
+
bg: "bg-rose-950/95",
|
|
52310
|
+
border: "border-rose-500",
|
|
52311
|
+
accent: "text-rose-400",
|
|
52312
|
+
icon: "circle-xmark"
|
|
52313
|
+
},
|
|
52314
|
+
warning: {
|
|
52315
|
+
bg: "bg-amber-950/95",
|
|
52316
|
+
border: "border-amber-500",
|
|
52317
|
+
accent: "text-amber-400",
|
|
52318
|
+
icon: "triangle-exclamation"
|
|
52319
|
+
},
|
|
52320
|
+
info: {
|
|
52321
|
+
bg: "bg-sky-950/95",
|
|
52322
|
+
border: "border-sky-500",
|
|
52323
|
+
accent: "text-sky-400",
|
|
52324
|
+
icon: "circle-info"
|
|
52325
|
+
}
|
|
52326
|
+
};
|
|
52327
|
+
var style = typeStyles[t.type] || typeStyles.info;
|
|
52301
52328
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
52302
|
-
className: "pointer-events-auto",
|
|
52303
|
-
|
|
52304
|
-
|
|
52305
|
-
|
|
52306
|
-
|
|
52307
|
-
|
|
52308
|
-
|
|
52309
|
-
|
|
52329
|
+
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"),
|
|
52330
|
+
role: "status",
|
|
52331
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
52332
|
+
className: "flex items-start gap-3",
|
|
52333
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
52334
|
+
icon: style.icon,
|
|
52335
|
+
className: "h-4 w-4 mt-0.5 flex-shrink-0 ".concat(style.accent)
|
|
52336
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
52337
|
+
className: "flex-1 min-w-0",
|
|
52338
|
+
children: [t.title && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
52339
|
+
className: "font-semibold text-sm ".concat(style.accent),
|
|
52340
|
+
children: t.title
|
|
52341
|
+
}), t.message && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
52342
|
+
className: "text-sm text-white/90 break-words",
|
|
52343
|
+
children: t.message
|
|
52344
|
+
})]
|
|
52345
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
52346
|
+
type: "button",
|
|
52347
|
+
onClick: function onClick() {
|
|
52348
|
+
return setToasts(function (prev) {
|
|
52349
|
+
return prev.filter(function (x) {
|
|
52350
|
+
return x.id !== t.id;
|
|
52351
|
+
});
|
|
52310
52352
|
});
|
|
52311
|
-
}
|
|
52312
|
-
|
|
52353
|
+
},
|
|
52354
|
+
className: "text-white/60 hover:text-white text-lg leading-none flex-shrink-0",
|
|
52355
|
+
"aria-label": "Close toast",
|
|
52356
|
+
children: "\xD7"
|
|
52357
|
+
})]
|
|
52313
52358
|
})
|
|
52314
52359
|
}, t.id);
|
|
52315
52360
|
})
|