react-better-html 1.1.110 → 1.1.111

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
@@ -3104,9 +3104,11 @@ var PageHolderComponent = forwardRef7(function PageHolder({ noMaxContentWidth, c
3104
3104
  );
3105
3105
  });
3106
3106
  PageHolderComponent.center = forwardRef7(function Center({
3107
- decorationImageSrc,
3108
- decorationImageName,
3109
- decorationImagePosition = "right",
3107
+ sideImageSrc,
3108
+ sideImageName,
3109
+ sideImagePosition = "right",
3110
+ sideImageAlignment = "center",
3111
+ sideImageFooter,
3110
3112
  noMaxContentWidth,
3111
3113
  children,
3112
3114
  ...props
@@ -3116,39 +3118,45 @@ PageHolderComponent.center = forwardRef7(function Center({
3116
3118
  const { app } = useBetterHtmlContextInternal();
3117
3119
  const breakingPoint = mediaQuery.size1000;
3118
3120
  return /* @__PURE__ */ jsxs6(Div_default.row, { width: "100%", minHeight: "100svh", alignItems: "center", justifyContent: "center", children: [
3119
- decorationImagePosition === "left" && !breakingPoint && /* @__PURE__ */ jsx10(Div_default, { width: "50%" }),
3120
- /* @__PURE__ */ jsx10(
3121
- Div_default.column,
3121
+ sideImagePosition === "left" && !breakingPoint && /* @__PURE__ */ jsx10(Div_default, { width: "50%" }),
3122
+ /* @__PURE__ */ jsx10(Div_default.column, { width: `${!breakingPoint && (sideImageSrc || sideImageName) ? 50 : 100}%`, alignItems: "center", children: /* @__PURE__ */ jsx10(
3123
+ Div_default.box,
3122
3124
  {
3123
- width: `${!breakingPoint && (decorationImageSrc || decorationImageName) ? 50 : 100}%`,
3124
- alignItems: "center",
3125
- children: /* @__PURE__ */ jsx10(
3126
- Div_default.box,
3127
- {
3128
- width: `calc(100% - ${theme2.styles.space}px * 2)`,
3129
- maxWidth: !noMaxContentWidth ? app.contentMaxWidth / 2 : void 0,
3130
- marginInline: theme2.styles.space,
3131
- marginBlock: theme2.styles.space,
3132
- ...props,
3133
- ref,
3134
- children
3135
- }
3136
- )
3125
+ width: `calc(100% - ${theme2.styles.space}px * 2)`,
3126
+ maxWidth: !noMaxContentWidth ? app.contentMaxWidth / 2 : void 0,
3127
+ marginInline: theme2.styles.space,
3128
+ marginBlock: theme2.styles.space,
3129
+ ...props,
3130
+ ref,
3131
+ children
3137
3132
  }
3138
- ),
3139
- decorationImagePosition === "right" && !breakingPoint && /* @__PURE__ */ jsx10(Div_default, { width: "50%" }),
3140
- (decorationImageSrc || decorationImageName) && !breakingPoint && /* @__PURE__ */ jsx10(
3141
- Image_default,
3133
+ ) }),
3134
+ sideImagePosition === "right" && !breakingPoint && /* @__PURE__ */ jsx10(Div_default, { width: "50%" }),
3135
+ (sideImageSrc || sideImageName) && !breakingPoint && /* @__PURE__ */ jsxs6(
3136
+ Div_default,
3142
3137
  {
3143
3138
  position: "fixed",
3144
- name: decorationImageName,
3145
- src: decorationImageSrc,
3146
3139
  width: "50%",
3147
3140
  height: "100svh",
3148
3141
  top: 0,
3149
- left: decorationImagePosition === "left" ? 0 : "auto",
3150
- right: decorationImagePosition === "right" ? 0 : "auto",
3151
- objectFit: "cover"
3142
+ left: sideImagePosition === "left" ? 0 : "auto",
3143
+ right: sideImagePosition === "right" ? 0 : "auto",
3144
+ children: [
3145
+ /* @__PURE__ */ jsx10(
3146
+ Div_default.row,
3147
+ {
3148
+ position: "absolute",
3149
+ width: "100%",
3150
+ height: "100%",
3151
+ top: 0,
3152
+ left: 0,
3153
+ justifyContent: sideImageAlignment === "left" ? "flex-start" : sideImageAlignment === "right" ? "flex-end" : "center",
3154
+ overflow: "hidden",
3155
+ children: /* @__PURE__ */ jsx10(Image_default, { name: sideImageName, height: "100%", src: sideImageSrc })
3156
+ }
3157
+ ),
3158
+ /* @__PURE__ */ jsx10(Div_default, { position: "absolute", width: "100%", bottom: theme2.styles.space, children: sideImageFooter })
3159
+ ]
3152
3160
  }
3153
3161
  )
3154
3162
  ] });
@@ -6928,7 +6936,7 @@ var TableComponent = forwardRef15(function Table({
6928
6936
  switch (column.type) {
6929
6937
  case "text": {
6930
6938
  const value = column.keyName ? item[column.keyName] : void 0;
6931
- return column.format ? column.format(item, index) : String(value ?? "");
6939
+ return column.format?.(item, index) ?? String(value);
6932
6940
  }
6933
6941
  case "element": {
6934
6942
  return column.render?.(item, index) ?? /* @__PURE__ */ jsx20(Fragment5, {});
@@ -7224,7 +7232,7 @@ var TableComponent = forwardRef15(function Table({
7224
7232
  {
7225
7233
  width: "100%",
7226
7234
  alignItems: "center",
7227
- justifyContent: "space-between",
7235
+ justifyContent: column.filter ? "space-between" : column.align === "center" ? "center" : column.align === "right" ? "flex-end" : "flex-start",
7228
7236
  gap: theme2.styles.gap,
7229
7237
  children: [
7230
7238
  column.type === "checkbox" && onClickAllCheckboxes ? /* @__PURE__ */ jsx20(