@nethru/ui 2.1.8 → 2.1.10

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.
@@ -3,11 +3,9 @@ import { Box, FormHelperText } from "@mui/material";
3
3
  import CodeMirror from '@uiw/react-codemirror';
4
4
  import { javascript } from '@codemirror/lang-javascript';
5
5
  import { json } from '@codemirror/lang-json';
6
- import { nScript } from './nScript';
7
- import { Decoration, EditorView } from "@codemirror/view";
6
+ import { Decoration, EditorView, keymap as keyMapper } from "@codemirror/view";
8
7
  import { RegExpCursor, SearchCursor } from '@codemirror/search';
9
8
  import { StateEffect, StateField } from "@codemirror/state";
10
- import { keymap as keyMapper } from '@codemirror/view';
11
9
  import { defaultKeymap } from '@codemirror/commands';
12
10
  import borderRadius from "../styles/borderRadius";
13
11
  import { blue, grey, red, yellow } from "../colors";
@@ -135,7 +133,7 @@ export default function Editor({
135
133
  case 'json':
136
134
  return json();
137
135
  case 'nscript':
138
- return nScript;
136
+ return undefined;
139
137
  default:
140
138
  return javascript({
141
139
  jsx: true
@@ -146,7 +144,8 @@ export default function Editor({
146
144
  return [keyMapper.of(keymap), keyMapper.of(defaultKeymap)];
147
145
  }, [keymap]);
148
146
  const extensionList = useMemo(() => {
149
- const result = [languageExtension, EditorView.lineWrapping, highlight.extension, ...keymapExtension];
147
+ const result = [EditorView.lineWrapping, highlight.extension, ...keymapExtension];
148
+ if (languageExtension) result.push(languageExtension);
150
149
  if (onScroll) {
151
150
  result.push(EditorView.domEventHandlers({
152
151
  scroll(event, view) {
@@ -12,6 +12,7 @@ const Brand = /*#__PURE__*/forwardRef(({
12
12
  cursor: onLogoClick ? 'pointer' : 'default'
13
13
  }), [onLogoClick]);
14
14
  const titleStyles = useMemo(() => ({
15
+ color: 'var(--brand-text-color)',
15
16
  cursor: 'default'
16
17
  }), []);
17
18
  return /*#__PURE__*/_jsxs(Stack, {
@@ -24,7 +24,6 @@
24
24
  flex-direction: column;
25
25
  height: 50px;
26
26
  align-items: center;
27
- color: #656565;
28
27
  cursor: pointer;
29
28
  }
30
29
  .nav-item .icon {
@@ -36,13 +35,13 @@
36
35
  border-radius: 6px;
37
36
  }
38
37
  .nav-item:hover .icon {
39
- background-color: rgba(51,51,51,0.05);
38
+ background-color: var(--primary-menu-item-icon-hover-background-color);
40
39
  }
41
40
  .nav-item.active .icon {
42
- color: #333;
43
- background-color: rgba(51,51,51,0.1);
41
+ background-color: var(--primary-menu-item-icon-active-background-color);
44
42
  }
45
43
  .nav-item.active .text {
44
+ color: var(--primary-menu-item-text-active-color);
46
45
  font-weight: 600;
47
46
  }
48
47
  .container:hover .nav-item.active {
@@ -56,8 +55,16 @@
56
55
  height: 24px;
57
56
  }
58
57
 
58
+ .icon > svg > path {
59
+ fill: var(--primary-menu-item-icon-color);
60
+ }
61
+
62
+ .nav-item.active .icon > svg > path {
63
+ fill: var(--primary-menu-item-icon-active-color);
64
+ }
65
+
59
66
  .text {
60
- color: #333;
67
+ color: var(--primary-menu-item-text-color);
61
68
  font-size: 10px;
62
69
  font-weight: 500;
63
70
  line-height: 1.4;
package/base/index.js CHANGED
@@ -41,5 +41,4 @@ export { default as Switch } from "./Switch";
41
41
  export * from './frame/sidebar/SidebarContext';
42
42
  export { default as Error } from "./error/Error";
43
43
  export { default as HttpError } from "./error/HttpError";
44
- export { default as CircularProgress } from "./deprecated/CircularProgress";
45
- export { default as ShadowedSection } from "./deprecated/ShadowedSection";
44
+ export { default as CircularProgress } from "./deprecated/CircularProgress";
@@ -4,6 +4,21 @@ const globalStyles = {
4
4
  ':root': {
5
5
  '--body-background-color': blueGrey.contentBg,
6
6
  '--frame-background-color': blueGrey.frameBg,
7
+ '--brand-text-color': typography.logo.color,
8
+ '--primary-menu-item-text-color': '#333',
9
+ '--primary-menu-item-text-active-color': '#333',
10
+ '--primary-menu-item-icon-color': '#656565',
11
+ '--primary-menu-item-icon-active-color': '#333',
12
+ '--primary-menu-item-icon-active-background-color': 'rgba(51,51,51,0.1)',
13
+ '--primary-menu-item-icon-hover-background-color': 'rgba(51,51,51,0.05)',
14
+ // '--frame-background-color': 'darkslateblue',
15
+ // '--brand-text-color': 'white',
16
+ // '--primary-menu-item-text-color': 'white',
17
+ // '--primary-menu-item-text-active-color': 'yellow',
18
+ // '--primary-menu-item-icon-color': 'white',
19
+ // '--primary-menu-item-icon-active-color': 'yellow',
20
+ // '--primary-menu-item-icon-active-background-color': 'red',
21
+ // '--primary-menu-item-icon-hover-background-color': 'green',
7
22
  '--gnb-background-color': blueGrey.gnbBg,
8
23
  '--gnb-height': '64px',
9
24
  '--gnb-zindex': 1103,
@@ -1,10 +1,9 @@
1
1
  import typography from "../typography";
2
- import { blueGrey } from "../../colors";
3
2
  export const styles = {
4
3
  styleOverrides: {
5
4
  root: {
6
5
  fontFamily: typography.fontFamily,
7
- backgroundColor: blueGrey.frameBg,
6
+ backgroundColor: 'var(--frame-background-color)',
8
7
  boxShadow: 'none',
9
8
  zIndex: `var(--gnb-zindex)`,
10
9
  '&.MuiAppBar-preview': {
@@ -2,7 +2,10 @@ export const styles = {
2
2
  styleOverrides: {
3
3
  root: {
4
4
  justifyContent: 'center',
5
- padding: '0px 24px 24px 24px'
5
+ padding: '0px 24px 20px 24px',
6
+ '&.MuiPickersLayout-actionBar': {
7
+ padding: '12px 24px'
8
+ }
6
9
  }
7
10
  }
8
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "main": "base/index.js",
5
5
  "files": [
6
6
  "/base"
@@ -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
- }