@abgov/react-components 6.7.1-alpha.1 → 6.7.1-alpha.3

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/index.mjs CHANGED
@@ -614,18 +614,24 @@ function GoabDatePicker({
614
614
  }
615
615
  };
616
616
  }, [onChange]);
617
- const isValidDate = (value2) => value2 && value2 instanceof Date && !isNaN(value2.getTime());
617
+ const formatValue = (value2) => {
618
+ if (!value2) return "";
619
+ if (value2 instanceof Date) {
620
+ return value2.toISOString();
621
+ }
622
+ return value2;
623
+ };
618
624
  return /* @__PURE__ */ jsx(
619
625
  "goa-date-picker",
620
626
  {
621
627
  ref,
622
628
  name,
623
- value: isValidDate(value) ? value == null ? void 0 : value.toISOString() : void 0,
629
+ value: formatValue(value),
624
630
  type,
625
631
  error: error ? "true" : void 0,
626
632
  disabled: disabled ? "true" : void 0,
627
- min: isValidDate(min) ? min == null ? void 0 : min.toISOString() : void 0,
628
- max: isValidDate(max) ? max == null ? void 0 : max.toISOString() : void 0,
633
+ min: formatValue(min),
634
+ max: formatValue(max),
629
635
  testid: testId,
630
636
  mt,
631
637
  mr,
@@ -3793,18 +3799,22 @@ function GoabThreeColumnLayout(props) {
3793
3799
  );
3794
3800
  }
3795
3801
  function GoabTooltip(props) {
3796
- return /* @__PURE__ */ jsx(
3802
+ const isStringContent = typeof props.content === "string";
3803
+ return /* @__PURE__ */ jsxs(
3797
3804
  "goa-tooltip",
3798
3805
  {
3799
3806
  position: props.position,
3800
- content: props.content,
3807
+ content: isStringContent ? props.content : void 0,
3801
3808
  halign: props.hAlign,
3802
3809
  testid: props.testId,
3803
3810
  mt: props.mt,
3804
3811
  mr: props.mr,
3805
3812
  mb: props.mb,
3806
3813
  ml: props.ml,
3807
- children: props.children
3814
+ children: [
3815
+ !isStringContent && props.content && /* @__PURE__ */ jsx("div", { slot: "content", children: props.content }),
3816
+ props.children
3817
+ ]
3808
3818
  }
3809
3819
  );
3810
3820
  }