rbro-tat-uds 2.2.30 → 2.2.31
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.
|
@@ -26,13 +26,33 @@ const LabeledTextStyled = styled.div`
|
|
|
26
26
|
text-align: ${(props) => props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
${(props) => typeof props.$text === "string" ? styled.css`
|
|
30
|
+
& > span:last-child {
|
|
31
|
+
color: ${utils.colors[props.$textColor]};
|
|
32
|
+
|
|
33
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
34
|
+
|
|
35
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
36
|
+
|
|
37
|
+
line-height: 120%;
|
|
38
|
+
|
|
39
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
40
|
+
}
|
|
41
|
+
` : styled.css`
|
|
42
|
+
& > div {
|
|
43
|
+
span {
|
|
44
|
+
color: ${utils.colors[props.$textColor]};
|
|
45
|
+
|
|
46
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
47
|
+
|
|
48
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
49
|
+
|
|
50
|
+
line-height: 120%;
|
|
51
|
+
|
|
52
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`}
|
|
36
56
|
`;
|
|
37
57
|
const LabeledText = ({
|
|
38
58
|
text = "Text",
|
|
@@ -61,7 +81,7 @@ const LabeledText = ({
|
|
|
61
81
|
...rest,
|
|
62
82
|
children: [
|
|
63
83
|
label && typeof label === "string" && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
|
|
64
|
-
typeof text === "string"
|
|
84
|
+
typeof text === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: text }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: text })
|
|
65
85
|
]
|
|
66
86
|
}
|
|
67
87
|
);
|
package/build/cjs/index.cjs
CHANGED
|
@@ -74803,13 +74803,33 @@ const LabeledTextStyled = styled__default.default.div`
|
|
|
74803
74803
|
text-align: ${(props) => props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
74804
74804
|
}
|
|
74805
74805
|
|
|
74806
|
-
|
|
74807
|
-
|
|
74808
|
-
|
|
74809
|
-
|
|
74810
|
-
|
|
74811
|
-
|
|
74812
|
-
|
|
74806
|
+
${(props) => typeof props.$text === "string" ? styled.css`
|
|
74807
|
+
& > span:last-child {
|
|
74808
|
+
color: ${utils.colors[props.$textColor]};
|
|
74809
|
+
|
|
74810
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
74811
|
+
|
|
74812
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
74813
|
+
|
|
74814
|
+
line-height: 120%;
|
|
74815
|
+
|
|
74816
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
74817
|
+
}
|
|
74818
|
+
` : styled.css`
|
|
74819
|
+
& > div {
|
|
74820
|
+
span {
|
|
74821
|
+
color: ${utils.colors[props.$textColor]};
|
|
74822
|
+
|
|
74823
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
74824
|
+
|
|
74825
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
74826
|
+
|
|
74827
|
+
line-height: 120%;
|
|
74828
|
+
|
|
74829
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
74830
|
+
}
|
|
74831
|
+
}
|
|
74832
|
+
`}
|
|
74813
74833
|
`;
|
|
74814
74834
|
const LabeledText = ({
|
|
74815
74835
|
text = "Text",
|
|
@@ -74838,7 +74858,7 @@ const LabeledText = ({
|
|
|
74838
74858
|
...rest,
|
|
74839
74859
|
children: [
|
|
74840
74860
|
label && typeof label === "string" && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
|
|
74841
|
-
typeof text === "string"
|
|
74861
|
+
typeof text === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: text }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: text })
|
|
74842
74862
|
]
|
|
74843
74863
|
}
|
|
74844
74864
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
|
6
|
-
import styled from 'styled-components';
|
|
6
|
+
import styled, { css } from 'styled-components';
|
|
7
7
|
import { colors } from '../../utils';
|
|
8
8
|
|
|
9
9
|
const _constraint_fontweight = [200, 300, 400, 500, 700, 800];
|
|
@@ -22,13 +22,33 @@ const LabeledTextStyled = styled.div`
|
|
|
22
22
|
text-align: ${(props) => props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
${(props) => typeof props.$text === "string" ? css`
|
|
26
|
+
& > span:last-child {
|
|
27
|
+
color: ${colors[props.$textColor]};
|
|
28
|
+
|
|
29
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
30
|
+
|
|
31
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
32
|
+
|
|
33
|
+
line-height: 120%;
|
|
34
|
+
|
|
35
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
36
|
+
}
|
|
37
|
+
` : css`
|
|
38
|
+
& > div {
|
|
39
|
+
span {
|
|
40
|
+
color: ${colors[props.$textColor]};
|
|
41
|
+
|
|
42
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
43
|
+
|
|
44
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
45
|
+
|
|
46
|
+
line-height: 120%;
|
|
47
|
+
|
|
48
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`}
|
|
32
52
|
`;
|
|
33
53
|
const LabeledText = ({
|
|
34
54
|
text = "Text",
|
|
@@ -57,7 +77,7 @@ const LabeledText = ({
|
|
|
57
77
|
...rest,
|
|
58
78
|
children: [
|
|
59
79
|
label && typeof label === "string" && /* @__PURE__ */ jsx("span", { children: label }),
|
|
60
|
-
typeof text === "string"
|
|
80
|
+
typeof text === "string" ? /* @__PURE__ */ jsx("span", { children: text }) : /* @__PURE__ */ jsx("div", { children: text })
|
|
61
81
|
]
|
|
62
82
|
}
|
|
63
83
|
);
|
package/build/esm/index.js
CHANGED
|
@@ -74780,13 +74780,33 @@ const LabeledTextStyled = styled.div`
|
|
|
74780
74780
|
text-align: ${(props) => props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
74781
74781
|
}
|
|
74782
74782
|
|
|
74783
|
-
|
|
74784
|
-
|
|
74785
|
-
|
|
74786
|
-
|
|
74787
|
-
|
|
74788
|
-
|
|
74789
|
-
|
|
74783
|
+
${(props) => typeof props.$text === "string" ? css`
|
|
74784
|
+
& > span:last-child {
|
|
74785
|
+
color: ${colors[props.$textColor]};
|
|
74786
|
+
|
|
74787
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
74788
|
+
|
|
74789
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
74790
|
+
|
|
74791
|
+
line-height: 120%;
|
|
74792
|
+
|
|
74793
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
74794
|
+
}
|
|
74795
|
+
` : css`
|
|
74796
|
+
& > div {
|
|
74797
|
+
span {
|
|
74798
|
+
color: ${colors[props.$textColor]};
|
|
74799
|
+
|
|
74800
|
+
font-size: ${typeof props.$textFontSize === "number" && _constraint_textfontsize.includes(props.$textFontSize) ? props.$textFontSize + "px" : "16px"};
|
|
74801
|
+
|
|
74802
|
+
font-weight: ${typeof props.$textFontWeight === "number" && _constraint_fontweight.includes(props.$textFontWeight) ? props.$textFontWeight : 500};
|
|
74803
|
+
|
|
74804
|
+
line-height: 120%;
|
|
74805
|
+
|
|
74806
|
+
text-align: ${props.$align && ["center", "left", "right"].includes(props.$align) && props.$align};
|
|
74807
|
+
}
|
|
74808
|
+
}
|
|
74809
|
+
`}
|
|
74790
74810
|
`;
|
|
74791
74811
|
const LabeledText = ({
|
|
74792
74812
|
text = "Text",
|
|
@@ -74815,7 +74835,7 @@ const LabeledText = ({
|
|
|
74815
74835
|
...rest,
|
|
74816
74836
|
children: [
|
|
74817
74837
|
label && typeof label === "string" && /* @__PURE__ */ jsx("span", { children: label }),
|
|
74818
|
-
typeof text === "string"
|
|
74838
|
+
typeof text === "string" ? /* @__PURE__ */ jsx("span", { children: text }) : /* @__PURE__ */ jsx("div", { children: text })
|
|
74819
74839
|
]
|
|
74820
74840
|
}
|
|
74821
74841
|
);
|
|
@@ -2,7 +2,7 @@ import React, { HTMLAttributes } from 'react';
|
|
|
2
2
|
import { colors } from '../../utils/colors.js';
|
|
3
3
|
|
|
4
4
|
interface LabeledTextProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
text: string;
|
|
5
|
+
text: string | React.ReactNode;
|
|
6
6
|
label?: string;
|
|
7
7
|
gap?: number;
|
|
8
8
|
align?: "left" | "center" | "right";
|