@progress/kendo-themes-html 14.5.1-dev.6 → 14.5.1-dev.8
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/colorgradient/demos/colorgradient.js +1 -1
- package/dist/cjs/colorpicker/colorpicker.spec.js +1 -1
- package/dist/cjs/colorpicker/templates/colorpicker-adaptive.js +1 -1
- package/dist/cjs/colorpicker/templates/colorpicker-disabled.js +1 -1
- package/dist/cjs/colorpicker/templates/colorpicker-normal.js +1 -1
- package/dist/cjs/combobox/demos/combobox.js +1 -1
- package/dist/cjs/combobox/templates/combobox-grouping-modern-custom-value.js +1 -1
- package/dist/cjs/filemanager/filemanager-listview.spec.js +1 -1
- package/dist/cjs/floating-toolbar/floating-toolbar.spec.js +1 -1
- package/dist/cjs/imageeditor/imageeditor-option-list.js +1 -0
- package/dist/cjs/imageeditor/imageeditor-option-preview.js +1 -0
- package/dist/cjs/imageeditor/imageeditor-pane.js +1 -0
- package/dist/cjs/imageeditor/imageeditor-placeholder.js +1 -0
- package/dist/cjs/imageeditor/imageeditor-preview-thumbnail.js +1 -0
- package/dist/cjs/imageeditor/imageeditor-resize-handles.js +1 -0
- package/dist/cjs/imageeditor/imageeditor-sidebar.js +1 -0
- 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.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-blur.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-crop.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-disabled.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-filters.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-frames.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-insert-line.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-insert-shape.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-insert-text.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-normal.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-pixelate.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-resize.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-rotate.js +1 -0
- package/dist/cjs/imageeditor/templates/imageeditor-shadow.js +1 -0
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/listview/demos/listview.js +1 -1
- package/dist/cjs/listview/listview.spec.js +1 -1
- package/dist/cjs/listview/templates/listview-no-data.js +1 -1
- package/dist/cjs/listview/templates/listview-normal.js +1 -1
- package/dist/cjs/listview/templates/listview-selectable.js +1 -1
- package/dist/cjs/pager/index.js +1 -1
- package/dist/cjs/prompt/templates/prompt-inline-input-only.js +1 -1
- package/dist/cjs/prompt/templates/prompt-inline.js +1 -1
- package/dist/cjs/prompt/templates/prompt-more-actions.js +1 -1
- package/dist/cjs/prompt/templates/prompt-normal.js +1 -1
- package/dist/cjs/prompt/templates/prompt-output.js +1 -1
- package/dist/cjs/prompt/templates/prompt-popup.js +1 -1
- package/dist/cjs/prompt/templates/prompt-settings.js +1 -1
- package/dist/cjs/prompt/templates/prompt-suggestions.js +1 -1
- package/dist/cjs/scheduler/scheduler-toolbar.spec.js +1 -1
- package/dist/cjs/signature/index.js +1 -1
- package/dist/cjs/signature/signature.spec.js +1 -1
- package/dist/cjs/signature/templates/signature-maximized.js +1 -1
- package/dist/cjs/signature/templates/signature-normal.js +1 -1
- package/dist/cjs/spreadsheet/spreadsheet-action-bar.js +1 -1
- package/dist/cjs/toolbar/demos/toolbar.js +1 -1
- package/dist/cjs/toolbar/templates/toolbar-scrollable-buttons-hidden.js +1 -1
- package/dist/cjs/toolbar/templates/toolbar-scrollable.js +1 -1
- package/dist/esm/colorgradient/demos/colorgradient.mjs +1 -1
- package/dist/esm/colorpicker/colorpicker.spec.mjs +1 -1
- package/dist/esm/colorpicker/templates/colorpicker-adaptive.mjs +1 -1
- package/dist/esm/colorpicker/templates/colorpicker-disabled.mjs +1 -1
- package/dist/esm/colorpicker/templates/colorpicker-normal.mjs +1 -1
- package/dist/esm/combobox/demos/combobox.mjs +1 -1
- package/dist/esm/combobox/templates/combobox-grouping-modern-custom-value.mjs +1 -1
- package/dist/esm/filemanager/filemanager-listview.spec.mjs +1 -1
- package/dist/esm/floating-toolbar/floating-toolbar.spec.mjs +1 -1
- package/dist/esm/imageeditor/imageeditor-option-list.mjs +1 -0
- package/dist/esm/imageeditor/imageeditor-option-preview.mjs +1 -0
- package/dist/esm/imageeditor/imageeditor-pane.mjs +1 -0
- package/dist/esm/imageeditor/imageeditor-placeholder.mjs +1 -0
- package/dist/esm/imageeditor/imageeditor-preview-thumbnail.mjs +1 -0
- package/dist/esm/imageeditor/imageeditor-resize-handles.mjs +1 -0
- package/dist/esm/imageeditor/imageeditor-sidebar.mjs +1 -0
- 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.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-blur.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-crop.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-disabled.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-filters.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-frames.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-insert-line.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-insert-shape.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-insert-text.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-normal.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-pixelate.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-resize.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-rotate.mjs +1 -0
- package/dist/esm/imageeditor/templates/imageeditor-shadow.mjs +1 -0
- package/dist/esm/index.mjs +8 -8
- package/dist/esm/listview/demos/listview.mjs +1 -1
- package/dist/esm/listview/templates/listview-no-data.mjs +1 -1
- package/dist/esm/listview/templates/listview-normal.mjs +1 -1
- package/dist/esm/listview/templates/listview-selectable.mjs +1 -1
- package/dist/esm/pager/index.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-inline-input-only.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-inline.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-more-actions.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-normal.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-output.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-popup.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-settings.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-suggestions.mjs +1 -1
- package/dist/esm/scheduler/scheduler-toolbar.spec.mjs +1 -1
- package/dist/esm/signature/index.mjs +1 -1
- package/dist/esm/signature/signature.spec.mjs +1 -1
- package/dist/esm/signature/templates/signature-maximized.mjs +1 -1
- package/dist/esm/signature/templates/signature-normal.mjs +1 -1
- package/dist/esm/spreadsheet/spreadsheet-action-bar.mjs +1 -1
- package/dist/esm/toolbar/demos/toolbar.mjs +1 -1
- package/dist/esm/toolbar/templates/toolbar-scrollable-buttons-hidden.mjs +1 -1
- package/dist/esm/toolbar/templates/toolbar-scrollable.mjs +1 -1
- package/dist/types/combobox/combobox.spec.d.ts +1 -1
- package/dist/types/imageeditor/imageeditor-option-list.d.ts +18 -0
- package/dist/types/imageeditor/imageeditor-option-preview.d.ts +18 -0
- package/dist/types/imageeditor/imageeditor-pane.d.ts +21 -0
- package/dist/types/imageeditor/imageeditor-placeholder.d.ts +7 -0
- package/dist/types/imageeditor/imageeditor-preview-thumbnail.d.ts +12 -0
- package/dist/types/imageeditor/imageeditor-resize-handles.d.ts +14 -0
- package/dist/types/imageeditor/imageeditor-sidebar.d.ts +11 -0
- package/dist/types/imageeditor/imageeditor-toolbar.d.ts +1 -0
- package/dist/types/imageeditor/imageeditor.spec.d.ts +40 -4
- package/dist/types/imageeditor/index.d.ts +18 -0
- package/dist/types/imageeditor/templates/imageeditor-adjustments.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-blur.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-disabled.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-filters.d.ts +6 -0
- package/dist/types/imageeditor/templates/imageeditor-frames.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-insert-line.d.ts +2 -0
- package/dist/types/imageeditor/templates/imageeditor-insert-shape.d.ts +2 -0
- package/dist/types/imageeditor/templates/imageeditor-insert-text.d.ts +2 -0
- package/dist/types/imageeditor/templates/imageeditor-pixelate.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-rotate.d.ts +1 -0
- package/dist/types/imageeditor/templates/imageeditor-shadow.d.ts +1 -0
- package/dist/types/numerictextbox/numerictextbox.spec.d.ts +1 -1
- package/package.json +5 -5
- package/src/combobox/combobox.spec.tsx +2 -2
- package/src/imageeditor/imageeditor-option-list.tsx +53 -0
- package/src/imageeditor/imageeditor-option-preview.tsx +56 -0
- package/src/imageeditor/imageeditor-pane.tsx +70 -0
- package/src/imageeditor/imageeditor-placeholder.tsx +51 -0
- package/src/imageeditor/imageeditor-preview-thumbnail.tsx +42 -0
- package/src/imageeditor/imageeditor-resize-handles.tsx +37 -0
- package/src/imageeditor/imageeditor-sidebar.tsx +66 -0
- package/src/imageeditor/imageeditor-toolbar.tsx +14 -13
- package/src/imageeditor/imageeditor.spec.tsx +79 -13
- package/src/imageeditor/index.ts +19 -0
- package/src/imageeditor/templates/imageeditor-adjustments.tsx +88 -0
- package/src/imageeditor/templates/imageeditor-blur.tsx +92 -0
- package/src/imageeditor/templates/imageeditor-crop.tsx +64 -59
- package/src/imageeditor/templates/imageeditor-disabled.tsx +45 -0
- package/src/imageeditor/templates/imageeditor-filters.tsx +98 -0
- package/src/imageeditor/templates/imageeditor-frames.tsx +180 -0
- package/src/imageeditor/templates/imageeditor-insert-line.tsx +141 -0
- package/src/imageeditor/templates/imageeditor-insert-shape.tsx +195 -0
- package/src/imageeditor/templates/imageeditor-insert-text.tsx +143 -0
- package/src/imageeditor/templates/imageeditor-normal.tsx +20 -1
- package/src/imageeditor/templates/imageeditor-pixelate.tsx +92 -0
- package/src/imageeditor/templates/imageeditor-resize.tsx +68 -50
- package/src/imageeditor/templates/imageeditor-rotate.tsx +98 -0
- package/src/imageeditor/templates/imageeditor-shadow.tsx +96 -0
- package/src/imageeditor/tests/imageeditor-adaptive-small.tsx +373 -0
- package/src/imageeditor/tests/imageeditor-adjustments-pane.tsx +14 -0
- package/src/imageeditor/tests/imageeditor-blur-pane.tsx +29 -0
- package/src/imageeditor/tests/imageeditor-crop-pane.tsx +3 -2
- package/src/imageeditor/tests/imageeditor-export-dialog.tsx +85 -0
- package/src/imageeditor/tests/imageeditor-filters-pane.tsx +14 -0
- package/src/imageeditor/tests/imageeditor-frames-pane.tsx +22 -0
- package/src/imageeditor/tests/imageeditor-insert-line-pane.tsx +52 -0
- package/src/imageeditor/tests/imageeditor-insert-shape-pane.tsx +57 -0
- package/src/imageeditor/tests/imageeditor-insert-text-pane.tsx +51 -0
- package/src/imageeditor/tests/imageeditor-interactive-states.tsx +79 -0
- package/src/imageeditor/tests/imageeditor-option-list-states.tsx +17 -0
- package/src/imageeditor/tests/imageeditor-pixelate-pane.tsx +29 -0
- package/src/imageeditor/tests/imageeditor-resize-pane.tsx +15 -1
- package/src/imageeditor/tests/imageeditor-responsive.tsx +71 -0
- package/src/imageeditor/tests/imageeditor-rotate-pane.tsx +27 -0
- package/src/imageeditor/tests/imageeditor-shadow-pane.tsx +14 -0
- package/src/imageeditor/tests/imageeditor-sidebar-scrollable.tsx +97 -0
- package/src/numerictextbox/numerictextbox.spec.tsx +2 -2
- package/src/signature/signature.spec.tsx +4 -17
- package/src/signature/tests/signature-flat.tsx +0 -3
- package/src/signature/tests/signature-outline.tsx +0 -3
- package/src/signature/tests/signature-solid.tsx +0 -3
- package/src/signature/tests/signature.tsx +0 -3
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { ImageEditor, ImageEditorPane, ImageEditorOptionList, ImageEditorOptionPreview, ImageEditorResizeHandles } from "..";
|
|
2
|
+
import { Button } from "../../button";
|
|
3
|
+
import { ButtonGroup } from "../../button-group";
|
|
4
|
+
import { Combobox } from "../../combobox";
|
|
5
|
+
import { NumericTextbox } from "../../numerictextbox";
|
|
6
|
+
import { ColorPicker } from "../../colorpicker";
|
|
7
|
+
import { Form, FormField, Fieldset } from "../../form";
|
|
8
|
+
import { Icon } from "../../icon";
|
|
9
|
+
import { SegmentedControl, SegmentedControlButton } from "../../segmented-control";
|
|
10
|
+
import { FloatingToolbar } from "../../floating-toolbar/floating-toolbar.spec";
|
|
11
|
+
|
|
12
|
+
const insertShapeSidebarItems = [
|
|
13
|
+
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
14
|
+
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
15
|
+
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" aria-label="Rotate"></Button>,
|
|
16
|
+
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
17
|
+
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" aria-label="Text"></Button>,
|
|
18
|
+
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" selected aria-label="Shapes"></Button>,
|
|
19
|
+
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
20
|
+
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
21
|
+
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
22
|
+
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
23
|
+
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
24
|
+
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" aria-label="Frame"></Button>,
|
|
25
|
+
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const shapeTypes = [
|
|
29
|
+
{ label: "Square", icon: "checkbox" },
|
|
30
|
+
{ label: "Rectangle", icon: "rectangle-shape" },
|
|
31
|
+
{ label: "Circle", icon: "circle-shape" },
|
|
32
|
+
{ label: "Oval", icon: "oval-shape" },
|
|
33
|
+
{ label: "Triangle", icon: "kpi-status-hold" },
|
|
34
|
+
{ label: "Star", icon: "star" },
|
|
35
|
+
{ label: "Heart", icon: "heart" },
|
|
36
|
+
{ label: "Diamond", icon: "kpi-status-deny" },
|
|
37
|
+
{ label: "Hexagon", icon: "hexagon-shape" },
|
|
38
|
+
{ label: "Pentagon", icon: "pentagon-shape" },
|
|
39
|
+
{ label: "Arrow", icon: "arrow-right" }
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
export const ImageEditorInsertShape = (props: any) => (
|
|
43
|
+
<ImageEditor
|
|
44
|
+
sidebarItems={insertShapeSidebarItems}
|
|
45
|
+
actionPane={
|
|
46
|
+
<ImageEditorPane title="Shapes and Lines" actions={
|
|
47
|
+
<>
|
|
48
|
+
<Button>Remove</Button>
|
|
49
|
+
<Button themeColor="primary">Insert</Button>
|
|
50
|
+
</>
|
|
51
|
+
}>
|
|
52
|
+
<SegmentedControl thumbStyles={{ width: "50%" }} stretched aria-label="Shape or Line" style={{ flexShrink: 0 }}>
|
|
53
|
+
<SegmentedControlButton icon="shapes" selected>Shape</SegmentedControlButton>
|
|
54
|
+
<SegmentedControlButton icon="shape-line">Line</SegmentedControlButton>
|
|
55
|
+
</SegmentedControl>
|
|
56
|
+
|
|
57
|
+
<Form tag="div">
|
|
58
|
+
<FormField
|
|
59
|
+
label="Type"
|
|
60
|
+
editor={
|
|
61
|
+
<ImageEditorOptionList scrollable scrollableEnd>
|
|
62
|
+
{shapeTypes.map((shape) => (
|
|
63
|
+
<ImageEditorOptionPreview key={shape.label} selected={shape.label === "Circle"}>
|
|
64
|
+
<div className="k-imageeditor-option-content">
|
|
65
|
+
<Icon icon={shape.icon} />
|
|
66
|
+
<span className="k-imageeditor-option-label">{shape.label}</span>
|
|
67
|
+
</div>
|
|
68
|
+
</ImageEditorOptionPreview>
|
|
69
|
+
))}
|
|
70
|
+
</ImageEditorOptionList>
|
|
71
|
+
}
|
|
72
|
+
/>
|
|
73
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
74
|
+
<FormField
|
|
75
|
+
label="Stroke Color"
|
|
76
|
+
editor={ <ColorPicker id="shape-stroke-color" value="#b0e855" aria-label="Stroke Color" /> }
|
|
77
|
+
/>
|
|
78
|
+
<FormField
|
|
79
|
+
label="Stroke Width"
|
|
80
|
+
editorId="shape-stroke-width"
|
|
81
|
+
editor={ <NumericTextbox id="shape-stroke-width" showSpinButton={false} value="8" prefix={<Icon icon="border-width" />} /> }
|
|
82
|
+
/>
|
|
83
|
+
</Fieldset>
|
|
84
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
85
|
+
<FormField
|
|
86
|
+
label="Fill Color"
|
|
87
|
+
editor={ <ColorPicker id="shape-fill-color" value="#eae382" valueIconName="droplet" aria-label="Fill Color" /> }
|
|
88
|
+
/>
|
|
89
|
+
<FormField
|
|
90
|
+
label="Text Color"
|
|
91
|
+
editor={ <ColorPicker id="shape-text-color" value="#4a4500" valueIconName="foreground-color" aria-label="Text Color" /> }
|
|
92
|
+
/>
|
|
93
|
+
</Fieldset>
|
|
94
|
+
<FormField
|
|
95
|
+
label="Font Family"
|
|
96
|
+
editorId="shape-font-family"
|
|
97
|
+
editor={ <Combobox id="shape-font-family" prefix={<Icon icon="font-family" />} value="Trebuchet MS" /> }
|
|
98
|
+
/>
|
|
99
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
100
|
+
<FormField
|
|
101
|
+
label="Font Size"
|
|
102
|
+
editorId="shape-font-size"
|
|
103
|
+
editor={ <NumericTextbox id="shape-font-size" showSpinButton={false} value="24" prefix={<Icon icon="font-size" />} /> }
|
|
104
|
+
/>
|
|
105
|
+
<FormField
|
|
106
|
+
label="Alignment"
|
|
107
|
+
editor={
|
|
108
|
+
<ButtonGroup>
|
|
109
|
+
<Button className="k-group-start" icon="align-left" aria-label="Align Left"></Button>
|
|
110
|
+
<Button icon="align-center" selected aria-label="Align Center"></Button>
|
|
111
|
+
<Button className="k-group-end" icon="align-right" aria-label="Align Right"></Button>
|
|
112
|
+
</ButtonGroup>
|
|
113
|
+
}
|
|
114
|
+
/>
|
|
115
|
+
</Fieldset>
|
|
116
|
+
<FormField
|
|
117
|
+
label="Format"
|
|
118
|
+
editor={
|
|
119
|
+
<div className="k-imageeditor-controls">
|
|
120
|
+
<Button icon="bold" aria-label="Bold"></Button>
|
|
121
|
+
<Button icon="italic" aria-label="Italic"></Button>
|
|
122
|
+
<Button icon="underline" aria-label="Underline"></Button>
|
|
123
|
+
<Button icon="strikethrough" aria-label="Strikethrough"></Button>
|
|
124
|
+
<Button icon="convert-uppercase" aria-label="Uppercase"></Button>
|
|
125
|
+
<Button icon="convert-lowercase" aria-label="Lowercase"></Button>
|
|
126
|
+
</div>
|
|
127
|
+
}
|
|
128
|
+
/>
|
|
129
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
130
|
+
<FormField
|
|
131
|
+
label="Align Horizontal"
|
|
132
|
+
editor={
|
|
133
|
+
<ButtonGroup>
|
|
134
|
+
<Button className="k-group-start" icon="align-items-start" aria-label="Align Left"></Button>
|
|
135
|
+
<Button icon="align-items-center" aria-label="Align Center"></Button>
|
|
136
|
+
<Button className="k-group-end" icon="align-items-end" aria-label="Align Right"></Button>
|
|
137
|
+
</ButtonGroup>
|
|
138
|
+
}
|
|
139
|
+
/>
|
|
140
|
+
<FormField
|
|
141
|
+
label="Align Vertical"
|
|
142
|
+
editor={
|
|
143
|
+
<ButtonGroup>
|
|
144
|
+
<Button className="k-group-start" icon="align-items-start-alt" aria-label="Align Top"></Button>
|
|
145
|
+
<Button icon="align-items-center-alt" aria-label="Align Middle"></Button>
|
|
146
|
+
<Button className="k-group-end" icon="align-items-end-alt" aria-label="Align Bottom"></Button>
|
|
147
|
+
</ButtonGroup>
|
|
148
|
+
}
|
|
149
|
+
/>
|
|
150
|
+
</Fieldset>
|
|
151
|
+
</Form>
|
|
152
|
+
</ImageEditorPane>
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
children={
|
|
156
|
+
<>
|
|
157
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover" }}></canvas>
|
|
158
|
+
<div className="k-imageeditor-resize" style={{ width: "165px", height: "54px", top: "140px", left: "165px" }}>
|
|
159
|
+
<div style={{
|
|
160
|
+
width: "100%",
|
|
161
|
+
height: "100%",
|
|
162
|
+
borderRadius: "50%",
|
|
163
|
+
background: "#eae382",
|
|
164
|
+
border: "2px solid #b0e855",
|
|
165
|
+
boxSizing: "border-box"
|
|
166
|
+
}}>
|
|
167
|
+
<p style={{
|
|
168
|
+
margin: 0,
|
|
169
|
+
width: "100%",
|
|
170
|
+
height: "100%",
|
|
171
|
+
display: "flex",
|
|
172
|
+
alignItems: "center",
|
|
173
|
+
justifyContent: "center",
|
|
174
|
+
fontFamily: "'Trebuchet MS', sans-serif",
|
|
175
|
+
fontSize: "16px",
|
|
176
|
+
lineHeight: 1,
|
|
177
|
+
color: "#4a4500",
|
|
178
|
+
whiteSpace: "nowrap"
|
|
179
|
+
}}>Shape text</p>
|
|
180
|
+
</div>
|
|
181
|
+
<ImageEditorResizeHandles variant="mixed" />
|
|
182
|
+
<FloatingToolbar fillMode="flat" resizable offset={{ top: "62px", left: "0" }}>
|
|
183
|
+
<Button fillMode="flat" icon="copy" aria-label="Duplicate"></Button>
|
|
184
|
+
<Button fillMode="flat" icon="pencil" aria-label="Edit"></Button>
|
|
185
|
+
<Button fillMode="flat" icon="flip-horizontal" aria-label="Flip Horizontal"></Button>
|
|
186
|
+
<Button fillMode="flat" icon="flip-vertical" aria-label="Flip Vertical"></Button>
|
|
187
|
+
<Button fillMode="flat" icon="trash" aria-label="Delete"></Button>
|
|
188
|
+
</FloatingToolbar>
|
|
189
|
+
</div>
|
|
190
|
+
</>
|
|
191
|
+
}
|
|
192
|
+
{...props} />
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
export default ImageEditorInsertShape;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { ImageEditor, ImageEditorPane, ImageEditorResizeHandles } from "..";
|
|
2
|
+
import { Button } from "../../button";
|
|
3
|
+
import { ButtonGroup } from "../../button-group";
|
|
4
|
+
import { Combobox } from "../../combobox";
|
|
5
|
+
import { NumericTextbox } from "../../numerictextbox";
|
|
6
|
+
import { ColorPicker } from "../../colorpicker";
|
|
7
|
+
import { Form, FormField, Fieldset } from "../../form";
|
|
8
|
+
import { Icon } from "../../icon";
|
|
9
|
+
import { FloatingToolbar } from "../../floating-toolbar/floating-toolbar.spec";
|
|
10
|
+
|
|
11
|
+
const insertTextSidebarItems = [
|
|
12
|
+
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
13
|
+
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
14
|
+
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" aria-label="Rotate"></Button>,
|
|
15
|
+
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
16
|
+
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" selected aria-label="Text"></Button>,
|
|
17
|
+
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" aria-label="Shapes"></Button>,
|
|
18
|
+
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
19
|
+
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
20
|
+
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
21
|
+
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
22
|
+
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
23
|
+
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" aria-label="Frame"></Button>,
|
|
24
|
+
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
export const ImageEditorInsertText = (props: any) => (
|
|
28
|
+
<ImageEditor
|
|
29
|
+
sidebarItems={insertTextSidebarItems}
|
|
30
|
+
actionPane={
|
|
31
|
+
<ImageEditorPane title="Text" actions={
|
|
32
|
+
<>
|
|
33
|
+
<Button>Remove</Button>
|
|
34
|
+
<Button themeColor="primary">Insert</Button>
|
|
35
|
+
</>
|
|
36
|
+
}>
|
|
37
|
+
<Form tag="div">
|
|
38
|
+
<FormField
|
|
39
|
+
label="Font Family"
|
|
40
|
+
editorId="text-font-family"
|
|
41
|
+
editor={ <Combobox id="text-font-family" prefix={<Icon icon="font-family" />} value="Trebuchet MS" /> }
|
|
42
|
+
/>
|
|
43
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
44
|
+
<FormField
|
|
45
|
+
label="Font Size"
|
|
46
|
+
editorId="text-font-size"
|
|
47
|
+
editor={ <NumericTextbox id="text-font-size" showSpinButton={false} value="70" prefix={<Icon icon="font-size" />} /> }
|
|
48
|
+
/>
|
|
49
|
+
<FormField
|
|
50
|
+
label="Alignment"
|
|
51
|
+
editor={
|
|
52
|
+
<ButtonGroup>
|
|
53
|
+
<Button className="k-group-start" icon="align-left" aria-label="Align Left"></Button>
|
|
54
|
+
<Button icon="align-center" selected aria-label="Align Center"></Button>
|
|
55
|
+
<Button className="k-group-end" icon="align-right" aria-label="Align Right"></Button>
|
|
56
|
+
</ButtonGroup>
|
|
57
|
+
}
|
|
58
|
+
/>
|
|
59
|
+
</Fieldset>
|
|
60
|
+
<FormField
|
|
61
|
+
label="Format"
|
|
62
|
+
editor={
|
|
63
|
+
<div className="k-imageeditor-controls">
|
|
64
|
+
<Button icon="bold" aria-label="Bold"></Button>
|
|
65
|
+
<Button icon="italic" aria-label="Italic"></Button>
|
|
66
|
+
<Button icon="underline" aria-label="Underline"></Button>
|
|
67
|
+
<Button icon="strikethrough" aria-label="Strikethrough"></Button>
|
|
68
|
+
<Button icon="convert-uppercase" aria-label="Uppercase"></Button>
|
|
69
|
+
<Button icon="convert-lowercase" aria-label="Lowercase"></Button>
|
|
70
|
+
</div>
|
|
71
|
+
}
|
|
72
|
+
/>
|
|
73
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
74
|
+
<FormField
|
|
75
|
+
label="Fill Color"
|
|
76
|
+
editor={ <ColorPicker id="text-fill-color" value="#f5e93d" valueIconName="foreground-color" aria-label="Fill Color" /> }
|
|
77
|
+
/>
|
|
78
|
+
<FormField
|
|
79
|
+
label="Text Opacity"
|
|
80
|
+
editor={ <NumericTextbox id="text-opacity" showSpinButton={false} value="70%" prefix={<Icon icon="transparency" />} aria-label="Text Opacity" /> }
|
|
81
|
+
/>
|
|
82
|
+
</Fieldset>
|
|
83
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
84
|
+
<FormField
|
|
85
|
+
label="Align Horizontal"
|
|
86
|
+
editor={
|
|
87
|
+
<ButtonGroup>
|
|
88
|
+
<Button className="k-group-start" icon="align-items-start" aria-label="Align Left"></Button>
|
|
89
|
+
<Button icon="align-items-center" aria-label="Align Center"></Button>
|
|
90
|
+
<Button className="k-group-end" icon="align-items-end" aria-label="Align Right"></Button>
|
|
91
|
+
</ButtonGroup>
|
|
92
|
+
}
|
|
93
|
+
/>
|
|
94
|
+
<FormField
|
|
95
|
+
label="Align Vertical"
|
|
96
|
+
editor={
|
|
97
|
+
<ButtonGroup>
|
|
98
|
+
<Button className="k-group-start" icon="align-items-start-alt" aria-label="Align Top"></Button>
|
|
99
|
+
<Button icon="align-items-center-alt" aria-label="Align Middle"></Button>
|
|
100
|
+
<Button className="k-group-end" icon="align-items-end-alt" aria-label="Align Bottom"></Button>
|
|
101
|
+
</ButtonGroup>
|
|
102
|
+
}
|
|
103
|
+
/>
|
|
104
|
+
</Fieldset>
|
|
105
|
+
</Form>
|
|
106
|
+
</ImageEditorPane>
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
children={
|
|
110
|
+
<>
|
|
111
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover" }}></canvas>
|
|
112
|
+
<div className="k-imageeditor-resize" style={{ width: "270px", height: "64px", top: "122px", left: "112px" }}>
|
|
113
|
+
<p style={{
|
|
114
|
+
margin: 0,
|
|
115
|
+
width: "100%",
|
|
116
|
+
height: "100%",
|
|
117
|
+
display: "flex",
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
justifyContent: "center",
|
|
120
|
+
fontFamily: "'Trebuchet MS', sans-serif",
|
|
121
|
+
fontWeight: "bold",
|
|
122
|
+
fontSize: "38px",
|
|
123
|
+
lineHeight: 1,
|
|
124
|
+
color: "#f5e93d",
|
|
125
|
+
opacity: 0.7,
|
|
126
|
+
textTransform: "uppercase",
|
|
127
|
+
whiteSpace: "nowrap"
|
|
128
|
+
}}>Text Example</p>
|
|
129
|
+
<ImageEditorResizeHandles variant="mixed" />
|
|
130
|
+
<FloatingToolbar fillMode="flat" offset={{ top: "72px", left: "0" }}>
|
|
131
|
+
<Button fillMode="flat" icon="copy" aria-label="Duplicate"></Button>
|
|
132
|
+
<Button fillMode="flat" icon="pencil" aria-label="Edit"></Button>
|
|
133
|
+
<Button fillMode="flat" icon="flip-horizontal" aria-label="Flip Horizontal"></Button>
|
|
134
|
+
<Button fillMode="flat" icon="flip-vertical" aria-label="Flip Vertical"></Button>
|
|
135
|
+
<Button fillMode="flat" icon="trash" aria-label="Delete"></Button>
|
|
136
|
+
</FloatingToolbar>
|
|
137
|
+
</div>
|
|
138
|
+
</>
|
|
139
|
+
}
|
|
140
|
+
{...props} />
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
export default ImageEditorInsertText;
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { ImageEditor } from "..";
|
|
2
|
+
import { Button } from "../../button";
|
|
3
|
+
import { Autocomplete } from "../../autocomplete";
|
|
4
|
+
import { ToolbarItem, ToolbarSeparator } from "../../toolbar";
|
|
5
|
+
|
|
6
|
+
// Freshly-loaded image: no edit history yet, so undo/redo are disabled
|
|
7
|
+
const normalToolbarItems = [
|
|
8
|
+
<Button fillMode="flat" key="toolbar-button-1" icon="image-add" aria-label="Image Add"></Button>,
|
|
9
|
+
<ToolbarSeparator key="toolbar-separator-1"></ToolbarSeparator>,
|
|
10
|
+
<Button fillMode="flat" key="toolbar-button-2" disabled icon="undo" aria-label="Undo"></Button>,
|
|
11
|
+
<Button fillMode="flat" key="toolbar-button-3" disabled icon="redo" aria-label="Redo"></Button>,
|
|
12
|
+
<ToolbarSeparator key="toolbar-separator-2"></ToolbarSeparator>,
|
|
13
|
+
<Button fillMode="flat" key="toolbar-button-4" icon="download" aria-label="Download"></Button>,
|
|
14
|
+
<div className="k-spacer" key="toolbar-spacer"></div>,
|
|
15
|
+
<Button fillMode="flat" key="toolbar-button-5" icon="zoom-in" aria-label="Zoom In"></Button>,
|
|
16
|
+
<ToolbarItem key="toolbar-item-1">
|
|
17
|
+
<Autocomplete fillMode="flat" value="Fit" aria-label="Zoom options" />
|
|
18
|
+
</ToolbarItem>,
|
|
19
|
+
<Button fillMode="flat" key="toolbar-button-6" icon="zoom-out" aria-label="Zoom Out"></Button>
|
|
20
|
+
];
|
|
2
21
|
|
|
3
22
|
export const ImageEditorNormal = (props: any) => (
|
|
4
|
-
<ImageEditor {...props} />
|
|
23
|
+
<ImageEditor toolbarItems={normalToolbarItems} {...props} />
|
|
5
24
|
);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ImageEditor, ImageEditorPane } from "..";
|
|
2
|
+
import { Button } from "../../button";
|
|
3
|
+
import { NumericTextbox } from "../../numerictextbox";
|
|
4
|
+
import { Form, FormField } from "../../form";
|
|
5
|
+
import { RadioGroup, RadioItem, RadioButtonWithLabelAfter } from "../../radio";
|
|
6
|
+
import { SegmentedControl, SegmentedControlButton } from "../../segmented-control";
|
|
7
|
+
import { Slider } from "../../slider";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const pixelateSidebarItems = [
|
|
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" selected 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" aria-label="Frame"></Button>,
|
|
23
|
+
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
export const ImageEditorPixelate = ({ shape = "rectangular", intensity = 24, ...props }: any) => (
|
|
27
|
+
<ImageEditor
|
|
28
|
+
sidebarItems={pixelateSidebarItems}
|
|
29
|
+
actionPane={
|
|
30
|
+
<ImageEditorPane title="Pixelate" actions={
|
|
31
|
+
<>
|
|
32
|
+
<Button>Reset</Button>
|
|
33
|
+
<Button themeColor="primary">Apply</Button>
|
|
34
|
+
</>
|
|
35
|
+
}>
|
|
36
|
+
<SegmentedControl thumbStyles={{ width: "50%", left: "50%" }} stretched aria-label="Redaction Tool" style={{ flexShrink: 0 }}>
|
|
37
|
+
<SegmentedControlButton icon="blur">Blur</SegmentedControlButton>
|
|
38
|
+
<SegmentedControlButton icon="grid" selected>Pixelate</SegmentedControlButton>
|
|
39
|
+
</SegmentedControl>
|
|
40
|
+
|
|
41
|
+
<Form tag="div">
|
|
42
|
+
<FormField
|
|
43
|
+
label="Marquee Tool Shape"
|
|
44
|
+
editor={
|
|
45
|
+
<RadioGroup layout="horizontal">
|
|
46
|
+
<RadioItem>
|
|
47
|
+
<RadioButtonWithLabelAfter id="pixelate-shape-rectangular" name="pixelate-shape" checked={shape === "rectangular"}>Rectangular</RadioButtonWithLabelAfter>
|
|
48
|
+
</RadioItem>
|
|
49
|
+
<RadioItem>
|
|
50
|
+
<RadioButtonWithLabelAfter id="pixelate-shape-elliptical" name="pixelate-shape" checked={shape === "elliptical"}>Elliptical</RadioButtonWithLabelAfter>
|
|
51
|
+
</RadioItem>
|
|
52
|
+
</RadioGroup>
|
|
53
|
+
}
|
|
54
|
+
/>
|
|
55
|
+
<FormField
|
|
56
|
+
label="Pixelate Intensity"
|
|
57
|
+
editorId="pixelate-intensity"
|
|
58
|
+
editor={
|
|
59
|
+
<div className="k-imageeditor-field-row">
|
|
60
|
+
<Slider
|
|
61
|
+
style={{ flex: 1, "--kendo-slider-start": 0, "--kendo-slider-end": intensity } as React.CSSProperties}
|
|
62
|
+
aria-label="Pixelate Intensity"
|
|
63
|
+
showButtons={false}
|
|
64
|
+
showTicks={false}
|
|
65
|
+
value={intensity}
|
|
66
|
+
min={0}
|
|
67
|
+
max={100}
|
|
68
|
+
/>
|
|
69
|
+
<NumericTextbox
|
|
70
|
+
id="pixelate-intensity"
|
|
71
|
+
style={{ width: "80px", flex: "none" }}
|
|
72
|
+
showClearButton={false}
|
|
73
|
+
showSpinButton={false}
|
|
74
|
+
value={String(intensity)}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
</Form>
|
|
80
|
+
</ImageEditorPane>
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
children={
|
|
84
|
+
<>
|
|
85
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover" }}></canvas>
|
|
86
|
+
<div className="k-imageeditor-crop-overlay">
|
|
87
|
+
<div className="k-imageeditor-crop" style={{ borderStyle: "dashed" }}></div>
|
|
88
|
+
</div>
|
|
89
|
+
</>
|
|
90
|
+
}
|
|
91
|
+
{...props} />
|
|
92
|
+
);
|
|
@@ -1,68 +1,86 @@
|
|
|
1
|
-
import { ImageEditor } from "..";
|
|
1
|
+
import { ImageEditor, ImageEditorPane, ImageEditorResizeHandles } from "..";
|
|
2
2
|
import { Button } from "../../button";
|
|
3
3
|
import { CheckboxWithLabelAfter } from "../../checkbox";
|
|
4
|
-
import { DropdownList } from "../../dropdownlist";
|
|
5
|
-
import { FormNormal, Fieldset, FormField } from "../../form";
|
|
6
4
|
import { NumericTextbox } from "../../numerictextbox";
|
|
7
|
-
import {
|
|
5
|
+
import { Form, FormField, Fieldset } from "../../form";
|
|
6
|
+
import { Icon } from "../../icon";
|
|
7
|
+
import { RadioGroup, RadioItem, RadioButtonWithLabelAfter } from "../../radio";
|
|
8
|
+
import { Tooltip } from "../../tooltip";
|
|
9
|
+
|
|
10
|
+
const resizeSidebarItems = [
|
|
11
|
+
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" selected 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" aria-label="Frame"></Button>,
|
|
23
|
+
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
24
|
+
];
|
|
8
25
|
|
|
9
26
|
export const ImageEditorResize = (props: any) => (
|
|
10
27
|
<ImageEditor
|
|
11
|
-
|
|
12
|
-
<Button key="toolbar-button-1" icon="upload" aria-label="Upload"></Button>,
|
|
13
|
-
<Button key="toolbar-button-2" icon="download" aria-label="Download"></Button>,
|
|
14
|
-
<ToolbarSeparator key="toolbar-separator-1"></ToolbarSeparator>,
|
|
15
|
-
<Button key="toolbar-button-3" disabled icon="undo" aria-label="Undo"></Button>,
|
|
16
|
-
<Button key="toolbar-button-4" disabled icon="redo" aria-label="Redo"></Button>,
|
|
17
|
-
<ToolbarSeparator key="toolbar-separator-2"></ToolbarSeparator>,
|
|
18
|
-
<Button key="toolbar-button-5" icon="crop" aria-label="Crop"></Button>,
|
|
19
|
-
<Button key="toolbar-button-6" icon="image-resize" aria-label="Resize"></Button>,
|
|
20
|
-
<Button key="toolbar-button-7" icon="zoom-in" aria-label="Zoom in"></Button>,
|
|
21
|
-
<Button key="toolbar-button-8" icon="zoom-out" aria-label="Zoom out"></Button>,
|
|
22
|
-
<ToolbarItem key="toolbar-item-1">
|
|
23
|
-
<DropdownList value="Zoom options" aria-label="Zoom options" />
|
|
24
|
-
</ToolbarItem>
|
|
25
|
-
]}
|
|
28
|
+
sidebarItems={resizeSidebarItems}
|
|
26
29
|
actionPane={
|
|
27
|
-
<
|
|
30
|
+
<ImageEditorPane title="Resize" actions={
|
|
28
31
|
<>
|
|
29
|
-
<Button
|
|
30
|
-
<Button
|
|
32
|
+
<Button>Reset</Button>
|
|
33
|
+
<Button themeColor="primary">Apply</Button>
|
|
31
34
|
</>
|
|
32
35
|
}>
|
|
33
|
-
<
|
|
34
|
-
<FormField
|
|
35
|
-
colSpan="1"
|
|
36
|
-
label="Width:"
|
|
37
|
-
editorId="resize-width"
|
|
38
|
-
editor={ <NumericTextbox id="resize-width" showClearButton={false} value="61" /> }
|
|
39
|
-
/>
|
|
40
|
-
<FormField
|
|
41
|
-
colSpan="1"
|
|
42
|
-
label=" "
|
|
43
|
-
editor={ <DropdownList value="Pixels" aria-label="Width unit" /> }
|
|
44
|
-
/>
|
|
45
|
-
<FormField
|
|
46
|
-
colSpan="1"
|
|
47
|
-
label="Height:"
|
|
48
|
-
editorId="resize-height"
|
|
49
|
-
editor={ <NumericTextbox id="resize-height" showClearButton={false} value="68" /> }
|
|
50
|
-
/>
|
|
51
|
-
<FormField
|
|
52
|
-
colSpan="1"
|
|
53
|
-
label=" "
|
|
54
|
-
editor={ <DropdownList value="Pixels" aria-label="Height unit" /> }
|
|
55
|
-
/>
|
|
36
|
+
<Form tag="div">
|
|
56
37
|
<FormField
|
|
57
|
-
|
|
58
|
-
editor={
|
|
38
|
+
label="Scale Unit"
|
|
39
|
+
editor={
|
|
40
|
+
<RadioGroup layout="horizontal">
|
|
41
|
+
<RadioItem>
|
|
42
|
+
<RadioButtonWithLabelAfter id="resize-scale-unit-pixel" name="resize-scale-unit" checked>Pixel</RadioButtonWithLabelAfter>
|
|
43
|
+
</RadioItem>
|
|
44
|
+
<RadioItem>
|
|
45
|
+
<RadioButtonWithLabelAfter id="resize-scale-unit-percentage" name="resize-scale-unit">Percentage</RadioButtonWithLabelAfter>
|
|
46
|
+
</RadioItem>
|
|
47
|
+
</RadioGroup>
|
|
48
|
+
}
|
|
59
49
|
/>
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "8px" }}>
|
|
51
|
+
<FormField
|
|
52
|
+
label="Width"
|
|
53
|
+
editorId="resize-width"
|
|
54
|
+
editor={ <NumericTextbox id="resize-width" showClearButton={false} value="494" prefix={<Icon icon="arrows-left-right" />} /> }
|
|
55
|
+
/>
|
|
56
|
+
<FormField
|
|
57
|
+
label="Height"
|
|
58
|
+
editorId="resize-height"
|
|
59
|
+
editor={ <NumericTextbox id="resize-height" showClearButton={false} value="307" prefix={<Icon icon="arrows-top-bottom" />} /> }
|
|
60
|
+
/>
|
|
61
|
+
</Fieldset>
|
|
62
|
+
<FormField editor={ <CheckboxWithLabelAfter id="resize-lock" checked>Lock Aspect Ratio</CheckboxWithLabelAfter> } />
|
|
63
|
+
</Form>
|
|
64
|
+
</ImageEditorPane>
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
children={
|
|
65
|
-
|
|
68
|
+
<>
|
|
69
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover" }}></canvas>
|
|
70
|
+
<div className="k-imageeditor-resize">
|
|
71
|
+
<ImageEditorResizeHandles variant="mixed" />
|
|
72
|
+
</div>
|
|
73
|
+
<Tooltip
|
|
74
|
+
themeColor="inverse"
|
|
75
|
+
style={{ position: "absolute", insetBlockEnd: "-52px", insetInlineEnd: "0" }}
|
|
76
|
+
content={
|
|
77
|
+
<>
|
|
78
|
+
<div>W: 494</div>
|
|
79
|
+
<div>H: 307</div>
|
|
80
|
+
</>
|
|
81
|
+
}
|
|
82
|
+
></Tooltip>
|
|
83
|
+
</>
|
|
66
84
|
}
|
|
67
85
|
{...props} />
|
|
68
86
|
);
|