@sikka/hawa 0.0.243 → 0.0.245

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 (229) hide show
  1. package/dist/styles.css +8 -3
  2. package/es/blocks/Account/HawaApiBox.d.ts +2 -2
  3. package/es/blocks/Account/UserProfileForm.d.ts +2 -2
  4. package/es/blocks/Account/UserSettingsForm.d.ts +2 -2
  5. package/es/blocks/AuthForms/AppLanding.d.ts +2 -2
  6. package/es/blocks/AuthForms/CodeConfirmation.d.ts +3 -3
  7. package/es/blocks/AuthForms/NewPasswordForm.d.ts +2 -2
  8. package/es/blocks/AuthForms/ResetPasswordForm.d.ts +2 -2
  9. package/es/blocks/AuthForms/SignInForm.d.ts +2 -2
  10. package/es/blocks/AuthForms/SignInPhone.d.ts +2 -2
  11. package/es/blocks/AuthForms/SignUpForm.d.ts +2 -2
  12. package/es/blocks/Misc/EmptyState.d.ts +7 -2
  13. package/es/blocks/Misc/LeadGenerator.d.ts +2 -2
  14. package/es/blocks/Misc/Newsletter.d.ts +2 -2
  15. package/es/blocks/Misc/NoPermission.d.ts +6 -2
  16. package/es/blocks/Misc/NotFound.d.ts +2 -2
  17. package/es/blocks/Misc/Testimonial.d.ts +2 -2
  18. package/es/blocks/Payment/ChargeWalletForm.d.ts +2 -2
  19. package/es/blocks/Payment/CheckoutForm.d.ts +2 -2
  20. package/es/blocks/Payment/Confirmation.d.ts +2 -2
  21. package/es/blocks/Payment/CreditCardForm.d.ts +2 -2
  22. package/es/blocks/Payment/PayWithWallet.d.ts +2 -2
  23. package/es/blocks/Payment/SelectPayment.d.ts +2 -2
  24. package/es/blocks/Pricing/ComparingPlans.d.ts +2 -2
  25. package/es/blocks/Pricing/PricingPlans.d.ts +2 -2
  26. package/es/blocks/Referral/ReferralAccount.d.ts +2 -2
  27. package/es/blocks/Referral/ReferralSettlement.d.ts +2 -2
  28. package/es/blocks/Referral/ReferralStats.d.ts +2 -2
  29. package/es/elements/ArrowCarousel.d.ts +2 -2
  30. package/es/elements/AutoCompleteField.d.ts +2 -2
  31. package/es/elements/BackToTop.d.ts +3 -3
  32. package/es/elements/Breadcrumb.d.ts +2 -4
  33. package/es/elements/DragDropImages.d.ts +2 -6
  34. package/es/elements/DraggableCard.d.ts +2 -2
  35. package/es/elements/HawaAccordion.d.ts +5 -11
  36. package/es/elements/HawaAdCard.d.ts +2 -2
  37. package/es/elements/HawaCardInput.d.ts +2 -2
  38. package/es/elements/HawaCheckbox.d.ts +2 -2
  39. package/es/elements/HawaChip.d.ts +9 -3
  40. package/es/elements/HawaColorPicker.d.ts +5 -3
  41. package/es/elements/HawaCopyrights.d.ts +8 -4
  42. package/es/elements/HawaDrawer.d.ts +2 -2
  43. package/es/elements/HawaIconCount.d.ts +5 -3
  44. package/es/elements/HawaItemCard.d.ts +10 -6
  45. package/es/elements/HawaLandingCard.d.ts +2 -2
  46. package/es/elements/HawaLogoButton.d.ts +2 -2
  47. package/es/elements/HawaMenu.d.ts +2 -2
  48. package/es/elements/HawaModal.d.ts +2 -2
  49. package/es/elements/HawaPanelTabs.d.ts +2 -2
  50. package/es/elements/HawaPhoneInput.d.ts +2 -2
  51. package/es/elements/HawaPinInput.d.ts +2 -2
  52. package/es/elements/HawaPricingCard.d.ts +2 -2
  53. package/es/elements/HawaRadio.d.ts +2 -2
  54. package/es/elements/HawaRange.d.ts +2 -2
  55. package/es/elements/HawaSearchBar.d.ts +2 -2
  56. package/es/elements/HawaSelect.d.ts +2 -2
  57. package/es/elements/HawaSettingsRow.d.ts +2 -2
  58. package/es/elements/HawaSpinner.d.ts +2 -2
  59. package/es/elements/HawaStats.d.ts +2 -2
  60. package/es/elements/HawaStepper.d.ts +2 -2
  61. package/es/elements/HawaStoreButtons.d.ts +2 -2
  62. package/es/elements/HawaSwitch.d.ts +2 -2
  63. package/es/elements/HawaTable.d.ts +2 -2
  64. package/es/elements/HawaTabs.d.ts +2 -2
  65. package/es/elements/HawaTextField.d.ts +3 -3
  66. package/es/elements/HawaTooltip.d.ts +3 -3
  67. package/es/elements/HawaTypography.d.ts +2 -2
  68. package/es/elements/InvoiceAccordion.d.ts +2 -2
  69. package/es/elements/SubsectionList.d.ts +2 -2
  70. package/es/elements/TabPanel.d.ts +2 -2
  71. package/es/elements/UsageCard.d.ts +2 -2
  72. package/es/elements/UserFeedback.d.ts +2 -2
  73. package/es/index.es.js +2 -2
  74. package/es/layout/HawaAppLayout.d.ts +1 -0
  75. package/es/layout/index.d.ts +0 -1
  76. package/lib/blocks/Account/HawaApiBox.d.ts +2 -2
  77. package/lib/blocks/Account/UserProfileForm.d.ts +2 -2
  78. package/lib/blocks/Account/UserSettingsForm.d.ts +2 -2
  79. package/lib/blocks/AuthForms/AppLanding.d.ts +2 -2
  80. package/lib/blocks/AuthForms/CodeConfirmation.d.ts +3 -3
  81. package/lib/blocks/AuthForms/NewPasswordForm.d.ts +2 -2
  82. package/lib/blocks/AuthForms/ResetPasswordForm.d.ts +2 -2
  83. package/lib/blocks/AuthForms/SignInForm.d.ts +2 -2
  84. package/lib/blocks/AuthForms/SignInPhone.d.ts +2 -2
  85. package/lib/blocks/AuthForms/SignUpForm.d.ts +2 -2
  86. package/lib/blocks/Misc/EmptyState.d.ts +7 -2
  87. package/lib/blocks/Misc/LeadGenerator.d.ts +2 -2
  88. package/lib/blocks/Misc/Newsletter.d.ts +2 -2
  89. package/lib/blocks/Misc/NoPermission.d.ts +6 -2
  90. package/lib/blocks/Misc/NotFound.d.ts +2 -2
  91. package/lib/blocks/Misc/Testimonial.d.ts +2 -2
  92. package/lib/blocks/Payment/ChargeWalletForm.d.ts +2 -2
  93. package/lib/blocks/Payment/CheckoutForm.d.ts +2 -2
  94. package/lib/blocks/Payment/Confirmation.d.ts +2 -2
  95. package/lib/blocks/Payment/CreditCardForm.d.ts +2 -2
  96. package/lib/blocks/Payment/PayWithWallet.d.ts +2 -2
  97. package/lib/blocks/Payment/SelectPayment.d.ts +2 -2
  98. package/lib/blocks/Pricing/ComparingPlans.d.ts +2 -2
  99. package/lib/blocks/Pricing/PricingPlans.d.ts +2 -2
  100. package/lib/blocks/Referral/ReferralAccount.d.ts +2 -2
  101. package/lib/blocks/Referral/ReferralSettlement.d.ts +2 -2
  102. package/lib/blocks/Referral/ReferralStats.d.ts +2 -2
  103. package/lib/elements/ArrowCarousel.d.ts +2 -2
  104. package/lib/elements/AutoCompleteField.d.ts +2 -2
  105. package/lib/elements/BackToTop.d.ts +3 -3
  106. package/lib/elements/Breadcrumb.d.ts +2 -4
  107. package/lib/elements/DragDropImages.d.ts +2 -6
  108. package/lib/elements/DraggableCard.d.ts +2 -2
  109. package/lib/elements/HawaAccordion.d.ts +5 -11
  110. package/lib/elements/HawaAdCard.d.ts +2 -2
  111. package/lib/elements/HawaCardInput.d.ts +2 -2
  112. package/lib/elements/HawaCheckbox.d.ts +2 -2
  113. package/lib/elements/HawaChip.d.ts +9 -3
  114. package/lib/elements/HawaColorPicker.d.ts +5 -3
  115. package/lib/elements/HawaCopyrights.d.ts +8 -4
  116. package/lib/elements/HawaDrawer.d.ts +2 -2
  117. package/lib/elements/HawaIconCount.d.ts +5 -3
  118. package/lib/elements/HawaItemCard.d.ts +10 -6
  119. package/lib/elements/HawaLandingCard.d.ts +2 -2
  120. package/lib/elements/HawaLogoButton.d.ts +2 -2
  121. package/lib/elements/HawaMenu.d.ts +2 -2
  122. package/lib/elements/HawaModal.d.ts +2 -2
  123. package/lib/elements/HawaPanelTabs.d.ts +2 -2
  124. package/lib/elements/HawaPhoneInput.d.ts +2 -2
  125. package/lib/elements/HawaPinInput.d.ts +2 -2
  126. package/lib/elements/HawaPricingCard.d.ts +2 -2
  127. package/lib/elements/HawaRadio.d.ts +2 -2
  128. package/lib/elements/HawaRange.d.ts +2 -2
  129. package/lib/elements/HawaSearchBar.d.ts +2 -2
  130. package/lib/elements/HawaSelect.d.ts +2 -2
  131. package/lib/elements/HawaSettingsRow.d.ts +2 -2
  132. package/lib/elements/HawaSpinner.d.ts +2 -2
  133. package/lib/elements/HawaStats.d.ts +2 -2
  134. package/lib/elements/HawaStepper.d.ts +2 -2
  135. package/lib/elements/HawaStoreButtons.d.ts +2 -2
  136. package/lib/elements/HawaSwitch.d.ts +2 -2
  137. package/lib/elements/HawaTable.d.ts +2 -2
  138. package/lib/elements/HawaTabs.d.ts +2 -2
  139. package/lib/elements/HawaTextField.d.ts +3 -3
  140. package/lib/elements/HawaTooltip.d.ts +3 -3
  141. package/lib/elements/HawaTypography.d.ts +2 -2
  142. package/lib/elements/InvoiceAccordion.d.ts +2 -2
  143. package/lib/elements/SubsectionList.d.ts +2 -2
  144. package/lib/elements/TabPanel.d.ts +2 -2
  145. package/lib/elements/UsageCard.d.ts +2 -2
  146. package/lib/elements/UserFeedback.d.ts +2 -2
  147. package/lib/index.js +2 -2
  148. package/lib/layout/HawaAppLayout.d.ts +1 -0
  149. package/lib/layout/index.d.ts +0 -1
  150. package/package.json +1 -1
  151. package/src/blocks/Account/HawaApiBox.tsx +2 -4
  152. package/src/blocks/Account/UserProfileForm.tsx +2 -4
  153. package/src/blocks/Account/UserSettingsForm.tsx +2 -6
  154. package/src/blocks/AuthForms/AppLanding.tsx +2 -2
  155. package/src/blocks/AuthForms/CodeConfirmation.tsx +3 -5
  156. package/src/blocks/AuthForms/NewPasswordForm.tsx +2 -4
  157. package/src/blocks/AuthForms/ResetPasswordForm.tsx +2 -4
  158. package/src/blocks/AuthForms/SignInForm.tsx +2 -2
  159. package/src/blocks/AuthForms/SignInPhone.tsx +2 -4
  160. package/src/blocks/AuthForms/SignUpForm.tsx +2 -2
  161. package/src/blocks/Misc/EmptyState.tsx +15 -7
  162. package/src/blocks/Misc/LeadGenerator.tsx +4 -6
  163. package/src/blocks/Misc/Newsletter.tsx +3 -3
  164. package/src/blocks/Misc/NoPermission.tsx +13 -10
  165. package/src/blocks/Misc/NotFound.tsx +4 -4
  166. package/src/blocks/Misc/Testimonial.tsx +25 -33
  167. package/src/blocks/Payment/ChargeWalletForm.tsx +9 -10
  168. package/src/blocks/Payment/CheckoutForm.tsx +20 -22
  169. package/src/blocks/Payment/Confirmation.tsx +7 -9
  170. package/src/blocks/Payment/CreditCardForm.tsx +2 -4
  171. package/src/blocks/Payment/PayWithWallet.tsx +2 -4
  172. package/src/blocks/Payment/SelectPayment.tsx +2 -4
  173. package/src/blocks/Pricing/ComparingPlans.tsx +4 -6
  174. package/src/blocks/Pricing/PricingPlans.tsx +2 -4
  175. package/src/blocks/Referral/ReferralAccount.tsx +2 -2
  176. package/src/blocks/Referral/ReferralSettlement.tsx +14 -7
  177. package/src/blocks/Referral/ReferralStats.tsx +2 -2
  178. package/src/elements/ArrowCarousel.tsx +2 -2
  179. package/src/elements/AutoCompleteField.tsx +5 -7
  180. package/src/elements/BackToTop.tsx +3 -3
  181. package/src/elements/Breadcrumb.tsx +3 -6
  182. package/src/elements/DragDropImages.tsx +3 -7
  183. package/src/elements/DraggableCard.tsx +2 -4
  184. package/src/elements/HawaAccordion.tsx +6 -14
  185. package/src/elements/HawaAdCard.tsx +2 -5
  186. package/src/elements/HawaCardInput.tsx +1 -1
  187. package/src/elements/HawaCheckbox.tsx +2 -4
  188. package/src/elements/HawaChip.tsx +10 -4
  189. package/src/elements/HawaColorPicker.tsx +7 -7
  190. package/src/elements/HawaCopyrights.tsx +8 -6
  191. package/src/elements/HawaDatepicker.tsx +1 -1
  192. package/src/elements/HawaDrawer.tsx +3 -3
  193. package/src/elements/HawaIconCount.tsx +5 -5
  194. package/src/elements/HawaItemCard.tsx +10 -10
  195. package/src/elements/HawaLandingCard.tsx +3 -3
  196. package/src/elements/HawaLogoButton.tsx +2 -4
  197. package/src/elements/HawaMenu.tsx +4 -4
  198. package/src/elements/HawaModal.tsx +2 -2
  199. package/src/elements/HawaPanelTabs.tsx +2 -4
  200. package/src/elements/HawaPhoneInput.tsx +3 -5
  201. package/src/elements/HawaPinInput.tsx +2 -2
  202. package/src/elements/HawaPricingCard.tsx +2 -2
  203. package/src/elements/HawaRadio.tsx +2 -2
  204. package/src/elements/HawaRange.tsx +3 -3
  205. package/src/elements/HawaSearchBar.tsx +2 -4
  206. package/src/elements/HawaSelect.tsx +5 -5
  207. package/src/elements/HawaSettingsRow.tsx +2 -2
  208. package/src/elements/HawaSnackbar.tsx +2 -2
  209. package/src/elements/HawaSpinner.tsx +2 -5
  210. package/src/elements/HawaStats.tsx +2 -2
  211. package/src/elements/HawaStepper.tsx +2 -2
  212. package/src/elements/HawaStoreButtons.tsx +3 -5
  213. package/src/elements/HawaSwitch.tsx +2 -5
  214. package/src/elements/HawaTable.tsx +5 -3
  215. package/src/elements/HawaTabs.tsx +4 -4
  216. package/src/elements/HawaTextField.tsx +4 -4
  217. package/src/elements/HawaTooltip.tsx +3 -3
  218. package/src/elements/HawaTypography.tsx +2 -4
  219. package/src/elements/InvoiceAccordion.tsx +2 -4
  220. package/src/elements/SubsectionList.tsx +3 -5
  221. package/src/elements/TabPanel.tsx +2 -2
  222. package/src/elements/UsageCard.tsx +2 -2
  223. package/src/elements/UserFeedback.tsx +2 -4
  224. package/src/layout/HawaAppLayout.tsx +86 -58
  225. package/src/layout/index.ts +0 -1
  226. package/src/styles.css +8 -3
  227. package/es/layout/SimpleGrid.d.ts +0 -10
  228. package/lib/layout/SimpleGrid.d.ts +0 -10
  229. package/src/layout/SimpleGrid.tsx +0 -41
@@ -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 },
@@ -93,14 +95,19 @@ export const ReferralSettlement: React.FunctionComponent<
93
95
  }
94
96
 
95
97
  const SettlementAccountCard = (props) => (
96
- <div className="mb-3 flex flex-row items-center justify-between rounded border-b bg-white p-2">
98
+ <div className="mb-3 flex flex-row items-center justify-between rounded border-b bg-white p-3">
97
99
  <div className="flex flex-col justify-between">
98
100
  <div className="text-xs">{props.bank}</div>
99
101
  <div>{props.accountHolder}</div>
100
102
  <div className="text-xs">{props.iban}</div>
101
103
  </div>
102
- <div className="flex flex-row items-center justify-center gap-1">
103
- {props.default && <HawaChip size="normal" label="Default" />}
104
+ <div className="flex flex-row items-center justify-center gap-2">
105
+ {props.default && (
106
+ <HawaButton disabled variant="outlined" size="small">
107
+ Default
108
+ </HawaButton>
109
+ )}
110
+ {/* {props.default && <HawaChip size="normal" label="Default" />} */}
104
111
  {!props.default && <HawaButton size="small">Make Default</HawaButton>}
105
112
  <HawaButton tooltip="Delete">
106
113
  <FaTimes />
@@ -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
@@ -1,24 +1,16 @@
1
- import React from "react"
1
+ import { useState, FC } from "react"
2
2
  import clsx from "clsx"
3
3
 
4
4
  type AccordionTypes = {
5
- /**
6
- * The title of the clickable accordion bar
7
- */
5
+ /** The title of the clickable accordion bar */
8
6
  title: string
9
- /**
10
- * The content inside the accordion to be visible once the bar is clicked
11
- */
7
+ /** The content inside the accordion to be visible once the bar is clicked */
12
8
  content: any
13
- /**
14
- * The index of each accordion, must be unique for each usage of this component
15
- */
9
+ /** The index of each accordion, must be unique for each usage of this component */
16
10
  index: any
17
11
  }
18
- export const HawaAccordion: React.FunctionComponent<AccordionTypes> = (
19
- props
20
- ) => {
21
- const [collapse, setCollapse] = React.useState(false)
12
+ export const HawaAccordion: FC<AccordionTypes> = (props) => {
13
+ const [collapse, setCollapse] = useState(false)
22
14
 
23
15
  return (
24
16
  <div className="h-fit w-full">
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
 
3
3
  type AdCardTypes = {
4
4
  orientation: "vertical" | "horizontal"
@@ -7,10 +7,7 @@ type AdCardTypes = {
7
7
  imageURL: string
8
8
  handleHide: any
9
9
  }
10
- export const HawaAdCard: React.FunctionComponent<AdCardTypes> = ({
11
- orientation,
12
- ...props
13
- }) => {
10
+ export const HawaAdCard: FC<AdCardTypes> = ({ orientation, ...props }) => {
14
11
  let cardStyles = {
15
12
  horizontal:
16
13
  "flex max-w-xl rounded border-gray-200 bg-gray-100 shadow-md dark:border-gray-700 dark:bg-gray-800 ",
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react"
1
+ import { useState } from "react"
2
2
  import { HawaButton } from "./HawaButton"
3
3
 
4
4
  const CARDS = {
@@ -1,5 +1,5 @@
1
1
  import clsx from "clsx"
2
- import React, { useEffect, useState } from "react"
2
+ import { useEffect, useState, FC } from "react"
3
3
 
4
4
  type TCheckBoxTypes = {
5
5
  centered?: boolean
@@ -10,9 +10,7 @@ type TCheckBoxTypes = {
10
10
  val?: boolean
11
11
  }
12
12
 
13
- export const HawaCheckbox: React.FunctionComponent<TCheckBoxTypes> = (
14
- props
15
- ) => {
13
+ export const HawaCheckbox: FC<TCheckBoxTypes> = (props) => {
16
14
  const [isChecked, setVal] = useState(props.val)
17
15
 
18
16
  useEffect(() => {
@@ -1,18 +1,24 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
  import clsx from "clsx"
3
3
 
4
4
  type TChipTypes = {
5
+ /** The text inside the chip */
5
6
  label: string
6
- size?: "small" | "normal" | "large"
7
+ /** The small icon before the chip label */
7
8
  icon?: JSX.Element
9
+ /** The color of the chip, must be a tailwind color */
8
10
  color?: string
11
+ /** The size of the chip */
12
+ size?: "small" | "normal" | "large"
13
+ /** Enable/Disable the dot before the label of the chip */
9
14
  dot?: boolean
15
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
10
16
  dotType?: "available" | "unavailable"
11
17
  }
12
18
 
13
- export const HawaChip: React.FunctionComponent<TChipTypes> = ({
14
- size = "normal",
19
+ export const HawaChip: FC<TChipTypes> = ({
15
20
  label,
21
+ size = "normal",
16
22
  icon,
17
23
  color,
18
24
  dot,
@@ -1,19 +1,19 @@
1
- import React, { useState } from "react"
1
+ import { useState, FC, ChangeEvent } from "react"
2
2
 
3
3
  type ColorPickerTypes = {
4
+ /** The hex code for the color */
4
5
  color?: any
5
- handleChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
6
+ /** Fires everytime the color changes */
7
+ handleChange?: (e: ChangeEvent<HTMLInputElement>) => void
6
8
  }
7
9
 
8
- export const HawaColorPicker: React.FunctionComponent<ColorPickerTypes> = (
9
- props
10
- ) => {
10
+ export const HawaColorPicker: FC<ColorPickerTypes> = (props) => {
11
11
  const [selectedColor, setSelectedColor] = useState(props.color)
12
12
  return (
13
13
  <div className={`flex w-fit flex-row rounded border-2 border-gray-200 p-0`}>
14
14
  <div
15
15
  style={{ backgroundColor: selectedColor }}
16
- className="rounded-tl-lg rounded-bl-lg"
16
+ className="rounded-bl-lg rounded-tl-lg"
17
17
  >
18
18
  <input
19
19
  type="color"
@@ -29,7 +29,7 @@ export const HawaColorPicker: React.FunctionComponent<ColorPickerTypes> = (
29
29
  <input
30
30
  type="text"
31
31
  value={selectedColor}
32
- className="w-24 rounded-tr-lg rounded-br-lg pr-2 pl-2"
32
+ className="w-24 rounded-br-lg rounded-tr-lg pl-2 pr-2"
33
33
  />
34
34
  </div>
35
35
  )
@@ -1,17 +1,19 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
 
3
3
  type CopyRightsTypes = {
4
- withLogo?: boolean
5
- lang?: any
4
+ /** A text used as the version of the app, for example: v1.0.0 */
6
5
  version?: string
6
+ /** Credit to the creator of the app, for example: Sikka Software */
7
7
  credits?: string
8
+ /** The URL of the logo in the copyrights */
8
9
  logoURL?: string
10
+ /** Enable/Disable the existance of the logo */
11
+ withLogo?: boolean
12
+ /** Fires when the logo is clicked, usually goes to the website of the creator of the app */
9
13
  onLogoClicked?: any
10
14
  }
11
15
 
12
- export const HawaCopyrights: React.FunctionComponent<CopyRightsTypes> = (
13
- props
14
- ) => {
16
+ export const HawaCopyrights: FC<CopyRightsTypes> = (props) => {
15
17
  return (
16
18
  <div className="my-2 flex flex-col items-center justify-center gap-1 text-xs text-gray-400">
17
19
  {props.withLogo ? (
@@ -1,4 +1,4 @@
1
- import React, { FC, useState } from "react"
1
+ import { FC, useState } from "react"
2
2
 
3
3
  type DatepickerTypes = {}
4
4
 
@@ -1,7 +1,7 @@
1
- import React, { FC, ReactElement, ReactNode } from "react"
1
+ import { FC, ReactElement, ReactNode } from "react"
2
2
  import { FaChevronLeft, FaChevronRight } from "react-icons/fa"
3
3
  import clsx from "clsx"
4
-
4
+ // TODO: This element should either be removed or improved
5
5
  type TDrawerTypes = {
6
6
  open: boolean
7
7
  setOpen: any
@@ -13,7 +13,7 @@ type TDrawerTypes = {
13
13
  drawerFooter?: any
14
14
  }
15
15
 
16
- export const HawaDrawer: React.FunctionComponent<TDrawerTypes> = ({
16
+ export const HawaDrawer: FC<TDrawerTypes> = ({
17
17
  open,
18
18
  setOpen,
19
19
  position,
@@ -1,13 +1,13 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
 
3
3
  type IconCountTypes = {
4
- icon: any
4
+ /** The icon of the counter */
5
+ icon: JSX.Element
6
+ /** The text next to the icon */
5
7
  count?: string
6
8
  }
7
9
 
8
- export const HawaIconCount: React.FunctionComponent<IconCountTypes> = (
9
- props
10
- ) => {
10
+ export const HawaIconCount: FC<IconCountTypes> = (props) => {
11
11
  return (
12
12
  <div className="flex h-fit flex-row items-center gap-2 px-2">
13
13
  <div>{props.icon}</div>
@@ -1,18 +1,21 @@
1
- import React, { useEffect, useState } from "react"
1
+ import { useEffect, useState, FC } from "react"
2
2
  import clsx from "clsx"
3
3
  import { HawaMenu } from "./HawaMenu"
4
4
  import { HawaButton } from "./HawaButton"
5
- import { FaReply } from "react-icons/fa"
6
5
 
7
6
  interface ItemCardTypes {
8
- actions?: any
9
- content?: any
10
7
  headerActions?: THeaderActions[][]
11
8
  header?: any
12
- lang?: string
9
+ content?: any
10
+ /** a URL for the image of the card */
13
11
  cardImage?: string
12
+ /** a function that fires when the card is clicked anywhere */
14
13
  onCardClick?: any
15
- counts?: any
14
+ /** a React node with HawaIconCount children to have counters at the bottom of the card */
15
+ counts?: JSX.Element
16
+ /** The action buttons on the bottom right of the card */
17
+ actions?: JSX.Element
18
+ /** The orientation of the card */
16
19
  orientation?: "horizontal" | "vertical"
17
20
  /** Enabling this blurs the image on hover and shows an action button */
18
21
  clickableImage?: boolean
@@ -30,7 +33,7 @@ type THeaderActions = {
30
33
  action?: (e: any) => void
31
34
  isButton?: boolean
32
35
  }
33
- export const HawaItemCard: React.FunctionComponent<ItemCardTypes> = ({
36
+ export const HawaItemCard: FC<ItemCardTypes> = ({
34
37
  actions,
35
38
  counts,
36
39
  content,
@@ -147,9 +150,6 @@ export const HawaItemCard: React.FunctionComponent<ItemCardTypes> = ({
147
150
  {actions}
148
151
  </div>
149
152
  ) : null}
150
- {/* {counts && (
151
- <div className="flex justify-end rounded-b-lg">{counts}</div>
152
- )} */}
153
153
  </div>
154
154
  </div>
155
155
  )
@@ -1,5 +1,5 @@
1
1
  import clsx from "clsx"
2
- import React from "react"
2
+ import { FC } from "react"
3
3
 
4
4
  type LandingCardTypes = {
5
5
  orientation: "vertical" | "horizontal"
@@ -15,7 +15,7 @@ type LandingCardTypes = {
15
15
  }
16
16
  buttonLink?: string
17
17
  }
18
- export const HawaLandingCard: React.FunctionComponent<LandingCardTypes> = ({
18
+ export const HawaLandingCard: FC<LandingCardTypes> = ({
19
19
  orientation,
20
20
  ...props
21
21
  }) => {
@@ -54,7 +54,7 @@ export const HawaLandingCard: React.FunctionComponent<LandingCardTypes> = ({
54
54
  <div className="mt-2 text-lg font-medium">{props.texts.title} </div>
55
55
  )}
56
56
  {props.texts.description && (
57
- <div className="mt-4 text-sm z-10">{props.texts.description}</div>
57
+ <div className="z-10 mt-4 text-sm">{props.texts.description}</div>
58
58
  )}
59
59
  {props.texts.linkText && (
60
60
  <div className="z-10 mt-6 text-sm underline underline-offset-8">
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import { FC } from "react"
2
2
 
3
3
  type LogoButtonTypes = {
4
4
  lang?: any
@@ -16,9 +16,7 @@ type LogoButtonTypes = {
16
16
  onClick?: any
17
17
  buttonText?: any
18
18
  }
19
- export const HawaLogoButton: React.FunctionComponent<LogoButtonTypes> = (
20
- props
21
- ) => {
19
+ export const HawaLogoButton: FC<LogoButtonTypes> = (props) => {
22
20
  let isArabic = props.lang === "ar"
23
21
  let logoElement: any = ""
24
22
  switch (props.logo?.toLowerCase()) {
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, useEffect, useRef, useState } from "react"
1
+ import { ReactNode, useEffect, useRef, useState, FC } from "react"
2
2
  import clsx from "clsx"
3
3
 
4
4
  // TODO: add width to decrease width
@@ -34,7 +34,7 @@ type MenuItems = {
34
34
  element?: any
35
35
  }
36
36
 
37
- export const HawaMenu: React.FunctionComponent<TMenuTypes> = ({
37
+ export const HawaMenu: FC<TMenuTypes> = ({
38
38
  menuItems,
39
39
  withHeader,
40
40
  direction = "ltr",
@@ -165,7 +165,7 @@ export const HawaMenu: React.FunctionComponent<TMenuTypes> = ({
165
165
  )}
166
166
  >
167
167
  {withHeader && (
168
- <div className="py-3 px-4 text-xs text-gray-900 dark:text-white">
168
+ <div className="px-4 py-3 text-xs text-gray-900 dark:text-white">
169
169
  <div>{headerTitle}</div>
170
170
  <div className="truncate font-medium">{headerSubtitle}</div>
171
171
  </div>
@@ -196,7 +196,7 @@ export const HawaMenu: React.FunctionComponent<TMenuTypes> = ({
196
196
  }}
197
197
  className={clsx(
198
198
  item.isButton
199
- ? "flex cursor-pointer flex-row items-center rounded bg-buttonPrimary-500 py-2 px-4 text-white hover:bg-buttonPrimary-700 rtl:flex-row-reverse dark:hover:bg-buttonPrimary-700 dark:hover:text-white"
199
+ ? "flex cursor-pointer flex-row items-center rounded bg-buttonPrimary-500 px-4 py-2 text-white hover:bg-buttonPrimary-700 rtl:flex-row-reverse dark:hover:bg-buttonPrimary-700 dark:hover:text-white"
200
200
  : " flex flex-row items-center rounded rtl:flex-row-reverse ",
201
201
  sizeStyles[size],
202
202
  item.disabled