@payglocal_ui/flux-ui 0.3.4 → 0.3.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/index.cjs +172 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -1
- package/dist/index.d.ts +53 -1
- package/dist/index.js +171 -81
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/alert.tsx +2 -1
- package/src/button-group.tsx +7 -5
- package/src/button.tsx +5 -4
- package/src/calendar.tsx +5 -2
- package/src/card.tsx +4 -1
- package/src/chart-templates.tsx +9 -7
- package/src/checkbox-select.tsx +9 -4
- package/src/checkbox.tsx +3 -1
- package/src/command.tsx +2 -1
- package/src/country-select.tsx +5 -2
- package/src/data-table.tsx +4 -2
- package/src/date-picker.tsx +9 -4
- package/src/dialog.tsx +3 -1
- package/src/drawer.tsx +2 -1
- package/src/dropdown-menu.tsx +5 -2
- package/src/elevation.ts +54 -0
- package/src/flag.tsx +3 -1
- package/src/icon-button.tsx +5 -4
- package/src/index.ts +1 -0
- package/src/inline-dialog.tsx +3 -1
- package/src/inline-edit.tsx +3 -1
- package/src/input-group.tsx +3 -1
- package/src/input.tsx +3 -1
- package/src/otp-input.tsx +3 -1
- package/src/pagination.tsx +2 -1
- package/src/popover.tsx +3 -1
- package/src/radio-group.tsx +3 -1
- package/src/section-message.tsx +3 -1
- package/src/select.tsx +5 -2
- package/src/single-select.tsx +7 -3
- package/src/skeleton.tsx +7 -1
- package/src/slider.tsx +5 -1
- package/src/sonner.tsx +2 -1
- package/src/spotlight.tsx +2 -1
- package/src/switch.tsx +3 -1
- package/src/textarea.tsx +3 -1
- package/src/time-picker.tsx +5 -2
- package/src/tooltip.tsx +3 -1
package/src/input.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { cn } from "./utils";
|
|
4
|
+
import { elevation } from "./elevation";
|
|
4
5
|
|
|
5
6
|
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
6
7
|
({ className, type, ...props }, ref) => {
|
|
@@ -8,7 +9,8 @@ const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
|
8
9
|
<input
|
|
9
10
|
type={type}
|
|
10
11
|
className={cn(
|
|
11
|
-
"flex h-11 min-h-11 w-full rounded-lg border border-border bg-card px-4 py-2 text-[15px] leading-tight
|
|
12
|
+
"flex h-11 min-h-11 w-full rounded-lg border border-border bg-card px-4 py-2 text-[15px] leading-tight transition-colors",
|
|
13
|
+
elevation.field,
|
|
12
14
|
"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
|
|
13
15
|
"placeholder:text-muted-foreground",
|
|
14
16
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
package/src/otp-input.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cn } from "./utils";
|
|
5
|
+
import { elevation } from "./elevation";
|
|
5
6
|
|
|
6
7
|
export interface OtpInputProps {
|
|
7
8
|
/** Current OTP value (controlled). */
|
|
@@ -105,7 +106,8 @@ export function OtpInput({
|
|
|
105
106
|
onKeyDown={(e) => handleKeyDown(i, e)}
|
|
106
107
|
onPaste={handlePaste}
|
|
107
108
|
className={cn(
|
|
108
|
-
"h-12 w-11 rounded-lg border bg-card text-center text-lg font-semibold text-foreground
|
|
109
|
+
"h-12 w-11 rounded-lg border bg-card text-center text-lg font-semibold text-foreground transition-colors",
|
|
110
|
+
elevation.field,
|
|
109
111
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35 focus-visible:border-primary",
|
|
110
112
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
111
113
|
invalid ? "border-destructive ring-destructive/20" : "border-input"
|
package/src/pagination.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
5
5
|
import { cn } from "./utils";
|
|
6
|
+
import { elevation } from "./elevation";
|
|
6
7
|
|
|
7
8
|
// ---------------------------------------------------------------------------
|
|
8
9
|
// Pagination (nav wrapper)
|
|
@@ -78,7 +79,7 @@ export const PaginationLink = forwardRef<HTMLAnchorElement, PaginationLinkProps>
|
|
|
78
79
|
"cursor-pointer select-none",
|
|
79
80
|
// active
|
|
80
81
|
isActive
|
|
81
|
-
?
|
|
82
|
+
? `bg-primary text-primary-foreground border-primary ${elevation.control}`
|
|
82
83
|
: "text-muted-foreground border-border hover:bg-muted hover:text-foreground",
|
|
83
84
|
className
|
|
84
85
|
)}
|
package/src/popover.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
5
|
import { cn } from "./utils";
|
|
6
|
+
import { elevation } from "./elevation";
|
|
6
7
|
import { ScrollLockTakeover } from "./scroll-lock";
|
|
7
8
|
|
|
8
9
|
const Popover = PopoverPrimitive.Root;
|
|
@@ -31,7 +32,8 @@ const PopoverContent = React.forwardRef<
|
|
|
31
32
|
// below) stops short of the fold rather than sitting flush against it.
|
|
32
33
|
collisionPadding={collisionPadding}
|
|
33
34
|
className={cn(
|
|
34
|
-
"z-[120] w-72 rounded-xl border border-border bg-popover p-4 text-popover-foreground
|
|
35
|
+
"z-[120] w-72 rounded-xl border border-border bg-popover p-4 text-popover-foreground outline-none",
|
|
36
|
+
elevation.popover,
|
|
35
37
|
"data-[state=open]:opacity-100 data-[state=closed]:opacity-0 transition-opacity duration-150",
|
|
36
38
|
className
|
|
37
39
|
)}
|
package/src/radio-group.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
5
5
|
import { cn } from "./utils";
|
|
6
|
+
import { elevation } from "./elevation";
|
|
6
7
|
|
|
7
8
|
const RadioGroup = React.forwardRef<
|
|
8
9
|
React.ElementRef<typeof RadioGroupPrimitive.Root>,
|
|
@@ -27,7 +28,8 @@ const RadioGroupItem = React.forwardRef<
|
|
|
27
28
|
<RadioGroupPrimitive.Item
|
|
28
29
|
ref={ref}
|
|
29
30
|
className={cn(
|
|
30
|
-
"size-4 shrink-0 rounded-full border border-border bg-card
|
|
31
|
+
"size-4 shrink-0 rounded-full border border-border bg-card",
|
|
32
|
+
elevation.field,
|
|
31
33
|
"transition-colors duration-pg-fast ease-pg-standard",
|
|
32
34
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35",
|
|
33
35
|
"data-[state=checked]:border-primary",
|
package/src/section-message.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Info, CheckCircle2, AlertTriangle, XCircle, Sparkles } from "lucide-react";
|
|
3
3
|
import { cn } from "./utils";
|
|
4
|
+
import { elevation } from "./elevation";
|
|
4
5
|
|
|
5
6
|
export type SectionMessageVariant = "info" | "success" | "warning" | "error" | "discovery";
|
|
6
7
|
|
|
@@ -56,7 +57,8 @@ const SectionMessage = React.forwardRef<HTMLDivElement, SectionMessageProps>(
|
|
|
56
57
|
ref={ref}
|
|
57
58
|
role="region"
|
|
58
59
|
className={cn(
|
|
59
|
-
"flex w-full gap-4 rounded-xl border border-l-4 border-border p-5
|
|
60
|
+
"flex w-full gap-4 rounded-xl border border-l-4 border-border p-5 transition-colors duration-pg-fast ease-pg-standard",
|
|
61
|
+
elevation.surface,
|
|
60
62
|
config.border,
|
|
61
63
|
config.bg,
|
|
62
64
|
className
|
package/src/select.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
5
|
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
6
6
|
import { cn } from "./utils";
|
|
7
|
+
import { elevation } from "./elevation";
|
|
7
8
|
|
|
8
9
|
const Select = SelectPrimitive.Root;
|
|
9
10
|
const SelectGroup = SelectPrimitive.Group;
|
|
@@ -32,7 +33,8 @@ const SelectTrigger = React.forwardRef<
|
|
|
32
33
|
<SelectPrimitive.Trigger
|
|
33
34
|
ref={ref}
|
|
34
35
|
className={cn(
|
|
35
|
-
"flex w-full items-center justify-between rounded-lg border border-border bg-card text-foreground
|
|
36
|
+
"flex w-full items-center justify-between rounded-lg border border-border bg-card text-foreground outline-none",
|
|
37
|
+
elevation.field,
|
|
36
38
|
selectTriggerSizes[size],
|
|
37
39
|
"ring-ring/50 focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
38
40
|
"[&>span]:line-clamp-1",
|
|
@@ -84,7 +86,8 @@ const SelectContent = React.forwardRef<
|
|
|
84
86
|
<SelectPrimitive.Content
|
|
85
87
|
ref={ref}
|
|
86
88
|
className={cn(
|
|
87
|
-
"relative z-[120] max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground
|
|
89
|
+
"relative z-[120] max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground",
|
|
90
|
+
elevation.popover,
|
|
88
91
|
"data-[state=open]:opacity-100 data-[state=closed]:opacity-0 transition-opacity duration-150",
|
|
89
92
|
position === "popper" &&
|
|
90
93
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
package/src/single-select.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
5
|
import { Check, ChevronDown, Search } from "lucide-react";
|
|
6
6
|
import { cn } from "./utils";
|
|
7
|
+
import { elevation } from "./elevation";
|
|
7
8
|
import { filterOptions, type OptionFilter } from "./option-filter";
|
|
8
9
|
import { ScrollLockTakeover } from "./scroll-lock";
|
|
9
10
|
|
|
@@ -121,7 +122,8 @@ const SingleSelect = React.forwardRef<HTMLButtonElement, SingleSelectProps>(
|
|
|
121
122
|
aria-haspopup="listbox"
|
|
122
123
|
aria-invalid={invalid || undefined}
|
|
123
124
|
className={cn(
|
|
124
|
-
"flex h-11 w-full items-center justify-between gap-2.5 rounded-lg border border-border bg-card px-4 py-2 text-[15px]
|
|
125
|
+
"flex h-11 w-full items-center justify-between gap-2.5 rounded-lg border border-border bg-card px-4 py-2 text-[15px] outline-none",
|
|
126
|
+
elevation.field,
|
|
125
127
|
"transition-colors duration-pg-fast ease-pg-standard",
|
|
126
128
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35",
|
|
127
129
|
"aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/25 dark:aria-invalid:ring-destructive/40",
|
|
@@ -152,7 +154,8 @@ const SingleSelect = React.forwardRef<HTMLButtonElement, SingleSelectProps>(
|
|
|
152
154
|
sideOffset={6}
|
|
153
155
|
collisionPadding={8}
|
|
154
156
|
className={cn(
|
|
155
|
-
"z-[120] min-w-[var(--radix-popover-trigger-width)] w-full rounded-xl border border-border bg-popover text-popover-foreground
|
|
157
|
+
"z-[120] min-w-[var(--radix-popover-trigger-width)] w-full rounded-xl border border-border bg-popover text-popover-foreground outline-none p-1",
|
|
158
|
+
elevation.popover,
|
|
156
159
|
"data-[state=open]:opacity-100 data-[state=closed]:opacity-0 transition-opacity duration-150"
|
|
157
160
|
)}
|
|
158
161
|
>
|
|
@@ -166,7 +169,8 @@ const SingleSelect = React.forwardRef<HTMLButtonElement, SingleSelectProps>(
|
|
|
166
169
|
placeholder={searchPlaceholder}
|
|
167
170
|
aria-label={searchPlaceholder}
|
|
168
171
|
className={cn(
|
|
169
|
-
"flex h-9 w-full rounded-md border border-border bg-card pl-8 pr-3 text-sm
|
|
172
|
+
"flex h-9 w-full rounded-md border border-border bg-card pl-8 pr-3 text-sm placeholder:text-muted-foreground",
|
|
173
|
+
elevation.field,
|
|
170
174
|
"transition-colors duration-pg-fast ease-pg-standard",
|
|
171
175
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35"
|
|
172
176
|
)}
|
package/src/skeleton.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "./utils";
|
|
2
|
+
import { elevation } from "./elevation";
|
|
2
3
|
|
|
3
4
|
interface ShimmerProps {
|
|
4
5
|
className?: string;
|
|
@@ -12,7 +13,12 @@ export function Shimmer({ className, rounded = "md" }: ShimmerProps) {
|
|
|
12
13
|
|
|
13
14
|
export function StatCardSkeleton() {
|
|
14
15
|
return (
|
|
15
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
className={cn(
|
|
18
|
+
"bg-card text-card-foreground rounded-xl p-5 flex flex-col gap-3 border border-border",
|
|
19
|
+
elevation.surface
|
|
20
|
+
)}
|
|
21
|
+
>
|
|
16
22
|
<div className="flex items-center justify-between">
|
|
17
23
|
<Shimmer className="h-3 w-28" />
|
|
18
24
|
<Shimmer className="h-10 w-10" rounded="full" />
|
package/src/slider.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
5
|
import { cn } from "./utils";
|
|
6
|
+
import { elevation } from "./elevation";
|
|
6
7
|
|
|
7
8
|
export interface SliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {}
|
|
8
9
|
|
|
@@ -16,7 +17,10 @@ const Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, S
|
|
|
16
17
|
<SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-muted">
|
|
17
18
|
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
|
18
19
|
</SliderPrimitive.Track>
|
|
19
|
-
<SliderPrimitive.Thumb className=
|
|
20
|
+
<SliderPrimitive.Thumb className={cn(
|
|
21
|
+
"block h-[18px] w-[18px] rounded-full border-2 border-primary bg-card transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35 disabled:pointer-events-none disabled:opacity-50",
|
|
22
|
+
elevation.control
|
|
23
|
+
)} />
|
|
20
24
|
</SliderPrimitive.Root>
|
|
21
25
|
)
|
|
22
26
|
);
|
package/src/sonner.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useTheme } from "next-themes";
|
|
4
4
|
import { Toaster as Sonner, type ToasterProps } from "sonner";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
|
+
import { elevation } from "./elevation";
|
|
6
7
|
|
|
7
8
|
/** Drop-in toast host; pair with `toast` from `sonner`. Resolves theme via next-themes when mounted. */
|
|
8
9
|
export function Toaster({ theme, ...props }: ToasterProps) {
|
|
@@ -20,7 +21,7 @@ export function Toaster({ theme, ...props }: ToasterProps) {
|
|
|
20
21
|
toastOptions={{
|
|
21
22
|
classNames: {
|
|
22
23
|
toast:
|
|
23
|
-
|
|
24
|
+
`bg-[var(--popover)] text-[var(--popover-foreground)] border-[var(--border)] ${elevation.popover} rounded-[10px] text-[13px]`,
|
|
24
25
|
description: "text-[var(--muted-foreground)]",
|
|
25
26
|
},
|
|
26
27
|
}}
|
package/src/spotlight.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { X, ChevronLeft, ChevronRight, Check } from "lucide-react";
|
|
5
5
|
import { cn } from "./utils";
|
|
6
|
+
import { elevation } from "./elevation";
|
|
6
7
|
|
|
7
8
|
export interface SpotlightStep {
|
|
8
9
|
title: string;
|
|
@@ -27,7 +28,7 @@ const SpotlightCard = React.forwardRef<HTMLDivElement, SpotlightCardProps>(
|
|
|
27
28
|
({ title, body, image, currentStep, totalSteps, onNext, onBack, onDismiss, nextLabel, className }, ref) => {
|
|
28
29
|
const isLast = currentStep !== undefined && totalSteps !== undefined && currentStep >= totalSteps - 1;
|
|
29
30
|
return (
|
|
30
|
-
<div ref={ref} className={cn("bg-card border border-border rounded-xl
|
|
31
|
+
<div ref={ref} className={cn("bg-card border border-border rounded-xl p-5 w-72", elevation.surface, className)}>
|
|
31
32
|
{onDismiss && (
|
|
32
33
|
<button
|
|
33
34
|
onClick={onDismiss}
|
package/src/switch.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
|
5
5
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
6
|
|
|
7
7
|
import { cn } from "./utils";
|
|
8
|
+
import { elevation } from "./elevation";
|
|
8
9
|
|
|
9
10
|
const switchRootVariants = cva(
|
|
10
11
|
[
|
|
@@ -31,7 +32,8 @@ const switchRootVariants = cva(
|
|
|
31
32
|
|
|
32
33
|
const switchThumbVariants = cva(
|
|
33
34
|
[
|
|
34
|
-
"pointer-events-none block rounded-full bg-white
|
|
35
|
+
"pointer-events-none block rounded-full bg-white",
|
|
36
|
+
elevation.control,
|
|
35
37
|
"transition-transform duration-pg-fast ease-pg-standard",
|
|
36
38
|
"ring-0",
|
|
37
39
|
],
|
package/src/textarea.tsx
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { cn } from "./utils";
|
|
4
|
+
import { elevation } from "./elevation";
|
|
4
5
|
|
|
5
6
|
const Textarea = React.forwardRef<HTMLTextAreaElement, React.ComponentProps<"textarea">>(
|
|
6
7
|
({ className, ...props }, ref) => {
|
|
7
8
|
return (
|
|
8
9
|
<textarea
|
|
9
10
|
className={cn(
|
|
10
|
-
"flex min-h-[5.5rem] w-full rounded-lg border border-border bg-card px-4 py-3 text-[15px] leading-relaxed
|
|
11
|
+
"flex min-h-[5.5rem] w-full rounded-lg border border-border bg-card px-4 py-3 text-[15px] leading-relaxed transition-colors",
|
|
12
|
+
elevation.field,
|
|
11
13
|
"placeholder:text-muted-foreground",
|
|
12
14
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
13
15
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
package/src/time-picker.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { createPortal } from "react-dom";
|
|
|
5
5
|
import { RemoveScroll } from "react-remove-scroll";
|
|
6
6
|
import { Clock, ChevronDown, X } from "lucide-react";
|
|
7
7
|
import { cn } from "./utils";
|
|
8
|
+
import { elevation } from "./elevation";
|
|
8
9
|
import { ScrollLockTakeover } from "./scroll-lock";
|
|
9
10
|
|
|
10
11
|
/* ─── Types ──────────────────────────────────────────────────────────────── */
|
|
@@ -338,7 +339,8 @@ export const TimePicker = React.forwardRef<HTMLButtonElement, TimePickerProps>(
|
|
|
338
339
|
<div
|
|
339
340
|
ref={panelRef}
|
|
340
341
|
className={cn(
|
|
341
|
-
"isolate rounded-xl border border-border bg-popover text-popover-foreground
|
|
342
|
+
"isolate rounded-xl border border-border bg-popover text-popover-foreground",
|
|
343
|
+
elevation.popover,
|
|
342
344
|
"flex flex-col gap-0"
|
|
343
345
|
)}
|
|
344
346
|
style={{
|
|
@@ -432,7 +434,8 @@ export const TimePicker = React.forwardRef<HTMLButtonElement, TimePickerProps>(
|
|
|
432
434
|
disabled={disabled}
|
|
433
435
|
onClick={() => (open ? setOpen(false) : openPanel())}
|
|
434
436
|
className={cn(
|
|
435
|
-
"flex h-11 min-h-11 w-full items-center gap-3 rounded-lg border border-border bg-card px-4 text-left text-[15px]
|
|
437
|
+
"flex h-11 min-h-11 w-full items-center gap-3 rounded-lg border border-border bg-card px-4 text-left text-[15px]",
|
|
438
|
+
elevation.field,
|
|
436
439
|
"transition-colors duration-150",
|
|
437
440
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35",
|
|
438
441
|
open && "border-ring ring-2 ring-ring/35",
|
package/src/tooltip.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5
5
|
import { cn } from "./utils";
|
|
6
|
+
import { elevation } from "./elevation";
|
|
6
7
|
|
|
7
8
|
const TooltipProvider = TooltipPrimitive.Provider;
|
|
8
9
|
const Tooltip = TooltipPrimitive.Root;
|
|
@@ -17,7 +18,8 @@ const TooltipContent = React.forwardRef<
|
|
|
17
18
|
ref={ref}
|
|
18
19
|
sideOffset={sideOffset}
|
|
19
20
|
className={cn(
|
|
20
|
-
"z-[130] max-w-xs overflow-hidden rounded-lg border border-border bg-popover px-3 py-2 text-sm leading-snug text-popover-foreground
|
|
21
|
+
"z-[130] max-w-xs overflow-hidden rounded-lg border border-border bg-popover px-3 py-2 text-sm leading-snug text-popover-foreground",
|
|
22
|
+
elevation.tooltip,
|
|
21
23
|
className
|
|
22
24
|
)}
|
|
23
25
|
{...props}
|