@abgov/react-components 7.2.0-dev.21 → 7.2.0-dev.22
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 +1 -0
- package/index.js +64 -0
- package/index.js.map +1 -1
- package/index.mjs +64 -0
- package/index.mjs.map +1 -1
- package/lib/dropdown-multiselect/dropdown-multiselect.d.ts +66 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2892,6 +2892,69 @@ function GoabDropdownItem({
|
|
|
2892
2892
|
}
|
|
2893
2893
|
);
|
|
2894
2894
|
}
|
|
2895
|
+
function GoabDropdownMultiselect({
|
|
2896
|
+
name,
|
|
2897
|
+
value = [],
|
|
2898
|
+
placeholder,
|
|
2899
|
+
disabled,
|
|
2900
|
+
error,
|
|
2901
|
+
filterable,
|
|
2902
|
+
leadingIcon,
|
|
2903
|
+
showSelectAll,
|
|
2904
|
+
testId,
|
|
2905
|
+
ariaLabel,
|
|
2906
|
+
ariaLabelledBy,
|
|
2907
|
+
maxHeight,
|
|
2908
|
+
width,
|
|
2909
|
+
size = "default",
|
|
2910
|
+
labelFormat,
|
|
2911
|
+
children,
|
|
2912
|
+
onChange,
|
|
2913
|
+
mt,
|
|
2914
|
+
mr,
|
|
2915
|
+
mb,
|
|
2916
|
+
ml
|
|
2917
|
+
}) {
|
|
2918
|
+
const el = useRef(null);
|
|
2919
|
+
useEffect(() => {
|
|
2920
|
+
if (!el.current) return;
|
|
2921
|
+
const current = el.current;
|
|
2922
|
+
const listener = (e) => {
|
|
2923
|
+
const detail = e.detail;
|
|
2924
|
+
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
2925
|
+
};
|
|
2926
|
+
current.addEventListener("_change", listener);
|
|
2927
|
+
return () => {
|
|
2928
|
+
current.removeEventListener("_change", listener);
|
|
2929
|
+
};
|
|
2930
|
+
}, [onChange]);
|
|
2931
|
+
return /* @__PURE__ */ jsx(
|
|
2932
|
+
"goa-dropdown-multiselect",
|
|
2933
|
+
{
|
|
2934
|
+
ref: el,
|
|
2935
|
+
name,
|
|
2936
|
+
value,
|
|
2937
|
+
placeholder,
|
|
2938
|
+
disabled: disabled ? "true" : void 0,
|
|
2939
|
+
error: error ? "true" : void 0,
|
|
2940
|
+
filterable: filterable ? "true" : void 0,
|
|
2941
|
+
"leading-icon": leadingIcon,
|
|
2942
|
+
testid: testId,
|
|
2943
|
+
"aria-label": ariaLabel,
|
|
2944
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2945
|
+
"max-height": maxHeight,
|
|
2946
|
+
width,
|
|
2947
|
+
size,
|
|
2948
|
+
"label-format": labelFormat ? labelFormat : void 0,
|
|
2949
|
+
"show-select-all": showSelectAll ? "true" : void 0,
|
|
2950
|
+
mt,
|
|
2951
|
+
mr,
|
|
2952
|
+
mb,
|
|
2953
|
+
ml,
|
|
2954
|
+
children
|
|
2955
|
+
}
|
|
2956
|
+
);
|
|
2957
|
+
}
|
|
2895
2958
|
function GoabFileUploadCard({
|
|
2896
2959
|
onDelete,
|
|
2897
2960
|
onCancel,
|
|
@@ -4697,6 +4760,7 @@ export {
|
|
|
4697
4760
|
GoabDrawer,
|
|
4698
4761
|
GoabDropdown,
|
|
4699
4762
|
GoabDropdownItem,
|
|
4763
|
+
GoabDropdownMultiselect,
|
|
4700
4764
|
GoabDropdownOption,
|
|
4701
4765
|
GoabFieldset,
|
|
4702
4766
|
GoabFileUploadCard,
|