@nethru/ui 1.0.82 → 2.0.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/base/AddableFormList.js +56 -0
- package/base/Alert.js +27 -0
- package/base/Checkbox.js +20 -0
- package/base/CircularProgressButton.js +36 -0
- package/base/ColumnedSection.js +44 -0
- package/base/DropdownButton.js +74 -0
- package/base/MainHeader.js +56 -0
- package/base/MenuItem.js +92 -0
- package/base/PropertyTable.js +69 -0
- package/base/SearchTextField.js +44 -0
- package/base/SearchableSelect.js +64 -0
- package/base/Select.js +33 -0
- package/{dist → base}/Slider.js +12 -13
- package/base/Snackbar.js +33 -0
- package/base/Switch.js +20 -0
- package/base/assets/icons.js +390 -0
- package/base/assets/images.js +1 -0
- package/{dist → base}/colors/blue.js +3 -1
- package/{dist → base}/colors/blueGrey.js +1 -1
- package/base/datagrid/DataGrid.js +57 -0
- package/base/datagrid/Footer.js +51 -0
- package/base/datagrid/Pagination.js +24 -0
- package/base/dialog/AlertDialog.js +21 -0
- package/base/dialog/ConfirmDialog.js +29 -0
- package/base/dialog/Dialog.js +56 -0
- package/base/dialog/SimpleDialog.js +33 -0
- package/{dist → base}/error/Error.js +1 -2
- package/base/frame/AppBar.js +54 -0
- package/base/frame/Brand.js +36 -0
- package/base/frame/Frame.js +49 -0
- package/{dist → base/frame}/sidebar/MenuToggler.js +14 -3
- package/{dist → base/frame}/sidebar/PrimaryMenu.js +15 -20
- package/base/frame/sidebar/SecondaryMenu.js +41 -0
- package/{dist → base/frame}/sidebar/Sidebar.js +21 -10
- package/base/frame/sidebar/SidebarContext.js +74 -0
- package/base/frame/sidebar/css/primary.module.css +69 -0
- package/base/frame/sidebar/css/sidebar.module.css +63 -0
- package/base/index.js +33 -0
- package/{dist → base}/samples/menu.sample.json +2 -2
- package/base/styles/borderRadius.js +7 -0
- package/base/styles/createTheme.js +90 -0
- package/base/styles/globalStyles.js +47 -0
- package/base/styles/mui/alert.js +40 -0
- package/base/styles/mui/appBar.js +17 -0
- package/base/styles/mui/autocomplete.js +46 -0
- package/base/styles/mui/avatar.js +14 -0
- package/base/styles/mui/button.js +276 -0
- package/base/styles/mui/buttonBase.js +10 -0
- package/base/styles/mui/checkbox.js +37 -0
- package/base/styles/mui/chip.js +83 -0
- package/base/styles/mui/cssBaseline.js +12 -0
- package/base/styles/mui/dataGrid.js +101 -0
- package/base/styles/mui/dialog.js +13 -0
- package/base/styles/mui/dialogActions.js +8 -0
- package/base/styles/mui/dialogContent.js +10 -0
- package/base/styles/mui/dialogTitle.js +11 -0
- package/base/styles/mui/formControl.js +8 -0
- package/base/styles/mui/formControlLabel.js +9 -0
- package/base/styles/mui/formHelperText.js +10 -0
- package/base/styles/mui/grid.js +15 -0
- package/base/styles/mui/icon.js +12 -0
- package/base/styles/mui/iconButton.js +79 -0
- package/base/styles/mui/inputLabel.js +13 -0
- package/base/styles/mui/list.js +11 -0
- package/base/styles/mui/menuItem.js +83 -0
- package/base/styles/mui/outlinedInput.js +53 -0
- package/base/styles/mui/paginationItem.js +25 -0
- package/base/styles/mui/paper.js +8 -0
- package/base/styles/mui/popover.js +11 -0
- package/base/styles/mui/select.js +11 -0
- package/base/styles/mui/slider.js +15 -0
- package/base/styles/mui/snackbar.js +24 -0
- package/base/styles/mui/switch.js +33 -0
- package/base/styles/mui/tab.js +23 -0
- package/base/styles/mui/tablePagination.js +8 -0
- package/base/styles/mui/tabs.js +20 -0
- package/base/styles/mui/textField.js +11 -0
- package/base/styles/mui/toggleButton.js +96 -0
- package/base/styles/mui/tooltip.js +22 -0
- package/base/styles/palette.js +40 -0
- package/base/styles/shadow.js +8 -0
- package/base/styles/typography.js +131 -0
- package/package.json +6 -5
- package/dist/Accordion.js +0 -45
- package/dist/AccordionDetails.js +0 -19
- package/dist/AccordionSummary.js +0 -35
- package/dist/AlertDialog.js +0 -55
- package/dist/AppBar.js +0 -68
- package/dist/AppendableFormList.js +0 -56
- package/dist/AvatarDropdown.js +0 -80
- package/dist/Button.js +0 -61
- package/dist/Checkbox.js +0 -27
- package/dist/CircularProgress.js +0 -33
- package/dist/ColumnedSection.js +0 -64
- package/dist/ConfirmDialog.js +0 -65
- package/dist/DataGrid.js +0 -150
- package/dist/Dialog.js +0 -42
- package/dist/DropdownButton.js +0 -59
- package/dist/FormLabel.js +0 -23
- package/dist/Frame.js +0 -47
- package/dist/GroupSelect.js +0 -67
- package/dist/ListItem.js +0 -21
- package/dist/ListItemDivider.js +0 -15
- package/dist/ListItemGrid.js +0 -12
- package/dist/ListItemText.js +0 -44
- package/dist/MainHeader.js +0 -59
- package/dist/PropertyTable.js +0 -141
- package/dist/ReferenceChipList.js +0 -59
- package/dist/SearchTextField.js +0 -24
- package/dist/SearchableSelect.js +0 -41
- package/dist/Section.js +0 -22
- package/dist/Select.js +0 -48
- package/dist/ShadowedSection.js +0 -36
- package/dist/Snackbar.js +0 -51
- package/dist/StatusChip.js +0 -34
- package/dist/Switch.js +0 -37
- package/dist/TabbedSection.js +0 -37
- package/dist/Tabs.js +0 -38
- package/dist/TextField.js +0 -25
- package/dist/index.js +0 -44
- package/dist/samples/global.sample.css +0 -59
- package/dist/sidebar/MenuTree.js +0 -95
- package/dist/sidebar/MenuTreeGroup.js +0 -65
- package/dist/sidebar/SecondaryMenu.js +0 -36
- package/dist/sidebar/SidebarContext.js +0 -122
- package/dist/sidebar/css/primary.module.css +0 -80
- package/dist/sidebar/css/sidebar.module.css +0 -50
- package/dist/variables.js +0 -6
- /package/{dist → base}/colors/green.js +0 -0
- /package/{dist → base}/colors/grey.js +0 -0
- /package/{dist → base}/colors/index.js +0 -0
- /package/{dist → base}/colors/lime.js +0 -0
- /package/{dist → base}/colors/orange.js +0 -0
- /package/{dist → base}/colors/purple.js +0 -0
- /package/{dist → base}/colors/red.js +0 -0
- /package/{dist → base}/colors/yellow.js +0 -0
- /package/{dist → base}/editor/Editor.js +0 -0
- /package/{dist → base}/editor/nScript.js +0 -0
- /package/{dist → base}/editor/nScriptKeywords.js +0 -0
- /package/{dist → base}/error/HttpError.js +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
background-color: var(--frame-background-color);
|
|
5
|
+
transition: width .2s;
|
|
6
|
+
}
|
|
7
|
+
.container.opened {
|
|
8
|
+
width: calc(var(--primary-menu-width) + var(--secondary-menu-width));
|
|
9
|
+
}
|
|
10
|
+
.container.closed {
|
|
11
|
+
width: calc(var(--primary-menu-width) + var(--secondary-menu-collapsed-width));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
.secondary {
|
|
16
|
+
position: fixed;
|
|
17
|
+
left: var(--primary-menu-width);
|
|
18
|
+
height: 100%;
|
|
19
|
+
z-index: var(--secondary-menu-zindex);
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
overflow-x: hidden;
|
|
22
|
+
border-radius: 8px 0px 0px 0px;
|
|
23
|
+
box-shadow: -10px 1px 8px -10px #65656533, 0px -10px 8px -10px #65656533;
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
border-right: 1px solid #e0e0e0;
|
|
26
|
+
padding: 8px 16px;
|
|
27
|
+
}
|
|
28
|
+
.secondary.opened {
|
|
29
|
+
width: var(--secondary-menu-width);
|
|
30
|
+
}
|
|
31
|
+
.secondary.opened:hover {
|
|
32
|
+
/*background-color: red;*/
|
|
33
|
+
}
|
|
34
|
+
.secondary.closed {
|
|
35
|
+
width: var(--secondary-menu-collapsed-width);
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.toggler {
|
|
40
|
+
position: fixed;
|
|
41
|
+
top: calc(var(--gnb-height) + 28px);
|
|
42
|
+
width: 32px;
|
|
43
|
+
height: 32px;
|
|
44
|
+
background-color: var(--gnb-background-color);
|
|
45
|
+
border: 1px solid #b9b9b9;
|
|
46
|
+
border-radius: 50%;
|
|
47
|
+
box-shadow: 0px 3px 4px -1px #65656514, 0px 5px 10px 0px #65656529;
|
|
48
|
+
z-index: var(--secondary-menu-toggler-zindex);
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transition: opacity .2s;
|
|
52
|
+
}
|
|
53
|
+
.toggler.opened {
|
|
54
|
+
left: calc(var(--primary-menu-width) + var(--secondary-menu-width) - 16px);
|
|
55
|
+
}
|
|
56
|
+
.toggler.closed {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
left: calc(var(--primary-menu-width) + var(--secondary-menu-collapsed-width) - 16px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.secondary:hover + .toggler, .toggler:hover {
|
|
62
|
+
opacity: 1;
|
|
63
|
+
}
|
package/base/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as colors from './colors';
|
|
2
|
+
import borderRadius from './styles/borderRadius';
|
|
3
|
+
import shadow from './styles/shadow';
|
|
4
|
+
import globalStyles from './styles/globalStyles';
|
|
5
|
+
import createTheme from './styles/createTheme';
|
|
6
|
+
export { colors };
|
|
7
|
+
export { borderRadius, shadow, globalStyles, createTheme };
|
|
8
|
+
export { default as AddableFormList } from "./AddableFormList";
|
|
9
|
+
export { default as AlertDialog } from "./dialog/AlertDialog";
|
|
10
|
+
export { default as AppBar } from "./frame/AppBar";
|
|
11
|
+
export { default as Brand } from "./frame/Brand";
|
|
12
|
+
export { default as CircularProgressButton } from "./CircularProgressButton";
|
|
13
|
+
export { default as Checkbox } from "./Checkbox";
|
|
14
|
+
export { default as ColumnedSection } from "./ColumnedSection";
|
|
15
|
+
export { default as ConfirmDialog } from "./dialog/ConfirmDialog";
|
|
16
|
+
export { default as DataGrid } from "./datagrid/DataGrid";
|
|
17
|
+
export { default as Dialog } from "./dialog/Dialog";
|
|
18
|
+
export { default as DropdownButton } from "./DropdownButton";
|
|
19
|
+
export { default as Editor } from "./editor/Editor";
|
|
20
|
+
export { default as Frame } from "./frame/Frame";
|
|
21
|
+
export { default as MainHeader } from "./MainHeader";
|
|
22
|
+
export { default as MenuItem } from "./MenuItem";
|
|
23
|
+
export { default as PropertyTable } from "./PropertyTable";
|
|
24
|
+
export { default as SearchableSelect } from "./SearchableSelect";
|
|
25
|
+
export { default as SearchTextField } from "./SearchTextField";
|
|
26
|
+
export { default as Sidebar } from "./frame/sidebar/Sidebar";
|
|
27
|
+
export { default as Select } from "./Select";
|
|
28
|
+
export { default as Slider } from "./Slider";
|
|
29
|
+
export { default as Snackbar } from "./Snackbar";
|
|
30
|
+
export { default as Switch } from "./Switch";
|
|
31
|
+
export * from './frame/sidebar/SidebarContext';
|
|
32
|
+
export { default as Error } from "./error/Error";
|
|
33
|
+
export { default as HttpError } from "./error/HttpError";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{
|
|
12
12
|
"id": "011",
|
|
13
13
|
"name": "대시보드",
|
|
14
|
-
"href": "/
|
|
14
|
+
"href": "/monitor/dashboard",
|
|
15
15
|
"submenu": []
|
|
16
16
|
}
|
|
17
17
|
]
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
{
|
|
116
116
|
"id": "221",
|
|
117
117
|
"name": "관리",
|
|
118
|
-
"href": "/task/collect",
|
|
118
|
+
"href": "/task/collect/setting",
|
|
119
119
|
"container": false,
|
|
120
120
|
"submenu": []
|
|
121
121
|
},
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { createTheme as createMuiTheme } from "@mui/material";
|
|
2
|
+
import typography from "./typography";
|
|
3
|
+
import palette from "./palette";
|
|
4
|
+
import * as cssBaseline from "./mui/cssBaseline";
|
|
5
|
+
import * as buttonBase from "./mui/buttonBase";
|
|
6
|
+
import * as icon from "./mui/icon";
|
|
7
|
+
import * as button from "./mui/button";
|
|
8
|
+
import * as toggleButton from "./mui/toggleButton";
|
|
9
|
+
import * as iconButton from "./mui/iconButton";
|
|
10
|
+
import * as checkbox from "./mui/checkbox";
|
|
11
|
+
import * as switcher from "./mui/switch";
|
|
12
|
+
import * as select from "./mui/select";
|
|
13
|
+
import * as autocomplete from "./mui/autocomplete";
|
|
14
|
+
import * as textField from "./mui/textField";
|
|
15
|
+
import * as formControl from "./mui/formControl";
|
|
16
|
+
import * as outlinedInput from "./mui/outlinedInput";
|
|
17
|
+
import * as formHelperText from "./mui/formHelperText";
|
|
18
|
+
import * as inputLabel from "./mui/inputLabel";
|
|
19
|
+
import * as popover from "./mui/popover";
|
|
20
|
+
import * as paper from "./mui/paper";
|
|
21
|
+
import * as list from "./mui/list";
|
|
22
|
+
import * as menuItem from "./mui/menuItem";
|
|
23
|
+
import * as formControlLabel from "./mui/formControlLabel";
|
|
24
|
+
import * as chip from "./mui/chip";
|
|
25
|
+
import * as slider from "./mui/slider";
|
|
26
|
+
import * as tabs from "./mui/tabs";
|
|
27
|
+
import * as tab from "./mui/tab";
|
|
28
|
+
import * as dataGrid from "./mui/dataGrid";
|
|
29
|
+
import * as tablePagination from "./mui/tablePagination";
|
|
30
|
+
import * as paginationItem from "./mui/paginationItem";
|
|
31
|
+
import * as tooltip from "./mui/tooltip";
|
|
32
|
+
import * as snackbar from "./mui/snackbar";
|
|
33
|
+
import * as alert from "./mui/alert";
|
|
34
|
+
import * as dialog from "./mui/dialog";
|
|
35
|
+
import * as dialogTitle from "./mui/dialogTitle";
|
|
36
|
+
import * as dialogActions from "./mui/dialogActions";
|
|
37
|
+
import * as dialogContent from "./mui/dialogContent";
|
|
38
|
+
import * as grid from "./mui/grid";
|
|
39
|
+
import * as appBar from "./mui/appBar";
|
|
40
|
+
import * as avatar from "./mui/avatar";
|
|
41
|
+
export default function createTheme() {
|
|
42
|
+
let theme = createMuiTheme({
|
|
43
|
+
typography: typography,
|
|
44
|
+
palette: palette,
|
|
45
|
+
spacing: 4
|
|
46
|
+
});
|
|
47
|
+
theme = createMuiTheme(theme, {
|
|
48
|
+
components: {
|
|
49
|
+
MuiCssBaseline: cssBaseline.styles,
|
|
50
|
+
MuiButtonBase: buttonBase.styles,
|
|
51
|
+
MuiButton: button.styles,
|
|
52
|
+
MuiToggleButton: toggleButton.styles,
|
|
53
|
+
MuiIconButton: iconButton.styles,
|
|
54
|
+
MuiIcon: icon.styles,
|
|
55
|
+
MuiSvgIcon: icon.styles,
|
|
56
|
+
MuiCheckbox: checkbox.styles,
|
|
57
|
+
MuiSwitch: switcher.styles,
|
|
58
|
+
MuiSelect: select.styles,
|
|
59
|
+
MuiAutocomplete: autocomplete.styles,
|
|
60
|
+
MuiTextField: textField.styles,
|
|
61
|
+
MuiFormControl: formControl.styles,
|
|
62
|
+
MuiFormControlLabel: formControlLabel.styles,
|
|
63
|
+
MuiInputLabel: inputLabel.styles,
|
|
64
|
+
MuiOutlinedInput: outlinedInput.styles,
|
|
65
|
+
MuiFormHelperText: formHelperText.styles,
|
|
66
|
+
MuiPopover: popover.styles,
|
|
67
|
+
MuiPaper: paper.styles,
|
|
68
|
+
MuiList: list.styles,
|
|
69
|
+
MuiMenuItem: menuItem.styles,
|
|
70
|
+
MuiChip: chip.styles,
|
|
71
|
+
MuiSlider: slider.styles,
|
|
72
|
+
MuiTabs: tabs.styles,
|
|
73
|
+
MuiTab: tab.styles,
|
|
74
|
+
MuiDataGrid: dataGrid.styles,
|
|
75
|
+
MuiTablePagination: tablePagination.styles,
|
|
76
|
+
MuiPaginationItem: paginationItem.styles,
|
|
77
|
+
MuiTooltip: tooltip.styles,
|
|
78
|
+
MuiSnackbar: snackbar.styles,
|
|
79
|
+
MuiAlert: alert.styles,
|
|
80
|
+
MuiDialog: dialog.styles,
|
|
81
|
+
MuiDialogTitle: dialogTitle.styles,
|
|
82
|
+
MuiDialogActions: dialogActions.styles,
|
|
83
|
+
MuiDialogContent: dialogContent.styles,
|
|
84
|
+
MuiGrid: grid.styles,
|
|
85
|
+
MuiAppBar: appBar.styles,
|
|
86
|
+
MuiAvatar: avatar.styles
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return theme;
|
|
90
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import typography from "./typography";
|
|
2
|
+
import { blueGrey } from "../colors";
|
|
3
|
+
const globalStyles = {
|
|
4
|
+
':root': {
|
|
5
|
+
'--body-background-color': blueGrey.contentBg,
|
|
6
|
+
'--frame-background-color': blueGrey.frameBg,
|
|
7
|
+
'--gnb-background-color': blueGrey.gnbBg,
|
|
8
|
+
'--gnb-height': '64px',
|
|
9
|
+
'--gnb-zindex': 1100,
|
|
10
|
+
'--primary-menu-width': '72px',
|
|
11
|
+
'--secondary-menu-width': '180px',
|
|
12
|
+
'--secondary-menu-collapsed-width': '30px',
|
|
13
|
+
'--secondary-menu-zindex': 1101,
|
|
14
|
+
'--secondary-menu-toggler-zindex': 1102
|
|
15
|
+
},
|
|
16
|
+
'html, body': {
|
|
17
|
+
margin: 0,
|
|
18
|
+
height: '100%'
|
|
19
|
+
},
|
|
20
|
+
body: {
|
|
21
|
+
fontFamily: typography.fontFamily,
|
|
22
|
+
backgroundColor: blueGrey.contentBg
|
|
23
|
+
},
|
|
24
|
+
code: {
|
|
25
|
+
fontFamily: typography.fontFamily
|
|
26
|
+
},
|
|
27
|
+
'.cm-theme-light': {
|
|
28
|
+
fontFamily: "source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace",
|
|
29
|
+
fontSize: '14px'
|
|
30
|
+
},
|
|
31
|
+
'.cm-editor, .cm-editor.cm-focused': {
|
|
32
|
+
outline: '1px solid #eaeaea'
|
|
33
|
+
},
|
|
34
|
+
'.cm-editor .cm-content.cm-lineWrapping': {
|
|
35
|
+
wordBreak: 'break-all'
|
|
36
|
+
},
|
|
37
|
+
'.highcharts-tooltip-box': {
|
|
38
|
+
fillOpacity: 0
|
|
39
|
+
},
|
|
40
|
+
'.highcharts-tooltip > span': {
|
|
41
|
+
background: '#fff',
|
|
42
|
+
border: '1px solid #ccc',
|
|
43
|
+
borderRadius: '3px',
|
|
44
|
+
padding: '8px'
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export default globalStyles;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import typography from "../typography";
|
|
2
|
+
import { blue, green, red, yellow } from "../../colors";
|
|
3
|
+
export const styles = {
|
|
4
|
+
defaultProps: {
|
|
5
|
+
severity: 'info'
|
|
6
|
+
},
|
|
7
|
+
styleOverrides: {
|
|
8
|
+
root: ({
|
|
9
|
+
ownerState
|
|
10
|
+
}) => ({
|
|
11
|
+
fontFamily: typography.fontFamily,
|
|
12
|
+
...typography.bodyLgSemibold,
|
|
13
|
+
lineHeight: 1.2,
|
|
14
|
+
// ...typography.bodyXlSemibold,
|
|
15
|
+
padding: '0px 16px 0px 8px',
|
|
16
|
+
boxShadow: 'none',
|
|
17
|
+
backgroundColor: backgroundColor(ownerState),
|
|
18
|
+
'.MuiAlert-icon': {
|
|
19
|
+
marginRight: 8
|
|
20
|
+
},
|
|
21
|
+
'.MuiAlert-subcontent': {
|
|
22
|
+
...typography.bodySmMedium,
|
|
23
|
+
marginTop: 4
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
function backgroundColor(ownerState) {
|
|
29
|
+
switch (ownerState.severity) {
|
|
30
|
+
case 'success':
|
|
31
|
+
return green[50];
|
|
32
|
+
case 'warning':
|
|
33
|
+
return yellow[50];
|
|
34
|
+
case 'error':
|
|
35
|
+
return red[50];
|
|
36
|
+
case 'info':
|
|
37
|
+
default:
|
|
38
|
+
return blue[50];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import typography from "../typography";
|
|
2
|
+
import { blueGrey } from "../../colors";
|
|
3
|
+
export const styles = {
|
|
4
|
+
styleOverrides: {
|
|
5
|
+
root: {
|
|
6
|
+
fontFamily: typography.fontFamily,
|
|
7
|
+
backgroundColor: blueGrey.frameBg,
|
|
8
|
+
boxShadow: 'none',
|
|
9
|
+
'&.MuiAppBar-preview': {
|
|
10
|
+
backgroundColor: '#d5f5f8'
|
|
11
|
+
},
|
|
12
|
+
'.MuiToolbar-root': {
|
|
13
|
+
paddingLeft: 18
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { grey, red } from "../../colors";
|
|
2
|
+
import typography from "../typography";
|
|
3
|
+
import borderRadius from "../borderRadius";
|
|
4
|
+
export const styles = {
|
|
5
|
+
styleOverrides: {
|
|
6
|
+
root: {
|
|
7
|
+
'&.Mui-error .MuiOutlinedInput-notchedOutline': {
|
|
8
|
+
borderColor: red[500]
|
|
9
|
+
},
|
|
10
|
+
'&.Mui-error:hover .MuiOutlinedInput-notchedOutline': {
|
|
11
|
+
borderColor: red[500]
|
|
12
|
+
},
|
|
13
|
+
'&.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
14
|
+
borderColor: red[500]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
groupLabel: {
|
|
18
|
+
...typography.bodySmSemibold,
|
|
19
|
+
color: grey[900]
|
|
20
|
+
},
|
|
21
|
+
option: {
|
|
22
|
+
fontFamily: typography.fontFamily,
|
|
23
|
+
...typography.bodyMdMedium,
|
|
24
|
+
color: grey[800]
|
|
25
|
+
},
|
|
26
|
+
noOptions: {
|
|
27
|
+
fontFamily: typography.fontFamily,
|
|
28
|
+
...typography.bodySmRegular
|
|
29
|
+
},
|
|
30
|
+
clearIndicator: {
|
|
31
|
+
'&:hover': {
|
|
32
|
+
background: 'none'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
popupIndicator: {
|
|
36
|
+
'&:hover': {
|
|
37
|
+
background: 'none'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
paper: {
|
|
41
|
+
border: `1px solid ${grey[300]}`,
|
|
42
|
+
borderRadius: borderRadius[3],
|
|
43
|
+
marginTop: 3
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import typography from "../typography";
|
|
2
|
+
import { grey } from "../../colors";
|
|
3
|
+
export const styles = {
|
|
4
|
+
styleOverrides: {
|
|
5
|
+
root: {
|
|
6
|
+
fontFamily: typography.fontFamily,
|
|
7
|
+
...typography.bodySmMedium,
|
|
8
|
+
color: '#fff',
|
|
9
|
+
backgroundColor: grey[900],
|
|
10
|
+
width: 24,
|
|
11
|
+
height: 24
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { blue, grey, orange, red } from "../../colors";
|
|
2
|
+
import typography from "../typography";
|
|
3
|
+
import borderRadius from "../borderRadius";
|
|
4
|
+
export const primary = {
|
|
5
|
+
contained: (ownerState, theme) => {
|
|
6
|
+
return ownerState.color === 'primary' && ownerState.variant === 'contained' && {
|
|
7
|
+
color: theme.palette.primary.contrastText,
|
|
8
|
+
backgroundColor: theme.palette.primary.main,
|
|
9
|
+
':hover, &.Mui-focusVisible': {
|
|
10
|
+
color: theme.palette.primary.contrastText,
|
|
11
|
+
backgroundColor: '#242424'
|
|
12
|
+
},
|
|
13
|
+
':active': {
|
|
14
|
+
color: grey[300],
|
|
15
|
+
backgroundColor: '#141414'
|
|
16
|
+
},
|
|
17
|
+
':disabled': {
|
|
18
|
+
color: grey[500],
|
|
19
|
+
backgroundColor: grey[300]
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
outlined: (ownerState, theme) => {
|
|
24
|
+
return ownerState.color === 'primary' && ownerState.variant === 'outlined' && {
|
|
25
|
+
color: grey[900],
|
|
26
|
+
backgroundColor: '#fff',
|
|
27
|
+
borderColor: grey[700],
|
|
28
|
+
':hover, &.Mui-focusVisible': {
|
|
29
|
+
color: grey[900],
|
|
30
|
+
backgroundColor: grey[10]
|
|
31
|
+
},
|
|
32
|
+
':active': {
|
|
33
|
+
color: grey[900],
|
|
34
|
+
backgroundColor: grey[20]
|
|
35
|
+
},
|
|
36
|
+
':disabled': {
|
|
37
|
+
color: grey[400],
|
|
38
|
+
backgroundColor: '#fff',
|
|
39
|
+
borderColor: grey[400]
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
text: (ownerState, theme) => {
|
|
44
|
+
return ownerState.color === 'primary' && ownerState.variant === 'text' && {
|
|
45
|
+
color: grey[900],
|
|
46
|
+
backgroundColor: '#fff',
|
|
47
|
+
':hover, &.Mui-focusVisible': {
|
|
48
|
+
color: grey[900],
|
|
49
|
+
backgroundColor: grey[100]
|
|
50
|
+
},
|
|
51
|
+
':active': {
|
|
52
|
+
color: grey[900],
|
|
53
|
+
backgroundColor: grey[200]
|
|
54
|
+
},
|
|
55
|
+
':disabled': {
|
|
56
|
+
color: grey[400],
|
|
57
|
+
backgroundColor: '#fff'
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
export const info = {
|
|
63
|
+
contained: (ownerState, theme) => {
|
|
64
|
+
return ownerState.color === 'info' && ownerState.variant === 'contained' && {
|
|
65
|
+
color: theme.palette.info.contrastText,
|
|
66
|
+
backgroundColor: theme.palette.info.main,
|
|
67
|
+
':hover, &.Mui-focusVisible': {
|
|
68
|
+
color: theme.palette.info.contrastText,
|
|
69
|
+
backgroundColor: blue[600]
|
|
70
|
+
},
|
|
71
|
+
':active': {
|
|
72
|
+
color: theme.palette.info.contrastText,
|
|
73
|
+
backgroundColor: blue[800]
|
|
74
|
+
},
|
|
75
|
+
':disabled': {
|
|
76
|
+
color: grey[500],
|
|
77
|
+
backgroundColor: grey[300]
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
outlined: (ownerState, theme) => {
|
|
82
|
+
return ownerState.color === 'info' && ownerState.variant === 'outlined' && {
|
|
83
|
+
color: blue[500],
|
|
84
|
+
backgroundColor: '#fff',
|
|
85
|
+
borderColor: blue[500],
|
|
86
|
+
':hover, &.Mui-focusVisible': {
|
|
87
|
+
color: blue[500],
|
|
88
|
+
backgroundColor: blue[50]
|
|
89
|
+
},
|
|
90
|
+
':active': {
|
|
91
|
+
color: blue[500],
|
|
92
|
+
backgroundColor: blue[100]
|
|
93
|
+
},
|
|
94
|
+
':disabled': {
|
|
95
|
+
color: grey[400],
|
|
96
|
+
backgroundColor: '#fff',
|
|
97
|
+
borderColor: grey[400]
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
text: (ownerState, theme) => {
|
|
102
|
+
return ownerState.color === 'info' && ownerState.variant === 'text' && {
|
|
103
|
+
color: blue[500],
|
|
104
|
+
backgroundColor: '#fff',
|
|
105
|
+
':hover, &.Mui-focusVisible': {
|
|
106
|
+
color: blue[500],
|
|
107
|
+
backgroundColor: blue[50]
|
|
108
|
+
},
|
|
109
|
+
':active': {
|
|
110
|
+
color: blue[500],
|
|
111
|
+
backgroundColor: blue[100]
|
|
112
|
+
},
|
|
113
|
+
':disabled': {
|
|
114
|
+
color: grey[400],
|
|
115
|
+
backgroundColor: '#fff'
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
export const warning = {
|
|
121
|
+
contained: (ownerState, theme) => {
|
|
122
|
+
return ownerState.color === 'warning' && ownerState.variant === 'contained' && {
|
|
123
|
+
color: theme.palette.warning.contrastText,
|
|
124
|
+
backgroundColor: theme.palette.warning.main,
|
|
125
|
+
':hover, &.Mui-focusVisible': {
|
|
126
|
+
color: theme.palette.warning.contrastText,
|
|
127
|
+
backgroundColor: orange[600]
|
|
128
|
+
},
|
|
129
|
+
':active': {
|
|
130
|
+
color: theme.palette.warning.contrastText,
|
|
131
|
+
backgroundColor: orange[800]
|
|
132
|
+
},
|
|
133
|
+
':disabled': {
|
|
134
|
+
color: grey[500],
|
|
135
|
+
backgroundColor: grey[300]
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
export const error = {
|
|
141
|
+
contained: (ownerState, theme) => {
|
|
142
|
+
return ownerState.color === 'error' && ownerState.variant === 'contained' && {
|
|
143
|
+
color: theme.palette.error.contrastText,
|
|
144
|
+
backgroundColor: theme.palette.error.main,
|
|
145
|
+
':hover, &.Mui-focusVisible': {
|
|
146
|
+
color: theme.palette.error.contrastText,
|
|
147
|
+
backgroundColor: red[600]
|
|
148
|
+
},
|
|
149
|
+
':active': {
|
|
150
|
+
color: theme.palette.error.contrastText,
|
|
151
|
+
backgroundColor: red[800]
|
|
152
|
+
},
|
|
153
|
+
':disabled': {
|
|
154
|
+
color: grey[500],
|
|
155
|
+
backgroundColor: grey[300]
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
},
|
|
159
|
+
outlined: (ownerState, theme) => {
|
|
160
|
+
return ownerState.color === 'error' && ownerState.variant === 'outlined' && {
|
|
161
|
+
color: red[700],
|
|
162
|
+
backgroundColor: '#fff',
|
|
163
|
+
borderColor: red[600],
|
|
164
|
+
':hover, &.Mui-focusVisible': {
|
|
165
|
+
color: red[700],
|
|
166
|
+
backgroundColor: red[50] //'#fef2f4',
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
':active': {
|
|
170
|
+
color: red[700],
|
|
171
|
+
backgroundColor: red[100] //'#fcdee5',
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
':disabled': {
|
|
175
|
+
color: grey[400],
|
|
176
|
+
backgroundColor: '#fff',
|
|
177
|
+
borderColor: grey[400]
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
text: (ownerState, theme) => {
|
|
182
|
+
return ownerState.color === 'error' && ownerState.variant === 'text' && {
|
|
183
|
+
color: red[700],
|
|
184
|
+
backgroundColor: '#fff',
|
|
185
|
+
':hover, &.Mui-focusVisible': {
|
|
186
|
+
color: red[700],
|
|
187
|
+
backgroundColor: red[50] //'#fef2f4',
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
':active': {
|
|
191
|
+
color: red[700],
|
|
192
|
+
backgroundColor: red[100] //'#fcdee5',
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
':disabled': {
|
|
196
|
+
color: grey[400],
|
|
197
|
+
backgroundColor: '#fff'
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
export const crud = {
|
|
203
|
+
contained: (ownerState, theme) => {
|
|
204
|
+
return ownerState.color === 'crud' && ownerState.variant === 'contained' && {
|
|
205
|
+
color: theme.palette.crud.contrastText,
|
|
206
|
+
backgroundColor: theme.palette.crud.main,
|
|
207
|
+
':hover, &.Mui-focusVisible': {
|
|
208
|
+
color: theme.palette.crud.contrastText,
|
|
209
|
+
backgroundColor: blue[100]
|
|
210
|
+
},
|
|
211
|
+
':active': {
|
|
212
|
+
color: theme.palette.crud.contrastText,
|
|
213
|
+
backgroundColor: blue[200]
|
|
214
|
+
},
|
|
215
|
+
':disabled': {
|
|
216
|
+
color: grey[400],
|
|
217
|
+
backgroundColor: grey[150]
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
export const styles = {
|
|
223
|
+
defaultProps: {
|
|
224
|
+
variant: 'contained'
|
|
225
|
+
},
|
|
226
|
+
styleOverrides: {
|
|
227
|
+
root: ({
|
|
228
|
+
ownerState,
|
|
229
|
+
theme
|
|
230
|
+
}) => ({
|
|
231
|
+
...primary.contained(ownerState, theme),
|
|
232
|
+
...primary.outlined(ownerState, theme),
|
|
233
|
+
...primary.text(ownerState, theme),
|
|
234
|
+
...info.contained(ownerState, theme),
|
|
235
|
+
...info.outlined(ownerState, theme),
|
|
236
|
+
...info.text(ownerState, theme),
|
|
237
|
+
...warning.contained(ownerState, theme),
|
|
238
|
+
...error.contained(ownerState, theme),
|
|
239
|
+
...error.outlined(ownerState, theme),
|
|
240
|
+
...error.text(ownerState, theme),
|
|
241
|
+
...crud.contained(ownerState, theme),
|
|
242
|
+
fontFamily: typography.fontFamily,
|
|
243
|
+
borderRadius: borderRadius[2],
|
|
244
|
+
boxShadow: 'none!important'
|
|
245
|
+
}),
|
|
246
|
+
sizeMedium: ({
|
|
247
|
+
ownerState,
|
|
248
|
+
theme
|
|
249
|
+
}) => ({
|
|
250
|
+
minWidth: 60,
|
|
251
|
+
height: ownerState.color === 'crud' ? 26 : 36,
|
|
252
|
+
padding: ownerState.color === 'crud' ? '0px 2px' : '8px 12px',
|
|
253
|
+
fontSize: typography.bodyMdSemibold.fontSize,
|
|
254
|
+
fontWeight: typography.bodyMdSemibold.fontWeight
|
|
255
|
+
}),
|
|
256
|
+
sizeSmall: {
|
|
257
|
+
minWidth: '50px',
|
|
258
|
+
height: '26px',
|
|
259
|
+
padding: '8px 8px',
|
|
260
|
+
fontSize: typography.bodySmSemibold.fontSize,
|
|
261
|
+
fontWeight: typography.bodySmSemibold.fontWeight
|
|
262
|
+
},
|
|
263
|
+
startIcon: ({
|
|
264
|
+
ownerState,
|
|
265
|
+
theme
|
|
266
|
+
}) => ({
|
|
267
|
+
marginRight: theme.spacing(ownerState.color === 'crud' ? 0.5 : 1)
|
|
268
|
+
}),
|
|
269
|
+
endIcon: ({
|
|
270
|
+
ownerState,
|
|
271
|
+
theme
|
|
272
|
+
}) => ({
|
|
273
|
+
marginLeft: theme.spacing(ownerState.color === 'crud' ? 0.5 : 1)
|
|
274
|
+
})
|
|
275
|
+
}
|
|
276
|
+
};
|