@abgov/react-components 6.8.0 → 6.9.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.js CHANGED
@@ -790,6 +790,7 @@ function GoabDropdown(props) {
790
790
  placeholder: props.placeholder,
791
791
  testid: props.testId,
792
792
  width: props.width,
793
+ maxwidth: props.maxWidth,
793
794
  relative: props.relative ? "true" : void 0,
794
795
  autocomplete: props.autoComplete,
795
796
  id: props.id,
@@ -3820,7 +3821,8 @@ function GoabTextArea({
3820
3821
  ml,
3821
3822
  autoComplete,
3822
3823
  onChange,
3823
- onKeyPress
3824
+ onKeyPress,
3825
+ onBlur
3824
3826
  }) {
3825
3827
  const el = react.useRef(null);
3826
3828
  react.useEffect(() => {
@@ -3828,33 +3830,27 @@ function GoabTextArea({
3828
3830
  return;
3829
3831
  }
3830
3832
  const current = el.current;
3831
- const listener = (e) => {
3833
+ const changeListener = (e) => {
3832
3834
  const detail = e.detail;
3833
3835
  onChange == null ? void 0 : onChange(detail);
3834
3836
  };
3835
- if (onChange) {
3836
- current.addEventListener("_change", listener);
3837
- }
3838
- return () => {
3839
- if (onChange) {
3840
- current.removeEventListener("_change", listener);
3841
- }
3842
- };
3843
- }, [el, onChange]);
3844
- react.useEffect(() => {
3845
- if (!el.current) {
3846
- return;
3847
- }
3848
- const current = el.current;
3849
3837
  const keypressListener = (e) => {
3850
3838
  const detail = e.detail;
3851
3839
  onKeyPress == null ? void 0 : onKeyPress(detail);
3852
3840
  };
3841
+ const blurListener = (e) => {
3842
+ const detail = e.detail;
3843
+ onBlur == null ? void 0 : onBlur(detail);
3844
+ };
3845
+ current.addEventListener("_change", changeListener);
3853
3846
  current.addEventListener("_keyPress", keypressListener);
3847
+ current.addEventListener("_blur", blurListener);
3854
3848
  return () => {
3849
+ current.removeEventListener("_change", changeListener);
3855
3850
  current.removeEventListener("_keyPress", keypressListener);
3851
+ current.removeEventListener("_blur", blurListener);
3856
3852
  };
3857
- }, [el, onKeyPress]);
3853
+ }, [el, onChange, onKeyPress, onBlur]);
3858
3854
  return /* @__PURE__ */ jsxRuntime.jsx(
3859
3855
  "goa-textarea",
3860
3856
  {
@@ -3907,6 +3903,7 @@ function GoabTooltip(props) {
3907
3903
  content: isStringContent ? props.content : void 0,
3908
3904
  halign: props.hAlign,
3909
3905
  testid: props.testId,
3906
+ maxwidth: props.maxWidth,
3910
3907
  mt: props.mt,
3911
3908
  mr: props.mr,
3912
3909
  mb: props.mb,