@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.
Files changed (140) hide show
  1. package/base/AddableFormList.js +56 -0
  2. package/base/Alert.js +27 -0
  3. package/base/Checkbox.js +20 -0
  4. package/base/CircularProgressButton.js +36 -0
  5. package/base/ColumnedSection.js +44 -0
  6. package/base/DropdownButton.js +74 -0
  7. package/base/MainHeader.js +56 -0
  8. package/base/MenuItem.js +92 -0
  9. package/base/PropertyTable.js +69 -0
  10. package/base/SearchTextField.js +44 -0
  11. package/base/SearchableSelect.js +64 -0
  12. package/base/Select.js +33 -0
  13. package/{dist → base}/Slider.js +12 -13
  14. package/base/Snackbar.js +33 -0
  15. package/base/Switch.js +20 -0
  16. package/base/assets/icons.js +390 -0
  17. package/base/assets/images.js +1 -0
  18. package/{dist → base}/colors/blue.js +3 -1
  19. package/{dist → base}/colors/blueGrey.js +1 -1
  20. package/base/datagrid/DataGrid.js +57 -0
  21. package/base/datagrid/Footer.js +51 -0
  22. package/base/datagrid/Pagination.js +24 -0
  23. package/base/dialog/AlertDialog.js +21 -0
  24. package/base/dialog/ConfirmDialog.js +29 -0
  25. package/base/dialog/Dialog.js +56 -0
  26. package/base/dialog/SimpleDialog.js +33 -0
  27. package/{dist → base}/error/Error.js +1 -2
  28. package/base/frame/AppBar.js +54 -0
  29. package/base/frame/Brand.js +36 -0
  30. package/base/frame/Frame.js +49 -0
  31. package/{dist → base/frame}/sidebar/MenuToggler.js +14 -3
  32. package/{dist → base/frame}/sidebar/PrimaryMenu.js +15 -20
  33. package/base/frame/sidebar/SecondaryMenu.js +41 -0
  34. package/{dist → base/frame}/sidebar/Sidebar.js +21 -10
  35. package/base/frame/sidebar/SidebarContext.js +74 -0
  36. package/base/frame/sidebar/css/primary.module.css +69 -0
  37. package/base/frame/sidebar/css/sidebar.module.css +63 -0
  38. package/base/index.js +33 -0
  39. package/{dist → base}/samples/menu.sample.json +2 -2
  40. package/base/styles/borderRadius.js +7 -0
  41. package/base/styles/createTheme.js +90 -0
  42. package/base/styles/globalStyles.js +47 -0
  43. package/base/styles/mui/alert.js +40 -0
  44. package/base/styles/mui/appBar.js +17 -0
  45. package/base/styles/mui/autocomplete.js +46 -0
  46. package/base/styles/mui/avatar.js +14 -0
  47. package/base/styles/mui/button.js +276 -0
  48. package/base/styles/mui/buttonBase.js +10 -0
  49. package/base/styles/mui/checkbox.js +37 -0
  50. package/base/styles/mui/chip.js +83 -0
  51. package/base/styles/mui/cssBaseline.js +12 -0
  52. package/base/styles/mui/dataGrid.js +101 -0
  53. package/base/styles/mui/dialog.js +13 -0
  54. package/base/styles/mui/dialogActions.js +8 -0
  55. package/base/styles/mui/dialogContent.js +10 -0
  56. package/base/styles/mui/dialogTitle.js +11 -0
  57. package/base/styles/mui/formControl.js +8 -0
  58. package/base/styles/mui/formControlLabel.js +9 -0
  59. package/base/styles/mui/formHelperText.js +10 -0
  60. package/base/styles/mui/grid.js +15 -0
  61. package/base/styles/mui/icon.js +12 -0
  62. package/base/styles/mui/iconButton.js +79 -0
  63. package/base/styles/mui/inputLabel.js +13 -0
  64. package/base/styles/mui/list.js +11 -0
  65. package/base/styles/mui/menuItem.js +83 -0
  66. package/base/styles/mui/outlinedInput.js +53 -0
  67. package/base/styles/mui/paginationItem.js +25 -0
  68. package/base/styles/mui/paper.js +8 -0
  69. package/base/styles/mui/popover.js +11 -0
  70. package/base/styles/mui/select.js +11 -0
  71. package/base/styles/mui/slider.js +15 -0
  72. package/base/styles/mui/snackbar.js +24 -0
  73. package/base/styles/mui/switch.js +33 -0
  74. package/base/styles/mui/tab.js +23 -0
  75. package/base/styles/mui/tablePagination.js +8 -0
  76. package/base/styles/mui/tabs.js +20 -0
  77. package/base/styles/mui/textField.js +11 -0
  78. package/base/styles/mui/toggleButton.js +96 -0
  79. package/base/styles/mui/tooltip.js +22 -0
  80. package/base/styles/palette.js +40 -0
  81. package/base/styles/shadow.js +8 -0
  82. package/base/styles/typography.js +131 -0
  83. package/package.json +6 -5
  84. package/dist/Accordion.js +0 -45
  85. package/dist/AccordionDetails.js +0 -19
  86. package/dist/AccordionSummary.js +0 -35
  87. package/dist/AlertDialog.js +0 -55
  88. package/dist/AppBar.js +0 -68
  89. package/dist/AppendableFormList.js +0 -56
  90. package/dist/AvatarDropdown.js +0 -80
  91. package/dist/Button.js +0 -61
  92. package/dist/Checkbox.js +0 -27
  93. package/dist/CircularProgress.js +0 -33
  94. package/dist/ColumnedSection.js +0 -64
  95. package/dist/ConfirmDialog.js +0 -65
  96. package/dist/DataGrid.js +0 -150
  97. package/dist/Dialog.js +0 -42
  98. package/dist/DropdownButton.js +0 -59
  99. package/dist/FormLabel.js +0 -23
  100. package/dist/Frame.js +0 -47
  101. package/dist/GroupSelect.js +0 -67
  102. package/dist/ListItem.js +0 -21
  103. package/dist/ListItemDivider.js +0 -15
  104. package/dist/ListItemGrid.js +0 -12
  105. package/dist/ListItemText.js +0 -44
  106. package/dist/MainHeader.js +0 -59
  107. package/dist/PropertyTable.js +0 -141
  108. package/dist/ReferenceChipList.js +0 -59
  109. package/dist/SearchTextField.js +0 -24
  110. package/dist/SearchableSelect.js +0 -41
  111. package/dist/Section.js +0 -22
  112. package/dist/Select.js +0 -48
  113. package/dist/ShadowedSection.js +0 -36
  114. package/dist/Snackbar.js +0 -51
  115. package/dist/StatusChip.js +0 -34
  116. package/dist/Switch.js +0 -37
  117. package/dist/TabbedSection.js +0 -37
  118. package/dist/Tabs.js +0 -38
  119. package/dist/TextField.js +0 -25
  120. package/dist/index.js +0 -44
  121. package/dist/samples/global.sample.css +0 -59
  122. package/dist/sidebar/MenuTree.js +0 -95
  123. package/dist/sidebar/MenuTreeGroup.js +0 -65
  124. package/dist/sidebar/SecondaryMenu.js +0 -36
  125. package/dist/sidebar/SidebarContext.js +0 -122
  126. package/dist/sidebar/css/primary.module.css +0 -80
  127. package/dist/sidebar/css/sidebar.module.css +0 -50
  128. package/dist/variables.js +0 -6
  129. /package/{dist → base}/colors/green.js +0 -0
  130. /package/{dist → base}/colors/grey.js +0 -0
  131. /package/{dist → base}/colors/index.js +0 -0
  132. /package/{dist → base}/colors/lime.js +0 -0
  133. /package/{dist → base}/colors/orange.js +0 -0
  134. /package/{dist → base}/colors/purple.js +0 -0
  135. /package/{dist → base}/colors/red.js +0 -0
  136. /package/{dist → base}/colors/yellow.js +0 -0
  137. /package/{dist → base}/editor/Editor.js +0 -0
  138. /package/{dist → base}/editor/nScript.js +0 -0
  139. /package/{dist → base}/editor/nScriptKeywords.js +0 -0
  140. /package/{dist → base}/error/HttpError.js +0 -0
package/dist/Frame.js DELETED
@@ -1,47 +0,0 @@
1
- import { Box } from '@mui/material';
2
- import { SidebarContextProvider } from './sidebar/SidebarContext';
3
- import { variables } from './variables';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
- import { Fragment as _Fragment } from "react/jsx-runtime";
7
- export default function Frame({
8
- appBar,
9
- sideBar,
10
- children,
11
- footer,
12
- menu,
13
- menuIcons = {},
14
- mainRef,
15
- onScroll
16
- }) {
17
- const containerStyles = {
18
- display: 'flex',
19
- flexGrow: 1,
20
- overflow: 'auto',
21
- marginTop: `${variables.gnbHeight}px`,
22
- backgroundColor: variables.bodyBackgroundColor
23
- };
24
- const contentStyles = {
25
- flexGrow: 1,
26
- overflow: 'auto',
27
- padding: '20px 40px'
28
- };
29
- return /*#__PURE__*/_jsxs(_Fragment, {
30
- children: [appBar, /*#__PURE__*/_jsxs(Box, {
31
- sx: containerStyles,
32
- children: [/*#__PURE__*/_jsx(SidebarContextProvider, {
33
- menu: menu,
34
- icons: menuIcons,
35
- children: sideBar
36
- }), /*#__PURE__*/_jsxs(Box, {
37
- ref: mainRef,
38
- component: "section",
39
- sx: contentStyles,
40
- onScroll: onScroll,
41
- children: [/*#__PURE__*/_jsx("main", {
42
- children: children
43
- }), footer]
44
- })]
45
- })]
46
- });
47
- }
@@ -1,67 +0,0 @@
1
- import { Autocomplete, TextField } from "@mui/material";
2
- import Paper from "@mui/material/Paper";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- export default function GroupSelect({
5
- id,
6
- options,
7
- groupKey,
8
- value,
9
- onSelect,
10
- placeholder,
11
- disableClearable = false,
12
- sx,
13
- ...props
14
- }) {
15
- const styles = {
16
- '.MuiInputLabel-root, .MuiInputBase-input': {
17
- fontSize: '0.875rem'
18
- }
19
- };
20
- const paperStyles = {
21
- '& .MuiAutocomplete-groupLabel': {
22
- fontSize: '0.8rem',
23
- paddingTop: 0,
24
- paddingBottom: 0
25
- },
26
- '& .MuiAutocomplete-option': {
27
- color: '#333',
28
- fontSize: '0.875rem',
29
- paddingTop: '3px',
30
- paddingBottom: '3px'
31
- },
32
- '& .MuiAutocomplete-noOptions': {
33
- fontSize: '0.8rem'
34
- }
35
- };
36
- const handleSelect = (event, value, reason) => {
37
- if (reason !== 'selectOption') return;
38
- if (onSelect) onSelect(id, value);
39
- };
40
- function CustomPaper(props) {
41
- return /*#__PURE__*/_jsx(Paper, {
42
- ...props,
43
- sx: paperStyles
44
- });
45
- }
46
- return /*#__PURE__*/_jsx(Autocomplete, {
47
- id: id,
48
- size: "small",
49
- options: options,
50
- groupBy: option => option[groupKey],
51
- value: value,
52
- onChange: handleSelect,
53
- blurOnSelect: true,
54
- disableClearable: disableClearable,
55
- noOptionsText: "\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
56
- PaperComponent: CustomPaper,
57
- renderInput: params => /*#__PURE__*/_jsx(TextField, {
58
- ...params,
59
- label: placeholder
60
- }),
61
- sx: {
62
- ...sx,
63
- ...styles
64
- },
65
- ...props
66
- });
67
- }
package/dist/ListItem.js DELETED
@@ -1,21 +0,0 @@
1
- import MuiListItem from "@mui/material/ListItem";
2
- import { Grid } from "@mui/material";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- export default function ListItem({
6
- grid,
7
- spacing = 10,
8
- verticalAlign = 'flex-start',
9
- children,
10
- ...props
11
- }) {
12
- return /*#__PURE__*/_jsxs(MuiListItem, {
13
- ...props,
14
- children: [grid && /*#__PURE__*/_jsx(Grid, {
15
- container: true,
16
- columnSpacing: spacing,
17
- alignItems: verticalAlign,
18
- children: children
19
- }), !grid && children]
20
- });
21
- }
@@ -1,15 +0,0 @@
1
- import { Divider } from "@mui/material";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- export default function ListItemDivider({
4
- sx,
5
- ...props
6
- }) {
7
- return /*#__PURE__*/_jsx(Divider, {
8
- sx: {
9
- ...sx,
10
- mt: 3,
11
- mb: 2
12
- },
13
- ...props
14
- });
15
- }
@@ -1,12 +0,0 @@
1
- import { Grid } from "@mui/material";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- export default function ListItemGrid({
4
- children,
5
- ...props
6
- }) {
7
- return /*#__PURE__*/_jsx(Grid, {
8
- item: true,
9
- ...props,
10
- children: children
11
- });
12
- }
@@ -1,44 +0,0 @@
1
- import { useState } from "react";
2
- import { Box, Stack, Tooltip, Typography } from "@mui/material";
3
- import MuiListItemText from "@mui/material/ListItemText";
4
- import HelpIcon from "@mui/icons-material/Help";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- import { jsxs as _jsxs } from "react/jsx-runtime";
7
- export default function ListItemText({
8
- primary,
9
- secondary,
10
- tooltip,
11
- ...props
12
- }) {
13
- const [hover, setHover] = useState(false);
14
- return /*#__PURE__*/_jsx(MuiListItemText, {
15
- primary: typeof primary === 'string' ? /*#__PURE__*/_jsx(Typography, {
16
- fontSize: 17,
17
- fontWeight: 600,
18
- children: primary
19
- }) : /*#__PURE__*/_jsx(Box, {
20
- children: primary
21
- }),
22
- secondary: /*#__PURE__*/_jsxs(Stack, {
23
- direction: "row",
24
- spacing: 0.5,
25
- children: [/*#__PURE__*/_jsx(Box, {
26
- color: "rgba(0, 0, 0, 0.6)",
27
- fontSize: 14,
28
- children: secondary
29
- }), /*#__PURE__*/_jsx(Tooltip, {
30
- title: tooltip,
31
- children: /*#__PURE__*/_jsx(HelpIcon, {
32
- sx: {
33
- fontSize: 18,
34
- visibility: tooltip && hover ? 'visible' : 'hidden'
35
- }
36
- })
37
- })]
38
- }),
39
- disableTypography: true,
40
- onMouseEnter: _ => setHover(true),
41
- onMouseLeave: _ => setHover(false),
42
- ...props
43
- });
44
- }
@@ -1,59 +0,0 @@
1
- import { Button, Stack, Typography } from "@mui/material";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Fragment as _Fragment } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- export default function MainHeader({
6
- title,
7
- editable = false,
8
- edit = false,
9
- onEditClick,
10
- onConfirmClick,
11
- onCancelClick,
12
- editButtonText = '편집',
13
- confirmButtonText = '저장',
14
- cancelButtonText = '취소',
15
- confirmButtonDisabled = false,
16
- rightSlot
17
- }) {
18
- return /*#__PURE__*/_jsx(_Fragment, {
19
- children: /*#__PURE__*/_jsxs(Stack, {
20
- direction: "row",
21
- justifyContent: "space-between",
22
- sx: {
23
- mb: 2.5
24
- },
25
- children: [/*#__PURE__*/_jsx(Typography, {
26
- variant: "h5",
27
- children: title
28
- }), rightSlot && /*#__PURE__*/_jsx(_Fragment, {
29
- children: rightSlot
30
- }), !rightSlot && editable && /*#__PURE__*/_jsxs(Stack, {
31
- direction: "row",
32
- spacing: 1,
33
- justifyContent: "flex-end",
34
- children: [!edit && /*#__PURE__*/_jsx(_Fragment, {
35
- children: /*#__PURE__*/_jsx(Button, {
36
- variant: "contained",
37
- onClick: onEditClick,
38
- children: editButtonText
39
- })
40
- }), edit && /*#__PURE__*/_jsxs(_Fragment, {
41
- children: [/*#__PURE__*/_jsx(Button, {
42
- variant: "contained",
43
- type: "submit",
44
- onClick: onConfirmClick,
45
- disabled: confirmButtonDisabled,
46
- sx: {
47
- width: 120
48
- },
49
- children: confirmButtonText
50
- }), /*#__PURE__*/_jsx(Button, {
51
- variant: "outlined",
52
- onClick: onCancelClick,
53
- children: cancelButtonText
54
- })]
55
- })]
56
- })]
57
- })
58
- });
59
- }
@@ -1,141 +0,0 @@
1
- import { forwardRef, useMemo, useState } from "react";
2
- import { Box, Typography } from "@mui/material";
3
- import MenuItem from "@mui/material/MenuItem";
4
- import Select from "./Select";
5
- import { DataGridPro, useGridApiContext } from "@mui/x-data-grid-pro";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
- const PropertyTable = /*#__PURE__*/forwardRef(({
9
- columns,
10
- rows,
11
- onUpdate,
12
- readOnly,
13
- error = false,
14
- helperText,
15
- sx,
16
- outerSx,
17
- ...props
18
- }, ref) => {
19
- const styles = useMemo(() => {
20
- const result = {
21
- '&.MuiDataGrid-root': {
22
- borderBottom: error ? '2px solid #d32f2f' : 'none'
23
- },
24
- '.MuiDataGrid-columnHeaders': {
25
- backgroundColor: '#f8f9fa'
26
- },
27
- '.MuiDataGrid-columnSeparator': {
28
- // visibility: 'hidden !important'
29
- },
30
- '&.MuiDataGrid-root .MuiDataGrid-columnHeader:focus': {
31
- outline: 'none !important'
32
- },
33
- '.MuiDataGrid-cell.fixed': {
34
- fontWeight: 'bold'
35
- },
36
- '.MuiDataGrid-cell.dimmed': {
37
- color: '#666'
38
- },
39
- '& .Mui-error': {
40
- backgroundColor: 'rgb(126,10,15, 0.1)',
41
- color: '#750f0f'
42
- }
43
- };
44
- if (readOnly) {
45
- result['&.MuiDataGrid-root .MuiDataGrid-cell:focus'] = {
46
- outline: 'none !important'
47
- };
48
- }
49
- return result;
50
- }, [readOnly, error]);
51
- const helperTextStyles = useMemo(() => {
52
- return {
53
- color: error ? '#d32f2f' : '#555',
54
- fontSize: 12,
55
- ml: '14px',
56
- mt: '3px'
57
- };
58
- }, [error]);
59
- const arrangedColumns = useMemo(() => {
60
- return columns.map(column => {
61
- const newColumn = {
62
- ...column
63
- };
64
- if (readOnly) newColumn.editable = false;
65
- if (column.dimmed) newColumn.cellClassName = 'dimmed';else if (column.fixed) {
66
- newColumn.cellClassName = params => {
67
- return !params.row.deletable ? 'fixed' : '';
68
- };
69
- }
70
- if (column.type === 'singleSelect' && column.valueOptions) {
71
- newColumn.renderEditCell = params => /*#__PURE__*/_jsx(SingleSelect, {
72
- options: column.valueOptions,
73
- ...params
74
- });
75
- }
76
- return newColumn;
77
- });
78
- }, [columns, readOnly]);
79
- const [updatedRows, setUpdatedRows] = useState(rows);
80
- const processRowUpdate = row => {
81
- const newRows = updatedRows.filter(r => r.id !== row.id);
82
- newRows.push(row);
83
- setUpdatedRows(newRows);
84
- if (onUpdate) onUpdate(row, newRows);
85
- return row;
86
- };
87
- return /*#__PURE__*/_jsxs(Box, {
88
- ref: ref,
89
- sx: outerSx,
90
- children: [/*#__PURE__*/_jsx(DataGridPro, {
91
- columns: arrangedColumns,
92
- rows: rows,
93
- columnHeaderHeight: 35,
94
- rowHeight: 30,
95
- isCellEditable: params => {
96
- return params.row.deletable || !params.colDef.fixed;
97
- },
98
- processRowUpdate: processRowUpdate,
99
- onProcessRowUpdateError: error => console.log(error),
100
- disableColumnMenu: true,
101
- disableRowSelectionOnClick: readOnly,
102
- hideFooter: true,
103
- sx: {
104
- ...styles,
105
- ...sx
106
- },
107
- ...props
108
- }), helperText && /*#__PURE__*/_jsx(Typography, {
109
- sx: helperTextStyles,
110
- children: helperText
111
- })]
112
- });
113
- });
114
- const SingleSelect = /*#__PURE__*/forwardRef((props, ref) => {
115
- const {
116
- id,
117
- value,
118
- field,
119
- options
120
- } = props;
121
- const apiRef = useGridApiContext();
122
- const handleChange = (event, data) => {
123
- apiRef.current.setEditCellValue({
124
- id,
125
- field,
126
- value: data.props.value
127
- });
128
- };
129
- return /*#__PURE__*/_jsx(Select, {
130
- fontSize: 14,
131
- ref: ref,
132
- value: value,
133
- onChange: handleChange,
134
- fullWidth: true,
135
- children: options.map(option => /*#__PURE__*/_jsx(MenuItem, {
136
- value: option.value,
137
- children: option.label
138
- }, option.value))
139
- });
140
- });
141
- export default PropertyTable;
@@ -1,59 +0,0 @@
1
- import { Chip, Stack, Link } from "@mui/material";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- export default function ReferenceChipList({
4
- references,
5
- onClick,
6
- chipStyles,
7
- chipProps,
8
- sx,
9
- ...props
10
- }) {
11
- const handleClick = (id, event) => {
12
- if (onClick) onClick(id, event);
13
- };
14
- return /*#__PURE__*/_jsx(Stack, {
15
- direction: "row",
16
- gap: 0.5,
17
- sx: {
18
- flexWrap: 'wrap',
19
- ...sx
20
- },
21
- ...props,
22
- children: references.map((reference, index) => {
23
- return reference.href ? /*#__PURE__*/_jsx(Link, {
24
- href: reference.href,
25
- underline: "none",
26
- onClick: event => handleClick(reference.id, event),
27
- children: /*#__PURE__*/_jsx(ReferenceChip, {
28
- name: reference.name,
29
- sx: chipStyles,
30
- ...chipProps
31
- })
32
- }, index) : /*#__PURE__*/_jsx(ReferenceChip, {
33
- name: reference.name,
34
- onClick: event => reference.clickable && handleClick(reference.id, event),
35
- sx: {
36
- cursor: reference.clickable ? 'pointer' : 'default',
37
- ...chipStyles
38
- },
39
- ...chipProps
40
- }, index);
41
- })
42
- });
43
- }
44
- function ReferenceChip({
45
- name,
46
- sx,
47
- ...props
48
- }) {
49
- return /*#__PURE__*/_jsx(Chip, {
50
- variant: "outlined",
51
- label: name,
52
- size: "small",
53
- sx: {
54
- fontSize: '13px',
55
- ...sx
56
- },
57
- ...props
58
- });
59
- }
@@ -1,24 +0,0 @@
1
- import { InputAdornment } from "@mui/material";
2
- import SearchIcon from "@mui/icons-material/Search";
3
- import TextField from "@mui/material/TextField";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- export default function SearchTextField({
6
- InputProps,
7
- ...props
8
- }) {
9
- return /*#__PURE__*/_jsx(TextField, {
10
- variant: "standard",
11
- placeholder: "\uAC80\uC0C9",
12
- size: "small",
13
- InputProps: {
14
- startAdornment: /*#__PURE__*/_jsx(InputAdornment, {
15
- position: "start",
16
- children: /*#__PURE__*/_jsx(SearchIcon, {
17
- fontSize: "small"
18
- })
19
- }),
20
- ...InputProps
21
- },
22
- ...props
23
- });
24
- }
@@ -1,41 +0,0 @@
1
- import { Autocomplete, Box, Divider, Typography } from "@mui/material";
2
- import { TextField } from "@nethru/ui";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { Fragment as _Fragment } from "react/jsx-runtime";
5
- export default function SearchableSelect({
6
- label,
7
- options,
8
- textFieldProps,
9
- ...props
10
- }) {
11
- return /*#__PURE__*/_jsx(Autocomplete, {
12
- autoHighlight: true,
13
- disableClearable: true,
14
- options: options,
15
- renderInput: params => /*#__PURE__*/_jsx(TextField, {
16
- variant: "standard",
17
- label: label,
18
- ...params,
19
- ...textFieldProps
20
- }),
21
- renderOption: (props, option) => /*#__PURE__*/_jsx(_Fragment, {
22
- children: option.type === 'divider' ? /*#__PURE__*/_jsx(Divider, {
23
- ...props,
24
- sx: {
25
- mb: 0.5
26
- }
27
- }) : /*#__PURE__*/_jsx(Box, {
28
- component: "li",
29
- ...props,
30
- children: option.label
31
- })
32
- }),
33
- getOptionDisabled: option => option.type === 'divider',
34
- isOptionEqualToValue: (option, value) => option.id === value.id,
35
- noOptionsText: /*#__PURE__*/_jsx(Typography, {
36
- variant: "subtitle2",
37
- children: "\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9 \uC5C6\uC74C"
38
- }),
39
- ...props
40
- });
41
- }
package/dist/Section.js DELETED
@@ -1,22 +0,0 @@
1
- import { Paper } from "@mui/material";
2
- import { forwardRef } from "react";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- const Section = /*#__PURE__*/forwardRef(({
5
- children,
6
- sx,
7
- ...props
8
- }, ref) => {
9
- return /*#__PURE__*/_jsx(Paper, {
10
- ref: ref,
11
- variant: "outlined",
12
- square: false,
13
- sx: {
14
- marginTop: '20px',
15
- padding: 3,
16
- ...sx
17
- },
18
- ...props,
19
- children: children
20
- });
21
- });
22
- export default Section;
package/dist/Select.js DELETED
@@ -1,48 +0,0 @@
1
- import MuiSelect from "@mui/material/Select";
2
- import { FormControl, InputLabel } from "@mui/material";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- import { Fragment as _Fragment } from "react/jsx-runtime";
6
- export default function Select({
7
- variant,
8
- label,
9
- name,
10
- fontSize,
11
- fullWidth = false,
12
- inputProps,
13
- MenuProps,
14
- children,
15
- ...props
16
- }) {
17
- return /*#__PURE__*/_jsx(_Fragment, {
18
- children: /*#__PURE__*/_jsxs(FormControl, {
19
- variant: variant,
20
- fullWidth: fullWidth,
21
- sx: {
22
- '.MuiSelect-select.MuiInputBase-input': {
23
- fontSize: fontSize ? fontSize : 15
24
- }
25
- },
26
- children: [label && /*#__PURE__*/_jsx(InputLabel, {
27
- children: label
28
- }), /*#__PURE__*/_jsx(MuiSelect, {
29
- inputProps: {
30
- name: name,
31
- ...inputProps
32
- },
33
- MenuProps: {
34
- PaperProps: {
35
- sx: {
36
- '& .MuiMenuItem-root': {
37
- fontSize: fontSize ? fontSize : 15
38
- }
39
- }
40
- },
41
- ...MenuProps
42
- },
43
- ...props,
44
- children: children
45
- })]
46
- })
47
- });
48
- }
@@ -1,36 +0,0 @@
1
- import { Box, Divider, Stack, Typography } from "@mui/material";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { jsxs as _jsxs } from "react/jsx-runtime";
4
- import { Fragment as _Fragment } from "react/jsx-runtime";
5
- export default function ShadowedSection({
6
- label,
7
- children,
8
- marginTop = '20px',
9
- sx,
10
- ...props
11
- }) {
12
- return /*#__PURE__*/_jsxs(_Fragment, {
13
- children: [/*#__PURE__*/_jsx(Box, {
14
- sx: {
15
- mt: marginTop
16
- },
17
- children: /*#__PURE__*/_jsx(Typography, {
18
- variant: "subtitle1",
19
- children: label
20
- })
21
- }), /*#__PURE__*/_jsxs(Stack, {
22
- sx: {
23
- backgroundColor: '#fff',
24
- boxShadow: '0 0.3rem 0.3rem rgba(0, 0, 0, 0.03) !important'
25
- },
26
- children: [/*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(Stack, {
27
- sx: {
28
- padding: 3,
29
- ...sx
30
- },
31
- ...props,
32
- children: children
33
- }), /*#__PURE__*/_jsx(Divider, {})]
34
- })]
35
- });
36
- }
package/dist/Snackbar.js DELETED
@@ -1,51 +0,0 @@
1
- import { Alert, Box, Slide } from "@mui/material";
2
- import MuiSnackbar from "@mui/material/Snackbar";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { Fragment as _Fragment } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
- export default function Snackbar({
7
- content,
8
- severity = 'info',
9
- maxWidth = '25%',
10
- autoHideDuration = 3000,
11
- anchorOrigin = {
12
- vertical: 'top',
13
- horizontal: 'right'
14
- },
15
- children,
16
- sx,
17
- ...props
18
- }) {
19
- const styles = {
20
- maxWidth: maxWidth,
21
- boxShadow: '0 0.3rem 0.3rem rgba(0, 0, 0, 0.03)'
22
- };
23
- return /*#__PURE__*/_jsxs(_Fragment, {
24
- children: [!children && /*#__PURE__*/_jsx(MuiSnackbar, {
25
- autoHideDuration: autoHideDuration,
26
- anchorOrigin: anchorOrigin,
27
- TransitionComponent: transition,
28
- sx: {
29
- ...sx,
30
- ...styles
31
- },
32
- ...props,
33
- children: /*#__PURE__*/_jsx(Alert, {
34
- severity: severity,
35
- children: /*#__PURE__*/_jsx(Box, {
36
- whiteSpace: "pre",
37
- children: content
38
- })
39
- })
40
- }), children && /*#__PURE__*/_jsx(MuiSnackbar, {
41
- ...props,
42
- children: children
43
- })]
44
- });
45
- }
46
- function transition(props) {
47
- return /*#__PURE__*/_jsx(Slide, {
48
- ...props,
49
- direction: "down"
50
- });
51
- }