fina-react-ds 1.0.6 → 1.0.7
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/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.js +43 -0
- package/dist/components/mode-toggle.js +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +103 -99
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +192 -0
- package/dist/themes/base.css +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3
|
+
declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var o = (t, a) => n(t, "name", { value: a, configurable: !0 });
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { Root as c, Trigger as f, Portal as i, Content as s } from "../node_modules/@radix-ui/react-hover-card/dist/index.js";
|
|
5
|
+
import { cn as m } from "../lib/utils.js";
|
|
6
|
+
function h({
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ e(c, { "data-slot": "hover-card", ...t });
|
|
10
|
+
}
|
|
11
|
+
o(h, "HoverCard");
|
|
12
|
+
function v({
|
|
13
|
+
...t
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ e(f, { "data-slot": "hover-card-trigger", ...t });
|
|
16
|
+
}
|
|
17
|
+
o(v, "HoverCardTrigger");
|
|
18
|
+
function C({
|
|
19
|
+
className: t,
|
|
20
|
+
align: a = "center",
|
|
21
|
+
sideOffset: r = 4,
|
|
22
|
+
...d
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ e(i, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ e(
|
|
25
|
+
s,
|
|
26
|
+
{
|
|
27
|
+
"data-slot": "hover-card-content",
|
|
28
|
+
align: a,
|
|
29
|
+
sideOffset: r,
|
|
30
|
+
className: m(
|
|
31
|
+
"fc:bg-popover fc:text-popover-foreground fc:data-[state=open]:animate-in fc:data-[state=closed]:animate-out fc:data-[state=closed]:fade-out-0 fc:data-[state=open]:fade-in-0 fc:data-[state=closed]:zoom-out-95 fc:data-[state=open]:zoom-in-95 fc:data-[side=bottom]:slide-in-from-top-2 fc:data-[side=left]:slide-in-from-right-2 fc:data-[side=right]:slide-in-from-left-2 fc:data-[side=top]:slide-in-from-bottom-2 fc:z-50 fc:w-64 fc:origin-(--radix-hover-card-content-transform-origin) fc:rounded-md fc:border fc:p-4 fc:shadow-md fc:outline-hidden",
|
|
32
|
+
t
|
|
33
|
+
),
|
|
34
|
+
...d
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
o(C, "HoverCardContent");
|
|
39
|
+
export {
|
|
40
|
+
h as HoverCard,
|
|
41
|
+
C as HoverCardContent,
|
|
42
|
+
v as HoverCardTrigger
|
|
43
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var a = Object.defineProperty;
|
|
2
2
|
var o = (r, t) => a(r, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
4
|
-
import { Sun as
|
|
4
|
+
import { Sun as l, Moon as i } from "lucide-react";
|
|
5
5
|
import { Button as s } from "./button.js";
|
|
6
6
|
import { DropdownMenu as m, DropdownMenuTrigger as f, DropdownMenuContent as d, DropdownMenuItem as c } from "./dropdown-menu.js";
|
|
7
7
|
import { useTheme as h } from "../providers/theme-provider.js";
|
|
8
8
|
function C() {
|
|
9
9
|
const { setTheme: r } = h();
|
|
10
10
|
return /* @__PURE__ */ n(m, { children: [
|
|
11
|
-
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ n(s, { variant: "outline", size: "icon", children: [
|
|
12
|
-
/* @__PURE__ */ e(
|
|
13
|
-
/* @__PURE__ */ e(
|
|
11
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ n(s, { variant: "outline", color: "dark", size: "icon", children: [
|
|
12
|
+
/* @__PURE__ */ e(l, { className: "fc:h-[1.2rem] fc:w-[1.2rem] fc:scale-100 fc:rotate-0 fc:transition-all fc:dark:scale-0 fc:dark:-rotate-90" }),
|
|
13
|
+
/* @__PURE__ */ e(i, { className: "fc:absolute fc:h-[1.2rem] fc:w-[1.2rem] fc:scale-0 fc:rotate-90 fc:transition-all fc:dark:scale-100 fc:dark:rotate-0" }),
|
|
14
14
|
/* @__PURE__ */ e("span", { className: "fc:sr-only", children: "Toggle theme" })
|
|
15
15
|
] }) }),
|
|
16
16
|
/* @__PURE__ */ n(d, { align: "end", children: [
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { DatePicker } from "./components/date-picker";
|
|
|
10
10
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./components/dialog";
|
|
11
11
|
export { DataLoader } from "./components/data-loader";
|
|
12
12
|
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from "./components/dropdown-menu";
|
|
13
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent } from "./components/hover-card";
|
|
13
14
|
export { Input } from "./components/input";
|
|
14
15
|
export { Label } from "./components/label";
|
|
15
16
|
export { ModeToggle } from "./components/mode-toggle";
|
package/dist/index.js
CHANGED
|
@@ -4,32 +4,33 @@ import { Badge as f } from "./components/badge.js";
|
|
|
4
4
|
import { Button as M, buttonVariants as s } from "./components/button.js";
|
|
5
5
|
import { Avatar as P, AvatarFallback as c, AvatarImage as w } from "./components/avatar.js";
|
|
6
6
|
import { Calendar as v } from "./components/calendar.js";
|
|
7
|
-
import { Card as
|
|
7
|
+
import { Card as I, CardAction as k, CardContent as B, CardDescription as F, CardFooter as G, CardHeader as L, CardTitle as R } from "./components/card.js";
|
|
8
8
|
import { Checkbox as O } from "./components/checkbox.js";
|
|
9
9
|
import { DatePicker as N } from "./components/date-picker.js";
|
|
10
10
|
import { Dialog as j, DialogClose as q, DialogContent as z, DialogDescription as J, DialogFooter as K, DialogHeader as Q, DialogOverlay as U, DialogPortal as W, DialogTitle as X, DialogTrigger as Y } from "./components/dialog.js";
|
|
11
11
|
import { DataLoader as _ } from "./components/data-loader.js";
|
|
12
12
|
import { DropdownMenu as ee, DropdownMenuCheckboxItem as oe, DropdownMenuContent as re, DropdownMenuGroup as te, DropdownMenuItem as ae, DropdownMenuLabel as ie, DropdownMenuPortal as ne, DropdownMenuRadioGroup as le, DropdownMenuRadioItem as pe, DropdownMenuSeparator as de, DropdownMenuShortcut as ge, DropdownMenuSub as be, DropdownMenuSubContent as Se, DropdownMenuSubTrigger as ue, DropdownMenuTrigger as me } from "./components/dropdown-menu.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
13
|
+
import { HoverCard as xe, HoverCardContent as Te, HoverCardTrigger as fe } from "./components/hover-card.js";
|
|
14
|
+
import { Input as Me } from "./components/input.js";
|
|
15
|
+
import { Label as Ae } from "./components/label.js";
|
|
16
|
+
import { ModeToggle as ce } from "./components/mode-toggle.js";
|
|
17
|
+
import { Pagination as he, PaginationContent as ve, PaginationEllipsis as He, PaginationItem as Ie, PaginationLink as ke, PaginationNext as Be, PaginationPrevious as Fe } from "./components/pagination.js";
|
|
18
|
+
import { PasswordRulesChecker as Le } from "./components/password-rules-checker.js";
|
|
19
|
+
import { Popover as ye, PopoverAnchor as Oe, PopoverContent as Ee, PopoverTrigger as Ne } from "./components/popover.js";
|
|
20
|
+
import { Select as je } from "./components/select.js";
|
|
21
|
+
import { Separator as ze } from "./components/separator.js";
|
|
22
|
+
import { Sheet as Ke, SheetBody as Qe, SheetClose as Ue, SheetContent as We, SheetDescription as Xe, SheetFooter as Ye, SheetHeader as Ze, SheetTitle as _e, SheetTrigger as $e } from "./components/sheet.js";
|
|
23
|
+
import { Sidebar as oo, SidebarContent as ro, SidebarFooter as to, SidebarGroup as ao, SidebarGroupAction as io, SidebarGroupContent as no, SidebarGroupLabel as lo, SidebarHeader as po, SidebarInput as go, SidebarInset as bo, SidebarMenu as So, SidebarMenuAction as uo, SidebarMenuBadge as mo, SidebarMenuButton as Do, SidebarMenuItem as xo, SidebarMenuSkeleton as To, SidebarMenuSub as fo, SidebarMenuSubButton as Co, SidebarMenuSubItem as Mo, SidebarProvider as so, SidebarRail as Ao, SidebarSeparator as Po, SidebarTrigger as co, useSidebar as wo } from "./components/sidebar.js";
|
|
24
|
+
import { SimplePagination as vo } from "./components/simple-pagination.js";
|
|
25
|
+
import { SimpleTooltip as Io } from "./components/simple-tooltip.js";
|
|
26
|
+
import { Skeleton as Bo } from "./components/skeleton.js";
|
|
27
|
+
import { Switch as Go } from "./components/switch.js";
|
|
28
|
+
import { Toaster as Ro } from "./components/sonner.js";
|
|
29
|
+
import { Table as Oo, TableBody as Eo, TableCaption as No, TableCell as Vo, TableFooter as jo, TableHead as qo, TableHeader as zo, TableRow as Jo } from "./components/table.js";
|
|
30
|
+
import { Tabs as Qo, TabsContent as Uo, TabsList as Wo, TabsTrigger as Xo } from "./components/tabs.js";
|
|
31
|
+
import { Textarea as Zo } from "./components/textarea.js";
|
|
32
|
+
import { Tooltip as $o, TooltipContent as er, TooltipProvider as or, TooltipTrigger as rr } from "./components/tooltip.js";
|
|
33
|
+
import { ThemeProvider as ar, useTheme as ir } from "./providers/theme-provider.js";
|
|
33
34
|
export {
|
|
34
35
|
m as Alert,
|
|
35
36
|
D as AlertDescription,
|
|
@@ -51,10 +52,10 @@ export {
|
|
|
51
52
|
f as Badge,
|
|
52
53
|
M as Button,
|
|
53
54
|
v as Calendar,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
I as Card,
|
|
56
|
+
k as CardAction,
|
|
57
|
+
B as CardContent,
|
|
58
|
+
F as CardDescription,
|
|
58
59
|
G as CardFooter,
|
|
59
60
|
L as CardHeader,
|
|
60
61
|
R as CardTitle,
|
|
@@ -86,79 +87,82 @@ export {
|
|
|
86
87
|
Se as DropdownMenuSubContent,
|
|
87
88
|
ue as DropdownMenuSubTrigger,
|
|
88
89
|
me as DropdownMenuTrigger,
|
|
89
|
-
xe as
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
ce as
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Ie as
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Le as
|
|
103
|
-
|
|
104
|
-
Oe as
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
ze as
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
Ze as
|
|
116
|
-
_e as
|
|
117
|
-
$e as
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
qo as
|
|
151
|
-
zo as
|
|
152
|
-
Jo as
|
|
153
|
-
|
|
154
|
-
Uo as
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
90
|
+
xe as HoverCard,
|
|
91
|
+
Te as HoverCardContent,
|
|
92
|
+
fe as HoverCardTrigger,
|
|
93
|
+
Me as Input,
|
|
94
|
+
Ae as Label,
|
|
95
|
+
ce as ModeToggle,
|
|
96
|
+
he as Pagination,
|
|
97
|
+
ve as PaginationContent,
|
|
98
|
+
He as PaginationEllipsis,
|
|
99
|
+
Ie as PaginationItem,
|
|
100
|
+
ke as PaginationLink,
|
|
101
|
+
Be as PaginationNext,
|
|
102
|
+
Fe as PaginationPrevious,
|
|
103
|
+
Le as PasswordRulesChecker,
|
|
104
|
+
ye as Popover,
|
|
105
|
+
Oe as PopoverAnchor,
|
|
106
|
+
Ee as PopoverContent,
|
|
107
|
+
Ne as PopoverTrigger,
|
|
108
|
+
je as Select,
|
|
109
|
+
ze as Separator,
|
|
110
|
+
Ke as Sheet,
|
|
111
|
+
Qe as SheetBody,
|
|
112
|
+
Ue as SheetClose,
|
|
113
|
+
We as SheetContent,
|
|
114
|
+
Xe as SheetDescription,
|
|
115
|
+
Ye as SheetFooter,
|
|
116
|
+
Ze as SheetHeader,
|
|
117
|
+
_e as SheetTitle,
|
|
118
|
+
$e as SheetTrigger,
|
|
119
|
+
oo as Sidebar,
|
|
120
|
+
ro as SidebarContent,
|
|
121
|
+
to as SidebarFooter,
|
|
122
|
+
ao as SidebarGroup,
|
|
123
|
+
io as SidebarGroupAction,
|
|
124
|
+
no as SidebarGroupContent,
|
|
125
|
+
lo as SidebarGroupLabel,
|
|
126
|
+
po as SidebarHeader,
|
|
127
|
+
go as SidebarInput,
|
|
128
|
+
bo as SidebarInset,
|
|
129
|
+
So as SidebarMenu,
|
|
130
|
+
uo as SidebarMenuAction,
|
|
131
|
+
mo as SidebarMenuBadge,
|
|
132
|
+
Do as SidebarMenuButton,
|
|
133
|
+
xo as SidebarMenuItem,
|
|
134
|
+
To as SidebarMenuSkeleton,
|
|
135
|
+
fo as SidebarMenuSub,
|
|
136
|
+
Co as SidebarMenuSubButton,
|
|
137
|
+
Mo as SidebarMenuSubItem,
|
|
138
|
+
so as SidebarProvider,
|
|
139
|
+
Ao as SidebarRail,
|
|
140
|
+
Po as SidebarSeparator,
|
|
141
|
+
co as SidebarTrigger,
|
|
142
|
+
vo as SimplePagination,
|
|
143
|
+
Io as SimpleTooltip,
|
|
144
|
+
Bo as Skeleton,
|
|
145
|
+
Go as Switch,
|
|
146
|
+
Oo as Table,
|
|
147
|
+
Eo as TableBody,
|
|
148
|
+
No as TableCaption,
|
|
149
|
+
Vo as TableCell,
|
|
150
|
+
jo as TableFooter,
|
|
151
|
+
qo as TableHead,
|
|
152
|
+
zo as TableHeader,
|
|
153
|
+
Jo as TableRow,
|
|
154
|
+
Qo as Tabs,
|
|
155
|
+
Uo as TabsContent,
|
|
156
|
+
Wo as TabsList,
|
|
157
|
+
Xo as TabsTrigger,
|
|
158
|
+
Zo as Textarea,
|
|
159
|
+
ar as ThemeProvider,
|
|
160
|
+
Ro as Toaster,
|
|
161
|
+
$o as Tooltip,
|
|
162
|
+
er as TooltipContent,
|
|
163
|
+
or as TooltipProvider,
|
|
164
|
+
rr as TooltipTrigger,
|
|
161
165
|
s as buttonVariants,
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
wo as useSidebar,
|
|
167
|
+
ir as useTheme
|
|
164
168
|
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var f = (e, o) => F(e, "name", { value: o, configurable: !0 });
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { composeEventHandlers as d } from "../../primitive/dist/index.js";
|
|
5
|
+
import { createContextScope as I } from "../../react-context/dist/index.js";
|
|
6
|
+
import { useControllableState as U } from "../../react-use-controllable-state/dist/index.js";
|
|
7
|
+
import { useComposedRefs as W } from "../../react-compose-refs/dist/index.js";
|
|
8
|
+
import { createPopperScope as O, Root as B, Anchor as G, Content as K, Arrow as $ } from "../../react-popper/dist/index.js";
|
|
9
|
+
import { Portal as j } from "../../react-portal/dist/index.js";
|
|
10
|
+
import { Presence as _ } from "../../react-presence/dist/index.js";
|
|
11
|
+
import { Primitive as V } from "../../react-primitive/dist/index.js";
|
|
12
|
+
import { DismissableLayer as q } from "../../react-dismissable-layer/dist/index.js";
|
|
13
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
14
|
+
var T, E = "HoverCard", [y, pe] = I(E, [
|
|
15
|
+
O
|
|
16
|
+
]), g = O(), [z, x] = y(E), N = /* @__PURE__ */ f((e) => {
|
|
17
|
+
const {
|
|
18
|
+
__scopeHoverCard: o,
|
|
19
|
+
children: t,
|
|
20
|
+
open: s,
|
|
21
|
+
defaultOpen: a,
|
|
22
|
+
onOpenChange: c,
|
|
23
|
+
openDelay: v = 700,
|
|
24
|
+
closeDelay: C = 300
|
|
25
|
+
} = e, l = g(o), m = n.useRef(0), u = n.useRef(0), h = n.useRef(!1), p = n.useRef(!1), [P, r] = U({
|
|
26
|
+
prop: s,
|
|
27
|
+
defaultProp: a ?? !1,
|
|
28
|
+
onChange: c,
|
|
29
|
+
caller: E
|
|
30
|
+
}), R = n.useCallback(() => {
|
|
31
|
+
clearTimeout(u.current), m.current = window.setTimeout(() => r(!0), v);
|
|
32
|
+
}, [v, r]), S = n.useCallback(() => {
|
|
33
|
+
clearTimeout(m.current), !h.current && !p.current && (u.current = window.setTimeout(() => r(!1), C));
|
|
34
|
+
}, [C, r]), k = n.useCallback(() => r(!1), [r]);
|
|
35
|
+
return n.useEffect(() => () => {
|
|
36
|
+
clearTimeout(m.current), clearTimeout(u.current);
|
|
37
|
+
}, []), /* @__PURE__ */ i(
|
|
38
|
+
z,
|
|
39
|
+
{
|
|
40
|
+
scope: o,
|
|
41
|
+
open: P,
|
|
42
|
+
onOpenChange: r,
|
|
43
|
+
onOpen: R,
|
|
44
|
+
onClose: S,
|
|
45
|
+
onDismiss: k,
|
|
46
|
+
hasSelectionRef: h,
|
|
47
|
+
isPointerDownOnContentRef: p,
|
|
48
|
+
children: /* @__PURE__ */ i(B, { ...l, children: t })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}, "HoverCard");
|
|
52
|
+
N.displayName = E;
|
|
53
|
+
var D = "HoverCardTrigger", A = n.forwardRef(
|
|
54
|
+
(e, o) => {
|
|
55
|
+
const { __scopeHoverCard: t, ...s } = e, a = x(D, t), c = g(t);
|
|
56
|
+
return /* @__PURE__ */ i(G, { asChild: !0, ...c, children: /* @__PURE__ */ i(
|
|
57
|
+
V.a,
|
|
58
|
+
{
|
|
59
|
+
"data-state": a.open ? "open" : "closed",
|
|
60
|
+
...s,
|
|
61
|
+
ref: o,
|
|
62
|
+
onPointerEnter: d(e.onPointerEnter, b(a.onOpen)),
|
|
63
|
+
onPointerLeave: d(e.onPointerLeave, b(a.onClose)),
|
|
64
|
+
onFocus: d(e.onFocus, a.onOpen),
|
|
65
|
+
onBlur: d(e.onBlur, a.onClose),
|
|
66
|
+
onTouchStart: d(e.onTouchStart, (v) => v.preventDefault())
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
A.displayName = D;
|
|
72
|
+
var H = "HoverCardPortal", [J, Q] = y(H, {
|
|
73
|
+
forceMount: void 0
|
|
74
|
+
}), L = /* @__PURE__ */ f((e) => {
|
|
75
|
+
const { __scopeHoverCard: o, forceMount: t, children: s, container: a } = e, c = x(H, o);
|
|
76
|
+
return /* @__PURE__ */ i(J, { scope: o, forceMount: t, children: /* @__PURE__ */ i(_, { present: t || c.open, children: /* @__PURE__ */ i(j, { asChild: !0, container: a, children: s }) }) });
|
|
77
|
+
}, "HoverCardPortal");
|
|
78
|
+
L.displayName = H;
|
|
79
|
+
var w = "HoverCardContent", M = n.forwardRef(
|
|
80
|
+
(e, o) => {
|
|
81
|
+
const t = Q(w, e.__scopeHoverCard), { forceMount: s = t.forceMount, ...a } = e, c = x(w, e.__scopeHoverCard);
|
|
82
|
+
return /* @__PURE__ */ i(_, { present: s || c.open, children: /* @__PURE__ */ i(
|
|
83
|
+
X,
|
|
84
|
+
{
|
|
85
|
+
"data-state": c.open ? "open" : "closed",
|
|
86
|
+
...a,
|
|
87
|
+
onPointerEnter: d(e.onPointerEnter, b(c.onOpen)),
|
|
88
|
+
onPointerLeave: d(e.onPointerLeave, b(c.onClose)),
|
|
89
|
+
ref: o
|
|
90
|
+
}
|
|
91
|
+
) });
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
M.displayName = w;
|
|
95
|
+
var X = n.forwardRef((e, o) => {
|
|
96
|
+
const {
|
|
97
|
+
__scopeHoverCard: t,
|
|
98
|
+
onEscapeKeyDown: s,
|
|
99
|
+
onPointerDownOutside: a,
|
|
100
|
+
onFocusOutside: c,
|
|
101
|
+
onInteractOutside: v,
|
|
102
|
+
...C
|
|
103
|
+
} = e, l = x(w, t), m = g(t), u = n.useRef(null), h = W(o, u), [p, P] = n.useState(!1);
|
|
104
|
+
return n.useEffect(() => {
|
|
105
|
+
if (p) {
|
|
106
|
+
const r = document.body;
|
|
107
|
+
return T = r.style.userSelect || r.style.webkitUserSelect, r.style.userSelect = "none", r.style.webkitUserSelect = "none", () => {
|
|
108
|
+
r.style.userSelect = T, r.style.webkitUserSelect = T;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}, [p]), n.useEffect(() => {
|
|
112
|
+
if (u.current) {
|
|
113
|
+
const r = /* @__PURE__ */ f(() => {
|
|
114
|
+
P(!1), l.isPointerDownOnContentRef.current = !1, setTimeout(() => {
|
|
115
|
+
var S;
|
|
116
|
+
((S = document.getSelection()) == null ? void 0 : S.toString()) !== "" && (l.hasSelectionRef.current = !0);
|
|
117
|
+
});
|
|
118
|
+
}, "handlePointerUp");
|
|
119
|
+
return document.addEventListener("pointerup", r), () => {
|
|
120
|
+
document.removeEventListener("pointerup", r), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !1;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}, [l.isPointerDownOnContentRef, l.hasSelectionRef]), n.useEffect(() => {
|
|
124
|
+
u.current && ee(u.current).forEach((R) => R.setAttribute("tabindex", "-1"));
|
|
125
|
+
}), /* @__PURE__ */ i(
|
|
126
|
+
q,
|
|
127
|
+
{
|
|
128
|
+
asChild: !0,
|
|
129
|
+
disableOutsidePointerEvents: !1,
|
|
130
|
+
onInteractOutside: v,
|
|
131
|
+
onEscapeKeyDown: s,
|
|
132
|
+
onPointerDownOutside: a,
|
|
133
|
+
onFocusOutside: d(c, (r) => {
|
|
134
|
+
r.preventDefault();
|
|
135
|
+
}),
|
|
136
|
+
onDismiss: l.onDismiss,
|
|
137
|
+
children: /* @__PURE__ */ i(
|
|
138
|
+
K,
|
|
139
|
+
{
|
|
140
|
+
...m,
|
|
141
|
+
...C,
|
|
142
|
+
onPointerDown: d(C.onPointerDown, (r) => {
|
|
143
|
+
r.currentTarget.contains(r.target) && P(!0), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !0;
|
|
144
|
+
}),
|
|
145
|
+
ref: h,
|
|
146
|
+
style: {
|
|
147
|
+
...C.style,
|
|
148
|
+
userSelect: p ? "text" : void 0,
|
|
149
|
+
// Safari requires prefix
|
|
150
|
+
WebkitUserSelect: p ? "text" : void 0,
|
|
151
|
+
"--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
152
|
+
"--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
|
|
153
|
+
"--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
|
|
154
|
+
"--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
|
|
155
|
+
"--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}), Y = "HoverCardArrow", Z = n.forwardRef(
|
|
162
|
+
(e, o) => {
|
|
163
|
+
const { __scopeHoverCard: t, ...s } = e, a = g(t);
|
|
164
|
+
return /* @__PURE__ */ i($, { ...a, ...s, ref: o });
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
Z.displayName = Y;
|
|
168
|
+
function b(e) {
|
|
169
|
+
return (o) => o.pointerType === "touch" ? void 0 : e();
|
|
170
|
+
}
|
|
171
|
+
f(b, "excludeTouch");
|
|
172
|
+
function ee(e) {
|
|
173
|
+
const o = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
174
|
+
acceptNode: /* @__PURE__ */ f((s) => s.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP, "acceptNode")
|
|
175
|
+
});
|
|
176
|
+
for (; t.nextNode(); ) o.push(t.currentNode);
|
|
177
|
+
return o;
|
|
178
|
+
}
|
|
179
|
+
f(ee, "getTabbableNodes");
|
|
180
|
+
var fe = N, ve = A, Ce = L, me = M;
|
|
181
|
+
export {
|
|
182
|
+
me as Content,
|
|
183
|
+
N as HoverCard,
|
|
184
|
+
Z as HoverCardArrow,
|
|
185
|
+
M as HoverCardContent,
|
|
186
|
+
L as HoverCardPortal,
|
|
187
|
+
A as HoverCardTrigger,
|
|
188
|
+
Ce as Portal,
|
|
189
|
+
fe as Root,
|
|
190
|
+
ve as Trigger,
|
|
191
|
+
pe as createHoverCardScope
|
|
192
|
+
};
|
package/dist/themes/base.css
CHANGED
|
@@ -440,6 +440,9 @@
|
|
|
440
440
|
.fc\:w-8 {
|
|
441
441
|
width: calc(var(--fc-spacing) * 8);
|
|
442
442
|
}
|
|
443
|
+
.fc\:w-64 {
|
|
444
|
+
width: calc(var(--fc-spacing) * 64);
|
|
445
|
+
}
|
|
443
446
|
.fc\:w-72 {
|
|
444
447
|
width: calc(var(--fc-spacing) * 72);
|
|
445
448
|
}
|
|
@@ -488,6 +491,9 @@
|
|
|
488
491
|
.fc\:origin-\(--radix-dropdown-menu-content-transform-origin\) {
|
|
489
492
|
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
490
493
|
}
|
|
494
|
+
.fc\:origin-\(--radix-hover-card-content-transform-origin\) {
|
|
495
|
+
transform-origin: var(--radix-hover-card-content-transform-origin);
|
|
496
|
+
}
|
|
491
497
|
.fc\:origin-\(--radix-popover-content-transform-origin\) {
|
|
492
498
|
transform-origin: var(--radix-popover-content-transform-origin);
|
|
493
499
|
}
|