@yogiswara/honcho-editor-ui 2.6.13 → 2.6.15
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.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ModalRenameProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
action?: React.ReactNode;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onSubmit: () => void;
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
submitLabel?: string;
|
|
10
|
+
valueName: string;
|
|
11
|
+
setName: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
declare function ModalRename(props: ModalRenameProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default ModalRename;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Grid, Typography, useTheme, TextField, } from "@mui/material";
|
|
3
|
+
import useColors from '../../themes/colors';
|
|
4
|
+
import useHonchoTypography from "../../themes/honchoTheme";
|
|
5
|
+
const defaultPaperStyle = {
|
|
6
|
+
borderRadius: "28px",
|
|
7
|
+
width: { xs: "100%", sm: "456px" },
|
|
8
|
+
boxShadow: "none",
|
|
9
|
+
};
|
|
10
|
+
function ModalRename(props) {
|
|
11
|
+
const { isOpen, title, onCancel, onSubmit, cancelLabel = "Cancel", submitLabel = "Confirm", valueName, setName } = props;
|
|
12
|
+
const colors = useColors();
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
const typography = useHonchoTypography();
|
|
15
|
+
return (_jsxs(Dialog, { disableScrollLock: true, open: isOpen, onClose: onCancel, "aria-labelledby": "dialog-title", PaperProps: { sx: defaultPaperStyle }, children: [title && (_jsx(DialogTitle, { children: _jsx(Typography, { variant: "labelLarge", color: colors.onSurface, children: title }) })), _jsx(DialogContent, { sx: { padding: { xs: "24px 24px 0 24px", sm: "24px 24px 0 24px" } }, children: _jsx(TextField, { autoFocus: true, margin: "dense", id: "name", label: "Preset Name", type: "text", fullWidth: true, variant: "standard", value: valueName, onChange: setName, sx: {
|
|
16
|
+
backgroundColor: "#F6F6F6",
|
|
17
|
+
p: "7px",
|
|
18
|
+
borderRadius: "6px",
|
|
19
|
+
'& .MuiInputLabel-root': {
|
|
20
|
+
color: colors.onSurfaceVariant,
|
|
21
|
+
pt: '10px',
|
|
22
|
+
pl: '10px',
|
|
23
|
+
},
|
|
24
|
+
'& .MuiInput-input': {
|
|
25
|
+
color: colors.onSurface,
|
|
26
|
+
},
|
|
27
|
+
'& .MuiInputLabel-root.Mui-focused': {
|
|
28
|
+
color: colors.onSurfaceVariant,
|
|
29
|
+
},
|
|
30
|
+
} }) }), _jsx(DialogActions, { sx: { padding: 3 }, children: _jsxs(Grid, { container: true, direction: "row", justifyContent: "end", alignItems: "center", gap: 1, children: [_jsx(Button, { variant: "text", onClick: onCancel, children: cancelLabel }), _jsx(Button, { variant: "text", color: "info",
|
|
31
|
+
// The "disabled" attribute has been removed
|
|
32
|
+
onClick: onSubmit, children: submitLabel })] }) })] }));
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
export default ModalRename;
|
|
@@ -41,8 +41,8 @@ export interface Watermark {
|
|
|
41
41
|
}
|
|
42
42
|
export interface EditorConfig {
|
|
43
43
|
color_adjustment: ColorAdjustment;
|
|
44
|
-
transformation_adjustment
|
|
45
|
-
watermarks
|
|
44
|
+
transformation_adjustment?: TransformationAdjustment[];
|
|
45
|
+
watermarks?: Watermark[];
|
|
46
46
|
}
|
|
47
47
|
export interface Content {
|
|
48
48
|
key: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export { useEditorHeadless } from './lib/hooks/useEditorHeadless';
|
|
|
31
31
|
export { ImageSize, HonchoEditor, AdjustmentValues, AdjustmentRange, AdjustmentRanges } from './lib/editor/honcho-editor';
|
|
32
32
|
export { default as HPresetDeleteDialog } from './components/editor/HPresetDelete';
|
|
33
33
|
export { default as HModalDialog } from './components/modal/HModalDialog';
|
|
34
|
+
export { default as HModalRename } from './components/modal/HModalRename';
|
|
34
35
|
export { useAdjustmentHistory, type UseAdjustmentHistoryReturn, type HistoryInfo, type HistoryActions, type HistoryConfig } from './hooks/useAdjustmentHistory';
|
|
35
36
|
export { useAdjustmentHistoryBatch, type UseAdjustmentHistoryBatchReturn, type BatchAdjustmentState, type ImageAdjustmentConfig, type BatchHistoryInfo, type BatchHistoryActions, type BatchHistoryConfig } from './hooks/useAdjustmentHistoryBatch';
|
|
36
37
|
export { usePreset, type UsePresetReturn, type PresetInfo, type PresetActions, type PresetOptions } from './hooks/usePreset';
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ export { useEditorHeadless } from './lib/hooks/useEditorHeadless';
|
|
|
30
30
|
export { HonchoEditor } from './lib/editor/honcho-editor';
|
|
31
31
|
export { default as HPresetDeleteDialog } from './components/editor/HPresetDelete';
|
|
32
32
|
export { default as HModalDialog } from './components/modal/HModalDialog';
|
|
33
|
+
export { default as HModalRename } from './components/modal/HModalRename';
|
|
33
34
|
// --- History Hooks ---
|
|
34
35
|
export { useAdjustmentHistory } from './hooks/useAdjustmentHistory';
|
|
35
36
|
export { useAdjustmentHistoryBatch } from './hooks/useAdjustmentHistoryBatch';
|