@carbon/charts-react 1.14.1 → 1.14.3
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -18
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -2
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -8460,7 +8460,7 @@ const ge = "cds", _n = {
|
|
|
8460
8460
|
threshold: 16,
|
|
8461
8461
|
numCharacter: 14
|
|
8462
8462
|
}, P$ = {
|
|
8463
|
-
code: (navigator == null ? void 0 : navigator.language) || "en-US",
|
|
8463
|
+
code: typeof navigator < "u" && (navigator == null ? void 0 : navigator.language) || "en-US",
|
|
8464
8464
|
// read from browser's navigator.language
|
|
8465
8465
|
number: (e, t = (navigator == null ? void 0 : navigator.language) || "en-US") => e.toLocaleString(t),
|
|
8466
8466
|
// based on code property if specified
|
|
@@ -13503,7 +13503,7 @@ const ca = (e) => eh.sanitize(e, {
|
|
|
13503
13503
|
const s = n.selectAll("div.toolbar-control").data(r, (l) => l.id);
|
|
13504
13504
|
s.exit().remove();
|
|
13505
13505
|
const a = s.enter().append("div").attr("class", "toolbar-control cds--overflow-menu cds--overflow-menu"), o = this;
|
|
13506
|
-
a.merge(s).classed("disabled", (l) => l.shouldBeDisabled()).attr("aria-disabled", (l) => l.shouldBeDisabled()).attr("aria-label", (l) => l.title).html((l) => `
|
|
13506
|
+
a.merge(s).classed("disabled", (l) => l.shouldBeDisabled()).attr("role", "button").attr("aria-disabled", (l) => l.shouldBeDisabled()).attr("aria-label", (l) => l.title).html((l) => `
|
|
13507
13507
|
<button
|
|
13508
13508
|
class="cds--overflow-menu__trigger cds--overflow-menu__trigger"
|
|
13509
13509
|
aria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(
|
|
@@ -18500,22 +18500,20 @@ class rP extends Ns {
|
|
|
18500
18500
|
}
|
|
18501
18501
|
// show the total for prop meter
|
|
18502
18502
|
displayTotal() {
|
|
18503
|
-
const t = this.getComponentContainer(), n = this.getOptions(), r = b(n, "meter", "proportional", "total"), i = r ? b(n, "meter", "proportional", "total") : this.model.getMaximumDomain(this.model.getDisplayData()), s = b(n, "meter", "proportional", "unit") ? b(n, "meter", "proportional", "unit") : "", a = b(n, "meter", "proportional", "totalFormatter"), { code: o, number: l } = b(n, "locale"), c = a !== null ? a(i) : `${l(r, o)} ${s} total`, u = N.getHTMLElementSize(this.
|
|
18504
|
-
|
|
18503
|
+
const t = this.getComponentContainer(), n = this.getOptions(), r = b(n, "meter", "proportional", "total"), i = r ? b(n, "meter", "proportional", "total") : this.model.getMaximumDomain(this.model.getDisplayData()), s = b(n, "meter", "proportional", "unit") ? b(n, "meter", "proportional", "unit") : "", a = b(n, "meter", "proportional", "totalFormatter"), { code: o, number: l } = b(n, "locale"), c = a !== null ? a(i) : `${l(r, o)} ${s} total`, u = N.getHTMLElementSize(this.parent.node()).width, d = t.selectAll("text.proportional-meter-total").data([c]);
|
|
18504
|
+
d.enter().append("text").classed("proportional-meter-total", !0).merge(d).attr(
|
|
18505
18505
|
"x",
|
|
18506
|
-
this.model.getStatus() && typeof
|
|
18507
|
-
).attr("y", "1em").attr("text-anchor", "end").text((
|
|
18506
|
+
this.model.getStatus() && typeof u != "string" ? u - ne.total.paddingRight : u
|
|
18507
|
+
).attr("y", "1em").attr("text-anchor", "end").text((h) => h), d.exit().remove();
|
|
18508
18508
|
}
|
|
18509
18509
|
/**
|
|
18510
18510
|
* Appends the corresponding status based on the value and the peak.
|
|
18511
18511
|
*/
|
|
18512
18512
|
displayStatus() {
|
|
18513
|
-
const t = this, n = this.getComponentContainer(), r = N.getHTMLElementSize(
|
|
18514
|
-
|
|
18515
|
-
|
|
18516
|
-
c.enter().append("
|
|
18517
|
-
const u = o.selectAll("path.innerFill").data(l);
|
|
18518
|
-
u.enter().append("path").merge(u).attr("d", t.getStatusIconPathString(s)).attr("transform", `translate(-${a}, 0)`).attr("class", "innerFill"), u.exit().remove(), c.exit().remove();
|
|
18513
|
+
const t = this, n = this.getComponentContainer(), r = N.getHTMLElementSize(this.parent.node()).width || 0, i = this.model.getStatus(), s = ne.status.indicatorSize / 2, a = N.appendOrSelect(n, "g.status-indicator").attr("class", i !== null ? `status-indicator status--${i}` : "").attr("transform", `translate(${r - s}, 0)`), o = i ? [i] : [], l = a.selectAll("circle.status").data(o);
|
|
18514
|
+
l.enter().append("circle").merge(l).attr("class", "status").attr("r", s).attr("cx", 0).attr("cy", 8);
|
|
18515
|
+
const c = a.selectAll("path.innerFill").data(o);
|
|
18516
|
+
c.enter().append("path").merge(c).attr("d", t.getStatusIconPathString(i)).attr("transform", `translate(-${s}, 0)`).attr("class", "innerFill"), c.exit().remove(), l.exit().remove();
|
|
18519
18517
|
}
|
|
18520
18518
|
/**
|
|
18521
18519
|
* Appends the associated percentage to the end of the title
|
|
@@ -18540,15 +18538,15 @@ class rP extends Ns {
|
|
|
18540
18538
|
}
|
|
18541
18539
|
// computes the maximum space a title can take
|
|
18542
18540
|
getMaxTitleWidth() {
|
|
18543
|
-
const t =
|
|
18544
|
-
if (
|
|
18545
|
-
const
|
|
18541
|
+
const t = b(this.getOptions(), "meter", "proportional"), n = N.getHTMLElementSize(this.parent.node()).width;
|
|
18542
|
+
if (t !== null) {
|
|
18543
|
+
const r = N.appendOrSelect(this.parent, "text.proportional-meter-total").node(), i = N.getSVGElementSize(r, {
|
|
18546
18544
|
useBBox: !0
|
|
18547
18545
|
}).width;
|
|
18548
|
-
return
|
|
18546
|
+
return n - i - ne.total.paddingLeft;
|
|
18549
18547
|
} else {
|
|
18550
|
-
const
|
|
18551
|
-
return
|
|
18548
|
+
const r = N.appendOrSelect(this.parent, "text.percent-value"), i = ne.statusBar.paddingRight, s = r.node().getComputedTextLength(), a = N.appendOrSelect(this.parent, "g.status-indicator").node(), o = N.getSVGElementSize(a, { useBBox: !0 }).width + ne.status.paddingLeft;
|
|
18549
|
+
return n - s - i - o;
|
|
18552
18550
|
}
|
|
18553
18551
|
}
|
|
18554
18552
|
/**
|