react-frontend-common-components 0.0.68 → 0.0.70

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-frontend-common-components",
3
- "version": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "description": "Reusable frontend library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,13 +1,11 @@
1
1
  .appInput {
2
2
  font-size: var(--font-14);
3
3
  font-weight: 500;
4
- color: #1e1f21;
5
4
  .ant-input::placeholder {
6
5
  color: #202123 !important;
7
6
  font-size: 14px;
8
7
  font-weight: 500;
9
8
  line-height: normal;
10
-
11
9
  }
12
10
 
13
11
  *:focus {
@@ -1,7 +1,6 @@
1
1
  .appPasswordInput {
2
2
  font-size: var(--font-14);
3
3
  font-weight: 500;
4
- color: #1e1f21;
5
4
  border: none;
6
5
  position: relative;
7
6
 
@@ -6,6 +6,7 @@ import "./app-phone-input.css";
6
6
  interface AppPhoneInputProps {
7
7
  value: string;
8
8
  countryCode?: string;
9
+ phone: string;
9
10
  handleChange: (phone: string, countryCode: string, uniCode: string) => void;
10
11
  className: string;
11
12
  id: string;
@@ -15,6 +16,7 @@ const AppPhoneInput = ({
15
16
  value,
16
17
  handleChange,
17
18
  countryCode,
19
+ phone,
18
20
  className,
19
21
  id,
20
22
  }: AppPhoneInputProps) => {
@@ -32,10 +34,19 @@ const AppPhoneInput = ({
32
34
  <div className={className}>
33
35
  <div className={"inputContainer"} ref={wrapperRef}>
34
36
  <PhoneInput
35
- value={value}
36
- country={"ae"}
37
+ value={`+${countryCode}${phone}`}
38
+ country={
39
+ (countryCode && phone) || (countryCode != "" && phone != "")
40
+ ? ""
41
+ : "us"
42
+ }
43
+ countryCodeEditable={false}
37
44
  onChange={(phone, country: CountryData) => {
38
- handleChange(phone, `+${country.dialCode}`, country.countryCode);
45
+ handleChange(
46
+ phone.replace(country.dialCode, ""),
47
+ country.dialCode,
48
+ country.countryCode
49
+ );
39
50
  }}
40
51
  enableSearch={true}
41
52
  inputProps={{ required: true }}
@@ -1,4 +1,6 @@
1
1
  .appselect {
2
+ font-weight: 500;
3
+ font-size: var(--font-14);
2
4
  *:focus,
3
5
  *:active,
4
6
  *:focus-within {
@@ -14,7 +16,6 @@
14
16
  font-size: 14px;
15
17
  font-weight: 500;
16
18
  line-height: normal;
17
-
18
19
  }
19
20
  }
20
21
  &:hover {