@sarunyu/system-one 4.9.18 → 4.9.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/index.cjs CHANGED
@@ -344,8 +344,9 @@ function AlertStatusIcon({
344
344
  if (status === "critical") return /* @__PURE__ */ jsxRuntime.jsx(react.XCircle, { size: 16, weight: "fill", className });
345
345
  return /* @__PURE__ */ jsxRuntime.jsx(react.Info, { size: 16, weight: "fill", className });
346
346
  }
347
- const Alert = React.forwardRef(function Alert2({ status = "normal", message, multiline = false, className }, ref) {
347
+ const Alert = React.forwardRef(function Alert2({ status = "normal", title, message, multiline = false, className }, ref) {
348
348
  const style = alertStyles[status];
349
+ const hasTitle = Boolean(title);
349
350
  return /* @__PURE__ */ jsxRuntime.jsxs(
350
351
  "div",
351
352
  {
@@ -353,23 +354,33 @@ const Alert = React.forwardRef(function Alert2({ status = "normal", message, mul
353
354
  role: "status",
354
355
  className: cn(
355
356
  "flex w-full items-center gap-1.5 rounded px-2 py-1",
356
- multiline && "items-start",
357
+ (multiline || hasTitle) && "items-start",
357
358
  style.container,
358
359
  className
359
360
  ),
360
361
  children: [
361
- /* @__PURE__ */ jsxRuntime.jsx(AlertStatusIcon, { status, className: cn("shrink-0", multiline && "mt-0.5", style.icon) }),
362
362
  /* @__PURE__ */ jsxRuntime.jsx(
363
- "p",
363
+ AlertStatusIcon,
364
364
  {
365
- className: cn(
366
- "min-w-0 flex-1 text-sm leading-5 font-normal",
367
- multiline ? "line-clamp-2" : "truncate",
368
- style.text
369
- ),
370
- children: message
365
+ status,
366
+ className: cn("shrink-0 mt-0.5", style.icon)
371
367
  }
372
- )
368
+ ),
369
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5", children: [
370
+ hasTitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm leading-5 font-medium", style.text), children: title }),
371
+ /* @__PURE__ */ jsxRuntime.jsx(
372
+ "p",
373
+ {
374
+ className: cn(
375
+ "text-sm leading-5 font-normal",
376
+ !hasTitle && !multiline && "truncate",
377
+ !hasTitle && multiline && "line-clamp-2",
378
+ style.text
379
+ ),
380
+ children: message
381
+ }
382
+ )
383
+ ] })
373
384
  ]
374
385
  }
375
386
  );
@@ -4666,7 +4677,7 @@ const Tag = React.forwardRef(function Tag2({
4666
4677
  {
4667
4678
  ref,
4668
4679
  className: cn(
4669
- "inline-flex items-center justify-center rounded-[4px]",
4680
+ "inline-flex w-fit items-center justify-center rounded-[4px]",
4670
4681
  (icon || close) && "gap-[2px]",
4671
4682
  s.container,
4672
4683
  bgClass,
@@ -4719,7 +4730,7 @@ function StatusTag({ type = "stop", text, className }) {
4719
4730
  "div",
4720
4731
  {
4721
4732
  className: cn(
4722
- "inline-flex items-center justify-center gap-1 rounded-[8px] px-2 py-1",
4733
+ "inline-flex w-fit items-center justify-center gap-1 rounded-[8px] px-2 py-1",
4723
4734
  className
4724
4735
  ),
4725
4736
  children: [