@sikka/hawa 0.0.116 → 0.0.118

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.116",
3
+ "version": "0.0.118",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -10,43 +10,43 @@ import { Controller, useForm } from "react-hook-form"
10
10
  import { HawaContainer } from "../../layout"
11
11
 
12
12
  type SignInFormTypes = {
13
- showError: any
14
- errorTitle: string
15
- errorText: string
16
- signInType: "email" | "username" | "phone"
17
- texts: {
18
- emailLabel: string
19
- emailPlaceholder: string
20
- emailRequiredText: string
21
- emailInvalidText: string
22
- usernameLabel: string
23
- usernamePlaceholder: string
24
- usernameRequired: string
25
- usernameRequiredText: string
26
- phoneRequiredText: string
27
- passwordLabel: string
28
- passwordPlaceholder: string
29
- passwordRequiredText: string
30
- forgotPasswordText: string
31
- newUserText: string
32
- signUpText: string
33
- signInText: string
34
- googleButtonLabel: string
35
- githubButtonLabel: string
36
- twitterButtonLabel: string
13
+ showError?: any
14
+ errorTitle?: string
15
+ errorText?: string
16
+ signInType?: "email" | "username" | "phone"
17
+ texts?: {
18
+ emailLabel?: string
19
+ emailPlaceholder?: string
20
+ emailRequiredText?: string
21
+ emailInvalidText?: string
22
+ usernameLabel?: string
23
+ usernamePlaceholder?: string
24
+ usernameRequired?: string
25
+ usernameRequiredText?: string
26
+ phoneRequiredText?: string
27
+ passwordLabel?: string
28
+ passwordPlaceholder?: string
29
+ passwordRequiredText?: string
30
+ forgotPasswordText?: string
31
+ newUserText?: string
32
+ signUpText?: string
33
+ signInText?: string
34
+ googleButtonLabel?: string
35
+ githubButtonLabel?: string
36
+ twitterButtonLabel?: string
37
37
  }
38
- withoutResetPassword: boolean
39
- withoutSignUp: boolean
40
- isLoading: any
41
- viaGoogle: boolean
42
- viaGithub: boolean
43
- viaTwitter: boolean
44
- handleSignIn: (e: any) => void
45
- handleRouteToSignUp: () => void
46
- handleForgotPassword: () => void
47
- handleGoogleSignIn: () => void
48
- handleGithubSignIn: () => void
49
- handleTwitterSignIn: () => void
38
+ withoutResetPassword?: boolean
39
+ withoutSignUp?: boolean
40
+ isLoading?: any
41
+ viaGoogle?: boolean
42
+ viaGithub?: boolean
43
+ viaTwitter?: boolean
44
+ handleSignIn?: (e: any) => void
45
+ handleRouteToSignUp?: () => void
46
+ handleForgotPassword?: () => void
47
+ handleGoogleSignIn?: () => void
48
+ handleGithubSignIn?: () => void
49
+ handleTwitterSignIn?: () => void
50
50
  }
51
51
 
52
52
  export const SignInForm: React.FunctionComponent<SignInFormTypes> = (props) => {
@@ -1,5 +1,6 @@
1
1
  import * as React from "react"
2
2
  import clsx from "clsx"
3
+ import { HawaSpinner } from "./HawaSpinner"
3
4
 
4
5
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
6
  variant?: "contained" | "outlined"
@@ -108,9 +109,10 @@ export function HawaButton({
108
109
  {!isLoading ? (
109
110
  children
110
111
  ) : (
111
- <div className="flex flex-row gap-x-3">
112
- <div className="h-5 w-5 animate-spin rounded-full border-2 border-gray-400 border-t-white text-white"></div>
113
- </div>
112
+ // <div className="flex flex-row gap-x-3">
113
+ // <div className="h-5 w-5 animate-spin rounded-full border-2 border-gray-400 border-t-white text-white"></div>
114
+ // </div>
115
+ <HawaSpinner />
114
116
  )}
115
117
  </button>
116
118
  {tooltip && (
@@ -0,0 +1,10 @@
1
+ import React from "react"
2
+
3
+ type SpinnerTypes = {}
4
+ export const HawaSpinner: React.FunctionComponent<SpinnerTypes> = (props) => {
5
+ return (
6
+ <div className="flex flex-row gap-x-3">
7
+ <div className="h-4 w-4 animate-spin rounded-full border-2 border-gray-400 border-t-white text-white"></div>
8
+ </div>
9
+ )
10
+ }
@@ -1,11 +1,14 @@
1
1
  import React from "react"
2
2
  import clsx from "clsx"
3
+ import { HawaSpinner } from "./HawaSpinner"
3
4
 
4
5
  type StatTypes = {
5
6
  label?: string
6
7
  number?: string
7
8
  helperText?: string
8
9
  variant?: "plain" | "contained" | "outlined"
10
+ isLoading?: boolean
11
+ handleClick?: () => void
9
12
  }
10
13
  export const HawaStats: React.FunctionComponent<StatTypes> = (props) => {
11
14
  let defaultStyle = "flex flex-col gap-1 rounded-lg p-4 text-sm"
@@ -16,9 +19,16 @@ export const HawaStats: React.FunctionComponent<StatTypes> = (props) => {
16
19
  outlined: "ring-2 w-fit",
17
20
  }
18
21
  return (
19
- <div className={clsx(defaultStyle, statStyles[props.variant])}>
22
+ <div
23
+ onClick={props.handleClick}
24
+ className={clsx(defaultStyle, statStyles[props.variant])}
25
+ >
20
26
  <div>{props.label}</div>
21
- <div className="text-2xl font-bold">{props.number}</div>
27
+ {props.isLoading ? (
28
+ <HawaSpinner />
29
+ ) : (
30
+ <div className="text-2xl font-bold">{props.number}</div>
31
+ )}{" "}
22
32
  <div className="text-xs">{props.helperText}</div>
23
33
  </div>
24
34
  )
@@ -25,6 +25,7 @@ export * from "./HawaCopyrights"
25
25
  export * from "./HawaTimeline"
26
26
  export * from "./Breadcrumb"
27
27
  export * from "./HawaStats"
28
+ export * from "./HawaSpinner"
28
29
  // Inputs
29
30
  export * from "./HawaTextField"
30
31
  export * from "./HawaCardInput"
@@ -1,6 +1,6 @@
1
1
  import clsx from "clsx"
2
2
  import React, { useState } from "react"
3
- import { FaAddressCard } from "react-icons/fa"
3
+
4
4
  type HawaAppLayoutTypes = {
5
5
  logoLink: string
6
6
  username: string
@@ -14,32 +14,41 @@ export const HawaAppLayout: React.FunctionComponent<HawaAppLayoutTypes> = (
14
14
 
15
15
  return (
16
16
  <div className="fixed top-0 left-0 m-0 w-full p-0">
17
- {/* navbar */}
18
- <div className="m-0 flex flex-row justify-between bg-red-300 p-2">
19
- <div>logo</div>
20
- <div>page title</div>
21
- <div className="relative mr-2 h-10 w-10 overflow-hidden rounded-full bg-gray-100 dark:bg-gray-600">
22
- <AvatarIcon />
23
- </div>
24
- </div>
25
-
26
- {/* side menu */}
27
17
  <div
28
18
  onMouseEnter={() => setOpenSideMenu(true)}
29
19
  onMouseLeave={() => setOpenSideMenu(false)}
30
- className="fixed top-0 flex h-full w-10 flex-col gap-2 bg-blue-300 transition-all hover:w-60"
20
+ className="absolute top-0 z-10 flex h-screen w-12 flex-col gap-0 bg-blue-300 transition-all hover:w-40"
31
21
  >
22
+ <div className="m-1 bg-red-300 p-2">logo</div>
32
23
  {props.drawerItems.map((dItem) => (
33
- <div className="flex flex-row items-start justify-start bg-yellow-300 p-2">
34
- {dItem.icon}
35
- <div className={clsx(openSideMenu ? "visible" : "invisible")}>
24
+ <div className="pl-3 m-1 flex cursor-pointer flex-row items-center overflow-x-clip rounded-lg bg-orange-400 p-2 transition-all hover:bg-green-300">
25
+ <div className="flex items-center justify-center">{dItem.icon}</div>
26
+ <div
27
+ className={clsx(
28
+ "mx-2 text-sm transition-all",
29
+ openSideMenu ? "opacity-100" : "opacity-0"
30
+ )}
31
+ >
36
32
  {dItem.text}
37
33
  </div>
38
34
  </div>
39
35
  ))}
40
36
  </div>
41
- {/* page content */}
42
- {props.children}
37
+
38
+ {/*
39
+ <div className="relative flex flex-row bg-yellow-300">
40
+ <div className="relative left-10 h-screen w-full bg-orange-300">
41
+ <div className="m-0 flex flex-row justify-between bg-red-300 p-2">
42
+ <div></div>
43
+ <div>page title</div>
44
+ <div className="relative mr-2 h-10 w-10 overflow-hidden rounded-full bg-gray-100 dark:bg-gray-600">
45
+ <AvatarIcon />
46
+ </div>
47
+ </div>
48
+
49
+ <div>{props.children}</div>
50
+ </div>
51
+ </div> */}
43
52
  </div>
44
53
  )
45
54
  }
package/src/styles.css CHANGED
@@ -547,6 +547,9 @@ video {
547
547
  .top-5 {
548
548
  top: 1.25rem;
549
549
  }
550
+ .left-10 {
551
+ left: 2.5rem;
552
+ }
550
553
  .-left-1 {
551
554
  left: -0.25rem;
552
555
  }
@@ -749,6 +752,9 @@ video {
749
752
  .h-2 {
750
753
  height: 0.5rem;
751
754
  }
755
+ .h-4 {
756
+ height: 1rem;
757
+ }
752
758
  .h-32 {
753
759
  height: 8rem;
754
760
  }
@@ -811,6 +817,9 @@ video {
811
817
  .w-10 {
812
818
  width: 2.5rem;
813
819
  }
820
+ .w-4 {
821
+ width: 1rem;
822
+ }
814
823
  .w-11 {
815
824
  width: 2.75rem;
816
825
  }
@@ -934,9 +943,6 @@ video {
934
943
  .items-stretch {
935
944
  align-items: stretch;
936
945
  }
937
- .justify-start {
938
- justify-content: flex-start;
939
- }
940
946
  .justify-end {
941
947
  justify-content: flex-end;
942
948
  }
@@ -958,6 +964,9 @@ video {
958
964
  .gap-1 {
959
965
  gap: 0.25rem;
960
966
  }
967
+ .gap-0 {
968
+ gap: 0px;
969
+ }
961
970
  .gap-x-3 {
962
971
  -moz-column-gap: 0.75rem;
963
972
  column-gap: 0.75rem;
@@ -1019,6 +1028,9 @@ video {
1019
1028
  .overflow-x-hidden {
1020
1029
  overflow-x: hidden;
1021
1030
  }
1031
+ .overflow-x-clip {
1032
+ overflow-x: clip;
1033
+ }
1022
1034
  .overflow-y-clip {
1023
1035
  overflow-y: clip;
1024
1036
  }
@@ -1300,10 +1312,18 @@ video {
1300
1312
  --tw-bg-opacity: 1;
1301
1313
  background-color: rgb(116 177 251 / var(--tw-bg-opacity));
1302
1314
  }
1315
+ .bg-orange-400 {
1316
+ --tw-bg-opacity: 1;
1317
+ background-color: rgb(251 146 60 / var(--tw-bg-opacity));
1318
+ }
1303
1319
  .bg-yellow-300 {
1304
1320
  --tw-bg-opacity: 1;
1305
1321
  background-color: rgb(253 224 71 / var(--tw-bg-opacity));
1306
1322
  }
1323
+ .bg-orange-300 {
1324
+ --tw-bg-opacity: 1;
1325
+ background-color: rgb(253 186 116 / var(--tw-bg-opacity));
1326
+ }
1307
1327
  .bg-primary-300 {
1308
1328
  --tw-bg-opacity: 1;
1309
1329
  background-color: rgb(156 199 252 / var(--tw-bg-opacity));
@@ -1430,6 +1450,9 @@ video {
1430
1450
  .pl-10 {
1431
1451
  padding-left: 2.5rem;
1432
1452
  }
1453
+ .pl-3 {
1454
+ padding-left: 0.75rem;
1455
+ }
1433
1456
  .pt-0 {
1434
1457
  padding-top: 0px;
1435
1458
  }
@@ -1741,8 +1764,8 @@ body {
1741
1764
  --tw-content: '';
1742
1765
  content: var(--tw-content);
1743
1766
  }
1744
- .hover\:w-60:hover {
1745
- width: 15rem;
1767
+ .hover\:w-40:hover {
1768
+ width: 10rem;
1746
1769
  }
1747
1770
  .hover\:cursor-pointer:hover {
1748
1771
  cursor: pointer;
@@ -1783,6 +1806,10 @@ body {
1783
1806
  --tw-bg-opacity: 1;
1784
1807
  background-color: rgb(29 78 216 / var(--tw-bg-opacity));
1785
1808
  }
1809
+ .hover\:bg-green-300:hover {
1810
+ --tw-bg-opacity: 1;
1811
+ background-color: rgb(134 239 172 / var(--tw-bg-opacity));
1812
+ }
1786
1813
  .hover\:text-gray-900:hover {
1787
1814
  --tw-text-opacity: 1;
1788
1815
  color: rgb(17 24 39 / var(--tw-text-opacity));