@tap-payments/os-micro-frontend-shared 0.0.176 → 0.0.180-alpha.0
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/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/Button/StyledButton/StyledButton.d.ts +0 -1
- package/build/components/Button/StyledButton/style.d.ts +1 -1
- package/build/components/Button/StyledButton/style.js +3 -5
- package/build/components/CountryFlag/CountryFlag.js +3 -1
- package/build/components/MultiSelectStatusButton/MultiSelectStatusButton.js +1 -1
- package/build/components/MultiSelectStatusButton/style.d.ts +1 -1
- package/build/components/MultiSelectStatusButton/style.js +1 -1
- package/build/components/SearchButton/styles.d.ts +1 -1
- package/build/components/StatusBar/StatusBar.d.ts +1 -1
- package/build/components/StatusBar/StatusBar.js +1 -1
- package/build/components/StatusBar/type.d.ts +5 -0
- package/build/components/StatusButton/ChevronIcon.d.ts +2 -2
- package/build/components/StatusButton/ChevronIcon.js +4 -2
- package/build/components/StatusButton/StatusButton.d.ts +3 -4
- package/build/components/StatusButton/StatusButton.js +54 -38
- package/build/components/StatusButton/style.d.ts +4 -0
- package/build/components/StatusButton/style.js +7 -0
- package/build/components/StatusButton/type.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -1
- package/build/components/{TableHeader_V2 → TableHeader}/index.d.ts +0 -1
- package/build/components/{TableHeader_V2 → TableHeader}/index.js +0 -1
- package/build/components/{TableHeader_V2 → TableHeader}/type.d.ts +1 -4
- package/build/components/{TableHeader_V2/components/TableView → TableView}/CustomViews.d.ts +1 -1
- package/build/components/{TableHeader_V2/components/TableView → TableView}/CustomViews.js +2 -2
- package/build/components/{TableHeader_V2/components/TableView → TableView}/DefaultViews.d.ts +1 -1
- package/build/components/{TableHeader_V2/components/TableView → TableView}/DefaultViews.js +2 -2
- package/build/components/{TableHeader_V2/components/TableView → TableView}/TableView.d.ts +1 -1
- package/build/components/{TableHeader_V2/components/TableView → TableView}/TableView.js +3 -3
- package/build/components/VirtualTable/components/ColumnFilter/ColumnFilter.js +1 -1
- package/build/components/VirtualTable/style.d.ts +1 -1
- package/build/components/index.d.ts +1 -1
- package/build/components/index.js +1 -1
- package/build/constants/assets.d.ts +0 -1
- package/build/constants/assets.js +0 -1
- package/package.json +132 -132
- package/build/components/TableHeader_V2/components/StatusButtons/ChevronIcon.d.ts +0 -2
- package/build/components/TableHeader_V2/components/StatusButtons/ChevronIcon.js +0 -18
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButton.d.ts +0 -3
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButton.js +0 -54
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButtons.d.ts +0 -11
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButtons.js +0 -38
- package/build/components/TableHeader_V2/components/StatusButtons/constant.d.ts +0 -21
- package/build/components/TableHeader_V2/components/StatusButtons/constant.js +0 -22
- package/build/components/TableHeader_V2/components/StatusButtons/index.d.ts +0 -3
- package/build/components/TableHeader_V2/components/StatusButtons/index.js +0 -3
- package/build/components/TableHeader_V2/components/StatusButtons/style.d.ts +0 -35
- package/build/components/TableHeader_V2/components/StatusButtons/style.js +0 -75
- package/build/components/TableHeader_V2/components/StatusButtons/type.d.ts +0 -25
- package/build/components/TableHeader_V2/components/index.d.ts +0 -2
- package/build/components/TableHeader_V2/components/index.js +0 -2
- /package/build/components/{TableHeader_V2/components/StatusButtons → StatusBar}/type.js +0 -0
- /package/build/components/{TableHeader_V2 → TableHeader}/FiltersRow.d.ts +0 -0
- /package/build/components/{TableHeader_V2 → TableHeader}/FiltersRow.js +0 -0
- /package/build/components/{TableHeader_V2 → TableHeader}/TableHeader.d.ts +0 -0
- /package/build/components/{TableHeader_V2 → TableHeader}/TableHeader.js +0 -0
- /package/build/components/{TableHeader_V2 → TableHeader}/style.d.ts +0 -0
- /package/build/components/{TableHeader_V2 → TableHeader}/style.js +0 -0
- /package/build/components/{TableHeader_V2 → TableHeader}/type.js +0 -0
- /package/build/components/{TableHeader_V2 → TableView}/data.d.ts +0 -0
- /package/build/components/{TableHeader_V2 → TableView}/data.js +0 -0
- /package/build/components/{TableHeader_V2/components/TableView → TableView}/index.d.ts +0 -0
- /package/build/components/{TableHeader_V2/components/TableView → TableView}/index.js +0 -0
- /package/build/components/{TableHeader_V2/components/TableView → TableView}/style.d.ts +0 -0
- /package/build/components/{TableHeader_V2/components/TableView → TableView}/style.js +0 -0
package/package.json
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "build/index.js",
|
|
7
|
-
"module": "build/index.js",
|
|
8
|
-
"types": "build/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./build/index.d.ts",
|
|
12
|
-
"import": "./build/index.js",
|
|
13
|
-
"require": "./build/index.js"
|
|
14
|
-
},
|
|
15
|
-
"./constants": {
|
|
16
|
-
"types": "./build/constants/index.d.ts",
|
|
17
|
-
"import": "./build/constants/index.js",
|
|
18
|
-
"require": "./build/constants/index.js"
|
|
19
|
-
},
|
|
20
|
-
"./components": {
|
|
21
|
-
"types": "./build/components/index.d.ts",
|
|
22
|
-
"import": "./build/components/index.js",
|
|
23
|
-
"require": "./build/components/index.js"
|
|
24
|
-
},
|
|
25
|
-
"./components/*": {
|
|
26
|
-
"types": "./build/components/*/index.d.ts",
|
|
27
|
-
"import": "./build/components/*/index.js",
|
|
28
|
-
"require": "./build/components/*/index.js"
|
|
29
|
-
},
|
|
30
|
-
"./hooks": {
|
|
31
|
-
"types": "./build/hooks/index.d.ts",
|
|
32
|
-
"import": "./build/hooks/index.js",
|
|
33
|
-
"require": "./build/hooks/index.js"
|
|
34
|
-
},
|
|
35
|
-
"./utils": {
|
|
36
|
-
"types": "./build/utils/index.d.ts",
|
|
37
|
-
"import": "./build/utils/index.js",
|
|
38
|
-
"require": "./build/utils/index.js"
|
|
39
|
-
},
|
|
40
|
-
"./theme": {
|
|
41
|
-
"types": "./build/theme/index.d.ts",
|
|
42
|
-
"import": "./build/theme/index.js",
|
|
43
|
-
"require": "./build/theme/index.js"
|
|
44
|
-
},
|
|
45
|
-
"./types": {
|
|
46
|
-
"types": "./build/types/index.d.ts",
|
|
47
|
-
"import": "./build/types/index.js",
|
|
48
|
-
"require": "./build/types/index.js"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"license": "MIT",
|
|
52
|
-
"author": {
|
|
53
|
-
"name": "Ahmed Sharkawy",
|
|
54
|
-
"email": "a.elsharkawy@tap.company"
|
|
55
|
-
},
|
|
56
|
-
"files": [
|
|
57
|
-
"build",
|
|
58
|
-
"readme.md"
|
|
59
|
-
],
|
|
60
|
-
"scripts": {
|
|
61
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
62
|
-
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
63
|
-
"dev": "vite",
|
|
64
|
-
"build": "tsc -b && vite build ",
|
|
65
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
66
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
67
|
-
"lint": "eslint . --color",
|
|
68
|
-
"lint:fix": "eslint src --fix --color",
|
|
69
|
-
"preview": "vite preview",
|
|
70
|
-
"prepare": "husky"
|
|
71
|
-
},
|
|
72
|
-
"dependencies": {
|
|
73
|
-
"@emotion/react": "^11.11.0",
|
|
74
|
-
"@emotion/styled": "^11.11.0",
|
|
75
|
-
"@hookform/resolvers": "^3.3.1",
|
|
76
|
-
"@mui/material": "^5.12.3",
|
|
77
|
-
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
78
|
-
"axios": "^1.4.0",
|
|
79
|
-
"dayjs": "^1.11.8",
|
|
80
|
-
"framer-motion": "10.11.0",
|
|
81
|
-
"i18next": "^22.4.15",
|
|
82
|
-
"memoize-one": "^6.0.0",
|
|
83
|
-
"re-resizable": "^6.9.9",
|
|
84
|
-
"react": "^18.2.0",
|
|
85
|
-
"react-currency-input-field": "^3.6.11",
|
|
86
|
-
"react-dom": "^18.2.0",
|
|
87
|
-
"react-draggable": "^4.4.6",
|
|
88
|
-
"react-dropzone": "^14.2.3",
|
|
89
|
-
"react-hook-form": "^7.45.4",
|
|
90
|
-
"react-hot-toast": "^2.4.1",
|
|
91
|
-
"react-i18next": "^12.2.2",
|
|
92
|
-
"react-multi-date-picker": "^4.1.2",
|
|
93
|
-
"react-router-dom": "^6.14.2",
|
|
94
|
-
"react-virtualized-auto-sizer": "^1.0.20",
|
|
95
|
-
"react-window": "^1.8.9",
|
|
96
|
-
"react-window-infinite-loader": "^1.0.9",
|
|
97
|
-
"react18-input-otp": "^1.1.4",
|
|
98
|
-
"recharts": "^2.15.1"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"@eslint/js": "^9.17.0",
|
|
102
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
103
|
-
"@types/lodash": "^4.17.15",
|
|
104
|
-
"@types/react": "^18.2.6",
|
|
105
|
-
"@types/react-dom": "^18.3.5",
|
|
106
|
-
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
107
|
-
"@types/react-window": "^1.8.5",
|
|
108
|
-
"@types/react-window-infinite-loader": "^1.0.6",
|
|
109
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
110
|
-
"eslint": "^9.17.0",
|
|
111
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
112
|
-
"eslint-plugin-react-refresh": "^0.4.16",
|
|
113
|
-
"globals": "^15.14.0",
|
|
114
|
-
"husky": "^8.0.3",
|
|
115
|
-
"lint-staged": "^13.2.2",
|
|
116
|
-
"prettier": "^2.8.8",
|
|
117
|
-
"tsc-alias": "^1.8.16",
|
|
118
|
-
"typescript": "5.0.2",
|
|
119
|
-
"typescript-eslint": "^8.18.2",
|
|
120
|
-
"vite": "6.0.5",
|
|
121
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
122
|
-
},
|
|
123
|
-
"lint-staged": {
|
|
124
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
125
|
-
"yarn run prettier:fix",
|
|
126
|
-
"yarn run lint"
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
"publishConfig": {
|
|
130
|
-
"registry": "https://registry.npmjs.org/"
|
|
131
|
-
}
|
|
132
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.0.180-alpha.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"module": "build/index.js",
|
|
8
|
+
"types": "build/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./build/index.d.ts",
|
|
12
|
+
"import": "./build/index.js",
|
|
13
|
+
"require": "./build/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./constants": {
|
|
16
|
+
"types": "./build/constants/index.d.ts",
|
|
17
|
+
"import": "./build/constants/index.js",
|
|
18
|
+
"require": "./build/constants/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./components": {
|
|
21
|
+
"types": "./build/components/index.d.ts",
|
|
22
|
+
"import": "./build/components/index.js",
|
|
23
|
+
"require": "./build/components/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./components/*": {
|
|
26
|
+
"types": "./build/components/*/index.d.ts",
|
|
27
|
+
"import": "./build/components/*/index.js",
|
|
28
|
+
"require": "./build/components/*/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./hooks": {
|
|
31
|
+
"types": "./build/hooks/index.d.ts",
|
|
32
|
+
"import": "./build/hooks/index.js",
|
|
33
|
+
"require": "./build/hooks/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./utils": {
|
|
36
|
+
"types": "./build/utils/index.d.ts",
|
|
37
|
+
"import": "./build/utils/index.js",
|
|
38
|
+
"require": "./build/utils/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./theme": {
|
|
41
|
+
"types": "./build/theme/index.d.ts",
|
|
42
|
+
"import": "./build/theme/index.js",
|
|
43
|
+
"require": "./build/theme/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./types": {
|
|
46
|
+
"types": "./build/types/index.d.ts",
|
|
47
|
+
"import": "./build/types/index.js",
|
|
48
|
+
"require": "./build/types/index.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"author": {
|
|
53
|
+
"name": "Ahmed Sharkawy",
|
|
54
|
+
"email": "a.elsharkawy@tap.company"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"build",
|
|
58
|
+
"readme.md"
|
|
59
|
+
],
|
|
60
|
+
"scripts": {
|
|
61
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
62
|
+
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
63
|
+
"dev": "vite",
|
|
64
|
+
"build": "tsc -b && vite build ",
|
|
65
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
66
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
67
|
+
"lint": "eslint . --color",
|
|
68
|
+
"lint:fix": "eslint src --fix --color",
|
|
69
|
+
"preview": "vite preview",
|
|
70
|
+
"prepare": "husky"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@emotion/react": "^11.11.0",
|
|
74
|
+
"@emotion/styled": "^11.11.0",
|
|
75
|
+
"@hookform/resolvers": "^3.3.1",
|
|
76
|
+
"@mui/material": "^5.12.3",
|
|
77
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
78
|
+
"axios": "^1.4.0",
|
|
79
|
+
"dayjs": "^1.11.8",
|
|
80
|
+
"framer-motion": "10.11.0",
|
|
81
|
+
"i18next": "^22.4.15",
|
|
82
|
+
"memoize-one": "^6.0.0",
|
|
83
|
+
"re-resizable": "^6.9.9",
|
|
84
|
+
"react": "^18.2.0",
|
|
85
|
+
"react-currency-input-field": "^3.6.11",
|
|
86
|
+
"react-dom": "^18.2.0",
|
|
87
|
+
"react-draggable": "^4.4.6",
|
|
88
|
+
"react-dropzone": "^14.2.3",
|
|
89
|
+
"react-hook-form": "^7.45.4",
|
|
90
|
+
"react-hot-toast": "^2.4.1",
|
|
91
|
+
"react-i18next": "^12.2.2",
|
|
92
|
+
"react-multi-date-picker": "^4.1.2",
|
|
93
|
+
"react-router-dom": "^6.14.2",
|
|
94
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
95
|
+
"react-window": "^1.8.9",
|
|
96
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
97
|
+
"react18-input-otp": "^1.1.4",
|
|
98
|
+
"recharts": "^2.15.1"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@eslint/js": "^9.17.0",
|
|
102
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
103
|
+
"@types/lodash": "^4.17.15",
|
|
104
|
+
"@types/react": "^18.2.6",
|
|
105
|
+
"@types/react-dom": "^18.3.5",
|
|
106
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
107
|
+
"@types/react-window": "^1.8.5",
|
|
108
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
109
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
110
|
+
"eslint": "^9.17.0",
|
|
111
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
112
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
113
|
+
"globals": "^15.14.0",
|
|
114
|
+
"husky": "^8.0.3",
|
|
115
|
+
"lint-staged": "^13.2.2",
|
|
116
|
+
"prettier": "^2.8.8",
|
|
117
|
+
"tsc-alias": "^1.8.16",
|
|
118
|
+
"typescript": "5.0.2",
|
|
119
|
+
"typescript-eslint": "^8.18.2",
|
|
120
|
+
"vite": "6.0.5",
|
|
121
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
122
|
+
},
|
|
123
|
+
"lint-staged": {
|
|
124
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
125
|
+
"yarn run prettier:fix",
|
|
126
|
+
"yarn run lint"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"registry": "https://registry.npmjs.org/"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { useTheme } from '@mui/material';
|
|
4
|
-
export function ChevronIcon({ isActive, disableHover }) {
|
|
5
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
6
|
-
const theme = useTheme();
|
|
7
|
-
const handleMouseEnter = () => {
|
|
8
|
-
if (!disableHover) {
|
|
9
|
-
setIsHovered(true);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
const handleMouseLeave = () => {
|
|
13
|
-
setIsHovered(false);
|
|
14
|
-
};
|
|
15
|
-
const iconColor = isActive ? theme.palette.common.white : theme.palette.grey[700];
|
|
16
|
-
const backgroundColor = isHovered ? theme.palette.common.black : 'transparent';
|
|
17
|
-
return (_jsx("svg", Object.assign({ width: "27", height: "30", viewBox: "0 0 27 32", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsxs("g", Object.assign({ id: "Group 140343" }, { children: [_jsx("path", { id: "Active", d: "M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z", fill: backgroundColor, fillOpacity: "0.1", onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }), _jsx("path", { id: "Union", fillRule: "evenodd", clipRule: "evenodd", d: "M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z", fill: iconColor })] })) })));
|
|
18
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
import { memo, useRef, useState } from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import StyledBadge, { BadgeVariants } from '../../../CountBadge';
|
|
16
|
-
import { convertToNumber, formatNumber } from '../../../../utils/index.js';
|
|
17
|
-
import { ChevronIcon } from './ChevronIcon';
|
|
18
|
-
import { ChevronContainer, Label, LabelWrapper, StyledStatusIcon, StyledDropdown, statusButtonVariants } from './style';
|
|
19
|
-
import { statusButtonIcons } from './constant';
|
|
20
|
-
export const StatusButton = memo((props) => {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
const { variant = 'inActive', badgeCount, icon, label, dropdownOptions, onButtonBodyClick } = props, restProps = __rest(props, ["variant", "badgeCount", "icon", "label", "dropdownOptions", "onButtonBodyClick"]);
|
|
23
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
24
|
-
const buttonRef = useRef(null);
|
|
25
|
-
const [lastActiveStatus, setLastActiveStatus] = useState((_a = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions[0]) === null || _a === void 0 ? void 0 : _a.status);
|
|
26
|
-
const { t } = useTranslation();
|
|
27
|
-
const open = Boolean(anchorEl);
|
|
28
|
-
const handleClose = () => {
|
|
29
|
-
setAnchorEl(null);
|
|
30
|
-
};
|
|
31
|
-
const Button = statusButtonVariants[variant];
|
|
32
|
-
const hasDropdown = dropdownOptions && dropdownOptions.length > 0;
|
|
33
|
-
const statusIcon = icon ? _jsx(StyledStatusIcon, { icon: icon, variant: variant, src: statusButtonIcons[icon], alt: `${icon}-icon` }) : null;
|
|
34
|
-
const statusBadge = badgeCount && !Number.isNaN(convertToNumber(badgeCount)) ? (_jsx(StyledBadge, Object.assign({ variant: variant === 'active' ? BadgeVariants.ACTIVE : BadgeVariants.INACTIVE }, { children: formatNumber(Number(badgeCount)) }))) : null;
|
|
35
|
-
const dropdownIcon = hasDropdown ? _jsx(ChevronIcon, { isActive: variant === 'active' }) : null;
|
|
36
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ "data-testid": "StatusButton" }, restProps, { ref: buttonRef, onClick: (e) => {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
(_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
39
|
-
onButtonBodyClick === null || onButtonBodyClick === void 0 ? void 0 : onButtonBodyClick(lastActiveStatus || ((_b = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions[0]) === null || _b === void 0 ? void 0 : _b.status) || 'all');
|
|
40
|
-
}, sx: Object.assign({}, (hasDropdown && {
|
|
41
|
-
paddingInlineEnd: '27px',
|
|
42
|
-
})) }, { children: _jsxs(LabelWrapper, Object.assign({ onClick: (e) => {
|
|
43
|
-
e.stopPropagation();
|
|
44
|
-
e.preventDefault();
|
|
45
|
-
if (hasDropdown) {
|
|
46
|
-
setAnchorEl(buttonRef.current);
|
|
47
|
-
}
|
|
48
|
-
} }, { children: [_jsxs(Label, Object.assign({ variant: variant }, { children: [statusIcon, lastActiveStatus ? t(lastActiveStatus) : label, statusBadge] })), dropdownIcon && _jsx(ChevronContainer, { children: dropdownIcon })] })) })), open && (_jsx(StyledDropdown, { open: open, onClose: handleClose, anchorEl: anchorEl, menuItems: (_b = (dropdownOptions || [])) === null || _b === void 0 ? void 0 : _b.map((item) => (Object.assign(Object.assign({}, item), { onClick: (e) => {
|
|
49
|
-
var _a;
|
|
50
|
-
(_a = item === null || item === void 0 ? void 0 : item.onClick) === null || _a === void 0 ? void 0 : _a.call(item, e);
|
|
51
|
-
setLastActiveStatus(item.status);
|
|
52
|
-
handleClose();
|
|
53
|
-
} }))) }))] }));
|
|
54
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AvailableStatus } from '../../type';
|
|
3
|
-
import { TableHeaderStatus } from '../../../../types/index.js';
|
|
4
|
-
export type StatusButtonsProps = {
|
|
5
|
-
availableStatuses: AvailableStatus[];
|
|
6
|
-
status: TableHeaderStatus;
|
|
7
|
-
onStatusChange?: (status: TableHeaderStatus) => void;
|
|
8
|
-
isFilteredIdsShown?: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import("react").MemoExoticComponent<(props: StatusButtonsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
|
-
export default _default;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { createElement as _createElement } from "react";
|
|
3
|
-
import { memo, useMemo } from 'react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { StatusButton } from './StatusButton';
|
|
6
|
-
const StatusButtonItem = memo((props) => {
|
|
7
|
-
var _a;
|
|
8
|
-
const { availableStatus, getButtonStatus, onStatusChange, status } = props;
|
|
9
|
-
const { t } = useTranslation();
|
|
10
|
-
if (!Array.isArray(availableStatus.status)) {
|
|
11
|
-
return (_createElement(StatusButton, Object.assign({}, availableStatus, { key: `status-button-array-${availableStatus.status}`, variant: getButtonStatus(availableStatus.status), onClick: () => {
|
|
12
|
-
if (!Array.isArray(availableStatus.status)) {
|
|
13
|
-
onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(availableStatus.status);
|
|
14
|
-
}
|
|
15
|
-
} })));
|
|
16
|
-
}
|
|
17
|
-
const isCurrentStatusDropdown = (_a = availableStatus.status) === null || _a === void 0 ? void 0 : _a.includes(status || '');
|
|
18
|
-
const variant = isCurrentStatusDropdown ? 'active' : 'inActive';
|
|
19
|
-
const statusLabel = isCurrentStatusDropdown ? status : availableStatus.status[0];
|
|
20
|
-
return (_jsx("div", { children: _jsx(StatusButton, Object.assign({}, availableStatus, { label: t(statusLabel || ''), variant: variant, onButtonBodyClick: (buttonStatus) => {
|
|
21
|
-
onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(buttonStatus);
|
|
22
|
-
}, dropdownOptions: availableStatus.status.map((stat) => ({
|
|
23
|
-
label: t(stat || ''),
|
|
24
|
-
onClick: () => {
|
|
25
|
-
onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(stat);
|
|
26
|
-
},
|
|
27
|
-
status: stat,
|
|
28
|
-
})) })) }));
|
|
29
|
-
});
|
|
30
|
-
const StatusButtons = (props) => {
|
|
31
|
-
const { availableStatuses, status, onStatusChange, isFilteredIdsShown } = props;
|
|
32
|
-
const getButtonStatus = useMemo(() => (buttonStatus) => buttonStatus === status && !isFilteredIdsShown ? 'active' : 'inActive', [status, isFilteredIdsShown]);
|
|
33
|
-
return (_jsx(_Fragment, { children: availableStatuses === null || availableStatuses === void 0 ? void 0 : availableStatuses.map((availableStatus) => {
|
|
34
|
-
var _a;
|
|
35
|
-
return (_jsx(StatusButtonItem, { availableStatus: availableStatus, getButtonStatus: getButtonStatus, onStatusChange: onStatusChange, status: status }, Array.isArray(availableStatus.status) ? (_a = availableStatus === null || availableStatus === void 0 ? void 0 : availableStatus.status) === null || _a === void 0 ? void 0 : _a[0] : `status-button-array-${availableStatus.status}`));
|
|
36
|
-
}) }));
|
|
37
|
-
};
|
|
38
|
-
export default memo(StatusButtons);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const statusButtonIcons: {
|
|
2
|
-
inProgress: string;
|
|
3
|
-
initiated: string;
|
|
4
|
-
abandoned: string;
|
|
5
|
-
cancelled: string;
|
|
6
|
-
reversed: string;
|
|
7
|
-
reports: string;
|
|
8
|
-
search: string;
|
|
9
|
-
chevronDown: string;
|
|
10
|
-
unAuthorized: string;
|
|
11
|
-
unSettled: string;
|
|
12
|
-
unCaptured: string;
|
|
13
|
-
captured: string;
|
|
14
|
-
authorized: string;
|
|
15
|
-
openFlag: string;
|
|
16
|
-
closedFlag: string;
|
|
17
|
-
unauthenticated: string;
|
|
18
|
-
authenticated: string;
|
|
19
|
-
paidOut: string;
|
|
20
|
-
scheduled: string;
|
|
21
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../../../constants/index.js';
|
|
2
|
-
export const statusButtonIcons = {
|
|
3
|
-
inProgress: initiatedIcon,
|
|
4
|
-
initiated: initiatedIcon,
|
|
5
|
-
abandoned: abandonedIcon,
|
|
6
|
-
cancelled: cancelledIcon,
|
|
7
|
-
reversed: reverseActionIcon,
|
|
8
|
-
reports: reportsIcon,
|
|
9
|
-
search: searchIcon,
|
|
10
|
-
chevronDown: chevronDownIcon,
|
|
11
|
-
unAuthorized: unAuthorizedIcon,
|
|
12
|
-
unSettled: settlementInitiatedIcon,
|
|
13
|
-
unCaptured: unCapturedIcon,
|
|
14
|
-
captured: capturedIcon,
|
|
15
|
-
authorized: authorizedIcon,
|
|
16
|
-
openFlag: openFlagIcon,
|
|
17
|
-
closedFlag: closedFlagIcon,
|
|
18
|
-
unauthenticated: unauthenticatedIcon,
|
|
19
|
-
authenticated: authenticatedIcon,
|
|
20
|
-
paidOut: paidOutFilterIcon,
|
|
21
|
-
scheduled: scheduledFilterIcon,
|
|
22
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { type Theme } from '@mui/material';
|
|
3
|
-
export declare const statusButtonVariants: {
|
|
4
|
-
active: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
5
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
6
|
-
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
7
|
-
icon?: string | undefined;
|
|
8
|
-
}, {}, {}>;
|
|
9
|
-
inActive: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
10
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
11
|
-
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
12
|
-
icon?: string | undefined;
|
|
13
|
-
}, {}, {}>;
|
|
14
|
-
};
|
|
15
|
-
export type StatusButtonVariant = keyof typeof statusButtonVariants;
|
|
16
|
-
export declare const CountBadge: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
17
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
18
|
-
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
19
|
-
variant: StatusButtonVariant;
|
|
20
|
-
}, {}, {}>;
|
|
21
|
-
export declare const StyledStatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
22
|
-
variant: StatusButtonVariant;
|
|
23
|
-
icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
|
|
24
|
-
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
25
|
-
export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
26
|
-
export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../../..").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
27
|
-
export declare const ChevronContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
28
|
-
export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
29
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
30
|
-
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
31
|
-
variant: StatusButtonVariant;
|
|
32
|
-
}, {}, {}>;
|
|
33
|
-
export declare const LabelWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
34
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
35
|
-
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { styled, Button, Box, alpha } from '@mui/material';
|
|
2
|
-
import Dropdown from '../../../DropdownMenu/DropdownMenu';
|
|
3
|
-
const baseButtonStyle = (theme) => (Object.assign(Object.assign({}, theme.typography.subtitle1), { borderRadius: '50px', borderWidth: '1px', borderStyle: 'solid', minWidth: '135.11px', height: '32px', display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '8px', textTransform: 'none', transition: 'none', paddingInline: theme.spacing(2) }));
|
|
4
|
-
const ActiveButton = styled(Button)(({ theme }) => (Object.assign(Object.assign({}, baseButtonStyle(theme)), { background: theme.palette.background.gradient.shadedBlue, color: theme.palette.common.white, '&:hover': {
|
|
5
|
-
background: theme.palette.background.gradient.shadedBlue,
|
|
6
|
-
opacity: 0.8,
|
|
7
|
-
} })));
|
|
8
|
-
const InActiveButton = styled(Button)(({ theme }) => (Object.assign(Object.assign({}, baseButtonStyle(theme)), { backgroundColor: theme.palette.common.white, borderColor: theme.palette.grey[100], color: theme.palette.text.primary, '&:hover': {
|
|
9
|
-
backgroundColor: theme.palette.common.white,
|
|
10
|
-
opacity: 0.7,
|
|
11
|
-
} })));
|
|
12
|
-
export const statusButtonVariants = {
|
|
13
|
-
active: ActiveButton,
|
|
14
|
-
inActive: InActiveButton,
|
|
15
|
-
};
|
|
16
|
-
export const CountBadge = styled(Box)(({ theme, variant }) => ({
|
|
17
|
-
borderRadius: '50px',
|
|
18
|
-
backgroundColor: variant === 'active' ? alpha(theme.palette.text.primary, 0.1) : theme.palette.grey[100],
|
|
19
|
-
display: 'flex',
|
|
20
|
-
justifyContent: 'center',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
paddingInline: theme.spacing(0.5),
|
|
23
|
-
paddingBlock: theme.spacing(0.25),
|
|
24
|
-
color: variant === 'active' ? theme.palette.common.white : theme.palette.text.primary,
|
|
25
|
-
fontSize: '8px',
|
|
26
|
-
fontWeight: 700,
|
|
27
|
-
lineHeight: '10px',
|
|
28
|
-
}));
|
|
29
|
-
export const StyledStatusIcon = styled('img')(({ theme, variant, icon }) => {
|
|
30
|
-
var _a;
|
|
31
|
-
return (Object.assign(Object.assign({ fill: variant === 'active' ? theme.palette.common.white : theme.palette.text.primary, color: variant === 'active' ? theme.palette.common.white : theme.palette.text.primary }, (!(((_a = ['openFlag', 'closedFlag']) === null || _a === void 0 ? void 0 : _a.includes(icon !== null && icon !== void 0 ? icon : '')) && variant === 'inActive') &&
|
|
32
|
-
icon !== 'captured' && {
|
|
33
|
-
filter: variant === 'active' ? 'brightness(0) invert(1)' : 'brightness(0) invert(0)',
|
|
34
|
-
})), { maxWidth: '14px', maxHeight: '14px' }));
|
|
35
|
-
});
|
|
36
|
-
export const StyledFilterName = styled('p')(({ theme }) => ({
|
|
37
|
-
fontSize: '0.6875rem',
|
|
38
|
-
color: theme.palette.background.default,
|
|
39
|
-
fontStyle: 'normal',
|
|
40
|
-
margin: 'auto',
|
|
41
|
-
textTransform: 'capitalize',
|
|
42
|
-
}));
|
|
43
|
-
export const StyledDropdown = styled(Dropdown)(({ theme }) => ({
|
|
44
|
-
backgroundColor: 'white',
|
|
45
|
-
boxShadow: theme.shadows[21],
|
|
46
|
-
borderRadius: '0.25rem',
|
|
47
|
-
'& .MuiPaper-root': {
|
|
48
|
-
borderRadius: '0.25rem',
|
|
49
|
-
width: '12.5rem',
|
|
50
|
-
},
|
|
51
|
-
}));
|
|
52
|
-
export const ChevronContainer = styled('span')(() => ({
|
|
53
|
-
width: '27px',
|
|
54
|
-
height: '100%',
|
|
55
|
-
maxHeight: '100%',
|
|
56
|
-
position: 'absolute',
|
|
57
|
-
top: '0',
|
|
58
|
-
right: '0',
|
|
59
|
-
bottom: '0',
|
|
60
|
-
overflow: 'hidden',
|
|
61
|
-
transition: 'opacity 1s ease',
|
|
62
|
-
}));
|
|
63
|
-
export const Label = styled(Box)(({ variant }) => ({
|
|
64
|
-
display: 'flex',
|
|
65
|
-
alignItems: 'center',
|
|
66
|
-
justifyContent: 'flex-start',
|
|
67
|
-
gap: '0.5rem',
|
|
68
|
-
fontWeight: variant === 'active' ? 700 : 400,
|
|
69
|
-
}));
|
|
70
|
-
export const LabelWrapper = styled(Box)(() => ({
|
|
71
|
-
display: 'flex',
|
|
72
|
-
alignItems: 'center',
|
|
73
|
-
justifyContent: 'center',
|
|
74
|
-
width: '100%',
|
|
75
|
-
}));
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { type ButtonProps } from '@mui/material';
|
|
3
|
-
import { TableHeaderStatus } from '../../../../types/index.js';
|
|
4
|
-
import { type StatusButtonVariant } from './style';
|
|
5
|
-
import { statusButtonIcons } from './constant';
|
|
6
|
-
import { MenuItemI } from '../../../DropdownMenu';
|
|
7
|
-
export interface StatusButtonProps extends Omit<ButtonProps, 'variant' | 'children'> {
|
|
8
|
-
variant?: StatusButtonVariant;
|
|
9
|
-
badgeCount?: number | string;
|
|
10
|
-
hasDropdown?: boolean;
|
|
11
|
-
icon?: StatusButtonIcon;
|
|
12
|
-
label?: ReactNode | null;
|
|
13
|
-
totalCount?: number;
|
|
14
|
-
onButtonBodyClick?: (status: TableHeaderStatus) => void;
|
|
15
|
-
dropdownOptions?: Array<MenuItemI & {
|
|
16
|
-
status: TableHeaderStatus;
|
|
17
|
-
}>;
|
|
18
|
-
render?: (status: TableHeaderStatus) => ReactNode;
|
|
19
|
-
onMultiSelectChange?: (status: TableHeaderStatus[]) => void;
|
|
20
|
-
}
|
|
21
|
-
export interface ChevronIconProps {
|
|
22
|
-
isActive?: boolean;
|
|
23
|
-
disableHover?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export type StatusButtonIcon = keyof typeof statusButtonIcons;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|