@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.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export * from './lib/page-block/page-block';
|
|
|
54
54
|
export * from './lib/pages/pages';
|
|
55
55
|
export * from './lib/pagination/pagination';
|
|
56
56
|
export * from './lib/popover/popover';
|
|
57
|
+
export * from './lib/push-drawer/push-drawer';
|
|
57
58
|
export * from './lib/radio-group/radio-group';
|
|
58
59
|
export * from './lib/side-menu-group/side-menu-group';
|
|
59
60
|
export * from './lib/side-menu-heading/side-menu-heading';
|
package/index.js
CHANGED
|
@@ -1631,6 +1631,42 @@ function GoabPopover({
|
|
|
1631
1631
|
}
|
|
1632
1632
|
);
|
|
1633
1633
|
}
|
|
1634
|
+
function GoabPushDrawer({
|
|
1635
|
+
testid,
|
|
1636
|
+
open,
|
|
1637
|
+
heading,
|
|
1638
|
+
width,
|
|
1639
|
+
actions,
|
|
1640
|
+
children,
|
|
1641
|
+
onClose
|
|
1642
|
+
}) {
|
|
1643
|
+
const el = react.useRef(null);
|
|
1644
|
+
react.useEffect(() => {
|
|
1645
|
+
const elCurrent = el == null ? void 0 : el.current;
|
|
1646
|
+
if (!elCurrent || !onClose) {
|
|
1647
|
+
return;
|
|
1648
|
+
}
|
|
1649
|
+
elCurrent.addEventListener("_close", onClose);
|
|
1650
|
+
return () => {
|
|
1651
|
+
elCurrent.removeEventListener("_close", onClose);
|
|
1652
|
+
};
|
|
1653
|
+
}, [el, onClose]);
|
|
1654
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1655
|
+
"goa-push-drawer",
|
|
1656
|
+
{
|
|
1657
|
+
ref: el,
|
|
1658
|
+
testid,
|
|
1659
|
+
open: open ?? false,
|
|
1660
|
+
heading: typeof heading === "string" ? heading : void 0,
|
|
1661
|
+
width,
|
|
1662
|
+
children: [
|
|
1663
|
+
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
1664
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
1665
|
+
children
|
|
1666
|
+
]
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
}
|
|
1634
1670
|
function GoabRadioItem({
|
|
1635
1671
|
name,
|
|
1636
1672
|
label,
|
|
@@ -2510,6 +2546,7 @@ exports.GoabPublicFormTask = GoabPublicFormTask;
|
|
|
2510
2546
|
exports.GoabPublicFormTaskList = GoabPublicFormTaskList;
|
|
2511
2547
|
exports.GoabPublicSubform = GoabPublicSubform;
|
|
2512
2548
|
exports.GoabPublicSubformIndex = GoabPublicSubformIndex;
|
|
2549
|
+
exports.GoabPushDrawer = GoabPushDrawer;
|
|
2513
2550
|
exports.GoabRadioGroup = GoabRadioGroup;
|
|
2514
2551
|
exports.GoabRadioItem = GoabRadioItem;
|
|
2515
2552
|
exports.GoabSideMenu = GoabSideMenu;
|