uikit-react-public 0.47.1 → 0.47.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.
package/dist/index.js
CHANGED
|
@@ -20962,42 +20962,44 @@ const V3 = (e, t) => {
|
|
|
20962
20962
|
id: p
|
|
20963
20963
|
} = St(Rt);
|
|
20964
20964
|
t = t ?? f, o = o ?? h;
|
|
20965
|
-
const g = c.htmlFor ?? p, {
|
|
20965
|
+
const g = c.htmlFor ?? p, { md: y, mdSemibold: b } = s.typography.body, x = d`
|
|
20966
20966
|
width: 100%;
|
|
20967
20967
|
color: ${s.colour.text.default};
|
|
20968
|
-
font-family: ${
|
|
20969
|
-
font-feature-settings: ${
|
|
20970
|
-
font-size: ${
|
|
20971
|
-
font-weight: ${
|
|
20972
|
-
line-height: ${
|
|
20973
|
-
`, x = d`
|
|
20974
|
-
display: block;
|
|
20968
|
+
font-family: ${b.fontFamily};
|
|
20969
|
+
font-feature-settings: ${b.fontSettings};
|
|
20970
|
+
font-size: ${b.fontSize}px;
|
|
20971
|
+
font-weight: ${b.fontWeight};
|
|
20972
|
+
line-height: ${b.lineHeight}%;
|
|
20975
20973
|
`, A = d`
|
|
20976
|
-
display:
|
|
20974
|
+
display: block;
|
|
20977
20975
|
`, k = d`
|
|
20976
|
+
display: inline;
|
|
20977
|
+
`, S = d`
|
|
20978
20978
|
color: ${s.colour.text.disabled};
|
|
20979
|
-
`,
|
|
20979
|
+
`, M = C(
|
|
20980
20980
|
bl,
|
|
20981
|
-
|
|
20981
|
+
x,
|
|
20982
20982
|
Ee(c, s),
|
|
20983
|
-
e === "block" &&
|
|
20984
|
-
e === "inline" &&
|
|
20985
|
-
t &&
|
|
20983
|
+
e === "block" && A,
|
|
20984
|
+
e === "inline" && k,
|
|
20985
|
+
t && S,
|
|
20986
20986
|
i
|
|
20987
|
-
)
|
|
20987
|
+
), v = d`
|
|
20988
|
+
font-weight: ${y.fontWeight};
|
|
20989
|
+
`;
|
|
20988
20990
|
return /* @__PURE__ */ m(
|
|
20989
20991
|
"label",
|
|
20990
20992
|
{
|
|
20991
20993
|
ref: u,
|
|
20992
20994
|
htmlFor: g,
|
|
20993
|
-
className:
|
|
20995
|
+
className: M,
|
|
20994
20996
|
"data-testid": l,
|
|
20995
20997
|
...c,
|
|
20996
20998
|
children: [
|
|
20997
20999
|
a,
|
|
20998
21000
|
o && /* @__PURE__ */ m(Te, { children: [
|
|
20999
21001
|
" ",
|
|
21000
|
-
/* @__PURE__ */ n("span", { className: r, children: "(optional)" })
|
|
21002
|
+
/* @__PURE__ */ n("span", { className: C(v, r), children: "(optional)" })
|
|
21001
21003
|
] })
|
|
21002
21004
|
]
|
|
21003
21005
|
}
|
|
@@ -42,7 +42,7 @@ const Label = forwardRef<Ref, LabelProps>(
|
|
|
42
42
|
disabled = disabled ?? contextDisabled;
|
|
43
43
|
optional = optional ?? contextOptional;
|
|
44
44
|
const htmlFor = props.htmlFor ?? contextId;
|
|
45
|
-
const { mdSemibold } = theme.typography.body;
|
|
45
|
+
const { md, mdSemibold } = theme.typography.body;
|
|
46
46
|
|
|
47
47
|
const baseStyle = css`
|
|
48
48
|
width: 100%;
|
|
@@ -76,6 +76,10 @@ const Label = forwardRef<Ref, LabelProps>(
|
|
|
76
76
|
className
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
+
const optionalStyle = css`
|
|
80
|
+
font-weight: ${md.fontWeight};
|
|
81
|
+
`;
|
|
82
|
+
|
|
79
83
|
return (
|
|
80
84
|
<label
|
|
81
85
|
ref={ref}
|
|
@@ -88,7 +92,9 @@ const Label = forwardRef<Ref, LabelProps>(
|
|
|
88
92
|
{optional && (
|
|
89
93
|
<>
|
|
90
94
|
{' '}
|
|
91
|
-
<span className={optionalClassName}>
|
|
95
|
+
<span className={cx(optionalStyle, optionalClassName)}>
|
|
96
|
+
(optional)
|
|
97
|
+
</span>
|
|
92
98
|
</>
|
|
93
99
|
)}
|
|
94
100
|
</label>
|