react-better-html 1.1.245 → 1.1.246
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 +11 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1303,12 +1303,14 @@ import { useTheme as useTheme3 } from "react-better-core";
|
|
|
1303
1303
|
// src/components/Text.tsx
|
|
1304
1304
|
import { forwardRef, memo } from "react";
|
|
1305
1305
|
import { useTheme as useTheme2 } from "react-better-core";
|
|
1306
|
-
import styled from "styled-components";
|
|
1306
|
+
import styled, { css } from "styled-components";
|
|
1307
1307
|
import { jsx } from "react/jsx-runtime";
|
|
1308
1308
|
var TextStyledComponent = styled.p.withConfig({
|
|
1309
|
-
shouldForwardProp: (prop) => !["style", "hoverStyle"].includes(prop)
|
|
1309
|
+
shouldForwardProp: (prop) => !["theme", "style", "hoverStyle", "isP"].includes(prop)
|
|
1310
1310
|
})`
|
|
1311
|
-
|
|
1311
|
+
${(props) => props.isP ? css`
|
|
1312
|
+
font-size: ${props.theme.styles.fontSize}px;
|
|
1313
|
+
` : ""}
|
|
1312
1314
|
|
|
1313
1315
|
${(props) => props.style}
|
|
1314
1316
|
|
|
@@ -1316,7 +1318,7 @@ var TextStyledComponent = styled.p.withConfig({
|
|
|
1316
1318
|
${(props) => props.hoverStyle}
|
|
1317
1319
|
}
|
|
1318
1320
|
`;
|
|
1319
|
-
var TextComponent = forwardRef(function Text({ htmlContentTranslate, children, ...props }, ref) {
|
|
1321
|
+
var TextComponent = forwardRef(function Text({ as: asValue, htmlContentTranslate, children, ...props }, ref) {
|
|
1320
1322
|
const theme2 = useTheme2();
|
|
1321
1323
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
1322
1324
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
@@ -1324,11 +1326,12 @@ var TextComponent = forwardRef(function Text({ htmlContentTranslate, children, .
|
|
|
1324
1326
|
return /* @__PURE__ */ jsx(
|
|
1325
1327
|
TextStyledComponent,
|
|
1326
1328
|
{
|
|
1327
|
-
as:
|
|
1329
|
+
as: asValue,
|
|
1328
1330
|
theme: theme2,
|
|
1329
1331
|
translate: htmlContentTranslate,
|
|
1330
1332
|
style,
|
|
1331
1333
|
hoverStyle,
|
|
1334
|
+
isP: asValue === "p",
|
|
1332
1335
|
...restProps,
|
|
1333
1336
|
...dataProps,
|
|
1334
1337
|
...ariaProps,
|
|
@@ -1583,9 +1586,11 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
|
|
|
1583
1586
|
imageAzProfileImage,
|
|
1584
1587
|
title,
|
|
1585
1588
|
titleAs = "h1",
|
|
1589
|
+
titleFontSize,
|
|
1586
1590
|
titleColor,
|
|
1587
1591
|
titleRightElement,
|
|
1588
1592
|
description,
|
|
1593
|
+
descriptionFontSize,
|
|
1589
1594
|
descriptionColor,
|
|
1590
1595
|
textAlign,
|
|
1591
1596
|
rightElement,
|
|
@@ -1635,6 +1640,7 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
|
|
|
1635
1640
|
Text_default,
|
|
1636
1641
|
{
|
|
1637
1642
|
as: titleAs,
|
|
1643
|
+
fontSize: titleFontSize,
|
|
1638
1644
|
textAlign,
|
|
1639
1645
|
color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
|
|
1640
1646
|
children: title
|
|
@@ -1648,6 +1654,7 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
|
|
|
1648
1654
|
Text_default,
|
|
1649
1655
|
{
|
|
1650
1656
|
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
1657
|
+
fontSize: descriptionFontSize,
|
|
1651
1658
|
textAlign,
|
|
1652
1659
|
color: descriptionColor ?? (lightMode ? theme2.colors.base : theme2.colors.textSecondary),
|
|
1653
1660
|
opacity: lightMode ? 0.7 : void 0,
|
|
@@ -1910,7 +1917,7 @@ import {
|
|
|
1910
1917
|
useLoader,
|
|
1911
1918
|
useTheme as useTheme9
|
|
1912
1919
|
} from "react-better-core";
|
|
1913
|
-
import styled6, { css } from "styled-components";
|
|
1920
|
+
import styled6, { css as css2 } from "styled-components";
|
|
1914
1921
|
|
|
1915
1922
|
// src/utils/variableFunctions.ts
|
|
1916
1923
|
var checkBetterCoreContextValue = (value, functionsName) => {
|
|
@@ -2068,10 +2075,10 @@ var ButtonElement = styled6.button.withConfig({
|
|
|
2068
2075
|
flex-shrink: 0;
|
|
2069
2076
|
transition: ${(props) => props.theme.styles.transition};
|
|
2070
2077
|
|
|
2071
|
-
${(props) => props.disabled ?
|
|
2078
|
+
${(props) => props.disabled ? css2`
|
|
2072
2079
|
opacity: 0.6;
|
|
2073
2080
|
cursor: not-allowed;
|
|
2074
|
-
` : !props.isLoading ?
|
|
2081
|
+
` : !props.isLoading ? css2`
|
|
2075
2082
|
cursor: pointer;
|
|
2076
2083
|
|
|
2077
2084
|
&:not(.secondary):hover {
|
|
@@ -2079,9 +2086,9 @@ var ButtonElement = styled6.button.withConfig({
|
|
|
2079
2086
|
}
|
|
2080
2087
|
|
|
2081
2088
|
&.secondary:hover {
|
|
2082
|
-
${props.withNoBorder ?
|
|
2089
|
+
${props.withNoBorder ? css2`
|
|
2083
2090
|
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
2084
|
-
` :
|
|
2091
|
+
` : css2`
|
|
2085
2092
|
border-color: ${props.theme.colors.primary};
|
|
2086
2093
|
`}
|
|
2087
2094
|
}
|
|
@@ -3527,7 +3534,7 @@ import {
|
|
|
3527
3534
|
useTheme as useTheme19,
|
|
3528
3535
|
useBetterCoreContext as useBetterCoreContext7
|
|
3529
3536
|
} from "react-better-core";
|
|
3530
|
-
import styled10, { css as
|
|
3537
|
+
import styled10, { css as css3 } from "styled-components";
|
|
3531
3538
|
|
|
3532
3539
|
// src/components/Label.tsx
|
|
3533
3540
|
import { memo as memo15 } from "react";
|
|
@@ -4293,9 +4300,9 @@ var InputElement = styled10.input.withConfig({
|
|
|
4293
4300
|
}
|
|
4294
4301
|
|
|
4295
4302
|
&:focus {
|
|
4296
|
-
${(props) => props.withNoBorder ?
|
|
4303
|
+
${(props) => props.withNoBorder ? css3`
|
|
4297
4304
|
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
4298
|
-
` :
|
|
4305
|
+
` : css3`
|
|
4299
4306
|
border-color: ${props.theme.colors.primary};
|
|
4300
4307
|
`}
|
|
4301
4308
|
}
|
|
@@ -4416,9 +4423,9 @@ var TextareaElement = styled10.textarea.withConfig({
|
|
|
4416
4423
|
color: ${(props) => props.theme.colors.textSecondary}80;
|
|
4417
4424
|
}
|
|
4418
4425
|
|
|
4419
|
-
${(props) => props.withNoBorder ?
|
|
4426
|
+
${(props) => props.withNoBorder ? css3`
|
|
4420
4427
|
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
4421
|
-
` :
|
|
4428
|
+
` : css3`
|
|
4422
4429
|
border-color: ${props.theme.colors.primary};
|
|
4423
4430
|
`}
|
|
4424
4431
|
|
|
@@ -5445,7 +5452,7 @@ var InputField_default = InputField2;
|
|
|
5445
5452
|
// src/components/ToggleInput.tsx
|
|
5446
5453
|
import { forwardRef as forwardRef12, useCallback as useCallback11, useId as useId3, useState as useState8 } from "react";
|
|
5447
5454
|
import { useBetterCoreContext as useBetterCoreContext8, useBooleanState as useBooleanState6, useTheme as useTheme20 } from "react-better-core";
|
|
5448
|
-
import styled11, { css as
|
|
5455
|
+
import styled11, { css as css4 } from "styled-components";
|
|
5449
5456
|
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5450
5457
|
var componentSize = 26;
|
|
5451
5458
|
var switchComponentBallGap = 3;
|
|
@@ -5481,9 +5488,9 @@ var InputElement2 = styled11.input.withConfig({
|
|
|
5481
5488
|
${(props) => props.style}
|
|
5482
5489
|
|
|
5483
5490
|
&:hover {
|
|
5484
|
-
${(props) => props.withNoBorder ?
|
|
5491
|
+
${(props) => props.withNoBorder ? css4`
|
|
5485
5492
|
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
5486
|
-
` :
|
|
5493
|
+
` : css4`
|
|
5487
5494
|
border-color: ${props.theme.colors.primary};
|
|
5488
5495
|
`}
|
|
5489
5496
|
|
|
@@ -6048,7 +6055,7 @@ import {
|
|
|
6048
6055
|
Fragment as Fragment6
|
|
6049
6056
|
} from "react";
|
|
6050
6057
|
import { darkenColor as darkenColor3, useBetterCoreContext as useBetterCoreContext9, useTheme as useTheme25 } from "react-better-core";
|
|
6051
|
-
import styled12, { css as
|
|
6058
|
+
import styled12, { css as css5 } from "styled-components";
|
|
6052
6059
|
|
|
6053
6060
|
// src/components/Pagination.tsx
|
|
6054
6061
|
import { memo as memo22, useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo8, useState as useState10 } from "react";
|
|
@@ -6248,13 +6255,13 @@ var TableStyledComponent = styled12.table.withConfig({
|
|
|
6248
6255
|
}
|
|
6249
6256
|
}
|
|
6250
6257
|
|
|
6251
|
-
${(props) => props.isStriped ?
|
|
6258
|
+
${(props) => props.isStriped ? css5`
|
|
6252
6259
|
&:nth-child(even) {
|
|
6253
6260
|
background-color: ${props.theme.colors.backgroundSecondary};
|
|
6254
6261
|
}
|
|
6255
6262
|
` : ""}
|
|
6256
6263
|
|
|
6257
|
-
${(props) => props.withHover ?
|
|
6264
|
+
${(props) => props.withHover ? css5`
|
|
6258
6265
|
transition: ${props.theme.styles.transition};
|
|
6259
6266
|
|
|
6260
6267
|
&:not(.isHeader):not(.isFooter):not(.withoutHover):hover {
|
|
@@ -6945,56 +6952,56 @@ var Table_default = Table2;
|
|
|
6945
6952
|
// src/components/Tooltip.tsx
|
|
6946
6953
|
import { memo as memo24, useCallback as useCallback15, useRef as useRef7, useState as useState12, useEffect as useEffect13, forwardRef as forwardRef16, useImperativeHandle as useImperativeHandle3, useMemo as useMemo10 } from "react";
|
|
6947
6954
|
import { useTheme as useTheme26 } from "react-better-core";
|
|
6948
|
-
import styled13, { css as
|
|
6955
|
+
import styled13, { css as css6 } from "styled-components";
|
|
6949
6956
|
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6950
6957
|
var tooltipContainerStyle = (props) => ({
|
|
6951
|
-
top:
|
|
6958
|
+
top: css6`
|
|
6952
6959
|
bottom: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6953
6960
|
${props.align === "center" ? "left: 50%;" : props.align === "left" ? "left: 0;" : "right: 0;"}
|
|
6954
6961
|
`,
|
|
6955
|
-
bottom:
|
|
6962
|
+
bottom: css6`
|
|
6956
6963
|
top: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6957
6964
|
${props.align === "center" ? "left: 50%;" : props.align === "left" ? "left: 0;" : "right: 0;"};
|
|
6958
6965
|
`,
|
|
6959
|
-
left:
|
|
6966
|
+
left: css6`
|
|
6960
6967
|
${props.align === "center" ? "top: 50%;" : props.align === "top" ? "top: 0;" : "bottom: 0;"};
|
|
6961
6968
|
right: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6962
6969
|
`,
|
|
6963
|
-
right:
|
|
6970
|
+
right: css6`
|
|
6964
6971
|
${props.align === "center" ? "top: 50%;" : props.align === "top" ? "top: 0;" : "bottom: 0;"};
|
|
6965
6972
|
left: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6966
6973
|
`
|
|
6967
6974
|
});
|
|
6968
6975
|
var tooltipPositionStyle = (props) => ({
|
|
6969
6976
|
top: {
|
|
6970
|
-
opened:
|
|
6977
|
+
opened: css6`
|
|
6971
6978
|
transform: translateX(${props.align === "center" ? "-50%" : "0"});
|
|
6972
6979
|
`,
|
|
6973
|
-
closed:
|
|
6980
|
+
closed: css6`
|
|
6974
6981
|
transform: translateX(${props.align === "center" ? "-50%" : "0"}) translateY(${props.theme.styles.gap}px);
|
|
6975
6982
|
`
|
|
6976
6983
|
},
|
|
6977
6984
|
bottom: {
|
|
6978
|
-
opened:
|
|
6985
|
+
opened: css6`
|
|
6979
6986
|
transform: translateX(${props.align === "center" ? "-50%" : "0"});
|
|
6980
6987
|
`,
|
|
6981
|
-
closed:
|
|
6988
|
+
closed: css6`
|
|
6982
6989
|
transform: translateX(${props.align === "center" ? "-50%" : "0"}) translateY(-${props.theme.styles.gap}px);
|
|
6983
6990
|
`
|
|
6984
6991
|
},
|
|
6985
6992
|
left: {
|
|
6986
|
-
opened:
|
|
6993
|
+
opened: css6`
|
|
6987
6994
|
transform: translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6988
6995
|
`,
|
|
6989
|
-
closed:
|
|
6996
|
+
closed: css6`
|
|
6990
6997
|
transform: translateX(${props.theme.styles.gap}px) translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6991
6998
|
`
|
|
6992
6999
|
},
|
|
6993
7000
|
right: {
|
|
6994
|
-
opened:
|
|
7001
|
+
opened: css6`
|
|
6995
7002
|
transform: translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6996
7003
|
`,
|
|
6997
|
-
closed:
|
|
7004
|
+
closed: css6`
|
|
6998
7005
|
transform: translateX(-${props.theme.styles.gap}px) translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6999
7006
|
`
|
|
7000
7007
|
}
|