@nethru/ui 2.0.16 → 2.1.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.
@@ -1,4 +1,4 @@
1
- import React, { forwardRef } from "react";
1
+ import React, { forwardRef, useMemo } from "react";
2
2
  import { IconButton, Stack, Tooltip, Typography } from "@mui/material";
3
3
  import AddIcon from "@mui/icons-material/Add";
4
4
  import RemoveIcon from '@mui/icons-material/Remove';
@@ -18,6 +18,7 @@ const AddableFormList = /*#__PURE__*/forwardRef(({
18
18
  allowEmpty = false,
19
19
  ...props
20
20
  }, ref) => {
21
+ const removable = useMemo(() => allowEmpty || forms.length > 1, [allowEmpty, forms.length]);
21
22
  return /*#__PURE__*/_jsx(Stack, {
22
23
  ref: ref,
23
24
  gap: gap,
@@ -37,7 +38,8 @@ const AddableFormList = /*#__PURE__*/forwardRef(({
37
38
  children: /*#__PURE__*/_jsx(IconButton, {
38
39
  variant: "menu",
39
40
  onClick: _ => onRemove(index),
40
- disabled: !allowEmpty && forms.length === 1,
41
+ disabled: !removable,
42
+ component: !removable ? 'span' : undefined,
41
43
  children: /*#__PURE__*/_jsx(RemoveIcon, {
42
44
  sx: {
43
45
  fontSize: 17
@@ -31,7 +31,7 @@ const DataGrid = /*#__PURE__*/forwardRef(({
31
31
  localeText: {
32
32
  ...koKR.components.MuiDataGrid.defaultProps.localeText,
33
33
  noRowsLabel: '항목이 없습니다.',
34
- ...props.localText
34
+ ...props.localeText
35
35
  },
36
36
  slots: {
37
37
  toolbar: hideToolbar ? null : Toolbar,
@@ -66,6 +66,9 @@ export default function Editor({
66
66
  '.cm-content .cm-selectionMatch': {
67
67
  backgroundColor: blue[100]
68
68
  },
69
+ '.cm-selectionLayer': {
70
+ zIndex: 'unset !important'
71
+ },
69
72
  '.cm-selectionLayer .cm-selectionBackground': {
70
73
  backgroundColor: `${blue[200]} !important`
71
74
  },
@@ -10,6 +10,7 @@
10
10
  }
11
11
  .container.closed {
12
12
  width: calc(var(--primary-menu-width) + var(--secondary-menu-collapsed-width));
13
+ min-width: calc(var(--primary-menu-width) + var(--secondary-menu-collapsed-width));
13
14
  }
14
15
 
15
16
 
@@ -54,13 +54,13 @@ export const styles = {
54
54
  '.MuiDataGrid-cell .MuiDataGrid-actions': {
55
55
  display: 'none'
56
56
  },
57
- '&.Mui-hovered': {
57
+ '&:hover': {
58
58
  backgroundColor: grey[5],
59
59
  '.MuiDataGrid-cell .MuiDataGrid-actions': {
60
60
  display: 'block'
61
61
  }
62
62
  },
63
- '&.Mui-selected, &.Mui-selected.Mui-hovered': {
63
+ '&.Mui-selected, &.Mui-selected:hover': {
64
64
  backgroundColor: blue[5]
65
65
  }
66
66
  },
@@ -104,7 +104,8 @@ export const styles = {
104
104
  }
105
105
  },
106
106
  overlayWrapperInner: {
107
- ...typography.bodySmRegular
107
+ ...typography.bodySmRegular,
108
+ height: '60px !important'
108
109
  }
109
110
  }
110
111
  };
@@ -44,8 +44,7 @@ export const styles = {
44
44
  paddingLeft: 10,
45
45
  paddingRight: 10,
46
46
  '&.Mui-disabled': {
47
- color: grey[500],
48
- '-webkit-text-fill-color': grey[500]
47
+ color: grey[500]
49
48
  }
50
49
  },
51
50
  multiline: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "2.0.16",
3
+ "version": "2.1.0",
4
4
  "main": "base/index.js",
5
5
  "files": [
6
6
  "/base"