@abgov/react-components 6.5.0 → 6.6.0-alpha.2
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/index.d.ts +4 -0
- package/index.js +108 -4
- package/index.js.map +1 -1
- package/index.mjs +108 -4
- package/index.mjs.map +1 -1
- package/lib/dropdown/dropdown.d.ts +3 -1
- package/lib/file-upload-card/file-upload-card.d.ts +1 -1
- package/lib/form/public-subform-index.d.ts +25 -0
- package/lib/form/public-subform.d.ts +25 -0
- package/{experimental → lib}/form/task.d.ts +3 -3
- package/lib/input/input.d.ts +3 -1
- package/lib/textarea/textarea.d.ts +3 -1
- package/package.json +1 -1
- /package/{experimental → lib}/form/task-list.d.ts +0 -0
package/index.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export * from './lib/form/fieldset';
|
|
|
26
26
|
export * from './lib/form/public-form-page';
|
|
27
27
|
export * from './lib/form/public-form-summary';
|
|
28
28
|
export * from './lib/form/public-form';
|
|
29
|
+
export * from './lib/form/public-subform';
|
|
30
|
+
export * from './lib/form/public-subform-index';
|
|
31
|
+
export * from './lib/form/task';
|
|
32
|
+
export * from './lib/form/task-list';
|
|
29
33
|
export * from './lib/form-item/form-item';
|
|
30
34
|
export * from './lib/form-step/form-step';
|
|
31
35
|
export * from './lib/form-stepper/form-stepper';
|
package/index.js
CHANGED
|
@@ -681,12 +681,17 @@ function GoabDropdown(props) {
|
|
|
681
681
|
}
|
|
682
682
|
const current = el.current;
|
|
683
683
|
const handler = (e) => {
|
|
684
|
+
var _a;
|
|
684
685
|
const detail = e.detail;
|
|
685
|
-
props.onChange(detail);
|
|
686
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, detail);
|
|
686
687
|
};
|
|
687
|
-
|
|
688
|
+
if (props.onChange) {
|
|
689
|
+
current.addEventListener("_change", handler);
|
|
690
|
+
}
|
|
688
691
|
return () => {
|
|
689
|
-
|
|
692
|
+
if (props.onChange) {
|
|
693
|
+
current.removeEventListener("_change", handler);
|
|
694
|
+
}
|
|
690
695
|
};
|
|
691
696
|
}, [el, props]);
|
|
692
697
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -712,6 +717,7 @@ function GoabDropdown(props) {
|
|
|
712
717
|
testid: props.testId,
|
|
713
718
|
width: props.width,
|
|
714
719
|
relative: props.relative ? "true" : void 0,
|
|
720
|
+
autocomplete: props.autoComplete,
|
|
715
721
|
id: props.id,
|
|
716
722
|
children: props.children
|
|
717
723
|
}
|
|
@@ -1042,6 +1048,96 @@ function GoabPublicForm({
|
|
|
1042
1048
|
}
|
|
1043
1049
|
);
|
|
1044
1050
|
}
|
|
1051
|
+
function GoabPublicSubform({
|
|
1052
|
+
id = "",
|
|
1053
|
+
name = "",
|
|
1054
|
+
continueMsg = "",
|
|
1055
|
+
onInit,
|
|
1056
|
+
onStateChange,
|
|
1057
|
+
children,
|
|
1058
|
+
mt,
|
|
1059
|
+
mr,
|
|
1060
|
+
mb,
|
|
1061
|
+
ml
|
|
1062
|
+
}) {
|
|
1063
|
+
const ref = react.useRef(null);
|
|
1064
|
+
react.useEffect(() => {
|
|
1065
|
+
if (!ref.current) return;
|
|
1066
|
+
const current = ref.current;
|
|
1067
|
+
const initListener = (e) => {
|
|
1068
|
+
onInit == null ? void 0 : onInit(e);
|
|
1069
|
+
};
|
|
1070
|
+
const stateChangeListener = (e) => {
|
|
1071
|
+
onStateChange == null ? void 0 : onStateChange(e);
|
|
1072
|
+
};
|
|
1073
|
+
if (onInit) {
|
|
1074
|
+
current.addEventListener("_init", initListener);
|
|
1075
|
+
}
|
|
1076
|
+
if (onStateChange) {
|
|
1077
|
+
current.addEventListener("_stateChange", stateChangeListener);
|
|
1078
|
+
}
|
|
1079
|
+
return () => {
|
|
1080
|
+
if (onInit) {
|
|
1081
|
+
current.removeEventListener("_init", initListener);
|
|
1082
|
+
}
|
|
1083
|
+
if (onStateChange) {
|
|
1084
|
+
current.removeEventListener("_stateChange", stateChangeListener);
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
}, [ref, onInit, onStateChange]);
|
|
1088
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1089
|
+
"goa-public-subform",
|
|
1090
|
+
{
|
|
1091
|
+
ref,
|
|
1092
|
+
id,
|
|
1093
|
+
name,
|
|
1094
|
+
"continue-msg": continueMsg,
|
|
1095
|
+
mt,
|
|
1096
|
+
mr,
|
|
1097
|
+
mb,
|
|
1098
|
+
ml,
|
|
1099
|
+
children
|
|
1100
|
+
}
|
|
1101
|
+
);
|
|
1102
|
+
}
|
|
1103
|
+
function GoabPublicSubformIndex({
|
|
1104
|
+
heading = "",
|
|
1105
|
+
sectionTitle = "",
|
|
1106
|
+
actionButtonText = "",
|
|
1107
|
+
buttonVisibility = "hidden",
|
|
1108
|
+
children,
|
|
1109
|
+
mt,
|
|
1110
|
+
mr,
|
|
1111
|
+
mb,
|
|
1112
|
+
ml
|
|
1113
|
+
}) {
|
|
1114
|
+
const ref = react.useRef(null);
|
|
1115
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1116
|
+
"goa-public-subform-index",
|
|
1117
|
+
{
|
|
1118
|
+
ref,
|
|
1119
|
+
heading,
|
|
1120
|
+
"section-title": sectionTitle,
|
|
1121
|
+
"action-button-text": actionButtonText,
|
|
1122
|
+
"button-visibility": buttonVisibility,
|
|
1123
|
+
slot: "subform-index",
|
|
1124
|
+
mt,
|
|
1125
|
+
mr,
|
|
1126
|
+
mb,
|
|
1127
|
+
ml,
|
|
1128
|
+
children
|
|
1129
|
+
}
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
function GoabPublicFormTask({ status, children }) {
|
|
1133
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-task", { status, children });
|
|
1134
|
+
}
|
|
1135
|
+
function GoabPublicFormTaskList({
|
|
1136
|
+
heading,
|
|
1137
|
+
children
|
|
1138
|
+
}) {
|
|
1139
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-task-list", { heading, children });
|
|
1140
|
+
}
|
|
1045
1141
|
function GoabFormItem({
|
|
1046
1142
|
children,
|
|
1047
1143
|
helpText,
|
|
@@ -2844,6 +2940,7 @@ function GoabInput({
|
|
|
2844
2940
|
name,
|
|
2845
2941
|
type,
|
|
2846
2942
|
autoCapitalize,
|
|
2943
|
+
autoComplete,
|
|
2847
2944
|
leadingIcon,
|
|
2848
2945
|
trailingIcon,
|
|
2849
2946
|
variant = "goa",
|
|
@@ -2923,6 +3020,7 @@ function GoabInput({
|
|
|
2923
3020
|
type,
|
|
2924
3021
|
name,
|
|
2925
3022
|
autocapitalize: autoCapitalize,
|
|
3023
|
+
autocomplete: autoComplete,
|
|
2926
3024
|
id,
|
|
2927
3025
|
leadingicon: leadingIcon,
|
|
2928
3026
|
trailingicon: trailingIcon,
|
|
@@ -3634,6 +3732,7 @@ function GoabTextArea({
|
|
|
3634
3732
|
mr,
|
|
3635
3733
|
mb,
|
|
3636
3734
|
ml,
|
|
3735
|
+
autoComplete,
|
|
3637
3736
|
onChange,
|
|
3638
3737
|
onKeyPress
|
|
3639
3738
|
}) {
|
|
@@ -3690,7 +3789,8 @@ function GoabTextArea({
|
|
|
3690
3789
|
mt,
|
|
3691
3790
|
mr,
|
|
3692
3791
|
mb,
|
|
3693
|
-
ml
|
|
3792
|
+
ml,
|
|
3793
|
+
autocomplete: autoComplete
|
|
3694
3794
|
}
|
|
3695
3795
|
);
|
|
3696
3796
|
}
|
|
@@ -4164,6 +4264,10 @@ exports.GoabPopover = GoabPopover;
|
|
|
4164
4264
|
exports.GoabPublicForm = GoabPublicForm;
|
|
4165
4265
|
exports.GoabPublicFormPage = GoabPublicFormPage;
|
|
4166
4266
|
exports.GoabPublicFormSummary = GoabPublicFormSummary;
|
|
4267
|
+
exports.GoabPublicFormTask = GoabPublicFormTask;
|
|
4268
|
+
exports.GoabPublicFormTaskList = GoabPublicFormTaskList;
|
|
4269
|
+
exports.GoabPublicSubform = GoabPublicSubform;
|
|
4270
|
+
exports.GoabPublicSubformIndex = GoabPublicSubformIndex;
|
|
4167
4271
|
exports.GoabRadioGroup = GoabRadioGroup;
|
|
4168
4272
|
exports.GoabRadioItem = GoabRadioItem;
|
|
4169
4273
|
exports.GoabSideMenu = GoabSideMenu;
|