@campxdev/shared 0.6.14 → 0.6.16
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/.eslintrc.js +9 -9
- package/package.json +28 -2
- package/src/components/Card.tsx +1 -0
- package/src/components/Chips.tsx +4 -0
- package/src/components/DividerHeading.tsx +1 -0
- package/src/components/FloatingContainer.tsx +9 -2
- package/src/components/Layout/Header/AppHeader.tsx +11 -3
- package/src/components/ModalButtons/DrawerButton.tsx +1 -1
- package/src/components/Router.tsx +7 -0
- package/src/components/TableComponent/index.tsx +6 -1
- package/src/contexts/Providers.tsx +8 -8
package/.eslintrc.js
CHANGED
|
@@ -2,22 +2,22 @@ module.exports = {
|
|
|
2
2
|
env: {
|
|
3
3
|
browser: true,
|
|
4
4
|
es2021: true,
|
|
5
|
-
jest: true
|
|
5
|
+
jest: true
|
|
6
6
|
},
|
|
7
7
|
parser: '@typescript-eslint/parser',
|
|
8
|
-
extends: ['prettier'],
|
|
8
|
+
extends: ['prettier', 'plugin:storybook/recommended'],
|
|
9
9
|
overrides: [],
|
|
10
10
|
parserOptions: {
|
|
11
11
|
ecmaVersion: 'latest',
|
|
12
12
|
sourceType: 'module',
|
|
13
13
|
ecmaFeatures: {
|
|
14
|
-
jsx: true
|
|
15
|
-
}
|
|
14
|
+
jsx: true
|
|
15
|
+
}
|
|
16
16
|
},
|
|
17
17
|
settings: {
|
|
18
18
|
'import/resolver': {
|
|
19
|
-
typescript: {}
|
|
20
|
-
}
|
|
19
|
+
typescript: {}
|
|
20
|
+
}
|
|
21
21
|
},
|
|
22
22
|
plugins: ['react', '@typescript-eslint', 'prettier'],
|
|
23
23
|
rules: {
|
|
@@ -28,7 +28,7 @@ module.exports = {
|
|
|
28
28
|
'react/prop-types': ['off'],
|
|
29
29
|
'react/jsx-key': ['warn'],
|
|
30
30
|
'react/no-unescaped-entities': 'off',
|
|
31
|
-
'spaced-comment': 'off'
|
|
31
|
+
'spaced-comment': 'off'
|
|
32
32
|
},
|
|
33
|
-
ignorePatterns: ['**/*.html']
|
|
34
|
-
}
|
|
33
|
+
ignorePatterns: ['**/*.html']
|
|
34
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/shared",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"main": "./exports.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "react-scripts start",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"eject": "react-scripts eject",
|
|
10
10
|
"lint": "eslint ./src/**/*.{js,jsx,ts,tsx,json}",
|
|
11
11
|
"lint:fix": "eslint --fix \"./src/**/*.{js,jsx,ts,tsx,json}\"",
|
|
12
|
-
"format": "prettier --write \"./src/**/*.{js,jsx,ts,tsx,css,md,json}\" --config ./.prettierrc"
|
|
12
|
+
"format": "prettier --write \"./src/**/*.{js,jsx,ts,tsx,css,md,json}\" --config ./.prettierrc",
|
|
13
|
+
"storybook": "start-storybook -p 6006 -s public",
|
|
14
|
+
"build-storybook": "build-storybook -s public"
|
|
13
15
|
},
|
|
14
16
|
"browserslist": {
|
|
15
17
|
"production": [
|
|
@@ -48,6 +50,16 @@
|
|
|
48
50
|
"yup": "^0.32.11"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
53
|
+
"@storybook/addon-actions": "^6.5.14",
|
|
54
|
+
"@storybook/addon-essentials": "^6.5.14",
|
|
55
|
+
"@storybook/addon-interactions": "^6.5.14",
|
|
56
|
+
"@storybook/addon-links": "^6.5.14",
|
|
57
|
+
"@storybook/builder-webpack5": "^6.5.14",
|
|
58
|
+
"@storybook/manager-webpack5": "^6.5.14",
|
|
59
|
+
"@storybook/node-logger": "^6.5.14",
|
|
60
|
+
"@storybook/preset-create-react-app": "^4.0.0",
|
|
61
|
+
"@storybook/react": "^6.5.14",
|
|
62
|
+
"@storybook/testing-library": "^0.0.13",
|
|
51
63
|
"@types/js-cookie": "^3.0.2",
|
|
52
64
|
"@types/node": "^18.11.8",
|
|
53
65
|
"@types/react": "^18.0.25",
|
|
@@ -59,9 +71,23 @@
|
|
|
59
71
|
"eslint-plugin-import": "^2.26.0",
|
|
60
72
|
"eslint-plugin-prettier": "^4.2.1",
|
|
61
73
|
"eslint-plugin-react": "^7.31.1",
|
|
74
|
+
"eslint-plugin-storybook": "^0.6.8",
|
|
62
75
|
"lerna": "^5.5.1",
|
|
63
76
|
"prettier": "^2.5.0",
|
|
64
77
|
"react-scripts": "^5.0.1",
|
|
78
|
+
"storybook-addon-react-router-v6": "^0.2.1",
|
|
65
79
|
"typescript": "^4.8.4"
|
|
80
|
+
},
|
|
81
|
+
"eslintConfig": {
|
|
82
|
+
"overrides": [
|
|
83
|
+
{
|
|
84
|
+
"files": [
|
|
85
|
+
"**/*.stories.*"
|
|
86
|
+
],
|
|
87
|
+
"rules": {
|
|
88
|
+
"import/no-anonymous-default-export": "off"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
66
92
|
}
|
|
67
93
|
}
|
package/src/components/Card.tsx
CHANGED
package/src/components/Chips.tsx
CHANGED
|
@@ -16,10 +16,17 @@ export const StyledFooter = styled(Box)<{
|
|
|
16
16
|
transition: bottom 400ms ease-in-out;
|
|
17
17
|
box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
|
|
18
18
|
`
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
function FloatingContainer({
|
|
21
|
+
children,
|
|
22
|
+
show,
|
|
23
|
+
}: {
|
|
24
|
+
show?: boolean
|
|
25
|
+
children: React.ReactNode
|
|
26
|
+
}) {
|
|
20
27
|
return (
|
|
21
28
|
<>
|
|
22
|
-
<StyledFooter show={show}>{children}</StyledFooter>
|
|
29
|
+
<StyledFooter show={show ? show : true}>{children}</StyledFooter>
|
|
23
30
|
</>
|
|
24
31
|
)
|
|
25
32
|
}
|
|
@@ -4,7 +4,15 @@ import { Link } from 'react-router-dom'
|
|
|
4
4
|
import { isDevelopment } from '../../../constants/isDevelopment'
|
|
5
5
|
import { applications } from './applications'
|
|
6
6
|
import AppsMenu from './AppsMenu'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
collegex,
|
|
9
|
+
commutex,
|
|
10
|
+
enrollx,
|
|
11
|
+
examx,
|
|
12
|
+
hostelx,
|
|
13
|
+
payx,
|
|
14
|
+
peoplex,
|
|
15
|
+
} from './assets'
|
|
8
16
|
|
|
9
17
|
import CogWheelMenu from './CogWheelMenu'
|
|
10
18
|
import FreshDeskHelpButton from './FreshDeskHelpButton'
|
|
@@ -35,8 +43,8 @@ const imageMap = {
|
|
|
35
43
|
payments: payx,
|
|
36
44
|
people: peoplex,
|
|
37
45
|
campx: collegex,
|
|
38
|
-
commute:commutex,
|
|
39
|
-
hostel:hostelx
|
|
46
|
+
commute: commutex,
|
|
47
|
+
hostel: hostelx,
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
interface AppHeaderProps {
|
|
@@ -48,7 +48,7 @@ export default function DrawerButton({
|
|
|
48
48
|
const [open, setOpen] = useState(false)
|
|
49
49
|
|
|
50
50
|
const ButtonEl = (props) => (
|
|
51
|
-
<Button {...props} {...btnProps}>
|
|
51
|
+
<Button {...props} {...btnProps} sx={{ fontSize: '14px', fontWeight: 600 }}>
|
|
52
52
|
{btnTxt}
|
|
53
53
|
</Button>
|
|
54
54
|
)
|
|
@@ -103,7 +103,10 @@ export default function Table({
|
|
|
103
103
|
}}
|
|
104
104
|
>
|
|
105
105
|
<>
|
|
106
|
-
<Box
|
|
106
|
+
<Box sx={{ fontWeight: 600, fontSize: '14px' }}>
|
|
107
|
+
{' '}
|
|
108
|
+
{col.title}
|
|
109
|
+
</Box>
|
|
107
110
|
</>
|
|
108
111
|
{col.sort && (
|
|
109
112
|
<IconButton onClick={() => handleSortClick(col.dataIndex)}>
|
|
@@ -140,6 +143,8 @@ export default function Table({
|
|
|
140
143
|
sx={{
|
|
141
144
|
color: col.textColor,
|
|
142
145
|
padding: dense ? '10px' : '15px',
|
|
146
|
+
font: 'avenir',
|
|
147
|
+
fontSize: '14px',
|
|
143
148
|
}}
|
|
144
149
|
key={colIndex}
|
|
145
150
|
>
|
|
@@ -22,15 +22,15 @@ export default function Providers({ children }: { children: ReactNode }) {
|
|
|
22
22
|
<BrowserRouter basename={isDevelopment ? 'campx_dev' : urlTenantKey}>
|
|
23
23
|
<QueryClientProvider>
|
|
24
24
|
<MuiThemeProvider>
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
<
|
|
25
|
+
<ConfirmContextProvider>
|
|
26
|
+
<DialogProvider>
|
|
27
|
+
<LoginFormProvider>
|
|
28
28
|
{isInvalid ? <InvalidClientKey /> : children}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</
|
|
29
|
+
<CssBaseline />
|
|
30
|
+
</LoginFormProvider>
|
|
31
|
+
<ToastContainer />
|
|
32
|
+
</DialogProvider>
|
|
33
|
+
</ConfirmContextProvider>
|
|
34
34
|
</MuiThemeProvider>
|
|
35
35
|
</QueryClientProvider>
|
|
36
36
|
</BrowserRouter>
|