@geomak/ui 7.5.3 → 7.6.0

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
@@ -1630,6 +1630,47 @@ function Badge({
1630
1630
  !hidden && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-1 flex", children: indicator })
1631
1631
  ] });
1632
1632
  }
1633
+ var TONE_BG = {
1634
+ info: "bg-[color-mix(in_srgb,var(--color-info)_12%,transparent)]",
1635
+ success: "bg-[color-mix(in_srgb,var(--color-success)_12%,transparent)]",
1636
+ warning: "bg-[color-mix(in_srgb,var(--color-warning)_15%,transparent)]",
1637
+ danger: "bg-[color-mix(in_srgb,var(--color-error)_12%,transparent)]"
1638
+ };
1639
+ var TONE_FG = {
1640
+ info: "text-status-info",
1641
+ success: "text-status-success",
1642
+ warning: "text-status-warning",
1643
+ danger: "text-status-error"
1644
+ };
1645
+ var DEFAULT_ICON = {
1646
+ info: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.Info, { size: 18 }),
1647
+ success: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.CheckCircle, { size: 18 }),
1648
+ warning: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.Warning, { size: 18 }),
1649
+ danger: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.Error, { size: 18 })
1650
+ };
1651
+ function Banner({ tone, children, icon, onDismiss, className = "" }) {
1652
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1653
+ "div",
1654
+ {
1655
+ role: tone === "warning" || tone === "danger" ? "alert" : "status",
1656
+ className: cx("flex w-full items-start gap-2.5 rounded-md p-3 text-sm text-foreground", TONE_BG[tone], className),
1657
+ children: [
1658
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("mt-0.5 flex h-[18px] w-[18px] flex-shrink-0 items-center justify-center", TONE_FG[tone]), children: icon ?? DEFAULT_ICON[tone] }),
1659
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children }),
1660
+ onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
1661
+ "button",
1662
+ {
1663
+ type: "button",
1664
+ onClick: onDismiss,
1665
+ "aria-label": "Dismiss",
1666
+ className: "-mr-1 -mt-1 flex h-6 w-6 flex-shrink-0 self-start items-center justify-center rounded-md text-foreground-muted transition-colors hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
1667
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.X, { size: 16 })
1668
+ }
1669
+ )
1670
+ ]
1671
+ }
1672
+ );
1673
+ }
1633
1674
  var SIZES = {
1634
1675
  sm: { box: "h-7 w-7 text-xs", center: 14, title: "text-xs", desc: "text-[11px]" },
1635
1676
  md: { box: "h-9 w-9 text-sm", center: 18, title: "text-sm", desc: "text-xs" }
@@ -10345,6 +10386,7 @@ exports.AppShell = AppShell;
10345
10386
  exports.AutoComplete = AutoComplete;
10346
10387
  exports.Avatar = Avatar;
10347
10388
  exports.Badge = Badge;
10389
+ exports.Banner = Banner;
10348
10390
  exports.Blog = Blog;
10349
10391
  exports.Box = Box;
10350
10392
  exports.Breadcrumbs = Breadcrumbs;