@abgov/react-components 7.1.0 → 7.2.0-dev.2
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 +28 -11
- package/index.js.map +1 -1
- package/index.mjs +28 -11
- package/index.mjs.map +1 -1
- package/lib/chip/chip.d.ts +7 -7
- package/lib/container/container.d.ts +2 -2
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/hero-banner/hero-banner.d.ts +3 -1
- package/lib/input/input.d.ts +1 -0
- package/lib/microsite-header/microsite-header.d.ts +1 -1
- package/lib/radio-group/radio.d.ts +1 -1
- package/lib/tab/tab.d.ts +2 -2
- package/lib/table/table.d.ts +0 -1
- package/lib/tooltip/tooltip.d.ts +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2678,14 +2678,19 @@ function GoabDrawer({
|
|
|
2678
2678
|
}) {
|
|
2679
2679
|
const el = react.useRef(null);
|
|
2680
2680
|
react.useEffect(() => {
|
|
2681
|
-
var _a;
|
|
2682
2681
|
if (!(el == null ? void 0 : el.current) || !onClose) {
|
|
2683
2682
|
return;
|
|
2684
2683
|
}
|
|
2685
|
-
|
|
2684
|
+
const current = el.current;
|
|
2685
|
+
const listener = (e) => {
|
|
2686
|
+
if (e.target !== current) {
|
|
2687
|
+
return;
|
|
2688
|
+
}
|
|
2689
|
+
onClose();
|
|
2690
|
+
};
|
|
2691
|
+
current.addEventListener("_close", listener);
|
|
2686
2692
|
return () => {
|
|
2687
|
-
|
|
2688
|
-
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_close", onClose);
|
|
2693
|
+
current.removeEventListener("_close", listener);
|
|
2689
2694
|
};
|
|
2690
2695
|
}, [el, onClose]);
|
|
2691
2696
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3123,9 +3128,10 @@ function GoabHeroBanner({
|
|
|
3123
3128
|
backgroundColor,
|
|
3124
3129
|
textColor,
|
|
3125
3130
|
children,
|
|
3131
|
+
actions,
|
|
3126
3132
|
testId
|
|
3127
3133
|
}) {
|
|
3128
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
3134
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3129
3135
|
"goa-hero-banner",
|
|
3130
3136
|
{
|
|
3131
3137
|
heading,
|
|
@@ -3135,7 +3141,10 @@ function GoabHeroBanner({
|
|
|
3135
3141
|
backgroundcolor: backgroundColor,
|
|
3136
3142
|
textcolor: textColor,
|
|
3137
3143
|
testid: testId,
|
|
3138
|
-
children
|
|
3144
|
+
children: [
|
|
3145
|
+
children,
|
|
3146
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions })
|
|
3147
|
+
]
|
|
3139
3148
|
}
|
|
3140
3149
|
);
|
|
3141
3150
|
}
|
|
@@ -3576,7 +3585,10 @@ function GoabModal({
|
|
|
3576
3585
|
return;
|
|
3577
3586
|
}
|
|
3578
3587
|
const current = el.current;
|
|
3579
|
-
const listener = () => {
|
|
3588
|
+
const listener = (e) => {
|
|
3589
|
+
if (e.target !== current) {
|
|
3590
|
+
return;
|
|
3591
|
+
}
|
|
3580
3592
|
onClose == null ? void 0 : onClose();
|
|
3581
3593
|
};
|
|
3582
3594
|
current.addEventListener("_close", listener);
|
|
@@ -3727,14 +3739,19 @@ function GoabPushDrawer({
|
|
|
3727
3739
|
}) {
|
|
3728
3740
|
const el = react.useRef(null);
|
|
3729
3741
|
react.useEffect(() => {
|
|
3730
|
-
var _a;
|
|
3731
3742
|
if (!(el == null ? void 0 : el.current) || !onClose) {
|
|
3732
3743
|
return;
|
|
3733
3744
|
}
|
|
3734
|
-
|
|
3745
|
+
const current = el.current;
|
|
3746
|
+
const listener = (e) => {
|
|
3747
|
+
if (e.target !== current) {
|
|
3748
|
+
return;
|
|
3749
|
+
}
|
|
3750
|
+
onClose();
|
|
3751
|
+
};
|
|
3752
|
+
current.addEventListener("_close", listener);
|
|
3735
3753
|
return () => {
|
|
3736
|
-
|
|
3737
|
-
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_close", onClose);
|
|
3754
|
+
current.removeEventListener("_close", listener);
|
|
3738
3755
|
};
|
|
3739
3756
|
}, [el, onClose]);
|
|
3740
3757
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|