@trops/dash-core 0.1.332 → 0.1.333

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.js CHANGED
@@ -52298,63 +52298,19 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
52298
52298
  children: [toasts.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
52299
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;
52328
52301
  return /*#__PURE__*/jsxRuntime.jsx("div", {
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
- });
52302
+ className: "pointer-events-auto",
52303
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Toast, {
52304
+ type: t.type,
52305
+ title: t.title,
52306
+ message: t.message,
52307
+ onClose: function onClose() {
52308
+ return setToasts(function (prev) {
52309
+ return prev.filter(function (x) {
52310
+ return x.id !== t.id;
52352
52311
  });
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
- })]
52312
+ });
52313
+ }
52358
52314
  })
52359
52315
  }, t.id);
52360
52316
  })