@tap-payments/os-micro-frontend-shared 0.1.31-test.8 → 0.1.31-test.9

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.
@@ -17,7 +17,7 @@ import { AnimatePresence, motion } from 'framer-motion';
17
17
  import { copyText as copyTextHandler } from '../../utils/index.js';
18
18
  import { blueCopyIcon, greenCheckIcon } from '../../constants/index.js';
19
19
  import { unknownGeographyColors } from './constants';
20
- import { ChipStyled } from './style';
20
+ import { ChipStyled, Wrapper } from './style';
21
21
  const StatusChip = (_a) => {
22
22
  var { children, unknownText, copyText } = _a, props = __rest(_a, ["children", "unknownText", "copyText"]);
23
23
  const [showCopy, setShowCopy] = useState(false);
@@ -38,7 +38,7 @@ const StatusChip = (_a) => {
38
38
  };
39
39
  }
40
40
  };
41
- return (_jsxs(Box, Object.assign({ sx: { position: 'relative', zIndex: props.isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px' } }, { children: children })) })), _jsx(motion.div, Object.assign({ layout: true, transition: {
41
+ return (_jsxs(Box, Object.assign({ sx: { position: 'relative', zIndex: props.isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(motion.div, Object.assign({ layout: true, transition: {
42
42
  type: 'spring',
43
43
  stiffness: 180,
44
44
  damping: 25,
@@ -48,7 +48,7 @@ const StatusChip = (_a) => {
48
48
  top: 0,
49
49
  left: 0,
50
50
  zIndex: props.isSelected ? 3 : 0,
51
- } }, { children: [_jsx(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px', minWidth: 46, textAlign: 'center' } }, { children: children })), _jsx(AnimatePresence, Object.assign({ mode: "wait" }, { children: props.isSelected && copyText && (_jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : blueCopyIcon, style: {
51
+ } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, Object.assign({ mode: "wait" }, { children: props.isSelected && copyText && (_jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : blueCopyIcon, style: {
52
52
  height: 12,
53
53
  width: 12,
54
54
  objectFit: 'contain',
@@ -18,3 +18,6 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
18
18
  } & {
19
19
  isSelected?: boolean | undefined;
20
20
  }, {}, {}>;
21
+ export declare const Wrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
23
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -6,3 +6,11 @@ export const ChipStyled = styled(Box, {
6
6
  })(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth, }) => {
7
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', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box', transition: 'width 0.5s ease-in-out' }, (isSelected && { color: SELECTION_COLORS.primary, borderColor: SELECTION_COLORS.primary }));
8
8
  });
9
+ export const Wrapper = styled(Box)(() => ({
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ justifyContent: 'center',
13
+ gap: '4px',
14
+ minWidth: 46,
15
+ textAlign: 'center',
16
+ }));
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.31-test.8",
5
- "testVersion": 8,
4
+ "version": "0.1.31-test.9",
5
+ "testVersion": 9,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",