@tap-payments/os-micro-frontend-shared 0.1.50 → 0.1.53

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.
@@ -14,7 +14,7 @@ import { useState } from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { AnimatePresence, motion } from 'framer-motion';
16
16
  import { copyText as copyTextHandler } from '../../utils/index.js';
17
- import { blueCopyIcon, greenCheckIcon } from '../../constants/index.js';
17
+ import { copyIcon, greenCheckIcon } from '../../constants/index.js';
18
18
  import { unknownGeographyColors } from './constants';
19
19
  import { ChipStyled, Wrapper, CopyWrapper } from './style';
20
20
  const StatusChip = (_a) => {
@@ -40,6 +40,6 @@ const StatusChip = (_a) => {
40
40
  };
41
41
  return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected, style: { position: 'absolute', top: 0, left: 0, zIndex: isSelected ? 3 : 0 } }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
42
42
  paddingRight: isSelected && copyText ? 12 : 0,
43
- }, transition: { delay: !isSelected ? 0.2 : 0 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isSelected && copyText && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : blueCopyIcon, style: Object.assign({ height: 12, width: 12, objectFit: 'contain' }, (showCopy && { filter: 'none' })) }) })) })] })) }))] })));
43
+ }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isSelected && copyText && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { delay: isSelected ? 0.2 : 0, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: Object.assign({ height: 12, width: 12, objectFit: 'contain' }, (showCopy && { filter: 'none' })) }) })) })] })) }))] })));
44
44
  };
45
45
  export default StatusChip;
@@ -1,15 +1,10 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
- import { SELECTION_COLORS } from '../../utils/index.js';
4
3
  export const ChipStyled = styled(Box, {
5
4
  shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'padding', 'maxWidth', 'isSelected'].includes(prop),
6
5
  })(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth, }) => {
7
- return Object.assign({ display: 'flex', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 9.5px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box' }, (isSelected && {
8
- color: SELECTION_COLORS.primary,
9
- borderColor: SELECTION_COLORS.primary,
10
- img: {
11
- filter: 'brightness(0) saturate(100%) invert(44%) sepia(54%) saturate(1203%) hue-rotate(170deg) brightness(91%) contrast(84%)',
12
- },
6
+ return Object.assign({ display: 'flex', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 9.5px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box', borderColor: theme.palette.common.white }, (isSelected && {
7
+ boxShadow: 'rgb(242, 242, 242) 7px 0px 8px 2px',
13
8
  }));
14
9
  });
15
10
  export const Wrapper = styled(Box)(() => ({
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.1.50",
4
+ "version": "0.1.53",
5
5
  "testVersion": 0,
6
6
  "type": "module",
7
7
  "main": "build/index.js",