@tap-payments/os-micro-frontend-shared 0.1.271-test.5 → 0.1.271-test.7
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/TableCells/CustomCells/AmountCell/AmountCell.js +1 -2
- package/build/components/Tooltip/Tooltip.d.ts +8 -1
- package/build/components/Tooltip/Tooltip.js +3 -3
- package/build/components/Tooltip/styles.d.ts +2 -1
- package/build/components/Tooltip/styles.js +16 -1
- package/package.json +2 -2
|
@@ -10,7 +10,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Box } from '@mui/material';
|
|
14
13
|
import { TableCell } from '../../../TableCells';
|
|
15
14
|
import Tooltip from '../../../Tooltip';
|
|
16
15
|
import { CountryFlag, CurrencySymbol } from '../../../index.js';
|
|
@@ -19,6 +18,6 @@ import { ConversionTypeLabel, CurrencyInfo } from './components';
|
|
|
19
18
|
const tableMode = 'default';
|
|
20
19
|
function AmountCell(_a) {
|
|
21
20
|
var { conversionType, amount, currency, tooltipLabel, amountTooltipLabel } = _a, props = __rest(_a, ["conversionType", "amount", "currency", "tooltipLabel", "amountTooltipLabel"]);
|
|
22
|
-
return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(AmountCellContainer, { children: [_jsx(Tooltip, Object.assign({ title: tooltipLabel || '' }, { children: _jsx(
|
|
21
|
+
return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(AmountCellContainer, { children: [_jsx(Tooltip, Object.assign({ title: tooltipLabel || '' }, { children: _jsx(ConversionTypeLabel, { tableMode: tableMode, conversionType: conversionType }) })), currency && (_jsx(Tooltip, Object.assign({ title: _jsx(CurrencySymbol, { currency: currency }) }, { children: _jsx(CountryFlag, { currencyCode: currency }) }))), _jsx(Tooltip, Object.assign({ title: amountTooltipLabel }, { children: _jsx(CurrencyInfo, { tableMode: tableMode, amount: amount, currency: currency }) }))] }) })));
|
|
23
22
|
}
|
|
24
23
|
export default AmountCell;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
1
2
|
import type { TooltipProps } from '@mui/material/Tooltip';
|
|
2
|
-
|
|
3
|
+
interface Props extends Omit<TooltipProps, 'children'> {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
placement?: TooltipProps['placement'];
|
|
6
|
+
children?: ReactElement;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function Tooltip({ className, title, placement, children, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
3
10
|
export default Tooltip;
|
|
@@ -9,10 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { StyledTooltip } from './styles';
|
|
14
14
|
function Tooltip(_a) {
|
|
15
|
-
var { className, placement = 'top', children } = _a, rest = __rest(_a, ["className", "placement", "children"]);
|
|
16
|
-
return (_jsx(StyledTooltip, Object.assign({ classes: { popper: className }, placement: placement, arrow: true }, rest, { children: children })));
|
|
15
|
+
var { className, title, placement = 'top', children } = _a, rest = __rest(_a, ["className", "title", "placement", "children"]);
|
|
16
|
+
return (_jsx(StyledTooltip, Object.assign({ classes: { popper: className }, title: title, placement: placement, arrow: true }, rest, { children: children || _jsx(_Fragment, {}) })));
|
|
17
17
|
}
|
|
18
18
|
export default Tooltip;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { TooltipProps } from '@mui/material/Tooltip';
|
|
2
|
+
export declare const StyledTooltip: import("@emotion/styled").StyledComponent<TooltipProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -1,6 +1,21 @@
|
|
|
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";
|
|
1
13
|
import { styled } from '@mui/material/styles';
|
|
2
14
|
import TooltipComponent, { tooltipClasses } from '@mui/material/Tooltip';
|
|
3
|
-
export const StyledTooltip = styled(
|
|
15
|
+
export const StyledTooltip = styled((_a) => {
|
|
16
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
+
return _jsx(TooltipComponent, Object.assign({}, props, { classes: { popper: className } }));
|
|
18
|
+
})(({ theme }) => ({
|
|
4
19
|
zIndex: 999999,
|
|
5
20
|
[`& .${tooltipClasses.arrow}`]: {
|
|
6
21
|
'&:before': {
|
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.271-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.271-test.7",
|
|
5
|
+
"testVersion": 7,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|