@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.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
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,
|
|
@@ -24,7 +25,7 @@ function GoAAccordion({
|
|
|
24
25
|
heading,
|
|
25
26
|
secondaryText,
|
|
26
27
|
maxwidth: maxWidth,
|
|
27
|
-
|
|
28
|
+
testid,
|
|
28
29
|
mt,
|
|
29
30
|
mr,
|
|
30
31
|
mb,
|
|
@@ -51,7 +52,7 @@ function GoAAppHeader({
|
|
|
51
52
|
url,
|
|
52
53
|
fullmenubreakpoint: fullMenuBreakpoint,
|
|
53
54
|
maxcontentwidth: maxContentWidth,
|
|
54
|
-
|
|
55
|
+
testid: testId,
|
|
55
56
|
children
|
|
56
57
|
}
|
|
57
58
|
);
|
|
@@ -62,7 +63,7 @@ function GoAAppHeaderMenu(props) {
|
|
|
62
63
|
{
|
|
63
64
|
heading: props.heading,
|
|
64
65
|
leadingicon: props.leadingIcon,
|
|
65
|
-
|
|
66
|
+
testid: props.testId,
|
|
66
67
|
children: props.children
|
|
67
68
|
}
|
|
68
69
|
);
|
|
@@ -70,7 +71,7 @@ function GoAAppHeaderMenu(props) {
|
|
|
70
71
|
function GoABadge({
|
|
71
72
|
type,
|
|
72
73
|
content,
|
|
73
|
-
icon,
|
|
74
|
+
icon: icon2,
|
|
74
75
|
testId,
|
|
75
76
|
mt,
|
|
76
77
|
mr,
|
|
@@ -83,8 +84,8 @@ function GoABadge({
|
|
|
83
84
|
{
|
|
84
85
|
type,
|
|
85
86
|
content,
|
|
86
|
-
icon,
|
|
87
|
-
|
|
87
|
+
icon: icon2,
|
|
88
|
+
testid: testId,
|
|
88
89
|
arialabel: ariaLabel,
|
|
89
90
|
mt,
|
|
90
91
|
mr,
|
|
@@ -96,7 +97,7 @@ function GoABadge({
|
|
|
96
97
|
function GoAInfoBadge({
|
|
97
98
|
content,
|
|
98
99
|
testId,
|
|
99
|
-
icon,
|
|
100
|
+
icon: icon2,
|
|
100
101
|
mt,
|
|
101
102
|
mr,
|
|
102
103
|
mb,
|
|
@@ -107,7 +108,7 @@ function GoAInfoBadge({
|
|
|
107
108
|
GoABadge,
|
|
108
109
|
{
|
|
109
110
|
type: "information",
|
|
110
|
-
icon,
|
|
111
|
+
icon: icon2,
|
|
111
112
|
content,
|
|
112
113
|
testId,
|
|
113
114
|
ariaLabel,
|
|
@@ -121,7 +122,7 @@ function GoAInfoBadge({
|
|
|
121
122
|
function GoASuccessBadge({
|
|
122
123
|
content,
|
|
123
124
|
testId,
|
|
124
|
-
icon,
|
|
125
|
+
icon: icon2,
|
|
125
126
|
mt,
|
|
126
127
|
mr,
|
|
127
128
|
mb,
|
|
@@ -132,7 +133,7 @@ function GoASuccessBadge({
|
|
|
132
133
|
GoABadge,
|
|
133
134
|
{
|
|
134
135
|
type: "success",
|
|
135
|
-
icon,
|
|
136
|
+
icon: icon2,
|
|
136
137
|
content,
|
|
137
138
|
ariaLabel,
|
|
138
139
|
testId,
|
|
@@ -146,7 +147,7 @@ function GoASuccessBadge({
|
|
|
146
147
|
function GoAImportantBadge({
|
|
147
148
|
content,
|
|
148
149
|
testId,
|
|
149
|
-
icon,
|
|
150
|
+
icon: icon2,
|
|
150
151
|
mt,
|
|
151
152
|
mr,
|
|
152
153
|
mb,
|
|
@@ -157,7 +158,7 @@ function GoAImportantBadge({
|
|
|
157
158
|
GoABadge,
|
|
158
159
|
{
|
|
159
160
|
type: "important",
|
|
160
|
-
icon,
|
|
161
|
+
icon: icon2,
|
|
161
162
|
content,
|
|
162
163
|
testId,
|
|
163
164
|
ariaLabel,
|
|
@@ -171,7 +172,7 @@ function GoAImportantBadge({
|
|
|
171
172
|
function GoAEmergencyBadge({
|
|
172
173
|
content,
|
|
173
174
|
testId,
|
|
174
|
-
icon,
|
|
175
|
+
icon: icon2,
|
|
175
176
|
mt,
|
|
176
177
|
mr,
|
|
177
178
|
mb,
|
|
@@ -182,7 +183,7 @@ function GoAEmergencyBadge({
|
|
|
182
183
|
GoABadge,
|
|
183
184
|
{
|
|
184
185
|
type: "emergency",
|
|
185
|
-
icon,
|
|
186
|
+
icon: icon2,
|
|
186
187
|
content,
|
|
187
188
|
testId,
|
|
188
189
|
ariaLabel,
|
|
@@ -204,7 +205,7 @@ function GoABlock(props) {
|
|
|
204
205
|
mr: props.mr,
|
|
205
206
|
mb: props.mb,
|
|
206
207
|
ml: props.ml,
|
|
207
|
-
|
|
208
|
+
testid: props.testId,
|
|
208
209
|
children: props.children
|
|
209
210
|
}
|
|
210
211
|
);
|
|
@@ -251,7 +252,7 @@ function GoAButton({
|
|
|
251
252
|
disabled,
|
|
252
253
|
leadingicon: leadingIcon,
|
|
253
254
|
trailingicon: trailingIcon,
|
|
254
|
-
|
|
255
|
+
testid: testId,
|
|
255
256
|
mt,
|
|
256
257
|
mr,
|
|
257
258
|
mb,
|
|
@@ -279,7 +280,7 @@ function GoAButtonGroup({
|
|
|
279
280
|
mr,
|
|
280
281
|
mb,
|
|
281
282
|
ml,
|
|
282
|
-
|
|
283
|
+
testid: testId,
|
|
283
284
|
children
|
|
284
285
|
}
|
|
285
286
|
);
|
|
@@ -314,7 +315,7 @@ function GoACalendar({
|
|
|
314
315
|
value: value == null ? void 0 : value.toISOString(),
|
|
315
316
|
min: min == null ? void 0 : min.toISOString(),
|
|
316
317
|
max: max == null ? void 0 : max.toISOString(),
|
|
317
|
-
|
|
318
|
+
testid: testId,
|
|
318
319
|
mt,
|
|
319
320
|
mr,
|
|
320
321
|
mb,
|
|
@@ -347,7 +348,7 @@ const GoACallout = ({
|
|
|
347
348
|
mr,
|
|
348
349
|
mb,
|
|
349
350
|
ml,
|
|
350
|
-
|
|
351
|
+
testid: testId,
|
|
351
352
|
children
|
|
352
353
|
}
|
|
353
354
|
);
|
|
@@ -389,12 +390,12 @@ function GoACheckbox({
|
|
|
389
390
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
390
391
|
"goa-checkbox",
|
|
391
392
|
{
|
|
392
|
-
|
|
393
|
+
testid: testId,
|
|
393
394
|
ref: el,
|
|
394
395
|
id,
|
|
395
396
|
name,
|
|
396
397
|
error,
|
|
397
|
-
checked,
|
|
398
|
+
checked: checked || false,
|
|
398
399
|
disabled,
|
|
399
400
|
text,
|
|
400
401
|
value,
|
|
@@ -453,7 +454,7 @@ const GoAChip = ({
|
|
|
453
454
|
mr,
|
|
454
455
|
mb,
|
|
455
456
|
ml,
|
|
456
|
-
|
|
457
|
+
testid: testId
|
|
457
458
|
}
|
|
458
459
|
);
|
|
459
460
|
};
|
|
@@ -473,7 +474,7 @@ const GoACircularProgress = ({
|
|
|
473
474
|
progress,
|
|
474
475
|
variant,
|
|
475
476
|
size,
|
|
476
|
-
|
|
477
|
+
testid: testId
|
|
477
478
|
}
|
|
478
479
|
);
|
|
479
480
|
};
|
|
@@ -506,7 +507,7 @@ function GoAContainer({
|
|
|
506
507
|
mr,
|
|
507
508
|
mb,
|
|
508
509
|
ml,
|
|
509
|
-
|
|
510
|
+
testid: testId,
|
|
510
511
|
children: [
|
|
511
512
|
headingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "title", children: headingContent }),
|
|
512
513
|
children,
|
|
@@ -522,10 +523,12 @@ function GoADatePicker({
|
|
|
522
523
|
min,
|
|
523
524
|
max,
|
|
524
525
|
testId,
|
|
526
|
+
disabled,
|
|
525
527
|
mt,
|
|
526
528
|
mr,
|
|
527
529
|
mb,
|
|
528
530
|
ml,
|
|
531
|
+
relative,
|
|
529
532
|
onChange
|
|
530
533
|
}) {
|
|
531
534
|
const ref = react.useRef(null);
|
|
@@ -535,7 +538,8 @@ function GoADatePicker({
|
|
|
535
538
|
}
|
|
536
539
|
const current = ref.current;
|
|
537
540
|
const handleChange = (e) => {
|
|
538
|
-
|
|
541
|
+
const newValue = e.detail.value;
|
|
542
|
+
onChange == null ? void 0 : onChange(name || "", newValue ? new Date(newValue) : void 0);
|
|
539
543
|
};
|
|
540
544
|
current.addEventListener("_change", handleChange);
|
|
541
545
|
return () => {
|
|
@@ -547,15 +551,17 @@ function GoADatePicker({
|
|
|
547
551
|
{
|
|
548
552
|
ref,
|
|
549
553
|
name,
|
|
550
|
-
value: value == null ? void 0 : value.toISOString(),
|
|
554
|
+
value: (value == null ? void 0 : value.toISOString()) || "",
|
|
551
555
|
error,
|
|
556
|
+
disabled,
|
|
552
557
|
min: min == null ? void 0 : min.toISOString(),
|
|
553
558
|
max: max == null ? void 0 : max.toISOString(),
|
|
554
|
-
|
|
559
|
+
testid: testId,
|
|
555
560
|
mt,
|
|
556
561
|
mr,
|
|
557
562
|
mb,
|
|
558
|
-
ml
|
|
563
|
+
ml,
|
|
564
|
+
relative
|
|
559
565
|
}
|
|
560
566
|
);
|
|
561
567
|
}
|
|
@@ -566,7 +572,7 @@ function GoADetails(props) {
|
|
|
566
572
|
heading: props.heading,
|
|
567
573
|
open: props.open,
|
|
568
574
|
maxwidth: props.maxWidth,
|
|
569
|
-
|
|
575
|
+
testid: props.testId,
|
|
570
576
|
mt: props.mt,
|
|
571
577
|
mr: props.mr,
|
|
572
578
|
mb: props.mb,
|
|
@@ -583,7 +589,7 @@ function GoADivider(props) {
|
|
|
583
589
|
mr: props.mr,
|
|
584
590
|
mb: props.mb,
|
|
585
591
|
ml: props.ml,
|
|
586
|
-
|
|
592
|
+
testid: props.testId
|
|
587
593
|
}
|
|
588
594
|
);
|
|
589
595
|
}
|
|
@@ -604,8 +610,9 @@ function GoADropdown(props) {
|
|
|
604
610
|
}
|
|
605
611
|
const current = el.current;
|
|
606
612
|
const handler = (e) => {
|
|
613
|
+
var _a;
|
|
607
614
|
const { name, value, values } = e.detail;
|
|
608
|
-
props.onChange(name, props.multiselect ? values : value);
|
|
615
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, props.multiselect ? values : value);
|
|
609
616
|
};
|
|
610
617
|
current.addEventListener("_change", handler);
|
|
611
618
|
return () => {
|
|
@@ -632,7 +639,7 @@ function GoADropdown(props) {
|
|
|
632
639
|
multiselect: props.multiselect,
|
|
633
640
|
native: props.native,
|
|
634
641
|
placeholder: props.placeholder,
|
|
635
|
-
|
|
642
|
+
testid: props.testId,
|
|
636
643
|
width: props.width,
|
|
637
644
|
relative: props.relative,
|
|
638
645
|
id: props.id,
|
|
@@ -659,6 +666,53 @@ function GoADropdownItem({ value, label, filter, name, testId, mountType = "appe
|
|
|
659
666
|
}
|
|
660
667
|
);
|
|
661
668
|
}
|
|
669
|
+
function GoAFieldset({
|
|
670
|
+
heading,
|
|
671
|
+
buttonText,
|
|
672
|
+
id,
|
|
673
|
+
onContinue,
|
|
674
|
+
children,
|
|
675
|
+
mt,
|
|
676
|
+
mr,
|
|
677
|
+
mb,
|
|
678
|
+
ml,
|
|
679
|
+
first,
|
|
680
|
+
last
|
|
681
|
+
}) {
|
|
682
|
+
const ref = react.useRef(null);
|
|
683
|
+
react.useEffect(() => {
|
|
684
|
+
var _a;
|
|
685
|
+
const _continue = (e) => {
|
|
686
|
+
const { el, state } = e.detail;
|
|
687
|
+
return onContinue == null ? void 0 : onContinue(el, state);
|
|
688
|
+
};
|
|
689
|
+
if (onContinue) {
|
|
690
|
+
(_a = ref.current) == null ? void 0 : _a.addEventListener("_continue", _continue);
|
|
691
|
+
}
|
|
692
|
+
return () => {
|
|
693
|
+
var _a2;
|
|
694
|
+
if (onContinue) {
|
|
695
|
+
(_a2 = ref.current) == null ? void 0 : _a2.removeEventListener("_continue", _continue);
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
}, [ref.current, onContinue]);
|
|
699
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
700
|
+
"goa-fieldset",
|
|
701
|
+
{
|
|
702
|
+
ref,
|
|
703
|
+
id,
|
|
704
|
+
first,
|
|
705
|
+
last,
|
|
706
|
+
heading,
|
|
707
|
+
buttontext: buttonText,
|
|
708
|
+
mt,
|
|
709
|
+
mr,
|
|
710
|
+
mb,
|
|
711
|
+
ml,
|
|
712
|
+
children
|
|
713
|
+
}
|
|
714
|
+
);
|
|
715
|
+
}
|
|
662
716
|
function GoAFileUploadCard({
|
|
663
717
|
filename,
|
|
664
718
|
size,
|
|
@@ -691,7 +745,7 @@ function GoAFileUploadCard({
|
|
|
691
745
|
type,
|
|
692
746
|
progress,
|
|
693
747
|
error,
|
|
694
|
-
|
|
748
|
+
testid: testId
|
|
695
749
|
}
|
|
696
750
|
);
|
|
697
751
|
}
|
|
@@ -721,7 +775,7 @@ function GoAFileUploadInput({
|
|
|
721
775
|
variant,
|
|
722
776
|
accept,
|
|
723
777
|
maxfilesize: maxFileSize,
|
|
724
|
-
|
|
778
|
+
testid: testId
|
|
725
779
|
}
|
|
726
780
|
);
|
|
727
781
|
}
|
|
@@ -730,13 +784,13 @@ function GoAAppFooter({
|
|
|
730
784
|
children,
|
|
731
785
|
testId
|
|
732
786
|
}) {
|
|
733
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { maxcontentwidth: maxContentWidth,
|
|
787
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, testid: testId, children });
|
|
734
788
|
}
|
|
735
789
|
function GoAAppFooterMetaSection({ testId, children }) {
|
|
736
790
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
737
791
|
"goa-app-footer-meta-section",
|
|
738
792
|
{
|
|
739
|
-
|
|
793
|
+
testid: testId,
|
|
740
794
|
slot: "meta",
|
|
741
795
|
children
|
|
742
796
|
}
|
|
@@ -754,7 +808,7 @@ function GoAAppFooterNavSection({
|
|
|
754
808
|
slot: "nav",
|
|
755
809
|
heading,
|
|
756
810
|
maxcolumncount: maxColumnCount,
|
|
757
|
-
|
|
811
|
+
testid: testId,
|
|
758
812
|
children
|
|
759
813
|
}
|
|
760
814
|
);
|
|
@@ -787,7 +841,7 @@ function GoAFormItem({
|
|
|
787
841
|
mr,
|
|
788
842
|
mb,
|
|
789
843
|
ml,
|
|
790
|
-
|
|
844
|
+
testid: testId,
|
|
791
845
|
id,
|
|
792
846
|
children: [
|
|
793
847
|
error && typeof error !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "error", children: error }),
|
|
@@ -829,7 +883,7 @@ function GoAFormStepper({
|
|
|
829
883
|
"goa-form-stepper",
|
|
830
884
|
{
|
|
831
885
|
ref,
|
|
832
|
-
|
|
886
|
+
testid: testId,
|
|
833
887
|
step,
|
|
834
888
|
mt,
|
|
835
889
|
mr,
|
|
@@ -858,7 +912,7 @@ function GoAGrid({
|
|
|
858
912
|
mr,
|
|
859
913
|
mb,
|
|
860
914
|
ml,
|
|
861
|
-
|
|
915
|
+
testid: testId,
|
|
862
916
|
children
|
|
863
917
|
}
|
|
864
918
|
);
|
|
@@ -882,7 +936,7 @@ function GoAHeroBanner({
|
|
|
882
936
|
maxcontentwidth: maxContentWidth,
|
|
883
937
|
backgroundcolor: backgroundColor,
|
|
884
938
|
textcolor: textColor,
|
|
885
|
-
|
|
939
|
+
testid: testId,
|
|
886
940
|
children
|
|
887
941
|
}
|
|
888
942
|
);
|
|
@@ -893,7 +947,7 @@ function GoAHeroBannerActions({
|
|
|
893
947
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children });
|
|
894
948
|
}
|
|
895
949
|
function GoAIconButton({
|
|
896
|
-
icon,
|
|
950
|
+
icon: icon2,
|
|
897
951
|
disabled,
|
|
898
952
|
variant = "color",
|
|
899
953
|
onClick,
|
|
@@ -928,7 +982,7 @@ function GoAIconButton({
|
|
|
928
982
|
"goa-icon-button",
|
|
929
983
|
{
|
|
930
984
|
ref,
|
|
931
|
-
icon,
|
|
985
|
+
icon: icon2,
|
|
932
986
|
disabled,
|
|
933
987
|
variant,
|
|
934
988
|
size,
|
|
@@ -938,45 +992,11 @@ function GoAIconButton({
|
|
|
938
992
|
mr,
|
|
939
993
|
mb,
|
|
940
994
|
ml,
|
|
941
|
-
|
|
995
|
+
testid: testId,
|
|
942
996
|
children
|
|
943
997
|
}
|
|
944
998
|
);
|
|
945
999
|
}
|
|
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
1000
|
function toDate(argument) {
|
|
981
1001
|
const argStr = Object.prototype.toString.call(argument);
|
|
982
1002
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -2625,7 +2645,7 @@ function GoAInput({
|
|
|
2625
2645
|
const current = ref.current;
|
|
2626
2646
|
const changeListener = (e) => {
|
|
2627
2647
|
const { name: name2, value: value2 } = e.detail;
|
|
2628
|
-
onChange(name2, value2);
|
|
2648
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
2629
2649
|
};
|
|
2630
2650
|
const clickListener = () => {
|
|
2631
2651
|
onTrailingIconClick == null ? void 0 : onTrailingIconClick();
|
|
@@ -2672,7 +2692,7 @@ function GoAInput({
|
|
|
2672
2692
|
readonly,
|
|
2673
2693
|
placeholder,
|
|
2674
2694
|
error,
|
|
2675
|
-
|
|
2695
|
+
testid: testId,
|
|
2676
2696
|
value,
|
|
2677
2697
|
width,
|
|
2678
2698
|
min,
|
|
@@ -2696,6 +2716,7 @@ function GoAInput({
|
|
|
2696
2716
|
}
|
|
2697
2717
|
const onDateChangeHandler = (onChange) => {
|
|
2698
2718
|
return (name, value) => {
|
|
2719
|
+
if (!onChange) return;
|
|
2699
2720
|
if (!value) {
|
|
2700
2721
|
onChange(name, "");
|
|
2701
2722
|
return;
|
|
@@ -2707,6 +2728,7 @@ const onDateChangeHandler = (onChange) => {
|
|
|
2707
2728
|
};
|
|
2708
2729
|
const onTimeChangeHandler = (onChange) => {
|
|
2709
2730
|
return (name, value) => {
|
|
2731
|
+
if (!onChange) return;
|
|
2710
2732
|
if (!value) {
|
|
2711
2733
|
onChange(name, "");
|
|
2712
2734
|
return;
|
|
@@ -2801,7 +2823,10 @@ function GoAInputFile(props) {
|
|
|
2801
2823
|
id: props.id,
|
|
2802
2824
|
name: props.name,
|
|
2803
2825
|
type: "file",
|
|
2804
|
-
onChange: (e) =>
|
|
2826
|
+
onChange: (e) => {
|
|
2827
|
+
var _a;
|
|
2828
|
+
return (_a = props.onChange) == null ? void 0 : _a.call(props, e.target.name, e.target.value);
|
|
2829
|
+
},
|
|
2805
2830
|
style: { backgroundColor: "revert" }
|
|
2806
2831
|
}
|
|
2807
2832
|
);
|
|
@@ -2816,7 +2841,8 @@ function GoAInputNumber({
|
|
|
2816
2841
|
...props
|
|
2817
2842
|
}) {
|
|
2818
2843
|
const onNumberChange = (name, value2) => {
|
|
2819
|
-
|
|
2844
|
+
var _a;
|
|
2845
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, name, parseFloat(value2));
|
|
2820
2846
|
};
|
|
2821
2847
|
const onFocus = (name, value2) => {
|
|
2822
2848
|
var _a;
|
|
@@ -2848,6 +2874,35 @@ function GoAInputNumber({
|
|
|
2848
2874
|
function GoAInputRange(props) {
|
|
2849
2875
|
return /* @__PURE__ */ jsxRuntime.jsx(GoAInput, { ...props, type: "range" });
|
|
2850
2876
|
}
|
|
2877
|
+
function GoALink(props) {
|
|
2878
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2879
|
+
"goa-link",
|
|
2880
|
+
{
|
|
2881
|
+
leadingicon: props.leadingIcon,
|
|
2882
|
+
trailingicon: props.trailingIcon,
|
|
2883
|
+
mt: props.mt,
|
|
2884
|
+
mb: props.mb,
|
|
2885
|
+
ml: props.ml,
|
|
2886
|
+
mr: props.mr,
|
|
2887
|
+
children: props.children
|
|
2888
|
+
}
|
|
2889
|
+
);
|
|
2890
|
+
}
|
|
2891
|
+
function GoALinkButton({ type = "primary", ...props }) {
|
|
2892
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2893
|
+
"goa-link-button",
|
|
2894
|
+
{
|
|
2895
|
+
type,
|
|
2896
|
+
leadingicon: props.leadingIcon,
|
|
2897
|
+
trailingicon: props.trailingIcon,
|
|
2898
|
+
mt: props.mt,
|
|
2899
|
+
mb: props.mb,
|
|
2900
|
+
ml: props.ml,
|
|
2901
|
+
mr: props.mr,
|
|
2902
|
+
children: props.children
|
|
2903
|
+
}
|
|
2904
|
+
);
|
|
2905
|
+
}
|
|
2851
2906
|
function GoAMicrositeHeader({
|
|
2852
2907
|
type,
|
|
2853
2908
|
version,
|
|
@@ -2855,18 +2910,39 @@ function GoAMicrositeHeader({
|
|
|
2855
2910
|
maxContentWidth,
|
|
2856
2911
|
feedbackUrlTarget,
|
|
2857
2912
|
headerUrlTarget,
|
|
2858
|
-
testId
|
|
2913
|
+
testId,
|
|
2914
|
+
onFeedbackClick
|
|
2859
2915
|
}) {
|
|
2916
|
+
const el = react.useRef(null);
|
|
2917
|
+
react.useEffect(() => {
|
|
2918
|
+
if (!el.current) {
|
|
2919
|
+
return;
|
|
2920
|
+
}
|
|
2921
|
+
if (!onFeedbackClick) {
|
|
2922
|
+
return;
|
|
2923
|
+
}
|
|
2924
|
+
const current = el.current;
|
|
2925
|
+
const listener = () => {
|
|
2926
|
+
onFeedbackClick();
|
|
2927
|
+
};
|
|
2928
|
+
current.addEventListener("_feedbackClick", listener);
|
|
2929
|
+
return () => {
|
|
2930
|
+
current.removeEventListener("_feedbackClick", listener);
|
|
2931
|
+
};
|
|
2932
|
+
}, [el, onFeedbackClick]);
|
|
2860
2933
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2861
2934
|
"goa-microsite-header",
|
|
2862
2935
|
{
|
|
2936
|
+
ref: el,
|
|
2863
2937
|
type,
|
|
2864
|
-
version,
|
|
2938
|
+
version: typeof version === "string" ? version : void 0,
|
|
2865
2939
|
feedbackurl: feedbackUrl,
|
|
2866
|
-
|
|
2940
|
+
testid: testId,
|
|
2867
2941
|
maxcontentwidth: maxContentWidth,
|
|
2868
2942
|
feedbackurltarget: feedbackUrlTarget,
|
|
2869
|
-
headerurltarget: headerUrlTarget
|
|
2943
|
+
headerurltarget: headerUrlTarget,
|
|
2944
|
+
hasfeedbackhandler: !!onFeedbackClick,
|
|
2945
|
+
children: version && typeof version !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "version", children: version })
|
|
2870
2946
|
}
|
|
2871
2947
|
);
|
|
2872
2948
|
}
|
|
@@ -2915,7 +2991,7 @@ function GoAModal({
|
|
|
2915
2991
|
maxwidth: maxWidth,
|
|
2916
2992
|
transition,
|
|
2917
2993
|
calloutvariant: calloutVariant,
|
|
2918
|
-
|
|
2994
|
+
testid: testId,
|
|
2919
2995
|
role,
|
|
2920
2996
|
children: [
|
|
2921
2997
|
heading && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
@@ -2952,7 +3028,7 @@ const GoANotification = ({
|
|
|
2952
3028
|
{
|
|
2953
3029
|
ref: el,
|
|
2954
3030
|
type,
|
|
2955
|
-
|
|
3031
|
+
testid: testId,
|
|
2956
3032
|
maxcontentwidth: maxContentWidth,
|
|
2957
3033
|
arialive: ariaLive,
|
|
2958
3034
|
children
|
|
@@ -2963,7 +3039,7 @@ function GoAOneColumnLayout(props) {
|
|
|
2963
3039
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-one-column-layout", { children: props.children });
|
|
2964
3040
|
}
|
|
2965
3041
|
function GoAPageBlock(props) {
|
|
2966
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width,
|
|
3042
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width, testid: props.testId, children: props.children });
|
|
2967
3043
|
}
|
|
2968
3044
|
function GoAPages(props) {
|
|
2969
3045
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3006,7 +3082,7 @@ function GoAPagination({ onChange, ...props }) {
|
|
|
3006
3082
|
mb: props.mb,
|
|
3007
3083
|
ml: props.ml,
|
|
3008
3084
|
mr: props.mr,
|
|
3009
|
-
|
|
3085
|
+
testid: props.testId
|
|
3010
3086
|
}
|
|
3011
3087
|
);
|
|
3012
3088
|
}
|
|
@@ -3027,7 +3103,7 @@ function GoAPopover({
|
|
|
3027
3103
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3028
3104
|
"goa-popover",
|
|
3029
3105
|
{
|
|
3030
|
-
|
|
3106
|
+
testid: testId,
|
|
3031
3107
|
maxwidth: maxWidth,
|
|
3032
3108
|
minwidth: minWidth,
|
|
3033
3109
|
padded,
|
|
@@ -3121,7 +3197,7 @@ function GoARadioGroup({
|
|
|
3121
3197
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3122
3198
|
"goa-radio-group",
|
|
3123
3199
|
{
|
|
3124
|
-
|
|
3200
|
+
testid: testId,
|
|
3125
3201
|
ref: el,
|
|
3126
3202
|
name,
|
|
3127
3203
|
value,
|
|
@@ -3142,7 +3218,7 @@ function GoASideMenuGroup(props) {
|
|
|
3142
3218
|
"goa-side-menu-group",
|
|
3143
3219
|
{
|
|
3144
3220
|
heading: props.heading,
|
|
3145
|
-
|
|
3221
|
+
testid: props.testId,
|
|
3146
3222
|
children: props.children
|
|
3147
3223
|
}
|
|
3148
3224
|
);
|
|
@@ -3152,7 +3228,7 @@ function GoASideMenuHeading(props) {
|
|
|
3152
3228
|
"goa-side-menu-heading",
|
|
3153
3229
|
{
|
|
3154
3230
|
icon: props.icon,
|
|
3155
|
-
|
|
3231
|
+
testid: props.testId,
|
|
3156
3232
|
children: [
|
|
3157
3233
|
props.children,
|
|
3158
3234
|
props.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: props.meta })
|
|
@@ -3161,7 +3237,7 @@ function GoASideMenuHeading(props) {
|
|
|
3161
3237
|
);
|
|
3162
3238
|
}
|
|
3163
3239
|
function GoASideMenu(props) {
|
|
3164
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", {
|
|
3240
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { testid: props.testId, children: props.children });
|
|
3165
3241
|
}
|
|
3166
3242
|
const GoASkeleton = ({
|
|
3167
3243
|
maxWidth,
|
|
@@ -3185,7 +3261,7 @@ const GoASkeleton = ({
|
|
|
3185
3261
|
mr,
|
|
3186
3262
|
mb,
|
|
3187
3263
|
ml,
|
|
3188
|
-
|
|
3264
|
+
testid: testId
|
|
3189
3265
|
}
|
|
3190
3266
|
);
|
|
3191
3267
|
};
|
|
@@ -3195,7 +3271,7 @@ function GoASpacer(props) {
|
|
|
3195
3271
|
{
|
|
3196
3272
|
hspacing: props.hSpacing,
|
|
3197
3273
|
vspacing: props.vSpacing,
|
|
3198
|
-
|
|
3274
|
+
testid: props.testId
|
|
3199
3275
|
}
|
|
3200
3276
|
);
|
|
3201
3277
|
}
|
|
@@ -3213,7 +3289,7 @@ function GoASpinner({
|
|
|
3213
3289
|
size,
|
|
3214
3290
|
progress,
|
|
3215
3291
|
invert,
|
|
3216
|
-
|
|
3292
|
+
testid: testId
|
|
3217
3293
|
}
|
|
3218
3294
|
);
|
|
3219
3295
|
}
|
|
@@ -3240,7 +3316,7 @@ function GoATable({ onSort, ...props }) {
|
|
|
3240
3316
|
width: props.width,
|
|
3241
3317
|
stickyheader: false,
|
|
3242
3318
|
variant: props.variant,
|
|
3243
|
-
|
|
3319
|
+
testid: props.testId,
|
|
3244
3320
|
mt: props.mt,
|
|
3245
3321
|
mb: props.mb,
|
|
3246
3322
|
ml: props.ml,
|
|
@@ -3276,7 +3352,7 @@ function GoATabs({
|
|
|
3276
3352
|
};
|
|
3277
3353
|
}
|
|
3278
3354
|
}, [onChange]);
|
|
3279
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { ref, initialtab: initialTab,
|
|
3355
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { ref, initialtab: initialTab, testid: testId, children });
|
|
3280
3356
|
}
|
|
3281
3357
|
function GoATab({ heading, children }) {
|
|
3282
3358
|
return /* @__PURE__ */ jsxRuntime.jsxs("goa-tab", { children: [
|
|
@@ -3284,6 +3360,21 @@ function GoATab({ heading, children }) {
|
|
|
3284
3360
|
children
|
|
3285
3361
|
] });
|
|
3286
3362
|
}
|
|
3363
|
+
function GoAText(props) {
|
|
3364
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3365
|
+
"goa-text",
|
|
3366
|
+
{
|
|
3367
|
+
as: props.as || "div",
|
|
3368
|
+
size: props.size,
|
|
3369
|
+
maxwidth: props.maxWidth || "65ch",
|
|
3370
|
+
mt: props.mt,
|
|
3371
|
+
mb: props.mb,
|
|
3372
|
+
ml: props.ml,
|
|
3373
|
+
mr: props.mr,
|
|
3374
|
+
children: props.children
|
|
3375
|
+
}
|
|
3376
|
+
);
|
|
3377
|
+
}
|
|
3287
3378
|
function GoATextarea({
|
|
3288
3379
|
name,
|
|
3289
3380
|
value,
|
|
@@ -3312,7 +3403,7 @@ function GoATextarea({
|
|
|
3312
3403
|
const current = el.current;
|
|
3313
3404
|
const listener = (e) => {
|
|
3314
3405
|
const { name: name2, value: value2 } = e.detail;
|
|
3315
|
-
onChange(name2, value2);
|
|
3406
|
+
onChange == null ? void 0 : onChange(name2, value2);
|
|
3316
3407
|
};
|
|
3317
3408
|
current.addEventListener("_change", listener);
|
|
3318
3409
|
return () => {
|
|
@@ -3347,7 +3438,7 @@ function GoATextarea({
|
|
|
3347
3438
|
width,
|
|
3348
3439
|
maxwidth: maxWidth,
|
|
3349
3440
|
error,
|
|
3350
|
-
|
|
3441
|
+
testid: testId,
|
|
3351
3442
|
arialabel: ariaLabel,
|
|
3352
3443
|
mt,
|
|
3353
3444
|
mr,
|
|
@@ -3381,7 +3472,7 @@ function GoATooltip(props) {
|
|
|
3381
3472
|
position: props.position,
|
|
3382
3473
|
content: props.content,
|
|
3383
3474
|
halign: props.hAlign,
|
|
3384
|
-
|
|
3475
|
+
testid: props.testId,
|
|
3385
3476
|
mt: props.mt,
|
|
3386
3477
|
mr: props.mr,
|
|
3387
3478
|
mb: props.mb,
|
|
@@ -3405,6 +3496,7 @@ function GoATwoColumnLayout(props) {
|
|
|
3405
3496
|
}
|
|
3406
3497
|
);
|
|
3407
3498
|
}
|
|
3499
|
+
exports.GoAIcon = icon.GoAIcon;
|
|
3408
3500
|
exports.GoAAccordion = GoAAccordion;
|
|
3409
3501
|
exports.GoAAppFooter = GoAAppFooter;
|
|
3410
3502
|
exports.GoAAppFooterMetaSection = GoAAppFooterMetaSection;
|
|
@@ -3428,6 +3520,7 @@ exports.GoADropdown = GoADropdown;
|
|
|
3428
3520
|
exports.GoADropdownItem = GoADropdownItem;
|
|
3429
3521
|
exports.GoADropdownOption = GoADropdownOption;
|
|
3430
3522
|
exports.GoAEmergencyBadge = GoAEmergencyBadge;
|
|
3523
|
+
exports.GoAFieldset = GoAFieldset;
|
|
3431
3524
|
exports.GoAFileUploadCard = GoAFileUploadCard;
|
|
3432
3525
|
exports.GoAFileUploadInput = GoAFileUploadInput;
|
|
3433
3526
|
exports.GoAFormItem = GoAFormItem;
|
|
@@ -3436,7 +3529,6 @@ exports.GoAFormStepper = GoAFormStepper;
|
|
|
3436
3529
|
exports.GoAGrid = GoAGrid;
|
|
3437
3530
|
exports.GoAHeroBanner = GoAHeroBanner;
|
|
3438
3531
|
exports.GoAHeroBannerActions = GoAHeroBannerActions;
|
|
3439
|
-
exports.GoAIcon = GoAIcon;
|
|
3440
3532
|
exports.GoAIconButton = GoAIconButton;
|
|
3441
3533
|
exports.GoAImportantBadge = GoAImportantBadge;
|
|
3442
3534
|
exports.GoAInfoBadge = GoAInfoBadge;
|
|
@@ -3454,6 +3546,8 @@ exports.GoAInputTel = GoAInputTel;
|
|
|
3454
3546
|
exports.GoAInputText = GoAInputText;
|
|
3455
3547
|
exports.GoAInputTime = GoAInputTime;
|
|
3456
3548
|
exports.GoAInputUrl = GoAInputUrl;
|
|
3549
|
+
exports.GoALink = GoALink;
|
|
3550
|
+
exports.GoALinkButton = GoALinkButton;
|
|
3457
3551
|
exports.GoAMicrositeHeader = GoAMicrositeHeader;
|
|
3458
3552
|
exports.GoAModal = GoAModal;
|
|
3459
3553
|
exports.GoANotification = GoANotification;
|
|
@@ -3475,6 +3569,7 @@ exports.GoATab = GoATab;
|
|
|
3475
3569
|
exports.GoATable = GoATable;
|
|
3476
3570
|
exports.GoATableSortHeader = GoATableSortHeader;
|
|
3477
3571
|
exports.GoATabs = GoATabs;
|
|
3572
|
+
exports.GoAText = GoAText;
|
|
3478
3573
|
exports.GoATextArea = GoATextarea;
|
|
3479
3574
|
exports.GoATextarea = GoATextarea;
|
|
3480
3575
|
exports.GoAThreeColumnLayout = GoAThreeColumnLayout;
|