@neo4j-ndl/react 0.11.1 → 0.12.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,10 +1,23 @@
1
1
  # Change Log
2
2
 
3
- ## 0.11.1
3
+ ## 0.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [f86f81c]
8
+ - @neo4j-ndl/base@0.12.1
9
+
10
+ ## 0.12.0
11
+
12
+ ### Minor Changes
13
+
14
+ - f8af4e5: add link component
4
15
 
5
16
  ### Patch Changes
6
17
 
7
18
  - f2e981e: Fix browse button when drag-and-drop is disabled
19
+ - Updated dependencies [f8af4e5]
20
+ - @neo4j-ndl/base@0.12.0
8
21
 
9
22
  ## 0.11.0
10
23
 
@@ -0,0 +1,50 @@
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
+ const jsx_runtime_1 = require("react/jsx-runtime");
18
+ /**
19
+ *
20
+ * Copyright (c) "Neo4j"
21
+ * Neo4j Sweden AB [http://neo4j.com]
22
+ *
23
+ * This file is part of Neo4j.
24
+ *
25
+ * Neo4j is free software: you can redistribute it and/or modify
26
+ * it under the terms of the GNU General Public License as published by
27
+ * the Free Software Foundation, either version 3 of the License, or
28
+ * (at your option) any later version.
29
+ *
30
+ * This program is distributed in the hope that it will be useful,
31
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
+ * GNU General Public License for more details.
34
+ *
35
+ * You should have received a copy of the GNU General Public License
36
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
37
+ */
38
+ const react_1 = __importDefault(require("react"));
39
+ const classnames_1 = __importDefault(require("classnames"));
40
+ const TextLink = react_1.default.forwardRef(function TextLink(_a, ref) {
41
+ var { text, href, externalLink = false, disabled = false } = _a, props = __rest(_a, ["text", "href", "externalLink", "disabled"]);
42
+ const target = props.target || (externalLink ? '_blank' : '');
43
+ const className = (0, classnames_1.default)('ndl-text-link', props.className, {
44
+ 'ndl-external-link': externalLink,
45
+ 'ndl-disabled-text-link': disabled,
46
+ });
47
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({}, props, { className: className, href: href, ref: ref }, (disabled && { tabIndex: -1 }), (target && { target }), { children: text })));
48
+ });
49
+ exports.default = TextLink;
50
+ //# sourceMappingURL=TextLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAE1B,4DAAoC;AAmBpC,MAAM,QAAQ,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,QAAQ,CACjD,EAMgB,EAChB,GAA0C;QAP1C,EACE,IAAI,EACJ,IAAI,EACJ,YAAY,GAAG,KAAK,EACpB,QAAQ,GAAG,KAAK,OAEF,EADX,KAAK,cALV,4CAMC,CADS;IAIV,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAE9D,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,eAAe,EAAE,KAAK,CAAC,SAAS,EAAE;QAC7D,mBAAmB,EAAE,YAAY;QACjC,wBAAwB,EAAE,QAAQ;KACnC,CAAC,CAAC;IAEH,OAAO,CACL,8CACM,KAAK,IACT,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,IACJ,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAC9B,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC,cAEzB,IAAI,IACH,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,29 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.TextLink = void 0;
27
+ var TextLink_1 = require("./TextLink");
28
+ Object.defineProperty(exports, "TextLink", { enumerable: true, get: function () { return __importDefault(TextLink_1).default; } });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text-link/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,uCAAiD;AAAxC,qHAAA,OAAO,OAAY"}
@@ -0,0 +1,45 @@
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 } 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 React from 'react';
34
+ import classNames from 'classnames';
35
+ const TextLink = React.forwardRef(function TextLink(_a, ref) {
36
+ var { text, href, externalLink = false, disabled = false } = _a, props = __rest(_a, ["text", "href", "externalLink", "disabled"]);
37
+ const target = props.target || (externalLink ? '_blank' : '');
38
+ const className = classNames('ndl-text-link', props.className, {
39
+ 'ndl-external-link': externalLink,
40
+ 'ndl-disabled-text-link': disabled,
41
+ });
42
+ return (_jsx("a", Object.assign({}, props, { className: className, href: href, ref: ref }, (disabled && { tabIndex: -1 }), (target && { target }), { children: text })));
43
+ });
44
+ export default TextLink;
45
+ //# sourceMappingURL=TextLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAmBpC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,QAAQ,CACjD,EAMgB,EAChB,GAA0C;QAP1C,EACE,IAAI,EACJ,IAAI,EACJ,YAAY,GAAG,KAAK,EACpB,QAAQ,GAAG,KAAK,OAEF,EADX,KAAK,cALV,4CAMC,CADS;IAIV,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAE9D,MAAM,SAAS,GAAG,UAAU,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,EAAE;QAC7D,mBAAmB,EAAE,YAAY;QACjC,wBAAwB,EAAE,QAAQ;KACnC,CAAC,CAAC;IAEH,OAAO,CACL,4BACM,KAAK,IACT,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,IACJ,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAC9B,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC,cAEzB,IAAI,IACH,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,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 { default as TextLink } from './TextLink';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text-link/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,37 @@
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 React from 'react';
22
+ import { ElementBase } from '../helpers';
23
+ export interface TextLinkProps extends ElementBase<HTMLAnchorElement> {
24
+ /** The text of the link. */
25
+ text: string;
26
+ /** The hypertex reference. */
27
+ href?: string;
28
+ /**
29
+ * Adds an external-icon and sets the `target` to `"_blank"`.
30
+ * If a `target` is set, the component will use that value instead.
31
+ */
32
+ externalLink?: boolean;
33
+ /** Disable the component; the link will not be focus- or click-able. */
34
+ disabled?: boolean;
35
+ }
36
+ declare const TextLink: React.ForwardRefExoticComponent<TextLinkProps & React.RefAttributes<HTMLAnchorElement>>;
37
+ export default TextLink;
@@ -0,0 +1,21 @@
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 { default as TextLink } from './TextLink';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "0.11.1",
3
+ "version": "0.12.1",
4
4
  "description": "React implementation of Neo4j Design System",
5
5
  "keywords": [
6
6
  "button",
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "dependencies": {
71
71
  "@heroicons/react": "^1.0.5",
72
- "@neo4j-ndl/base": "^0.11.0",
72
+ "@neo4j-ndl/base": "^0.12.1",
73
73
  "classnames": "^2.3.1",
74
74
  "detect-browser": "^5.3.0",
75
75
  "react-dropzone": "^14.0.0",