@abgov/react-components 5.2.0 → 5.3.0

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
@@ -1,11 +1,13 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useRef, useEffect } from "react";
3
+ import { G } from "./icon-DgSW1II3.mjs";
3
4
  function GoAAccordion({
4
5
  open,
5
6
  heading,
6
7
  headingSize,
7
8
  secondaryText,
8
9
  headingContent,
10
+ iconPosition,
9
11
  maxWidth,
10
12
  testid,
11
13
  children,
@@ -21,6 +23,7 @@ function GoAAccordion({
21
23
  headingSize,
22
24
  heading,
23
25
  secondaryText,
26
+ iconposition: iconPosition,
24
27
  maxwidth: maxWidth,
25
28
  testid,
26
29
  mt,
@@ -40,16 +43,36 @@ function GoAAppHeader({
40
43
  maxContentWidth,
41
44
  fullMenuBreakpoint,
42
45
  testId,
43
- children
46
+ children,
47
+ onMenuClick
44
48
  }) {
49
+ const el = useRef(null);
50
+ useEffect(() => {
51
+ if (!el.current) {
52
+ return;
53
+ }
54
+ if (!onMenuClick) {
55
+ return;
56
+ }
57
+ const current = el.current;
58
+ const listener = () => {
59
+ onMenuClick();
60
+ };
61
+ current.addEventListener("_menuClick", listener);
62
+ return () => {
63
+ current.removeEventListener("_menuClick", listener);
64
+ };
65
+ }, [el, onMenuClick]);
45
66
  return /* @__PURE__ */ jsx(
46
67
  "goa-app-header",
47
68
  {
69
+ ref: el,
48
70
  heading,
49
71
  url,
50
72
  fullmenubreakpoint: fullMenuBreakpoint,
51
73
  maxcontentwidth: maxContentWidth,
52
74
  testid: testId,
75
+ hasmenuclickhandler: !!onMenuClick,
53
76
  children
54
77
  }
55
78
  );
@@ -323,6 +346,7 @@ function GoACalendar({
323
346
  const GoACallout = ({
324
347
  heading,
325
348
  type = "information",
349
+ iconTheme = "outline",
326
350
  size = "large",
327
351
  maxWidth,
328
352
  testId,
@@ -341,6 +365,7 @@ const GoACallout = ({
341
365
  size,
342
366
  maxwidth: maxWidth,
343
367
  arialive: ariaLive,
368
+ icontheme: iconTheme,
344
369
  mt,
345
370
  mr,
346
371
  mb,
@@ -994,40 +1019,6 @@ function GoAIconButton({
994
1019
  }
995
1020
  );
996
1021
  }
997
- function GoAIcon({
998
- type,
999
- theme,
1000
- size,
1001
- inverted,
1002
- fillColor,
1003
- opacity,
1004
- title,
1005
- ariaLabel,
1006
- mt,
1007
- mr,
1008
- mb,
1009
- ml,
1010
- testId
1011
- }) {
1012
- return /* @__PURE__ */ jsx(
1013
- "goa-icon",
1014
- {
1015
- type,
1016
- theme,
1017
- size,
1018
- inverted,
1019
- fillcolor: fillColor,
1020
- opacity,
1021
- title,
1022
- arialabel: ariaLabel,
1023
- mt,
1024
- mr,
1025
- mb,
1026
- ml,
1027
- testid: testId
1028
- }
1029
- );
1030
- }
1031
1022
  function toDate(argument) {
1032
1023
  const argStr = Object.prototype.toString.call(argument);
1033
1024
  if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
@@ -3249,7 +3240,12 @@ function GoASideMenuGroup(props) {
3249
3240
  "goa-side-menu-group",
3250
3241
  {
3251
3242
  heading: props.heading,
3243
+ icon: props.icon,
3252
3244
  testid: props.testId,
3245
+ mt: props.mt,
3246
+ mr: props.mr,
3247
+ mb: props.mb,
3248
+ ml: props.ml,
3253
3249
  children: props.children
3254
3250
  }
3255
3251
  );
@@ -3560,7 +3556,7 @@ export {
3560
3556
  GoAGrid,
3561
3557
  GoAHeroBanner,
3562
3558
  GoAHeroBannerActions,
3563
- GoAIcon,
3559
+ G as GoAIcon,
3564
3560
  GoAIconButton,
3565
3561
  GoAImportantBadge,
3566
3562
  GoAInfoBadge,