@tap-payments/os-micro-frontend-shared 0.0.170 → 0.0.172

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.
@@ -1,9 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { BoxProps } from '@mui/material';
2
+ import { BoxProps } from '@mui/material/Box';
3
3
  export interface StyledButtonProps extends BoxProps {
4
+ title?: string;
4
5
  isActive?: boolean;
5
6
  isDisabled?: boolean;
6
7
  }
7
- declare function StyledButton({ children, ...props }: StyledButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function StyledButton({ children, title, ...props }: StyledButtonProps): import("react/jsx-runtime").JSX.Element;
8
9
  declare const _default: import("react").MemoExoticComponent<typeof StyledButton>;
9
10
  export default _default;
@@ -11,9 +11,10 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo } from 'react';
14
+ import Tooltip from '../../Tooltip';
14
15
  import { Button } from './style';
15
16
  function StyledButton(_a) {
16
- var { children } = _a, props = __rest(_a, ["children"]);
17
- return _jsx(Button, Object.assign({}, props, { children: children }));
17
+ var { children, title } = _a, props = __rest(_a, ["children", "title"]);
18
+ return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsx(Button, Object.assign({}, props, { children: children })) })));
18
19
  }
19
20
  export default memo(StyledButton);
@@ -1,9 +1,11 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
- export const Button = styled(Box)(({ isActive, isDisabled, theme }) => (Object.assign(Object.assign({ minWidth: 32, height: 32, width: 'fit-content', borderRadius: '4px', padding: '9px 8px', display: 'flex', alignItems: 'center', justifyContent: 'center', border: `1px solid ${theme.palette.divider}`, cursor: 'pointer' }, (isActive && {
3
+ export const Button = styled(Box)(({ isActive, isDisabled, theme }) => (Object.assign(Object.assign(Object.assign({ minWidth: 32, height: 32, width: 'fit-content', borderRadius: '4px', padding: '9px 8px', display: 'flex', alignItems: 'center', justifyContent: 'center', border: `1px solid ${theme.palette.divider}`, cursor: 'pointer' }, (isActive && {
4
4
  boxShadow: theme.shadows[7],
5
5
  borderColor: theme.palette.info.dark,
6
6
  })), (isDisabled && {
7
7
  opacity: 0.5,
8
8
  pointerEvents: 'none',
9
- }))));
9
+ })), { img: {
10
+ filter: 'brightness(0) invert(0)',
11
+ } })));
@@ -3,12 +3,12 @@ import { memo, useEffect, useMemo, useState } from 'react';
3
3
  import Box from '@mui/material/Box';
4
4
  import { useDropzone } from 'react-dropzone';
5
5
  import { useTranslation } from 'react-i18next';
6
+ import Icon from '../Icon';
6
7
  import { blueCircleCheckIcon, redVerifyIcon, trashBinIcon, uploadBlueIcon } from '../../constants/index.js';
7
8
  import { readableFileSize } from '../../utils/index.js';
8
9
  import { Wrapper, Title, Format, FileUploader, Content, Upload, TextWrapper, Maximum, UploadAgain, StyledButton, SendBulkContainer } from './style';
9
10
  import CircularProgressWithLabel from '../CircularProgressWithLabel';
10
11
  import Button from '../Button/StyledButton';
11
- import Icon from '../Icon';
12
12
  function FileUpload({ accept, footer, options, isCreateLoading, progress, error, subtitleComponent, isSuccess: isUploadSuccess, onConfirm, isSendDisabled, }) {
13
13
  const { t } = useTranslation();
14
14
  const [selectedFiles, setSelectedFiles] = useState([]);
@@ -5,7 +5,6 @@ export declare const statusButtonIcons: {
5
5
  cancelled: string;
6
6
  reversed: string;
7
7
  reports: string;
8
- view: string;
9
8
  search: string;
10
9
  chevronDown: string;
11
10
  unAuthorized: string;
@@ -1,4 +1,4 @@
1
- import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, viewIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../constants/index.js';
1
+ import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../constants/index.js';
2
2
  export const statusButtonIcons = {
3
3
  inProgress: initiatedIcon,
4
4
  initiated: initiatedIcon,
@@ -6,7 +6,6 @@ export const statusButtonIcons = {
6
6
  cancelled: cancelledIcon,
7
7
  reversed: reverseActionIcon,
8
8
  reports: reportsIcon,
9
- view: viewIcon,
10
9
  search: searchIcon,
11
10
  chevronDown: chevronDownIcon,
12
11
  unAuthorized: unAuthorizedIcon,
@@ -20,7 +20,7 @@ export declare const CountBadge: import("@emotion/styled").StyledComponent<impor
20
20
  }, {}, {}>;
21
21
  export declare const StatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
22
22
  variant: StatusButtonVariant;
23
- icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "view" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
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
26
  export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
@@ -5,7 +5,6 @@ export declare const statusButtonIcons: {
5
5
  cancelled: string;
6
6
  reversed: string;
7
7
  reports: string;
8
- view: string;
9
8
  search: string;
10
9
  chevronDown: string;
11
10
  unAuthorized: string;
@@ -1,4 +1,4 @@
1
- import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, viewIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../../../constants/index.js';
1
+ import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../../../constants/index.js';
2
2
  export const statusButtonIcons = {
3
3
  inProgress: initiatedIcon,
4
4
  initiated: initiatedIcon,
@@ -6,7 +6,6 @@ export const statusButtonIcons = {
6
6
  cancelled: cancelledIcon,
7
7
  reversed: reverseActionIcon,
8
8
  reports: reportsIcon,
9
- view: viewIcon,
10
9
  search: searchIcon,
11
10
  chevronDown: chevronDownIcon,
12
11
  unAuthorized: unAuthorizedIcon,
@@ -20,7 +20,7 @@ export declare const CountBadge: import("@emotion/styled").StyledComponent<impor
20
20
  }, {}, {}>;
21
21
  export declare const StyledStatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
22
22
  variant: StatusButtonVariant;
23
- icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "view" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
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
26
  export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../../..").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
@@ -1,14 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { memo, useState } from 'react';
3
- import { Box, ClickAwayListener } from '@mui/material';
3
+ import { ClickAwayListener } from '@mui/material';
4
4
  import { useTranslation } from 'react-i18next';
5
- import Tooltip from '../../../Tooltip';
6
5
  import { closeXIcon, viewIcon } from '../../../../constants/index.js';
6
+ import { StyledButton } from '../../../Button';
7
+ import Icon from '../../../Icon';
7
8
  import CustomViews from './CustomViews';
8
9
  import DefaultViews from './DefaultViews';
9
10
  import { ButtonStyled, ViewWrapper } from './style';
10
- import { StyledButton } from '../../../Button';
11
- import Icon from '../../../Icon';
12
11
  function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews }) {
13
12
  const [anchorViewEl, setAnchorViewEl] = useState(null);
14
13
  const [defaultViewEl, setDefaultViewElement] = useState(null);
@@ -37,7 +36,7 @@ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews,
37
36
  closeViewDropdown();
38
37
  };
39
38
  if (!anchorViewEl) {
40
- return (_jsx(Tooltip, Object.assign({ title: t('tableView'), "data-testid": "TableView_no_anchorViewEl" }, { children: _jsx(Box, { children: _jsx(StyledButton, Object.assign({ onClick: onViewButtonClick, "data-testid": "TableView_no_anchorViewEl_button" }, { children: _jsx(Icon, { src: viewIcon, alt: "view-icon", sx: { width: 14, height: 14 } }) })) }) })));
39
+ return (_jsx(StyledButton, Object.assign({ title: t('tableView'), onClick: onViewButtonClick, "data-testid": "TableView_no_anchorViewEl_button" }, { children: _jsx(Icon, { src: viewIcon, alt: "view-icon", sx: { width: 14, height: 14 } }) })));
41
40
  }
42
41
  return (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeViewDropdown }, { children: _jsxs(ViewWrapper, Object.assign({ "data-testid": "TableView" }, { children: [selectedViewInfo.id === 'custom' && (_jsx(CustomViews, { tableViews: tableViews, setTableViews: setTableViews, anchorEl: customViewEl, open: Boolean(customViewEl), onSelect: (e) => {
43
42
  setCustomViewElement(customViewEl ? null : e.currentTarget);
@@ -21,7 +21,6 @@ export { default as StatusChip } from './StatusChip';
21
21
  export { default as SimpleDialog, type SimpleDialogProps } from './SimpleDialog';
22
22
  export { default as SearchButton } from './SearchButton';
23
23
  export { default as Loaders } from './Loaders';
24
- export { default as ExportButton } from './ExportButton';
25
24
  export { default as DropdownMenu, type IProps, type MenuItemI, StyledIconForDropDown, StyledMenuTitle, StyledOption, StyledSelect, StyledSelectComponent, } from './DropdownMenu';
26
25
  export { default as DockButton, type DockButtonProps, type DockButtonWrapperProps } from './DockButton';
27
26
  export { default as DateButton } from './DateButton';
@@ -21,7 +21,6 @@ export { default as StatusChip } from './StatusChip';
21
21
  export { default as SimpleDialog } from './SimpleDialog';
22
22
  export { default as SearchButton } from './SearchButton';
23
23
  export { default as Loaders } from './Loaders';
24
- export { default as ExportButton } from './ExportButton';
25
24
  export { default as DropdownMenu, StyledIconForDropDown, StyledMenuTitle, StyledOption, StyledSelect, StyledSelectComponent, } from './DropdownMenu';
26
25
  export { default as DockButton } from './DockButton';
27
26
  export { default as DateButton } from './DateButton';
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.170",
4
+ "version": "0.0.172",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { StatusButtonProps } from '../StatusButton/type';
3
- declare function SearchButton(props: Omit<StatusButtonProps, 'variant'>): import("react/jsx-runtime").JSX.Element;
4
- declare const _default: import("react").MemoExoticComponent<typeof SearchButton>;
5
- export default _default;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { styled } from '@mui/material';
4
- import StatusButton from '../StatusButton';
5
- const StyledExportButton = styled(StatusButton)(() => ({
6
- minWidth: 'auto',
7
- borderRadius: '4px',
8
- paddingInline: '8px',
9
- }));
10
- function SearchButton(props) {
11
- return _jsx(StyledExportButton, Object.assign({}, props, { type: "button", variant: "inActive" }));
12
- }
13
- export default memo(SearchButton);
@@ -1,2 +0,0 @@
1
- import ExportButton from './ExportButton';
2
- export default ExportButton;
@@ -1,2 +0,0 @@
1
- import ExportButton from './ExportButton';
2
- export default ExportButton;