@sikka/hawa 0.0.206 → 0.0.207
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 +8 -11
- package/es/elements/HawaButton.d.ts +0 -1
- package/es/elements/HawaCopyrights.d.ts +1 -0
- package/es/elements/HawaPricingCard.d.ts +1 -0
- package/es/elements/HawaTabs.d.ts +1 -1
- package/es/elements/HawaTooltip.d.ts +0 -1
- package/es/index.es.js +1 -1
- package/lib/elements/HawaButton.d.ts +0 -1
- package/lib/elements/HawaCopyrights.d.ts +1 -0
- package/lib/elements/HawaPricingCard.d.ts +1 -0
- package/lib/elements/HawaTabs.d.ts +1 -1
- package/lib/elements/HawaTooltip.d.ts +0 -1
- package/lib/index.js +1 -1
- package/package.json +1 -2
- package/src/blocks/Pricing/PricingPlans.tsx +16 -10
- package/src/blocks/Referral/ReferralAccount.tsx +0 -2
- package/src/elements/Breadcrumb.tsx +0 -1
- package/src/elements/HawaAccordion.tsx +0 -1
- package/src/elements/HawaButton.tsx +1 -7
- package/src/elements/HawaCheckbox.tsx +0 -1
- package/src/elements/HawaChip.tsx +0 -2
- package/src/elements/HawaCopyrights.tsx +5 -10
- package/src/elements/HawaDrawer.tsx +1 -1
- package/src/elements/HawaItemCard.tsx +0 -12
- package/src/elements/HawaPhoneInput.tsx +0 -1
- package/src/elements/HawaPricingCard.tsx +52 -96
- package/src/elements/HawaTable.tsx +1 -1
- package/src/elements/HawaTabs.tsx +10 -16
- package/src/elements/HawaTextField.tsx +0 -2
- package/src/elements/HawaTooltip.tsx +0 -1
- package/src/elements/InvoiceAccordion.tsx +2 -7
- package/src/elements/TabPanel.tsx +0 -13
- package/src/styles.css +8 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sikka/hawa",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.207",
|
|
4
4
|
"description": "SaaS Oriented UI Kit",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.es.js",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.10",
|
|
37
37
|
"@babel/preset-react": "^7.12.10",
|
|
38
|
-
"@paypal/react-paypal-js": "^7.6.0",
|
|
39
38
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
40
39
|
"@rollup/plugin-node-resolve": "^11.1.1",
|
|
41
40
|
"@storybook/addon-actions": "^6.5.8",
|
|
@@ -23,12 +23,12 @@ type PricingPlansTypes = {
|
|
|
23
23
|
export const PricingPlans: React.FunctionComponent<PricingPlansTypes> = (
|
|
24
24
|
props
|
|
25
25
|
) => {
|
|
26
|
-
const [currentCurrency, setCurrentCurrency] = useState("
|
|
27
|
-
const [currentCycle, setCurrentCycle] = useState("
|
|
26
|
+
const [currentCurrency, setCurrentCurrency] = useState("SAR")
|
|
27
|
+
const [currentCycle, setCurrentCycle] = useState("month")
|
|
28
28
|
let cycleOptions = [
|
|
29
|
-
{ label: `Monthly`, value: `
|
|
30
|
-
{ label: `3 Months`, value: `3-months` },
|
|
31
|
-
{ label: `6 Months`, value: `6-months` },
|
|
29
|
+
{ label: `Monthly`, value: `month` },
|
|
30
|
+
// { label: `3 Months`, value: `3-months` },
|
|
31
|
+
// { label: `6 Months`, value: `6-months` },
|
|
32
32
|
{ label: `Annually`, value: `annually` },
|
|
33
33
|
]
|
|
34
34
|
let currencyOptions = [
|
|
@@ -43,14 +43,16 @@ export const PricingPlans: React.FunctionComponent<PricingPlansTypes> = (
|
|
|
43
43
|
<div>
|
|
44
44
|
<div className="mb-2 flex w-full justify-between">
|
|
45
45
|
<HawaTabs
|
|
46
|
+
pill
|
|
46
47
|
defaultValue={currentCycle}
|
|
47
48
|
options={cycleOptions}
|
|
48
|
-
onChangeTab={(e: any) => setCurrentCycle(e)}
|
|
49
|
+
onChangeTab={(e: any) => setCurrentCycle(e.label)}
|
|
49
50
|
/>
|
|
50
51
|
<HawaTabs
|
|
52
|
+
pill
|
|
51
53
|
defaultValue={currentCurrency}
|
|
52
54
|
options={currencyOptions}
|
|
53
|
-
onChangeTab={(e: any) => setCurrentCurrency(e)}
|
|
55
|
+
onChangeTab={(e: any) => setCurrentCurrency(e.label)}
|
|
54
56
|
/>
|
|
55
57
|
</div>
|
|
56
58
|
|
|
@@ -58,11 +60,15 @@ export const PricingPlans: React.FunctionComponent<PricingPlansTypes> = (
|
|
|
58
60
|
{props.plans.map((plan: any) => {
|
|
59
61
|
return (
|
|
60
62
|
<HawaPricingCard
|
|
61
|
-
size="large"
|
|
63
|
+
// size="large"
|
|
64
|
+
// features={plan.features}
|
|
62
65
|
lang={props.lang}
|
|
63
66
|
{...plan}
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
texts={{
|
|
68
|
+
buttonText: "Upgrade",
|
|
69
|
+
currencyText: currentCurrency,
|
|
70
|
+
cycleText: currentCycle,
|
|
71
|
+
}}
|
|
66
72
|
/>
|
|
67
73
|
)
|
|
68
74
|
})}
|
|
@@ -19,7 +19,6 @@ export const ReferralAccount: React.FunctionComponent<ReferralAccount> = ({
|
|
|
19
19
|
<div className="flex flex-row items-center justify-between rounded bg-white">
|
|
20
20
|
<span className="ml-3 font-bold">{referralCode}</span>
|
|
21
21
|
<HawaButton
|
|
22
|
-
buttonID={"refCode"}
|
|
23
22
|
tooltip="Copy"
|
|
24
23
|
className="mr-1.5"
|
|
25
24
|
onClick={() => navigator.clipboard.writeText(referralCode)}
|
|
@@ -35,7 +34,6 @@ export const ReferralAccount: React.FunctionComponent<ReferralAccount> = ({
|
|
|
35
34
|
<div className="flex flex-row items-center justify-between rounded bg-white">
|
|
36
35
|
<span className="ml-3 font-bold">{referralLink}</span>
|
|
37
36
|
<HawaButton
|
|
38
|
-
buttonID={"refLink"}
|
|
39
37
|
className="mr-1.5"
|
|
40
38
|
onClick={() => navigator.clipboard.writeText(referralLink)}
|
|
41
39
|
>
|
|
@@ -26,7 +26,6 @@ const AccordionItem: React.FunctionComponent<AccordionItemTypes> = (props) => {
|
|
|
26
26
|
id={"accordion-collapse-heading-" + props.count}
|
|
27
27
|
type="button"
|
|
28
28
|
className={clsx(
|
|
29
|
-
// props.count === 0 ? roundedTop : noRounding,
|
|
30
29
|
collapse ? "rounded" : "rounded-t",
|
|
31
30
|
"flex w-full items-center justify-between border border-gray-200 bg-gray-100 p-5 text-left font-medium text-gray-900 hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:text-white dark:hover:bg-gray-800 dark:focus:ring-gray-800"
|
|
32
31
|
)}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react"
|
|
2
2
|
import clsx from "clsx"
|
|
3
3
|
import { HawaSpinner } from "./HawaSpinner"
|
|
4
4
|
import { HawaTooltip } from "./HawaTooltip"
|
|
5
|
-
import useHover from "../hooks/useHover"
|
|
6
5
|
|
|
7
6
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
7
|
variant?: "contained" | "outlined"
|
|
9
|
-
buttonID?: any
|
|
10
8
|
tooltipDirection?: "rtl" | "ltr"
|
|
11
9
|
color?: "default" | "primary" | "secondary"
|
|
12
10
|
width?: "full" | "normal" | "half"
|
|
@@ -49,7 +47,6 @@ export const HawaButton: React.FunctionComponent<ButtonProps> = ({
|
|
|
49
47
|
tooltipDirection = "ltr",
|
|
50
48
|
margins = "2",
|
|
51
49
|
children,
|
|
52
|
-
buttonID,
|
|
53
50
|
badge,
|
|
54
51
|
...props
|
|
55
52
|
}) => {
|
|
@@ -113,7 +110,6 @@ export const HawaButton: React.FunctionComponent<ButtonProps> = ({
|
|
|
113
110
|
content={tooltip}
|
|
114
111
|
>
|
|
115
112
|
<button
|
|
116
|
-
// type={props.type}
|
|
117
113
|
className={
|
|
118
114
|
disabled
|
|
119
115
|
? clsx(
|
|
@@ -136,14 +132,12 @@ export const HawaButton: React.FunctionComponent<ButtonProps> = ({
|
|
|
136
132
|
}
|
|
137
133
|
disabled={disabled}
|
|
138
134
|
onClick={props.onClick}
|
|
139
|
-
// {...props}
|
|
140
135
|
>
|
|
141
136
|
{!isLoading ? children : <HawaSpinner size="button" />}
|
|
142
137
|
</button>
|
|
143
138
|
</HawaTooltip>
|
|
144
139
|
) : (
|
|
145
140
|
<button
|
|
146
|
-
// type={props.type}
|
|
147
141
|
className={
|
|
148
142
|
disabled
|
|
149
143
|
? clsx(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react"
|
|
2
2
|
|
|
3
3
|
type CopyRightsTypes = {
|
|
4
4
|
withLogo?: boolean
|
|
@@ -6,6 +6,7 @@ type CopyRightsTypes = {
|
|
|
6
6
|
version?: string
|
|
7
7
|
credits?: string
|
|
8
8
|
logoURL?: string
|
|
9
|
+
onLogoClicked?: any
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export const HawaCopyrights: React.FunctionComponent<CopyRightsTypes> = (
|
|
@@ -14,15 +15,9 @@ export const HawaCopyrights: React.FunctionComponent<CopyRightsTypes> = (
|
|
|
14
15
|
return (
|
|
15
16
|
<div className="my-2 flex flex-col items-center justify-center gap-1 text-xs text-gray-400">
|
|
16
17
|
{props.withLogo ? (
|
|
17
|
-
<a href={
|
|
18
|
-
<div
|
|
19
|
-
<image
|
|
20
|
-
// src={props.logoURL}
|
|
21
|
-
href={props.logoURL}
|
|
22
|
-
// alt="Qawaim"
|
|
23
|
-
width={100}
|
|
24
|
-
height={50}
|
|
25
|
-
/>
|
|
18
|
+
<a href={props.onLogoClicked}>
|
|
19
|
+
<div className="cursor-pointer">
|
|
20
|
+
<image href={props.logoURL} width={100} height={50} />
|
|
26
21
|
</div>
|
|
27
22
|
</a>
|
|
28
23
|
) : null}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
2
|
import React, { useEffect } from "react"
|
|
3
3
|
import { useState } from "react"
|
|
4
|
-
import useDiscloser from "../hooks/useDiscloser"
|
|
5
4
|
import { HawaMenu } from "./HawaMenu"
|
|
6
5
|
|
|
7
6
|
interface ItemCardTypes {
|
|
@@ -46,17 +45,6 @@ export const HawaItemCard: React.FunctionComponent<ItemCardTypes> = ({
|
|
|
46
45
|
"inline-block rounded p-1 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700"
|
|
47
46
|
|
|
48
47
|
const [openActionHeader, setOpenActionHeader] = useState(false)
|
|
49
|
-
// const {
|
|
50
|
-
// isOpen: isActionOpen,
|
|
51
|
-
// onClose: onActionClose,
|
|
52
|
-
// onOpen: onActionOpen,
|
|
53
|
-
// } = useDiscloser()
|
|
54
|
-
// const {
|
|
55
|
-
// isOpen: isDropDownOpen,
|
|
56
|
-
// onClose: onDropDownClose,
|
|
57
|
-
// onOpen: onDropDownOpen,
|
|
58
|
-
// } = useDiscloser()
|
|
59
|
-
// const [openDropDown, setOpenDropDown] = useState(false)
|
|
60
48
|
|
|
61
49
|
function handleOpenActionHeader() {
|
|
62
50
|
setOpenActionHeader(!openActionHeader)
|
|
@@ -8,10 +8,12 @@ type PricingCardTypes = {
|
|
|
8
8
|
features: [{ included: boolean; text: string }]
|
|
9
9
|
title: string
|
|
10
10
|
price: number
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
texts: {
|
|
12
|
+
subtitle: string
|
|
13
|
+
buttonText: string
|
|
14
|
+
cycleText: string
|
|
15
|
+
currencyText: string
|
|
16
|
+
}
|
|
15
17
|
size: "small" | "medium" | "large"
|
|
16
18
|
}
|
|
17
19
|
type CycleTextTypes = {
|
|
@@ -24,9 +26,10 @@ type CurrencyTextTypes = {
|
|
|
24
26
|
usd: string
|
|
25
27
|
sar: string
|
|
26
28
|
}
|
|
27
|
-
export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = (
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = ({
|
|
30
|
+
size = "medium",
|
|
31
|
+
...props
|
|
32
|
+
}) => {
|
|
30
33
|
let isArabic = props.lang === "ar"
|
|
31
34
|
let cycleTextsArabic: CycleTextTypes = {
|
|
32
35
|
monthly: "شهرياً",
|
|
@@ -46,83 +49,67 @@ export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = (
|
|
|
46
49
|
}
|
|
47
50
|
let cardSizes = {
|
|
48
51
|
small:
|
|
49
|
-
"mx-1 w-full
|
|
52
|
+
"mx-1 w-full max-w-sm rounded border shadow-md dark:border-gray-700 dark:bg-gray-800 sm:p-8",
|
|
50
53
|
medium:
|
|
51
|
-
"mx-1 w-full
|
|
54
|
+
"mx-1 w-full rounded min-w-fit border bg-white dark:border-gray-700 dark:bg-gray-800 sm:p-8",
|
|
52
55
|
large:
|
|
53
|
-
"mx-1 w-full max-w-lg rounded border
|
|
56
|
+
"mx-1 w-full max-w-lg rounded border p-4 shadow-md dark:border-gray-700 dark:bg-gray-800 sm:p-8",
|
|
54
57
|
}
|
|
55
58
|
return (
|
|
56
59
|
<div
|
|
57
60
|
dir={isArabic ? "rtl" : "ltr"}
|
|
58
|
-
className={clsx(
|
|
61
|
+
className={clsx(
|
|
62
|
+
cardSizes[size],
|
|
63
|
+
"flex flex-col gap-4 border-2 bg-white p-4"
|
|
64
|
+
)}
|
|
59
65
|
>
|
|
60
|
-
<h5 className="
|
|
66
|
+
<h5 className="text-md 0 font-bold text-gray-500 dark:text-gray-400">
|
|
61
67
|
{props.title}
|
|
62
68
|
</h5>
|
|
63
|
-
<div className="flex items-baseline
|
|
64
|
-
{/* {isArabic ? ( */}
|
|
69
|
+
<div className=" flex items-baseline text-gray-900 dark:text-white">
|
|
65
70
|
<>
|
|
66
71
|
<span className="text-5xl font-extrabold tracking-tight">
|
|
67
72
|
{props.price}
|
|
68
73
|
</span>
|
|
69
74
|
<span className="mx-1 text-sm font-semibold">
|
|
70
|
-
{" "}
|
|
71
|
-
{/* {
|
|
72
|
-
currencyMapping[
|
|
73
|
-
props.currency?.toLowerCase() as keyof CurrencyTextTypes
|
|
74
|
-
]
|
|
75
|
-
} */}
|
|
76
75
|
{props.texts.currencyText}
|
|
77
76
|
</span>
|
|
78
77
|
</>
|
|
79
|
-
{/*
|
|
80
|
-
// <>
|
|
81
|
-
// <span className="text-sm font-semibold">
|
|
82
|
-
// {" "}
|
|
83
|
-
// {
|
|
84
|
-
// currencyMapping[
|
|
85
|
-
// props.currency?.toLowerCase() as keyof CurrencyTextTypes
|
|
86
|
-
// ]
|
|
87
|
-
// }
|
|
88
|
-
// </span>
|
|
89
|
-
// <span className="mx-1 text-5xl font-extrabold tracking-tight">
|
|
90
|
-
// {props.price}
|
|
91
|
-
// </span>
|
|
92
|
-
// </>
|
|
93
|
-
// )} */}
|
|
94
|
-
<span className="ml-1 text-xl font-normal text-gray-500 dark:text-gray-400">
|
|
78
|
+
{/* <span className="ml-1 text-xl font-normal text-gray-500 dark:text-gray-400">
|
|
95
79
|
/ {props.texts.cycleText}
|
|
96
|
-
|
|
97
|
-
? cycleTextsArabic[props.cycleText as keyof CycleTextTypes]
|
|
98
|
-
: cycleTextsEnglish[props.cycleText as keyof CycleTextTypes]} */}
|
|
99
|
-
</span>
|
|
80
|
+
</span> */}
|
|
100
81
|
</div>
|
|
101
|
-
<
|
|
102
|
-
{props.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
82
|
+
<h5 className="text-md font-normal text-gray-500 dark:text-gray-400">
|
|
83
|
+
{props.texts.subtitle}
|
|
84
|
+
</h5>
|
|
85
|
+
|
|
86
|
+
{props.features && (
|
|
87
|
+
<ul role="list" className="space-y-0 ">
|
|
88
|
+
{props.features?.map((feature, o) => {
|
|
89
|
+
return (
|
|
90
|
+
<li key={o} className="flex ">
|
|
91
|
+
<svg
|
|
92
|
+
aria-hidden="true"
|
|
93
|
+
className="m-2 h-5 w-5 flex-shrink-0 text-blue-600 dark:text-blue-500"
|
|
94
|
+
fill="currentColor"
|
|
95
|
+
viewBox="0 0 20 20"
|
|
96
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
97
|
+
>
|
|
98
|
+
<title>Check icon</title>
|
|
99
|
+
<path
|
|
100
|
+
fillRule="evenodd"
|
|
101
|
+
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"
|
|
102
|
+
clipRule="evenodd"
|
|
103
|
+
></path>
|
|
104
|
+
</svg>
|
|
105
|
+
<span className="flex items-center text-center font-normal leading-tight text-gray-500 dark:text-gray-400">
|
|
106
|
+
{feature.text}
|
|
107
|
+
</span>
|
|
108
|
+
</li>
|
|
109
|
+
)
|
|
110
|
+
})}
|
|
111
|
+
</ul>
|
|
112
|
+
)}
|
|
126
113
|
<button
|
|
127
114
|
type="button"
|
|
128
115
|
className="inline-flex w-full justify-center rounded bg-blue-600 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-4 focus:ring-blue-200 dark:focus:ring-blue-900"
|
|
@@ -130,36 +117,5 @@ export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = (
|
|
|
130
117
|
{props.texts.buttonText}
|
|
131
118
|
</button>
|
|
132
119
|
</div>
|
|
133
|
-
|
|
134
|
-
// <Container
|
|
135
|
-
// variant={props.selectedPlan ? "selected-plan-card" : "plan-card"}
|
|
136
|
-
// style={{ direction: isArabic ? "rtl" : "ltr" }}
|
|
137
|
-
// >
|
|
138
|
-
// {props.discount && (
|
|
139
|
-
// <Chip
|
|
140
|
-
// label={props.discount}
|
|
141
|
-
// variant="standard"
|
|
142
|
-
// style={{
|
|
143
|
-
// position: "absolute",
|
|
144
|
-
// bottom: 10,
|
|
145
|
-
// ...chipSpacing
|
|
146
|
-
// }}
|
|
147
|
-
// color="success"
|
|
148
|
-
// />
|
|
149
|
-
// )}
|
|
150
|
-
|
|
151
|
-
// <div
|
|
152
|
-
// style={{ padding: 20, color: props.selectedPlan ? "white" : "black" }}
|
|
153
|
-
// >
|
|
154
|
-
//
|
|
155
|
-
// </div>
|
|
156
|
-
// <button
|
|
157
|
-
// onClick={props.selectPlan}
|
|
158
|
-
// variant={props.selectedPlan ? "outlined" : "contained"}
|
|
159
|
-
// style={{ margin: 20 }}
|
|
160
|
-
// >
|
|
161
|
-
// {props.buttonText}
|
|
162
|
-
// </button>
|
|
163
|
-
// </Container>
|
|
164
120
|
)
|
|
165
121
|
}
|
|
@@ -251,9 +251,9 @@ export const HawaTable: React.FunctionComponent<TableTypes> = ({
|
|
|
251
251
|
</tr>
|
|
252
252
|
)}
|
|
253
253
|
</tbody>
|
|
254
|
-
<div></div>
|
|
255
254
|
</table>
|
|
256
255
|
</div>
|
|
256
|
+
|
|
257
257
|
<div className="flex flex-row items-center justify-between ">
|
|
258
258
|
{/* Pagination Pages */}
|
|
259
259
|
{range.length > 1 ? (
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
2
|
import React, { useState } from "react"
|
|
3
|
-
|
|
3
|
+
// TODO: fix wrapping issue when small screen
|
|
4
4
|
type TabsTypes = {
|
|
5
5
|
options?: any
|
|
6
6
|
onChangeTab?: any
|
|
7
7
|
defaultValue?: any
|
|
8
|
-
contents?: any
|
|
9
8
|
orientation?: "horizontal" | "vertical"
|
|
10
9
|
direction?: "rtl" | "ltr"
|
|
11
10
|
marginBetween?: any
|
|
12
11
|
width?: "full" | "normal"
|
|
12
|
+
pill?: boolean
|
|
13
13
|
}
|
|
14
14
|
export const HawaTabs: React.FunctionComponent<TabsTypes> = ({
|
|
15
15
|
orientation = "horizontal",
|
|
16
16
|
direction = "ltr",
|
|
17
17
|
width = "normal",
|
|
18
18
|
marginBetween = 0,
|
|
19
|
+
pill = true,
|
|
19
20
|
...props
|
|
20
21
|
}) => {
|
|
21
22
|
const [selectedOption, setSelectedOption] = useState(props.options[0]?.value)
|
|
@@ -66,7 +67,6 @@ export const HawaTabs: React.FunctionComponent<TabsTypes> = ({
|
|
|
66
67
|
>
|
|
67
68
|
<ul
|
|
68
69
|
className={clsx(
|
|
69
|
-
// "mb-2",
|
|
70
70
|
marginBetween
|
|
71
71
|
? orientation === "vertical"
|
|
72
72
|
? "mb-0"
|
|
@@ -77,31 +77,24 @@ export const HawaTabs: React.FunctionComponent<TabsTypes> = ({
|
|
|
77
77
|
: "mr-" + marginBetween,
|
|
78
78
|
tabsStyle[orientation],
|
|
79
79
|
"border-buttonPrimary-500",
|
|
80
|
+
|
|
80
81
|
orientation === "vertical"
|
|
81
82
|
? direction === "rtl"
|
|
82
83
|
? "rounded-none rounded-r border-l-2"
|
|
83
84
|
: "rounded-none rounded-l border-r-2"
|
|
84
85
|
: "border-b-2",
|
|
85
|
-
widthStyles[width]
|
|
86
|
+
widthStyles[width],
|
|
87
|
+
// "bg-red-400",
|
|
88
|
+
pill ? "overflow-clip rounded border-none" : ""
|
|
86
89
|
)}
|
|
87
90
|
>
|
|
88
|
-
{/*
|
|
89
|
-
if selected option
|
|
90
|
-
if vertical
|
|
91
|
-
if rtl
|
|
92
|
-
border left
|
|
93
|
-
else
|
|
94
|
-
border right
|
|
95
|
-
else
|
|
96
|
-
border bottom
|
|
97
|
-
*/}
|
|
98
91
|
{props.options?.map((opt: any, o) => (
|
|
99
92
|
<li key={o}>
|
|
100
93
|
<button
|
|
101
94
|
aria-current="page"
|
|
102
95
|
onClick={() => {
|
|
103
96
|
setSelectedOption(opt.value)
|
|
104
|
-
|
|
97
|
+
props.onChangeTab(opt)
|
|
105
98
|
}}
|
|
106
99
|
className={clsx(
|
|
107
100
|
opt.value === selectedOption
|
|
@@ -111,7 +104,8 @@ export const HawaTabs: React.FunctionComponent<TabsTypes> = ({
|
|
|
111
104
|
direction === "rtl" ? "rounded-r" : "rounded-l",
|
|
112
105
|
]
|
|
113
106
|
: inactiveTabStyle[orientation],
|
|
114
|
-
"w-full
|
|
107
|
+
"w-full transition-all",
|
|
108
|
+
pill ? "rounded bg-green-400" : ""
|
|
115
109
|
// direction === "rtl" ? "bg-yellow-400" : "bg-yellow-400"
|
|
116
110
|
)}
|
|
117
111
|
>
|
|
@@ -44,7 +44,6 @@ export const HawaTextField: React.FunctionComponent<TextFieldTypes> = ({
|
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<div
|
|
47
|
-
// ref={props.ref}
|
|
48
47
|
className={clsx(defaultStyle, marginStyles[margin], widthStyles[width])}
|
|
49
48
|
>
|
|
50
49
|
{props.label && (
|
|
@@ -84,7 +83,6 @@ export const HawaTextField: React.FunctionComponent<TextFieldTypes> = ({
|
|
|
84
83
|
|
|
85
84
|
{props.helperText && (
|
|
86
85
|
<p className="mb-0 mt-1 text-xs text-red-600 dark:text-red-500">
|
|
87
|
-
{/* <span className="font-medium">Oh, snapp!</span> */}
|
|
88
86
|
{props.helperText}
|
|
89
87
|
</p>
|
|
90
88
|
)}
|
|
@@ -25,9 +25,7 @@ type InvoiceAccordionTypes = {
|
|
|
25
25
|
invoiceActions?: {
|
|
26
26
|
icon?: JSX.Element
|
|
27
27
|
label: string
|
|
28
|
-
action?: (
|
|
29
|
-
e: any
|
|
30
|
-
) => void
|
|
28
|
+
action?: (e: any) => void
|
|
31
29
|
isButton?: boolean
|
|
32
30
|
element?: any
|
|
33
31
|
}[][]
|
|
@@ -78,9 +76,7 @@ export const InvoiceAccordion: React.FunctionComponent<
|
|
|
78
76
|
<div className="flex w-full flex-col gap-0 ">
|
|
79
77
|
<div className="flex flex-row items-center gap-2">
|
|
80
78
|
<span className="bg-white-200">{props.invoiceTitle}</span>
|
|
81
|
-
{props.status &&
|
|
82
|
-
<HawaChip size="small" label={props.status} />
|
|
83
|
-
)}{" "}
|
|
79
|
+
{props.status && <HawaChip size="small" label={props.status} />}
|
|
84
80
|
</div>
|
|
85
81
|
<div className="font-sm text-gray-400">{props.invoiceSubtitle}</div>
|
|
86
82
|
</div>
|
|
@@ -89,7 +85,6 @@ export const InvoiceAccordion: React.FunctionComponent<
|
|
|
89
85
|
<HawaMenu
|
|
90
86
|
direction={direction}
|
|
91
87
|
position={direction === "rtl" ? "bottom-right" : "bottom-left"}
|
|
92
|
-
// menuItems={[[{ label: "Download PDF" }]]}
|
|
93
88
|
menuItems={props.invoiceActions}
|
|
94
89
|
>
|
|
95
90
|
<div className=" p-2">
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
|
|
3
|
-
// const useStyles = makeStyles((theme) => ({
|
|
4
|
-
// panelsContainer: {
|
|
5
|
-
// height: "100%",
|
|
6
|
-
// width: "100%"
|
|
7
|
-
// },
|
|
8
|
-
// panel: {
|
|
9
|
-
// backgroundColor: "var(--lightGrey)",
|
|
10
|
-
// height: "100%",
|
|
11
|
-
// width: "100%",
|
|
12
|
-
// padding: 10
|
|
13
|
-
// }
|
|
14
|
-
// }));
|
|
15
|
-
|
|
16
3
|
type TabPanelTypes = {
|
|
17
4
|
children: any
|
|
18
5
|
value: any
|
package/src/styles.css
CHANGED
|
@@ -693,10 +693,6 @@ video {
|
|
|
693
693
|
margin-top: 1rem;
|
|
694
694
|
margin-bottom: 1rem;
|
|
695
695
|
}
|
|
696
|
-
.my-7 {
|
|
697
|
-
margin-top: 1.75rem;
|
|
698
|
-
margin-bottom: 1.75rem;
|
|
699
|
-
}
|
|
700
696
|
.-mb-px {
|
|
701
697
|
margin-bottom: -1px;
|
|
702
698
|
}
|
|
@@ -808,9 +804,6 @@ video {
|
|
|
808
804
|
.grid {
|
|
809
805
|
display: grid;
|
|
810
806
|
}
|
|
811
|
-
.contents {
|
|
812
|
-
display: contents;
|
|
813
|
-
}
|
|
814
807
|
.hidden {
|
|
815
808
|
display: none;
|
|
816
809
|
}
|
|
@@ -983,6 +976,10 @@ video {
|
|
|
983
976
|
.min-w-\[24px\] {
|
|
984
977
|
min-width: 24px;
|
|
985
978
|
}
|
|
979
|
+
.min-w-fit {
|
|
980
|
+
min-width: -moz-fit-content;
|
|
981
|
+
min-width: fit-content;
|
|
982
|
+
}
|
|
986
983
|
.min-w-full {
|
|
987
984
|
min-width: 100%;
|
|
988
985
|
}
|
|
@@ -1427,10 +1424,6 @@ video {
|
|
|
1427
1424
|
--tw-border-opacity: 1;
|
|
1428
1425
|
border-top-color: rgb(255 255 255 / var(--tw-border-opacity));
|
|
1429
1426
|
}
|
|
1430
|
-
.bg-\[\#c92424\] {
|
|
1431
|
-
--tw-bg-opacity: 1;
|
|
1432
|
-
background-color: rgb(201 36 36 / var(--tw-bg-opacity));
|
|
1433
|
-
}
|
|
1434
1427
|
.bg-blue-100 {
|
|
1435
1428
|
--tw-bg-opacity: 1;
|
|
1436
1429
|
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
|
@@ -1485,6 +1478,10 @@ video {
|
|
|
1485
1478
|
--tw-bg-opacity: 1;
|
|
1486
1479
|
background-color: rgb(220 252 231 / var(--tw-bg-opacity));
|
|
1487
1480
|
}
|
|
1481
|
+
.bg-green-400 {
|
|
1482
|
+
--tw-bg-opacity: 1;
|
|
1483
|
+
background-color: rgb(74 222 128 / var(--tw-bg-opacity));
|
|
1484
|
+
}
|
|
1488
1485
|
.bg-green-500 {
|
|
1489
1486
|
--tw-bg-opacity: 1;
|
|
1490
1487
|
background-color: rgb(34 197 94 / var(--tw-bg-opacity));
|