@sikka/hawa 0.1.4 → 0.1.6
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 +40 -31
- package/es/elements/HawaAlert.d.ts +1 -1
- package/es/elements/index.d.ts +5 -0
- package/es/index.es.js +3 -3
- package/lib/elements/HawaAlert.d.ts +1 -1
- package/lib/elements/index.d.ts +5 -0
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/src/blocks/AuthForms/CodeConfirmation.tsx +1 -1
- package/src/blocks/AuthForms/ResetPasswordForm.tsx +1 -1
- package/src/blocks/AuthForms/SignInForm.tsx +1 -1
- package/src/blocks/AuthForms/SignUpForm.tsx +2 -2
- package/src/blocks/Misc/NotFound.tsx +6 -1
- package/src/blocks/Misc/Testimonial.tsx +29 -26
- package/src/blocks/Payment/ChargeWalletForm.tsx +15 -19
- package/src/blocks/Payment/Confirmation.tsx +1 -1
- package/src/blocks/Referral/ReferralSettlement.tsx +12 -35
- package/src/elements/Breadcrumb.tsx +1 -1
- package/src/elements/Button.tsx +6 -3
- package/src/elements/DragDropImages.tsx +2 -2
- package/src/elements/HawaAlert.tsx +12 -5
- package/src/elements/HawaButton.tsx +3 -3
- package/src/elements/HawaCodeBlock.tsx +10 -7
- package/src/elements/HawaLoading.tsx +5 -8
- package/src/elements/HawaPhoneInput.tsx +1 -1
- package/src/elements/HawaPricingCard.tsx +15 -17
- package/src/elements/HawaSelect.tsx +1 -1
- package/src/elements/HawaStepper.tsx +4 -4
- package/src/elements/HawaTabs.tsx +8 -8
- package/src/elements/SubsectionList.tsx +1 -1
- package/src/elements/UsageCard.tsx +1 -1
- package/src/elements/index.ts +7 -0
- package/src/styles.css +40 -31
- package/src/tailwind.css +5 -0
package/package.json
CHANGED
|
@@ -55,7 +55,7 @@ export const CodeConfirmation: FC<TConfirmation> = (props) => {
|
|
|
55
55
|
<HawaPinInput width="full" digits={6} getPins={(e) => setPins(e)} />
|
|
56
56
|
<div className=" py-2 text-center text-xs text-muted-foreground">
|
|
57
57
|
<span>{props.texts.didntGetCode ?? "Didn't get the code?"}</span>{" "}
|
|
58
|
-
<span className="
|
|
58
|
+
<span className="clickable-link">
|
|
59
59
|
{props.texts.resendCode ?? "Click to resend"}
|
|
60
60
|
</span>
|
|
61
61
|
</div>
|
|
@@ -74,7 +74,7 @@ export const ResetPasswordForm: FC<ResetPasswordType> = (props) => {
|
|
|
74
74
|
{props.texts.dontHaveAccount ?? "Don't have an account? "}
|
|
75
75
|
<span
|
|
76
76
|
onClick={props.handleRouteToSignUp}
|
|
77
|
-
className="
|
|
77
|
+
className="clickable-link"
|
|
78
78
|
>
|
|
79
79
|
{props.texts.signUpText ?? "Sign Up"}
|
|
80
80
|
</span>
|
|
@@ -127,7 +127,7 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
|
|
|
127
127
|
{props.texts.newUserText}{" "}
|
|
128
128
|
<span
|
|
129
129
|
onClick={props.handleRouteToSignUp}
|
|
130
|
-
className="
|
|
130
|
+
className="clickable-link"
|
|
131
131
|
>
|
|
132
132
|
{props.texts.createAccount}
|
|
133
133
|
</span>
|
|
@@ -257,7 +257,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
257
257
|
{props.texts.iAcceptText}{" "}
|
|
258
258
|
<a
|
|
259
259
|
onClick={props.handleRouteToTOS}
|
|
260
|
-
className="
|
|
260
|
+
className="clickable-link"
|
|
261
261
|
>
|
|
262
262
|
{props.texts.termsText}
|
|
263
263
|
</a>
|
|
@@ -291,7 +291,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
291
291
|
<span>{props.texts.existingUserText}</span>
|
|
292
292
|
<span
|
|
293
293
|
onClick={props.handleRouteToSignIn}
|
|
294
|
-
className="
|
|
294
|
+
className="clickable-link"
|
|
295
295
|
>
|
|
296
296
|
{props.texts.signInText}
|
|
297
297
|
</span>
|
|
@@ -24,7 +24,12 @@ export const NotFound: FC<NotFoundTypes> = ({
|
|
|
24
24
|
{texts?.pageNotFound ?? "Page Not Found"}
|
|
25
25
|
</div>
|
|
26
26
|
<div className="mb-4 text-center">
|
|
27
|
-
{texts?.ifLost ??
|
|
27
|
+
{texts?.ifLost ?? (
|
|
28
|
+
<>
|
|
29
|
+
If you're lost please contact us{" "}
|
|
30
|
+
<span className="clickable-link">help@sikka.io</span>
|
|
31
|
+
</>
|
|
32
|
+
)}
|
|
28
33
|
</div>
|
|
29
34
|
<Button className="w-full">{texts?.home ?? "Home"}</Button>
|
|
30
35
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC } from "react"
|
|
2
|
+
import { Card, CardContent } from "../../elements/Card"
|
|
2
3
|
|
|
3
4
|
type TEmptyState = {
|
|
4
5
|
variant?: "outlined" | "contained" | "neobrutalism"
|
|
@@ -6,39 +7,41 @@ type TEmptyState = {
|
|
|
6
7
|
|
|
7
8
|
export const Testimonial: FC<TEmptyState> = (props) => {
|
|
8
9
|
return (
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<p className="mb-4 max-w-sm">
|
|
12
|
-
The team at Sikka Software is simply amazing. The tech is easy to
|
|
13
|
-
follow, easy to work with, and infinitely flexible. The solution
|
|
14
|
-
opportunities created by Tines are endless.
|
|
15
|
-
</p>
|
|
16
|
-
</div>
|
|
17
|
-
<div className="flex flex-row gap-4">
|
|
18
|
-
<svg width="48" height="48" viewBox="0 0 48 48" fill="none">
|
|
19
|
-
<rect width="48" height="48" rx="24" fill="#45BE8B"></rect>
|
|
20
|
-
<path
|
|
21
|
-
d="M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z"
|
|
22
|
-
fill="#FFFFFF"
|
|
23
|
-
></path>
|
|
24
|
-
<path
|
|
25
|
-
d="M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z"
|
|
26
|
-
fill="#FFFFFF"
|
|
27
|
-
></path>
|
|
28
|
-
</svg>
|
|
29
|
-
<span className="border border-l "></span>{" "}
|
|
10
|
+
<Card>
|
|
11
|
+
<CardContent headless>
|
|
30
12
|
<div>
|
|
31
|
-
<
|
|
32
|
-
|
|
13
|
+
<p className="mb-4 max-w-sm">
|
|
14
|
+
The team at Sikka Software is simply amazing. The tech is easy to
|
|
15
|
+
follow, easy to work with, and infinitely flexible. The solution
|
|
16
|
+
opportunities created by Tines are endless.
|
|
17
|
+
</p>
|
|
33
18
|
</div>
|
|
34
|
-
|
|
19
|
+
<div className="flex flex-row gap-4">
|
|
20
|
+
<svg width="48" height="48" viewBox="0 0 48 48" fill="none">
|
|
21
|
+
<rect width="48" height="48" rx="24" fill="#45BE8B"></rect>
|
|
22
|
+
<path
|
|
23
|
+
d="M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z"
|
|
24
|
+
fill="#FFFFFF"
|
|
25
|
+
></path>
|
|
26
|
+
<path
|
|
27
|
+
d="M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z"
|
|
28
|
+
fill="#FFFFFF"
|
|
29
|
+
></path>
|
|
30
|
+
</svg>
|
|
31
|
+
<span className="border border-l "></span>{" "}
|
|
32
|
+
<div>
|
|
33
|
+
<strong>Brent Lassi</strong>
|
|
34
|
+
<div> Chief Information Security Officer</div>
|
|
35
|
+
</div>
|
|
36
|
+
{/* <div>
|
|
35
37
|
<img
|
|
36
38
|
src="https://www.datocms-assets.com/55802/1636449069-bluecore-logo-dark.svg"
|
|
37
39
|
title="Logo of Brent Lassi"
|
|
38
40
|
alt="Logo of Brent Lassi"
|
|
39
41
|
/>
|
|
40
42
|
</div> */}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
</div>
|
|
44
|
+
</CardContent>
|
|
45
|
+
</Card>
|
|
43
46
|
)
|
|
44
47
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, FC } from "react"
|
|
2
|
-
import { HawaButton } from "../../elements"
|
|
3
2
|
import { Card, CardContent } from "../../elements/Card"
|
|
4
3
|
import { Button } from "../../elements/Button"
|
|
4
|
+
import { Input } from "../../elements/Input"
|
|
5
5
|
|
|
6
6
|
type ChargeWalletTypes = {
|
|
7
7
|
currency: any
|
|
@@ -24,18 +24,20 @@ export const ChargeWalletForm: FC<ChargeWalletTypes> = (props) => {
|
|
|
24
24
|
</div>
|
|
25
25
|
<div className="text-sm font-normal">{props.currency || "SAR"}</div>
|
|
26
26
|
</div>
|
|
27
|
-
<div className="mb-2 flex w-full flex-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
<div className="mb-2 flex w-full flex-col gap-4 text-center">
|
|
28
|
+
<div className="mb-2 flex w-full flex-row gap-4 text-center">
|
|
29
|
+
<Button variant="outline" className="h-full w-full">
|
|
30
|
+
10 SAR
|
|
31
|
+
</Button>
|
|
32
|
+
<Button variant="outline" className="h-full w-full">
|
|
33
|
+
50 SAR
|
|
34
|
+
</Button>
|
|
35
|
+
<Button variant="outline" className="h-full w-full">
|
|
36
|
+
100 SAR
|
|
37
|
+
</Button>
|
|
38
|
+
</div>
|
|
34
39
|
|
|
35
|
-
<
|
|
36
|
-
placeholder="Custom"
|
|
37
|
-
className="h-auto w-full rounded bg-gray-100 p-4"
|
|
38
|
-
/>
|
|
40
|
+
<Input placeholder="Custom Amount" type="number" name="amount" />
|
|
39
41
|
</div>
|
|
40
42
|
{/* <FormProvider {...methods}>
|
|
41
43
|
<form onSubmit={handleSubmit(props.handleChargeWallet)}>
|
|
@@ -67,13 +69,7 @@ export const ChargeWalletForm: FC<ChargeWalletTypes> = (props) => {
|
|
|
67
69
|
}}
|
|
68
70
|
/>
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
color="primary"
|
|
72
|
-
// type="submit"
|
|
73
|
-
width="full"
|
|
74
|
-
>
|
|
75
|
-
{props.texts.chargeWallet}
|
|
76
|
-
</HawaButton>
|
|
72
|
+
|
|
77
73
|
</form>
|
|
78
74
|
</FormProvider> */}
|
|
79
75
|
<Button className="mt-6 w-full">{props.texts.chargeWallet}</Button>
|
|
@@ -84,7 +84,7 @@ export const ConfirmationPage: FC<ConfirmationPageTypes> = (props) => {
|
|
|
84
84
|
{props.texts.fasterPaymentNote}
|
|
85
85
|
</div>
|
|
86
86
|
<a
|
|
87
|
-
className="
|
|
87
|
+
className="clickable-link text-xs"
|
|
88
88
|
onClick={props.handleRefundPolicyLink}
|
|
89
89
|
>
|
|
90
90
|
{props.texts.refundPolicy}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { FC } from "react"
|
|
2
2
|
import {
|
|
3
3
|
HawaAlert,
|
|
4
|
-
HawaButton,
|
|
5
4
|
HawaChip,
|
|
6
5
|
HawaMenu,
|
|
7
6
|
HawaSelect,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
} from "../../elements"
|
|
10
9
|
import { Controller, FormProvider, useForm } from "react-hook-form"
|
|
11
10
|
import { Card, CardContent } from "../../elements/Card"
|
|
11
|
+
import { Button } from "../../elements/Button"
|
|
12
12
|
|
|
13
13
|
type TReferralSettlement = {
|
|
14
14
|
referralLink: string
|
|
@@ -58,7 +58,7 @@ export const ReferralSettlement: FC<TReferralSettlement> = ({
|
|
|
58
58
|
</FormProvider>
|
|
59
59
|
</div>
|
|
60
60
|
<div>
|
|
61
|
-
<
|
|
61
|
+
<Button className="mt-6 w-full">Add Bank Account</Button>
|
|
62
62
|
</div>
|
|
63
63
|
{withdrawError && (
|
|
64
64
|
<div>
|
|
@@ -106,9 +106,14 @@ const SettlementAccountCard = (props) => {
|
|
|
106
106
|
</div>
|
|
107
107
|
<div className="flex flex-row items-center justify-center gap-2">
|
|
108
108
|
{props.default && (
|
|
109
|
-
<
|
|
110
|
-
Default
|
|
111
|
-
|
|
109
|
+
<HawaChip
|
|
110
|
+
label="Default"
|
|
111
|
+
size="small"
|
|
112
|
+
// disabled
|
|
113
|
+
// variant="outlined"
|
|
114
|
+
// size="xs"
|
|
115
|
+
// margins="none"
|
|
116
|
+
/>
|
|
112
117
|
)}
|
|
113
118
|
|
|
114
119
|
<HawaMenu
|
|
@@ -123,7 +128,7 @@ const SettlementAccountCard = (props) => {
|
|
|
123
128
|
// position={direction === "rtl" ? "right-bottom" : "left-bottom"}
|
|
124
129
|
// direction={direction}
|
|
125
130
|
>
|
|
126
|
-
<
|
|
131
|
+
<Button variant="outline" size="icon">
|
|
127
132
|
<svg
|
|
128
133
|
aria-label="Vertical Three Dots Menu Icon"
|
|
129
134
|
className="rotate-90"
|
|
@@ -136,36 +141,8 @@ const SettlementAccountCard = (props) => {
|
|
|
136
141
|
>
|
|
137
142
|
<path d="M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"></path>
|
|
138
143
|
</svg>
|
|
139
|
-
</
|
|
140
|
-
{/* <div className="flex w-fit rotate-90 cursor-pointer items-center justify-center rounded p-2 hover:bg-buttonPrimary-500/50">
|
|
141
|
-
<svg
|
|
142
|
-
aria-label="Vertical Three Dots Menu Icon"
|
|
143
|
-
stroke="currentColor"
|
|
144
|
-
fill="currentColor"
|
|
145
|
-
stroke-width="0"
|
|
146
|
-
viewBox="0 0 16 16"
|
|
147
|
-
height="1em"
|
|
148
|
-
width="1em"
|
|
149
|
-
>
|
|
150
|
-
<path d="M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"></path>
|
|
151
|
-
</svg>
|
|
152
|
-
</div> */}
|
|
144
|
+
</Button>
|
|
153
145
|
</HawaMenu>
|
|
154
|
-
{/* {!props.default && <HawaButton size="small">Make Default</HawaButton>} */}
|
|
155
|
-
{/* <HawaButton tooltip="Delete" size="small">
|
|
156
|
-
<svg
|
|
157
|
-
aria-hidden="true"
|
|
158
|
-
className="h-5 w-5"
|
|
159
|
-
fill="currentColor"
|
|
160
|
-
viewBox="0 0 20 20"
|
|
161
|
-
>
|
|
162
|
-
<path
|
|
163
|
-
fillRule="evenodd"
|
|
164
|
-
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
165
|
-
clipRule="evenodd"
|
|
166
|
-
></path>
|
|
167
|
-
</svg>
|
|
168
|
-
</HawaButton> */}
|
|
169
146
|
</div>
|
|
170
147
|
</div>
|
|
171
148
|
)
|
|
@@ -20,7 +20,7 @@ const HawaBreadcrumb: FC<TBreadcrumb> = ({
|
|
|
20
20
|
className={
|
|
21
21
|
index + 1 === breadcrumbLinks.length
|
|
22
22
|
? "pointer-events-none"
|
|
23
|
-
: "underline-offset-4 transition-all hover:text-
|
|
23
|
+
: "underline-offset-4 transition-all hover:text-primary hover:underline hover:decoration-2"
|
|
24
24
|
}
|
|
25
25
|
>
|
|
26
26
|
{singleBreadcrumbLink.label}
|
package/src/elements/Button.tsx
CHANGED
|
@@ -63,9 +63,12 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
63
63
|
{...props}
|
|
64
64
|
>
|
|
65
65
|
{isLoading ? (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
<HawaLoading
|
|
67
|
+
design="dots-pulse"
|
|
68
|
+
color="bg-primary-foreground"
|
|
69
|
+
size="button"
|
|
70
|
+
/>
|
|
71
|
+
) : (
|
|
69
72
|
children
|
|
70
73
|
)}
|
|
71
74
|
</Comp>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react"
|
|
2
2
|
import { useDropzone } from "react-dropzone"
|
|
3
3
|
import { HawaAlert } from "./HawaAlert"
|
|
4
|
-
import { HawaButton } from "./HawaButton"
|
|
5
4
|
import clsx from "clsx"
|
|
5
|
+
import { Button } from "./Button"
|
|
6
6
|
|
|
7
7
|
//TODO: This element needs more improvements and testing
|
|
8
8
|
|
|
@@ -236,7 +236,7 @@ export const DragDropImages: React.FunctionComponent<DragDropImagesTypes> = ({
|
|
|
236
236
|
</div>
|
|
237
237
|
{acceptedFiles.length > 0 && (
|
|
238
238
|
<div className="flex justify-center rounded-lg p-2 ">
|
|
239
|
-
<
|
|
239
|
+
<Button onClick={clearAllFiles}>Clear All</Button>
|
|
240
240
|
</div>
|
|
241
241
|
)}
|
|
242
242
|
{acceptedFiles.length > 0 && thumbs && showPreview ? (
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
import { HawaButton } from "./HawaButton"
|
|
4
|
+
import { Button } from "./Button"
|
|
4
5
|
|
|
5
6
|
type AlertTypes = {
|
|
6
7
|
severity: "info" | "warning" | "error" | "success"
|
|
@@ -22,7 +23,13 @@ type AlertTypes = {
|
|
|
22
23
|
{
|
|
23
24
|
label: string
|
|
24
25
|
onClick: any
|
|
25
|
-
variant:
|
|
26
|
+
variant:
|
|
27
|
+
| "outline"
|
|
28
|
+
| "link"
|
|
29
|
+
| "default"
|
|
30
|
+
| "destructive"
|
|
31
|
+
| "secondary"
|
|
32
|
+
| "ghost"
|
|
26
33
|
}
|
|
27
34
|
]
|
|
28
35
|
persistant?: boolean
|
|
@@ -144,14 +151,13 @@ export const HawaAlert: React.FunctionComponent<AlertTypes> = ({
|
|
|
144
151
|
{props.actions && (
|
|
145
152
|
<div className="mt-2 flex flex-row gap-2">
|
|
146
153
|
{props.actions.map((act, index) => (
|
|
147
|
-
<
|
|
154
|
+
<Button
|
|
148
155
|
key={index}
|
|
149
156
|
variant={act.variant}
|
|
150
157
|
onClick={act.onClick()}
|
|
151
|
-
margins="none"
|
|
152
158
|
>
|
|
153
159
|
{act.label}
|
|
154
|
-
</
|
|
160
|
+
</Button>
|
|
155
161
|
))}
|
|
156
162
|
</div>
|
|
157
163
|
)}
|
|
@@ -161,7 +167,7 @@ export const HawaAlert: React.FunctionComponent<AlertTypes> = ({
|
|
|
161
167
|
<button
|
|
162
168
|
type="button"
|
|
163
169
|
className={clsx(
|
|
164
|
-
"absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900
|
|
170
|
+
"absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white",
|
|
165
171
|
closeButtonStyle[props.severity],
|
|
166
172
|
direction === "rtl" ? "left-2" : "right-2"
|
|
167
173
|
)}
|
|
@@ -176,6 +182,7 @@ export const HawaAlert: React.FunctionComponent<AlertTypes> = ({
|
|
|
176
182
|
>
|
|
177
183
|
<span className="sr-only">Close</span>
|
|
178
184
|
<svg
|
|
185
|
+
aria-label="Close Icon"
|
|
179
186
|
aria-hidden="true"
|
|
180
187
|
className="h-5 w-5"
|
|
181
188
|
fill="currentColor"
|
|
@@ -36,12 +36,12 @@ const disabledVariantSyles = {
|
|
|
36
36
|
outlined: "text-gray-300 border-gray-300",
|
|
37
37
|
}
|
|
38
38
|
const baseStyles =
|
|
39
|
-
"cursor-pointer
|
|
39
|
+
"cursor-pointer justify-center items-center text-center font-medium transition-all "
|
|
40
40
|
const sizeStyles = {
|
|
41
41
|
icon: "h-10 w-10",
|
|
42
42
|
xs: "px-1.5 py-2 text-[9px] h-fit",
|
|
43
43
|
small: "text-xs px-2.5 py-1.5",
|
|
44
|
-
medium: "text-sm leading-4 px-3 py-2
|
|
44
|
+
medium: "text-sm leading-4 px-3 py-2",
|
|
45
45
|
default: "h-10 px-4 py-2",
|
|
46
46
|
large: "text-sm px-4 py-2",
|
|
47
47
|
noPadding: "p-0",
|
|
@@ -90,7 +90,7 @@ export const HawaButton: FC<ButtonProps> = ({
|
|
|
90
90
|
className,
|
|
91
91
|
variant = "contained",
|
|
92
92
|
color = "default",
|
|
93
|
-
size = "
|
|
93
|
+
size = "default",
|
|
94
94
|
width = "normal",
|
|
95
95
|
disabled = false,
|
|
96
96
|
isLoading = false,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { FC, useState } from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
import { HawaButton } from "./HawaButton"
|
|
4
|
+
import { Button } from "./Button"
|
|
4
5
|
|
|
5
6
|
type CodeBlockTypes = {
|
|
6
7
|
color?: "dark" | "light"
|
|
@@ -56,7 +57,7 @@ export const HawaCodeBlock: FC<CodeBlockTypes> = ({
|
|
|
56
57
|
<div
|
|
57
58
|
className={clsx(
|
|
58
59
|
selectedTab === i
|
|
59
|
-
? "
|
|
60
|
+
? " border-b-2 border-primary"
|
|
60
61
|
: "bg-transparent"
|
|
61
62
|
)}
|
|
62
63
|
>
|
|
@@ -73,7 +74,7 @@ export const HawaCodeBlock: FC<CodeBlockTypes> = ({
|
|
|
73
74
|
</div>
|
|
74
75
|
)}
|
|
75
76
|
{fileName && (
|
|
76
|
-
<div className="flex flex-row gap-2 rounded-t p-2 pb-0 text-black
|
|
77
|
+
<div className="flex flex-row gap-2 rounded-t bg-gray-100 p-2 pb-0 text-black dark:bg-gray-700 dark:text-white">
|
|
77
78
|
<div
|
|
78
79
|
className={clsx(
|
|
79
80
|
"mb-1 w-full max-w-[52px] rounded-inner p-2 py-1 text-center text-[0.75rem]"
|
|
@@ -102,16 +103,18 @@ export const HawaCodeBlock: FC<CodeBlockTypes> = ({
|
|
|
102
103
|
>
|
|
103
104
|
Copied!
|
|
104
105
|
</div>
|
|
105
|
-
<
|
|
106
|
-
variant="outlined"
|
|
107
|
-
color="dark"
|
|
106
|
+
<Button
|
|
107
|
+
// variant="outlined"
|
|
108
|
+
// color="dark"
|
|
109
|
+
size="icon"
|
|
108
110
|
onClick={() => {
|
|
109
111
|
handleCopyClick()
|
|
110
112
|
navigator.clipboard.writeText(
|
|
111
113
|
tabs ? tabs[selectedTab].code : code
|
|
112
114
|
)
|
|
113
115
|
}}
|
|
114
|
-
|
|
116
|
+
// className="w-4"
|
|
117
|
+
// margins="none"
|
|
115
118
|
>
|
|
116
119
|
<svg
|
|
117
120
|
stroke="currentColor"
|
|
@@ -126,7 +129,7 @@ export const HawaCodeBlock: FC<CodeBlockTypes> = ({
|
|
|
126
129
|
<rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
|
|
127
130
|
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>
|
|
128
131
|
</svg>
|
|
129
|
-
</
|
|
132
|
+
</Button>
|
|
130
133
|
</div>
|
|
131
134
|
</code>
|
|
132
135
|
</pre>
|
|
@@ -34,7 +34,7 @@ export const HawaLoading: FC<LoadingTypes> = ({
|
|
|
34
34
|
"animate-bounce rounded-full delay-100 repeat-infinite",
|
|
35
35
|
size === "button" ? "h-2 w-2" : sizeStyles[size],
|
|
36
36
|
animationStyles[design.split("-")[1]],
|
|
37
|
-
color ? color : "bg-primary
|
|
37
|
+
color ? color : "bg-primary"
|
|
38
38
|
)}
|
|
39
39
|
></div>
|
|
40
40
|
<div
|
|
@@ -42,8 +42,7 @@ export const HawaLoading: FC<LoadingTypes> = ({
|
|
|
42
42
|
"animate-bounce rounded-full delay-200 repeat-infinite",
|
|
43
43
|
size === "button" ? "h-2 w-2" : sizeStyles[size],
|
|
44
44
|
animationStyles[design.split("-")[1]],
|
|
45
|
-
|
|
46
|
-
color ? color : "bg-primary-foreground"
|
|
45
|
+
color ? color : "bg-primary"
|
|
47
46
|
)}
|
|
48
47
|
></div>
|
|
49
48
|
<div
|
|
@@ -51,8 +50,7 @@ export const HawaLoading: FC<LoadingTypes> = ({
|
|
|
51
50
|
"animate-bounce rounded-full delay-300 repeat-infinite",
|
|
52
51
|
size === "button" ? "h-2 w-2" : sizeStyles[size],
|
|
53
52
|
animationStyles[design.split("-")[1]],
|
|
54
|
-
|
|
55
|
-
color ? color : "bg-primary-foreground"
|
|
53
|
+
color ? color : "bg-primary"
|
|
56
54
|
)}
|
|
57
55
|
></div>
|
|
58
56
|
</div>
|
|
@@ -67,12 +65,11 @@ export const HawaLoading: FC<LoadingTypes> = ({
|
|
|
67
65
|
viewBox="3 3 18 18"
|
|
68
66
|
>
|
|
69
67
|
<path
|
|
70
|
-
className="fill-
|
|
68
|
+
className="fill-primary/20"
|
|
71
69
|
d="M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
|
|
72
70
|
></path>
|
|
73
71
|
<path
|
|
74
|
-
|
|
75
|
-
className={color ? color : "fill-buttonPrimary-500"}
|
|
72
|
+
className={color ? color : "fill-primary"}
|
|
76
73
|
d="M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
|
|
77
74
|
></path>
|
|
78
75
|
</svg>
|
|
@@ -48,7 +48,7 @@ const Option: FC<OptionTypes> = ({
|
|
|
48
48
|
}) => (
|
|
49
49
|
<div
|
|
50
50
|
ref={innerRef}
|
|
51
|
-
className="m-2 flex cursor-pointer flex-row items-center justify-between rounded-inner p-1 px-2 hover:bg-
|
|
51
|
+
className="m-2 flex cursor-pointer flex-row items-center justify-between rounded-inner p-1 px-2 hover:bg-primary hover:text-primary-foreground"
|
|
52
52
|
{...innerProps}
|
|
53
53
|
>
|
|
54
54
|
<div className="flex flex-row items-center justify-center gap-1">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
2
|
import React, { FC } from "react"
|
|
3
3
|
import { HawaButton } from "./HawaButton"
|
|
4
|
+
import { Button } from "./Button"
|
|
4
5
|
|
|
5
6
|
// TODO: if feature.excluded is false, show gray and x
|
|
6
7
|
// TODO: add badge to feature if soon
|
|
@@ -31,27 +32,25 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
31
32
|
let isArabic = direction === "rtl"
|
|
32
33
|
let cardSizes = {
|
|
33
34
|
small:
|
|
34
|
-
"mx-1 w-full max-w-sm rounded border dark:border-gray-700
|
|
35
|
+
"mx-1 w-full max-w-sm rounded border dark:border-gray-700 bg-background ",
|
|
35
36
|
medium:
|
|
36
|
-
"mx-1 w-full rounded min-w-fit border dark:border-gray-700
|
|
37
|
+
"mx-1 w-full rounded min-w-fit border dark:border-gray-700 bg-background ",
|
|
37
38
|
large:
|
|
38
|
-
"mx-1 w-full max-w-lg rounded border dark:border-gray-700
|
|
39
|
+
"mx-1 w-full max-w-lg rounded border dark:border-gray-700 bg-background ",
|
|
39
40
|
}
|
|
40
41
|
return (
|
|
41
42
|
<div
|
|
42
43
|
dir={isArabic ? "rtl" : "ltr"}
|
|
43
44
|
className={clsx(
|
|
44
|
-
currentPlan
|
|
45
|
-
? "border-buttonPrimary-500 bg-layoutPrimary-500"
|
|
46
|
-
: "bg-white",
|
|
45
|
+
currentPlan ? "border-primary" : "bg-background",
|
|
47
46
|
cardSizes[size],
|
|
48
47
|
"flex flex-col gap-4 rounded border-2 p-4"
|
|
49
48
|
)}
|
|
50
49
|
>
|
|
51
|
-
<h5 className="text-md 0 font-bold text-
|
|
50
|
+
<h5 className="text-md 0 font-bold text-primary/70">
|
|
52
51
|
{props.texts.title}
|
|
53
52
|
</h5>
|
|
54
|
-
<div className=" flex
|
|
53
|
+
<div className=" text-primary/ flex items-baseline">
|
|
55
54
|
<>
|
|
56
55
|
<span className="text-5xl font-extrabold tracking-tight">
|
|
57
56
|
{props.price}
|
|
@@ -60,11 +59,11 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
60
59
|
{props.texts.currencyText}
|
|
61
60
|
</span>
|
|
62
61
|
</>
|
|
63
|
-
<span className="ml-1 text-xl font-normal text-
|
|
62
|
+
<span className="ml-1 text-xl font-normal text-primary/70">
|
|
64
63
|
/ {props.texts.cycleText}
|
|
65
64
|
</span>
|
|
66
65
|
</div>
|
|
67
|
-
<h5 className="text-md font-normal text-
|
|
66
|
+
<h5 className="text-md font-normal text-primary/70">
|
|
68
67
|
{props.texts.subtitle}
|
|
69
68
|
</h5>
|
|
70
69
|
|
|
@@ -74,19 +73,19 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
74
73
|
return (
|
|
75
74
|
<li key={o} className="flex ">
|
|
76
75
|
<svg
|
|
76
|
+
aria-label="Check Icon"
|
|
77
77
|
aria-hidden="true"
|
|
78
|
-
className="m-2 h-5 w-5 flex-shrink-0 text-
|
|
78
|
+
className="m-2 h-5 w-5 flex-shrink-0 text-primary"
|
|
79
79
|
fill="currentColor"
|
|
80
80
|
viewBox="0 0 20 20"
|
|
81
81
|
>
|
|
82
|
-
<title>Check icon</title>
|
|
83
82
|
<path
|
|
84
83
|
fillRule="evenodd"
|
|
85
84
|
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"
|
|
86
85
|
clipRule="evenodd"
|
|
87
86
|
></path>
|
|
88
87
|
</svg>
|
|
89
|
-
<span className="flex items-center text-center font-normal leading-tight text-
|
|
88
|
+
<span className="flex items-center text-center font-normal leading-tight text-primary/70 ">
|
|
90
89
|
{feature.text}
|
|
91
90
|
</span>
|
|
92
91
|
</li>
|
|
@@ -94,14 +93,13 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
94
93
|
})}
|
|
95
94
|
</ul>
|
|
96
95
|
)}
|
|
97
|
-
<
|
|
96
|
+
<Button
|
|
98
97
|
onClick={props.onPlanClicked}
|
|
99
|
-
margins="none"
|
|
100
98
|
disabled={currentPlan}
|
|
101
|
-
|
|
99
|
+
className="w-full"
|
|
102
100
|
>
|
|
103
101
|
{props.texts.buttonText}
|
|
104
|
-
</
|
|
102
|
+
</Button>
|
|
105
103
|
</div>
|
|
106
104
|
)
|
|
107
105
|
}
|
|
@@ -87,7 +87,7 @@ const Option: FC<OptionTypes> = ({
|
|
|
87
87
|
}) => (
|
|
88
88
|
<div
|
|
89
89
|
ref={innerRef}
|
|
90
|
-
className="flex flex-row items-center justify-between rounded-inner p-1 px-2 hover:
|
|
90
|
+
className="flex flex-row items-center justify-between rounded-inner p-1 px-2 hover:text-primary-foreground hover:bg-primary"
|
|
91
91
|
{...innerProps}
|
|
92
92
|
>
|
|
93
93
|
{children}
|