@tap-payments/os-micro-frontend-shared 0.1.23 → 0.1.24-test.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.
Files changed (43) hide show
  1. package/build/components/IconWithBadge/IconWithBadge.d.ts +1 -1
  2. package/build/components/IconWithBadge/IconWithBadge.js +2 -2
  3. package/build/components/IconWithBadge/type.d.ts +1 -0
  4. package/build/components/ListLayout/ListLayout.d.ts +10 -0
  5. package/build/components/ListLayout/ListLayout.js +20 -0
  6. package/build/components/ListLayout/index.d.ts +2 -0
  7. package/build/components/ListLayout/index.js +2 -0
  8. package/build/components/ListLayout/styles.d.ts +4 -0
  9. package/build/components/ListLayout/styles.js +8 -0
  10. package/build/components/TableCells/CustomCells/AppsCell/AppsCell.js +3 -0
  11. package/build/components/TableCells/CustomCells/BrandsCell/BrandsCell.d.ts +1 -1
  12. package/build/components/TableCells/CustomCells/BrandsCell/BrandsCell.js +3 -8
  13. package/build/components/TableCells/CustomCells/BrandsCell/type.d.ts +1 -0
  14. package/build/components/TableCells/CustomCells/EntityCell/EntityCell.d.ts +1 -1
  15. package/build/components/TableCells/CustomCells/EntityCell/EntityCell.js +2 -2
  16. package/build/components/TableCells/CustomCells/EntityCell/type.d.ts +1 -0
  17. package/build/components/TableCells/CustomCells/LeadStatusCell/LeadStatusCell.d.ts +2 -0
  18. package/build/components/TableCells/CustomCells/LeadStatusCell/LeadStatusCell.js +25 -0
  19. package/build/components/TableCells/CustomCells/LeadStatusCell/constant.d.ts +7 -0
  20. package/build/components/TableCells/CustomCells/LeadStatusCell/constant.js +8 -0
  21. package/build/components/TableCells/CustomCells/LeadStatusCell/index.d.ts +1 -0
  22. package/build/components/TableCells/CustomCells/LeadStatusCell/index.js +1 -0
  23. package/build/components/TableCells/CustomCells/LeadStatusCell/style.d.ts +2 -0
  24. package/build/components/TableCells/CustomCells/LeadStatusCell/style.js +12 -0
  25. package/build/components/TableCells/CustomCells/LeadStatusCell/type.d.ts +6 -0
  26. package/build/components/TableCells/CustomCells/LeadStatusCell/type.js +1 -0
  27. package/build/components/TableCells/CustomCells/index.d.ts +2 -0
  28. package/build/components/TableCells/CustomCells/index.js +2 -0
  29. package/build/components/ToggleView/ToggleView.d.ts +16 -0
  30. package/build/components/ToggleView/ToggleView.js +32 -0
  31. package/build/components/ToggleView/ToggleWrapper.d.ts +4 -0
  32. package/build/components/ToggleView/ToggleWrapper.js +8 -0
  33. package/build/components/ToggleView/index.d.ts +3 -0
  34. package/build/components/ToggleView/index.js +3 -0
  35. package/build/components/ToggleView/style.d.ts +14 -0
  36. package/build/components/ToggleView/style.js +31 -0
  37. package/build/components/ToggleView/types.d.ts +6 -0
  38. package/build/components/ToggleView/types.js +6 -0
  39. package/build/components/index.d.ts +4 -0
  40. package/build/components/index.js +4 -0
  41. package/build/constants/assets.d.ts +5 -0
  42. package/build/constants/assets.js +5 -0
  43. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
1
  import { IconWithBadgeProps } from './type';
2
- export default function IconWithBadge({ mainIcon, overlayIcon, mainIconAlt, mainIconSize, containerSize, overlayPosition, borderColor, label, sx, onError, }: IconWithBadgeProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function IconWithBadge({ mainIcon, overlayIcon, mainIconAlt, mainIconSize, containerSize, overlayPosition, borderColor, label, sx, onError, containerSx, }: IconWithBadgeProps): import("react/jsx-runtime").JSX.Element;
@@ -5,9 +5,9 @@ import Box from '@mui/material/Box';
5
5
  import { brandPlaceholderIcon } from '../../constants/index.js';
6
6
  import { Container, BadgeBox } from './style';
7
7
  import Tooltip from '../Tooltip';
8
- export default function IconWithBadge({ mainIcon, overlayIcon, mainIconAlt = 'main icon', mainIconSize = 20, containerSize = 24, overlayPosition = { top: 10, left: 17 }, borderColor = '#F2F2F2', label = '', sx, onError, }) {
8
+ export default function IconWithBadge({ mainIcon, overlayIcon, mainIconAlt = 'main icon', mainIconSize = 20, containerSize = 24, overlayPosition = { top: 10, left: 17 }, borderColor = '#F2F2F2', label = '', sx, onError, containerSx, }) {
9
9
  const [isLoading, setIsLoading] = useState(true);
10
- return (_jsx(Tooltip, Object.assign({ title: label }, { children: _jsx(Box, Object.assign({ display: "flex", alignItems: "center", gap: 1, sx: { position: 'relative' } }, { children: _jsxs(Container, Object.assign({ style: {
10
+ return (_jsx(Tooltip, Object.assign({ title: label }, { children: _jsx(Box, Object.assign({ display: "flex", alignItems: "center", gap: 1, sx: Object.assign({ position: 'relative' }, containerSx) }, { children: _jsxs(Container, Object.assign({ style: {
11
11
  borderColor,
12
12
  width: containerSize,
13
13
  height: containerSize,
@@ -15,5 +15,6 @@ export interface IconWithBadgeProps {
15
15
  borderColor?: string;
16
16
  label?: string;
17
17
  sx?: SxProps;
18
+ containerSx?: SxProps;
18
19
  onError?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
19
20
  }
@@ -0,0 +1,10 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ import { ListLayoutStyled } from './styles';
3
+ interface ListLayoutProps extends ComponentPropsWithoutRef<typeof ListLayoutStyled> {
4
+ }
5
+ declare function ListLayout({ children, ...props }: Readonly<ListLayoutProps>): import("react/jsx-runtime").JSX.Element;
6
+ declare namespace ListLayout {
7
+ var displayName: string;
8
+ }
9
+ declare const _default: import("react").MemoExoticComponent<typeof ListLayout>;
10
+ export default _default;
@@ -0,0 +1,20 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { memo } from 'react';
14
+ import { ListLayoutStyled } from './styles';
15
+ function ListLayout(_a) {
16
+ var { children } = _a, props = __rest(_a, ["children"]);
17
+ return (_jsx(ListLayoutStyled, Object.assign({ component: 'article', "data-testid": 'ListLayout' }, props, { children: children })));
18
+ }
19
+ ListLayout.displayName = 'ListLayout';
20
+ export default memo(ListLayout);
@@ -0,0 +1,2 @@
1
+ import ListLayout from './ListLayout';
2
+ export default ListLayout;
@@ -0,0 +1,2 @@
1
+ import ListLayout from './ListLayout';
2
+ export default ListLayout;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ListLayoutStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,8 @@
1
+ import Box from '@mui/material/Box';
2
+ import { styled } from '@mui/material/styles';
3
+ export const ListLayoutStyled = styled(Box)(() => ({
4
+ position: 'relative',
5
+ display: 'flex',
6
+ flexDirection: 'column',
7
+ height: '100%'
8
+ }));
@@ -21,5 +21,8 @@ export default function AppsCell(_a) {
21
21
  height: '32px',
22
22
  display: 'flex',
23
23
  alignItems: 'center',
24
+ zIndex: 40,
25
+ position: 'absolute',
26
+ left: 0,
24
27
  } }, { children: _jsx(IconWithHoverOverlays, { mainIcon: { iconUrl: appsGridIcon, title: 'Apps' }, overlayIcons: apps }) })) })));
25
28
  }
@@ -1,2 +1,2 @@
1
1
  import { BrandsCellProps } from './type';
2
- export default function BrandsCell({ brand, verificationStatus, ...props }: BrandsCellProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function BrandsCell({ brand, verificationStatus, hideStatus, ...props }: BrandsCellProps): import("react/jsx-runtime").JSX.Element;
@@ -11,18 +11,13 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import TableCell from '../../TableCell';
14
- import { BrandsWrapper, Label, VerificationIcon } from './style';
14
+ import { BrandsWrapper, Label } from './style';
15
15
  import { verificationIcon } from './constants';
16
16
  import Tooltip from '../../../Tooltip';
17
17
  import { Box } from '@mui/material';
18
18
  import IconWithBadge from '../../../IconWithBadge';
19
19
  export default function BrandsCell(_a) {
20
- var { brand, verificationStatus } = _a, props = __rest(_a, ["brand", "verificationStatus"]);
20
+ var { brand, verificationStatus, hideStatus } = _a, props = __rest(_a, ["brand", "verificationStatus", "hideStatus"]);
21
21
  const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
22
- const item = {
23
- icon: brand.logo,
24
- overlayIcon: icon ? _jsx(VerificationIcon, { src: icon }) : null,
25
- label: brand.name,
26
- };
27
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(BrandsWrapper, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden' } }, { children: [_jsx(IconWithBadge, { mainIcon: item.icon, overlayIcon: item.overlayIcon, mainIconSize: 16, containerSize: 16, borderColor: "transparent" }, item.label), _jsx(Label, { children: brand.name })] })) })) }) })));
22
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(BrandsWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(IconWithBadge, { mainIcon: brand.logo, mainIconSize: 16, containerSize: 16, borderColor: "transparent" }), _jsx(Label, Object.assign({ sx: Object.assign({}, (!brand.name && { color: '#B1B1B1' })) }, { children: brand.name || 'Not Available' })), !hideStatus && (_jsx(IconWithBadge, { mainIcon: icon, mainIconSize: 16, containerSize: 16, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] })) })) })) })));
28
23
  }
@@ -6,4 +6,5 @@ export type BrandsCellProps = TableCellProps & {
6
6
  id: string;
7
7
  };
8
8
  verificationStatus?: 'incomplete' | 'complete' | 'reviewed' | 'verified';
9
+ hideStatus?: boolean;
9
10
  };
@@ -1,2 +1,2 @@
1
1
  import { EntityCellProps } from './type';
2
- export default function EntityCell({ entity, country, verificationStatus, licenseNumber, ...props }: EntityCellProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function EntityCell({ entity, country, verificationStatus, licenseNumber, hideStatus, ...props }: EntityCellProps): import("react/jsx-runtime").JSX.Element;
@@ -17,7 +17,7 @@ import Tooltip from '../../../Tooltip';
17
17
  import { CountryFlag } from '../../../index.js';
18
18
  import { getCountryName } from '../../../../utils/index.js';
19
19
  export default function EntityCell(_a) {
20
- var { entity, country, verificationStatus, licenseNumber } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber"]);
20
+ var { entity, country, verificationStatus, licenseNumber, hideStatus } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber", "hideStatus"]);
21
21
  const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
22
- return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, { children: licenseNumber ? (_jsxs(EntityContainer, { children: [_jsxs(EntityInfoContainer, { children: [_jsx(Tooltip, Object.assign({ title: getCountryName(country) }, { children: _jsx(CountryFlag, { code: country }) })), _jsx(EntityName, { children: licenseNumber })] }), _jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) })] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })) })));
22
+ return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: (props === null || props === void 0 ? void 0 : props.onClick) ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, { children: licenseNumber ? (_jsxs(EntityContainer, { children: [_jsxs(EntityInfoContainer, { children: [_jsx(Tooltip, Object.assign({ title: getCountryName(country) }, { children: _jsx(CountryFlag, { code: country }) })), _jsx(EntityName, { children: licenseNumber })] }), !hideStatus && (_jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) }))] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })) })));
23
23
  }
@@ -4,4 +4,5 @@ export type EntityCellProps = TableCellProps & {
4
4
  verificationStatus?: 'incomplete' | 'complete' | 'reviewed' | 'verified';
5
5
  country: string;
6
6
  licenseNumber?: string;
7
+ hideStatus?: boolean;
7
8
  };
@@ -0,0 +1,2 @@
1
+ import { LeadStatusCellProps } from './type';
2
+ export default function LeadStatusCell({ status, ...props }: LeadStatusCellProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { useTranslation } from 'react-i18next';
14
+ import camelCase from 'lodash/camelCase';
15
+ import capitalize from 'lodash/capitalize';
16
+ import Tooltip from '../../../Tooltip';
17
+ import { TableCell } from '../../../TableCells';
18
+ import IconWithBadge from '../../../IconWithBadge';
19
+ import { statusIcons } from './constant';
20
+ import { StatusIconWrapper } from './style';
21
+ export default function LeadStatusCell(_a) {
22
+ var { status } = _a, props = __rest(_a, ["status"]);
23
+ const { t } = useTranslation();
24
+ return (_jsx(TableCell, Object.assign({}, props, { children: status && statusIcons[status] && (_jsx(Tooltip, Object.assign({ title: t(capitalize(camelCase(status))) }, { children: _jsx(StatusIconWrapper, { children: _jsx(IconWithBadge, { mainIcon: statusIcons[status], mainIconSize: 16, containerSize: 16, borderColor: "transparent" }) }) }))) })));
25
+ }
@@ -0,0 +1,7 @@
1
+ export declare const statusIcons: {
2
+ active: string;
3
+ completed: string;
4
+ closed: string;
5
+ expired: string;
6
+ ready: string;
7
+ };
@@ -0,0 +1,8 @@
1
+ import { activeLeadStatusIcon, completedLeadStatusIcon, closedLeadStatusIcon, expiredLeadStatusIcon, readyLeadStatusIcon } from '../../../../constants/index.js';
2
+ export const statusIcons = {
3
+ active: activeLeadStatusIcon,
4
+ completed: completedLeadStatusIcon,
5
+ closed: closedLeadStatusIcon,
6
+ expired: expiredLeadStatusIcon,
7
+ ready: readyLeadStatusIcon,
8
+ };
@@ -0,0 +1 @@
1
+ export { default as LeadStatusCell } from './LeadStatusCell';
@@ -0,0 +1 @@
1
+ export { default as LeadStatusCell } from './LeadStatusCell';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StatusIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -0,0 +1,12 @@
1
+ import { styled } from '@mui/material';
2
+ export const StatusIconWrapper = styled('span')(({ theme }) => ({
3
+ width: '36px',
4
+ height: '24px',
5
+ borderRadius: '24px',
6
+ backgroundColor: 'transparent',
7
+ display: 'flex',
8
+ alignItems: 'center',
9
+ justifyContent: 'center',
10
+ flexShrink: 0,
11
+ border: `1px solid ${theme.palette.divider}`,
12
+ }));
@@ -0,0 +1,6 @@
1
+ import { TableCellProps } from '@mui/material/TableCell';
2
+ import { statusIcons } from './constant';
3
+ export type StatusIconType = keyof typeof statusIcons;
4
+ export interface LeadStatusCellProps extends TableCellProps {
5
+ status?: StatusIconType;
6
+ }
@@ -46,5 +46,7 @@ export * from './BrandsCell';
46
46
  export * from './SalesChannelCell';
47
47
  export * from './TerminalsBrandCell';
48
48
  export * from './TerminalsPlatformCell';
49
+ export * from './AppsCell';
49
50
  export * from './type';
50
51
  export * from './style';
52
+ export * from './LeadStatusCell';
@@ -46,5 +46,7 @@ export * from './BrandsCell';
46
46
  export * from './SalesChannelCell';
47
47
  export * from './TerminalsBrandCell';
48
48
  export * from './TerminalsPlatformCell';
49
+ export * from './AppsCell';
49
50
  export * from './type';
50
51
  export * from './style';
52
+ export * from './LeadStatusCell';
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { ToggleViews, ToggleViewsValues } from './types';
3
+ declare const DEFAULT_TOGGLE_VIEWS: {
4
+ icon: import("react/jsx-runtime").JSX.Element;
5
+ value: ToggleViews;
6
+ }[];
7
+ export interface ToggleViewProps {
8
+ onToggleClick: (view: ToggleViewsValues) => void;
9
+ currentView: ToggleViewsValues;
10
+ getOverrideViews?: (defaultViews: typeof DEFAULT_TOGGLE_VIEWS) => {
11
+ icon: React.ReactNode;
12
+ value: ToggleViewsValues;
13
+ }[];
14
+ }
15
+ declare const ToggleView: (props: ToggleViewProps) => import("react/jsx-runtime").JSX.Element | null;
16
+ export default ToggleView;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cardViewButtonIcon, listViewButtonIcon } from '../../constants/index.js';
3
+ import { ActiveOverlay, ViewButton } from './style';
4
+ import { ToggleViews } from './types';
5
+ import { useMemo } from 'react';
6
+ import ToggleWrapper from './ToggleWrapper';
7
+ const DEFAULT_TOGGLE_VIEWS = [
8
+ {
9
+ icon: _jsx("img", { src: cardViewButtonIcon, alt: "card" }),
10
+ value: ToggleViews.CARDS,
11
+ },
12
+ {
13
+ icon: _jsx("img", { src: listViewButtonIcon, alt: ToggleViews.LIST }),
14
+ value: ToggleViews.LIST,
15
+ },
16
+ ];
17
+ const ToggleView = (props) => {
18
+ const { currentView, onToggleClick, getOverrideViews } = props;
19
+ const views = useMemo(() => {
20
+ if (getOverrideViews)
21
+ return getOverrideViews(DEFAULT_TOGGLE_VIEWS);
22
+ return DEFAULT_TOGGLE_VIEWS;
23
+ }, [getOverrideViews]);
24
+ const viewIndex = useMemo(() => views.findIndex((view) => view.value === currentView), [views, currentView]);
25
+ if (!onToggleClick)
26
+ return null;
27
+ return (_jsxs(ToggleWrapper, { children: [views.map((view) => (_jsx(ViewButton, Object.assign({ onClick: () => onToggleClick(view.value), sx: {
28
+ height: '11.6px',
29
+ width: '11.6px',
30
+ }, isActive: currentView === view.value }, { children: view.icon }), view.value))), _jsx(ActiveOverlay, { activeIndex: viewIndex })] }));
31
+ };
32
+ export default ToggleView;
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { type BoxProps } from '@mui/material/Box';
3
+ declare const ToggleWrapper: (props: PropsWithChildren<BoxProps>) => import("react/jsx-runtime").JSX.Element;
4
+ export default ToggleWrapper;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ToggleWrapperStyled } from './style';
4
+ const ToggleWrapper = (props) => {
5
+ const viewTogglers = React.Children.count(props.children) - 1;
6
+ return _jsx(ToggleWrapperStyled, Object.assign({}, props, { sx: { width: viewTogglers * 30 + 2 } }));
7
+ };
8
+ export default ToggleWrapper;
@@ -0,0 +1,3 @@
1
+ import ToggleView from './ToggleView';
2
+ export default ToggleView;
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ import ToggleView from './ToggleView';
2
+ export default ToggleView;
3
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export declare const ToggleWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ export declare const ViewButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
8
+ isActive: boolean;
9
+ }, {}, {}>;
10
+ export declare const ActiveOverlay: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
13
+ activeIndex: number;
14
+ }, {}, {}>;
@@ -0,0 +1,31 @@
1
+ import { Box, styled } from '@mui/material';
2
+ export const ToggleWrapperStyled = styled(Box)(({ theme }) => ({
3
+ height: '32px',
4
+ borderRadius: '4px',
5
+ backgroundColor: theme.palette.action.hover,
6
+ padding: '2px',
7
+ display: 'flex',
8
+ alignItems: 'center',
9
+ position: 'relative',
10
+ cursor: 'pointer'
11
+ }));
12
+ export const ViewButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ isActive }) => ({
13
+ flex: 1,
14
+ display: 'flex',
15
+ justifyContent: 'center',
16
+ alignItems: 'center',
17
+ position: 'relative',
18
+ zIndex: 2,
19
+ opacity: isActive ? 1 : 0.5
20
+ }));
21
+ export const ActiveOverlay = styled(Box, { shouldForwardProp: (props) => props !== 'activeIndex' })(({ theme, activeIndex }) => ({
22
+ position: 'absolute',
23
+ top: 2,
24
+ left: activeIndex * 30 + 2,
25
+ transition: 'all 0.25s ease-in-out',
26
+ width: '28px',
27
+ height: '28px',
28
+ backgroundColor: theme.palette.common.white,
29
+ borderRadius: '2px',
30
+ boxShadow: '0px 0px 4px 0px rgba(0, 0, 0, 0.20)'
31
+ }));
@@ -0,0 +1,6 @@
1
+ export declare enum ToggleViews {
2
+ LIST = "LIST",
3
+ CARDS = "CARDS",
4
+ MAP = "MAP"
5
+ }
6
+ export type ToggleViewsValues = `${ToggleViews}` | (string & {});
@@ -0,0 +1,6 @@
1
+ export var ToggleViews;
2
+ (function (ToggleViews) {
3
+ ToggleViews["LIST"] = "LIST";
4
+ ToggleViews["CARDS"] = "CARDS";
5
+ ToggleViews["MAP"] = "MAP";
6
+ })(ToggleViews || (ToggleViews = {}));
@@ -97,3 +97,7 @@ export { default as AppServices } from './AppServices';
97
97
  export { default as ScrollLoader } from './ScrollLoader';
98
98
  export * from './ScrollLoader';
99
99
  export * from './TooltipChip';
100
+ export { default as ListLayout } from './ListLayout';
101
+ export * from './ListLayout';
102
+ export { default as ToggleView } from './ToggleView';
103
+ export * from './ToggleView';
@@ -97,3 +97,7 @@ export { default as AppServices } from './AppServices';
97
97
  export { default as ScrollLoader } from './ScrollLoader';
98
98
  export * from './ScrollLoader';
99
99
  export * from './TooltipChip';
100
+ export { default as ListLayout } from './ListLayout';
101
+ export * from './ListLayout';
102
+ export { default as ToggleView } from './ToggleView';
103
+ export * from './ToggleView';
@@ -256,6 +256,11 @@ export declare const savedStatusIcon: string;
256
256
  export declare const scheduledStatusIcon: string;
257
257
  export declare const pendingStatusIcon: string;
258
258
  export declare const refundedStatusIcon: string;
259
+ export declare const activeLeadStatusIcon: string;
260
+ export declare const completedLeadStatusIcon: string;
261
+ export declare const closedLeadStatusIcon: string;
262
+ export declare const expiredLeadStatusIcon: string;
263
+ export declare const readyLeadStatusIcon: string;
259
264
  export declare const newFileIcon: string;
260
265
  export declare const teamWindowIcon: string;
261
266
  export declare const blueAppsIcon: string;
@@ -260,6 +260,11 @@ export const savedStatusIcon = `${appBaseUrl}/savedStatus1.svg`;
260
260
  export const scheduledStatusIcon = `${appBaseUrl}/scheduledStatus1.svg`;
261
261
  export const pendingStatusIcon = `${appBaseUrl}/invoicePendingStatus2.svg`;
262
262
  export const refundedStatusIcon = `${appBaseUrl}/invoiceRefundedStatus2.svg`;
263
+ export const activeLeadStatusIcon = `${lightUrl}/activeLeadStatus.svg`;
264
+ export const completedLeadStatusIcon = `${lightUrl}/completedLeadStatus.svg`;
265
+ export const closedLeadStatusIcon = `${lightUrl}/closedLeadStatus.svg`;
266
+ export const expiredLeadStatusIcon = `${lightUrl}/expiredLeadStatus.svg`;
267
+ export const readyLeadStatusIcon = `${lightUrl}/readyLeadStatus.svg`;
263
268
  export const newFileIcon = `${lightUrl}/newFileIcon.svg`;
264
269
  export const teamWindowIcon = `${lightUrl}/teamWindowIcon.svg`;
265
270
  export const blueAppsIcon = `${lightUrl}/blueAppsIcon.svg`;
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.23",
5
- "testVersion": 0,
4
+ "version": "0.1.24-test.2",
5
+ "testVersion": 2,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -131,4 +131,4 @@
131
131
  "publishConfig": {
132
132
  "registry": "https://registry.npmjs.org/"
133
133
  }
134
- }
134
+ }