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.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
- font-size: ${(props) => props.theme.styles.fontSize}px;
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: props.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 ? css`
2078
+ ${(props) => props.disabled ? css2`
2072
2079
  opacity: 0.6;
2073
2080
  cursor: not-allowed;
2074
- ` : !props.isLoading ? css`
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 ? css`
2089
+ ${props.withNoBorder ? css2`
2083
2090
  filter: ${props.hoverStyle.filter ?? filterHover().z1};
2084
- ` : css`
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 css2 } from "styled-components";
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 ? css2`
4303
+ ${(props) => props.withNoBorder ? css3`
4297
4304
  filter: ${props.hoverStyle.filter ?? filterHover().z1};
4298
- ` : css2`
4305
+ ` : css3`
4299
4306
  border-color: ${props.theme.colors.primary};
4300
4307
  `}
4301
4308
  }
@@ -4416,11 +4423,13 @@ var TextareaElement = styled10.textarea.withConfig({
4416
4423
  color: ${(props) => props.theme.colors.textSecondary}80;
4417
4424
  }
4418
4425
 
4419
- ${(props) => props.withNoBorder ? css2`
4420
- filter: ${props.hoverStyle.filter ?? filterHover().z1};
4421
- ` : css2`
4422
- border-color: ${props.theme.colors.primary};
4423
- `}
4426
+ &:focus {
4427
+ ${(props) => props.withNoBorder ? css3`
4428
+ filter: ${props.hoverStyle.filter ?? filterHover().z1};
4429
+ ` : css3`
4430
+ border-color: ${props.theme.colors.primary};
4431
+ `}
4432
+ }
4424
4433
 
4425
4434
  ${(props) => props.style}
4426
4435
 
@@ -5445,7 +5454,7 @@ var InputField_default = InputField2;
5445
5454
  // src/components/ToggleInput.tsx
5446
5455
  import { forwardRef as forwardRef12, useCallback as useCallback11, useId as useId3, useState as useState8 } from "react";
5447
5456
  import { useBetterCoreContext as useBetterCoreContext8, useBooleanState as useBooleanState6, useTheme as useTheme20 } from "react-better-core";
5448
- import styled11, { css as css3 } from "styled-components";
5457
+ import styled11, { css as css4 } from "styled-components";
5449
5458
  import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
5450
5459
  var componentSize = 26;
5451
5460
  var switchComponentBallGap = 3;
@@ -5481,9 +5490,9 @@ var InputElement2 = styled11.input.withConfig({
5481
5490
  ${(props) => props.style}
5482
5491
 
5483
5492
  &:hover {
5484
- ${(props) => props.withNoBorder ? css3`
5493
+ ${(props) => props.withNoBorder ? css4`
5485
5494
  filter: ${props.hoverStyle.filter ?? filterHover().z1};
5486
- ` : css3`
5495
+ ` : css4`
5487
5496
  border-color: ${props.theme.colors.primary};
5488
5497
  `}
5489
5498
 
@@ -6048,7 +6057,7 @@ import {
6048
6057
  Fragment as Fragment6
6049
6058
  } from "react";
6050
6059
  import { darkenColor as darkenColor3, useBetterCoreContext as useBetterCoreContext9, useTheme as useTheme25 } from "react-better-core";
6051
- import styled12, { css as css4 } from "styled-components";
6060
+ import styled12, { css as css5 } from "styled-components";
6052
6061
 
6053
6062
  // src/components/Pagination.tsx
6054
6063
  import { memo as memo22, useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo8, useState as useState10 } from "react";
@@ -6248,13 +6257,13 @@ var TableStyledComponent = styled12.table.withConfig({
6248
6257
  }
6249
6258
  }
6250
6259
 
6251
- ${(props) => props.isStriped ? css4`
6260
+ ${(props) => props.isStriped ? css5`
6252
6261
  &:nth-child(even) {
6253
6262
  background-color: ${props.theme.colors.backgroundSecondary};
6254
6263
  }
6255
6264
  ` : ""}
6256
6265
 
6257
- ${(props) => props.withHover ? css4`
6266
+ ${(props) => props.withHover ? css5`
6258
6267
  transition: ${props.theme.styles.transition};
6259
6268
 
6260
6269
  &:not(.isHeader):not(.isFooter):not(.withoutHover):hover {
@@ -6945,56 +6954,56 @@ var Table_default = Table2;
6945
6954
  // src/components/Tooltip.tsx
6946
6955
  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
6956
  import { useTheme as useTheme26 } from "react-better-core";
6948
- import styled13, { css as css5 } from "styled-components";
6957
+ import styled13, { css as css6 } from "styled-components";
6949
6958
  import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
6950
6959
  var tooltipContainerStyle = (props) => ({
6951
- top: css5`
6960
+ top: css6`
6952
6961
  bottom: calc(100% + ${props.gap}px + ${props.arrowSize}px);
6953
6962
  ${props.align === "center" ? "left: 50%;" : props.align === "left" ? "left: 0;" : "right: 0;"}
6954
6963
  `,
6955
- bottom: css5`
6964
+ bottom: css6`
6956
6965
  top: calc(100% + ${props.gap}px + ${props.arrowSize}px);
6957
6966
  ${props.align === "center" ? "left: 50%;" : props.align === "left" ? "left: 0;" : "right: 0;"};
6958
6967
  `,
6959
- left: css5`
6968
+ left: css6`
6960
6969
  ${props.align === "center" ? "top: 50%;" : props.align === "top" ? "top: 0;" : "bottom: 0;"};
6961
6970
  right: calc(100% + ${props.gap}px + ${props.arrowSize}px);
6962
6971
  `,
6963
- right: css5`
6972
+ right: css6`
6964
6973
  ${props.align === "center" ? "top: 50%;" : props.align === "top" ? "top: 0;" : "bottom: 0;"};
6965
6974
  left: calc(100% + ${props.gap}px + ${props.arrowSize}px);
6966
6975
  `
6967
6976
  });
6968
6977
  var tooltipPositionStyle = (props) => ({
6969
6978
  top: {
6970
- opened: css5`
6979
+ opened: css6`
6971
6980
  transform: translateX(${props.align === "center" ? "-50%" : "0"});
6972
6981
  `,
6973
- closed: css5`
6982
+ closed: css6`
6974
6983
  transform: translateX(${props.align === "center" ? "-50%" : "0"}) translateY(${props.theme.styles.gap}px);
6975
6984
  `
6976
6985
  },
6977
6986
  bottom: {
6978
- opened: css5`
6987
+ opened: css6`
6979
6988
  transform: translateX(${props.align === "center" ? "-50%" : "0"});
6980
6989
  `,
6981
- closed: css5`
6990
+ closed: css6`
6982
6991
  transform: translateX(${props.align === "center" ? "-50%" : "0"}) translateY(-${props.theme.styles.gap}px);
6983
6992
  `
6984
6993
  },
6985
6994
  left: {
6986
- opened: css5`
6995
+ opened: css6`
6987
6996
  transform: translateY(${props.align === "center" ? "-50%" : "0"});
6988
6997
  `,
6989
- closed: css5`
6998
+ closed: css6`
6990
6999
  transform: translateX(${props.theme.styles.gap}px) translateY(${props.align === "center" ? "-50%" : "0"});
6991
7000
  `
6992
7001
  },
6993
7002
  right: {
6994
- opened: css5`
7003
+ opened: css6`
6995
7004
  transform: translateY(${props.align === "center" ? "-50%" : "0"});
6996
7005
  `,
6997
- closed: css5`
7006
+ closed: css6`
6998
7007
  transform: translateX(-${props.theme.styles.gap}px) translateY(${props.align === "center" ? "-50%" : "0"});
6999
7008
  `
7000
7009
  }