@sikka/hawa 0.0.276 → 0.0.277
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 +12 -4
- package/es/blocks/Payment/Confirmation.d.ts +0 -2
- package/es/index.es.js +3 -3
- package/lib/blocks/Payment/Confirmation.d.ts +0 -2
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/src/blocks/Account/UserProfileForm.tsx +0 -1
- package/src/blocks/Account/UserSettingsForm.tsx +3 -2
- package/src/blocks/AuthForms/CodeConfirmation.tsx +3 -3
- package/src/blocks/AuthForms/SignUpForm.tsx +1 -1
- package/src/blocks/Payment/CheckoutForm.tsx +2 -2
- package/src/blocks/Payment/Confirmation.tsx +4 -6
- package/src/elements/HawaButton.tsx +1 -1
- package/src/elements/HawaLogoButton.tsx +1 -1
- package/src/elements/HawaPinInput.tsx +1 -1
- package/src/elements/HawaSelect.tsx +1 -1
- package/src/elements/HawaTextField.tsx +1 -1
- package/src/layout/HawaContainer.tsx +2 -2
- package/src/styles.css +12 -4
- package/src/tailwind.css +11 -0
- package/tailwind.config.js +1 -0
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC } from "react"
|
|
2
|
+
import { HawaContainer } from "../../layout"
|
|
2
3
|
|
|
3
4
|
type UserSettingsFormTypes = {
|
|
4
5
|
children: any
|
|
@@ -9,7 +10,7 @@ type UserSettingsFormTypes = {
|
|
|
9
10
|
|
|
10
11
|
export const UserSettingsForm: FC<UserSettingsFormTypes> = (props) => {
|
|
11
12
|
return (
|
|
12
|
-
<
|
|
13
|
+
<HawaContainer>
|
|
13
14
|
<div className="mb-2 text-sm font-bold">{props.blockTitle}</div>
|
|
14
15
|
<div className="flex flex-col gap-4 rounded bg-white p-2">
|
|
15
16
|
{props.children}
|
|
@@ -23,6 +24,6 @@ export const UserSettingsForm: FC<UserSettingsFormTypes> = (props) => {
|
|
|
23
24
|
>
|
|
24
25
|
{props.saveSettingsText}
|
|
25
26
|
</HawaButton> */}
|
|
26
|
-
</
|
|
27
|
+
</HawaContainer>
|
|
27
28
|
)
|
|
28
29
|
}
|
|
@@ -33,11 +33,11 @@ export const CodeConfirmation: FC<TConfirmation> = (props) => {
|
|
|
33
33
|
severity="error"
|
|
34
34
|
/>
|
|
35
35
|
)}
|
|
36
|
-
<div className="mb-4">
|
|
36
|
+
<div className="mb-4 dark:text-white">
|
|
37
37
|
<div className="text-lg font-bold">
|
|
38
38
|
{props.texts.checkYourPhone ?? "Please check your phone"}
|
|
39
39
|
</div>
|
|
40
|
-
<div className="text-
|
|
40
|
+
<div className="text-muted-foreground">
|
|
41
41
|
<span>{props.texts.weSentCode ?? "We've sent a code to "}</span>
|
|
42
42
|
<span>{props.phoneNumber}</span>
|
|
43
43
|
</div>{" "}
|
|
@@ -51,7 +51,7 @@ export const CodeConfirmation: FC<TConfirmation> = (props) => {
|
|
|
51
51
|
}}
|
|
52
52
|
>
|
|
53
53
|
<HawaPinInput width="full" digits={6} getPins={(e) => setPins(e)} />
|
|
54
|
-
<div className=" py-2 text-center text-xs">
|
|
54
|
+
<div className=" py-2 text-center text-xs text-muted-foreground">
|
|
55
55
|
<span>{props.texts.didntGetCode ?? "Didn't get the code?"}</span>{" "}
|
|
56
56
|
<span className="cursor-pointer text-buttonPrimary-500">
|
|
57
57
|
{props.texts.resendCode ?? "Click to resend"}
|
|
@@ -287,7 +287,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
287
287
|
</HawaButton>
|
|
288
288
|
</form>
|
|
289
289
|
</FormProvider>
|
|
290
|
-
<div className="flex flex-row items-center justify-center gap-1 p-3
|
|
290
|
+
<div className="flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-semibold dark:text-white">
|
|
291
291
|
<span>{props.texts.existingUserText}</span>
|
|
292
292
|
<span
|
|
293
293
|
onClick={props.handleRouteToSignIn}
|
|
@@ -60,7 +60,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
60
60
|
return (
|
|
61
61
|
<HawaContainer>
|
|
62
62
|
<div>
|
|
63
|
-
<div className="mb-2 text-center text-xl font-semibold">
|
|
63
|
+
<div className="mb-2 text-center text-xl font-semibold dark:text-white">
|
|
64
64
|
{props.texts.orderDetails}
|
|
65
65
|
</div>
|
|
66
66
|
<div className="rounded border border-gray-300">
|
|
@@ -79,7 +79,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
79
79
|
</div>
|
|
80
80
|
</div>
|
|
81
81
|
<div>
|
|
82
|
-
<div className="my-2 text-center text-xl font-semibold">
|
|
82
|
+
<div className="my-2 text-center text-xl font-semibold dark:text-white">
|
|
83
83
|
{props.texts.billingAddress}
|
|
84
84
|
</div>
|
|
85
85
|
|
|
@@ -10,8 +10,6 @@ type ConfirmationPageTypes = {
|
|
|
10
10
|
successMessage: string
|
|
11
11
|
orderDetails: string
|
|
12
12
|
fasterPaymentNote: string
|
|
13
|
-
billingAddress: string
|
|
14
|
-
payNow: string
|
|
15
13
|
yourOrderNumber: string
|
|
16
14
|
emailLabel: string
|
|
17
15
|
emailRequiredText: string
|
|
@@ -46,10 +44,10 @@ export const ConfirmationPage: FC<ConfirmationPageTypes> = (props) => {
|
|
|
46
44
|
return (
|
|
47
45
|
<HawaContainer>
|
|
48
46
|
{" "}
|
|
49
|
-
<div className="py-5 text-center text-3xl font-bold">
|
|
47
|
+
<div className="py-5 text-center text-3xl font-bold dark:text-white">
|
|
50
48
|
{props.confirmationTitle}
|
|
51
49
|
</div>
|
|
52
|
-
<div className="py-5">
|
|
50
|
+
<div className="py-5 dark:text-white">
|
|
53
51
|
<div className="mb-2 text-center">
|
|
54
52
|
{props.texts.successMessage} <strong>{props.userEmail}</strong>
|
|
55
53
|
</div>
|
|
@@ -81,11 +79,11 @@ export const ConfirmationPage: FC<ConfirmationPageTypes> = (props) => {
|
|
|
81
79
|
<HawaButton color="primary" width="full" onClick={props.handleHome}>
|
|
82
80
|
{props.texts.homePage}
|
|
83
81
|
</HawaButton>
|
|
84
|
-
<div className="mb-5 mt-5 text-center text-sm">
|
|
82
|
+
<div className="mb-5 mt-5 text-center text-sm dark:text-white">
|
|
85
83
|
{props.texts.fasterPaymentNote}
|
|
86
84
|
</div>
|
|
87
85
|
<a
|
|
88
|
-
className="w-fit cursor-pointer
|
|
86
|
+
className="w-fit cursor-pointer text-center text-xs font-normal dark:text-white"
|
|
89
87
|
onClick={props.handleRefundPolicyLink}
|
|
90
88
|
>
|
|
91
89
|
{props.texts.refundPolicy}
|
|
@@ -71,7 +71,7 @@ const colorStyles = {
|
|
|
71
71
|
dark: "text-neutral-900 bg-gray-200 hover:bg-gray-300",
|
|
72
72
|
},
|
|
73
73
|
outlined: {
|
|
74
|
-
default: "text-gray-600 border-gray-600 hover:bg-gray-200 dark:text-white",
|
|
74
|
+
default: "text-gray-600 border-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800 dark:text-white",
|
|
75
75
|
primary: "text-black hover:bg-gray-50 dark:text-white",
|
|
76
76
|
secondary:
|
|
77
77
|
" dark:text-white text-secondary-800 border-secondary-800 hover:bg-buttonSecondary-700 hover:text-white",
|
|
@@ -147,7 +147,7 @@ export const HawaLogoButton: FC<LogoButtonTypes> = (props) => {
|
|
|
147
147
|
<button
|
|
148
148
|
style={{ direction: isArabic ? "rtl" : "ltr" }}
|
|
149
149
|
onClick={props.onClick}
|
|
150
|
-
className="my-2 flex h-11 w-full flex-row justify-center rounded bg-white align-middle transition-all hover:ring-1 hover:ring-buttonPrimary-500 hover:brightness-90"
|
|
150
|
+
className="my-2 border flex h-11 w-full flex-row justify-center rounded bg-white align-middle transition-all hover:ring-1 hover:ring-buttonPrimary-500 hover:brightness-90"
|
|
151
151
|
>
|
|
152
152
|
<div className="flex h-full flex-row items-center justify-end">
|
|
153
153
|
{logoElement}
|
|
@@ -64,7 +64,7 @@ export const HawaPinInput: FC<PinInputTypes> = ({
|
|
|
64
64
|
id={`input-${index}`}
|
|
65
65
|
pattern="[0-9]*"
|
|
66
66
|
className={clsx(
|
|
67
|
-
"h-10 rounded bg-
|
|
67
|
+
"h-10 rounded border bg-background text-center",
|
|
68
68
|
width === "full" ? "w-full" : "w-10"
|
|
69
69
|
)}
|
|
70
70
|
onChange={(e) => handleChange(e, index)}
|
|
@@ -31,7 +31,7 @@ const Control: FC<ControlTypes> = ({
|
|
|
31
31
|
ref={innerRef}
|
|
32
32
|
className={clsx(
|
|
33
33
|
sizeStyles[size],
|
|
34
|
-
"flex w-full rounded border
|
|
34
|
+
"flex w-full rounded border bg-background text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:focus:ring-blue-500"
|
|
35
35
|
)}
|
|
36
36
|
{...innerProps}
|
|
37
37
|
// {...props}
|
|
@@ -52,7 +52,7 @@ export const HawaTextField: FC<TextFieldTypes> = ({
|
|
|
52
52
|
|
|
53
53
|
let defaultStyle = "flex max-h-fit flex-col justify-center"
|
|
54
54
|
let defaultInputStyle =
|
|
55
|
-
"block w-full rounded
|
|
55
|
+
"block w-full rounded border bg-background p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 "
|
|
56
56
|
let previewInputStyle =
|
|
57
57
|
"block w-full rounded bg-gray-50 p-2 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
|
|
58
58
|
// "mb-0 block w-full rounded border border-gray-300 bg-gray-50 p-2 text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500",
|
|
@@ -22,8 +22,8 @@ export const HawaContainer: React.FunctionComponent<ContainerTypes> = ({
|
|
|
22
22
|
normal: "max-w-sm md:max-w-md",
|
|
23
23
|
}
|
|
24
24
|
let variantStyles = {
|
|
25
|
-
contained: "bg-
|
|
26
|
-
outlined: "bg-transparent border
|
|
25
|
+
contained: "bg-background border",
|
|
26
|
+
outlined: "bg-transparent border border-black w-fit",
|
|
27
27
|
neobrutalism: "shadow-neobrutalism border-4 border-black bg-white",
|
|
28
28
|
}
|
|
29
29
|
|
package/src/styles.css
CHANGED
|
@@ -388,6 +388,7 @@ video {
|
|
|
388
388
|
:root {
|
|
389
389
|
--background: 0 0% 100%;
|
|
390
390
|
--foreground: 240 10% 3.9%;
|
|
391
|
+
--border: 240 5.9% 90%;
|
|
391
392
|
|
|
392
393
|
--layout-primary-700: #b7aff7;
|
|
393
394
|
/* --layout-primary-500: #dfdcfc; */
|
|
@@ -528,6 +529,14 @@ video {
|
|
|
528
529
|
display: block;
|
|
529
530
|
background: var(--button-primary-500);
|
|
530
531
|
}
|
|
532
|
+
* {
|
|
533
|
+
border-color: hsl(var(--border));
|
|
534
|
+
}
|
|
535
|
+
body {
|
|
536
|
+
background-color: hsl(var(--background));
|
|
537
|
+
color: hsl(var(--foreground));
|
|
538
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
539
|
+
}
|
|
531
540
|
|
|
532
541
|
*, ::before, ::after {
|
|
533
542
|
--tw-border-spacing-x: 0;
|
|
@@ -1785,6 +1794,9 @@ video {
|
|
|
1785
1794
|
.border-b-buttonPrimary-500 {
|
|
1786
1795
|
border-bottom-color: var(--button-primary-500);
|
|
1787
1796
|
}
|
|
1797
|
+
.bg-background {
|
|
1798
|
+
background-color: hsl(var(--background));
|
|
1799
|
+
}
|
|
1788
1800
|
.bg-black {
|
|
1789
1801
|
--tw-bg-opacity: 1;
|
|
1790
1802
|
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
|
@@ -3034,10 +3046,6 @@ body {
|
|
|
3034
3046
|
--tw-bg-opacity: 1;
|
|
3035
3047
|
background-color: rgb(187 247 208 / var(--tw-bg-opacity));
|
|
3036
3048
|
}
|
|
3037
|
-
:is(.dark .dark\:bg-layoutPrimary-dark) {
|
|
3038
|
-
--tw-bg-opacity: 1;
|
|
3039
|
-
background-color: rgb(37 27 115 / var(--tw-bg-opacity));
|
|
3040
|
-
}
|
|
3041
3049
|
:is(.dark .dark\:bg-red-200) {
|
|
3042
3050
|
--tw-bg-opacity: 1;
|
|
3043
3051
|
background-color: rgb(254 202 202 / var(--tw-bg-opacity));
|
package/src/tailwind.css
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
:root {
|
|
8
8
|
--background: 0 0% 100%;
|
|
9
9
|
--foreground: 240 10% 3.9%;
|
|
10
|
+
--border: 240 5.9% 90%;
|
|
10
11
|
|
|
11
12
|
--layout-primary-700: #b7aff7;
|
|
12
13
|
/* --layout-primary-500: #dfdcfc; */
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
--layout-primary-600: #2d2d2d;
|
|
41
42
|
--layout-primary-700: #1d1d1d;
|
|
42
43
|
--layout-primary-300: #4a4a4a;
|
|
44
|
+
--border: 240 3.7% 15.9%;
|
|
43
45
|
|
|
44
46
|
--background: 240 10% 3.9%;
|
|
45
47
|
|
|
@@ -148,6 +150,15 @@
|
|
|
148
150
|
background: var(--button-primary-500);
|
|
149
151
|
}
|
|
150
152
|
}
|
|
153
|
+
@layer base {
|
|
154
|
+
* {
|
|
155
|
+
@apply border-border;
|
|
156
|
+
}
|
|
157
|
+
body {
|
|
158
|
+
@apply bg-background text-foreground;
|
|
159
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
151
162
|
|
|
152
163
|
@layer utilities {
|
|
153
164
|
/* Chrome, Safari and Opera */
|