@sikka/hawa 0.1.3 → 0.1.5
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 +80 -32
- package/es/elements/HawaAlert.d.ts +1 -1
- package/es/elements/Tooltip.d.ts +12 -0
- package/es/index.es.js +3 -3
- package/lib/elements/HawaAlert.d.ts +1 -1
- package/lib/elements/Tooltip.d.ts +12 -0
- package/lib/index.js +3 -3
- package/package.json +2 -1
- package/src/blocks/AuthForms/CodeConfirmation.tsx +1 -1
- package/src/blocks/AuthForms/ResetPasswordForm.tsx +1 -1
- package/src/blocks/AuthForms/SignInForm.tsx +1 -1
- package/src/blocks/AuthForms/SignUpForm.tsx +2 -2
- package/src/blocks/Misc/NotFound.tsx +6 -1
- package/src/blocks/Misc/Testimonial.tsx +29 -26
- package/src/blocks/Payment/ChargeWalletForm.tsx +15 -19
- package/src/blocks/Payment/Confirmation.tsx +1 -1
- package/src/blocks/Pricing/ComparingPlans.tsx +4 -6
- package/src/blocks/Referral/ReferralSettlement.tsx +12 -35
- package/src/elements/Breadcrumb.tsx +1 -1
- package/src/elements/Button.tsx +6 -3
- package/src/elements/DragDropImages.tsx +2 -2
- package/src/elements/HawaAlert.tsx +12 -5
- package/src/elements/HawaButton.tsx +3 -3
- package/src/elements/HawaCodeBlock.tsx +10 -7
- package/src/elements/HawaLoading.tsx +5 -8
- package/src/elements/HawaPhoneInput.tsx +1 -1
- package/src/elements/HawaPricingCard.tsx +15 -17
- package/src/elements/HawaSelect.tsx +1 -1
- package/src/elements/HawaStepper.tsx +4 -4
- package/src/elements/HawaTabs.tsx +8 -8
- package/src/elements/SubsectionList.tsx +1 -1
- package/src/elements/Tooltip.tsx +179 -0
- package/src/elements/UsageCard.tsx +4 -4
- package/src/styles.css +80 -32
- package/src/tailwind.css +6 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
2
|
import React, { FC } from "react"
|
|
3
3
|
import { HawaButton } from "./HawaButton"
|
|
4
|
+
import { Button } from "./Button"
|
|
4
5
|
|
|
5
6
|
// TODO: if feature.excluded is false, show gray and x
|
|
6
7
|
// TODO: add badge to feature if soon
|
|
@@ -31,27 +32,25 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
31
32
|
let isArabic = direction === "rtl"
|
|
32
33
|
let cardSizes = {
|
|
33
34
|
small:
|
|
34
|
-
"mx-1 w-full max-w-sm rounded border dark:border-gray-700
|
|
35
|
+
"mx-1 w-full max-w-sm rounded border dark:border-gray-700 bg-background ",
|
|
35
36
|
medium:
|
|
36
|
-
"mx-1 w-full rounded min-w-fit border dark:border-gray-700
|
|
37
|
+
"mx-1 w-full rounded min-w-fit border dark:border-gray-700 bg-background ",
|
|
37
38
|
large:
|
|
38
|
-
"mx-1 w-full max-w-lg rounded border dark:border-gray-700
|
|
39
|
+
"mx-1 w-full max-w-lg rounded border dark:border-gray-700 bg-background ",
|
|
39
40
|
}
|
|
40
41
|
return (
|
|
41
42
|
<div
|
|
42
43
|
dir={isArabic ? "rtl" : "ltr"}
|
|
43
44
|
className={clsx(
|
|
44
|
-
currentPlan
|
|
45
|
-
? "border-buttonPrimary-500 bg-layoutPrimary-500"
|
|
46
|
-
: "bg-white",
|
|
45
|
+
currentPlan ? "border-primary" : "bg-background",
|
|
47
46
|
cardSizes[size],
|
|
48
47
|
"flex flex-col gap-4 rounded border-2 p-4"
|
|
49
48
|
)}
|
|
50
49
|
>
|
|
51
|
-
<h5 className="text-md 0 font-bold text-
|
|
50
|
+
<h5 className="text-md 0 font-bold text-primary/70">
|
|
52
51
|
{props.texts.title}
|
|
53
52
|
</h5>
|
|
54
|
-
<div className=" flex
|
|
53
|
+
<div className=" text-primary/ flex items-baseline">
|
|
55
54
|
<>
|
|
56
55
|
<span className="text-5xl font-extrabold tracking-tight">
|
|
57
56
|
{props.price}
|
|
@@ -60,11 +59,11 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
60
59
|
{props.texts.currencyText}
|
|
61
60
|
</span>
|
|
62
61
|
</>
|
|
63
|
-
<span className="ml-1 text-xl font-normal text-
|
|
62
|
+
<span className="ml-1 text-xl font-normal text-primary/70">
|
|
64
63
|
/ {props.texts.cycleText}
|
|
65
64
|
</span>
|
|
66
65
|
</div>
|
|
67
|
-
<h5 className="text-md font-normal text-
|
|
66
|
+
<h5 className="text-md font-normal text-primary/70">
|
|
68
67
|
{props.texts.subtitle}
|
|
69
68
|
</h5>
|
|
70
69
|
|
|
@@ -74,19 +73,19 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
74
73
|
return (
|
|
75
74
|
<li key={o} className="flex ">
|
|
76
75
|
<svg
|
|
76
|
+
aria-label="Check Icon"
|
|
77
77
|
aria-hidden="true"
|
|
78
|
-
className="m-2 h-5 w-5 flex-shrink-0 text-
|
|
78
|
+
className="m-2 h-5 w-5 flex-shrink-0 text-primary"
|
|
79
79
|
fill="currentColor"
|
|
80
80
|
viewBox="0 0 20 20"
|
|
81
81
|
>
|
|
82
|
-
<title>Check icon</title>
|
|
83
82
|
<path
|
|
84
83
|
fillRule="evenodd"
|
|
85
84
|
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"
|
|
86
85
|
clipRule="evenodd"
|
|
87
86
|
></path>
|
|
88
87
|
</svg>
|
|
89
|
-
<span className="flex items-center text-center font-normal leading-tight text-
|
|
88
|
+
<span className="flex items-center text-center font-normal leading-tight text-primary/70 ">
|
|
90
89
|
{feature.text}
|
|
91
90
|
</span>
|
|
92
91
|
</li>
|
|
@@ -94,14 +93,13 @@ export const HawaPricingCard: FC<PricingCardTypes> = ({
|
|
|
94
93
|
})}
|
|
95
94
|
</ul>
|
|
96
95
|
)}
|
|
97
|
-
<
|
|
96
|
+
<Button
|
|
98
97
|
onClick={props.onPlanClicked}
|
|
99
|
-
margins="none"
|
|
100
98
|
disabled={currentPlan}
|
|
101
|
-
|
|
99
|
+
className="w-full"
|
|
102
100
|
>
|
|
103
101
|
{props.texts.buttonText}
|
|
104
|
-
</
|
|
102
|
+
</Button>
|
|
105
103
|
</div>
|
|
106
104
|
)
|
|
107
105
|
}
|
|
@@ -87,7 +87,7 @@ const Option: FC<OptionTypes> = ({
|
|
|
87
87
|
}) => (
|
|
88
88
|
<div
|
|
89
89
|
ref={innerRef}
|
|
90
|
-
className="flex flex-row items-center justify-between rounded-inner p-1 px-2 hover:
|
|
90
|
+
className="flex flex-row items-center justify-between rounded-inner p-1 px-2 hover:text-primary-foreground hover:bg-primary"
|
|
91
91
|
{...innerProps}
|
|
92
92
|
>
|
|
93
93
|
{children}
|
|
@@ -45,17 +45,17 @@ export const HawaStepper: FC<THawaTimeline> = ({
|
|
|
45
45
|
{/* Icon */}
|
|
46
46
|
<div
|
|
47
47
|
className={clsx(
|
|
48
|
-
"
|
|
48
|
+
"flex h-6 w-6 min-w-[24px] items-center justify-center rounded ring-2 ring-primary/20 ring-offset-2",
|
|
49
49
|
i + 1 <= props.currentStep
|
|
50
|
-
? "bg-
|
|
51
|
-
: "bg-
|
|
50
|
+
? "bg-primary text-primary-foreground "
|
|
51
|
+
: "bg-primary/20"
|
|
52
52
|
)}
|
|
53
53
|
>
|
|
54
54
|
{i + 1 <= props.currentStep ? (
|
|
55
55
|
<svg
|
|
56
56
|
aria-label="Check Mark"
|
|
57
57
|
stroke="currentColor"
|
|
58
|
-
fill="
|
|
58
|
+
fill="currentColor"
|
|
59
59
|
stroke-width="0"
|
|
60
60
|
viewBox="0 0 512 512"
|
|
61
61
|
height="0.60em"
|
|
@@ -24,8 +24,8 @@ export const HawaTabs: FC<TabsTypes> = ({
|
|
|
24
24
|
const [selectedOption, setSelectedOption] = useState(props.options[0]?.value)
|
|
25
25
|
|
|
26
26
|
let activeTabStyle = {
|
|
27
|
-
vertical: "inline-block py-2 px-4 text-white bg-
|
|
28
|
-
horizontal: "inline-block py-2 px-4 text-white bg-
|
|
27
|
+
vertical: "inline-block py-2 px-4 text-white bg-primary active",
|
|
28
|
+
horizontal: "inline-block py-2 px-4 text-white bg-primary active",
|
|
29
29
|
}
|
|
30
30
|
// rounded rounded-br-none rounded-bl-none
|
|
31
31
|
let inactiveTabStyle = {
|
|
@@ -42,11 +42,11 @@ export const HawaTabs: FC<TabsTypes> = ({
|
|
|
42
42
|
let orientationStyle = {
|
|
43
43
|
vertical: {
|
|
44
44
|
container: "flex flex-row",
|
|
45
|
-
tabs: "flex flex-col w-fit flex-wrap rounded border-b-
|
|
45
|
+
tabs: "flex flex-col w-fit flex-wrap rounded border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400",
|
|
46
46
|
},
|
|
47
47
|
horizontal: {
|
|
48
48
|
container: "",
|
|
49
|
-
tabs: "flex w-fit flex-wrap rounded rounded-br-none rounded-bl-none border-b-
|
|
49
|
+
tabs: "flex w-fit flex-wrap rounded rounded-br-none rounded-bl-none border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400",
|
|
50
50
|
},
|
|
51
51
|
}
|
|
52
52
|
let containerStyle = {
|
|
@@ -55,9 +55,9 @@ export const HawaTabs: FC<TabsTypes> = ({
|
|
|
55
55
|
}
|
|
56
56
|
let tabsStyle = {
|
|
57
57
|
vertical:
|
|
58
|
-
"sticky top-2 h-fit flex flex-col w-fit flex-wrap rounded border-b-
|
|
58
|
+
"sticky top-2 h-fit flex flex-col w-fit flex-wrap rounded border-b-primary bg-gray-100 text-center text-sm font-medium text-gray-500 dark:text-gray-400",
|
|
59
59
|
horizontal:
|
|
60
|
-
"flex w-fit flex-wrap border-b-
|
|
60
|
+
"flex w-fit flex-wrap border-b-primary text-center text-sm font-medium text-gray-500 dark:text-gray-400",
|
|
61
61
|
}
|
|
62
62
|
return (
|
|
63
63
|
<div
|
|
@@ -78,7 +78,7 @@ export const HawaTabs: FC<TabsTypes> = ({
|
|
|
78
78
|
? "ml-" + marginBetween
|
|
79
79
|
: "mr-" + marginBetween,
|
|
80
80
|
tabsStyle[orientation],
|
|
81
|
-
"border-
|
|
81
|
+
"border-primary",
|
|
82
82
|
|
|
83
83
|
// orientation === "vertical"
|
|
84
84
|
// ? direction === "rtl"
|
|
@@ -104,7 +104,7 @@ export const HawaTabs: FC<TabsTypes> = ({
|
|
|
104
104
|
props?.onChangeTab(opt)
|
|
105
105
|
}}
|
|
106
106
|
className={clsx(
|
|
107
|
-
"flex flex-row gap-2
|
|
107
|
+
"flex flex-row items-center gap-2",
|
|
108
108
|
opt.value === selectedOption
|
|
109
109
|
? // props.options[selectedOption].value === opt.value
|
|
110
110
|
[
|
|
@@ -64,7 +64,7 @@ const SubsectionItem: FC<TSubsectionItem> = ({
|
|
|
64
64
|
className={clsx(
|
|
65
65
|
"flex w-full cursor-pointer flex-row items-center justify-between gap-2 rounded p-2 transition-all ",
|
|
66
66
|
selected === value
|
|
67
|
-
? "bg-
|
|
67
|
+
? "bg-primary text-white hover:bg-primary"
|
|
68
68
|
: "hover:bg-layoutPrimary-300"
|
|
69
69
|
)}
|
|
70
70
|
>
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// "use client"
|
|
2
|
+
|
|
3
|
+
// import * as React from "react"
|
|
4
|
+
// import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../util"
|
|
7
|
+
|
|
8
|
+
// const TooltipProvider = TooltipPrimitive.Provider
|
|
9
|
+
|
|
10
|
+
// const TooltipRoot = TooltipPrimitive.Root
|
|
11
|
+
|
|
12
|
+
// const TooltipTrigger = TooltipPrimitive.Trigger
|
|
13
|
+
|
|
14
|
+
// const TooltipContent = React.forwardRef<
|
|
15
|
+
// React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
+
// React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
|
+
// >(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
+
// <TooltipPrimitive.Content
|
|
19
|
+
// ref={ref}
|
|
20
|
+
// sideOffset={sideOffset}
|
|
21
|
+
// className={cn(
|
|
22
|
+
// "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
23
|
+
// className
|
|
24
|
+
// )}
|
|
25
|
+
// {...props}
|
|
26
|
+
// />
|
|
27
|
+
// ))
|
|
28
|
+
// TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
29
|
+
|
|
30
|
+
// interface TooltipProps {
|
|
31
|
+
// // TooltipProvider props
|
|
32
|
+
// delayDurationProvider?: number
|
|
33
|
+
// skipDelayDuration?: number
|
|
34
|
+
// disableHoverableContentProvider?: boolean
|
|
35
|
+
|
|
36
|
+
// // TooltipRoot props
|
|
37
|
+
// defaultOpen?: boolean
|
|
38
|
+
// open?: boolean
|
|
39
|
+
// onOpenChange?: (open: boolean) => void
|
|
40
|
+
// delayDurationRoot?: number
|
|
41
|
+
// disableHoverableContentRoot?: boolean
|
|
42
|
+
|
|
43
|
+
// // TooltipContent props
|
|
44
|
+
// content: React.ReactNode
|
|
45
|
+
// asChild?: boolean
|
|
46
|
+
// ariaLabel?: string
|
|
47
|
+
// onEscapeKeyDown?: () => void
|
|
48
|
+
// onPointerDownOutside?: (event: MouseEvent | TouchEvent) => void
|
|
49
|
+
// forceMount?: boolean
|
|
50
|
+
// side?: "top" | "right" | "bottom" | "left"
|
|
51
|
+
// sideOffset?: number
|
|
52
|
+
// align?: "start" | "center" | "end"
|
|
53
|
+
// alignOffset?: number
|
|
54
|
+
// avoidCollisions?: boolean
|
|
55
|
+
// collisionBoundary?: Element | Element[];
|
|
56
|
+
// collisionPadding?: number
|
|
57
|
+
// arrowPadding?: number
|
|
58
|
+
// sticky?: "partial" | "always";
|
|
59
|
+
// hideWhenDetached?: boolean
|
|
60
|
+
|
|
61
|
+
// children: React.ReactNode
|
|
62
|
+
// }
|
|
63
|
+
|
|
64
|
+
// const Tooltip: React.FC<TooltipProps> = (props) => {
|
|
65
|
+
// const { content, children, ...rest } = props
|
|
66
|
+
// return (
|
|
67
|
+
// <TooltipProvider
|
|
68
|
+
// delayDuration={props.delayDurationProvider}
|
|
69
|
+
// skipDelayDuration={props.skipDelayDuration}
|
|
70
|
+
// disableHoverableContent={props.disableHoverableContentProvider}
|
|
71
|
+
// >
|
|
72
|
+
// <TooltipRoot
|
|
73
|
+
// defaultOpen={props.defaultOpen}
|
|
74
|
+
// open={props.open}
|
|
75
|
+
// onOpenChange={props.onOpenChange}
|
|
76
|
+
// delayDuration={props.delayDurationRoot}
|
|
77
|
+
// disableHoverableContent={props.disableHoverableContentRoot}
|
|
78
|
+
// >
|
|
79
|
+
// <TooltipTrigger asChild>{children}</TooltipTrigger>
|
|
80
|
+
// <TooltipContent
|
|
81
|
+
// asChild={props.asChild}
|
|
82
|
+
// aria-label={props.ariaLabel}
|
|
83
|
+
// onEscapeKeyDown={props.onEscapeKeyDown}
|
|
84
|
+
// onPointerDownOutside={props.onPointerDownOutside}
|
|
85
|
+
// // forceMount={props.forceMount}
|
|
86
|
+
// side={props.side}
|
|
87
|
+
|
|
88
|
+
// sideOffset={props.sideOffset}
|
|
89
|
+
// align={props.align}
|
|
90
|
+
// alignOffset={props.alignOffset}
|
|
91
|
+
// avoidCollisions={props.avoidCollisions}
|
|
92
|
+
// collisionBoundary={props.collisionBoundary}
|
|
93
|
+
// collisionPadding={props.collisionPadding}
|
|
94
|
+
// arrowPadding={props.arrowPadding}
|
|
95
|
+
// sticky={props.sticky}
|
|
96
|
+
// hideWhenDetached={props.hideWhenDetached}
|
|
97
|
+
// {...rest}
|
|
98
|
+
// >
|
|
99
|
+
// {content}
|
|
100
|
+
// </TooltipContent>
|
|
101
|
+
// </TooltipRoot>
|
|
102
|
+
// </TooltipProvider>
|
|
103
|
+
// )
|
|
104
|
+
// }
|
|
105
|
+
|
|
106
|
+
// your-tooltip.jsx
|
|
107
|
+
import React from "react"
|
|
108
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
109
|
+
|
|
110
|
+
const TooltipContent = React.forwardRef<
|
|
111
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
112
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
113
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
114
|
+
<TooltipPrimitive.Content
|
|
115
|
+
ref={ref}
|
|
116
|
+
sideOffset={sideOffset}
|
|
117
|
+
className={cn(
|
|
118
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
119
|
+
className
|
|
120
|
+
)}
|
|
121
|
+
{...props}
|
|
122
|
+
/>
|
|
123
|
+
))
|
|
124
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
125
|
+
|
|
126
|
+
const TooltipArrow = React.forwardRef<
|
|
127
|
+
React.ElementRef<typeof TooltipPrimitive.Arrow>,
|
|
128
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>
|
|
129
|
+
>(({ className, ...props }, ref) => (
|
|
130
|
+
<TooltipPrimitive.Arrow
|
|
131
|
+
ref={ref}
|
|
132
|
+
className={cn(
|
|
133
|
+
// "bg-popover",
|
|
134
|
+
"bg-red-500 text-blue-500 ",
|
|
135
|
+
// "z-50 overflow-hidden rounded-md border bg-popover text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
136
|
+
className
|
|
137
|
+
)}
|
|
138
|
+
{...props}
|
|
139
|
+
/>
|
|
140
|
+
))
|
|
141
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName
|
|
142
|
+
|
|
143
|
+
type TooltipTypes = {
|
|
144
|
+
side?: "top" | "right" | "bottom" | "left"
|
|
145
|
+
children?: any
|
|
146
|
+
content?: any
|
|
147
|
+
open?: any
|
|
148
|
+
defaultOpen?: any
|
|
149
|
+
onOpenChange?: any
|
|
150
|
+
delayDuration?: any
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export const Tooltip: React.FunctionComponent<TooltipTypes> = ({
|
|
154
|
+
children,
|
|
155
|
+
content,
|
|
156
|
+
open,
|
|
157
|
+
defaultOpen,
|
|
158
|
+
onOpenChange,
|
|
159
|
+
delayDuration = 300,
|
|
160
|
+
side,
|
|
161
|
+
...props
|
|
162
|
+
}) => {
|
|
163
|
+
return (
|
|
164
|
+
<TooltipPrimitive.TooltipProvider delayDuration={delayDuration}>
|
|
165
|
+
<TooltipPrimitive.Root
|
|
166
|
+
open={open}
|
|
167
|
+
defaultOpen={defaultOpen}
|
|
168
|
+
onOpenChange={onOpenChange}
|
|
169
|
+
>
|
|
170
|
+
<TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>
|
|
171
|
+
<TooltipContent side={side} align="center" {...props}>
|
|
172
|
+
{content}
|
|
173
|
+
{/* <TooltipArrow width={21} height={5} /> */}
|
|
174
|
+
</TooltipContent>
|
|
175
|
+
</TooltipPrimitive.Root>
|
|
176
|
+
</TooltipPrimitive.TooltipProvider>
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
// export { Tooltip, TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from "react"
|
|
2
|
-
import {
|
|
2
|
+
import { Tooltip } from "./Tooltip"
|
|
3
3
|
|
|
4
4
|
type UsageCardTypes = {
|
|
5
5
|
tooltip?: any
|
|
@@ -13,7 +13,7 @@ export const UsageCard: FC<UsageCardTypes> = (props) => {
|
|
|
13
13
|
<div className="flex flex-row items-center gap-2">
|
|
14
14
|
<span className="bg-white-200">{props.title}</span>
|
|
15
15
|
{props.tooltip && (
|
|
16
|
-
<
|
|
16
|
+
<Tooltip content={props.tooltip} side="right">
|
|
17
17
|
<svg
|
|
18
18
|
stroke="currentColor"
|
|
19
19
|
aria-label="Exclamation Circle"
|
|
@@ -25,7 +25,7 @@ export const UsageCard: FC<UsageCardTypes> = (props) => {
|
|
|
25
25
|
>
|
|
26
26
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path>
|
|
27
27
|
</svg>
|
|
28
|
-
</
|
|
28
|
+
</Tooltip>
|
|
29
29
|
)}
|
|
30
30
|
</div>
|
|
31
31
|
<div className="bg-white-100 flex flex-row">
|
|
@@ -34,7 +34,7 @@ export const UsageCard: FC<UsageCardTypes> = (props) => {
|
|
|
34
34
|
</div>
|
|
35
35
|
<div className="mt-2 h-2.5 w-full rounded-full bg-gray-200 dark:bg-gray-700">
|
|
36
36
|
<div
|
|
37
|
-
className="h-2.5 rounded-full bg-
|
|
37
|
+
className="h-2.5 rounded-full bg-primary"
|
|
38
38
|
style={{
|
|
39
39
|
width: `${props.percent ?? 0}%`,
|
|
40
40
|
}}
|
package/src/styles.css
CHANGED
|
@@ -405,7 +405,7 @@ video {
|
|
|
405
405
|
--border: 240 5.9% 90%;
|
|
406
406
|
--input: 240 5.9% 90%;
|
|
407
407
|
--ring: 240 5% 64.9%;
|
|
408
|
-
--radius:
|
|
408
|
+
--radius: 0.5rem;
|
|
409
409
|
--radius-inner: calc(var(--radius) - calc(var(--radius) / 3));
|
|
410
410
|
|
|
411
411
|
--layout-primary-700: #b7aff7;
|
|
@@ -651,6 +651,19 @@ video {
|
|
|
651
651
|
max-width: 1400px;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
+
.clickable-link {
|
|
655
|
+
cursor: pointer;
|
|
656
|
+
color: hsl(var(--primary) / 0.8);
|
|
657
|
+
-webkit-text-decoration-line: underline;
|
|
658
|
+
text-decoration-line: underline;
|
|
659
|
+
text-underline-offset: 4px;
|
|
660
|
+
transition-property: all;
|
|
661
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
662
|
+
transition-duration: 150ms;
|
|
663
|
+
}
|
|
664
|
+
.clickable-link:hover {
|
|
665
|
+
color: hsl(var(--primary));
|
|
666
|
+
}
|
|
654
667
|
.sr-only {
|
|
655
668
|
position: absolute;
|
|
656
669
|
width: 1px;
|
|
@@ -1752,12 +1765,6 @@ video {
|
|
|
1752
1765
|
--tw-border-opacity: 1;
|
|
1753
1766
|
border-color: rgb(37 99 235 / var(--tw-border-opacity));
|
|
1754
1767
|
}
|
|
1755
|
-
.border-buttonPrimary-500 {
|
|
1756
|
-
border-color: hsl(var(--button-primary-500));
|
|
1757
|
-
}
|
|
1758
|
-
.border-buttonPrimary-700 {
|
|
1759
|
-
border-color: hsl(var(--button-primary-700));
|
|
1760
|
-
}
|
|
1761
1768
|
.border-gray-100 {
|
|
1762
1769
|
--tw-border-opacity: 1;
|
|
1763
1770
|
border-color: rgb(243 244 246 / var(--tw-border-opacity));
|
|
@@ -1785,6 +1792,9 @@ video {
|
|
|
1785
1792
|
.border-input {
|
|
1786
1793
|
border-color: hsl(var(--input));
|
|
1787
1794
|
}
|
|
1795
|
+
.border-primary {
|
|
1796
|
+
border-color: hsl(var(--primary));
|
|
1797
|
+
}
|
|
1788
1798
|
.border-red-300 {
|
|
1789
1799
|
--tw-border-opacity: 1;
|
|
1790
1800
|
border-color: rgb(252 165 165 / var(--tw-border-opacity));
|
|
@@ -1800,8 +1810,8 @@ video {
|
|
|
1800
1810
|
--tw-border-opacity: 1;
|
|
1801
1811
|
border-color: rgb(253 224 71 / var(--tw-border-opacity));
|
|
1802
1812
|
}
|
|
1803
|
-
.border-b-
|
|
1804
|
-
border-bottom-color: hsl(var(--
|
|
1813
|
+
.border-b-primary {
|
|
1814
|
+
border-bottom-color: hsl(var(--primary));
|
|
1805
1815
|
}
|
|
1806
1816
|
.bg-background {
|
|
1807
1817
|
background-color: hsl(var(--background));
|
|
@@ -1908,12 +1918,18 @@ video {
|
|
|
1908
1918
|
--tw-bg-opacity: 1;
|
|
1909
1919
|
background-color: rgb(251 146 60 / var(--tw-bg-opacity));
|
|
1910
1920
|
}
|
|
1921
|
+
.bg-popover {
|
|
1922
|
+
background-color: hsl(var(--popover));
|
|
1923
|
+
}
|
|
1911
1924
|
.bg-primary {
|
|
1912
1925
|
background-color: hsl(var(--primary));
|
|
1913
1926
|
}
|
|
1914
1927
|
.bg-primary-foreground {
|
|
1915
1928
|
background-color: hsl(var(--primary-foreground));
|
|
1916
1929
|
}
|
|
1930
|
+
.bg-primary\/20 {
|
|
1931
|
+
background-color: hsl(var(--primary) / 0.2);
|
|
1932
|
+
}
|
|
1917
1933
|
.bg-red-100 {
|
|
1918
1934
|
--tw-bg-opacity: 1;
|
|
1919
1935
|
background-color: rgb(254 226 226 / var(--tw-bg-opacity));
|
|
@@ -1981,11 +1997,11 @@ video {
|
|
|
1981
1997
|
.bg-none {
|
|
1982
1998
|
background-image: none;
|
|
1983
1999
|
}
|
|
1984
|
-
.fill-
|
|
1985
|
-
fill: hsl(var(--
|
|
2000
|
+
.fill-primary {
|
|
2001
|
+
fill: hsl(var(--primary));
|
|
1986
2002
|
}
|
|
1987
|
-
.fill-
|
|
1988
|
-
fill:
|
|
2003
|
+
.fill-primary\/20 {
|
|
2004
|
+
fill: hsl(var(--primary) / 0.2);
|
|
1989
2005
|
}
|
|
1990
2006
|
.fill-white {
|
|
1991
2007
|
fill: #fff;
|
|
@@ -2304,9 +2320,6 @@ video {
|
|
|
2304
2320
|
--tw-text-opacity: 1;
|
|
2305
2321
|
color: rgb(30 64 175 / var(--tw-text-opacity));
|
|
2306
2322
|
}
|
|
2307
|
-
.text-buttonPrimary-500 {
|
|
2308
|
-
color: hsl(var(--button-primary-500));
|
|
2309
|
-
}
|
|
2310
2323
|
.text-card-foreground {
|
|
2311
2324
|
color: hsl(var(--card-foreground));
|
|
2312
2325
|
}
|
|
@@ -2372,12 +2385,18 @@ video {
|
|
|
2372
2385
|
--tw-text-opacity: 1;
|
|
2373
2386
|
color: rgb(23 23 23 / var(--tw-text-opacity));
|
|
2374
2387
|
}
|
|
2388
|
+
.text-popover-foreground {
|
|
2389
|
+
color: hsl(var(--popover-foreground));
|
|
2390
|
+
}
|
|
2375
2391
|
.text-primary {
|
|
2376
2392
|
color: hsl(var(--primary));
|
|
2377
2393
|
}
|
|
2378
2394
|
.text-primary-foreground {
|
|
2379
2395
|
color: hsl(var(--primary-foreground));
|
|
2380
2396
|
}
|
|
2397
|
+
.text-primary\/70 {
|
|
2398
|
+
color: hsl(var(--primary) / 0.7);
|
|
2399
|
+
}
|
|
2381
2400
|
.text-red-500 {
|
|
2382
2401
|
--tw-text-opacity: 1;
|
|
2383
2402
|
color: rgb(239 68 68 / var(--tw-text-opacity));
|
|
@@ -2503,6 +2522,9 @@ video {
|
|
|
2503
2522
|
.ring-buttonPrimary-500 {
|
|
2504
2523
|
--tw-ring-color: hsl(var(--button-primary-500));
|
|
2505
2524
|
}
|
|
2525
|
+
.ring-primary\/20 {
|
|
2526
|
+
--tw-ring-color: hsl(var(--primary) / 0.2);
|
|
2527
|
+
}
|
|
2506
2528
|
.ring-offset-1 {
|
|
2507
2529
|
--tw-ring-offset-width: 1px;
|
|
2508
2530
|
}
|
|
@@ -2586,6 +2608,12 @@ video {
|
|
|
2586
2608
|
.fade-in {
|
|
2587
2609
|
--tw-enter-opacity: 0;
|
|
2588
2610
|
}
|
|
2611
|
+
.fade-in-0 {
|
|
2612
|
+
--tw-enter-opacity: 0;
|
|
2613
|
+
}
|
|
2614
|
+
.zoom-in-95 {
|
|
2615
|
+
--tw-enter-scale: .95;
|
|
2616
|
+
}
|
|
2589
2617
|
.duration-1000 {
|
|
2590
2618
|
animation-duration: 1000ms;
|
|
2591
2619
|
}
|
|
@@ -2747,12 +2775,6 @@ body {
|
|
|
2747
2775
|
.hover\:bg-buttonPrimary-500:hover {
|
|
2748
2776
|
background-color: hsl(var(--button-primary-500));
|
|
2749
2777
|
}
|
|
2750
|
-
.hover\:bg-buttonPrimary-500\/30:hover {
|
|
2751
|
-
background-color: hsl(var(--button-primary-500) / 0.3);
|
|
2752
|
-
}
|
|
2753
|
-
.hover\:bg-buttonPrimary-500\/50:hover {
|
|
2754
|
-
background-color: hsl(var(--button-primary-500) / 0.5);
|
|
2755
|
-
}
|
|
2756
2778
|
.hover\:bg-buttonPrimary-700:hover {
|
|
2757
2779
|
background-color: hsl(var(--button-primary-700));
|
|
2758
2780
|
}
|
|
@@ -2799,6 +2821,9 @@ body {
|
|
|
2799
2821
|
.hover\:bg-layoutPrimary-700:hover {
|
|
2800
2822
|
background-color: var(--layout-primary-700);
|
|
2801
2823
|
}
|
|
2824
|
+
.hover\:bg-primary:hover {
|
|
2825
|
+
background-color: hsl(var(--primary));
|
|
2826
|
+
}
|
|
2802
2827
|
.hover\:bg-primary\/90:hover {
|
|
2803
2828
|
background-color: hsl(var(--primary) / 0.9);
|
|
2804
2829
|
}
|
|
@@ -2827,9 +2852,6 @@ body {
|
|
|
2827
2852
|
--tw-text-opacity: 1;
|
|
2828
2853
|
color: rgb(37 99 235 / var(--tw-text-opacity));
|
|
2829
2854
|
}
|
|
2830
|
-
.hover\:text-buttonPrimary-500:hover {
|
|
2831
|
-
color: hsl(var(--button-primary-500));
|
|
2832
|
-
}
|
|
2833
2855
|
.hover\:text-gray-400:hover {
|
|
2834
2856
|
--tw-text-opacity: 1;
|
|
2835
2857
|
color: rgb(156 163 175 / var(--tw-text-opacity));
|
|
@@ -2842,6 +2864,12 @@ body {
|
|
|
2842
2864
|
--tw-text-opacity: 1;
|
|
2843
2865
|
color: rgb(17 24 39 / var(--tw-text-opacity));
|
|
2844
2866
|
}
|
|
2867
|
+
.hover\:text-primary:hover {
|
|
2868
|
+
color: hsl(var(--primary));
|
|
2869
|
+
}
|
|
2870
|
+
.hover\:text-primary-foreground:hover {
|
|
2871
|
+
color: hsl(var(--primary-foreground));
|
|
2872
|
+
}
|
|
2845
2873
|
.hover\:text-white:hover {
|
|
2846
2874
|
--tw-text-opacity: 1;
|
|
2847
2875
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
@@ -3077,6 +3105,33 @@ body {
|
|
|
3077
3105
|
--tw-text-opacity: 1;
|
|
3078
3106
|
color: hsl(250 43.0% 48.0% / var(--tw-text-opacity));
|
|
3079
3107
|
}
|
|
3108
|
+
.data-\[state\=closed\]\:animate-out[data-state=closed] {
|
|
3109
|
+
animation-name: exit;
|
|
3110
|
+
animation-duration: 150ms;
|
|
3111
|
+
--tw-exit-opacity: initial;
|
|
3112
|
+
--tw-exit-scale: initial;
|
|
3113
|
+
--tw-exit-rotate: initial;
|
|
3114
|
+
--tw-exit-translate-x: initial;
|
|
3115
|
+
--tw-exit-translate-y: initial;
|
|
3116
|
+
}
|
|
3117
|
+
.data-\[state\=closed\]\:fade-out-0[data-state=closed] {
|
|
3118
|
+
--tw-exit-opacity: 0;
|
|
3119
|
+
}
|
|
3120
|
+
.data-\[state\=closed\]\:zoom-out-95[data-state=closed] {
|
|
3121
|
+
--tw-exit-scale: .95;
|
|
3122
|
+
}
|
|
3123
|
+
.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom] {
|
|
3124
|
+
--tw-enter-translate-y: -0.5rem;
|
|
3125
|
+
}
|
|
3126
|
+
.data-\[side\=left\]\:slide-in-from-right-2[data-side=left] {
|
|
3127
|
+
--tw-enter-translate-x: 0.5rem;
|
|
3128
|
+
}
|
|
3129
|
+
.data-\[side\=right\]\:slide-in-from-left-2[data-side=right] {
|
|
3130
|
+
--tw-enter-translate-x: -0.5rem;
|
|
3131
|
+
}
|
|
3132
|
+
.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top] {
|
|
3133
|
+
--tw-enter-translate-y: 0.5rem;
|
|
3134
|
+
}
|
|
3080
3135
|
.group[data-disabled] .group-data-\[disabled\]\:text-mauve-8 {
|
|
3081
3136
|
--tw-text-opacity: 1;
|
|
3082
3137
|
color: hsl(249 10.4% 75.5% / var(--tw-text-opacity));
|
|
@@ -3203,10 +3258,6 @@ body {
|
|
|
3203
3258
|
--tw-text-opacity: 1;
|
|
3204
3259
|
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
3205
3260
|
}
|
|
3206
|
-
:is(.dark .dark\:text-blue-400) {
|
|
3207
|
-
--tw-text-opacity: 1;
|
|
3208
|
-
color: rgb(96 165 250 / var(--tw-text-opacity));
|
|
3209
|
-
}
|
|
3210
3261
|
:is(.dark .dark\:text-blue-500) {
|
|
3211
3262
|
--tw-text-opacity: 1;
|
|
3212
3263
|
color: rgb(59 130 246 / var(--tw-text-opacity));
|
|
@@ -3281,9 +3332,6 @@ body {
|
|
|
3281
3332
|
--tw-border-opacity: 1;
|
|
3282
3333
|
border-color: rgb(55 65 81 / var(--tw-border-opacity));
|
|
3283
3334
|
}
|
|
3284
|
-
:is(.dark .dark\:hover\:bg-buttonPrimary-500\/60:hover) {
|
|
3285
|
-
background-color: hsl(var(--button-primary-500) / 0.6);
|
|
3286
|
-
}
|
|
3287
3335
|
:is(.dark .dark\:hover\:bg-buttonPrimary-700:hover) {
|
|
3288
3336
|
background-color: hsl(var(--button-primary-700));
|
|
3289
3337
|
}
|
package/src/tailwind.css
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
--border: 240 5.9% 90%;
|
|
25
25
|
--input: 240 5.9% 90%;
|
|
26
26
|
--ring: 240 5% 64.9%;
|
|
27
|
-
--radius:
|
|
27
|
+
--radius: 0.5rem;
|
|
28
28
|
--radius-inner: calc(var(--radius) - calc(var(--radius) / 3));
|
|
29
29
|
|
|
30
30
|
--layout-primary-700: #b7aff7;
|
|
@@ -163,6 +163,11 @@
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
@layer components {
|
|
167
|
+
.clickable-link {
|
|
168
|
+
@apply cursor-pointer text-primary/80 underline underline-offset-4 hover:text-primary transition-all;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
166
171
|
@layer utilities {
|
|
167
172
|
/* Chrome, Safari and Opera */
|
|
168
173
|
.no-scrollbar::-webkit-scrollbar {
|