@abgov/react-components 7.2.0-dev.21 → 7.2.0-dev.23
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 +80 -5
- package/index.js.map +1 -1
- package/index.mjs +80 -5
- package/index.mjs.map +1 -1
- package/lib/dropdown-multiselect/dropdown-multiselect.d.ts +66 -0
- package/lib/scroll-panel/scroll-panel.d.ts +9 -2
- 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,
|
|
@@ -4068,14 +4131,25 @@ function GoabScrollPanel({
|
|
|
4068
4131
|
footer,
|
|
4069
4132
|
height,
|
|
4070
4133
|
testId,
|
|
4134
|
+
direction = "vertical",
|
|
4071
4135
|
...rest
|
|
4072
4136
|
}) {
|
|
4073
4137
|
const hostStyle = height ? { height } : void 0;
|
|
4074
|
-
return /* @__PURE__ */ jsxs(
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4138
|
+
return /* @__PURE__ */ jsxs(
|
|
4139
|
+
"goa-scroll-panel",
|
|
4140
|
+
{
|
|
4141
|
+
height,
|
|
4142
|
+
testid: testId,
|
|
4143
|
+
direction,
|
|
4144
|
+
style: hostStyle,
|
|
4145
|
+
...rest,
|
|
4146
|
+
children: [
|
|
4147
|
+
header && /* @__PURE__ */ jsx("div", { slot: "header", children: header }),
|
|
4148
|
+
children,
|
|
4149
|
+
footer && /* @__PURE__ */ jsx("div", { slot: "footer", children: footer })
|
|
4150
|
+
]
|
|
4151
|
+
}
|
|
4152
|
+
);
|
|
4079
4153
|
}
|
|
4080
4154
|
function GoabTable({ onSort, onMultiSort, sortMode, ...props }) {
|
|
4081
4155
|
const ref = useRef(null);
|
|
@@ -4697,6 +4771,7 @@ export {
|
|
|
4697
4771
|
GoabDrawer,
|
|
4698
4772
|
GoabDropdown,
|
|
4699
4773
|
GoabDropdownItem,
|
|
4774
|
+
GoabDropdownMultiselect,
|
|
4700
4775
|
GoabDropdownOption,
|
|
4701
4776
|
GoabFieldset,
|
|
4702
4777
|
GoabFileUploadCard,
|