@tap-payments/os-micro-frontend-shared 0.1.30 → 0.1.31-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.
Files changed (39) hide show
  1. package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.d.ts +3 -0
  2. package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.js +43 -0
  3. package/build/components/RightLeftExpandingCenterChip/index.d.ts +2 -0
  4. package/build/components/RightLeftExpandingCenterChip/index.js +2 -0
  5. package/build/components/RightLeftExpandingCenterChip/style.d.ts +3415 -0
  6. package/build/components/RightLeftExpandingCenterChip/style.js +104 -0
  7. package/build/components/RightLeftExpandingCenterChip/type.d.ts +10 -0
  8. package/build/components/RightLeftExpandingCenterChip/type.js +1 -0
  9. package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.d.ts +31 -0
  10. package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.js +156 -0
  11. package/build/components/StatusChip/StatusChip.d.ts +1 -1
  12. package/build/components/StatusChip/StatusChip.js +36 -3
  13. package/build/components/StatusChip/style.d.ts +7 -3
  14. package/build/components/StatusChip/style.js +6 -36
  15. package/build/components/StatusChip/type.d.ts +2 -0
  16. package/build/components/StatusGroupChips/style.d.ts +2 -0
  17. package/build/components/StatusGroupChips/type.d.ts +2 -0
  18. package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.d.ts +1 -1
  19. package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.js +12 -11
  20. package/build/components/TableCells/CustomCells/type.d.ts +2 -2
  21. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +3 -1
  22. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.d.ts +2 -0
  23. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.js +19 -0
  24. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.d.ts +7 -3
  25. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.js +5 -3
  26. package/build/components/VirtualTables/components/TableRow.d.ts +4 -2
  27. package/build/components/VirtualTables/components/TableRow.js +11 -5
  28. package/build/components/VirtualTables/components/style.js +1 -1
  29. package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.js +1 -1
  30. package/build/components/index.d.ts +1 -0
  31. package/build/components/index.js +1 -0
  32. package/build/constants/assets.d.ts +3 -0
  33. package/build/constants/assets.js +3 -0
  34. package/build/constants/table/cell/chargeTableCellWidth.d.ts +5 -0
  35. package/build/constants/table/cell/chargeTableCellWidth.js +5 -0
  36. package/build/types/table.d.ts +10 -0
  37. package/build/utils/style.d.ts +6 -0
  38. package/build/utils/style.js +1 -1
  39. package/package.json +2 -2
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { default as RightLeftExpandingCenterChip } from './RightLeftExpandingCenterChip';
2
+ export * from './type';
@@ -0,0 +1,2 @@
1
+ export { default as RightLeftExpandingCenterChip } from './RightLeftExpandingCenterChip';
2
+ export * from './type';