@abgov/react-components 6.11.0-dev.1 → 6.11.0-dev.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.d.ts +1 -0
- package/index.js +37 -0
- package/index.js.map +1 -1
- package/index.mjs +37 -0
- package/index.mjs.map +1 -1
- package/lib/push-drawer/push-drawer.d.ts +26 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1629,6 +1629,42 @@ function GoabPopover({
|
|
|
1629
1629
|
}
|
|
1630
1630
|
);
|
|
1631
1631
|
}
|
|
1632
|
+
function GoabPushDrawer({
|
|
1633
|
+
testid,
|
|
1634
|
+
open,
|
|
1635
|
+
heading,
|
|
1636
|
+
width,
|
|
1637
|
+
actions,
|
|
1638
|
+
children,
|
|
1639
|
+
onClose
|
|
1640
|
+
}) {
|
|
1641
|
+
const el = useRef(null);
|
|
1642
|
+
useEffect(() => {
|
|
1643
|
+
const elCurrent = el == null ? void 0 : el.current;
|
|
1644
|
+
if (!elCurrent || !onClose) {
|
|
1645
|
+
return;
|
|
1646
|
+
}
|
|
1647
|
+
elCurrent.addEventListener("_close", onClose);
|
|
1648
|
+
return () => {
|
|
1649
|
+
elCurrent.removeEventListener("_close", onClose);
|
|
1650
|
+
};
|
|
1651
|
+
}, [el, onClose]);
|
|
1652
|
+
return /* @__PURE__ */ jsxs(
|
|
1653
|
+
"goa-push-drawer",
|
|
1654
|
+
{
|
|
1655
|
+
ref: el,
|
|
1656
|
+
testid,
|
|
1657
|
+
open: open ?? false,
|
|
1658
|
+
heading: typeof heading === "string" ? heading : void 0,
|
|
1659
|
+
width,
|
|
1660
|
+
children: [
|
|
1661
|
+
heading && typeof heading !== "string" && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
|
|
1662
|
+
actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions }),
|
|
1663
|
+
children
|
|
1664
|
+
]
|
|
1665
|
+
}
|
|
1666
|
+
);
|
|
1667
|
+
}
|
|
1632
1668
|
function GoabRadioItem({
|
|
1633
1669
|
name,
|
|
1634
1670
|
label,
|
|
@@ -2509,6 +2545,7 @@ export {
|
|
|
2509
2545
|
GoabPublicFormTaskList,
|
|
2510
2546
|
GoabPublicSubform,
|
|
2511
2547
|
GoabPublicSubformIndex,
|
|
2548
|
+
GoabPushDrawer,
|
|
2512
2549
|
GoabRadioGroup,
|
|
2513
2550
|
GoabRadioItem,
|
|
2514
2551
|
GoabSideMenu,
|