@antscorp/antsomi-ui 2.0.1 → 2.0.2

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.
@@ -694,7 +694,7 @@ export const Login = props => {
694
694
  }
695
695
  };
696
696
  return (React.createElement(CookiesProvider, null,
697
- React.createElement(LoginMain, { justify: isMobile ? 'center' : 'start' },
698
- React.createElement(WrapperLogin, { isMobile: isMobile, vertical: true, align: "center", gap: 40, flex: 1, ref: loginRef }, renderMain()),
697
+ React.createElement(LoginMain, { justify: isMobile ? 'center' : 'start', id: "login_container" },
698
+ React.createElement(WrapperLogin, { isMobile: isMobile, vertical: true, align: "center", gap: 40, flex: 1, ref: loginRef, id: "login_main" }, renderMain()),
699
699
  !isMobile && React.createElement(LoginBannerZone, { className: "login-banner-zone", id: "login_banner_zone" }))));
700
700
  };
@@ -177,16 +177,16 @@ const ForgotPassword = props => {
177
177
  });
178
178
  errorRef.current.email = false;
179
179
  setLoginError('');
180
- } }),
180
+ }, status: errorRef.current.email && state.errors.email ? 'error' : undefined }),
181
181
  errorRef.current.email && state.errors.email ? (React.createElement(Text, { type: "danger", style: { marginTop: 5 } }, state.errors.email)) : null,
182
182
  state.loginError && (React.createElement(Text, { type: "danger", style: { marginTop: 5 } }, state.loginError))),
183
- React.createElement(Flex, { vertical: true, gap: 15 },
183
+ React.createElement(Flex, { vertical: true, gap: 5 },
184
184
  React.createElement(Flex, { justify: "center", style: {
185
185
  transform: isMobile ? 'scale(1)' : `scale(${scaleCaptcha})`,
186
186
  transformOrigin: !isMobile ? '' : '0 0',
187
187
  } },
188
188
  React.createElement(ReCAPTCHA, { sitekey: reCaptchaKey, onChange: onCaptchaChange, onExpired: onExpiredCaptcha, size: "normal" })),
189
- state.errors.captcha && (React.createElement(Text, { type: "danger", style: { marginTop: 10 } }, "Please verify you are human"))),
189
+ state.errors.captcha && React.createElement(Text, { type: "danger" }, "Please verify you are human")),
190
190
  React.createElement(Flex, { vertical: true, gap: isMobile ? 30 : 15, style: { paddingBottom: 40 } },
191
191
  React.createElement(StyleButton, { isMobile: isMobile, onClick: signIn, type: "primary" }, "Continue"),
192
192
  React.createElement(StyleButton, { isMobile: isMobile, type: "text", onClick: handleBack }, "Back to login"))))), isShowLogo: false, footer: null }));
@@ -19,8 +19,8 @@ export const WrapperItem = styled.div `
19
19
  object-fit: contain;
20
20
  }
21
21
 
22
- :hover {
23
- background-color: #f2f9ff;
22
+ &:hover {
23
+ background-color: #f2f9ff !important;
24
24
  }
25
25
 
26
26
  .antsomi-typography {
@@ -178,8 +178,9 @@ export const LoginSelectPortal = props => {
178
178
  color: '#595959',
179
179
  fontSize: 11,
180
180
  } }, "No portal matches your keyword"))) : (React.createElement(Scrollbars, { style: {
181
- height: 514,
181
+ height: `calc(100vh - 410px)`,
182
182
  width: '100%',
183
+ minHeight: `145px`,
183
184
  } },
184
185
  React.createElement(WrapperList, null,
185
186
  React.createElement(Row, { gutter: [20, 20] }, filterListNetworks.map((network) => (React.createElement(Col, { span: 12 },
@@ -125,14 +125,15 @@ export const LoginStep2 = props => {
125
125
  React.createElement(Text, { isMobile: isMobile },
126
126
  "Open Google Authenticator and enter the code from ",
127
127
  React.createElement("b", null, "antsomi.com"))) })),
128
- React.createElement(Flex, { vertical: true, gap: isMobile ? 20 : 5 },
129
- React.createElement(StyleInput, { isMobile: isMobile, maxLength: 6, placeholder: "Input your code", value: state.code, onChange: e => {
130
- setState(draft => {
131
- draft.code = e.target.value;
132
- });
133
- errorRef.current = true;
134
- } }),
135
- errorRef.current && state.codeError ? (React.createElement(TextAntsomiUI, { type: "danger" }, "Invalid code, please try again")) : null,
128
+ React.createElement(Flex, { vertical: true, gap: isMobile ? 20 : 11 },
129
+ React.createElement(Flex, { vertical: true, gap: 10 },
130
+ React.createElement(StyleInput, { isMobile: isMobile, maxLength: 6, placeholder: "Input your code", value: state.code, onChange: e => {
131
+ setState(draft => {
132
+ draft.code = e.target.value;
133
+ });
134
+ errorRef.current = true;
135
+ }, status: errorRef.current && state.codeError ? 'error' : undefined }),
136
+ errorRef.current && state.codeError ? (React.createElement(TextAntsomiUI, { type: "danger" }, "Invalid code, please try again")) : null),
136
137
  React.createElement(Checkbox, { checked: state.isTrust, onChange: e => {
137
138
  setState(draft => {
138
139
  draft.isTrust = e.target.checked;
@@ -114,7 +114,7 @@ const SetupGGAuthenticator = props => {
114
114
  if (e.target.value.trim().length) {
115
115
  setCodeError(false);
116
116
  }
117
- } }),
117
+ }, status: errorRef.current && codeError ? 'error' : '' }),
118
118
  errorRef.current && codeError ? (React.createElement(TextAntsomiUI, { type: "danger" }, "Invalid code, please try again")) : null)), footer: React.createElement(Flex, { vertical: true, gap: 92 },
119
119
  React.createElement(Flex, { vertical: true, gap: isMobile ? 30 : 15 },
120
120
  React.createElement(StyleButton, { isMobile: isMobile, loading: isLoading, type: "primary", onClick: updateG2FA }, "Complete"),
@@ -86,7 +86,7 @@ export const SignIn = props => {
86
86
  } })) : (React.createElement(Icon, { type: "icon-ants-invisible", style: {
87
87
  color: '#595959',
88
88
  } })) })),
89
- loginError && React.createElement("span", { style: { color: 'red' } }, "Email or password is invalid"),
89
+ loginError && (React.createElement("span", { style: { color: 'red', fontSize: 11 } }, "Email or password is invalid")),
90
90
  React.createElement(Flex, { style: { width: '100%', marginTop: '40px' }, vertical: true, className: "" },
91
91
  React.createElement(Form.Item, null,
92
92
  React.createElement(StyleButton, { isMobile: isMobile, type: "primary", htmlType: "submit", style: { width: '100%', marginBottom: isMobile ? 15 : 0 }, loading: isLoading }, "Sign in")),
@@ -2,21 +2,31 @@ import { Button, Flex, Form, Input } from 'antd';
2
2
  import styled from 'styled-components';
3
3
  export const LoginMain = styled(Flex) `
4
4
  background: #eaf1fb;
5
+
5
6
  height: 100vh;
7
+ max-height: 100vh;
8
+
6
9
  width: 100%;
10
+
11
+ overflow: hidden;
7
12
  `;
8
13
  export const LoginBannerZone = styled.div `
9
14
  display: flex;
10
15
  flex: 2;
16
+ z-index: 1;
17
+
18
+ min-width: calc(100vw - 404px);
19
+ max-width: calc(100vw - 300px);
11
20
  `;
12
21
  export const WrapperLogin = styled(Flex) `
13
22
  height: 100%;
14
23
  overflow-y: auto;
15
24
  background-color: white;
25
+ z-index: 5;
16
26
 
17
27
  width: ${props => (props.isMobile ? '100%' : '')};
18
28
  min-width: ${props => (props.isMobile ? '100%' : '300px')};
19
- max-width: ${props => (props.isMobile ? '100%' : '400px')};
29
+ max-width: ${props => (props.isMobile ? '100%' : '404px')};
20
30
 
21
31
  ${(props) => !props.isMobile ? 'box-shadow: 3px 0px 9px 0px #002e5926' : ''}
22
32
  `;
@@ -63,8 +73,12 @@ export const AvatarImage = styled.img `
63
73
  `;
64
74
  export const StyledForm = styled(Form) `
65
75
  input {
66
- height: ${(props) => (props.isMobile ? ' 44px' : '30px')};
67
- font-size: ${(props) => (props.isMobile ? ' 16px !important' : '12px')};
76
+ height: ${(props) => (props.isMobile ? ' 44px' : '36px')};
77
+ font-size: ${(props) => props.isMobile ? ' 16px !important' : '14px !important'};
78
+
79
+ &::placeholder {
80
+ font-size: ${(props) => props.isMobile ? ' 16px !important' : '14px !important'};
81
+ }
68
82
  }
69
83
 
70
84
  input:-webkit-autofill,
@@ -76,12 +90,20 @@ export const StyledForm = styled(Form) `
76
90
  }
77
91
 
78
92
  .antsomi-input-password-icon {
79
- font-size: ${(props) => (props.isMobile ? ' 24px' : '15px')};
93
+ font-size: ${(props) => (props.isMobile ? ' 24px' : '14px')};
94
+
95
+ &:hover {
96
+ cursor: pointer;
97
+ }
80
98
  }
81
99
 
82
100
  .antsomi-input-affix-wrapper {
83
101
  padding: 0 10px !important;
84
- font-size: ${(props) => (props.isMobile ? ' 16px !important' : '12px')};
102
+ font-size: ${(props) => props.isMobile ? ' 16px !important' : '14px !important'};
103
+
104
+ &::placeholder {
105
+ font-size: ${(props) => props.isMobile ? ' 16px !important' : '14px !important'};
106
+ }
85
107
  }
86
108
 
87
109
  .antsomi-form-item-explain-error {
@@ -91,6 +113,10 @@ export const StyledForm = styled(Form) `
91
113
  export const StyleInput = styled(Input) `
92
114
  height: ${(props) => props.isMobile ? ' 44px !important' : '36px !important'};
93
115
  font-size: ${(props) => props.isMobile ? ' 16px !important' : '14px !important'};
116
+
117
+ &::placeholder {
118
+ font-size: ${(props) => props.isMobile ? ' 16px !important' : '14px !important'};
119
+ }
94
120
  `;
95
121
  export const StyleButton = styled(Button) `
96
122
  height: ${(props) => props.isMobile ? ' 44px !important' : '40px !important'};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -246,4 +246,4 @@
246
246
  "react-dom": ">=16.9.0",
247
247
  "react-router-dom": ">= 5.1.0"
248
248
  }
249
- }
249
+ }