@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,98 @@
|
|
|
1
|
+
import { ImageEditor, ImageEditorPane, ImageEditorResizeHandles } from "..";
|
|
2
|
+
import { Button } from "../../button";
|
|
3
|
+
import { NumericTextbox } from "../../numerictextbox";
|
|
4
|
+
import { InputSuffixText } from "../../input";
|
|
5
|
+
import { Form, FormField, Fieldset } from "../../form";
|
|
6
|
+
import { Slider } from "../../slider";
|
|
7
|
+
import { Tooltip } from "../../tooltip";
|
|
8
|
+
|
|
9
|
+
const rotateSidebarItems = [
|
|
10
|
+
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
11
|
+
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
12
|
+
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" selected aria-label="Rotate"></Button>,
|
|
13
|
+
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
14
|
+
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" aria-label="Text"></Button>,
|
|
15
|
+
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" aria-label="Shapes"></Button>,
|
|
16
|
+
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
17
|
+
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
18
|
+
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
19
|
+
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
20
|
+
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
21
|
+
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" aria-label="Frame"></Button>,
|
|
22
|
+
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export const ImageEditorRotate = (props: any) => (
|
|
26
|
+
<ImageEditor
|
|
27
|
+
sidebarItems={rotateSidebarItems}
|
|
28
|
+
actionPane={
|
|
29
|
+
<ImageEditorPane title="Rotate" actions={
|
|
30
|
+
<>
|
|
31
|
+
<Button>Reset</Button>
|
|
32
|
+
<Button themeColor="primary">Apply</Button>
|
|
33
|
+
</>
|
|
34
|
+
}>
|
|
35
|
+
<Form tag="div">
|
|
36
|
+
<FormField
|
|
37
|
+
label="Rotation"
|
|
38
|
+
editor={
|
|
39
|
+
<div className="k-imageeditor-field-row">
|
|
40
|
+
<Slider
|
|
41
|
+
style={{ width: "170px", flex: "none" }}
|
|
42
|
+
aria-label="Rotation"
|
|
43
|
+
showButtons={false}
|
|
44
|
+
showTicks={false}
|
|
45
|
+
value={85}
|
|
46
|
+
min={0}
|
|
47
|
+
max={360}
|
|
48
|
+
/>
|
|
49
|
+
<NumericTextbox
|
|
50
|
+
style={{ width: "72px", flex: "none" }}
|
|
51
|
+
showClearButton={false}
|
|
52
|
+
showSpinButton={false}
|
|
53
|
+
separators={false}
|
|
54
|
+
value="85"
|
|
55
|
+
suffix={<InputSuffixText>°</InputSuffixText>}
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
}
|
|
59
|
+
/>
|
|
60
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
61
|
+
<FormField
|
|
62
|
+
label="Rotate Options"
|
|
63
|
+
editor={
|
|
64
|
+
<div className="k-imageeditor-controls">
|
|
65
|
+
<Button icon="rotate-right" aria-label="Rotate Right"></Button>
|
|
66
|
+
<Button icon="rotate-left" aria-label="Rotate Left"></Button>
|
|
67
|
+
</div>
|
|
68
|
+
}
|
|
69
|
+
/>
|
|
70
|
+
<FormField
|
|
71
|
+
label="Flip Options"
|
|
72
|
+
editor={
|
|
73
|
+
<div className="k-imageeditor-controls">
|
|
74
|
+
<Button icon="flip-horizontal" aria-label="Flip Horizontal"></Button>
|
|
75
|
+
<Button icon="flip-vertical" aria-label="Flip Vertical"></Button>
|
|
76
|
+
</div>
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
</Fieldset>
|
|
80
|
+
</Form>
|
|
81
|
+
</ImageEditorPane>
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
children={
|
|
85
|
+
<>
|
|
86
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover" }}></canvas>
|
|
87
|
+
<div className="k-imageeditor-rotate">
|
|
88
|
+
<ImageEditorResizeHandles variant="scale" grid />
|
|
89
|
+
</div>
|
|
90
|
+
<Tooltip
|
|
91
|
+
themeColor="inverse"
|
|
92
|
+
style={{ position: "absolute", insetBlockEnd: "-52px", insetInlineEnd: "0" }}
|
|
93
|
+
content={<div>85°</div>}
|
|
94
|
+
></Tooltip>
|
|
95
|
+
</>
|
|
96
|
+
}
|
|
97
|
+
{...props} />
|
|
98
|
+
);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ImageEditor, ImageEditorPane } from "..";
|
|
2
|
+
import { Button } from "../../button";
|
|
3
|
+
import { NumericTextbox } from "../../numerictextbox";
|
|
4
|
+
import { ColorPicker } from "../../colorpicker";
|
|
5
|
+
import { Form, FormField, Fieldset } from "../../form";
|
|
6
|
+
import { Icon } from "../../icon";
|
|
7
|
+
import { InputPrefixText } from "../../input";
|
|
8
|
+
|
|
9
|
+
const shadowSidebarItems = [
|
|
10
|
+
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
11
|
+
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
12
|
+
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" aria-label="Rotate"></Button>,
|
|
13
|
+
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
14
|
+
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" aria-label="Text"></Button>,
|
|
15
|
+
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" aria-label="Shapes"></Button>,
|
|
16
|
+
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
17
|
+
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
18
|
+
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
19
|
+
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
20
|
+
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
21
|
+
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" aria-label="Frame"></Button>,
|
|
22
|
+
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" selected aria-label="Shadow"></Button>
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
const hexToRgba = (hex: string, alphaPercent: number) => {
|
|
26
|
+
const value = hex.replace("#", "");
|
|
27
|
+
const r = parseInt(value.substring(0, 2), 16);
|
|
28
|
+
const g = parseInt(value.substring(2, 4), 16);
|
|
29
|
+
const b = parseInt(value.substring(4, 6), 16);
|
|
30
|
+
return `rgba(${r}, ${g}, ${b}, ${alphaPercent / 100})`;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const ImageEditorShadow = ({
|
|
34
|
+
positionX = 2,
|
|
35
|
+
positionY = -4,
|
|
36
|
+
blur = 32,
|
|
37
|
+
spread = 12,
|
|
38
|
+
color = "#232a36",
|
|
39
|
+
opacity = 32,
|
|
40
|
+
...props
|
|
41
|
+
}: any) => (
|
|
42
|
+
<ImageEditor
|
|
43
|
+
sidebarItems={shadowSidebarItems}
|
|
44
|
+
actionPane={
|
|
45
|
+
<ImageEditorPane title="Shadow" actions={
|
|
46
|
+
<>
|
|
47
|
+
<Button>Reset</Button>
|
|
48
|
+
<Button themeColor="primary">Apply</Button>
|
|
49
|
+
</>
|
|
50
|
+
}>
|
|
51
|
+
<Form tag="div">
|
|
52
|
+
<FormField
|
|
53
|
+
label="Position"
|
|
54
|
+
editor={
|
|
55
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
56
|
+
<NumericTextbox id="shadow-position-x" showSpinButton={false} value={String(positionX)} prefix={<InputPrefixText>X</InputPrefixText>} aria-label="Position X" />
|
|
57
|
+
<NumericTextbox id="shadow-position-y" showSpinButton={false} value={String(positionY)} prefix={<InputPrefixText>Y</InputPrefixText>} aria-label="Position Y" />
|
|
58
|
+
</Fieldset>
|
|
59
|
+
}
|
|
60
|
+
/>
|
|
61
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
62
|
+
<FormField
|
|
63
|
+
label="Blur"
|
|
64
|
+
editorId="shadow-blur"
|
|
65
|
+
editor={ <NumericTextbox id="shadow-blur" showSpinButton={false} value={String(blur)} prefix={<Icon icon="blur" />} /> }
|
|
66
|
+
/>
|
|
67
|
+
<FormField
|
|
68
|
+
label="Spread"
|
|
69
|
+
editorId="shadow-spread"
|
|
70
|
+
editor={ <NumericTextbox id="shadow-spread" showSpinButton={false} value={String(spread)} prefix={<Icon icon="brightness-contrast" />} /> }
|
|
71
|
+
/>
|
|
72
|
+
</Fieldset>
|
|
73
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
74
|
+
<FormField
|
|
75
|
+
label="Color"
|
|
76
|
+
editor={ <ColorPicker id="shadow-color" value={color} aria-label="Color" /> }
|
|
77
|
+
/>
|
|
78
|
+
<FormField
|
|
79
|
+
label="Opacity"
|
|
80
|
+
editorId="shadow-opacity"
|
|
81
|
+
editor={ <NumericTextbox id="shadow-opacity" showSpinButton={false} value={`${opacity}%`} prefix={<Icon icon="transparency" />} /> }
|
|
82
|
+
/>
|
|
83
|
+
</Fieldset>
|
|
84
|
+
</Form>
|
|
85
|
+
</ImageEditorPane>
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
children={
|
|
89
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{
|
|
90
|
+
backgroundImage: "url('/packages/html/assets/sofia.jpg')",
|
|
91
|
+
backgroundSize: "cover",
|
|
92
|
+
boxShadow: `${positionX}px ${positionY}px ${blur}px ${spread}px ${hexToRgba(color, opacity)}`
|
|
93
|
+
}}></canvas>
|
|
94
|
+
}
|
|
95
|
+
{...props} />
|
|
96
|
+
);
|
|
@@ -0,0 +1,373 @@
|
|
|
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 { ToolbarSeparator } from '../../toolbar';
|
|
11
|
+
|
|
12
|
+
// Mobile top toolbar has no zoom-level combobox - just the 6 core icon actions, split into two edge-aligned groups
|
|
13
|
+
const mobileToolbarItems = [
|
|
14
|
+
<Button fillMode="flat" key="mobile-toolbar-button-1" icon="image-add" aria-label="Image Add"></Button>,
|
|
15
|
+
<ToolbarSeparator key="mobile-toolbar-separator-1"></ToolbarSeparator>,
|
|
16
|
+
<Button fillMode="flat" key="mobile-toolbar-button-2" icon="undo" aria-label="Undo"></Button>,
|
|
17
|
+
<Button fillMode="flat" key="mobile-toolbar-button-3" icon="redo" aria-label="Redo"></Button>,
|
|
18
|
+
<ToolbarSeparator key="mobile-toolbar-separator-2"></ToolbarSeparator>,
|
|
19
|
+
<Button fillMode="flat" key="mobile-toolbar-button-4" icon="download" aria-label="Download"></Button>,
|
|
20
|
+
<div className="k-spacer" key="mobile-toolbar-spacer"></div>,
|
|
21
|
+
<Button fillMode="flat" key="mobile-toolbar-button-5" icon="zoom-in" aria-label="Zoom In"></Button>,
|
|
22
|
+
<Button fillMode="flat" key="mobile-toolbar-button-6" icon="zoom-out" aria-label="Zoom Out"></Button>
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
// Same 5 actions as the desktop FloatingToolbar (imageeditor-insert-shape.tsx) - on mobile they dock at the top instead of floating over the canvas
|
|
26
|
+
const contextualToolbarItems = [
|
|
27
|
+
<Button fillMode="flat" key="contextual-button-1" icon="copy" aria-label="Duplicate"></Button>,
|
|
28
|
+
<Button fillMode="flat" key="contextual-button-2" icon="pencil" aria-label="Edit"></Button>,
|
|
29
|
+
<ToolbarSeparator key="contextual-separator-1"></ToolbarSeparator>,
|
|
30
|
+
<Button fillMode="flat" key="contextual-button-3" icon="flip-horizontal" aria-label="Flip Horizontal"></Button>,
|
|
31
|
+
<Button fillMode="flat" key="contextual-button-4" icon="flip-vertical" aria-label="Flip Vertical"></Button>,
|
|
32
|
+
<ToolbarSeparator key="contextual-separator-2"></ToolbarSeparator>,
|
|
33
|
+
<Button fillMode="flat" key="contextual-button-5" icon="trash" aria-label="Delete"></Button>
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const shapeSidebarItems = [
|
|
37
|
+
<Button fillMode="flat" key="sidebar-button-1" icon="image-resize" aria-label="Resize"></Button>,
|
|
38
|
+
<Button fillMode="flat" key="sidebar-button-2" icon="crop" aria-label="Crop"></Button>,
|
|
39
|
+
<Button fillMode="flat" key="sidebar-button-3" icon="rotate" aria-label="Rotate"></Button>,
|
|
40
|
+
<div className="k-separator" key="sidebar-separator-1"></div>,
|
|
41
|
+
<Button fillMode="flat" key="sidebar-button-4" icon="free-text" aria-label="Text"></Button>,
|
|
42
|
+
<Button fillMode="flat" key="sidebar-button-5" icon="shapes" selected aria-label="Shapes"></Button>,
|
|
43
|
+
<div className="k-separator" key="sidebar-separator-2"></div>,
|
|
44
|
+
<Button fillMode="flat" key="sidebar-button-6" icon="drop-half-pixelated" aria-label="Blur"></Button>,
|
|
45
|
+
<Button fillMode="flat" key="sidebar-button-7" icon="sliders-horizontal" aria-label="Adjustments"></Button>,
|
|
46
|
+
<Button fillMode="flat" key="sidebar-button-8" icon="circles-three-intersecting" aria-label="Filters"></Button>,
|
|
47
|
+
<div className="k-separator" key="sidebar-separator-3"></div>,
|
|
48
|
+
<Button fillMode="flat" key="sidebar-button-9" icon="frame-corners" aria-label="Frame"></Button>,
|
|
49
|
+
<Button fillMode="flat" key="sidebar-button-10" icon="circle-half-tilted" aria-label="Shadow"></Button>
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const shapeTypes = [
|
|
53
|
+
{ label: "Square", icon: "checkbox" },
|
|
54
|
+
{ label: "Rectangle", icon: "rectangle-shape" },
|
|
55
|
+
{ label: "Circle", icon: "circle-shape" },
|
|
56
|
+
{ label: "Oval", icon: "oval-shape" },
|
|
57
|
+
{ label: "Triangle", icon: "kpi-status-hold" },
|
|
58
|
+
{ label: "Star", icon: "star" },
|
|
59
|
+
{ label: "Heart", icon: "heart" },
|
|
60
|
+
{ label: "Diamond", icon: "kpi-status-deny" },
|
|
61
|
+
{ label: "Hexagon", icon: "hexagon-shape" },
|
|
62
|
+
{ label: "Pentagon", icon: "pentagon-shape" },
|
|
63
|
+
{ label: "Arrow", icon: "arrow-right" }
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
const styles = `
|
|
67
|
+
#test-area {
|
|
68
|
+
display: flex;
|
|
69
|
+
gap: 24px;
|
|
70
|
+
flex-wrap: wrap;
|
|
71
|
+
}
|
|
72
|
+
#test-area .k-imageeditor-adaptive {
|
|
73
|
+
width: 360px;
|
|
74
|
+
height: 800px;
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
|
|
78
|
+
export default () => (
|
|
79
|
+
<>
|
|
80
|
+
<style>{styles}</style>
|
|
81
|
+
<div id="test-area">
|
|
82
|
+
|
|
83
|
+
<div>
|
|
84
|
+
<h4>Mobile / Adaptive / Unselected Tool</h4>
|
|
85
|
+
<ImageEditor adaptive toolbarItems={mobileToolbarItems}>
|
|
86
|
+
<canvas width="326" height="203" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover", backgroundPosition: "center", backgroundRepeat: "no-repeat" }}></canvas>
|
|
87
|
+
</ImageEditor>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div>
|
|
91
|
+
<h4>Mobile / Adaptive / Selected Tool / Panel Opened</h4>
|
|
92
|
+
<ImageEditor
|
|
93
|
+
adaptive
|
|
94
|
+
toolbarItems={contextualToolbarItems}
|
|
95
|
+
sidebarItems={shapeSidebarItems}
|
|
96
|
+
actionPane={
|
|
97
|
+
<ImageEditorPane adaptive title="Shape">
|
|
98
|
+
<SegmentedControl thumbStyles={{ width: "50%" }} stretched aria-label="Shape or Line" style={{ flexShrink: 0 }}>
|
|
99
|
+
<SegmentedControlButton icon="shapes" selected>Shape</SegmentedControlButton>
|
|
100
|
+
<SegmentedControlButton icon="shape-line">Line</SegmentedControlButton>
|
|
101
|
+
</SegmentedControl>
|
|
102
|
+
|
|
103
|
+
<Form tag="div">
|
|
104
|
+
<FormField
|
|
105
|
+
label="Type"
|
|
106
|
+
editor={
|
|
107
|
+
<ImageEditorOptionList scrollable scrollableEnd>
|
|
108
|
+
{shapeTypes.map((shape) => (
|
|
109
|
+
<ImageEditorOptionPreview key={shape.label} label={shape.label} selected={shape.label === "Oval"}>
|
|
110
|
+
<div className="k-imageeditor-option-content">
|
|
111
|
+
<Icon icon={shape.icon} />
|
|
112
|
+
<span className="k-imageeditor-option-label">{shape.label}</span>
|
|
113
|
+
</div>
|
|
114
|
+
</ImageEditorOptionPreview>
|
|
115
|
+
))}
|
|
116
|
+
</ImageEditorOptionList>
|
|
117
|
+
}
|
|
118
|
+
/>
|
|
119
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
120
|
+
<FormField
|
|
121
|
+
label="Stroke Color"
|
|
122
|
+
editor={ <ColorPicker id="mobile-shape-stroke-color" value="#b0e855" aria-label="Stroke Color" /> }
|
|
123
|
+
/>
|
|
124
|
+
<FormField
|
|
125
|
+
label="Stroke Width"
|
|
126
|
+
editorId="mobile-shape-stroke-width"
|
|
127
|
+
editor={ <NumericTextbox id="mobile-shape-stroke-width" showSpinButton={false} value="8" prefix={<Icon icon="border-width" />} /> }
|
|
128
|
+
/>
|
|
129
|
+
</Fieldset>
|
|
130
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
131
|
+
<FormField
|
|
132
|
+
label="Fill Color"
|
|
133
|
+
editor={ <ColorPicker id="mobile-shape-fill-color" value="#eae382" valueIconName="droplet" aria-label="Fill Color" /> }
|
|
134
|
+
/>
|
|
135
|
+
<FormField
|
|
136
|
+
label="Text Color"
|
|
137
|
+
editor={ <ColorPicker id="mobile-shape-text-color" value="#4a4500" valueIconName="foreground-color" aria-label="Text Color" /> }
|
|
138
|
+
/>
|
|
139
|
+
</Fieldset>
|
|
140
|
+
<FormField
|
|
141
|
+
label="Font Family"
|
|
142
|
+
editorId="mobile-shape-font-family"
|
|
143
|
+
editor={ <Combobox id="mobile-shape-font-family" prefix={<Icon icon="font-family" />} value="Trebuchet MS" /> }
|
|
144
|
+
/>
|
|
145
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
146
|
+
<FormField
|
|
147
|
+
label="Font Size"
|
|
148
|
+
editorId="mobile-shape-font-size"
|
|
149
|
+
editor={ <NumericTextbox id="mobile-shape-font-size" showSpinButton={false} value="24" prefix={<Icon icon="font-size" />} /> }
|
|
150
|
+
/>
|
|
151
|
+
<FormField
|
|
152
|
+
label="Alignment"
|
|
153
|
+
editor={
|
|
154
|
+
<ButtonGroup>
|
|
155
|
+
<Button className="k-group-start" icon="align-left" aria-label="Align Left"></Button>
|
|
156
|
+
<Button icon="align-center" selected aria-label="Align Center"></Button>
|
|
157
|
+
<Button className="k-group-end" icon="align-right" aria-label="Align Right"></Button>
|
|
158
|
+
</ButtonGroup>
|
|
159
|
+
}
|
|
160
|
+
/>
|
|
161
|
+
</Fieldset>
|
|
162
|
+
<FormField
|
|
163
|
+
label="Format"
|
|
164
|
+
editor={
|
|
165
|
+
<div className="k-imageeditor-controls">
|
|
166
|
+
<Button icon="bold" aria-label="Bold"></Button>
|
|
167
|
+
<Button icon="italic" aria-label="Italic"></Button>
|
|
168
|
+
<Button icon="underline" aria-label="Underline"></Button>
|
|
169
|
+
<Button icon="strikethrough" aria-label="Strikethrough"></Button>
|
|
170
|
+
<Button icon="convert-uppercase" aria-label="Uppercase"></Button>
|
|
171
|
+
<Button icon="convert-lowercase" aria-label="Lowercase"></Button>
|
|
172
|
+
</div>
|
|
173
|
+
}
|
|
174
|
+
/>
|
|
175
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
176
|
+
<FormField
|
|
177
|
+
label="Align Horizontal"
|
|
178
|
+
editor={
|
|
179
|
+
<ButtonGroup>
|
|
180
|
+
<Button className="k-group-start" icon="align-items-start" aria-label="Align Left"></Button>
|
|
181
|
+
<Button icon="align-items-center" aria-label="Align Center"></Button>
|
|
182
|
+
<Button className="k-group-end" icon="align-items-end" aria-label="Align Right"></Button>
|
|
183
|
+
</ButtonGroup>
|
|
184
|
+
}
|
|
185
|
+
/>
|
|
186
|
+
<FormField
|
|
187
|
+
label="Align Vertical"
|
|
188
|
+
editor={
|
|
189
|
+
<ButtonGroup>
|
|
190
|
+
<Button className="k-group-start" icon="align-items-start-alt" aria-label="Align Top"></Button>
|
|
191
|
+
<Button icon="align-items-center-alt" aria-label="Align Middle"></Button>
|
|
192
|
+
<Button className="k-group-end" icon="align-items-end-alt" aria-label="Align Bottom"></Button>
|
|
193
|
+
</ButtonGroup>
|
|
194
|
+
}
|
|
195
|
+
/>
|
|
196
|
+
</Fieldset>
|
|
197
|
+
</Form>
|
|
198
|
+
</ImageEditorPane>
|
|
199
|
+
}
|
|
200
|
+
>
|
|
201
|
+
<canvas width="326" height="203" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover", backgroundPosition: "center", backgroundRepeat: "no-repeat" }}></canvas>
|
|
202
|
+
<div className="k-imageeditor-resize" style={{ width: "165px", height: "54px", top: "75px", left: "81px" }}>
|
|
203
|
+
<div style={{
|
|
204
|
+
width: "100%",
|
|
205
|
+
height: "100%",
|
|
206
|
+
borderRadius: "50%",
|
|
207
|
+
background: "#eae382",
|
|
208
|
+
border: "2px solid #b0e855",
|
|
209
|
+
boxSizing: "border-box"
|
|
210
|
+
}}>
|
|
211
|
+
<p style={{
|
|
212
|
+
margin: 0,
|
|
213
|
+
width: "100%",
|
|
214
|
+
height: "100%",
|
|
215
|
+
display: "flex",
|
|
216
|
+
alignItems: "center",
|
|
217
|
+
justifyContent: "center",
|
|
218
|
+
fontFamily: "'Trebuchet MS', sans-serif",
|
|
219
|
+
fontSize: "16px",
|
|
220
|
+
lineHeight: 1,
|
|
221
|
+
color: "#4a4500",
|
|
222
|
+
whiteSpace: "nowrap"
|
|
223
|
+
}}>Shape text</p>
|
|
224
|
+
</div>
|
|
225
|
+
<ImageEditorResizeHandles variant="mixed" />
|
|
226
|
+
</div>
|
|
227
|
+
</ImageEditor>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div>
|
|
231
|
+
<h4>Tablet / Adaptive / Selected Tool / Panel Opened</h4>
|
|
232
|
+
<ImageEditor
|
|
233
|
+
adaptive
|
|
234
|
+
style={{ width: "768px", height: "1024px" }}
|
|
235
|
+
toolbarItems={contextualToolbarItems}
|
|
236
|
+
sidebarItems={shapeSidebarItems}
|
|
237
|
+
actionPane={
|
|
238
|
+
<ImageEditorPane adaptive title="Shape">
|
|
239
|
+
<SegmentedControl thumbStyles={{ width: "50%" }} stretched aria-label="Shape or Line" style={{ flexShrink: 0 }}>
|
|
240
|
+
<SegmentedControlButton icon="shapes" selected>Shape</SegmentedControlButton>
|
|
241
|
+
<SegmentedControlButton icon="shape-line">Line</SegmentedControlButton>
|
|
242
|
+
</SegmentedControl>
|
|
243
|
+
|
|
244
|
+
<Form tag="div">
|
|
245
|
+
<FormField
|
|
246
|
+
label="Type"
|
|
247
|
+
editor={
|
|
248
|
+
<ImageEditorOptionList scrollable scrollableEnd>
|
|
249
|
+
{shapeTypes.map((shape) => (
|
|
250
|
+
<ImageEditorOptionPreview key={shape.label} label={shape.label} selected={shape.label === "Oval"}>
|
|
251
|
+
<div className="k-imageeditor-option-content">
|
|
252
|
+
<Icon icon={shape.icon} />
|
|
253
|
+
<span className="k-imageeditor-option-label">{shape.label}</span>
|
|
254
|
+
</div>
|
|
255
|
+
</ImageEditorOptionPreview>
|
|
256
|
+
))}
|
|
257
|
+
</ImageEditorOptionList>
|
|
258
|
+
}
|
|
259
|
+
/>
|
|
260
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
261
|
+
<FormField
|
|
262
|
+
label="Stroke Color"
|
|
263
|
+
editor={ <ColorPicker id="tablet-shape-stroke-color" value="#b0e855" aria-label="Stroke Color" /> }
|
|
264
|
+
/>
|
|
265
|
+
<FormField
|
|
266
|
+
label="Stroke Width"
|
|
267
|
+
editorId="tablet-shape-stroke-width"
|
|
268
|
+
editor={ <NumericTextbox id="tablet-shape-stroke-width" showSpinButton={false} value="8" prefix={<Icon icon="border-width" />} /> }
|
|
269
|
+
/>
|
|
270
|
+
</Fieldset>
|
|
271
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
272
|
+
<FormField
|
|
273
|
+
label="Fill Color"
|
|
274
|
+
editor={ <ColorPicker id="tablet-shape-fill-color" value="#eae382" valueIconName="droplet" aria-label="Fill Color" /> }
|
|
275
|
+
/>
|
|
276
|
+
<FormField
|
|
277
|
+
label="Text Color"
|
|
278
|
+
editor={ <ColorPicker id="tablet-shape-text-color" value="#4a4500" valueIconName="foreground-color" aria-label="Text Color" /> }
|
|
279
|
+
/>
|
|
280
|
+
</Fieldset>
|
|
281
|
+
<FormField
|
|
282
|
+
label="Font Family"
|
|
283
|
+
editorId="tablet-shape-font-family"
|
|
284
|
+
editor={ <Combobox id="tablet-shape-font-family" prefix={<Icon icon="font-family" />} value="Trebuchet MS" /> }
|
|
285
|
+
/>
|
|
286
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
287
|
+
<FormField
|
|
288
|
+
label="Font Size"
|
|
289
|
+
editorId="tablet-shape-font-size"
|
|
290
|
+
editor={ <NumericTextbox id="tablet-shape-font-size" showSpinButton={false} value="24" prefix={<Icon icon="font-size" />} /> }
|
|
291
|
+
/>
|
|
292
|
+
<FormField
|
|
293
|
+
label="Alignment"
|
|
294
|
+
editor={
|
|
295
|
+
<ButtonGroup>
|
|
296
|
+
<Button className="k-group-start" icon="align-left" aria-label="Align Left"></Button>
|
|
297
|
+
<Button icon="align-center" selected aria-label="Align Center"></Button>
|
|
298
|
+
<Button className="k-group-end" icon="align-right" aria-label="Align Right"></Button>
|
|
299
|
+
</ButtonGroup>
|
|
300
|
+
}
|
|
301
|
+
/>
|
|
302
|
+
</Fieldset>
|
|
303
|
+
<FormField
|
|
304
|
+
label="Format"
|
|
305
|
+
editor={
|
|
306
|
+
<div className="k-imageeditor-controls">
|
|
307
|
+
<Button icon="bold" aria-label="Bold"></Button>
|
|
308
|
+
<Button icon="italic" aria-label="Italic"></Button>
|
|
309
|
+
<Button icon="underline" aria-label="Underline"></Button>
|
|
310
|
+
<Button icon="strikethrough" aria-label="Strikethrough"></Button>
|
|
311
|
+
<Button icon="convert-uppercase" aria-label="Uppercase"></Button>
|
|
312
|
+
<Button icon="convert-lowercase" aria-label="Lowercase"></Button>
|
|
313
|
+
</div>
|
|
314
|
+
}
|
|
315
|
+
/>
|
|
316
|
+
<Fieldset layout="grid" cols={2} gutters={{ cols: "16px" }}>
|
|
317
|
+
<FormField
|
|
318
|
+
label="Align Horizontal"
|
|
319
|
+
editor={
|
|
320
|
+
<ButtonGroup>
|
|
321
|
+
<Button className="k-group-start" icon="align-items-start" aria-label="Align Left"></Button>
|
|
322
|
+
<Button icon="align-items-center" aria-label="Align Center"></Button>
|
|
323
|
+
<Button className="k-group-end" icon="align-items-end" aria-label="Align Right"></Button>
|
|
324
|
+
</ButtonGroup>
|
|
325
|
+
}
|
|
326
|
+
/>
|
|
327
|
+
<FormField
|
|
328
|
+
label="Align Vertical"
|
|
329
|
+
editor={
|
|
330
|
+
<ButtonGroup>
|
|
331
|
+
<Button className="k-group-start" icon="align-items-start-alt" aria-label="Align Top"></Button>
|
|
332
|
+
<Button icon="align-items-center-alt" aria-label="Align Middle"></Button>
|
|
333
|
+
<Button className="k-group-end" icon="align-items-end-alt" aria-label="Align Bottom"></Button>
|
|
334
|
+
</ButtonGroup>
|
|
335
|
+
}
|
|
336
|
+
/>
|
|
337
|
+
</Fieldset>
|
|
338
|
+
</Form>
|
|
339
|
+
</ImageEditorPane>
|
|
340
|
+
}
|
|
341
|
+
>
|
|
342
|
+
<canvas width="720" height="393" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover", backgroundPosition: "center", backgroundRepeat: "no-repeat" }}></canvas>
|
|
343
|
+
<div className="k-imageeditor-resize" style={{ width: "234px", height: "77px", top: "156px", left: "243px" }}>
|
|
344
|
+
<div style={{
|
|
345
|
+
width: "100%",
|
|
346
|
+
height: "100%",
|
|
347
|
+
borderRadius: "50%",
|
|
348
|
+
background: "#eae382",
|
|
349
|
+
border: "2px solid #b0e855",
|
|
350
|
+
boxSizing: "border-box"
|
|
351
|
+
}}>
|
|
352
|
+
<p style={{
|
|
353
|
+
margin: 0,
|
|
354
|
+
width: "100%",
|
|
355
|
+
height: "100%",
|
|
356
|
+
display: "flex",
|
|
357
|
+
alignItems: "center",
|
|
358
|
+
justifyContent: "center",
|
|
359
|
+
fontFamily: "'Trebuchet MS', sans-serif",
|
|
360
|
+
fontSize: "16px",
|
|
361
|
+
lineHeight: 1,
|
|
362
|
+
color: "#4a4500",
|
|
363
|
+
whiteSpace: "nowrap"
|
|
364
|
+
}}>Shape text</p>
|
|
365
|
+
</div>
|
|
366
|
+
<ImageEditorResizeHandles variant="mixed" />
|
|
367
|
+
</div>
|
|
368
|
+
</ImageEditor>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
</div>
|
|
372
|
+
</>
|
|
373
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ImageEditorAdjustments } from '..';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<>
|
|
6
|
+
<div id="test-area" className="k-d-grid k-grid-cols-1">
|
|
7
|
+
|
|
8
|
+
<h4>Image Editor Adjustments Pane</h4>
|
|
9
|
+
|
|
10
|
+
<ImageEditorAdjustments contentHeight="640px" />
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
</>
|
|
14
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ImageEditorBlur } from '..';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export default () =>(
|
|
5
|
+
<>
|
|
6
|
+
<div id="test-area" className="k-d-grid k-grid-cols-1">
|
|
7
|
+
|
|
8
|
+
<h4>Image Editor Blur Pane — Rectangular Markee</h4>
|
|
9
|
+
|
|
10
|
+
<ImageEditorBlur contentHeight="482px" shape="rectangular" intensity={16}>
|
|
11
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover", filter: "blur(8px)" }}></canvas>
|
|
12
|
+
<div className="k-imageeditor-crop-overlay">
|
|
13
|
+
<div className="k-imageeditor-crop" style={{ borderStyle: "dashed" }}></div>
|
|
14
|
+
</div>
|
|
15
|
+
</ImageEditorBlur>
|
|
16
|
+
|
|
17
|
+
<h4>Image Editor Blur Pane — Elliptical Markee</h4>
|
|
18
|
+
|
|
19
|
+
<ImageEditorBlur contentHeight="482px" shape="elliptical" intensity={18}>
|
|
20
|
+
<canvas width="494" height="307" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover" }}></canvas>
|
|
21
|
+
<canvas width="494" height="307" aria-hidden="true" style={{ position: "absolute", insetBlockStart: 0, insetInlineStart: 0, backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundSize: "cover", filter: "blur(8px)", clipPath: "ellipse(160px 98.5px at center)" }}></canvas>
|
|
22
|
+
<div className="k-imageeditor-crop-overlay">
|
|
23
|
+
<div className="k-imageeditor-crop" style={{ width: "320px", height: "197px", borderStyle: "dashed", borderRadius: "50%", insetInlineStart: "50%", insetBlockStart: "50%", transform: "translate(-50%, -50%)" }}></div>
|
|
24
|
+
</div>
|
|
25
|
+
</ImageEditorBlur>
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
@@ -3,14 +3,15 @@ import { ImageEditorCrop } from '..';
|
|
|
3
3
|
|
|
4
4
|
export default () =>(
|
|
5
5
|
<>
|
|
6
|
-
<div id="test-area" className="k-d-grid
|
|
6
|
+
<div id="test-area" className="k-d-grid">
|
|
7
7
|
|
|
8
8
|
<h4>Image Editor Crop Pane</h4>
|
|
9
9
|
|
|
10
10
|
<ImageEditorCrop contentHeight="482px">
|
|
11
|
-
<canvas width="700" height="400" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundPosition: "50px -350px" }}></canvas>
|
|
11
|
+
<canvas width="700" height="400" role="img" aria-label="Image being edited" style={{ backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundPosition: "50px -350px" }}></canvas>
|
|
12
12
|
<div className="k-imageeditor-crop-overlay">
|
|
13
13
|
<div className="k-imageeditor-crop" style={{ width: "400px", height: "400px", backgroundImage: "url('/packages/html/assets/sofia.jpg')", backgroundClip: "content-box", backgroundPosition: "748px -350px" }}>
|
|
14
|
+
<div className="k-imageeditor-crop-grid"></div>
|
|
14
15
|
<span className="k-resize-handle k-resize-nw"></span>
|
|
15
16
|
<span className="k-resize-handle k-resize-n"></span>
|
|
16
17
|
<span className="k-resize-handle k-resize-ne"></span>
|