@abgov/react-components 5.0.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/experimental/form/form-summary.d.ts +9 -0
- package/experimental/form/form.d.ts +35 -0
- package/experimental/form/task-list.d.ts +18 -0
- package/experimental/form/task.d.ts +18 -0
- package/experimental/form-hook.d.ts +8 -0
- package/experimental/index.d.ts +2 -0
- package/experimental/resizable-panel/ResizablePanel.d.ts +7 -0
- package/experimental/validators.d.ts +50 -0
- package/experimental.js +123 -0
- package/experimental.js.map +1 -0
- package/experimental.mjs +123 -0
- package/experimental.mjs.map +1 -0
- package/icon-1IRcN4Uf.js +38 -0
- package/icon-1IRcN4Uf.js.map +1 -0
- package/icon-DgSW1II3.mjs +39 -0
- package/icon-DgSW1II3.mjs.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +229 -105
- package/index.js.map +1 -1
- package/index.mjs +217 -93
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +5 -1
- package/lib/app-header/app-header.d.ts +5 -1
- package/lib/app-header-menu/app-header-menu.d.ts +1 -0
- package/lib/badge/badge.d.ts +1 -0
- package/lib/block/block.d.ts +1 -0
- package/lib/button/button.d.ts +1 -0
- package/lib/button-group/button-group.d.ts +1 -0
- package/lib/calendar/calendar.d.ts +1 -0
- package/lib/callout/callout.d.ts +5 -1
- package/lib/card/card-actions.d.ts +12 -0
- package/lib/card/card-content.d.ts +12 -0
- package/lib/card/card-group.d.ts +12 -0
- package/lib/card/card-image.d.ts +17 -0
- package/lib/card/card.d.ts +21 -0
- package/lib/card/index.d.ts +5 -0
- package/lib/checkbox/checkbox.d.ts +2 -1
- package/lib/chip/chip.d.ts +1 -0
- package/lib/circular-progress/circular-progress.d.ts +1 -0
- package/lib/container/container.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +7 -2
- package/lib/details/details.d.ts +1 -0
- package/lib/divider/divider.d.ts +4 -1
- package/lib/drawer/drawer.d.ts +30 -0
- package/lib/dropdown/dropdown.d.ts +2 -1
- package/lib/fieldset/fieldset.d.ts +29 -0
- package/lib/file-upload-card/file-upload-card.d.ts +1 -0
- package/lib/file-upload-input/file-upload-input.d.ts +1 -0
- package/lib/footer/footer.d.ts +1 -0
- package/lib/footer-meta-section/footer-meta-section.d.ts +4 -1
- package/lib/footer-nav-section/footer-nav-section.d.ts +1 -0
- package/lib/form-item/form-item.d.ts +1 -0
- package/lib/form-stepper/form-stepper.d.ts +1 -0
- package/lib/grid/grid.d.ts +1 -0
- package/lib/hero-banner/hero-banner.d.ts +1 -0
- package/lib/icon-button/icon-button.d.ts +1 -0
- package/lib/input/input.d.ts +4 -3
- package/lib/link/link.d.ts +21 -0
- package/lib/link-button/link-button.d.ts +24 -0
- package/lib/microsite-header/microsite-header.d.ts +6 -2
- package/lib/modal/modal.d.ts +1 -0
- package/lib/notification/notification.d.ts +1 -0
- package/lib/page-block/page-block.d.ts +1 -0
- package/lib/pagination/pagination.d.ts +1 -0
- package/lib/popover/popover.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +2 -1
- package/lib/side-menu/side-menu.d.ts +4 -1
- package/lib/side-menu-group/side-menu-group.d.ts +7 -2
- package/lib/side-menu-heading/side-menu-heading.d.ts +1 -0
- package/lib/skeleton/skeleton.d.ts +1 -0
- package/lib/spacer/spacer.d.ts +1 -0
- package/lib/spinner/spinner.d.ts +1 -0
- package/lib/table/table.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +1 -0
- package/lib/text/text.d.ts +28 -0
- package/lib/textarea/textarea.d.ts +2 -1
- package/lib/tooltip/tooltip.d.ts +1 -0
- package/package.json +6 -1
- package/style.css +49 -0
package/index.js
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
|
+
const icon = require("./icon-1IRcN4Uf.js");
|
|
5
6
|
function GoAAccordion({
|
|
6
7
|
open,
|
|
7
8
|
heading,
|
|
8
9
|
headingSize,
|
|
9
10
|
secondaryText,
|
|
10
11
|
headingContent,
|
|
12
|
+
iconPosition,
|
|
11
13
|
maxWidth,
|
|
12
14
|
testid,
|
|
13
15
|
children,
|
|
@@ -23,8 +25,9 @@ function GoAAccordion({
|
|
|
23
25
|
headingSize,
|
|
24
26
|
heading,
|
|
25
27
|
secondaryText,
|
|
28
|
+
iconposition: iconPosition,
|
|
26
29
|
maxwidth: maxWidth,
|
|
27
|
-
|
|
30
|
+
testid,
|
|
28
31
|
mt,
|
|
29
32
|
mr,
|
|
30
33
|
mb,
|
|
@@ -42,16 +45,36 @@ function GoAAppHeader({
|
|
|
42
45
|
maxContentWidth,
|
|
43
46
|
fullMenuBreakpoint,
|
|
44
47
|
testId,
|
|
45
|
-
children
|
|
48
|
+
children,
|
|
49
|
+
onMenuClick
|
|
46
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]);
|
|
47
68
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
48
69
|
"goa-app-header",
|
|
49
70
|
{
|
|
71
|
+
ref: el,
|
|
50
72
|
heading,
|
|
51
73
|
url,
|
|
52
74
|
fullmenubreakpoint: fullMenuBreakpoint,
|
|
53
75
|
maxcontentwidth: maxContentWidth,
|
|
54
|
-
|
|
76
|
+
testid: testId,
|
|
77
|
+
hasmenuclickhandler: !!onMenuClick,
|
|
55
78
|
children
|
|
56
79
|
}
|
|
57
80
|
);
|
|
@@ -62,7 +85,7 @@ function GoAAppHeaderMenu(props) {
|
|
|
62
85
|
{
|
|
63
86
|
heading: props.heading,
|
|
64
87
|
leadingicon: props.leadingIcon,
|
|
65
|
-
|
|
88
|
+
testid: props.testId,
|
|
66
89
|
children: props.children
|
|
67
90
|
}
|
|
68
91
|
);
|
|
@@ -70,7 +93,7 @@ function GoAAppHeaderMenu(props) {
|
|
|
70
93
|
function GoABadge({
|
|
71
94
|
type,
|
|
72
95
|
content,
|
|
73
|
-
icon,
|
|
96
|
+
icon: icon2,
|
|
74
97
|
testId,
|
|
75
98
|
mt,
|
|
76
99
|
mr,
|
|
@@ -83,8 +106,8 @@ function GoABadge({
|
|
|
83
106
|
{
|
|
84
107
|
type,
|
|
85
108
|
content,
|
|
86
|
-
icon,
|
|
87
|
-
|
|
109
|
+
icon: icon2,
|
|
110
|
+
testid: testId,
|
|
88
111
|
arialabel: ariaLabel,
|
|
89
112
|
mt,
|
|
90
113
|
mr,
|
|
@@ -96,7 +119,7 @@ function GoABadge({
|
|
|
96
119
|
function GoAInfoBadge({
|
|
97
120
|
content,
|
|
98
121
|
testId,
|
|
99
|
-
icon,
|
|
122
|
+
icon: icon2,
|
|
100
123
|
mt,
|
|
101
124
|
mr,
|
|
102
125
|
mb,
|
|
@@ -107,7 +130,7 @@ function GoAInfoBadge({
|
|
|
107
130
|
GoABadge,
|
|
108
131
|
{
|
|
109
132
|
type: "information",
|
|
110
|
-
icon,
|
|
133
|
+
icon: icon2,
|
|
111
134
|
content,
|
|
112
135
|
testId,
|
|
113
136
|
ariaLabel,
|
|
@@ -121,7 +144,7 @@ function GoAInfoBadge({
|
|
|
121
144
|
function GoASuccessBadge({
|
|
122
145
|
content,
|
|
123
146
|
testId,
|
|
124
|
-
icon,
|
|
147
|
+
icon: icon2,
|
|
125
148
|
mt,
|
|
126
149
|
mr,
|
|
127
150
|
mb,
|
|
@@ -132,7 +155,7 @@ function GoASuccessBadge({
|
|
|
132
155
|
GoABadge,
|
|
133
156
|
{
|
|
134
157
|
type: "success",
|
|
135
|
-
icon,
|
|
158
|
+
icon: icon2,
|
|
136
159
|
content,
|
|
137
160
|
ariaLabel,
|
|
138
161
|
testId,
|
|
@@ -146,7 +169,7 @@ function GoASuccessBadge({
|
|
|
146
169
|
function GoAImportantBadge({
|
|
147
170
|
content,
|
|
148
171
|
testId,
|
|
149
|
-
icon,
|
|
172
|
+
icon: icon2,
|
|
150
173
|
mt,
|
|
151
174
|
mr,
|
|
152
175
|
mb,
|
|
@@ -157,7 +180,7 @@ function GoAImportantBadge({
|
|
|
157
180
|
GoABadge,
|
|
158
181
|
{
|
|
159
182
|
type: "important",
|
|
160
|
-
icon,
|
|
183
|
+
icon: icon2,
|
|
161
184
|
content,
|
|
162
185
|
testId,
|
|
163
186
|
ariaLabel,
|
|
@@ -171,7 +194,7 @@ function GoAImportantBadge({
|
|
|
171
194
|
function GoAEmergencyBadge({
|
|
172
195
|
content,
|
|
173
196
|
testId,
|
|
174
|
-
icon,
|
|
197
|
+
icon: icon2,
|
|
175
198
|
mt,
|
|
176
199
|
mr,
|
|
177
200
|
mb,
|
|
@@ -182,7 +205,7 @@ function GoAEmergencyBadge({
|
|
|
182
205
|
GoABadge,
|
|
183
206
|
{
|
|
184
207
|
type: "emergency",
|
|
185
|
-
icon,
|
|
208
|
+
icon: icon2,
|
|
186
209
|
content,
|
|
187
210
|
testId,
|
|
188
211
|
ariaLabel,
|
|
@@ -204,7 +227,7 @@ function GoABlock(props) {
|
|
|
204
227
|
mr: props.mr,
|
|
205
228
|
mb: props.mb,
|
|
206
229
|
ml: props.ml,
|
|
207
|
-
|
|
230
|
+
testid: props.testId,
|
|
208
231
|
children: props.children
|
|
209
232
|
}
|
|
210
233
|
);
|
|
@@ -251,7 +274,7 @@ function GoAButton({
|
|
|
251
274
|
disabled,
|
|
252
275
|
leadingicon: leadingIcon,
|
|
253
276
|
trailingicon: trailingIcon,
|
|
254
|
-
|
|
277
|
+
testid: testId,
|
|
255
278
|
mt,
|
|
256
279
|
mr,
|
|
257
280
|
mb,
|
|
@@ -279,7 +302,7 @@ function GoAButtonGroup({
|
|
|
279
302
|
mr,
|
|
280
303
|
mb,
|
|
281
304
|
ml,
|
|
282
|
-
|
|
305
|
+
testid: testId,
|
|
283
306
|
children
|
|
284
307
|
}
|
|
285
308
|
);
|
|
@@ -314,7 +337,7 @@ function GoACalendar({
|
|
|
314
337
|
value: value == null ? void 0 : value.toISOString(),
|
|
315
338
|
min: min == null ? void 0 : min.toISOString(),
|
|
316
339
|
max: max == null ? void 0 : max.toISOString(),
|
|
317
|
-
|
|
340
|
+
testid: testId,
|
|
318
341
|
mt,
|
|
319
342
|
mr,
|
|
320
343
|
mb,
|
|
@@ -325,6 +348,7 @@ function GoACalendar({
|
|
|
325
348
|
const GoACallout = ({
|
|
326
349
|
heading,
|
|
327
350
|
type = "information",
|
|
351
|
+
iconTheme = "outline",
|
|
328
352
|
size = "large",
|
|
329
353
|
maxWidth,
|
|
330
354
|
testId,
|
|
@@ -343,11 +367,12 @@ const GoACallout = ({
|
|
|
343
367
|
size,
|
|
344
368
|
maxwidth: maxWidth,
|
|
345
369
|
arialive: ariaLive,
|
|
370
|
+
icontheme: iconTheme,
|
|
346
371
|
mt,
|
|
347
372
|
mr,
|
|
348
373
|
mb,
|
|
349
374
|
ml,
|
|
350
|
-
|
|
375
|
+
testid: testId,
|
|
351
376
|
children
|
|
352
377
|
}
|
|
353
378
|
);
|
|
@@ -389,12 +414,12 @@ function GoACheckbox({
|
|
|
389
414
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
390
415
|
"goa-checkbox",
|
|
391
416
|
{
|
|
392
|
-
|
|
417
|
+
testid: testId,
|
|
393
418
|
ref: el,
|
|
394
419
|
id,
|
|
395
420
|
name,
|
|
396
421
|
error,
|
|
397
|
-
checked,
|
|
422
|
+
checked: checked || false,
|
|
398
423
|
disabled,
|
|
399
424
|
text,
|
|
400
425
|
value,
|
|
@@ -453,7 +478,7 @@ const GoAChip = ({
|
|
|
453
478
|
mr,
|
|
454
479
|
mb,
|
|
455
480
|
ml,
|
|
456
|
-
|
|
481
|
+
testid: testId
|
|
457
482
|
}
|
|
458
483
|
);
|
|
459
484
|
};
|
|
@@ -473,7 +498,7 @@ const GoACircularProgress = ({
|
|
|
473
498
|
progress,
|
|
474
499
|
variant,
|
|
475
500
|
size,
|
|
476
|
-
|
|
501
|
+
testid: testId
|
|
477
502
|
}
|
|
478
503
|
);
|
|
479
504
|
};
|
|
@@ -506,7 +531,7 @@ function GoAContainer({
|
|
|
506
531
|
mr,
|
|
507
532
|
mb,
|
|
508
533
|
ml,
|
|
509
|
-
|
|
534
|
+
testid: testId,
|
|
510
535
|
children: [
|
|
511
536
|
headingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "title", children: headingContent }),
|
|
512
537
|
children,
|
|
@@ -522,10 +547,12 @@ function GoADatePicker({
|
|
|
522
547
|
min,
|
|
523
548
|
max,
|
|
524
549
|
testId,
|
|
550
|
+
disabled,
|
|
525
551
|
mt,
|
|
526
552
|
mr,
|
|
527
553
|
mb,
|
|
528
554
|
ml,
|
|
555
|
+
relative,
|
|
529
556
|
onChange
|
|
530
557
|
}) {
|
|
531
558
|
const ref = react.useRef(null);
|
|
@@ -535,7 +562,8 @@ function GoADatePicker({
|
|
|
535
562
|
}
|
|
536
563
|
const current = ref.current;
|
|
537
564
|
const handleChange = (e) => {
|
|
538
|
-
|
|
565
|
+
const newValue = e.detail.value;
|
|
566
|
+
onChange == null ? void 0 : onChange(name || "", newValue ? new Date(newValue) : void 0);
|
|
539
567
|
};
|
|
540
568
|
current.addEventListener("_change", handleChange);
|
|
541
569
|
return () => {
|
|
@@ -547,15 +575,17 @@ function GoADatePicker({
|
|
|
547
575
|
{
|
|
548
576
|
ref,
|
|
549
577
|
name,
|
|
550
|
-
value: value == null ? void 0 : value.toISOString(),
|
|
578
|
+
value: (value == null ? void 0 : value.toISOString()) || "",
|
|
551
579
|
error,
|
|
580
|
+
disabled,
|
|
552
581
|
min: min == null ? void 0 : min.toISOString(),
|
|
553
582
|
max: max == null ? void 0 : max.toISOString(),
|
|
554
|
-
|
|
583
|
+
testid: testId,
|
|
555
584
|
mt,
|
|
556
585
|
mr,
|
|
557
586
|
mb,
|
|
558
|
-
ml
|
|
587
|
+
ml,
|
|
588
|
+
relative
|
|
559
589
|
}
|
|
560
590
|
);
|
|
561
591
|
}
|
|
@@ -566,7 +596,7 @@ function GoADetails(props) {
|
|
|
566
596
|
heading: props.heading,
|
|
567
597
|
open: props.open,
|
|
568
598
|
maxwidth: props.maxWidth,
|
|
569
|
-
|
|
599
|
+
testid: props.testId,
|
|
570
600
|
mt: props.mt,
|
|
571
601
|
mr: props.mr,
|
|
572
602
|
mb: props.mb,
|
|
@@ -583,7 +613,7 @@ function GoADivider(props) {
|
|
|
583
613
|
mr: props.mr,
|
|
584
614
|
mb: props.mb,
|
|
585
615
|
ml: props.ml,
|
|
586
|
-
|
|
616
|
+
testid: props.testId
|
|
587
617
|
}
|
|
588
618
|
);
|
|
589
619
|
}
|
|
@@ -604,8 +634,9 @@ function GoADropdown(props) {
|
|
|
604
634
|
}
|
|
605
635
|
const current = el.current;
|
|
606
636
|
const handler = (e) => {
|
|
637
|
+
var _a;
|
|
607
638
|
const { name, value, values } = e.detail;
|
|
608
|
-
props.onChange(name, props.multiselect ? values : value);
|
|
639
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, props.multiselect ? values : value);
|
|
609
640
|
};
|
|
610
641
|
current.addEventListener("_change", handler);
|
|
611
642
|
return () => {
|
|
@@ -632,7 +663,7 @@ function GoADropdown(props) {
|
|
|
632
663
|
multiselect: props.multiselect,
|
|
633
664
|
native: props.native,
|
|
634
665
|
placeholder: props.placeholder,
|
|
635
|
-
|
|
666
|
+
testid: props.testId,
|
|
636
667
|
width: props.width,
|
|
637
668
|
relative: props.relative,
|
|
638
669
|
id: props.id,
|
|
@@ -659,6 +690,53 @@ function GoADropdownItem({ value, label, filter, name, testId, mountType = "appe
|
|
|
659
690
|
}
|
|
660
691
|
);
|
|
661
692
|
}
|
|
693
|
+
function GoAFieldset({
|
|
694
|
+
heading,
|
|
695
|
+
buttonText,
|
|
696
|
+
id,
|
|
697
|
+
onContinue,
|
|
698
|
+
children,
|
|
699
|
+
mt,
|
|
700
|
+
mr,
|
|
701
|
+
mb,
|
|
702
|
+
ml,
|
|
703
|
+
first,
|
|
704
|
+
last
|
|
705
|
+
}) {
|
|
706
|
+
const ref = react.useRef(null);
|
|
707
|
+
react.useEffect(() => {
|
|
708
|
+
var _a;
|
|
709
|
+
const _continue = (e) => {
|
|
710
|
+
const { el, state } = e.detail;
|
|
711
|
+
return onContinue == null ? void 0 : onContinue(el, state);
|
|
712
|
+
};
|
|
713
|
+
if (onContinue) {
|
|
714
|
+
(_a = ref.current) == null ? void 0 : _a.addEventListener("_continue", _continue);
|
|
715
|
+
}
|
|
716
|
+
return () => {
|
|
717
|
+
var _a2;
|
|
718
|
+
if (onContinue) {
|
|
719
|
+
(_a2 = ref.current) == null ? void 0 : _a2.removeEventListener("_continue", _continue);
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
}, [ref.current, onContinue]);
|
|
723
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
724
|
+
"goa-fieldset",
|
|
725
|
+
{
|
|
726
|
+
ref,
|
|
727
|
+
id,
|
|
728
|
+
first,
|
|
729
|
+
last,
|
|
730
|
+
heading,
|
|
731
|
+
buttontext: buttonText,
|
|
732
|
+
mt,
|
|
733
|
+
mr,
|
|
734
|
+
mb,
|
|
735
|
+
ml,
|
|
736
|
+
children
|
|
737
|
+
}
|
|
738
|
+
);
|
|
739
|
+
}
|
|
662
740
|
function GoAFileUploadCard({
|
|
663
741
|
filename,
|
|
664
742
|
size,
|
|
@@ -691,7 +769,7 @@ function GoAFileUploadCard({
|
|
|
691
769
|
type,
|
|
692
770
|
progress,
|
|
693
771
|
error,
|
|
694
|
-
|
|
772
|
+
testid: testId
|
|
695
773
|
}
|
|
696
774
|
);
|
|
697
775
|
}
|
|
@@ -721,7 +799,7 @@ function GoAFileUploadInput({
|
|
|
721
799
|
variant,
|
|
722
800
|
accept,
|
|
723
801
|
maxfilesize: maxFileSize,
|
|
724
|
-
|
|
802
|
+
testid: testId
|
|
725
803
|
}
|
|
726
804
|
);
|
|
727
805
|
}
|
|
@@ -730,13 +808,13 @@ function GoAAppFooter({
|
|
|
730
808
|
children,
|
|
731
809
|
testId
|
|
732
810
|
}) {
|
|
733
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { maxcontentwidth: maxContentWidth,
|
|
811
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, testid: testId, children });
|
|
734
812
|
}
|
|
735
813
|
function GoAAppFooterMetaSection({ testId, children }) {
|
|
736
814
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
737
815
|
"goa-app-footer-meta-section",
|
|
738
816
|
{
|
|
739
|
-
|
|
817
|
+
testid: testId,
|
|
740
818
|
slot: "meta",
|
|
741
819
|
children
|
|
742
820
|
}
|
|
@@ -754,7 +832,7 @@ function GoAAppFooterNavSection({
|
|
|
754
832
|
slot: "nav",
|
|
755
833
|
heading,
|
|
756
834
|
maxcolumncount: maxColumnCount,
|
|
757
|
-
|
|
835
|
+
testid: testId,
|
|
758
836
|
children
|
|
759
837
|
}
|
|
760
838
|
);
|
|
@@ -787,7 +865,7 @@ function GoAFormItem({
|
|
|
787
865
|
mr,
|
|
788
866
|
mb,
|
|
789
867
|
ml,
|
|
790
|
-
|
|
868
|
+
testid: testId,
|
|
791
869
|
id,
|
|
792
870
|
children: [
|
|
793
871
|
error && typeof error !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "error", children: error }),
|
|
@@ -829,7 +907,7 @@ function GoAFormStepper({
|
|
|
829
907
|
"goa-form-stepper",
|
|
830
908
|
{
|
|
831
909
|
ref,
|
|
832
|
-
|
|
910
|
+
testid: testId,
|
|
833
911
|
step,
|
|
834
912
|
mt,
|
|
835
913
|
mr,
|
|
@@ -858,7 +936,7 @@ function GoAGrid({
|
|
|
858
936
|
mr,
|
|
859
937
|
mb,
|
|
860
938
|
ml,
|
|
861
|
-
|
|
939
|
+
testid: testId,
|
|
862
940
|
children
|
|
863
941
|
}
|
|
864
942
|
);
|
|
@@ -882,7 +960,7 @@ function GoAHeroBanner({
|
|
|
882
960
|
maxcontentwidth: maxContentWidth,
|
|
883
961
|
backgroundcolor: backgroundColor,
|
|
884
962
|
textcolor: textColor,
|
|
885
|
-
|
|
963
|
+
testid: testId,
|
|
886
964
|
children
|
|
887
965
|
}
|
|
888
966
|
);
|
|
@@ -893,7 +971,7 @@ function GoAHeroBannerActions({
|
|
|
893
971
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children });
|
|
894
972
|
}
|
|
895
973
|
function GoAIconButton({
|
|
896
|
-
icon,
|
|
974
|
+
icon: icon2,
|
|
897
975
|
disabled,
|
|
898
976
|
variant = "color",
|
|
899
977
|
onClick,
|
|
@@ -928,7 +1006,7 @@ function GoAIconButton({
|
|
|
928
1006
|
"goa-icon-button",
|
|
929
1007
|
{
|
|
930
1008
|
ref,
|
|
931
|
-
icon,
|
|
1009
|
+
icon: icon2,
|
|
932
1010
|
disabled,
|
|
933
1011
|
variant,
|
|
934
1012
|
size,
|
|
@@ -938,45 +1016,11 @@ function GoAIconButton({
|
|
|
938
1016
|
mr,
|
|
939
1017
|
mb,
|
|
940
1018
|
ml,
|
|
941
|
-
|
|
1019
|
+
testid: testId,
|
|
942
1020
|
children
|
|
943
1021
|
}
|
|
944
1022
|
);
|
|
945
1023
|
}
|
|
946
|
-
function GoAIcon({
|
|
947
|
-
type,
|
|
948
|
-
theme,
|
|
949
|
-
size,
|
|
950
|
-
inverted,
|
|
951
|
-
fillColor,
|
|
952
|
-
opacity,
|
|
953
|
-
title,
|
|
954
|
-
ariaLabel,
|
|
955
|
-
mt,
|
|
956
|
-
mr,
|
|
957
|
-
mb,
|
|
958
|
-
ml,
|
|
959
|
-
testId
|
|
960
|
-
}) {
|
|
961
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
962
|
-
"goa-icon",
|
|
963
|
-
{
|
|
964
|
-
type,
|
|
965
|
-
theme,
|
|
966
|
-
size,
|
|
967
|
-
inverted,
|
|
968
|
-
fillcolor: fillColor,
|
|
969
|
-
opacity,
|
|
970
|
-
title,
|
|
971
|
-
arialabel: ariaLabel,
|
|
972
|
-
mt,
|
|
973
|
-
mr,
|
|
974
|
-
mb,
|
|
975
|
-
ml,
|
|
976
|
-
"data-testid": testId
|
|
977
|
-
}
|
|
978
|
-
);
|
|
979
|
-
}
|
|
980
1024
|
function toDate(argument) {
|
|
981
1025
|
const argStr = Object.prototype.toString.call(argument);
|
|
982
1026
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -2625,7 +2669,7 @@ function GoAInput({
|
|
|
2625
2669
|
const current = ref.current;
|
|
2626
2670
|
const changeListener = (e) => {
|
|
2627
2671
|
const { name: name2, value: value2 } = e.detail;
|
|
2628
|
-
onChange(name2, value2);
|
|
2672
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
2629
2673
|
};
|
|
2630
2674
|
const clickListener = () => {
|
|
2631
2675
|
onTrailingIconClick == null ? void 0 : onTrailingIconClick();
|
|
@@ -2672,7 +2716,7 @@ function GoAInput({
|
|
|
2672
2716
|
readonly,
|
|
2673
2717
|
placeholder,
|
|
2674
2718
|
error,
|
|
2675
|
-
|
|
2719
|
+
testid: testId,
|
|
2676
2720
|
value,
|
|
2677
2721
|
width,
|
|
2678
2722
|
min,
|
|
@@ -2696,6 +2740,7 @@ function GoAInput({
|
|
|
2696
2740
|
}
|
|
2697
2741
|
const onDateChangeHandler = (onChange) => {
|
|
2698
2742
|
return (name, value) => {
|
|
2743
|
+
if (!onChange) return;
|
|
2699
2744
|
if (!value) {
|
|
2700
2745
|
onChange(name, "");
|
|
2701
2746
|
return;
|
|
@@ -2707,6 +2752,7 @@ const onDateChangeHandler = (onChange) => {
|
|
|
2707
2752
|
};
|
|
2708
2753
|
const onTimeChangeHandler = (onChange) => {
|
|
2709
2754
|
return (name, value) => {
|
|
2755
|
+
if (!onChange) return;
|
|
2710
2756
|
if (!value) {
|
|
2711
2757
|
onChange(name, "");
|
|
2712
2758
|
return;
|
|
@@ -2801,7 +2847,10 @@ function GoAInputFile(props) {
|
|
|
2801
2847
|
id: props.id,
|
|
2802
2848
|
name: props.name,
|
|
2803
2849
|
type: "file",
|
|
2804
|
-
onChange: (e) =>
|
|
2850
|
+
onChange: (e) => {
|
|
2851
|
+
var _a;
|
|
2852
|
+
return (_a = props.onChange) == null ? void 0 : _a.call(props, e.target.name, e.target.value);
|
|
2853
|
+
},
|
|
2805
2854
|
style: { backgroundColor: "revert" }
|
|
2806
2855
|
}
|
|
2807
2856
|
);
|
|
@@ -2816,7 +2865,8 @@ function GoAInputNumber({
|
|
|
2816
2865
|
...props
|
|
2817
2866
|
}) {
|
|
2818
2867
|
const onNumberChange = (name, value2) => {
|
|
2819
|
-
|
|
2868
|
+
var _a;
|
|
2869
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, parseFloat(value2));
|
|
2820
2870
|
};
|
|
2821
2871
|
const onFocus = (name, value2) => {
|
|
2822
2872
|
var _a;
|
|
@@ -2848,6 +2898,35 @@ function GoAInputNumber({
|
|
|
2848
2898
|
function GoAInputRange(props) {
|
|
2849
2899
|
return /* @__PURE__ */ jsxRuntime.jsx(GoAInput, { ...props, type: "range" });
|
|
2850
2900
|
}
|
|
2901
|
+
function GoALink(props) {
|
|
2902
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2903
|
+
"goa-link",
|
|
2904
|
+
{
|
|
2905
|
+
leadingicon: props.leadingIcon,
|
|
2906
|
+
trailingicon: props.trailingIcon,
|
|
2907
|
+
mt: props.mt,
|
|
2908
|
+
mb: props.mb,
|
|
2909
|
+
ml: props.ml,
|
|
2910
|
+
mr: props.mr,
|
|
2911
|
+
children: props.children
|
|
2912
|
+
}
|
|
2913
|
+
);
|
|
2914
|
+
}
|
|
2915
|
+
function GoALinkButton({ type = "primary", ...props }) {
|
|
2916
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2917
|
+
"goa-link-button",
|
|
2918
|
+
{
|
|
2919
|
+
type,
|
|
2920
|
+
leadingicon: props.leadingIcon,
|
|
2921
|
+
trailingicon: props.trailingIcon,
|
|
2922
|
+
mt: props.mt,
|
|
2923
|
+
mb: props.mb,
|
|
2924
|
+
ml: props.ml,
|
|
2925
|
+
mr: props.mr,
|
|
2926
|
+
children: props.children
|
|
2927
|
+
}
|
|
2928
|
+
);
|
|
2929
|
+
}
|
|
2851
2930
|
function GoAMicrositeHeader({
|
|
2852
2931
|
type,
|
|
2853
2932
|
version,
|
|
@@ -2855,18 +2934,39 @@ function GoAMicrositeHeader({
|
|
|
2855
2934
|
maxContentWidth,
|
|
2856
2935
|
feedbackUrlTarget,
|
|
2857
2936
|
headerUrlTarget,
|
|
2858
|
-
testId
|
|
2937
|
+
testId,
|
|
2938
|
+
onFeedbackClick
|
|
2859
2939
|
}) {
|
|
2940
|
+
const el = react.useRef(null);
|
|
2941
|
+
react.useEffect(() => {
|
|
2942
|
+
if (!el.current) {
|
|
2943
|
+
return;
|
|
2944
|
+
}
|
|
2945
|
+
if (!onFeedbackClick) {
|
|
2946
|
+
return;
|
|
2947
|
+
}
|
|
2948
|
+
const current = el.current;
|
|
2949
|
+
const listener = () => {
|
|
2950
|
+
onFeedbackClick();
|
|
2951
|
+
};
|
|
2952
|
+
current.addEventListener("_feedbackClick", listener);
|
|
2953
|
+
return () => {
|
|
2954
|
+
current.removeEventListener("_feedbackClick", listener);
|
|
2955
|
+
};
|
|
2956
|
+
}, [el, onFeedbackClick]);
|
|
2860
2957
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2861
2958
|
"goa-microsite-header",
|
|
2862
2959
|
{
|
|
2960
|
+
ref: el,
|
|
2863
2961
|
type,
|
|
2864
|
-
version,
|
|
2962
|
+
version: typeof version === "string" ? version : void 0,
|
|
2865
2963
|
feedbackurl: feedbackUrl,
|
|
2866
|
-
|
|
2964
|
+
testid: testId,
|
|
2867
2965
|
maxcontentwidth: maxContentWidth,
|
|
2868
2966
|
feedbackurltarget: feedbackUrlTarget,
|
|
2869
|
-
headerurltarget: headerUrlTarget
|
|
2967
|
+
headerurltarget: headerUrlTarget,
|
|
2968
|
+
hasfeedbackhandler: !!onFeedbackClick,
|
|
2969
|
+
children: version && typeof version !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "version", children: version })
|
|
2870
2970
|
}
|
|
2871
2971
|
);
|
|
2872
2972
|
}
|
|
@@ -2915,7 +3015,7 @@ function GoAModal({
|
|
|
2915
3015
|
maxwidth: maxWidth,
|
|
2916
3016
|
transition,
|
|
2917
3017
|
calloutvariant: calloutVariant,
|
|
2918
|
-
|
|
3018
|
+
testid: testId,
|
|
2919
3019
|
role,
|
|
2920
3020
|
children: [
|
|
2921
3021
|
heading && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
@@ -2952,7 +3052,7 @@ const GoANotification = ({
|
|
|
2952
3052
|
{
|
|
2953
3053
|
ref: el,
|
|
2954
3054
|
type,
|
|
2955
|
-
|
|
3055
|
+
testid: testId,
|
|
2956
3056
|
maxcontentwidth: maxContentWidth,
|
|
2957
3057
|
arialive: ariaLive,
|
|
2958
3058
|
children
|
|
@@ -2963,7 +3063,7 @@ function GoAOneColumnLayout(props) {
|
|
|
2963
3063
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-one-column-layout", { children: props.children });
|
|
2964
3064
|
}
|
|
2965
3065
|
function GoAPageBlock(props) {
|
|
2966
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width,
|
|
3066
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width, testid: props.testId, children: props.children });
|
|
2967
3067
|
}
|
|
2968
3068
|
function GoAPages(props) {
|
|
2969
3069
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3006,7 +3106,7 @@ function GoAPagination({ onChange, ...props }) {
|
|
|
3006
3106
|
mb: props.mb,
|
|
3007
3107
|
ml: props.ml,
|
|
3008
3108
|
mr: props.mr,
|
|
3009
|
-
|
|
3109
|
+
testid: props.testId
|
|
3010
3110
|
}
|
|
3011
3111
|
);
|
|
3012
3112
|
}
|
|
@@ -3027,7 +3127,7 @@ function GoAPopover({
|
|
|
3027
3127
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3028
3128
|
"goa-popover",
|
|
3029
3129
|
{
|
|
3030
|
-
|
|
3130
|
+
testid: testId,
|
|
3031
3131
|
maxwidth: maxWidth,
|
|
3032
3132
|
minwidth: minWidth,
|
|
3033
3133
|
padded,
|
|
@@ -3121,7 +3221,7 @@ function GoARadioGroup({
|
|
|
3121
3221
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3122
3222
|
"goa-radio-group",
|
|
3123
3223
|
{
|
|
3124
|
-
|
|
3224
|
+
testid: testId,
|
|
3125
3225
|
ref: el,
|
|
3126
3226
|
name,
|
|
3127
3227
|
value,
|
|
@@ -3142,7 +3242,12 @@ function GoASideMenuGroup(props) {
|
|
|
3142
3242
|
"goa-side-menu-group",
|
|
3143
3243
|
{
|
|
3144
3244
|
heading: props.heading,
|
|
3145
|
-
|
|
3245
|
+
icon: props.icon,
|
|
3246
|
+
testid: props.testId,
|
|
3247
|
+
mt: props.mt,
|
|
3248
|
+
mr: props.mr,
|
|
3249
|
+
mb: props.mb,
|
|
3250
|
+
ml: props.ml,
|
|
3146
3251
|
children: props.children
|
|
3147
3252
|
}
|
|
3148
3253
|
);
|
|
@@ -3152,7 +3257,7 @@ function GoASideMenuHeading(props) {
|
|
|
3152
3257
|
"goa-side-menu-heading",
|
|
3153
3258
|
{
|
|
3154
3259
|
icon: props.icon,
|
|
3155
|
-
|
|
3260
|
+
testid: props.testId,
|
|
3156
3261
|
children: [
|
|
3157
3262
|
props.children,
|
|
3158
3263
|
props.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: props.meta })
|
|
@@ -3161,7 +3266,7 @@ function GoASideMenuHeading(props) {
|
|
|
3161
3266
|
);
|
|
3162
3267
|
}
|
|
3163
3268
|
function GoASideMenu(props) {
|
|
3164
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", {
|
|
3269
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { testid: props.testId, children: props.children });
|
|
3165
3270
|
}
|
|
3166
3271
|
const GoASkeleton = ({
|
|
3167
3272
|
maxWidth,
|
|
@@ -3185,7 +3290,7 @@ const GoASkeleton = ({
|
|
|
3185
3290
|
mr,
|
|
3186
3291
|
mb,
|
|
3187
3292
|
ml,
|
|
3188
|
-
|
|
3293
|
+
testid: testId
|
|
3189
3294
|
}
|
|
3190
3295
|
);
|
|
3191
3296
|
};
|
|
@@ -3195,7 +3300,7 @@ function GoASpacer(props) {
|
|
|
3195
3300
|
{
|
|
3196
3301
|
hspacing: props.hSpacing,
|
|
3197
3302
|
vspacing: props.vSpacing,
|
|
3198
|
-
|
|
3303
|
+
testid: props.testId
|
|
3199
3304
|
}
|
|
3200
3305
|
);
|
|
3201
3306
|
}
|
|
@@ -3213,7 +3318,7 @@ function GoASpinner({
|
|
|
3213
3318
|
size,
|
|
3214
3319
|
progress,
|
|
3215
3320
|
invert,
|
|
3216
|
-
|
|
3321
|
+
testid: testId
|
|
3217
3322
|
}
|
|
3218
3323
|
);
|
|
3219
3324
|
}
|
|
@@ -3240,7 +3345,7 @@ function GoATable({ onSort, ...props }) {
|
|
|
3240
3345
|
width: props.width,
|
|
3241
3346
|
stickyheader: false,
|
|
3242
3347
|
variant: props.variant,
|
|
3243
|
-
|
|
3348
|
+
testid: props.testId,
|
|
3244
3349
|
mt: props.mt,
|
|
3245
3350
|
mb: props.mb,
|
|
3246
3351
|
ml: props.ml,
|
|
@@ -3276,7 +3381,7 @@ function GoATabs({
|
|
|
3276
3381
|
};
|
|
3277
3382
|
}
|
|
3278
3383
|
}, [onChange]);
|
|
3279
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { ref, initialtab: initialTab,
|
|
3384
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { ref, initialtab: initialTab, testid: testId, children });
|
|
3280
3385
|
}
|
|
3281
3386
|
function GoATab({ heading, children }) {
|
|
3282
3387
|
return /* @__PURE__ */ jsxRuntime.jsxs("goa-tab", { children: [
|
|
@@ -3284,6 +3389,21 @@ function GoATab({ heading, children }) {
|
|
|
3284
3389
|
children
|
|
3285
3390
|
] });
|
|
3286
3391
|
}
|
|
3392
|
+
function GoAText(props) {
|
|
3393
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3394
|
+
"goa-text",
|
|
3395
|
+
{
|
|
3396
|
+
as: props.as || "div",
|
|
3397
|
+
size: props.size,
|
|
3398
|
+
maxwidth: props.maxWidth || "65ch",
|
|
3399
|
+
mt: props.mt,
|
|
3400
|
+
mb: props.mb,
|
|
3401
|
+
ml: props.ml,
|
|
3402
|
+
mr: props.mr,
|
|
3403
|
+
children: props.children
|
|
3404
|
+
}
|
|
3405
|
+
);
|
|
3406
|
+
}
|
|
3287
3407
|
function GoATextarea({
|
|
3288
3408
|
name,
|
|
3289
3409
|
value,
|
|
@@ -3312,7 +3432,7 @@ function GoATextarea({
|
|
|
3312
3432
|
const current = el.current;
|
|
3313
3433
|
const listener = (e) => {
|
|
3314
3434
|
const { name: name2, value: value2 } = e.detail;
|
|
3315
|
-
onChange(name2, value2);
|
|
3435
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
3316
3436
|
};
|
|
3317
3437
|
current.addEventListener("_change", listener);
|
|
3318
3438
|
return () => {
|
|
@@ -3347,7 +3467,7 @@ function GoATextarea({
|
|
|
3347
3467
|
width,
|
|
3348
3468
|
maxwidth: maxWidth,
|
|
3349
3469
|
error,
|
|
3350
|
-
|
|
3470
|
+
testid: testId,
|
|
3351
3471
|
arialabel: ariaLabel,
|
|
3352
3472
|
mt,
|
|
3353
3473
|
mr,
|
|
@@ -3381,7 +3501,7 @@ function GoATooltip(props) {
|
|
|
3381
3501
|
position: props.position,
|
|
3382
3502
|
content: props.content,
|
|
3383
3503
|
halign: props.hAlign,
|
|
3384
|
-
|
|
3504
|
+
testid: props.testId,
|
|
3385
3505
|
mt: props.mt,
|
|
3386
3506
|
mr: props.mr,
|
|
3387
3507
|
mb: props.mb,
|
|
@@ -3405,6 +3525,7 @@ function GoATwoColumnLayout(props) {
|
|
|
3405
3525
|
}
|
|
3406
3526
|
);
|
|
3407
3527
|
}
|
|
3528
|
+
exports.GoAIcon = icon.GoAIcon;
|
|
3408
3529
|
exports.GoAAccordion = GoAAccordion;
|
|
3409
3530
|
exports.GoAAppFooter = GoAAppFooter;
|
|
3410
3531
|
exports.GoAAppFooterMetaSection = GoAAppFooterMetaSection;
|
|
@@ -3428,6 +3549,7 @@ exports.GoADropdown = GoADropdown;
|
|
|
3428
3549
|
exports.GoADropdownItem = GoADropdownItem;
|
|
3429
3550
|
exports.GoADropdownOption = GoADropdownOption;
|
|
3430
3551
|
exports.GoAEmergencyBadge = GoAEmergencyBadge;
|
|
3552
|
+
exports.GoAFieldset = GoAFieldset;
|
|
3431
3553
|
exports.GoAFileUploadCard = GoAFileUploadCard;
|
|
3432
3554
|
exports.GoAFileUploadInput = GoAFileUploadInput;
|
|
3433
3555
|
exports.GoAFormItem = GoAFormItem;
|
|
@@ -3436,7 +3558,6 @@ exports.GoAFormStepper = GoAFormStepper;
|
|
|
3436
3558
|
exports.GoAGrid = GoAGrid;
|
|
3437
3559
|
exports.GoAHeroBanner = GoAHeroBanner;
|
|
3438
3560
|
exports.GoAHeroBannerActions = GoAHeroBannerActions;
|
|
3439
|
-
exports.GoAIcon = GoAIcon;
|
|
3440
3561
|
exports.GoAIconButton = GoAIconButton;
|
|
3441
3562
|
exports.GoAImportantBadge = GoAImportantBadge;
|
|
3442
3563
|
exports.GoAInfoBadge = GoAInfoBadge;
|
|
@@ -3454,6 +3575,8 @@ exports.GoAInputTel = GoAInputTel;
|
|
|
3454
3575
|
exports.GoAInputText = GoAInputText;
|
|
3455
3576
|
exports.GoAInputTime = GoAInputTime;
|
|
3456
3577
|
exports.GoAInputUrl = GoAInputUrl;
|
|
3578
|
+
exports.GoALink = GoALink;
|
|
3579
|
+
exports.GoALinkButton = GoALinkButton;
|
|
3457
3580
|
exports.GoAMicrositeHeader = GoAMicrositeHeader;
|
|
3458
3581
|
exports.GoAModal = GoAModal;
|
|
3459
3582
|
exports.GoANotification = GoANotification;
|
|
@@ -3475,6 +3598,7 @@ exports.GoATab = GoATab;
|
|
|
3475
3598
|
exports.GoATable = GoATable;
|
|
3476
3599
|
exports.GoATableSortHeader = GoATableSortHeader;
|
|
3477
3600
|
exports.GoATabs = GoATabs;
|
|
3601
|
+
exports.GoAText = GoAText;
|
|
3478
3602
|
exports.GoATextArea = GoATextarea;
|
|
3479
3603
|
exports.GoATextarea = GoATextarea;
|
|
3480
3604
|
exports.GoAThreeColumnLayout = GoAThreeColumnLayout;
|