react-better-html 1.1.159 → 1.1.161

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
@@ -3252,11 +3252,11 @@ var Divider_default = {
3252
3252
  })
3253
3253
  ),
3254
3254
  horizontal: memo10(
3255
- forwardRef5(function Divider2({ width = 1, backgroundColor, text, textColor, ...props }, ref) {
3255
+ forwardRef5(function Divider2({ width = 1, backgroundColor, text, textFontSize, textColor, ...props }, ref) {
3256
3256
  const theme2 = useTheme();
3257
3257
  return /* @__PURE__ */ jsxs5(Div_default.row, { width: "100%", alignItems: "center", gap: text ? theme2.styles.space : void 0, ...props, ref, children: [
3258
3258
  /* @__PURE__ */ jsx10(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border }),
3259
- text && /* @__PURE__ */ jsx10(Text_default, { color: textColor ?? theme2.colors.textSecondary, children: text }),
3259
+ text && /* @__PURE__ */ jsx10(Text_default, { fontSize: textFontSize, color: textColor ?? theme2.colors.textSecondary, children: text }),
3260
3260
  /* @__PURE__ */ jsx10(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border })
3261
3261
  ] });
3262
3262
  })
@@ -3566,12 +3566,11 @@ var PageHolderComponent = forwardRef7(function PageHolder({ noMaxContentWidth, c
3566
3566
  });
3567
3567
  PageHolderComponent.center = forwardRef7(function Center({
3568
3568
  pageBackgroundColor,
3569
+ pageBackgroundImage,
3569
3570
  contentMaxWidth,
3570
- sideImageSrc,
3571
- sideImageName,
3572
- sideImagePosition = "right",
3573
- sideImageAlignment = "center",
3574
- sideImageFooter,
3571
+ behindComponent,
3572
+ sideComponent,
3573
+ sideComponentPosition = "right",
3575
3574
  noMaxContentWidth,
3576
3575
  children,
3577
3576
  ...props
@@ -3580,21 +3579,36 @@ PageHolderComponent.center = forwardRef7(function Center({
3580
3579
  const mediaQuery = useMediaQuery();
3581
3580
  const { app } = useBetterHtmlContextInternal();
3582
3581
  const breakingPoint = mediaQuery.size1000;
3583
- const withSideImage = (sideImageSrc || sideImageName) && !breakingPoint;
3582
+ const withSideComponent = sideComponent && !breakingPoint;
3584
3583
  return /* @__PURE__ */ jsxs7(
3585
3584
  Div_default.row,
3586
3585
  {
3586
+ position: "relative",
3587
3587
  width: "100%",
3588
3588
  minHeight: "100svh",
3589
3589
  alignItems: "center",
3590
3590
  justifyContent: "center",
3591
3591
  backgroundColor: pageBackgroundColor,
3592
+ backgroundImage: pageBackgroundImage,
3592
3593
  children: [
3593
- sideImagePosition === "left" && withSideImage && /* @__PURE__ */ jsx12(Div_default, { width: "50%" }),
3594
- /* @__PURE__ */ jsx12(Div_default.column, { width: `${withSideImage ? 50 : 100}%`, alignItems: "center", children: /* @__PURE__ */ jsx12(
3594
+ behindComponent && /* @__PURE__ */ jsx12(
3595
+ Div_default,
3596
+ {
3597
+ position: "fixed",
3598
+ width: `${withSideComponent ? 50 : 100}%`,
3599
+ height: "100svh",
3600
+ top: 0,
3601
+ left: sideComponentPosition === "right" ? 0 : "auto",
3602
+ right: sideComponentPosition === "left" ? 0 : "auto",
3603
+ zIndex: 1,
3604
+ children: behindComponent
3605
+ }
3606
+ ),
3607
+ sideComponentPosition === "left" && withSideComponent && /* @__PURE__ */ jsx12(Div_default, { width: "50%" }),
3608
+ /* @__PURE__ */ jsx12(Div_default.column, { position: "relative", width: `${withSideComponent ? 50 : 100}%`, alignItems: "center", zIndex: 2, children: /* @__PURE__ */ jsx12(
3595
3609
  Div_default.box,
3596
3610
  {
3597
- width: `calc(100% - ${theme2.styles.space}px * 2)`,
3611
+ width: `calc(100% - ${theme2.styles.space * 2}px)`,
3598
3612
  maxWidth: !noMaxContentWidth ? contentMaxWidth ?? app.contentMaxWidth / 2 : void 0,
3599
3613
  marginInline: theme2.styles.space,
3600
3614
  marginBlock: theme2.styles.space,
@@ -3603,32 +3617,17 @@ PageHolderComponent.center = forwardRef7(function Center({
3603
3617
  children
3604
3618
  }
3605
3619
  ) }),
3606
- sideImagePosition === "right" && withSideImage && /* @__PURE__ */ jsx12(Div_default, { width: "50%" }),
3607
- withSideImage && /* @__PURE__ */ jsxs7(
3620
+ sideComponentPosition === "right" && withSideComponent && /* @__PURE__ */ jsx12(Div_default, { width: "50%" }),
3621
+ withSideComponent && /* @__PURE__ */ jsx12(
3608
3622
  Div_default,
3609
3623
  {
3610
3624
  position: "fixed",
3611
3625
  width: "50%",
3612
3626
  height: "100svh",
3613
3627
  top: 0,
3614
- left: sideImagePosition === "left" ? 0 : "auto",
3615
- right: sideImagePosition === "right" ? 0 : "auto",
3616
- children: [
3617
- /* @__PURE__ */ jsx12(
3618
- Div_default.row,
3619
- {
3620
- position: "absolute",
3621
- width: "100%",
3622
- height: "100%",
3623
- top: 0,
3624
- left: 0,
3625
- justifyContent: sideImageAlignment === "left" ? "flex-start" : sideImageAlignment === "right" ? "flex-end" : "center",
3626
- overflow: "hidden",
3627
- children: /* @__PURE__ */ jsx12(Image_default, { name: sideImageName, height: "100%", src: sideImageSrc })
3628
- }
3629
- ),
3630
- /* @__PURE__ */ jsx12(Div_default, { position: "absolute", width: "100%", bottom: theme2.styles.space, children: sideImageFooter })
3631
- ]
3628
+ left: sideComponentPosition === "left" ? 0 : "auto",
3629
+ right: sideComponentPosition === "right" ? 0 : "auto",
3630
+ children: sideComponent
3632
3631
  }
3633
3632
  )
3634
3633
  ]