@yogiswara/honcho-editor-ui 2.7.13 → 2.7.14
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/package.json +1 -1
- package/dist/color.d.ts +0 -9
- package/dist/color.js +0 -9
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.d.ts +0 -8
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +0 -28
- package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +0 -10
- package/dist/components/editor/GalleryAlbum/ImageItem.js +0 -81
- package/dist/components/editor/HAccordionAspectRatio.d.ts +0 -14
- package/dist/components/editor/HAccordionAspectRatio.js +0 -102
- package/dist/components/editor/HAccordionColor.d.ts +0 -16
- package/dist/components/editor/HAccordionColor.js +0 -282
- package/dist/components/editor/HAccordionColorAdjustment.d.ts +0 -35
- package/dist/components/editor/HAccordionColorAdjustment.js +0 -31
- package/dist/components/editor/HAccordionDetails.d.ts +0 -12
- package/dist/components/editor/HAccordionDetails.js +0 -157
- package/dist/components/editor/HAccordionLight.d.ts +0 -20
- package/dist/components/editor/HAccordionLight.js +0 -414
- package/dist/components/editor/HAccordionPreset.d.ts +0 -23
- package/dist/components/editor/HAccordionPreset.js +0 -50
- package/dist/components/editor/HAlertBox.d.ts +0 -8
- package/dist/components/editor/HAlertBox.js +0 -55
- package/dist/components/editor/HAspectRatioMobile.d.ts +0 -0
- package/dist/components/editor/HAspectRatioMobile.js +0 -1
- package/dist/components/editor/HBulkAccordionColorAdjustment.d.ts +0 -55
- package/dist/components/editor/HBulkAccordionColorAdjustment.js +0 -31
- package/dist/components/editor/HBulkAccordionColorAdjustmentColors.d.ts +0 -20
- package/dist/components/editor/HBulkAccordionColorAdjustmentColors.js +0 -121
- package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.d.ts +0 -12
- package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.js +0 -65
- package/dist/components/editor/HBulkAccordionColorAdjustmentLight.d.ts +0 -28
- package/dist/components/editor/HBulkAccordionColorAdjustmentLight.js +0 -177
- package/dist/components/editor/HBulkColorAdjustmentMobile.d.ts +0 -53
- package/dist/components/editor/HBulkColorAdjustmentMobile.js +0 -16
- package/dist/components/editor/HBulkColorMobile.d.ts +0 -20
- package/dist/components/editor/HBulkColorMobile.js +0 -121
- package/dist/components/editor/HBulkDetailsMobile.d.ts +0 -12
- package/dist/components/editor/HBulkDetailsMobile.js +0 -65
- package/dist/components/editor/HBulkLightMobile.d.ts +0 -28
- package/dist/components/editor/HBulkLightMobile.js +0 -192
- package/dist/components/editor/HBulkPreset.d.ts +0 -24
- package/dist/components/editor/HBulkPreset.js +0 -43
- package/dist/components/editor/HBulkPresetMobile.d.ts +0 -15
- package/dist/components/editor/HBulkPresetMobile.js +0 -26
- package/dist/components/editor/HDialogBox.d.ts +0 -18
- package/dist/components/editor/HDialogBox.js +0 -51
- package/dist/components/editor/HDialogCopy.d.ts +0 -40
- package/dist/components/editor/HDialogCopy.js +0 -80
- package/dist/components/editor/HFooter.d.ts +0 -12
- package/dist/components/editor/HFooter.js +0 -24
- package/dist/components/editor/HHeaderEditor.d.ts +0 -17
- package/dist/components/editor/HHeaderEditor.js +0 -36
- package/dist/components/editor/HImageEditorBulkDekstop.d.ts +0 -15
- package/dist/components/editor/HImageEditorBulkDekstop.js +0 -29
- package/dist/components/editor/HImageEditorBulkMobile.d.ts +0 -72
- package/dist/components/editor/HImageEditorBulkMobile.js +0 -81
- package/dist/components/editor/HImageEditorDekstop.d.ts +0 -15
- package/dist/components/editor/HImageEditorDekstop.js +0 -29
- package/dist/components/editor/HImageEditorMobile.d.ts +0 -51
- package/dist/components/editor/HImageEditorMobile.js +0 -92
- package/dist/components/editor/HImageEditorMobileLayout.d.ts +0 -14
- package/dist/components/editor/HImageEditorMobileLayout.js +0 -58
- package/dist/components/editor/HModalEditorDekstop.d.ts +0 -13
- package/dist/components/editor/HModalEditorDekstop.js +0 -22
- package/dist/components/editor/HModalMobile.d.ts +0 -13
- package/dist/components/editor/HModalMobile.js +0 -7
- package/dist/components/editor/HPresetDelete.d.ts +0 -7
- package/dist/components/editor/HPresetDelete.js +0 -7
- package/dist/components/editor/HPresetOptionMenu.d.ts +0 -9
- package/dist/components/editor/HPresetOptionMenu.js +0 -20
- package/dist/components/editor/HSliderColorMobile.d.ts +0 -16
- package/dist/components/editor/HSliderColorMobile.js +0 -270
- package/dist/components/editor/HSliderDetailsMobile.d.ts +0 -12
- package/dist/components/editor/HSliderDetailsMobile.js +0 -154
- package/dist/components/editor/HSliderLightMobile.d.ts +0 -20
- package/dist/components/editor/HSliderLightMobile.js +0 -420
- package/dist/components/editor/HTabAspectRatioMobile.d.ts +0 -0
- package/dist/components/editor/HTabAspectRatioMobile.js +0 -1
- package/dist/components/editor/HTabColorAdjustmentMobile.d.ts +0 -33
- package/dist/components/editor/HTabColorAdjustmentMobile.js +0 -16
- package/dist/components/editor/HTabPresetMobile.d.ts +0 -14
- package/dist/components/editor/HTabPresetMobile.js +0 -10
- package/dist/components/editor/HTextField.d.ts +0 -14
- package/dist/components/editor/HTextField.js +0 -51
- package/dist/components/editor/HWatermarkView.d.ts +0 -6
- package/dist/components/editor/HWatermarkView.js +0 -16
- package/dist/components/editor/svg/Tick.d.ts +0 -2
- package/dist/components/editor/svg/Tick.js +0 -6
- package/dist/components/modal/HModalDialog.d.ts +0 -12
- package/dist/components/modal/HModalDialog.js +0 -18
- package/dist/components/modal/HModalRename.d.ts +0 -14
- package/dist/components/modal/HModalRename.js +0 -35
- package/dist/hooks/demo/HonchoEditorBulkDemo.d.ts +0 -3
- package/dist/hooks/demo/HonchoEditorBulkDemo.js +0 -410
- package/dist/hooks/demo/HonchoEditorSingleCleanDemo.d.ts +0 -3
- package/dist/hooks/demo/HonchoEditorSingleCleanDemo.js +0 -354
- package/dist/hooks/demo/index.d.ts +0 -2
- package/dist/hooks/demo/index.js +0 -2
- package/dist/hooks/editor/type.d.ts +0 -174
- package/dist/hooks/editor/type.js +0 -1
- package/dist/hooks/editor/useHonchoEditorBulk.d.ts +0 -96
- package/dist/hooks/editor/useHonchoEditorBulk.js +0 -427
- package/dist/hooks/editor/useHonchoEditorSingle.d.ts +0 -44
- package/dist/hooks/editor/useHonchoEditorSingle.js +0 -162
- package/dist/hooks/useAdjustmentHistory.d.ts +0 -97
- package/dist/hooks/useAdjustmentHistory.js +0 -493
- package/dist/hooks/useAdjustmentHistoryBatch.d.ts +0 -177
- package/dist/hooks/useAdjustmentHistoryBatch.js +0 -1189
- package/dist/hooks/useGallerySwipe.d.ts +0 -36
- package/dist/hooks/useGallerySwipe.js +0 -344
- package/dist/hooks/usePaging.d.ts +0 -89
- package/dist/hooks/usePaging.js +0 -211
- package/dist/hooks/usePreset.d.ts +0 -82
- package/dist/hooks/usePreset.js +0 -344
- package/dist/index.d.ts +0 -41
- package/dist/index.js +0 -44
- package/dist/lib/context/EditorContext.d.ts +0 -28
- package/dist/lib/context/EditorContext.js +0 -60
- package/dist/lib/context/EditorProcessingService.d.ts +0 -36
- package/dist/lib/context/EditorProcessingService.js +0 -249
- package/dist/lib/editor/honcho-editor.d.ts +0 -324
- package/dist/lib/editor/honcho-editor.js +0 -825
- package/dist/lib/hooks/useEditor.d.ts +0 -22
- package/dist/lib/hooks/useEditor.js +0 -35
- package/dist/lib/hooks/useEditorHeadless.d.ts +0 -34
- package/dist/lib/hooks/useEditorHeadless.js +0 -207
- package/dist/lib/hooks/useImageProcessor.d.ts +0 -18
- package/dist/lib/hooks/useImageProcessor.js +0 -113
- package/dist/setupTests.d.ts +0 -1
- package/dist/setupTests.js +0 -1
- package/dist/themes/colors.d.ts +0 -12
- package/dist/themes/colors.js +0 -12
- package/dist/themes/honchoTheme.d.ts +0 -25
- package/dist/themes/honchoTheme.js +0 -94
- package/dist/utils/adjustment.d.ts +0 -6
- package/dist/utils/adjustment.js +0 -48
- package/dist/utils/imageLoader.d.ts +0 -11
- package/dist/utils/imageLoader.js +0 -48
- package/dist/utils/isMobile.d.ts +0 -1
- package/dist/utils/isMobile.js +0 -5
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Dialog, DialogContent, IconButton, Stack, Typography, } from "@mui/material";
|
|
3
|
-
import useHonchoTypography from "../../themes/honchoTheme";
|
|
4
|
-
import useColors from '../../themes/colors';
|
|
5
|
-
import { CloseOutlined } from "@mui/icons-material";
|
|
6
|
-
export function HBaseDialog(props) {
|
|
7
|
-
const colors = useColors();
|
|
8
|
-
const typography = useHonchoTypography();
|
|
9
|
-
return (_jsxs(Dialog, { disableScrollLock: true, open: props.open, onClose: props.onClose, "aria-labelledby": "responsive-dialog-title", PaperProps: {
|
|
10
|
-
sx: {
|
|
11
|
-
borderRadius: "28px",
|
|
12
|
-
width: { xs: "328px", sm: "456px", md: "456px" },
|
|
13
|
-
// maxWidth: { xs: 328, sm: "456px", md: "456px" },
|
|
14
|
-
//maxHeight: 306,
|
|
15
|
-
// margin: { xs: 0, sm: "auto" },
|
|
16
|
-
},
|
|
17
|
-
}, children: [_jsx(DialogContent, { sx: { pb: "16px", mb: "0px" }, children: _jsxs(Stack, { direction: "column", children: [_jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [_jsx(Typography, {}), _jsx(Typography, { color: colors.onSurface, sx: { ...typography.titleMedium }, children: props.title }), _jsx(CloseButton, { onClick: props.onClose })] }), _jsx(Typography, { variant: "bodyMedium", color: colors.onSurface, children: props.description })] }) }), props.action && (_jsx(DialogContent, { sx: { pt: "0px", mt: "0px" }, children: _jsx(Stack, { alignItems: "center", width: "100%", children: props.action }) }))] }));
|
|
18
|
-
}
|
|
19
|
-
export function HDialogForPreset(props) {
|
|
20
|
-
const colors = useColors();
|
|
21
|
-
const typography = useHonchoTypography();
|
|
22
|
-
return (_jsx(Dialog, { disableScrollLock: true, open: props.open, onClose: props.onClose, "aria-labelledby": "responsive-dialog-title", PaperProps: {
|
|
23
|
-
sx: {
|
|
24
|
-
borderRadius: "28px",
|
|
25
|
-
maxWidth: { xs: 328, sm: "456px", md: "456px" },
|
|
26
|
-
//maxHeight: 306,
|
|
27
|
-
margin: { xs: 0, sm: "auto" },
|
|
28
|
-
},
|
|
29
|
-
}, children: _jsx(DialogContent, { sx: { padding: { xs: "24px 24px 0 24px", sm: "24 24px 0 24px" } }, children: _jsxs(Stack, { spacing: 0, direction: "column", children: [_jsx(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: _jsx(Typography, { color: colors.onSurface, sx: { ...typography.labelLarge }, children: props.title }) }), _jsxs(Stack, { direction: "column", sx: { pt: "12px" }, children: [_jsx(Stack, { sx: { pt: "20px", pb: "20px" }, children: props.action }), _jsxs(Stack, { children: [_jsx(Typography, { variant: "bodyMedium", color: colors.onSurface, children: props.description }), props.actionAdjust] })] })] }) }) }));
|
|
30
|
-
}
|
|
31
|
-
export function PositiveButton(props) {
|
|
32
|
-
const colors = useColors();
|
|
33
|
-
return (_jsx(Button, { variant: "text", sx: {
|
|
34
|
-
":hover": {
|
|
35
|
-
backgroundColor: "transparent",
|
|
36
|
-
},
|
|
37
|
-
}, onClick: props.onClick, children: _jsx(Typography, { variant: "buttonMedium", color: colors.onSurface, children: props.text }) }));
|
|
38
|
-
}
|
|
39
|
-
export function NegativeButton(props) {
|
|
40
|
-
const colors = useColors();
|
|
41
|
-
return (_jsx(Button, { variant: "text", sx: {
|
|
42
|
-
borderRadius: 100,
|
|
43
|
-
color: colors.error,
|
|
44
|
-
":hover": {
|
|
45
|
-
backgroundColor: "transparent",
|
|
46
|
-
},
|
|
47
|
-
}, disabled: false, onClick: props.onClick, children: props.text }));
|
|
48
|
-
}
|
|
49
|
-
function CloseButton(props) {
|
|
50
|
-
return (_jsx(IconButton, { onClick: props.onClick, children: _jsx(CloseOutlined, { htmlColor: "black" }) }));
|
|
51
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type CheckState = {
|
|
3
|
-
[key: string]: boolean;
|
|
4
|
-
};
|
|
5
|
-
interface Props {
|
|
6
|
-
colorChecks: CheckState;
|
|
7
|
-
lightChecks: CheckState;
|
|
8
|
-
detailsChecks: CheckState;
|
|
9
|
-
expanded: {
|
|
10
|
-
color: boolean;
|
|
11
|
-
light: boolean;
|
|
12
|
-
details: boolean;
|
|
13
|
-
};
|
|
14
|
-
onCopyEdit: () => void;
|
|
15
|
-
onParentChange: (event: React.ChangeEvent<HTMLInputElement>, setter: React.Dispatch<React.SetStateAction<any>>) => void;
|
|
16
|
-
onChildChange: (event: React.ChangeEvent<HTMLInputElement>, setter: React.Dispatch<React.SetStateAction<any>>) => void;
|
|
17
|
-
onToggleExpand: (section: 'color' | 'light' | 'details') => void;
|
|
18
|
-
setColorChecks: React.Dispatch<React.SetStateAction<any>>;
|
|
19
|
-
setLightChecks: React.Dispatch<React.SetStateAction<any>>;
|
|
20
|
-
setDetailsChecks: React.Dispatch<React.SetStateAction<any>>;
|
|
21
|
-
}
|
|
22
|
-
export declare function HDialogCopy(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
interface PropsPreset {
|
|
24
|
-
colorChecks: CheckState;
|
|
25
|
-
lightChecks: CheckState;
|
|
26
|
-
detailsChecks: CheckState;
|
|
27
|
-
expanded: {
|
|
28
|
-
color: boolean;
|
|
29
|
-
light: boolean;
|
|
30
|
-
details: boolean;
|
|
31
|
-
};
|
|
32
|
-
onParentChange: (event: React.ChangeEvent<HTMLInputElement>, setter: React.Dispatch<React.SetStateAction<any>>) => void;
|
|
33
|
-
onChildChange: (event: React.ChangeEvent<HTMLInputElement>, setter: React.Dispatch<React.SetStateAction<any>>) => void;
|
|
34
|
-
onToggleExpand: (section: 'color' | 'light' | 'details') => void;
|
|
35
|
-
setColorChecks: React.Dispatch<React.SetStateAction<any>>;
|
|
36
|
-
setLightChecks: React.Dispatch<React.SetStateAction<any>>;
|
|
37
|
-
setDetailsChecks: React.Dispatch<React.SetStateAction<any>>;
|
|
38
|
-
}
|
|
39
|
-
export declare function HDialogPreset(props: PropsPreset): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Stack, Typography, Checkbox, Collapse, FormControlLabel, IconButton } from "@mui/material";
|
|
3
|
-
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
4
|
-
import useHonchoTypography from "../../themes/honchoTheme";
|
|
5
|
-
import useColors from '../../themes/colors';
|
|
6
|
-
export function HDialogCopy(props) {
|
|
7
|
-
const colors = useColors();
|
|
8
|
-
const typography = useHonchoTypography();
|
|
9
|
-
// --- Derived state is now calculated from props ---
|
|
10
|
-
const colorValues = Object.values(props.colorChecks);
|
|
11
|
-
const colorCheckedCount = colorValues.filter(Boolean).length;
|
|
12
|
-
const isColorParentChecked = colorCheckedCount === colorValues.length;
|
|
13
|
-
const isColorParentIndeterminate = colorCheckedCount > 0 && !isColorParentChecked;
|
|
14
|
-
const lightValues = Object.values(props.lightChecks);
|
|
15
|
-
const lightCheckedCount = lightValues.filter(Boolean).length;
|
|
16
|
-
const isLightParentChecked = lightCheckedCount === lightValues.length;
|
|
17
|
-
const isLightParentIndeterminate = lightCheckedCount > 0 && !isLightParentChecked;
|
|
18
|
-
const detailsValues = Object.values(props.detailsChecks);
|
|
19
|
-
const detailsCheckedCount = detailsValues.filter(Boolean).length;
|
|
20
|
-
const isDetailsParentChecked = detailsCheckedCount === detailsValues.length;
|
|
21
|
-
const isDetailsParentIndeterminate = detailsCheckedCount > 0 && !isDetailsParentChecked;
|
|
22
|
-
const checkboxStyle = {
|
|
23
|
-
// pt: "5px",
|
|
24
|
-
color: colors.onSurface,
|
|
25
|
-
'&.Mui-checked, &.Mui-indeterminate': { color: colors.onSurface },
|
|
26
|
-
};
|
|
27
|
-
return (_jsxs(Stack, { direction: "column", spacing: 1, sx: { padding: 0, margin: 0, width: '100%' }, children: [_jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Color" }), control: _jsx(Checkbox, { color: "default", icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), indeterminateIcon: _jsx(RoundedSquareIndeterminateIcon, { color: colors.onSurface }), checked: isColorParentChecked, indeterminate: isColorParentIndeterminate, onChange: (e) => props.onParentChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface }, children: `${colorCheckedCount}/${colorValues.length}` }), _jsx(IconButton, { onClick: () => props.onToggleExpand('color'), size: "small", sx: { pt: "3px" }, children: _jsx(ExpandMoreIcon, { sx: { colors: colors.background, transition: 'transform 0.3s', transform: props.expanded.color ? 'rotate(180deg)' : 'rotate(0deg)' } }) })] })] }), _jsx(Collapse, { in: props.expanded.color, timeout: "auto", unmountOnExit: true, children: _jsxs(Stack, { direction: "column", sx: { ml: 2, pl: 1.5 }, children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Temperature" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "temperature", checked: props.colorChecks.temperature, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Tint" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "tint", checked: props.colorChecks.tint, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Vibrance" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "vibrance", checked: props.colorChecks.vibrance, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Saturation" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "saturation", checked: props.colorChecks.saturation, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) })] }) })] }), _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Light" }), control: _jsx(Checkbox, { color: "default", icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), indeterminateIcon: _jsx(RoundedSquareIndeterminateIcon, { color: colors.onSurface }), checked: isLightParentChecked, indeterminate: isLightParentIndeterminate, onChange: (e) => props.onParentChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface }, children: `${lightCheckedCount}/${lightValues.length}` }), _jsx(IconButton, { onClick: () => props.onToggleExpand('light'), size: "small", sx: { pt: "3px" }, children: _jsx(ExpandMoreIcon, { sx: { transition: 'transform 0.3s', transform: props.expanded.light ? 'rotate(180deg)' : 'rotate(0deg)' } }) })] })] }), _jsx(Collapse, { in: props.expanded.light, timeout: "auto", unmountOnExit: true, children: _jsxs(Stack, { direction: "column", sx: { ml: 2, pl: 1.5 }, children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Exposure" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "exposure", checked: props.lightChecks.exposure, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Contrast" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "contrast", checked: props.lightChecks.contrast, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Highlights" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "highlights", checked: props.lightChecks.highlights, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Shadows" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "shadows", checked: props.lightChecks.shadows, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Whites" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "whites", checked: props.lightChecks.whites, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Blacks" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "blacks", checked: props.lightChecks.blacks, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) })] }) })] }), _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Details" }), control: _jsx(Checkbox, { color: "default", icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), indeterminateIcon: _jsx(RoundedSquareIndeterminateIcon, { color: colors.onSurface }), checked: isDetailsParentChecked, indeterminate: isDetailsParentIndeterminate, onChange: (e) => props.onParentChange(e, props.setDetailsChecks), sx: checkboxStyle }) }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface }, children: `${detailsCheckedCount}/${detailsValues.length}` }), _jsx(IconButton, { onClick: () => props.onToggleExpand('details'), size: "small", sx: { pt: "3px" }, children: _jsx(ExpandMoreIcon, { sx: { transition: 'transform 0.3s', transform: props.expanded.details ? 'rotate(180deg)' : 'rotate(0deg)' } }) })] })] }), _jsx(Collapse, { in: props.expanded.details, timeout: "auto", unmountOnExit: true, children: _jsxs(Stack, { direction: "column", sx: { ml: 2, pl: 1.5 }, children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Clarity" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "clarity", checked: props.detailsChecks.clarity, onChange: (e) => props.onChildChange(e, props.setDetailsChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Sharpness" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "sharpness", checked: props.detailsChecks.sharpness, onChange: (e) => props.onChildChange(e, props.setDetailsChecks), sx: checkboxStyle }) })] }) })] }), _jsx(Button, { onClick: props.onCopyEdit, sx: { ...typography.labelMedium, mt: '20px', height: '40px', color: colors.surface, backgroundColor: colors.onSurface, borderRadius: '100px', textTransform: 'none' }, children: "Copy" })] }));
|
|
28
|
-
}
|
|
29
|
-
// A component for the UNCHECKED box
|
|
30
|
-
const RoundedSquareIcon = ({ color }) => (_jsx("div", { style: {
|
|
31
|
-
width: 18,
|
|
32
|
-
height: 18,
|
|
33
|
-
border: `2px solid ${color}`, // Example color for the border
|
|
34
|
-
borderRadius: '5px',
|
|
35
|
-
backgroundColor: 'transparent',
|
|
36
|
-
} }));
|
|
37
|
-
// A component for the CHECKED box
|
|
38
|
-
const RoundedSquareCheckedIcon = ({ color }) => (_jsx("div", { style: {
|
|
39
|
-
width: 18,
|
|
40
|
-
height: 18,
|
|
41
|
-
border: `2px solid ${color}`, // Example color for the border
|
|
42
|
-
backgroundColor: `${color}`,
|
|
43
|
-
borderRadius: '5px',
|
|
44
|
-
display: 'flex',
|
|
45
|
-
alignItems: 'center',
|
|
46
|
-
justifyContent: 'center',
|
|
47
|
-
}, children: _jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#FFFFFF", strokeWidth: "3", children: _jsx("path", { d: "M20 6L9 17L4 12" }) }) }));
|
|
48
|
-
const RoundedSquareIndeterminateIcon = ({ color }) => (_jsx("div", { style: {
|
|
49
|
-
// These styles MUST match your checked icon's container
|
|
50
|
-
width: 18,
|
|
51
|
-
height: 18,
|
|
52
|
-
border: `2px solid ${color}`,
|
|
53
|
-
backgroundColor: `${color}`,
|
|
54
|
-
borderRadius: '5px',
|
|
55
|
-
display: 'flex',
|
|
56
|
-
alignItems: 'center',
|
|
57
|
-
justifyContent: 'center',
|
|
58
|
-
}, children: _jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#FFFFFF", strokeWidth: "3", children: _jsx("path", { d: "M5 12L19 12" }) }) }));
|
|
59
|
-
export function HDialogPreset(props) {
|
|
60
|
-
const colors = useColors();
|
|
61
|
-
const typography = useHonchoTypography();
|
|
62
|
-
// --- Derived state is now calculated from props ---
|
|
63
|
-
const colorValues = Object.values(props.colorChecks);
|
|
64
|
-
const colorCheckedCount = colorValues.filter(Boolean).length;
|
|
65
|
-
const isColorParentChecked = colorCheckedCount === colorValues.length;
|
|
66
|
-
const isColorParentIndeterminate = colorCheckedCount > 0 && !isColorParentChecked;
|
|
67
|
-
const lightValues = Object.values(props.lightChecks);
|
|
68
|
-
const lightCheckedCount = lightValues.filter(Boolean).length;
|
|
69
|
-
const isLightParentChecked = lightCheckedCount === lightValues.length;
|
|
70
|
-
const isLightParentIndeterminate = lightCheckedCount > 0 && !isLightParentChecked;
|
|
71
|
-
const detailsValues = Object.values(props.detailsChecks);
|
|
72
|
-
const detailsCheckedCount = detailsValues.filter(Boolean).length;
|
|
73
|
-
const isDetailsParentChecked = detailsCheckedCount === detailsValues.length;
|
|
74
|
-
const isDetailsParentIndeterminate = detailsCheckedCount > 0 && !isDetailsParentChecked;
|
|
75
|
-
const checkboxStyle = {
|
|
76
|
-
color: colors.onSurface,
|
|
77
|
-
'&.Mui-checked, &.Mui-indeterminate': { color: colors.onSurface },
|
|
78
|
-
};
|
|
79
|
-
return (_jsxs(Stack, { direction: "column", spacing: 1, sx: { padding: 0, margin: 0, width: '100%' }, children: [_jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Color" }), control: _jsx(Checkbox, { color: "default", icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), indeterminateIcon: _jsx(RoundedSquareIndeterminateIcon, { color: colors.onSurface }), checked: isColorParentChecked, indeterminate: isColorParentIndeterminate, onChange: (e) => props.onParentChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface }, children: `${colorCheckedCount}/${colorValues.length}` }), _jsx(IconButton, { onClick: () => props.onToggleExpand('color'), size: "small", sx: { pt: "3px" }, children: _jsx(ExpandMoreIcon, { sx: { colors: colors.background, transition: 'transform 0.3s', transform: props.expanded.color ? 'rotate(180deg)' : 'rotate(0deg)' } }) })] })] }), _jsx(Collapse, { in: props.expanded.color, timeout: "auto", unmountOnExit: true, children: _jsxs(Stack, { direction: "column", sx: { ml: 2, pl: 1.5 }, children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Temperature" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "temperature", checked: props.colorChecks.temperature, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Tint" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "tint", checked: props.colorChecks.tint, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Vibrance" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "vibrance", checked: props.colorChecks.vibrance, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Saturation" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), name: "saturation", checked: props.colorChecks.saturation, onChange: (e) => props.onChildChange(e, props.setColorChecks), sx: checkboxStyle }) })] }) })] }), _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Light" }), control: _jsx(Checkbox, { color: "default", icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), indeterminateIcon: _jsx(RoundedSquareIndeterminateIcon, { color: colors.onSurface }), checked: isLightParentChecked, indeterminate: isLightParentIndeterminate, onChange: (e) => props.onParentChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface }, children: `${lightCheckedCount}/${lightValues.length}` }), _jsx(IconButton, { onClick: () => props.onToggleExpand('light'), size: "small", sx: { pt: "3px" }, children: _jsx(ExpandMoreIcon, { sx: { transition: 'transform 0.3s', transform: props.expanded.light ? 'rotate(180deg)' : 'rotate(0deg)' } }) })] })] }), _jsx(Collapse, { in: props.expanded.light, timeout: "auto", unmountOnExit: true, children: _jsxs(Stack, { direction: "column", sx: { ml: 2, pl: 1.5 }, children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Exposure" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "exposure", checked: props.lightChecks.exposure, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Contrast" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "contrast", checked: props.lightChecks.contrast, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Highlights" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "highlights", checked: props.lightChecks.highlights, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Shadows" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "shadows", checked: props.lightChecks.shadows, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Whites" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "whites", checked: props.lightChecks.whites, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Blacks" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "blacks", checked: props.lightChecks.blacks, onChange: (e) => props.onChildChange(e, props.setLightChecks), sx: checkboxStyle }) })] }) })] }), _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Details" }), control: _jsx(Checkbox, { color: "default", icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), indeterminateIcon: _jsx(RoundedSquareIndeterminateIcon, { color: colors.onSurface }), checked: isDetailsParentChecked, indeterminate: isDetailsParentIndeterminate, onChange: (e) => props.onParentChange(e, props.setDetailsChecks), sx: checkboxStyle }) }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface }, children: `${detailsCheckedCount}/${detailsValues.length}` }), _jsx(IconButton, { onClick: () => props.onToggleExpand('details'), size: "small", sx: { pt: "3px" }, children: _jsx(ExpandMoreIcon, { sx: { transition: 'transform 0.3s', transform: props.expanded.details ? 'rotate(180deg)' : 'rotate(0deg)' } }) })] })] }), _jsx(Collapse, { in: props.expanded.details, timeout: "auto", unmountOnExit: true, children: _jsxs(Stack, { direction: "column", sx: { ml: 2, pl: 1.5 }, children: [_jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Clarity" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "clarity", checked: props.detailsChecks.clarity, onChange: (e) => props.onChildChange(e, props.setDetailsChecks), sx: checkboxStyle }) }), _jsx(FormControlLabel, { label: _jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.onSurface, pt: "2px" }, children: "Sharpness" }), control: _jsx(Checkbox, { icon: _jsx(RoundedSquareIcon, { color: colors.onSurface }), checkedIcon: _jsx(RoundedSquareCheckedIcon, { color: colors.onSurface }), color: "default", name: "sharpness", checked: props.detailsChecks.sharpness, onChange: (e) => props.onChildChange(e, props.setDetailsChecks), sx: checkboxStyle }) })] }) })] })] }));
|
|
80
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
anchorElZoom: null | HTMLElement;
|
|
4
|
-
onScale: (event: React.MouseEvent<HTMLElement>) => void;
|
|
5
|
-
onZoomMenuClose: () => void;
|
|
6
|
-
zoomLevelText: string;
|
|
7
|
-
onZoomAction: (zoomLevel: string) => void;
|
|
8
|
-
onShowOriginal?: () => void;
|
|
9
|
-
onShowEdited?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export default function HFooter(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Stack, IconButton, CardMedia, MenuItem, ListItemText, Menu } from "@mui/material";
|
|
3
|
-
import useHonchoTypography from "../../themes/honchoTheme";
|
|
4
|
-
import useColors from '../../themes/colors';
|
|
5
|
-
export default function HFooter(props) {
|
|
6
|
-
const typography = useHonchoTypography();
|
|
7
|
-
const colors = useColors();
|
|
8
|
-
const isZoomMenuOpen = Boolean(props.anchorElZoom);
|
|
9
|
-
return (_jsx(_Fragment, { children: _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 0.5, children: [_jsx(Button, { id: "zoom-button", onClick: props.onScale, "aria-controls": isZoomMenuOpen ? 'zoom-options-menu' : undefined, "aria-haspopup": "true", "aria-expanded": isZoomMenuOpen ? 'true' : undefined, sx: {
|
|
10
|
-
color: colors.surface,
|
|
11
|
-
fontSize: "14px",
|
|
12
|
-
'&.MuiButton-outlined': {
|
|
13
|
-
color: colors.surface,
|
|
14
|
-
},
|
|
15
|
-
}, endIcon: _jsx(CardMedia, { component: "img", image: isZoomMenuOpen ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } }), children: props.zoomLevelText }), _jsx(IconButton, { "aria-label": "before-after", onMouseDown: props.onShowOriginal, onMouseUp: props.onShowEdited, onMouseLeave: props.onShowEdited, onTouchStart: props.onShowOriginal, onTouchEnd: props.onShowEdited, sx: { color: colors.outlineVariant }, children: _jsx(CardMedia, { component: "img", title: "before-after", image: "/v1/svg/before-after-editor.svg", sx: { width: "20px", height: "20px" } }) }), _jsxs(Menu, { id: "zoom-options-menu", anchorEl: props.anchorElZoom, open: isZoomMenuOpen, onClose: props.onZoomMenuClose, anchorOrigin: { vertical: 'top', horizontal: 'center' }, transformOrigin: { vertical: 'bottom', horizontal: 'center' }, slotProps: {
|
|
16
|
-
paper: {
|
|
17
|
-
sx: {
|
|
18
|
-
backgroundColor: colors.onBackground,
|
|
19
|
-
color: colors.surface,
|
|
20
|
-
border: `1px solid ${colors.outlineVariant}`,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
}, children: [_jsx(MenuItem, { onClick: () => props.onZoomAction('in'), children: _jsx(ListItemText, { sx: { ...typography.bodyMedium, color: colors.surface }, children: "Zoom in" }) }), _jsx(MenuItem, { onClick: () => props.onZoomAction('out'), children: _jsx(ListItemText, { sx: { ...typography.bodyMedium, color: colors.surface }, children: "Zoom out" }) }), _jsx(MenuItem, { onClick: () => props.onZoomAction('fit'), children: _jsx(ListItemText, { sx: { ...typography.bodyMedium, color: colors.surface }, children: "Zoom to fit" }) }), _jsx(MenuItem, { onClick: () => props.onZoomAction('50%'), children: _jsx(ListItemText, { sx: { ...typography.bodyMedium, color: colors.surface }, children: "Zoom to 50%" }) }), _jsx(MenuItem, { onClick: () => props.onZoomAction('100%'), children: _jsx(ListItemText, { sx: { ...typography.bodyMedium, color: colors.surface }, children: "Zoom to 100%" }) }), _jsx(MenuItem, { onClick: () => props.onZoomAction('200%'), children: _jsx(ListItemText, { sx: { ...typography.bodyMedium, color: colors.surface }, children: "Zoom to 200%" }) })] })] }) }));
|
|
24
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
anchorEl?: null | HTMLElement;
|
|
4
|
-
valueSelect?: string;
|
|
5
|
-
isPasteEnabled?: boolean;
|
|
6
|
-
onBack?: () => void;
|
|
7
|
-
onUndo?: () => void;
|
|
8
|
-
onRedo?: () => void;
|
|
9
|
-
onRevert?: () => void;
|
|
10
|
-
onCopyEdit?: () => void;
|
|
11
|
-
onPasteEdit?: () => void;
|
|
12
|
-
onMenuClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
13
|
-
onMenuClose?: () => void;
|
|
14
|
-
onSelectButton?: () => void;
|
|
15
|
-
}
|
|
16
|
-
export default function HHeaderEditor(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Stack, IconButton, CardMedia, MenuItem, ListItemText, ListItemIcon, Menu, Button, Typography } from "@mui/material";
|
|
3
|
-
import useHonchoTypography from "../../themes/honchoTheme";
|
|
4
|
-
import useColors from '../../themes/colors';
|
|
5
|
-
import useIsMobile from "../../utils/isMobile";
|
|
6
|
-
export default function HHeaderEditor(props) {
|
|
7
|
-
const typography = useHonchoTypography();
|
|
8
|
-
const colors = useColors();
|
|
9
|
-
const open = Boolean(props.anchorEl);
|
|
10
|
-
const isMobile = useIsMobile();
|
|
11
|
-
return (_jsx(_Fragment, { children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", width: "100%", sx: {
|
|
12
|
-
id: 'HHeaderEditor',
|
|
13
|
-
pr: !isMobile ? "24px" : "6px",
|
|
14
|
-
position: 'fixed',
|
|
15
|
-
top: 0,
|
|
16
|
-
left: 0,
|
|
17
|
-
right: 0,
|
|
18
|
-
zIndex: 1300,
|
|
19
|
-
backgroundColor: 'transparent',
|
|
20
|
-
}, children: [_jsx(Stack, { direction: "row", justifyContent: "flex-start", sx: { pl: !isMobile ? "0px" : "14px" }, children: _jsx(IconButton, { "aria-label": "back", onClick: props.onBack, sx: {
|
|
21
|
-
'&:active': {
|
|
22
|
-
transform: 'scale(0.92)',
|
|
23
|
-
},
|
|
24
|
-
transition: 'transform 0.1s ease-in-out',
|
|
25
|
-
}, children: _jsx(CardMedia, { title: "back", src: "svg/Back.svg", component: "img" }) }) }), _jsxs(Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", sx: { pt: "20px", pb: "12px" }, spacing: 0.1, children: [_jsx(Button, { variant: "text", onClick: props.onSelectButton, sx: { color: colors.outlineVariant }, children: props.valueSelect }), _jsx(IconButton, { "aria-label": "undo", onClick: props.onUndo, sx: { color: colors.outlineVariant }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/undo-editor.svg" }) }), _jsx(IconButton, { "aria-label": "redo", onClick: props.onRedo, sx: { color: colors.outlineVariant }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/redo-editor.svg" }) }), _jsx(IconButton, { "aria-label": "option", onClick: props.onMenuClick, "aria-controls": open ? 'options-menu' : undefined, "aria-haspopup": "true", "aria-expanded": open ? 'true' : undefined, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/dots-editor.svg" }) }), _jsxs(Menu, { id: "options-menu", anchorEl: props.anchorEl, open: open, onClose: props.onMenuClose, transformOrigin: { horizontal: 'right', vertical: 'top' }, anchorOrigin: { horizontal: 'right', vertical: 'bottom' }, slotProps: {
|
|
26
|
-
paper: {
|
|
27
|
-
sx: {
|
|
28
|
-
backgroundColor: colors.onBackground,
|
|
29
|
-
color: colors.surface,
|
|
30
|
-
border: `1px solid ${colors.outlineVariant}`,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
}, children: [_jsxs(MenuItem, { onClick: props.onRevert, children: [_jsx(ListItemIcon, { sx: { minWidth: 0, mr: "0px", px: "0px" }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/revert-editor.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(ListItemText, { children: _jsx(Typography, { sx: { fontSize: "14px", color: colors.surface }, children: "Revert to original" }) })] }), _jsxs(MenuItem, { onClick: props.onCopyEdit, children: [_jsx(ListItemIcon, { sx: { minWidth: 0, mr: "0px", px: "0px" }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/copy-editor.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(ListItemText, { children: _jsx(Typography, { sx: { fontSize: "14px", color: colors.surface }, children: "Copy edits" }) }), !isMobile &&
|
|
34
|
-
_jsx(ListItemIcon, { sx: { marginLeft: 'auto' }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/shortcut-copy-editor.svg", sx: { width: "25px", height: "20px" } }) })] }), _jsxs(MenuItem, { onClick: props.onPasteEdit, disabled: !props.isPasteEnabled, children: [_jsx(ListItemIcon, { sx: { minWidth: 0, mr: "0px", px: "0px" }, children: _jsx(CardMedia, { component: "img", image: !props.isPasteEnabled ? "/v1/svg/paste-editor.svg" : "/v1/svg/paste-white.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(ListItemText, { children: _jsx(Typography, { sx: { fontSize: "14px", color: !props.isPasteEnabled ? colors.onSurfaceVariant1 : colors.surface }, children: "Paste edits" }) }), !isMobile &&
|
|
35
|
-
_jsx(ListItemIcon, { sx: { marginLeft: '30px' }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/shortcut-paste-editor.svg", sx: { width: "25px", height: "20px" } }) })] })] })] })] }) }));
|
|
36
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
activePanel: string;
|
|
4
|
-
isPanelOpen: boolean;
|
|
5
|
-
anchorElZoom: null | HTMLElement;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
footer: React.ReactNode;
|
|
8
|
-
setActivePanel: (accordion: string) => void;
|
|
9
|
-
onScale: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
-
onBeforeAfter: () => void;
|
|
11
|
-
onZoomMenuClose: () => void;
|
|
12
|
-
onZoomAction: (zoomLevel: string) => void;
|
|
13
|
-
}
|
|
14
|
-
export default function HImageEditorBulkDekstop(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Stack, IconButton, CardMedia, Paper, Slide } from "@mui/material";
|
|
3
|
-
import useHonchoTypography from "../../themes/honchoTheme";
|
|
4
|
-
import useColors from "../../themes/colors";
|
|
5
|
-
export default function HImageEditorBulkDekstop(props) {
|
|
6
|
-
const typography = useHonchoTypography();
|
|
7
|
-
const colors = useColors();
|
|
8
|
-
const isZoomMenuOpen = Boolean(props.anchorElZoom);
|
|
9
|
-
return (_jsx(_Fragment, { children: _jsx(Slide, { direction: "left", in: props.isPanelOpen, mountOnEnter: true, unmountOnExit: true, children: _jsx(Paper, { elevation: 3, sx: {
|
|
10
|
-
position: 'inherit',
|
|
11
|
-
right: '40px',
|
|
12
|
-
top: '55px',
|
|
13
|
-
width: '320px',
|
|
14
|
-
height: 'calc(100vh - 70px)',
|
|
15
|
-
// pb: '10px',
|
|
16
|
-
zIndex: 1200,
|
|
17
|
-
backgroundColor: '#000000',
|
|
18
|
-
overflow: 'hidden',
|
|
19
|
-
// pl: "20px"
|
|
20
|
-
}, children: _jsxs(Stack, { direction: "row", sx: { height: '100%', pl: "0px" }, children: [_jsxs(Stack, { direction: "column", sx: { width: 'calc(100% - 60px)', height: '95%' }, children: [_jsx(Stack, { sx: { flexGrow: 1, overflowY: 'auto', pl: '0px', pr: '16px', msOverflowStyle: 'none', scrollbarWidth: 'none', '&::-webkit-scrollbar': { display: 'none' } }, children: props.children }), _jsx(Stack, { sx: {
|
|
21
|
-
flexShrink: 0,
|
|
22
|
-
p: '0px 12px',
|
|
23
|
-
}, children: props.footer })] }), _jsxs(Stack, { justifyContent: "flex-start", spacing: "15px", sx: {
|
|
24
|
-
width: '10px',
|
|
25
|
-
flexShrink: 0,
|
|
26
|
-
pt: 1,
|
|
27
|
-
pl: "10px",
|
|
28
|
-
}, children: [_jsx(IconButton, { onClick: () => props.setActivePanel('colorAdjustment'), children: _jsx(CardMedia, { component: "img", image: props.activePanel === 'colorAdjustment' ? "/v1/svg/color-adjustment-active.svg" : "/v1/svg/color-adjustment-inactive.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(IconButton, { onClick: () => props.setActivePanel('preset'), children: _jsx(CardMedia, { component: "img", image: props.activePanel === 'preset' ? "/v1/svg/watermark-editor-active.svg" : "/v1/svg/watermark-editor-inactive.svg", sx: { width: "20px", height: "20px" } }) })] })] }) }) }) }));
|
|
29
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SelectChangeEvent } from "@mui/material";
|
|
3
|
-
type Preset = {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
interface Props {
|
|
8
|
-
presets: Preset[];
|
|
9
|
-
activePanel: string;
|
|
10
|
-
activeSubPanel: string;
|
|
11
|
-
setActivePanel: (tab: string) => void;
|
|
12
|
-
setActiveSubPanel: (subTab: string) => void;
|
|
13
|
-
panelRef: React.RefObject<HTMLDivElement>;
|
|
14
|
-
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
15
|
-
panelHeight: number;
|
|
16
|
-
handleDragStart: (e: React.MouseEvent | React.TouchEvent) => void;
|
|
17
|
-
onContentHeightChange: (height: number) => void;
|
|
18
|
-
onTempDecreaseMax: () => void;
|
|
19
|
-
onTempDecrease: () => void;
|
|
20
|
-
onTempIncrease: () => void;
|
|
21
|
-
onTempIncreaseMax: () => void;
|
|
22
|
-
onTintDecreaseMax: () => void;
|
|
23
|
-
onTintDecrease: () => void;
|
|
24
|
-
onTintIncrease: () => void;
|
|
25
|
-
onTintIncreaseMax: () => void;
|
|
26
|
-
onVibranceDecreaseMax: () => void;
|
|
27
|
-
onVibranceDecrease: () => void;
|
|
28
|
-
onVibranceIncrease: () => void;
|
|
29
|
-
onVibranceIncreaseMax: () => void;
|
|
30
|
-
onSaturationDecreaseMax: () => void;
|
|
31
|
-
onSaturationDecrease: () => void;
|
|
32
|
-
onSaturationIncrease: () => void;
|
|
33
|
-
onSaturationIncreaseMax: () => void;
|
|
34
|
-
onExposureDecreaseMax: () => void;
|
|
35
|
-
onExposureDecrease: () => void;
|
|
36
|
-
onExposureIncrease: () => void;
|
|
37
|
-
onExposureIncreaseMax: () => void;
|
|
38
|
-
onContrastDecreaseMax: () => void;
|
|
39
|
-
onContrastDecrease: () => void;
|
|
40
|
-
onContrastIncrease: () => void;
|
|
41
|
-
onContrastIncreaseMax: () => void;
|
|
42
|
-
onHighlightsDecreaseMax: () => void;
|
|
43
|
-
onHighlightsDecrease: () => void;
|
|
44
|
-
onHighlightsIncrease: () => void;
|
|
45
|
-
onHighlightsIncreaseMax: () => void;
|
|
46
|
-
onShadowsDecreaseMax: () => void;
|
|
47
|
-
onShadowsDecrease: () => void;
|
|
48
|
-
onShadowsIncrease: () => void;
|
|
49
|
-
onShadowsIncreaseMax: () => void;
|
|
50
|
-
onWhitesDecreaseMax: () => void;
|
|
51
|
-
onWhitesDecrease: () => void;
|
|
52
|
-
onWhitesIncrease: () => void;
|
|
53
|
-
onWhitesIncreaseMax: () => void;
|
|
54
|
-
onBlacksDecreaseMax: () => void;
|
|
55
|
-
onBlacksDecrease: () => void;
|
|
56
|
-
onBlacksIncrease: () => void;
|
|
57
|
-
onBlacksIncreaseMax: () => void;
|
|
58
|
-
onClarityDecreaseMax: () => void;
|
|
59
|
-
onClarityDecrease: () => void;
|
|
60
|
-
onClarityIncrease: () => void;
|
|
61
|
-
onClarityIncreaseMax: () => void;
|
|
62
|
-
onSharpnessDecreaseMax: () => void;
|
|
63
|
-
onSharpnessDecrease: () => void;
|
|
64
|
-
onSharpnessIncrease: () => void;
|
|
65
|
-
onSharpnessIncreaseMax: () => void;
|
|
66
|
-
selectedPresetBulk: string;
|
|
67
|
-
onSelectPresetBulk: (event: SelectChangeEvent<string>) => void;
|
|
68
|
-
onPresetMenuClickBulk: (event: React.MouseEvent<HTMLElement>, presetId: string) => void;
|
|
69
|
-
onOpenPresetModalBulk: () => void;
|
|
70
|
-
}
|
|
71
|
-
export default function HImageEditorBulkMobile(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
72
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BottomNavigation, BottomNavigationAction, Box, CardMedia, Paper, Stack } from "@mui/material";
|
|
3
|
-
import useHonchoTypography from "../../themes/honchoTheme";
|
|
4
|
-
import useColors from '../../themes/colors';
|
|
5
|
-
import HBulkColorAdjustmentMobile from "./HBulkColorAdjustmentMobile";
|
|
6
|
-
import HBulkPresetMobile from "./HBulkPresetMobile";
|
|
7
|
-
// Data structure for the sub-navigation tabs
|
|
8
|
-
const subTabs = {
|
|
9
|
-
colorAdjustment: [
|
|
10
|
-
{ value: "color", label: "Color", inactiveIcon: "/v1/svg/white-balance-inactive-mobile.svg", activeIcon: "/v1/svg/white-balance-active-mobile.svg" },
|
|
11
|
-
{ value: "light", label: "Light", inactiveIcon: "/v1/svg/light-inactive-mobile.svg", activeIcon: "/v1/svg/light-active-mobile.svg" },
|
|
12
|
-
// { value: "details", label: "Details", inactiveIcon: "/v1/svg/details-inactive-mobile.svg", activeIcon: "/v1/svg/details-active-mobile.svg"},
|
|
13
|
-
],
|
|
14
|
-
aspectRatio: [
|
|
15
|
-
{ value: "portrait", label: "Portrait" },
|
|
16
|
-
{ value: "square", label: "Square" },
|
|
17
|
-
{ value: "wide", label: "Wide" },
|
|
18
|
-
],
|
|
19
|
-
preset: [
|
|
20
|
-
{ value: "Preset", label: "Preset", inactiveIcon: "/v1/svg/preset-inactive-mobile.svg", activeIcon: "/v1/svg/preset-active-mobile.svg" },
|
|
21
|
-
],
|
|
22
|
-
};
|
|
23
|
-
export default function HImageEditorBulkMobile(props) {
|
|
24
|
-
const typography = useHonchoTypography();
|
|
25
|
-
const colors = useColors();
|
|
26
|
-
const handleChange = (event, newValue) => {
|
|
27
|
-
props.setActivePanel(newValue);
|
|
28
|
-
};
|
|
29
|
-
const currentSubTabs = subTabs[props.activePanel];
|
|
30
|
-
return (_jsx(Paper, { elevation: 0, sx: {
|
|
31
|
-
position: 'fixed',
|
|
32
|
-
bottom: 0,
|
|
33
|
-
left: 0,
|
|
34
|
-
right: 0,
|
|
35
|
-
zIndex: 1300,
|
|
36
|
-
backgroundColor: 'transparent',
|
|
37
|
-
}, children: _jsxs(Stack, { direction: "column", children: [props.activeSubPanel && (_jsxs(Paper, { ref: props.panelRef, elevation: 3, className: "draggable-panel MuiPaper-transition", sx: {
|
|
38
|
-
height: `${props.panelHeight}px`,
|
|
39
|
-
maxHeight: '60vh',
|
|
40
|
-
backgroundColor: 'rgba(40, 40, 40, 0.85)',
|
|
41
|
-
overflow: 'hidden',
|
|
42
|
-
borderRadius: "0px",
|
|
43
|
-
'&.MuiPaper-transition': {
|
|
44
|
-
transition: 'height 0.5s ease-in-out',
|
|
45
|
-
},
|
|
46
|
-
}, children: [_jsx(Box, { onMouseDown: props.handleDragStart, onTouchStart: props.handleDragStart, sx: {
|
|
47
|
-
display: 'flex',
|
|
48
|
-
justifyContent: 'center',
|
|
49
|
-
alignItems: 'center',
|
|
50
|
-
pt: '5px',
|
|
51
|
-
pb: '12px',
|
|
52
|
-
cursor: 'ns-resize',
|
|
53
|
-
touchAction: 'none',
|
|
54
|
-
}, children: _jsx(Box, { sx: { width: 40, height: 5, borderRadius: '2.5px', backgroundColor: 'rgba(255, 255, 255, 0.5)' } }) }), _jsxs(Box, { ref: props.contentRef, sx: {
|
|
55
|
-
paddingX: "8px",
|
|
56
|
-
paddingBottom: 3,
|
|
57
|
-
height: 'calc(100% - 30px)',
|
|
58
|
-
overflowY: 'auto',
|
|
59
|
-
scrollbarWidth: 'none',
|
|
60
|
-
'&::-webkit-scrollbar': { display: 'none' },
|
|
61
|
-
}, children: [props.activePanel === 'colorAdjustment' && _jsx(HBulkColorAdjustmentMobile, { ...props }), props.activePanel === 'preset' && _jsx(HBulkPresetMobile, { ...props })] })] })), currentSubTabs && (_jsx(Paper, { sx: {
|
|
62
|
-
backgroundColor: colors.onBackground,
|
|
63
|
-
paddingTop: "10px",
|
|
64
|
-
pb: "0px",
|
|
65
|
-
mb: "0px",
|
|
66
|
-
px: "44px",
|
|
67
|
-
borderRadius: "0px",
|
|
68
|
-
}, elevation: 3, children: _jsx(BottomNavigation, { showLabels: true, sx: { backgroundColor: colors.onBackground, gap: '10px' }, children: currentSubTabs.map((tab) => {
|
|
69
|
-
const isActive = props.activeSubPanel === tab.value;
|
|
70
|
-
const iconSrc = isActive ? tab.activeIcon : tab.inactiveIcon;
|
|
71
|
-
return (_jsx(BottomNavigationAction, { label: tab.label, value: tab.value, onClick: () => props.setActiveSubPanel(isActive ? '' : tab.value), icon: iconSrc && _jsx(CardMedia, { component: "img", image: iconSrc, sx: { width: "20px", height: "20px", mb: "5px" } }), sx: {
|
|
72
|
-
color: isActive ? colors.surface : colors.onSurfaceVariant1,
|
|
73
|
-
minWidth: 'auto',
|
|
74
|
-
p: 0,
|
|
75
|
-
'& .MuiBottomNavigationAction-label': {
|
|
76
|
-
...typography.labelSmall,
|
|
77
|
-
color: isActive ? colors.surface : colors.onSurfaceVariant1,
|
|
78
|
-
}
|
|
79
|
-
} }, tab.value));
|
|
80
|
-
}) }) })), _jsx(Paper, { sx: { backgroundColor: colors.onBackground, borderRadius: "0px", pb: "0px", mb: "0px" }, elevation: 3, children: _jsx(Stack, { direction: "row", justifyContent: "center", alignItems: "center", sx: { pt: "0px", mb: "0px", mr: "0px", ml: "0px" }, children: _jsxs(BottomNavigation, { value: props.activePanel, onChange: handleChange, sx: { backgroundColor: colors.onBackground }, children: [_jsx(BottomNavigationAction, { value: "colorAdjustment", sx: { px: '12px', py: '0px', minWidth: 'auto' }, icon: _jsx(CardMedia, { component: "img", image: props.activePanel === 'colorAdjustment' ? "/v1/svg/color-adjustment-active-mobile.svg" : "/v1/svg/color-adjustment-inactive-mobile.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(BottomNavigationAction, { value: "preset", sx: { px: '12px', py: '0px', minWidth: 'auto' }, icon: _jsx(CardMedia, { component: "img", image: props.activePanel === 'preset' ? "/v1/svg/preset-and-watermark-active-mobile.svg" : "/v1/svg/preset-and-watermark-inactive-mobile.svg", sx: { width: "20px", height: "20px" } }) })] }) }) })] }) }));
|
|
81
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
activePanel: string;
|
|
4
|
-
isPanelOpen: boolean;
|
|
5
|
-
anchorElZoom: null | HTMLElement;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
footer: React.ReactNode;
|
|
8
|
-
setActivePanel: (accordion: string) => void;
|
|
9
|
-
onScale: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
-
onBeforeAfter: () => void;
|
|
11
|
-
onZoomMenuClose: () => void;
|
|
12
|
-
onZoomAction: (zoomLevel: string) => void;
|
|
13
|
-
}
|
|
14
|
-
export default function HImageEditorDesktop(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Stack, IconButton, CardMedia, Paper, Slide } from "@mui/material";
|
|
3
|
-
import useHonchoTypography from "../../themes/honchoTheme";
|
|
4
|
-
import useColors from '../../themes/colors';
|
|
5
|
-
export default function HImageEditorDesktop(props) {
|
|
6
|
-
const typography = useHonchoTypography();
|
|
7
|
-
const colors = useColors();
|
|
8
|
-
const isZoomMenuOpen = Boolean(props.anchorElZoom);
|
|
9
|
-
return (_jsx(_Fragment, { children: _jsx(Slide, { direction: "left", in: props.isPanelOpen, mountOnEnter: true, unmountOnExit: true, children: _jsx(Stack, { sx: {}, children: _jsx(Paper, { elevation: 3, sx: {
|
|
10
|
-
position: 'inherit',
|
|
11
|
-
right: '40px',
|
|
12
|
-
top: '55px',
|
|
13
|
-
width: '320px',
|
|
14
|
-
height: 'calc(100vh - 70px)',
|
|
15
|
-
// pb: '10px',
|
|
16
|
-
zIndex: 1200,
|
|
17
|
-
backgroundColor: '#000000',
|
|
18
|
-
overflow: 'hidden',
|
|
19
|
-
// pl: "20px"
|
|
20
|
-
}, children: _jsxs(Stack, { direction: "row", sx: { height: '100%', pl: "10px", }, children: [_jsxs(Stack, { direction: "column", sx: { width: 'calc(100% - 60px)', height: '95%' }, children: [_jsx(Stack, { sx: { flexGrow: 1, overflowY: 'auto', px: 2, msOverflowStyle: 'none', scrollbarWidth: 'none', '&::-webkit-scrollbar': { display: 'none' } }, children: props.children }), _jsx(Stack, { sx: {
|
|
21
|
-
flexShrink: 0,
|
|
22
|
-
p: '0px 25px',
|
|
23
|
-
}, children: props.footer })] }), _jsxs(Stack, { justifyContent: "flex-start", spacing: "15px", sx: {
|
|
24
|
-
width: '10px',
|
|
25
|
-
flexShrink: 0,
|
|
26
|
-
pt: 1,
|
|
27
|
-
pl: "10px",
|
|
28
|
-
}, children: [_jsx(IconButton, { onClick: () => props.setActivePanel('colorAdjustment'), children: _jsx(CardMedia, { component: "img", image: props.activePanel === 'colorAdjustment' ? "/v1/svg/color-adjustment-active.svg" : "/v1/svg/color-adjustment-inactive.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(IconButton, { onClick: () => props.setActivePanel('preset'), children: _jsx(CardMedia, { component: "img", image: props.activePanel === 'preset' ? "/v1/svg/watermark-editor-active.svg" : "/v1/svg/watermark-editor-inactive.svg", sx: { width: "20px", height: "20px" } }) })] })] }) }) }) }) }));
|
|
29
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AdjustmentState } from '../../hooks/editor/type';
|
|
3
|
-
type Preset = {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
interface Props {
|
|
8
|
-
presets: Preset[];
|
|
9
|
-
activePanel: string;
|
|
10
|
-
activeSubPanel: string;
|
|
11
|
-
setActivePanel: (tab: string) => void;
|
|
12
|
-
setActiveSubPanel: (subTab: string) => void;
|
|
13
|
-
panelRef: React.RefObject<HTMLDivElement>;
|
|
14
|
-
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
15
|
-
panelHeight: number;
|
|
16
|
-
handleDragStart: (e: React.MouseEvent | React.TouchEvent) => void;
|
|
17
|
-
onContentHeightChange: (height: number) => void;
|
|
18
|
-
tempScore: number;
|
|
19
|
-
tintScore: number;
|
|
20
|
-
vibranceScore: number;
|
|
21
|
-
saturationScore: number;
|
|
22
|
-
exposureScore: number;
|
|
23
|
-
highlightsScore: number;
|
|
24
|
-
shadowScore: number;
|
|
25
|
-
whiteScore: number;
|
|
26
|
-
blackScore: number;
|
|
27
|
-
contrastScore: number;
|
|
28
|
-
clarityScore: number;
|
|
29
|
-
sharpnessScore: number;
|
|
30
|
-
onTempChange: (field: keyof AdjustmentState, value: number) => void;
|
|
31
|
-
onTintChange: (field: keyof AdjustmentState, value: number) => void;
|
|
32
|
-
onVibranceChange: (field: keyof AdjustmentState, value: number) => void;
|
|
33
|
-
onSaturationChange: (field: keyof AdjustmentState, value: number) => void;
|
|
34
|
-
onExposureChange: (field: keyof AdjustmentState, value: number) => void;
|
|
35
|
-
onHighlightsChange: (field: keyof AdjustmentState, value: number) => void;
|
|
36
|
-
onShadowsChange: (field: keyof AdjustmentState, value: number) => void;
|
|
37
|
-
onWhitesChange: (field: keyof AdjustmentState, value: number) => void;
|
|
38
|
-
onBlacksChange: (field: keyof AdjustmentState, value: number) => void;
|
|
39
|
-
onContrastChange: (field: keyof AdjustmentState, value: number) => void;
|
|
40
|
-
onClarityChange: (field: keyof AdjustmentState, value: number) => void;
|
|
41
|
-
onSharpnessChange: (field: keyof AdjustmentState, value: number) => void;
|
|
42
|
-
isBatchMode: boolean;
|
|
43
|
-
onDragStart: () => void;
|
|
44
|
-
onDragEnd: () => void;
|
|
45
|
-
selectedPreset: string | null;
|
|
46
|
-
onSelectPreset: (id: string) => void;
|
|
47
|
-
onOpenPresetModal: () => void;
|
|
48
|
-
presetOptionModal: (event: React.MouseEvent<HTMLElement>, presetId: string) => void;
|
|
49
|
-
}
|
|
50
|
-
export default function HImageEditorMobile(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
export {};
|