@sikka/hawa 0.0.243 → 0.0.244

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 (218) hide show
  1. package/es/blocks/Account/HawaApiBox.d.ts +2 -2
  2. package/es/blocks/Account/UserProfileForm.d.ts +2 -2
  3. package/es/blocks/Account/UserSettingsForm.d.ts +2 -2
  4. package/es/blocks/AuthForms/AppLanding.d.ts +2 -2
  5. package/es/blocks/AuthForms/CodeConfirmation.d.ts +2 -2
  6. package/es/blocks/AuthForms/NewPasswordForm.d.ts +2 -2
  7. package/es/blocks/AuthForms/ResetPasswordForm.d.ts +2 -2
  8. package/es/blocks/AuthForms/SignInForm.d.ts +2 -2
  9. package/es/blocks/AuthForms/SignInPhone.d.ts +2 -2
  10. package/es/blocks/AuthForms/SignUpForm.d.ts +2 -2
  11. package/es/blocks/Misc/EmptyState.d.ts +2 -2
  12. package/es/blocks/Misc/LeadGenerator.d.ts +2 -2
  13. package/es/blocks/Misc/Newsletter.d.ts +2 -2
  14. package/es/blocks/Misc/NoPermission.d.ts +2 -2
  15. package/es/blocks/Misc/NotFound.d.ts +2 -2
  16. package/es/blocks/Misc/Testimonial.d.ts +2 -2
  17. package/es/blocks/Payment/ChargeWalletForm.d.ts +2 -2
  18. package/es/blocks/Payment/CheckoutForm.d.ts +2 -2
  19. package/es/blocks/Payment/Confirmation.d.ts +2 -2
  20. package/es/blocks/Payment/CreditCardForm.d.ts +2 -2
  21. package/es/blocks/Payment/PayWithWallet.d.ts +2 -2
  22. package/es/blocks/Payment/SelectPayment.d.ts +2 -2
  23. package/es/blocks/Pricing/ComparingPlans.d.ts +2 -2
  24. package/es/blocks/Pricing/PricingPlans.d.ts +2 -2
  25. package/es/blocks/Referral/ReferralAccount.d.ts +2 -2
  26. package/es/blocks/Referral/ReferralSettlement.d.ts +2 -2
  27. package/es/blocks/Referral/ReferralStats.d.ts +2 -2
  28. package/es/elements/ArrowCarousel.d.ts +2 -2
  29. package/es/elements/AutoCompleteField.d.ts +2 -2
  30. package/es/elements/BackToTop.d.ts +3 -3
  31. package/es/elements/Breadcrumb.d.ts +2 -4
  32. package/es/elements/DragDropImages.d.ts +2 -6
  33. package/es/elements/DraggableCard.d.ts +2 -2
  34. package/es/elements/HawaAccordion.d.ts +5 -11
  35. package/es/elements/HawaAdCard.d.ts +2 -2
  36. package/es/elements/HawaCardInput.d.ts +2 -2
  37. package/es/elements/HawaCheckbox.d.ts +2 -2
  38. package/es/elements/HawaChip.d.ts +9 -3
  39. package/es/elements/HawaColorPicker.d.ts +5 -3
  40. package/es/elements/HawaCopyrights.d.ts +8 -4
  41. package/es/elements/HawaDrawer.d.ts +2 -2
  42. package/es/elements/HawaIconCount.d.ts +5 -3
  43. package/es/elements/HawaItemCard.d.ts +10 -6
  44. package/es/elements/HawaLandingCard.d.ts +2 -2
  45. package/es/elements/HawaLogoButton.d.ts +2 -2
  46. package/es/elements/HawaMenu.d.ts +2 -2
  47. package/es/elements/HawaModal.d.ts +2 -2
  48. package/es/elements/HawaPanelTabs.d.ts +2 -2
  49. package/es/elements/HawaPhoneInput.d.ts +2 -2
  50. package/es/elements/HawaPinInput.d.ts +2 -2
  51. package/es/elements/HawaPricingCard.d.ts +2 -2
  52. package/es/elements/HawaRadio.d.ts +2 -2
  53. package/es/elements/HawaRange.d.ts +2 -2
  54. package/es/elements/HawaSearchBar.d.ts +2 -2
  55. package/es/elements/HawaSelect.d.ts +2 -2
  56. package/es/elements/HawaSettingsRow.d.ts +2 -2
  57. package/es/elements/HawaSpinner.d.ts +2 -2
  58. package/es/elements/HawaStats.d.ts +2 -2
  59. package/es/elements/HawaStepper.d.ts +2 -2
  60. package/es/elements/HawaStoreButtons.d.ts +2 -2
  61. package/es/elements/HawaSwitch.d.ts +2 -2
  62. package/es/elements/HawaTable.d.ts +2 -2
  63. package/es/elements/HawaTabs.d.ts +2 -2
  64. package/es/elements/HawaTextField.d.ts +3 -3
  65. package/es/elements/HawaTooltip.d.ts +3 -3
  66. package/es/elements/HawaTypography.d.ts +2 -2
  67. package/es/elements/InvoiceAccordion.d.ts +2 -2
  68. package/es/elements/SubsectionList.d.ts +2 -2
  69. package/es/elements/TabPanel.d.ts +2 -2
  70. package/es/elements/UsageCard.d.ts +2 -2
  71. package/es/elements/UserFeedback.d.ts +2 -2
  72. package/es/index.es.js +2 -2
  73. package/lib/blocks/Account/HawaApiBox.d.ts +2 -2
  74. package/lib/blocks/Account/UserProfileForm.d.ts +2 -2
  75. package/lib/blocks/Account/UserSettingsForm.d.ts +2 -2
  76. package/lib/blocks/AuthForms/AppLanding.d.ts +2 -2
  77. package/lib/blocks/AuthForms/CodeConfirmation.d.ts +2 -2
  78. package/lib/blocks/AuthForms/NewPasswordForm.d.ts +2 -2
  79. package/lib/blocks/AuthForms/ResetPasswordForm.d.ts +2 -2
  80. package/lib/blocks/AuthForms/SignInForm.d.ts +2 -2
  81. package/lib/blocks/AuthForms/SignInPhone.d.ts +2 -2
  82. package/lib/blocks/AuthForms/SignUpForm.d.ts +2 -2
  83. package/lib/blocks/Misc/EmptyState.d.ts +2 -2
  84. package/lib/blocks/Misc/LeadGenerator.d.ts +2 -2
  85. package/lib/blocks/Misc/Newsletter.d.ts +2 -2
  86. package/lib/blocks/Misc/NoPermission.d.ts +2 -2
  87. package/lib/blocks/Misc/NotFound.d.ts +2 -2
  88. package/lib/blocks/Misc/Testimonial.d.ts +2 -2
  89. package/lib/blocks/Payment/ChargeWalletForm.d.ts +2 -2
  90. package/lib/blocks/Payment/CheckoutForm.d.ts +2 -2
  91. package/lib/blocks/Payment/Confirmation.d.ts +2 -2
  92. package/lib/blocks/Payment/CreditCardForm.d.ts +2 -2
  93. package/lib/blocks/Payment/PayWithWallet.d.ts +2 -2
  94. package/lib/blocks/Payment/SelectPayment.d.ts +2 -2
  95. package/lib/blocks/Pricing/ComparingPlans.d.ts +2 -2
  96. package/lib/blocks/Pricing/PricingPlans.d.ts +2 -2
  97. package/lib/blocks/Referral/ReferralAccount.d.ts +2 -2
  98. package/lib/blocks/Referral/ReferralSettlement.d.ts +2 -2
  99. package/lib/blocks/Referral/ReferralStats.d.ts +2 -2
  100. package/lib/elements/ArrowCarousel.d.ts +2 -2
  101. package/lib/elements/AutoCompleteField.d.ts +2 -2
  102. package/lib/elements/BackToTop.d.ts +3 -3
  103. package/lib/elements/Breadcrumb.d.ts +2 -4
  104. package/lib/elements/DragDropImages.d.ts +2 -6
  105. package/lib/elements/DraggableCard.d.ts +2 -2
  106. package/lib/elements/HawaAccordion.d.ts +5 -11
  107. package/lib/elements/HawaAdCard.d.ts +2 -2
  108. package/lib/elements/HawaCardInput.d.ts +2 -2
  109. package/lib/elements/HawaCheckbox.d.ts +2 -2
  110. package/lib/elements/HawaChip.d.ts +9 -3
  111. package/lib/elements/HawaColorPicker.d.ts +5 -3
  112. package/lib/elements/HawaCopyrights.d.ts +8 -4
  113. package/lib/elements/HawaDrawer.d.ts +2 -2
  114. package/lib/elements/HawaIconCount.d.ts +5 -3
  115. package/lib/elements/HawaItemCard.d.ts +10 -6
  116. package/lib/elements/HawaLandingCard.d.ts +2 -2
  117. package/lib/elements/HawaLogoButton.d.ts +2 -2
  118. package/lib/elements/HawaMenu.d.ts +2 -2
  119. package/lib/elements/HawaModal.d.ts +2 -2
  120. package/lib/elements/HawaPanelTabs.d.ts +2 -2
  121. package/lib/elements/HawaPhoneInput.d.ts +2 -2
  122. package/lib/elements/HawaPinInput.d.ts +2 -2
  123. package/lib/elements/HawaPricingCard.d.ts +2 -2
  124. package/lib/elements/HawaRadio.d.ts +2 -2
  125. package/lib/elements/HawaRange.d.ts +2 -2
  126. package/lib/elements/HawaSearchBar.d.ts +2 -2
  127. package/lib/elements/HawaSelect.d.ts +2 -2
  128. package/lib/elements/HawaSettingsRow.d.ts +2 -2
  129. package/lib/elements/HawaSpinner.d.ts +2 -2
  130. package/lib/elements/HawaStats.d.ts +2 -2
  131. package/lib/elements/HawaStepper.d.ts +2 -2
  132. package/lib/elements/HawaStoreButtons.d.ts +2 -2
  133. package/lib/elements/HawaSwitch.d.ts +2 -2
  134. package/lib/elements/HawaTable.d.ts +2 -2
  135. package/lib/elements/HawaTabs.d.ts +2 -2
  136. package/lib/elements/HawaTextField.d.ts +3 -3
  137. package/lib/elements/HawaTooltip.d.ts +3 -3
  138. package/lib/elements/HawaTypography.d.ts +2 -2
  139. package/lib/elements/InvoiceAccordion.d.ts +2 -2
  140. package/lib/elements/SubsectionList.d.ts +2 -2
  141. package/lib/elements/TabPanel.d.ts +2 -2
  142. package/lib/elements/UsageCard.d.ts +2 -2
  143. package/lib/elements/UserFeedback.d.ts +2 -2
  144. package/lib/index.js +2 -2
  145. package/package.json +1 -1
  146. package/src/blocks/Account/HawaApiBox.tsx +2 -4
  147. package/src/blocks/Account/UserProfileForm.tsx +2 -4
  148. package/src/blocks/Account/UserSettingsForm.tsx +2 -6
  149. package/src/blocks/AuthForms/AppLanding.tsx +2 -2
  150. package/src/blocks/AuthForms/CodeConfirmation.tsx +2 -4
  151. package/src/blocks/AuthForms/NewPasswordForm.tsx +2 -4
  152. package/src/blocks/AuthForms/ResetPasswordForm.tsx +2 -4
  153. package/src/blocks/AuthForms/SignInForm.tsx +2 -2
  154. package/src/blocks/AuthForms/SignInPhone.tsx +2 -4
  155. package/src/blocks/AuthForms/SignUpForm.tsx +2 -2
  156. package/src/blocks/Misc/EmptyState.tsx +2 -4
  157. package/src/blocks/Misc/LeadGenerator.tsx +3 -3
  158. package/src/blocks/Misc/Newsletter.tsx +2 -2
  159. package/src/blocks/Misc/NoPermission.tsx +3 -6
  160. package/src/blocks/Misc/NotFound.tsx +2 -2
  161. package/src/blocks/Misc/Testimonial.tsx +5 -7
  162. package/src/blocks/Payment/ChargeWalletForm.tsx +2 -4
  163. package/src/blocks/Payment/CheckoutForm.tsx +2 -4
  164. package/src/blocks/Payment/Confirmation.tsx +3 -5
  165. package/src/blocks/Payment/CreditCardForm.tsx +2 -4
  166. package/src/blocks/Payment/PayWithWallet.tsx +2 -4
  167. package/src/blocks/Payment/SelectPayment.tsx +2 -4
  168. package/src/blocks/Pricing/ComparingPlans.tsx +4 -6
  169. package/src/blocks/Pricing/PricingPlans.tsx +2 -4
  170. package/src/blocks/Referral/ReferralAccount.tsx +2 -2
  171. package/src/blocks/Referral/ReferralSettlement.tsx +6 -4
  172. package/src/blocks/Referral/ReferralStats.tsx +2 -2
  173. package/src/elements/ArrowCarousel.tsx +2 -2
  174. package/src/elements/AutoCompleteField.tsx +5 -7
  175. package/src/elements/BackToTop.tsx +3 -3
  176. package/src/elements/Breadcrumb.tsx +3 -6
  177. package/src/elements/DragDropImages.tsx +3 -7
  178. package/src/elements/DraggableCard.tsx +2 -4
  179. package/src/elements/HawaAccordion.tsx +6 -14
  180. package/src/elements/HawaAdCard.tsx +2 -5
  181. package/src/elements/HawaCardInput.tsx +1 -1
  182. package/src/elements/HawaCheckbox.tsx +2 -4
  183. package/src/elements/HawaChip.tsx +10 -4
  184. package/src/elements/HawaColorPicker.tsx +7 -7
  185. package/src/elements/HawaCopyrights.tsx +8 -6
  186. package/src/elements/HawaDatepicker.tsx +1 -1
  187. package/src/elements/HawaDrawer.tsx +3 -3
  188. package/src/elements/HawaIconCount.tsx +5 -5
  189. package/src/elements/HawaItemCard.tsx +10 -10
  190. package/src/elements/HawaLandingCard.tsx +3 -3
  191. package/src/elements/HawaLogoButton.tsx +2 -4
  192. package/src/elements/HawaMenu.tsx +4 -4
  193. package/src/elements/HawaModal.tsx +2 -2
  194. package/src/elements/HawaPanelTabs.tsx +2 -4
  195. package/src/elements/HawaPhoneInput.tsx +3 -5
  196. package/src/elements/HawaPinInput.tsx +2 -2
  197. package/src/elements/HawaPricingCard.tsx +2 -2
  198. package/src/elements/HawaRadio.tsx +2 -2
  199. package/src/elements/HawaRange.tsx +3 -3
  200. package/src/elements/HawaSearchBar.tsx +2 -4
  201. package/src/elements/HawaSelect.tsx +5 -5
  202. package/src/elements/HawaSettingsRow.tsx +2 -2
  203. package/src/elements/HawaSnackbar.tsx +2 -2
  204. package/src/elements/HawaSpinner.tsx +2 -5
  205. package/src/elements/HawaStats.tsx +2 -2
  206. package/src/elements/HawaStepper.tsx +2 -2
  207. package/src/elements/HawaStoreButtons.tsx +3 -5
  208. package/src/elements/HawaSwitch.tsx +2 -5
  209. package/src/elements/HawaTable.tsx +5 -3
  210. package/src/elements/HawaTabs.tsx +4 -4
  211. package/src/elements/HawaTextField.tsx +3 -3
  212. package/src/elements/HawaTooltip.tsx +3 -3
  213. package/src/elements/HawaTypography.tsx +2 -4
  214. package/src/elements/InvoiceAccordion.tsx +2 -4
  215. package/src/elements/SubsectionList.tsx +3 -5
  216. package/src/elements/TabPanel.tsx +2 -2
  217. package/src/elements/UsageCard.tsx +2 -2
  218. package/src/elements/UserFeedback.tsx +2 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.243",
3
+ "version": "0.0.244",
4
4
  "description": "SaaS Oriented UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -1,13 +1,11 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
 
3
3
  type HawaApiBoxTypes = {
4
4
  lang?: any
5
5
  onClick?: any
6
6
  buttonText?: any
7
7
  }
8
- export const HawaApiBox: React.FunctionComponent<HawaApiBoxTypes> = (
9
- props
10
- ) => {
8
+ export const HawaApiBox: FC<HawaApiBoxTypes> = (props) => {
11
9
  let isArabic = props.lang === "ar"
12
10
  let logoElement: any = ""
13
11
  return <div>test</div>
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton, HawaPhoneInput, HawaTextField } from "../../elements"
3
3
  import { Controller, FormProvider, useForm } from "react-hook-form"
4
4
  import { HawaContainer } from "../../layout"
@@ -9,9 +9,7 @@ type UserProfileFormTypes = {
9
9
  handleUpdateProfile: any
10
10
  }
11
11
 
12
- export const UserProfileForm: React.FunctionComponent<UserProfileFormTypes> = (
13
- props
14
- ) => {
12
+ export const UserProfileForm: FC<UserProfileFormTypes> = (props) => {
15
13
  const methods = useForm()
16
14
  const { inputs } = props
17
15
  const {
@@ -1,6 +1,4 @@
1
- import React from "react"
2
- import { HawaButton } from "../../elements"
3
- import { HawaContainer } from "../../layout"
1
+ import { FC } from "react"
4
2
 
5
3
  type UserSettingsFormTypes = {
6
4
  children: any
@@ -9,9 +7,7 @@ type UserSettingsFormTypes = {
9
7
  blockTitle?: string
10
8
  }
11
9
 
12
- export const UserSettingsForm: React.FunctionComponent<
13
- UserSettingsFormTypes
14
- > = (props) => {
10
+ export const UserSettingsForm: FC<UserSettingsFormTypes> = (props) => {
15
11
  return (
16
12
  <div>
17
13
  <div className="mb-2 text-sm font-bold">{props.blockTitle}</div>
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout/HawaContainer"
4
4
 
@@ -13,7 +13,7 @@ type AppLandingTypes = {
13
13
  }
14
14
  size: "small" | "normal" | "full"
15
15
  }
16
- export const AppLanding: React.FunctionComponent<AppLandingTypes> = (props) => {
16
+ export const AppLanding: FC<AppLandingTypes> = (props) => {
17
17
  return (
18
18
  <HawaContainer maxWidth={props.size}>
19
19
  {props.handleSignIn && (
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react"
1
+ import { useState, FC } from "react"
2
2
  import { HawaAlert, HawaButton, HawaPinInput } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -22,9 +22,7 @@ type TConfirmation = {
22
22
  handleSignIn?: any
23
23
  }
24
24
 
25
- export const CodeConfirmation: React.FunctionComponent<TConfirmation> = (
26
- props
27
- ) => {
25
+ export const CodeConfirmation: FC<TConfirmation> = (props) => {
28
26
  const [pins, setPins] = useState(null)
29
27
  return (
30
28
  <HawaContainer>
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react"
1
+ import { useState, FC } from "react"
2
2
  import { HawaTextField, HawaAlert, HawaButton } from "../../elements"
3
3
  import { Controller, FormProvider, useForm } from "react-hook-form"
4
4
  import { HawaContainer } from "../../layout"
@@ -19,9 +19,7 @@ type NewPasswordTypes = {
19
19
  }
20
20
  }
21
21
 
22
- export const NewPasswordForm: React.FunctionComponent<NewPasswordTypes> = (
23
- props
24
- ) => {
22
+ export const NewPasswordForm: FC<NewPasswordTypes> = (props) => {
25
23
  const [matchError, setMatchError] = useState(false)
26
24
  const methods = useForm()
27
25
  const {
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { Controller, useForm } from "react-hook-form"
3
3
  import { HawaButton, HawaTextField } from "../../elements"
4
4
  import { HawaContainer } from "../../layout"
@@ -19,9 +19,7 @@ type ResetPasswordType = {
19
19
  }
20
20
  }
21
21
 
22
- export const ResetPasswordForm: React.FunctionComponent<ResetPasswordType> = (
23
- props
24
- ) => {
22
+ export const ResetPasswordForm: FC<ResetPasswordType> = (props) => {
25
23
  const methods = useForm()
26
24
  const {
27
25
  formState: { errors },
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import {
3
3
  HawaTextField,
4
4
  HawaLogoButton,
@@ -9,7 +9,7 @@ import {
9
9
  import { Controller, useForm } from "react-hook-form"
10
10
  import { HawaContainer } from "../../layout"
11
11
 
12
- export const SignInForm: React.FunctionComponent<SignInFormTypes> = (props) => {
12
+ export const SignInForm: FC<SignInFormTypes> = (props) => {
13
13
  const {
14
14
  formState: { errors },
15
15
  handleSubmit,
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react"
1
+ import { useState, FC } from "react"
2
2
  import { Controller, useForm } from "react-hook-form"
3
3
  import { HawaButton, HawaPhoneInput } from "../../elements"
4
4
  import { HawaContainer } from "../../layout"
@@ -14,9 +14,7 @@ type SignInPhoneTypes = {
14
14
  handleSignIn: any
15
15
  }
16
16
 
17
- export const SignInPhone: React.FunctionComponent<SignInPhoneTypes> = (
18
- props
19
- ) => {
17
+ export const SignInPhone: FC<SignInPhoneTypes> = (props) => {
20
18
  const methods = useForm()
21
19
  const {
22
20
  formState: { errors },
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import {
3
3
  HawaTextField,
4
4
  HawaLogoButton,
@@ -63,7 +63,7 @@ type SignUpFormTypes = {
63
63
  isLoading?: boolean
64
64
  }
65
65
 
66
- export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
66
+ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
67
67
  const methods = useForm()
68
68
  const {
69
69
  formState: { errors },
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
  import { FaCheck } from "react-icons/fa"
@@ -7,9 +7,7 @@ type TEmptyState = {
7
7
  variant?: "outlined" | "contained" | "neobrutalism"
8
8
  }
9
9
 
10
- export const EmptyState: React.FunctionComponent<TEmptyState> = ({
11
- variant = "contained",
12
- }) => {
10
+ export const EmptyState: FC<TEmptyState> = ({ variant = "contained" }) => {
13
11
  return (
14
12
  <HawaContainer variant={variant} centered={true}>
15
13
  <div className="flex flex-col items-center justify-center text-center dark:text-white">
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton, HawaTextField } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -12,14 +12,14 @@ type TLeadGenerator = {
12
12
  handleNewsletterSub: (e: string) => void
13
13
  }
14
14
 
15
- export const LeadGenerator: React.FunctionComponent<TLeadGenerator> = ({
15
+ export const LeadGenerator: FC<TLeadGenerator> = ({
16
16
  variant = "contained",
17
17
  texts,
18
18
  handleNewsletterSub,
19
19
  }) => {
20
20
  return (
21
21
  <HawaContainer variant={variant}>
22
- <div className="p-0 mb-4 pt-0">
22
+ <div className="mb-4 p-0 pt-0">
23
23
  <h1 className="font-bold">{texts?.title}</h1>
24
24
  <span>{texts?.subtitle}</span>
25
25
  </div>
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton, HawaTextField } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -12,7 +12,7 @@ type TNewsletter = {
12
12
  handleNewsletterSub: (e: string) => void
13
13
  }
14
14
 
15
- export const Newsletter: React.FunctionComponent<TNewsletter> = ({
15
+ export const Newsletter: FC<TNewsletter> = ({
16
16
  variant = "contained",
17
17
  texts,
18
18
  handleNewsletterSub,
@@ -1,15 +1,12 @@
1
- import React from "react"
2
- import { HawaButton } from "../../elements"
1
+ import { FC } from "react"
3
2
  import { HawaContainer } from "../../layout"
4
- import { FaLock } from "react-icons/fa"
3
+ import { FaLock } from "react-icons/fa"
5
4
 
6
5
  type TNoPermission = {
7
6
  variant?: "outlined" | "contained" | "neobrutalism"
8
7
  }
9
8
 
10
- export const NoPermission: React.FunctionComponent<TNoPermission> = ({
11
- variant = "contained",
12
- }) => {
9
+ export const NoPermission: FC<TNoPermission> = ({ variant = "contained" }) => {
13
10
  return (
14
11
  <HawaContainer variant={variant} centered={true}>
15
12
  <div className="flex flex-col items-center justify-center text-center dark:text-white">
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -11,7 +11,7 @@ type NotFoundTypes = {
11
11
  }
12
12
  }
13
13
 
14
- export const NotFound: React.FunctionComponent<NotFoundTypes> = ({
14
+ export const NotFound: FC<NotFoundTypes> = ({
15
15
  variant = "contained",
16
16
  texts,
17
17
  }) => {
@@ -1,14 +1,12 @@
1
- import React from "react"
2
- import { HawaButton } from "../../elements"
3
- import { HawaContainer } from "../../layout"
4
- import { FaCheck } from "react-icons/fa"
1
+ import { FC } from "react"
2
+ // import { HawaButton } from "../../elements"
3
+ // import { HawaContainer } from "../../layout"
4
+ // import { FaCheck } from "react-icons/fa"
5
5
  type TEmptyState = {
6
6
  variant?: "outlined" | "contained" | "neobrutalism"
7
7
  }
8
8
 
9
- export const Testimonial: React.FunctionComponent<TEmptyState> = ({
10
- variant = "contained",
11
- }) => {
9
+ export const Testimonial: FC<TEmptyState> = ({ variant = "contained" }) => {
12
10
  return (
13
11
  <div
14
12
  className="flex flex-col gap-2 rounded border-2 border-gray-200 bg-white p-4"
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react"
1
+ import { useState, FC } from "react"
2
2
  import { HawaButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -11,9 +11,7 @@ type ChargeWalletTypes = {
11
11
  chargeWallet: string
12
12
  }
13
13
  }
14
- export const ChargeWalletForm: React.FunctionComponent<ChargeWalletTypes> = (
15
- props
16
- ) => {
14
+ export const ChargeWalletForm: FC<ChargeWalletTypes> = (props) => {
17
15
  const [walletAmount, setWalletAmount] = useState(0)
18
16
 
19
17
  return (
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import {
3
3
  HawaTextField,
4
4
  HawaTable,
@@ -34,9 +34,7 @@ type CheckoutFormTypes = {
34
34
  }
35
35
  }
36
36
 
37
- export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
38
- props
39
- ) => {
37
+ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
40
38
  let isArabic = props.lang === "ar"
41
39
  const methods = useForm()
42
40
  const {
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton, HawaTable } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -40,9 +40,7 @@ type ConfirmationPageTypes = {
40
40
  handleRefundPolicyLink: any
41
41
  }
42
42
 
43
- export const ConfirmationPage: React.FunctionComponent<
44
- ConfirmationPageTypes
45
- > = (props) => {
43
+ export const ConfirmationPage: FC<ConfirmationPageTypes> = (props) => {
46
44
  let isArabic = props.lang === "ar"
47
45
 
48
46
  return (
@@ -83,7 +81,7 @@ export const ConfirmationPage: React.FunctionComponent<
83
81
  <HawaButton color="primary" width="full" onClick={props.handleHome}>
84
82
  {props.texts.homePage}
85
83
  </HawaButton>
86
- <div className="mt-5 mb-5 text-center text-sm">
84
+ <div className="mb-5 mt-5 text-center text-sm">
87
85
  {props.texts.fasterPaymentNote}
88
86
  </div>
89
87
  <a
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton, HawaTextField } from "../../elements"
3
3
  import { Controller, useForm } from "react-hook-form"
4
4
  import { HawaContainer } from "../../layout"
@@ -8,9 +8,7 @@ type CreditCardFormTypes = {
8
8
  handlePayWithCreditCard: any
9
9
  }
10
10
 
11
- export const CreditCardForm: React.FunctionComponent<CreditCardFormTypes> = (
12
- props
13
- ) => {
11
+ export const CreditCardForm: FC<CreditCardFormTypes> = (props) => {
14
12
  const methods = useForm()
15
13
  const {
16
14
  formState: { errors },
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -7,9 +7,7 @@ type PayWithWalletTypes = {
7
7
  currency: any
8
8
  handlePayWithWallet: any
9
9
  }
10
- export const PayWithWallet: React.FunctionComponent<PayWithWalletTypes> = (
11
- props
12
- ) => {
10
+ export const PayWithWallet: FC<PayWithWalletTypes> = (props) => {
13
11
  return (
14
12
  <HawaContainer>
15
13
  <div className="text-center text-5xl font-extrabold">
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaTypography, HawaLogoButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -26,9 +26,7 @@ type SelectPaymentTypes = {
26
26
  handleGooglePay: any
27
27
  }
28
28
 
29
- export const SelectPayment: React.FunctionComponent<SelectPaymentTypes> = (
30
- props
31
- ) => {
29
+ export const SelectPayment: FC<SelectPaymentTypes> = (props) => {
32
30
  return (
33
31
  <HawaContainer>
34
32
  <HawaTypography>Choose Payment Method</HawaTypography>
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react"
1
+ import { useState, FC } from "react"
2
2
  import { BsExclamationCircleFill } from "react-icons/bs"
3
3
  import { HawaTabs, HawaTooltip } from "../../elements"
4
4
 
@@ -66,9 +66,7 @@ type ComparingPlansTypes = {
66
66
  onCurrencyChange?: (e) => void
67
67
  direction?: "rtl" | "ltr"
68
68
  }
69
- export const ComparingPlans: React.FunctionComponent<ComparingPlansTypes> = (
70
- props
71
- ) => {
69
+ export const ComparingPlans: FC<ComparingPlansTypes> = (props) => {
72
70
  const [currentCurrency, setCurrentCurrency] = useState("SAR")
73
71
  const [currentCycle, setCurrentCycle] = useState("month")
74
72
 
@@ -95,7 +93,7 @@ export const ComparingPlans: React.FunctionComponent<ComparingPlansTypes> = (
95
93
  />
96
94
  </div>
97
95
  <div className=" overflow-hidden rounded">
98
- <div className="grid grid-cols-4 gap-x-2 border-t border-b border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white">
96
+ <div className="grid grid-cols-4 gap-x-2 border-b border-t border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white">
99
97
  <div className="flex items-center"></div>
100
98
  {props.plans.map((plan: any) => (
101
99
  <div>
@@ -125,7 +123,7 @@ export const ComparingPlans: React.FunctionComponent<ComparingPlansTypes> = (
125
123
  {props.plans?.map((plan) => {
126
124
  return plan.features.map((feature) => {
127
125
  return (
128
- <div className="grid grid-cols-4 gap-x-16 border-b border-gray-200 py-5 px-4 text-sm text-gray-700 dark:border-gray-700">
126
+ <div className="grid grid-cols-4 gap-x-16 border-b border-gray-200 px-4 py-5 text-sm text-gray-700 dark:border-gray-700">
129
127
  <div className=" flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400">
130
128
  {feature.text}
131
129
  {feature.description && (
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaPricingCard, HawaTabs } from "../../elements"
3
3
 
4
4
  type PricingPlansTypes = {
@@ -42,9 +42,7 @@ type PricingPlansTypes = {
42
42
  onCurrencyChange?: (e) => void
43
43
  direction?: "rtl" | "ltr"
44
44
  }
45
- export const PricingPlans: React.FunctionComponent<PricingPlansTypes> = (
46
- props
47
- ) => {
45
+ export const PricingPlans: FC<PricingPlansTypes> = (props) => {
48
46
  return (
49
47
  <div>
50
48
  <div className="mb-2 flex w-full justify-between">
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { FaClone } from "react-icons/fa"
3
3
  import { HawaButton } from "../../elements"
4
4
  import { HawaContainer } from "../../layout"
@@ -8,7 +8,7 @@ type ReferralAccount = {
8
8
  referralCode: string
9
9
  }
10
10
 
11
- export const ReferralAccount: React.FunctionComponent<ReferralAccount> = ({
11
+ export const ReferralAccount: FC<ReferralAccount> = ({
12
12
  referralLink,
13
13
  referralCode,
14
14
  }) => {
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { FaTimes } from "react-icons/fa"
3
3
  import {
4
4
  HawaAlert,
@@ -16,9 +16,11 @@ type TReferralSettlement = {
16
16
  withdrawError?: string
17
17
  }
18
18
 
19
- export const ReferralSettlement: React.FunctionComponent<
20
- TReferralSettlement
21
- > = ({ referralLink, referralCode, withdrawError }) => {
19
+ export const ReferralSettlement: FC<TReferralSettlement> = ({
20
+ referralLink,
21
+ referralCode,
22
+ withdrawError,
23
+ }) => {
22
24
  const methods = useForm()
23
25
  const {
24
26
  formState: { errors },
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { HawaAlert, HawaButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
 
@@ -8,7 +8,7 @@ type TReferralStats = {
8
8
  withdrawError?: string
9
9
  }
10
10
 
11
- export const ReferralStats: React.FunctionComponent<TReferralStats> = ({
11
+ export const ReferralStats: FC<TReferralStats> = ({
12
12
  referralLink,
13
13
  referralCode,
14
14
  withdrawError,
@@ -1,5 +1,5 @@
1
1
  import clsx from "clsx"
2
- import { useEffect, useState, FunctionComponent } from "react"
2
+ import { useEffect, useState, FC } from "react"
3
3
 
4
4
  type Item = {
5
5
  label?: string
@@ -41,7 +41,7 @@ const Arrow = (props: {
41
41
  )
42
42
  }
43
43
 
44
- export const ArrowCarousel: FunctionComponent<ComponentTypes> = (props) => {
44
+ export const ArrowCarousel: FC<ComponentTypes> = (props) => {
45
45
  const [index, setIndex] = useState(props.index || 0)
46
46
 
47
47
  useEffect(() => {
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import { Controller, useFormContext } from "react-hook-form"
3
3
 
4
4
  type TAutoCompleteFieldTypes = {
@@ -6,20 +6,18 @@ type TAutoCompleteFieldTypes = {
6
6
  rules: any
7
7
  shouldUnregister: boolean
8
8
  }
9
- export const AutoCompleteField: React.FunctionComponent<
10
- TAutoCompleteFieldTypes
11
- > = (props) => {
9
+ export const AutoCompleteField: FC<TAutoCompleteFieldTypes> = (props) => {
12
10
  const { control } = useFormContext()
13
11
  const { name, rules, shouldUnregister } = props
14
12
 
15
13
  return (
16
- <React.Fragment>
14
+ <>
17
15
  <Controller
16
+ // className="theme_form_input"
18
17
  name={name}
19
18
  rules={rules}
20
19
  control={control}
21
20
  shouldUnregister={shouldUnregister}
22
- // className="theme_form_input"
23
21
  render={({ field: { onChange, value } }) => {
24
22
  return (
25
23
  <input type="text" />
@@ -34,6 +32,6 @@ export const AutoCompleteField: React.FunctionComponent<
34
32
  )
35
33
  }}
36
34
  />
37
- </React.Fragment>
35
+ </>
38
36
  )
39
37
  }
@@ -1,4 +1,4 @@
1
- import React, { FunctionComponent, useState, useEffect } from "react"
1
+ import { FC, RefObject, useState, useEffect } from "react"
2
2
  import { clsx } from "clsx"
3
3
 
4
4
  type ComponentTypes = {
@@ -6,10 +6,10 @@ type ComponentTypes = {
6
6
  paddingY?: number // Vertical padding relative to the attached corner
7
7
  paddingThreshold?: number // Increase to the threshold of the scroll value that has to be passed for the button to appear
8
8
  corner?: "top-left" | "top-right" | "bottom-left" | "bottom-right"
9
- anchor: React.RefObject<HTMLInputElement>
9
+ anchor: RefObject<HTMLInputElement>
10
10
  }
11
11
 
12
- export const BackToTop: FunctionComponent<ComponentTypes> = ({ ...props }) => {
12
+ export const BackToTop: FC<ComponentTypes> = ({ ...props }) => {
13
13
  const [visible, setVisible] = useState<boolean>(false)
14
14
 
15
15
  const getCoords = () => {
@@ -1,18 +1,15 @@
1
- import React, { FC, ReactNode } from "react"
1
+ import { FC, ReactNode } from "react"
2
2
 
3
3
  type TBreadcrumb = {
4
- /**
5
- * The array of crumbs, each one with a label and a href link
6
- */
4
+ /** The array of crumbs, each one with a label and a href link */
7
5
  breadcrumbLinks: [{ label: string; href: string }]
8
- /** The separator between each crumb, can be character or React Node */
6
+ /** The separator between each crumb, can be character or React Node. The default is ">" */
9
7
  separator?: string | ReactNode
10
8
  }
11
9
 
12
10
  const HawaBreadcrumb: FC<TBreadcrumb> = ({
13
11
  breadcrumbLinks,
14
12
  separator = ">",
15
- ...props
16
13
  }) => {
17
14
  return (
18
15
  <div className="flex flex-row items-center gap-2 text-sm">
@@ -2,11 +2,9 @@ import React, { useEffect, useState } from "react"
2
2
  import { useDropzone } from "react-dropzone"
3
3
  import { HawaAlert } from "./HawaAlert"
4
4
  import { HawaButton } from "./HawaButton"
5
-
5
+ //TODO: This element needs more improvements and testing
6
6
  type DragDropImagesTypes = {
7
- /**
8
- * The text label above the component. Consistant with the other form input fields
9
- */
7
+ /** The text label above the component. Consistant with the other form input fields */
10
8
  label?: string
11
9
  files: [File]
12
10
  setFiles: any
@@ -19,9 +17,7 @@ type DragDropImagesTypes = {
19
17
  onClearFiles: any
20
18
  maxSize: number
21
19
  errorMessages: string
22
- /**
23
- * The translation object, use this to replace the default text with any translated text you want.
24
- */
20
+ /** The translation object, use this to replace the default text with any translated text you want.*/
25
21
  texts: {
26
22
  clickHereToUpload: string
27
23
  maxFileSize: string
@@ -1,12 +1,10 @@
1
- import React, { ReactElement } from "react"
1
+ import { ReactElement, FC } from "react"
2
2
 
3
3
  type DraggableCardTypes = {
4
4
  children: ReactElement
5
5
  }
6
6
 
7
- export const DraggableCard: React.FunctionComponent<DraggableCardTypes> = (
8
- props
9
- ) => {
7
+ export const DraggableCard: FC<DraggableCardTypes> = (props) => {
10
8
  return (
11
9
  <div className="flex flex-row rounded bg-layoutPrimary-500 p-4">
12
10
  <button