@selectwin/kit 0.1.196 → 0.1.197
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/SelectBalanceCard.d.ts +3 -0
- package/dist/index.js +43 -40
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,9 @@ export interface SelectBalanceMeta {
|
|
|
22
22
|
export interface SelectBalanceCardProps {
|
|
23
23
|
availableCents: number | string | null | undefined;
|
|
24
24
|
availableLabel?: string;
|
|
25
|
+
/** hero: o "i" ao lado do rótulo do saldo (0.1.197) — "Os próximos recebíveis abatem sozinhos" sob o saldo devedor.
|
|
26
|
+
* A explicação não ocupa a linha do "Atualizado…" (dono, 03/11/2026: a explicação vai no tooltip). */
|
|
27
|
+
availableHelp?: ReactNode;
|
|
25
28
|
/** Period-over-period variation of the available balance (percentage). `card` only. */
|
|
26
29
|
delta?: number | null;
|
|
27
30
|
buckets?: SelectBalanceBucket[];
|
package/dist/index.js
CHANGED
|
@@ -12715,19 +12715,19 @@ var Mu = "allow-scripts allow-same-origin allow-forms", Nu = 390, Pu = 1280, Fu
|
|
|
12715
12715
|
})
|
|
12716
12716
|
})]
|
|
12717
12717
|
});
|
|
12718
|
-
}), Iu = r(function({ availableCents: e, availableLabel: t = "Saldo disponível",
|
|
12719
|
-
if (
|
|
12720
|
-
let
|
|
12718
|
+
}), Iu = r(function({ availableCents: e, availableLabel: t = "Saldo disponível", availableHelp: n, delta: r, buckets: i = [], action: a, variant: o = "card", updatedLabel: s, meta: c = [], status: l, loading: u = !1, className: d, ...f }, p) {
|
|
12719
|
+
if (o === "hero") {
|
|
12720
|
+
let r = (e, t = "1em") => /* @__PURE__ */ v("span", {
|
|
12721
12721
|
className: "select-skeleton select-balance__skel",
|
|
12722
12722
|
style: {
|
|
12723
12723
|
width: e,
|
|
12724
12724
|
height: t
|
|
12725
12725
|
}
|
|
12726
|
-
}),
|
|
12726
|
+
}), o = (e) => e == null || e === "" ? "—" : /* @__PURE__ */ v(Gl, { cents: e });
|
|
12727
12727
|
return /* @__PURE__ */ v("div", {
|
|
12728
|
-
ref:
|
|
12729
|
-
...
|
|
12730
|
-
className: `select-balance-hero${
|
|
12728
|
+
ref: p,
|
|
12729
|
+
...f,
|
|
12730
|
+
className: `select-balance-hero${d ? " " + d : ""}`,
|
|
12731
12731
|
children: /* @__PURE__ */ y("div", {
|
|
12732
12732
|
className: "select-balance-hero__layout",
|
|
12733
12733
|
children: [/* @__PURE__ */ y("section", {
|
|
@@ -12737,48 +12737,51 @@ var Mu = "allow-scripts allow-same-origin allow-forms", Nu = 390, Pu = 1280, Fu
|
|
|
12737
12737
|
/* @__PURE__ */ y("div", {
|
|
12738
12738
|
className: "select-balance-hero__top",
|
|
12739
12739
|
children: [
|
|
12740
|
-
/* @__PURE__ */
|
|
12741
|
-
className: "select-balance-hero__label"
|
|
12742
|
-
children: t
|
|
12740
|
+
/* @__PURE__ */ y("span", {
|
|
12741
|
+
className: `select-balance-hero__label${n == null ? "" : " select-balance-hero__label--help"}`,
|
|
12742
|
+
children: [t, n != null && /* @__PURE__ */ v(Mn, {
|
|
12743
|
+
content: n,
|
|
12744
|
+
label: `Sobre ${t}`
|
|
12745
|
+
})]
|
|
12743
12746
|
}),
|
|
12744
12747
|
/* @__PURE__ */ v("span", {
|
|
12745
12748
|
className: "select-balance-hero__amount",
|
|
12746
|
-
children:
|
|
12749
|
+
children: u ? r("11ch", "0.9em") : o(e)
|
|
12747
12750
|
}),
|
|
12748
|
-
|
|
12751
|
+
s != null && !u && /* @__PURE__ */ y("span", {
|
|
12749
12752
|
className: "select-balance-hero__updated",
|
|
12750
|
-
children: [/* @__PURE__ */ v(he, {}),
|
|
12753
|
+
children: [/* @__PURE__ */ v(he, {}), s]
|
|
12751
12754
|
})
|
|
12752
12755
|
]
|
|
12753
12756
|
}),
|
|
12754
|
-
|
|
12757
|
+
c.length > 0 && /* @__PURE__ */ v("dl", {
|
|
12755
12758
|
className: "select-balance-hero__meta",
|
|
12756
|
-
children:
|
|
12759
|
+
children: c.map((e, t) => /* @__PURE__ */ y("div", {
|
|
12757
12760
|
className: "select-balance-hero__metaitem",
|
|
12758
|
-
children: [/* @__PURE__ */ v("dt", { children: e.label }), /* @__PURE__ */ v("dd", { children:
|
|
12761
|
+
children: [/* @__PURE__ */ v("dt", { children: e.label }), /* @__PURE__ */ v("dd", { children: u ? r("7ch") : e.cents != null && e.cents !== "" ? /* @__PURE__ */ y(_, { children: [e.prefix, /* @__PURE__ */ v(Gl, { cents: e.cents })] }) : e.value ?? "—" })]
|
|
12759
12762
|
}, t))
|
|
12760
12763
|
}),
|
|
12761
|
-
(
|
|
12764
|
+
(a || l) && /* @__PURE__ */ y("div", {
|
|
12762
12765
|
className: "select-balance-hero__foot",
|
|
12763
|
-
children: [
|
|
12766
|
+
children: [a && /* @__PURE__ */ y("button", {
|
|
12764
12767
|
type: "button",
|
|
12765
12768
|
className: "select-balance-hero__cta",
|
|
12766
|
-
onClick:
|
|
12767
|
-
disabled:
|
|
12768
|
-
"aria-busy":
|
|
12769
|
-
children: [
|
|
12770
|
-
}),
|
|
12771
|
-
className: `select-balance-hero__status select-balance-hero__status--${
|
|
12769
|
+
onClick: a.onAction,
|
|
12770
|
+
disabled: a.disabled || a.loading,
|
|
12771
|
+
"aria-busy": a.loading || void 0,
|
|
12772
|
+
children: [a.icon, a.content]
|
|
12773
|
+
}), l && /* @__PURE__ */ y("span", {
|
|
12774
|
+
className: `select-balance-hero__status select-balance-hero__status--${l.tone ?? "success"}`,
|
|
12772
12775
|
children: [/* @__PURE__ */ v("span", {
|
|
12773
12776
|
className: "select-balance-hero__statusdot",
|
|
12774
12777
|
"aria-hidden": "true"
|
|
12775
|
-
}),
|
|
12778
|
+
}), l.label]
|
|
12776
12779
|
})]
|
|
12777
12780
|
})
|
|
12778
12781
|
]
|
|
12779
|
-
}),
|
|
12782
|
+
}), i.length > 0 && /* @__PURE__ */ v("div", {
|
|
12780
12783
|
className: "select-balance-hero__tiles",
|
|
12781
|
-
children:
|
|
12784
|
+
children: i.map((e) => /* @__PURE__ */ y("div", {
|
|
12782
12785
|
className: "select-balance-hero__tile",
|
|
12783
12786
|
children: [
|
|
12784
12787
|
/* @__PURE__ */ y("div", {
|
|
@@ -12801,7 +12804,7 @@ var Mu = "allow-scripts allow-same-origin allow-forms", Nu = 390, Pu = 1280, Fu
|
|
|
12801
12804
|
}),
|
|
12802
12805
|
/* @__PURE__ */ v("span", {
|
|
12803
12806
|
className: "select-balance-hero__tileamount",
|
|
12804
|
-
children:
|
|
12807
|
+
children: u ? r("8ch", "0.85em") : o(e.cents)
|
|
12805
12808
|
}),
|
|
12806
12809
|
e.hint != null && /* @__PURE__ */ v("span", {
|
|
12807
12810
|
className: "select-balance-hero__tilehint",
|
|
@@ -12814,22 +12817,22 @@ var Mu = "allow-scripts allow-same-origin allow-forms", Nu = 390, Pu = 1280, Fu
|
|
|
12814
12817
|
});
|
|
12815
12818
|
}
|
|
12816
12819
|
return /* @__PURE__ */ y("div", {
|
|
12817
|
-
ref:
|
|
12818
|
-
...
|
|
12819
|
-
className: `select-balance${
|
|
12820
|
+
ref: p,
|
|
12821
|
+
...f,
|
|
12822
|
+
className: `select-balance${d ? " " + d : ""}`,
|
|
12820
12823
|
children: [/* @__PURE__ */ y("div", {
|
|
12821
12824
|
className: "select-balance__head",
|
|
12822
12825
|
children: [/* @__PURE__ */ v("h3", {
|
|
12823
12826
|
className: "select-balance__title",
|
|
12824
12827
|
children: t
|
|
12825
|
-
}),
|
|
12828
|
+
}), a && /* @__PURE__ */ v(W, {
|
|
12826
12829
|
variant: "primary",
|
|
12827
12830
|
size: "sm",
|
|
12828
12831
|
inline: !0,
|
|
12829
|
-
onClick:
|
|
12830
|
-
disabled:
|
|
12831
|
-
loading:
|
|
12832
|
-
children:
|
|
12832
|
+
onClick: a.onAction,
|
|
12833
|
+
disabled: a.disabled,
|
|
12834
|
+
loading: a.loading,
|
|
12835
|
+
children: a.content
|
|
12833
12836
|
})]
|
|
12834
12837
|
}), /* @__PURE__ */ y("div", {
|
|
12835
12838
|
className: "select-balance__body",
|
|
@@ -12838,13 +12841,13 @@ var Mu = "allow-scripts allow-same-origin allow-forms", Nu = 390, Pu = 1280, Fu
|
|
|
12838
12841
|
children: [/* @__PURE__ */ v("span", {
|
|
12839
12842
|
className: "select-balance__heroamount",
|
|
12840
12843
|
children: /* @__PURE__ */ v(Gl, { cents: e })
|
|
12841
|
-
}),
|
|
12842
|
-
value:
|
|
12844
|
+
}), r != null && /* @__PURE__ */ v(ql, {
|
|
12845
|
+
value: r,
|
|
12843
12846
|
caption: "vs. período anterior"
|
|
12844
12847
|
})]
|
|
12845
|
-
}),
|
|
12848
|
+
}), i.length > 0 && /* @__PURE__ */ v("div", {
|
|
12846
12849
|
className: "select-balance__buckets",
|
|
12847
|
-
children:
|
|
12850
|
+
children: i.map((e) => /* @__PURE__ */ y("div", {
|
|
12848
12851
|
className: "select-balance__bucket",
|
|
12849
12852
|
children: [e.icon && /* @__PURE__ */ v("span", {
|
|
12850
12853
|
className: "select-balance__bucketicon",
|