@tap-payments/os-micro-frontend-shared 0.1.365-test.26 → 0.1.365-test.27

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.
@@ -11,6 +11,7 @@ interface FilterDropdownProps extends BoxProps {
11
11
  menuStyle?: SxProps;
12
12
  hideTitle?: boolean;
13
13
  renderButton?: ReactNode;
14
+ onOpenChange?: (isOpen: boolean) => void;
14
15
  }
15
- export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled, icon, title, menuStyle, hideTitle, renderButton, ...props }: Readonly<FilterDropdownProps>): import("react/jsx-runtime").JSX.Element;
16
+ export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled, icon, title, menuStyle, hideTitle, renderButton, onOpenChange, ...props }: Readonly<FilterDropdownProps>): import("react/jsx-runtime").JSX.Element;
16
17
  export {};
@@ -18,7 +18,7 @@ import { darkFilterIcon } from '../../constants/index.js';
18
18
  import { Menu, CustomBackdrop } from '../index.js';
19
19
  import { CancelButton, FilterButton, Footer, OkayButton, TitleStyled } from './style';
20
20
  export default function FilterDropdown(_a) {
21
- var { onConfirm, onCancel, isOkayButDisabled, children, isDisabled, icon, title, menuStyle, hideTitle = false, renderButton } = _a, props = __rest(_a, ["onConfirm", "onCancel", "isOkayButDisabled", "children", "isDisabled", "icon", "title", "menuStyle", "hideTitle", "renderButton"]);
21
+ var { onConfirm, onCancel, isOkayButDisabled, children, isDisabled, icon, title, menuStyle, hideTitle = false, renderButton, onOpenChange } = _a, props = __rest(_a, ["onConfirm", "onCancel", "isOkayButDisabled", "children", "isDisabled", "icon", "title", "menuStyle", "hideTitle", "renderButton", "onOpenChange"]);
22
22
  const [anchorEl, setAnchorEl] = useState(null);
23
23
  const open = Boolean(anchorEl);
24
24
  const { t } = useTranslation();
@@ -44,12 +44,14 @@ export default function FilterDropdown(_a) {
44
44
  return;
45
45
  if (!open) {
46
46
  setAnchorEl(e.currentTarget);
47
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(true);
47
48
  return;
48
49
  }
49
50
  onClose();
50
51
  };
51
52
  const onClose = () => {
52
53
  setAnchorEl(null);
54
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
53
55
  onCancel();
54
56
  };
55
57
  const handleCancel = () => {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.365-test.26",
5
- "testVersion": 26,
4
+ "version": "0.1.365-test.27",
5
+ "testVersion": 27,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",