@abgov/react-components 5.0.0-alpha.1 → 5.0.0-alpha.10
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 +199 -104
- package/index.js.map +1 -1
- package/index.mjs +187 -92
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +1 -0
- package/lib/app-header/app-header.d.ts +1 -0
- 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 +1 -0
- 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 +1 -0
- 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,5 +1,6 @@
|
|
|
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,
|
|
@@ -22,7 +23,7 @@ function GoAAccordion({
|
|
|
22
23
|
heading,
|
|
23
24
|
secondaryText,
|
|
24
25
|
maxwidth: maxWidth,
|
|
25
|
-
|
|
26
|
+
testid,
|
|
26
27
|
mt,
|
|
27
28
|
mr,
|
|
28
29
|
mb,
|
|
@@ -49,7 +50,7 @@ function GoAAppHeader({
|
|
|
49
50
|
url,
|
|
50
51
|
fullmenubreakpoint: fullMenuBreakpoint,
|
|
51
52
|
maxcontentwidth: maxContentWidth,
|
|
52
|
-
|
|
53
|
+
testid: testId,
|
|
53
54
|
children
|
|
54
55
|
}
|
|
55
56
|
);
|
|
@@ -60,7 +61,7 @@ function GoAAppHeaderMenu(props) {
|
|
|
60
61
|
{
|
|
61
62
|
heading: props.heading,
|
|
62
63
|
leadingicon: props.leadingIcon,
|
|
63
|
-
|
|
64
|
+
testid: props.testId,
|
|
64
65
|
children: props.children
|
|
65
66
|
}
|
|
66
67
|
);
|
|
@@ -82,7 +83,7 @@ function GoABadge({
|
|
|
82
83
|
type,
|
|
83
84
|
content,
|
|
84
85
|
icon,
|
|
85
|
-
|
|
86
|
+
testid: testId,
|
|
86
87
|
arialabel: ariaLabel,
|
|
87
88
|
mt,
|
|
88
89
|
mr,
|
|
@@ -202,7 +203,7 @@ function GoABlock(props) {
|
|
|
202
203
|
mr: props.mr,
|
|
203
204
|
mb: props.mb,
|
|
204
205
|
ml: props.ml,
|
|
205
|
-
|
|
206
|
+
testid: props.testId,
|
|
206
207
|
children: props.children
|
|
207
208
|
}
|
|
208
209
|
);
|
|
@@ -249,7 +250,7 @@ function GoAButton({
|
|
|
249
250
|
disabled,
|
|
250
251
|
leadingicon: leadingIcon,
|
|
251
252
|
trailingicon: trailingIcon,
|
|
252
|
-
|
|
253
|
+
testid: testId,
|
|
253
254
|
mt,
|
|
254
255
|
mr,
|
|
255
256
|
mb,
|
|
@@ -277,7 +278,7 @@ function GoAButtonGroup({
|
|
|
277
278
|
mr,
|
|
278
279
|
mb,
|
|
279
280
|
ml,
|
|
280
|
-
|
|
281
|
+
testid: testId,
|
|
281
282
|
children
|
|
282
283
|
}
|
|
283
284
|
);
|
|
@@ -312,7 +313,7 @@ function GoACalendar({
|
|
|
312
313
|
value: value == null ? void 0 : value.toISOString(),
|
|
313
314
|
min: min == null ? void 0 : min.toISOString(),
|
|
314
315
|
max: max == null ? void 0 : max.toISOString(),
|
|
315
|
-
|
|
316
|
+
testid: testId,
|
|
316
317
|
mt,
|
|
317
318
|
mr,
|
|
318
319
|
mb,
|
|
@@ -345,7 +346,7 @@ const GoACallout = ({
|
|
|
345
346
|
mr,
|
|
346
347
|
mb,
|
|
347
348
|
ml,
|
|
348
|
-
|
|
349
|
+
testid: testId,
|
|
349
350
|
children
|
|
350
351
|
}
|
|
351
352
|
);
|
|
@@ -387,12 +388,12 @@ function GoACheckbox({
|
|
|
387
388
|
return /* @__PURE__ */ jsxs(
|
|
388
389
|
"goa-checkbox",
|
|
389
390
|
{
|
|
390
|
-
|
|
391
|
+
testid: testId,
|
|
391
392
|
ref: el,
|
|
392
393
|
id,
|
|
393
394
|
name,
|
|
394
395
|
error,
|
|
395
|
-
checked,
|
|
396
|
+
checked: checked || false,
|
|
396
397
|
disabled,
|
|
397
398
|
text,
|
|
398
399
|
value,
|
|
@@ -451,7 +452,7 @@ const GoAChip = ({
|
|
|
451
452
|
mr,
|
|
452
453
|
mb,
|
|
453
454
|
ml,
|
|
454
|
-
|
|
455
|
+
testid: testId
|
|
455
456
|
}
|
|
456
457
|
);
|
|
457
458
|
};
|
|
@@ -471,7 +472,7 @@ const GoACircularProgress = ({
|
|
|
471
472
|
progress,
|
|
472
473
|
variant,
|
|
473
474
|
size,
|
|
474
|
-
|
|
475
|
+
testid: testId
|
|
475
476
|
}
|
|
476
477
|
);
|
|
477
478
|
};
|
|
@@ -504,7 +505,7 @@ function GoAContainer({
|
|
|
504
505
|
mr,
|
|
505
506
|
mb,
|
|
506
507
|
ml,
|
|
507
|
-
|
|
508
|
+
testid: testId,
|
|
508
509
|
children: [
|
|
509
510
|
headingContent && /* @__PURE__ */ jsx("div", { slot: "title", children: headingContent }),
|
|
510
511
|
children,
|
|
@@ -520,10 +521,12 @@ function GoADatePicker({
|
|
|
520
521
|
min,
|
|
521
522
|
max,
|
|
522
523
|
testId,
|
|
524
|
+
disabled,
|
|
523
525
|
mt,
|
|
524
526
|
mr,
|
|
525
527
|
mb,
|
|
526
528
|
ml,
|
|
529
|
+
relative,
|
|
527
530
|
onChange
|
|
528
531
|
}) {
|
|
529
532
|
const ref = useRef(null);
|
|
@@ -533,7 +536,8 @@ function GoADatePicker({
|
|
|
533
536
|
}
|
|
534
537
|
const current = ref.current;
|
|
535
538
|
const handleChange = (e) => {
|
|
536
|
-
|
|
539
|
+
const newValue = e.detail.value;
|
|
540
|
+
onChange == null ? void 0 : onChange(name || "", newValue ? new Date(newValue) : void 0);
|
|
537
541
|
};
|
|
538
542
|
current.addEventListener("_change", handleChange);
|
|
539
543
|
return () => {
|
|
@@ -545,15 +549,17 @@ function GoADatePicker({
|
|
|
545
549
|
{
|
|
546
550
|
ref,
|
|
547
551
|
name,
|
|
548
|
-
value: value == null ? void 0 : value.toISOString(),
|
|
552
|
+
value: (value == null ? void 0 : value.toISOString()) || "",
|
|
549
553
|
error,
|
|
554
|
+
disabled,
|
|
550
555
|
min: min == null ? void 0 : min.toISOString(),
|
|
551
556
|
max: max == null ? void 0 : max.toISOString(),
|
|
552
|
-
|
|
557
|
+
testid: testId,
|
|
553
558
|
mt,
|
|
554
559
|
mr,
|
|
555
560
|
mb,
|
|
556
|
-
ml
|
|
561
|
+
ml,
|
|
562
|
+
relative
|
|
557
563
|
}
|
|
558
564
|
);
|
|
559
565
|
}
|
|
@@ -564,7 +570,7 @@ function GoADetails(props) {
|
|
|
564
570
|
heading: props.heading,
|
|
565
571
|
open: props.open,
|
|
566
572
|
maxwidth: props.maxWidth,
|
|
567
|
-
|
|
573
|
+
testid: props.testId,
|
|
568
574
|
mt: props.mt,
|
|
569
575
|
mr: props.mr,
|
|
570
576
|
mb: props.mb,
|
|
@@ -581,7 +587,7 @@ function GoADivider(props) {
|
|
|
581
587
|
mr: props.mr,
|
|
582
588
|
mb: props.mb,
|
|
583
589
|
ml: props.ml,
|
|
584
|
-
|
|
590
|
+
testid: props.testId
|
|
585
591
|
}
|
|
586
592
|
);
|
|
587
593
|
}
|
|
@@ -602,8 +608,9 @@ function GoADropdown(props) {
|
|
|
602
608
|
}
|
|
603
609
|
const current = el.current;
|
|
604
610
|
const handler = (e) => {
|
|
611
|
+
var _a;
|
|
605
612
|
const { name, value, values } = e.detail;
|
|
606
|
-
props.onChange(name, props.multiselect ? values : value);
|
|
613
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, props.multiselect ? values : value);
|
|
607
614
|
};
|
|
608
615
|
current.addEventListener("_change", handler);
|
|
609
616
|
return () => {
|
|
@@ -630,7 +637,7 @@ function GoADropdown(props) {
|
|
|
630
637
|
multiselect: props.multiselect,
|
|
631
638
|
native: props.native,
|
|
632
639
|
placeholder: props.placeholder,
|
|
633
|
-
|
|
640
|
+
testid: props.testId,
|
|
634
641
|
width: props.width,
|
|
635
642
|
relative: props.relative,
|
|
636
643
|
id: props.id,
|
|
@@ -657,6 +664,53 @@ function GoADropdownItem({ value, label, filter, name, testId, mountType = "appe
|
|
|
657
664
|
}
|
|
658
665
|
);
|
|
659
666
|
}
|
|
667
|
+
function GoAFieldset({
|
|
668
|
+
heading,
|
|
669
|
+
buttonText,
|
|
670
|
+
id,
|
|
671
|
+
onContinue,
|
|
672
|
+
children,
|
|
673
|
+
mt,
|
|
674
|
+
mr,
|
|
675
|
+
mb,
|
|
676
|
+
ml,
|
|
677
|
+
first,
|
|
678
|
+
last
|
|
679
|
+
}) {
|
|
680
|
+
const ref = useRef(null);
|
|
681
|
+
useEffect(() => {
|
|
682
|
+
var _a;
|
|
683
|
+
const _continue = (e) => {
|
|
684
|
+
const { el, state } = e.detail;
|
|
685
|
+
return onContinue == null ? void 0 : onContinue(el, state);
|
|
686
|
+
};
|
|
687
|
+
if (onContinue) {
|
|
688
|
+
(_a = ref.current) == null ? void 0 : _a.addEventListener("_continue", _continue);
|
|
689
|
+
}
|
|
690
|
+
return () => {
|
|
691
|
+
var _a2;
|
|
692
|
+
if (onContinue) {
|
|
693
|
+
(_a2 = ref.current) == null ? void 0 : _a2.removeEventListener("_continue", _continue);
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
}, [ref.current, onContinue]);
|
|
697
|
+
return /* @__PURE__ */ jsx(
|
|
698
|
+
"goa-fieldset",
|
|
699
|
+
{
|
|
700
|
+
ref,
|
|
701
|
+
id,
|
|
702
|
+
first,
|
|
703
|
+
last,
|
|
704
|
+
heading,
|
|
705
|
+
buttontext: buttonText,
|
|
706
|
+
mt,
|
|
707
|
+
mr,
|
|
708
|
+
mb,
|
|
709
|
+
ml,
|
|
710
|
+
children
|
|
711
|
+
}
|
|
712
|
+
);
|
|
713
|
+
}
|
|
660
714
|
function GoAFileUploadCard({
|
|
661
715
|
filename,
|
|
662
716
|
size,
|
|
@@ -689,7 +743,7 @@ function GoAFileUploadCard({
|
|
|
689
743
|
type,
|
|
690
744
|
progress,
|
|
691
745
|
error,
|
|
692
|
-
|
|
746
|
+
testid: testId
|
|
693
747
|
}
|
|
694
748
|
);
|
|
695
749
|
}
|
|
@@ -719,7 +773,7 @@ function GoAFileUploadInput({
|
|
|
719
773
|
variant,
|
|
720
774
|
accept,
|
|
721
775
|
maxfilesize: maxFileSize,
|
|
722
|
-
|
|
776
|
+
testid: testId
|
|
723
777
|
}
|
|
724
778
|
);
|
|
725
779
|
}
|
|
@@ -728,13 +782,13 @@ function GoAAppFooter({
|
|
|
728
782
|
children,
|
|
729
783
|
testId
|
|
730
784
|
}) {
|
|
731
|
-
return /* @__PURE__ */ jsx("goa-app-footer", { maxcontentwidth: maxContentWidth,
|
|
785
|
+
return /* @__PURE__ */ jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, testid: testId, children });
|
|
732
786
|
}
|
|
733
787
|
function GoAAppFooterMetaSection({ testId, children }) {
|
|
734
788
|
return /* @__PURE__ */ jsx(
|
|
735
789
|
"goa-app-footer-meta-section",
|
|
736
790
|
{
|
|
737
|
-
|
|
791
|
+
testid: testId,
|
|
738
792
|
slot: "meta",
|
|
739
793
|
children
|
|
740
794
|
}
|
|
@@ -752,7 +806,7 @@ function GoAAppFooterNavSection({
|
|
|
752
806
|
slot: "nav",
|
|
753
807
|
heading,
|
|
754
808
|
maxcolumncount: maxColumnCount,
|
|
755
|
-
|
|
809
|
+
testid: testId,
|
|
756
810
|
children
|
|
757
811
|
}
|
|
758
812
|
);
|
|
@@ -785,7 +839,7 @@ function GoAFormItem({
|
|
|
785
839
|
mr,
|
|
786
840
|
mb,
|
|
787
841
|
ml,
|
|
788
|
-
|
|
842
|
+
testid: testId,
|
|
789
843
|
id,
|
|
790
844
|
children: [
|
|
791
845
|
error && typeof error !== "string" && /* @__PURE__ */ jsx("div", { slot: "error", children: error }),
|
|
@@ -827,7 +881,7 @@ function GoAFormStepper({
|
|
|
827
881
|
"goa-form-stepper",
|
|
828
882
|
{
|
|
829
883
|
ref,
|
|
830
|
-
|
|
884
|
+
testid: testId,
|
|
831
885
|
step,
|
|
832
886
|
mt,
|
|
833
887
|
mr,
|
|
@@ -856,7 +910,7 @@ function GoAGrid({
|
|
|
856
910
|
mr,
|
|
857
911
|
mb,
|
|
858
912
|
ml,
|
|
859
|
-
|
|
913
|
+
testid: testId,
|
|
860
914
|
children
|
|
861
915
|
}
|
|
862
916
|
);
|
|
@@ -880,7 +934,7 @@ function GoAHeroBanner({
|
|
|
880
934
|
maxcontentwidth: maxContentWidth,
|
|
881
935
|
backgroundcolor: backgroundColor,
|
|
882
936
|
textcolor: textColor,
|
|
883
|
-
|
|
937
|
+
testid: testId,
|
|
884
938
|
children
|
|
885
939
|
}
|
|
886
940
|
);
|
|
@@ -936,45 +990,11 @@ function GoAIconButton({
|
|
|
936
990
|
mr,
|
|
937
991
|
mb,
|
|
938
992
|
ml,
|
|
939
|
-
|
|
993
|
+
testid: testId,
|
|
940
994
|
children
|
|
941
995
|
}
|
|
942
996
|
);
|
|
943
997
|
}
|
|
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
998
|
function toDate(argument) {
|
|
979
999
|
const argStr = Object.prototype.toString.call(argument);
|
|
980
1000
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -2623,7 +2643,7 @@ function GoAInput({
|
|
|
2623
2643
|
const current = ref.current;
|
|
2624
2644
|
const changeListener = (e) => {
|
|
2625
2645
|
const { name: name2, value: value2 } = e.detail;
|
|
2626
|
-
onChange(name2, value2);
|
|
2646
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
2627
2647
|
};
|
|
2628
2648
|
const clickListener = () => {
|
|
2629
2649
|
onTrailingIconClick == null ? void 0 : onTrailingIconClick();
|
|
@@ -2670,7 +2690,7 @@ function GoAInput({
|
|
|
2670
2690
|
readonly,
|
|
2671
2691
|
placeholder,
|
|
2672
2692
|
error,
|
|
2673
|
-
|
|
2693
|
+
testid: testId,
|
|
2674
2694
|
value,
|
|
2675
2695
|
width,
|
|
2676
2696
|
min,
|
|
@@ -2694,6 +2714,7 @@ function GoAInput({
|
|
|
2694
2714
|
}
|
|
2695
2715
|
const onDateChangeHandler = (onChange) => {
|
|
2696
2716
|
return (name, value) => {
|
|
2717
|
+
if (!onChange) return;
|
|
2697
2718
|
if (!value) {
|
|
2698
2719
|
onChange(name, "");
|
|
2699
2720
|
return;
|
|
@@ -2705,6 +2726,7 @@ const onDateChangeHandler = (onChange) => {
|
|
|
2705
2726
|
};
|
|
2706
2727
|
const onTimeChangeHandler = (onChange) => {
|
|
2707
2728
|
return (name, value) => {
|
|
2729
|
+
if (!onChange) return;
|
|
2708
2730
|
if (!value) {
|
|
2709
2731
|
onChange(name, "");
|
|
2710
2732
|
return;
|
|
@@ -2799,7 +2821,10 @@ function GoAInputFile(props) {
|
|
|
2799
2821
|
id: props.id,
|
|
2800
2822
|
name: props.name,
|
|
2801
2823
|
type: "file",
|
|
2802
|
-
onChange: (e) =>
|
|
2824
|
+
onChange: (e) => {
|
|
2825
|
+
var _a;
|
|
2826
|
+
return (_a = props.onChange) == null ? void 0 : _a.call(props, e.target.name, e.target.value);
|
|
2827
|
+
},
|
|
2803
2828
|
style: { backgroundColor: "revert" }
|
|
2804
2829
|
}
|
|
2805
2830
|
);
|
|
@@ -2814,7 +2839,8 @@ function GoAInputNumber({
|
|
|
2814
2839
|
...props
|
|
2815
2840
|
}) {
|
|
2816
2841
|
const onNumberChange = (name, value2) => {
|
|
2817
|
-
|
|
2842
|
+
var _a;
|
|
2843
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, parseFloat(value2));
|
|
2818
2844
|
};
|
|
2819
2845
|
const onFocus = (name, value2) => {
|
|
2820
2846
|
var _a;
|
|
@@ -2846,6 +2872,35 @@ function GoAInputNumber({
|
|
|
2846
2872
|
function GoAInputRange(props) {
|
|
2847
2873
|
return /* @__PURE__ */ jsx(GoAInput, { ...props, type: "range" });
|
|
2848
2874
|
}
|
|
2875
|
+
function GoALink(props) {
|
|
2876
|
+
return /* @__PURE__ */ jsx(
|
|
2877
|
+
"goa-link",
|
|
2878
|
+
{
|
|
2879
|
+
leadingicon: props.leadingIcon,
|
|
2880
|
+
trailingicon: props.trailingIcon,
|
|
2881
|
+
mt: props.mt,
|
|
2882
|
+
mb: props.mb,
|
|
2883
|
+
ml: props.ml,
|
|
2884
|
+
mr: props.mr,
|
|
2885
|
+
children: props.children
|
|
2886
|
+
}
|
|
2887
|
+
);
|
|
2888
|
+
}
|
|
2889
|
+
function GoALinkButton({ type = "primary", ...props }) {
|
|
2890
|
+
return /* @__PURE__ */ jsx(
|
|
2891
|
+
"goa-link-button",
|
|
2892
|
+
{
|
|
2893
|
+
type,
|
|
2894
|
+
leadingicon: props.leadingIcon,
|
|
2895
|
+
trailingicon: props.trailingIcon,
|
|
2896
|
+
mt: props.mt,
|
|
2897
|
+
mb: props.mb,
|
|
2898
|
+
ml: props.ml,
|
|
2899
|
+
mr: props.mr,
|
|
2900
|
+
children: props.children
|
|
2901
|
+
}
|
|
2902
|
+
);
|
|
2903
|
+
}
|
|
2849
2904
|
function GoAMicrositeHeader({
|
|
2850
2905
|
type,
|
|
2851
2906
|
version,
|
|
@@ -2853,18 +2908,39 @@ function GoAMicrositeHeader({
|
|
|
2853
2908
|
maxContentWidth,
|
|
2854
2909
|
feedbackUrlTarget,
|
|
2855
2910
|
headerUrlTarget,
|
|
2856
|
-
testId
|
|
2911
|
+
testId,
|
|
2912
|
+
onFeedbackClick
|
|
2857
2913
|
}) {
|
|
2914
|
+
const el = useRef(null);
|
|
2915
|
+
useEffect(() => {
|
|
2916
|
+
if (!el.current) {
|
|
2917
|
+
return;
|
|
2918
|
+
}
|
|
2919
|
+
if (!onFeedbackClick) {
|
|
2920
|
+
return;
|
|
2921
|
+
}
|
|
2922
|
+
const current = el.current;
|
|
2923
|
+
const listener = () => {
|
|
2924
|
+
onFeedbackClick();
|
|
2925
|
+
};
|
|
2926
|
+
current.addEventListener("_feedbackClick", listener);
|
|
2927
|
+
return () => {
|
|
2928
|
+
current.removeEventListener("_feedbackClick", listener);
|
|
2929
|
+
};
|
|
2930
|
+
}, [el, onFeedbackClick]);
|
|
2858
2931
|
return /* @__PURE__ */ jsx(
|
|
2859
2932
|
"goa-microsite-header",
|
|
2860
2933
|
{
|
|
2934
|
+
ref: el,
|
|
2861
2935
|
type,
|
|
2862
|
-
version,
|
|
2936
|
+
version: typeof version === "string" ? version : void 0,
|
|
2863
2937
|
feedbackurl: feedbackUrl,
|
|
2864
|
-
|
|
2938
|
+
testid: testId,
|
|
2865
2939
|
maxcontentwidth: maxContentWidth,
|
|
2866
2940
|
feedbackurltarget: feedbackUrlTarget,
|
|
2867
|
-
headerurltarget: headerUrlTarget
|
|
2941
|
+
headerurltarget: headerUrlTarget,
|
|
2942
|
+
hasfeedbackhandler: !!onFeedbackClick,
|
|
2943
|
+
children: version && typeof version !== "string" && /* @__PURE__ */ jsx("div", { slot: "version", children: version })
|
|
2868
2944
|
}
|
|
2869
2945
|
);
|
|
2870
2946
|
}
|
|
@@ -2913,7 +2989,7 @@ function GoAModal({
|
|
|
2913
2989
|
maxwidth: maxWidth,
|
|
2914
2990
|
transition,
|
|
2915
2991
|
calloutvariant: calloutVariant,
|
|
2916
|
-
|
|
2992
|
+
testid: testId,
|
|
2917
2993
|
role,
|
|
2918
2994
|
children: [
|
|
2919
2995
|
heading && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
|
|
@@ -2950,7 +3026,7 @@ const GoANotification = ({
|
|
|
2950
3026
|
{
|
|
2951
3027
|
ref: el,
|
|
2952
3028
|
type,
|
|
2953
|
-
|
|
3029
|
+
testid: testId,
|
|
2954
3030
|
maxcontentwidth: maxContentWidth,
|
|
2955
3031
|
arialive: ariaLive,
|
|
2956
3032
|
children
|
|
@@ -2961,7 +3037,7 @@ function GoAOneColumnLayout(props) {
|
|
|
2961
3037
|
return /* @__PURE__ */ jsx("goa-one-column-layout", { children: props.children });
|
|
2962
3038
|
}
|
|
2963
3039
|
function GoAPageBlock(props) {
|
|
2964
|
-
return /* @__PURE__ */ jsx("goa-page-block", { width: props.width,
|
|
3040
|
+
return /* @__PURE__ */ jsx("goa-page-block", { width: props.width, testid: props.testId, children: props.children });
|
|
2965
3041
|
}
|
|
2966
3042
|
function GoAPages(props) {
|
|
2967
3043
|
return /* @__PURE__ */ jsx(
|
|
@@ -3004,7 +3080,7 @@ function GoAPagination({ onChange, ...props }) {
|
|
|
3004
3080
|
mb: props.mb,
|
|
3005
3081
|
ml: props.ml,
|
|
3006
3082
|
mr: props.mr,
|
|
3007
|
-
|
|
3083
|
+
testid: props.testId
|
|
3008
3084
|
}
|
|
3009
3085
|
);
|
|
3010
3086
|
}
|
|
@@ -3025,7 +3101,7 @@ function GoAPopover({
|
|
|
3025
3101
|
return /* @__PURE__ */ jsxs(
|
|
3026
3102
|
"goa-popover",
|
|
3027
3103
|
{
|
|
3028
|
-
|
|
3104
|
+
testid: testId,
|
|
3029
3105
|
maxwidth: maxWidth,
|
|
3030
3106
|
minwidth: minWidth,
|
|
3031
3107
|
padded,
|
|
@@ -3119,7 +3195,7 @@ function GoARadioGroup({
|
|
|
3119
3195
|
return /* @__PURE__ */ jsx(
|
|
3120
3196
|
"goa-radio-group",
|
|
3121
3197
|
{
|
|
3122
|
-
|
|
3198
|
+
testid: testId,
|
|
3123
3199
|
ref: el,
|
|
3124
3200
|
name,
|
|
3125
3201
|
value,
|
|
@@ -3140,7 +3216,7 @@ function GoASideMenuGroup(props) {
|
|
|
3140
3216
|
"goa-side-menu-group",
|
|
3141
3217
|
{
|
|
3142
3218
|
heading: props.heading,
|
|
3143
|
-
|
|
3219
|
+
testid: props.testId,
|
|
3144
3220
|
children: props.children
|
|
3145
3221
|
}
|
|
3146
3222
|
);
|
|
@@ -3150,7 +3226,7 @@ function GoASideMenuHeading(props) {
|
|
|
3150
3226
|
"goa-side-menu-heading",
|
|
3151
3227
|
{
|
|
3152
3228
|
icon: props.icon,
|
|
3153
|
-
|
|
3229
|
+
testid: props.testId,
|
|
3154
3230
|
children: [
|
|
3155
3231
|
props.children,
|
|
3156
3232
|
props.meta && /* @__PURE__ */ jsx("span", { slot: "meta", children: props.meta })
|
|
@@ -3159,7 +3235,7 @@ function GoASideMenuHeading(props) {
|
|
|
3159
3235
|
);
|
|
3160
3236
|
}
|
|
3161
3237
|
function GoASideMenu(props) {
|
|
3162
|
-
return /* @__PURE__ */ jsx("goa-side-menu", {
|
|
3238
|
+
return /* @__PURE__ */ jsx("goa-side-menu", { testid: props.testId, children: props.children });
|
|
3163
3239
|
}
|
|
3164
3240
|
const GoASkeleton = ({
|
|
3165
3241
|
maxWidth,
|
|
@@ -3183,7 +3259,7 @@ const GoASkeleton = ({
|
|
|
3183
3259
|
mr,
|
|
3184
3260
|
mb,
|
|
3185
3261
|
ml,
|
|
3186
|
-
|
|
3262
|
+
testid: testId
|
|
3187
3263
|
}
|
|
3188
3264
|
);
|
|
3189
3265
|
};
|
|
@@ -3193,7 +3269,7 @@ function GoASpacer(props) {
|
|
|
3193
3269
|
{
|
|
3194
3270
|
hspacing: props.hSpacing,
|
|
3195
3271
|
vspacing: props.vSpacing,
|
|
3196
|
-
|
|
3272
|
+
testid: props.testId
|
|
3197
3273
|
}
|
|
3198
3274
|
);
|
|
3199
3275
|
}
|
|
@@ -3211,7 +3287,7 @@ function GoASpinner({
|
|
|
3211
3287
|
size,
|
|
3212
3288
|
progress,
|
|
3213
3289
|
invert,
|
|
3214
|
-
|
|
3290
|
+
testid: testId
|
|
3215
3291
|
}
|
|
3216
3292
|
);
|
|
3217
3293
|
}
|
|
@@ -3238,7 +3314,7 @@ function GoATable({ onSort, ...props }) {
|
|
|
3238
3314
|
width: props.width,
|
|
3239
3315
|
stickyheader: false,
|
|
3240
3316
|
variant: props.variant,
|
|
3241
|
-
|
|
3317
|
+
testid: props.testId,
|
|
3242
3318
|
mt: props.mt,
|
|
3243
3319
|
mb: props.mb,
|
|
3244
3320
|
ml: props.ml,
|
|
@@ -3274,7 +3350,7 @@ function GoATabs({
|
|
|
3274
3350
|
};
|
|
3275
3351
|
}
|
|
3276
3352
|
}, [onChange]);
|
|
3277
|
-
return /* @__PURE__ */ jsx("goa-tabs", { ref, initialtab: initialTab,
|
|
3353
|
+
return /* @__PURE__ */ jsx("goa-tabs", { ref, initialtab: initialTab, testid: testId, children });
|
|
3278
3354
|
}
|
|
3279
3355
|
function GoATab({ heading, children }) {
|
|
3280
3356
|
return /* @__PURE__ */ jsxs("goa-tab", { children: [
|
|
@@ -3282,6 +3358,21 @@ function GoATab({ heading, children }) {
|
|
|
3282
3358
|
children
|
|
3283
3359
|
] });
|
|
3284
3360
|
}
|
|
3361
|
+
function GoAText(props) {
|
|
3362
|
+
return /* @__PURE__ */ jsx(
|
|
3363
|
+
"goa-text",
|
|
3364
|
+
{
|
|
3365
|
+
as: props.as || "div",
|
|
3366
|
+
size: props.size,
|
|
3367
|
+
maxwidth: props.maxWidth || "65ch",
|
|
3368
|
+
mt: props.mt,
|
|
3369
|
+
mb: props.mb,
|
|
3370
|
+
ml: props.ml,
|
|
3371
|
+
mr: props.mr,
|
|
3372
|
+
children: props.children
|
|
3373
|
+
}
|
|
3374
|
+
);
|
|
3375
|
+
}
|
|
3285
3376
|
function GoATextarea({
|
|
3286
3377
|
name,
|
|
3287
3378
|
value,
|
|
@@ -3310,7 +3401,7 @@ function GoATextarea({
|
|
|
3310
3401
|
const current = el.current;
|
|
3311
3402
|
const listener = (e) => {
|
|
3312
3403
|
const { name: name2, value: value2 } = e.detail;
|
|
3313
|
-
onChange(name2, value2);
|
|
3404
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
3314
3405
|
};
|
|
3315
3406
|
current.addEventListener("_change", listener);
|
|
3316
3407
|
return () => {
|
|
@@ -3345,7 +3436,7 @@ function GoATextarea({
|
|
|
3345
3436
|
width,
|
|
3346
3437
|
maxwidth: maxWidth,
|
|
3347
3438
|
error,
|
|
3348
|
-
|
|
3439
|
+
testid: testId,
|
|
3349
3440
|
arialabel: ariaLabel,
|
|
3350
3441
|
mt,
|
|
3351
3442
|
mr,
|
|
@@ -3379,7 +3470,7 @@ function GoATooltip(props) {
|
|
|
3379
3470
|
position: props.position,
|
|
3380
3471
|
content: props.content,
|
|
3381
3472
|
halign: props.hAlign,
|
|
3382
|
-
|
|
3473
|
+
testid: props.testId,
|
|
3383
3474
|
mt: props.mt,
|
|
3384
3475
|
mr: props.mr,
|
|
3385
3476
|
mb: props.mb,
|
|
@@ -3427,6 +3518,7 @@ export {
|
|
|
3427
3518
|
GoADropdownItem,
|
|
3428
3519
|
GoADropdownOption,
|
|
3429
3520
|
GoAEmergencyBadge,
|
|
3521
|
+
GoAFieldset,
|
|
3430
3522
|
GoAFileUploadCard,
|
|
3431
3523
|
GoAFileUploadInput,
|
|
3432
3524
|
GoAFormItem,
|
|
@@ -3435,7 +3527,7 @@ export {
|
|
|
3435
3527
|
GoAGrid,
|
|
3436
3528
|
GoAHeroBanner,
|
|
3437
3529
|
GoAHeroBannerActions,
|
|
3438
|
-
GoAIcon,
|
|
3530
|
+
G as GoAIcon,
|
|
3439
3531
|
GoAIconButton,
|
|
3440
3532
|
GoAImportantBadge,
|
|
3441
3533
|
GoAInfoBadge,
|
|
@@ -3453,6 +3545,8 @@ export {
|
|
|
3453
3545
|
GoAInputText,
|
|
3454
3546
|
GoAInputTime,
|
|
3455
3547
|
GoAInputUrl,
|
|
3548
|
+
GoALink,
|
|
3549
|
+
GoALinkButton,
|
|
3456
3550
|
GoAMicrositeHeader,
|
|
3457
3551
|
GoAModal,
|
|
3458
3552
|
GoANotification,
|
|
@@ -3474,6 +3568,7 @@ export {
|
|
|
3474
3568
|
GoATable,
|
|
3475
3569
|
GoATableSortHeader,
|
|
3476
3570
|
GoATabs,
|
|
3571
|
+
GoAText,
|
|
3477
3572
|
GoATextarea as GoATextArea,
|
|
3478
3573
|
GoATextarea,
|
|
3479
3574
|
GoAThreeColumnLayout,
|