revdev-components 0.195.0 → 0.197.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/build/index.js +6 -6
- package/build/styles.css +6 -3
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -5809,11 +5809,10 @@ var HelpTip = function (_a) {
|
|
|
5809
5809
|
return (React.createElement(AppTooltip, { title: title || children, placement: "top" }, href ? (React.createElement(AppLink, { href: href, target: target }, iconNode)) : (iconNode)));
|
|
5810
5810
|
};
|
|
5811
5811
|
|
|
5812
|
-
var s = {"root":"index-module_root__W7fFh","
|
|
5812
|
+
var s = {"root":"index-module_root__W7fFh","level":"index-module_level__J8dSJ","bar":"index-module_bar__V-ymE","bar__compact":"index-module_bar__compact__foL3T","bar__rate":"index-module_bar__rate__w6r3z","code":"index-module_code__aAnic","label":"index-module_label__gftYy","label__compact":"index-module_label__compact__-5Wt0"};
|
|
5813
5813
|
|
|
5814
5814
|
var LevelBadge = function (_a) {
|
|
5815
|
-
var _b;
|
|
5816
|
-
var levels = _a.levels, className = _a.className, texts = _a.texts, children = _a.children, _c = _a.mode, mode = _c === void 0 ? "default" : _c;
|
|
5815
|
+
var levels = _a.levels, className = _a.className, texts = _a.texts, children = _a.children, _b = _a.mode, mode = _b === void 0 ? "default" : _b;
|
|
5817
5816
|
var bars = React.useMemo(function () {
|
|
5818
5817
|
var maxRate = Math.max.apply(Math, levels.map(function (x) { return x.rate; }));
|
|
5819
5818
|
return levels.map(function (x) { return [x.code.toUpperCase(), x.rate, x.rate / maxRate]; });
|
|
@@ -5831,15 +5830,16 @@ var LevelBadge = function (_a) {
|
|
|
5831
5830
|
if (bars.length === 0) {
|
|
5832
5831
|
return null;
|
|
5833
5832
|
}
|
|
5834
|
-
return (React.createElement("div", { className: classNames(s.root,
|
|
5833
|
+
return (React.createElement("div", { className: classNames(s.root, className) },
|
|
5835
5834
|
bars.map(function (_a) {
|
|
5835
|
+
var _b, _c;
|
|
5836
5836
|
var code = _a[0], rate = _a[1], normalizedRate = _a[2];
|
|
5837
5837
|
return (React.createElement(AppTooltip, { key: code, title: interText.refersTo({ code: code, rate: rate }), placement: "top" },
|
|
5838
5838
|
React.createElement("div", { key: code, className: s.level },
|
|
5839
|
-
React.createElement("div", { className: s.bar },
|
|
5839
|
+
React.createElement("div", { className: classNames(s.bar, (_b = {}, _b[s.bar__compact] = mode === "compact", _b)) },
|
|
5840
5840
|
React.createElement("div", { className: s.bar__rate, style: { height: "".concat(normalizedRate * 100, "%") } }, renderCode(code)),
|
|
5841
5841
|
renderCode(code)),
|
|
5842
|
-
|
|
5842
|
+
React.createElement("div", { className: classNames(s.label, (_c = {}, _c[s.label__compact] = mode === "compact", _c)) }, code))));
|
|
5843
5843
|
}),
|
|
5844
5844
|
children));
|
|
5845
5845
|
};
|
package/build/styles.css
CHANGED
|
@@ -676,9 +676,6 @@ body {
|
|
|
676
676
|
gap: 0.3em;
|
|
677
677
|
color: var(--levelBadgeColor);
|
|
678
678
|
}
|
|
679
|
-
.index-module_root__compact__4t0Qf .index-module_bar__V-ymE {
|
|
680
|
-
width: 1.4em;
|
|
681
|
-
}
|
|
682
679
|
|
|
683
680
|
.index-module_level__J8dSJ {
|
|
684
681
|
display: flex;
|
|
@@ -695,6 +692,9 @@ body {
|
|
|
695
692
|
color: var(--levelBadgeColor);
|
|
696
693
|
z-index: 0;
|
|
697
694
|
}
|
|
695
|
+
.index-module_bar__compact__foL3T {
|
|
696
|
+
width: 1.4em;
|
|
697
|
+
}
|
|
698
698
|
|
|
699
699
|
.index-module_bar__rate__w6r3z {
|
|
700
700
|
width: 100%;
|
|
@@ -714,6 +714,9 @@ body {
|
|
|
714
714
|
padding: 1px 0;
|
|
715
715
|
text-align: center;
|
|
716
716
|
}
|
|
717
|
+
.index-module_label__compact__-5Wt0 {
|
|
718
|
+
display: none;
|
|
719
|
+
}
|
|
717
720
|
|
|
718
721
|
.index-module_code__aAnic {
|
|
719
722
|
position: absolute;
|