react-better-html 1.1.149 → 1.1.151

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
@@ -3611,7 +3611,7 @@ var PageHeaderComponent = forwardRef8(function PageHeader({
3611
3611
  {
3612
3612
  alignItems: "center",
3613
3613
  gap: theme2.styles.space,
3614
- marginBottom: marginBottom ?? theme2.styles.space * 2,
3614
+ marginBottom: marginBottom || theme2.styles.space * 2,
3615
3615
  ref,
3616
3616
  children: [
3617
3617
  imageUrl && /* @__PURE__ */ jsx13(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
@@ -6495,7 +6495,7 @@ InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, ...pr
6495
6495
  }
6496
6496
  );
6497
6497
  });
6498
- InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate, ...props }, ref) {
6498
+ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate, defaultDateAfterTimePick, defaultTimeAfterDatePick = "00:00", ...props }, ref) {
6499
6499
  const theme2 = useTheme();
6500
6500
  const holderRef = useRef5(null);
6501
6501
  const selectedHourRef = useRef5(null);
@@ -6504,31 +6504,31 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
6504
6504
  const { internalValue, setInternalValue, inputFieldProps, insideInputFieldComponentProps, isOpen } = useComponentInputFieldDateProps(props, holderRef, isMobileIOS);
6505
6505
  const onChange = useCallback9(
6506
6506
  (date) => {
6507
- const newValue = date ? `${date}T${internalValue?.toString().split("T")[1] ?? "00:00"}` : "";
6507
+ const newValue = date ? `${date}T${internalValue?.toString().split("T")[1] ?? defaultTimeAfterDatePick}` : "";
6508
6508
  inputFieldProps.onChangeValue?.(newValue);
6509
6509
  setInternalValue(newValue);
6510
6510
  },
6511
- [internalValue, inputFieldProps.onChangeValue]
6511
+ [internalValue, defaultTimeAfterDatePick, inputFieldProps.onChangeValue]
6512
6512
  );
6513
6513
  const onClickHour = useCallback9(
6514
6514
  (hour) => {
6515
6515
  const newTime = `${hour.toString().padStart(2, "0")}:${internalValue?.toString().split(":")[1] || "00"}`;
6516
- const today = `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
6516
+ const today = defaultDateAfterTimePick ?? `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
6517
6517
  const newValue = `${(internalValue.trim() || today)?.toString().split("T")[0]}T${newTime}`;
6518
6518
  inputFieldProps.onChangeValue?.(newValue);
6519
6519
  setInternalValue(newValue);
6520
6520
  },
6521
- [internalValue, inputFieldProps.onChangeValue]
6521
+ [defaultDateAfterTimePick, internalValue, inputFieldProps.onChangeValue]
6522
6522
  );
6523
6523
  const onClickMinute = useCallback9(
6524
6524
  (minute) => {
6525
6525
  const newTime = `${internalValue?.toString().split("T")?.[1]?.split(":")[0] || "00"}:${minute.toString().padStart(2, "0")}`;
6526
- const today = `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
6526
+ const today = defaultDateAfterTimePick ?? `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
6527
6527
  const newValue = `${(internalValue.trim() || today)?.toString().split("T")[0]}T${newTime}`;
6528
6528
  inputFieldProps.onChangeValue?.(newValue);
6529
6529
  setInternalValue(newValue);
6530
6530
  },
6531
- [internalValue, inputFieldProps.onChangeValue]
6531
+ [defaultDateAfterTimePick, internalValue, inputFieldProps.onChangeValue]
6532
6532
  );
6533
6533
  useEffect8(() => {
6534
6534
  if (isOpen && selectedHourRef.current)
@@ -7507,6 +7507,7 @@ var TableComponent = forwardRef15(function Table({
7507
7507
  pageCount,
7508
7508
  isInsideTableExpandRow,
7509
7509
  containsOverflowComponents,
7510
+ wrapperComponentRef,
7510
7511
  getRowStyle,
7511
7512
  onClickRow,
7512
7513
  onClickAllCheckboxes,
@@ -7887,6 +7888,7 @@ var TableComponent = forwardRef15(function Table({
7887
7888
  borderRadius: theme2.styles.borderRadius * 2,
7888
7889
  overflow: !containsOverflowComponents ? "auto" : void 0,
7889
7890
  ...props,
7891
+ ref: wrapperComponentRef,
7890
7892
  children: /* @__PURE__ */ jsxs17(
7891
7893
  TableStyledComponent,
7892
7894
  {
@@ -7957,7 +7959,7 @@ var TableComponent = forwardRef15(function Table({
7957
7959
  }
7958
7960
  ),
7959
7961
  expandedRows[rowIndex] && /* @__PURE__ */ jsx22("tr", { className: "withoutHover isExpandRow", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: renderExpandedRow(item, rowIndex) }) })
7960
- ] }, JSON.stringify(item) + rowIndex + getRowStyle)) : /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ jsx22(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
7962
+ ] }, JSON.stringify(item) + rowIndex)) : /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ jsx22(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
7961
7963
  withFooter && /* @__PURE__ */ jsx22("tfoot", { children: /* @__PURE__ */ jsx22("tr", { className: "isFooter", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: /* @__PURE__ */ jsxs17(
7962
7964
  Div_default.column,
7963
7965
  {