@tap-payments/os-micro-frontend-shared 0.1.96-test.4 → 0.1.96-test.5-test.6
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.
- package/build/components/AmountStatusChip/AmountStatusChip.d.ts +9 -0
- package/build/components/AmountStatusChip/AmountStatusChip.js +20 -0
- package/build/components/AmountStatusChip/index.d.ts +3 -0
- package/build/components/AmountStatusChip/index.js +2 -0
- package/build/components/AmountStatusChip/style.d.ts +4 -0
- package/build/components/AmountStatusChip/style.js +27 -0
- package/build/components/StatusChip/StatusChip.js +2 -2
- package/build/components/index.d.ts +2 -0
- package/build/components/index.js +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StatusChipWithCopyProps } from '../StatusChipWithCopy';
|
|
3
|
+
export interface AmountStatusChipProps extends StatusChipWithCopyProps {
|
|
4
|
+
amount: string | number;
|
|
5
|
+
currency?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function AmountStatusChip({ amount, currency, ...rest }: AmountStatusChipProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: import("react").MemoExoticComponent<typeof AmountStatusChip>;
|
|
9
|
+
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { memo } from 'react';
|
|
14
|
+
import CurrencyIcon from '../CurrencyIcon';
|
|
15
|
+
import { AmountLabel, CurrencyIconContainer, StyledAmountStatusChip } from './style';
|
|
16
|
+
function AmountStatusChip(_a) {
|
|
17
|
+
var { amount, currency } = _a, rest = __rest(_a, ["amount", "currency"]);
|
|
18
|
+
return (_jsxs(StyledAmountStatusChip, Object.assign({}, rest, { children: [currency && (_jsx(AmountLabel, { children: _jsx(CurrencyIconContainer, { children: _jsx(CurrencyIcon, { currency: currency, fontSize: 10 }) }) })), amount] })));
|
|
19
|
+
}
|
|
20
|
+
export default memo(AmountStatusChip);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledAmountStatusChip: import("@emotion/styled").StyledComponent<import("../StatusChipWithCopy").StatusChipWithCopyProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
3
|
+
export declare const AmountLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
|
+
export declare const CurrencyIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
import StatusChipWithCopy from '../StatusChipWithCopy';
|
|
3
|
+
export const StyledAmountStatusChip = styled(StatusChipWithCopy)(() => ({
|
|
4
|
+
backgroundColor: '#EFF1F2',
|
|
5
|
+
border: 'none',
|
|
6
|
+
display: 'flex',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
justifyContent: 'center',
|
|
9
|
+
transition: 'none !important',
|
|
10
|
+
animation: 'none !important',
|
|
11
|
+
transform: 'none !important',
|
|
12
|
+
'& *': {
|
|
13
|
+
transition: 'none !important',
|
|
14
|
+
animation: 'none !important',
|
|
15
|
+
transform: 'none !important',
|
|
16
|
+
},
|
|
17
|
+
}));
|
|
18
|
+
export const AmountLabel = styled('span')(() => ({
|
|
19
|
+
marginRight: '2px',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
}));
|
|
23
|
+
export const CurrencyIconContainer = styled('span')(() => ({
|
|
24
|
+
marginInline: '1.5px',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
}));
|
|
@@ -43,10 +43,10 @@ const StatusChip = (_a) => {
|
|
|
43
43
|
left: isCopyActive && expandDirection === 'left' ? -12 : 0,
|
|
44
44
|
}, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
|
|
45
45
|
paddingRight: isCopyActive ? 12 : 0,
|
|
46
|
-
}, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence,
|
|
46
|
+
}, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isCopyActive && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0, x: -5 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -2 }, transition: { delay: 0.2, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
|
|
47
47
|
height: 12,
|
|
48
48
|
width: 12,
|
|
49
49
|
objectFit: 'contain',
|
|
50
|
-
} }) })) })
|
|
50
|
+
} }) })) })] })) })) }))] })));
|
|
51
51
|
};
|
|
52
52
|
export default StatusChip;
|
|
@@ -105,4 +105,6 @@ export * from './LeftPeekRightExpandingChip';
|
|
|
105
105
|
export { default as ColorPicker } from './ColorPicker';
|
|
106
106
|
export { default as WindowBackdrop } from './WindowBackdrop';
|
|
107
107
|
export { default as LazyImage } from './LazyImage';
|
|
108
|
+
export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
|
|
108
109
|
export * from './LazyImage';
|
|
110
|
+
export * from './AmountStatusChip';
|
|
@@ -105,4 +105,6 @@ export * from './LeftPeekRightExpandingChip';
|
|
|
105
105
|
export { default as ColorPicker } from './ColorPicker';
|
|
106
106
|
export { default as WindowBackdrop } from './WindowBackdrop';
|
|
107
107
|
export { default as LazyImage } from './LazyImage';
|
|
108
|
+
export { default as AmountStatusChip } from './AmountStatusChip';
|
|
108
109
|
export * from './LazyImage';
|
|
110
|
+
export * from './AmountStatusChip';
|
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.96-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.96-test.5-test.6",
|
|
5
|
+
"testVersion": 6,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|