@sikka/hawa 0.0.219 → 0.0.221

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.
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ type FooterTypes = {
3
+ logoText?: string;
4
+ logoURL?: string;
5
+ socialLinks?: {
6
+ twitter?: string;
7
+ instagram?: string;
8
+ tiktok?: string;
9
+ snapchat?: string;
10
+ };
11
+ footerLinks?: {
12
+ title: string;
13
+ pages: {
14
+ label: string;
15
+ link: string;
16
+ }[];
17
+ }[];
18
+ };
19
+ export declare const Footer: React.FunctionComponent<FooterTypes>;
20
+ export {};
@@ -5,3 +5,4 @@ export * from "./HawaAppLayout";
5
5
  export * from "./HawaContainer";
6
6
  export * from "./SimpleGrid";
7
7
  export * from "./AppSidebar";
8
+ export * from "./Footer";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.219",
3
+ "version": "0.0.221",
4
4
  "description": "SaaS Oriented UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -0,0 +1,46 @@
1
+ import React from "react"
2
+ import { HawaButton, HawaTextField } from "../../elements"
3
+ import { HawaContainer } from "../../layout"
4
+
5
+ type TLeadGenerator = {
6
+ variant?: "outlined" | "contained" | "neobrutalism"
7
+ texts: {
8
+ title: string
9
+ subtitle: string
10
+ submit: string
11
+ }
12
+ handleNewsletterSub: (e: string) => void
13
+ }
14
+
15
+ export const LeadGenerator: React.FunctionComponent<TLeadGenerator> = ({
16
+ variant = "contained",
17
+ texts,
18
+ handleNewsletterSub,
19
+ }) => {
20
+ return (
21
+ <HawaContainer variant={variant}>
22
+ <div className="p-0 mb-4 pt-0">
23
+ <h1 className="font-bold">{texts?.title}</h1>
24
+ <span>{texts?.subtitle}</span>
25
+ </div>
26
+ <form
27
+ className="flex flex-row gap-2"
28
+ onSubmit={(e) => {
29
+ e.preventDefault()
30
+ handleNewsletterSub(e.target[0].value)
31
+ }}
32
+ >
33
+ <HawaTextField
34
+ width="full"
35
+ type="email"
36
+ name="email"
37
+ placeholder={"example@sikka.io"}
38
+ margin="none"
39
+ />
40
+ <HawaButton size="full" margins="none">
41
+ {texts?.submit ?? "Submit"}
42
+ </HawaButton>
43
+ </form>
44
+ </HawaContainer>
45
+ )
46
+ }
@@ -2,4 +2,4 @@ export * from "./NotFound"
2
2
  export * from "./EmptyState"
3
3
  export * from "./Newsletter"
4
4
  export * from "./Testimonial"
5
-
5
+ export * from "./LeadGenerator"
@@ -50,7 +50,8 @@ export const HawaButton: React.FunctionComponent<ButtonProps> = ({
50
50
  badge,
51
51
  ...props
52
52
  }) => {
53
- const baseStyles = "cursor-pointer font-medium rounded h-full transition-all"
53
+ const baseStyles =
54
+ "cursor-pointer h-[2.36rem] justify-center items-center text-center font-medium rounded transition-all"
54
55
 
55
56
  const sizeStyles = {
56
57
  xs: "px-1 py-1",
@@ -7,16 +7,17 @@ type TCheckBoxTypes = {
7
7
  helperText?: any
8
8
  id: string
9
9
  onChange?: (e) => void
10
+ val?: boolean
10
11
  }
11
12
 
12
13
  export const HawaCheckbox: React.FunctionComponent<TCheckBoxTypes> = (
13
14
  props
14
15
  ) => {
15
- const [val, setVal] = useState(false)
16
+ const [isChecked, setVal] = useState(props.val)
16
17
 
17
18
  useEffect(() => {
18
- props.onChange(val)
19
- }, [val])
19
+ props.onChange(isChecked)
20
+ }, [isChecked])
20
21
  return (
21
22
  <div
22
23
  className={clsx(
@@ -27,7 +28,7 @@ export const HawaCheckbox: React.FunctionComponent<TCheckBoxTypes> = (
27
28
  >
28
29
  <input
29
30
  type="checkbox"
30
- checked={val}
31
+ checked={isChecked}
31
32
  onChange={(e) => setVal(e.target.checked)}
32
33
  id={props.id}
33
34
  aria-label={props.label}
@@ -36,7 +37,7 @@ export const HawaCheckbox: React.FunctionComponent<TCheckBoxTypes> = (
36
37
  {(props.label || props.helperText) && (
37
38
  <div
38
39
  className=" flex cursor-pointer flex-col py-2"
39
- onClick={(e) => setVal(!val)}
40
+ onClick={(e) => setVal(!isChecked)}
40
41
  >
41
42
  {props.label && (
42
43
  <label className="mx-2 text-sm font-medium text-gray-900 dark:text-gray-300">
@@ -23,7 +23,7 @@ const Control: React.FunctionComponent<ControlTypes> = ({
23
23
  }) => {
24
24
  let sizeStyles = {
25
25
  small: "h-7 text-xs",
26
- normal: "h-[2.33rem] text-sm",
26
+ normal: "h-[2.36rem] text-sm",
27
27
  large: "",
28
28
  }
29
29
  return (
@@ -35,13 +35,12 @@ export const HawaTextField: React.FunctionComponent<TextFieldTypes> = ({
35
35
  large: "mb-5",
36
36
  }
37
37
  let widthStyles = {
38
-
39
38
  small: "w-full max-w-2xs",
40
39
  normal: "w-1/2",
41
40
  full: "w-full",
42
41
  }
43
42
 
44
- let defaultStyle = "flex h-fit max-h-fit flex-col justify-center"
43
+ let defaultStyle = "flex max-h-fit flex-col justify-center"
45
44
  let defaultInputStyle =
46
45
  "block w-full rounded border border-gray-300 bg-white 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"
47
46
  let previewInputStyle =
@@ -0,0 +1,74 @@
1
+ import { useState } from "@storybook/addons"
2
+ import { FC, ReactNode } from "react"
3
+ import clsx from "clsx"
4
+ import { BsInstagram, BsTwitter } from "react-icons/bs"
5
+ import { FaSnapchat, FaSnapchatGhost, FaTiktok } from "react-icons/fa"
6
+
7
+ type FooterTypes = {
8
+ logoText?: string
9
+ logoURL?: string
10
+ socialLinks?: {
11
+ twitter?: string
12
+ instagram?: string
13
+ tiktok?: string
14
+ snapchat?: string
15
+ }
16
+ footerLinks?: {
17
+ title: string
18
+ pages: {
19
+ label: string
20
+ link: string
21
+ }[]
22
+ }[]
23
+ }
24
+
25
+ export const Footer: React.FunctionComponent<FooterTypes> = ({ ...props }) => {
26
+ return (
27
+ <div className="sticky left-0 bottom-0 flex w-full flex-row gap-8 bg-blue-200 p-4">
28
+ {props.logoText && (
29
+ <div>
30
+ <div className="text-2xl font-bold">{props.logoText}</div>
31
+ </div>
32
+ )}
33
+ {props.footerLinks?.map((pagesSection) => (
34
+ <div className="flex w-32 flex-col gap-2">
35
+ <div className="text-lg font-bold">{pagesSection.title}</div>
36
+ <div className="flex flex-col gap-1">
37
+ {pagesSection.pages.map((singlePage) => (
38
+ <a
39
+ className="transition-all hover:font-bold"
40
+ href={singlePage.link}
41
+ >
42
+ {singlePage.label}
43
+ </a>
44
+ ))}
45
+ </div>
46
+ </div>
47
+ ))}
48
+ {props.socialLinks && (
49
+ <div className="flex flex-row gap-2">
50
+ {props.socialLinks.twitter && (
51
+ <div className="flex h-6 w-6 items-center justify-center rounded bg-white">
52
+ <BsTwitter />
53
+ </div>
54
+ )}
55
+ {props.socialLinks.instagram && (
56
+ <div className="flex h-6 w-6 items-center justify-center rounded bg-white">
57
+ <BsInstagram />
58
+ </div>
59
+ )}
60
+ {props.socialLinks.tiktok && (
61
+ <div className="flex h-6 w-6 items-center justify-center rounded bg-white">
62
+ <FaTiktok />
63
+ </div>
64
+ )}
65
+ {props.socialLinks.snapchat && (
66
+ <div className="flex h-6 w-6 items-center justify-center rounded bg-white">
67
+ <FaSnapchatGhost />
68
+ </div>
69
+ )}
70
+ </div>
71
+ )}
72
+ </div>
73
+ )
74
+ }
@@ -5,3 +5,4 @@ export * from "./HawaAppLayout"
5
5
  export * from "./HawaContainer"
6
6
  export * from "./SimpleGrid"
7
7
  export * from "./AppSidebar"
8
+ export * from "./Footer"
package/src/styles.css CHANGED
@@ -813,6 +813,9 @@ video {
813
813
  .h-11 {
814
814
  height: 2.75rem;
815
815
  }
816
+ .h-12 {
817
+ height: 3rem;
818
+ }
816
819
  .h-14 {
817
820
  height: 3.5rem;
818
821
  }
@@ -861,8 +864,8 @@ video {
861
864
  .h-\[1px\] {
862
865
  height: 1px;
863
866
  }
864
- .h-\[2\.33rem\] {
865
- height: 2.33rem;
867
+ .h-\[2\.36rem\] {
868
+ height: 2.36rem;
866
869
  }
867
870
  .h-\[calc\(100\%-3\.5rem\)\] {
868
871
  height: calc(100% - 3.5rem);
@@ -929,6 +932,9 @@ video {
929
932
  .w-3 {
930
933
  width: 0.75rem;
931
934
  }
935
+ .w-32 {
936
+ width: 8rem;
937
+ }
932
938
  .w-4 {
933
939
  width: 1rem;
934
940
  }
@@ -1140,6 +1146,9 @@ video {
1140
1146
  .gap-4 {
1141
1147
  gap: 1rem;
1142
1148
  }
1149
+ .gap-8 {
1150
+ gap: 2rem;
1151
+ }
1143
1152
  .gap-9 {
1144
1153
  gap: 2.25rem;
1145
1154
  }
@@ -1424,6 +1433,10 @@ video {
1424
1433
  --tw-bg-opacity: 1;
1425
1434
  background-color: rgb(219 234 254 / var(--tw-bg-opacity));
1426
1435
  }
1436
+ .bg-blue-200 {
1437
+ --tw-bg-opacity: 1;
1438
+ background-color: rgb(191 219 254 / var(--tw-bg-opacity));
1439
+ }
1427
1440
  .bg-blue-50 {
1428
1441
  --tw-bg-opacity: 1;
1429
1442
  background-color: rgb(239 246 255 / var(--tw-bg-opacity));
@@ -1470,6 +1483,10 @@ video {
1470
1483
  --tw-bg-opacity: 1;
1471
1484
  background-color: rgb(220 252 231 / var(--tw-bg-opacity));
1472
1485
  }
1486
+ .bg-green-300 {
1487
+ --tw-bg-opacity: 1;
1488
+ background-color: rgb(134 239 172 / var(--tw-bg-opacity));
1489
+ }
1473
1490
  .bg-green-500 {
1474
1491
  --tw-bg-opacity: 1;
1475
1492
  background-color: rgb(34 197 94 / var(--tw-bg-opacity));
@@ -1515,6 +1532,10 @@ video {
1515
1532
  --tw-bg-opacity: 1;
1516
1533
  background-color: rgb(254 249 195 / var(--tw-bg-opacity));
1517
1534
  }
1535
+ .bg-yellow-300 {
1536
+ --tw-bg-opacity: 1;
1537
+ background-color: rgb(253 224 71 / var(--tw-bg-opacity));
1538
+ }
1518
1539
  .bg-yellow-400 {
1519
1540
  --tw-bg-opacity: 1;
1520
1541
  background-color: rgb(250 204 21 / var(--tw-bg-opacity));
@@ -2082,6 +2103,10 @@ body {
2082
2103
  background-color: var(--layout-primary-700);
2083
2104
  }
2084
2105
 
2106
+ .hover\:font-bold:hover {
2107
+ font-weight: 700;
2108
+ }
2109
+
2085
2110
  .hover\:text-blue-600:hover {
2086
2111
  --tw-text-opacity: 1;
2087
2112
  color: rgb(37 99 235 / var(--tw-text-opacity));