@yogiswara/honcho-editor-ui 1.0.0

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.
Files changed (91) hide show
  1. package/dist/components/editor/HAccordionAspectRatio.d.ts +14 -0
  2. package/dist/components/editor/HAccordionAspectRatio.js +102 -0
  3. package/dist/components/editor/HAccordionColor.d.ts +12 -0
  4. package/dist/components/editor/HAccordionColor.js +234 -0
  5. package/dist/components/editor/HAccordionColorAdjustment.d.ts +31 -0
  6. package/dist/components/editor/HAccordionColorAdjustment.js +37 -0
  7. package/dist/components/editor/HAccordionDetails.d.ts +8 -0
  8. package/dist/components/editor/HAccordionDetails.js +133 -0
  9. package/dist/components/editor/HAccordionLight.d.ts +16 -0
  10. package/dist/components/editor/HAccordionLight.js +342 -0
  11. package/dist/components/editor/HAccordionPreset.d.ts +23 -0
  12. package/dist/components/editor/HAccordionPreset.js +59 -0
  13. package/dist/components/editor/HAlertBox.d.ts +7 -0
  14. package/dist/components/editor/HAlertBox.js +46 -0
  15. package/dist/components/editor/HAspectRatioMobile.d.ts +0 -0
  16. package/dist/components/editor/HAspectRatioMobile.js +1 -0
  17. package/dist/components/editor/HBulkAccordionColorAdjustment.d.ts +55 -0
  18. package/dist/components/editor/HBulkAccordionColorAdjustment.js +31 -0
  19. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.d.ts +20 -0
  20. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.js +121 -0
  21. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.d.ts +12 -0
  22. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.js +65 -0
  23. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.d.ts +28 -0
  24. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.js +177 -0
  25. package/dist/components/editor/HBulkColorAdjustmentMobile.d.ts +53 -0
  26. package/dist/components/editor/HBulkColorAdjustmentMobile.js +16 -0
  27. package/dist/components/editor/HBulkColorMobile.d.ts +20 -0
  28. package/dist/components/editor/HBulkColorMobile.js +121 -0
  29. package/dist/components/editor/HBulkDetailsMobile.d.ts +12 -0
  30. package/dist/components/editor/HBulkDetailsMobile.js +65 -0
  31. package/dist/components/editor/HBulkLightMobile.d.ts +28 -0
  32. package/dist/components/editor/HBulkLightMobile.js +192 -0
  33. package/dist/components/editor/HBulkPreset.d.ts +24 -0
  34. package/dist/components/editor/HBulkPreset.js +33 -0
  35. package/dist/components/editor/HBulkPresetMobile.d.ts +15 -0
  36. package/dist/components/editor/HBulkPresetMobile.js +26 -0
  37. package/dist/components/editor/HDialogBox.d.ts +18 -0
  38. package/dist/components/editor/HDialogBox.js +51 -0
  39. package/dist/components/editor/HDialogCopy.d.ts +40 -0
  40. package/dist/components/editor/HDialogCopy.js +80 -0
  41. package/dist/components/editor/HFooter.d.ts +12 -0
  42. package/dist/components/editor/HFooter.js +24 -0
  43. package/dist/components/editor/HHeaderEditor.d.ts +17 -0
  44. package/dist/components/editor/HHeaderEditor.js +27 -0
  45. package/dist/components/editor/HImageEditorBulkDekstop.d.ts +15 -0
  46. package/dist/components/editor/HImageEditorBulkDekstop.js +26 -0
  47. package/dist/components/editor/HImageEditorBulkMobile.d.ts +72 -0
  48. package/dist/components/editor/HImageEditorBulkMobile.js +81 -0
  49. package/dist/components/editor/HImageEditorDekstop.d.ts +15 -0
  50. package/dist/components/editor/HImageEditorDekstop.js +29 -0
  51. package/dist/components/editor/HImageEditorMobile.d.ts +47 -0
  52. package/dist/components/editor/HImageEditorMobile.js +91 -0
  53. package/dist/components/editor/HImageEditorMobileLayout.d.ts +14 -0
  54. package/dist/components/editor/HImageEditorMobileLayout.js +57 -0
  55. package/dist/components/editor/HImageEditorPage.d.ts +1 -0
  56. package/dist/components/editor/HImageEditorPage.js +187 -0
  57. package/dist/components/editor/HModalEditorDekstop.d.ts +13 -0
  58. package/dist/components/editor/HModalEditorDekstop.js +22 -0
  59. package/dist/components/editor/HModalMobile.d.ts +12 -0
  60. package/dist/components/editor/HModalMobile.js +7 -0
  61. package/dist/components/editor/HPresetOptionMenu.d.ts +11 -0
  62. package/dist/components/editor/HPresetOptionMenu.js +20 -0
  63. package/dist/components/editor/HSliderColorMobile.d.ts +12 -0
  64. package/dist/components/editor/HSliderColorMobile.js +222 -0
  65. package/dist/components/editor/HSliderDetailsMobile.d.ts +8 -0
  66. package/dist/components/editor/HSliderDetailsMobile.js +130 -0
  67. package/dist/components/editor/HSliderLightMobile.d.ts +16 -0
  68. package/dist/components/editor/HSliderLightMobile.js +342 -0
  69. package/dist/components/editor/HTabAspectRatioMobile.d.ts +0 -0
  70. package/dist/components/editor/HTabAspectRatioMobile.js +1 -0
  71. package/dist/components/editor/HTabColorAdjustmentMobile.d.ts +29 -0
  72. package/dist/components/editor/HTabColorAdjustmentMobile.js +16 -0
  73. package/dist/components/editor/HTabPresetMobile.d.ts +14 -0
  74. package/dist/components/editor/HTabPresetMobile.js +10 -0
  75. package/dist/components/editor/HTextField.d.ts +14 -0
  76. package/dist/components/editor/HTextField.js +51 -0
  77. package/dist/components/editor/HWatermarkView.d.ts +6 -0
  78. package/dist/components/editor/HWatermarkView.js +16 -0
  79. package/dist/hooks/editor/useHonchoEditor.d.ts +272 -0
  80. package/dist/hooks/editor/useHonchoEditor.js +1203 -0
  81. package/dist/index.d.ts +23 -0
  82. package/dist/index.js +23 -0
  83. package/dist/lib/editor/honcho-editor.d.ts +324 -0
  84. package/dist/lib/editor/honcho-editor.js +825 -0
  85. package/dist/themes/colors.d.ts +12 -0
  86. package/dist/themes/colors.js +12 -0
  87. package/dist/themes/honchoTheme.d.ts +25 -0
  88. package/dist/themes/honchoTheme.js +94 -0
  89. package/dist/utils/isMobile.d.ts +1 -0
  90. package/dist/utils/isMobile.js +5 -0
  91. package/package.json +41 -0
@@ -0,0 +1,342 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Stack, Slider, Typography, TextField } from "@mui/material";
3
+ import useHonchoTypography from "@/honchoTheme";
4
+ import useColors from "@/colors";
5
+ export default function HAccordionLight(props) {
6
+ const typography = useHonchoTypography();
7
+ const colors = useColors();
8
+ const formatValue = (value) => {
9
+ if (value > 0)
10
+ return `+${value}`;
11
+ return value.toString();
12
+ };
13
+ const focusedInputStyle = {
14
+ backgroundColor: "#1C1B1FB2",
15
+ borderRadius: '5px 5px 0px 0px',
16
+ borderBottom: 'none',
17
+ pl: '2px',
18
+ };
19
+ const handleInputChange = (event, min, max, onChange) => {
20
+ const value = event.target.value;
21
+ if (value === '+' || value === '-')
22
+ return;
23
+ let numericValue = parseInt(value, 10);
24
+ if (isNaN(numericValue))
25
+ numericValue = 0;
26
+ const clampedValue = Math.max(min, Math.min(max, numericValue));
27
+ onChange(clampedValue);
28
+ };
29
+ return (_jsx(_Fragment, { children: _jsxs(Stack, { children: [_jsxs(Stack, { direction: "column", gap: "4px", sx: { pt: '6px', pb: '2px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "exposure-input", onDoubleClick: () => props.onExposureChange(0), sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Exposure" }), _jsx(TextField, { hiddenLabel: true, id: "exposure-input", value: formatValue(props.ExposureScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, props.onExposureChange), sx: {
30
+ width: "40px",
31
+ height: "10px",
32
+ alignItems: "center",
33
+ textAlign: "right",
34
+ display: "flex",
35
+ '& .MuiFilledInput-root': {
36
+ backgroundColor: 'transparent',
37
+ borderRadius: "0px",
38
+ border: 'none',
39
+ '&:before': {
40
+ borderBottom: 'none',
41
+ },
42
+ '&:after': {
43
+ borderBottom: 'none',
44
+ },
45
+ '&:hover:not(.Mui-disabled):before': {
46
+ borderBottom: 'none',
47
+ },
48
+ '&.Mui-focused:after': {
49
+ borderBottom: 'none',
50
+ },
51
+ },
52
+ '& .MuiFilledInput-input': {
53
+ textAlign: 'right',
54
+ padding: 0,
55
+ pr: '4px',
56
+ color: colors.surface,
57
+ fontSize: "14px",
58
+ },
59
+ '& .Mui-focused': {
60
+ '& .MuiFilledInput-input': {
61
+ backgroundColor: "#1C1B1FB2",
62
+ textAlign: 'right',
63
+ borderRadius: '5px 5px 0px 0px',
64
+ borderBottom: 'none',
65
+ // pr: '8px',
66
+ pl: '2px',
67
+ }
68
+ }
69
+ } })] }), _jsx(Slider, { sx: {
70
+ width: "200px",
71
+ color: colors.onSurfaceVariant,
72
+ '& .MuiSlider-rail': {
73
+ background: colors.onSurfaceVariant,
74
+ opacity: 1,
75
+ },
76
+ '& .MuiSlider-thumb': {
77
+ background: colors.surface,
78
+ opacity: 1,
79
+ boxShadow: 'none',
80
+ }
81
+ }, size: "small", value: props.ExposureScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onExposureChange(newValue), onDoubleClick: () => props.onExposureChange(0) })] }), _jsxs(Stack, { direction: "column", gap: "3px", sx: { pt: '10px', pb: '0px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "contrast-input", onDoubleClick: () => props.onContrastChange(0), sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Contrast" }), _jsx(TextField, { hiddenLabel: true, id: "contrast-input", value: formatValue(props.ContrastScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, props.onContrastChange), sx: {
82
+ width: "40px",
83
+ height: "10px",
84
+ alignItems: "center",
85
+ textAlign: "right",
86
+ display: "flex",
87
+ '& .MuiFilledInput-root': {
88
+ backgroundColor: 'transparent',
89
+ borderRadius: "0px",
90
+ border: 'none',
91
+ '&:before': {
92
+ borderBottom: 'none',
93
+ },
94
+ '&:after': {
95
+ borderBottom: 'none',
96
+ },
97
+ '&:hover:not(.Mui-disabled):before': {
98
+ borderBottom: 'none',
99
+ },
100
+ '&.Mui-focused:after': {
101
+ borderBottom: 'none',
102
+ },
103
+ },
104
+ '& .MuiFilledInput-input': {
105
+ textAlign: 'right',
106
+ padding: 0,
107
+ pr: '4px',
108
+ color: colors.surface,
109
+ fontSize: "14px",
110
+ },
111
+ '& .Mui-focused': {
112
+ '& .MuiFilledInput-input': {
113
+ backgroundColor: "#1C1B1FB2",
114
+ textAlign: 'right',
115
+ borderRadius: '5px 5px 0px 0px',
116
+ borderBottom: 'none',
117
+ // pr: '8px',
118
+ pl: '2px',
119
+ }
120
+ }
121
+ } })] }), _jsx(Slider, { sx: {
122
+ width: "200px",
123
+ color: colors.onSurfaceVariant,
124
+ '& .MuiSlider-rail': {
125
+ background: colors.onSurfaceVariant,
126
+ opacity: 1,
127
+ },
128
+ '& .MuiSlider-thumb': {
129
+ background: colors.surface,
130
+ opacity: 1,
131
+ boxShadow: 'none',
132
+ }
133
+ }, size: "small", value: props.ContrastScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onContrastChange(newValue), onDoubleClick: () => props.onContrastChange(0) })] }), _jsxs(Stack, { direction: "column", gap: "3px", sx: { pt: '10px', pb: '0px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "highlights-input", onDoubleClick: () => props.onHighlightsChange(0), sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Highlights" }), _jsx(TextField, { hiddenLabel: true, id: "highlights-input", value: formatValue(props.HighlightsScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, props.onHighlightsChange), sx: {
134
+ width: "40px",
135
+ height: "10px",
136
+ alignItems: "center",
137
+ textAlign: "right",
138
+ display: "flex",
139
+ '& .MuiFilledInput-root': {
140
+ backgroundColor: 'transparent',
141
+ borderRadius: "0px",
142
+ border: 'none',
143
+ '&:before': {
144
+ borderBottom: 'none',
145
+ },
146
+ '&:after': {
147
+ borderBottom: 'none',
148
+ },
149
+ '&:hover:not(.Mui-disabled):before': {
150
+ borderBottom: 'none',
151
+ },
152
+ '&.Mui-focused:after': {
153
+ borderBottom: 'none',
154
+ },
155
+ },
156
+ '& .MuiFilledInput-input': {
157
+ textAlign: 'right',
158
+ padding: 0,
159
+ pr: '4px',
160
+ color: colors.surface,
161
+ fontSize: "14px",
162
+ },
163
+ '& .Mui-focused': {
164
+ '& .MuiFilledInput-input': {
165
+ backgroundColor: "#1C1B1FB2",
166
+ textAlign: 'right',
167
+ borderRadius: '5px 5px 0px 0px',
168
+ borderBottom: 'none',
169
+ // pr: '8px',
170
+ pl: '2px',
171
+ }
172
+ }
173
+ } })] }), _jsx(Slider, { sx: {
174
+ width: "200px",
175
+ color: colors.onSurfaceVariant,
176
+ '& .MuiSlider-rail': {
177
+ background: colors.onSurfaceVariant,
178
+ opacity: 1,
179
+ },
180
+ '& .MuiSlider-thumb': {
181
+ background: colors.surface,
182
+ opacity: 1,
183
+ boxShadow: 'none',
184
+ }
185
+ }, size: "small", value: props.HighlightsScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onHighlightsChange(newValue), onDoubleClick: () => props.onHighlightsChange(0) })] }), _jsxs(Stack, { direction: "column", gap: "3px", sx: { pt: '10px', pb: '0px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "shadows-input", onDoubleClick: () => props.onShadowsChange(0), sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Shadows" }), _jsx(TextField, { hiddenLabel: true, id: "shadows-input", value: formatValue(props.ShadowsScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, props.onShadowsChange), sx: {
186
+ width: "40px",
187
+ height: "10px",
188
+ alignItems: "center",
189
+ textAlign: "right",
190
+ display: "flex",
191
+ '& .MuiFilledInput-root': {
192
+ backgroundColor: 'transparent',
193
+ borderRadius: "0px",
194
+ border: 'none',
195
+ '&:before': {
196
+ borderBottom: 'none',
197
+ },
198
+ '&:after': {
199
+ borderBottom: 'none',
200
+ },
201
+ '&:hover:not(.Mui-disabled):before': {
202
+ borderBottom: 'none',
203
+ },
204
+ '&.Mui-focused:after': {
205
+ borderBottom: 'none',
206
+ },
207
+ },
208
+ '& .MuiFilledInput-input': {
209
+ textAlign: 'right',
210
+ padding: 0,
211
+ pr: '4px',
212
+ color: colors.surface,
213
+ fontSize: "14px",
214
+ },
215
+ '& .Mui-focused': {
216
+ '& .MuiFilledInput-input': {
217
+ backgroundColor: "#1C1B1FB2",
218
+ textAlign: 'right',
219
+ borderRadius: '5px 5px 0px 0px',
220
+ borderBottom: 'none',
221
+ // pr: '8px',
222
+ pl: '2px',
223
+ }
224
+ }
225
+ } })] }), _jsx(Slider, { sx: {
226
+ width: "200px",
227
+ color: colors.onSurfaceVariant,
228
+ '& .MuiSlider-rail': {
229
+ background: colors.onSurfaceVariant,
230
+ opacity: 1,
231
+ },
232
+ '& .MuiSlider-thumb': {
233
+ background: colors.surface,
234
+ opacity: 1,
235
+ boxShadow: 'none',
236
+ }
237
+ }, size: "small", value: props.ShadowsScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onShadowsChange(newValue), onDoubleClick: () => props.onShadowsChange(0) })] }), _jsxs(Stack, { direction: "column", gap: "3px", sx: { pt: '10px', pb: '0px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "whites-input", onDoubleClick: () => props.onWhitesChange(0), sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Whites" }), _jsx(TextField, { hiddenLabel: true, id: "whites-input", value: formatValue(props.WhitesScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, props.onWhitesChange), sx: {
238
+ width: "40px",
239
+ height: "10px",
240
+ alignItems: "center",
241
+ textAlign: "right",
242
+ display: "flex",
243
+ '& .MuiFilledInput-root': {
244
+ backgroundColor: 'transparent',
245
+ borderRadius: "0px",
246
+ border: 'none',
247
+ '&:before': {
248
+ borderBottom: 'none',
249
+ },
250
+ '&:after': {
251
+ borderBottom: 'none',
252
+ },
253
+ '&:hover:not(.Mui-disabled):before': {
254
+ borderBottom: 'none',
255
+ },
256
+ '&.Mui-focused:after': {
257
+ borderBottom: 'none',
258
+ },
259
+ },
260
+ '& .MuiFilledInput-input': {
261
+ textAlign: 'right',
262
+ padding: 0,
263
+ pr: '4px',
264
+ color: colors.surface,
265
+ fontSize: "14px",
266
+ },
267
+ '& .Mui-focused': {
268
+ '& .MuiFilledInput-input': {
269
+ backgroundColor: "#1C1B1FB2",
270
+ textAlign: 'right',
271
+ borderRadius: '5px 5px 0px 0px',
272
+ borderBottom: 'none',
273
+ // pr: '8px',
274
+ pl: '2px',
275
+ }
276
+ }
277
+ } })] }), _jsx(Slider, { sx: {
278
+ width: "200px",
279
+ color: colors.onSurfaceVariant,
280
+ '& .MuiSlider-rail': {
281
+ background: colors.onSurfaceVariant,
282
+ opacity: 1,
283
+ },
284
+ '& .MuiSlider-thumb': {
285
+ background: colors.surface,
286
+ opacity: 1,
287
+ boxShadow: 'none',
288
+ }
289
+ }, size: "small", value: props.WhitesScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onWhitesChange(newValue), onDoubleClick: () => props.onWhitesChange(0) })] }), _jsxs(Stack, { direction: "column", gap: "3px", sx: { pt: '10px', pb: '0px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "blacks-input", onDoubleClick: () => props.onBlacksChange(0), sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Blacks" }), _jsx(TextField, { hiddenLabel: true, id: "blacks-input", value: formatValue(props.BlacksScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, props.onBlacksChange), sx: {
290
+ width: "40px",
291
+ height: "10px",
292
+ alignItems: "center",
293
+ textAlign: "right",
294
+ display: "flex",
295
+ '& .MuiFilledInput-root': {
296
+ backgroundColor: 'transparent',
297
+ borderRadius: "0px",
298
+ border: 'none',
299
+ '&:before': {
300
+ borderBottom: 'none',
301
+ },
302
+ '&:after': {
303
+ borderBottom: 'none',
304
+ },
305
+ '&:hover:not(.Mui-disabled):before': {
306
+ borderBottom: 'none',
307
+ },
308
+ '&.Mui-focused:after': {
309
+ borderBottom: 'none',
310
+ },
311
+ },
312
+ '& .MuiFilledInput-input': {
313
+ textAlign: 'right',
314
+ padding: 0,
315
+ pr: '4px',
316
+ color: colors.surface,
317
+ fontSize: "14px",
318
+ },
319
+ '& .Mui-focused': {
320
+ '& .MuiFilledInput-input': {
321
+ backgroundColor: "#1C1B1FB2",
322
+ textAlign: 'right',
323
+ borderRadius: '5px 5px 0px 0px',
324
+ borderBottom: 'none',
325
+ // pr: '8px',
326
+ pl: '2px',
327
+ }
328
+ }
329
+ } })] }), _jsx(Slider, { sx: {
330
+ width: "200px",
331
+ color: colors.onSurfaceVariant,
332
+ '& .MuiSlider-rail': {
333
+ background: colors.onSurfaceVariant,
334
+ opacity: 1,
335
+ },
336
+ '& .MuiSlider-thumb': {
337
+ background: colors.surface,
338
+ opacity: 1,
339
+ boxShadow: 'none',
340
+ }
341
+ }, size: "small", value: props.BlacksScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onBlacksChange(newValue), onDoubleClick: () => props.onBlacksChange(0) })] })] }) }));
342
+ }
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ type Preset = {
3
+ id: string;
4
+ name: string;
5
+ };
6
+ interface Props {
7
+ presets: Preset[];
8
+ expandedPanels: string[];
9
+ selectedPreset: string | null;
10
+ presetMenuAnchorEl: null | HTMLElement;
11
+ activePresetMenuId: string | null;
12
+ onChange: (panel: string) => (event: React.SyntheticEvent, isExpanded: boolean) => void;
13
+ onOpenPresetModal: () => void;
14
+ onOpenWatermarkView: () => void;
15
+ onSelectPreset: (id: string) => void;
16
+ onPresetMenuClick: (event: React.MouseEvent<HTMLElement>, presetId: string) => void;
17
+ onPresetMenuClose: () => void;
18
+ onRemovePreset: () => void;
19
+ onRenamePreset: () => void;
20
+ onDeletePreset: () => void;
21
+ }
22
+ export default function HAccordionPreset(props: Props): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Box, Accordion, AccordionDetails, AccordionSummary, Button, Stack, Typography, CardMedia, IconButton } from "@mui/material";
3
+ import useHonchoTypography from "@/honchoTheme";
4
+ import useColors from "@/colors";
5
+ // --- The static presets array has been REMOVED from this component ---
6
+ export default function HAccordionPreset(props) {
7
+ const typography = useHonchoTypography();
8
+ const colors = useColors();
9
+ const isMenuOpen = Boolean(props.presetMenuAnchorEl);
10
+ const accordionStyle = {
11
+ backgroundColor: colors.onBackground,
12
+ color: colors.surface,
13
+ '& .MuiAccordionSummary-root': {
14
+ backgroundColor: colors.onBackground,
15
+ color: colors.surface,
16
+ },
17
+ '& .MuiAccordionDetails-root': {
18
+ backgroundColor: colors.onBackground,
19
+ color: colors.surface,
20
+ },
21
+ '& .MuiTypography-root': {
22
+ color: colors.surface,
23
+ },
24
+ '& .MuiSvgIcon-root': {
25
+ color: colors.surface,
26
+ }
27
+ };
28
+ const isPanelExpanded = (panelName) => props.expandedPanels.includes(panelName);
29
+ return (_jsx(_Fragment, { children: _jsxs(Box, { children: [_jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('preset'), onChange: props.onChange('preset'), disableGutters: true, children: [_jsx(AccordionSummary, { children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium, color: colors.surface }, children: "Preset" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('preset') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { sx: { pr: '10px' }, children: _jsxs(Stack, { direction: "column", gap: "8px", sx: { pt: '0px', pb: '0px', mx: '0px', width: '100%' }, children: [props.presets.map((preset) => (_jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [props.selectedPreset != preset.id && (_jsx(Button, { sx: {
30
+ width: '100px',
31
+ textWrap: 'nowrap',
32
+ overflow: 'hidden',
33
+ textOverflow: 'ellipsis',
34
+ display: 'block',
35
+ textTransform: 'none',
36
+ color: colors.surface,
37
+ pr: "120px",
38
+ pl: "0px",
39
+ ml: "0px",
40
+ justifyContent: 'flex-start',
41
+ ...typography.bodyMedium
42
+ }, onClick: () => props.onSelectPreset(preset.id), children: preset.name })), props.selectedPreset === preset.id && (_jsx(Button, { sx: {
43
+ width: '84px',
44
+ textWrap: 'nowrap',
45
+ overflow: 'hidden',
46
+ textOverflow: 'ellipsis',
47
+ display: 'block',
48
+ color: colors.surface,
49
+ pr: "82px",
50
+ pl: "0px",
51
+ ml: "0px",
52
+ justifyContent: 'flex-start',
53
+ ...typography.bodyMedium
54
+ }, onClick: () => props.onSelectPreset(preset.id), children: preset.name })), _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 1, children: [props.selectedPreset === preset.id && (_jsx(CardMedia, { component: "img", image: "v1/svg/check-ratio-editor.svg", sx: { width: "20px", height: "20px" } })), _jsx(IconButton, { "aria-label": preset.name, onClick: (event) => props.onPresetMenuClick(event, preset.id), sx: { padding: "0px", margin: "0px" }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/dots-editor.svg", alt: "Options", sx: { padding: "0px", margin: "0px" } }) })] })] }, preset.id))), _jsx(Button, { variant: "text", sx: { color: colors.surface, border: "1px solid",
55
+ borderColor: colors.surface,
56
+ borderRadius: "40px",
57
+ textTransform: 'none',
58
+ }, onClick: props.onOpenPresetModal, children: "Create Preset" })] }) })] }), _jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('watermark'), onChange: props.onChange('watermark'), disableGutters: true, children: [_jsx(AccordionSummary, { children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium, color: colors.surface }, children: "Watermark" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('watermark') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { children: _jsxs(Stack, { direction: "column", children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { color: "initial", children: "Jonathan" }), _jsx(IconButton, { "aria-label": "options", children: _jsx(CardMedia, { component: "img", image: "/v1/svg/dots-editor.svg", alt: "Options" }) })] }), _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { color: "initial", children: "Jonathan" }), _jsx(IconButton, { "aria-label": "options", children: _jsx(CardMedia, { component: "img", image: "/v1/svg/dots-editor.svg", alt: "Options" }) })] }), _jsx(Button, { variant: "text", sx: { color: colors.surface, border: "1px solid", borderColor: colors.surface, borderRadius: "40px", textTransform: 'none', }, onClick: props.onOpenWatermarkView, children: "Create Watermark" })] }) })] })] }) }));
59
+ }
@@ -0,0 +1,7 @@
1
+ export declare function HAlertInternetBox(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function HAlertCopyBox(): import("react/jsx-runtime").JSX.Element;
3
+ interface InternetConProps {
4
+ onClose: () => void;
5
+ }
6
+ export declare function HAlertInternetConnectionBox(props: InternetConProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Alert, IconButton } from "@mui/material";
3
+ import CloseIcon from "@mui/icons-material/Close";
4
+ import useColors from "@/colors";
5
+ export function HAlertInternetBox() {
6
+ const colors = useColors();
7
+ return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/check-ratio-editor.svg" }), sx: { position: 'absolute',
8
+ top: '10%',
9
+ left: '50%',
10
+ transform: 'translate(-50%, -50%)',
11
+ width: { xs: '90%', sm: 'auto' },
12
+ minWidth: '270px',
13
+ zIndex: 1300,
14
+ backgroundColor: colors.onBackground,
15
+ color: colors.surface
16
+ }, children: "No Internet Connection" }));
17
+ }
18
+ export function HAlertCopyBox() {
19
+ const colors = useColors();
20
+ return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/check-ratio-editor.svg" }), sx: { position: 'absolute',
21
+ top: '10%',
22
+ left: '50%',
23
+ transform: 'translate(-50%, -50%)',
24
+ width: { xs: '90%', sm: 'auto' },
25
+ minWidth: '270px',
26
+ zIndex: 1300,
27
+ backgroundColor: colors.onBackground,
28
+ color: colors.surface
29
+ }, children: "Copied!" }));
30
+ }
31
+ export function HAlertInternetConnectionBox(props) {
32
+ const colors = useColors();
33
+ return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/check-ratio-editor.svg" }), sx: {
34
+ position: 'absolute',
35
+ top: '10%',
36
+ left: '50%',
37
+ transform: 'translate(-50%, -50%)',
38
+ width: { xs: '90%', sm: 'auto' },
39
+ minWidth: '270px',
40
+ zIndex: 1300,
41
+ backgroundColor: colors.onBackground,
42
+ color: colors.surface
43
+ },
44
+ // Use the 'action' prop for the close button
45
+ action: _jsx(IconButton, { "aria-label": "close", color: "inherit", size: "small", onClick: props.onClose, children: _jsx(CloseIcon, { fontSize: "inherit" }) }), children: "No Internet Connection" }));
46
+ }
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,55 @@
1
+ import React from "react";
2
+ interface Props {
3
+ onTempDecreaseMax: () => void;
4
+ onTempDecrease: () => void;
5
+ onTempIncrease: () => void;
6
+ onTempIncreaseMax: () => void;
7
+ onTintDecreaseMax: () => void;
8
+ onTintDecrease: () => void;
9
+ onTintIncrease: () => void;
10
+ onTintIncreaseMax: () => void;
11
+ onVibranceDecreaseMax: () => void;
12
+ onVibranceDecrease: () => void;
13
+ onVibranceIncrease: () => void;
14
+ onVibranceIncreaseMax: () => void;
15
+ onSaturationDecreaseMax: () => void;
16
+ onSaturationDecrease: () => void;
17
+ onSaturationIncrease: () => void;
18
+ onSaturationIncreaseMax: () => void;
19
+ onExposureDecreaseMax: () => void;
20
+ onExposureDecrease: () => void;
21
+ onExposureIncrease: () => void;
22
+ onExposureIncreaseMax: () => void;
23
+ onContrastDecreaseMax: () => void;
24
+ onContrastDecrease: () => void;
25
+ onContrastIncrease: () => void;
26
+ onContrastIncreaseMax: () => void;
27
+ onHighlightsDecreaseMax: () => void;
28
+ onHighlightsDecrease: () => void;
29
+ onHighlightsIncrease: () => void;
30
+ onHighlightsIncreaseMax: () => void;
31
+ onShadowsDecreaseMax: () => void;
32
+ onShadowsDecrease: () => void;
33
+ onShadowsIncrease: () => void;
34
+ onShadowsIncreaseMax: () => void;
35
+ onWhitesDecreaseMax: () => void;
36
+ onWhitesDecrease: () => void;
37
+ onWhitesIncrease: () => void;
38
+ onWhitesIncreaseMax: () => void;
39
+ onBlacksDecreaseMax: () => void;
40
+ onBlacksDecrease: () => void;
41
+ onBlacksIncrease: () => void;
42
+ onBlacksIncreaseMax: () => void;
43
+ onClarityDecreaseMax: () => void;
44
+ onClarityDecrease: () => void;
45
+ onClarityIncrease: () => void;
46
+ onClarityIncreaseMax: () => void;
47
+ onSharpnessDecreaseMax: () => void;
48
+ onSharpnessDecrease: () => void;
49
+ onSharpnessIncrease: () => void;
50
+ onSharpnessIncreaseMax: () => void;
51
+ expandedPanels: string[];
52
+ onPanelChange: (panel: string) => (event: React.SyntheticEvent, isExpanded: boolean) => void;
53
+ }
54
+ export default function HBulkAccordionColorAdjustment(props: Props): import("react/jsx-runtime").JSX.Element;
55
+ export {};
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Accordion, AccordionDetails, AccordionSummary, CardMedia, Stack, Typography } from "@mui/material";
3
+ import useHonchoTypography from "@/honchoTheme";
4
+ import useColors from "@/colors";
5
+ import HBulkAccordionColorAdjustmentColors from "./HBulkAccordionColorAdjustmentColors";
6
+ import HBulkAccordionColorAdjustmentLight from "./HBulkAccordionColorAdjustmentLight";
7
+ import HBulkAccordionColorAdjustmentDetails from "./HBulkAccordionColorAdjustmentDetails";
8
+ export default function HBulkAccordionColorAdjustment(props) {
9
+ const typography = useHonchoTypography();
10
+ const colors = useColors();
11
+ const accordionStyle = {
12
+ backgroundColor: colors.onBackground,
13
+ color: colors.surface,
14
+ '& .MuiAccordionSummary-root': {
15
+ backgroundColor: colors.onBackground,
16
+ color: colors.surface,
17
+ },
18
+ '& .MuiAccordionDetails-root': {
19
+ backgroundColor: colors.onBackground,
20
+ color: colors.surface,
21
+ },
22
+ '& .MuiTypography-root': {
23
+ color: colors.surface,
24
+ },
25
+ '& .MuiSvgIcon-root': {
26
+ color: colors.surface,
27
+ }
28
+ };
29
+ const isPanelExpanded = (panelName) => props.expandedPanels.includes(panelName);
30
+ return (_jsx(_Fragment, { children: _jsxs(Stack, { direction: "column", sx: { accordionStyle }, children: [_jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('whiteBalance'), onChange: props.onPanelChange('whiteBalance'), disableGutters: true, children: [_jsx(AccordionSummary, { sx: { pr: "10px" }, children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium }, children: "Color" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('whiteBalance') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { sx: { pr: 0 }, children: _jsx(HBulkAccordionColorAdjustmentColors, { onTempDecreaseMax: props.onTempDecreaseMax, onTempDecrease: props.onTempDecrease, onTempIncrease: props.onTempIncrease, onTempIncreaseMax: props.onTempIncreaseMax, onTintDecreaseMax: props.onTintDecreaseMax, onTintDecrease: props.onTintDecrease, onTintIncrease: props.onTintIncrease, onTintIncreaseMax: props.onTintIncreaseMax, onVibranceDecreaseMax: props.onVibranceDecreaseMax, onVibranceDecrease: props.onVibranceDecrease, onVibranceIncrease: props.onVibranceIncrease, onVibranceIncreaseMax: props.onVibranceIncreaseMax, onSaturationDecreaseMax: props.onSaturationDecreaseMax, onSaturationDecrease: props.onSaturationDecrease, onSaturationIncrease: props.onSaturationIncrease, onSaturationIncreaseMax: props.onSaturationIncreaseMax }) })] }), _jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('light'), onChange: props.onPanelChange('light'), disableGutters: true, children: [_jsx(AccordionSummary, { sx: { pr: "10px" }, children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium }, children: "Light" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('light') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { sx: { pr: 0 }, children: _jsx(HBulkAccordionColorAdjustmentLight, { onExposureDecreaseMax: props.onExposureDecreaseMax, onExposureDecrease: props.onExposureDecrease, onExposureIncrease: props.onExposureIncrease, onExposureIncreaseMax: props.onExposureIncreaseMax, onContrastDecreaseMax: props.onContrastDecreaseMax, onContrastDecrease: props.onContrastDecrease, onContrastIncrease: props.onContrastIncrease, onContrastIncreaseMax: props.onContrastIncreaseMax, onHighlightsDecreaseMax: props.onHighlightsDecreaseMax, onHighlightsDecrease: props.onHighlightsDecrease, onHighlightsIncrease: props.onHighlightsIncrease, onHighlightsIncreaseMax: props.onHighlightsIncreaseMax, onShadowsDecreaseMax: props.onShadowsDecreaseMax, onShadowsDecrease: props.onShadowsDecrease, onShadowsIncrease: props.onShadowsIncrease, onShadowsIncreaseMax: props.onShadowsIncreaseMax, onWhitesDecreaseMax: props.onWhitesDecreaseMax, onWhitesDecrease: props.onWhitesDecrease, onWhitesIncrease: props.onWhitesIncrease, onWhitesIncreaseMax: props.onWhitesIncreaseMax, onBlacksDecreaseMax: props.onBlacksDecreaseMax, onBlacksDecrease: props.onBlacksDecrease, onBlacksIncrease: props.onBlacksIncrease, onBlacksIncreaseMax: props.onBlacksIncreaseMax }) })] }), _jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('details'), onChange: props.onPanelChange('details'), disableGutters: true, children: [_jsx(AccordionSummary, { sx: { pr: "10px" }, children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium }, children: "Details" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('details') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { sx: { pr: 0 }, children: _jsx(HBulkAccordionColorAdjustmentDetails, { onClarityDecreaseMax: props.onClarityDecreaseMax, onClarityDecrease: props.onClarityDecrease, onClarityIncrease: props.onClarityIncrease, onClarityIncreaseMax: props.onClarityIncreaseMax, onSharpnessDecreaseMax: props.onSharpnessDecreaseMax, onSharpnessDecrease: props.onSharpnessDecrease, onSharpnessIncrease: props.onSharpnessIncrease, onSharpnessIncreaseMax: props.onSharpnessIncreaseMax }) })] })] }) }));
31
+ }
@@ -0,0 +1,20 @@
1
+ interface Props {
2
+ onTempDecreaseMax: () => void;
3
+ onTempDecrease: () => void;
4
+ onTempIncrease: () => void;
5
+ onTempIncreaseMax: () => void;
6
+ onTintDecreaseMax: () => void;
7
+ onTintDecrease: () => void;
8
+ onTintIncrease: () => void;
9
+ onTintIncreaseMax: () => void;
10
+ onVibranceDecreaseMax: () => void;
11
+ onVibranceDecrease: () => void;
12
+ onVibranceIncrease: () => void;
13
+ onVibranceIncreaseMax: () => void;
14
+ onSaturationDecreaseMax: () => void;
15
+ onSaturationDecrease: () => void;
16
+ onSaturationIncrease: () => void;
17
+ onSaturationIncreaseMax: () => void;
18
+ }
19
+ export default function HBulkAccordionColorAdjustmentColors(props: Props): import("react/jsx-runtime").JSX.Element;
20
+ export {};