@abgov/react-components 5.0.0-alpha.10 → 5.0.0-alpha.11
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 +30 -1
- package/index.js.map +1 -1
- package/index.mjs +30 -1
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +4 -1
- package/lib/app-header/app-header.d.ts +4 -1
- package/lib/callout/callout.d.ts +4 -1
- package/lib/side-menu-group/side-menu-group.d.ts +6 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -9,6 +9,7 @@ function GoAAccordion({
|
|
|
9
9
|
headingSize,
|
|
10
10
|
secondaryText,
|
|
11
11
|
headingContent,
|
|
12
|
+
iconPosition,
|
|
12
13
|
maxWidth,
|
|
13
14
|
testid,
|
|
14
15
|
children,
|
|
@@ -24,6 +25,7 @@ function GoAAccordion({
|
|
|
24
25
|
headingSize,
|
|
25
26
|
heading,
|
|
26
27
|
secondaryText,
|
|
28
|
+
iconposition: iconPosition,
|
|
27
29
|
maxwidth: maxWidth,
|
|
28
30
|
testid,
|
|
29
31
|
mt,
|
|
@@ -43,16 +45,36 @@ function GoAAppHeader({
|
|
|
43
45
|
maxContentWidth,
|
|
44
46
|
fullMenuBreakpoint,
|
|
45
47
|
testId,
|
|
46
|
-
children
|
|
48
|
+
children,
|
|
49
|
+
onMenuClick
|
|
47
50
|
}) {
|
|
51
|
+
const el = react.useRef(null);
|
|
52
|
+
react.useEffect(() => {
|
|
53
|
+
if (!el.current) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (!onMenuClick) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const current = el.current;
|
|
60
|
+
const listener = () => {
|
|
61
|
+
onMenuClick();
|
|
62
|
+
};
|
|
63
|
+
current.addEventListener("_menuClick", listener);
|
|
64
|
+
return () => {
|
|
65
|
+
current.removeEventListener("_menuClick", listener);
|
|
66
|
+
};
|
|
67
|
+
}, [el, onMenuClick]);
|
|
48
68
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
49
69
|
"goa-app-header",
|
|
50
70
|
{
|
|
71
|
+
ref: el,
|
|
51
72
|
heading,
|
|
52
73
|
url,
|
|
53
74
|
fullmenubreakpoint: fullMenuBreakpoint,
|
|
54
75
|
maxcontentwidth: maxContentWidth,
|
|
55
76
|
testid: testId,
|
|
77
|
+
hasmenuclickhandler: !!onMenuClick,
|
|
56
78
|
children
|
|
57
79
|
}
|
|
58
80
|
);
|
|
@@ -326,6 +348,7 @@ function GoACalendar({
|
|
|
326
348
|
const GoACallout = ({
|
|
327
349
|
heading,
|
|
328
350
|
type = "information",
|
|
351
|
+
iconTheme = "outline",
|
|
329
352
|
size = "large",
|
|
330
353
|
maxWidth,
|
|
331
354
|
testId,
|
|
@@ -344,6 +367,7 @@ const GoACallout = ({
|
|
|
344
367
|
size,
|
|
345
368
|
maxwidth: maxWidth,
|
|
346
369
|
arialive: ariaLive,
|
|
370
|
+
icontheme: iconTheme,
|
|
347
371
|
mt,
|
|
348
372
|
mr,
|
|
349
373
|
mb,
|
|
@@ -3218,7 +3242,12 @@ function GoASideMenuGroup(props) {
|
|
|
3218
3242
|
"goa-side-menu-group",
|
|
3219
3243
|
{
|
|
3220
3244
|
heading: props.heading,
|
|
3245
|
+
icon: props.icon,
|
|
3221
3246
|
testid: props.testId,
|
|
3247
|
+
mt: props.mt,
|
|
3248
|
+
mr: props.mr,
|
|
3249
|
+
mb: props.mb,
|
|
3250
|
+
ml: props.ml,
|
|
3222
3251
|
children: props.children
|
|
3223
3252
|
}
|
|
3224
3253
|
);
|