@neo4j-ndl/react 0.1.1 → 0.1.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/lib/helpers/forwardRef.d.ts +24 -0
- package/lib/helpers/forwardRef.js +26 -0
- package/lib/helpers/forwardRef.js.map +1 -0
- package/lib/helpers/index.d.ts +1 -0
- package/lib/helpers/index.js +1 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/icons/Custom.d.ts +2 -2
- package/lib/icons/Custom.js +2 -1
- package/lib/icons/Custom.js.map +1 -1
- package/lib/icons/Hero.d.ts +2 -2
- package/lib/icons/Hero.js +2 -1
- package/lib/icons/Hero.js.map +1 -1
- package/lib/view-selector/ViewSelector.d.ts +2 -2
- package/lib/view-selector/ViewSelector.js +2 -1
- package/lib/view-selector/ViewSelector.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,24 @@
|
|
|
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 { ForwardedRef, ReactElement, RefAttributes } from 'react';
|
|
22
|
+
declare type ForwardRefType = <T, P = Record<string, never>>(render: (props: P, ref: ForwardedRef<T>) => ReactElement | null) => (props: P & RefAttributes<T>) => ReactElement | null;
|
|
23
|
+
export declare const forwardRef: ForwardRefType;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
exports.__esModule = true;
|
|
23
|
+
exports.forwardRef = void 0;
|
|
24
|
+
var react_1 = require("react");
|
|
25
|
+
exports.forwardRef = react_1.forwardRef;
|
|
26
|
+
//# sourceMappingURL=forwardRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forwardRef.js","sourceRoot":"","sources":["../../src/helpers/forwardRef.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,+BAKe;AAYF,QAAA,UAAU,GAAG,kBAAiC,CAAC"}
|
package/lib/helpers/index.d.ts
CHANGED
package/lib/helpers/index.js
CHANGED
|
@@ -32,4 +32,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
32
32
|
exports.__esModule = true;
|
|
33
33
|
__exportStar(require("./debounce"), exports);
|
|
34
34
|
__exportStar(require("./types"), exports);
|
|
35
|
+
__exportStar(require("./forwardRef"), exports);
|
|
35
36
|
//# sourceMappingURL=index.js.map
|
package/lib/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B"}
|
package/lib/icons/Custom.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import * as CustomIcons from './custom/index';
|
|
23
23
|
declare type CustomIconNames = keyof typeof CustomIcons;
|
|
24
|
-
export declare const CustomIcon:
|
|
24
|
+
export declare const CustomIcon: (props: {
|
|
25
25
|
iconName: CustomIconNames;
|
|
26
|
-
} & React.SVGProps<SVGSVGElement
|
|
26
|
+
} & React.SVGProps<SVGSVGElement> & React.RefAttributes<SVGSVGElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
27
27
|
export default CustomIcon;
|
package/lib/icons/Custom.js
CHANGED
|
@@ -65,9 +65,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
65
65
|
};
|
|
66
66
|
exports.__esModule = true;
|
|
67
67
|
exports.CustomIcon = void 0;
|
|
68
|
+
var helpers_1 = require("../helpers");
|
|
68
69
|
var react_1 = __importDefault(require("react"));
|
|
69
70
|
var CustomIcons = __importStar(require("./custom/index"));
|
|
70
|
-
exports.CustomIcon =
|
|
71
|
+
exports.CustomIcon = (0, helpers_1.forwardRef)(function CustomIcon(_a, ref) {
|
|
71
72
|
var _b = _a.iconName, iconName = _b === void 0 ? 'Drag' : _b, props = __rest(_a, ["iconName"]);
|
|
72
73
|
var IconComponent = CustomIcons[iconName];
|
|
73
74
|
return react_1["default"].createElement(IconComponent, __assign({}, props, { ref: ref }));
|
package/lib/icons/Custom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../src/icons/Custom.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../src/icons/Custom.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sCAAwC;AACxC,gDAAwC;AACxC,0DAA8C;AAIjC,QAAA,UAAU,GAAG,IAAA,oBAAU,EAAC,SAAS,UAAU,CACtD,EAK2B,EAC3B,GAAsC;IALpC,IAAA,gBAAiB,EAAjB,QAAQ,mBAAG,MAAM,KAAA,EACd,KAAK,cAFV,YAGC,CADS;IAMV,IAAM,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,iCAAC,aAAa,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,qBAAe,kBAAU,CAAC"}
|
package/lib/icons/Hero.d.ts
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import * as SolidIcons from '@heroicons/react/solid';
|
|
23
23
|
declare type HeroIconNames = keyof typeof SolidIcons;
|
|
24
|
-
export declare const HeroIcon:
|
|
24
|
+
export declare const HeroIcon: (props: {
|
|
25
25
|
iconName: HeroIconNames;
|
|
26
26
|
type?: "solid" | "outline" | undefined;
|
|
27
|
-
} & React.SVGProps<SVGSVGElement
|
|
27
|
+
} & React.SVGProps<SVGSVGElement> & React.RefAttributes<SVGSVGElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
28
28
|
export default HeroIcon;
|
package/lib/icons/Hero.js
CHANGED
|
@@ -68,7 +68,8 @@ exports.HeroIcon = void 0;
|
|
|
68
68
|
var react_1 = __importDefault(require("react"));
|
|
69
69
|
var OutlinedIcons = __importStar(require("@heroicons/react/outline"));
|
|
70
70
|
var SolidIcons = __importStar(require("@heroicons/react/solid"));
|
|
71
|
-
|
|
71
|
+
var helpers_1 = require("../helpers");
|
|
72
|
+
exports.HeroIcon = (0, helpers_1.forwardRef)(function HeroIcon(_a, ref) {
|
|
72
73
|
var _b = _a.iconName, iconName = _b === void 0 ? 'GlobeAltIcon' : _b, _c = _a.type, type = _c === void 0 ? 'outline' : _c, props = __rest(_a, ["iconName", "type"]);
|
|
73
74
|
var IconComponent;
|
|
74
75
|
switch (type) {
|
package/lib/icons/Hero.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hero.js","sourceRoot":"","sources":["../../src/icons/Hero.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"Hero.js","sourceRoot":"","sources":["../../src/icons/Hero.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAwC;AACxC,sEAA0D;AAC1D,iEAAqD;AACrD,sCAAwC;AAI3B,QAAA,QAAQ,GAAG,IAAA,oBAAU,EAAC,SAAS,QAAQ,CAClD,EAO2B,EAC3B,GAAsC;IAPpC,IAAA,gBAAyB,EAAzB,QAAQ,mBAAG,cAAc,KAAA,EACzB,YAAgB,EAAhB,IAAI,mBAAG,SAAS,KAAA,EACb,KAAK,cAHV,oBAIC,CADS;IAOV,IAAI,aAAa,CAAC;IAElB,QAAQ,IAAI,EAAE;QACZ,KAAK,OAAO;YACV,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YACrC,MAAM;QACR,KAAK,SAAS;YACZ,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;YACxC,MAAM;QACR;YACE,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YACrC,OAAO,CAAC,KAAK,CAAC,2DAAoD,IAAI,CAAE,CAAC,CAAC;KAC7E;IAED,OAAO,iCAAC,aAAa,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,qBAAe,gBAAQ,CAAC"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
-
import { ElementBase } from 'helpers';
|
|
22
|
+
import { ElementBase } from '../helpers';
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
25
25
|
*
|
|
@@ -42,7 +42,7 @@ export interface ViewSelectorProps<T extends ViewSelectorID> extends ElementBase
|
|
|
42
42
|
selected: T;
|
|
43
43
|
children: React.ReactNode | string;
|
|
44
44
|
}
|
|
45
|
-
export declare const ViewSelector:
|
|
45
|
+
export declare const ViewSelector: <T extends ViewSelectorID>(props: ViewSelectorProps<T> & React.RefAttributes<unknown>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
46
46
|
export declare const ViewSelectorItem: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement>, "ref" | "size" | "as" | "selected" | "onChange"> & {
|
|
47
47
|
as?: string | React.ComponentType<any> | undefined;
|
|
48
48
|
} & {
|
|
@@ -67,6 +67,7 @@ exports.__esModule = true;
|
|
|
67
67
|
exports.ViewSelectorItem = exports.ViewSelector = void 0;
|
|
68
68
|
var react_1 = __importStar(require("react"));
|
|
69
69
|
var classnames_1 = __importDefault(require("classnames"));
|
|
70
|
+
var helpers_1 = require("../helpers");
|
|
70
71
|
var ViewSelectorContext = react_1["default"].createContext(null);
|
|
71
72
|
var useSelectorContext = function () {
|
|
72
73
|
var context = (0, react_1.useContext)(ViewSelectorContext);
|
|
@@ -75,7 +76,7 @@ var useSelectorContext = function () {
|
|
|
75
76
|
}
|
|
76
77
|
return context;
|
|
77
78
|
};
|
|
78
|
-
exports.ViewSelector =
|
|
79
|
+
exports.ViewSelector = (0, helpers_1.forwardRef)(function ViewSelector(_a, ref) {
|
|
79
80
|
var _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.icons, icons = _c === void 0 ? false : _c, children = _a.children, selected = _a.selected, onChange = _a.onChange, _d = _a.as, as = _d === void 0 ? 'div' : _d, rest = __rest(_a, ["size", "icons", "children", "selected", "onChange", "as"]);
|
|
80
81
|
var classes = (0, classnames_1["default"])("ndl-view-selector", size);
|
|
81
82
|
var Component = as;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewSelector.js","sourceRoot":"","sources":["../../src/view-selector/ViewSelector.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA0C;AAC1C,0DAAoC;
|
|
1
|
+
{"version":3,"file":"ViewSelector.js","sourceRoot":"","sources":["../../src/view-selector/ViewSelector.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA0C;AAC1C,0DAAoC;AACpC,sCAAqD;AAuCrD,IAAM,mBAAmB,GACvB,kBAAK,CAAC,aAAa,CAAkC,IAAI,CAAC,CAAC;AAE7D,IAAM,kBAAkB,GAA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AAG,KAAK,IAAI,KAAK,KAAK,QAAQ,CAAC;IAE/C,IAAM,IAAI,GAAG,IAAA,uBAAU,EAAC,mBAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAE,EAAE;QAC7D,OAAO,EAAE,KAAK,IAAI,KAAK,KAAK,QAAQ;KACrC,CAAC,CAAC;IAEH,IAAM,SAAS,GAAG,EAAE,CAAC;IAErB,OAAO,CACL,iCAAC,SAAS,eACJ,IAAI,IACR,OAAO,EAAE,cAAM,OAAA,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,CAAC,EAA9B,CAA8B,EAC7C,SAAS,EAAE,IAAI,EACf,GAAG,EAAE,GAAG,KAEP,QAAQ,CACC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "React implementation of Neo4j Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"button",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@heroicons/react": "^1.0.5",
|
|
61
|
-
"@neo4j-ndl/base": "^0.1.
|
|
61
|
+
"@neo4j-ndl/base": "^0.1.2",
|
|
62
62
|
"classnames": "^2.3.1"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "92523886ce954f0930f1d1168e31ceb699b26cac"
|
|
65
65
|
}
|