@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.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,8 +23,9 @@ function GoAAccordion({
|
|
|
21
23
|
headingSize,
|
|
22
24
|
heading,
|
|
23
25
|
secondaryText,
|
|
26
|
+
iconposition: iconPosition,
|
|
24
27
|
maxwidth: maxWidth,
|
|
25
|
-
|
|
28
|
+
testid,
|
|
26
29
|
mt,
|
|
27
30
|
mr,
|
|
28
31
|
mb,
|
|
@@ -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
|
);
|
|
@@ -60,7 +83,7 @@ function GoAAppHeaderMenu(props) {
|
|
|
60
83
|
{
|
|
61
84
|
heading: props.heading,
|
|
62
85
|
leadingicon: props.leadingIcon,
|
|
63
|
-
|
|
86
|
+
testid: props.testId,
|
|
64
87
|
children: props.children
|
|
65
88
|
}
|
|
66
89
|
);
|
|
@@ -82,7 +105,7 @@ function GoABadge({
|
|
|
82
105
|
type,
|
|
83
106
|
content,
|
|
84
107
|
icon,
|
|
85
|
-
|
|
108
|
+
testid: testId,
|
|
86
109
|
arialabel: ariaLabel,
|
|
87
110
|
mt,
|
|
88
111
|
mr,
|
|
@@ -202,7 +225,7 @@ function GoABlock(props) {
|
|
|
202
225
|
mr: props.mr,
|
|
203
226
|
mb: props.mb,
|
|
204
227
|
ml: props.ml,
|
|
205
|
-
|
|
228
|
+
testid: props.testId,
|
|
206
229
|
children: props.children
|
|
207
230
|
}
|
|
208
231
|
);
|
|
@@ -249,7 +272,7 @@ function GoAButton({
|
|
|
249
272
|
disabled,
|
|
250
273
|
leadingicon: leadingIcon,
|
|
251
274
|
trailingicon: trailingIcon,
|
|
252
|
-
|
|
275
|
+
testid: testId,
|
|
253
276
|
mt,
|
|
254
277
|
mr,
|
|
255
278
|
mb,
|
|
@@ -277,7 +300,7 @@ function GoAButtonGroup({
|
|
|
277
300
|
mr,
|
|
278
301
|
mb,
|
|
279
302
|
ml,
|
|
280
|
-
|
|
303
|
+
testid: testId,
|
|
281
304
|
children
|
|
282
305
|
}
|
|
283
306
|
);
|
|
@@ -312,7 +335,7 @@ function GoACalendar({
|
|
|
312
335
|
value: value == null ? void 0 : value.toISOString(),
|
|
313
336
|
min: min == null ? void 0 : min.toISOString(),
|
|
314
337
|
max: max == null ? void 0 : max.toISOString(),
|
|
315
|
-
|
|
338
|
+
testid: testId,
|
|
316
339
|
mt,
|
|
317
340
|
mr,
|
|
318
341
|
mb,
|
|
@@ -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,11 +365,12 @@ 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,
|
|
347
372
|
ml,
|
|
348
|
-
|
|
373
|
+
testid: testId,
|
|
349
374
|
children
|
|
350
375
|
}
|
|
351
376
|
);
|
|
@@ -387,12 +412,12 @@ function GoACheckbox({
|
|
|
387
412
|
return /* @__PURE__ */ jsxs(
|
|
388
413
|
"goa-checkbox",
|
|
389
414
|
{
|
|
390
|
-
|
|
415
|
+
testid: testId,
|
|
391
416
|
ref: el,
|
|
392
417
|
id,
|
|
393
418
|
name,
|
|
394
419
|
error,
|
|
395
|
-
checked,
|
|
420
|
+
checked: checked || false,
|
|
396
421
|
disabled,
|
|
397
422
|
text,
|
|
398
423
|
value,
|
|
@@ -451,7 +476,7 @@ const GoAChip = ({
|
|
|
451
476
|
mr,
|
|
452
477
|
mb,
|
|
453
478
|
ml,
|
|
454
|
-
|
|
479
|
+
testid: testId
|
|
455
480
|
}
|
|
456
481
|
);
|
|
457
482
|
};
|
|
@@ -471,7 +496,7 @@ const GoACircularProgress = ({
|
|
|
471
496
|
progress,
|
|
472
497
|
variant,
|
|
473
498
|
size,
|
|
474
|
-
|
|
499
|
+
testid: testId
|
|
475
500
|
}
|
|
476
501
|
);
|
|
477
502
|
};
|
|
@@ -504,7 +529,7 @@ function GoAContainer({
|
|
|
504
529
|
mr,
|
|
505
530
|
mb,
|
|
506
531
|
ml,
|
|
507
|
-
|
|
532
|
+
testid: testId,
|
|
508
533
|
children: [
|
|
509
534
|
headingContent && /* @__PURE__ */ jsx("div", { slot: "title", children: headingContent }),
|
|
510
535
|
children,
|
|
@@ -520,10 +545,12 @@ function GoADatePicker({
|
|
|
520
545
|
min,
|
|
521
546
|
max,
|
|
522
547
|
testId,
|
|
548
|
+
disabled,
|
|
523
549
|
mt,
|
|
524
550
|
mr,
|
|
525
551
|
mb,
|
|
526
552
|
ml,
|
|
553
|
+
relative,
|
|
527
554
|
onChange
|
|
528
555
|
}) {
|
|
529
556
|
const ref = useRef(null);
|
|
@@ -533,7 +560,8 @@ function GoADatePicker({
|
|
|
533
560
|
}
|
|
534
561
|
const current = ref.current;
|
|
535
562
|
const handleChange = (e) => {
|
|
536
|
-
|
|
563
|
+
const newValue = e.detail.value;
|
|
564
|
+
onChange == null ? void 0 : onChange(name || "", newValue ? new Date(newValue) : void 0);
|
|
537
565
|
};
|
|
538
566
|
current.addEventListener("_change", handleChange);
|
|
539
567
|
return () => {
|
|
@@ -545,15 +573,17 @@ function GoADatePicker({
|
|
|
545
573
|
{
|
|
546
574
|
ref,
|
|
547
575
|
name,
|
|
548
|
-
value: value == null ? void 0 : value.toISOString(),
|
|
576
|
+
value: (value == null ? void 0 : value.toISOString()) || "",
|
|
549
577
|
error,
|
|
578
|
+
disabled,
|
|
550
579
|
min: min == null ? void 0 : min.toISOString(),
|
|
551
580
|
max: max == null ? void 0 : max.toISOString(),
|
|
552
|
-
|
|
581
|
+
testid: testId,
|
|
553
582
|
mt,
|
|
554
583
|
mr,
|
|
555
584
|
mb,
|
|
556
|
-
ml
|
|
585
|
+
ml,
|
|
586
|
+
relative
|
|
557
587
|
}
|
|
558
588
|
);
|
|
559
589
|
}
|
|
@@ -564,7 +594,7 @@ function GoADetails(props) {
|
|
|
564
594
|
heading: props.heading,
|
|
565
595
|
open: props.open,
|
|
566
596
|
maxwidth: props.maxWidth,
|
|
567
|
-
|
|
597
|
+
testid: props.testId,
|
|
568
598
|
mt: props.mt,
|
|
569
599
|
mr: props.mr,
|
|
570
600
|
mb: props.mb,
|
|
@@ -581,7 +611,7 @@ function GoADivider(props) {
|
|
|
581
611
|
mr: props.mr,
|
|
582
612
|
mb: props.mb,
|
|
583
613
|
ml: props.ml,
|
|
584
|
-
|
|
614
|
+
testid: props.testId
|
|
585
615
|
}
|
|
586
616
|
);
|
|
587
617
|
}
|
|
@@ -602,8 +632,9 @@ function GoADropdown(props) {
|
|
|
602
632
|
}
|
|
603
633
|
const current = el.current;
|
|
604
634
|
const handler = (e) => {
|
|
635
|
+
var _a;
|
|
605
636
|
const { name, value, values } = e.detail;
|
|
606
|
-
props.onChange(name, props.multiselect ? values : value);
|
|
637
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, props.multiselect ? values : value);
|
|
607
638
|
};
|
|
608
639
|
current.addEventListener("_change", handler);
|
|
609
640
|
return () => {
|
|
@@ -630,7 +661,7 @@ function GoADropdown(props) {
|
|
|
630
661
|
multiselect: props.multiselect,
|
|
631
662
|
native: props.native,
|
|
632
663
|
placeholder: props.placeholder,
|
|
633
|
-
|
|
664
|
+
testid: props.testId,
|
|
634
665
|
width: props.width,
|
|
635
666
|
relative: props.relative,
|
|
636
667
|
id: props.id,
|
|
@@ -657,6 +688,53 @@ function GoADropdownItem({ value, label, filter, name, testId, mountType = "appe
|
|
|
657
688
|
}
|
|
658
689
|
);
|
|
659
690
|
}
|
|
691
|
+
function GoAFieldset({
|
|
692
|
+
heading,
|
|
693
|
+
buttonText,
|
|
694
|
+
id,
|
|
695
|
+
onContinue,
|
|
696
|
+
children,
|
|
697
|
+
mt,
|
|
698
|
+
mr,
|
|
699
|
+
mb,
|
|
700
|
+
ml,
|
|
701
|
+
first,
|
|
702
|
+
last
|
|
703
|
+
}) {
|
|
704
|
+
const ref = useRef(null);
|
|
705
|
+
useEffect(() => {
|
|
706
|
+
var _a;
|
|
707
|
+
const _continue = (e) => {
|
|
708
|
+
const { el, state } = e.detail;
|
|
709
|
+
return onContinue == null ? void 0 : onContinue(el, state);
|
|
710
|
+
};
|
|
711
|
+
if (onContinue) {
|
|
712
|
+
(_a = ref.current) == null ? void 0 : _a.addEventListener("_continue", _continue);
|
|
713
|
+
}
|
|
714
|
+
return () => {
|
|
715
|
+
var _a2;
|
|
716
|
+
if (onContinue) {
|
|
717
|
+
(_a2 = ref.current) == null ? void 0 : _a2.removeEventListener("_continue", _continue);
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
}, [ref.current, onContinue]);
|
|
721
|
+
return /* @__PURE__ */ jsx(
|
|
722
|
+
"goa-fieldset",
|
|
723
|
+
{
|
|
724
|
+
ref,
|
|
725
|
+
id,
|
|
726
|
+
first,
|
|
727
|
+
last,
|
|
728
|
+
heading,
|
|
729
|
+
buttontext: buttonText,
|
|
730
|
+
mt,
|
|
731
|
+
mr,
|
|
732
|
+
mb,
|
|
733
|
+
ml,
|
|
734
|
+
children
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
}
|
|
660
738
|
function GoAFileUploadCard({
|
|
661
739
|
filename,
|
|
662
740
|
size,
|
|
@@ -689,7 +767,7 @@ function GoAFileUploadCard({
|
|
|
689
767
|
type,
|
|
690
768
|
progress,
|
|
691
769
|
error,
|
|
692
|
-
|
|
770
|
+
testid: testId
|
|
693
771
|
}
|
|
694
772
|
);
|
|
695
773
|
}
|
|
@@ -719,7 +797,7 @@ function GoAFileUploadInput({
|
|
|
719
797
|
variant,
|
|
720
798
|
accept,
|
|
721
799
|
maxfilesize: maxFileSize,
|
|
722
|
-
|
|
800
|
+
testid: testId
|
|
723
801
|
}
|
|
724
802
|
);
|
|
725
803
|
}
|
|
@@ -728,13 +806,13 @@ function GoAAppFooter({
|
|
|
728
806
|
children,
|
|
729
807
|
testId
|
|
730
808
|
}) {
|
|
731
|
-
return /* @__PURE__ */ jsx("goa-app-footer", { maxcontentwidth: maxContentWidth,
|
|
809
|
+
return /* @__PURE__ */ jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, testid: testId, children });
|
|
732
810
|
}
|
|
733
811
|
function GoAAppFooterMetaSection({ testId, children }) {
|
|
734
812
|
return /* @__PURE__ */ jsx(
|
|
735
813
|
"goa-app-footer-meta-section",
|
|
736
814
|
{
|
|
737
|
-
|
|
815
|
+
testid: testId,
|
|
738
816
|
slot: "meta",
|
|
739
817
|
children
|
|
740
818
|
}
|
|
@@ -752,7 +830,7 @@ function GoAAppFooterNavSection({
|
|
|
752
830
|
slot: "nav",
|
|
753
831
|
heading,
|
|
754
832
|
maxcolumncount: maxColumnCount,
|
|
755
|
-
|
|
833
|
+
testid: testId,
|
|
756
834
|
children
|
|
757
835
|
}
|
|
758
836
|
);
|
|
@@ -785,7 +863,7 @@ function GoAFormItem({
|
|
|
785
863
|
mr,
|
|
786
864
|
mb,
|
|
787
865
|
ml,
|
|
788
|
-
|
|
866
|
+
testid: testId,
|
|
789
867
|
id,
|
|
790
868
|
children: [
|
|
791
869
|
error && typeof error !== "string" && /* @__PURE__ */ jsx("div", { slot: "error", children: error }),
|
|
@@ -827,7 +905,7 @@ function GoAFormStepper({
|
|
|
827
905
|
"goa-form-stepper",
|
|
828
906
|
{
|
|
829
907
|
ref,
|
|
830
|
-
|
|
908
|
+
testid: testId,
|
|
831
909
|
step,
|
|
832
910
|
mt,
|
|
833
911
|
mr,
|
|
@@ -856,7 +934,7 @@ function GoAGrid({
|
|
|
856
934
|
mr,
|
|
857
935
|
mb,
|
|
858
936
|
ml,
|
|
859
|
-
|
|
937
|
+
testid: testId,
|
|
860
938
|
children
|
|
861
939
|
}
|
|
862
940
|
);
|
|
@@ -880,7 +958,7 @@ function GoAHeroBanner({
|
|
|
880
958
|
maxcontentwidth: maxContentWidth,
|
|
881
959
|
backgroundcolor: backgroundColor,
|
|
882
960
|
textcolor: textColor,
|
|
883
|
-
|
|
961
|
+
testid: testId,
|
|
884
962
|
children
|
|
885
963
|
}
|
|
886
964
|
);
|
|
@@ -936,45 +1014,11 @@ function GoAIconButton({
|
|
|
936
1014
|
mr,
|
|
937
1015
|
mb,
|
|
938
1016
|
ml,
|
|
939
|
-
|
|
1017
|
+
testid: testId,
|
|
940
1018
|
children
|
|
941
1019
|
}
|
|
942
1020
|
);
|
|
943
1021
|
}
|
|
944
|
-
function GoAIcon({
|
|
945
|
-
type,
|
|
946
|
-
theme,
|
|
947
|
-
size,
|
|
948
|
-
inverted,
|
|
949
|
-
fillColor,
|
|
950
|
-
opacity,
|
|
951
|
-
title,
|
|
952
|
-
ariaLabel,
|
|
953
|
-
mt,
|
|
954
|
-
mr,
|
|
955
|
-
mb,
|
|
956
|
-
ml,
|
|
957
|
-
testId
|
|
958
|
-
}) {
|
|
959
|
-
return /* @__PURE__ */ jsx(
|
|
960
|
-
"goa-icon",
|
|
961
|
-
{
|
|
962
|
-
type,
|
|
963
|
-
theme,
|
|
964
|
-
size,
|
|
965
|
-
inverted,
|
|
966
|
-
fillcolor: fillColor,
|
|
967
|
-
opacity,
|
|
968
|
-
title,
|
|
969
|
-
arialabel: ariaLabel,
|
|
970
|
-
mt,
|
|
971
|
-
mr,
|
|
972
|
-
mb,
|
|
973
|
-
ml,
|
|
974
|
-
"data-testid": testId
|
|
975
|
-
}
|
|
976
|
-
);
|
|
977
|
-
}
|
|
978
1022
|
function toDate(argument) {
|
|
979
1023
|
const argStr = Object.prototype.toString.call(argument);
|
|
980
1024
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -2623,7 +2667,7 @@ function GoAInput({
|
|
|
2623
2667
|
const current = ref.current;
|
|
2624
2668
|
const changeListener = (e) => {
|
|
2625
2669
|
const { name: name2, value: value2 } = e.detail;
|
|
2626
|
-
onChange(name2, value2);
|
|
2670
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
2627
2671
|
};
|
|
2628
2672
|
const clickListener = () => {
|
|
2629
2673
|
onTrailingIconClick == null ? void 0 : onTrailingIconClick();
|
|
@@ -2670,7 +2714,7 @@ function GoAInput({
|
|
|
2670
2714
|
readonly,
|
|
2671
2715
|
placeholder,
|
|
2672
2716
|
error,
|
|
2673
|
-
|
|
2717
|
+
testid: testId,
|
|
2674
2718
|
value,
|
|
2675
2719
|
width,
|
|
2676
2720
|
min,
|
|
@@ -2694,6 +2738,7 @@ function GoAInput({
|
|
|
2694
2738
|
}
|
|
2695
2739
|
const onDateChangeHandler = (onChange) => {
|
|
2696
2740
|
return (name, value) => {
|
|
2741
|
+
if (!onChange) return;
|
|
2697
2742
|
if (!value) {
|
|
2698
2743
|
onChange(name, "");
|
|
2699
2744
|
return;
|
|
@@ -2705,6 +2750,7 @@ const onDateChangeHandler = (onChange) => {
|
|
|
2705
2750
|
};
|
|
2706
2751
|
const onTimeChangeHandler = (onChange) => {
|
|
2707
2752
|
return (name, value) => {
|
|
2753
|
+
if (!onChange) return;
|
|
2708
2754
|
if (!value) {
|
|
2709
2755
|
onChange(name, "");
|
|
2710
2756
|
return;
|
|
@@ -2799,7 +2845,10 @@ function GoAInputFile(props) {
|
|
|
2799
2845
|
id: props.id,
|
|
2800
2846
|
name: props.name,
|
|
2801
2847
|
type: "file",
|
|
2802
|
-
onChange: (e) =>
|
|
2848
|
+
onChange: (e) => {
|
|
2849
|
+
var _a;
|
|
2850
|
+
return (_a = props.onChange) == null ? void 0 : _a.call(props, e.target.name, e.target.value);
|
|
2851
|
+
},
|
|
2803
2852
|
style: { backgroundColor: "revert" }
|
|
2804
2853
|
}
|
|
2805
2854
|
);
|
|
@@ -2814,7 +2863,8 @@ function GoAInputNumber({
|
|
|
2814
2863
|
...props
|
|
2815
2864
|
}) {
|
|
2816
2865
|
const onNumberChange = (name, value2) => {
|
|
2817
|
-
|
|
2866
|
+
var _a;
|
|
2867
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, parseFloat(value2));
|
|
2818
2868
|
};
|
|
2819
2869
|
const onFocus = (name, value2) => {
|
|
2820
2870
|
var _a;
|
|
@@ -2846,6 +2896,35 @@ function GoAInputNumber({
|
|
|
2846
2896
|
function GoAInputRange(props) {
|
|
2847
2897
|
return /* @__PURE__ */ jsx(GoAInput, { ...props, type: "range" });
|
|
2848
2898
|
}
|
|
2899
|
+
function GoALink(props) {
|
|
2900
|
+
return /* @__PURE__ */ jsx(
|
|
2901
|
+
"goa-link",
|
|
2902
|
+
{
|
|
2903
|
+
leadingicon: props.leadingIcon,
|
|
2904
|
+
trailingicon: props.trailingIcon,
|
|
2905
|
+
mt: props.mt,
|
|
2906
|
+
mb: props.mb,
|
|
2907
|
+
ml: props.ml,
|
|
2908
|
+
mr: props.mr,
|
|
2909
|
+
children: props.children
|
|
2910
|
+
}
|
|
2911
|
+
);
|
|
2912
|
+
}
|
|
2913
|
+
function GoALinkButton({ type = "primary", ...props }) {
|
|
2914
|
+
return /* @__PURE__ */ jsx(
|
|
2915
|
+
"goa-link-button",
|
|
2916
|
+
{
|
|
2917
|
+
type,
|
|
2918
|
+
leadingicon: props.leadingIcon,
|
|
2919
|
+
trailingicon: props.trailingIcon,
|
|
2920
|
+
mt: props.mt,
|
|
2921
|
+
mb: props.mb,
|
|
2922
|
+
ml: props.ml,
|
|
2923
|
+
mr: props.mr,
|
|
2924
|
+
children: props.children
|
|
2925
|
+
}
|
|
2926
|
+
);
|
|
2927
|
+
}
|
|
2849
2928
|
function GoAMicrositeHeader({
|
|
2850
2929
|
type,
|
|
2851
2930
|
version,
|
|
@@ -2853,18 +2932,39 @@ function GoAMicrositeHeader({
|
|
|
2853
2932
|
maxContentWidth,
|
|
2854
2933
|
feedbackUrlTarget,
|
|
2855
2934
|
headerUrlTarget,
|
|
2856
|
-
testId
|
|
2935
|
+
testId,
|
|
2936
|
+
onFeedbackClick
|
|
2857
2937
|
}) {
|
|
2938
|
+
const el = useRef(null);
|
|
2939
|
+
useEffect(() => {
|
|
2940
|
+
if (!el.current) {
|
|
2941
|
+
return;
|
|
2942
|
+
}
|
|
2943
|
+
if (!onFeedbackClick) {
|
|
2944
|
+
return;
|
|
2945
|
+
}
|
|
2946
|
+
const current = el.current;
|
|
2947
|
+
const listener = () => {
|
|
2948
|
+
onFeedbackClick();
|
|
2949
|
+
};
|
|
2950
|
+
current.addEventListener("_feedbackClick", listener);
|
|
2951
|
+
return () => {
|
|
2952
|
+
current.removeEventListener("_feedbackClick", listener);
|
|
2953
|
+
};
|
|
2954
|
+
}, [el, onFeedbackClick]);
|
|
2858
2955
|
return /* @__PURE__ */ jsx(
|
|
2859
2956
|
"goa-microsite-header",
|
|
2860
2957
|
{
|
|
2958
|
+
ref: el,
|
|
2861
2959
|
type,
|
|
2862
|
-
version,
|
|
2960
|
+
version: typeof version === "string" ? version : void 0,
|
|
2863
2961
|
feedbackurl: feedbackUrl,
|
|
2864
|
-
|
|
2962
|
+
testid: testId,
|
|
2865
2963
|
maxcontentwidth: maxContentWidth,
|
|
2866
2964
|
feedbackurltarget: feedbackUrlTarget,
|
|
2867
|
-
headerurltarget: headerUrlTarget
|
|
2965
|
+
headerurltarget: headerUrlTarget,
|
|
2966
|
+
hasfeedbackhandler: !!onFeedbackClick,
|
|
2967
|
+
children: version && typeof version !== "string" && /* @__PURE__ */ jsx("div", { slot: "version", children: version })
|
|
2868
2968
|
}
|
|
2869
2969
|
);
|
|
2870
2970
|
}
|
|
@@ -2913,7 +3013,7 @@ function GoAModal({
|
|
|
2913
3013
|
maxwidth: maxWidth,
|
|
2914
3014
|
transition,
|
|
2915
3015
|
calloutvariant: calloutVariant,
|
|
2916
|
-
|
|
3016
|
+
testid: testId,
|
|
2917
3017
|
role,
|
|
2918
3018
|
children: [
|
|
2919
3019
|
heading && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
|
|
@@ -2950,7 +3050,7 @@ const GoANotification = ({
|
|
|
2950
3050
|
{
|
|
2951
3051
|
ref: el,
|
|
2952
3052
|
type,
|
|
2953
|
-
|
|
3053
|
+
testid: testId,
|
|
2954
3054
|
maxcontentwidth: maxContentWidth,
|
|
2955
3055
|
arialive: ariaLive,
|
|
2956
3056
|
children
|
|
@@ -2961,7 +3061,7 @@ function GoAOneColumnLayout(props) {
|
|
|
2961
3061
|
return /* @__PURE__ */ jsx("goa-one-column-layout", { children: props.children });
|
|
2962
3062
|
}
|
|
2963
3063
|
function GoAPageBlock(props) {
|
|
2964
|
-
return /* @__PURE__ */ jsx("goa-page-block", { width: props.width,
|
|
3064
|
+
return /* @__PURE__ */ jsx("goa-page-block", { width: props.width, testid: props.testId, children: props.children });
|
|
2965
3065
|
}
|
|
2966
3066
|
function GoAPages(props) {
|
|
2967
3067
|
return /* @__PURE__ */ jsx(
|
|
@@ -3004,7 +3104,7 @@ function GoAPagination({ onChange, ...props }) {
|
|
|
3004
3104
|
mb: props.mb,
|
|
3005
3105
|
ml: props.ml,
|
|
3006
3106
|
mr: props.mr,
|
|
3007
|
-
|
|
3107
|
+
testid: props.testId
|
|
3008
3108
|
}
|
|
3009
3109
|
);
|
|
3010
3110
|
}
|
|
@@ -3025,7 +3125,7 @@ function GoAPopover({
|
|
|
3025
3125
|
return /* @__PURE__ */ jsxs(
|
|
3026
3126
|
"goa-popover",
|
|
3027
3127
|
{
|
|
3028
|
-
|
|
3128
|
+
testid: testId,
|
|
3029
3129
|
maxwidth: maxWidth,
|
|
3030
3130
|
minwidth: minWidth,
|
|
3031
3131
|
padded,
|
|
@@ -3119,7 +3219,7 @@ function GoARadioGroup({
|
|
|
3119
3219
|
return /* @__PURE__ */ jsx(
|
|
3120
3220
|
"goa-radio-group",
|
|
3121
3221
|
{
|
|
3122
|
-
|
|
3222
|
+
testid: testId,
|
|
3123
3223
|
ref: el,
|
|
3124
3224
|
name,
|
|
3125
3225
|
value,
|
|
@@ -3140,7 +3240,12 @@ function GoASideMenuGroup(props) {
|
|
|
3140
3240
|
"goa-side-menu-group",
|
|
3141
3241
|
{
|
|
3142
3242
|
heading: props.heading,
|
|
3143
|
-
|
|
3243
|
+
icon: props.icon,
|
|
3244
|
+
testid: props.testId,
|
|
3245
|
+
mt: props.mt,
|
|
3246
|
+
mr: props.mr,
|
|
3247
|
+
mb: props.mb,
|
|
3248
|
+
ml: props.ml,
|
|
3144
3249
|
children: props.children
|
|
3145
3250
|
}
|
|
3146
3251
|
);
|
|
@@ -3150,7 +3255,7 @@ function GoASideMenuHeading(props) {
|
|
|
3150
3255
|
"goa-side-menu-heading",
|
|
3151
3256
|
{
|
|
3152
3257
|
icon: props.icon,
|
|
3153
|
-
|
|
3258
|
+
testid: props.testId,
|
|
3154
3259
|
children: [
|
|
3155
3260
|
props.children,
|
|
3156
3261
|
props.meta && /* @__PURE__ */ jsx("span", { slot: "meta", children: props.meta })
|
|
@@ -3159,7 +3264,7 @@ function GoASideMenuHeading(props) {
|
|
|
3159
3264
|
);
|
|
3160
3265
|
}
|
|
3161
3266
|
function GoASideMenu(props) {
|
|
3162
|
-
return /* @__PURE__ */ jsx("goa-side-menu", {
|
|
3267
|
+
return /* @__PURE__ */ jsx("goa-side-menu", { testid: props.testId, children: props.children });
|
|
3163
3268
|
}
|
|
3164
3269
|
const GoASkeleton = ({
|
|
3165
3270
|
maxWidth,
|
|
@@ -3183,7 +3288,7 @@ const GoASkeleton = ({
|
|
|
3183
3288
|
mr,
|
|
3184
3289
|
mb,
|
|
3185
3290
|
ml,
|
|
3186
|
-
|
|
3291
|
+
testid: testId
|
|
3187
3292
|
}
|
|
3188
3293
|
);
|
|
3189
3294
|
};
|
|
@@ -3193,7 +3298,7 @@ function GoASpacer(props) {
|
|
|
3193
3298
|
{
|
|
3194
3299
|
hspacing: props.hSpacing,
|
|
3195
3300
|
vspacing: props.vSpacing,
|
|
3196
|
-
|
|
3301
|
+
testid: props.testId
|
|
3197
3302
|
}
|
|
3198
3303
|
);
|
|
3199
3304
|
}
|
|
@@ -3211,7 +3316,7 @@ function GoASpinner({
|
|
|
3211
3316
|
size,
|
|
3212
3317
|
progress,
|
|
3213
3318
|
invert,
|
|
3214
|
-
|
|
3319
|
+
testid: testId
|
|
3215
3320
|
}
|
|
3216
3321
|
);
|
|
3217
3322
|
}
|
|
@@ -3238,7 +3343,7 @@ function GoATable({ onSort, ...props }) {
|
|
|
3238
3343
|
width: props.width,
|
|
3239
3344
|
stickyheader: false,
|
|
3240
3345
|
variant: props.variant,
|
|
3241
|
-
|
|
3346
|
+
testid: props.testId,
|
|
3242
3347
|
mt: props.mt,
|
|
3243
3348
|
mb: props.mb,
|
|
3244
3349
|
ml: props.ml,
|
|
@@ -3274,7 +3379,7 @@ function GoATabs({
|
|
|
3274
3379
|
};
|
|
3275
3380
|
}
|
|
3276
3381
|
}, [onChange]);
|
|
3277
|
-
return /* @__PURE__ */ jsx("goa-tabs", { ref, initialtab: initialTab,
|
|
3382
|
+
return /* @__PURE__ */ jsx("goa-tabs", { ref, initialtab: initialTab, testid: testId, children });
|
|
3278
3383
|
}
|
|
3279
3384
|
function GoATab({ heading, children }) {
|
|
3280
3385
|
return /* @__PURE__ */ jsxs("goa-tab", { children: [
|
|
@@ -3282,6 +3387,21 @@ function GoATab({ heading, children }) {
|
|
|
3282
3387
|
children
|
|
3283
3388
|
] });
|
|
3284
3389
|
}
|
|
3390
|
+
function GoAText(props) {
|
|
3391
|
+
return /* @__PURE__ */ jsx(
|
|
3392
|
+
"goa-text",
|
|
3393
|
+
{
|
|
3394
|
+
as: props.as || "div",
|
|
3395
|
+
size: props.size,
|
|
3396
|
+
maxwidth: props.maxWidth || "65ch",
|
|
3397
|
+
mt: props.mt,
|
|
3398
|
+
mb: props.mb,
|
|
3399
|
+
ml: props.ml,
|
|
3400
|
+
mr: props.mr,
|
|
3401
|
+
children: props.children
|
|
3402
|
+
}
|
|
3403
|
+
);
|
|
3404
|
+
}
|
|
3285
3405
|
function GoATextarea({
|
|
3286
3406
|
name,
|
|
3287
3407
|
value,
|
|
@@ -3310,7 +3430,7 @@ function GoATextarea({
|
|
|
3310
3430
|
const current = el.current;
|
|
3311
3431
|
const listener = (e) => {
|
|
3312
3432
|
const { name: name2, value: value2 } = e.detail;
|
|
3313
|
-
onChange(name2, value2);
|
|
3433
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
3314
3434
|
};
|
|
3315
3435
|
current.addEventListener("_change", listener);
|
|
3316
3436
|
return () => {
|
|
@@ -3345,7 +3465,7 @@ function GoATextarea({
|
|
|
3345
3465
|
width,
|
|
3346
3466
|
maxwidth: maxWidth,
|
|
3347
3467
|
error,
|
|
3348
|
-
|
|
3468
|
+
testid: testId,
|
|
3349
3469
|
arialabel: ariaLabel,
|
|
3350
3470
|
mt,
|
|
3351
3471
|
mr,
|
|
@@ -3379,7 +3499,7 @@ function GoATooltip(props) {
|
|
|
3379
3499
|
position: props.position,
|
|
3380
3500
|
content: props.content,
|
|
3381
3501
|
halign: props.hAlign,
|
|
3382
|
-
|
|
3502
|
+
testid: props.testId,
|
|
3383
3503
|
mt: props.mt,
|
|
3384
3504
|
mr: props.mr,
|
|
3385
3505
|
mb: props.mb,
|
|
@@ -3427,6 +3547,7 @@ export {
|
|
|
3427
3547
|
GoADropdownItem,
|
|
3428
3548
|
GoADropdownOption,
|
|
3429
3549
|
GoAEmergencyBadge,
|
|
3550
|
+
GoAFieldset,
|
|
3430
3551
|
GoAFileUploadCard,
|
|
3431
3552
|
GoAFileUploadInput,
|
|
3432
3553
|
GoAFormItem,
|
|
@@ -3435,7 +3556,7 @@ export {
|
|
|
3435
3556
|
GoAGrid,
|
|
3436
3557
|
GoAHeroBanner,
|
|
3437
3558
|
GoAHeroBannerActions,
|
|
3438
|
-
GoAIcon,
|
|
3559
|
+
G as GoAIcon,
|
|
3439
3560
|
GoAIconButton,
|
|
3440
3561
|
GoAImportantBadge,
|
|
3441
3562
|
GoAInfoBadge,
|
|
@@ -3453,6 +3574,8 @@ export {
|
|
|
3453
3574
|
GoAInputText,
|
|
3454
3575
|
GoAInputTime,
|
|
3455
3576
|
GoAInputUrl,
|
|
3577
|
+
GoALink,
|
|
3578
|
+
GoALinkButton,
|
|
3456
3579
|
GoAMicrositeHeader,
|
|
3457
3580
|
GoAModal,
|
|
3458
3581
|
GoANotification,
|
|
@@ -3474,6 +3597,7 @@ export {
|
|
|
3474
3597
|
GoATable,
|
|
3475
3598
|
GoATableSortHeader,
|
|
3476
3599
|
GoATabs,
|
|
3600
|
+
GoAText,
|
|
3477
3601
|
GoATextarea as GoATextArea,
|
|
3478
3602
|
GoATextarea,
|
|
3479
3603
|
GoAThreeColumnLayout,
|