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