@sikka/hawa 0.0.205 → 0.0.207
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/dist/styles.css +128 -17
- package/es/elements/HawaButton.d.ts +4 -2
- package/es/elements/HawaChip.d.ts +3 -0
- package/es/elements/HawaCopyrights.d.ts +1 -0
- package/es/elements/HawaPricingCard.d.ts +1 -0
- package/es/elements/{HawaTimeline.d.ts → HawaStepper.d.ts} +1 -1
- package/es/elements/HawaTable.d.ts +7 -2
- package/es/elements/HawaTabs.d.ts +1 -1
- package/es/elements/HawaTooltip.d.ts +0 -1
- package/es/elements/index.d.ts +1 -1
- package/es/index.es.js +1 -1
- package/lib/elements/HawaButton.d.ts +4 -2
- package/lib/elements/HawaChip.d.ts +3 -0
- package/lib/elements/HawaCopyrights.d.ts +1 -0
- package/lib/elements/HawaPricingCard.d.ts +1 -0
- package/lib/elements/{HawaTimeline.d.ts → HawaStepper.d.ts} +1 -1
- package/lib/elements/HawaTable.d.ts +7 -2
- package/lib/elements/HawaTabs.d.ts +1 -1
- package/lib/elements/HawaTooltip.d.ts +0 -1
- package/lib/elements/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -2
- package/src/blocks/AuthForms/NewPasswordForm.tsx +0 -1
- package/src/blocks/AuthForms/SignInPhone.tsx +2 -14
- package/src/blocks/AuthForms/SignUpForm.tsx +1 -5
- package/src/blocks/Pricing/PricingPlans.tsx +16 -10
- package/src/blocks/Referral/ReferralAccount.tsx +0 -2
- package/src/elements/Breadcrumb.tsx +5 -2
- package/src/elements/HawaAccordion.tsx +0 -1
- package/src/elements/HawaButton.tsx +70 -51
- package/src/elements/HawaCheckbox.tsx +0 -1
- package/src/elements/HawaChip.tsx +29 -4
- package/src/elements/HawaCopyrights.tsx +5 -10
- package/src/elements/HawaDrawer.tsx +2 -5
- package/src/elements/HawaItemCard.tsx +0 -13
- package/src/elements/HawaMenu.tsx +1 -2
- package/src/elements/HawaModal.tsx +0 -2
- package/src/elements/HawaPhoneInput.tsx +1 -5
- package/src/elements/HawaPricingCard.tsx +52 -96
- package/src/elements/HawaSelect.tsx +3 -7
- package/src/elements/HawaStepper.tsx +97 -0
- package/src/elements/HawaTable.tsx +224 -209
- package/src/elements/HawaTabs.tsx +10 -18
- package/src/elements/HawaTextField.tsx +7 -8
- package/src/elements/HawaTooltip.tsx +0 -1
- package/src/elements/InvoiceAccordion.tsx +2 -7
- package/src/elements/TabPanel.tsx +0 -13
- package/src/elements/index.ts +1 -1
- package/src/hooks/useBreakpoint.ts +2 -3
- package/src/hooks/useTable.ts +6 -4
- package/src/styles.css +128 -17
- package/src/elements/HawaTimeline.tsx +0 -84
|
@@ -8,10 +8,12 @@ type PricingCardTypes = {
|
|
|
8
8
|
features: [{ included: boolean; text: string }]
|
|
9
9
|
title: string
|
|
10
10
|
price: number
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
texts: {
|
|
12
|
+
subtitle: string
|
|
13
|
+
buttonText: string
|
|
14
|
+
cycleText: string
|
|
15
|
+
currencyText: string
|
|
16
|
+
}
|
|
15
17
|
size: "small" | "medium" | "large"
|
|
16
18
|
}
|
|
17
19
|
type CycleTextTypes = {
|
|
@@ -24,9 +26,10 @@ type CurrencyTextTypes = {
|
|
|
24
26
|
usd: string
|
|
25
27
|
sar: string
|
|
26
28
|
}
|
|
27
|
-
export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = (
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = ({
|
|
30
|
+
size = "medium",
|
|
31
|
+
...props
|
|
32
|
+
}) => {
|
|
30
33
|
let isArabic = props.lang === "ar"
|
|
31
34
|
let cycleTextsArabic: CycleTextTypes = {
|
|
32
35
|
monthly: "شهرياً",
|
|
@@ -46,83 +49,67 @@ export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = (
|
|
|
46
49
|
}
|
|
47
50
|
let cardSizes = {
|
|
48
51
|
small:
|
|
49
|
-
"mx-1 w-full
|
|
52
|
+
"mx-1 w-full max-w-sm rounded border shadow-md dark:border-gray-700 dark:bg-gray-800 sm:p-8",
|
|
50
53
|
medium:
|
|
51
|
-
"mx-1 w-full
|
|
54
|
+
"mx-1 w-full rounded min-w-fit border bg-white dark:border-gray-700 dark:bg-gray-800 sm:p-8",
|
|
52
55
|
large:
|
|
53
|
-
"mx-1 w-full max-w-lg rounded border
|
|
56
|
+
"mx-1 w-full max-w-lg rounded border p-4 shadow-md dark:border-gray-700 dark:bg-gray-800 sm:p-8",
|
|
54
57
|
}
|
|
55
58
|
return (
|
|
56
59
|
<div
|
|
57
60
|
dir={isArabic ? "rtl" : "ltr"}
|
|
58
|
-
className={clsx(
|
|
61
|
+
className={clsx(
|
|
62
|
+
cardSizes[size],
|
|
63
|
+
"flex flex-col gap-4 border-2 bg-white p-4"
|
|
64
|
+
)}
|
|
59
65
|
>
|
|
60
|
-
<h5 className="
|
|
66
|
+
<h5 className="text-md 0 font-bold text-gray-500 dark:text-gray-400">
|
|
61
67
|
{props.title}
|
|
62
68
|
</h5>
|
|
63
|
-
<div className="flex items-baseline
|
|
64
|
-
{/* {isArabic ? ( */}
|
|
69
|
+
<div className=" flex items-baseline text-gray-900 dark:text-white">
|
|
65
70
|
<>
|
|
66
71
|
<span className="text-5xl font-extrabold tracking-tight">
|
|
67
72
|
{props.price}
|
|
68
73
|
</span>
|
|
69
74
|
<span className="mx-1 text-sm font-semibold">
|
|
70
|
-
{" "}
|
|
71
|
-
{/* {
|
|
72
|
-
currencyMapping[
|
|
73
|
-
props.currency?.toLowerCase() as keyof CurrencyTextTypes
|
|
74
|
-
]
|
|
75
|
-
} */}
|
|
76
75
|
{props.texts.currencyText}
|
|
77
76
|
</span>
|
|
78
77
|
</>
|
|
79
|
-
{/*
|
|
80
|
-
// <>
|
|
81
|
-
// <span className="text-sm font-semibold">
|
|
82
|
-
// {" "}
|
|
83
|
-
// {
|
|
84
|
-
// currencyMapping[
|
|
85
|
-
// props.currency?.toLowerCase() as keyof CurrencyTextTypes
|
|
86
|
-
// ]
|
|
87
|
-
// }
|
|
88
|
-
// </span>
|
|
89
|
-
// <span className="mx-1 text-5xl font-extrabold tracking-tight">
|
|
90
|
-
// {props.price}
|
|
91
|
-
// </span>
|
|
92
|
-
// </>
|
|
93
|
-
// )} */}
|
|
94
|
-
<span className="ml-1 text-xl font-normal text-gray-500 dark:text-gray-400">
|
|
78
|
+
{/* <span className="ml-1 text-xl font-normal text-gray-500 dark:text-gray-400">
|
|
95
79
|
/ {props.texts.cycleText}
|
|
96
|
-
|
|
97
|
-
? cycleTextsArabic[props.cycleText as keyof CycleTextTypes]
|
|
98
|
-
: cycleTextsEnglish[props.cycleText as keyof CycleTextTypes]} */}
|
|
99
|
-
</span>
|
|
80
|
+
</span> */}
|
|
100
81
|
</div>
|
|
101
|
-
<
|
|
102
|
-
{props.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
82
|
+
<h5 className="text-md font-normal text-gray-500 dark:text-gray-400">
|
|
83
|
+
{props.texts.subtitle}
|
|
84
|
+
</h5>
|
|
85
|
+
|
|
86
|
+
{props.features && (
|
|
87
|
+
<ul role="list" className="space-y-0 ">
|
|
88
|
+
{props.features?.map((feature, o) => {
|
|
89
|
+
return (
|
|
90
|
+
<li key={o} className="flex ">
|
|
91
|
+
<svg
|
|
92
|
+
aria-hidden="true"
|
|
93
|
+
className="m-2 h-5 w-5 flex-shrink-0 text-blue-600 dark:text-blue-500"
|
|
94
|
+
fill="currentColor"
|
|
95
|
+
viewBox="0 0 20 20"
|
|
96
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
97
|
+
>
|
|
98
|
+
<title>Check icon</title>
|
|
99
|
+
<path
|
|
100
|
+
fillRule="evenodd"
|
|
101
|
+
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
|
|
102
|
+
clipRule="evenodd"
|
|
103
|
+
></path>
|
|
104
|
+
</svg>
|
|
105
|
+
<span className="flex items-center text-center font-normal leading-tight text-gray-500 dark:text-gray-400">
|
|
106
|
+
{feature.text}
|
|
107
|
+
</span>
|
|
108
|
+
</li>
|
|
109
|
+
)
|
|
110
|
+
})}
|
|
111
|
+
</ul>
|
|
112
|
+
)}
|
|
126
113
|
<button
|
|
127
114
|
type="button"
|
|
128
115
|
className="inline-flex w-full justify-center rounded bg-blue-600 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-4 focus:ring-blue-200 dark:focus:ring-blue-900"
|
|
@@ -130,36 +117,5 @@ export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = (
|
|
|
130
117
|
{props.texts.buttonText}
|
|
131
118
|
</button>
|
|
132
119
|
</div>
|
|
133
|
-
|
|
134
|
-
// <Container
|
|
135
|
-
// variant={props.selectedPlan ? "selected-plan-card" : "plan-card"}
|
|
136
|
-
// style={{ direction: isArabic ? "rtl" : "ltr" }}
|
|
137
|
-
// >
|
|
138
|
-
// {props.discount && (
|
|
139
|
-
// <Chip
|
|
140
|
-
// label={props.discount}
|
|
141
|
-
// variant="standard"
|
|
142
|
-
// style={{
|
|
143
|
-
// position: "absolute",
|
|
144
|
-
// bottom: 10,
|
|
145
|
-
// ...chipSpacing
|
|
146
|
-
// }}
|
|
147
|
-
// color="success"
|
|
148
|
-
// />
|
|
149
|
-
// )}
|
|
150
|
-
|
|
151
|
-
// <div
|
|
152
|
-
// style={{ padding: 20, color: props.selectedPlan ? "white" : "black" }}
|
|
153
|
-
// >
|
|
154
|
-
//
|
|
155
|
-
// </div>
|
|
156
|
-
// <button
|
|
157
|
-
// onClick={props.selectPlan}
|
|
158
|
-
// variant={props.selectedPlan ? "outlined" : "contained"}
|
|
159
|
-
// style={{ margin: 20 }}
|
|
160
|
-
// >
|
|
161
|
-
// {props.buttonText}
|
|
162
|
-
// </button>
|
|
163
|
-
// </Container>
|
|
164
120
|
)
|
|
165
121
|
}
|
|
@@ -175,14 +175,10 @@ export const HawaSelect: React.FunctionComponent<SelectTypes> = (props) => {
|
|
|
175
175
|
isMulti={props.isMulti}
|
|
176
176
|
isSearchable={props.isSearchable}
|
|
177
177
|
onCreateOption={() => console.log("im changing")}
|
|
178
|
-
onChange={(newValue, action) =>
|
|
179
|
-
|
|
180
|
-
props.onChange(newValue, action)
|
|
181
|
-
}}
|
|
182
|
-
onInputChange={(newValue, action) => {
|
|
183
|
-
console.log("onInputChange====", newValue)
|
|
178
|
+
onChange={(newValue, action) => props.onChange(newValue, action)}
|
|
179
|
+
onInputChange={(newValue, action) =>
|
|
184
180
|
props.onInputChange(newValue, action)
|
|
185
|
-
}
|
|
181
|
+
}
|
|
186
182
|
/>
|
|
187
183
|
)}
|
|
188
184
|
{props.helperText && (
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import clsx from "clsx"
|
|
3
|
+
import { FaCheck } from "react-icons/fa"
|
|
4
|
+
|
|
5
|
+
type THawaTimeline = {
|
|
6
|
+
steps: any[any]
|
|
7
|
+
currentStep: any
|
|
8
|
+
orientation: "vertical" | "horizontal"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const HawaStepper: React.FunctionComponent<THawaTimeline> = ({
|
|
12
|
+
orientation = "horizontal",
|
|
13
|
+
...props
|
|
14
|
+
}) => {
|
|
15
|
+
let orientationStyles = {
|
|
16
|
+
vertical: "flex flex-col items-start w-fit",
|
|
17
|
+
horizontal: "flex flex-row",
|
|
18
|
+
}
|
|
19
|
+
let lineStyles = {
|
|
20
|
+
vertical: "w-1 h-32 rounded bg-red-200 ml-6 my-2",
|
|
21
|
+
horizontal: "h-0.5 flex w-full rounded bg-red-200",
|
|
22
|
+
}
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
className={clsx(
|
|
26
|
+
orientationStyles[orientation],
|
|
27
|
+
" flex-wrap justify-start gap-4"
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
{props.steps.map((step: any, i: number) => {
|
|
31
|
+
return (
|
|
32
|
+
<div className="my-2 flex w-auto flex-row flex-wrap justify-start ">
|
|
33
|
+
<div
|
|
34
|
+
className={
|
|
35
|
+
orientation === "vertical"
|
|
36
|
+
? "flex w-full flex-row items-center"
|
|
37
|
+
: i + 1 === props.steps.length
|
|
38
|
+
? "flex w-full flex-row items-center justify-start gap-2"
|
|
39
|
+
: "flex flex-row items-center justify-start gap-2 after:mx-2 after:hidden after:h-1 after:w-10 after:border-b after:border-gray-200 dark:after:border-gray-700 sm:after:inline-block sm:after:content-[''] md:w-full xl:after:mx-10"
|
|
40
|
+
}
|
|
41
|
+
>
|
|
42
|
+
<div className="flex flex-row gap-2 ">
|
|
43
|
+
{/* Icon */}
|
|
44
|
+
<div
|
|
45
|
+
className={clsx(
|
|
46
|
+
"ring-buttonPrimary-200 flex h-6 w-6 min-w-[24px] items-center justify-center rounded ring-2 ring-offset-2",
|
|
47
|
+
i + 1 <= props.currentStep
|
|
48
|
+
? "bg-buttonPrimary-500 text-white"
|
|
49
|
+
: "bg-buttonPrimary-200"
|
|
50
|
+
)}
|
|
51
|
+
>
|
|
52
|
+
{i + 1 <= props.currentStep ? (
|
|
53
|
+
<FaCheck fontSize={11} />
|
|
54
|
+
) : (
|
|
55
|
+
i + 1
|
|
56
|
+
)}
|
|
57
|
+
</div>
|
|
58
|
+
{/* Text */}
|
|
59
|
+
<div className="whitespace-nowrap">{step}</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
)
|
|
64
|
+
})}
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const TimelineStep = (props) => {
|
|
70
|
+
let defaultStyles = {
|
|
71
|
+
vertical: "",
|
|
72
|
+
horizontal: "",
|
|
73
|
+
}
|
|
74
|
+
return (
|
|
75
|
+
<div
|
|
76
|
+
className={
|
|
77
|
+
props.orientation === "vertical"
|
|
78
|
+
? "flex w-full flex-row items-center"
|
|
79
|
+
: props.stepNumber === props.steps
|
|
80
|
+
? "flex items-center"
|
|
81
|
+
: "after:border-1 flex items-center after:mx-6 after:hidden after:h-1 after:w-10 after:border-b after:border-gray-200 dark:after:border-gray-700 sm:after:inline-block sm:after:content-[''] md:w-full xl:after:mx-10"
|
|
82
|
+
}
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
className={clsx(
|
|
86
|
+
"ring-buttonPrimary-200 m-2 mr-4 flex h-6 w-6 items-center justify-center rounded ring-2 ring-offset-2",
|
|
87
|
+
props.current
|
|
88
|
+
? "bg-buttonPrimary-500 text-white"
|
|
89
|
+
: "bg-buttonPrimary-200"
|
|
90
|
+
)}
|
|
91
|
+
>
|
|
92
|
+
{props.current ? <FaCheck fontSize={11} /> : props.stepNumber}
|
|
93
|
+
</div>
|
|
94
|
+
<div className="whitespace-nowrap">{props.stepName}</div>
|
|
95
|
+
</div>
|
|
96
|
+
)
|
|
97
|
+
}
|