@abgov/react-components 5.0.0-alpha.5 → 5.0.0-alpha.7

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.
Files changed (50) hide show
  1. package/index.js +67 -47
  2. package/index.js.map +1 -1
  3. package/index.mjs +67 -47
  4. package/index.mjs.map +1 -1
  5. package/lib/accordion/accordion.d.ts +1 -0
  6. package/lib/app-header/app-header.d.ts +1 -0
  7. package/lib/app-header-menu/app-header-menu.d.ts +1 -0
  8. package/lib/badge/badge.d.ts +1 -0
  9. package/lib/block/block.d.ts +1 -0
  10. package/lib/button/button.d.ts +1 -0
  11. package/lib/button-group/button-group.d.ts +1 -0
  12. package/lib/calendar/calendar.d.ts +1 -0
  13. package/lib/callout/callout.d.ts +1 -0
  14. package/lib/checkbox/checkbox.d.ts +1 -0
  15. package/lib/chip/chip.d.ts +1 -0
  16. package/lib/circular-progress/circular-progress.d.ts +1 -0
  17. package/lib/container/container.d.ts +1 -0
  18. package/lib/date-picker/date-picker.d.ts +1 -0
  19. package/lib/details/details.d.ts +1 -0
  20. package/lib/divider/divider.d.ts +4 -1
  21. package/lib/dropdown/dropdown.d.ts +1 -0
  22. package/lib/file-upload-card/file-upload-card.d.ts +1 -0
  23. package/lib/file-upload-input/file-upload-input.d.ts +1 -0
  24. package/lib/footer/footer.d.ts +1 -0
  25. package/lib/footer-meta-section/footer-meta-section.d.ts +4 -1
  26. package/lib/footer-nav-section/footer-nav-section.d.ts +1 -0
  27. package/lib/form-item/form-item.d.ts +1 -0
  28. package/lib/form-stepper/form-stepper.d.ts +1 -0
  29. package/lib/grid/grid.d.ts +1 -0
  30. package/lib/hero-banner/hero-banner.d.ts +1 -0
  31. package/lib/icon-button/icon-button.d.ts +1 -0
  32. package/lib/input/input.d.ts +1 -0
  33. package/lib/microsite-header/microsite-header.d.ts +5 -1
  34. package/lib/modal/modal.d.ts +1 -0
  35. package/lib/notification/notification.d.ts +1 -0
  36. package/lib/page-block/page-block.d.ts +1 -0
  37. package/lib/pagination/pagination.d.ts +1 -0
  38. package/lib/popover/popover.d.ts +1 -0
  39. package/lib/radio-group/radio-group.d.ts +1 -0
  40. package/lib/side-menu/side-menu.d.ts +4 -1
  41. package/lib/side-menu-group/side-menu-group.d.ts +1 -0
  42. package/lib/side-menu-heading/side-menu-heading.d.ts +1 -0
  43. package/lib/skeleton/skeleton.d.ts +1 -0
  44. package/lib/spacer/spacer.d.ts +1 -0
  45. package/lib/spinner/spinner.d.ts +1 -0
  46. package/lib/table/table.d.ts +1 -0
  47. package/lib/tabs/tabs.d.ts +1 -0
  48. package/lib/textarea/textarea.d.ts +1 -0
  49. package/lib/tooltip/tooltip.d.ts +1 -0
  50. package/package.json +1 -1
package/index.js CHANGED
@@ -24,7 +24,7 @@ function GoAAccordion({
24
24
  heading,
25
25
  secondaryText,
26
26
  maxwidth: maxWidth,
27
- "data-testid": testid,
27
+ testid,
28
28
  mt,
29
29
  mr,
30
30
  mb,
@@ -51,7 +51,7 @@ function GoAAppHeader({
51
51
  url,
52
52
  fullmenubreakpoint: fullMenuBreakpoint,
53
53
  maxcontentwidth: maxContentWidth,
54
- "data-testid": testId,
54
+ testid: testId,
55
55
  children
56
56
  }
57
57
  );
@@ -62,7 +62,7 @@ function GoAAppHeaderMenu(props) {
62
62
  {
63
63
  heading: props.heading,
64
64
  leadingicon: props.leadingIcon,
65
- "data-testid": props.testId,
65
+ testid: props.testId,
66
66
  children: props.children
67
67
  }
68
68
  );
@@ -84,7 +84,7 @@ function GoABadge({
84
84
  type,
85
85
  content,
86
86
  icon,
87
- "data-testid": testId,
87
+ testid: testId,
88
88
  arialabel: ariaLabel,
89
89
  mt,
90
90
  mr,
@@ -204,7 +204,7 @@ function GoABlock(props) {
204
204
  mr: props.mr,
205
205
  mb: props.mb,
206
206
  ml: props.ml,
207
- "data-testid": props.testId,
207
+ testid: props.testId,
208
208
  children: props.children
209
209
  }
210
210
  );
@@ -251,7 +251,7 @@ function GoAButton({
251
251
  disabled,
252
252
  leadingicon: leadingIcon,
253
253
  trailingicon: trailingIcon,
254
- "data-testid": testId,
254
+ testid: testId,
255
255
  mt,
256
256
  mr,
257
257
  mb,
@@ -279,7 +279,7 @@ function GoAButtonGroup({
279
279
  mr,
280
280
  mb,
281
281
  ml,
282
- "data-testid": testId,
282
+ testid: testId,
283
283
  children
284
284
  }
285
285
  );
@@ -314,7 +314,7 @@ function GoACalendar({
314
314
  value: value == null ? void 0 : value.toISOString(),
315
315
  min: min == null ? void 0 : min.toISOString(),
316
316
  max: max == null ? void 0 : max.toISOString(),
317
- "data-testid": testId,
317
+ testid: testId,
318
318
  mt,
319
319
  mr,
320
320
  mb,
@@ -347,7 +347,7 @@ const GoACallout = ({
347
347
  mr,
348
348
  mb,
349
349
  ml,
350
- "data-testid": testId,
350
+ testid: testId,
351
351
  children
352
352
  }
353
353
  );
@@ -389,7 +389,7 @@ function GoACheckbox({
389
389
  return /* @__PURE__ */ jsxRuntime.jsxs(
390
390
  "goa-checkbox",
391
391
  {
392
- "data-testid": testId,
392
+ testid: testId,
393
393
  ref: el,
394
394
  id,
395
395
  name,
@@ -453,7 +453,7 @@ const GoAChip = ({
453
453
  mr,
454
454
  mb,
455
455
  ml,
456
- "data-testid": testId
456
+ testid: testId
457
457
  }
458
458
  );
459
459
  };
@@ -473,7 +473,7 @@ const GoACircularProgress = ({
473
473
  progress,
474
474
  variant,
475
475
  size,
476
- "data-testid": testId
476
+ testid: testId
477
477
  }
478
478
  );
479
479
  };
@@ -506,7 +506,7 @@ function GoAContainer({
506
506
  mr,
507
507
  mb,
508
508
  ml,
509
- "data-testid": testId,
509
+ testid: testId,
510
510
  children: [
511
511
  headingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "title", children: headingContent }),
512
512
  children,
@@ -555,7 +555,7 @@ function GoADatePicker({
555
555
  disabled,
556
556
  min: min == null ? void 0 : min.toISOString(),
557
557
  max: max == null ? void 0 : max.toISOString(),
558
- "data-testid": testId,
558
+ testid: testId,
559
559
  mt,
560
560
  mr,
561
561
  mb,
@@ -571,7 +571,7 @@ function GoADetails(props) {
571
571
  heading: props.heading,
572
572
  open: props.open,
573
573
  maxwidth: props.maxWidth,
574
- "data-testid": props.testId,
574
+ testid: props.testId,
575
575
  mt: props.mt,
576
576
  mr: props.mr,
577
577
  mb: props.mb,
@@ -588,7 +588,7 @@ function GoADivider(props) {
588
588
  mr: props.mr,
589
589
  mb: props.mb,
590
590
  ml: props.ml,
591
- "data-testid": props.testId
591
+ testid: props.testId
592
592
  }
593
593
  );
594
594
  }
@@ -637,7 +637,7 @@ function GoADropdown(props) {
637
637
  multiselect: props.multiselect,
638
638
  native: props.native,
639
639
  placeholder: props.placeholder,
640
- "data-testid": props.testId,
640
+ testid: props.testId,
641
641
  width: props.width,
642
642
  relative: props.relative,
643
643
  id: props.id,
@@ -696,7 +696,7 @@ function GoAFileUploadCard({
696
696
  type,
697
697
  progress,
698
698
  error,
699
- "data-testid": testId
699
+ testid: testId
700
700
  }
701
701
  );
702
702
  }
@@ -726,7 +726,7 @@ function GoAFileUploadInput({
726
726
  variant,
727
727
  accept,
728
728
  maxfilesize: maxFileSize,
729
- "data-testid": testId
729
+ testid: testId
730
730
  }
731
731
  );
732
732
  }
@@ -735,13 +735,13 @@ function GoAAppFooter({
735
735
  children,
736
736
  testId
737
737
  }) {
738
- return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, "data-testid": testId, children });
738
+ return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, testid: testId, children });
739
739
  }
740
740
  function GoAAppFooterMetaSection({ testId, children }) {
741
741
  return /* @__PURE__ */ jsxRuntime.jsx(
742
742
  "goa-app-footer-meta-section",
743
743
  {
744
- "data-testid": testId,
744
+ testid: testId,
745
745
  slot: "meta",
746
746
  children
747
747
  }
@@ -759,7 +759,7 @@ function GoAAppFooterNavSection({
759
759
  slot: "nav",
760
760
  heading,
761
761
  maxcolumncount: maxColumnCount,
762
- "data-testid": testId,
762
+ testid: testId,
763
763
  children
764
764
  }
765
765
  );
@@ -792,7 +792,7 @@ function GoAFormItem({
792
792
  mr,
793
793
  mb,
794
794
  ml,
795
- "data-testid": testId,
795
+ testid: testId,
796
796
  id,
797
797
  children: [
798
798
  error && typeof error !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "error", children: error }),
@@ -834,7 +834,7 @@ function GoAFormStepper({
834
834
  "goa-form-stepper",
835
835
  {
836
836
  ref,
837
- "data-testid": testId,
837
+ testid: testId,
838
838
  step,
839
839
  mt,
840
840
  mr,
@@ -863,7 +863,7 @@ function GoAGrid({
863
863
  mr,
864
864
  mb,
865
865
  ml,
866
- "data-testid": testId,
866
+ testid: testId,
867
867
  children
868
868
  }
869
869
  );
@@ -887,7 +887,7 @@ function GoAHeroBanner({
887
887
  maxcontentwidth: maxContentWidth,
888
888
  backgroundcolor: backgroundColor,
889
889
  textcolor: textColor,
890
- "data-testid": testId,
890
+ testid: testId,
891
891
  children
892
892
  }
893
893
  );
@@ -943,7 +943,7 @@ function GoAIconButton({
943
943
  mr,
944
944
  mb,
945
945
  ml,
946
- "data-testid": testId,
946
+ testid: testId,
947
947
  children
948
948
  }
949
949
  );
@@ -978,7 +978,7 @@ function GoAIcon({
978
978
  mr,
979
979
  mb,
980
980
  ml,
981
- "data-testid": testId
981
+ testid: testId
982
982
  }
983
983
  );
984
984
  }
@@ -2677,7 +2677,7 @@ function GoAInput({
2677
2677
  readonly,
2678
2678
  placeholder,
2679
2679
  error,
2680
- "data-testid": testId,
2680
+ testid: testId,
2681
2681
  value,
2682
2682
  width,
2683
2683
  min,
@@ -2860,18 +2860,38 @@ function GoAMicrositeHeader({
2860
2860
  maxContentWidth,
2861
2861
  feedbackUrlTarget,
2862
2862
  headerUrlTarget,
2863
- testId
2863
+ testId,
2864
+ onFeedbackClick
2864
2865
  }) {
2866
+ const el = react.useRef(null);
2867
+ react.useEffect(() => {
2868
+ if (!el.current) {
2869
+ return;
2870
+ }
2871
+ if (!onFeedbackClick) {
2872
+ return;
2873
+ }
2874
+ const current = el.current;
2875
+ const listener = () => {
2876
+ onFeedbackClick();
2877
+ };
2878
+ current.addEventListener("_feedbackClick", listener);
2879
+ return () => {
2880
+ current.removeEventListener("_feedbackClick", listener);
2881
+ };
2882
+ }, [el, onFeedbackClick]);
2865
2883
  return /* @__PURE__ */ jsxRuntime.jsx(
2866
2884
  "goa-microsite-header",
2867
2885
  {
2886
+ ref: el,
2868
2887
  type,
2869
2888
  version: typeof version === "string" ? version : void 0,
2870
2889
  feedbackurl: feedbackUrl,
2871
- "data-testid": testId,
2890
+ testid: testId,
2872
2891
  maxcontentwidth: maxContentWidth,
2873
2892
  feedbackurltarget: feedbackUrlTarget,
2874
2893
  headerurltarget: headerUrlTarget,
2894
+ hasfeedbackhandler: !!onFeedbackClick,
2875
2895
  children: version && typeof version !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "version", children: version })
2876
2896
  }
2877
2897
  );
@@ -2921,7 +2941,7 @@ function GoAModal({
2921
2941
  maxwidth: maxWidth,
2922
2942
  transition,
2923
2943
  calloutvariant: calloutVariant,
2924
- "data-testid": testId,
2944
+ testid: testId,
2925
2945
  role,
2926
2946
  children: [
2927
2947
  heading && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
@@ -2958,7 +2978,7 @@ const GoANotification = ({
2958
2978
  {
2959
2979
  ref: el,
2960
2980
  type,
2961
- "data-testid": testId,
2981
+ testid: testId,
2962
2982
  maxcontentwidth: maxContentWidth,
2963
2983
  arialive: ariaLive,
2964
2984
  children
@@ -2969,7 +2989,7 @@ function GoAOneColumnLayout(props) {
2969
2989
  return /* @__PURE__ */ jsxRuntime.jsx("goa-one-column-layout", { children: props.children });
2970
2990
  }
2971
2991
  function GoAPageBlock(props) {
2972
- return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width, "data-testid": props.testId, children: props.children });
2992
+ return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width, testid: props.testId, children: props.children });
2973
2993
  }
2974
2994
  function GoAPages(props) {
2975
2995
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3012,7 +3032,7 @@ function GoAPagination({ onChange, ...props }) {
3012
3032
  mb: props.mb,
3013
3033
  ml: props.ml,
3014
3034
  mr: props.mr,
3015
- "data-testid": props.testId
3035
+ testid: props.testId
3016
3036
  }
3017
3037
  );
3018
3038
  }
@@ -3033,7 +3053,7 @@ function GoAPopover({
3033
3053
  return /* @__PURE__ */ jsxRuntime.jsxs(
3034
3054
  "goa-popover",
3035
3055
  {
3036
- "data-testid": testId,
3056
+ testid: testId,
3037
3057
  maxwidth: maxWidth,
3038
3058
  minwidth: minWidth,
3039
3059
  padded,
@@ -3127,7 +3147,7 @@ function GoARadioGroup({
3127
3147
  return /* @__PURE__ */ jsxRuntime.jsx(
3128
3148
  "goa-radio-group",
3129
3149
  {
3130
- "data-testid": testId,
3150
+ testid: testId,
3131
3151
  ref: el,
3132
3152
  name,
3133
3153
  value,
@@ -3148,7 +3168,7 @@ function GoASideMenuGroup(props) {
3148
3168
  "goa-side-menu-group",
3149
3169
  {
3150
3170
  heading: props.heading,
3151
- "data-testid": props.testId,
3171
+ testid: props.testId,
3152
3172
  children: props.children
3153
3173
  }
3154
3174
  );
@@ -3158,7 +3178,7 @@ function GoASideMenuHeading(props) {
3158
3178
  "goa-side-menu-heading",
3159
3179
  {
3160
3180
  icon: props.icon,
3161
- "data-testid": props.testId,
3181
+ testid: props.testId,
3162
3182
  children: [
3163
3183
  props.children,
3164
3184
  props.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: props.meta })
@@ -3167,7 +3187,7 @@ function GoASideMenuHeading(props) {
3167
3187
  );
3168
3188
  }
3169
3189
  function GoASideMenu(props) {
3170
- return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { "data-testid": props.testId, children: props.children });
3190
+ return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { testid: props.testId, children: props.children });
3171
3191
  }
3172
3192
  const GoASkeleton = ({
3173
3193
  maxWidth,
@@ -3191,7 +3211,7 @@ const GoASkeleton = ({
3191
3211
  mr,
3192
3212
  mb,
3193
3213
  ml,
3194
- "data-testid": testId
3214
+ testid: testId
3195
3215
  }
3196
3216
  );
3197
3217
  };
@@ -3201,7 +3221,7 @@ function GoASpacer(props) {
3201
3221
  {
3202
3222
  hspacing: props.hSpacing,
3203
3223
  vspacing: props.vSpacing,
3204
- "data-testid": props.testId
3224
+ testid: props.testId
3205
3225
  }
3206
3226
  );
3207
3227
  }
@@ -3219,7 +3239,7 @@ function GoASpinner({
3219
3239
  size,
3220
3240
  progress,
3221
3241
  invert,
3222
- "data-testid": testId
3242
+ testid: testId
3223
3243
  }
3224
3244
  );
3225
3245
  }
@@ -3246,7 +3266,7 @@ function GoATable({ onSort, ...props }) {
3246
3266
  width: props.width,
3247
3267
  stickyheader: false,
3248
3268
  variant: props.variant,
3249
- "data-testid": props.testId,
3269
+ testid: props.testId,
3250
3270
  mt: props.mt,
3251
3271
  mb: props.mb,
3252
3272
  ml: props.ml,
@@ -3282,7 +3302,7 @@ function GoATabs({
3282
3302
  };
3283
3303
  }
3284
3304
  }, [onChange]);
3285
- return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { ref, initialtab: initialTab, "data-testid": testId, children });
3305
+ return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { ref, initialtab: initialTab, testid: testId, children });
3286
3306
  }
3287
3307
  function GoATab({ heading, children }) {
3288
3308
  return /* @__PURE__ */ jsxRuntime.jsxs("goa-tab", { children: [
@@ -3353,7 +3373,7 @@ function GoATextarea({
3353
3373
  width,
3354
3374
  maxwidth: maxWidth,
3355
3375
  error,
3356
- "data-testid": testId,
3376
+ testid: testId,
3357
3377
  arialabel: ariaLabel,
3358
3378
  mt,
3359
3379
  mr,
@@ -3387,7 +3407,7 @@ function GoATooltip(props) {
3387
3407
  position: props.position,
3388
3408
  content: props.content,
3389
3409
  halign: props.hAlign,
3390
- "data-testid": props.testId,
3410
+ testid: props.testId,
3391
3411
  mt: props.mt,
3392
3412
  mr: props.mr,
3393
3413
  mb: props.mb,