@nethru/ui 1.0.82 → 2.0.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.
- 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 +53 -0
- package/{dist → base}/samples/menu.sample.json +2 -2
- package/base/styles/borderRadius.js +7 -0
- package/base/styles/button.js +199 -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/AlertDialog.js +0 -55
- package/dist/AppBar.js +0 -68
- package/dist/Checkbox.js +0 -27
- 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/Frame.js +0 -47
- package/dist/MainHeader.js +0 -59
- package/dist/PropertyTable.js +0 -141
- package/dist/SearchTextField.js +0 -24
- package/dist/SearchableSelect.js +0 -41
- package/dist/Select.js +0 -48
- package/dist/Snackbar.js +0 -51
- package/dist/Switch.js +0 -37
- 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/deprecated}/Accordion.js +0 -0
- /package/{dist → base/deprecated}/AccordionDetails.js +0 -0
- /package/{dist → base/deprecated}/AccordionSummary.js +0 -0
- /package/{dist → base/deprecated}/AppendableFormList.js +0 -0
- /package/{dist → base/deprecated}/AvatarDropdown.js +0 -0
- /package/{dist → base/deprecated}/Button.js +0 -0
- /package/{dist → base/deprecated}/CircularProgress.js +0 -0
- /package/{dist → base/deprecated}/FormLabel.js +0 -0
- /package/{dist → base/deprecated}/GroupSelect.js +0 -0
- /package/{dist → base/deprecated}/ListItem.js +0 -0
- /package/{dist → base/deprecated}/ListItemDivider.js +0 -0
- /package/{dist → base/deprecated}/ListItemGrid.js +0 -0
- /package/{dist → base/deprecated}/ListItemText.js +0 -0
- /package/{dist → base/deprecated}/ReferenceChipList.js +0 -0
- /package/{dist → base/deprecated}/Section.js +0 -0
- /package/{dist → base/deprecated}/ShadowedSection.js +0 -0
- /package/{dist → base/deprecated}/StatusChip.js +0 -0
- /package/{dist → base/deprecated}/TabbedSection.js +0 -0
- /package/{dist → base/deprecated}/Tabs.js +0 -0
- /package/{dist → base/deprecated}/TextField.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,131 @@
|
|
|
1
|
+
import { grey } from "../colors";
|
|
2
|
+
const typography = {
|
|
3
|
+
fontFamily: '"Pretendard Variable", Pretendard,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"',
|
|
4
|
+
fontSize: 12,
|
|
5
|
+
h1: undefined,
|
|
6
|
+
h2: undefined,
|
|
7
|
+
h3: undefined,
|
|
8
|
+
h4: undefined,
|
|
9
|
+
h5: undefined,
|
|
10
|
+
h6: undefined,
|
|
11
|
+
subtitle1: undefined,
|
|
12
|
+
subtitle2: undefined,
|
|
13
|
+
body1: undefined,
|
|
14
|
+
body2: undefined,
|
|
15
|
+
button: undefined,
|
|
16
|
+
caption: undefined,
|
|
17
|
+
overline: undefined,
|
|
18
|
+
logo: {
|
|
19
|
+
color: grey[900],
|
|
20
|
+
fontSize: '18px',
|
|
21
|
+
fontWeight: 600,
|
|
22
|
+
lineHeight: 1.6,
|
|
23
|
+
letterSpacing: 0
|
|
24
|
+
},
|
|
25
|
+
headline1: {
|
|
26
|
+
color: grey[900],
|
|
27
|
+
fontSize: '24px',
|
|
28
|
+
fontWeight: 700,
|
|
29
|
+
lineHeight: 1.6,
|
|
30
|
+
letterSpacing: 0
|
|
31
|
+
},
|
|
32
|
+
headline2: {
|
|
33
|
+
color: grey[900],
|
|
34
|
+
fontSize: '16px',
|
|
35
|
+
fontWeight: 700,
|
|
36
|
+
lineHeight: 1.6,
|
|
37
|
+
letterSpacing: 0
|
|
38
|
+
},
|
|
39
|
+
bodyXlSemibold: {
|
|
40
|
+
color: grey[900],
|
|
41
|
+
fontSize: '16px',
|
|
42
|
+
fontWeight: 600,
|
|
43
|
+
lineHeight: 1.6,
|
|
44
|
+
letterSpacing: 0
|
|
45
|
+
},
|
|
46
|
+
bodyXlMedium: {
|
|
47
|
+
color: grey[900],
|
|
48
|
+
fontSize: '16px',
|
|
49
|
+
fontWeight: 500,
|
|
50
|
+
lineHeight: 1.6,
|
|
51
|
+
letterSpacing: 0
|
|
52
|
+
},
|
|
53
|
+
bodyLgSemibold: {
|
|
54
|
+
color: grey[900],
|
|
55
|
+
fontSize: '14px',
|
|
56
|
+
fontWeight: 600,
|
|
57
|
+
lineHeight: 1.6,
|
|
58
|
+
letterSpacing: 0
|
|
59
|
+
},
|
|
60
|
+
bodyLgMedium: {
|
|
61
|
+
color: grey[900],
|
|
62
|
+
fontSize: '14px',
|
|
63
|
+
fontWeight: 500,
|
|
64
|
+
lineHeight: 1.6,
|
|
65
|
+
letterSpacing: 0
|
|
66
|
+
},
|
|
67
|
+
bodyMdSemibold: {
|
|
68
|
+
color: grey[900],
|
|
69
|
+
fontSize: '13px',
|
|
70
|
+
fontWeight: 600,
|
|
71
|
+
lineHeight: 1.4,
|
|
72
|
+
letterSpacing: 0
|
|
73
|
+
},
|
|
74
|
+
bodyMdMedium: {
|
|
75
|
+
color: grey[900],
|
|
76
|
+
fontSize: '13px',
|
|
77
|
+
fontWeight: 500,
|
|
78
|
+
lineHeight: 1.4,
|
|
79
|
+
letterSpacing: 0
|
|
80
|
+
},
|
|
81
|
+
bodySmBold: {
|
|
82
|
+
color: grey[900],
|
|
83
|
+
fontSize: '12px',
|
|
84
|
+
fontWeight: 700,
|
|
85
|
+
lineHeight: 1.4,
|
|
86
|
+
letterSpacing: 0
|
|
87
|
+
},
|
|
88
|
+
bodySmSemibold: {
|
|
89
|
+
color: grey[900],
|
|
90
|
+
fontSize: '12px',
|
|
91
|
+
fontWeight: 600,
|
|
92
|
+
lineHeight: 1.4,
|
|
93
|
+
letterSpacing: 0
|
|
94
|
+
},
|
|
95
|
+
bodySmMedium: {
|
|
96
|
+
color: grey[900],
|
|
97
|
+
fontSize: '12px',
|
|
98
|
+
fontWeight: 500,
|
|
99
|
+
lineHeight: 1.4,
|
|
100
|
+
letterSpacing: 0
|
|
101
|
+
},
|
|
102
|
+
bodySmRegular: {
|
|
103
|
+
color: grey[900],
|
|
104
|
+
fontSize: '12px',
|
|
105
|
+
fontWeight: 400,
|
|
106
|
+
lineHeight: 1.4,
|
|
107
|
+
letterSpacing: 0
|
|
108
|
+
},
|
|
109
|
+
bodyXsSemibold: {
|
|
110
|
+
color: grey[900],
|
|
111
|
+
fontSize: '10px',
|
|
112
|
+
fontWeight: 600,
|
|
113
|
+
lineHeight: 1.4,
|
|
114
|
+
letterSpacing: 0
|
|
115
|
+
},
|
|
116
|
+
bodyXsMedium: {
|
|
117
|
+
color: grey[900],
|
|
118
|
+
fontSize: '10px',
|
|
119
|
+
fontWeight: 500,
|
|
120
|
+
lineHeight: 1.4,
|
|
121
|
+
letterSpacing: 0
|
|
122
|
+
},
|
|
123
|
+
code: {
|
|
124
|
+
color: grey[900],
|
|
125
|
+
fontSize: '13px',
|
|
126
|
+
fontWeight: 500,
|
|
127
|
+
lineHeight: 1.6,
|
|
128
|
+
letterSpacing: 0
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
export default typography;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nethru/ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"main": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"main": "base/index.js",
|
|
5
5
|
"files": [
|
|
6
|
-
"/
|
|
6
|
+
"/base"
|
|
7
7
|
],
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@codemirror/lang-javascript": "^6.2.1",
|
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
"react-dom": "^18.2.0",
|
|
31
31
|
"react-router-dom": "^6.20.1",
|
|
32
32
|
"react-scripts": "5.0.1",
|
|
33
|
-
"styled-components": "^6.1.11"
|
|
33
|
+
"styled-components": "^6.1.11",
|
|
34
|
+
"uuid": "^10.0.0"
|
|
34
35
|
},
|
|
35
36
|
"scripts": {
|
|
36
37
|
"start": "react-scripts start",
|
|
37
38
|
"build": "react-scripts build",
|
|
38
39
|
"test": "react-scripts test",
|
|
39
40
|
"eject": "react-scripts eject",
|
|
40
|
-
"publish
|
|
41
|
+
"publish": "rm -rf base && mkdir base && babel src/lib -d base --copy-files"
|
|
41
42
|
},
|
|
42
43
|
"babel": {
|
|
43
44
|
"presets": [
|
package/dist/AlertDialog.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Box, Button, Stack } from "@mui/material";
|
|
2
|
-
import DialogContent from "@mui/material/DialogContent";
|
|
3
|
-
import DialogContentText from "@mui/material/DialogContentText";
|
|
4
|
-
import DialogActions from "@mui/material/DialogActions";
|
|
5
|
-
import Dialog from "./Dialog";
|
|
6
|
-
import CampaignIcon from "@mui/icons-material/Campaign";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export default function AlertDialog({
|
|
10
|
-
open,
|
|
11
|
-
onClose,
|
|
12
|
-
content,
|
|
13
|
-
closeText = '확인'
|
|
14
|
-
}) {
|
|
15
|
-
return /*#__PURE__*/_jsxs(Dialog, {
|
|
16
|
-
contentFontSize: 15,
|
|
17
|
-
open: open,
|
|
18
|
-
onClose: onClose,
|
|
19
|
-
children: [/*#__PURE__*/_jsx(DialogContent, {
|
|
20
|
-
children: /*#__PURE__*/_jsxs(Stack, {
|
|
21
|
-
direction: "row",
|
|
22
|
-
alignItems: "center",
|
|
23
|
-
gap: 2,
|
|
24
|
-
children: [/*#__PURE__*/_jsx(CampaignIcon, {
|
|
25
|
-
sx: {
|
|
26
|
-
color: '#777',
|
|
27
|
-
'&': {
|
|
28
|
-
fontSize: 50
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}), /*#__PURE__*/_jsx(DialogContentText, {
|
|
32
|
-
component: "div",
|
|
33
|
-
children: /*#__PURE__*/_jsx(Box, {
|
|
34
|
-
component: "div",
|
|
35
|
-
sx: {
|
|
36
|
-
whiteSpace: 'pre-wrap'
|
|
37
|
-
},
|
|
38
|
-
children: content.replace(/(\\n)/g, '\n')
|
|
39
|
-
})
|
|
40
|
-
})]
|
|
41
|
-
})
|
|
42
|
-
}), /*#__PURE__*/_jsx(DialogActions, {
|
|
43
|
-
sx: {
|
|
44
|
-
mt: 0,
|
|
45
|
-
mb: 1,
|
|
46
|
-
justifyContent: 'center'
|
|
47
|
-
},
|
|
48
|
-
children: /*#__PURE__*/_jsx(Button, {
|
|
49
|
-
variant: "contained",
|
|
50
|
-
onClick: onClose,
|
|
51
|
-
children: closeText
|
|
52
|
-
})
|
|
53
|
-
})]
|
|
54
|
-
});
|
|
55
|
-
}
|
package/dist/AppBar.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Box, Divider, Stack, Toolbar, Typography } from "@mui/material";
|
|
2
|
-
import MuiAppBar from "@mui/material/AppBar";
|
|
3
|
-
import { grey } from "@mui/material/colors";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export default function AppBar({
|
|
7
|
-
title,
|
|
8
|
-
logoUri,
|
|
9
|
-
onLogoClick,
|
|
10
|
-
children,
|
|
11
|
-
sx
|
|
12
|
-
}) {
|
|
13
|
-
const appbarStyles = {
|
|
14
|
-
boxShadow: 'none',
|
|
15
|
-
borderBottom: `1px solid ${grey[300]}`,
|
|
16
|
-
'@media (min-width: 600px)': {
|
|
17
|
-
'.MuiToolbar-root': {
|
|
18
|
-
paddingLeft: '16px',
|
|
19
|
-
paddingRight: '16px'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const logoStyles = {
|
|
24
|
-
width: 37,
|
|
25
|
-
height: 32,
|
|
26
|
-
cursor: onLogoClick ? 'pointer' : 'default'
|
|
27
|
-
};
|
|
28
|
-
const dividerStyles = {
|
|
29
|
-
borderColor: grey[200],
|
|
30
|
-
mt: 2,
|
|
31
|
-
mb: 2,
|
|
32
|
-
ml: 2,
|
|
33
|
-
mr: 1
|
|
34
|
-
};
|
|
35
|
-
return /*#__PURE__*/_jsx(MuiAppBar, {
|
|
36
|
-
color: "transparent",
|
|
37
|
-
sx: {
|
|
38
|
-
...sx,
|
|
39
|
-
...appbarStyles
|
|
40
|
-
},
|
|
41
|
-
children: /*#__PURE__*/_jsxs(Toolbar, {
|
|
42
|
-
children: [/*#__PURE__*/_jsxs(Stack, {
|
|
43
|
-
spacing: 1,
|
|
44
|
-
direction: "row",
|
|
45
|
-
alignItems: "center",
|
|
46
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
47
|
-
component: "img",
|
|
48
|
-
src: logoUri,
|
|
49
|
-
alt: "logo",
|
|
50
|
-
onClick: onLogoClick,
|
|
51
|
-
sx: logoStyles
|
|
52
|
-
}), /*#__PURE__*/_jsx(Typography, {
|
|
53
|
-
noWrap: true,
|
|
54
|
-
sx: {
|
|
55
|
-
color: 'text.secondary',
|
|
56
|
-
cursor: 'default'
|
|
57
|
-
},
|
|
58
|
-
children: title
|
|
59
|
-
})]
|
|
60
|
-
}), /*#__PURE__*/_jsx(Divider, {
|
|
61
|
-
orientation: "vertical",
|
|
62
|
-
variant: "middle",
|
|
63
|
-
sx: dividerStyles,
|
|
64
|
-
flexItem: true
|
|
65
|
-
}), children]
|
|
66
|
-
})
|
|
67
|
-
});
|
|
68
|
-
}
|
package/dist/Checkbox.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import MuiCheckbox from "@mui/material/Checkbox";
|
|
3
|
-
import { FormControlLabel } from "@mui/material";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export default function Checkbox({
|
|
6
|
-
label,
|
|
7
|
-
size = 'medium',
|
|
8
|
-
sx,
|
|
9
|
-
...props
|
|
10
|
-
}) {
|
|
11
|
-
const styles = useMemo(() => ({
|
|
12
|
-
'& .MuiFormControlLabel-label': {
|
|
13
|
-
fontSize: size === 'small' ? '14px' : '16px'
|
|
14
|
-
}
|
|
15
|
-
}), [size]);
|
|
16
|
-
return /*#__PURE__*/_jsx(FormControlLabel, {
|
|
17
|
-
label: label,
|
|
18
|
-
control: /*#__PURE__*/_jsx(MuiCheckbox, {
|
|
19
|
-
size: size,
|
|
20
|
-
...props
|
|
21
|
-
}),
|
|
22
|
-
sx: {
|
|
23
|
-
...styles,
|
|
24
|
-
...sx
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
package/dist/ColumnedSection.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { List, Stack } from "@mui/material";
|
|
2
|
-
import ListItem from "./ListItem";
|
|
3
|
-
import ListItemGrid from "./ListItemGrid";
|
|
4
|
-
import { useMemo } from "react";
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
export default function ColumnedSection({
|
|
8
|
-
columns,
|
|
9
|
-
labels = [],
|
|
10
|
-
contents = [],
|
|
11
|
-
horizontalGap = 1,
|
|
12
|
-
verticalGap = 0.5,
|
|
13
|
-
sx
|
|
14
|
-
}) {
|
|
15
|
-
const width = useMemo(() => {
|
|
16
|
-
return `${100 / columns}%`;
|
|
17
|
-
}, [columns]);
|
|
18
|
-
const styles = useMemo(() => {
|
|
19
|
-
return {
|
|
20
|
-
width: width,
|
|
21
|
-
bgcolor: '#f8f9fa',
|
|
22
|
-
p: '10px 20px',
|
|
23
|
-
borderRadius: '7px'
|
|
24
|
-
};
|
|
25
|
-
}, [width]);
|
|
26
|
-
return /*#__PURE__*/_jsx(List, {
|
|
27
|
-
children: /*#__PURE__*/_jsxs(ListItem, {
|
|
28
|
-
grid: true,
|
|
29
|
-
children: [labels.length > 0 && /*#__PURE__*/_jsx(ListItemGrid, {
|
|
30
|
-
xs: 12,
|
|
31
|
-
children: /*#__PURE__*/_jsx(Stack, {
|
|
32
|
-
direction: "row",
|
|
33
|
-
gap: horizontalGap,
|
|
34
|
-
children: labels.map((label, index) => /*#__PURE__*/_jsx(Stack, {
|
|
35
|
-
gap: verticalGap,
|
|
36
|
-
sx: {
|
|
37
|
-
width: width
|
|
38
|
-
},
|
|
39
|
-
children: /*#__PURE__*/_jsx(Stack, {
|
|
40
|
-
direction: "row",
|
|
41
|
-
alignItems: "baseline",
|
|
42
|
-
spacing: 1,
|
|
43
|
-
children: label
|
|
44
|
-
})
|
|
45
|
-
}, index))
|
|
46
|
-
})
|
|
47
|
-
}), /*#__PURE__*/_jsx(ListItemGrid, {
|
|
48
|
-
xs: 12,
|
|
49
|
-
children: /*#__PURE__*/_jsx(Stack, {
|
|
50
|
-
direction: "row",
|
|
51
|
-
gap: horizontalGap,
|
|
52
|
-
children: contents.map((content, index) => /*#__PURE__*/_jsx(Stack, {
|
|
53
|
-
gap: verticalGap,
|
|
54
|
-
sx: {
|
|
55
|
-
...styles,
|
|
56
|
-
...sx
|
|
57
|
-
},
|
|
58
|
-
children: content
|
|
59
|
-
}, index))
|
|
60
|
-
})
|
|
61
|
-
})]
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
}
|
package/dist/ConfirmDialog.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Box, Button, Stack } from "@mui/material";
|
|
2
|
-
import DialogContent from "@mui/material/DialogContent";
|
|
3
|
-
import DialogContentText from "@mui/material/DialogContentText";
|
|
4
|
-
import DialogActions from "@mui/material/DialogActions";
|
|
5
|
-
import Dialog from "./Dialog";
|
|
6
|
-
import CampaignIcon from "@mui/icons-material/Campaign";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export default function ConfirmDialog({
|
|
10
|
-
open,
|
|
11
|
-
onConfirm,
|
|
12
|
-
onCancel,
|
|
13
|
-
content,
|
|
14
|
-
confirmText = '예',
|
|
15
|
-
cancelText = '아니오'
|
|
16
|
-
}) {
|
|
17
|
-
return /*#__PURE__*/_jsxs(Dialog, {
|
|
18
|
-
fullWidth: true,
|
|
19
|
-
contentFontSize: 15,
|
|
20
|
-
open: open,
|
|
21
|
-
onClose: onCancel,
|
|
22
|
-
children: [/*#__PURE__*/_jsx(DialogContent, {
|
|
23
|
-
sx: {
|
|
24
|
-
pt: 4
|
|
25
|
-
},
|
|
26
|
-
children: /*#__PURE__*/_jsxs(Stack, {
|
|
27
|
-
direction: "row",
|
|
28
|
-
alignItems: "center",
|
|
29
|
-
gap: 2,
|
|
30
|
-
children: [/*#__PURE__*/_jsx(CampaignIcon, {
|
|
31
|
-
sx: {
|
|
32
|
-
color: '#777',
|
|
33
|
-
'&': {
|
|
34
|
-
fontSize: 50
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}), /*#__PURE__*/_jsx(DialogContentText, {
|
|
38
|
-
component: "div",
|
|
39
|
-
children: /*#__PURE__*/_jsx(Box, {
|
|
40
|
-
component: "div",
|
|
41
|
-
sx: {
|
|
42
|
-
whiteSpace: 'pre-wrap'
|
|
43
|
-
},
|
|
44
|
-
children: content.replace(/(\\n)/g, '\n')
|
|
45
|
-
})
|
|
46
|
-
})]
|
|
47
|
-
})
|
|
48
|
-
}), /*#__PURE__*/_jsxs(DialogActions, {
|
|
49
|
-
sx: {
|
|
50
|
-
mr: 1.5,
|
|
51
|
-
mb: 1
|
|
52
|
-
},
|
|
53
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
54
|
-
variant: "contained",
|
|
55
|
-
onClick: onConfirm,
|
|
56
|
-
autoFocus: true,
|
|
57
|
-
children: confirmText
|
|
58
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
59
|
-
variant: "outlined",
|
|
60
|
-
onClick: onCancel,
|
|
61
|
-
children: cancelText
|
|
62
|
-
})]
|
|
63
|
-
})]
|
|
64
|
-
});
|
|
65
|
-
}
|
package/dist/DataGrid.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { DataGridPro as MuiDataGridPro, GRID_CHECKBOX_SELECTION_COL_DEF, GridCell, GridToolbarQuickFilter, koKR } from "@mui/x-data-grid-pro";
|
|
3
|
-
import { Box, Stack } from "@mui/material";
|
|
4
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const styles = {
|
|
8
|
-
borderLeft: '0px',
|
|
9
|
-
borderRight: '0px',
|
|
10
|
-
'&.MuiDataGrid-root': {
|
|
11
|
-
borderTop: 'none',
|
|
12
|
-
borderBottom: 'none'
|
|
13
|
-
},
|
|
14
|
-
'.MuiDataGrid-columnSeparator': {
|
|
15
|
-
// visibility: 'hidden !important'
|
|
16
|
-
},
|
|
17
|
-
'.MuiDataGrid-columnHeaders': {
|
|
18
|
-
//borderBottom: 'none !important'
|
|
19
|
-
},
|
|
20
|
-
'.MuiDataGrid-columnHeader.borderTop': {
|
|
21
|
-
borderTop: '1px solid rgba(224, 224, 224, 1)'
|
|
22
|
-
},
|
|
23
|
-
'&.MuiDataGrid-root .MuiDataGrid-columnHeader:focus, &.MuiDataGrid-root .MuiDataGrid-cell:focus': {
|
|
24
|
-
outline: 'none !important'
|
|
25
|
-
},
|
|
26
|
-
'&.MuiDataGrid-root .MuiDataGrid-columnHeader:focus-within, &.MuiDataGrid-root .MuiDataGrid-cell:focus-within': {
|
|
27
|
-
outline: 'none !important'
|
|
28
|
-
},
|
|
29
|
-
'.MuiDataGrid-row.odd': {
|
|
30
|
-
backgroundColor: 'rgba(0, 0, 0, 0.01)'
|
|
31
|
-
},
|
|
32
|
-
'.MuiDataGrid-row.odd:hover': {
|
|
33
|
-
backgroundColor: 'rgba(0, 0, 0, 0.04)'
|
|
34
|
-
},
|
|
35
|
-
'.MuiDataGrid-cell:hover': {
|
|
36
|
-
backgroundColor: 'rgba(0, 0, 0, 0.01)'
|
|
37
|
-
},
|
|
38
|
-
'.MuiDataGrid-row .MuiDataGrid-cell.actions > *, .MuiDataGrid-row .MuiDataGrid-cell .actions > *': {
|
|
39
|
-
visibility: 'hidden'
|
|
40
|
-
},
|
|
41
|
-
'.MuiDataGrid-row:hover .MuiDataGrid-cell.actions > *, .MuiDataGrid-row:hover .MuiDataGrid-cell .actions > *': {
|
|
42
|
-
visibility: 'visible'
|
|
43
|
-
},
|
|
44
|
-
'.MuiDataGrid-cell .aggr strong': {
|
|
45
|
-
fontSize: '15px'
|
|
46
|
-
},
|
|
47
|
-
'.MuiDataGrid-cell .aggr small': {
|
|
48
|
-
fontSize: '12px'
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
export default function DataGrid({
|
|
52
|
-
columns,
|
|
53
|
-
rows,
|
|
54
|
-
customToolbar = /*#__PURE__*/_jsx(_Fragment, {}),
|
|
55
|
-
customGridCellMap,
|
|
56
|
-
slots = {},
|
|
57
|
-
slotProps,
|
|
58
|
-
initialState,
|
|
59
|
-
hideToolbar = false,
|
|
60
|
-
localText,
|
|
61
|
-
sx,
|
|
62
|
-
...props
|
|
63
|
-
}) {
|
|
64
|
-
const getTogglableColumns = columns => columns.filter(column => column.field !== 'id').map(column => column.field);
|
|
65
|
-
const [columnVisibilityModel, setColumnVisibilityModel] = useState({
|
|
66
|
-
id: false
|
|
67
|
-
});
|
|
68
|
-
const CustomToolbar = function () {
|
|
69
|
-
return /*#__PURE__*/_jsxs(Stack, {
|
|
70
|
-
direction: "row",
|
|
71
|
-
justifyContent: "space-between",
|
|
72
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
73
|
-
children: customToolbar
|
|
74
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
75
|
-
children: /*#__PURE__*/_jsx(GridToolbarQuickFilter, {})
|
|
76
|
-
})]
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
const CustomGridCell = function (params) {
|
|
80
|
-
if (props && props.checkboxSelection && params.column.field === GRID_CHECKBOX_SELECTION_COL_DEF.field) return /*#__PURE__*/_jsx(GridCell, {
|
|
81
|
-
...params
|
|
82
|
-
});
|
|
83
|
-
let children;
|
|
84
|
-
const func = customGridCellMap[params.column.field];
|
|
85
|
-
if (func) children = func(params);
|
|
86
|
-
if (!children) children = /*#__PURE__*/_jsx(Box, {
|
|
87
|
-
sx: {
|
|
88
|
-
mt: 2,
|
|
89
|
-
mb: 2
|
|
90
|
-
},
|
|
91
|
-
children: params.formattedValue
|
|
92
|
-
});
|
|
93
|
-
return /*#__PURE__*/_jsx(GridCell, {
|
|
94
|
-
...params,
|
|
95
|
-
children: children
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
return /*#__PURE__*/_jsx(MuiDataGridPro, {
|
|
99
|
-
columns: columns,
|
|
100
|
-
rows: rows,
|
|
101
|
-
autoHeight: true,
|
|
102
|
-
pagination: true,
|
|
103
|
-
disableColumnMenu: true,
|
|
104
|
-
disableColumnReorder: true,
|
|
105
|
-
disableRowSelectionOnClick: true,
|
|
106
|
-
getRowClassName: params => params.indexRelativeToCurrentPage % 2 === 0 ? '' : 'odd',
|
|
107
|
-
columnVisibilityModel: columnVisibilityModel,
|
|
108
|
-
onColumnVisibilityModelChange: model => setColumnVisibilityModel(model),
|
|
109
|
-
getRowHeight: () => 'auto',
|
|
110
|
-
localeText: {
|
|
111
|
-
...koKR.components.MuiDataGrid.defaultProps.localeText,
|
|
112
|
-
noRowsLabel: '항목이 없습니다.',
|
|
113
|
-
...localText
|
|
114
|
-
},
|
|
115
|
-
slots: {
|
|
116
|
-
toolbar: hideToolbar ? null : CustomToolbar,
|
|
117
|
-
cell: customGridCellMap ? CustomGridCell : undefined,
|
|
118
|
-
...slots
|
|
119
|
-
},
|
|
120
|
-
slotProps: {
|
|
121
|
-
columnsPanel: {
|
|
122
|
-
getTogglableColumns
|
|
123
|
-
},
|
|
124
|
-
toolbar: {
|
|
125
|
-
showQuickFilter: true
|
|
126
|
-
},
|
|
127
|
-
...slotProps
|
|
128
|
-
},
|
|
129
|
-
initialState: {
|
|
130
|
-
filter: {
|
|
131
|
-
filterModel: {
|
|
132
|
-
items: [],
|
|
133
|
-
quickFilterExcludeHiddenColumns: true
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
pagination: {
|
|
137
|
-
paginationModel: {
|
|
138
|
-
pageSize: 25,
|
|
139
|
-
page: 0
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
...initialState
|
|
143
|
-
},
|
|
144
|
-
sx: {
|
|
145
|
-
...sx,
|
|
146
|
-
...styles
|
|
147
|
-
},
|
|
148
|
-
...props
|
|
149
|
-
});
|
|
150
|
-
}
|
package/dist/Dialog.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Slide, Zoom } from "@mui/material";
|
|
2
|
-
import MuiDialog from "@mui/material/Dialog";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const ZoomTransition = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
6
|
-
return /*#__PURE__*/_jsx(Zoom, {
|
|
7
|
-
ref: ref,
|
|
8
|
-
...props
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
const SlideTransition = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
12
|
-
return /*#__PURE__*/_jsx(Slide, {
|
|
13
|
-
direction: "down",
|
|
14
|
-
ref: ref,
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
export default function Dialog({
|
|
19
|
-
center = true,
|
|
20
|
-
contentFontSize = 16,
|
|
21
|
-
children,
|
|
22
|
-
sx,
|
|
23
|
-
...props
|
|
24
|
-
}) {
|
|
25
|
-
const styles = {
|
|
26
|
-
'& .MuiDialog-container': {
|
|
27
|
-
alignItems: center ? 'center' : 'flex-start'
|
|
28
|
-
},
|
|
29
|
-
'.MuiTypography-root.MuiDialogContentText-root': {
|
|
30
|
-
fontSize: contentFontSize
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
return /*#__PURE__*/_jsx(MuiDialog, {
|
|
34
|
-
TransitionComponent: center ? ZoomTransition : SlideTransition,
|
|
35
|
-
sx: {
|
|
36
|
-
...styles,
|
|
37
|
-
...sx
|
|
38
|
-
},
|
|
39
|
-
...props,
|
|
40
|
-
children: children
|
|
41
|
-
});
|
|
42
|
-
}
|
package/dist/DropdownButton.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Divider, Menu, MenuItem } from "@mui/material";
|
|
3
|
-
import Button from "./Button";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
export default function DropdownButton({
|
|
8
|
-
label,
|
|
9
|
-
icon,
|
|
10
|
-
iconPlacement = 'start',
|
|
11
|
-
iconSize = '20px',
|
|
12
|
-
iconProps = {},
|
|
13
|
-
options = [],
|
|
14
|
-
onClick,
|
|
15
|
-
onSelect,
|
|
16
|
-
menuProps = {},
|
|
17
|
-
...props
|
|
18
|
-
}) {
|
|
19
|
-
const [anchor, setAnchor] = React.useState(null);
|
|
20
|
-
const handleClick = event => {
|
|
21
|
-
setAnchor(event.currentTarget);
|
|
22
|
-
if (onClick) onClick(event);
|
|
23
|
-
};
|
|
24
|
-
const handleSelect = id => {
|
|
25
|
-
setAnchor(null);
|
|
26
|
-
if (onSelect) onSelect(id);
|
|
27
|
-
};
|
|
28
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
29
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
30
|
-
label: label,
|
|
31
|
-
icon: icon,
|
|
32
|
-
iconPlacement: iconPlacement,
|
|
33
|
-
iconSize: iconSize,
|
|
34
|
-
iconProps: iconProps,
|
|
35
|
-
onClick: handleClick,
|
|
36
|
-
...props
|
|
37
|
-
}), options.length > 0 && /*#__PURE__*/_jsx(Menu, {
|
|
38
|
-
anchorEl: anchor,
|
|
39
|
-
open: Boolean(anchor),
|
|
40
|
-
onClose: _ => setAnchor(null),
|
|
41
|
-
sx: {
|
|
42
|
-
...styles,
|
|
43
|
-
...menuProps.sx
|
|
44
|
-
},
|
|
45
|
-
...menuProps,
|
|
46
|
-
children: options.map(option => {
|
|
47
|
-
return option.type === 'divider' ? /*#__PURE__*/_jsx(Divider, {}) : /*#__PURE__*/_jsx(MenuItem, {
|
|
48
|
-
onClick: _ => handleSelect(option.id),
|
|
49
|
-
children: option.label
|
|
50
|
-
}, option.id);
|
|
51
|
-
})
|
|
52
|
-
})]
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
const styles = {
|
|
56
|
-
'.MuiButtonBase-root.MuiMenuItem-root': {
|
|
57
|
-
fontSize: 14
|
|
58
|
-
}
|
|
59
|
-
};
|