@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.mjs
CHANGED
|
@@ -679,12 +679,17 @@ function GoabDropdown(props) {
|
|
|
679
679
|
}
|
|
680
680
|
const current = el.current;
|
|
681
681
|
const handler = (e) => {
|
|
682
|
+
var _a;
|
|
682
683
|
const detail = e.detail;
|
|
683
|
-
props.onChange(detail);
|
|
684
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, detail);
|
|
684
685
|
};
|
|
685
|
-
|
|
686
|
+
if (props.onChange) {
|
|
687
|
+
current.addEventListener("_change", handler);
|
|
688
|
+
}
|
|
686
689
|
return () => {
|
|
687
|
-
|
|
690
|
+
if (props.onChange) {
|
|
691
|
+
current.removeEventListener("_change", handler);
|
|
692
|
+
}
|
|
688
693
|
};
|
|
689
694
|
}, [el, props]);
|
|
690
695
|
return /* @__PURE__ */ jsx(
|
|
@@ -710,6 +715,7 @@ function GoabDropdown(props) {
|
|
|
710
715
|
testid: props.testId,
|
|
711
716
|
width: props.width,
|
|
712
717
|
relative: props.relative ? "true" : void 0,
|
|
718
|
+
autocomplete: props.autoComplete,
|
|
713
719
|
id: props.id,
|
|
714
720
|
children: props.children
|
|
715
721
|
}
|
|
@@ -1040,6 +1046,96 @@ function GoabPublicForm({
|
|
|
1040
1046
|
}
|
|
1041
1047
|
);
|
|
1042
1048
|
}
|
|
1049
|
+
function GoabPublicSubform({
|
|
1050
|
+
id = "",
|
|
1051
|
+
name = "",
|
|
1052
|
+
continueMsg = "",
|
|
1053
|
+
onInit,
|
|
1054
|
+
onStateChange,
|
|
1055
|
+
children,
|
|
1056
|
+
mt,
|
|
1057
|
+
mr,
|
|
1058
|
+
mb,
|
|
1059
|
+
ml
|
|
1060
|
+
}) {
|
|
1061
|
+
const ref = useRef(null);
|
|
1062
|
+
useEffect(() => {
|
|
1063
|
+
if (!ref.current) return;
|
|
1064
|
+
const current = ref.current;
|
|
1065
|
+
const initListener = (e) => {
|
|
1066
|
+
onInit == null ? void 0 : onInit(e);
|
|
1067
|
+
};
|
|
1068
|
+
const stateChangeListener = (e) => {
|
|
1069
|
+
onStateChange == null ? void 0 : onStateChange(e);
|
|
1070
|
+
};
|
|
1071
|
+
if (onInit) {
|
|
1072
|
+
current.addEventListener("_init", initListener);
|
|
1073
|
+
}
|
|
1074
|
+
if (onStateChange) {
|
|
1075
|
+
current.addEventListener("_stateChange", stateChangeListener);
|
|
1076
|
+
}
|
|
1077
|
+
return () => {
|
|
1078
|
+
if (onInit) {
|
|
1079
|
+
current.removeEventListener("_init", initListener);
|
|
1080
|
+
}
|
|
1081
|
+
if (onStateChange) {
|
|
1082
|
+
current.removeEventListener("_stateChange", stateChangeListener);
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
}, [ref, onInit, onStateChange]);
|
|
1086
|
+
return /* @__PURE__ */ jsx(
|
|
1087
|
+
"goa-public-subform",
|
|
1088
|
+
{
|
|
1089
|
+
ref,
|
|
1090
|
+
id,
|
|
1091
|
+
name,
|
|
1092
|
+
"continue-msg": continueMsg,
|
|
1093
|
+
mt,
|
|
1094
|
+
mr,
|
|
1095
|
+
mb,
|
|
1096
|
+
ml,
|
|
1097
|
+
children
|
|
1098
|
+
}
|
|
1099
|
+
);
|
|
1100
|
+
}
|
|
1101
|
+
function GoabPublicSubformIndex({
|
|
1102
|
+
heading = "",
|
|
1103
|
+
sectionTitle = "",
|
|
1104
|
+
actionButtonText = "",
|
|
1105
|
+
buttonVisibility = "hidden",
|
|
1106
|
+
children,
|
|
1107
|
+
mt,
|
|
1108
|
+
mr,
|
|
1109
|
+
mb,
|
|
1110
|
+
ml
|
|
1111
|
+
}) {
|
|
1112
|
+
const ref = useRef(null);
|
|
1113
|
+
return /* @__PURE__ */ jsx(
|
|
1114
|
+
"goa-public-subform-index",
|
|
1115
|
+
{
|
|
1116
|
+
ref,
|
|
1117
|
+
heading,
|
|
1118
|
+
"section-title": sectionTitle,
|
|
1119
|
+
"action-button-text": actionButtonText,
|
|
1120
|
+
"button-visibility": buttonVisibility,
|
|
1121
|
+
slot: "subform-index",
|
|
1122
|
+
mt,
|
|
1123
|
+
mr,
|
|
1124
|
+
mb,
|
|
1125
|
+
ml,
|
|
1126
|
+
children
|
|
1127
|
+
}
|
|
1128
|
+
);
|
|
1129
|
+
}
|
|
1130
|
+
function GoabPublicFormTask({ status, children }) {
|
|
1131
|
+
return /* @__PURE__ */ jsx("goa-public-form-task", { status, children });
|
|
1132
|
+
}
|
|
1133
|
+
function GoabPublicFormTaskList({
|
|
1134
|
+
heading,
|
|
1135
|
+
children
|
|
1136
|
+
}) {
|
|
1137
|
+
return /* @__PURE__ */ jsx("goa-public-form-task-list", { heading, children });
|
|
1138
|
+
}
|
|
1043
1139
|
function GoabFormItem({
|
|
1044
1140
|
children,
|
|
1045
1141
|
helpText,
|
|
@@ -2842,6 +2938,7 @@ function GoabInput({
|
|
|
2842
2938
|
name,
|
|
2843
2939
|
type,
|
|
2844
2940
|
autoCapitalize,
|
|
2941
|
+
autoComplete,
|
|
2845
2942
|
leadingIcon,
|
|
2846
2943
|
trailingIcon,
|
|
2847
2944
|
variant = "goa",
|
|
@@ -2921,6 +3018,7 @@ function GoabInput({
|
|
|
2921
3018
|
type,
|
|
2922
3019
|
name,
|
|
2923
3020
|
autocapitalize: autoCapitalize,
|
|
3021
|
+
autocomplete: autoComplete,
|
|
2924
3022
|
id,
|
|
2925
3023
|
leadingicon: leadingIcon,
|
|
2926
3024
|
trailingicon: trailingIcon,
|
|
@@ -3632,6 +3730,7 @@ function GoabTextArea({
|
|
|
3632
3730
|
mr,
|
|
3633
3731
|
mb,
|
|
3634
3732
|
ml,
|
|
3733
|
+
autoComplete,
|
|
3635
3734
|
onChange,
|
|
3636
3735
|
onKeyPress
|
|
3637
3736
|
}) {
|
|
@@ -3688,7 +3787,8 @@ function GoabTextArea({
|
|
|
3688
3787
|
mt,
|
|
3689
3788
|
mr,
|
|
3690
3789
|
mb,
|
|
3691
|
-
ml
|
|
3790
|
+
ml,
|
|
3791
|
+
autocomplete: autoComplete
|
|
3692
3792
|
}
|
|
3693
3793
|
);
|
|
3694
3794
|
}
|
|
@@ -4163,6 +4263,10 @@ export {
|
|
|
4163
4263
|
GoabPublicForm,
|
|
4164
4264
|
GoabPublicFormPage,
|
|
4165
4265
|
GoabPublicFormSummary,
|
|
4266
|
+
GoabPublicFormTask,
|
|
4267
|
+
GoabPublicFormTaskList,
|
|
4268
|
+
GoabPublicSubform,
|
|
4269
|
+
GoabPublicSubformIndex,
|
|
4166
4270
|
GoabRadioGroup,
|
|
4167
4271
|
GoabRadioItem,
|
|
4168
4272
|
GoabSideMenu,
|