@tap-payments/os-micro-frontend-shared 0.1.30 → 0.1.31-test.10
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/MaskedText/MaskedText.d.ts +1 -1
- package/build/components/MaskedText/MaskedText.js +3 -3
- package/build/components/MaskedText/type.d.ts +2 -1
- package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.d.ts +3 -0
- package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.js +43 -0
- package/build/components/RightLeftExpandingCenterChip/index.d.ts +2 -0
- package/build/components/RightLeftExpandingCenterChip/index.js +2 -0
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +3415 -0
- package/build/components/RightLeftExpandingCenterChip/style.js +104 -0
- package/build/components/RightLeftExpandingCenterChip/type.d.ts +10 -0
- package/build/components/RightLeftExpandingCenterChip/type.js +1 -0
- package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.d.ts +31 -0
- package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.js +156 -0
- package/build/components/StatusChip/StatusChip.d.ts +1 -1
- package/build/components/StatusChip/StatusChip.js +37 -4
- package/build/components/StatusChip/style.d.ts +10 -3
- package/build/components/StatusChip/style.js +14 -36
- package/build/components/StatusChip/type.d.ts +2 -0
- package/build/components/StatusChipWithCopy/StatusChipWithCopy.d.ts +11 -0
- package/build/components/StatusChipWithCopy/StatusChipWithCopy.js +12 -0
- package/build/components/StatusChipWithCopy/index.d.ts +4 -0
- package/build/components/StatusChipWithCopy/index.js +4 -0
- package/build/components/StatusChipWithCopy/utils.d.ts +4 -0
- package/build/components/StatusChipWithCopy/utils.js +4 -0
- package/build/components/StatusGroupChips/style.d.ts +2 -0
- package/build/components/StatusGroupChips/type.d.ts +2 -0
- package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.js +12 -11
- package/build/components/TableCells/CustomCells/type.d.ts +2 -2
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +3 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.d.ts +2 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.js +19 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.d.ts +7 -3
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.js +5 -3
- package/build/components/VirtualTables/components/TableRow.d.ts +4 -2
- package/build/components/VirtualTables/components/TableRow.js +11 -5
- package/build/components/VirtualTables/components/style.js +1 -1
- package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.js +1 -1
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/constants/assets.d.ts +3 -0
- package/build/constants/assets.js +3 -0
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +5 -0
- package/build/constants/table/cell/chargeTableCellWidth.js +5 -0
- package/build/types/table.d.ts +10 -0
- package/build/utils/style.d.ts +6 -0
- package/build/utils/style.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MaskedTextProps } from './type';
|
|
2
|
-
declare const MaskedText: ({ text, startLength, endLength }: MaskedTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MaskedText: ({ text, startLength, endLength, chipIndex, copyText, chipSelection }: MaskedTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MaskedText;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import StatusChipWithCopy from '../StatusChipWithCopy';
|
|
3
3
|
import { passwordDotsIcon } from '../../constants/index.js';
|
|
4
|
-
const MaskedText = ({ text, startLength = 8, endLength = 4 }) => {
|
|
4
|
+
const MaskedText = ({ text, startLength = 8, endLength = 4, chipIndex, copyText, chipSelection }) => {
|
|
5
5
|
const startText = text.slice(0, startLength);
|
|
6
6
|
const endText = text.slice(text.length - endLength);
|
|
7
|
-
return (_jsxs(
|
|
7
|
+
return (_jsxs(StatusChipWithCopy, Object.assign({ chipIndex: chipIndex, copyText: copyText, chipSelection: chipSelection }, { children: [startText, _jsx("img", { src: passwordDotsIcon, alt: "passwordDots" }), endText] })));
|
|
8
8
|
};
|
|
9
9
|
export default MaskedText;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { StatusChipWithCopyProps } from '../StatusChipWithCopy';
|
|
3
|
+
export interface MaskedTextProps extends StatusChipWithCopyProps {
|
|
3
4
|
text: string;
|
|
4
5
|
startLength?: number;
|
|
5
6
|
endLength?: number;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { RightLeftExpandingCenterChipProps } from './type';
|
|
2
|
+
declare function RightLeftExpandingCenterChip({ leftIcons, rightIcons, centerIcon, expandableCenter, expandedZIndex, ...props }: Readonly<RightLeftExpandingCenterChipProps>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default RightLeftExpandingCenterChip;
|
|
@@ -0,0 +1,43 @@
|
|
|
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 Box from '@mui/material/Box';
|
|
14
|
+
import { AnimatePresence } from 'framer-motion';
|
|
15
|
+
import { CenterIconWrapper, ExpandedSection, PeekContainer, CenterChip, LeftPeekChip, RightPeekChip, LeftExpandIcon, RightExpandIcon, ExpandChip, CenterShiftWrapper, CenterContent, ExpandableContainer, ExpandableInner, tableCellSx, CHIP_GAP, HoverBridge, } from './style';
|
|
16
|
+
import { useRightLeftExpandingCenterChip, DEFAULT_CHIP_MIN_WIDTH } from './useRightLeftExpandingCenterChip';
|
|
17
|
+
function RightLeftExpandingCenterChip(_a) {
|
|
18
|
+
var { leftIcons = [], rightIcons = [], centerIcon, expandableCenter, expandedZIndex = 1000 } = _a, props = __rest(_a, ["leftIcons", "rightIcons", "centerIcon", "expandableCenter", "expandedZIndex"]);
|
|
19
|
+
const { isHovering, handleMouseEnter, handleMouseLeave, centerWrapRef, centerContentRef, centerChipRef, anchors, leftChipRefs, rightChipRefs, leftOffsets, rightOffsets, expandableInnerRef, expandedMV, shiftX, rightShift, leftHoverWidth, rightHoverWidth, } = useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerIcon, expandableCenter });
|
|
20
|
+
return (_jsx(Box, Object.assign({}, props, { "data-testid": "RightLeftExpandingCenterChipBox", sx: tableCellSx }, { children: _jsx(CenterShiftWrapper, Object.assign({ "data-testid": "CenterShiftWrapper", initial: false, style: { x: shiftX } }, { children: _jsxs(CenterIconWrapper, Object.assign({ "data-testid": "CenterIconWrapper", ref: centerWrapRef, onMouseLeave: handleMouseLeave }, { children: [_jsxs(PeekContainer, Object.assign({ "data-testid": "PeekContainer" }, { children: [_jsx(AnimatePresence, Object.assign({ initial: false }, { children: leftIcons.length > 0 && (_jsx(LeftPeekChip, { "data-testid": "LeftPeekChip", initial: { opacity: 0, scale: 0.95, x: -4 }, animate: isHovering ? { opacity: 0, scale: 0.9, x: -6 } : { opacity: 1, scale: 1, x: -5 }, exit: { opacity: 0, scale: 0.95, x: -4 }, transition: { duration: 0.18, ease: 'easeOut' } }, "left-peek")) })), _jsxs(CenterChip, Object.assign({ "data-testid": "CenterChip", ref: centerChipRef, layout: true, onMouseEnter: handleMouseEnter }, { children: [_jsx(CenterContent, Object.assign({ "data-testid": "CenterContent", ref: centerContentRef, layout: true }, { children: centerIcon })), _jsx(AnimatePresence, Object.assign({ initial: false }, { children: expandableCenter && (_jsx(ExpandableContainer, Object.assign({ "data-testid": "ExpandableContainer", style: { width: expandedMV }, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: 'easeOut' } }, { children: _jsx(ExpandableInner, Object.assign({ "data-testid": "ExpandableInner", ref: expandableInnerRef, layout: true }, { children: expandableCenter })) }), "expandable-center")) }))] })), _jsx(AnimatePresence, Object.assign({ initial: false }, { children: rightIcons.length > 0 && (_jsx(RightPeekChip, { "data-testid": "RightPeekChip", initial: { opacity: 0, scale: 0.95, x: 4 }, animate: isHovering ? { opacity: 0, scale: 0.9, x: 6 } : { opacity: 1, scale: 1, x: 5 }, exit: { opacity: 0, scale: 0.95, x: 4 }, transition: { duration: 0.18, ease: 'easeOut' } }, "right-peek")) }))] })), isHovering && leftIcons.length > 0 && (_jsx(HoverBridge, { "data-testid": "LeftHoverBridge", side: "left", style: { width: leftHoverWidth, right: `calc(100% - ${anchors.left}px)`, zIndex: expandedZIndex, pointerEvents: 'auto' } })), isHovering && rightIcons.length > 0 && (_jsx(HoverBridge, { "data-testid": "RightHoverBridge", side: "right", style: { width: rightHoverWidth, left: `${anchors.right}px`, zIndex: expandedZIndex, pointerEvents: 'auto' } })), _jsx(AnimatePresence, Object.assign({ initial: false }, { children: leftIcons.length > 0 && (_jsx(ExpandedSection, Object.assign({ "data-testid": "LeftExpandedSection", side: "left", style: {
|
|
21
|
+
right: `calc(100% - ${anchors.left}px)`,
|
|
22
|
+
top: '50%',
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
pointerEvents: isHovering ? 'auto' : 'none',
|
|
25
|
+
zIndex: expandedZIndex,
|
|
26
|
+
}, initial: { opacity: 0, x: 0, y: '-50%' }, animate: isHovering ? { opacity: 1, x: 0, y: '-50%' } : { opacity: 0, x: 0, y: '-50%' }, exit: { opacity: 0, x: 0, y: '-50%' }, transition: { duration: 0.25, ease: 'easeOut' } }, { children: leftIcons.map((icon, index) => {
|
|
27
|
+
var _a;
|
|
28
|
+
const leftOffset = (_a = leftOffsets[index]) !== null && _a !== void 0 ? _a : (DEFAULT_CHIP_MIN_WIDTH + CHIP_GAP) * (index + 1);
|
|
29
|
+
return (_jsx(LeftExpandIcon, Object.assign({ "data-testid": `LeftExpandIcon-${index}`, initial: { opacity: 0, x: 0 }, animate: isHovering ? { opacity: 1, x: -leftOffset } : { opacity: 0, x: 0 }, exit: { opacity: 0, x: 0 }, transition: { duration: 0.25 + index * 0.04, ease: 'easeOut' }, style: { zIndex: expandedZIndex + (leftIcons.length - index) } }, { children: _jsx(ExpandChip, Object.assign({ "data-testid": `LeftExpandChip-${index}`, ref: (el) => (leftChipRefs.current[index] = el) }, { children: icon })) }), `left-${index}`));
|
|
30
|
+
}) }), "left-expanded")) })), _jsx(AnimatePresence, Object.assign({ initial: false }, { children: rightIcons.length > 0 && (_jsx(ExpandedSection, Object.assign({ "data-testid": "RightExpandedSection", side: "right", style: {
|
|
31
|
+
left: `${anchors.right}px`,
|
|
32
|
+
top: '50%',
|
|
33
|
+
position: 'absolute',
|
|
34
|
+
pointerEvents: isHovering ? 'auto' : 'none',
|
|
35
|
+
zIndex: expandedZIndex,
|
|
36
|
+
}, initial: { opacity: 0, x: 0, y: '-50%' }, animate: isHovering ? { opacity: 1, x: 0, y: '-50%' } : { opacity: 0, x: 0, y: '-50%' }, exit: { opacity: 0, x: 0, y: '-50%' }, transition: { duration: 0.25, ease: 'easeOut' } }, { children: rightIcons.map((icon, index) => {
|
|
37
|
+
var _a;
|
|
38
|
+
const base = (_a = rightOffsets[index]) !== null && _a !== void 0 ? _a : (DEFAULT_CHIP_MIN_WIDTH + CHIP_GAP) * (index + 1);
|
|
39
|
+
const shift = rightShift;
|
|
40
|
+
return (_jsx(RightExpandIcon, Object.assign({ "data-testid": `RightExpandIcon-${index}`, initial: { opacity: 0, x: 0 }, animate: isHovering ? { opacity: 1, x: shift + base } : { opacity: 0, x: 0 }, exit: { opacity: 0, x: 0 }, transition: { duration: 0.25 + index * 0.04, ease: 'easeOut' }, style: { zIndex: expandedZIndex + (rightIcons.length - index) } }, { children: _jsx(ExpandChip, Object.assign({ "data-testid": `RightExpandChip-${index}`, ref: (el) => (rightChipRefs.current[index] = el) }, { children: icon })) }), `right-${index}`));
|
|
41
|
+
}) }), "right-expanded")) }))] })) })) })));
|
|
42
|
+
}
|
|
43
|
+
export default RightLeftExpandingCenterChip;
|