@yogiswara/honcho-editor-ui 2.7.14 → 2.7.16

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 (139) hide show
  1. package/dist/color.d.ts +9 -0
  2. package/dist/color.js +9 -0
  3. package/dist/components/editor/GalleryAlbum/AlbumImageGallery.d.ts +8 -0
  4. package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +28 -0
  5. package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +10 -0
  6. package/dist/components/editor/GalleryAlbum/ImageItem.js +81 -0
  7. package/dist/components/editor/HAccordionAspectRatio.d.ts +14 -0
  8. package/dist/components/editor/HAccordionAspectRatio.js +102 -0
  9. package/dist/components/editor/HAccordionColor.d.ts +16 -0
  10. package/dist/components/editor/HAccordionColor.js +282 -0
  11. package/dist/components/editor/HAccordionColorAdjustment.d.ts +35 -0
  12. package/dist/components/editor/HAccordionColorAdjustment.js +31 -0
  13. package/dist/components/editor/HAccordionDetails.d.ts +12 -0
  14. package/dist/components/editor/HAccordionDetails.js +157 -0
  15. package/dist/components/editor/HAccordionLight.d.ts +20 -0
  16. package/dist/components/editor/HAccordionLight.js +414 -0
  17. package/dist/components/editor/HAccordionPreset.d.ts +23 -0
  18. package/dist/components/editor/HAccordionPreset.js +52 -0
  19. package/dist/components/editor/HAlertBox.d.ts +8 -0
  20. package/dist/components/editor/HAlertBox.js +55 -0
  21. package/dist/components/editor/HAspectRatioMobile.d.ts +0 -0
  22. package/dist/components/editor/HAspectRatioMobile.js +1 -0
  23. package/dist/components/editor/HBulkAccordionColorAdjustment.d.ts +55 -0
  24. package/dist/components/editor/HBulkAccordionColorAdjustment.js +31 -0
  25. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.d.ts +20 -0
  26. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.js +121 -0
  27. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.d.ts +12 -0
  28. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.js +65 -0
  29. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.d.ts +28 -0
  30. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.js +177 -0
  31. package/dist/components/editor/HBulkColorAdjustmentMobile.d.ts +53 -0
  32. package/dist/components/editor/HBulkColorAdjustmentMobile.js +16 -0
  33. package/dist/components/editor/HBulkColorMobile.d.ts +20 -0
  34. package/dist/components/editor/HBulkColorMobile.js +121 -0
  35. package/dist/components/editor/HBulkDetailsMobile.d.ts +12 -0
  36. package/dist/components/editor/HBulkDetailsMobile.js +65 -0
  37. package/dist/components/editor/HBulkLightMobile.d.ts +28 -0
  38. package/dist/components/editor/HBulkLightMobile.js +192 -0
  39. package/dist/components/editor/HBulkPreset.d.ts +24 -0
  40. package/dist/components/editor/HBulkPreset.js +43 -0
  41. package/dist/components/editor/HBulkPresetMobile.d.ts +15 -0
  42. package/dist/components/editor/HBulkPresetMobile.js +26 -0
  43. package/dist/components/editor/HDialogBox.d.ts +18 -0
  44. package/dist/components/editor/HDialogBox.js +51 -0
  45. package/dist/components/editor/HDialogCopy.d.ts +40 -0
  46. package/dist/components/editor/HDialogCopy.js +80 -0
  47. package/dist/components/editor/HFooter.d.ts +12 -0
  48. package/dist/components/editor/HFooter.js +24 -0
  49. package/dist/components/editor/HHeaderEditor.d.ts +19 -0
  50. package/dist/components/editor/HHeaderEditor.js +36 -0
  51. package/dist/components/editor/HImageEditorBulkDekstop.d.ts +15 -0
  52. package/dist/components/editor/HImageEditorBulkDekstop.js +29 -0
  53. package/dist/components/editor/HImageEditorBulkMobile.d.ts +72 -0
  54. package/dist/components/editor/HImageEditorBulkMobile.js +81 -0
  55. package/dist/components/editor/HImageEditorDekstop.d.ts +15 -0
  56. package/dist/components/editor/HImageEditorDekstop.js +29 -0
  57. package/dist/components/editor/HImageEditorMobile.d.ts +51 -0
  58. package/dist/components/editor/HImageEditorMobile.js +92 -0
  59. package/dist/components/editor/HImageEditorMobileLayout.d.ts +14 -0
  60. package/dist/components/editor/HImageEditorMobileLayout.js +58 -0
  61. package/dist/components/editor/HModalEditorDekstop.d.ts +13 -0
  62. package/dist/components/editor/HModalEditorDekstop.js +22 -0
  63. package/dist/components/editor/HModalMobile.d.ts +13 -0
  64. package/dist/components/editor/HModalMobile.js +7 -0
  65. package/dist/components/editor/HPresetDelete.d.ts +7 -0
  66. package/dist/components/editor/HPresetDelete.js +7 -0
  67. package/dist/components/editor/HPresetOptionMenu.d.ts +9 -0
  68. package/dist/components/editor/HPresetOptionMenu.js +20 -0
  69. package/dist/components/editor/HSliderColorMobile.d.ts +16 -0
  70. package/dist/components/editor/HSliderColorMobile.js +270 -0
  71. package/dist/components/editor/HSliderDetailsMobile.d.ts +12 -0
  72. package/dist/components/editor/HSliderDetailsMobile.js +154 -0
  73. package/dist/components/editor/HSliderLightMobile.d.ts +20 -0
  74. package/dist/components/editor/HSliderLightMobile.js +420 -0
  75. package/dist/components/editor/HTabAspectRatioMobile.d.ts +0 -0
  76. package/dist/components/editor/HTabAspectRatioMobile.js +1 -0
  77. package/dist/components/editor/HTabColorAdjustmentMobile.d.ts +33 -0
  78. package/dist/components/editor/HTabColorAdjustmentMobile.js +16 -0
  79. package/dist/components/editor/HTabPresetMobile.d.ts +14 -0
  80. package/dist/components/editor/HTabPresetMobile.js +10 -0
  81. package/dist/components/editor/HTextField.d.ts +14 -0
  82. package/dist/components/editor/HTextField.js +51 -0
  83. package/dist/components/editor/HWatermarkView.d.ts +6 -0
  84. package/dist/components/editor/HWatermarkView.js +16 -0
  85. package/dist/components/editor/svg/Tick.d.ts +2 -0
  86. package/dist/components/editor/svg/Tick.js +6 -0
  87. package/dist/components/modal/HModalDialog.d.ts +12 -0
  88. package/dist/components/modal/HModalDialog.js +18 -0
  89. package/dist/components/modal/HModalRename.d.ts +14 -0
  90. package/dist/components/modal/HModalRename.js +35 -0
  91. package/dist/hooks/demo/HonchoEditorBulkDemo.d.ts +3 -0
  92. package/dist/hooks/demo/HonchoEditorBulkDemo.js +410 -0
  93. package/dist/hooks/demo/HonchoEditorSingleCleanDemo.d.ts +3 -0
  94. package/dist/hooks/demo/HonchoEditorSingleCleanDemo.js +354 -0
  95. package/dist/hooks/demo/index.d.ts +2 -0
  96. package/dist/hooks/demo/index.js +2 -0
  97. package/dist/hooks/editor/type.d.ts +174 -0
  98. package/dist/hooks/editor/type.js +1 -0
  99. package/dist/hooks/editor/useHonchoEditorBulk.d.ts +96 -0
  100. package/dist/hooks/editor/useHonchoEditorBulk.js +427 -0
  101. package/dist/hooks/editor/useHonchoEditorSingle.d.ts +44 -0
  102. package/dist/hooks/editor/useHonchoEditorSingle.js +163 -0
  103. package/dist/hooks/useAdjustmentHistory.d.ts +95 -0
  104. package/dist/hooks/useAdjustmentHistory.js +578 -0
  105. package/dist/hooks/useAdjustmentHistoryBatch.d.ts +177 -0
  106. package/dist/hooks/useAdjustmentHistoryBatch.js +1189 -0
  107. package/dist/hooks/useGallerySwipe.d.ts +36 -0
  108. package/dist/hooks/useGallerySwipe.js +344 -0
  109. package/dist/hooks/usePaging.d.ts +89 -0
  110. package/dist/hooks/usePaging.js +211 -0
  111. package/dist/hooks/usePreset.d.ts +82 -0
  112. package/dist/hooks/usePreset.js +344 -0
  113. package/dist/index.d.ts +41 -0
  114. package/dist/index.js +44 -0
  115. package/dist/lib/context/EditorContext.d.ts +28 -0
  116. package/dist/lib/context/EditorContext.js +60 -0
  117. package/dist/lib/context/EditorProcessingService.d.ts +36 -0
  118. package/dist/lib/context/EditorProcessingService.js +249 -0
  119. package/dist/lib/editor/honcho-editor.d.ts +324 -0
  120. package/dist/lib/editor/honcho-editor.js +825 -0
  121. package/dist/lib/hooks/useEditor.d.ts +22 -0
  122. package/dist/lib/hooks/useEditor.js +35 -0
  123. package/dist/lib/hooks/useEditorHeadless.d.ts +34 -0
  124. package/dist/lib/hooks/useEditorHeadless.js +207 -0
  125. package/dist/lib/hooks/useImageProcessor.d.ts +18 -0
  126. package/dist/lib/hooks/useImageProcessor.js +113 -0
  127. package/dist/setupTests.d.ts +1 -0
  128. package/dist/setupTests.js +1 -0
  129. package/dist/themes/colors.d.ts +12 -0
  130. package/dist/themes/colors.js +12 -0
  131. package/dist/themes/honchoTheme.d.ts +25 -0
  132. package/dist/themes/honchoTheme.js +94 -0
  133. package/dist/utils/adjustment.d.ts +6 -0
  134. package/dist/utils/adjustment.js +48 -0
  135. package/dist/utils/imageLoader.d.ts +11 -0
  136. package/dist/utils/imageLoader.js +48 -0
  137. package/dist/utils/isMobile.d.ts +1 -0
  138. package/dist/utils/isMobile.js +5 -0
  139. package/package.json +1 -1
@@ -0,0 +1,414 @@
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 "../../themes/honchoTheme";
4
+ import useColors from '../../themes/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", 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, (val) => props.onExposureChange("exposureScore", val)), 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("exposureScore", newValue), onDoubleClick: () => props.onExposureChange("exposureScore", 0), onMouseDown: () => {
82
+ if (!props.isBatchMode) {
83
+ props.onDragStart();
84
+ }
85
+ }, onMouseUp: () => {
86
+ props.onDragEnd();
87
+ }, onTouchStart: () => {
88
+ if (!props.isBatchMode) {
89
+ props.onDragStart();
90
+ }
91
+ }, onTouchEnd: () => {
92
+ props.onDragEnd();
93
+ } })] }), _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", 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, (val) => props.onContrastChange("contrastScore", val)), sx: {
94
+ width: "40px",
95
+ height: "10px",
96
+ alignItems: "center",
97
+ textAlign: "right",
98
+ display: "flex",
99
+ '& .MuiFilledInput-root': {
100
+ backgroundColor: 'transparent',
101
+ borderRadius: "0px",
102
+ border: 'none',
103
+ '&:before': {
104
+ borderBottom: 'none',
105
+ },
106
+ '&:after': {
107
+ borderBottom: 'none',
108
+ },
109
+ '&:hover:not(.Mui-disabled):before': {
110
+ borderBottom: 'none',
111
+ },
112
+ '&.Mui-focused:after': {
113
+ borderBottom: 'none',
114
+ },
115
+ },
116
+ '& .MuiFilledInput-input': {
117
+ textAlign: 'right',
118
+ padding: 0,
119
+ pr: '4px',
120
+ color: colors.surface,
121
+ fontSize: "14px",
122
+ },
123
+ '& .Mui-focused': {
124
+ '& .MuiFilledInput-input': {
125
+ backgroundColor: "#1C1B1FB2",
126
+ textAlign: 'right',
127
+ borderRadius: '5px 5px 0px 0px',
128
+ borderBottom: 'none',
129
+ // pr: '8px',
130
+ pl: '2px',
131
+ }
132
+ }
133
+ } })] }), _jsx(Slider, { sx: {
134
+ width: "200px",
135
+ color: colors.onSurfaceVariant,
136
+ '& .MuiSlider-rail': {
137
+ background: colors.onSurfaceVariant,
138
+ opacity: 1,
139
+ },
140
+ '& .MuiSlider-thumb': {
141
+ background: colors.surface,
142
+ opacity: 1,
143
+ boxShadow: 'none',
144
+ }
145
+ }, size: "small", value: props.ContrastScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onContrastChange("contrastScore", newValue), onDoubleClick: () => props.onContrastChange("contrastScore", 0), onMouseDown: () => {
146
+ if (!props.isBatchMode) {
147
+ props.onDragStart();
148
+ }
149
+ }, onMouseUp: () => {
150
+ props.onDragEnd();
151
+ }, onTouchStart: () => {
152
+ if (!props.isBatchMode) {
153
+ props.onDragStart();
154
+ }
155
+ }, onTouchEnd: () => {
156
+ props.onDragEnd();
157
+ } })] }), _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", 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, (val) => props.onHighlightsChange("highlightsScore", val)), sx: {
158
+ width: "40px",
159
+ height: "10px",
160
+ alignItems: "center",
161
+ textAlign: "right",
162
+ display: "flex",
163
+ '& .MuiFilledInput-root': {
164
+ backgroundColor: 'transparent',
165
+ borderRadius: "0px",
166
+ border: 'none',
167
+ '&:before': {
168
+ borderBottom: 'none',
169
+ },
170
+ '&:after': {
171
+ borderBottom: 'none',
172
+ },
173
+ '&:hover:not(.Mui-disabled):before': {
174
+ borderBottom: 'none',
175
+ },
176
+ '&.Mui-focused:after': {
177
+ borderBottom: 'none',
178
+ },
179
+ },
180
+ '& .MuiFilledInput-input': {
181
+ textAlign: 'right',
182
+ padding: 0,
183
+ pr: '4px',
184
+ color: colors.surface,
185
+ fontSize: "14px",
186
+ },
187
+ '& .Mui-focused': {
188
+ '& .MuiFilledInput-input': {
189
+ backgroundColor: "#1C1B1FB2",
190
+ textAlign: 'right',
191
+ borderRadius: '5px 5px 0px 0px',
192
+ borderBottom: 'none',
193
+ // pr: '8px',
194
+ pl: '2px',
195
+ }
196
+ }
197
+ } })] }), _jsx(Slider, { sx: {
198
+ width: "200px",
199
+ color: colors.onSurfaceVariant,
200
+ '& .MuiSlider-rail': {
201
+ background: colors.onSurfaceVariant,
202
+ opacity: 1,
203
+ },
204
+ '& .MuiSlider-thumb': {
205
+ background: colors.surface,
206
+ opacity: 1,
207
+ boxShadow: 'none',
208
+ }
209
+ }, size: "small", value: props.HighlightsScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onHighlightsChange("highlightsScore", newValue), onDoubleClick: () => props.onHighlightsChange("highlightsScore", 0), onMouseDown: () => {
210
+ if (!props.isBatchMode) {
211
+ props.onDragStart();
212
+ }
213
+ }, onMouseUp: () => {
214
+ props.onDragEnd();
215
+ }, onTouchStart: () => {
216
+ if (!props.isBatchMode) {
217
+ props.onDragStart();
218
+ }
219
+ }, onTouchEnd: () => {
220
+ props.onDragEnd();
221
+ } })] }), _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", 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, (val) => props.onShadowsChange("shadowsScore", val)), sx: {
222
+ width: "40px",
223
+ height: "10px",
224
+ alignItems: "center",
225
+ textAlign: "right",
226
+ display: "flex",
227
+ '& .MuiFilledInput-root': {
228
+ backgroundColor: 'transparent',
229
+ borderRadius: "0px",
230
+ border: 'none',
231
+ '&:before': {
232
+ borderBottom: 'none',
233
+ },
234
+ '&:after': {
235
+ borderBottom: 'none',
236
+ },
237
+ '&:hover:not(.Mui-disabled):before': {
238
+ borderBottom: 'none',
239
+ },
240
+ '&.Mui-focused:after': {
241
+ borderBottom: 'none',
242
+ },
243
+ },
244
+ '& .MuiFilledInput-input': {
245
+ textAlign: 'right',
246
+ padding: 0,
247
+ pr: '4px',
248
+ color: colors.surface,
249
+ fontSize: "14px",
250
+ },
251
+ '& .Mui-focused': {
252
+ '& .MuiFilledInput-input': {
253
+ backgroundColor: "#1C1B1FB2",
254
+ textAlign: 'right',
255
+ borderRadius: '5px 5px 0px 0px',
256
+ borderBottom: 'none',
257
+ // pr: '8px',
258
+ pl: '2px',
259
+ }
260
+ }
261
+ } })] }), _jsx(Slider, { sx: {
262
+ width: "200px",
263
+ color: colors.onSurfaceVariant,
264
+ '& .MuiSlider-rail': {
265
+ background: colors.onSurfaceVariant,
266
+ opacity: 1,
267
+ },
268
+ '& .MuiSlider-thumb': {
269
+ background: colors.surface,
270
+ opacity: 1,
271
+ boxShadow: 'none',
272
+ }
273
+ }, size: "small", value: props.ShadowsScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onShadowsChange("shadowsScore", newValue), onDoubleClick: () => props.onShadowsChange("shadowsScore", 0), onMouseDown: () => {
274
+ if (!props.isBatchMode) {
275
+ props.onDragStart();
276
+ }
277
+ }, onMouseUp: () => {
278
+ props.onDragEnd();
279
+ }, onTouchStart: () => {
280
+ if (!props.isBatchMode) {
281
+ props.onDragStart();
282
+ }
283
+ }, onTouchEnd: () => {
284
+ props.onDragEnd();
285
+ } })] }), _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", 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, (val) => props.onWhitesChange("whitesScore", val)), sx: {
286
+ width: "40px",
287
+ height: "10px",
288
+ alignItems: "center",
289
+ textAlign: "right",
290
+ display: "flex",
291
+ '& .MuiFilledInput-root': {
292
+ backgroundColor: 'transparent',
293
+ borderRadius: "0px",
294
+ border: 'none',
295
+ '&:before': {
296
+ borderBottom: 'none',
297
+ },
298
+ '&:after': {
299
+ borderBottom: 'none',
300
+ },
301
+ '&:hover:not(.Mui-disabled):before': {
302
+ borderBottom: 'none',
303
+ },
304
+ '&.Mui-focused:after': {
305
+ borderBottom: 'none',
306
+ },
307
+ },
308
+ '& .MuiFilledInput-input': {
309
+ textAlign: 'right',
310
+ padding: 0,
311
+ pr: '4px',
312
+ color: colors.surface,
313
+ fontSize: "14px",
314
+ },
315
+ '& .Mui-focused': {
316
+ '& .MuiFilledInput-input': {
317
+ backgroundColor: "#1C1B1FB2",
318
+ textAlign: 'right',
319
+ borderRadius: '5px 5px 0px 0px',
320
+ borderBottom: 'none',
321
+ // pr: '8px',
322
+ pl: '2px',
323
+ }
324
+ }
325
+ } })] }), _jsx(Slider, { sx: {
326
+ width: "200px",
327
+ color: colors.onSurfaceVariant,
328
+ '& .MuiSlider-rail': {
329
+ background: colors.onSurfaceVariant,
330
+ opacity: 1,
331
+ },
332
+ '& .MuiSlider-thumb': {
333
+ background: colors.surface,
334
+ opacity: 1,
335
+ boxShadow: 'none',
336
+ }
337
+ }, size: "small", value: props.WhitesScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onWhitesChange("whitesScore", newValue), onDoubleClick: () => props.onWhitesChange("whitesScore", 0), onMouseDown: () => {
338
+ if (!props.isBatchMode) {
339
+ props.onDragStart();
340
+ }
341
+ }, onMouseUp: () => {
342
+ props.onDragEnd();
343
+ }, onTouchStart: () => {
344
+ if (!props.isBatchMode) {
345
+ props.onDragStart();
346
+ }
347
+ }, onTouchEnd: () => {
348
+ props.onDragEnd();
349
+ } })] }), _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", 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, (val) => props.onBlacksChange("blacksScore", val)), sx: {
350
+ width: "40px",
351
+ height: "10px",
352
+ alignItems: "center",
353
+ textAlign: "right",
354
+ display: "flex",
355
+ '& .MuiFilledInput-root': {
356
+ backgroundColor: 'transparent',
357
+ borderRadius: "0px",
358
+ border: 'none',
359
+ '&:before': {
360
+ borderBottom: 'none',
361
+ },
362
+ '&:after': {
363
+ borderBottom: 'none',
364
+ },
365
+ '&:hover:not(.Mui-disabled):before': {
366
+ borderBottom: 'none',
367
+ },
368
+ '&.Mui-focused:after': {
369
+ borderBottom: 'none',
370
+ },
371
+ },
372
+ '& .MuiFilledInput-input': {
373
+ textAlign: 'right',
374
+ padding: 0,
375
+ pr: '4px',
376
+ color: colors.surface,
377
+ fontSize: "14px",
378
+ },
379
+ '& .Mui-focused': {
380
+ '& .MuiFilledInput-input': {
381
+ backgroundColor: "#1C1B1FB2",
382
+ textAlign: 'right',
383
+ borderRadius: '5px 5px 0px 0px',
384
+ borderBottom: 'none',
385
+ // pr: '8px',
386
+ pl: '2px',
387
+ }
388
+ }
389
+ } })] }), _jsx(Slider, { sx: {
390
+ width: "200px",
391
+ color: colors.onSurfaceVariant,
392
+ '& .MuiSlider-rail': {
393
+ background: colors.onSurfaceVariant,
394
+ opacity: 1,
395
+ },
396
+ '& .MuiSlider-thumb': {
397
+ background: colors.surface,
398
+ opacity: 1,
399
+ boxShadow: 'none',
400
+ }
401
+ }, size: "small", value: props.BlacksScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onBlacksChange("blacksScore", newValue), onDoubleClick: () => props.onBlacksChange("blacksScore", 0), onMouseDown: () => {
402
+ if (!props.isBatchMode) {
403
+ props.onDragStart();
404
+ }
405
+ }, onMouseUp: () => {
406
+ props.onDragEnd();
407
+ }, onTouchStart: () => {
408
+ if (!props.isBatchMode) {
409
+ props.onDragStart();
410
+ }
411
+ }, onTouchEnd: () => {
412
+ props.onDragEnd();
413
+ } })] })] }) }));
414
+ }
@@ -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,52 @@
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 "../../themes/honchoTheme";
4
+ import useColors from '../../themes/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: _jsx(Box, { children: _jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('preset'), onChange: props.onChange('preset'), disableGutters: true, children: [_jsx(AccordionSummary, { sx: { pr: 0 }, 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: "4px" }, 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", alignItems: "center", sx: { width: "100%" }, children: [_jsx(Box, { sx: { width: 100, flexShrink: 0 }, children: _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", // No longer needed since the button is full width
38
+ pl: "0px",
39
+ ml: "0px",
40
+ justifyContent: 'flex-start',
41
+ ...typography.bodyMedium
42
+ }, onClick: () => props.onSelectPreset(preset.id), children: _jsx(Box, { component: "span", sx: {
43
+ overflow: "hidden",
44
+ textOverflow: "ellipsis",
45
+ whiteSpace: "nowrap",
46
+ minWidth: 0,
47
+ }, children: preset.name }) }) }), _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 1, sx: { ml: "auto" }, 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: { p: 0, m: 0 }, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/dots-editor.svg", alt: "Options" }) })] })] }, preset.id))), _jsx(Button, { variant: "text", sx: { color: colors.surface, border: "1px solid",
48
+ borderColor: colors.surface,
49
+ borderRadius: "40px",
50
+ textTransform: 'none',
51
+ }, onClick: props.onOpenPresetModal, children: "Create Preset" })] }) })] }) }) }));
52
+ }
@@ -0,0 +1,8 @@
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 declare function HAlertPresetSave(): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,55 @@
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 '../../themes/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
+ zIndex: 1300,
13
+ backgroundColor: colors.onBackground,
14
+ color: colors.surface
15
+ }, children: "No Internet Connection" }));
16
+ }
17
+ export function HAlertCopyBox() {
18
+ const colors = useColors();
19
+ return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/check-ratio-editor.svg" }), sx: { position: 'absolute',
20
+ top: '10%',
21
+ left: '50%',
22
+ transform: 'translate(-50%, -50%)',
23
+ width: { xs: '90%', sm: 'auto' },
24
+ zIndex: 1300,
25
+ backgroundColor: colors.onBackground,
26
+ color: colors.surface
27
+ }, children: "Copied!" }));
28
+ }
29
+ export function HAlertInternetConnectionBox(props) {
30
+ const colors = useColors();
31
+ return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/check-ratio-editor.svg" }), sx: {
32
+ position: 'absolute',
33
+ top: '10%',
34
+ left: '50%',
35
+ transform: 'translate(-50%, -50%)',
36
+ width: { xs: '90%', sm: 'auto' },
37
+ zIndex: 1300,
38
+ backgroundColor: colors.onBackground,
39
+ color: colors.surface
40
+ },
41
+ // Use the 'action' prop for the close button
42
+ action: _jsx(IconButton, { "aria-label": "close", color: "inherit", size: "small", onClick: props.onClose, children: _jsx(CloseIcon, { fontSize: "inherit" }) }), children: "Connection Problem" }));
43
+ }
44
+ export function HAlertPresetSave() {
45
+ const colors = useColors();
46
+ return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/check-ratio-editor.svg" }), sx: { position: 'absolute',
47
+ top: '10%',
48
+ left: '50%',
49
+ transform: 'translate(-50%, -50%)',
50
+ width: { xs: '90%', sm: 'auto' },
51
+ zIndex: 1300,
52
+ backgroundColor: colors.onBackground,
53
+ color: colors.surface
54
+ }, children: "Saved" }));
55
+ }
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 {};