react-better-html 1.1.108 → 1.1.110

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
@@ -6789,7 +6789,7 @@ import {
6789
6789
  } from "react";
6790
6790
  import styled10, { css as css2 } from "styled-components";
6791
6791
  import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
6792
- var defaultImageWidth = 120;
6792
+ var defaultImageWidth = 160;
6793
6793
  var maximumVisiblePages = 11;
6794
6794
  var TableStyledComponent = styled10.table.withConfig({
6795
6795
  shouldForwardProp: (prop) => !["isStriped", "withHover", "withStickyHeader", "colorTheme", "theme"].includes(prop)
@@ -6934,12 +6934,11 @@ var TableComponent = forwardRef15(function Table({
6934
6934
  return column.render?.(item, index) ?? /* @__PURE__ */ jsx20(Fragment5, {});
6935
6935
  }
6936
6936
  case "image": {
6937
- const { type, keyName, ...props2 } = column;
6938
- const src = keyName ? item[keyName] : void 0;
6939
- return /* @__PURE__ */ jsx20(Image_default, { src, width: defaultImageWidth, borderRadius: theme2.styles.borderRadius / 2, ...props2 });
6937
+ const src = column.getImageSrc?.(item, index) ?? (column.keyName ? item[column.keyName] : void 0);
6938
+ return /* @__PURE__ */ jsx20(Image_default, { src, width: "100%", borderRadius: theme2.styles.borderRadius / 2, ...column.imageProps });
6940
6939
  }
6941
6940
  case "checkbox": {
6942
- const { type, onChange, ...props2 } = column;
6941
+ const { onChange, ...toggleInputProps } = column.toggleInputProps ?? {};
6943
6942
  const checkedValue = checkedItems[index];
6944
6943
  return /* @__PURE__ */ jsx20(
6945
6944
  ToggleInput_default.checkbox,
@@ -6951,7 +6950,7 @@ var TableComponent = forwardRef15(function Table({
6951
6950
  );
6952
6951
  onChange?.(checked, value);
6953
6952
  },
6954
- ...props2
6953
+ ...toggleInputProps
6955
6954
  }
6956
6955
  );
6957
6956
  }
@@ -7216,7 +7215,7 @@ var TableComponent = forwardRef15(function Table({
7216
7215
  /* @__PURE__ */ jsx20("thead", { children: /* @__PURE__ */ jsx20("tr", { className: "isHeader", children: columns.map((column, index) => /* @__PURE__ */ jsx20(
7217
7216
  ThStyledComponent,
7218
7217
  {
7219
- width: column.type === "image" ? defaultImageWidth : column.type === "checkbox" ? 26 : column.width,
7218
+ width: column.width ?? (column.type === "image" ? defaultImageWidth : column.type === "checkbox" ? 26 : void 0),
7220
7219
  minWidth: column.minWidth,
7221
7220
  maxWidth: column.maxWidth,
7222
7221
  textAlign: column.align,