@abgov/react-components 6.5.0-alpha.1 → 6.5.0-alpha.3

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 (82) hide show
  1. package/experimental/form/form.d.ts +1 -2
  2. package/experimental/form/task-list.d.ts +1 -2
  3. package/experimental/form/task.d.ts +1 -2
  4. package/experimental/resizable-panel/ResizablePanel.d.ts +0 -1
  5. package/experimental.js.map +1 -1
  6. package/experimental.mjs.map +1 -1
  7. package/icon-CK55b563.js.map +1 -1
  8. package/icon-CoYGOp1V.mjs.map +1 -1
  9. package/index.js +28 -16
  10. package/index.js.map +1 -1
  11. package/index.mjs +28 -16
  12. package/index.mjs.map +1 -1
  13. package/lib/accordion/accordion.d.ts +1 -2
  14. package/lib/app-header/app-header.d.ts +0 -1
  15. package/lib/app-header-menu/app-header-menu.d.ts +1 -2
  16. package/lib/badge/badge.d.ts +1 -2
  17. package/lib/block/block.d.ts +1 -2
  18. package/lib/button/button.d.ts +1 -2
  19. package/lib/button-group/button-group.d.ts +1 -2
  20. package/lib/calendar/calendar.d.ts +1 -2
  21. package/lib/callout/callout.d.ts +0 -1
  22. package/lib/card/card-actions.d.ts +0 -1
  23. package/lib/card/card-content.d.ts +0 -1
  24. package/lib/card/card-group.d.ts +0 -1
  25. package/lib/card/card-image.d.ts +0 -1
  26. package/lib/card/card.d.ts +1 -2
  27. package/lib/checkbox/checkbox.d.ts +6 -3
  28. package/lib/chip/chip.d.ts +0 -1
  29. package/lib/circular-progress/circular-progress.d.ts +0 -1
  30. package/lib/container/container.d.ts +1 -2
  31. package/lib/date-picker/date-picker.d.ts +5 -4
  32. package/lib/details/details.d.ts +1 -2
  33. package/lib/divider/divider.d.ts +0 -1
  34. package/lib/drawer/drawer.d.ts +1 -2
  35. package/lib/dropdown/dropdown-item.d.ts +0 -1
  36. package/lib/dropdown/dropdown.d.ts +1 -2
  37. package/lib/file-upload-card/file-upload-card.d.ts +0 -1
  38. package/lib/file-upload-input/file-upload-input.d.ts +0 -1
  39. package/lib/filter-chip/filter-chip.d.ts +0 -1
  40. package/lib/footer/footer.d.ts +0 -1
  41. package/lib/footer-meta-section/footer-meta-section.d.ts +0 -1
  42. package/lib/footer-nav-section/footer-nav-section.d.ts +0 -1
  43. package/lib/form/fieldset.d.ts +1 -2
  44. package/lib/form/public-form-page.d.ts +4 -4
  45. package/lib/form/public-form.d.ts +2 -3
  46. package/lib/form-item/form-item.d.ts +1 -2
  47. package/lib/form-step/form-step.d.ts +0 -1
  48. package/lib/form-stepper/form-stepper.d.ts +1 -2
  49. package/lib/grid/grid.d.ts +1 -2
  50. package/lib/hero-banner/hero-banner-actions.d.ts +0 -1
  51. package/lib/hero-banner/hero-banner.d.ts +0 -1
  52. package/lib/icon/icon.d.ts +1 -2
  53. package/lib/icon-button/icon-button.d.ts +1 -2
  54. package/lib/input/input.d.ts +5 -4
  55. package/lib/link/link.d.ts +1 -2
  56. package/lib/link-button/link-button.d.ts +1 -2
  57. package/lib/microsite-header/microsite-header.d.ts +1 -2
  58. package/lib/modal/modal.d.ts +1 -2
  59. package/lib/notification/notification.d.ts +0 -1
  60. package/lib/one-column-layout/one-column-layout.d.ts +0 -1
  61. package/lib/page-block/page-block.d.ts +0 -1
  62. package/lib/pages/pages.d.ts +1 -2
  63. package/lib/pagination/pagination.d.ts +0 -1
  64. package/lib/popover/popover.d.ts +1 -2
  65. package/lib/radio-group/radio-group.d.ts +1 -2
  66. package/lib/radio-group/radio.d.ts +6 -3
  67. package/lib/side-menu/side-menu.d.ts +0 -1
  68. package/lib/side-menu-group/side-menu-group.d.ts +1 -2
  69. package/lib/side-menu-heading/side-menu-heading.d.ts +1 -2
  70. package/lib/skeleton/skeleton.d.ts +0 -1
  71. package/lib/spacer/spacer.d.ts +0 -1
  72. package/lib/spinner/spinner.d.ts +1 -2
  73. package/lib/tab/tab.d.ts +0 -1
  74. package/lib/table/table-sort-header.d.ts +1 -2
  75. package/lib/table/table.d.ts +1 -2
  76. package/lib/tabs/tabs.d.ts +1 -2
  77. package/lib/text/text.d.ts +1 -2
  78. package/lib/textarea/textarea.d.ts +1 -2
  79. package/lib/three-column-layout/three-column-layout.d.ts +0 -1
  80. package/lib/tooltip/tooltip.d.ts +1 -2
  81. package/lib/two-column-layout/two-column-layout.d.ts +0 -1
  82. package/package.json +1 -1
package/index.mjs CHANGED
@@ -412,6 +412,8 @@ function GoabCheckbox({
412
412
  value,
413
413
  text,
414
414
  description,
415
+ reveal,
416
+ revealAriaLabel,
415
417
  maxWidth,
416
418
  children,
417
419
  onChange,
@@ -449,6 +451,7 @@ function GoabCheckbox({
449
451
  text,
450
452
  value: typeof value === "boolean" ? value ? "true" : void 0 : value,
451
453
  arialabel: ariaLabel,
454
+ revealarialabel: revealAriaLabel,
452
455
  description: typeof description === "string" ? description : void 0,
453
456
  maxwidth: maxWidth,
454
457
  mt,
@@ -456,8 +459,9 @@ function GoabCheckbox({
456
459
  mb,
457
460
  ml,
458
461
  children: [
459
- description && typeof description !== "string" && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
460
- children
462
+ children,
463
+ typeof description !== "string" && description && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
464
+ reveal && /* @__PURE__ */ jsx("div", { slot: "reveal", children: reveal })
461
465
  ]
462
466
  }
463
467
  );
@@ -573,6 +577,7 @@ function GoabDatePicker({
573
577
  max,
574
578
  testId,
575
579
  disabled,
580
+ type,
576
581
  mt,
577
582
  mr,
578
583
  mb,
@@ -588,11 +593,15 @@ function GoabDatePicker({
588
593
  const current = ref.current;
589
594
  const handleChange = (e) => {
590
595
  const detail = e.detail;
591
- onChange(detail);
596
+ onChange == null ? void 0 : onChange(detail);
592
597
  };
593
- current.addEventListener("_change", handleChange);
598
+ if (onChange) {
599
+ current.addEventListener("_change", handleChange);
600
+ }
594
601
  return () => {
595
- current.removeEventListener("_change", handleChange);
602
+ if (onChange) {
603
+ current.removeEventListener("_change", handleChange);
604
+ }
596
605
  };
597
606
  }, [onChange]);
598
607
  return /* @__PURE__ */ jsx(
@@ -601,6 +610,7 @@ function GoabDatePicker({
601
610
  ref,
602
611
  name,
603
612
  value: (value == null ? void 0 : value.toISOString()) || "",
613
+ type,
604
614
  error: error ? "true" : void 0,
605
615
  disabled: disabled ? "true" : void 0,
606
616
  min: min == null ? void 0 : min.toISOString(),
@@ -890,11 +900,10 @@ function GoabPublicFormPage({
890
900
  if (!ref.current) return;
891
901
  const current = ref.current;
892
902
  const continueListener = (e) => {
893
- const detail = e.detail;
894
- onContinue == null ? void 0 : onContinue(detail);
903
+ onContinue == null ? void 0 : onContinue(e);
895
904
  };
896
- const backListener = () => {
897
- onBack == null ? void 0 : onBack();
905
+ const backListener = (e) => {
906
+ onBack == null ? void 0 : onBack(e);
898
907
  };
899
908
  const fieldsetChangeListener = (e) => {
900
909
  const detail = e.detail;
@@ -980,10 +989,7 @@ function GoabPublicForm({
980
989
  if (!ref.current) return;
981
990
  const current = ref.current;
982
991
  const initListener = (e) => {
983
- const detail = e.detail;
984
- if (detail == null ? void 0 : detail.el) {
985
- onInit == null ? void 0 : onInit(detail);
986
- }
992
+ onInit == null ? void 0 : onInit(e);
987
993
  };
988
994
  if (onInit && !initialized.current) {
989
995
  current.addEventListener("_init", initListener);
@@ -1930,8 +1936,6 @@ const lightFormatters = {
1930
1936
  }
1931
1937
  };
1932
1938
  const dayPeriodEnum = {
1933
- am: "am",
1934
- pm: "pm",
1935
1939
  midnight: "midnight",
1936
1940
  noon: "noon",
1937
1941
  morning: "morning",
@@ -2853,6 +2857,7 @@ function GoabInput({
2853
2857
  trailingContent,
2854
2858
  maxLength,
2855
2859
  trailingIconAriaLabel,
2860
+ textAlign = "left",
2856
2861
  onTrailingIconClick,
2857
2862
  onChange,
2858
2863
  onFocus,
@@ -2930,6 +2935,7 @@ function GoabInput({
2930
2935
  ml,
2931
2936
  handletrailingiconclick: onTrailingIconClick ? "true" : "false",
2932
2937
  trailingiconarialabel: trailingIconAriaLabel,
2938
+ textalign: textAlign,
2933
2939
  children: [
2934
2940
  leadingContent && /* @__PURE__ */ jsx("div", { slot: "leadingContent", children: leadingContent }),
2935
2941
  trailingContent && /* @__PURE__ */ jsx("div", { slot: "trailingContent", children: trailingContent })
@@ -3064,6 +3070,7 @@ function GoabInputNumber({
3064
3070
  min = Number.MIN_VALUE,
3065
3071
  max = Number.MAX_VALUE,
3066
3072
  value,
3073
+ textAlign = "right",
3067
3074
  ...props
3068
3075
  }) {
3069
3076
  const onNumberChange = ({ name, value: value2 }) => {
@@ -3093,7 +3100,8 @@ function GoabInputNumber({
3093
3100
  onFocus,
3094
3101
  onBlur,
3095
3102
  type: "number",
3096
- onKeyPress
3103
+ onKeyPress,
3104
+ textAlign
3097
3105
  }
3098
3106
  );
3099
3107
  }
@@ -3345,6 +3353,8 @@ function GoabRadioItem({
3345
3353
  label,
3346
3354
  value,
3347
3355
  description,
3356
+ reveal,
3357
+ revealAriaLabel,
3348
3358
  maxWidth,
3349
3359
  disabled,
3350
3360
  checked,
@@ -3368,12 +3378,14 @@ function GoabRadioItem({
3368
3378
  disabled: disabled ? "true" : void 0,
3369
3379
  checked: checked ? "true" : void 0,
3370
3380
  arialabel: ariaLabel,
3381
+ revealarialabel: revealAriaLabel,
3371
3382
  mt,
3372
3383
  mr,
3373
3384
  mb,
3374
3385
  ml,
3375
3386
  children: [
3376
3387
  description && typeof description !== "string" && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
3388
+ reveal && /* @__PURE__ */ jsx("div", { slot: "reveal", children: reveal }),
3377
3389
  children
3378
3390
  ]
3379
3391
  }