@sikka/hawa 0.0.40 → 0.0.43

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.
Files changed (72) hide show
  1. package/.github/workflows/hawa-publish-push.yml +1 -1
  2. package/.github/workflows/hawa-publish.yml +3 -1
  3. package/es/index.es.js +1 -1
  4. package/lib/index.js +1 -1
  5. package/package.json +19 -3
  6. package/src/blocks/Account/UserProfileForm.js +39 -1
  7. package/src/blocks/AuthForms/SignInForm.js +1 -1
  8. package/src/blocks/AuthForms/SignInPhone.js +43 -0
  9. package/src/blocks/AuthForms/SignUpForm.js +2 -0
  10. package/src/blocks/AuthForms/index.js +1 -0
  11. package/src/elements/AdaptiveButton.js +1 -1
  12. package/src/elements/HawaPhoneInput.js +48 -0
  13. package/src/elements/PinInput.js +9 -1
  14. package/src/elements/index.js +1 -1
  15. package/src/styles.css +54 -3
  16. package/src/theme/HawaTheme.js +26 -12
  17. package/storybook-static/0.6124c2748d3e65e1b2cb.manager.bundle.js +2 -0
  18. package/storybook-static/0.6124c2748d3e65e1b2cb.manager.bundle.js.LICENSE.txt +8 -0
  19. package/storybook-static/0.b6e074ad.iframe.bundle.js +3 -0
  20. package/storybook-static/0.b6e074ad.iframe.bundle.js.LICENSE.txt +8 -0
  21. package/storybook-static/0.b6e074ad.iframe.bundle.js.map +1 -0
  22. package/storybook-static/1.1afe453d.iframe.bundle.js +1 -0
  23. package/storybook-static/1.bd6511f086504dd70145.manager.bundle.js +1 -0
  24. package/storybook-static/{2.89943a03.iframe.bundle.js → 2.e7f8eecc.iframe.bundle.js} +0 -0
  25. package/storybook-static/5.deb43d3a68375c09581a.manager.bundle.js +2 -0
  26. package/storybook-static/{5.a331b0a36ded1c541923.manager.bundle.js.LICENSE.txt → 5.deb43d3a68375c09581a.manager.bundle.js.LICENSE.txt} +0 -0
  27. package/storybook-static/6.249b7db6e23f6b9cadb6.manager.bundle.js +1 -0
  28. package/storybook-static/6.b22bfe7f.iframe.bundle.js +3 -0
  29. package/storybook-static/{6.3a1fb0c3.iframe.bundle.js.LICENSE.txt → 6.b22bfe7f.iframe.bundle.js.LICENSE.txt} +0 -0
  30. package/storybook-static/6.b22bfe7f.iframe.bundle.js.map +1 -0
  31. package/storybook-static/{7.5b8a4de4b5fa42d8de02.manager.bundle.js → 7.d8516dca49008e2c4ff3.manager.bundle.js} +1 -1
  32. package/storybook-static/7.f0b4b36c.iframe.bundle.js +1 -0
  33. package/storybook-static/8.bfd0b85fcee1d5b82b2a.manager.bundle.js +2 -0
  34. package/storybook-static/{8.a3dec9c37e8951a17939.manager.bundle.js.LICENSE.txt → 8.bfd0b85fcee1d5b82b2a.manager.bundle.js.LICENSE.txt} +0 -0
  35. package/storybook-static/{8.b569e86b.iframe.bundle.js → 8.d6b26a40.iframe.bundle.js} +0 -0
  36. package/storybook-static/9.c0a47b6b.iframe.bundle.js +3 -0
  37. package/storybook-static/{9.f9db5c90.iframe.bundle.js.LICENSE.txt → 9.c0a47b6b.iframe.bundle.js.LICENSE.txt} +0 -0
  38. package/storybook-static/9.c0a47b6b.iframe.bundle.js.map +1 -0
  39. package/storybook-static/{9.d04fdaada645cd23cb4b.manager.bundle.js → 9.d54acbbe1e3658f1423d.manager.bundle.js} +1 -1
  40. package/storybook-static/iframe.html +3 -3
  41. package/storybook-static/index.html +1 -1
  42. package/storybook-static/main.2f0f77ef.iframe.bundle.js +1 -0
  43. package/storybook-static/main.5a189b21151a4a9bac2a.manager.bundle.js +1 -0
  44. package/storybook-static/project.json +1 -1
  45. package/storybook-static/{runtime~main.9be73be4.iframe.bundle.js → runtime~main.0e8a2888.iframe.bundle.js} +1 -1
  46. package/storybook-static/{runtime~main.1bd817501fb34a0cb56b.manager.bundle.js → runtime~main.ecdccec302ff88ae42db.manager.bundle.js} +1 -1
  47. package/storybook-static/vendors~main.261044d5.iframe.bundle.js +76 -0
  48. package/storybook-static/{vendors~main.40879e99.iframe.bundle.js.LICENSE.txt → vendors~main.261044d5.iframe.bundle.js.LICENSE.txt} +17 -1
  49. package/storybook-static/vendors~main.261044d5.iframe.bundle.js.map +1 -0
  50. package/storybook-static/vendors~main.276217ab3ce7975228ae.manager.bundle.js +2 -0
  51. package/storybook-static/{vendors~main.ed8bc18573e141ab3b26.manager.bundle.js.LICENSE.txt → vendors~main.276217ab3ce7975228ae.manager.bundle.js.LICENSE.txt} +0 -0
  52. package/src/elements/HawaInputLabel.js +0 -9
  53. package/storybook-static/0.a2c13f8ca8477800b11f.manager.bundle.js +0 -2
  54. package/storybook-static/0.a2c13f8ca8477800b11f.manager.bundle.js.LICENSE.txt +0 -8
  55. package/storybook-static/0.d94b248f.iframe.bundle.js +0 -3
  56. package/storybook-static/0.d94b248f.iframe.bundle.js.LICENSE.txt +0 -8
  57. package/storybook-static/0.d94b248f.iframe.bundle.js.map +0 -1
  58. package/storybook-static/1.37f89487.iframe.bundle.js +0 -1
  59. package/storybook-static/1.d522251f2377f7751924.manager.bundle.js +0 -1
  60. package/storybook-static/5.a331b0a36ded1c541923.manager.bundle.js +0 -2
  61. package/storybook-static/6.3a1fb0c3.iframe.bundle.js +0 -3
  62. package/storybook-static/6.3a1fb0c3.iframe.bundle.js.map +0 -1
  63. package/storybook-static/6.aee6c4935c69d480fc0d.manager.bundle.js +0 -1
  64. package/storybook-static/7.f33530b1.iframe.bundle.js +0 -1
  65. package/storybook-static/8.a3dec9c37e8951a17939.manager.bundle.js +0 -2
  66. package/storybook-static/9.f9db5c90.iframe.bundle.js +0 -3
  67. package/storybook-static/9.f9db5c90.iframe.bundle.js.map +0 -1
  68. package/storybook-static/main.066fa5c5.iframe.bundle.js +0 -1
  69. package/storybook-static/main.750dea0e0e515fd26844.manager.bundle.js +0 -1
  70. package/storybook-static/vendors~main.40879e99.iframe.bundle.js +0 -76
  71. package/storybook-static/vendors~main.40879e99.iframe.bundle.js.map +0 -1
  72. package/storybook-static/vendors~main.ed8bc18573e141ab3b26.manager.bundle.js +0 -2
@@ -51,6 +51,7 @@ export const SignUpForm = (props) => {
51
51
  <PersonIcon />
52
52
  </InputAdornment>
53
53
  }
54
+ {...field}
54
55
  />
55
56
  )}
56
57
  rules={{
@@ -74,6 +75,7 @@ export const SignUpForm = (props) => {
74
75
  <EmailIcon />
75
76
  </InputAdornment>
76
77
  }
78
+ {...field}
77
79
  />
78
80
  )}
79
81
  rules={{
@@ -3,3 +3,4 @@ export * from "./ResetPasswordForm.js";
3
3
  export * from "./SignUpForm.js";
4
4
  export * from "./SignInForm.js";
5
5
  export * from "./CodeConfirmation.js";
6
+ export * from "./SignInPhone";
@@ -27,5 +27,5 @@ export const AdaptiveButton = (props) => {
27
27
  AdaptiveButton.propTypes = {
28
28
  buttonText: PropTypes.string,
29
29
  onClick: PropTypes.func,
30
- showText: PropTypes.bool
30
+ showText: PropTypes.bool,
31
31
  };
@@ -0,0 +1,48 @@
1
+ import PhoneInput from "react-phone-input-2";
2
+ import "react-phone-input-2/lib/material.css";
3
+ import { useTheme } from "@mui/system";
4
+ import { InputLabel } from "@mui/material";
5
+
6
+ export default function HawaPhoneInput(props) {
7
+ const {
8
+ country,
9
+ onChange,
10
+ value,
11
+ onlyContries,
12
+ preferredCountries,
13
+ inputProps,
14
+ required,
15
+ placeholder,
16
+ name,
17
+ label,
18
+ // onChange,
19
+ ...rest
20
+ } = props;
21
+
22
+ const theme = useTheme();
23
+ return (
24
+ <div>
25
+ {label && <InputLabel>{props.label}</InputLabel>}
26
+ <PhoneInput
27
+ country={country ?? null}
28
+ onChange={(e) => onChange(e)}
29
+ value={value ?? value}
30
+ onlyCountries={onlyContries?.length > 0 ? onlyContries : []}
31
+ preferredCountries={
32
+ preferredCountries?.length > 0 ? preferredCountries : []
33
+ }
34
+ inputProps={{
35
+ required: required ?? false,
36
+ name: name ?? null
37
+ }}
38
+ specialLabel={""}
39
+ placeholder={placeholder ?? ""}
40
+ inputStyle={{
41
+ width: "100%",
42
+ borderRadius: theme.allBorderRadius
43
+ }}
44
+ {...rest}
45
+ />
46
+ </div>
47
+ );
48
+ }
@@ -116,6 +116,14 @@ export const HawaPinInputField = (props) => {
116
116
  id={"pinInput" + props.index}
117
117
  defaultValue={props.defaultValue || ""}
118
118
  variant="pin"
119
+ onKeyDown={(e) => {
120
+ if (e.key === "Backspace") {
121
+ let i = document.getElementById("pinInput" + (props.index - 1));
122
+ if (e) {
123
+ i.focus();
124
+ }
125
+ }
126
+ }}
119
127
  disableUnderline
120
128
  inputProps={{ maxLength: 1 }}
121
129
  onChange={(e) => {
@@ -128,7 +136,7 @@ export const HawaPinInputField = (props) => {
128
136
  e.target.value != ""
129
137
  ) {
130
138
  let i = document.getElementById("pinInput" + (props.index + 1));
131
- if (i) {
139
+ if (i != null) {
132
140
  i.focus();
133
141
  }
134
142
  }
@@ -12,7 +12,6 @@ export * from "./HawaButton";
12
12
  export * from "./HawaSelect";
13
13
  export * from "./HawaRange";
14
14
  export * from "./HawaTextField";
15
- export * from "./HawaInputLabel";
16
15
  export * from "./HawaTypography";
17
16
  export * from "./HawaAlert";
18
17
  export * from "./HawaTable";
@@ -21,3 +20,4 @@ export * from "./HawaSearchBar";
21
20
  export * from "./HawaAccordian";
22
21
  export * from "./DragDropImages";
23
22
  export * from "./DraggableCard";
23
+ export * from "./HawaPhoneInput"
package/src/styles.css CHANGED
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  .input {
2
4
  color: black;
3
5
  background-color: var(--light);
@@ -51,7 +53,56 @@
51
53
  border-width: 2px;
52
54
  cursor: pointer;
53
55
  }
54
- input[type=number]::-webkit-inner-spin-button,
55
- input[type=number]::-webkit-outer-spin-button {
56
- -webkit-appearance: none;
56
+ input[type="number"]::-webkit-inner-spin-button,
57
+ input[type="number"]::-webkit-outer-spin-button {
58
+ -webkit-appearance: none;
59
+ }
60
+
61
+ .phoneInput {
62
+ padding-top: 10px !important;
63
+ padding-bottom: 10px !important;
64
+ padding-right: 10px !important;
65
+ padding-left: 60px !important;
66
+ border-radius: var(--borderR) !important;
67
+ border: none !important;
68
+ height: 100% !important;
69
+ width: auto !important;
70
+ }
71
+
72
+ .phoneInput:hover {
73
+ border: none;
74
+ outline-color: transparent;
75
+ }
76
+
77
+ .phoneInput:focus {
78
+ /* border: 1px solid !important; */
79
+ /* border-color: #7f62fc !important; */
80
+ outline: 1px solid !important;
81
+ outline-color: #7f62fc !important;
82
+ }
83
+ .phoneInputContainer {
84
+ height: 43px !important;
85
+ width: 100% !important;
86
+ background-color: red !important;
87
+ max-width: 400px !important;
88
+ border-radius: var(--borderR) !important;
89
+ }
90
+
91
+ .phoneInputButton {
92
+ height: 100% !important;
93
+ border-radius: var(--borderR) !important;
94
+ background: none !important;
95
+ }
96
+
97
+ .react-tel-input .selected-flag {
98
+ /* background-color: red !important; */
99
+ /* height: 100% !important; */
100
+ border-radius: var(--borderR) !important;
101
+ border: none;
102
+ }
103
+ .phoneInputButton:focus {
104
+ background: none !important;
105
+ /* background-color: red !important; */
106
+ /* height: 100% !important; */
107
+ border-radius: var(--borderR) !important;
57
108
  }
@@ -1,16 +1,23 @@
1
1
  import { createTheme } from "@mui/material";
2
2
  import { darken, lighten } from "@mui/material";
3
3
 
4
- export const CreateHawaTheme = (
5
- allBorderRadius,
6
- primaryActionColor,
7
- primaryLayoutColor,
8
- primaryActionTextColor,
9
- mainFont,
10
- breakpointsValues
11
- ) => {
4
+ export const CreateHawaTheme = (optionsObject, breakpointsValues) => {
5
+ let allBorderRadius = optionsObject.borderRadius;
6
+ let primaryDangerColor = optionsObject.dangerColor;
7
+ let primaryActionColor = optionsObject.actionColor;
8
+ let primaryActionTextColor = optionsObject.actionTextColor;
9
+ let primaryLayoutColor = optionsObject.layoutColor;
10
+ let mainFont = optionsObject.font;
11
+
12
12
  console.log("achra achraf", breakpointsValues);
13
13
  return createTheme({
14
+ allBorderRadius: optionsObject.borderRadius,
15
+ primaryDangerColor: optionsObject.dangerColor,
16
+ primaryActionColor: optionsObject.actionColor,
17
+ primaryActionTextColor: optionsObject.actionTextColor,
18
+ primaryLayoutColor: optionsObject.layoutColor,
19
+ mainFont: optionsObject.font,
20
+ test: "something",
14
21
  typography: { fontFamily: ["IBMPlex", "Roboto"].join(",") },
15
22
  palette: {
16
23
  primary: {
@@ -30,8 +37,6 @@ export const CreateHawaTheme = (
30
37
  style: {
31
38
  backgroundColor: primaryLayoutColor,
32
39
  padding: 15,
33
- // paddingLeft: 5,
34
- // paddingRight: 5,
35
40
  borderRadius: allBorderRadius
36
41
  }
37
42
  }
@@ -144,7 +149,15 @@ export const CreateHawaTheme = (
144
149
  padding: 10,
145
150
  ":focus": { border: "none" }
146
151
  }
147
- }
152
+ },
153
+ variants: [
154
+ {
155
+ props: { variant: "phone" },
156
+ style: {
157
+ backgroundColor: "red"
158
+ }
159
+ }
160
+ ]
148
161
  },
149
162
  MuiInput: {
150
163
  styleOverrides: {
@@ -203,7 +216,8 @@ export const CreateHawaTheme = (
203
216
  borderRadius: allBorderRadius,
204
217
  paddingLeft: 20,
205
218
  paddingRight: 20,
206
- padding: 20
219
+ padding: 20,
220
+ maxWidth: 600
207
221
  }
208
222
  },
209
223
  variants: [