@yogiswara/honcho-editor-ui 3.1.13 → 3.1.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
|
-
import { Stack, Slider, Typography } from "@mui/material";
|
|
3
|
+
import { Stack, Slider, Typography, Box } from "@mui/material";
|
|
4
4
|
import useHonchoTypography from "../../themes/honchoTheme";
|
|
5
5
|
import useColors from '../../themes/colors';
|
|
6
6
|
import useSliderEvents from "../editor/sliderComponents/useSliderEvents";
|
|
@@ -114,30 +114,34 @@ export default function HSliderColorMobile(props) {
|
|
|
114
114
|
color: colors.surface,
|
|
115
115
|
width: "40px", // Keep the fixed width for alignment
|
|
116
116
|
textAlign: "right", // Keep the text alignment
|
|
117
|
-
}, children: formatValue(props.tempScore) })] }),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
117
|
+
}, children: formatValue(props.tempScore) })] }), _jsxs(Box, { sx: { position: 'relative', width: '100%' }, children: [_jsx("div", { style: {
|
|
118
|
+
position: 'absolute',
|
|
119
|
+
top: 0,
|
|
120
|
+
bottom: 0,
|
|
121
|
+
// Offset by 16px to align with the slider's track inside the component
|
|
122
|
+
left: '16px',
|
|
123
|
+
right: '16px',
|
|
124
|
+
zIndex: 1,
|
|
125
|
+
}, onDoubleClick: tempInput.handleDoubleClick }), _jsx(Slider, { sx: {
|
|
126
|
+
width: "100%",
|
|
127
|
+
color: colors.surface,
|
|
128
|
+
'& .MuiSlider-rail': {
|
|
129
|
+
background: tempGradient,
|
|
130
|
+
opacity: 1,
|
|
131
|
+
pointerEvents: 'none', // Track is not interactive
|
|
132
|
+
},
|
|
133
|
+
'& .MuiSlider-track': {
|
|
134
|
+
background: 'transparent',
|
|
135
|
+
border: 'none',
|
|
136
|
+
pointerEvents: 'none', // Track is not interactive
|
|
137
|
+
},
|
|
138
|
+
'& .MuiSlider-thumb': {
|
|
139
|
+
boxShadow: 'none',
|
|
140
|
+
pointerEvents: 'auto', // Thumb IS interactive
|
|
141
|
+
touchAction: 'none',
|
|
142
|
+
zIndex: 2, // Thumb is on top of the overlay
|
|
143
|
+
}
|
|
144
|
+
}, slotProps: { thumb: { ref: tempSliderRef } }, size: "small", value: props.tempScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setTempScore("tempScore", newValue) })] }), _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { pt: '10px', pb: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle }, children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.surface, userSelect: 'none' }, onDoubleClick: tintInput.handleDoubleClick, children: "Tint" }), _jsx(Typography, { sx: {
|
|
141
145
|
...typography.bodyMedium, // Use your standard typography
|
|
142
146
|
color: colors.surface,
|
|
143
147
|
width: "40px", // Keep the fixed width for alignment
|