@progress/kendo-themes-html 14.7.0-dev.14 → 14.7.0-dev.16
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/cjs/imageeditor/imageeditor-canvas.spec.js +1 -0
- package/dist/cjs/imageeditor/imageeditor-option-list.js +1 -1
- package/dist/cjs/imageeditor/imageeditor-pane.js +1 -1
- package/dist/cjs/imageeditor/imageeditor-preview-thumbnail.js +1 -1
- package/dist/cjs/imageeditor/imageeditor-sidebar.js +1 -1
- package/dist/cjs/imageeditor/imageeditor-toolbar.js +1 -1
- package/dist/cjs/imageeditor/imageeditor.spec.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-adjustments-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-adjustments.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-blur-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-blur.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-crop-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-crop.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-filters-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-filters.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-frames-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-frames.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-insert-line-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-insert-line.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-insert-shape-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-insert-shape.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-insert-text-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-insert-text.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-normal.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-pixelate-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-pixelate.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-resize-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-resize.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-rotate-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-rotate.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-shadow-adaptive.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-shadow.js +1 -1
- package/dist/cjs/index.js +8 -8
- package/dist/esm/imageeditor/imageeditor-canvas.spec.mjs +1 -0
- package/dist/esm/imageeditor/imageeditor-option-list.mjs +1 -1
- package/dist/esm/imageeditor/imageeditor-pane.mjs +1 -1
- package/dist/esm/imageeditor/imageeditor-preview-thumbnail.mjs +1 -1
- package/dist/esm/imageeditor/imageeditor-sidebar.mjs +1 -1
- package/dist/esm/imageeditor/imageeditor-toolbar.mjs +1 -1
- package/dist/esm/imageeditor/imageeditor.spec.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-adjustments-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-adjustments.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-blur-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-blur.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-crop-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-crop.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-filters-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-filters.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-frames-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-frames.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-insert-line-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-insert-line.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-insert-shape-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-insert-shape.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-insert-text-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-insert-text.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-normal.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-pixelate-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-pixelate.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-resize-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-resize.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-rotate-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-rotate.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-shadow-adaptive.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-shadow.mjs +1 -1
- package/dist/esm/index.mjs +8 -8
- package/dist/types/imageeditor/constants.d.ts +9 -0
- package/dist/types/imageeditor/imageeditor-canvas.spec.d.ts +15 -0
- package/dist/types/imageeditor/imageeditor-option-list.d.ts +1 -0
- package/dist/types/imageeditor/imageeditor-pane.d.ts +2 -0
- package/dist/types/imageeditor/imageeditor-preview-thumbnail.d.ts +1 -0
- package/dist/types/imageeditor/imageeditor-sidebar.d.ts +8 -0
- package/dist/types/imageeditor/imageeditor-toolbar.d.ts +5 -4
- package/dist/types/imageeditor/imageeditor.spec.d.ts +7 -3
- package/dist/types/imageeditor/index.d.ts +13 -1
- package/dist/types/imageeditor/templates/imageeditor-adjustments-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-adjustments.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-blur-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-blur.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-crop-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-crop.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-filters-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-filters.d.ts +1 -6
- package/dist/types/imageeditor/templates/imageeditor-frames-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-frames.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-insert-line-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-insert-line.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-insert-shape-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-insert-shape.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-insert-text-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-insert-text.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-pixelate-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-pixelate.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-resize-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-resize.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-rotate-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-rotate.d.ts +1 -1
- package/dist/types/imageeditor/templates/imageeditor-shadow-adaptive.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-shadow.d.ts +1 -1
- package/package.json +1 -1
- package/src/imageeditor/constants.ts +4 -0
- package/src/imageeditor/imageeditor-canvas.spec.tsx +30 -0
- package/src/imageeditor/imageeditor-option-list.tsx +2 -1
- package/src/imageeditor/imageeditor-pane.tsx +4 -1
- package/src/imageeditor/imageeditor-preview-thumbnail.tsx +3 -2
- package/src/imageeditor/imageeditor-sidebar.tsx +32 -19
- package/src/imageeditor/imageeditor-toolbar.tsx +27 -21
- package/src/imageeditor/imageeditor.spec.tsx +14 -6
- package/src/imageeditor/index.ts +13 -1
- package/src/imageeditor/templates/imageeditor-adjustments-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-adjustments.tsx +80 -57
- package/src/imageeditor/templates/imageeditor-blur-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-blur.tsx +9 -25
- package/src/imageeditor/templates/imageeditor-crop-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-crop.tsx +22 -28
- package/src/imageeditor/templates/imageeditor-filters-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-filters.tsx +32 -52
- package/src/imageeditor/templates/imageeditor-frames-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-frames.tsx +123 -149
- package/src/imageeditor/templates/imageeditor-insert-line-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-insert-line.tsx +24 -25
- package/src/imageeditor/templates/imageeditor-insert-shape-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-insert-shape.tsx +93 -50
- package/src/imageeditor/templates/imageeditor-insert-text-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-insert-text.tsx +24 -25
- package/src/imageeditor/templates/imageeditor-normal.tsx +2 -23
- package/src/imageeditor/templates/imageeditor-pixelate-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-pixelate.tsx +9 -24
- package/src/imageeditor/templates/imageeditor-resize-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-resize.tsx +10 -25
- package/src/imageeditor/templates/imageeditor-rotate-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-rotate.tsx +8 -23
- package/src/imageeditor/templates/imageeditor-shadow-adaptive.tsx +3 -0
- package/src/imageeditor/templates/imageeditor-shadow.tsx +20 -42
- package/src/imageeditor/tests/imageeditor-adaptive-panes.tsx +85 -0
- package/src/imageeditor/tests/imageeditor-adaptive-small.tsx +10 -305
- package/src/imageeditor/tests/imageeditor-adjustments-pane.tsx +2 -1
- package/src/imageeditor/tests/imageeditor-blur-pane.tsx +2 -1
- package/src/imageeditor/tests/imageeditor-crop-pane.tsx +2 -1
- package/src/imageeditor/tests/imageeditor-filters-pane.tsx +2 -1
- package/src/imageeditor/tests/imageeditor-frames-pane.tsx +4 -3
- package/src/imageeditor/tests/imageeditor-insert-shape-pane.tsx +1 -1
- package/src/imageeditor/tests/imageeditor-interactive-states.tsx +6 -6
- package/src/imageeditor/tests/imageeditor-pixelate-pane.tsx +2 -1
- package/src/imageeditor/tests/imageeditor-resize-pane.tsx +2 -1
- package/src/imageeditor/tests/imageeditor-responsive.tsx +4 -4
- package/src/imageeditor/tests/imageeditor-rotate-pane.tsx +2 -1
- package/src/imageeditor/tests/imageeditor-shadow-pane.tsx +2 -1
- package/dist/cjs/imageeditor/templates/imageeditor-disabled.js +0 -1
- package/dist/esm/imageeditor/templates/imageeditor-disabled.mjs +0 -1
- package/dist/types/imageeditor/templates/imageeditor-disabled.d.ts +0 -1
- package/src/imageeditor/templates/imageeditor-disabled.tsx +0 -54
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ImageEditor, ImageEditorPane, ImageEditorOptionPreview, ImageEditorPreviewThumbnail } from "..";
|
|
1
|
+
import { ImageEditor, ImageEditorPane, ImageEditorOptionPreview, ImageEditorPreviewThumbnail, ImageEditorCanvas } from "..";
|
|
2
|
+
import { IMAGEEDITOR_ADAPTIVE_CANVAS_SIZE, IMAGEEDITOR_CANVAS_SIZE } from "../constants";
|
|
2
3
|
import { Button } from "../../button";
|
|
3
4
|
import { NumericTextbox } from "../../numerictextbox";
|
|
4
5
|
import { ColorPicker } from "../../colorpicker";
|
|
@@ -7,174 +8,147 @@ import { Form, FormField, Fieldset } from "../../form";
|
|
|
7
8
|
import { Icon } from "../../icon";
|
|
8
9
|
import { Slider } from "../../slider";
|
|
9
10
|
|
|
10
|
-
const framesSidebarItems = [
|
|
11
|
-
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
12
|
-
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
13
|
-
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" aria-label="Rotate"></Button>,
|
|
14
|
-
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
15
|
-
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" aria-label="Text"></Button>,
|
|
16
|
-
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" aria-label="Shapes"></Button>,
|
|
17
|
-
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
18
|
-
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
19
|
-
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
20
|
-
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
21
|
-
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
22
|
-
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" selected aria-label="Frame"></Button>,
|
|
23
|
-
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
const FrameSlider = ({ id, label, value }: { id: string; label: string; value: number }) => (
|
|
27
|
-
<FormField
|
|
28
|
-
label={label}
|
|
29
|
-
editorId={id}
|
|
30
|
-
editor={
|
|
31
|
-
<div className="k-imageeditor-field-row">
|
|
32
|
-
<Slider
|
|
33
|
-
style={{ flex: 1, "--kendo-slider-start": 0, "--kendo-slider-end": value } as React.CSSProperties}
|
|
34
|
-
aria-label={label}
|
|
35
|
-
showButtons={false}
|
|
36
|
-
showTicks={false}
|
|
37
|
-
value={value}
|
|
38
|
-
min={0}
|
|
39
|
-
max={100}
|
|
40
|
-
/>
|
|
41
|
-
<NumericTextbox
|
|
42
|
-
id={id}
|
|
43
|
-
style={{ width: "80px", flex: "none" }}
|
|
44
|
-
showClearButton={false}
|
|
45
|
-
showSpinButton={false}
|
|
46
|
-
value={String(value)}
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
const frameStylePreviews: { [key: string]: React.CSSProperties } = {
|
|
54
|
-
none: {},
|
|
55
|
-
single: { border: "3px dashed #b0e855", borderRadius: "4px" },
|
|
56
|
-
multiple: { border: "3px dashed #b0e855", borderRadius: "4px" }
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const FrameStylePreview = ({ styleKey, label, selected }: { styleKey: string; label: string; selected: boolean }) => (
|
|
60
|
-
<ImageEditorOptionPreview selected={selected} aria-label={label}>
|
|
61
|
-
<ImageEditorPreviewThumbnail label={label} style={frameStylePreviews[styleKey]}>
|
|
62
|
-
{styleKey === "multiple" && (
|
|
63
|
-
<span style={{
|
|
64
|
-
position: "absolute",
|
|
65
|
-
inset: "6px",
|
|
66
|
-
border: "3px dashed #b0e855",
|
|
67
|
-
borderRadius: "1px",
|
|
68
|
-
boxSizing: "border-box",
|
|
69
|
-
pointerEvents: "none"
|
|
70
|
-
}}></span>
|
|
71
|
-
)}
|
|
72
|
-
</ImageEditorPreviewThumbnail>
|
|
73
|
-
</ImageEditorOptionPreview>
|
|
74
|
-
);
|
|
75
|
-
|
|
76
11
|
export const ImageEditorFrames = ({
|
|
77
12
|
style = "none",
|
|
78
13
|
imageRoundness = 0,
|
|
14
|
+
isPristine = style === "none" && imageRoundness === 0,
|
|
79
15
|
framesAmount = 3,
|
|
80
|
-
frameThickness =
|
|
81
|
-
frameRoundness =
|
|
82
|
-
offset =
|
|
16
|
+
frameThickness = 0,
|
|
17
|
+
frameRoundness = 0,
|
|
18
|
+
offset = 0,
|
|
83
19
|
strokeColor = "#b0e855",
|
|
20
|
+
adaptive,
|
|
21
|
+
canvas = adaptive ? IMAGEEDITOR_ADAPTIVE_CANVAS_SIZE : IMAGEEDITOR_CANVAS_SIZE,
|
|
22
|
+
imageSrc,
|
|
84
23
|
...props
|
|
85
|
-
}: any) =>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
24
|
+
}: any) => (
|
|
25
|
+
<ImageEditor
|
|
26
|
+
adaptive={adaptive}
|
|
27
|
+
activeTool="Frame"
|
|
28
|
+
actionPane={
|
|
29
|
+
<ImageEditorPane title="Frame" adaptive={adaptive} confirmDisabled={isPristine} actions={
|
|
30
|
+
<>
|
|
31
|
+
<Button disabled={isPristine}>Reset</Button>
|
|
32
|
+
<Button themeColor="primary" disabled={isPristine}>Apply</Button>
|
|
33
|
+
</>
|
|
34
|
+
}>
|
|
35
|
+
<Form tag="div">
|
|
36
|
+
<FormField
|
|
37
|
+
label="Frame Style"
|
|
38
|
+
editor={
|
|
39
|
+
<div className="k-imageeditor-option-grid">
|
|
40
|
+
<ImageEditorOptionPreview selected={style === "none"} aria-label="None">
|
|
41
|
+
<ImageEditorPreviewThumbnail label="None" imageSrc={imageSrc} />
|
|
42
|
+
</ImageEditorOptionPreview>
|
|
43
|
+
<ImageEditorOptionPreview selected={style === "single"} aria-label="Single">
|
|
44
|
+
<ImageEditorPreviewThumbnail label="Single" imageSrc={imageSrc} style={{ border: "3px dashed #b0e855", borderRadius: "4px" }} />
|
|
45
|
+
</ImageEditorOptionPreview>
|
|
46
|
+
<ImageEditorOptionPreview selected={style === "multiple"} aria-label="Multiple">
|
|
47
|
+
<ImageEditorPreviewThumbnail label="Multiple" imageSrc={imageSrc} style={{ border: "3px dashed #b0e855", borderRadius: "4px" }}>
|
|
48
|
+
<span style={{
|
|
49
|
+
position: "absolute",
|
|
50
|
+
inset: "6px",
|
|
51
|
+
border: "3px dashed #b0e855",
|
|
52
|
+
borderRadius: "1px",
|
|
53
|
+
boxSizing: "border-box",
|
|
54
|
+
pointerEvents: "none"
|
|
55
|
+
}}></span>
|
|
56
|
+
</ImageEditorPreviewThumbnail>
|
|
57
|
+
</ImageEditorOptionPreview>
|
|
58
|
+
</div>
|
|
59
|
+
}
|
|
60
|
+
/>
|
|
61
|
+
<FormField
|
|
62
|
+
label="Image Roundness"
|
|
63
|
+
editorId="frame-image-roundness"
|
|
64
|
+
editor={
|
|
65
|
+
<div className="k-imageeditor-field-row">
|
|
66
|
+
<Slider style={{ flex: 1, "--kendo-slider-start": 0, "--kendo-slider-end": imageRoundness } as React.CSSProperties} aria-label="Image Roundness" showButtons={false} showTicks={false} value={imageRoundness} min={0} max={100} />
|
|
67
|
+
<NumericTextbox id="frame-image-roundness" style={{ width: "80px", flex: "none" }} showClearButton={false} showSpinButton={false} value={String(imageRoundness)} />
|
|
68
|
+
</div>
|
|
69
|
+
}
|
|
70
|
+
/>
|
|
71
|
+
{style === "multiple" && (
|
|
99
72
|
<FormField
|
|
100
|
-
label="
|
|
73
|
+
label="Frames Amount"
|
|
74
|
+
editorId="frame-frames-amount"
|
|
101
75
|
editor={
|
|
102
|
-
<
|
|
103
|
-
<FrameStylePreview styleKey="none" label="None" selected={style === "none"} />
|
|
104
|
-
<FrameStylePreview styleKey="single" label="Single" selected={style === "single"} />
|
|
105
|
-
<FrameStylePreview styleKey="multiple" label="Multiple" selected={style === "multiple"} />
|
|
106
|
-
</div>
|
|
76
|
+
<NumericTextbox id="frame-frames-amount" showClearButton={false} showSpinButton={false} value={String(framesAmount)} />
|
|
107
77
|
}
|
|
108
78
|
/>
|
|
109
|
-
|
|
110
|
-
|
|
79
|
+
)}
|
|
80
|
+
{style !== "none" && (
|
|
81
|
+
<>
|
|
111
82
|
<FormField
|
|
112
|
-
label="
|
|
113
|
-
editorId="frame-
|
|
83
|
+
label="Frame Thickness"
|
|
84
|
+
editorId="frame-thickness"
|
|
114
85
|
editor={
|
|
115
|
-
<
|
|
86
|
+
<div className="k-imageeditor-field-row">
|
|
87
|
+
<Slider style={{ flex: 1, "--kendo-slider-start": 0, "--kendo-slider-end": frameThickness } as React.CSSProperties} aria-label="Frame Thickness" showButtons={false} showTicks={false} value={frameThickness} min={0} max={100} />
|
|
88
|
+
<NumericTextbox id="frame-thickness" style={{ width: "80px", flex: "none" }} showClearButton={false} showSpinButton={false} value={String(frameThickness)} />
|
|
89
|
+
</div>
|
|
116
90
|
}
|
|
117
91
|
/>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
label="Offset"
|
|
130
|
-
editorId="frame-offset"
|
|
131
|
-
editor={ <NumericTextbox id="frame-offset" showSpinButton={false} value={String(offset)} prefix={<Icon icon="max-width" />} /> }
|
|
132
|
-
/>
|
|
133
|
-
</Fieldset>
|
|
92
|
+
<FormField
|
|
93
|
+
label="Frame Roundness"
|
|
94
|
+
editorId="frame-roundness"
|
|
95
|
+
editor={
|
|
96
|
+
<div className="k-imageeditor-field-row">
|
|
97
|
+
<Slider style={{ flex: 1, "--kendo-slider-start": 0, "--kendo-slider-end": frameRoundness } as React.CSSProperties} aria-label="Frame Roundness" showButtons={false} showTicks={false} value={frameRoundness} min={0} max={100} />
|
|
98
|
+
<NumericTextbox id="frame-roundness" style={{ width: "80px", flex: "none" }} showClearButton={false} showSpinButton={false} value={String(frameRoundness)} />
|
|
99
|
+
</div>
|
|
100
|
+
}
|
|
101
|
+
/>
|
|
102
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
134
103
|
<FormField
|
|
135
|
-
label="Stroke
|
|
136
|
-
editor={ <
|
|
104
|
+
label="Stroke Type"
|
|
105
|
+
editor={ <DropdownList id="frame-stroke-type" value="Dashed" aria-label="Stroke Type" /> }
|
|
137
106
|
/>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
107
|
+
<FormField
|
|
108
|
+
label="Offset"
|
|
109
|
+
editorId="frame-offset"
|
|
110
|
+
editor={ <NumericTextbox id="frame-offset" showClearButton={false} showSpinButton={false} value={String(offset)} prefix={<Icon icon="max-width" />} /> }
|
|
111
|
+
/>
|
|
112
|
+
</Fieldset>
|
|
113
|
+
<FormField
|
|
114
|
+
label="Stroke Color"
|
|
115
|
+
editor={ <ColorPicker id="frame-stroke-color" value={strokeColor} aria-label="Stroke Color" /> }
|
|
116
|
+
/>
|
|
117
|
+
</>
|
|
118
|
+
)}
|
|
119
|
+
</Form>
|
|
120
|
+
</ImageEditorPane>
|
|
121
|
+
}
|
|
143
122
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
{
|
|
123
|
+
children={
|
|
124
|
+
style === "none" ? (
|
|
125
|
+
<ImageEditorCanvas {...canvas} imageSrc={imageSrc} style={{ borderRadius: `${imageRoundness}px` }} />
|
|
126
|
+
) : (
|
|
127
|
+
<div style={{ position: "relative", width: `${canvas.width}px`, height: `${canvas.height}px` }}>
|
|
128
|
+
<ImageEditorCanvas {...canvas} imageSrc={imageSrc} style={{ position: "absolute", top: 0, left: 0, borderRadius: `${imageRoundness}px` }} />
|
|
129
|
+
{/* inner ring sits flush on the image edge, overlaying it */}
|
|
130
|
+
<div style={{
|
|
131
|
+
position: "absolute",
|
|
132
|
+
top: 0, left: 0,
|
|
133
|
+
width: `${canvas.width}px`, height: `${canvas.height}px`,
|
|
134
|
+
border: `${frameThickness}px dashed ${strokeColor}`,
|
|
135
|
+
borderRadius: `${frameRoundness}px`,
|
|
136
|
+
boxSizing: "border-box",
|
|
137
|
+
pointerEvents: "none"
|
|
138
|
+
}}></div>
|
|
139
|
+
{style === "multiple" && (
|
|
155
140
|
<div style={{
|
|
156
141
|
position: "absolute",
|
|
157
|
-
top: `${
|
|
158
|
-
width:
|
|
142
|
+
top: `${frameThickness + offset}px`, left: `${frameThickness + offset}px`,
|
|
143
|
+
width: `${canvas.width - (frameThickness + offset) * 2}px`, height: `${canvas.height - (frameThickness + offset) * 2}px`,
|
|
159
144
|
border: `${frameThickness}px dashed ${strokeColor}`,
|
|
160
|
-
borderRadius: `${frameRoundness}px`,
|
|
145
|
+
borderRadius: `${Math.max(frameRoundness - frameThickness - offset, 0)}px`,
|
|
161
146
|
boxSizing: "border-box",
|
|
162
147
|
pointerEvents: "none"
|
|
163
148
|
}}></div>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
borderRadius: `${Math.max(frameRoundness - frameThickness - offset, 0)}px`,
|
|
171
|
-
boxSizing: "border-box",
|
|
172
|
-
pointerEvents: "none"
|
|
173
|
-
}}></div>
|
|
174
|
-
)}
|
|
175
|
-
</div>
|
|
176
|
-
)
|
|
177
|
-
}
|
|
178
|
-
{...props} />
|
|
179
|
-
);
|
|
180
|
-
};
|
|
149
|
+
)}
|
|
150
|
+
</div>
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
{...props} />
|
|
154
|
+
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ImageEditor, ImageEditorPane } from "..";
|
|
1
|
+
import { ImageEditor, ImageEditorPane, ImageEditorCanvas } from "..";
|
|
2
2
|
import { Button } from "../../button";
|
|
3
|
+
import { ToolbarSeparator } from "../../toolbar";
|
|
3
4
|
import { ButtonGroup } from "../../button-group";
|
|
4
5
|
import { NumericTextbox } from "../../numerictextbox";
|
|
5
6
|
import { ColorPicker } from "../../colorpicker";
|
|
@@ -10,22 +11,6 @@ import { InputSuffixText } from "../../input";
|
|
|
10
11
|
import { Slider } from "../../slider";
|
|
11
12
|
import { SegmentedControl, SegmentedControlButton } from "../../segmented-control";
|
|
12
13
|
|
|
13
|
-
const insertLineSidebarItems = [
|
|
14
|
-
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
15
|
-
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
16
|
-
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" aria-label="Rotate"></Button>,
|
|
17
|
-
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
18
|
-
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" aria-label="Text"></Button>,
|
|
19
|
-
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" selected aria-label="Shapes"></Button>,
|
|
20
|
-
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
21
|
-
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
22
|
-
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
23
|
-
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
24
|
-
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
25
|
-
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" aria-label="Frame"></Button>,
|
|
26
|
-
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
27
|
-
];
|
|
28
|
-
|
|
29
14
|
export const ImageEditorInsertLine = ({
|
|
30
15
|
selected = false,
|
|
31
16
|
strokeColor = "#000000",
|
|
@@ -34,18 +19,32 @@ export const ImageEditorInsertLine = ({
|
|
|
34
19
|
startPoint = "None",
|
|
35
20
|
endPoint = "None",
|
|
36
21
|
opacity = 100,
|
|
22
|
+
adaptive,
|
|
23
|
+
imageSrc,
|
|
37
24
|
...props
|
|
38
25
|
}: any) => (
|
|
39
26
|
<ImageEditor
|
|
40
|
-
|
|
27
|
+
adaptive={adaptive}
|
|
28
|
+
activeTool="Shapes"
|
|
29
|
+
toolbarItems={adaptive && selected ? (
|
|
30
|
+
<>
|
|
31
|
+
<Button fillMode="flat" icon="squares-overlapping-plus" aria-label="Duplicate"></Button>
|
|
32
|
+
<Button fillMode="flat" icon="pencil" aria-label="Edit"></Button>
|
|
33
|
+
<ToolbarSeparator></ToolbarSeparator>
|
|
34
|
+
<Button fillMode="flat" icon="flip-horizontal" aria-label="Flip Horizontal"></Button>
|
|
35
|
+
<Button fillMode="flat" icon="flip-vertical" aria-label="Flip Vertical"></Button>
|
|
36
|
+
<ToolbarSeparator></ToolbarSeparator>
|
|
37
|
+
<Button fillMode="flat" icon="trash" aria-label="Delete"></Button>
|
|
38
|
+
</>
|
|
39
|
+
) : undefined}
|
|
41
40
|
actionPane={
|
|
42
|
-
<ImageEditorPane title="Shapes and Lines" actions={
|
|
41
|
+
<ImageEditorPane title="Shapes and Lines" adaptive={adaptive} confirmDisabled={!selected} actions={
|
|
43
42
|
<>
|
|
44
|
-
<Button>Remove</Button>
|
|
45
|
-
<Button themeColor="primary">Insert</Button>
|
|
43
|
+
<Button disabled={!selected}>Remove</Button>
|
|
44
|
+
<Button themeColor="primary" disabled={!selected}>Insert</Button>
|
|
46
45
|
</>
|
|
47
46
|
}>
|
|
48
|
-
<SegmentedControl thumbStyles={{ width: "50%", left: "50%" }} stretched aria-label="Shape or Line"
|
|
47
|
+
<SegmentedControl thumbStyles={{ width: "50%", left: "50%" }} stretched aria-label="Shape or Line">
|
|
49
48
|
<SegmentedControlButton icon="shapes">Shape</SegmentedControlButton>
|
|
50
49
|
<SegmentedControlButton icon="shape-line" selected>Line</SegmentedControlButton>
|
|
51
50
|
</SegmentedControl>
|
|
@@ -59,7 +58,7 @@ export const ImageEditorInsertLine = ({
|
|
|
59
58
|
<FormField
|
|
60
59
|
label="Stroke Width"
|
|
61
60
|
editorId="line-stroke-width"
|
|
62
|
-
editor={ <NumericTextbox id="line-stroke-width" showSpinButton={false} value={String(strokeWidth)} prefix={<Icon icon="border-width" />} /> }
|
|
61
|
+
editor={ <NumericTextbox id="line-stroke-width" showClearButton={false} showSpinButton={false} value={String(strokeWidth)} prefix={<Icon icon="border-width" />} /> }
|
|
63
62
|
/>
|
|
64
63
|
</Fieldset>
|
|
65
64
|
<FormField
|
|
@@ -78,7 +77,7 @@ export const ImageEditorInsertLine = ({
|
|
|
78
77
|
</Fieldset>
|
|
79
78
|
<FormField
|
|
80
79
|
label="Opacity"
|
|
81
|
-
editor={ <NumericTextbox id="line-opacity" showSpinButton={false} value={`${opacity}%`} prefix={<Icon icon="transparency" />} aria-label="Opacity" /> }
|
|
80
|
+
editor={ <NumericTextbox id="line-opacity" showClearButton={false} showSpinButton={false} value={`${opacity}%`} prefix={<Icon icon="transparency" />} aria-label="Opacity" /> }
|
|
82
81
|
/>
|
|
83
82
|
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
84
83
|
<FormField
|
|
@@ -154,7 +153,7 @@ export const ImageEditorInsertLine = ({
|
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
children={
|
|
157
|
-
<
|
|
156
|
+
<ImageEditorCanvas adaptive={adaptive} imageSrc={imageSrc} />
|
|
158
157
|
}
|
|
159
158
|
{...props} />
|
|
160
159
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ImageEditor, ImageEditorPane, ImageEditorOptionList, ImageEditorOptionPreview } from "..";
|
|
1
|
+
import { ImageEditor, ImageEditorPane, ImageEditorOptionList, ImageEditorOptionPreview, ImageEditorCanvas } from "..";
|
|
2
2
|
import { Button } from "../../button";
|
|
3
|
+
import { ToolbarSeparator } from "../../toolbar";
|
|
3
4
|
import { ButtonGroup } from "../../button-group";
|
|
4
5
|
import { Combobox } from "../../combobox";
|
|
5
6
|
import { NumericTextbox } from "../../numerictextbox";
|
|
@@ -10,36 +11,6 @@ import { InputSuffixText } from "../../input";
|
|
|
10
11
|
import { Slider } from "../../slider";
|
|
11
12
|
import { SegmentedControl, SegmentedControlButton } from "../../segmented-control";
|
|
12
13
|
|
|
13
|
-
const insertShapeSidebarItems = [
|
|
14
|
-
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
15
|
-
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
16
|
-
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" aria-label="Rotate"></Button>,
|
|
17
|
-
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
18
|
-
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" aria-label="Text"></Button>,
|
|
19
|
-
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" selected aria-label="Shapes"></Button>,
|
|
20
|
-
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
21
|
-
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
22
|
-
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
23
|
-
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
24
|
-
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
25
|
-
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" aria-label="Frame"></Button>,
|
|
26
|
-
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
const shapeTypes = [
|
|
30
|
-
{ label: "Square", icon: "checkbox" },
|
|
31
|
-
{ label: "Rectangle", icon: "rectangle-shape" },
|
|
32
|
-
{ label: "Circle", icon: "circle-shape" },
|
|
33
|
-
{ label: "Oval", icon: "oval-shape" },
|
|
34
|
-
{ label: "Triangle", icon: "kpi-status-hold" },
|
|
35
|
-
{ label: "Star", icon: "star" },
|
|
36
|
-
{ label: "Heart", icon: "heart" },
|
|
37
|
-
{ label: "Diamond", icon: "kpi-status-deny" },
|
|
38
|
-
{ label: "Hexagon", icon: "hexagon-shape" },
|
|
39
|
-
{ label: "Pentagon", icon: "pentagon-shape" },
|
|
40
|
-
{ label: "Arrow", icon: "arrow-right" }
|
|
41
|
-
];
|
|
42
|
-
|
|
43
14
|
export const ImageEditorInsertShape = ({
|
|
44
15
|
selected = false,
|
|
45
16
|
shapeType = "Oval",
|
|
@@ -49,19 +20,33 @@ export const ImageEditorInsertShape = ({
|
|
|
49
20
|
textColor = "#000000",
|
|
50
21
|
fontFamily = "Trebuchet MS",
|
|
51
22
|
fontSize = 48,
|
|
52
|
-
alignment
|
|
23
|
+
alignment,
|
|
24
|
+
adaptive,
|
|
25
|
+
imageSrc,
|
|
53
26
|
...props
|
|
54
27
|
}: any) => (
|
|
55
28
|
<ImageEditor
|
|
56
|
-
|
|
29
|
+
adaptive={adaptive}
|
|
30
|
+
activeTool="Shapes"
|
|
31
|
+
toolbarItems={adaptive && selected ? (
|
|
32
|
+
<>
|
|
33
|
+
<Button fillMode="flat" icon="squares-overlapping-plus" aria-label="Duplicate"></Button>
|
|
34
|
+
<Button fillMode="flat" icon="pencil" aria-label="Edit"></Button>
|
|
35
|
+
<ToolbarSeparator></ToolbarSeparator>
|
|
36
|
+
<Button fillMode="flat" icon="flip-horizontal" aria-label="Flip Horizontal"></Button>
|
|
37
|
+
<Button fillMode="flat" icon="flip-vertical" aria-label="Flip Vertical"></Button>
|
|
38
|
+
<ToolbarSeparator></ToolbarSeparator>
|
|
39
|
+
<Button fillMode="flat" icon="trash" aria-label="Delete"></Button>
|
|
40
|
+
</>
|
|
41
|
+
) : undefined}
|
|
57
42
|
actionPane={
|
|
58
|
-
<ImageEditorPane title="Shapes and Lines" actions={
|
|
43
|
+
<ImageEditorPane title="Shapes and Lines" adaptive={adaptive} confirmDisabled={!selected} actions={
|
|
59
44
|
<>
|
|
60
|
-
<Button>Remove</Button>
|
|
61
|
-
<Button themeColor="primary">Insert</Button>
|
|
45
|
+
<Button disabled={!selected}>Remove</Button>
|
|
46
|
+
<Button themeColor="primary" disabled={!selected}>Insert</Button>
|
|
62
47
|
</>
|
|
63
48
|
}>
|
|
64
|
-
<SegmentedControl thumbStyles={{ width: "50%" }} stretched aria-label="Shape or Line"
|
|
49
|
+
<SegmentedControl thumbStyles={{ width: "50%" }} stretched aria-label="Shape or Line">
|
|
65
50
|
<SegmentedControlButton icon="shapes" selected>Shape</SegmentedControlButton>
|
|
66
51
|
<SegmentedControlButton icon="shape-line">Line</SegmentedControlButton>
|
|
67
52
|
</SegmentedControl>
|
|
@@ -70,15 +55,73 @@ export const ImageEditorInsertShape = ({
|
|
|
70
55
|
<FormField
|
|
71
56
|
label="Type"
|
|
72
57
|
editor={
|
|
73
|
-
<ImageEditorOptionList scrollable
|
|
74
|
-
{
|
|
75
|
-
<
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
58
|
+
<ImageEditorOptionList scrollable>
|
|
59
|
+
<ImageEditorOptionPreview selected={shapeType === "Square"}>
|
|
60
|
+
<div className="k-imageeditor-option-content">
|
|
61
|
+
<Icon icon="checkbox" />
|
|
62
|
+
<span className="k-imageeditor-option-label">Square</span>
|
|
63
|
+
</div>
|
|
64
|
+
</ImageEditorOptionPreview>
|
|
65
|
+
<ImageEditorOptionPreview selected={shapeType === "Rectangle"}>
|
|
66
|
+
<div className="k-imageeditor-option-content">
|
|
67
|
+
<Icon icon="rectangle-shape" />
|
|
68
|
+
<span className="k-imageeditor-option-label">Rectangle</span>
|
|
69
|
+
</div>
|
|
70
|
+
</ImageEditorOptionPreview>
|
|
71
|
+
<ImageEditorOptionPreview selected={shapeType === "Circle"}>
|
|
72
|
+
<div className="k-imageeditor-option-content">
|
|
73
|
+
<Icon icon="circle-shape" />
|
|
74
|
+
<span className="k-imageeditor-option-label">Circle</span>
|
|
75
|
+
</div>
|
|
76
|
+
</ImageEditorOptionPreview>
|
|
77
|
+
<ImageEditorOptionPreview selected={shapeType === "Oval"}>
|
|
78
|
+
<div className="k-imageeditor-option-content">
|
|
79
|
+
<Icon icon="oval-shape" />
|
|
80
|
+
<span className="k-imageeditor-option-label">Oval</span>
|
|
81
|
+
</div>
|
|
82
|
+
</ImageEditorOptionPreview>
|
|
83
|
+
<ImageEditorOptionPreview selected={shapeType === "Triangle"}>
|
|
84
|
+
<div className="k-imageeditor-option-content">
|
|
85
|
+
<Icon icon="kpi-status-hold" />
|
|
86
|
+
<span className="k-imageeditor-option-label">Triangle</span>
|
|
87
|
+
</div>
|
|
88
|
+
</ImageEditorOptionPreview>
|
|
89
|
+
<ImageEditorOptionPreview selected={shapeType === "Star"}>
|
|
90
|
+
<div className="k-imageeditor-option-content">
|
|
91
|
+
<Icon icon="star" />
|
|
92
|
+
<span className="k-imageeditor-option-label">Star</span>
|
|
93
|
+
</div>
|
|
94
|
+
</ImageEditorOptionPreview>
|
|
95
|
+
<ImageEditorOptionPreview selected={shapeType === "Heart"}>
|
|
96
|
+
<div className="k-imageeditor-option-content">
|
|
97
|
+
<Icon icon="heart" />
|
|
98
|
+
<span className="k-imageeditor-option-label">Heart</span>
|
|
99
|
+
</div>
|
|
100
|
+
</ImageEditorOptionPreview>
|
|
101
|
+
<ImageEditorOptionPreview selected={shapeType === "Diamond"}>
|
|
102
|
+
<div className="k-imageeditor-option-content">
|
|
103
|
+
<Icon icon="kpi-status-deny" />
|
|
104
|
+
<span className="k-imageeditor-option-label">Diamond</span>
|
|
105
|
+
</div>
|
|
106
|
+
</ImageEditorOptionPreview>
|
|
107
|
+
<ImageEditorOptionPreview selected={shapeType === "Hexagon"}>
|
|
108
|
+
<div className="k-imageeditor-option-content">
|
|
109
|
+
<Icon icon="hexagon-shape" />
|
|
110
|
+
<span className="k-imageeditor-option-label">Hexagon</span>
|
|
111
|
+
</div>
|
|
112
|
+
</ImageEditorOptionPreview>
|
|
113
|
+
<ImageEditorOptionPreview selected={shapeType === "Pentagon"}>
|
|
114
|
+
<div className="k-imageeditor-option-content">
|
|
115
|
+
<Icon icon="pentagon-shape" />
|
|
116
|
+
<span className="k-imageeditor-option-label">Pentagon</span>
|
|
117
|
+
</div>
|
|
118
|
+
</ImageEditorOptionPreview>
|
|
119
|
+
<ImageEditorOptionPreview selected={shapeType === "Arrow"}>
|
|
120
|
+
<div className="k-imageeditor-option-content">
|
|
121
|
+
<Icon icon="arrow-right" />
|
|
122
|
+
<span className="k-imageeditor-option-label">Arrow</span>
|
|
123
|
+
</div>
|
|
124
|
+
</ImageEditorOptionPreview>
|
|
82
125
|
</ImageEditorOptionList>
|
|
83
126
|
}
|
|
84
127
|
/>
|
|
@@ -90,7 +133,7 @@ export const ImageEditorInsertShape = ({
|
|
|
90
133
|
<FormField
|
|
91
134
|
label="Stroke Width"
|
|
92
135
|
editorId="shape-stroke-width"
|
|
93
|
-
editor={ <NumericTextbox id="shape-stroke-width" showSpinButton={false} value={String(strokeWidth)} prefix={<Icon icon="border-width" />} /> }
|
|
136
|
+
editor={ <NumericTextbox id="shape-stroke-width" showClearButton={false} showSpinButton={false} value={String(strokeWidth)} prefix={<Icon icon="border-width" />} /> }
|
|
94
137
|
/>
|
|
95
138
|
</Fieldset>
|
|
96
139
|
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
@@ -106,13 +149,13 @@ export const ImageEditorInsertShape = ({
|
|
|
106
149
|
<FormField
|
|
107
150
|
label="Font Family"
|
|
108
151
|
editorId="shape-font-family"
|
|
109
|
-
editor={ <Combobox disabled={!selected} id="shape-font-family" prefix={<Icon icon="font-family" />} value={fontFamily} /> }
|
|
152
|
+
editor={ <Combobox disabled={!selected} id="shape-font-family" showClearButton={false} prefix={<Icon icon="font-family" />} value={fontFamily} /> }
|
|
110
153
|
/>
|
|
111
154
|
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
112
155
|
<FormField
|
|
113
156
|
label="Font Size"
|
|
114
157
|
editorId="shape-font-size"
|
|
115
|
-
editor={ <NumericTextbox disabled={!selected} id="shape-font-size" showSpinButton={false} value={String(fontSize)} prefix={<Icon icon="font-size" />} /> }
|
|
158
|
+
editor={ <NumericTextbox disabled={!selected} id="shape-font-size" showClearButton={false} showSpinButton={false} value={String(fontSize)} prefix={<Icon icon="font-size" />} /> }
|
|
116
159
|
/>
|
|
117
160
|
<FormField
|
|
118
161
|
label="Alignment"
|
|
@@ -212,7 +255,7 @@ export const ImageEditorInsertShape = ({
|
|
|
212
255
|
}
|
|
213
256
|
|
|
214
257
|
children={
|
|
215
|
-
<
|
|
258
|
+
<ImageEditorCanvas adaptive={adaptive} imageSrc={imageSrc} />
|
|
216
259
|
}
|
|
217
260
|
{...props} />
|
|
218
261
|
);
|