@cyber-harbour/ui 1.0.45 → 1.0.47
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/dist/index.d.mts +89 -22
- package/dist/index.d.ts +89 -22
- package/dist/index.js +121 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +149 -151
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -3
- package/src/Core/IconComponents/BusIcon.tsx +16 -0
- package/src/Core/IconComponents/CarIcon.tsx +16 -0
- package/src/Core/IconComponents/FileIcon.tsx +16 -0
- package/src/Core/IconComponents/PlaneIcon.tsx +16 -0
- package/src/Core/IconComponents/ShipIcon.tsx +33 -0
- package/src/Core/IconComponents/WayIcon.tsx +24 -0
- package/src/Core/IconComponents/index.ts +6 -0
- package/src/Graph2D/Graph2D.tsx +1439 -913
- package/src/Graph2D/GraphLoader.tsx +0 -4
- package/src/Graph2D/json_test.json +44443 -3684
- package/src/Graph2D/types.ts +69 -21
- package/src/Theme/themes/dark.ts +1 -0
- package/src/Theme/themes/light.ts +1 -0
- package/src/Theme/types.ts +1 -0
- package/dist/eye_light-3WS4REO5.png +0 -0
- package/dist/eye_light_hover-PVS4UAB4.png +0 -0
- package/dist/group_light-RVCSCGRJ.png +0 -0
- package/dist/group_light_hover-LVI5PRZM.png +0 -0
- /package/src/Graph2D/{eye_light.png → icons/eye_light.png} +0 -0
- /package/src/Graph2D/{eye_light_hover.png → icons/eye_light_hover.png} +0 -0
- /package/src/Graph2D/{group_light.png → icons/group_light.png} +0 -0
- /package/src/Graph2D/{group_light_hover.png → icons/group_light_hover.png} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyber-harbour/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"description": "",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"d3": "^7.9.0",
|
|
31
|
+
"lodash.clonedeep": "^4.5.0",
|
|
32
32
|
"react-content-loader": "^7.0.2",
|
|
33
33
|
"react-force-graph-2d": "^1.27.1",
|
|
34
34
|
"react-tiny-popover": "^8.1.6",
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"@storybook/react": "^8.6.14",
|
|
48
48
|
"@storybook/react-vite": "^8.6.14",
|
|
49
49
|
"@storybook/test": "^8.6.14",
|
|
50
|
+
"@types/d3": "^7.4.3",
|
|
51
|
+
"@types/lodash.clonedeep": "^4.5.9",
|
|
50
52
|
"@types/styled-components": "^5.1.34",
|
|
51
53
|
"@vitest/browser": "^3.1.3",
|
|
52
54
|
"@vitest/coverage-v8": "^3.1.3",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
interface BusIconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
fill?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const BusIcon = ({ fill = 'currentColor', ...props }: BusIconProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
d="M15.8835 15.1402H14.4635V15.9702C14.4635 15.9702 14.3735 16.1502 14.3635 16.1702C14.2835 16.2902 14.1435 16.4002 14.0135 16.4402C13.7735 16.5202 12.5035 16.5102 12.2335 16.4702C12.0435 16.4402 11.6635 16.1802 11.6635 15.9602V15.1302H5.28346V15.9602C5.28346 16.1202 4.97346 16.3902 4.82346 16.4302C4.58346 16.5102 3.31346 16.5002 3.04346 16.4602C2.86346 16.4302 2.47346 16.1702 2.47346 15.9502V15.1202H1.04346V2.61023C1.04346 2.13023 1.58346 1.66023 1.97346 1.52023C3.71346 0.870232 6.25346 0.560232 8.10346 0.500232C10.1135 0.440232 13.1635 0.710232 15.0335 1.50023C15.3735 1.64023 15.8835 2.13023 15.8835 2.55023V15.1402ZM11.3035 1.85023H5.62346V3.16023H11.3035V1.85023ZM3.46346 5.16023C3.10346 5.22023 2.84346 5.42023 2.81346 5.83023C2.73346 6.93023 2.87346 8.14023 2.81346 9.26023C2.84346 9.46023 3.02346 9.68023 3.18346 9.76023C3.22346 9.78023 3.42346 9.84023 3.46346 9.84023H8.07346C8.07346 9.84023 8.11346 9.80023 8.11346 9.79023V5.21023L8.07346 5.16023H3.46346ZM8.85346 5.16023C8.85346 5.16023 8.81346 5.20023 8.81346 5.21023V9.79023L8.85346 9.84023H13.4635C13.4635 9.84023 13.6935 9.78023 13.7435 9.76023C13.9135 9.68023 14.0935 9.46023 14.1135 9.26023C14.0635 8.14023 14.1935 6.94023 14.1135 5.83023C14.0935 5.58023 13.9635 5.34023 13.7335 5.24023C13.6835 5.22023 13.4935 5.16023 13.4535 5.16023H8.84346H8.85346ZM13.7335 11.8102C12.3035 11.8502 12.3835 13.9202 13.8135 13.8602C15.2435 13.8002 15.1435 11.7702 13.7335 11.8102ZM2.35346 13.5002C2.87346 14.0702 3.97346 13.9402 4.21346 13.1402C4.51346 12.1402 3.39346 11.5402 2.62346 11.9602C2.08346 12.2502 1.91346 13.0202 2.35346 13.5002ZM11.5535 12.3802C11.7535 12.1702 11.6035 11.8602 11.3435 11.8302H5.57346C5.21346 11.8802 5.17346 12.3402 5.50346 12.4602C7.46346 12.5002 9.44346 12.5002 11.4035 12.4602C11.4435 12.4402 11.5135 12.4102 11.5435 12.3802H11.5535ZM5.58346 13.1502C5.12346 13.2702 5.21346 13.8002 5.66346 13.8302H11.2535C11.7635 13.7802 11.7635 13.2202 11.2835 13.1402H5.58346V13.1502Z"
|
|
12
|
+
fill={fill}
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
interface CarIconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
fill?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const CarIcon = ({ fill = 'currentColor', ...props }: CarIconProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg viewBox="0 0 17 15" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
d="M16.3207 7.62978H14.8107C15.2007 8.67978 15.4507 8.61978 16.4807 8.42978C16.5807 8.88978 16.7107 9.77978 16.3207 10.1298C16.0607 10.3698 15.4907 10.3398 15.2907 10.5298C15.1907 10.6298 15.1007 10.9998 14.9307 11.2098C14.0907 12.2898 12.3407 11.9398 11.9307 10.6598L5.78065 10.6398C5.38065 11.8998 3.61065 12.2898 2.78065 11.2398C2.67065 11.0998 2.48065 10.5998 2.45065 10.5798C2.34065 10.5098 1.57065 10.5098 1.27065 10.3698C0.840652 10.1798 0.670652 9.77978 0.630652 9.33978C0.590652 8.85978 0.550652 6.87978 0.650652 6.48978C0.820652 5.82978 2.18065 5.35978 2.63065 4.95978C2.86065 4.74978 3.11065 4.31978 3.34065 4.07978C4.43065 2.94978 5.16065 3.12978 6.65065 3.15978C8.26065 3.19978 10.1107 3.09978 11.3507 4.19978C11.6807 4.48978 12.1507 5.22978 12.3907 5.38978C12.8607 5.68978 14.3707 5.95978 15.0107 6.18978C15.8107 6.48978 16.1207 6.73978 16.3207 7.61978V7.62978ZM7.07065 4.20978C6.52065 4.28978 5.97065 4.07978 5.43065 4.12978C4.61065 4.19978 4.10065 5.12978 3.88065 5.83978L7.07065 5.95978V4.20978ZM9.42065 4.28978C9.01065 4.23978 8.52065 4.32978 8.10065 4.28978V6.03978L11.6907 6.11978C11.1407 5.29978 10.4807 4.41978 9.42065 4.28978ZM3.86065 9.39978C3.05065 9.60978 3.26065 10.9798 4.20065 10.8598C5.23065 10.7198 4.93065 9.11978 3.86065 9.39978ZM13.3407 9.39978C12.3307 9.62978 12.9507 11.3198 13.9107 10.7698C14.6807 10.3298 14.2507 9.19978 13.3407 9.39978Z"
|
|
12
|
+
fill={fill}
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
interface FileIconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
fill?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const FileIcon = ({ fill = 'currentColor', ...props }: FileIconProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
d="M16 0.5V11.68L11.19 16.49H0V0.5H16ZM14.49 2.01H1.51V14.98H10.21V10.7H14.5V2.01H14.49ZM13.45 12.09H11.59V13.94L13.45 12.09Z"
|
|
12
|
+
fill={fill}
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
interface PlaneIconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
fill?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const PlaneIcon = ({ fill = 'currentColor', ...props }: PlaneIconProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
d="M14.2452 7.25014C14.3752 7.87014 14.5152 8.50014 14.6752 9.14014C14.7052 9.28014 14.7452 9.42014 14.7752 9.56014C14.8852 10.0901 15.0052 10.6101 15.1152 11.1401L16.1052 15.5401L15.1652 16.4901L10.8852 9.06014C9.19516 10.6001 7.51516 12.1501 5.72516 13.5601L6.12516 15.8301L5.17516 16.4901C5.01516 16.3301 4.02516 14.9301 3.92516 14.9301C3.85516 14.9301 2.94516 15.5601 2.77516 15.6501C2.55516 15.7701 2.29516 15.9101 2.06516 16.0001C0.325156 16.6701 1.43516 14.8101 1.82516 14.1601C1.89516 14.0401 2.34516 13.3901 2.35516 13.3401C2.35516 13.2401 0.955156 12.2501 0.795156 12.0901L1.45516 11.1401L3.72516 11.5401C5.13516 9.74014 6.69516 8.07014 8.22516 6.38014L0.785156 2.13014L1.72516 1.18014L6.14516 2.16014L7.72516 2.50014C7.86516 2.54014 8.01516 2.57014 8.15516 2.61014C8.79516 2.76014 9.41516 2.91014 10.0352 3.04014L11.1752 3.28014C12.0252 2.51014 12.6852 1.58014 13.7252 1.05014C14.4952 0.660144 16.3252 0.000143588 16.7152 1.15014C16.9952 1.97014 16.4352 3.30014 15.9852 4.00014C15.4752 4.79014 14.6452 5.40014 14.0152 6.10014L14.2552 7.25014H14.2452Z"
|
|
12
|
+
fill={fill}
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ShipIconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
fill?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const ShipIcon = ({ fill = 'currentColor', ...props }: ShipIconProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
d="M8.93797 6.3098L16.198 10.2298L14.178 14.6598C14.108 14.7198 13.878 14.6798 13.768 14.6998C12.948 14.8098 12.098 15.9798 11.338 15.9798C10.578 15.9798 9.73797 14.7998 8.93797 14.7198L8.91797 8.2998C8.82797 8.0098 8.42797 8.0698 8.41797 8.3798V14.7198C7.59797 14.8098 6.72797 16.0298 5.94797 15.9798C5.21797 15.9298 4.41797 14.8398 3.60797 14.6998C3.49797 14.6798 3.29797 14.6998 3.23797 14.6498L1.16797 10.2798L8.41797 6.2998V7.4098C8.41797 7.6298 8.93797 7.6298 8.93797 7.4098V6.2998V6.3098Z"
|
|
12
|
+
fill={fill}
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
d="M13.7079 5.05V8.28C13.6179 8.26 13.5279 8.21 13.4479 8.17C11.8479 7.33 10.2779 6.42 8.68795 5.58C6.99795 6.46 5.34795 7.43 3.64795 8.28V5.05C5.34795 4.49 7.00795 3.83 8.69795 3.25L13.7179 5.05H13.7079ZM6.79795 4.86C6.72795 4.86 5.99795 5.14 5.94795 5.17C5.75795 5.32 5.87795 5.65 6.16795 5.62C6.24795 5.62 6.91795 5.37 6.97795 5.33C7.17795 5.17 7.05795 4.83 6.79795 4.86ZM10.4779 4.86C10.2479 4.89 10.1679 5.2 10.3779 5.34C10.4579 5.39 11.0279 5.61 11.1279 5.62C11.4579 5.67 11.5979 5.36 11.3779 5.18C11.3079 5.13 10.5479 4.86 10.4779 4.86ZM5.34795 5.44C5.26795 5.46 4.62795 5.7 4.58795 5.74C4.38795 5.92 4.54795 6.22 4.80795 6.19C4.89795 6.18 5.59795 5.92 5.64795 5.87C5.84795 5.69 5.66795 5.38 5.34795 5.44ZM11.6879 5.48C11.5379 5.6 11.6079 5.83 11.7679 5.92C11.8579 5.97 12.4179 6.17 12.5079 6.18C12.8479 6.22 12.9179 5.86 12.7079 5.72C12.6279 5.67 12.0779 5.46 11.9879 5.44C11.8979 5.43 11.7679 5.42 11.6979 5.47L11.6879 5.48Z"
|
|
16
|
+
fill={fill}
|
|
17
|
+
/>
|
|
18
|
+
<path d="M9.57832 0.5V3.02L8.66832 2.69L7.77832 3.02V0.5H9.57832Z" fill={fill} />
|
|
19
|
+
<path
|
|
20
|
+
d="M6.19799 16.5001L6.54799 16.3901C7.23799 16.1701 7.99799 15.1801 8.72799 15.2101C9.41799 15.2401 10.138 16.1801 10.808 16.3901L11.158 16.5001H6.18799H6.19799Z"
|
|
21
|
+
fill={fill}
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="M0.868164 16.4998L1.21816 16.3898C1.85816 16.1398 2.67816 15.2398 3.29816 15.2098C3.91816 15.1798 4.66816 15.9898 5.22816 16.2798L5.79816 16.4998H0.868164Z"
|
|
25
|
+
fill={fill}
|
|
26
|
+
/>
|
|
27
|
+
<path
|
|
28
|
+
d="M11.5481 16.4998L12.1181 16.2798C12.6781 15.9898 13.4281 15.1798 14.0481 15.2098C14.6681 15.2398 15.4881 16.1298 16.1281 16.3898L16.4781 16.4998H11.5381H11.5481Z"
|
|
29
|
+
fill={fill}
|
|
30
|
+
/>
|
|
31
|
+
</svg>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
interface WayIconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
fill?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const WayIcon = ({ fill = 'currentColor', ...props }: WayIconProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
d="M4.55288 16.4902L5.19288 15.5902L5.25288 15.5602H13.4829C14.0529 15.4602 14.2729 15.1002 14.3129 14.5502C14.3429 14.1002 14.3629 12.6102 14.2029 12.2602C14.0729 11.9702 13.7629 11.8002 13.4529 11.7602C11.9129 11.6702 10.2329 11.8802 8.71288 11.7602C8.11288 11.7102 7.49288 11.2902 7.23288 10.7502C6.87288 10.0102 7.13288 8.72016 7.05288 7.88016C7.01288 7.48016 6.73288 7.08016 6.32288 7.03016C5.12288 6.87016 3.72288 7.44016 2.90288 6.18016C2.29288 5.25016 2.74288 3.31016 2.60288 2.21016C2.69288 1.31016 3.37288 0.630158 4.26288 0.530158C5.82288 0.610158 7.48289 0.430158 9.03289 0.530158C9.74289 0.580158 10.3929 1.01016 10.6529 1.69016C10.9729 2.52016 10.6929 3.80016 10.7929 4.70016C10.8929 5.60016 11.9129 5.50016 12.5729 5.51016L13.2229 6.43016C12.4529 6.38016 11.5229 6.57016 10.8229 6.20016C9.38288 5.43016 9.97289 3.69016 9.86288 2.36016C9.82289 1.90016 9.50288 1.53016 9.03289 1.47016C7.53289 1.57016 5.84288 1.33016 4.35288 1.47016C3.93288 1.51016 3.58288 1.85016 3.53288 2.27016C3.59288 3.23016 3.45288 4.29016 3.53288 5.23016C3.65288 6.63016 5.85288 5.84016 6.78288 6.19016C8.55288 6.84016 7.79288 8.76016 7.99288 10.1202C8.05288 10.4902 8.41288 10.8002 8.78288 10.8302C10.2829 10.9702 11.9829 10.7202 13.4929 10.8302C14.3629 10.9002 15.0629 11.5202 15.2229 12.3802C15.1029 13.7402 15.7429 15.6902 14.1229 16.3602C14.0229 16.4002 13.7129 16.5102 13.6229 16.5102H4.55288V16.4902Z"
|
|
12
|
+
fill={fill}
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
d="M14.4627 0.540077C15.8127 0.400077 16.9627 1.53008 16.8727 2.88008C16.8027 3.89008 15.9927 5.15008 15.3427 5.90008C14.9727 6.33008 14.7227 6.65008 14.2227 6.12008C13.5127 5.38008 12.5627 3.89008 12.5127 2.85008C12.4527 1.69008 13.3127 0.650077 14.4727 0.540077H14.4627ZM14.4927 1.94008C13.6427 2.10008 13.7627 3.50008 14.7027 3.49008C15.7827 3.47008 15.6927 1.72008 14.4927 1.94008Z"
|
|
16
|
+
fill={fill}
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M3.0828 10.6104C4.2228 10.6104 5.2128 11.5204 5.2728 12.6704C5.3328 13.8204 4.3928 15.2604 3.6628 16.0804C3.4028 16.3804 3.1228 16.7004 2.7228 16.3304C2.0628 15.7104 1.0928 14.1504 0.942799 13.2504C0.712799 11.8804 1.6528 10.6104 3.0728 10.6104H3.0828ZM2.9928 12.0104C1.9928 12.1304 2.1428 13.6704 3.2028 13.5604C4.1828 13.4504 4.0528 11.8904 2.9928 12.0104Z"
|
|
20
|
+
fill={fill}
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -44,3 +44,9 @@ export { InfoCircleFilledIcon } from './InfoCircleFilled';
|
|
|
44
44
|
export { UnfoldIcon } from './Unfold';
|
|
45
45
|
export { CrossIcon } from './Cross';
|
|
46
46
|
export { MaximizeIcon } from './MaximizeIcon';
|
|
47
|
+
export { BusIcon } from './BusIcon';
|
|
48
|
+
export { CarIcon } from './CarIcon';
|
|
49
|
+
export { WayIcon } from './WayIcon';
|
|
50
|
+
export { PlaneIcon } from './PlaneIcon';
|
|
51
|
+
export { ShipIcon } from './ShipIcon';
|
|
52
|
+
export { FileIcon } from './FileIcon';
|