@thienvu18/designable-react-settings-form 2.0.0 → 2.0.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/esm/SchemaField.d.ts +5115 -1578
- package/esm/SchemaField.js +76 -41
- package/esm/SettingsForm.d.ts +4 -4
- package/esm/SettingsForm.js +99 -49
- package/esm/components/BackgroundStyleSetter/index.d.ts +4 -4
- package/esm/components/BackgroundStyleSetter/index.js +95 -42
- package/esm/components/BorderRadiusStyleSetter/index.d.ts +4 -4
- package/esm/components/BorderRadiusStyleSetter/index.js +13 -10
- package/esm/components/BorderStyleSetter/index.d.ts +5 -5
- package/esm/components/BorderStyleSetter/index.js +121 -68
- package/esm/components/BoxShadowStyleSetter/index.d.ts +6 -6
- package/esm/components/BoxShadowStyleSetter/index.js +72 -24
- package/esm/components/BoxStyleSetter/index.d.ts +7 -7
- package/esm/components/BoxStyleSetter/index.js +98 -46
- package/esm/components/CollapseItem/index.d.ts +6 -6
- package/esm/components/CollapseItem/index.js +35 -15
- package/esm/components/ColorInput/index.d.ts +5 -5
- package/esm/components/ColorInput/index.js +35 -17
- package/esm/components/ColorInput/styles.less +0 -5
- package/esm/components/CornerInput/index.d.ts +7 -7
- package/esm/components/CornerInput/index.js +50 -21
- package/esm/components/DisplayStyleSetter/index.d.ts +7 -7
- package/esm/components/DisplayStyleSetter/index.js +62 -33
- package/esm/components/DrawerSetter/index.d.ts +6 -6
- package/esm/components/DrawerSetter/index.js +82 -42
- package/esm/components/DrawerSetter/styles.less +2 -2
- package/esm/components/FlexStyleSetter/index.d.ts +5 -5
- package/esm/components/FlexStyleSetter/index.js +160 -110
- package/esm/components/FoldItem/index.d.ts +9 -7
- package/esm/components/FoldItem/index.js +80 -46
- package/esm/components/FontStyleSetter/index.d.ts +4 -4
- package/esm/components/FontStyleSetter/index.js +169 -85
- package/esm/components/ImageInput/index.d.ts +7 -7
- package/esm/components/ImageInput/index.js +59 -39
- package/esm/components/InputItems/index.d.ts +19 -17
- package/esm/components/InputItems/index.js +42 -16
- package/esm/components/MonacoInput/config.d.ts +1 -1
- package/esm/components/MonacoInput/config.js +40 -38
- package/esm/components/MonacoInput/format.d.ts +4 -1
- package/esm/components/MonacoInput/format.js +33 -29
- package/esm/components/MonacoInput/index.d.ts +13 -13
- package/esm/components/MonacoInput/index.js +298 -212
- package/esm/components/MonacoInput/themes/chrome.d.ts +44 -38
- package/esm/components/MonacoInput/themes/chrome.js +105 -105
- package/esm/components/MonacoInput/themes/monokai.d.ts +34 -30
- package/esm/components/MonacoInput/themes/monokai.js +139 -139
- package/esm/components/PolyInput/index.d.ts +17 -17
- package/esm/components/PolyInput/index.js +96 -66
- package/esm/components/PositionInput/index.d.ts +7 -7
- package/esm/components/PositionInput/index.js +48 -21
- package/esm/components/PositionInput/styles.less +0 -1
- package/esm/components/SizeInput/index.d.ts +6 -2
- package/esm/components/SizeInput/index.js +44 -46
- package/esm/components/SizeInput/styles.less +0 -1
- package/esm/components/ValueInput/index.d.ts +2 -2
- package/esm/components/ValueInput/index.js +89 -72
- package/esm/components/index.d.ts +20 -20
- package/esm/components/index.js +20 -20
- package/esm/effects/index.d.ts +2 -2
- package/esm/effects/index.js +2 -2
- package/esm/effects/useLocales.d.ts +2 -2
- package/esm/effects/useLocales.js +57 -59
- package/esm/effects/useSnapshot.d.ts +2 -2
- package/esm/effects/useSnapshot.js +9 -9
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/locales/en-US.d.ts +12 -12
- package/esm/locales/en-US.js +10 -10
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/index.js +5 -5
- package/esm/locales/ko-KR.d.ts +12 -12
- package/esm/locales/ko-KR.js +10 -10
- package/esm/locales/zh-CN.d.ts +12 -12
- package/esm/locales/zh-CN.js +10 -10
- package/esm/registry.d.ts +2 -2
- package/esm/registry.js +11 -11
- package/esm/shared/context.d.ts +2 -2
- package/esm/shared/context.js +2 -2
- package/esm/shared/loadScript.d.ts +5 -5
- package/esm/shared/loadScript.js +27 -28
- package/esm/styles.less +5 -4
- package/esm/types.d.ts +8 -8
- package/esm/types.js +1 -1
- package/lib/SchemaField.d.ts +5115 -1578
- package/lib/SchemaField.js +44 -44
- package/lib/SettingsForm.d.ts +4 -4
- package/lib/SettingsForm.js +108 -55
- package/lib/components/BackgroundStyleSetter/index.d.ts +4 -4
- package/lib/components/BackgroundStyleSetter/index.js +106 -48
- package/lib/components/BorderRadiusStyleSetter/index.d.ts +4 -4
- package/lib/components/BorderRadiusStyleSetter/index.js +33 -14
- package/lib/components/BorderStyleSetter/index.d.ts +5 -5
- package/lib/components/BorderStyleSetter/index.js +138 -74
- package/lib/components/BoxShadowStyleSetter/index.d.ts +6 -6
- package/lib/components/BoxShadowStyleSetter/index.js +82 -30
- package/lib/components/BoxStyleSetter/index.d.ts +7 -7
- package/lib/components/BoxStyleSetter/index.js +122 -52
- package/lib/components/CollapseItem/index.d.ts +6 -6
- package/lib/components/CollapseItem/index.js +49 -21
- package/lib/components/ColorInput/index.d.ts +5 -5
- package/lib/components/ColorInput/index.js +39 -21
- package/lib/components/ColorInput/styles.less +0 -5
- package/lib/components/CornerInput/index.d.ts +7 -7
- package/lib/components/CornerInput/index.js +70 -28
- package/lib/components/DisplayStyleSetter/index.d.ts +7 -7
- package/lib/components/DisplayStyleSetter/index.js +75 -39
- package/lib/components/DrawerSetter/index.d.ts +6 -6
- package/lib/components/DrawerSetter/index.js +99 -48
- package/lib/components/DrawerSetter/styles.less +2 -2
- package/lib/components/FlexStyleSetter/index.d.ts +5 -5
- package/lib/components/FlexStyleSetter/index.js +208 -116
- package/lib/components/FoldItem/index.d.ts +9 -7
- package/lib/components/FoldItem/index.js +140 -72
- package/lib/components/FontStyleSetter/index.d.ts +4 -4
- package/lib/components/FontStyleSetter/index.js +216 -91
- package/lib/components/ImageInput/index.d.ts +7 -7
- package/lib/components/ImageInput/index.js +69 -47
- package/lib/components/InputItems/index.d.ts +19 -17
- package/lib/components/InputItems/index.js +101 -46
- package/lib/components/MonacoInput/config.d.ts +1 -1
- package/lib/components/MonacoInput/config.js +49 -45
- package/lib/components/MonacoInput/format.d.ts +4 -1
- package/lib/components/MonacoInput/format.js +38 -33
- package/lib/components/MonacoInput/index.d.ts +13 -13
- package/lib/components/MonacoInput/index.js +347 -241
- package/lib/components/MonacoInput/themes/chrome.d.ts +44 -38
- package/lib/components/MonacoInput/themes/chrome.js +107 -107
- package/lib/components/MonacoInput/themes/monokai.d.ts +34 -30
- package/lib/components/MonacoInput/themes/monokai.js +141 -141
- package/lib/components/PolyInput/index.d.ts +17 -17
- package/lib/components/PolyInput/index.js +151 -96
- package/lib/components/PositionInput/index.d.ts +7 -7
- package/lib/components/PositionInput/index.js +68 -28
- package/lib/components/PositionInput/styles.less +0 -1
- package/lib/components/SizeInput/index.d.ts +6 -2
- package/lib/components/SizeInput/index.js +47 -49
- package/lib/components/SizeInput/styles.less +0 -1
- package/lib/components/ValueInput/index.d.ts +2 -2
- package/lib/components/ValueInput/index.js +92 -75
- package/lib/components/index.d.ts +20 -20
- package/lib/components/index.js +52 -36
- package/lib/effects/index.d.ts +2 -2
- package/lib/effects/index.js +34 -18
- package/lib/effects/useLocales.d.ts +2 -2
- package/lib/effects/useLocales.js +67 -63
- package/lib/effects/useSnapshot.d.ts +2 -2
- package/lib/effects/useSnapshot.js +13 -13
- package/lib/index.d.ts +5 -5
- package/lib/index.js +37 -21
- package/lib/locales/en-US.d.ts +12 -12
- package/lib/locales/en-US.js +12 -12
- package/lib/locales/index.d.ts +1 -1
- package/lib/locales/index.js +16 -10
- package/lib/locales/ko-KR.d.ts +12 -12
- package/lib/locales/ko-KR.js +12 -12
- package/lib/locales/zh-CN.d.ts +12 -12
- package/lib/locales/zh-CN.js +12 -12
- package/lib/registry.d.ts +2 -2
- package/lib/registry.js +21 -19
- package/lib/shared/context.d.ts +2 -2
- package/lib/shared/context.js +5 -5
- package/lib/shared/loadScript.d.ts +5 -5
- package/lib/shared/loadScript.js +32 -32
- package/lib/styles.less +5 -4
- package/lib/types.d.ts +8 -8
- package/lib/types.js +2 -2
- package/package.json +26 -27
package/esm/SchemaField.js
CHANGED
|
@@ -1,42 +1,77 @@
|
|
|
1
|
-
import { createSchemaField } from '@formily/react'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { createSchemaField } from '@formily/react'
|
|
2
|
+
import {
|
|
3
|
+
ArrayItems,
|
|
4
|
+
ArrayTable,
|
|
5
|
+
DatePicker,
|
|
6
|
+
FormCollapse,
|
|
7
|
+
FormGrid,
|
|
8
|
+
FormItem,
|
|
9
|
+
FormLayout,
|
|
10
|
+
FormTab,
|
|
11
|
+
Input,
|
|
12
|
+
NumberPicker,
|
|
13
|
+
Radio,
|
|
14
|
+
Select,
|
|
15
|
+
Space,
|
|
16
|
+
Switch,
|
|
17
|
+
TimePicker,
|
|
18
|
+
} from '@thienvu18/formily-antd-v6'
|
|
19
|
+
import { Slider } from 'antd'
|
|
20
|
+
import {
|
|
21
|
+
BackgroundImageInput,
|
|
22
|
+
BackgroundStyleSetter,
|
|
23
|
+
BorderRadiusStyleSetter,
|
|
24
|
+
BorderStyleSetter,
|
|
25
|
+
BoxShadowStyleSetter,
|
|
26
|
+
BoxStyleSetter,
|
|
27
|
+
CollapseItem,
|
|
28
|
+
ColorInput,
|
|
29
|
+
CornerInput,
|
|
30
|
+
DisplayStyleSetter,
|
|
31
|
+
DrawerSetter,
|
|
32
|
+
FlexStyleSetter,
|
|
33
|
+
FontStyleSetter,
|
|
34
|
+
ImageInput,
|
|
35
|
+
MonacoInput,
|
|
36
|
+
PositionInput,
|
|
37
|
+
SizeInput,
|
|
38
|
+
ValueInput,
|
|
39
|
+
} from './components'
|
|
5
40
|
export const SchemaField = createSchemaField({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
41
|
+
components: {
|
|
42
|
+
FormItem,
|
|
43
|
+
CollapseItem,
|
|
44
|
+
Input,
|
|
45
|
+
ValueInput,
|
|
46
|
+
SizeInput,
|
|
47
|
+
ColorInput,
|
|
48
|
+
ImageInput,
|
|
49
|
+
MonacoInput,
|
|
50
|
+
PositionInput,
|
|
51
|
+
CornerInput,
|
|
52
|
+
BackgroundImageInput,
|
|
53
|
+
BackgroundStyleSetter,
|
|
54
|
+
BoxStyleSetter,
|
|
55
|
+
BorderStyleSetter,
|
|
56
|
+
BorderRadiusStyleSetter,
|
|
57
|
+
DisplayStyleSetter,
|
|
58
|
+
BoxShadowStyleSetter,
|
|
59
|
+
FlexStyleSetter,
|
|
60
|
+
FontStyleSetter,
|
|
61
|
+
DrawerSetter,
|
|
62
|
+
NumberPicker,
|
|
63
|
+
DatePicker,
|
|
64
|
+
TimePicker,
|
|
65
|
+
Select,
|
|
66
|
+
Radio,
|
|
67
|
+
Slider,
|
|
68
|
+
Switch,
|
|
69
|
+
Space,
|
|
70
|
+
ArrayItems,
|
|
71
|
+
ArrayTable,
|
|
72
|
+
FormCollapse,
|
|
73
|
+
FormGrid,
|
|
74
|
+
FormLayout,
|
|
75
|
+
FormTab,
|
|
76
|
+
},
|
|
77
|
+
})
|
package/esm/SettingsForm.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import
|
|
3
|
-
import './
|
|
4
|
-
export declare const SettingsForm: React.FC<ISettingFormProps
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import './styles.less'
|
|
3
|
+
import { ISettingFormProps } from './types'
|
|
4
|
+
export declare const SettingsForm: React.FC<ISettingFormProps>
|
package/esm/SettingsForm.js
CHANGED
|
@@ -1,54 +1,104 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
import '
|
|
1
|
+
import { createForm } from '@formily/core'
|
|
2
|
+
import { observer } from '@formily/react'
|
|
3
|
+
import {
|
|
4
|
+
IconWidget,
|
|
5
|
+
NodePathWidget,
|
|
6
|
+
useOperation,
|
|
7
|
+
usePrefix,
|
|
8
|
+
useSelected,
|
|
9
|
+
useSelectedNode,
|
|
10
|
+
useWorkbench,
|
|
11
|
+
} from '@thienvu18/designable-react'
|
|
12
|
+
import { cancelIdle, requestIdle } from '@thienvu18/designable-shared'
|
|
13
|
+
import { Form } from '@thienvu18/formily-antd-v6'
|
|
14
|
+
import { Empty } from 'antd'
|
|
15
|
+
import cls from 'classnames'
|
|
16
|
+
import { useMemo } from 'react'
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'
|
|
18
|
+
import { SchemaField } from './SchemaField'
|
|
19
|
+
import { useLocales, useSnapshot } from './effects'
|
|
20
|
+
import { SettingsFormContext } from './shared/context'
|
|
21
|
+
import './styles.less'
|
|
14
22
|
const GlobalState = {
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export const SettingsForm = observer(
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
idleRequest: null,
|
|
24
|
+
}
|
|
25
|
+
export const SettingsForm = observer(
|
|
26
|
+
(props) => {
|
|
27
|
+
const workbench = useWorkbench()
|
|
28
|
+
const currentWorkspace =
|
|
29
|
+
workbench?.activeWorkspace || workbench?.currentWorkspace
|
|
30
|
+
const currentWorkspaceId = currentWorkspace?.id
|
|
31
|
+
const operation = useOperation(currentWorkspaceId)
|
|
32
|
+
const node = useSelectedNode(currentWorkspaceId)
|
|
33
|
+
const selected = useSelected(currentWorkspaceId)
|
|
34
|
+
const prefix = usePrefix('settings-form')
|
|
35
|
+
const schema = node?.designerProps?.propsSchema
|
|
36
|
+
const isEmpty = !(
|
|
37
|
+
node &&
|
|
38
|
+
node.designerProps?.propsSchema &&
|
|
39
|
+
selected.length === 1
|
|
40
|
+
)
|
|
29
41
|
const form = useMemo(() => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, [node, node?.props, schema, operation, isEmpty])
|
|
42
|
+
return createForm({
|
|
43
|
+
initialValues: node?.designerProps?.defaultProps,
|
|
44
|
+
values: node?.props,
|
|
45
|
+
effects(form) {
|
|
46
|
+
useLocales(node)
|
|
47
|
+
useSnapshot(operation)
|
|
48
|
+
props.effects?.(form)
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
}, [node, node?.props, schema, operation, isEmpty])
|
|
40
52
|
const render = () => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
if (!isEmpty) {
|
|
54
|
+
return _jsx(
|
|
55
|
+
'div',
|
|
56
|
+
{
|
|
57
|
+
className: cls(prefix, props.className),
|
|
58
|
+
style: props.style,
|
|
59
|
+
children: _jsx(SettingsFormContext.Provider, {
|
|
60
|
+
value: props,
|
|
61
|
+
children: _jsx(Form, {
|
|
62
|
+
form: form,
|
|
63
|
+
colon: false,
|
|
64
|
+
labelWidth: 120,
|
|
65
|
+
labelAlign: 'left',
|
|
66
|
+
wrapperAlign: 'right',
|
|
67
|
+
feedbackLayout: 'none',
|
|
68
|
+
tooltipLayout: 'text',
|
|
69
|
+
children: _jsx(SchemaField, {
|
|
70
|
+
schema: schema,
|
|
71
|
+
components: props.components,
|
|
72
|
+
scope: { $node: node, ...props.scope },
|
|
73
|
+
}),
|
|
74
|
+
}),
|
|
75
|
+
}),
|
|
76
|
+
},
|
|
77
|
+
node.id
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
return _jsx('div', {
|
|
81
|
+
className: prefix + '-empty',
|
|
82
|
+
children: _jsx(Empty, {}),
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
return _jsx(IconWidget.Provider, {
|
|
86
|
+
tooltip: true,
|
|
87
|
+
children: _jsxs('div', {
|
|
88
|
+
className: prefix + '-wrapper',
|
|
89
|
+
children: [
|
|
90
|
+
!isEmpty && _jsx(NodePathWidget, { workspaceId: currentWorkspaceId }),
|
|
91
|
+
_jsx('div', { className: prefix + '-content', children: render() }),
|
|
92
|
+
],
|
|
93
|
+
}),
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
{
|
|
48
97
|
scheduler: (update) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
98
|
+
cancelIdle(GlobalState.idleRequest)
|
|
99
|
+
GlobalState.idleRequest = requestIdle(update, {
|
|
100
|
+
timeout: 500,
|
|
101
|
+
})
|
|
53
102
|
},
|
|
54
|
-
}
|
|
103
|
+
}
|
|
104
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React from 'react'
|
|
2
2
|
export interface IBackgroundStyleSetterProps {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
className?: string
|
|
4
|
+
style?: React.CSSProperties
|
|
5
5
|
}
|
|
6
|
-
export declare const BackgroundStyleSetter: React.FC<IBackgroundStyleSetterProps
|
|
6
|
+
export declare const BackgroundStyleSetter: React.FC<IBackgroundStyleSetterProps>
|
|
@@ -1,43 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { ColorInput } from '../ColorInput'
|
|
7
|
-
import {
|
|
8
|
-
import { BackgroundImageInput } from '../ImageInput'
|
|
9
|
-
import { InputItems } from '../InputItems'
|
|
10
|
-
import
|
|
1
|
+
import { Field, observer, useField } from '@formily/react'
|
|
2
|
+
import { usePrefix } from '@thienvu18/designable-react'
|
|
3
|
+
import { Input, Select } from '@thienvu18/formily-antd-v6'
|
|
4
|
+
import cls from 'classnames'
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'
|
|
6
|
+
import { ColorInput } from '../ColorInput'
|
|
7
|
+
import { FoldItem } from '../FoldItem'
|
|
8
|
+
import { BackgroundImageInput } from '../ImageInput'
|
|
9
|
+
import { InputItems } from '../InputItems'
|
|
10
|
+
import { BackgroundSizeInput } from '../SizeInput'
|
|
11
11
|
export const BackgroundStyleSetter = observer((props) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
12
|
+
const field = useField()
|
|
13
|
+
const prefix = usePrefix('background-style-setter')
|
|
14
|
+
return _jsxs(FoldItem, {
|
|
15
|
+
className: cls(prefix, props.className),
|
|
16
|
+
label: field.title,
|
|
17
|
+
children: [
|
|
18
|
+
_jsx(FoldItem.Base, {
|
|
19
|
+
children: _jsx(Field, {
|
|
20
|
+
name: 'backgroundColor',
|
|
21
|
+
basePath: field.address.parent(),
|
|
22
|
+
component: [ColorInput],
|
|
23
|
+
}),
|
|
24
|
+
}),
|
|
25
|
+
_jsx(FoldItem.Extra, {
|
|
26
|
+
children: _jsxs(InputItems, {
|
|
27
|
+
children: [
|
|
28
|
+
_jsx(InputItems.Item, {
|
|
29
|
+
icon: 'Image',
|
|
30
|
+
children: _jsx(Field, {
|
|
31
|
+
name: 'backgroundImage',
|
|
32
|
+
basePath: field.address.parent(),
|
|
33
|
+
component: [BackgroundImageInput],
|
|
34
|
+
}),
|
|
35
|
+
}),
|
|
36
|
+
_jsx(InputItems.Item, {
|
|
37
|
+
icon: 'ImageSize',
|
|
38
|
+
width: '50%',
|
|
39
|
+
children: _jsx(Field, {
|
|
40
|
+
name: 'backgroundSize',
|
|
41
|
+
basePath: field.address.parent(),
|
|
42
|
+
component: [BackgroundSizeInput],
|
|
43
|
+
}),
|
|
44
|
+
}),
|
|
45
|
+
_jsx(InputItems.Item, {
|
|
46
|
+
icon: 'Repeat',
|
|
47
|
+
width: '50%',
|
|
48
|
+
children: _jsx(Field, {
|
|
49
|
+
name: 'backgroundRepeat',
|
|
50
|
+
basePath: field.address.parent(),
|
|
51
|
+
component: [
|
|
52
|
+
Select,
|
|
53
|
+
{ style: { width: '100%' }, placeholder: 'Repeat' },
|
|
54
|
+
],
|
|
55
|
+
dataSource: [
|
|
56
|
+
{
|
|
57
|
+
label: 'No Repeat',
|
|
58
|
+
value: 'no-repeat',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Repeat',
|
|
62
|
+
value: 'repeat',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'Repeat X',
|
|
66
|
+
value: 'repeat-x',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: 'Repeat Y',
|
|
70
|
+
value: 'repeat-y',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'Space',
|
|
74
|
+
value: 'space',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Round',
|
|
78
|
+
value: 'round',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
}),
|
|
82
|
+
}),
|
|
83
|
+
_jsx(InputItems.Item, {
|
|
84
|
+
icon: 'Position',
|
|
85
|
+
children: _jsx(Field, {
|
|
86
|
+
name: 'backgroundPosition',
|
|
87
|
+
basePath: field.address.parent(),
|
|
88
|
+
component: [Input, { placeholder: 'center center' }],
|
|
89
|
+
}),
|
|
90
|
+
}),
|
|
91
|
+
],
|
|
92
|
+
}),
|
|
93
|
+
}),
|
|
94
|
+
],
|
|
95
|
+
})
|
|
96
|
+
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React from 'react'
|
|
2
2
|
export interface IBorderRadiusStyleSetterProps {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
value?: string
|
|
4
|
+
onChange?: (value: string) => void
|
|
5
5
|
}
|
|
6
|
-
export declare const BorderRadiusStyleSetter: React.FC<IBorderRadiusStyleSetterProps
|
|
6
|
+
export declare const BorderRadiusStyleSetter: React.FC<IBorderRadiusStyleSetterProps>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { BoxStyleSetter } from '../BoxStyleSetter'
|
|
1
|
+
import { IconWidget } from '@thienvu18/designable-react'
|
|
2
|
+
import { jsx as _jsx } from 'react/jsx-runtime'
|
|
3
|
+
import { BoxStyleSetter } from '../BoxStyleSetter'
|
|
4
4
|
export const BorderRadiusStyleSetter = (props) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
5
|
+
return _jsx(BoxStyleSetter, {
|
|
6
|
+
...props,
|
|
7
|
+
labels: [
|
|
8
|
+
_jsx(IconWidget, { infer: 'TopLeft', size: 16 }, '1'),
|
|
9
|
+
_jsx(IconWidget, { infer: 'TopRight', size: 16 }, '2'),
|
|
10
|
+
_jsx(IconWidget, { infer: 'BottomRight', size: 16 }, '3'),
|
|
11
|
+
_jsx(IconWidget, { infer: 'BottomLeft', size: 16 }, '4'),
|
|
12
|
+
],
|
|
13
|
+
})
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import './styles.less'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import './styles.less'
|
|
3
3
|
export interface IBorderStyleSetterProps {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
className?: string
|
|
5
|
+
style?: React.CSSProperties
|
|
6
6
|
}
|
|
7
|
-
export declare const BorderStyleSetter: React.FC<IBorderStyleSetterProps
|
|
7
|
+
export declare const BorderStyleSetter: React.FC<IBorderStyleSetterProps>
|