@abgov/react-components 7.5.0 → 8.0.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 (39) hide show
  1. package/README.md +2 -4
  2. package/index.js +22 -73
  3. package/index.js.map +1 -1
  4. package/index.mjs +22 -73
  5. package/index.mjs.map +1 -1
  6. package/lib/accordion/accordion.d.ts +3 -3
  7. package/lib/app-header/app-header.d.ts +2 -11
  8. package/lib/badge/badge.d.ts +0 -1
  9. package/lib/button/button.d.ts +0 -1
  10. package/lib/button-group/button-group.d.ts +3 -3
  11. package/lib/calendar/calendar.d.ts +0 -1
  12. package/lib/callout/callout.d.ts +2 -6
  13. package/lib/checkbox/checkbox.d.ts +4 -5
  14. package/lib/checkbox-list/checkbox-list.d.ts +7 -5
  15. package/lib/data-grid/data-grid.d.ts +2 -2
  16. package/lib/date-picker/date-picker.d.ts +0 -1
  17. package/lib/drawer/drawer.d.ts +1 -2
  18. package/lib/dropdown/dropdown-item.d.ts +1 -1
  19. package/lib/dropdown/dropdown.d.ts +2 -3
  20. package/lib/file-upload-card/file-upload-card.d.ts +0 -1
  21. package/lib/file-upload-input/file-upload-input.d.ts +0 -1
  22. package/lib/filter-chip/filter-chip.d.ts +0 -1
  23. package/lib/footer/footer.d.ts +0 -4
  24. package/lib/form-item/form-item.d.ts +0 -1
  25. package/lib/input/input.d.ts +3 -4
  26. package/lib/modal/modal.d.ts +0 -1
  27. package/lib/notification/notification.d.ts +0 -1
  28. package/lib/pagination/pagination.d.ts +0 -1
  29. package/lib/push-drawer/push-drawer.d.ts +0 -1
  30. package/lib/radio-group/radio-group.d.ts +3 -4
  31. package/lib/radio-group/radio.d.ts +3 -4
  32. package/lib/side-menu/side-menu.d.ts +0 -1
  33. package/lib/side-menu-group/side-menu-group.d.ts +0 -1
  34. package/lib/side-menu-heading/side-menu-heading.d.ts +0 -1
  35. package/lib/table/table-sort-header.d.ts +0 -1
  36. package/lib/table/table.d.ts +0 -1
  37. package/lib/tabs/tabs.d.ts +0 -1
  38. package/lib/textarea/textarea.d.ts +4 -5
  39. package/package.json +1 -1
package/index.mjs CHANGED
@@ -76,7 +76,6 @@ function renderSlottedItems(children, slot) {
76
76
  });
77
77
  }
78
78
  function GoabAppHeader({
79
- onMenuClick,
80
79
  children,
81
80
  secondaryText,
82
81
  banner,
@@ -85,41 +84,14 @@ function GoabAppHeader({
85
84
  utilities,
86
85
  ...rest
87
86
  }) {
88
- const el = useRef(null);
89
87
  const _props = transformProps(rest, lowercase);
90
- useEffect(() => {
91
- if (!el.current) {
92
- return;
93
- }
94
- if (!onMenuClick) {
95
- return;
96
- }
97
- const current = el.current;
98
- const listener = () => {
99
- onMenuClick == null ? void 0 : onMenuClick();
100
- };
101
- current.addEventListener("_menuClick", listener);
102
- return () => {
103
- current.removeEventListener("_menuClick", listener);
104
- };
105
- }, [el, onMenuClick]);
106
- return /* @__PURE__ */ jsxs(
107
- "goa-app-header",
108
- {
109
- ref: el,
110
- hasmenuclickhandler: onMenuClick ? "true" : "false",
111
- secondarytext: secondaryText,
112
- ..._props,
113
- version: "2",
114
- children: [
115
- children,
116
- banner && /* @__PURE__ */ jsx("div", { slot: "banner", children: banner }),
117
- phase && /* @__PURE__ */ jsx("div", { slot: "phase", children: phase }),
118
- navigation && renderSlottedItems(navigation, "navigation"),
119
- utilities && renderSlottedItems(utilities, "utilities")
120
- ]
121
- }
122
- );
88
+ return /* @__PURE__ */ jsxs("goa-app-header", { secondarytext: secondaryText, ..._props, children: [
89
+ children,
90
+ banner && /* @__PURE__ */ jsx("div", { slot: "banner", children: banner }),
91
+ phase && /* @__PURE__ */ jsx("div", { slot: "phase", children: phase }),
92
+ navigation && renderSlottedItems(navigation, "navigation"),
93
+ utilities && renderSlottedItems(utilities, "utilities")
94
+ ] });
123
95
  }
124
96
  function GoabAppHeaderMenu({
125
97
  children,
@@ -151,7 +123,6 @@ function GoabBadge({
151
123
  icontype: iconType,
152
124
  content: typeof content === "string" ? content : void 0,
153
125
  ..._props,
154
- version: "2",
155
126
  size,
156
127
  emphasis,
157
128
  children: typeof content !== "string" && content != null && /* @__PURE__ */ jsx("div", { slot: "content", children: content })
@@ -203,16 +174,16 @@ function GoabButton({
203
174
  "action-args": JSON.stringify(actionArgs),
204
175
  arialabel: ariaLabel || void 0,
205
176
  ..._props,
206
- version: "2",
207
177
  children
208
178
  }
209
179
  );
210
180
  }
211
181
  function GoabButtonGroup({
212
182
  children,
183
+ alignment = "start",
213
184
  ...rest
214
185
  }) {
215
- const _props = transformProps(rest, lowercase);
186
+ const _props = transformProps({ alignment, ...rest }, lowercase);
216
187
  return /* @__PURE__ */ jsx("goa-button-group", { ..._props, children });
217
188
  }
218
189
  function GoabCalendar({
@@ -247,7 +218,6 @@ function GoabCalendar({
247
218
  name,
248
219
  min: min || void 0,
249
220
  max: max || void 0,
250
- version: "2",
251
221
  ..._props
252
222
  }
253
223
  );
@@ -255,17 +225,16 @@ function GoabCalendar({
255
225
  const GoabCallout = ({
256
226
  type = "information",
257
227
  iconTheme = "outline",
258
- size = "large",
259
228
  ariaLive = "off",
260
229
  emphasis = "medium",
261
230
  children,
262
231
  ...rest
263
232
  }) => {
264
233
  const _props = transformProps(
265
- { type, icontheme: iconTheme, size, arialive: ariaLive, emphasis, ...rest },
234
+ { type, icontheme: iconTheme, arialive: ariaLive, emphasis, ...rest },
266
235
  lowercase
267
236
  );
268
- return /* @__PURE__ */ jsx("goa-callout", { ..._props, version: "2", children });
237
+ return /* @__PURE__ */ jsx("goa-callout", { ..._props, children });
269
238
  };
270
239
  function GoabCheckbox({
271
240
  error,
@@ -323,7 +292,6 @@ function GoabCheckbox({
323
292
  disabled: disabled ? "true" : void 0,
324
293
  value: typeof value === "boolean" ? value ? "true" : void 0 : value,
325
294
  description: typeof description === "string" ? description : void 0,
326
- version: "2",
327
295
  children: [
328
296
  children,
329
297
  typeof description !== "string" && description && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
@@ -340,6 +308,7 @@ function GoabCheckboxList({
340
308
  testId,
341
309
  maxWidth,
342
310
  size = "default",
311
+ ariaLabel,
343
312
  children,
344
313
  onChange,
345
314
  onFocus,
@@ -384,8 +353,8 @@ function GoabCheckboxList({
384
353
  error: error ? "true" : void 0,
385
354
  testid: testId,
386
355
  maxwidth: maxWidth,
387
- version: "2",
388
356
  size,
357
+ arialabel: ariaLabel,
389
358
  mt,
390
359
  mr,
391
360
  mb,
@@ -457,7 +426,7 @@ function GoabContainer({
457
426
  function GoabDataGrid({
458
427
  keyboardIconVisibility = "visible",
459
428
  keyboardIconPosition = "left",
460
- keyboardNav,
429
+ keyboardNav = "table",
461
430
  children
462
431
  }) {
463
432
  return /* @__PURE__ */ jsx(
@@ -2732,7 +2701,6 @@ function GoabDatePicker({
2732
2701
  min: formatValue(min) || void 0,
2733
2702
  max: formatValue(max) || void 0,
2734
2703
  relative: relative ? "true" : void 0,
2735
- version: "2",
2736
2704
  ..._props
2737
2705
  }
2738
2706
  );
@@ -2755,7 +2723,7 @@ function GoabDivider(props) {
2755
2723
  }
2756
2724
  function GoabDrawer({
2757
2725
  position,
2758
- open,
2726
+ open = false,
2759
2727
  heading,
2760
2728
  maxSize,
2761
2729
  testId,
@@ -2789,7 +2757,6 @@ function GoabDrawer({
2789
2757
  heading: typeof heading === "string" ? heading : void 0,
2790
2758
  maxsize: maxSize,
2791
2759
  testid: testId,
2792
- version: "2",
2793
2760
  children: [
2794
2761
  heading && typeof heading !== "string" && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
2795
2762
  actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions }),
@@ -2866,7 +2833,6 @@ function GoabDropdown({
2866
2833
  native: native ? "true" : void 0,
2867
2834
  relative: relative ? "true" : void 0,
2868
2835
  ..._props,
2869
- version: "2",
2870
2836
  children
2871
2837
  }
2872
2838
  );
@@ -2980,7 +2946,7 @@ function GoabFileUploadCard({
2980
2946
  current.removeEventListener("_cancel", cancelHandler);
2981
2947
  };
2982
2948
  }, [el, onDelete, onCancel, filename]);
2983
- return /* @__PURE__ */ jsx("goa-file-upload-card", { ref: el, ..._props, version: "2" });
2949
+ return /* @__PURE__ */ jsx("goa-file-upload-card", { ref: el, ..._props });
2984
2950
  }
2985
2951
  function GoabFileUploadInput({ onSelectFile, ...rest }) {
2986
2952
  const el = useRef(null);
@@ -2997,11 +2963,11 @@ function GoabFileUploadInput({ onSelectFile, ...rest }) {
2997
2963
  current.removeEventListener("_selectFile", handler);
2998
2964
  };
2999
2965
  }, [el, onSelectFile]);
3000
- return /* @__PURE__ */ jsx("goa-file-upload-input", { ref: el, ..._props, version: "2" });
2966
+ return /* @__PURE__ */ jsx("goa-file-upload-input", { ref: el, ..._props });
3001
2967
  }
3002
2968
  function GoabAppFooter({ children, ...rest }) {
3003
2969
  const _props = transformProps(rest, lowercase);
3004
- return /* @__PURE__ */ jsx("goa-app-footer", { ..._props, version: "2", children });
2970
+ return /* @__PURE__ */ jsx("goa-app-footer", { ..._props, children });
3005
2971
  }
3006
2972
  function GoabAppFooterMetaSection({
3007
2973
  children,
@@ -3211,7 +3177,6 @@ function GoabFormItem({
3211
3177
  helptext: typeof helpText === "string" ? helpText : void 0,
3212
3178
  "public-form-summary-order": publicFormSummaryOrder,
3213
3179
  ..._props,
3214
- version: "2",
3215
3180
  children: [
3216
3181
  error && typeof error !== "string" && /* @__PURE__ */ jsx("div", { slot: "error", children: error }),
3217
3182
  helpText && typeof helpText !== "string" && /* @__PURE__ */ jsx("div", { slot: "helptext", children: helpText }),
@@ -3441,7 +3406,6 @@ function GoabInput({
3441
3406
  readonly: readonly ? "true" : void 0,
3442
3407
  error: error ? "true" : void 0,
3443
3408
  handletrailingiconclick: onTrailingIconClick ? "true" : "false",
3444
- version: "2",
3445
3409
  children: [
3446
3410
  leadingContent && /* @__PURE__ */ jsx("div", { slot: "leadingContent", children: leadingContent }),
3447
3411
  trailingContent && /* @__PURE__ */ jsx("div", { slot: "trailingContent", children: trailingContent })
@@ -3684,10 +3648,7 @@ function GoabMenuButton({
3684
3648
  current.removeEventListener("_action", listener);
3685
3649
  };
3686
3650
  }, [el, onAction]);
3687
- return (
3688
- // @ts-expect-error - stable WCProps requires text, but experimental supports icon-only mode
3689
- /* @__PURE__ */ jsx("goa-menu-button", { ..._props, version: "2", ref: el, children })
3690
- );
3651
+ return /* @__PURE__ */ jsx("goa-menu-button", { ..._props, ref: el, children });
3691
3652
  }
3692
3653
  function GoabMenuAction(props) {
3693
3654
  const _props = transformProps(props, lowercase);
@@ -3775,7 +3736,6 @@ function GoabModal({
3775
3736
  transition,
3776
3737
  calloutvariant: calloutVariant,
3777
3738
  testid: testId,
3778
- version: "2",
3779
3739
  children: [
3780
3740
  heading && typeof heading !== "string" && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
3781
3741
  actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions }),
@@ -3818,7 +3778,6 @@ const GoabNotification = ({
3818
3778
  arialive: ariaLive,
3819
3779
  emphasis,
3820
3780
  compact: compact ? "true" : void 0,
3821
- version: "2",
3822
3781
  children
3823
3782
  }
3824
3783
  );
@@ -3870,8 +3829,7 @@ function GoabPagination({ onChange, ...props }) {
3870
3829
  mb: props.mb,
3871
3830
  ml: props.ml,
3872
3831
  mr: props.mr,
3873
- testid: props.testId,
3874
- version: "2"
3832
+ testid: props.testId
3875
3833
  }
3876
3834
  );
3877
3835
  }
@@ -3930,7 +3888,6 @@ function GoabPushDrawer({
3930
3888
  heading: typeof heading === "string" ? heading : void 0,
3931
3889
  width,
3932
3890
  testid: testId,
3933
- version: "2",
3934
3891
  children: [
3935
3892
  heading && typeof heading !== "string" && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
3936
3893
  actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions }),
@@ -3976,7 +3933,6 @@ function GoabRadioItem({
3976
3933
  mr,
3977
3934
  mb,
3978
3935
  ml,
3979
- version: "2",
3980
3936
  children: [
3981
3937
  description && typeof description !== "string" && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
3982
3938
  reveal && /* @__PURE__ */ jsx("div", { slot: "reveal", children: reveal }),
@@ -4034,7 +3990,6 @@ function GoabRadioGroup({
4034
3990
  name,
4035
3991
  disabled: disabled ? "true" : void 0,
4036
3992
  error: error ? "true" : void 0,
4037
- version: "2",
4038
3993
  children
4039
3994
  }
4040
3995
  );
@@ -4059,7 +4014,6 @@ function GoabSideMenuGroup({
4059
4014
  mr,
4060
4015
  mb,
4061
4016
  ml,
4062
- version: "2",
4063
4017
  children
4064
4018
  }
4065
4019
  );
@@ -4070,13 +4024,13 @@ function GoabSideMenuHeading({
4070
4024
  icon,
4071
4025
  children
4072
4026
  }) {
4073
- return /* @__PURE__ */ jsxs("goa-side-menu-heading", { icon, testid: testId, version: "2", children: [
4027
+ return /* @__PURE__ */ jsxs("goa-side-menu-heading", { icon, testid: testId, children: [
4074
4028
  children,
4075
4029
  meta && /* @__PURE__ */ jsx("span", { slot: "meta", children: meta })
4076
4030
  ] });
4077
4031
  }
4078
4032
  function GoabSideMenu({ testId, children }) {
4079
- return /* @__PURE__ */ jsx("goa-side-menu", { testid: testId, version: "2", children });
4033
+ return /* @__PURE__ */ jsx("goa-side-menu", { testid: testId, children });
4080
4034
  }
4081
4035
  const GoabSkeleton = ({
4082
4036
  maxWidth,
@@ -4193,7 +4147,6 @@ function GoabTable({ onSort, onMultiSort, sortMode, ...props }) {
4193
4147
  mb: props.mb,
4194
4148
  ml: props.ml,
4195
4149
  mr: props.mr,
4196
- version: "2",
4197
4150
  children: /* @__PURE__ */ jsx("table", { style: { width: "100%" }, children: props.children })
4198
4151
  }
4199
4152
  );
@@ -4211,7 +4164,6 @@ function GoabTableSortHeader({
4211
4164
  name,
4212
4165
  direction,
4213
4166
  "sort-order": sortOrder,
4214
- version: "2",
4215
4167
  ...rest,
4216
4168
  children
4217
4169
  }
@@ -4247,7 +4199,6 @@ function GoabTabs({
4247
4199
  initialtab: initialTab,
4248
4200
  testid: testId,
4249
4201
  variant,
4250
- version: "2",
4251
4202
  orientation,
4252
4203
  navigation,
4253
4204
  children
@@ -4345,7 +4296,6 @@ function GoabTextArea({
4345
4296
  readOnly: readOnly ? "true" : void 0,
4346
4297
  disabled: disabled ? "true" : void 0,
4347
4298
  error: error ? "true" : void 0,
4348
- version: "2",
4349
4299
  ..._props
4350
4300
  }
4351
4301
  );
@@ -4419,7 +4369,6 @@ const GoabFilterChip = ({
4419
4369
  ref: el,
4420
4370
  content: typeof content === "string" ? content : void 0,
4421
4371
  error: error ? "true" : void 0,
4422
- version: "2",
4423
4372
  ..._props,
4424
4373
  children: typeof content !== "string" && content != null && /* @__PURE__ */ jsx("div", { slot: "content", children: content })
4425
4374
  }