@abgov/react-components 6.8.0-alpha.1 → 6.8.0-alpha.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.mjs CHANGED
@@ -3293,6 +3293,36 @@ function GoALinkButton({ type = "primary", ...props }) {
3293
3293
  }
3294
3294
  );
3295
3295
  }
3296
+ function GoabMenuButton({
3297
+ text,
3298
+ type = "primary",
3299
+ testId,
3300
+ onAction,
3301
+ children
3302
+ }) {
3303
+ const el = useRef(null);
3304
+ useEffect(() => {
3305
+ if (!el.current) {
3306
+ return;
3307
+ }
3308
+ if (!onAction) {
3309
+ return;
3310
+ }
3311
+ const current = el.current;
3312
+ const listener = (e) => {
3313
+ const detail = e.detail;
3314
+ onAction(detail.action);
3315
+ };
3316
+ current.addEventListener("_action", listener);
3317
+ return () => {
3318
+ current.removeEventListener("_action", listener);
3319
+ };
3320
+ }, [el, onAction]);
3321
+ return /* @__PURE__ */ jsx("goa-menu-button", { ref: el, text, type, testid: testId, children });
3322
+ }
3323
+ function GoabMenuAction({ text, icon, action, testId }) {
3324
+ return /* @__PURE__ */ jsx("goa-menu-action", { text, action, icon, testid: testId });
3325
+ }
3296
3326
  function GoabMicrositeHeader({
3297
3327
  type,
3298
3328
  version,
@@ -3474,6 +3504,7 @@ function GoabPopover({
3474
3504
  position,
3475
3505
  relative,
3476
3506
  children,
3507
+ tabIndex = -1,
3477
3508
  mt,
3478
3509
  mr,
3479
3510
  mb,
@@ -3488,6 +3519,7 @@ function GoabPopover({
3488
3519
  padded: typeof padded === "undefined" ? void 0 : padded ? "true" : "false",
3489
3520
  position,
3490
3521
  relative: relative ? "true" : void 0,
3522
+ tabindex: tabIndex,
3491
3523
  mt,
3492
3524
  mr,
3493
3525
  mb,
@@ -4402,6 +4434,8 @@ export {
4402
4434
  GoabInputTime,
4403
4435
  GoabInputUrl,
4404
4436
  GoabLink,
4437
+ GoabMenuAction,
4438
+ GoabMenuButton,
4405
4439
  GoabMicrositeHeader,
4406
4440
  GoabModal,
4407
4441
  GoabNotification,