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