@neo4j-ndl/react 2.12.0 → 2.12.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#862](https://github.com/neo4j/needle/pull/862) [`116830563004f066d753c38f755f32132b7711fa`](https://github.com/neo4j/needle/commit/116830563004f066d753c38f755f32132b7711fa) Thanks [@basickarl](https://github.com/basickarl)! - reverted breaking change
8
+
9
+ ## 2.12.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#846](https://github.com/neo4j/needle/pull/846) [`2c904922b5e7072ceade732a2f562cefcda17309`](https://github.com/neo4j/needle/commit/2c904922b5e7072ceade732a2f562cefcda17309) Thanks [@daugerdas](https://github.com/daugerdas)! - update SideNavigation header style
14
+
15
+ - Updated dependencies [[`2c904922b5e7072ceade732a2f562cefcda17309`](https://github.com/neo4j/needle/commit/2c904922b5e7072ceade732a2f562cefcda17309)]:
16
+ - @neo4j-ndl/base@2.8.1
17
+
3
18
  ## 2.12.0
4
19
 
5
20
  ### Minor Changes
@@ -22,6 +22,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
25
36
  Object.defineProperty(exports, "__esModule", { value: true });
26
37
  exports.CodeBlockWrapper = void 0;
27
38
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -49,7 +60,8 @@ const react_1 = __importStar(require("react"));
49
60
  const button_1 = require("../button");
50
61
  const icons_1 = require("../icons");
51
62
  const defaultImports_1 = require("./defaultImports");
52
- exports.CodeBlockWrapper = react_1.default.forwardRef(function CodeBlockWrapper({ as, maxHeight, code, headerTitle, children, disabled, actions, shouldShowExpandButton, setShouldShowExpandButton, }, ref) {
63
+ exports.CodeBlockWrapper = react_1.default.forwardRef(function CodeBlockWrapper(_a, ref) {
64
+ var { as, maxHeight, code, headerTitle, children, disabled, actions, shouldShowExpandButton, setShouldShowExpandButton, className, style } = _a, restProps = __rest(_a, ["as", "maxHeight", "code", "headerTitle", "children", "disabled", "actions", "shouldShowExpandButton", "setShouldShowExpandButton", "className", "style"]);
53
65
  const Component = as || 'div';
54
66
  const syntaxHighlighterWrapperRef = (0, react_1.useRef)(null);
55
67
  const [containerHeight, setContainerHeight] = (0, react_1.useState)(`${maxHeight}px`);
@@ -76,7 +88,7 @@ exports.CodeBlockWrapper = react_1.default.forwardRef(function CodeBlockWrapper(
76
88
  setShouldShowExpandButton(true);
77
89
  }
78
90
  }, [maxHeight, code, setShouldShowExpandButton]);
79
- return ((0, jsx_runtime_1.jsxs)(Component, { ref: ref, className: "ndl-code-block-container", style: { height: containerHeight }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-h-full", children: [headerTitle && ((0, jsx_runtime_1.jsx)("div", { className: (0, defaultImports_1.classNames)('ndl-code-block-title', {
91
+ return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({}, restProps, { ref: ref, className: (0, defaultImports_1.classNames)('ndl-code-block-container', className), style: Object.assign({ height: containerHeight }, style), children: [(0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-h-full", children: [headerTitle && ((0, jsx_runtime_1.jsx)("div", { className: (0, defaultImports_1.classNames)('ndl-code-block-title', {
80
92
  'ndl-disabled': disabled,
81
93
  }), style: {
82
94
  maxWidth: `calc(100% - ${((actions === null || actions === void 0 ? void 0 : actions.length) || 0) * 36 + 20}px)`,
@@ -95,6 +107,6 @@ exports.CodeBlockWrapper = react_1.default.forwardRef(function CodeBlockWrapper(
95
107
  setContainerHeight(`fit-content`);
96
108
  setIsExpanded(true);
97
109
  }
98
- }, clean: true, children: isExpanded ? (0, jsx_runtime_1.jsx)(icons_1.ChevronUpIconOutline, {}) : (0, jsx_runtime_1.jsx)(icons_1.ChevronDownIconOutline, {}) }) }))] }));
110
+ }, clean: true, children: isExpanded ? (0, jsx_runtime_1.jsx)(icons_1.ChevronUpIconOutline, {}) : (0, jsx_runtime_1.jsx)(icons_1.ChevronDownIconOutline, {}) }) }))] })));
99
111
  });
100
112
  //# sourceMappingURL=CodeBlockWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlockWrapper.js","sourceRoot":"","sources":["../../../src/_common/CodeBlockWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,+CAA4E;AAE5E,sCAA6D;AAE7D,oCAAwE;AACxE,qDAA8C;AAajC,QAAA,gBAAgB,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,gBAAgB,CACxE,EACE,EAAE,EACF,SAAS,EACT,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,sBAAsB,EACtB,yBAAyB,GACH,EACxB,GAAG;IAEH,MAAM,SAAS,GAAG,EAAE,IAAI,KAAK,CAAC;IAE9B,MAAM,2BAA2B,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAEjE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAC,GAAG,SAAS,IAAI,CAAC,CAAC;IACzE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,KAAK,SAAS,CAAC,CAAC;IAEtE,IAAA,iBAAS,EA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AuB,EACjC,IAAI,EAAC,SAAS,gBACH,cAAc,EACzB,QAAQ,EAAE,CAAC,YAEV,QAAQ,GACL,EAEN,gCAAK,SAAS,EAAC,yBAAyB,GAAO,IAC3C,IACF,EACN,gCACE,SAAS,EAAE,IAAA,2BAAU,EAAC,wBAAwB,EAAE;oBAC9C,cAAc,EAAE,QAAQ;iBACzB,CAAC,YAED,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAC,eAAe,EAAE,CAAC,EAAE,EAAE,CAAC,CACpC,uBAAC,mBAAU,iCACI,qBAAqB,CAAC,EAAE,EAErC,KAAK,sBACO,GACV,eAAe,CAAC,YAAY,CAAC,IAAI,kBACnC,EAAE,EACF,QAAQ,EAAE,QAAQ,IACd,eAAe,GANd,CAAC,CAON,CACH,CAAC,GACE,EACL,sBAAsB,IAAI,CACzB,gCAAK,SAAS,EAAC,8BAA8B,YAC3C,uBAAC,mBAAU,kBACE,iBAAiB,EAC5B,OAAO,EAAE,GAAG,EAAE;wBACZ,IAAI,UAAU,EAAE;4BACd,kBAAkB,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC;4BACrC,aAAa,CAAC,KAAK,CAAC,CAAC;yBACtB;6BAAM;4BACL,kBAAkB,CAAC,aAAa,CAAC,CAAC;4BAClC,aAAa,CAAC,IAAI,CAAC,CAAC;yBACrB;oBACH,CAAC,EACD,KAAK,kBAEJ,UAAU,CAAC,CAAC,CAAC,uBAAC,4BAAoB,KAAG,CAAC,CAAC,CAAC,uBAAC,8BAAsB,KAAG,GACxD,GACT,CACP,KACS,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -22,6 +22,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
25
36
  Object.defineProperty(exports, "__esModule", { value: true });
26
37
  exports.CodeBlock = void 0;
27
38
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -49,7 +60,8 @@ const react_1 = __importStar(require("react"));
49
60
  const react_syntax_highlighter_1 = require("react-syntax-highlighter");
50
61
  const prism_1 = require("react-syntax-highlighter/dist/cjs/styles/prism");
51
62
  const CodeBlockWrapper_1 = require("../_common/CodeBlockWrapper");
52
- exports.CodeBlock = react_1.default.forwardRef(function CodeBlock({ maxHeight, code, language, showLineNumbers, theme, headerTitle, actions, disabled, }, ref) {
63
+ exports.CodeBlock = react_1.default.forwardRef(function CodeBlock(_a, ref) {
64
+ var { maxHeight, code, language, showLineNumbers, theme, headerTitle, actions, disabled } = _a, restProps = __rest(_a, ["maxHeight", "code", "language", "showLineNumbers", "theme", "headerTitle", "actions", "disabled"]);
53
65
  const [shouldShowExpandButton, setShouldShowExpandButton] = (0, react_1.useState)(maxHeight !== undefined);
54
66
  const getTheme = () => {
55
67
  switch (theme) {
@@ -71,7 +83,7 @@ exports.CodeBlock = react_1.default.forwardRef(function CodeBlock({ maxHeight, c
71
83
  return prism_1.base16AteliersulphurpoolLight;
72
84
  }
73
85
  };
74
- return ((0, jsx_runtime_1.jsx)(CodeBlockWrapper_1.CodeBlockWrapper, { ref: ref, maxHeight: maxHeight, code: code, headerTitle: headerTitle, disabled: disabled, actions: actions, shouldShowExpandButton: shouldShowExpandButton, setShouldShowExpandButton: setShouldShowExpandButton, children: (0, jsx_runtime_1.jsx)(react_syntax_highlighter_1.Prism, { language: language, style: Object.assign(Object.assign({}, getTheme()), { 'pre[class*="language-"]': {
86
+ return ((0, jsx_runtime_1.jsx)(CodeBlockWrapper_1.CodeBlockWrapper, Object.assign({}, restProps, { ref: ref, maxHeight: maxHeight, code: code, headerTitle: headerTitle, disabled: disabled, actions: actions, shouldShowExpandButton: shouldShowExpandButton, setShouldShowExpandButton: setShouldShowExpandButton, children: (0, jsx_runtime_1.jsx)(react_syntax_highlighter_1.Prism, { language: language, style: Object.assign(Object.assign({}, getTheme()), { 'pre[class*="language-"]': {
75
87
  color: 'rgb(var(--theme-palette-neutral-text-default))',
76
88
  lineHeight: '1',
77
89
  width: '100%',
@@ -83,6 +95,6 @@ exports.CodeBlock = react_1.default.forwardRef(function CodeBlock({ maxHeight, c
83
95
  // Turn on 'showLineNumbers' & 'wrapLongLines' at the same time, the display is wrong
84
96
  // https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/402
85
97
  // wrapLongLines
86
- codeTagProps: { className: 'n-code' }, showLineNumbers: showLineNumbers, children: code }) }));
98
+ codeTagProps: { className: 'n-code' }, showLineNumbers: showLineNumbers, children: code }) })));
87
99
  });
88
100
  //# sourceMappingURL=CodeBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../src/code-block/CodeBlock.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,+CAAwC;AACxC,uEAAsE;AACtE,0EAQwD;AAExD,kEAA+D;AAwBlD,QAAA,SAAS,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,SAAS,CAC1D,EACE,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,GACO,EACjB,GAAG;IAEH,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,IAAA,gBAAQ,EAClE,SAAS,KAAK,SAAS,CACxB,CAAC;IAEF,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,QAAQ,KAAK,EAAE;YACb,KAAK,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AAO,EAChB,sBAAsB,EAAE,sBAAsB,EAC9C,yBAAyB,EAAE,yBAAyB,YAEpD,uBAAC,gCAAiB,IAChB,QAAQ,EAAE,QAAQ,EAClB,KAAK,kCACA,QAAQ,EAAE,KACb,yBAAyB,EAAE;oBACzB,KAAK,EAAE,gDAAgD;oBACvD,UAAU,EAAE,GAAG;oBACf,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,CAAC;oBACT,OAAO,EAAE,mBACP,WAAW,KAAK,SAAS,IAAI,WAAW,KAAK,EAAE;wBAC7C,CAAC,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,KAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;wBAC5D,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EACzC,mBAAmB;iBACpB;YAEH,qFAAqF;YACrF,kFAAkF;YAClF,gBAAgB;YAChB,YAAY,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EACrC,eAAe,EAAE,eAAe,YAE/B,IAAI,GACa,IACH,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -48,7 +48,7 @@ const getExpandIconName = (position, expanded) => {
48
48
  }
49
49
  };
50
50
  const SideNavigationComponent = (0, react_1.forwardRef)(function SideNavigationComponent(_a, ref) {
51
- var { expanded, children, className, onExpandedChange, iconMenu = false, position = 'left', size: defaultSize = 'small' } = _a, restProps = __rest(_a, ["expanded", "children", "className", "onExpandedChange", "iconMenu", "position", "size"]);
51
+ var { expanded, children, className, onExpandedChange, iconMenu = false, position = 'left', size: defaultSize = 'large' } = _a, restProps = __rest(_a, ["expanded", "children", "className", "onExpandedChange", "iconMenu", "position", "size"]);
52
52
  // Typescript unable to infer the default value correctly in the parameter.
53
53
  const size = defaultSize;
54
54
  const setOnExpandedChange = (0, react_1.useCallback)(() => {
@@ -136,7 +136,7 @@ const SideNavigationGroupHeader = (0, react_1.forwardRef)(function SideNavigatio
136
136
  'ndl-side-navigation-nav-item': size === 'large',
137
137
  'ndl-side-navigation-nav-item-small': size === 'small',
138
138
  });
139
- const indent = expanded ? '12px' : '0';
139
+ const indent = expanded ? '20px' : '0';
140
140
  return ((0, jsx_runtime_1.jsx)("li", Object.assign({ className: classes, role: "presentation", style: Object.assign({ paddingLeft: indent }, style) }, restProps, { children: (0, jsx_runtime_1.jsxs)(Component, { className: "ndl-side-navigation-inner-item ndl-side-navigation-group-header", ref: ref, children: [!expanded && iconMenu && (0, jsx_runtime_1.jsx)(divider_1.Divider, {}), expanded && children] }) })));
141
141
  });
142
142
  SideNavigationGroupHeader.displayName = 'SideNavigation.GroupHeader';
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  /**
3
14
  *
@@ -23,7 +34,8 @@ import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
23
34
  import { IconButton } from '../button';
24
35
  import { ChevronDownIconOutline, ChevronUpIconOutline } from '../icons';
25
36
  import { classNames } from './defaultImports';
26
- export const CodeBlockWrapper = React.forwardRef(function CodeBlockWrapper({ as, maxHeight, code, headerTitle, children, disabled, actions, shouldShowExpandButton, setShouldShowExpandButton, }, ref) {
37
+ export const CodeBlockWrapper = React.forwardRef(function CodeBlockWrapper(_a, ref) {
38
+ var { as, maxHeight, code, headerTitle, children, disabled, actions, shouldShowExpandButton, setShouldShowExpandButton, className, style } = _a, restProps = __rest(_a, ["as", "maxHeight", "code", "headerTitle", "children", "disabled", "actions", "shouldShowExpandButton", "setShouldShowExpandButton", "className", "style"]);
27
39
  const Component = as || 'div';
28
40
  const syntaxHighlighterWrapperRef = useRef(null);
29
41
  const [containerHeight, setContainerHeight] = useState(`${maxHeight}px`);
@@ -50,7 +62,7 @@ export const CodeBlockWrapper = React.forwardRef(function CodeBlockWrapper({ as,
50
62
  setShouldShowExpandButton(true);
51
63
  }
52
64
  }, [maxHeight, code, setShouldShowExpandButton]);
53
- return (_jsxs(Component, { ref: ref, className: "ndl-code-block-container", style: { height: containerHeight }, children: [_jsxs("div", { className: "n-flex n-flex-col n-h-full", children: [headerTitle && (_jsx("div", { className: classNames('ndl-code-block-title', {
65
+ return (_jsxs(Component, Object.assign({}, restProps, { ref: ref, className: classNames('ndl-code-block-container', className), style: Object.assign({ height: containerHeight }, style), children: [_jsxs("div", { className: "n-flex n-flex-col n-h-full", children: [headerTitle && (_jsx("div", { className: classNames('ndl-code-block-title', {
54
66
  'ndl-disabled': disabled,
55
67
  }), style: {
56
68
  maxWidth: `calc(100% - ${((actions === null || actions === void 0 ? void 0 : actions.length) || 0) * 36 + 20}px)`,
@@ -69,6 +81,6 @@ export const CodeBlockWrapper = React.forwardRef(function CodeBlockWrapper({ as,
69
81
  setContainerHeight(`fit-content`);
70
82
  setIsExpanded(true);
71
83
  }
72
- }, clean: true, children: isExpanded ? _jsx(ChevronUpIconOutline, {}) : _jsx(ChevronDownIconOutline, {}) }) }))] }));
84
+ }, clean: true, children: isExpanded ? _jsx(ChevronUpIconOutline, {}) : _jsx(ChevronDownIconOutline, {}) }) }))] })));
73
85
  });
74
86
  //# sourceMappingURL=CodeBlockWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlockWrapper.js","sourceRoot":"","sources":["../../../src/_common/CodeBlockWrapper.tsx"],"names":[],"mappings":";AAAA;;;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qB,CAAC,EAAE,EAErC,KAAK,sBACO,GACV,eAAe,CAAC,YAAY,CAAC,IAAI,kBACnC,EAAE,EACF,QAAQ,EAAE,QAAQ,IACd,eAAe,GANd,CAAC,CAON,CACH,CAAC,GACE,EACL,sBAAsB,IAAI,CACzB,cAAK,SAAS,EAAC,8BAA8B,YAC3C,KAAC,UAAU,kBACE,iBAAiB,EAC5B,OAAO,EAAE,GAAG,EAAE;wBACZ,IAAI,UAAU,EAAE;4BACd,kBAAkB,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC;4BACrC,aAAa,CAAC,KAAK,CAAC,CAAC;yBACtB;6BAAM;4BACL,kBAAkB,CAAC,aAAa,CAAC,CAAC;4BAClC,aAAa,CAAC,IAAI,CAAC,CAAC;yBACrB;oBACH,CAAC,EACD,KAAK,kBAEJ,UAAU,CAAC,CAAC,CAAC,KAAC,oBAAoB,KAAG,CAAC,CAAC,CAAC,KAAC,sBAAsB,KAAG,GACxD,GACT,CACP,KACS,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  /**
3
14
  *
@@ -23,7 +34,8 @@ import React, { useState } from 'react';
23
34
  import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
24
35
  import { base16AteliersulphurpoolLight, coy, duotoneLight, ghcolors, prism, solarizedlight, vs, } from 'react-syntax-highlighter/dist/cjs/styles/prism';
25
36
  import { CodeBlockWrapper } from '../_common/CodeBlockWrapper';
26
- export const CodeBlock = React.forwardRef(function CodeBlock({ maxHeight, code, language, showLineNumbers, theme, headerTitle, actions, disabled, }, ref) {
37
+ export const CodeBlock = React.forwardRef(function CodeBlock(_a, ref) {
38
+ var { maxHeight, code, language, showLineNumbers, theme, headerTitle, actions, disabled } = _a, restProps = __rest(_a, ["maxHeight", "code", "language", "showLineNumbers", "theme", "headerTitle", "actions", "disabled"]);
27
39
  const [shouldShowExpandButton, setShouldShowExpandButton] = useState(maxHeight !== undefined);
28
40
  const getTheme = () => {
29
41
  switch (theme) {
@@ -45,7 +57,7 @@ export const CodeBlock = React.forwardRef(function CodeBlock({ maxHeight, code,
45
57
  return base16AteliersulphurpoolLight;
46
58
  }
47
59
  };
48
- return (_jsx(CodeBlockWrapper, { ref: ref, maxHeight: maxHeight, code: code, headerTitle: headerTitle, disabled: disabled, actions: actions, shouldShowExpandButton: shouldShowExpandButton, setShouldShowExpandButton: setShouldShowExpandButton, children: _jsx(SyntaxHighlighter, { language: language, style: Object.assign(Object.assign({}, getTheme()), { 'pre[class*="language-"]': {
60
+ return (_jsx(CodeBlockWrapper, Object.assign({}, restProps, { ref: ref, maxHeight: maxHeight, code: code, headerTitle: headerTitle, disabled: disabled, actions: actions, shouldShowExpandButton: shouldShowExpandButton, setShouldShowExpandButton: setShouldShowExpandButton, children: _jsx(SyntaxHighlighter, { language: language, style: Object.assign(Object.assign({}, getTheme()), { 'pre[class*="language-"]': {
49
61
  color: 'rgb(var(--theme-palette-neutral-text-default))',
50
62
  lineHeight: '1',
51
63
  width: '100%',
@@ -57,6 +69,6 @@ export const CodeBlock = React.forwardRef(function CodeBlock({ maxHeight, code,
57
69
  // Turn on 'showLineNumbers' & 'wrapLongLines' at the same time, the display is wrong
58
70
  // https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/402
59
71
  // wrapLongLines
60
- codeTagProps: { className: 'n-code' }, showLineNumbers: showLineNumbers, children: code }) }));
72
+ codeTagProps: { className: 'n-code' }, showLineNumbers: showLineNumbers, children: code }) })));
61
73
  });
62
74
  //# sourceMappingURL=CodeBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../src/code-block/CodeBlock.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EACL,6BAA6B,EAC7B,GAAG,EACH,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,cAAc,EACd,EAAE,GACH,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAwB/D,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,SAAS,CAC1D,EACE,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,GACO,EACjB,GAAG;IAEH,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,QAAQ,CAClE,SAAS,KAAK,SAAS,CACxB,CAAC;IAEF,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,QAAQ,KAAK,EAAE;YACb,KAAK,IAAI;gBACP,OAAO,EAAE,CAAC;YACZ,KAAK,iCAAiC;gBACpC,OAAO,6BAA6B,CAAC;YACvC,KAAK,KAAK;gBACR,OAAO,GAAG,CAAC;YACb,KAAK,eAAe;gBAClB,OAAO,YAAY,CAAC;YACtB,KAAK,UAAU;gBACb,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,KAAK,CAAC;YACf,KAAK,gBAAgB;gBACnB,OAAO,cAAc,CAAC;YACxB;gBACE,OAAO,6BAA6B,CAAC;SACxC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,K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;oBACzB,KAAK,EAAE,gDAAgD;oBACvD,UAAU,EAAE,GAAG;oBACf,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,CAAC;oBACT,OAAO,EAAE,mBACP,WAAW,KAAK,SAAS,IAAI,WAAW,KAAK,EAAE;wBAC7C,CAAC,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,KAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;wBAC5D,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EACzC,mBAAmB;iBACpB;YAEH,qFAAqF;YACrF,kFAAkF;YAClF,gBAAgB;YAChB,YAAY,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EACrC,eAAe,EAAE,eAAe,YAE/B,IAAI,GACa,IACH,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -45,7 +45,7 @@ const getExpandIconName = (position, expanded) => {
45
45
  }
46
46
  };
47
47
  const SideNavigationComponent = forwardRef(function SideNavigationComponent(_a, ref) {
48
- var { expanded, children, className, onExpandedChange, iconMenu = false, position = 'left', size: defaultSize = 'small' } = _a, restProps = __rest(_a, ["expanded", "children", "className", "onExpandedChange", "iconMenu", "position", "size"]);
48
+ var { expanded, children, className, onExpandedChange, iconMenu = false, position = 'left', size: defaultSize = 'large' } = _a, restProps = __rest(_a, ["expanded", "children", "className", "onExpandedChange", "iconMenu", "position", "size"]);
49
49
  // Typescript unable to infer the default value correctly in the parameter.
50
50
  const size = defaultSize;
51
51
  const setOnExpandedChange = useCallback(() => {
@@ -133,7 +133,7 @@ const SideNavigationGroupHeader = forwardRef(function SideNavigationGroupHeader(
133
133
  'ndl-side-navigation-nav-item': size === 'large',
134
134
  'ndl-side-navigation-nav-item-small': size === 'small',
135
135
  });
136
- const indent = expanded ? '12px' : '0';
136
+ const indent = expanded ? '20px' : '0';
137
137
  return (_jsx("li", Object.assign({ className: classes, role: "presentation", style: Object.assign({ paddingLeft: indent }, style) }, restProps, { children: _jsxs(Component, { className: "ndl-side-navigation-inner-item ndl-side-navigation-group-header", ref: ref, children: [!expanded && iconMenu && _jsx(Divider, {}), expanded && children] }) })));
138
138
  });
139
139
  SideNavigationGroupHeader.displayName = 'SideNavigation.GroupHeader';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "2.12.0",
3
+ "version": "2.12.2",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -90,7 +90,7 @@
90
90
  "@floating-ui/react": "0.25.1",
91
91
  "@heroicons/react": "2.0.13",
92
92
  "@neo4j-cypher/react-codemirror": "^1.0.1",
93
- "@neo4j-ndl/base": "^2.8.0",
93
+ "@neo4j-ndl/base": "^2.8.1",
94
94
  "@table-nav/core": "0.0.7",
95
95
  "@table-nav/react": "0.0.7",
96
96
  "@tanstack/react-table": "^8.9.3",