tenjin-ui-kit 0.2.77 → 0.2.79
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/components/input/index.js +2 -2
- package/components/layout/pageContent/index.js +4 -1
- package/components/layout/sidebar/ProjectMenu.js +13 -8
- package/components/layout/sidebar/style.js +9 -6
- package/components/layout/topBar/ProjectTopbar.js +8 -10
- package/components/layout/topBar/index.js +2 -1
- package/components/select/index.js +29 -22
- package/package.json +1 -1
|
@@ -52,7 +52,7 @@ var Input = function Input(_ref) {
|
|
|
52
52
|
sx: {
|
|
53
53
|
marginTop: label ? theme.spacing(2.5) : 0,
|
|
54
54
|
'& input': {
|
|
55
|
-
backgroundColor: isDisabled && '#
|
|
55
|
+
backgroundColor: isDisabled && '#DDDDDD',
|
|
56
56
|
color: isDisabled && '#000000'
|
|
57
57
|
},
|
|
58
58
|
'& label': {
|
|
@@ -77,7 +77,7 @@ var Input = function Input(_ref) {
|
|
|
77
77
|
disabled: isDisabled,
|
|
78
78
|
sx: {
|
|
79
79
|
'& input': {
|
|
80
|
-
backgroundColor: isDisabled && '#
|
|
80
|
+
backgroundColor: isDisabled && '#DDDDDD',
|
|
81
81
|
color: isDisabled && '#000000'
|
|
82
82
|
},
|
|
83
83
|
marginTop: label ? theme.spacing(2.5) : 0,
|
|
@@ -18,7 +18,10 @@ var PageContent = function PageContent(_ref) {
|
|
|
18
18
|
height: '100%',
|
|
19
19
|
maxHeight: '100%',
|
|
20
20
|
overflowY: 'auto',
|
|
21
|
-
|
|
21
|
+
flex: 1
|
|
22
|
+
// width: location.pathname.includes('agent')
|
|
23
|
+
// ? `100vw !important`
|
|
24
|
+
// : 'calc(100vw - 210px)',
|
|
22
25
|
}
|
|
23
26
|
}, children);
|
|
24
27
|
};
|
|
@@ -94,10 +94,10 @@ var ProjectMenu = function ProjectMenu(_ref) {
|
|
|
94
94
|
}, /*#__PURE__*/_react.default.createElement("div", null, !collapsed && /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
95
95
|
className: classes.projectMenuHeader,
|
|
96
96
|
fontWeight: 600,
|
|
97
|
-
marginBottom: "0.
|
|
97
|
+
marginBottom: "0.5rem",
|
|
98
98
|
marginTop: "1rem"
|
|
99
99
|
}, "TENJIN 4.0 Release")), /*#__PURE__*/_react.default.createElement("div", null, groups.map(function (group, index) {
|
|
100
|
-
var _ref2, _group$items$filter$, _group$items$filter$2, _clsx, _group$groupName, _group$groupName2;
|
|
100
|
+
var _ref2, _group$items$filter$, _group$items$filter$2, _clsx, _ref3, _group$groupName, _group$groupName2;
|
|
101
101
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
102
102
|
key: group.groupName
|
|
103
103
|
}, /*#__PURE__*/_react.default.createElement(_material.List, {
|
|
@@ -115,9 +115,13 @@ var ProjectMenu = function ProjectMenu(_ref) {
|
|
|
115
115
|
fontWeight: 600,
|
|
116
116
|
lineHeight: collapsed && 0,
|
|
117
117
|
marginTop: !collapsed && "1rem"
|
|
118
|
-
}, _defineProperty(_ref2, "padding", !collapsed && "0.8rem 0rem"), _defineProperty(_ref2, "justifyContent", collapsed && "center"), _ref2)
|
|
118
|
+
}, _defineProperty(_ref2, "padding", !collapsed && "0.8rem 0rem"), _defineProperty(_ref2, "justifyContent", collapsed && "center"), _defineProperty(_ref2, "alignItems", "center"), _ref2)
|
|
119
119
|
}, collapsed ? /*#__PURE__*/_react.default.createElement("div", {
|
|
120
120
|
className: "buttonIcon"
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Tooltip, {
|
|
122
|
+
key: index,
|
|
123
|
+
title: collapsed ? group.groupName : null,
|
|
124
|
+
placement: "right"
|
|
121
125
|
}, /*#__PURE__*/_react.default.createElement(_material.ListItemButton, {
|
|
122
126
|
id: "account-button",
|
|
123
127
|
selected: (group === null || group === void 0 ? void 0 : (_group$items$filter$ = group.items.filter(function (item) {
|
|
@@ -128,23 +132,23 @@ var ProjectMenu = function ProjectMenu(_ref) {
|
|
|
128
132
|
},
|
|
129
133
|
key: selectedCollapsedSidebar === null || selectedCollapsedSidebar === void 0 ? void 0 : selectedCollapsedSidebar.key,
|
|
130
134
|
onClick: function onClick(e) {
|
|
131
|
-
handleClick(e, index, group);
|
|
135
|
+
selectedItem.open ? handleClose() : handleClick(e, index, group);
|
|
132
136
|
}
|
|
133
137
|
}, /*#__PURE__*/_react.default.createElement(_material.ListItemText, {
|
|
134
138
|
disableTypography: true,
|
|
135
139
|
className: (0, _clsx3.default)((_clsx = {}, _defineProperty(_clsx, classes.projectListIcon, true), _defineProperty(_clsx, classes.selectedProjectMenuItemIcon, (group === null || group === void 0 ? void 0 : (_group$items$filter$2 = group.items.filter(function (item) {
|
|
136
140
|
return item.key === selectedCollapsedSidebar.key;
|
|
137
141
|
})[0]) === null || _group$items$filter$2 === void 0 ? void 0 : _group$items$filter$2.key) === selectedSidebarKey), _clsx))
|
|
138
|
-
}, group.icon))) : /*#__PURE__*/_react.default.createElement("span", {
|
|
142
|
+
}, group.icon)))) : /*#__PURE__*/_react.default.createElement("span", {
|
|
139
143
|
className: classes.subHeaderIcon
|
|
140
144
|
}, group.icon), /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
141
|
-
sx:
|
|
145
|
+
sx: (_ref3 = {
|
|
142
146
|
fontWeight: 600,
|
|
143
|
-
marginLeft: "
|
|
147
|
+
marginLeft: "20px",
|
|
144
148
|
display: "flex",
|
|
145
149
|
alignItems: "center",
|
|
146
150
|
height: "100%"
|
|
147
|
-
}, "display", collapsed && "none !important")
|
|
151
|
+
}, _defineProperty(_ref3, "display", collapsed && "none !important"), _defineProperty(_ref3, "fontSize", "1rem !important"), _ref3)
|
|
148
152
|
}, (_group$groupName = group.groupName) === null || _group$groupName === void 0 ? void 0 : _group$groupName.toUpperCase()))
|
|
149
153
|
}, !collapsed && group.items.map(function (i) {
|
|
150
154
|
var _clsx2;
|
|
@@ -194,6 +198,7 @@ var ProjectMenu = function ProjectMenu(_ref) {
|
|
|
194
198
|
fontWeight: 600,
|
|
195
199
|
p: "0.3rem",
|
|
196
200
|
cursor: "pointer",
|
|
201
|
+
fontSize: "14px !important",
|
|
197
202
|
backgroundColor: i.key === selectedSidebarKey ? "#f5f6f7" : "none",
|
|
198
203
|
"&:hover": {
|
|
199
204
|
backgroundColor: "#f5f6f7"
|
|
@@ -69,7 +69,7 @@ var _default = (0, _styles.makeStyles)(function (theme) {
|
|
|
69
69
|
projectMenuHeader: {
|
|
70
70
|
color: "#44409A",
|
|
71
71
|
fontFamily: "sans-serif",
|
|
72
|
-
fontSize: "
|
|
72
|
+
fontSize: "18px !important",
|
|
73
73
|
lineHeight: "24px",
|
|
74
74
|
display: "flex",
|
|
75
75
|
justifyContent: "center",
|
|
@@ -85,15 +85,16 @@ var _default = (0, _styles.makeStyles)(function (theme) {
|
|
|
85
85
|
projectListText: {
|
|
86
86
|
color: "".concat(theme.palette.primary.main, " !important"),
|
|
87
87
|
marginLeft: "24px",
|
|
88
|
-
fontSize: "
|
|
88
|
+
fontSize: "14px !important",
|
|
89
89
|
fontWeight: 600
|
|
90
90
|
},
|
|
91
91
|
projectListIcon: {
|
|
92
|
-
color: "".concat(theme.palette.primary.main, " !important")
|
|
92
|
+
color: "".concat(theme.palette.primary.main, " !important"),
|
|
93
|
+
fontSize: "1rem"
|
|
93
94
|
},
|
|
94
95
|
selectedProjectMenuItemText: {
|
|
95
|
-
color: "#fff !important"
|
|
96
|
-
|
|
96
|
+
color: "#fff !important",
|
|
97
|
+
fontSize: "14px !important"
|
|
97
98
|
// fontWeight: 600,
|
|
98
99
|
},
|
|
99
100
|
|
|
@@ -103,7 +104,9 @@ var _default = (0, _styles.makeStyles)(function (theme) {
|
|
|
103
104
|
subHeaderIcon: {
|
|
104
105
|
color: "#44409A",
|
|
105
106
|
display: "flex",
|
|
106
|
-
alignItems: "center"
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
width: "18px",
|
|
109
|
+
height: "18px"
|
|
107
110
|
},
|
|
108
111
|
sidebar: {
|
|
109
112
|
display: "inline-block",
|
|
@@ -71,7 +71,7 @@ var ProjectTopbar = function ProjectTopbar(_ref) {
|
|
|
71
71
|
sx: {
|
|
72
72
|
boxShadow: "0px 3px 10px rgba(102, 124, 188, 0.25) !important",
|
|
73
73
|
background: "#FFFFFF",
|
|
74
|
-
height: "
|
|
74
|
+
height: "48px !important",
|
|
75
75
|
justifyContent: "center"
|
|
76
76
|
}
|
|
77
77
|
}, /*#__PURE__*/_react.default.createElement(_material.Toolbar, null, /*#__PURE__*/_react.default.createElement(_system.Box, {
|
|
@@ -79,7 +79,8 @@ var ProjectTopbar = function ProjectTopbar(_ref) {
|
|
|
79
79
|
display: "flex",
|
|
80
80
|
justifyContent: "space-between",
|
|
81
81
|
width: "100%",
|
|
82
|
-
alignItems: "center"
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
alignContent: "center"
|
|
83
84
|
}
|
|
84
85
|
}, /*#__PURE__*/_react.default.createElement(_system.Box, {
|
|
85
86
|
className: "Left",
|
|
@@ -200,7 +201,7 @@ var ProjectTopbar = function ProjectTopbar(_ref) {
|
|
|
200
201
|
open: open,
|
|
201
202
|
handleClose: handleClose,
|
|
202
203
|
onClose: handleClose,
|
|
203
|
-
width: "
|
|
204
|
+
width: "sm"
|
|
204
205
|
}, /*#__PURE__*/_react.default.createElement(_material.Typography, null, "Are you sure you want to log out?"), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
205
206
|
container: true,
|
|
206
207
|
direction: "row",
|
|
@@ -209,16 +210,13 @@ var ProjectTopbar = function ProjectTopbar(_ref) {
|
|
|
209
210
|
style: {
|
|
210
211
|
padding: "3rem 0rem 0rem 4rem"
|
|
211
212
|
}
|
|
212
|
-
}, /*#__PURE__*/_react.default.createElement(_material.
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Stack, {
|
|
214
|
+
direction: "row",
|
|
215
|
+
spacing: 2
|
|
215
216
|
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
216
217
|
variant: "outlined",
|
|
217
218
|
onClick: handleClose
|
|
218
|
-
}, "Cancel")
|
|
219
|
-
item: true,
|
|
220
|
-
xs: 6
|
|
221
|
-
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
219
|
+
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
222
220
|
color: "error",
|
|
223
221
|
onClick: logout
|
|
224
222
|
}, "Log out")))));
|
|
@@ -54,6 +54,7 @@ var TopBar = function TopBar(_ref) {
|
|
|
54
54
|
margin: "0rem !important",
|
|
55
55
|
padding: " 0rem !important",
|
|
56
56
|
height: "48px !important",
|
|
57
|
+
maxHeight: "48px !important",
|
|
57
58
|
borderBottom: "1px solid #D6D9E0"
|
|
58
59
|
}
|
|
59
60
|
}, /*#__PURE__*/_react.default.createElement(_material.Toolbar, {
|
|
@@ -102,7 +103,7 @@ var TopBar = function TopBar(_ref) {
|
|
|
102
103
|
open: open,
|
|
103
104
|
handleClose: handleClose,
|
|
104
105
|
onClose: handleClose,
|
|
105
|
-
width: "
|
|
106
|
+
width: "sm"
|
|
106
107
|
}, /*#__PURE__*/_react.default.createElement(_material.Typography, null, "Are you sure you want to log out?"), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
107
108
|
container: true,
|
|
108
109
|
direction: "row",
|
|
@@ -33,7 +33,7 @@ var ReactSelect = function ReactSelect(props) {
|
|
|
33
33
|
isRequired = props.isRequired,
|
|
34
34
|
isDisabled = props.isDisabled,
|
|
35
35
|
rest = _objectWithoutProperties(props, _excluded);
|
|
36
|
-
console.log(defaultValue,
|
|
36
|
+
console.log(defaultValue, "hsgdsahgd", options[1]);
|
|
37
37
|
var icon = /*#__PURE__*/_react.default.createElement(_CheckBoxOutlineBlank.default, {
|
|
38
38
|
fontSize: "small"
|
|
39
39
|
});
|
|
@@ -42,17 +42,18 @@ var ReactSelect = function ReactSelect(props) {
|
|
|
42
42
|
});
|
|
43
43
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
|
|
44
44
|
fullWidth: true
|
|
45
|
-
}, /*#__PURE__*/_react.default.createElement(_material.FormLabel, {
|
|
45
|
+
}, label && /*#__PURE__*/_react.default.createElement(_material.FormLabel, {
|
|
46
46
|
htmlFor: "my-input",
|
|
47
47
|
sx: {
|
|
48
|
-
fontSize:
|
|
49
|
-
fontWeight: 500
|
|
48
|
+
fontSize: "0.8rem",
|
|
49
|
+
fontWeight: 500,
|
|
50
|
+
paddingBottom: "0.2rem"
|
|
50
51
|
}
|
|
51
52
|
}, label, isRequired ? /*#__PURE__*/_react.default.createElement("span", {
|
|
52
53
|
style: {
|
|
53
|
-
color:
|
|
54
|
+
color: "red"
|
|
54
55
|
}
|
|
55
|
-
}, " *") :
|
|
56
|
+
}, " *") : ""), checkBox && /*#__PURE__*/_react.default.createElement(_material.Autocomplete, _extends({}, rest, {
|
|
56
57
|
disabled: isDisabled,
|
|
57
58
|
multiple: isMulti,
|
|
58
59
|
options: options
|
|
@@ -88,11 +89,17 @@ var ReactSelect = function ReactSelect(props) {
|
|
|
88
89
|
// disableCloseOnSelect
|
|
89
90
|
,
|
|
90
91
|
getOptionLabel: function getOptionLabel(option) {
|
|
91
|
-
return option.label;
|
|
92
|
+
return option.label ? option.label : "";
|
|
92
93
|
},
|
|
93
94
|
value: value,
|
|
94
95
|
defaultValue: [defaultValue],
|
|
95
96
|
onChange: onChange,
|
|
97
|
+
sx: {
|
|
98
|
+
"& .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root']": {
|
|
99
|
+
background: isDisabled && "#DDDDDD",
|
|
100
|
+
color: isDisabled && "#000000"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
96
103
|
renderInput: function renderInput(params) {
|
|
97
104
|
return /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({
|
|
98
105
|
error: error
|
|
@@ -106,29 +113,29 @@ var ReactSelect = function ReactSelect(props) {
|
|
|
106
113
|
})), blueTheme && /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
107
114
|
container: true,
|
|
108
115
|
sx: {
|
|
109
|
-
height:
|
|
110
|
-
backgroundColor:
|
|
111
|
-
borderRadius:
|
|
112
|
-
padding:
|
|
113
|
-
width:
|
|
116
|
+
height: "200px",
|
|
117
|
+
backgroundColor: "#3D3981",
|
|
118
|
+
borderRadius: "7px",
|
|
119
|
+
padding: "16px",
|
|
120
|
+
width: "50%"
|
|
114
121
|
// background: "red",
|
|
115
122
|
}
|
|
116
123
|
}, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, _extends({
|
|
117
124
|
sx: {
|
|
118
|
-
width:
|
|
125
|
+
width: "100%",
|
|
119
126
|
"& .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root']": {
|
|
120
|
-
background:
|
|
121
|
-
color:
|
|
127
|
+
background: "#6e6ba1",
|
|
128
|
+
color: "#F4F7FC"
|
|
122
129
|
}
|
|
123
130
|
},
|
|
124
131
|
PaperComponent: function PaperComponent(_ref2) {
|
|
125
132
|
var children = _ref2.children;
|
|
126
133
|
return /*#__PURE__*/_react.default.createElement(_material.Paper, {
|
|
127
134
|
style: {
|
|
128
|
-
background:
|
|
129
|
-
color:
|
|
130
|
-
|
|
131
|
-
background:
|
|
135
|
+
background: "#6e6ba1",
|
|
136
|
+
color: "#F4F7FC",
|
|
137
|
+
"&:hover": {
|
|
138
|
+
background: "#fff"
|
|
132
139
|
}
|
|
133
140
|
}
|
|
134
141
|
}, children);
|
|
@@ -173,13 +180,13 @@ ReactSelect.propTypes = {
|
|
|
173
180
|
};
|
|
174
181
|
ReactSelect.defaultProps = {
|
|
175
182
|
value: {},
|
|
176
|
-
label:
|
|
177
|
-
className:
|
|
183
|
+
label: "",
|
|
184
|
+
className: "",
|
|
178
185
|
defaultValue: [{}],
|
|
179
186
|
isMulti: false,
|
|
180
187
|
isDisabled: false,
|
|
181
188
|
options: [],
|
|
182
|
-
placeholder:
|
|
189
|
+
placeholder: "",
|
|
183
190
|
isRequired: false,
|
|
184
191
|
simulateNativeSelect: true
|
|
185
192
|
};
|