@tap-payments/os-micro-frontend-shared 0.0.228-test.19-test.20 → 0.0.228-test.20

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.
@@ -21,7 +21,7 @@ export declare const StatusIcon: import("@emotion/styled").StyledComponent<impor
21
21
  variant: DropdownButtonVariants;
22
22
  }, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
23
23
  export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
24
- export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & React.RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
24
+ export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
25
25
  export declare const ChevronContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
26
26
  export declare const ButtonContent: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
27
27
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IProps } from './type';
3
- declare const Dropdown: import("react").ForwardRefExoticComponent<IProps & import("react").RefAttributes<HTMLDivElement>>;
2
+ declare function Dropdown({ open, menuItems, anchorEl, onClose, footer, selected, multiple, allowShadows, ...props }: IProps): import("react/jsx-runtime").JSX.Element;
4
3
  export default Dropdown;
@@ -12,11 +12,10 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { Divider, Box, useTheme } from '@mui/material';
14
14
  import { StyledListItemText, StyledMenu, StyledListItemIcon, StyledMenuItem, CheckboxStyled } from './styles';
15
- import { forwardRef } from 'react';
16
- const Dropdown = forwardRef((_a, ref) => {
15
+ function Dropdown(_a) {
17
16
  var { open, menuItems, anchorEl, onClose, footer, selected, multiple, allowShadows = true } = _a, props = __rest(_a, ["open", "menuItems", "anchorEl", "onClose", "footer", "selected", "multiple", "allowShadows"]);
18
17
  const theme = useTheme();
19
- return (_jsxs(StyledMenu, Object.assign({ ref: ref, open: open, anchorEl: anchorEl, onClose: onClose, onContextMenu: (e) => {
18
+ return (_jsxs(StyledMenu, Object.assign({ open: open, anchorEl: anchorEl, onClose: onClose, onContextMenu: (e) => {
20
19
  e.preventDefault();
21
20
  onClose();
22
21
  } }, props, { className: "tap-dropdown", minWidth: (anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.clientWidth) || 'auto' }, { children: [menuItems.map((item, idx) => {
@@ -40,5 +39,5 @@ const Dropdown = forwardRef((_a, ref) => {
40
39
  boxShadow: allowShadows ? theme.shadows[10] : 'none',
41
40
  })), item.sx) }, { children: [multiple && _jsx(CheckboxStyled, { size: "small", checked: item.selected }), item.icon && _jsx(StyledListItemIcon, { children: item.icon }), _jsx(StyledListItemText, { children: item.label }), _jsx(Box, Object.assign({ className: item.alwaysShowRightAction ? '' : 'menu-right-action' }, { children: item.rightAction && item.rightAction }))] }))) }, `${item.label}-${idx}`));
42
41
  }), footer] })));
43
- });
42
+ }
44
43
  export default Dropdown;
@@ -1,11 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { MenuProps } from '@mui/material';
3
2
  export declare const StyledMenuItem: import("@emotion/styled").StyledComponent<import("@mui/material").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
4
3
  ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
5
4
  }, "disabled" | "className" | "style" | "classes" | "children" | "sx" | "autoFocus" | "tabIndex" | "selected" | "dense" | "disableGutters" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "divider"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
6
5
  alwaysShowRightAction?: boolean | undefined;
7
6
  }, {}, {}>;
8
- export declare const StyledMenu: import("@emotion/styled").StyledComponent<MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
7
+ export declare const StyledMenu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
9
8
  minWidth?: string | number | undefined;
10
9
  }, {}, {}>;
11
10
  export declare const StyledListItemIcon: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemIconProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,5 +1,6 @@
1
1
  import React, { CSSProperties, ReactNode } from 'react';
2
2
  import { type SxProps, type Theme } from '@mui/material/styles';
3
+ import { StyledMenu } from './styles';
3
4
  export interface MenuItemI {
4
5
  label?: string | null | ReactNode;
5
6
  name?: string;
@@ -12,7 +13,7 @@ export interface MenuItemI {
12
13
  alwaysShowRightAction?: boolean;
13
14
  sx?: SxProps<Theme>;
14
15
  }
15
- export interface IProps {
16
+ export interface IProps extends React.ComponentProps<typeof StyledMenu> {
16
17
  open: boolean;
17
18
  onClose: () => void;
18
19
  menuItems: MenuItemI[];
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { TableHeaderStatus } from '../../types/index.js';
3
3
  import { AvailableStatus } from './type';
4
- interface StatusBarProps {
5
- status?: TableHeaderStatus | TableHeaderStatus[];
6
- availableStatuses?: AvailableStatus[];
4
+ interface StatusBarProps<IStatus extends TableHeaderStatus | TableHeaderStatus[] = undefined> {
5
+ status?: IStatus;
6
+ availableStatuses?: AvailableStatus<IStatus>[];
7
7
  isFilteredIdsShown?: boolean;
8
- onStatusChange?: (status: StatusBarProps['status']) => void;
8
+ onStatusChange?: (status: StatusBarProps<IStatus>['status']) => void;
9
9
  }
10
- declare function StatusBar({ isFilteredIdsShown, onStatusChange, availableStatuses, status, }: StatusBarProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function StatusBar<IStatus extends TableHeaderStatus | TableHeaderStatus[] = undefined>({ isFilteredIdsShown, onStatusChange, availableStatuses, status, }: StatusBarProps<IStatus>): import("react/jsx-runtime").JSX.Element;
11
11
  declare const _default: import("react").MemoExoticComponent<typeof StatusBar>;
12
12
  export default _default;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { StatusButtonProps } from '../StatusButton';
3
3
  import { TableHeaderStatus } from '../../types/index.js';
4
- export type AvailableStatus<T = undefined> = StatusButtonProps & {
5
- status: T | TableHeaderStatus | (TableHeaderStatus | T)[];
6
- render?: (status: AvailableStatus['status'], onChange: (selected: AvailableStatus['status']) => void) => React.ReactNode;
4
+ export type AvailableStatus<T extends TableHeaderStatus | TableHeaderStatus[] = undefined> = StatusButtonProps & {
5
+ status: T;
6
+ render?: <IStatus extends T>(status: IStatus, onChange: (selected: AvailableStatus<T>['status']) => void) => React.ReactNode;
7
7
  };
@@ -23,7 +23,7 @@ export declare const StatusIcon: import("@emotion/styled").StyledComponent<impor
23
23
  icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
24
24
  }, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
25
25
  export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
26
- export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & React.RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
26
+ export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
27
27
  export declare const ChevronContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
28
28
  export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
29
29
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
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.0.228-test.19-test.20",
4
+ "version": "0.0.228-test.20",
5
5
  "testVersion": 20,
6
6
  "type": "module",
7
7
  "main": "build/index.js",