@abgov/react-components 7.4.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.
- package/README.md +2 -4
- package/index.js +26 -74
- package/index.js.map +1 -1
- package/index.mjs +26 -74
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +3 -3
- package/lib/app-header/app-header.d.ts +2 -11
- package/lib/badge/badge.d.ts +0 -1
- package/lib/button/button.d.ts +5 -3
- package/lib/button-group/button-group.d.ts +3 -3
- package/lib/calendar/calendar.d.ts +0 -1
- package/lib/callout/callout.d.ts +2 -6
- package/lib/checkbox/checkbox.d.ts +4 -5
- package/lib/checkbox-list/checkbox-list.d.ts +7 -5
- package/lib/data-grid/data-grid.d.ts +2 -2
- package/lib/date-picker/date-picker.d.ts +3 -4
- package/lib/drawer/drawer.d.ts +1 -2
- package/lib/dropdown/dropdown-item.d.ts +1 -1
- package/lib/dropdown/dropdown.d.ts +5 -3
- package/lib/file-upload-card/file-upload-card.d.ts +0 -1
- package/lib/file-upload-input/file-upload-input.d.ts +0 -1
- package/lib/filter-chip/filter-chip.d.ts +0 -1
- package/lib/footer/footer.d.ts +0 -4
- package/lib/form-item/form-item.d.ts +0 -1
- package/lib/icon/icon.d.ts +4 -1
- package/lib/input/input.d.ts +6 -4
- package/lib/modal/modal.d.ts +0 -1
- package/lib/notification/notification.d.ts +0 -1
- package/lib/pagination/pagination.d.ts +0 -1
- package/lib/push-drawer/push-drawer.d.ts +0 -1
- package/lib/radio-group/radio-group.d.ts +3 -4
- package/lib/radio-group/radio.d.ts +3 -4
- package/lib/side-menu/side-menu.d.ts +0 -1
- package/lib/side-menu-group/side-menu-group.d.ts +0 -1
- package/lib/side-menu-heading/side-menu-heading.d.ts +0 -1
- package/lib/table/table-sort-header.d.ts +0 -1
- package/lib/table/table.d.ts +0 -1
- package/lib/tabs/tabs.d.ts +0 -1
- package/lib/text/text.d.ts +1 -1
- package/lib/textarea/textarea.d.ts +4 -5
- 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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
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 })
|
|
@@ -172,6 +143,7 @@ function GoabButton({
|
|
|
172
143
|
onClick,
|
|
173
144
|
actionArgs,
|
|
174
145
|
actionArg,
|
|
146
|
+
ariaLabel,
|
|
175
147
|
children,
|
|
176
148
|
...rest
|
|
177
149
|
}) {
|
|
@@ -200,17 +172,18 @@ function GoabButton({
|
|
|
200
172
|
disabled: disabled ? "true" : void 0,
|
|
201
173
|
"action-arg": actionArg,
|
|
202
174
|
"action-args": JSON.stringify(actionArgs),
|
|
175
|
+
arialabel: ariaLabel || void 0,
|
|
203
176
|
..._props,
|
|
204
|
-
version: "2",
|
|
205
177
|
children
|
|
206
178
|
}
|
|
207
179
|
);
|
|
208
180
|
}
|
|
209
181
|
function GoabButtonGroup({
|
|
210
182
|
children,
|
|
183
|
+
alignment = "start",
|
|
211
184
|
...rest
|
|
212
185
|
}) {
|
|
213
|
-
const _props = transformProps(rest, lowercase);
|
|
186
|
+
const _props = transformProps({ alignment, ...rest }, lowercase);
|
|
214
187
|
return /* @__PURE__ */ jsx("goa-button-group", { ..._props, children });
|
|
215
188
|
}
|
|
216
189
|
function GoabCalendar({
|
|
@@ -245,7 +218,6 @@ function GoabCalendar({
|
|
|
245
218
|
name,
|
|
246
219
|
min: min || void 0,
|
|
247
220
|
max: max || void 0,
|
|
248
|
-
version: "2",
|
|
249
221
|
..._props
|
|
250
222
|
}
|
|
251
223
|
);
|
|
@@ -253,17 +225,16 @@ function GoabCalendar({
|
|
|
253
225
|
const GoabCallout = ({
|
|
254
226
|
type = "information",
|
|
255
227
|
iconTheme = "outline",
|
|
256
|
-
size = "large",
|
|
257
228
|
ariaLive = "off",
|
|
258
229
|
emphasis = "medium",
|
|
259
230
|
children,
|
|
260
231
|
...rest
|
|
261
232
|
}) => {
|
|
262
233
|
const _props = transformProps(
|
|
263
|
-
{ type, icontheme: iconTheme,
|
|
234
|
+
{ type, icontheme: iconTheme, arialive: ariaLive, emphasis, ...rest },
|
|
264
235
|
lowercase
|
|
265
236
|
);
|
|
266
|
-
return /* @__PURE__ */ jsx("goa-callout", { ..._props,
|
|
237
|
+
return /* @__PURE__ */ jsx("goa-callout", { ..._props, children });
|
|
267
238
|
};
|
|
268
239
|
function GoabCheckbox({
|
|
269
240
|
error,
|
|
@@ -321,7 +292,6 @@ function GoabCheckbox({
|
|
|
321
292
|
disabled: disabled ? "true" : void 0,
|
|
322
293
|
value: typeof value === "boolean" ? value ? "true" : void 0 : value,
|
|
323
294
|
description: typeof description === "string" ? description : void 0,
|
|
324
|
-
version: "2",
|
|
325
295
|
children: [
|
|
326
296
|
children,
|
|
327
297
|
typeof description !== "string" && description && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
|
|
@@ -338,6 +308,7 @@ function GoabCheckboxList({
|
|
|
338
308
|
testId,
|
|
339
309
|
maxWidth,
|
|
340
310
|
size = "default",
|
|
311
|
+
ariaLabel,
|
|
341
312
|
children,
|
|
342
313
|
onChange,
|
|
343
314
|
onFocus,
|
|
@@ -382,8 +353,8 @@ function GoabCheckboxList({
|
|
|
382
353
|
error: error ? "true" : void 0,
|
|
383
354
|
testid: testId,
|
|
384
355
|
maxwidth: maxWidth,
|
|
385
|
-
version: "2",
|
|
386
356
|
size,
|
|
357
|
+
arialabel: ariaLabel,
|
|
387
358
|
mt,
|
|
388
359
|
mr,
|
|
389
360
|
mb,
|
|
@@ -455,7 +426,7 @@ function GoabContainer({
|
|
|
455
426
|
function GoabDataGrid({
|
|
456
427
|
keyboardIconVisibility = "visible",
|
|
457
428
|
keyboardIconPosition = "left",
|
|
458
|
-
keyboardNav,
|
|
429
|
+
keyboardNav = "table",
|
|
459
430
|
children
|
|
460
431
|
}) {
|
|
461
432
|
return /* @__PURE__ */ jsx(
|
|
@@ -2730,7 +2701,6 @@ function GoabDatePicker({
|
|
|
2730
2701
|
min: formatValue(min) || void 0,
|
|
2731
2702
|
max: formatValue(max) || void 0,
|
|
2732
2703
|
relative: relative ? "true" : void 0,
|
|
2733
|
-
version: "2",
|
|
2734
2704
|
..._props
|
|
2735
2705
|
}
|
|
2736
2706
|
);
|
|
@@ -2753,7 +2723,7 @@ function GoabDivider(props) {
|
|
|
2753
2723
|
}
|
|
2754
2724
|
function GoabDrawer({
|
|
2755
2725
|
position,
|
|
2756
|
-
open,
|
|
2726
|
+
open = false,
|
|
2757
2727
|
heading,
|
|
2758
2728
|
maxSize,
|
|
2759
2729
|
testId,
|
|
@@ -2787,7 +2757,6 @@ function GoabDrawer({
|
|
|
2787
2757
|
heading: typeof heading === "string" ? heading : void 0,
|
|
2788
2758
|
maxsize: maxSize,
|
|
2789
2759
|
testid: testId,
|
|
2790
|
-
version: "2",
|
|
2791
2760
|
children: [
|
|
2792
2761
|
heading && typeof heading !== "string" && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
|
|
2793
2762
|
actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions }),
|
|
@@ -2864,7 +2833,6 @@ function GoabDropdown({
|
|
|
2864
2833
|
native: native ? "true" : void 0,
|
|
2865
2834
|
relative: relative ? "true" : void 0,
|
|
2866
2835
|
..._props,
|
|
2867
|
-
version: "2",
|
|
2868
2836
|
children
|
|
2869
2837
|
}
|
|
2870
2838
|
);
|
|
@@ -2978,7 +2946,7 @@ function GoabFileUploadCard({
|
|
|
2978
2946
|
current.removeEventListener("_cancel", cancelHandler);
|
|
2979
2947
|
};
|
|
2980
2948
|
}, [el, onDelete, onCancel, filename]);
|
|
2981
|
-
return /* @__PURE__ */ jsx("goa-file-upload-card", { ref: el, ..._props
|
|
2949
|
+
return /* @__PURE__ */ jsx("goa-file-upload-card", { ref: el, ..._props });
|
|
2982
2950
|
}
|
|
2983
2951
|
function GoabFileUploadInput({ onSelectFile, ...rest }) {
|
|
2984
2952
|
const el = useRef(null);
|
|
@@ -2995,11 +2963,11 @@ function GoabFileUploadInput({ onSelectFile, ...rest }) {
|
|
|
2995
2963
|
current.removeEventListener("_selectFile", handler);
|
|
2996
2964
|
};
|
|
2997
2965
|
}, [el, onSelectFile]);
|
|
2998
|
-
return /* @__PURE__ */ jsx("goa-file-upload-input", { ref: el, ..._props
|
|
2966
|
+
return /* @__PURE__ */ jsx("goa-file-upload-input", { ref: el, ..._props });
|
|
2999
2967
|
}
|
|
3000
2968
|
function GoabAppFooter({ children, ...rest }) {
|
|
3001
2969
|
const _props = transformProps(rest, lowercase);
|
|
3002
|
-
return /* @__PURE__ */ jsx("goa-app-footer", { ..._props,
|
|
2970
|
+
return /* @__PURE__ */ jsx("goa-app-footer", { ..._props, children });
|
|
3003
2971
|
}
|
|
3004
2972
|
function GoabAppFooterMetaSection({
|
|
3005
2973
|
children,
|
|
@@ -3209,7 +3177,6 @@ function GoabFormItem({
|
|
|
3209
3177
|
helptext: typeof helpText === "string" ? helpText : void 0,
|
|
3210
3178
|
"public-form-summary-order": publicFormSummaryOrder,
|
|
3211
3179
|
..._props,
|
|
3212
|
-
version: "2",
|
|
3213
3180
|
children: [
|
|
3214
3181
|
error && typeof error !== "string" && /* @__PURE__ */ jsx("div", { slot: "error", children: error }),
|
|
3215
3182
|
helpText && typeof helpText !== "string" && /* @__PURE__ */ jsx("div", { slot: "helptext", children: helpText }),
|
|
@@ -3359,12 +3326,13 @@ function GoabIconButton({
|
|
|
3359
3326
|
}
|
|
3360
3327
|
);
|
|
3361
3328
|
}
|
|
3362
|
-
function GoabIcon({ inverted, ...rest }) {
|
|
3329
|
+
function GoabIcon({ inverted, ariaHidden, ...rest }) {
|
|
3363
3330
|
const _props = transformProps(rest, lowercase);
|
|
3364
3331
|
return /* @__PURE__ */ jsx(
|
|
3365
3332
|
"goa-icon",
|
|
3366
3333
|
{
|
|
3367
3334
|
inverted: typeof inverted === "boolean" ? inverted ? "true" : void 0 : inverted,
|
|
3335
|
+
ariahidden: ariaHidden ? "true" : void 0,
|
|
3368
3336
|
..._props
|
|
3369
3337
|
}
|
|
3370
3338
|
);
|
|
@@ -3438,7 +3406,6 @@ function GoabInput({
|
|
|
3438
3406
|
readonly: readonly ? "true" : void 0,
|
|
3439
3407
|
error: error ? "true" : void 0,
|
|
3440
3408
|
handletrailingiconclick: onTrailingIconClick ? "true" : "false",
|
|
3441
|
-
version: "2",
|
|
3442
3409
|
children: [
|
|
3443
3410
|
leadingContent && /* @__PURE__ */ jsx("div", { slot: "leadingContent", children: leadingContent }),
|
|
3444
3411
|
trailingContent && /* @__PURE__ */ jsx("div", { slot: "trailingContent", children: trailingContent })
|
|
@@ -3681,10 +3648,7 @@ function GoabMenuButton({
|
|
|
3681
3648
|
current.removeEventListener("_action", listener);
|
|
3682
3649
|
};
|
|
3683
3650
|
}, [el, onAction]);
|
|
3684
|
-
return (
|
|
3685
|
-
// @ts-expect-error - stable WCProps requires text, but experimental supports icon-only mode
|
|
3686
|
-
/* @__PURE__ */ jsx("goa-menu-button", { ..._props, version: "2", ref: el, children })
|
|
3687
|
-
);
|
|
3651
|
+
return /* @__PURE__ */ jsx("goa-menu-button", { ..._props, ref: el, children });
|
|
3688
3652
|
}
|
|
3689
3653
|
function GoabMenuAction(props) {
|
|
3690
3654
|
const _props = transformProps(props, lowercase);
|
|
@@ -3772,7 +3736,6 @@ function GoabModal({
|
|
|
3772
3736
|
transition,
|
|
3773
3737
|
calloutvariant: calloutVariant,
|
|
3774
3738
|
testid: testId,
|
|
3775
|
-
version: "2",
|
|
3776
3739
|
children: [
|
|
3777
3740
|
heading && typeof heading !== "string" && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
|
|
3778
3741
|
actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions }),
|
|
@@ -3815,7 +3778,6 @@ const GoabNotification = ({
|
|
|
3815
3778
|
arialive: ariaLive,
|
|
3816
3779
|
emphasis,
|
|
3817
3780
|
compact: compact ? "true" : void 0,
|
|
3818
|
-
version: "2",
|
|
3819
3781
|
children
|
|
3820
3782
|
}
|
|
3821
3783
|
);
|
|
@@ -3867,8 +3829,7 @@ function GoabPagination({ onChange, ...props }) {
|
|
|
3867
3829
|
mb: props.mb,
|
|
3868
3830
|
ml: props.ml,
|
|
3869
3831
|
mr: props.mr,
|
|
3870
|
-
testid: props.testId
|
|
3871
|
-
version: "2"
|
|
3832
|
+
testid: props.testId
|
|
3872
3833
|
}
|
|
3873
3834
|
);
|
|
3874
3835
|
}
|
|
@@ -3927,7 +3888,6 @@ function GoabPushDrawer({
|
|
|
3927
3888
|
heading: typeof heading === "string" ? heading : void 0,
|
|
3928
3889
|
width,
|
|
3929
3890
|
testid: testId,
|
|
3930
|
-
version: "2",
|
|
3931
3891
|
children: [
|
|
3932
3892
|
heading && typeof heading !== "string" && /* @__PURE__ */ jsx("div", { slot: "heading", children: heading }),
|
|
3933
3893
|
actions && /* @__PURE__ */ jsx("div", { slot: "actions", children: actions }),
|
|
@@ -3973,7 +3933,6 @@ function GoabRadioItem({
|
|
|
3973
3933
|
mr,
|
|
3974
3934
|
mb,
|
|
3975
3935
|
ml,
|
|
3976
|
-
version: "2",
|
|
3977
3936
|
children: [
|
|
3978
3937
|
description && typeof description !== "string" && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
|
|
3979
3938
|
reveal && /* @__PURE__ */ jsx("div", { slot: "reveal", children: reveal }),
|
|
@@ -4031,7 +3990,6 @@ function GoabRadioGroup({
|
|
|
4031
3990
|
name,
|
|
4032
3991
|
disabled: disabled ? "true" : void 0,
|
|
4033
3992
|
error: error ? "true" : void 0,
|
|
4034
|
-
version: "2",
|
|
4035
3993
|
children
|
|
4036
3994
|
}
|
|
4037
3995
|
);
|
|
@@ -4056,7 +4014,6 @@ function GoabSideMenuGroup({
|
|
|
4056
4014
|
mr,
|
|
4057
4015
|
mb,
|
|
4058
4016
|
ml,
|
|
4059
|
-
version: "2",
|
|
4060
4017
|
children
|
|
4061
4018
|
}
|
|
4062
4019
|
);
|
|
@@ -4067,13 +4024,13 @@ function GoabSideMenuHeading({
|
|
|
4067
4024
|
icon,
|
|
4068
4025
|
children
|
|
4069
4026
|
}) {
|
|
4070
|
-
return /* @__PURE__ */ jsxs("goa-side-menu-heading", { icon, testid: testId,
|
|
4027
|
+
return /* @__PURE__ */ jsxs("goa-side-menu-heading", { icon, testid: testId, children: [
|
|
4071
4028
|
children,
|
|
4072
4029
|
meta && /* @__PURE__ */ jsx("span", { slot: "meta", children: meta })
|
|
4073
4030
|
] });
|
|
4074
4031
|
}
|
|
4075
4032
|
function GoabSideMenu({ testId, children }) {
|
|
4076
|
-
return /* @__PURE__ */ jsx("goa-side-menu", { testid: testId,
|
|
4033
|
+
return /* @__PURE__ */ jsx("goa-side-menu", { testid: testId, children });
|
|
4077
4034
|
}
|
|
4078
4035
|
const GoabSkeleton = ({
|
|
4079
4036
|
maxWidth,
|
|
@@ -4190,7 +4147,6 @@ function GoabTable({ onSort, onMultiSort, sortMode, ...props }) {
|
|
|
4190
4147
|
mb: props.mb,
|
|
4191
4148
|
ml: props.ml,
|
|
4192
4149
|
mr: props.mr,
|
|
4193
|
-
version: "2",
|
|
4194
4150
|
children: /* @__PURE__ */ jsx("table", { style: { width: "100%" }, children: props.children })
|
|
4195
4151
|
}
|
|
4196
4152
|
);
|
|
@@ -4208,7 +4164,6 @@ function GoabTableSortHeader({
|
|
|
4208
4164
|
name,
|
|
4209
4165
|
direction,
|
|
4210
4166
|
"sort-order": sortOrder,
|
|
4211
|
-
version: "2",
|
|
4212
4167
|
...rest,
|
|
4213
4168
|
children
|
|
4214
4169
|
}
|
|
@@ -4244,7 +4199,6 @@ function GoabTabs({
|
|
|
4244
4199
|
initialtab: initialTab,
|
|
4245
4200
|
testid: testId,
|
|
4246
4201
|
variant,
|
|
4247
|
-
version: "2",
|
|
4248
4202
|
orientation,
|
|
4249
4203
|
navigation,
|
|
4250
4204
|
children
|
|
@@ -4342,7 +4296,6 @@ function GoabTextArea({
|
|
|
4342
4296
|
readOnly: readOnly ? "true" : void 0,
|
|
4343
4297
|
disabled: disabled ? "true" : void 0,
|
|
4344
4298
|
error: error ? "true" : void 0,
|
|
4345
|
-
version: "2",
|
|
4346
4299
|
..._props
|
|
4347
4300
|
}
|
|
4348
4301
|
);
|
|
@@ -4416,7 +4369,6 @@ const GoabFilterChip = ({
|
|
|
4416
4369
|
ref: el,
|
|
4417
4370
|
content: typeof content === "string" ? content : void 0,
|
|
4418
4371
|
error: error ? "true" : void 0,
|
|
4419
|
-
version: "2",
|
|
4420
4372
|
..._props,
|
|
4421
4373
|
children: typeof content !== "string" && content != null && /* @__PURE__ */ jsx("div", { slot: "content", children: content })
|
|
4422
4374
|
}
|