Skip to content

Commit 4b6e572

Browse files
authored
Merge branch 'dev' into feature/#723-gauge-tests-and-change-typography
2 parents a31b9fc + 1f8b467 commit 4b6e572

File tree

12 files changed

+58
-49
lines changed

12 files changed

+58
-49
lines changed

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ <h1>
335335
Share your ideas as low-fidelity mocks in minutes, perfect for
336336
getting started.
337337
</p>
338-
<p class="community">Community preview</p>
339338
</div>
340339
<div>
341340
<div class="video">

public/assets/omar-lorenzo.jpeg

16.1 KB
Loading

public/icons/nonfilter.svg

Lines changed: 1 addition & 0 deletions
Loading

src/common/components/mock-components/front-components/input-shape.tsx

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const InputShape = forwardRef<any, ShapeProps>((props, ref) => {
4949
borderRadius,
5050
disabled,
5151
isPlaceholder,
52+
isPassword,
5253
} = useShapeProps(otherProps, INPUT_SHAPE);
5354

5455
const commonGroupProps = useGroupShapeProps(
@@ -58,6 +59,13 @@ export const InputShape = forwardRef<any, ShapeProps>((props, ref) => {
5859
ref
5960
);
6061

62+
const maskPassword = (text: string) => {
63+
const maskSymbol = '●';
64+
return maskSymbol.repeat(text.length);
65+
};
66+
67+
const finalText = isPassword && !isPlaceholder ? maskPassword(text) : text;
68+
6169
return (
6270
<Group {...commonGroupProps} {...shapeProps}>
6371
<Rect
@@ -75,7 +83,7 @@ export const InputShape = forwardRef<any, ShapeProps>((props, ref) => {
7583
x={INPUT_SHAPE.DEFAULT_PADDING}
7684
y={INPUT_SHAPE.DEFAULT_PADDING + 1}
7785
width={width - INPUT_SHAPE.DEFAULT_PADDING * 2}
78-
text={text}
86+
text={finalText}
7987
fontFamily={INPUT_SHAPE.DEFAULT_FONT_FAMILY}
8088
fontSize={INPUT_SHAPE.DEFAULT_FONT_SIZE}
8189
lineHeight={INPUT_SHAPE.DEFAULT_LINE_HEIGHT}
@@ -93,33 +101,3 @@ export const InputShape = forwardRef<any, ShapeProps>((props, ref) => {
93101
</Group>
94102
);
95103
});
96-
97-
/*
98-
<Group {...commonGroupProps} {...shapeProps}>
99-
<Rect
100-
x={0}
101-
y={0}
102-
width={restrictedWidth}
103-
height={restrictedHeight}
104-
cornerRadius={borderRadius}
105-
stroke={stroke}
106-
dash={strokeStyle}
107-
strokeWidth={INPUT_SHAPE.DEFAULT_STROKE_WIDTH}
108-
fill={fill}
109-
/>
110-
<Text
111-
x={INPUT_SHAPE.DEFAULT_PADDING}
112-
y={INPUT_SHAPE.DEFAULT_PADDING + 1}
113-
width={width - INPUT_SHAPE.DEFAULT_PADDING * 2}
114-
text={text}
115-
fontFamily={INPUT_SHAPE.DEFAULT_FONT_FAMILY}
116-
fontSize={INPUT_SHAPE.DEFAULT_FONT_SIZE}
117-
lineHeight={INPUT_SHAPE.DEFAULT_LINE_HEIGHT}
118-
fill={textColor}
119-
align="left"
120-
ellipsis={true}
121-
wrap="none"
122-
/>
123-
</Group>
124-
125-
*/

src/common/components/shapes/use-shape-props.hook.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export const useShapeProps = (
2727
[otherProps?.isPlaceholder]
2828
);
2929

30+
const isPassword = useMemo(
31+
() => otherProps?.isPassword ?? true,
32+
[otherProps?.isPassword]
33+
);
34+
3035
const fontVariant = useMemo(
3136
() => otherProps?.fontVariant ?? defaultStyleShape.DEFAULT_FONT_VARIANT,
3237
[otherProps?.fontVariant]
@@ -99,5 +104,6 @@ export const useShapeProps = (
99104
textAlignment,
100105
disabled,
101106
isPlaceholder,
107+
isPassword,
102108
};
103109
};

src/core/local-disk/shapes-to-document.mapper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ const AddDefaultValuesForInputPropsPlaceHolderAndPassword = (
5252
...shape,
5353
otherProps: {
5454
...shape.otherProps,
55+
isPassword:
56+
shape.otherProps?.isPassword !== undefined
57+
? shape.otherProps?.isPassword
58+
: false,
5559
isPlaceholder:
5660
// Small update no need to go for 0_3, but input placeHolder needs to have default value
5761
// if undefined

src/core/model/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export interface OtherProps {
190190
textAlignment?: 'left' | 'center' | 'right';
191191
disabled?: boolean;
192192
isPlaceholder?: boolean;
193+
isPassword?: boolean;
193194
}
194195

195196
export const BASE_ICONS_URL = '/icons/';

src/pods/about/about.pod.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ export const AboutPod = () => {
99
<div className={classes.container}>
1010
<QuickmockLogoComponent styleClass={classes.projectLogo} />
1111
<h2 className={classes.projectName}>Quickmock</h2>
12-
<p className={classes.projectVersion}>Version 0.0</p>
13-
<p className={classes.projectCommunity}>Community preview</p>
12+
<p className={classes.projectVersion}>Version 1.0</p>
1413
<DevelopmentTeamComponent />
1514
</div>
1615
);

src/pods/about/members.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,21 @@ export const memberList: Member[] = [
145145
},
146146
{
147147
id: '19',
148+
name: 'Omar',
149+
surname: 'Lorenzo',
150+
urlLinkedin: 'https://www.linkedin.com/in/omar-lorenzo-montelongo/',
151+
image: './assets/omar-lorenzo.jpeg',
152+
},
153+
{
154+
id: '20',
148155
name: 'Gabriel',
149156
surname: 'Ionut',
150157
urlLinkedin: 'https://www.linkedin.com/in/gabriel-ionut-birsan-b14816307/',
151158
image: './assets/gabriel-ionut.jpeg',
152159
},
153160

154161
{
155-
id: '20',
162+
id: '21',
156163
name: 'Antonio',
157164
surname: 'Contreras',
158165
urlLinkedin:
@@ -161,7 +168,7 @@ export const memberList: Member[] = [
161168
},
162169

163170
{
164-
id: '21',
171+
id: '22',
165172
name: 'Braulio',
166173
surname: 'Diez',
167174
urlLinkedin: 'https://www.linkedin.com/in/brauliodiez/',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const generateDefaultOtherProps = (
1616
backgroundColor: INPUT_SHAPE.DEFAULT_FILL_BACKGROUND,
1717
textColor: INPUT_SHAPE.DEFAULT_FILL_TEXT,
1818
isPlaceholder: true,
19+
isPassword: false,
1920
strokeStyle: [],
2021
borderRadius: `${INPUT_SHAPE.DEFAULT_CORNER_RADIUS}`,
2122
disabled: INPUT_SHAPE.DEFAULT_DISABLED,

0 commit comments

Comments
 (0)