rbro-tat-uds 2.1.0 → 2.1.2

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.
@@ -39,11 +39,12 @@ const Bar = ({
39
39
  children: items.length > 0 && items.map((item, index) => {
40
40
  const thisColor = utils.colors[item.color] || utils.colors.gray_950;
41
41
  const percentage = item.value / max * 100;
42
+ const clampedPercentage = Math.min(Math.max(percentage, 0.3), 100);
42
43
  return /* @__PURE__ */ jsxRuntime.jsx(
43
44
  "div",
44
45
  {
45
46
  style: {
46
- width: `${percentage}%`,
47
+ width: `${clampedPercentage}%`,
47
48
  height: "100%",
48
49
  backgroundColor: thisColor
49
50
  }
@@ -41,8 +41,8 @@ const LabeledTextInLine = ({
41
41
  iconSize = 18,
42
42
  leftGap = 8,
43
43
  rightGap = 8,
44
- label = "Label",
45
- text = "Text",
44
+ label = "-",
45
+ text = "-",
46
46
  labelFontSize = 16,
47
47
  labelFontWeight = 400,
48
48
  labelColor = "gray_950",
@@ -2792,11 +2792,12 @@ const Bar = ({
2792
2792
  children: items.length > 0 && items.map((item, index) => {
2793
2793
  const thisColor = utils.colors[item.color] || utils.colors.gray_950;
2794
2794
  const percentage = item.value / max * 100;
2795
+ const clampedPercentage = Math.min(Math.max(percentage, 0.3), 100);
2795
2796
  return /* @__PURE__ */ jsxRuntime.jsx(
2796
2797
  "div",
2797
2798
  {
2798
2799
  style: {
2799
- width: `${percentage}%`,
2800
+ width: `${clampedPercentage}%`,
2800
2801
  height: "100%",
2801
2802
  backgroundColor: thisColor
2802
2803
  }
@@ -18466,8 +18467,8 @@ const LabeledTextInLine = ({
18466
18467
  iconSize = 18,
18467
18468
  leftGap = 8,
18468
18469
  rightGap = 8,
18469
- label = "Label",
18470
- text = "Text",
18470
+ label = "-",
18471
+ text = "-",
18471
18472
  labelFontSize = 16,
18472
18473
  labelFontWeight = 400,
18473
18474
  labelColor = "gray_950",
@@ -35,11 +35,12 @@ const Bar = ({
35
35
  children: items.length > 0 && items.map((item, index) => {
36
36
  const thisColor = colors[item.color] || colors.gray_950;
37
37
  const percentage = item.value / max * 100;
38
+ const clampedPercentage = Math.min(Math.max(percentage, 0.3), 100);
38
39
  return /* @__PURE__ */ jsx(
39
40
  "div",
40
41
  {
41
42
  style: {
42
- width: `${percentage}%`,
43
+ width: `${clampedPercentage}%`,
43
44
  height: "100%",
44
45
  backgroundColor: thisColor
45
46
  }
@@ -37,8 +37,8 @@ const LabeledTextInLine = ({
37
37
  iconSize = 18,
38
38
  leftGap = 8,
39
39
  rightGap = 8,
40
- label = "Label",
41
- text = "Text",
40
+ label = "-",
41
+ text = "-",
42
42
  labelFontSize = 16,
43
43
  labelFontWeight = 400,
44
44
  labelColor = "gray_950",
@@ -2769,11 +2769,12 @@ const Bar = ({
2769
2769
  children: items.length > 0 && items.map((item, index) => {
2770
2770
  const thisColor = colors[item.color] || colors.gray_950;
2771
2771
  const percentage = item.value / max * 100;
2772
+ const clampedPercentage = Math.min(Math.max(percentage, 0.3), 100);
2772
2773
  return /* @__PURE__ */ jsx(
2773
2774
  "div",
2774
2775
  {
2775
2776
  style: {
2776
- width: `${percentage}%`,
2777
+ width: `${clampedPercentage}%`,
2777
2778
  height: "100%",
2778
2779
  backgroundColor: thisColor
2779
2780
  }
@@ -18443,8 +18444,8 @@ const LabeledTextInLine = ({
18443
18444
  iconSize = 18,
18444
18445
  leftGap = 8,
18445
18446
  rightGap = 8,
18446
- label = "Label",
18447
- text = "Text",
18447
+ label = "-",
18448
+ text = "-",
18448
18449
  labelFontSize = 16,
18449
18450
  labelFontWeight = 400,
18450
18451
  labelColor = "gray_950",
@@ -8,8 +8,8 @@ interface LabeledTextInLineProps extends HTMLAttributes<HTMLDivElement> {
8
8
  iconSize?: 8 | 12 | 16 | 18 | 20 | 24 | 32 | 40;
9
9
  leftGap?: 0 | 4 | 8 | 12 | 16;
10
10
  rightGap?: 0 | 4 | 8 | 12 | 16;
11
- label?: string;
12
- text?: string;
11
+ label?: string | undefined;
12
+ text?: string | undefined;
13
13
  labelFontSize?: 12 | 14 | 16 | 18 | 20 | 24;
14
14
  labelFontWeight?: 200 | 300 | 400 | 500 | 700 | 800;
15
15
  labelColor?: keyof typeof colors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rbro-tat-uds",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "type": "module",
5
5
  "main": "build/cjs/index.cjs",
6
6
  "module": "build/esm/index.js",