@tap-payments/os-micro-frontend-shared 0.1.54 → 0.1.56-test.1
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.
|
@@ -14,7 +14,7 @@ import { useState } from 'react';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
16
16
|
import { copyText as copyTextHandler } from '../../utils/index.js';
|
|
17
|
-
import {
|
|
17
|
+
import { copyIcon, greenCheckIcon } from '../../constants/index.js';
|
|
18
18
|
import { unknownGeographyColors } from './constants';
|
|
19
19
|
import { ChipStyled, Wrapper, CopyWrapper } from './style';
|
|
20
20
|
const StatusChip = (_a) => {
|
|
@@ -40,6 +40,10 @@ const StatusChip = (_a) => {
|
|
|
40
40
|
};
|
|
41
41
|
return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected, style: { position: 'absolute', top: 0, left: 0, zIndex: isSelected ? 3 : 0 } }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
|
|
42
42
|
paddingRight: isSelected && copyText ? 12 : 0,
|
|
43
|
-
}, transition: { delay:
|
|
43
|
+
}, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isSelected && copyText && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { delay: isSelected ? 0.2 : 0, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
|
|
44
|
+
height: 12,
|
|
45
|
+
width: 12,
|
|
46
|
+
objectFit: 'contain',
|
|
47
|
+
} }) })) })] })) }))] })));
|
|
44
48
|
};
|
|
45
49
|
export default StatusChip;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import Box from '@mui/material/Box';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
-
import { SELECTION_COLORS } from '../../utils/index.js';
|
|
4
3
|
export const ChipStyled = styled(Box, {
|
|
5
4
|
shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'padding', 'maxWidth', 'isSelected'].includes(prop),
|
|
6
5
|
})(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth, }) => {
|
|
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', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box' }, (isSelected && {
|
|
8
|
-
|
|
9
|
-
borderColor: SELECTION_COLORS.primary,
|
|
10
|
-
img: {
|
|
11
|
-
filter: 'brightness(0) saturate(100%) invert(44%) sepia(54%) saturate(1203%) hue-rotate(170deg) brightness(91%) contrast(84%)',
|
|
12
|
-
},
|
|
6
|
+
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', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box', borderColor: theme.palette.common.white }, (isSelected && {
|
|
7
|
+
boxShadow: 'rgb(242, 242, 242) 7px 0px 8px 2px',
|
|
13
8
|
}));
|
|
14
9
|
});
|
|
15
10
|
export const Wrapper = styled(Box)(() => ({
|
package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.js
CHANGED
|
@@ -38,7 +38,8 @@ function SheetViewTableHeaderCell({ column: { header, id, align, headerStyle, so
|
|
|
38
38
|
};
|
|
39
39
|
return (_jsx(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "SheetViewVirtualTable_TableHeader_StyledCell", "data-column-id": id, "data-column-width": width, "data-column-width-used": width, "data-column-align": align, "data-column-order": order, "data-column-header": typeof header === 'string' ? header : 'component', "data-column-sortable": !!sortable, "data-column-filterable": !!filter, "data-column-pinned": isPinned, isFirst: isFirst, isLast: isLast, isSheetView: true, ref: cellRef, onClick: handleCellClick, sx: (theme) => (Object.assign({ display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width, textAlign: align, overflow: 'unset', cursor: 'pointer', boxSizing: 'border-box', border: isSelected ? '1px solid #1F88D0' : '1px solid #F2F2F2', borderBottom: 'none', backgroundColor: isSelected ? '#F2F2F2' : '#FCFCFC', minHeight: isSelected ? '28px' : 'auto', position: 'relative', '&:before': {
|
|
40
40
|
content: '""',
|
|
41
|
-
border: '1px solid transparent',
|
|
41
|
+
border: isSelected ? '1px solid #1F88D0' : '1px solid transparent',
|
|
42
|
+
borderBottom: 'none',
|
|
42
43
|
position: 'absolute',
|
|
43
44
|
top: 0,
|
|
44
45
|
right: 0,
|
package/package.json
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"testVersion":
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "build/index.js",
|
|
8
|
-
"module": "build/index.js",
|
|
9
|
-
"types": "build/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./build/index.d.ts",
|
|
13
|
-
"import": "./build/index.js",
|
|
14
|
-
"require": "./build/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./constants": {
|
|
17
|
-
"types": "./build/constants/index.d.ts",
|
|
18
|
-
"import": "./build/constants/index.js",
|
|
19
|
-
"require": "./build/constants/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./components": {
|
|
22
|
-
"types": "./build/components/index.d.ts",
|
|
23
|
-
"import": "./build/components/index.js",
|
|
24
|
-
"require": "./build/components/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./components/*": {
|
|
27
|
-
"types": "./build/components/*/index.d.ts",
|
|
28
|
-
"import": "./build/components/*/index.js",
|
|
29
|
-
"require": "./build/components/*/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./hooks": {
|
|
32
|
-
"types": "./build/hooks/index.d.ts",
|
|
33
|
-
"import": "./build/hooks/index.js",
|
|
34
|
-
"require": "./build/hooks/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./utils": {
|
|
37
|
-
"types": "./build/utils/index.d.ts",
|
|
38
|
-
"import": "./build/utils/index.js",
|
|
39
|
-
"require": "./build/utils/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./theme": {
|
|
42
|
-
"types": "./build/theme/index.d.ts",
|
|
43
|
-
"import": "./build/theme/index.js",
|
|
44
|
-
"require": "./build/theme/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./types": {
|
|
47
|
-
"types": "./build/types/index.d.ts",
|
|
48
|
-
"import": "./build/types/index.js",
|
|
49
|
-
"require": "./build/types/index.js"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"author": {
|
|
54
|
-
"name": "Ahmed Sharkawy",
|
|
55
|
-
"email": "a.elsharkawy@tap.company"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"build",
|
|
59
|
-
"readme.md"
|
|
60
|
-
],
|
|
61
|
-
"scripts": {
|
|
62
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
-
"push": "npm run ts:build && npm publish --access public",
|
|
64
|
-
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
65
|
-
"dev": "vite",
|
|
66
|
-
"build": "tsc -b && vite build ",
|
|
67
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
68
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
69
|
-
"lint": "eslint . --color",
|
|
70
|
-
"lint:fix": "eslint src --fix --color",
|
|
71
|
-
"preview": "vite preview",
|
|
72
|
-
"prepare": "husky"
|
|
73
|
-
},
|
|
74
|
-
"dependencies": {
|
|
75
|
-
"@emotion/react": "^11.11.0",
|
|
76
|
-
"@emotion/styled": "^11.11.0",
|
|
77
|
-
"@hookform/resolvers": "^3.3.1",
|
|
78
|
-
"@mui/material": "^5.12.3",
|
|
79
|
-
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
80
|
-
"axios": "^1.4.0",
|
|
81
|
-
"dayjs": "^1.11.8",
|
|
82
|
-
"framer-motion": "10.11.0",
|
|
83
|
-
"i18next": "^22.4.15",
|
|
84
|
-
"memoize-one": "^6.0.0",
|
|
85
|
-
"re-resizable": "^6.9.9",
|
|
86
|
-
"react": "^18.2.0",
|
|
87
|
-
"react-currency-input-field": "^3.6.11",
|
|
88
|
-
"react-dom": "^18.2.0",
|
|
89
|
-
"react-draggable": "^4.4.6",
|
|
90
|
-
"react-dropzone": "^14.2.3",
|
|
91
|
-
"react-hook-form": "^7.45.4",
|
|
92
|
-
"react-hot-toast": "^2.4.1",
|
|
93
|
-
"react-i18next": "^12.2.2",
|
|
94
|
-
"react-multi-date-picker": "^4.1.2",
|
|
95
|
-
"react-router-dom": "^7.7.0",
|
|
96
|
-
"react-virtualized-auto-sizer": "^1.0.20",
|
|
97
|
-
"react-window": "^1.8.9",
|
|
98
|
-
"react-window-infinite-loader": "^1.0.9",
|
|
99
|
-
"react18-input-otp": "^1.1.4",
|
|
100
|
-
"recharts": "^2.15.1"
|
|
101
|
-
},
|
|
102
|
-
"devDependencies": {
|
|
103
|
-
"@eslint/js": "^9.17.0",
|
|
104
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
105
|
-
"@types/lodash": "^4.17.15",
|
|
106
|
-
"@types/react": "^18.2.6",
|
|
107
|
-
"@types/react-dom": "^18.3.5",
|
|
108
|
-
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
109
|
-
"@types/react-window": "^1.8.5",
|
|
110
|
-
"@types/react-window-infinite-loader": "^1.0.6",
|
|
111
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
112
|
-
"eslint": "^9.17.0",
|
|
113
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
114
|
-
"eslint-plugin-react-refresh": "^0.4.16",
|
|
115
|
-
"globals": "^15.14.0",
|
|
116
|
-
"husky": "^8.0.3",
|
|
117
|
-
"lint-staged": "^13.2.2",
|
|
118
|
-
"prettier": "^2.8.8",
|
|
119
|
-
"tsc-alias": "^1.8.16",
|
|
120
|
-
"typescript": "5.0.2",
|
|
121
|
-
"typescript-eslint": "^8.18.2",
|
|
122
|
-
"vite": "6.0.5",
|
|
123
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
124
|
-
},
|
|
125
|
-
"lint-staged": {
|
|
126
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
127
|
-
"yarn run prettier:fix",
|
|
128
|
-
"yarn run lint"
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
"publishConfig": {
|
|
132
|
-
"registry": "https://registry.npmjs.org/"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.1.56-test.1",
|
|
5
|
+
"testVersion": 1,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"module": "build/index.js",
|
|
9
|
+
"types": "build/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./build/index.d.ts",
|
|
13
|
+
"import": "./build/index.js",
|
|
14
|
+
"require": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./constants": {
|
|
17
|
+
"types": "./build/constants/index.d.ts",
|
|
18
|
+
"import": "./build/constants/index.js",
|
|
19
|
+
"require": "./build/constants/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./components": {
|
|
22
|
+
"types": "./build/components/index.d.ts",
|
|
23
|
+
"import": "./build/components/index.js",
|
|
24
|
+
"require": "./build/components/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./components/*": {
|
|
27
|
+
"types": "./build/components/*/index.d.ts",
|
|
28
|
+
"import": "./build/components/*/index.js",
|
|
29
|
+
"require": "./build/components/*/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./hooks": {
|
|
32
|
+
"types": "./build/hooks/index.d.ts",
|
|
33
|
+
"import": "./build/hooks/index.js",
|
|
34
|
+
"require": "./build/hooks/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
"types": "./build/utils/index.d.ts",
|
|
38
|
+
"import": "./build/utils/index.js",
|
|
39
|
+
"require": "./build/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./theme": {
|
|
42
|
+
"types": "./build/theme/index.d.ts",
|
|
43
|
+
"import": "./build/theme/index.js",
|
|
44
|
+
"require": "./build/theme/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./types": {
|
|
47
|
+
"types": "./build/types/index.d.ts",
|
|
48
|
+
"import": "./build/types/index.js",
|
|
49
|
+
"require": "./build/types/index.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Ahmed Sharkawy",
|
|
55
|
+
"email": "a.elsharkawy@tap.company"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"build",
|
|
59
|
+
"readme.md"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
+
"push": "npm run ts:build && npm publish --access public",
|
|
64
|
+
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
65
|
+
"dev": "vite",
|
|
66
|
+
"build": "tsc -b && vite build ",
|
|
67
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
68
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
69
|
+
"lint": "eslint . --color",
|
|
70
|
+
"lint:fix": "eslint src --fix --color",
|
|
71
|
+
"preview": "vite preview",
|
|
72
|
+
"prepare": "husky"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@emotion/react": "^11.11.0",
|
|
76
|
+
"@emotion/styled": "^11.11.0",
|
|
77
|
+
"@hookform/resolvers": "^3.3.1",
|
|
78
|
+
"@mui/material": "^5.12.3",
|
|
79
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
80
|
+
"axios": "^1.4.0",
|
|
81
|
+
"dayjs": "^1.11.8",
|
|
82
|
+
"framer-motion": "10.11.0",
|
|
83
|
+
"i18next": "^22.4.15",
|
|
84
|
+
"memoize-one": "^6.0.0",
|
|
85
|
+
"re-resizable": "^6.9.9",
|
|
86
|
+
"react": "^18.2.0",
|
|
87
|
+
"react-currency-input-field": "^3.6.11",
|
|
88
|
+
"react-dom": "^18.2.0",
|
|
89
|
+
"react-draggable": "^4.4.6",
|
|
90
|
+
"react-dropzone": "^14.2.3",
|
|
91
|
+
"react-hook-form": "^7.45.4",
|
|
92
|
+
"react-hot-toast": "^2.4.1",
|
|
93
|
+
"react-i18next": "^12.2.2",
|
|
94
|
+
"react-multi-date-picker": "^4.1.2",
|
|
95
|
+
"react-router-dom": "^7.7.0",
|
|
96
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
97
|
+
"react-window": "^1.8.9",
|
|
98
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
99
|
+
"react18-input-otp": "^1.1.4",
|
|
100
|
+
"recharts": "^2.15.1"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@eslint/js": "^9.17.0",
|
|
104
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
105
|
+
"@types/lodash": "^4.17.15",
|
|
106
|
+
"@types/react": "^18.2.6",
|
|
107
|
+
"@types/react-dom": "^18.3.5",
|
|
108
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
109
|
+
"@types/react-window": "^1.8.5",
|
|
110
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
111
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
112
|
+
"eslint": "^9.17.0",
|
|
113
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
114
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
115
|
+
"globals": "^15.14.0",
|
|
116
|
+
"husky": "^8.0.3",
|
|
117
|
+
"lint-staged": "^13.2.2",
|
|
118
|
+
"prettier": "^2.8.8",
|
|
119
|
+
"tsc-alias": "^1.8.16",
|
|
120
|
+
"typescript": "5.0.2",
|
|
121
|
+
"typescript-eslint": "^8.18.2",
|
|
122
|
+
"vite": "6.0.5",
|
|
123
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
124
|
+
},
|
|
125
|
+
"lint-staged": {
|
|
126
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
127
|
+
"yarn run prettier:fix",
|
|
128
|
+
"yarn run lint"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"publishConfig": {
|
|
132
|
+
"registry": "https://registry.npmjs.org/"
|
|
133
|
+
}
|
|
134
|
+
}
|