Skip to content

Commit 6ddce33

Browse files
committed
cambios esteticos input stepper
1 parent 1b8fcb9 commit 6ddce33

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

src/common/components/mock-components/front-rich-components/input-stepper.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { useGroupShapeProps } from '../mock-components.utils';
55
import { fitSizeToShapeSizeRestrictions } from '@/common/utils/shapes/shape-restrictions';
66
import { ShapeType } from '@/core/model';
77
import { ShapeProps } from '../shape.model';
8+
import { useShapeProps } from '../../shapes/use-shape-props.hook';
9+
import { INPUT_SHAPE } from '../front-components/shape.const';
810

911
// Size restrictions (igual patrón que file-tree)
1012
export const inputStepperShapeRestrictions: ShapeSizeRestrictions = {
@@ -40,7 +42,10 @@ export const InputWithStepper = forwardRef<any, ShapeProps>((props, ref) => {
4042
shapeType,
4143
ref
4244
);
43-
45+
const { stroke, textColor, strokeStyle } = useShapeProps(
46+
otherProps,
47+
INPUT_SHAPE
48+
);
4449
return (
4550
<Group {...commonGroupProps} {...shapeProps}>
4651
{/* Caja del input */}
@@ -49,8 +54,9 @@ export const InputWithStepper = forwardRef<any, ShapeProps>((props, ref) => {
4954
y={0}
5055
width={inputWidth / 2} // Reducir ancho a la mitad
5156
height={height}
57+
strokeStyle={strokeStyle}
5258
fill="white"
53-
stroke="black"
59+
stroke={stroke}
5460
strokeWidth={2}
5561
cornerRadius={0} // Sin bordes redondeados
5662
/>
@@ -62,6 +68,7 @@ export const InputWithStepper = forwardRef<any, ShapeProps>((props, ref) => {
6268
text={'0'}
6369
fontFamily="Arial"
6470
fontSize={16}
71+
textColor={textColor}
6572
fill="black"
6673
align="right"
6774
/>
@@ -95,7 +102,7 @@ export const InputWithStepper = forwardRef<any, ShapeProps>((props, ref) => {
95102
width={30}
96103
height={buttonHeight}
97104
fill="lightgray"
98-
stroke="black"
105+
stroke={stroke}
99106
strokeWidth={2}
100107
/>
101108
<Text

src/pods/canvas/model/inline-editable.model.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const inlineEditableShapes = new Set<ShapeType>([
4040
'gauge',
4141
'loading-indicator',
4242
'fileTree',
43+
'input-stepper',
4344
]);
4445

4546
// Check if a shape type allows inline editing
@@ -62,6 +63,7 @@ const shapeTypesWithDefaultText = new Set<ShapeType>([
6263
'listbox',
6364
'horizontal-menu',
6465
'vertical-menu',
66+
'input-stepper',
6567
'heading1',
6668
'heading2',
6769
'heading3',
@@ -125,6 +127,7 @@ const defaultTextValueMap: Partial<Record<ShapeType, string>> = {
125127
browser: 'https://example.com',
126128
modalDialog: 'Title here...',
127129
'loading-indicator': 'Loading...',
130+
'input-stepper': '0',
128131
};
129132

130133
export const generateDefaultTextValue = (

src/pods/canvas/model/shape-other-props.utils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ export const generateDefaultOtherProps = (
4949
borderRadius: `${BASIC_SHAPE.DEFAULT_CORNER_RADIUS}`,
5050
activeElement: 0,
5151
};
52+
case 'input-stepper':
53+
return {
54+
stroke: INPUT_SHAPE.DEFAULT_STROKE_COLOR,
55+
backgroundColor: INPUT_SHAPE.DEFAULT_FILL_BACKGROUND,
56+
textColor: INPUT_SHAPE.DEFAULT_FILL_TEXT,
57+
strokeStyle: [],
58+
};
5259
case 'datepickerinput':
5360
case 'timepickerinput':
5461
return {

0 commit comments

Comments
 (0)