@rocket.chat/fuselage 0.72.0 → 0.73.0

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.
@@ -24,7 +24,7 @@ declare const ActionButton: import("react").ForwardRefExoticComponent<import("..
24
24
  square?: boolean;
25
25
  external?: boolean;
26
26
  icon?: IconProps["name"];
27
- } & Omit<import("react").AllHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "size" | "is" | "className"> & ButtonSize & {
27
+ } & Omit<import("react").AllHTMLAttributes<HTMLButtonElement | HTMLAnchorElement>, "is" | "size" | "className"> & ButtonSize & {
28
28
  icon: IconProps["name"];
29
29
  } & import("react").RefAttributes<HTMLButtonElement>>;
30
30
  export default ActionButton;
@@ -34,6 +34,6 @@ declare const Button: import("react").ForwardRefExoticComponent<BoxProps & {
34
34
  square?: boolean;
35
35
  external?: boolean;
36
36
  icon?: IconProps["name"];
37
- } & Omit<AllHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "size" | "is" | "className"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
37
+ } & Omit<AllHTMLAttributes<HTMLButtonElement | HTMLAnchorElement>, "is" | "size" | "className"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
38
38
  export default Button;
39
39
  //# sourceMappingURL=Button.d.ts.map
@@ -4,7 +4,7 @@ export type IconProps = Omit<BoxProps, 'name' | 'size'> & {
4
4
  name: IconName;
5
5
  size?: BoxProps['width'];
6
6
  };
7
- declare const Icon: import("react").ForwardRefExoticComponent<Omit<BoxProps, "size" | "name"> & {
7
+ declare const Icon: import("react").ForwardRefExoticComponent<Omit<BoxProps, "name" | "size"> & {
8
8
  name: IconName;
9
9
  size?: BoxProps["width"];
10
10
  } & import("react").RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"ToastBar.d.ts","sourceRoot":"","sources":["../../../src/components/ToastBar/ToastBar.tsx"],"names":[],"mappings":"AACA,OAAO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EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;AAK/C,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,SAAc,EACd,OAAgB,EAChB,IAAQ,EACR,QAAQ,EACR,EAAE,EACF,OAAO,EACP,WAA6B,EAC7B,GAAG,KAAK,EACT,EAAE,aAAa,2CA4Ef;AAED,eAAe,QAAQ,CAAC"}
@@ -3410,7 +3410,7 @@ const InputBox = (0, react_1.forwardRef)(function InputBox({ className, addon, e
3410
3410
  if (addon && innerRef.current && innerRef.current.parentElement) {
3411
3411
  innerRef.current.parentElement.classList.toggle('invalid', !innerRef.current.checkValidity());
3412
3412
  }
3413
- }, []);
3413
+ }, [addon, error]);
3414
3414
  const handleChange = (0, react_1.useCallback)((event) => {
3415
3415
  if (addon && innerRef.current && innerRef.current.parentElement) {
3416
3416
  innerRef.current.parentElement.classList.toggle('invalid', !innerRef.current.checkValidity());
@@ -11137,10 +11137,11 @@ function ToastBar({ children, className = '', variant = 'info', time = 5, isPaus
11137
11137
  `;
11138
11138
  const uniqueId = (0, react_1.useId)();
11139
11139
  const toastId = id || uniqueId;
11140
+ const role = variant === 'error' ? 'alert' : 'status';
11140
11141
  return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { className: [
11141
11142
  `rcx-toastbar rcx-toastbar--${variant} ${className}`,
11142
11143
  toastBarAnimation,
11143
- ], elevation: '2nb', borderRadius: 'x4', ...props, children: [(0, jsx_runtime_1.jsxs)("div", { className: 'rcx-toastbar_inner', children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: `rcx-toastbar_icon--${variant}`, size: 'x20', name: iconName }), (0, jsx_runtime_1.jsx)("div", { role: 'alert', className: 'rcx-toastbar_content', children: children }), onClose && ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-toastbar-close', children: (0, jsx_runtime_1.jsx)(Button_1.IconButton, { tiny: true, "aria-label": buttonLabel, onClick: () => onClose(toastId), icon: 'cross' }) }))] }), (0, jsx_runtime_1.jsx)(Box_1.Box, { className: [progressBarAnimation, 'rcx-toastbar_progressbar'] })] }));
11144
+ ], elevation: '2nb', borderRadius: 'x4', ...props, children: [(0, jsx_runtime_1.jsxs)("div", { className: 'rcx-toastbar_inner', children: [(0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: `rcx-toastbar_icon--${variant}`, size: 'x20', name: iconName }), (0, jsx_runtime_1.jsx)("div", { role: role, className: 'rcx-toastbar_content', children: children }), onClose && ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-toastbar-close', children: (0, jsx_runtime_1.jsx)(Button_1.IconButton, { tiny: true, "aria-label": buttonLabel, onClick: () => onClose(toastId), icon: 'cross' }) }))] }), (0, jsx_runtime_1.jsx)(Box_1.Box, { className: [progressBarAnimation, 'rcx-toastbar_progressbar'] })] }));
11144
11145
  }
11145
11146
  exports["default"] = ToastBar;
11146
11147