@abgov/react-components 7.0.0 → 7.2.0-dev.1

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 (91) hide show
  1. package/index.js +63 -109
  2. package/index.js.map +1 -1
  3. package/index.mjs +63 -109
  4. package/index.mjs.map +1 -1
  5. package/lib/accordion/accordion.d.ts +13 -2
  6. package/lib/app-header/app-header.d.ts +9 -0
  7. package/lib/app-header-menu/app-header-menu.d.ts +6 -0
  8. package/lib/badge/badge.d.ts +9 -0
  9. package/lib/block/block.d.ts +9 -0
  10. package/lib/button/button.d.ts +14 -0
  11. package/lib/button-group/button-group.d.ts +5 -0
  12. package/lib/calendar/calendar.d.ts +8 -1
  13. package/lib/callout/callout.d.ts +10 -0
  14. package/lib/card/card-actions.d.ts +2 -0
  15. package/lib/card/card-content.d.ts +2 -0
  16. package/lib/card/card-group.d.ts +2 -0
  17. package/lib/card/card-image.d.ts +3 -0
  18. package/lib/card/card.d.ts +5 -0
  19. package/lib/checkbox/checkbox.d.ts +19 -1
  20. package/lib/checkbox-list/checkbox-list.d.ts +10 -0
  21. package/lib/chip/chip.d.ts +11 -2
  22. package/lib/circular-progress/circular-progress.d.ts +7 -0
  23. package/lib/container/container.d.ts +18 -5
  24. package/lib/data-grid/data-grid.d.ts +6 -1
  25. package/lib/date-picker/date-picker.d.ts +13 -4
  26. package/lib/details/details.d.ts +7 -1
  27. package/lib/divider/divider.d.ts +2 -0
  28. package/lib/drawer/drawer.d.ts +11 -2
  29. package/lib/dropdown/dropdown-item.d.ts +8 -0
  30. package/lib/dropdown/dropdown.d.ts +22 -3
  31. package/lib/file-upload-card/file-upload-card.d.ts +9 -0
  32. package/lib/file-upload-input/file-upload-input.d.ts +7 -1
  33. package/lib/filter-chip/filter-chip.d.ts +10 -2
  34. package/lib/footer/footer.d.ts +7 -2
  35. package/lib/footer-meta-section/footer-meta-section.d.ts +3 -0
  36. package/lib/footer-nav-section/footer-nav-section.d.ts +6 -1
  37. package/lib/form/fieldset.d.ts +7 -1
  38. package/lib/form/public-form-page.d.ts +13 -5
  39. package/lib/form/public-form-summary.d.ts +2 -0
  40. package/lib/form/public-form.d.ts +8 -1
  41. package/lib/form/public-subform-index.d.ts +7 -1
  42. package/lib/form/public-subform.d.ts +8 -1
  43. package/lib/form/task-list.d.ts +4 -1
  44. package/lib/form/task.d.ts +4 -1
  45. package/lib/form-item/form-item.d.ts +13 -6
  46. package/lib/form-step/form-step.d.ts +3 -0
  47. package/lib/form-stepper/form-stepper.d.ts +5 -0
  48. package/lib/grid/grid.d.ts +6 -1
  49. package/lib/hero-banner/hero-banner-actions.d.ts +2 -0
  50. package/lib/hero-banner/hero-banner.d.ts +12 -1
  51. package/lib/icon/icon.d.ts +13 -0
  52. package/lib/icon-button/icon-button.d.ts +18 -2
  53. package/lib/input/input.d.ts +48 -3
  54. package/lib/linear-progress/linear-progress.d.ts +6 -0
  55. package/lib/link/link.d.ts +11 -1
  56. package/lib/link-button/link-button.d.ts +3 -0
  57. package/lib/menu-button/menu-action.d.ts +5 -0
  58. package/lib/menu-button/menu-button.d.ts +11 -0
  59. package/lib/microsite-header/microsite-header.d.ts +9 -0
  60. package/lib/modal/modal.d.ts +10 -0
  61. package/lib/notification/notification.d.ts +9 -0
  62. package/lib/one-column-layout/one-column-layout.d.ts +2 -0
  63. package/lib/page-block/page-block.d.ts +4 -0
  64. package/lib/pages/pages.d.ts +3 -0
  65. package/lib/pagination/pagination.d.ts +9 -2
  66. package/lib/popover/popover.d.ts +11 -5
  67. package/lib/push-drawer/push-drawer.d.ts +10 -2
  68. package/lib/radio-group/radio-group.d.ts +12 -0
  69. package/lib/radio-group/radio.d.ts +14 -0
  70. package/lib/side-menu/side-menu.d.ts +4 -1
  71. package/lib/side-menu-group/side-menu-group.d.ts +5 -0
  72. package/lib/side-menu-heading/side-menu-heading.d.ts +7 -2
  73. package/lib/skeleton/skeleton.d.ts +7 -1
  74. package/lib/spacer/spacer.d.ts +4 -0
  75. package/lib/spinner/spinner.d.ts +6 -0
  76. package/lib/tab/tab.d.ts +8 -3
  77. package/lib/table/table-sort-header.d.ts +5 -0
  78. package/lib/table/table.d.ts +9 -1
  79. package/lib/tabs/tabs.d.ts +8 -1
  80. package/lib/temporary-notification-ctrl/temporary-notification-ctrl.d.ts +4 -0
  81. package/lib/text/text.d.ts +8 -1
  82. package/lib/textarea/textarea.d.ts +20 -0
  83. package/lib/three-column-layout/three-column-layout.d.ts +11 -1
  84. package/lib/tooltip/tooltip.d.ts +7 -0
  85. package/lib/two-column-layout/two-column-layout.d.ts +9 -2
  86. package/lib/work-side-menu/work-side-menu.d.ts +12 -0
  87. package/lib/work-side-menu-group/work-side-menu-group.d.ts +6 -0
  88. package/lib/work-side-menu-item/work-side-menu-item.d.ts +11 -0
  89. package/lib/work-side-notification-item/work-side-notification-item.d.ts +10 -1
  90. package/lib/work-side-notification-panel/work-side-notification-panel.d.ts +7 -0
  91. package/package.json +1 -1
package/index.mjs CHANGED
@@ -46,18 +46,10 @@ function GoabAccordion({
46
46
  };
47
47
  }
48
48
  }, [onChange]);
49
- return /* @__PURE__ */ jsxs(
50
- "goa-accordion",
51
- {
52
- ref,
53
- open: open ? "true" : void 0,
54
- ..._props,
55
- children: [
56
- headingContent && /* @__PURE__ */ jsx("div", { slot: "headingcontent", children: headingContent }),
57
- children
58
- ]
59
- }
60
- );
49
+ return /* @__PURE__ */ jsxs("goa-accordion", { ref, open: open ? "true" : void 0, ..._props, children: [
50
+ headingContent && /* @__PURE__ */ jsx("div", { slot: "headingcontent", children: headingContent }),
51
+ children
52
+ ] });
61
53
  }
62
54
  function GoabAppHeader({
63
55
  onMenuClick,
@@ -129,15 +121,8 @@ function GoabBadge({
129
121
  }
130
122
  );
131
123
  }
132
- function GoabBlock({
133
- testId,
134
- children,
135
- ...rest
136
- }) {
137
- const _props = transformProps(
138
- { testid: testId, ...rest },
139
- kebab
140
- );
124
+ function GoabBlock({ testId, children, ...rest }) {
125
+ const _props = transformProps({ testid: testId, ...rest }, kebab);
141
126
  return /* @__PURE__ */ jsx("goa-block", { ..._props, children });
142
127
  }
143
128
  function GoabButton({
@@ -337,12 +322,7 @@ function GoabCheckboxList({
337
322
  }
338
323
  );
339
324
  }
340
- const GoabChip = ({
341
- error,
342
- deletable,
343
- onClick,
344
- ...rest
345
- }) => {
325
+ const GoabChip = ({ error, deletable, onClick, ...rest }) => {
346
326
  const el = useRef(null);
347
327
  const _props = transformProps(rest, lowercase);
348
328
  useEffect(() => {
@@ -2668,20 +2648,9 @@ function GoabDatePicker({
2668
2648
  }
2669
2649
  );
2670
2650
  }
2671
- function GoabDetails({
2672
- open,
2673
- children,
2674
- ...rest
2675
- }) {
2651
+ function GoabDetails({ open, children, ...rest }) {
2676
2652
  const _props = transformProps(rest, lowercase);
2677
- return /* @__PURE__ */ jsx(
2678
- "goa-details",
2679
- {
2680
- open: open ? "true" : void 0,
2681
- ..._props,
2682
- children
2683
- }
2684
- );
2653
+ return /* @__PURE__ */ jsx("goa-details", { open: open ? "true" : void 0, ..._props, children });
2685
2654
  }
2686
2655
  function GoabDivider(props) {
2687
2656
  return /* @__PURE__ */ jsx(
@@ -2928,10 +2897,7 @@ function GoabPublicFormSummary({
2928
2897
  heading = "",
2929
2898
  ...rest
2930
2899
  }) {
2931
- const _props = transformProps(
2932
- { heading, ...rest },
2933
- lowercase
2934
- );
2900
+ const _props = transformProps({ heading, ...rest }, lowercase);
2935
2901
  return /* @__PURE__ */ jsx("goa-public-form-summary", { ..._props });
2936
2902
  }
2937
2903
  function GoabPublicForm({
@@ -3030,7 +2996,13 @@ function GoabPublicSubformIndex({
3030
2996
  ...rest
3031
2997
  }) {
3032
2998
  const _props = transformProps(
3033
- { heading, "section-title": sectionTitle, "action-button-text": actionButtonText, "button-visibility": buttonVisibility, ...rest },
2999
+ {
3000
+ heading,
3001
+ "section-title": sectionTitle,
3002
+ "action-button-text": actionButtonText,
3003
+ "button-visibility": buttonVisibility,
3004
+ ...rest
3005
+ },
3034
3006
  kebab
3035
3007
  );
3036
3008
  return /* @__PURE__ */ jsx("goa-public-subform-index", { slot: "subform-index", ..._props, children });
@@ -3040,10 +3012,7 @@ function GoabPublicFormTask({
3040
3012
  children,
3041
3013
  ...rest
3042
3014
  }) {
3043
- const _props = transformProps(
3044
- { status, ...rest },
3045
- lowercase
3046
- );
3015
+ const _props = transformProps({ status, ...rest }, lowercase);
3047
3016
  return /* @__PURE__ */ jsx("goa-public-form-task", { ..._props, children });
3048
3017
  }
3049
3018
  function GoabPublicFormTaskList({
@@ -3152,9 +3121,10 @@ function GoabHeroBanner({
3152
3121
  backgroundColor,
3153
3122
  textColor,
3154
3123
  children,
3124
+ actions,
3155
3125
  testId
3156
3126
  }) {
3157
- return /* @__PURE__ */ jsx(
3127
+ return /* @__PURE__ */ jsxs(
3158
3128
  "goa-hero-banner",
3159
3129
  {
3160
3130
  heading,
@@ -3164,7 +3134,10 @@ function GoabHeroBanner({
3164
3134
  backgroundcolor: backgroundColor,
3165
3135
  textcolor: textColor,
3166
3136
  testid: testId,
3167
- children
3137
+ children: [
3138
+ children,
3139
+ actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions })
3140
+ ]
3168
3141
  }
3169
3142
  );
3170
3143
  }
@@ -3176,6 +3149,7 @@ function GoabHeroBannerActions({
3176
3149
  function GoabIconButton({
3177
3150
  variant = "color",
3178
3151
  size = "medium",
3152
+ theme = "outline",
3179
3153
  disabled,
3180
3154
  onClick,
3181
3155
  actionArgs,
@@ -3184,10 +3158,7 @@ function GoabIconButton({
3184
3158
  ...rest
3185
3159
  }) {
3186
3160
  const ref = useRef(null);
3187
- const _props = transformProps(
3188
- { variant, size, ...rest },
3189
- lowercase
3190
- );
3161
+ const _props = transformProps({ variant, size, theme, ...rest }, lowercase);
3191
3162
  useEffect(() => {
3192
3163
  if (!ref.current) {
3193
3164
  return;
@@ -3216,10 +3187,7 @@ function GoabIconButton({
3216
3187
  }
3217
3188
  );
3218
3189
  }
3219
- function GoabIcon({
3220
- inverted,
3221
- ...rest
3222
- }) {
3190
+ function GoabIcon({ inverted, ...rest }) {
3223
3191
  const _props = transformProps(rest, lowercase);
3224
3192
  return /* @__PURE__ */ jsx(
3225
3193
  "goa-icon",
@@ -3502,15 +3470,7 @@ function GoabLink({
3502
3470
  ...rest
3503
3471
  }) {
3504
3472
  const _props = transformProps({ color, size, ...rest }, lowercase);
3505
- return /* @__PURE__ */ jsx(
3506
- "goa-link",
3507
- {
3508
- "action-arg": actionArg,
3509
- "action-args": JSON.stringify(actionArgs),
3510
- ..._props,
3511
- children
3512
- }
3513
- );
3473
+ return /* @__PURE__ */ jsx("goa-link", { "action-arg": actionArg, "action-args": JSON.stringify(actionArgs), ..._props, children });
3514
3474
  }
3515
3475
  function GoALinkButton({
3516
3476
  type = "primary",
@@ -3531,10 +3491,7 @@ function GoabMenuButton({
3531
3491
  ...rest
3532
3492
  }) {
3533
3493
  const el = useRef(null);
3534
- const _props = transformProps(
3535
- { type, testid: testId, ...rest },
3536
- kebab
3537
- );
3494
+ const _props = transformProps({ type, testid: testId, ...rest }, kebab);
3538
3495
  useEffect(() => {
3539
3496
  if (!el.current) {
3540
3497
  return;
@@ -3910,7 +3867,12 @@ function GoabSideMenuGroup({
3910
3867
  }
3911
3868
  );
3912
3869
  }
3913
- function GoabSideMenuHeading({ meta, testId, icon, children }) {
3870
+ function GoabSideMenuHeading({
3871
+ meta,
3872
+ testId,
3873
+ icon,
3874
+ children
3875
+ }) {
3914
3876
  return /* @__PURE__ */ jsxs("goa-side-menu-heading", { icon, testid: testId, version: "2", children: [
3915
3877
  children,
3916
3878
  meta && /* @__PURE__ */ jsx("span", { slot: "meta", children: meta })
@@ -4020,7 +3982,16 @@ function GoabTableSortHeader({
4020
3982
  children,
4021
3983
  ...rest
4022
3984
  }) {
4023
- return /* @__PURE__ */ jsx("goa-table-sort-header", { name, direction, "sort-order": sortOrder, ...rest, children });
3985
+ return /* @__PURE__ */ jsx(
3986
+ "goa-table-sort-header",
3987
+ {
3988
+ name,
3989
+ direction,
3990
+ "sort-order": sortOrder,
3991
+ ...rest,
3992
+ children
3993
+ }
3994
+ );
4024
3995
  }
4025
3996
  function GoabTabs({
4026
3997
  initialTab,
@@ -4059,7 +4030,12 @@ function GoabTabs({
4059
4030
  }
4060
4031
  );
4061
4032
  }
4062
- function GoabTab({ heading, disabled, slug, children }) {
4033
+ function GoabTab({
4034
+ heading,
4035
+ disabled,
4036
+ slug,
4037
+ children
4038
+ }) {
4063
4039
  return /* @__PURE__ */ jsxs(
4064
4040
  "goa-tab",
4065
4041
  {
@@ -4081,33 +4057,18 @@ const GoabTemporaryNotificationCtrl = ({
4081
4057
  }) => {
4082
4058
  const el = useRef(null);
4083
4059
  const _props = transformProps(
4084
- { "vertical-position": verticalPosition, "horizontal-position": horizontalPosition, ...rest },
4085
- kebab
4086
- );
4087
- return /* @__PURE__ */ jsx(
4088
- "goa-temp-notification-ctrl",
4089
4060
  {
4090
- ref: el,
4091
- ..._props,
4092
- testid: testId
4093
- }
4061
+ "vertical-position": verticalPosition,
4062
+ "horizontal-position": horizontalPosition,
4063
+ ...rest
4064
+ },
4065
+ kebab
4094
4066
  );
4067
+ return /* @__PURE__ */ jsx("goa-temp-notification-ctrl", { ref: el, ..._props, testid: testId });
4095
4068
  };
4096
- function GoabText({
4097
- as,
4098
- tag,
4099
- children,
4100
- ...rest
4101
- }) {
4069
+ function GoabText({ as, tag, children, ...rest }) {
4102
4070
  const _props = transformProps(rest, lowercase);
4103
- return /* @__PURE__ */ jsx(
4104
- "goa-text",
4105
- {
4106
- as: tag || as,
4107
- ..._props,
4108
- children
4109
- }
4110
- );
4071
+ return /* @__PURE__ */ jsx("goa-text", { as: tag || as, ..._props, children });
4111
4072
  }
4112
4073
  function GoabTextArea({
4113
4074
  readOnly,
@@ -4183,17 +4144,10 @@ function GoabTooltip({
4183
4144
  }) {
4184
4145
  const _props = transformProps(rest, lowercase);
4185
4146
  const isStringContent = typeof content === "string";
4186
- return /* @__PURE__ */ jsxs(
4187
- "goa-tooltip",
4188
- {
4189
- content: isStringContent ? content : void 0,
4190
- ..._props,
4191
- children: [
4192
- !isStringContent && content && /* @__PURE__ */ jsx("div", { slot: "content", children: content }),
4193
- children
4194
- ]
4195
- }
4196
- );
4147
+ return /* @__PURE__ */ jsxs("goa-tooltip", { content: isStringContent ? content : void 0, ..._props, children: [
4148
+ !isStringContent && content && /* @__PURE__ */ jsx("div", { slot: "content", children: content }),
4149
+ children
4150
+ ] });
4197
4151
  }
4198
4152
  function GoabTwoColumnLayout(props) {
4199
4153
  return /* @__PURE__ */ jsxs(