@neo4j-ndl/react 1.3.7 → 1.4.1

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,22 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1c482b9: allow React v18 as peer dependency
8
+
9
+ ## 1.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 77bf1d9: new drawer component
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [77bf1d9]
18
+ - @neo4j-ndl/base@1.4.0
19
+
3
20
  ## 1.3.7
4
21
 
5
22
  ### Patch Changes
package/lib/LICENSES.txt CHANGED
@@ -12036,6 +12036,32 @@ By: Ika
12036
12036
 
12037
12037
  -----
12038
12038
 
12039
+ The following software may be included in this product: re-resizable. A copy of the source code may be downloaded from https://github.com/bokuweb/react-resizable-box.git. This software contains the following license and notice below:
12040
+
12041
+ The MIT License (MIT)
12042
+
12043
+ Copyright (c) 2018 @bokuweb
12044
+
12045
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12046
+ of this software and associated documentation files (the "Software"), to deal
12047
+ in the Software without restriction, including without limitation the rights
12048
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12049
+ copies of the Software, and to permit persons to whom the Software is
12050
+ furnished to do so, subject to the following conditions:
12051
+
12052
+ The above copyright notice and this permission notice shall be included in all
12053
+ copies or substantial portions of the Software.
12054
+
12055
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12056
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12057
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
12058
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
12059
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
12060
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
12061
+ SOFTWARE.
12062
+
12063
+ -----
12064
+
12039
12065
  The following software may be included in this product: react-dropzone. A copy of the source code may be downloaded from https://github.com/react-dropzone/react-dropzone.git. This software contains the following license and notice below:
12040
12066
 
12041
12067
  The MIT License (MIT)
@@ -14529,7 +14555,7 @@ Repository: git+https://github.com/ampproject/remapping.git
14529
14555
  > same "printed page" as the copyright notice for easier
14530
14556
  > identification within third-party archives.
14531
14557
  >
14532
- > Copyright 2019 Google LLC
14558
+ > Copyright [yyyy] [name of copyright owner]
14533
14559
  >
14534
14560
  > Licensed under the Apache License, Version 2.0 (the "License");
14535
14561
  > you may not use this file except in compliance with the License.
package/lib/NOTICE.txt CHANGED
@@ -23,11 +23,11 @@ Full license texts are found in LICENSES.txt.
23
23
  Third-party licenses
24
24
  --------------------
25
25
  ├─ MIT
26
- │ ├─ @babel/core@npm:7.21.3 (via npm:^7.16.0)
26
+ │ ├─ @babel/core@npm:7.21.8 (via npm:^7.16.0)
27
27
  │ │ ├─ URL: https://github.com/babel/babel.git
28
28
  │ │ ├─ VendorName: The Babel Team
29
29
  │ │ └─ VendorUrl: https://babel.dev/docs/en/next/babel-core
30
- │ ├─ @babel/preset-env@npm:7.20.2 [a2e03] (via npm:^7.16.4 [a2e03])
30
+ │ ├─ @babel/preset-env@npm:7.21.5 [a2e03] (via npm:^7.16.4 [a2e03])
31
31
  │ │ ├─ URL: https://github.com/babel/babel.git
32
32
  │ │ ├─ VendorName: The Babel Team
33
33
  │ │ └─ VendorUrl: https://babel.dev/docs/en/next/babel-preset-env
@@ -85,7 +85,7 @@ Third-party licenses
85
85
  │ │ ├─ URL: https://github.com/gregberge/svgr/tree/main/packages/cli
86
86
  │ │ ├─ VendorName: Greg Bergé
87
87
  │ │ └─ VendorUrl: https://react-svgr.com
88
- │ ├─ @tanstack/react-table@npm:8.7.9 [a2e03] (via npm:^8.5.22 [a2e03])
88
+ │ ├─ @tanstack/react-table@npm:8.9.1 [a2e03] (via npm:^8.5.22 [a2e03])
89
89
  │ │ ├─ URL: git+https://github.com/tanstack/table.git
90
90
  │ │ ├─ VendorName: Tanner Linsley
91
91
  │ │ └─ VendorUrl: https://github.com/tanstack/table#readme
@@ -109,10 +109,10 @@ Third-party licenses
109
109
  │ ├─ @types/jest-axe@npm:3.5.5 (via npm:^3.5.3)
110
110
  │ │ ├─ URL: https://github.com/DefinitelyTyped/DefinitelyTyped.git
111
111
  │ │ └─ VendorUrl: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-axe
112
- │ ├─ @types/node@npm:16.18.18 (via npm:^16.11.7)
112
+ │ ├─ @types/node@npm:16.18.27 (via npm:^16.11.7)
113
113
  │ │ ├─ URL: https://github.com/DefinitelyTyped/DefinitelyTyped.git
114
114
  │ │ └─ VendorUrl: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
115
- │ ├─ @types/react@npm:17.0.53 (via npm:^17.0.53)
115
+ │ ├─ @types/react@npm:17.0.60 (via npm:^17.0.53)
116
116
  │ │ ├─ URL: https://github.com/DefinitelyTyped/DefinitelyTyped.git
117
117
  │ │ └─ VendorUrl: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react
118
118
  │ ├─ @types/react-dom@npm:17.0.18 (via npm:17.0.18)
@@ -127,7 +127,7 @@ Third-party licenses
127
127
  │ ├─ @types/tinycolor2@npm:1.4.3 (via npm:^1.4.3)
128
128
  │ │ ├─ URL: https://github.com/DefinitelyTyped/DefinitelyTyped.git
129
129
  │ │ └─ VendorUrl: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tinycolor2
130
- │ ├─ @typescript-eslint/eslint-plugin@npm:5.56.0 [a2e03] (via npm:^5.5.0 [a2e03])
130
+ │ ├─ @typescript-eslint/eslint-plugin@npm:5.59.5 [a2e03] (via npm:^5.5.0 [a2e03])
131
131
  │ │ └─ URL: https://github.com/typescript-eslint/typescript-eslint.git
132
132
  │ ├─ acorn@npm:8.8.2 (via npm:^8.8.2)
133
133
  │ │ ├─ URL: https://github.com/acornjs/acorn.git
@@ -142,7 +142,7 @@ Third-party licenses
142
142
  │ │ └─ URL: https://github.com/facebook/jest.git
143
143
  │ ├─ chalk@npm:5.2.0 (via npm:^5.1.0)
144
144
  │ │ └─ URL: git+https://github.com/chalk/chalk.git
145
- │ ├─ chromatic@npm:6.17.2 (via npm:^6.5.1)
145
+ │ ├─ chromatic@npm:6.17.4 (via npm:^6.5.1)
146
146
  │ │ ├─ URL: https://github.com/chromaui/chromatic-cli.git
147
147
  │ │ └─ VendorUrl: https://www.chromatic.com
148
148
  │ ├─ classnames@npm:2.3.2 (via npm:^2.3.1)
@@ -163,7 +163,7 @@ Third-party licenses
163
163
  │ │ ├─ URL: https://github.com/DamonOehlman/detect-browser.git
164
164
  │ │ ├─ VendorName: Damon Oehlman
165
165
  │ │ └─ VendorUrl: https://github.com/DamonOehlman/detect-browser
166
- │ ├─ eslint@npm:8.36.0 (via npm:^8.3.0)
166
+ │ ├─ eslint@npm:8.40.0 (via npm:^8.3.0)
167
167
  │ │ ├─ URL: git+https://github.com/eslint/eslint.git
168
168
  │ │ ├─ VendorName: Nicholas C. Zakas
169
169
  │ │ └─ VendorUrl: https://eslint.org
@@ -194,7 +194,7 @@ Third-party licenses
194
194
  │ ├─ jest-axe@npm:5.0.1 (via npm:^5.0.1)
195
195
  │ │ ├─ URL: git+https://github.com/nickcolley/jest-axe.git
196
196
  │ │ └─ VendorName: Nick Colley
197
- │ ├─ postcss@npm:8.4.21 (via npm:^8.4.18)
197
+ │ ├─ postcss@npm:8.4.23 (via npm:^8.4.18)
198
198
  │ │ ├─ URL: git+https://github.com/postcss/postcss.git
199
199
  │ │ ├─ VendorName: Andrey Sitnik
200
200
  │ │ └─ VendorUrl: https://postcss.org/
@@ -207,10 +207,14 @@ Third-party licenses
207
207
  │ ├─ postcss-nested@npm:6.0.1 [708d2] (via npm:^6.0.0 [708d2])
208
208
  │ │ ├─ URL: git+https://github.com/postcss/postcss-nested.git
209
209
  │ │ └─ VendorName: Andrey Sitnik
210
- │ ├─ prettier@npm:2.8.6 (via npm:^2.8.4)
210
+ │ ├─ prettier@npm:2.8.8 (via npm:^2.8.4)
211
211
  │ │ ├─ URL: git+https://github.com/prettier/prettier.git
212
212
  │ │ ├─ VendorName: James Long
213
213
  │ │ └─ VendorUrl: https://prettier.io
214
+ │ ├─ re-resizable@npm:6.9.9 [a2e03] (via npm:^6.9.9 [a2e03])
215
+ │ │ ├─ URL: https://github.com/bokuweb/react-resizable-box.git
216
+ │ │ ├─ VendorName: bokuweb
217
+ │ │ └─ VendorUrl: https://github.com/bokuweb/react-resizable-box
214
218
  │ ├─ react@npm:17.0.2 (via npm:^17.0.2)
215
219
  │ │ ├─ URL: https://github.com/facebook/react.git
216
220
  │ │ └─ VendorUrl: https://reactjs.org/
@@ -225,7 +229,7 @@ Third-party licenses
225
229
  │ │ ├─ URL: git+https://github.com/theKashey/react-focus-lock.git
226
230
  │ │ ├─ VendorName: theKashey
227
231
  │ │ └─ VendorUrl: https://github.com/theKashey/react-focus-lock#readme
228
- │ ├─ react-hot-toast@npm:2.4.0 [d75d7] (via npm:^2.3.0 [d75d7])
232
+ │ ├─ react-hot-toast@npm:2.4.1 [d75d7] (via npm:^2.3.0 [d75d7])
229
233
  │ │ ├─ URL: git+https://github.com/timolins/react-hot-toast.git
230
234
  │ │ └─ VendorName: Timo Lins
231
235
  │ ├─ react-select@npm:5.7.0 [a2e03] (via npm:5.7.0 [a2e03])
@@ -246,20 +250,23 @@ Third-party licenses
246
250
  │ │ ├─ URL: https://github.com/que-etc/resize-observer-polyfill.git
247
251
  │ │ ├─ VendorName: Denis Rul
248
252
  │ │ └─ VendorUrl: https://github.com/que-etc/resize-observer-polyfill
249
- │ ├─ sass@npm:1.62.0 (via npm:^1.62.0)
253
+ │ ├─ sass@npm:1.62.1 (via npm:^1.62.0)
250
254
  │ │ ├─ URL: https://github.com/sass/dart-sass
251
255
  │ │ ├─ VendorName: Natalie Weizenbaum
252
256
  │ │ └─ VendorUrl: https://github.com/sass/dart-sass
253
- │ ├─ storybook@npm:7.0.6 (via npm:^7.0.6)
257
+ │ ├─ sb@npm:7.0.10 (via npm:^7.0.10)
254
258
  │ │ ├─ URL: https://github.com/storybookjs/storybook.git
255
- │ │ └─ VendorUrl: https://github.com/storybookjs/storybook/tree/main/lib/cli
256
- │ ├─ storybook-addon-pseudo-states@npm:1.15.2 [d75d7] (via npm:^1.15.1 [d75d7])
259
+ │ │ └─ VendorUrl: https://github.com/storybookjs/storybook/tree/next/code/lib/cli
260
+ │ ├─ storybook@npm:7.0.9 (via npm:^7.0.6)
261
+ │ │ ├─ URL: https://github.com/storybookjs/storybook.git
262
+ │ │ └─ VendorUrl: https://github.com/storybookjs/storybook/tree/next/code/lib/cli
263
+ │ ├─ storybook-addon-pseudo-states@npm:1.15.5 [d75d7] (via npm:^1.15.1 [d75d7])
257
264
  │ │ ├─ URL: https://github.com/chromaui/storybook-addon-pseudo-states
258
265
  │ │ └─ VendorName: ghengeveld
259
266
  │ ├─ tailwindcss@npm:3.1.8 [708d2] (via npm:3.1.8 [708d2])
260
267
  │ │ ├─ URL: https://github.com/tailwindlabs/tailwindcss.git
261
268
  │ │ └─ VendorUrl: https://tailwindcss.com
262
- │ ├─ tinycolor2@npm:1.6.0 (via npm:^1.4.2)
269
+ │ ├─ tinycolor2@npm:1.6.0 (via npm:^1.6.0)
263
270
  │ │ ├─ URL: https://github.com/bgrins/TinyColor.git
264
271
  │ │ ├─ VendorName: Brian Grinstead
265
272
  │ │ └─ VendorUrl: http://briangrinstead.com
@@ -271,7 +278,7 @@ Third-party licenses
271
278
  │ │ ├─ URL: git://github.com/TypeStrong/ts-node.git
272
279
  │ │ ├─ VendorName: Blake Embrey
273
280
  │ │ └─ VendorUrl: https://typestrong.org/ts-node
274
- │ ├─ vite@npm:4.2.1 [d75d7] (via npm:^4.0.4 [d75d7])
281
+ │ ├─ vite@npm:4.3.5 [d75d7] (via npm:^4.0.4 [d75d7])
275
282
  │ │ ├─ URL: git+https://github.com/vitejs/vite.git
276
283
  │ │ ├─ VendorName: Evan You
277
284
  │ │ └─ VendorUrl: https://github.com/vitejs/vite/tree/main/#readme
@@ -291,7 +298,7 @@ Third-party licenses
291
298
  │ │ ├─ URL: https://github.com/krisk/Fuse.git
292
299
  │ │ ├─ VendorName: Kiro Risk
293
300
  │ │ └─ VendorUrl: http://fusejs.io
294
- │ ├─ style-dictionary@npm:3.7.2 (via npm:^3.0.3)
301
+ │ ├─ style-dictionary@npm:3.8.0 (via npm:^3.0.3)
295
302
  │ │ ├─ URL: git://github.com/amzn/style-dictionary.git
296
303
  │ │ ├─ VendorName: Amazon
297
304
  │ │ └─ VendorUrl: https://github.com/amzn/style-dictionary
@@ -311,7 +318,7 @@ Third-party licenses
311
318
  │ └─ root@workspace:. (via workspace:.)
312
319
 
313
320
  ├─ BSD-2-Clause
314
- │ └─ @typescript-eslint/parser@npm:5.56.0 [a2e03] (via npm:^5.5.0 [a2e03])
321
+ │ └─ @typescript-eslint/parser@npm:5.59.5 [a2e03] (via npm:^5.5.0 [a2e03])
315
322
  │ └─ URL: https://github.com/typescript-eslint/typescript-eslint.git
316
323
 
317
324
  ├─ AGPL-3.0-or-later
@@ -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, rest = __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) {
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../src/code-block/CodeBlock.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+CAAwC;AAExC,uEAAsE;AACtE,0EAQwD;AAGxD,kEAA+D;AAqBlD,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,IAAI;gB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,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,sBAAsB,EAAE,sBAAsB,EAC9C,yBAAyB,EAAE,yBAAyB,gBAEpD,uBAAC,gCAAiB,kBAChB,QAAQ,EAAE,QAAQ,EAClB,KAAK,kCACA,QAAQ,EAAE,KACb,yBAAyB,EAAE;oBACzB,KAAK,EAAE,0CAA0C;oBACjD,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;oBACnB,SAAS,EAAE,MAAM;oBACjB,SAAS,EAAE,MAAM;iBAClB;YAEH,qFAAqF;YACrF,kFAAkF;YAClF,gBAAgB;YAChB,YAAY,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EACrC,eAAe,EAAE,eAAe,gBAE/B,IAAI,IACa,IACH,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Drawer = void 0;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ /**
20
+ *
21
+ * Copyright (c) "Neo4j"
22
+ * Neo4j Sweden AB [http://neo4j.com]
23
+ *
24
+ * This file is part of Neo4j.
25
+ *
26
+ * Neo4j is free software: you can redistribute it and/or modify
27
+ * it under the terms of the GNU General Public License as published by
28
+ * the Free Software Foundation, either version 3 of the License, or
29
+ * (at your option) any later version.
30
+ *
31
+ * This program is distributed in the hope that it will be useful,
32
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
33
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
+ * GNU General Public License for more details.
35
+ *
36
+ * You should have received a copy of the GNU General Public License
37
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
38
+ */
39
+ const classnames_1 = __importDefault(require("classnames"));
40
+ const react_1 = require("react");
41
+ const re_resizable_1 = require("re-resizable");
42
+ const button_1 = require("../button");
43
+ const icons_1 = require("../icons");
44
+ const Drawer = (_a) => {
45
+ var { children, className = '', expanded, onExpandedChange, position = 'left', type = 'overlay', isResizeable = false, resizeableProps, minWidth = 320 } = _a, props = __rest(_a, ["children", "className", "expanded", "onExpandedChange", "position", "type", "isResizeable", "resizeableProps", "minWidth"]);
46
+ const setOnExpandedChange = (0, react_1.useCallback)(() => {
47
+ if (onExpandedChange)
48
+ onExpandedChange(!expanded);
49
+ }, [expanded, onExpandedChange]);
50
+ const classes = (0, classnames_1.default)('ndl-drawer', className, {
51
+ 'ndl-drawer-expanded': expanded,
52
+ 'ndl-drawer-left': position === 'left',
53
+ 'ndl-drawer-right': position === 'right',
54
+ 'ndl-drawer-overlay': type === 'overlay',
55
+ 'ndl-drawer-push': type === 'push',
56
+ });
57
+ const stylePosition = type === 'overlay' ? 'absolute' : 'relative';
58
+ const contents = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ndl-drawer-content" }, { children: children })), (0, jsx_runtime_1.jsx)(button_1.IconButton, Object.assign({ className: "ndl-drawer-close-button", onClick: setOnExpandedChange, "aria-label": "close-drawer", size: "large", "data-testid": "ndl-drawer-close-button", title: "Close drawer", clean: true }, { children: (0, jsx_runtime_1.jsx)(icons_1.XMarkIconOutline, { className: "n-w-6 n-h-6" }) }))] }));
59
+ if (isResizeable) {
60
+ return ((0, jsx_runtime_1.jsx)(re_resizable_1.Resizable, Object.assign({ defaultSize: {
61
+ width: 'auto',
62
+ height: '100%',
63
+ }, minWidth: `${minWidth + 49}px` }, resizeableProps, { className: classes, style: {
64
+ position: stylePosition,
65
+ }, boundsByDirection: true, bounds: "parent", enable: {
66
+ top: false,
67
+ right: position === 'left',
68
+ bottom: false,
69
+ left: position === 'right',
70
+ topRight: false,
71
+ bottomRight: false,
72
+ bottomLeft: false,
73
+ topLeft: false,
74
+ } }, { children: contents })));
75
+ }
76
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { style: { minWidth: `${minWidth}px` }, className: classes }, { children: contents })));
77
+ };
78
+ exports.Drawer = Drawer;
79
+ const Header = (_a) => {
80
+ var { children, className = '' } = _a, rest = __rest(_a, ["children", "className"]);
81
+ const classes = (0, classnames_1.default)('ndl-drawer-header', className);
82
+ return ((0, jsx_runtime_1.jsx)("h5", Object.assign({}, rest, { className: classes }, { children: children })));
83
+ };
84
+ exports.Drawer.Header = Header;
85
+ const Actions = (_a) => {
86
+ var { children, className = '' } = _a, rest = __rest(_a, ["children", "className"]);
87
+ const classes = (0, classnames_1.default)('ndl-drawer-actions', className);
88
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { className: classes }, { children: children })));
89
+ };
90
+ exports.Drawer.Actions = Actions;
91
+ exports.default = exports.Drawer;
92
+ //# sourceMappingURL=Draw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ACJ,CAAC,CAAC;AACF,cAAM,CAAC,MAAM,GAAG,MAAM,CAAC;AAIvB,MAAM,OAAO,GAAG,CAAC,EAAyD,EAAE,EAAE;QAA7D,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,OAA+B,EAA1B,IAAI,cAAnC,yBAAqC,CAAF;IAClD,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAE5D,OAAO,CACL,gDAAS,IAAI,IAAE,SAAS,EAAE,OAAO,gBAC9B,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AACF,cAAM,CAAC,OAAO,GAAG,OAAO,CAAC;AAEzB,kBAAe,cAAM,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ var desc = Object.getOwnPropertyDescriptor(m, k);
25
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
26
+ desc = { enumerable: true, get: function() { return m[k]; } };
27
+ }
28
+ Object.defineProperty(o, k2, desc);
29
+ }) : (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ o[k2] = m[k];
32
+ }));
33
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
34
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ __exportStar(require("./Drawer"), exports);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,2CAAyB"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ require("@testing-library/jest-dom");
24
+ //# sourceMappingURL=setupTests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAEH,qCAAmC"}
@@ -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, rest = __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) {
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../src/code-block/CodeBlock.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,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;AAGxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAqB/D,MAAM,CAAC,MAAM,SAAS,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E,MAAM;iBAClB;YAEH,qFAAqF;YACrF,kFAAkF;YAClF,gBAAgB;YAChB,YAAY,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EACrC,eAAe,EAAE,eAAe,gBAE/B,IAAI,IACa,IACH,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,85 @@
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
+ };
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ /**
14
+ *
15
+ * Copyright (c) "Neo4j"
16
+ * Neo4j Sweden AB [http://neo4j.com]
17
+ *
18
+ * This file is part of Neo4j.
19
+ *
20
+ * Neo4j is free software: you can redistribute it and/or modify
21
+ * it under the terms of the GNU General Public License as published by
22
+ * the Free Software Foundation, either version 3 of the License, or
23
+ * (at your option) any later version.
24
+ *
25
+ * This program is distributed in the hope that it will be useful,
26
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ * GNU General Public License for more details.
29
+ *
30
+ * You should have received a copy of the GNU General Public License
31
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
32
+ */
33
+ import classNames from 'classnames';
34
+ import { useCallback } from 'react';
35
+ import { Resizable } from 're-resizable';
36
+ import { IconButton } from '../button';
37
+ import { XMarkIconOutline } from '../icons';
38
+ export const Drawer = (_a) => {
39
+ var { children, className = '', expanded, onExpandedChange, position = 'left', type = 'overlay', isResizeable = false, resizeableProps, minWidth = 320 } = _a, props = __rest(_a, ["children", "className", "expanded", "onExpandedChange", "position", "type", "isResizeable", "resizeableProps", "minWidth"]);
40
+ const setOnExpandedChange = useCallback(() => {
41
+ if (onExpandedChange)
42
+ onExpandedChange(!expanded);
43
+ }, [expanded, onExpandedChange]);
44
+ const classes = classNames('ndl-drawer', className, {
45
+ 'ndl-drawer-expanded': expanded,
46
+ 'ndl-drawer-left': position === 'left',
47
+ 'ndl-drawer-right': position === 'right',
48
+ 'ndl-drawer-overlay': type === 'overlay',
49
+ 'ndl-drawer-push': type === 'push',
50
+ });
51
+ const stylePosition = type === 'overlay' ? 'absolute' : 'relative';
52
+ const contents = (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: "ndl-drawer-content" }, { children: children })), _jsx(IconButton, Object.assign({ className: "ndl-drawer-close-button", onClick: setOnExpandedChange, "aria-label": "close-drawer", size: "large", "data-testid": "ndl-drawer-close-button", title: "Close drawer", clean: true }, { children: _jsx(XMarkIconOutline, { className: "n-w-6 n-h-6" }) }))] }));
53
+ if (isResizeable) {
54
+ return (_jsx(Resizable, Object.assign({ defaultSize: {
55
+ width: 'auto',
56
+ height: '100%',
57
+ }, minWidth: `${minWidth + 49}px` }, resizeableProps, { className: classes, style: {
58
+ position: stylePosition,
59
+ }, boundsByDirection: true, bounds: "parent", enable: {
60
+ top: false,
61
+ right: position === 'left',
62
+ bottom: false,
63
+ left: position === 'right',
64
+ topRight: false,
65
+ bottomRight: false,
66
+ bottomLeft: false,
67
+ topLeft: false,
68
+ } }, { children: contents })));
69
+ }
70
+ return (_jsx("div", Object.assign({}, props, { style: { minWidth: `${minWidth}px` }, className: classes }, { children: contents })));
71
+ };
72
+ const Header = (_a) => {
73
+ var { children, className = '' } = _a, rest = __rest(_a, ["children", "className"]);
74
+ const classes = classNames('ndl-drawer-header', className);
75
+ return (_jsx("h5", Object.assign({}, rest, { className: classes }, { children: children })));
76
+ };
77
+ Drawer.Header = Header;
78
+ const Actions = (_a) => {
79
+ var { children, className = '' } = _a, rest = __rest(_a, ["children", "className"]);
80
+ const classes = classNames('ndl-drawer-actions', className);
81
+ return (_jsx("div", Object.assign({}, rest, { className: classes }, { children: children })));
82
+ };
83
+ Drawer.Actions = Actions;
84
+ export default Drawer;
85
+ //# sourceMappingURL=Drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/drawer/Drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAA4B,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AA6B5C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAWT,EAAE,EAAE;QAXK,EACrB,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,gBAAgB,EAChB,QAAQ,GAAG,MAAM,EACjB,IAAI,GAAG,SAAS,EAChB,YAAY,GAAG,KAAK,EACpB,eAAe,EACf,QAAQ,GAAG,GAAG,OAEF,EADT,KAAK,cAVa,4HAWtB,CADS;IAER,MAAM,mBAAmB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC3C,IAAI,gBAAgB;YAAE,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEjC,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,SAAS,EAAE;QAClD,qBAAqB,EAAE,QAAQ;QAC/B,iBAAiB,EAAE,QAAQ,KAAK,MAAM;QACtC,kBAAkB,EAAE,QAAQ,KAAK,OAAO;QACxC,oBAAoB,EAAE,IAAI,KAAK,SAAS;Q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IF,MAAM,MAAM,GAAG,CAAC,EAAwD,EAAE,EAAE;QAA5D,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,OAA8B,EAAzB,IAAI,cAAnC,yBAAqC,CAAF;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;IAC3D,OAAO,CACL,6BAAQ,IAAI,IAAE,SAAS,EAAE,OAAO,gBAC7B,QAAQ,IACN,CACN,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;AAIvB,MAAM,OAAO,GAAG,CAAC,EAAyD,EAAE,EAAE;QAA7D,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,OAA+B,EAA1B,IAAI,cAAnC,yBAAqC,CAAF;IAClD,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAE5D,OAAO,CACL,8BAAS,IAAI,IAAE,SAAS,EAAE,OAAO,gBAC9B,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;AAEzB,eAAe,MAAM,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ export * from './Drawer';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,UAAU,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ import '@testing-library/jest-dom';
22
+ //# sourceMappingURL=setupTests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,2BAA2B,CAAC"}