aldehyde 0.2.281 → 0.2.283
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/detail/edit/dtmpl-edit.js +0 -3
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/view/dtmpl-view.js +0 -2
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/dtmpl-form.js +2 -2
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/form/form-Item-group.d.ts +1 -0
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/form-Item-group.js +13 -10
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/lowcode-components/border/border1/index.d.ts +14 -0
- package/lib/lowcode-components/border/border1/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border1/index.js +39 -0
- package/lib/lowcode-components/border/border1/index.js.map +1 -0
- package/lib/lowcode-components/border/border10/index.d.ts +19 -0
- package/lib/lowcode-components/border/border10/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border10/index.js +16 -0
- package/lib/lowcode-components/border/border10/index.js.map +1 -0
- package/lib/lowcode-components/border/border10/index.less +27 -0
- package/lib/lowcode-components/border/border11/index.d.ts +25 -0
- package/lib/lowcode-components/border/border11/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border11/index.js +95 -0
- package/lib/lowcode-components/border/border11/index.js.map +1 -0
- package/lib/lowcode-components/border/border11/index.less +18 -0
- package/lib/lowcode-components/border/border12/index.d.ts +20 -0
- package/lib/lowcode-components/border/border12/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border12/index.js +49 -0
- package/lib/lowcode-components/border/border12/index.js.map +1 -0
- package/lib/lowcode-components/border/border12/index.less +14 -0
- package/lib/lowcode-components/border/border13/index.d.ts +19 -0
- package/lib/lowcode-components/border/border13/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border13/index.js +29 -0
- package/lib/lowcode-components/border/border13/index.js.map +1 -0
- package/lib/lowcode-components/border/border13/index.less +14 -0
- package/lib/lowcode-components/border/border2/index.d.ts +19 -0
- package/lib/lowcode-components/border/border2/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border2/index.js +27 -0
- package/lib/lowcode-components/border/border2/index.js.map +1 -0
- package/lib/lowcode-components/border/border2/index.less +18 -0
- package/lib/lowcode-components/border/border3/index.d.ts +19 -0
- package/lib/lowcode-components/border/border3/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border3/index.js +27 -0
- package/lib/lowcode-components/border/border3/index.js.map +1 -0
- package/lib/lowcode-components/border/border3/index.less +26 -0
- package/lib/lowcode-components/border/border4/index.d.ts +20 -0
- package/lib/lowcode-components/border/border4/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border4/index.js +32 -0
- package/lib/lowcode-components/border/border4/index.js.map +1 -0
- package/lib/lowcode-components/border/border4/index.less +73 -0
- package/lib/lowcode-components/border/border5/index.d.ts +20 -0
- package/lib/lowcode-components/border/border5/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border5/index.js +28 -0
- package/lib/lowcode-components/border/border5/index.js.map +1 -0
- package/lib/lowcode-components/border/border5/index.less +36 -0
- package/lib/lowcode-components/border/border6/index.d.ts +19 -0
- package/lib/lowcode-components/border/border6/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border6/index.js +36 -0
- package/lib/lowcode-components/border/border6/index.js.map +1 -0
- package/lib/lowcode-components/border/border6/index.less +18 -0
- package/lib/lowcode-components/border/border7/index.d.ts +19 -0
- package/lib/lowcode-components/border/border7/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border7/index.js +33 -0
- package/lib/lowcode-components/border/border7/index.js.map +1 -0
- package/lib/lowcode-components/border/border7/index.less +27 -0
- package/lib/lowcode-components/border/border8/index.d.ts +21 -0
- package/lib/lowcode-components/border/border8/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border8/index.js +43 -0
- package/lib/lowcode-components/border/border8/index.js.map +1 -0
- package/lib/lowcode-components/border/border8/index.less +14 -0
- package/lib/lowcode-components/border/border9/index.d.ts +20 -0
- package/lib/lowcode-components/border/border9/index.d.ts.map +1 -0
- package/lib/lowcode-components/border/border9/index.js +60 -0
- package/lib/lowcode-components/border/border9/index.js.map +1 -0
- package/lib/lowcode-components/border/border9/index.less +14 -0
- package/lib/lowcode-components/effectScatter-map/index.d.ts +25 -0
- package/lib/lowcode-components/effectScatter-map/index.d.ts.map +1 -0
- package/lib/lowcode-components/effectScatter-map/index.js +108 -0
- package/lib/lowcode-components/effectScatter-map/index.js.map +1 -0
- package/lib/lowcode-components/index.d.ts +28 -0
- package/lib/lowcode-components/index.d.ts.map +1 -1
- package/lib/lowcode-components/index.js +28 -0
- package/lib/lowcode-components/index.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/assets.d.ts.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/assets.js +112 -0
- package/lib/lowcode-components/lowcode-view/component/assets.js.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts +12 -12
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +4 -2
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +1 -0
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +8 -0
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +1 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +3 -3
- package/src/aldehyde/detail/view/dtmpl-view.tsx +9 -9
- package/src/aldehyde/form/dtmpl-form.tsx +3 -1
- package/src/aldehyde/form/form-Item-group.tsx +14 -12
- package/src/aldehyde/lowcode-components/border/border1/index.tsx +71 -0
- package/src/aldehyde/lowcode-components/border/border10/index.less +27 -0
- package/src/aldehyde/lowcode-components/border/border10/index.tsx +46 -0
- package/src/aldehyde/lowcode-components/border/border11/index.less +18 -0
- package/src/aldehyde/lowcode-components/border/border11/index.tsx +232 -0
- package/src/aldehyde/lowcode-components/border/border12/index.less +14 -0
- package/src/aldehyde/lowcode-components/border/border12/index.tsx +115 -0
- package/src/aldehyde/lowcode-components/border/border13/index.less +14 -0
- package/src/aldehyde/lowcode-components/border/border13/index.tsx +69 -0
- package/src/aldehyde/lowcode-components/border/border2/index.less +18 -0
- package/src/aldehyde/lowcode-components/border/border2/index.tsx +51 -0
- package/src/aldehyde/lowcode-components/border/border3/index.less +26 -0
- package/src/aldehyde/lowcode-components/border/border3/index.tsx +61 -0
- package/src/aldehyde/lowcode-components/border/border4/index.less +73 -0
- package/src/aldehyde/lowcode-components/border/border4/index.tsx +79 -0
- package/src/aldehyde/lowcode-components/border/border5/index.less +36 -0
- package/src/aldehyde/lowcode-components/border/border5/index.tsx +75 -0
- package/src/aldehyde/lowcode-components/border/border6/index.less +18 -0
- package/src/aldehyde/lowcode-components/border/border6/index.tsx +60 -0
- package/src/aldehyde/lowcode-components/border/border7/index.less +27 -0
- package/src/aldehyde/lowcode-components/border/border7/index.tsx +75 -0
- package/src/aldehyde/lowcode-components/border/border8/index.less +14 -0
- package/src/aldehyde/lowcode-components/border/border8/index.tsx +84 -0
- package/src/aldehyde/lowcode-components/border/border9/index.less +14 -0
- package/src/aldehyde/lowcode-components/border/border9/index.tsx +154 -0
- package/src/aldehyde/lowcode-components/effectScatter-map/index.tsx +133 -0
- package/src/aldehyde/lowcode-components/index.ts +42 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/assets.ts +112 -0
- package/src/aldehyde/module/dtmpl-edit-page.tsx +7 -3
- package/src/aldehyde/tmpl/hcservice-v3.tsx +8 -0
- package/src/aldehyde/tmpl/interface.tsx +1 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef, useImperativeHandle, useState } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
|
|
4
|
+
interface ComponentStyle {
|
|
5
|
+
mainColor?: string;
|
|
6
|
+
subColor?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ComponentProps {
|
|
10
|
+
style?: ComponentStyle;
|
|
11
|
+
base?: { width?: number, height?: number }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ComponentRef {
|
|
15
|
+
updateConfig: (config: ComponentProps) => void;
|
|
16
|
+
}
|
|
17
|
+
const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>) => {
|
|
18
|
+
const [style, setStyle] = useState<ComponentStyle>({ ...props.style });
|
|
19
|
+
const [width, setWidth] = useState<number>(320);
|
|
20
|
+
const [height, setHeight] = useState<number>(200);
|
|
21
|
+
const { mainColor = "#83BFF6", subColor = "#00CED1" } = style || {};
|
|
22
|
+
|
|
23
|
+
useImperativeHandle(ref, () => ({
|
|
24
|
+
updateConfig: (newConfig) => {
|
|
25
|
+
const { width, height } = newConfig.base;
|
|
26
|
+
setStyle({ ...newConfig.style });
|
|
27
|
+
setWidth(width);
|
|
28
|
+
setHeight(height);
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
return <div className="border-box-13" >
|
|
33
|
+
<svg className='border-svg-container' width={width} height={height}>
|
|
34
|
+
<path
|
|
35
|
+
fill="none"
|
|
36
|
+
stroke={mainColor}
|
|
37
|
+
d={`
|
|
38
|
+
M 5 20 L 5 10 L 12 3 L 60 3 L 68 10
|
|
39
|
+
L ${width - 20} 10 L ${width - 5} 25
|
|
40
|
+
L ${width - 5} ${height - 5} L 20 ${height - 5}
|
|
41
|
+
L 5 ${height - 20} L 5 20
|
|
42
|
+
`}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<path
|
|
46
|
+
fill='transparent'
|
|
47
|
+
strokeWidth='3'
|
|
48
|
+
strokeLinecap='round'
|
|
49
|
+
strokeDasharray='10, 5'
|
|
50
|
+
stroke={mainColor}
|
|
51
|
+
d='M 16 9 L 61 9'
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<path
|
|
55
|
+
fill='transparent'
|
|
56
|
+
stroke={subColor}
|
|
57
|
+
d='M 5 20 L 5 10 L 12 3 L 60 3 L 68 10'
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<path
|
|
61
|
+
fill='transparent'
|
|
62
|
+
stroke={subColor}
|
|
63
|
+
d={`M ${width - 5} ${height - 30} L ${width - 5} ${height - 5} L ${width - 30} ${height - 5}`}
|
|
64
|
+
/>
|
|
65
|
+
</svg>
|
|
66
|
+
</div>;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export default Index;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef, useImperativeHandle, useState } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
|
|
4
|
+
interface ComponentStyle {
|
|
5
|
+
mainColor?: string;
|
|
6
|
+
subColor?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ComponentProps {
|
|
10
|
+
style?: ComponentStyle;
|
|
11
|
+
base?: { width?: number, height?: number }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ComponentRef {
|
|
15
|
+
updateConfig: (config: ComponentProps) => void;
|
|
16
|
+
}
|
|
17
|
+
const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>) => {
|
|
18
|
+
const [style, setStyle] = useState<ComponentStyle>({ ...props.style });
|
|
19
|
+
const [width, setWidth] = useState<number>(320);
|
|
20
|
+
const [height, setHeight] = useState<number>(200);
|
|
21
|
+
const { mainColor = "#83BFF6", subColor = "#00CED1" } = style || {};
|
|
22
|
+
|
|
23
|
+
useImperativeHandle(ref, () => ({
|
|
24
|
+
updateConfig: (newConfig) => {
|
|
25
|
+
setStyle({ ...newConfig.style });
|
|
26
|
+
setWidth(newConfig.base.width);
|
|
27
|
+
setHeight(newConfig.base.height);
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
return <div className="border-box-2" >
|
|
32
|
+
<svg className='border-svg-container' width={width} height={height}>
|
|
33
|
+
<polyline
|
|
34
|
+
stroke={mainColor}
|
|
35
|
+
points={`2, 2 ${width - 2} ,2 ${width - 2}, ${height -
|
|
36
|
+
2} 2, ${height - 2} 2, 2`}
|
|
37
|
+
/>
|
|
38
|
+
<polyline
|
|
39
|
+
stroke={subColor}
|
|
40
|
+
points={`6, 6 ${width - 6}, 6 ${width - 6}, ${height -
|
|
41
|
+
6} 6, ${height - 6} 6, 6`}
|
|
42
|
+
/>
|
|
43
|
+
<circle fill={mainColor} cx='11' cy='11' r='1' />
|
|
44
|
+
<circle fill={mainColor} cx={width - 11} cy='11' r='1' />
|
|
45
|
+
<circle fill={mainColor} cx={width - 11} cy={height - 11} r='1' />
|
|
46
|
+
<circle fill={mainColor} cx='11' cy={height - 11} r='1' />
|
|
47
|
+
</svg>
|
|
48
|
+
</div>;
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export default Index;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.border-box-3 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
.border-svg-container {
|
|
7
|
+
position: absolute;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
top: 0px;
|
|
11
|
+
left: 0px;
|
|
12
|
+
|
|
13
|
+
&>polyline {
|
|
14
|
+
fill: none;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bb3-line1 {
|
|
19
|
+
stroke-width: 3;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.bb3-line2 {
|
|
23
|
+
stroke-width: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef, useImperativeHandle, useState } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
|
|
4
|
+
interface ComponentStyle {
|
|
5
|
+
mainColor?: string;
|
|
6
|
+
subColor?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ComponentProps {
|
|
10
|
+
style?: ComponentStyle;
|
|
11
|
+
base?: { width?: number, height?: number }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ComponentRef {
|
|
15
|
+
updateConfig: (config: ComponentProps) => void;
|
|
16
|
+
}
|
|
17
|
+
const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>) => {
|
|
18
|
+
const [style, setStyle] = useState<ComponentStyle>({ ...props.style });
|
|
19
|
+
const [width, setWidth] = useState<number>(320);
|
|
20
|
+
const [height, setHeight] = useState<number>(200);
|
|
21
|
+
const { mainColor = "#83BFF6", subColor = "#00CED1" } = style || {};
|
|
22
|
+
|
|
23
|
+
useImperativeHandle(ref, () => ({
|
|
24
|
+
updateConfig: (newConfig) => {
|
|
25
|
+
setStyle({ ...newConfig.style });
|
|
26
|
+
setWidth(newConfig.base.width);
|
|
27
|
+
setHeight(newConfig.base.height);
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
return <div className="border-box-3" >
|
|
32
|
+
<svg className='border-svg-container' width={width} height={height}>
|
|
33
|
+
<polyline
|
|
34
|
+
className='bb3-line1'
|
|
35
|
+
stroke={mainColor}
|
|
36
|
+
points={`4, 4 ${width - 22} ,4 ${width - 22}, ${height -
|
|
37
|
+
22} 4, ${height - 22} 4, 4`}
|
|
38
|
+
/>
|
|
39
|
+
<polyline
|
|
40
|
+
className='bb3-line2'
|
|
41
|
+
stroke={subColor}
|
|
42
|
+
points={`10, 10 ${width - 16}, 10 ${width - 16}, ${height -
|
|
43
|
+
16} 10, ${height - 16} 10, 10`}
|
|
44
|
+
/>
|
|
45
|
+
<polyline
|
|
46
|
+
className='bb3-line2'
|
|
47
|
+
stroke={subColor}
|
|
48
|
+
points={`16, 16 ${width - 10}, 16 ${width - 10}, ${height -
|
|
49
|
+
10} 16, ${height - 10} 16, 16`}
|
|
50
|
+
/>
|
|
51
|
+
<polyline
|
|
52
|
+
className='bb3-line2'
|
|
53
|
+
stroke={subColor}
|
|
54
|
+
points={`22, 22 ${width - 4}, 22 ${width - 4}, ${height -
|
|
55
|
+
4} 22, ${height - 4} 22, 22`}
|
|
56
|
+
/>
|
|
57
|
+
</svg>
|
|
58
|
+
</div>;
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export default Index;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.border-box-4 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
.reverse {
|
|
7
|
+
transform: rotate(180deg);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.border-svg-container {
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
top: 0px;
|
|
15
|
+
left: 0px;
|
|
16
|
+
|
|
17
|
+
&>polyline {
|
|
18
|
+
fill: none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.sw1 {
|
|
23
|
+
stroke-width: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sw3 {
|
|
27
|
+
stroke-width: 3px;
|
|
28
|
+
stroke-linecap: round;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.bb4-line-1 {
|
|
32
|
+
.sw1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.bb4-line-2 {
|
|
36
|
+
.sw1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.bb4-line-3 {
|
|
40
|
+
.sw3;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.bb4-line-4 {
|
|
44
|
+
.sw3;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.bb4-line-5 {
|
|
48
|
+
.sw1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.bb4-line-6 {
|
|
52
|
+
.sw1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bb4-line-7 {
|
|
56
|
+
.sw1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bb4-line-8 {
|
|
60
|
+
.sw3;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.bb4-line-9 {
|
|
64
|
+
.sw3;
|
|
65
|
+
stroke-dasharray: 100 250;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.bb4-line-10 {
|
|
69
|
+
.sw1;
|
|
70
|
+
stroke-dasharray: 80 270;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef, useImperativeHandle, useState } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
|
|
4
|
+
interface ComponentStyle {
|
|
5
|
+
mainColor?: string;
|
|
6
|
+
subColor?: string;
|
|
7
|
+
reverse?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ComponentProps {
|
|
11
|
+
style?: ComponentStyle;
|
|
12
|
+
base?: { width?: number, height?: number }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ComponentRef {
|
|
16
|
+
updateConfig: (config: ComponentProps) => void;
|
|
17
|
+
}
|
|
18
|
+
const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>) => {
|
|
19
|
+
const [style, setStyle] = useState<ComponentStyle>({ ...props.style });
|
|
20
|
+
const [width, setWidth] = useState<number>(320);
|
|
21
|
+
const [height, setHeight] = useState<number>(200);
|
|
22
|
+
const { mainColor = "#83BFF6", subColor = "#00CED1", reverse } = style || {};
|
|
23
|
+
|
|
24
|
+
useImperativeHandle(ref, () => ({
|
|
25
|
+
updateConfig: (newConfig) => {
|
|
26
|
+
const { width, height } = newConfig.base;
|
|
27
|
+
setStyle({ ...newConfig.style });
|
|
28
|
+
setWidth(width);
|
|
29
|
+
setHeight(height);
|
|
30
|
+
},
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
return <div className="border-box-4" >
|
|
34
|
+
<svg
|
|
35
|
+
className={`border-svg-container ${reverse && 'reverse'}`}
|
|
36
|
+
width={width}
|
|
37
|
+
height={height}
|
|
38
|
+
>
|
|
39
|
+
<polyline
|
|
40
|
+
className='bb4-line-1'
|
|
41
|
+
stroke={mainColor}
|
|
42
|
+
points={`145, ${height - 5} 40, ${height - 5} 10, ${height - 35}
|
|
43
|
+
10, 40 40, 5 150, 5 170, 20 ${width - 15}, 20`}
|
|
44
|
+
/>
|
|
45
|
+
<polyline
|
|
46
|
+
className='bb4-line-2'
|
|
47
|
+
stroke={subColor}
|
|
48
|
+
points={`245, ${height - 1} 36, ${height - 1} 14, ${height - 23}
|
|
49
|
+
14, ${height - 100}`}
|
|
50
|
+
/>
|
|
51
|
+
<polyline
|
|
52
|
+
className='bb4-line-3'
|
|
53
|
+
stroke={mainColor}
|
|
54
|
+
points={`7, ${height - 40} 7, ${height - 75}`}
|
|
55
|
+
/>
|
|
56
|
+
<polyline className='bb4-line-4' stroke={mainColor} points={`28, 24 13, 41 13, 64`} />
|
|
57
|
+
<polyline className='bb4-line-5' stroke={mainColor} points={`5, 45 5, 140`} />
|
|
58
|
+
<polyline className='bb4-line-6' stroke={subColor} points={`14, 75 14, 180`} />
|
|
59
|
+
<polyline
|
|
60
|
+
className='bb4-line-7'
|
|
61
|
+
stroke={subColor}
|
|
62
|
+
points={`55, 11 147, 11 167, 26 250, 26`}
|
|
63
|
+
/>
|
|
64
|
+
<polyline className='bb4-line-8' stroke={subColor} points={`158, 5 173, 16`} />
|
|
65
|
+
<polyline
|
|
66
|
+
className='bb4-line-9'
|
|
67
|
+
stroke={mainColor}
|
|
68
|
+
points={`200, 17 ${width - 10}, 17`}
|
|
69
|
+
/>
|
|
70
|
+
<polyline
|
|
71
|
+
className='bb4-line-10'
|
|
72
|
+
stroke={subColor}
|
|
73
|
+
points={`385, 17 ${width - 10}, 17`}
|
|
74
|
+
/>
|
|
75
|
+
</svg>
|
|
76
|
+
</div>;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export default Index;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.border-box-5 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
.reverse {
|
|
7
|
+
transform: rotate(180deg);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.border-svg-container {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0px;
|
|
13
|
+
left: 0px;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
|
|
17
|
+
&>polyline {
|
|
18
|
+
fill: none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.bb5-line-1,
|
|
23
|
+
.bb5-line-2 {
|
|
24
|
+
stroke-width: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.bb5-line-3,
|
|
28
|
+
.bb5-line-6 {
|
|
29
|
+
stroke-width: 5;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.bb5-line-4,
|
|
33
|
+
.bb5-line-5 {
|
|
34
|
+
stroke-width: 2;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef, useImperativeHandle, useState } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
|
|
4
|
+
interface ComponentStyle {
|
|
5
|
+
mainColor?: string;
|
|
6
|
+
subColor?: string;
|
|
7
|
+
reverse?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ComponentProps {
|
|
11
|
+
style?: ComponentStyle;
|
|
12
|
+
base?: { width?: number, height?: number }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ComponentRef {
|
|
16
|
+
updateConfig: (config: ComponentProps) => void;
|
|
17
|
+
}
|
|
18
|
+
const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>) => {
|
|
19
|
+
const [style, setStyle] = useState<ComponentStyle>({ ...props.style });
|
|
20
|
+
const [width, setWidth] = useState<number>(320);
|
|
21
|
+
const [height, setHeight] = useState<number>(200);
|
|
22
|
+
const { mainColor = "#83BFF6", subColor = "#00CED1", reverse } = style || {};
|
|
23
|
+
|
|
24
|
+
useImperativeHandle(ref, () => ({
|
|
25
|
+
updateConfig: (newConfig) => {
|
|
26
|
+
const { width, height } = newConfig.base;
|
|
27
|
+
setStyle({ ...newConfig.style });
|
|
28
|
+
setWidth(width);
|
|
29
|
+
setHeight(height);
|
|
30
|
+
},
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
return <div className="border-box-5" >
|
|
34
|
+
<svg
|
|
35
|
+
className={`border-svg-container ${reverse && 'reverse'}`}
|
|
36
|
+
width={width}
|
|
37
|
+
height={height}
|
|
38
|
+
>
|
|
39
|
+
<polyline
|
|
40
|
+
className='bb5-line-1'
|
|
41
|
+
stroke={mainColor}
|
|
42
|
+
points={`8, 5 ${width - 5}, 5 ${width - 5}, ${height - 100}
|
|
43
|
+
${width - 100}, ${height - 5} 8, ${height - 5} 8, 5`}
|
|
44
|
+
/>
|
|
45
|
+
<polyline
|
|
46
|
+
className='bb5-line-2'
|
|
47
|
+
stroke={subColor}
|
|
48
|
+
points={`3, 5 ${width - 20}, 5 ${width - 20}, ${height - 60}
|
|
49
|
+
${width - 74}, ${height - 5} 3, ${height - 5} 3, 5`}
|
|
50
|
+
/>
|
|
51
|
+
<polyline
|
|
52
|
+
className='bb5-line-3'
|
|
53
|
+
stroke={subColor}
|
|
54
|
+
points={`50, 13 ${width - 35}, 13`}
|
|
55
|
+
/>
|
|
56
|
+
<polyline
|
|
57
|
+
className='bb5-line-4'
|
|
58
|
+
stroke={subColor}
|
|
59
|
+
points={`15, 20 ${width - 35}, 20`}
|
|
60
|
+
/>
|
|
61
|
+
<polyline
|
|
62
|
+
className='bb5-line-5'
|
|
63
|
+
stroke={subColor}
|
|
64
|
+
points={`15, ${height - 20} ${width - 110}, ${height - 20}`}
|
|
65
|
+
/>
|
|
66
|
+
<polyline
|
|
67
|
+
className='bb5-line-6'
|
|
68
|
+
stroke={subColor}
|
|
69
|
+
points={`15, ${height - 13} ${width - 110}, ${height - 13}`}
|
|
70
|
+
/>
|
|
71
|
+
</svg>
|
|
72
|
+
</div>;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export default Index;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.border-box-6 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
.border-svg-container {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0px;
|
|
9
|
+
left: 0px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
|
|
13
|
+
&>polyline {
|
|
14
|
+
fill: none;
|
|
15
|
+
stroke-width: 1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef, useImperativeHandle, useState } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
|
|
4
|
+
interface ComponentStyle {
|
|
5
|
+
mainColor?: string;
|
|
6
|
+
subColor?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ComponentProps {
|
|
10
|
+
style?: ComponentStyle;
|
|
11
|
+
base?: { width?: number, height?: number }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ComponentRef {
|
|
15
|
+
updateConfig: (config: ComponentProps) => void;
|
|
16
|
+
}
|
|
17
|
+
const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>) => {
|
|
18
|
+
const [style, setStyle] = useState<ComponentStyle>({ ...props.style });
|
|
19
|
+
const [width, setWidth] = useState<number>(320);
|
|
20
|
+
const [height, setHeight] = useState<number>(200);
|
|
21
|
+
const { mainColor = "#83BFF6", subColor = "#00CED1" } = style || {};
|
|
22
|
+
|
|
23
|
+
useImperativeHandle(ref, () => ({
|
|
24
|
+
updateConfig: (newConfig) => {
|
|
25
|
+
const { width, height } = newConfig.base;
|
|
26
|
+
setStyle({ ...newConfig.style });
|
|
27
|
+
setWidth(width);
|
|
28
|
+
setHeight(height);
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
return <div className="border-box-6" >
|
|
33
|
+
<svg className='border-svg-container' width={width} height={height}>
|
|
34
|
+
<circle fill={subColor} cx='5' cy='5' r='2' />
|
|
35
|
+
<circle fill={subColor} cx={width - 5} cy='5' r='2' />
|
|
36
|
+
<circle fill={subColor} cx={width - 5} cy={height - 5} r='2' />
|
|
37
|
+
<circle fill={subColor} cx='5' cy={height - 5} r='2' />
|
|
38
|
+
<polyline stroke={mainColor} points={`10, 4 ${width - 10}, 4`} />
|
|
39
|
+
<polyline stroke={mainColor} points={`10, ${height - 4} ${width - 10}, ${height - 4}`} />
|
|
40
|
+
<polyline stroke={mainColor} points={`5, 70 5, ${height - 70}`} />
|
|
41
|
+
<polyline stroke={mainColor} points={`${width - 5}, 70 ${width - 5}, ${height - 70}`} />
|
|
42
|
+
<polyline stroke={mainColor} points={`3, 10, 3, 50`} />
|
|
43
|
+
<polyline stroke={mainColor} points={`7, 30 7, 80`} />
|
|
44
|
+
<polyline stroke={mainColor} points={`${width - 3}, 10 ${width - 3}, 50`} />
|
|
45
|
+
<polyline stroke={mainColor} points={`${width - 7}, 30 ${width - 7}, 80`} />
|
|
46
|
+
<polyline stroke={mainColor} points={`3, ${height - 10} 3, ${height - 50}`} />
|
|
47
|
+
<polyline stroke={mainColor} points={`7, ${height - 30} 7, ${height - 80}`} />
|
|
48
|
+
<polyline
|
|
49
|
+
stroke={mainColor}
|
|
50
|
+
points={`${width - 3}, ${height - 10} ${width - 3}, ${height - 50}`}
|
|
51
|
+
/>
|
|
52
|
+
<polyline
|
|
53
|
+
stroke={mainColor}
|
|
54
|
+
points={`${width - 7}, ${height - 30} ${width - 7}, ${height - 80}`}
|
|
55
|
+
/>
|
|
56
|
+
</svg>
|
|
57
|
+
</div>;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export default Index;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.border-box-7 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
.border-svg-container {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0px;
|
|
9
|
+
left: 0px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
|
|
13
|
+
&>polyline {
|
|
14
|
+
fill: none;
|
|
15
|
+
stroke-linecap: round;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.bb7-line-width-2 {
|
|
20
|
+
stroke-width: 2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.bb7-line-width-5 {
|
|
24
|
+
stroke-width: 5;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef, useImperativeHandle, useState } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
|
|
4
|
+
interface ComponentStyle {
|
|
5
|
+
mainColor?: string;
|
|
6
|
+
subColor?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ComponentProps {
|
|
10
|
+
style?: ComponentStyle;
|
|
11
|
+
base?: { width?: number, height?: number }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ComponentRef {
|
|
15
|
+
updateConfig: (config: ComponentProps) => void;
|
|
16
|
+
}
|
|
17
|
+
const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>) => {
|
|
18
|
+
const [style, setStyle] = useState<ComponentStyle>({ ...props.style });
|
|
19
|
+
const [width, setWidth] = useState<number>(320);
|
|
20
|
+
const [height, setHeight] = useState<number>(200);
|
|
21
|
+
const { mainColor = "#83BFF6", subColor = "#00CED1" } = style || {};
|
|
22
|
+
|
|
23
|
+
useImperativeHandle(ref, () => ({
|
|
24
|
+
updateConfig: (newConfig) => {
|
|
25
|
+
const { width, height } = newConfig.base;
|
|
26
|
+
setStyle({ ...newConfig.style });
|
|
27
|
+
setWidth(width);
|
|
28
|
+
setHeight(height);
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
return <div className="border-box-7" style={{
|
|
33
|
+
boxShadow: `inset 0 0 40px ${mainColor}`,
|
|
34
|
+
border: `1px solid ${mainColor}`
|
|
35
|
+
}} >
|
|
36
|
+
<svg className='border-svg-container' width={width} height={height}>
|
|
37
|
+
<polyline className='bb7-line-width-2' stroke={mainColor} points={`0, 25 0, 0 25, 0`} />
|
|
38
|
+
<polyline
|
|
39
|
+
className='bb7-line-width-2'
|
|
40
|
+
stroke={mainColor}
|
|
41
|
+
points={`${width - 25}, 0 ${width}, 0 ${width}, 25`}
|
|
42
|
+
/>
|
|
43
|
+
<polyline
|
|
44
|
+
className='bb7-line-width-2'
|
|
45
|
+
stroke={mainColor}
|
|
46
|
+
points={`${width -
|
|
47
|
+
25}, ${height} ${width}, ${height} ${width}, ${height - 25}`}
|
|
48
|
+
/>
|
|
49
|
+
<polyline
|
|
50
|
+
className='bb7-line-width-2'
|
|
51
|
+
stroke={mainColor}
|
|
52
|
+
points={`0, ${height - 25} 0, ${height} 25, ${height}`}
|
|
53
|
+
/>
|
|
54
|
+
<polyline className='bb7-line-width-5' stroke={subColor} points={`0, 10 0, 0 10, 0`} />
|
|
55
|
+
<polyline
|
|
56
|
+
className='bb7-line-width-5'
|
|
57
|
+
stroke={subColor}
|
|
58
|
+
points={`${width - 10}, 0 ${width}, 0 ${width}, 10`}
|
|
59
|
+
/>
|
|
60
|
+
<polyline
|
|
61
|
+
className='bb7-line-width-5'
|
|
62
|
+
stroke={subColor}
|
|
63
|
+
points={`${width -
|
|
64
|
+
10}, ${height} ${width}, ${height} ${width}, ${height - 10}`}
|
|
65
|
+
/>
|
|
66
|
+
<polyline
|
|
67
|
+
className='bb7-line-width-5'
|
|
68
|
+
stroke={subColor}
|
|
69
|
+
points={`0, ${height - 10} 0, ${height} 10, ${height}`}
|
|
70
|
+
/>
|
|
71
|
+
</svg>
|
|
72
|
+
</div>;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export default Index;
|