@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.
- package/es/blocks/Account/HawaApiBox.d.ts +2 -2
- package/es/blocks/Account/UserProfileForm.d.ts +2 -2
- package/es/blocks/Account/UserSettingsForm.d.ts +2 -2
- package/es/blocks/AuthForms/AppLanding.d.ts +2 -2
- package/es/blocks/AuthForms/CodeConfirmation.d.ts +2 -2
- package/es/blocks/AuthForms/NewPasswordForm.d.ts +2 -2
- package/es/blocks/AuthForms/ResetPasswordForm.d.ts +2 -2
- package/es/blocks/AuthForms/SignInForm.d.ts +2 -2
- package/es/blocks/AuthForms/SignInPhone.d.ts +2 -2
- package/es/blocks/AuthForms/SignUpForm.d.ts +2 -2
- package/es/blocks/Misc/EmptyState.d.ts +2 -2
- package/es/blocks/Misc/LeadGenerator.d.ts +2 -2
- package/es/blocks/Misc/Newsletter.d.ts +2 -2
- package/es/blocks/Misc/NoPermission.d.ts +2 -2
- package/es/blocks/Misc/NotFound.d.ts +2 -2
- package/es/blocks/Misc/Testimonial.d.ts +2 -2
- package/es/blocks/Payment/ChargeWalletForm.d.ts +2 -2
- package/es/blocks/Payment/CheckoutForm.d.ts +2 -2
- package/es/blocks/Payment/Confirmation.d.ts +2 -2
- package/es/blocks/Payment/CreditCardForm.d.ts +2 -2
- package/es/blocks/Payment/PayWithWallet.d.ts +2 -2
- package/es/blocks/Payment/SelectPayment.d.ts +2 -2
- package/es/blocks/Pricing/ComparingPlans.d.ts +2 -2
- package/es/blocks/Pricing/PricingPlans.d.ts +2 -2
- package/es/blocks/Referral/ReferralAccount.d.ts +2 -2
- package/es/blocks/Referral/ReferralSettlement.d.ts +2 -2
- package/es/blocks/Referral/ReferralStats.d.ts +2 -2
- package/es/elements/ArrowCarousel.d.ts +2 -2
- package/es/elements/AutoCompleteField.d.ts +2 -2
- package/es/elements/BackToTop.d.ts +3 -3
- package/es/elements/Breadcrumb.d.ts +2 -4
- package/es/elements/DragDropImages.d.ts +2 -6
- package/es/elements/DraggableCard.d.ts +2 -2
- package/es/elements/HawaAccordion.d.ts +5 -11
- package/es/elements/HawaAdCard.d.ts +2 -2
- package/es/elements/HawaCardInput.d.ts +2 -2
- package/es/elements/HawaCheckbox.d.ts +2 -2
- package/es/elements/HawaChip.d.ts +9 -3
- package/es/elements/HawaColorPicker.d.ts +5 -3
- package/es/elements/HawaCopyrights.d.ts +8 -4
- package/es/elements/HawaDrawer.d.ts +2 -2
- package/es/elements/HawaIconCount.d.ts +5 -3
- package/es/elements/HawaItemCard.d.ts +10 -6
- package/es/elements/HawaLandingCard.d.ts +2 -2
- package/es/elements/HawaLogoButton.d.ts +2 -2
- package/es/elements/HawaMenu.d.ts +2 -2
- package/es/elements/HawaModal.d.ts +2 -2
- package/es/elements/HawaPanelTabs.d.ts +2 -2
- package/es/elements/HawaPhoneInput.d.ts +2 -2
- package/es/elements/HawaPinInput.d.ts +2 -2
- package/es/elements/HawaPricingCard.d.ts +2 -2
- package/es/elements/HawaRadio.d.ts +2 -2
- package/es/elements/HawaRange.d.ts +2 -2
- package/es/elements/HawaSearchBar.d.ts +2 -2
- package/es/elements/HawaSelect.d.ts +2 -2
- package/es/elements/HawaSettingsRow.d.ts +2 -2
- package/es/elements/HawaSpinner.d.ts +2 -2
- package/es/elements/HawaStats.d.ts +2 -2
- package/es/elements/HawaStepper.d.ts +2 -2
- package/es/elements/HawaStoreButtons.d.ts +2 -2
- package/es/elements/HawaSwitch.d.ts +2 -2
- package/es/elements/HawaTable.d.ts +2 -2
- package/es/elements/HawaTabs.d.ts +2 -2
- package/es/elements/HawaTextField.d.ts +3 -3
- package/es/elements/HawaTooltip.d.ts +3 -3
- package/es/elements/HawaTypography.d.ts +2 -2
- package/es/elements/InvoiceAccordion.d.ts +2 -2
- package/es/elements/SubsectionList.d.ts +2 -2
- package/es/elements/TabPanel.d.ts +2 -2
- package/es/elements/UsageCard.d.ts +2 -2
- package/es/elements/UserFeedback.d.ts +2 -2
- package/es/index.es.js +2 -2
- package/lib/blocks/Account/HawaApiBox.d.ts +2 -2
- package/lib/blocks/Account/UserProfileForm.d.ts +2 -2
- package/lib/blocks/Account/UserSettingsForm.d.ts +2 -2
- package/lib/blocks/AuthForms/AppLanding.d.ts +2 -2
- package/lib/blocks/AuthForms/CodeConfirmation.d.ts +2 -2
- package/lib/blocks/AuthForms/NewPasswordForm.d.ts +2 -2
- package/lib/blocks/AuthForms/ResetPasswordForm.d.ts +2 -2
- package/lib/blocks/AuthForms/SignInForm.d.ts +2 -2
- package/lib/blocks/AuthForms/SignInPhone.d.ts +2 -2
- package/lib/blocks/AuthForms/SignUpForm.d.ts +2 -2
- package/lib/blocks/Misc/EmptyState.d.ts +2 -2
- package/lib/blocks/Misc/LeadGenerator.d.ts +2 -2
- package/lib/blocks/Misc/Newsletter.d.ts +2 -2
- package/lib/blocks/Misc/NoPermission.d.ts +2 -2
- package/lib/blocks/Misc/NotFound.d.ts +2 -2
- package/lib/blocks/Misc/Testimonial.d.ts +2 -2
- package/lib/blocks/Payment/ChargeWalletForm.d.ts +2 -2
- package/lib/blocks/Payment/CheckoutForm.d.ts +2 -2
- package/lib/blocks/Payment/Confirmation.d.ts +2 -2
- package/lib/blocks/Payment/CreditCardForm.d.ts +2 -2
- package/lib/blocks/Payment/PayWithWallet.d.ts +2 -2
- package/lib/blocks/Payment/SelectPayment.d.ts +2 -2
- package/lib/blocks/Pricing/ComparingPlans.d.ts +2 -2
- package/lib/blocks/Pricing/PricingPlans.d.ts +2 -2
- package/lib/blocks/Referral/ReferralAccount.d.ts +2 -2
- package/lib/blocks/Referral/ReferralSettlement.d.ts +2 -2
- package/lib/blocks/Referral/ReferralStats.d.ts +2 -2
- package/lib/elements/ArrowCarousel.d.ts +2 -2
- package/lib/elements/AutoCompleteField.d.ts +2 -2
- package/lib/elements/BackToTop.d.ts +3 -3
- package/lib/elements/Breadcrumb.d.ts +2 -4
- package/lib/elements/DragDropImages.d.ts +2 -6
- package/lib/elements/DraggableCard.d.ts +2 -2
- package/lib/elements/HawaAccordion.d.ts +5 -11
- package/lib/elements/HawaAdCard.d.ts +2 -2
- package/lib/elements/HawaCardInput.d.ts +2 -2
- package/lib/elements/HawaCheckbox.d.ts +2 -2
- package/lib/elements/HawaChip.d.ts +9 -3
- package/lib/elements/HawaColorPicker.d.ts +5 -3
- package/lib/elements/HawaCopyrights.d.ts +8 -4
- package/lib/elements/HawaDrawer.d.ts +2 -2
- package/lib/elements/HawaIconCount.d.ts +5 -3
- package/lib/elements/HawaItemCard.d.ts +10 -6
- package/lib/elements/HawaLandingCard.d.ts +2 -2
- package/lib/elements/HawaLogoButton.d.ts +2 -2
- package/lib/elements/HawaMenu.d.ts +2 -2
- package/lib/elements/HawaModal.d.ts +2 -2
- package/lib/elements/HawaPanelTabs.d.ts +2 -2
- package/lib/elements/HawaPhoneInput.d.ts +2 -2
- package/lib/elements/HawaPinInput.d.ts +2 -2
- package/lib/elements/HawaPricingCard.d.ts +2 -2
- package/lib/elements/HawaRadio.d.ts +2 -2
- package/lib/elements/HawaRange.d.ts +2 -2
- package/lib/elements/HawaSearchBar.d.ts +2 -2
- package/lib/elements/HawaSelect.d.ts +2 -2
- package/lib/elements/HawaSettingsRow.d.ts +2 -2
- package/lib/elements/HawaSpinner.d.ts +2 -2
- package/lib/elements/HawaStats.d.ts +2 -2
- package/lib/elements/HawaStepper.d.ts +2 -2
- package/lib/elements/HawaStoreButtons.d.ts +2 -2
- package/lib/elements/HawaSwitch.d.ts +2 -2
- package/lib/elements/HawaTable.d.ts +2 -2
- package/lib/elements/HawaTabs.d.ts +2 -2
- package/lib/elements/HawaTextField.d.ts +3 -3
- package/lib/elements/HawaTooltip.d.ts +3 -3
- package/lib/elements/HawaTypography.d.ts +2 -2
- package/lib/elements/InvoiceAccordion.d.ts +2 -2
- package/lib/elements/SubsectionList.d.ts +2 -2
- package/lib/elements/TabPanel.d.ts +2 -2
- package/lib/elements/UsageCard.d.ts +2 -2
- package/lib/elements/UserFeedback.d.ts +2 -2
- package/lib/index.js +2 -2
- package/package.json +1 -1
- package/src/blocks/Account/HawaApiBox.tsx +2 -4
- package/src/blocks/Account/UserProfileForm.tsx +2 -4
- package/src/blocks/Account/UserSettingsForm.tsx +2 -6
- package/src/blocks/AuthForms/AppLanding.tsx +2 -2
- package/src/blocks/AuthForms/CodeConfirmation.tsx +2 -4
- package/src/blocks/AuthForms/NewPasswordForm.tsx +2 -4
- package/src/blocks/AuthForms/ResetPasswordForm.tsx +2 -4
- package/src/blocks/AuthForms/SignInForm.tsx +2 -2
- package/src/blocks/AuthForms/SignInPhone.tsx +2 -4
- package/src/blocks/AuthForms/SignUpForm.tsx +2 -2
- package/src/blocks/Misc/EmptyState.tsx +2 -4
- package/src/blocks/Misc/LeadGenerator.tsx +3 -3
- package/src/blocks/Misc/Newsletter.tsx +2 -2
- package/src/blocks/Misc/NoPermission.tsx +3 -6
- package/src/blocks/Misc/NotFound.tsx +2 -2
- package/src/blocks/Misc/Testimonial.tsx +5 -7
- package/src/blocks/Payment/ChargeWalletForm.tsx +2 -4
- package/src/blocks/Payment/CheckoutForm.tsx +2 -4
- package/src/blocks/Payment/Confirmation.tsx +3 -5
- package/src/blocks/Payment/CreditCardForm.tsx +2 -4
- package/src/blocks/Payment/PayWithWallet.tsx +2 -4
- package/src/blocks/Payment/SelectPayment.tsx +2 -4
- package/src/blocks/Pricing/ComparingPlans.tsx +4 -6
- package/src/blocks/Pricing/PricingPlans.tsx +2 -4
- package/src/blocks/Referral/ReferralAccount.tsx +2 -2
- package/src/blocks/Referral/ReferralSettlement.tsx +6 -4
- package/src/blocks/Referral/ReferralStats.tsx +2 -2
- package/src/elements/ArrowCarousel.tsx +2 -2
- package/src/elements/AutoCompleteField.tsx +5 -7
- package/src/elements/BackToTop.tsx +3 -3
- package/src/elements/Breadcrumb.tsx +3 -6
- package/src/elements/DragDropImages.tsx +3 -7
- package/src/elements/DraggableCard.tsx +2 -4
- package/src/elements/HawaAccordion.tsx +6 -14
- package/src/elements/HawaAdCard.tsx +2 -5
- package/src/elements/HawaCardInput.tsx +1 -1
- package/src/elements/HawaCheckbox.tsx +2 -4
- package/src/elements/HawaChip.tsx +10 -4
- package/src/elements/HawaColorPicker.tsx +7 -7
- package/src/elements/HawaCopyrights.tsx +8 -6
- package/src/elements/HawaDatepicker.tsx +1 -1
- package/src/elements/HawaDrawer.tsx +3 -3
- package/src/elements/HawaIconCount.tsx +5 -5
- package/src/elements/HawaItemCard.tsx +10 -10
- package/src/elements/HawaLandingCard.tsx +3 -3
- package/src/elements/HawaLogoButton.tsx +2 -4
- package/src/elements/HawaMenu.tsx +4 -4
- package/src/elements/HawaModal.tsx +2 -2
- package/src/elements/HawaPanelTabs.tsx +2 -4
- package/src/elements/HawaPhoneInput.tsx +3 -5
- package/src/elements/HawaPinInput.tsx +2 -2
- package/src/elements/HawaPricingCard.tsx +2 -2
- package/src/elements/HawaRadio.tsx +2 -2
- package/src/elements/HawaRange.tsx +3 -3
- package/src/elements/HawaSearchBar.tsx +2 -4
- package/src/elements/HawaSelect.tsx +5 -5
- package/src/elements/HawaSettingsRow.tsx +2 -2
- package/src/elements/HawaSnackbar.tsx +2 -2
- package/src/elements/HawaSpinner.tsx +2 -5
- package/src/elements/HawaStats.tsx +2 -2
- package/src/elements/HawaStepper.tsx +2 -2
- package/src/elements/HawaStoreButtons.tsx +3 -5
- package/src/elements/HawaSwitch.tsx +2 -5
- package/src/elements/HawaTable.tsx +5 -3
- package/src/elements/HawaTabs.tsx +4 -4
- package/src/elements/HawaTextField.tsx +3 -3
- package/src/elements/HawaTooltip.tsx +3 -3
- package/src/elements/HawaTypography.tsx +2 -4
- package/src/elements/InvoiceAccordion.tsx +2 -4
- package/src/elements/SubsectionList.tsx +3 -5
- package/src/elements/TabPanel.tsx +2 -2
- package/src/elements/UsageCard.tsx +2 -2
- package/src/elements/UserFeedback.tsx +2 -4
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
import
|
|
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:
|
|
19
|
-
|
|
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
|
|
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:
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import
|
|
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:
|
|
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
|
|
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
|
-
|
|
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:
|
|
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
|
|
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
|
-
|
|
6
|
+
/** Fires everytime the color changes */
|
|
7
|
+
handleChange?: (e: ChangeEvent<HTMLInputElement>) => void
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export const HawaColorPicker:
|
|
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-
|
|
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-
|
|
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
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
|
|
3
3
|
type CopyRightsTypes = {
|
|
4
|
-
|
|
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:
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import
|
|
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:
|
|
16
|
+
export const HawaDrawer: FC<TDrawerTypes> = ({
|
|
17
17
|
open,
|
|
18
18
|
setOpen,
|
|
19
19
|
position,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
|
|
3
3
|
type IconCountTypes = {
|
|
4
|
-
icon
|
|
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:
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactElement, useEffect, FC } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
|
|
4
4
|
type ModalTypes = {
|
|
@@ -29,7 +29,7 @@ type ModalTypes = {
|
|
|
29
29
|
*/
|
|
30
30
|
actions: any
|
|
31
31
|
}
|
|
32
|
-
export const HawaModal:
|
|
32
|
+
export const HawaModal: FC<ModalTypes> = ({
|
|
33
33
|
open,
|
|
34
34
|
title,
|
|
35
35
|
onClose,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState, FC } from "react"
|
|
2
2
|
|
|
3
3
|
type PanelTabsTypes = {
|
|
4
4
|
defaultValue: any
|
|
@@ -7,9 +7,7 @@ type PanelTabsTypes = {
|
|
|
7
7
|
handleChange: any
|
|
8
8
|
location: any
|
|
9
9
|
}
|
|
10
|
-
export const HawaPanelTabs:
|
|
11
|
-
props
|
|
12
|
-
) => {
|
|
10
|
+
export const HawaPanelTabs: FC<PanelTabsTypes> = (props) => {
|
|
13
11
|
const [value, setValue] = useState(props.defaultValue)
|
|
14
12
|
return (
|
|
15
13
|
<div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState, FC } from "react"
|
|
2
2
|
import Countries from "../countries"
|
|
3
3
|
import Select from "react-select"
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ type OptionTypes = {
|
|
|
10
10
|
innerProps: any
|
|
11
11
|
innerRef: any
|
|
12
12
|
}
|
|
13
|
-
const Option:
|
|
13
|
+
const Option: FC<OptionTypes> = ({
|
|
14
14
|
cx,
|
|
15
15
|
children,
|
|
16
16
|
getStyles,
|
|
@@ -39,9 +39,7 @@ type HawaPhoneInputTypes = {
|
|
|
39
39
|
country?: any
|
|
40
40
|
handleChange?: any
|
|
41
41
|
}
|
|
42
|
-
export const HawaPhoneInput:
|
|
43
|
-
props
|
|
44
|
-
) => {
|
|
42
|
+
export const HawaPhoneInput: FC<HawaPhoneInputTypes> = (props) => {
|
|
45
43
|
const [selectedCountry, setSelectedCountry] = useState("+966")
|
|
46
44
|
|
|
47
45
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import
|
|
2
|
+
import { useEffect, useState, FC } from "react"
|
|
3
3
|
|
|
4
4
|
type PinInputTypes = {
|
|
5
5
|
label?: string
|
|
@@ -8,7 +8,7 @@ type PinInputTypes = {
|
|
|
8
8
|
width?: "normal" | "full"
|
|
9
9
|
getPins?: any
|
|
10
10
|
}
|
|
11
|
-
export const HawaPinInput:
|
|
11
|
+
export const HawaPinInput: FC<PinInputTypes> = ({
|
|
12
12
|
label,
|
|
13
13
|
icon,
|
|
14
14
|
digits,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import
|
|
2
|
+
import { FC } from "react"
|
|
3
3
|
import { HawaButton } from "./HawaButton"
|
|
4
4
|
|
|
5
5
|
// TODO: if feature.excluded is false, show gray and x
|
|
@@ -22,7 +22,7 @@ type PricingCardTypes = {
|
|
|
22
22
|
size: "small" | "medium" | "large"
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export const HawaPricingCard:
|
|
25
|
+
export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
26
26
|
size = "medium",
|
|
27
27
|
direction = "ltr",
|
|
28
28
|
currentPlan = false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState, FC } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
|
|
4
4
|
type RadioTypes = {
|
|
@@ -11,7 +11,7 @@ type RadioTypes = {
|
|
|
11
11
|
onChangeTab?: any
|
|
12
12
|
defaultValue?: any
|
|
13
13
|
}
|
|
14
|
-
export const HawaRadio:
|
|
14
|
+
export const HawaRadio: FC<RadioTypes> = (props) => {
|
|
15
15
|
const [selectedOption, setSelectedOption] = useState(props.defaultValue)
|
|
16
16
|
let activeTabStyle =
|
|
17
17
|
"inline-block py-2 px-4 w-full text-white bg-buttonPrimary-500 rounded active"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC, useState } from "react"
|
|
2
2
|
|
|
3
3
|
type RangeTypes = {
|
|
4
4
|
value?: any
|
|
@@ -10,7 +10,7 @@ type RangeTypes = {
|
|
|
10
10
|
max?: any
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const HawaRange:
|
|
13
|
+
export const HawaRange: FC<RangeTypes> = ({
|
|
14
14
|
value,
|
|
15
15
|
handleChange,
|
|
16
16
|
startElement,
|
|
@@ -18,7 +18,7 @@ export const HawaRange: React.FunctionComponent<RangeTypes> = ({
|
|
|
18
18
|
label,
|
|
19
19
|
...props
|
|
20
20
|
}) => {
|
|
21
|
-
const [rangeValue, setRangeValue] =
|
|
21
|
+
const [rangeValue, setRangeValue] = useState(value)
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<div {...props}>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
import { HawaTextField } from "./HawaTextField"
|
|
3
3
|
|
|
4
4
|
type SearchBarTypes = {}
|
|
5
|
-
export const HawaSearchBar:
|
|
6
|
-
props
|
|
7
|
-
) => {
|
|
5
|
+
export const HawaSearchBar: FC<SearchBarTypes> = (props) => {
|
|
8
6
|
return <HawaTextField type={"search"} {...props} />
|
|
9
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
|
-
import
|
|
2
|
+
import { FC } from "react"
|
|
3
3
|
import Select from "react-select"
|
|
4
4
|
import CreatableSelect from "react-select/creatable"
|
|
5
5
|
|
|
@@ -12,7 +12,7 @@ type ControlTypes = {
|
|
|
12
12
|
innerRef: any
|
|
13
13
|
size?: "small" | "normal" | "large"
|
|
14
14
|
}
|
|
15
|
-
const Control:
|
|
15
|
+
const Control: FC<ControlTypes> = ({
|
|
16
16
|
cx,
|
|
17
17
|
children,
|
|
18
18
|
getStyles,
|
|
@@ -48,7 +48,7 @@ type MenuTypes = {
|
|
|
48
48
|
innerProps: any
|
|
49
49
|
innerRef: any
|
|
50
50
|
}
|
|
51
|
-
const Menu:
|
|
51
|
+
const Menu: FC<MenuTypes> = ({
|
|
52
52
|
cx,
|
|
53
53
|
children,
|
|
54
54
|
getStyles,
|
|
@@ -76,7 +76,7 @@ type OptionTypes = {
|
|
|
76
76
|
innerRef: any
|
|
77
77
|
size?: "small" | "normal" | "large"
|
|
78
78
|
}
|
|
79
|
-
const Option:
|
|
79
|
+
const Option: FC<OptionTypes> = ({
|
|
80
80
|
cx,
|
|
81
81
|
children,
|
|
82
82
|
getStyles,
|
|
@@ -114,7 +114,7 @@ type SelectTypes = {
|
|
|
114
114
|
getOptionLabel?: any
|
|
115
115
|
disabled?: boolean
|
|
116
116
|
}
|
|
117
|
-
export const HawaSelect:
|
|
117
|
+
export const HawaSelect: FC<SelectTypes> = (props) => {
|
|
118
118
|
return (
|
|
119
119
|
<div>
|
|
120
120
|
{props.label && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
import { HawaTextField } from "./HawaTextField"
|
|
3
3
|
import { HawaSwitch } from "./HawaSwitch"
|
|
4
4
|
import { HawaColorPicker } from "./HawaColorPicker"
|
|
@@ -45,7 +45,7 @@ type SettingsRowTypes = {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export const HawaSettingsRow:
|
|
48
|
+
export const HawaSettingsRow: FC<SettingsRowTypes> = ({
|
|
49
49
|
settingsLabel,
|
|
50
50
|
settingsType,
|
|
51
51
|
settingsDescription,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC, useEffect, useRef, useState } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
import { HawaButton } from "./HawaButton"
|
|
4
4
|
|
|
@@ -86,7 +86,7 @@ export const HawaSnackbar: FC<THawaSnackBar> = ({
|
|
|
86
86
|
closed ? "opacity-0" : "opacity-100"
|
|
87
87
|
)}
|
|
88
88
|
>
|
|
89
|
-
<div className="w-full
|
|
89
|
+
<div className="flex w-full flex-col gap-2 p-3">
|
|
90
90
|
<div className="text-sm font-bold">{title}</div>
|
|
91
91
|
<div className="text-sm font-normal">{description}</div>
|
|
92
92
|
{actions && (
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
|
|
4
4
|
type SpinnerTypes = {
|
|
5
5
|
size?: "button" | "sm" | "normal" | "lg" | "xl"
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export const HawaSpinner:
|
|
9
|
-
size = "sm",
|
|
10
|
-
...props
|
|
11
|
-
}) => {
|
|
8
|
+
export const HawaSpinner: FC<SpinnerTypes> = ({ size = "sm", ...props }) => {
|
|
12
9
|
let sizeStyles = {
|
|
13
10
|
button: "h-4 w-4",
|
|
14
11
|
sm: "h-6 w-6",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
import { HawaSpinner } from "./HawaSpinner"
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ type StatTypes = {
|
|
|
12
12
|
isLoading?: boolean
|
|
13
13
|
handleClick?: () => void
|
|
14
14
|
}
|
|
15
|
-
export const HawaStats:
|
|
15
|
+
export const HawaStats: FC<StatTypes> = (props) => {
|
|
16
16
|
let defaultStyle = "flex flex-col gap-1 rounded p-4 text-sm h-fit max-h-fit"
|
|
17
17
|
let statStyles = {
|
|
18
18
|
plain: "",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
import { FaCheck } from "react-icons/fa"
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ type THawaTimeline = {
|
|
|
8
8
|
orientation: "vertical" | "horizontal"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const HawaStepper:
|
|
11
|
+
export const HawaStepper: FC<THawaTimeline> = ({
|
|
12
12
|
orientation = "horizontal",
|
|
13
13
|
...props
|
|
14
14
|
}) => {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
|
|
3
3
|
type StoreButtonsTypes = {
|
|
4
4
|
store: "apple" | "google"
|
|
5
5
|
mode: "dark" | "light"
|
|
6
6
|
}
|
|
7
|
-
export const HawaStoreButtons:
|
|
8
|
-
props
|
|
9
|
-
) => {
|
|
7
|
+
export const HawaStoreButtons: FC<StoreButtonsTypes> = (props) => {
|
|
10
8
|
return (
|
|
11
9
|
<div className="flex justify-center">
|
|
12
10
|
<div>
|
|
@@ -77,7 +75,7 @@ export const HawaStoreButtons: React.FunctionComponent<StoreButtonsTypes> = (
|
|
|
77
75
|
</div>
|
|
78
76
|
</div>
|
|
79
77
|
) : (
|
|
80
|
-
<div className="mt-3 flex h-14 w-48 items-center justify-center rounded-lg
|
|
78
|
+
<div className="mt-3 flex h-14 w-48 items-center justify-center rounded-lg border border-black bg-white text-black">
|
|
81
79
|
<div className="mr-3">
|
|
82
80
|
<svg viewBox="30 336.7 120.9 129.2" width="30">
|
|
83
81
|
<path
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
|
|
4
4
|
type SwitchTypes = {
|
|
@@ -6,10 +6,7 @@ type SwitchTypes = {
|
|
|
6
6
|
size?: "small" | "normal" | "large"
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export const HawaSwitch:
|
|
10
|
-
size = "normal",
|
|
11
|
-
...props
|
|
12
|
-
}) => {
|
|
9
|
+
export const HawaSwitch: FC<SwitchTypes> = ({ size = "normal", ...props }) => {
|
|
13
10
|
let sizeStyles = {
|
|
14
11
|
small: "",
|
|
15
12
|
normal:
|