@nethru/ui 1.0.81 → 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/base/colors/blue.js +15 -0
  19. package/base/colors/blueGrey.js +6 -0
  20. package/base/colors/green.js +13 -0
  21. package/base/colors/grey.js +18 -0
  22. package/base/colors/index.js +9 -0
  23. package/base/colors/lime.js +13 -0
  24. package/base/colors/orange.js +13 -0
  25. package/base/colors/purple.js +13 -0
  26. package/base/colors/red.js +13 -0
  27. package/base/colors/yellow.js +13 -0
  28. package/base/datagrid/DataGrid.js +57 -0
  29. package/base/datagrid/Footer.js +51 -0
  30. package/base/datagrid/Pagination.js +24 -0
  31. package/base/dialog/AlertDialog.js +21 -0
  32. package/base/dialog/ConfirmDialog.js +29 -0
  33. package/base/dialog/Dialog.js +56 -0
  34. package/base/dialog/SimpleDialog.js +33 -0
  35. package/{dist → base}/error/Error.js +1 -2
  36. package/base/frame/AppBar.js +54 -0
  37. package/base/frame/Brand.js +36 -0
  38. package/base/frame/Frame.js +49 -0
  39. package/{dist → base/frame}/sidebar/MenuToggler.js +14 -3
  40. package/{dist → base/frame}/sidebar/PrimaryMenu.js +15 -20
  41. package/base/frame/sidebar/SecondaryMenu.js +41 -0
  42. package/{dist → base/frame}/sidebar/Sidebar.js +21 -10
  43. package/base/frame/sidebar/SidebarContext.js +74 -0
  44. package/base/frame/sidebar/css/primary.module.css +69 -0
  45. package/base/frame/sidebar/css/sidebar.module.css +63 -0
  46. package/base/index.js +33 -0
  47. package/{dist → base}/samples/menu.sample.json +2 -2
  48. package/base/styles/borderRadius.js +7 -0
  49. package/base/styles/createTheme.js +90 -0
  50. package/base/styles/globalStyles.js +47 -0
  51. package/base/styles/mui/alert.js +40 -0
  52. package/base/styles/mui/appBar.js +17 -0
  53. package/base/styles/mui/autocomplete.js +46 -0
  54. package/base/styles/mui/avatar.js +14 -0
  55. package/base/styles/mui/button.js +276 -0
  56. package/base/styles/mui/buttonBase.js +10 -0
  57. package/base/styles/mui/checkbox.js +37 -0
  58. package/base/styles/mui/chip.js +83 -0
  59. package/base/styles/mui/cssBaseline.js +12 -0
  60. package/base/styles/mui/dataGrid.js +101 -0
  61. package/base/styles/mui/dialog.js +13 -0
  62. package/base/styles/mui/dialogActions.js +8 -0
  63. package/base/styles/mui/dialogContent.js +10 -0
  64. package/base/styles/mui/dialogTitle.js +11 -0
  65. package/base/styles/mui/formControl.js +8 -0
  66. package/base/styles/mui/formControlLabel.js +9 -0
  67. package/base/styles/mui/formHelperText.js +10 -0
  68. package/base/styles/mui/grid.js +15 -0
  69. package/base/styles/mui/icon.js +12 -0
  70. package/base/styles/mui/iconButton.js +79 -0
  71. package/base/styles/mui/inputLabel.js +13 -0
  72. package/base/styles/mui/list.js +11 -0
  73. package/base/styles/mui/menuItem.js +83 -0
  74. package/base/styles/mui/outlinedInput.js +53 -0
  75. package/base/styles/mui/paginationItem.js +25 -0
  76. package/base/styles/mui/paper.js +8 -0
  77. package/base/styles/mui/popover.js +11 -0
  78. package/base/styles/mui/select.js +11 -0
  79. package/base/styles/mui/slider.js +15 -0
  80. package/base/styles/mui/snackbar.js +24 -0
  81. package/base/styles/mui/switch.js +33 -0
  82. package/base/styles/mui/tab.js +23 -0
  83. package/base/styles/mui/tablePagination.js +8 -0
  84. package/base/styles/mui/tabs.js +20 -0
  85. package/base/styles/mui/textField.js +11 -0
  86. package/base/styles/mui/toggleButton.js +96 -0
  87. package/base/styles/mui/tooltip.js +22 -0
  88. package/base/styles/palette.js +40 -0
  89. package/base/styles/shadow.js +8 -0
  90. package/base/styles/typography.js +131 -0
  91. package/package.json +14 -10
  92. package/dist/Accordion.js +0 -45
  93. package/dist/AccordionDetails.js +0 -19
  94. package/dist/AccordionSummary.js +0 -35
  95. package/dist/AlertDialog.js +0 -55
  96. package/dist/AppBar.js +0 -68
  97. package/dist/AppendableFormList.js +0 -56
  98. package/dist/AvatarDropdown.js +0 -80
  99. package/dist/Button.js +0 -61
  100. package/dist/Checkbox.js +0 -27
  101. package/dist/CircularProgress.js +0 -33
  102. package/dist/ColumnedSection.js +0 -64
  103. package/dist/ConfirmDialog.js +0 -65
  104. package/dist/DataGrid.js +0 -150
  105. package/dist/Dialog.js +0 -42
  106. package/dist/DropdownButton.js +0 -59
  107. package/dist/FormLabel.js +0 -23
  108. package/dist/Frame.js +0 -47
  109. package/dist/GroupSelect.js +0 -67
  110. package/dist/ListItem.js +0 -21
  111. package/dist/ListItemDivider.js +0 -15
  112. package/dist/ListItemGrid.js +0 -12
  113. package/dist/ListItemText.js +0 -44
  114. package/dist/MainHeader.js +0 -59
  115. package/dist/PropertyTable.js +0 -141
  116. package/dist/ReferenceChipList.js +0 -59
  117. package/dist/SearchTextField.js +0 -24
  118. package/dist/SearchableSelect.js +0 -41
  119. package/dist/Section.js +0 -22
  120. package/dist/Select.js +0 -48
  121. package/dist/ShadowedSection.js +0 -36
  122. package/dist/Snackbar.js +0 -51
  123. package/dist/StatusChip.js +0 -34
  124. package/dist/Switch.js +0 -37
  125. package/dist/TabbedSection.js +0 -37
  126. package/dist/Tabs.js +0 -38
  127. package/dist/TextField.js +0 -25
  128. package/dist/index.js +0 -42
  129. package/dist/samples/global.sample.css +0 -59
  130. package/dist/sidebar/MenuTree.js +0 -95
  131. package/dist/sidebar/MenuTreeGroup.js +0 -65
  132. package/dist/sidebar/SecondaryMenu.js +0 -36
  133. package/dist/sidebar/SidebarContext.js +0 -122
  134. package/dist/sidebar/css/primary.module.css +0 -80
  135. package/dist/sidebar/css/sidebar.module.css +0 -50
  136. package/dist/variables.js +0 -6
  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
@@ -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
- }
@@ -1,34 +0,0 @@
1
- import { Chip } from "@mui/material";
2
- import CheckCircleIcon from "@mui/icons-material/CheckCircle";
3
- import ErrorIcon from "@mui/icons-material/Error";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- export default function StatusChip({
6
- id,
7
- label,
8
- status,
9
- onOperate,
10
- sx,
11
- ...props
12
- }) {
13
- const styles = {
14
- '&': {
15
- bgcolor: status === 'normal' ? '#4caf50' : '#fff'
16
- },
17
- '.MuiSvgIcon-root.MuiChip-deleteIcon': {
18
- cursor: onOperate ? 'pointer' : 'default'
19
- }
20
- };
21
- return /*#__PURE__*/_jsx(Chip, {
22
- id: id,
23
- label: label,
24
- variant: status === 'normal' ? 'filled' : 'outlined',
25
- color: status === 'normal' ? 'success' : 'default',
26
- deleteIcon: status === 'normal' ? /*#__PURE__*/_jsx(CheckCircleIcon, {}) : /*#__PURE__*/_jsx(ErrorIcon, {}),
27
- onDelete: _ => onOperate && onOperate(id, status),
28
- sx: {
29
- ...sx,
30
- ...styles
31
- },
32
- ...props
33
- });
34
- }
package/dist/Switch.js DELETED
@@ -1,37 +0,0 @@
1
- import { FormControlLabel, Stack } from "@mui/material";
2
- import MuiSwitch from "@mui/material/Switch";
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 Switch({
7
- label,
8
- labelPlacement = 'top',
9
- ...props
10
- }) {
11
- return /*#__PURE__*/_jsxs(_Fragment, {
12
- children: [label && /*#__PURE__*/_jsx(Stack, {
13
- direction: "row",
14
- alignItems: "center",
15
- sx: {
16
- '.MuiFormControlLabel-label': {
17
- color: '#666',
18
- fontSize: 11
19
- },
20
- '.MuiFormControlLabel-root': {
21
- ml: labelPlacement === 'start' ? '0px' : '-10px',
22
- mr: 0
23
- }
24
- },
25
- children: /*#__PURE__*/_jsx(FormControlLabel, {
26
- control: /*#__PURE__*/_jsx(MuiSwitch, {
27
- color: "primary",
28
- ...props
29
- }),
30
- label: label,
31
- labelPlacement: labelPlacement
32
- })
33
- }), !label && /*#__PURE__*/_jsx(MuiSwitch, {
34
- ...props
35
- })]
36
- });
37
- }
@@ -1,37 +0,0 @@
1
- import { Stack, Tab } from "@mui/material";
2
- import Tabs from "./Tabs";
3
- import Section from "./Section";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
- export default function TabbedSection({
7
- orientation,
8
- labels = [],
9
- tabProps = {},
10
- sectionProps = {},
11
- children,
12
- ...props
13
- }) {
14
- const styles = {
15
- mt: 0,
16
- width: orientation === 'vertical' ? '100%' : 'unset'
17
- };
18
- return /*#__PURE__*/_jsxs(Stack, {
19
- direction: orientation === 'vertical' ? 'row' : 'column',
20
- children: [/*#__PURE__*/_jsx(Tabs, {
21
- orientation: orientation,
22
- ...props,
23
- children: labels.map((label, index) => /*#__PURE__*/_jsx(Tab, {
24
- label: label,
25
- wrapped: orientation === 'vertical',
26
- ...tabProps
27
- }, index))
28
- }), /*#__PURE__*/_jsx(Section, {
29
- sx: {
30
- ...styles,
31
- ...sectionProps.sx
32
- },
33
- ...sectionProps,
34
- children: children
35
- })]
36
- });
37
- }
package/dist/Tabs.js DELETED
@@ -1,38 +0,0 @@
1
- import React from "react";
2
- import MuiTabs from "@mui/material/Tabs";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { Fragment as _Fragment } from "react/jsx-runtime";
5
- export default function Tabs({
6
- orientation,
7
- sx,
8
- ...props
9
- }) {
10
- const vertical = orientation === 'vertical';
11
- const styles = {
12
- ml: vertical ? 0 : 0.5,
13
- mr: vertical ? 0 : 0.5,
14
- mt: vertical ? 0.5 : 0,
15
- mb: vertical ? 0.5 : 0,
16
- '& .MuiButtonBase-root.MuiTab-root': {
17
- fontSize: '15px'
18
- },
19
- '&.MuiTabs-root.MuiTabs-vertical': {
20
- minWidth: '40px',
21
- maxWidth: '40px'
22
- },
23
- '&.MuiTabs-root.MuiTabs-vertical .MuiButtonBase-root.MuiTab-root': {
24
- minWidth: '40px',
25
- maxWidth: '40px'
26
- }
27
- };
28
- return /*#__PURE__*/_jsx(_Fragment, {
29
- children: /*#__PURE__*/_jsx(MuiTabs, {
30
- orientation: orientation,
31
- sx: {
32
- ...styles,
33
- ...sx
34
- },
35
- ...props
36
- })
37
- });
38
- }
package/dist/TextField.js DELETED
@@ -1,25 +0,0 @@
1
- import MuiTextField from "@mui/material/TextField";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Fragment as _Fragment } from "react/jsx-runtime";
4
- export default function TextField({
5
- width,
6
- fontSize,
7
- textAlign,
8
- inputProps,
9
- ...props
10
- }) {
11
- const styles = {
12
- fontSize: fontSize ? fontSize : 16,
13
- textAlign: textAlign ? textAlign : 'left',
14
- width
15
- };
16
- return /*#__PURE__*/_jsx(_Fragment, {
17
- children: /*#__PURE__*/_jsx(MuiTextField, {
18
- inputProps: {
19
- ...inputProps,
20
- style: styles
21
- },
22
- ...props
23
- })
24
- });
25
- }
package/dist/index.js DELETED
@@ -1,42 +0,0 @@
1
- export { default as Accordion } from "./Accordion";
2
- export { default as AccordionDetails } from "./AccordionDetails";
3
- export { default as AccordionSummary } from "./AccordionSummary";
4
- export { default as AlertDialog } from "./AlertDialog";
5
- export { default as AppBar } from "./AppBar";
6
- export { default as AppendableFormList } from "./AppendableFormList";
7
- export { default as AvatarDropdown } from "./AvatarDropdown";
8
- export { default as Button } from "./Button";
9
- export { default as Checkbox } from "./Checkbox";
10
- export { default as CircularProgress } from "./CircularProgress";
11
- export { default as ColumnedSection } from "./ColumnedSection";
12
- export { default as ConfirmDialog } from "./ConfirmDialog";
13
- export { default as DataGrid } from "./DataGrid";
14
- export { default as Dialog } from "./Dialog";
15
- export { default as DropdownButton } from "./DropdownButton";
16
- export { default as Editor } from "./editor/Editor";
17
- export { default as FormLabel } from "./FormLabel";
18
- export { default as Frame } from "./Frame";
19
- export { default as GroupSelect } from "./GroupSelect";
20
- export { default as ListItem } from "./ListItem";
21
- export { default as ListItemDivider } from "./ListItemDivider";
22
- export { default as ListItemGrid } from "./ListItemGrid";
23
- export { default as ListItemText } from "./ListItemText";
24
- export { default as MainHeader } from "./MainHeader";
25
- export { default as PropertyTable } from "./PropertyTable";
26
- export { default as ReferenceChipList } from "./ReferenceChipList";
27
- export { default as SearchableSelect } from "./SearchableSelect";
28
- export { default as SearchTextField } from "./SearchTextField";
29
- export { default as Section } from "./Section";
30
- export { default as Select } from "./Select";
31
- export { default as ShadowedSection } from "./ShadowedSection";
32
- export { default as Slider } from "./Slider";
33
- export { default as Snackbar } from "./Snackbar";
34
- export { default as StatusChip } from "./StatusChip";
35
- export { default as Switch } from "./Switch";
36
- export { default as TabbedSection } from "./TabbedSection";
37
- export { default as Tabs } from "./Tabs";
38
- export { default as TextField } from "./TextField";
39
- export { default as Sidebar } from "./sidebar/Sidebar";
40
- export * from './sidebar/SidebarContext';
41
- export { default as Error } from "./error/Error";
42
- export { default as HttpError } from "./error/HttpError";