@sarunyu/system-one 4.9.18 → 4.9.22

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
@@ -325,8 +325,9 @@ function AlertStatusIcon({
325
325
  if (status === "critical") return /* @__PURE__ */ jsx(XCircle, { size: 16, weight: "fill", className });
326
326
  return /* @__PURE__ */ jsx(Info, { size: 16, weight: "fill", className });
327
327
  }
328
- const Alert = forwardRef(function Alert2({ status = "normal", message, multiline = false, className }, ref) {
328
+ const Alert = forwardRef(function Alert2({ status = "normal", title, message, multiline = false, className }, ref) {
329
329
  const style = alertStyles[status];
330
+ const hasTitle = Boolean(title);
330
331
  return /* @__PURE__ */ jsxs(
331
332
  "div",
332
333
  {
@@ -334,23 +335,33 @@ const Alert = forwardRef(function Alert2({ status = "normal", message, multiline
334
335
  role: "status",
335
336
  className: cn(
336
337
  "flex w-full items-center gap-1.5 rounded px-2 py-1",
337
- multiline && "items-start",
338
+ (multiline || hasTitle) && "items-start",
338
339
  style.container,
339
340
  className
340
341
  ),
341
342
  children: [
342
- /* @__PURE__ */ jsx(AlertStatusIcon, { status, className: cn("shrink-0", multiline && "mt-0.5", style.icon) }),
343
343
  /* @__PURE__ */ jsx(
344
- "p",
344
+ AlertStatusIcon,
345
345
  {
346
- className: cn(
347
- "min-w-0 flex-1 text-sm leading-5 font-normal",
348
- multiline ? "line-clamp-2" : "truncate",
349
- style.text
350
- ),
351
- children: message
346
+ status,
347
+ className: cn("shrink-0 mt-0.5", style.icon)
352
348
  }
353
- )
349
+ ),
350
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5", children: [
351
+ hasTitle && /* @__PURE__ */ jsx("p", { className: cn("text-sm leading-5 font-medium", style.text), children: title }),
352
+ /* @__PURE__ */ jsx(
353
+ "p",
354
+ {
355
+ className: cn(
356
+ "text-sm leading-5 font-normal",
357
+ !hasTitle && !multiline && "truncate",
358
+ !hasTitle && multiline && "line-clamp-2",
359
+ style.text
360
+ ),
361
+ children: message
362
+ }
363
+ )
364
+ ] })
354
365
  ]
355
366
  }
356
367
  );
@@ -4647,7 +4658,7 @@ const Tag = forwardRef(function Tag2({
4647
4658
  {
4648
4659
  ref,
4649
4660
  className: cn(
4650
- "inline-flex items-center justify-center rounded-[4px]",
4661
+ "inline-flex w-fit items-center justify-center rounded-[4px]",
4651
4662
  (icon || close) && "gap-[2px]",
4652
4663
  s.container,
4653
4664
  bgClass,
@@ -4700,7 +4711,7 @@ function StatusTag({ type = "stop", text, className }) {
4700
4711
  "div",
4701
4712
  {
4702
4713
  className: cn(
4703
- "inline-flex items-center justify-center gap-1 rounded-[8px] px-2 py-1",
4714
+ "inline-flex w-fit items-center justify-center gap-1 rounded-[8px] px-2 py-1",
4704
4715
  className
4705
4716
  ),
4706
4717
  children: [