react-better-html 1.1.245 → 1.1.247
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -186,10 +186,12 @@ type PageHeaderProps = {
|
|
|
186
186
|
title?: string | React.ReactNode;
|
|
187
187
|
/** @default "h1" */
|
|
188
188
|
titleAs?: TextAs;
|
|
189
|
+
titleFontSize?: React.CSSProperties["fontSize"];
|
|
189
190
|
/** @default textPrimary */
|
|
190
191
|
titleColor?: React.CSSProperties["color"];
|
|
191
192
|
titleRightElement?: React.ReactNode;
|
|
192
193
|
description?: string | React.ReactNode;
|
|
194
|
+
descriptionFontSize?: React.CSSProperties["fontSize"];
|
|
193
195
|
/** @default textSecondary */
|
|
194
196
|
descriptionColor?: React.CSSProperties["color"];
|
|
195
197
|
textAlign?: React.CSSProperties["textAlign"];
|
package/dist/index.d.ts
CHANGED
|
@@ -186,10 +186,12 @@ type PageHeaderProps = {
|
|
|
186
186
|
title?: string | React.ReactNode;
|
|
187
187
|
/** @default "h1" */
|
|
188
188
|
titleAs?: TextAs;
|
|
189
|
+
titleFontSize?: React.CSSProperties["fontSize"];
|
|
189
190
|
/** @default textPrimary */
|
|
190
191
|
titleColor?: React.CSSProperties["color"];
|
|
191
192
|
titleRightElement?: React.ReactNode;
|
|
192
193
|
description?: string | React.ReactNode;
|
|
194
|
+
descriptionFontSize?: React.CSSProperties["fontSize"];
|
|
193
195
|
/** @default textSecondary */
|
|
194
196
|
descriptionColor?: React.CSSProperties["color"];
|
|
195
197
|
textAlign?: React.CSSProperties["textAlign"];
|
package/dist/index.js
CHANGED
|
@@ -1377,9 +1377,11 @@ var import_react_better_core2 = require("react-better-core");
|
|
|
1377
1377
|
var import_styled_components = __toESM(require("styled-components"));
|
|
1378
1378
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1379
1379
|
var TextStyledComponent = import_styled_components.default.p.withConfig({
|
|
1380
|
-
shouldForwardProp: (prop) => !["style", "hoverStyle"].includes(prop)
|
|
1380
|
+
shouldForwardProp: (prop) => !["theme", "style", "hoverStyle", "isP"].includes(prop)
|
|
1381
1381
|
})`
|
|
1382
|
-
|
|
1382
|
+
${(props) => props.isP ? import_styled_components.css`
|
|
1383
|
+
font-size: ${props.theme.styles.fontSize}px;
|
|
1384
|
+
` : ""}
|
|
1383
1385
|
|
|
1384
1386
|
${(props) => props.style}
|
|
1385
1387
|
|
|
@@ -1387,7 +1389,7 @@ var TextStyledComponent = import_styled_components.default.p.withConfig({
|
|
|
1387
1389
|
${(props) => props.hoverStyle}
|
|
1388
1390
|
}
|
|
1389
1391
|
`;
|
|
1390
|
-
var TextComponent = (0, import_react2.forwardRef)(function Text({ htmlContentTranslate, children, ...props }, ref) {
|
|
1392
|
+
var TextComponent = (0, import_react2.forwardRef)(function Text({ as: asValue, htmlContentTranslate, children, ...props }, ref) {
|
|
1391
1393
|
const theme2 = (0, import_react_better_core2.useTheme)();
|
|
1392
1394
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
1393
1395
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
@@ -1395,11 +1397,12 @@ var TextComponent = (0, import_react2.forwardRef)(function Text({ htmlContentTra
|
|
|
1395
1397
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1396
1398
|
TextStyledComponent,
|
|
1397
1399
|
{
|
|
1398
|
-
as:
|
|
1400
|
+
as: asValue,
|
|
1399
1401
|
theme: theme2,
|
|
1400
1402
|
translate: htmlContentTranslate,
|
|
1401
1403
|
style,
|
|
1402
1404
|
hoverStyle,
|
|
1405
|
+
isP: asValue === "p",
|
|
1403
1406
|
...restProps,
|
|
1404
1407
|
...dataProps,
|
|
1405
1408
|
...ariaProps,
|
|
@@ -1654,9 +1657,11 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1654
1657
|
imageAzProfileImage,
|
|
1655
1658
|
title,
|
|
1656
1659
|
titleAs = "h1",
|
|
1660
|
+
titleFontSize,
|
|
1657
1661
|
titleColor,
|
|
1658
1662
|
titleRightElement,
|
|
1659
1663
|
description,
|
|
1664
|
+
descriptionFontSize,
|
|
1660
1665
|
descriptionColor,
|
|
1661
1666
|
textAlign,
|
|
1662
1667
|
rightElement,
|
|
@@ -1706,6 +1711,7 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1706
1711
|
Text_default,
|
|
1707
1712
|
{
|
|
1708
1713
|
as: titleAs,
|
|
1714
|
+
fontSize: titleFontSize,
|
|
1709
1715
|
textAlign,
|
|
1710
1716
|
color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
|
|
1711
1717
|
children: title
|
|
@@ -1719,6 +1725,7 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1719
1725
|
Text_default,
|
|
1720
1726
|
{
|
|
1721
1727
|
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
1728
|
+
fontSize: descriptionFontSize,
|
|
1722
1729
|
textAlign,
|
|
1723
1730
|
color: descriptionColor ?? (lightMode ? theme2.colors.base : theme2.colors.textSecondary),
|
|
1724
1731
|
opacity: lightMode ? 0.7 : void 0,
|
|
@@ -4465,11 +4472,13 @@ var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
|
4465
4472
|
color: ${(props) => props.theme.colors.textSecondary}80;
|
|
4466
4473
|
}
|
|
4467
4474
|
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4475
|
+
&:focus {
|
|
4476
|
+
${(props) => props.withNoBorder ? import_styled_components11.css`
|
|
4477
|
+
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
4478
|
+
` : import_styled_components11.css`
|
|
4479
|
+
border-color: ${props.theme.colors.primary};
|
|
4480
|
+
`}
|
|
4481
|
+
}
|
|
4473
4482
|
|
|
4474
4483
|
${(props) => props.style}
|
|
4475
4484
|
|