@tap-payments/os-micro-frontend-shared 0.1.90-test.7 → 0.1.91-test.1

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.
@@ -12,8 +12,5 @@ const ImageWrapper = styled(motion.span)(({ theme, order }) => ({
12
12
  display: 'flex',
13
13
  alignItems: 'center',
14
14
  justifyContent: 'center',
15
- '&:hover': {
16
- boxShadow: '7px 0px 8px 0px #F2F2F2',
17
- },
18
15
  }));
19
16
  export default ImageWrapper;
@@ -14,34 +14,10 @@ import TableCell from '../../TableCell';
14
14
  import { BrandsWrapper, Label } from './style';
15
15
  import { verificationIcon } from './constants';
16
16
  import Tooltip from '../../../Tooltip';
17
+ import { Box } from '@mui/material';
17
18
  import IconWithBadge from '../../../IconWithBadge';
18
- import { motion } from 'framer-motion';
19
19
  export default function BrandsCell(_a) {
20
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
- 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(motion.div, Object.assign({ style: {
23
- display: 'flex',
24
- alignItems: 'center',
25
- gap: '5px',
26
- overflow: 'hidden',
27
- width: '100%',
28
- }, initial: { width: 0, opacity: 0 }, transition: {
29
- animate: {
30
- duration: 0.5,
31
- },
32
- fadeIn: {
33
- duration: 0.2,
34
- },
35
- }, variants: {
36
- animate: {
37
- width: 'auto',
38
- display: 'flex',
39
- },
40
- fadeIn: {
41
- transition: {
42
- delay: 0.5,
43
- },
44
- opacity: 1,
45
- },
46
- } }, { 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: 10, containerSize: 10, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] })) })) })) })));
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({ brandName: brand.name }, { children: brand.name || 'Not Available' })), !hideStatus && (_jsx(IconWithBadge, { mainIcon: icon, mainIconSize: 10, containerSize: 10, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] })) })) })) })));
47
23
  }
@@ -2,4 +2,6 @@
2
2
  export declare const BrandsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
3
  export declare const BrandName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
4
  export declare const VerificationIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
- export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
5
+ export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
6
+ brandName?: string | undefined;
7
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
@@ -7,6 +7,7 @@ export const BrandsWrapper = styled('div')(({ theme }) => ({
7
7
  borderRadius: '44px',
8
8
  padding: '4px 8px',
9
9
  lineHeight: '120%',
10
+ '&:hover': { minWidth: 'max-content' },
10
11
  }));
11
12
  export const BrandName = styled('div')(({ theme }) => ({
12
13
  fontSize: '14px',
@@ -17,13 +18,6 @@ export const VerificationIcon = styled('img')(() => ({
17
18
  width: '8px',
18
19
  height: '8px',
19
20
  }));
20
- export const Label = styled('p')(({ theme }) => ({
21
- fontSize: '14px',
22
- fontWeight: 400,
23
- color: theme.palette.text.primary,
24
- overflow: 'hidden',
25
- textOverflow: 'ellipsis',
26
- whiteSpace: 'nowrap',
27
- maxWidth: '100%',
28
- margin: '0',
29
- }));
21
+ export const Label = styled('p', {
22
+ shouldForwardProp: (props) => 'brandName' !== props,
23
+ })(({ theme, brandName }) => (Object.assign({ fontSize: '14px', fontWeight: 400, color: theme.palette.text.primary, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: '100%', margin: '0', '&:hover': { overflow: 'visible', textOverflow: 'visible' } }, (!brandName && { color: '#B1B1B1' }))));
@@ -22,10 +22,10 @@ function SalesChannelCell(_a) {
22
22
  var _a;
23
23
  const sourceTooltip = channel.address;
24
24
  const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
25
- return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0), sx: {
26
- width: isTextShown ? '70px' : '36px',
27
- cursor: 'pointer',
28
- }, onClick: () => {
25
+ const lastSalesChannel = index === salesChannels.length - 1;
26
+ return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0), sx: Object.assign({ width: isTextShown ? '70px' : '36px', cursor: 'pointer' }, (lastSalesChannel && {
27
+ boxShadow: '7px 0px 8px 0px #F2F2F2',
28
+ })), onClick: () => {
29
29
  if (channel === null || channel === void 0 ? void 0 : channel.address)
30
30
  openUrl(channel.address);
31
31
  } }, { children: isTextShown ? (_jsx(ChannelTextWrapper, { children: _jsx(ChannelTextLabel, { children: channelCode }) })) : (_jsx(StyledSourceImage, { src: channel.logo, alt: channelCode })) })) }), `${channel}-${index}`));
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.90-test.7",
5
- "testVersion": 7,
4
+ "version": "0.1.91-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",