@sikka/hawa 0.0.286 → 0.0.288
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 +25 -8
- package/es/blocks/AuthForms/SignInForm.d.ts +3 -3
- package/es/blocks/AuthForms/SignUpForm.d.ts +3 -3
- package/es/elements/HawaButton.d.ts +1 -1
- package/es/elements/HawaLogoButton.d.ts +1 -0
- package/es/index.es.js +3 -3
- package/es/stories/ManualStories/Overview.stories.d.ts +0 -1
- package/lib/blocks/AuthForms/SignInForm.d.ts +3 -3
- package/lib/blocks/AuthForms/SignUpForm.d.ts +3 -3
- package/lib/elements/HawaButton.d.ts +1 -1
- package/lib/elements/HawaLogoButton.d.ts +1 -0
- package/lib/index.js +3 -3
- package/lib/stories/ManualStories/Overview.stories.d.ts +0 -1
- package/package.json +1 -1
- package/src/blocks/Account/UserSettingsForm.tsx +1 -3
- package/src/blocks/AuthForms/SignInForm.tsx +9 -6
- package/src/blocks/AuthForms/SignUpForm.tsx +9 -6
- package/src/blocks/Pricing/HorizontalPricing.tsx +14 -6
- package/src/blocks/Referral/ReferralAccount.tsx +2 -2
- package/src/blocks/Referral/ReferralSettlement.tsx +73 -31
- package/src/blocks/Referral/ReferralStats.tsx +2 -2
- package/src/elements/DragDropImages.tsx +2 -2
- package/src/elements/HawaButton.tsx +11 -7
- package/src/elements/HawaColorPicker.tsx +2 -2
- package/src/elements/HawaLogoButton.tsx +6 -13
- package/src/elements/HawaRadio.tsx +4 -4
- package/src/elements/HawaTable.tsx +18 -12
- package/src/elements/HawaTooltip.tsx +1 -1
- package/src/elements/UserFeedback.tsx +3 -3
- package/src/styles.css +25 -8
- package/src/tailwind.css +8 -5
- package/src/translations/ar.json +10 -3
- package/src/translations/en.json +10 -4
- package/build-storybook.log +0 -379
package/package.json
CHANGED
|
@@ -12,9 +12,7 @@ export const UserSettingsForm: FC<UserSettingsFormTypes> = (props) => {
|
|
|
12
12
|
return (
|
|
13
13
|
<HawaContainer>
|
|
14
14
|
<div className="mb-2 text-sm font-bold">{props.blockTitle}</div>
|
|
15
|
-
<div className="flex flex-col gap-4 rounded
|
|
16
|
-
{props.children}
|
|
17
|
-
</div>
|
|
15
|
+
<div className="flex flex-col gap-4 rounded p-2">{props.children}</div>
|
|
18
16
|
{/* <HawaButton
|
|
19
17
|
color="primary"
|
|
20
18
|
// type="submit"
|
|
@@ -142,21 +142,24 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
|
|
|
142
142
|
{props.viaGoogle && (
|
|
143
143
|
<HawaLogoButton
|
|
144
144
|
logo="google"
|
|
145
|
-
|
|
145
|
+
direction={props.direction}
|
|
146
|
+
buttonText={props.texts.signInViaGoogleLabel}
|
|
146
147
|
onClick={props.handleGoogleSignIn}
|
|
147
148
|
/>
|
|
148
149
|
)}
|
|
149
150
|
{props.viaGithub && (
|
|
150
151
|
<HawaLogoButton
|
|
151
152
|
logo="github"
|
|
152
|
-
|
|
153
|
+
direction={props.direction}
|
|
154
|
+
buttonText={props.texts.signInViaGithubLabel}
|
|
153
155
|
onClick={props.handleGithubSignIn}
|
|
154
156
|
/>
|
|
155
157
|
)}
|
|
156
158
|
{props.viaTwitter && (
|
|
157
159
|
<HawaLogoButton
|
|
158
160
|
logo="twitter"
|
|
159
|
-
|
|
161
|
+
direction={props.direction}
|
|
162
|
+
buttonText={props.texts.signInViaTwitterLabel}
|
|
160
163
|
onClick={props.handleTwitterSignIn}
|
|
161
164
|
/>
|
|
162
165
|
)}
|
|
@@ -188,9 +191,9 @@ type SignInFormTypes = {
|
|
|
188
191
|
newUserText?: string
|
|
189
192
|
signUpText?: string
|
|
190
193
|
signInText?: string
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
signInViaGoogleLabel?: string
|
|
195
|
+
signInViaGithubLabel?: string
|
|
196
|
+
signInViaTwitterLabel?: string
|
|
194
197
|
}
|
|
195
198
|
withoutResetPassword?: boolean
|
|
196
199
|
withoutSignUp?: boolean
|
|
@@ -38,9 +38,9 @@ type SignUpFormTypes = {
|
|
|
38
38
|
signUpText: string
|
|
39
39
|
signInText: string
|
|
40
40
|
existingUserText: string
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
signUpViaGoogleLabel: string
|
|
42
|
+
signUpViaGithubLabel: string
|
|
43
|
+
signUpViaTwitterLabel: string
|
|
44
44
|
refCode: string
|
|
45
45
|
}
|
|
46
46
|
showUserSource: any
|
|
@@ -302,21 +302,24 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
302
302
|
{props.viaGoogle && (
|
|
303
303
|
<HawaLogoButton
|
|
304
304
|
logo="google"
|
|
305
|
-
|
|
305
|
+
direction={props.direction}
|
|
306
|
+
buttonText={props.texts.signUpViaGoogleLabel}
|
|
306
307
|
onClick={props.handleGoogleSignUp}
|
|
307
308
|
/>
|
|
308
309
|
)}
|
|
309
310
|
{props.viaGithub && (
|
|
310
311
|
<HawaLogoButton
|
|
311
312
|
logo="github"
|
|
312
|
-
|
|
313
|
+
direction={props.direction}
|
|
314
|
+
buttonText={props.texts.signUpViaGithubLabel}
|
|
313
315
|
onClick={props.handleGithubSignUp}
|
|
314
316
|
/>
|
|
315
317
|
)}
|
|
316
318
|
{props.viaTwitter && (
|
|
317
319
|
<HawaLogoButton
|
|
318
320
|
logo="twitter"
|
|
319
|
-
|
|
321
|
+
direction={props.direction}
|
|
322
|
+
buttonText={props.texts.signUpViaTwitterLabel}
|
|
320
323
|
onClick={props.handleTwitterSignUp}
|
|
321
324
|
/>
|
|
322
325
|
)}
|
|
@@ -66,7 +66,11 @@ export const HorizontalPricing: FC<HorizontalPricingTypes> = (props) => {
|
|
|
66
66
|
/>
|
|
67
67
|
</div>
|
|
68
68
|
{data.map((d) => (
|
|
69
|
-
<label
|
|
69
|
+
<label
|
|
70
|
+
htmlFor={d.title}
|
|
71
|
+
className=""
|
|
72
|
+
onClick={() => setSelectedCard(d.title)}
|
|
73
|
+
>
|
|
70
74
|
<input
|
|
71
75
|
type="radio"
|
|
72
76
|
name="radio"
|
|
@@ -76,7 +80,7 @@ export const HorizontalPricing: FC<HorizontalPricingTypes> = (props) => {
|
|
|
76
80
|
<div
|
|
77
81
|
className={clsx(
|
|
78
82
|
selectedCard === d.title ? "peer-checked:border-blue-500" : "",
|
|
79
|
-
"peer flex cursor-pointer items-center justify-between
|
|
83
|
+
"peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden"
|
|
80
84
|
)}
|
|
81
85
|
>
|
|
82
86
|
<div className="peer flex items-center gap-4">
|
|
@@ -125,13 +129,17 @@ const CheckIcons = () => (
|
|
|
125
129
|
</>
|
|
126
130
|
)
|
|
127
131
|
const CardText = (props) => (
|
|
128
|
-
<div className="peer flex flex-col items-start">
|
|
129
|
-
<h2 className="font-medium text-neutral-700 sm:text-xl">
|
|
130
|
-
|
|
132
|
+
<div className="peer flex flex-col items-start ">
|
|
133
|
+
<h2 className="font-medium text-neutral-700 dark:text-gray-100 sm:text-xl">
|
|
134
|
+
{props.title}
|
|
135
|
+
</h2>
|
|
136
|
+
<p className="text-sm text-neutral-500 dark:text-gray-300">
|
|
137
|
+
{props.subtitle}{" "}
|
|
138
|
+
</p>
|
|
131
139
|
</div>
|
|
132
140
|
)
|
|
133
141
|
const CardPrice = (props) => (
|
|
134
|
-
<h2 className="peer text-xl font-semibold text-neutral-900 sm:text-2xl">
|
|
142
|
+
<h2 className="peer text-xl font-semibold text-neutral-900 dark:text-white sm:text-2xl">
|
|
135
143
|
{props.amount}
|
|
136
144
|
<span className="text-base font-medium text-neutral-400">
|
|
137
145
|
{props.cycle}
|
|
@@ -15,7 +15,7 @@ export const ReferralAccount: FC<ReferralAccount> = ({
|
|
|
15
15
|
<HawaContainer>
|
|
16
16
|
<div className="my-2 mt-0">
|
|
17
17
|
<div className="mb-1">Referral Code</div>
|
|
18
|
-
<div className="flex flex-row items-center justify-between rounded bg-
|
|
18
|
+
<div className="flex flex-row items-center justify-between rounded border bg-background">
|
|
19
19
|
<span className="ml-3 font-bold">{referralCode}</span>
|
|
20
20
|
<HawaButton
|
|
21
21
|
tooltip="Copy"
|
|
@@ -39,7 +39,7 @@ export const ReferralAccount: FC<ReferralAccount> = ({
|
|
|
39
39
|
</div>
|
|
40
40
|
<div className="my-2 mt-0">
|
|
41
41
|
<div className="mb-1">Referral Link</div>
|
|
42
|
-
<div className="flex flex-row items-center justify-between rounded bg-
|
|
42
|
+
<div className="flex flex-row items-center justify-between rounded border bg-background">
|
|
43
43
|
<span className="ml-3 font-bold">{referralLink}</span>
|
|
44
44
|
<HawaButton
|
|
45
45
|
className="mr-1.5"
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
HawaAlert,
|
|
4
4
|
HawaButton,
|
|
5
5
|
HawaChip,
|
|
6
|
+
HawaMenu,
|
|
6
7
|
HawaSelect,
|
|
7
8
|
HawaTextField,
|
|
8
9
|
} from "../../elements"
|
|
@@ -93,36 +94,77 @@ export const ReferralSettlement: FC<TReferralSettlement> = ({
|
|
|
93
94
|
)
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
const SettlementAccountCard = (props) =>
|
|
97
|
-
|
|
98
|
-
<div className="flex flex-
|
|
99
|
-
<div className="
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
97
|
+
const SettlementAccountCard = (props) => {
|
|
98
|
+
return (
|
|
99
|
+
<div className="mb-3 flex flex-row items-center justify-between rounded border bg-background p-3">
|
|
100
|
+
<div className="flex flex-col justify-between">
|
|
101
|
+
<div className="text-xs">{props.bank}</div>
|
|
102
|
+
<div>{props.accountHolder}</div>
|
|
103
|
+
<div className="text-xs">{props.iban}</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div className="flex flex-row items-center justify-center gap-2">
|
|
106
|
+
{props.default && (
|
|
107
|
+
<HawaButton disabled variant="outlined" size="xs" margins="none">
|
|
108
|
+
Default
|
|
109
|
+
</HawaButton>
|
|
110
|
+
)}
|
|
111
|
+
|
|
112
|
+
<HawaMenu
|
|
113
|
+
size="small"
|
|
114
|
+
menuItems={[
|
|
115
|
+
[
|
|
116
|
+
{ label: "Set Default", disabled: props.default },
|
|
117
|
+
{ label: "Edit" },
|
|
118
|
+
{ label: "Delete" },
|
|
119
|
+
],
|
|
120
|
+
]}
|
|
121
|
+
// position={direction === "rtl" ? "right-bottom" : "left-bottom"}
|
|
122
|
+
// direction={direction}
|
|
118
123
|
>
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
<HawaButton variant="outlined" >
|
|
125
|
+
<svg
|
|
126
|
+
aria-label="Vertical Three Dots Menu Icon"
|
|
127
|
+
className="rotate-90"
|
|
128
|
+
stroke="currentColor"
|
|
129
|
+
fill="currentColor"
|
|
130
|
+
stroke-width="0"
|
|
131
|
+
viewBox="0 0 16 16"
|
|
132
|
+
height="1em"
|
|
133
|
+
width="1em"
|
|
134
|
+
>
|
|
135
|
+
<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>
|
|
136
|
+
</svg>
|
|
137
|
+
</HawaButton>
|
|
138
|
+
{/* <div className="flex w-fit rotate-90 cursor-pointer items-center justify-center rounded p-2 hover:bg-buttonPrimary-500/50">
|
|
139
|
+
<svg
|
|
140
|
+
aria-label="Vertical Three Dots Menu Icon"
|
|
141
|
+
stroke="currentColor"
|
|
142
|
+
fill="currentColor"
|
|
143
|
+
stroke-width="0"
|
|
144
|
+
viewBox="0 0 16 16"
|
|
145
|
+
height="1em"
|
|
146
|
+
width="1em"
|
|
147
|
+
>
|
|
148
|
+
<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>
|
|
149
|
+
</svg>
|
|
150
|
+
</div> */}
|
|
151
|
+
</HawaMenu>
|
|
152
|
+
{/* {!props.default && <HawaButton size="small">Make Default</HawaButton>} */}
|
|
153
|
+
{/* <HawaButton tooltip="Delete" size="small">
|
|
154
|
+
<svg
|
|
155
|
+
aria-hidden="true"
|
|
156
|
+
className="h-5 w-5"
|
|
157
|
+
fill="currentColor"
|
|
158
|
+
viewBox="0 0 20 20"
|
|
159
|
+
>
|
|
160
|
+
<path
|
|
161
|
+
fillRule="evenodd"
|
|
162
|
+
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"
|
|
163
|
+
clipRule="evenodd"
|
|
164
|
+
></path>
|
|
165
|
+
</svg>
|
|
166
|
+
</HawaButton> */}
|
|
167
|
+
</div>
|
|
126
168
|
</div>
|
|
127
|
-
|
|
128
|
-
|
|
169
|
+
)
|
|
170
|
+
}
|
|
@@ -69,13 +69,13 @@ export const ReferralStats: FC<TReferralStats> = ({
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const NumberCard = (props) => (
|
|
72
|
-
<div className="w-full rounded bg-
|
|
72
|
+
<div className="w-full rounded border bg-background p-2">
|
|
73
73
|
<div className="text-sm">{props.title}</div>
|
|
74
74
|
<div className="font-bold">{props.number}</div>
|
|
75
75
|
</div>
|
|
76
76
|
)
|
|
77
77
|
const ReferralSignUpCard = (props) => (
|
|
78
|
-
<div className="mb-3 rounded border-b bg-
|
|
78
|
+
<div className="mb-3 rounded border-b bg-background p-2">
|
|
79
79
|
<div className="text-xs">{props.date}</div>
|
|
80
80
|
<div className="flex flex-row justify-between">
|
|
81
81
|
<div>{props.email}</div>
|
|
@@ -197,8 +197,8 @@ export const DragDropImages: React.FunctionComponent<DragDropImagesTypes> = ({
|
|
|
197
197
|
)}
|
|
198
198
|
<div
|
|
199
199
|
className={clsx(
|
|
200
|
-
"flex flex-col justify-center rounded border border-dashed
|
|
201
|
-
isDragActive ? "bg-
|
|
200
|
+
"flex flex-col justify-center rounded border border-dashed transition-all hover:bg-gray-100 dark:hover:bg-gray-800 ",
|
|
201
|
+
isDragActive ? "bg-gray-200 dark:bg-gray-700" : "bg-background"
|
|
202
202
|
)}
|
|
203
203
|
>
|
|
204
204
|
<div {...getRootProps({})}>
|
|
@@ -9,7 +9,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
9
9
|
tooltipDirection?: "rtl" | "ltr"
|
|
10
10
|
color?: "default" | "primary" | "secondary" | "light" | "dark"
|
|
11
11
|
width?: "full" | "normal" | "half"
|
|
12
|
-
size?: "xs" | "small" | "medium" | "large" | "noPadding" | "full"
|
|
12
|
+
size?: "xs" | "small" | "medium" | "large" | "noPadding" | "full" | "icon"
|
|
13
13
|
margins?: "none" | "1" | "2" | "3" | "4"
|
|
14
14
|
tooltip?: string
|
|
15
15
|
tooltipSize?: "normal" | "small" | "large"
|
|
@@ -36,11 +36,13 @@ const disabledVariantSyles = {
|
|
|
36
36
|
outlined: "text-gray-300 border-gray-300",
|
|
37
37
|
}
|
|
38
38
|
const baseStyles =
|
|
39
|
-
|
|
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
|
+
xs: "px-1.5 py-2 text-[9px] h-fit",
|
|
42
43
|
small: "text-xs px-2.5 py-1.5",
|
|
43
|
-
medium: "text-sm leading-4 px-3 py-2",
|
|
44
|
+
medium: "text-sm leading-4 px-3 py-2 h-[2.36rem] ",
|
|
45
|
+
default: "h-10 px-4 py-2",
|
|
44
46
|
large: "text-sm px-4 py-2",
|
|
45
47
|
noPadding: "p-0",
|
|
46
48
|
full: "h-full max-h-full p-2",
|
|
@@ -58,7 +60,9 @@ const containerWidthStyles = {
|
|
|
58
60
|
}
|
|
59
61
|
const variantStyles = {
|
|
60
62
|
contained: "border-transparent",
|
|
61
|
-
outlined: "bg-transparent border",
|
|
63
|
+
// outlined: "bg-transparent border",
|
|
64
|
+
outlined:
|
|
65
|
+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
62
66
|
}
|
|
63
67
|
const colorStyles = {
|
|
64
68
|
contained: {
|
|
@@ -77,8 +81,8 @@ const colorStyles = {
|
|
|
77
81
|
primary: "text-black hover:bg-gray-50 dark:text-white",
|
|
78
82
|
secondary:
|
|
79
83
|
" dark:text-white text-secondary-800 border-secondary-800 hover:bg-buttonSecondary-700 hover:text-white",
|
|
80
|
-
gray: "border-gray-300 hover:bg-gray-200
|
|
81
|
-
dark: "border-gray-900 hover:bg-gray-700
|
|
84
|
+
gray: "border-gray-300 hover:bg-gray-200",
|
|
85
|
+
dark: "border-gray-900 hover:bg-gray-700",
|
|
82
86
|
},
|
|
83
87
|
}
|
|
84
88
|
|
|
@@ -10,7 +10,7 @@ type ColorPickerTypes = {
|
|
|
10
10
|
export const HawaColorPicker: FC<ColorPickerTypes> = (props) => {
|
|
11
11
|
const [selectedColor, setSelectedColor] = useState(props.color)
|
|
12
12
|
return (
|
|
13
|
-
<div className={`flex w-fit flex-row rounded border
|
|
13
|
+
<div className={`flex w-fit flex-row rounded border p-0`}>
|
|
14
14
|
<div
|
|
15
15
|
style={{ backgroundColor: selectedColor }}
|
|
16
16
|
className="rounded-bl-lg rounded-tl-lg"
|
|
@@ -33,7 +33,7 @@ export const HawaColorPicker: FC<ColorPickerTypes> = (props) => {
|
|
|
33
33
|
props.handleChange(e)
|
|
34
34
|
}}
|
|
35
35
|
value={selectedColor}
|
|
36
|
-
className="w-24 rounded-br-lg rounded-tr-lg pl-2 pr-2"
|
|
36
|
+
className="w-24 bg-background rounded-br-lg rounded-tr-lg pl-2 pr-2"
|
|
37
37
|
/>
|
|
38
38
|
</div>
|
|
39
39
|
)
|
|
@@ -15,6 +15,7 @@ type LogoButtonTypes = {
|
|
|
15
15
|
| "mada"
|
|
16
16
|
onClick?: any
|
|
17
17
|
buttonText?: any
|
|
18
|
+
direction?: "rtl" | "ltr"
|
|
18
19
|
}
|
|
19
20
|
export const HawaLogoButton: FC<LogoButtonTypes> = (props) => {
|
|
20
21
|
let isArabic = props.lang === "ar"
|
|
@@ -32,12 +33,7 @@ export const HawaLogoButton: FC<LogoButtonTypes> = (props) => {
|
|
|
32
33
|
break
|
|
33
34
|
case "github":
|
|
34
35
|
logoElement = (
|
|
35
|
-
<svg
|
|
36
|
-
width="32px"
|
|
37
|
-
height="32px"
|
|
38
|
-
viewBox="0 0 32 32"
|
|
39
|
-
className="h-7 w-7"
|
|
40
|
-
>
|
|
36
|
+
<svg width="32px" height="32px" viewBox="0 0 32 32" className="h-7 w-7">
|
|
41
37
|
<path d="M16 0.396c-8.839 0-16 7.167-16 16 0 7.073 4.584 13.068 10.937 15.183 0.803 0.151 1.093-0.344 1.093-0.772 0-0.38-0.009-1.385-0.015-2.719-4.453 0.964-5.391-2.151-5.391-2.151-0.729-1.844-1.781-2.339-1.781-2.339-1.448-0.989 0.115-0.968 0.115-0.968 1.604 0.109 2.448 1.645 2.448 1.645 1.427 2.448 3.744 1.74 4.661 1.328 0.14-1.031 0.557-1.74 1.011-2.135-3.552-0.401-7.287-1.776-7.287-7.907 0-1.751 0.62-3.177 1.645-4.297-0.177-0.401-0.719-2.031 0.141-4.235 0 0 1.339-0.427 4.4 1.641 1.281-0.355 2.641-0.532 4-0.541 1.36 0.009 2.719 0.187 4 0.541 3.043-2.068 4.381-1.641 4.381-1.641 0.859 2.204 0.317 3.833 0.161 4.235 1.015 1.12 1.635 2.547 1.635 4.297 0 6.145-3.74 7.5-7.296 7.891 0.556 0.479 1.077 1.464 1.077 2.959 0 2.14-0.020 3.864-0.020 4.385 0 0.416 0.28 0.916 1.104 0.755 6.4-2.093 10.979-8.093 10.979-15.156 0-8.833-7.161-16-16-16z" />
|
|
42
38
|
</svg>
|
|
43
39
|
)
|
|
@@ -120,11 +116,7 @@ export const HawaLogoButton: FC<LogoButtonTypes> = (props) => {
|
|
|
120
116
|
break
|
|
121
117
|
case "wallet":
|
|
122
118
|
logoElement = (
|
|
123
|
-
<svg
|
|
124
|
-
version="1.1"
|
|
125
|
-
viewBox="0 0 223 223"
|
|
126
|
-
className="h-6 w-6"
|
|
127
|
-
>
|
|
119
|
+
<svg version="1.1" viewBox="0 0 223 223" className="h-6 w-6">
|
|
128
120
|
<g>
|
|
129
121
|
<path
|
|
130
122
|
d="M223,94.5c0-6.075-4.925-11-11-11h-63c-6.075,0-11,4.925-11,11v33c0,6.075,4.925,11,11,11h63c6.075,0,11-4.925,11-11V94.5z
|
|
@@ -145,9 +137,10 @@ export const HawaLogoButton: FC<LogoButtonTypes> = (props) => {
|
|
|
145
137
|
|
|
146
138
|
return (
|
|
147
139
|
<button
|
|
148
|
-
|
|
140
|
+
dir={props.direction}
|
|
141
|
+
// style={{ direction: isArabic ? "rtl" : "ltr" }}
|
|
149
142
|
onClick={props.onClick}
|
|
150
|
-
className="my-2
|
|
143
|
+
className="my-2 flex h-11 w-full flex-row justify-center rounded border bg-white align-middle transition-all hover:ring-1 hover:ring-buttonPrimary-500 hover:brightness-90"
|
|
151
144
|
>
|
|
152
145
|
<div className="flex h-full flex-row items-center justify-end">
|
|
153
146
|
{logoElement}
|
|
@@ -69,9 +69,9 @@ export const HawaRadio: FC<RadioTypes> = ({
|
|
|
69
69
|
return (
|
|
70
70
|
<div className={clsx(orientationStyle[orientation], "gap-4")}>
|
|
71
71
|
{props.options.map((opt, i) => (
|
|
72
|
-
<div className="rounded border border-gray-200
|
|
72
|
+
<div className="rounded border border-gray-200 ">
|
|
73
73
|
<div
|
|
74
|
-
className="radio-item radio-item-bordered flex items-center
|
|
74
|
+
className="radio-item radio-item-bordered flex items-center transition-all"
|
|
75
75
|
key={i + 1}
|
|
76
76
|
>
|
|
77
77
|
<input
|
|
@@ -85,7 +85,7 @@ export const HawaRadio: FC<RadioTypes> = ({
|
|
|
85
85
|
<label
|
|
86
86
|
htmlFor={opt.value.toString()}
|
|
87
87
|
className={clsx(
|
|
88
|
-
"ml-2 w-full p-4 pl-3 text-sm font-medium",
|
|
88
|
+
"ml-2 w-full p-4 pl-3 text-sm font-medium dark:text-white",
|
|
89
89
|
opt.disabled ? "opacity-50" : "cursor-pointer text-gray-900"
|
|
90
90
|
)}
|
|
91
91
|
>
|
|
@@ -164,7 +164,7 @@ export const HawaRadio: FC<RadioTypes> = ({
|
|
|
164
164
|
<label
|
|
165
165
|
htmlFor={opt.value.toString()}
|
|
166
166
|
className={clsx(
|
|
167
|
-
"ml-2 text-sm font-medium ",
|
|
167
|
+
"ml-2 text-sm font-medium dark:text-white",
|
|
168
168
|
opt.disabled
|
|
169
169
|
? "text-gray-400"
|
|
170
170
|
: "cursor-pointer text-gray-900"
|
|
@@ -55,7 +55,7 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
55
55
|
size = "normal",
|
|
56
56
|
bodyColor = "white",
|
|
57
57
|
headerColor = "gray-200",
|
|
58
|
-
borders,
|
|
58
|
+
borders = "all",
|
|
59
59
|
highlightFirst = false,
|
|
60
60
|
direction = "ltr",
|
|
61
61
|
bordersWidth = "1",
|
|
@@ -130,7 +130,7 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
130
130
|
<div className="relative flex flex-col gap-2 ">
|
|
131
131
|
<div className={`overflow-x-auto rounded bg-${headerColor}`}>
|
|
132
132
|
{props.headerTools && (
|
|
133
|
-
<div className="flex flex-row items-center justify-between gap-2 px-4
|
|
133
|
+
<div className="flex flex-row items-center justify-between gap-2 border bg-background px-4 py-2">
|
|
134
134
|
<HawaTextField
|
|
135
135
|
icon={
|
|
136
136
|
<svg
|
|
@@ -189,7 +189,7 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
189
189
|
<table
|
|
190
190
|
className={clsx(
|
|
191
191
|
borders === "outer" || borders === "all"
|
|
192
|
-
? `outline outline-[${bordersWidth}px] -outline-offset-1 outline-gray-300`
|
|
192
|
+
? `outline outline-[${bordersWidth}px] -outline-offset-1 outline-gray-300 dark:outline-gray-700`
|
|
193
193
|
: "",
|
|
194
194
|
"w-full rounded text-left text-sm text-gray-500 dark:text-gray-400",
|
|
195
195
|
`bg-${headerColor}`
|
|
@@ -350,7 +350,7 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
350
350
|
}
|
|
351
351
|
direction={direction}
|
|
352
352
|
>
|
|
353
|
-
<div className="flex w-fit items-center justify-center rounded p-2 hover:bg-gray-200">
|
|
353
|
+
<div className="flex w-fit cursor-pointer items-center justify-center rounded p-2 hover:bg-gray-200 dark:hover:bg-gray-600">
|
|
354
354
|
<svg
|
|
355
355
|
aria-label="Vertical Three Dots Menu Icon"
|
|
356
356
|
stroke="currentColor"
|
|
@@ -384,8 +384,9 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
384
384
|
<td colSpan={20}>
|
|
385
385
|
<div
|
|
386
386
|
className={clsx(
|
|
387
|
-
"w-full rounded-b
|
|
388
|
-
bodyColor ? `bg-${bodyColor}` : "bg-
|
|
387
|
+
"w-full rounded-b border p-5 text-center",
|
|
388
|
+
// bodyColor ? `bg-${bodyColor}` : "bg-background"
|
|
389
|
+
"bg-background"
|
|
389
390
|
)}
|
|
390
391
|
>
|
|
391
392
|
{props.texts?.noData ?? "No Data"}
|
|
@@ -405,7 +406,7 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
405
406
|
{/* Previous Page Button */}
|
|
406
407
|
<div
|
|
407
408
|
className={clsx(
|
|
408
|
-
"flex h-6 w-6 rotate-180 items-center justify-center rounded bg-gray-100 p-1
|
|
409
|
+
"flex h-6 w-6 rotate-180 cursor-pointer items-center justify-center rounded border bg-gray-100 p-1 text-xs hover:bg-layoutPrimary-700 dark:bg-background dark:hover:bg-gray-700 "
|
|
409
410
|
)}
|
|
410
411
|
onClick={() =>
|
|
411
412
|
page <= 1 ? setPage(range.length) : setPage(page - 1)
|
|
@@ -500,10 +501,15 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
500
501
|
<button
|
|
501
502
|
key={index}
|
|
502
503
|
className={clsx(
|
|
503
|
-
"w-10 p-1 text-xs hover:bg-gray-
|
|
504
|
+
"w-10 p-1 text-xs hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
504
505
|
page === el
|
|
505
506
|
? "bg-buttonPrimary-500 text-white hover:bg-buttonPrimary-500"
|
|
506
|
-
: "bg-
|
|
507
|
+
: "border bg-background",
|
|
508
|
+
|
|
509
|
+
index === 0 ? "rounded-l border-r-0" : "",
|
|
510
|
+
index === range.length - 1
|
|
511
|
+
? "rounded-r border-l-0"
|
|
512
|
+
: ""
|
|
507
513
|
)}
|
|
508
514
|
onClick={() => setPage(el)}
|
|
509
515
|
>
|
|
@@ -518,7 +524,7 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
518
524
|
page >= range.length ? setPage(1) : setPage(page + 1)
|
|
519
525
|
}
|
|
520
526
|
className={clsx(
|
|
521
|
-
"flex h-6 w-6 items-center
|
|
527
|
+
"flex h-6 w-6 cursor-pointer items-center justify-center rounded border bg-gray-100 p-1 text-xs hover:bg-layoutPrimary-700 dark:bg-background dark:hover:bg-gray-700 "
|
|
522
528
|
)}
|
|
523
529
|
>
|
|
524
530
|
<svg
|
|
@@ -542,14 +548,14 @@ export const HawaTable: FC<TableTypes> = ({
|
|
|
542
548
|
)}
|
|
543
549
|
{/* Pagination Settings */}
|
|
544
550
|
{props.rows ? (
|
|
545
|
-
<div className="flex w-fit flex-row items-center gap-2
|
|
551
|
+
<div className="flex w-fit flex-row items-center gap-2 ">
|
|
546
552
|
<div className="text-xs ">
|
|
547
553
|
{props.rows.length} {props.texts?.items ?? "Items"}
|
|
548
554
|
</div>
|
|
549
555
|
|
|
550
556
|
<select
|
|
551
557
|
value={perPage}
|
|
552
|
-
className="h-6 rounded text-xs"
|
|
558
|
+
className="h-6 cursor-pointer rounded border bg-background px-2 text-xs"
|
|
553
559
|
onChange={(e) => {
|
|
554
560
|
setPerPage(parseInt(e.target.value))
|
|
555
561
|
}}
|
|
@@ -44,7 +44,7 @@ export const HawaTooltip: FC<THawaToolTip> = ({
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
let defaultTooltipStyles =
|
|
47
|
-
"absolute z-10 rounded bg-gray-
|
|
47
|
+
"absolute z-10 rounded bg-gray-100 text-center text-sm font-medium text-foreground dark:text-white shadow-sm transition-all duration-300 dark:bg-gray-700"
|
|
48
48
|
let sizeStyles = {
|
|
49
49
|
normal: "py-2 px-3 leading-2",
|
|
50
50
|
small: "py-2 px-2 text-[10px] leading-tight",
|
|
@@ -47,11 +47,11 @@ export const UserFeedback: FC<ComponentTypes> = ({
|
|
|
47
47
|
return (
|
|
48
48
|
<div
|
|
49
49
|
ref={popUpRef}
|
|
50
|
-
className={clsx("fixed bottom-4", boxPosition[position])}
|
|
50
|
+
className={clsx("fixed bottom-4 ", boxPosition[position])}
|
|
51
51
|
>
|
|
52
52
|
<div
|
|
53
53
|
className={clsx(
|
|
54
|
-
"relative flex w-full max-w-sm flex-col gap-2 rounded bg-
|
|
54
|
+
"relative flex w-full max-w-sm flex-col gap-2 rounded border bg-background p-4 shadow-md transition-all",
|
|
55
55
|
closed ? "opacity-0" : "opacity-100"
|
|
56
56
|
)}
|
|
57
57
|
>
|
|
@@ -96,7 +96,7 @@ export const UserFeedback: FC<ComponentTypes> = ({
|
|
|
96
96
|
"w-full cursor-pointer rounded border p-4 text-center transition-all ",
|
|
97
97
|
clickedOption === op
|
|
98
98
|
? "bg-gray-500 text-white"
|
|
99
|
-
: "bg-
|
|
99
|
+
: "border bg-background hover:bg-gray-300 dark:hover:bg-gray-700"
|
|
100
100
|
)}
|
|
101
101
|
>
|
|
102
102
|
{op}
|