@refinn/core-ui 0.1.16 → 0.1.17
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 +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -553,6 +553,7 @@ var AlertBanner = (0, import_react5.forwardRef)(
|
|
|
553
553
|
const descColorClass = isPage ? pageIsDark ? "text-alert-text-secondary" : "text-alert-text-secondary-inverse" : "text-alert-text-secondary";
|
|
554
554
|
const linkColorClass = isPage ? pageIsDark ? "text-alert-text-primary" : "text-white-100" : "text-enabled";
|
|
555
555
|
const closeButtonSurface = isPage ? "dark" : "default";
|
|
556
|
+
const hasIcon = Boolean(icon) || variant !== "none";
|
|
556
557
|
const containerClasses = [
|
|
557
558
|
"flex font-sans",
|
|
558
559
|
isStacked ? "flex-col items-start gap-8" : "items-center gap-24",
|
|
@@ -561,7 +562,7 @@ var AlertBanner = (0, import_react5.forwardRef)(
|
|
|
561
562
|
className
|
|
562
563
|
].filter(Boolean).join(" ");
|
|
563
564
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", __spreadProps(__spreadValues({ ref, role: "alert", className: containerClasses }, rest), { children: [
|
|
564
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `flex w-full
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `flex w-full gap-8 ${isStacked ? "items-start" : "items-center flex-1 min-w-0"}`, children: [
|
|
565
566
|
icon != null ? icon : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DefaultIcon, { className: `h-20 w-20 shrink-0 ${iconColorClass}` }),
|
|
566
567
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 min-w-0 flex flex-col gap-2", children: [
|
|
567
568
|
title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: `text-label-medium ${titleColorClass}`, children: title }),
|
|
@@ -590,7 +591,7 @@ var AlertBanner = (0, import_react5.forwardRef)(
|
|
|
590
591
|
}
|
|
591
592
|
)
|
|
592
593
|
] }),
|
|
593
|
-
isStacked && buttonAction && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className:
|
|
594
|
+
isStacked && buttonAction && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: `flex w-full items-start gap-12 ${hasIcon ? "pl-28" : ""}`, children: isPage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { variant: "secondary", size: "sm", onClick: buttonAction.onClick, children: buttonAction.label }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
594
595
|
"a",
|
|
595
596
|
{
|
|
596
597
|
href: buttonAction.href,
|
package/dist/index.js
CHANGED
|
@@ -510,6 +510,7 @@ var AlertBanner = forwardRef5(
|
|
|
510
510
|
const descColorClass = isPage ? pageIsDark ? "text-alert-text-secondary" : "text-alert-text-secondary-inverse" : "text-alert-text-secondary";
|
|
511
511
|
const linkColorClass = isPage ? pageIsDark ? "text-alert-text-primary" : "text-white-100" : "text-enabled";
|
|
512
512
|
const closeButtonSurface = isPage ? "dark" : "default";
|
|
513
|
+
const hasIcon = Boolean(icon) || variant !== "none";
|
|
513
514
|
const containerClasses = [
|
|
514
515
|
"flex font-sans",
|
|
515
516
|
isStacked ? "flex-col items-start gap-8" : "items-center gap-24",
|
|
@@ -518,7 +519,7 @@ var AlertBanner = forwardRef5(
|
|
|
518
519
|
className
|
|
519
520
|
].filter(Boolean).join(" ");
|
|
520
521
|
return /* @__PURE__ */ jsxs4("div", __spreadProps(__spreadValues({ ref, role: "alert", className: containerClasses }, rest), { children: [
|
|
521
|
-
/* @__PURE__ */ jsxs4("div", { className: `flex w-full
|
|
522
|
+
/* @__PURE__ */ jsxs4("div", { className: `flex w-full gap-8 ${isStacked ? "items-start" : "items-center flex-1 min-w-0"}`, children: [
|
|
522
523
|
icon != null ? icon : /* @__PURE__ */ jsx5(DefaultIcon, { className: `h-20 w-20 shrink-0 ${iconColorClass}` }),
|
|
523
524
|
/* @__PURE__ */ jsxs4("div", { className: "flex-1 min-w-0 flex flex-col gap-2", children: [
|
|
524
525
|
title && /* @__PURE__ */ jsx5("p", { className: `text-label-medium ${titleColorClass}`, children: title }),
|
|
@@ -547,7 +548,7 @@ var AlertBanner = forwardRef5(
|
|
|
547
548
|
}
|
|
548
549
|
)
|
|
549
550
|
] }),
|
|
550
|
-
isStacked && buttonAction && /* @__PURE__ */ jsx5("div", { className:
|
|
551
|
+
isStacked && buttonAction && /* @__PURE__ */ jsx5("div", { className: `flex w-full items-start gap-12 ${hasIcon ? "pl-28" : ""}`, children: isPage ? /* @__PURE__ */ jsx5(Button, { variant: "secondary", size: "sm", onClick: buttonAction.onClick, children: buttonAction.label }) : /* @__PURE__ */ jsxs4(
|
|
551
552
|
"a",
|
|
552
553
|
{
|
|
553
554
|
href: buttonAction.href,
|