@stenajs-webui/elements 21.25.0 → 21.26.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.
@@ -1,10 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { ReactNode } from "react";
3
3
  import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
4
+ import { HeadingVariant } from "@stenajs-webui/core";
4
5
  export type BannerVariant = "standard" | "info" | "success" | "warning" | "error";
5
6
  export interface BannerProps {
6
7
  icon?: IconDefinition;
7
8
  headerText?: string;
9
+ headingLevel?: HeadingVariant;
8
10
  text?: string;
9
11
  loading?: boolean;
10
12
  contentRight?: ReactNode;
package/dist/index.es.js CHANGED
@@ -3732,43 +3732,44 @@ const K1 = ({
3732
3732
  error: o1
3733
3733
  }, p1 = "56px", z2 = ({
3734
3734
  headerText: n,
3735
- text: L,
3736
- children: e,
3737
- contentRight: i,
3738
- icon: o,
3739
- variant: a = "standard",
3740
- loading: t = !1,
3741
- ...c
3735
+ headingLevel: L,
3736
+ text: e,
3737
+ children: i,
3738
+ contentRight: o,
3739
+ icon: a,
3740
+ variant: t = "standard",
3741
+ loading: c = !1,
3742
+ ...s
3742
3743
  }) => /* @__PURE__ */ r(
3743
3744
  _,
3744
3745
  {
3745
- className: l(F.banner, F[a]),
3746
- spacing: e || n && L ? 2 : 1,
3746
+ className: l(F.banner, F[t]),
3747
+ spacing: i || n && e ? 2 : 1,
3747
3748
  indent: 2,
3748
- ...H(c),
3749
+ ...H(s),
3749
3750
  children: [
3750
3751
  /* @__PURE__ */ r(Z, { justifyContent: "space-between", children: [
3751
- /* @__PURE__ */ C(Z, { flex: "none", width: p1, alignItems: "center", children: /* @__PURE__ */ C("div", { className: F.iconBackground, children: (o || f1[a] || t) && /* @__PURE__ */ C(B, { children: t ? /* @__PURE__ */ C(S1, { size: "tiny" }) : /* @__PURE__ */ C(
3752
+ /* @__PURE__ */ C(Z, { flex: "none", width: p1, alignItems: "center", children: /* @__PURE__ */ C("div", { className: F.iconBackground, children: (a || f1[t] || c) && /* @__PURE__ */ C(B, { children: c ? /* @__PURE__ */ C(S1, { size: "tiny" }) : /* @__PURE__ */ C(
3752
3753
  z,
3753
3754
  {
3754
- icon: o ?? f1[a],
3755
+ icon: a ?? f1[t],
3755
3756
  size: 20,
3756
3757
  className: F.icon
3757
3758
  }
3758
3759
  ) }) }) }),
3759
3760
  /* @__PURE__ */ r(Z, { justifyContent: "space-between", flexGrow: 1, gap: !0, children: [
3760
3761
  /* @__PURE__ */ r(_, { justifyContent: "center", gap: !0, children: [
3761
- n && /* @__PURE__ */ C(X, { variant: "h5", children: n }),
3762
- L && /* @__PURE__ */ C(k, { children: L })
3762
+ n && /* @__PURE__ */ C(X, { variant: "h5", as: L, children: n }),
3763
+ e && /* @__PURE__ */ C(k, { children: e })
3763
3764
  ] }),
3764
- i && /* @__PURE__ */ C(_, { justifyContent: "center", children: i })
3765
+ o && /* @__PURE__ */ C(_, { justifyContent: "center", children: o })
3765
3766
  ] })
3766
3767
  ] }),
3767
- e && /* @__PURE__ */ r(Z, { children: [
3768
+ i && /* @__PURE__ */ r(Z, { children: [
3768
3769
  /* @__PURE__ */ C(p, { minWidth: p1 }),
3769
3770
  /* @__PURE__ */ r(p, { children: [
3770
3771
  /* @__PURE__ */ C(I, {}),
3771
- e
3772
+ i
3772
3773
  ] })
3773
3774
  ] })
3774
3775
  ]