revdev-components 0.279.0 → 0.281.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.
@@ -3,6 +3,7 @@ import { LevelGen } from "src/interfaces";
3
3
  export interface LevelLetterBadgeProps {
4
4
  levels?: LevelGen | LevelGen[] | string;
5
5
  showRate?: boolean;
6
+ showIndicator?: boolean;
6
7
  className?: string;
7
8
  activeCode?: string;
8
9
  title?: (param: LevelGen) => string;
package/build/index.js CHANGED
@@ -6259,11 +6259,11 @@ var LevelBarBadge = function (_a) {
6259
6259
  children));
6260
6260
  };
6261
6261
 
6262
- var s$6 = {"root":"index-module_root__ogwMI","root__hasActive":"index-module_root__hasActive__qvsDL","level":"index-module_level__EuETi","level__active":"index-module_level__active__lfzHe"};
6262
+ var s$6 = {"root":"index-module_root__ogwMI","root__hasActive":"index-module_root__hasActive__qvsDL","level":"index-module_level__EuETi","level__active":"index-module_level__active__lfzHe","content":"index-module_content__Q5QHD","rate":"index-module_rate__PU8qE"};
6263
6263
 
6264
6264
  var LevelLetterBadge = function (_a) {
6265
6265
  var _b;
6266
- var value = _a.levels, showRate = _a.showRate, className = _a.className, activeCode = _a.activeCode, title = _a.title, href = _a.href;
6266
+ var value = _a.levels, showRate = _a.showRate, showIndicator = _a.showIndicator, className = _a.className, activeCode = _a.activeCode, title = _a.title, href = _a.href;
6267
6267
  var levels = React.useMemo(function () {
6268
6268
  if (typeof value === "string") {
6269
6269
  return [{ code: value }];
@@ -6287,7 +6287,11 @@ var LevelLetterBadge = function (_a) {
6287
6287
  if (typeof rate === "number") {
6288
6288
  titleText += " (".concat(numeral(rate).format("0%"), ")");
6289
6289
  }
6290
- var content = "".concat(code === null || code === void 0 ? void 0 : code.toUpperCase()).concat(typeof rate === "number" && showRate === true ? " ".concat(numeral(rate).format(".0")) : "");
6290
+ var contentText = "".concat(code === null || code === void 0 ? void 0 : code.toUpperCase()).concat(typeof rate === "number" && showRate === true ? " ".concat(numeral(rate).format(".0")) : "");
6291
+ var content = (React.createElement("div", { className: s$6.content },
6292
+ React.createElement("div", null, contentText),
6293
+ showIndicator && (React.createElement("div", { className: s$6.rate },
6294
+ React.createElement("div", { style: { height: "".concat(numeral(rate).format("0%")) } })))));
6291
6295
  return (React.createElement(AppTooltip, { key: code, title: title ? title({ code: code, rate: rate }) : titleText }, href ? (React.createElement(AppLink, { href: href({ code: code }), className: levelClassName }, content)) : (React.createElement("div", { className: levelClassName }, content))));
6292
6296
  })));
6293
6297
  };
package/build/styles.css CHANGED
@@ -783,6 +783,8 @@ body {
783
783
  display: flex;
784
784
  flex-direction: row;
785
785
  gap: 0.3em;
786
+ padding: 0.1em 0;
787
+ position: relative;
786
788
  }
787
789
  .index-module_root__hasActive__qvsDL {
788
790
  color: var(--passiveColor);
@@ -800,6 +802,32 @@ body {
800
802
  color: var(--color);
801
803
  border-color: var(--color);
802
804
  }
805
+
806
+ .index-module_content__Q5QHD {
807
+ display: flex;
808
+ flex-direction: row;
809
+ align-items: center;
810
+ gap: 0.2em;
811
+ }
812
+
813
+ .index-module_rate__PU8qE {
814
+ display: inline-block;
815
+ width: 0.3em;
816
+ height: 1em;
817
+ border: 1px solid var(--borderColor);
818
+ border-radius: 0.1em;
819
+ overflow: hidden;
820
+ position: relative;
821
+ }
822
+ .index-module_rate__PU8qE > div {
823
+ position: absolute;
824
+ bottom: 0;
825
+ left: 0;
826
+ right: 0;
827
+ width: 100%;
828
+ background-color: var(--color);
829
+ transition: height 0.3s ease-in-out;
830
+ }
803
831
  .index-module_label__7pG3Z {
804
832
  font-size: 12px;
805
833
  display: inline-block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.279.0",
3
+ "version": "0.281.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {