fina-react-ds 1.0.5 → 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.
@@ -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
+ };
@@ -0,0 +1 @@
1
+ export declare function ModeToggle(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ var a = Object.defineProperty;
2
+ var o = (r, t) => a(r, "name", { value: t, configurable: !0 });
3
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
4
+ import { Sun as l, Moon as i } from "lucide-react";
5
+ import { Button as s } from "./button.js";
6
+ import { DropdownMenu as m, DropdownMenuTrigger as f, DropdownMenuContent as d, DropdownMenuItem as c } from "./dropdown-menu.js";
7
+ import { useTheme as h } from "../providers/theme-provider.js";
8
+ function C() {
9
+ const { setTheme: r } = h();
10
+ return /* @__PURE__ */ n(m, { children: [
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
+ /* @__PURE__ */ e("span", { className: "fc:sr-only", children: "Toggle theme" })
15
+ ] }) }),
16
+ /* @__PURE__ */ n(d, { align: "end", children: [
17
+ /* @__PURE__ */ e(c, { onClick: /* @__PURE__ */ o(() => r("light"), "onClick"), children: "Light" }),
18
+ /* @__PURE__ */ e(c, { onClick: /* @__PURE__ */ o(() => r("dark"), "onClick"), children: "Dark" }),
19
+ /* @__PURE__ */ e(c, { onClick: /* @__PURE__ */ o(() => r("system"), "onClick"), children: "System" })
20
+ ] })
21
+ ] });
22
+ }
23
+ o(C, "ModeToggle");
24
+ export {
25
+ C as ModeToggle
26
+ };
package/dist/index.d.ts CHANGED
@@ -10,8 +10,10 @@ 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";
16
+ export { ModeToggle } from "./components/mode-toggle";
15
17
  export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./components/pagination";
16
18
  export { PasswordRulesChecker } from "./components/password-rules-checker";
17
19
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, } from "./components/popover";
@@ -28,3 +30,4 @@ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableC
28
30
  export { Tabs, TabsList, TabsTrigger, TabsContent } from "./components/tabs";
29
31
  export { Textarea } from "./components/textarea";
30
32
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, } from "./components/tooltip";
33
+ export { ThemeProvider, useTheme } from "./providers/theme-provider";
package/dist/index.js CHANGED
@@ -1,36 +1,39 @@
1
1
  import { AlertDialog as r, AlertDialogAction as t, AlertDialogCancel as a, AlertDialogContent as i, AlertDialogDescription as n, AlertDialogFooter as l, AlertDialogHeader as p, AlertDialogOverlay as d, AlertDialogPortal as g, AlertDialogTitle as b, AlertDialogTrigger as S } from "./components/alert-dialog.js";
2
- import { Alert as D, AlertDescription as m, AlertTitle as x } from "./components/alert.js";
2
+ import { Alert as m, AlertDescription as D, AlertTitle as x } from "./components/alert.js";
3
3
  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 k, CardAction as B, CardContent as F, CardDescription as H, CardFooter as G, CardHeader as L, CardTitle as R } from "./components/card.js";
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
- 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 De } from "./components/dropdown-menu.js";
13
- import { Input as xe } from "./components/input.js";
14
- import { Label as fe } from "./components/label.js";
15
- import { Pagination as Me, PaginationContent as se, PaginationEllipsis as Ae, PaginationItem as Pe, PaginationLink as ce, PaginationNext as we, PaginationPrevious as he } from "./components/pagination.js";
16
- import { PasswordRulesChecker as Ie } from "./components/password-rules-checker.js";
17
- import { Popover as Be, PopoverAnchor as Fe, PopoverContent as He, PopoverTrigger as Ge } from "./components/popover.js";
18
- import { Select as Re } from "./components/select.js";
19
- import { Separator as Oe } from "./components/separator.js";
20
- import { Sheet as Ne, SheetBody as Ve, SheetClose as je, SheetContent as qe, SheetDescription as ze, SheetFooter as Je, SheetHeader as Ke, SheetTitle as Qe, SheetTrigger as Ue } from "./components/sheet.js";
21
- import { Sidebar as Xe, SidebarContent as Ye, SidebarFooter as Ze, SidebarGroup as _e, SidebarGroupAction as $e, SidebarGroupContent as eo, SidebarGroupLabel as oo, SidebarHeader as ro, SidebarInput as to, SidebarInset as ao, SidebarMenu as io, SidebarMenuAction as no, SidebarMenuBadge as lo, SidebarMenuButton as po, SidebarMenuItem as go, SidebarMenuSkeleton as bo, SidebarMenuSub as So, SidebarMenuSubButton as uo, SidebarMenuSubItem as Do, SidebarProvider as mo, SidebarRail as xo, SidebarSeparator as To, SidebarTrigger as fo, useSidebar as Co } from "./components/sidebar.js";
22
- import { SimplePagination as so } from "./components/simple-pagination.js";
23
- import { SimpleTooltip as Po } from "./components/simple-tooltip.js";
24
- import { Skeleton as wo } from "./components/skeleton.js";
25
- import { Switch as vo } from "./components/switch.js";
26
- import { Toaster as ko } from "./components/sonner.js";
27
- import { Table as Fo, TableBody as Ho, TableCaption as Go, TableCell as Lo, TableFooter as Ro, TableHead as yo, TableHeader as Oo, TableRow as Eo } from "./components/table.js";
28
- import { Tabs as Vo, TabsContent as jo, TabsList as qo, TabsTrigger as zo } from "./components/tabs.js";
29
- import { Textarea as Ko } from "./components/textarea.js";
30
- import { Tooltip as Uo, TooltipContent as Wo, TooltipProvider as Xo, TooltipTrigger as Yo } from "./components/tooltip.js";
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 { 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";
31
34
  export {
32
- D as Alert,
33
- m as AlertDescription,
35
+ m as Alert,
36
+ D as AlertDescription,
34
37
  r as AlertDialog,
35
38
  t as AlertDialogAction,
36
39
  a as AlertDialogCancel,
@@ -49,10 +52,10 @@ export {
49
52
  f as Badge,
50
53
  M as Button,
51
54
  v as Calendar,
52
- k as Card,
53
- B as CardAction,
54
- F as CardContent,
55
- H as CardDescription,
55
+ I as Card,
56
+ k as CardAction,
57
+ B as CardContent,
58
+ F as CardDescription,
56
59
  G as CardFooter,
57
60
  L as CardHeader,
58
61
  R as CardTitle,
@@ -83,77 +86,83 @@ export {
83
86
  be as DropdownMenuSub,
84
87
  Se as DropdownMenuSubContent,
85
88
  ue as DropdownMenuSubTrigger,
86
- De as DropdownMenuTrigger,
87
- xe as Input,
88
- fe as Label,
89
- Me as Pagination,
90
- se as PaginationContent,
91
- Ae as PaginationEllipsis,
92
- Pe as PaginationItem,
93
- ce as PaginationLink,
94
- we as PaginationNext,
95
- he as PaginationPrevious,
96
- Ie as PasswordRulesChecker,
97
- Be as Popover,
98
- Fe as PopoverAnchor,
99
- He as PopoverContent,
100
- Ge as PopoverTrigger,
101
- Re as Select,
102
- Oe as Separator,
103
- Ne as Sheet,
104
- Ve as SheetBody,
105
- je as SheetClose,
106
- qe as SheetContent,
107
- ze as SheetDescription,
108
- Je as SheetFooter,
109
- Ke as SheetHeader,
110
- Qe as SheetTitle,
111
- Ue as SheetTrigger,
112
- Xe as Sidebar,
113
- Ye as SidebarContent,
114
- Ze as SidebarFooter,
115
- _e as SidebarGroup,
116
- $e as SidebarGroupAction,
117
- eo as SidebarGroupContent,
118
- oo as SidebarGroupLabel,
119
- ro as SidebarHeader,
120
- to as SidebarInput,
121
- ao as SidebarInset,
122
- io as SidebarMenu,
123
- no as SidebarMenuAction,
124
- lo as SidebarMenuBadge,
125
- po as SidebarMenuButton,
126
- go as SidebarMenuItem,
127
- bo as SidebarMenuSkeleton,
128
- So as SidebarMenuSub,
129
- uo as SidebarMenuSubButton,
130
- Do as SidebarMenuSubItem,
131
- mo as SidebarProvider,
132
- xo as SidebarRail,
133
- To as SidebarSeparator,
134
- fo as SidebarTrigger,
135
- so as SimplePagination,
136
- Po as SimpleTooltip,
137
- wo as Skeleton,
138
- vo as Switch,
139
- Fo as Table,
140
- Ho as TableBody,
141
- Go as TableCaption,
142
- Lo as TableCell,
143
- Ro as TableFooter,
144
- yo as TableHead,
145
- Oo as TableHeader,
146
- Eo as TableRow,
147
- Vo as Tabs,
148
- jo as TabsContent,
149
- qo as TabsList,
150
- zo as TabsTrigger,
151
- Ko as Textarea,
152
- ko as Toaster,
153
- Uo as Tooltip,
154
- Wo as TooltipContent,
155
- Xo as TooltipProvider,
156
- Yo as TooltipTrigger,
89
+ me as DropdownMenuTrigger,
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,
157
165
  s as buttonVariants,
158
- Co as useSidebar
166
+ wo as useSidebar,
167
+ ir as useTheme
159
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
+ };
@@ -0,0 +1,13 @@
1
+ type Theme = "dark" | "light" | "system";
2
+ type ThemeProviderProps = {
3
+ children: React.ReactNode;
4
+ defaultTheme?: Theme;
5
+ storageKey?: string;
6
+ };
7
+ type ThemeProviderState = {
8
+ theme: Theme;
9
+ setTheme: (theme: Theme) => void;
10
+ };
11
+ export declare function ThemeProvider({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare const useTheme: () => ThemeProviderState;
13
+ export {};
@@ -0,0 +1,45 @@
1
+ var h = Object.defineProperty;
2
+ var s = (e, r) => h(e, "name", { value: r, configurable: !0 });
3
+ import { jsx as u } from "react/jsx-runtime";
4
+ import { useState as l, useEffect as T, createContext as f, useContext as v } from "react";
5
+ const w = {
6
+ theme: "system",
7
+ setTheme: /* @__PURE__ */ s(() => null, "setTheme")
8
+ }, n = f(w);
9
+ function P({
10
+ children: e,
11
+ defaultTheme: r = "system",
12
+ storageKey: m = "vite-ui-theme",
13
+ ...i
14
+ }) {
15
+ const [o, c] = l(
16
+ () => localStorage.getItem(m) || r
17
+ );
18
+ T(() => {
19
+ const t = window.document.documentElement;
20
+ if (t.classList.remove("light", "dark"), o === "system") {
21
+ const d = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
22
+ t.classList.add(d);
23
+ return;
24
+ }
25
+ t.classList.add(o);
26
+ }, [o]);
27
+ const a = {
28
+ theme: o,
29
+ setTheme: /* @__PURE__ */ s((t) => {
30
+ localStorage.setItem(m, t), c(t);
31
+ }, "setTheme")
32
+ };
33
+ return /* @__PURE__ */ u(n.Provider, { ...i, value: a, children: e });
34
+ }
35
+ s(P, "ThemeProvider");
36
+ const S = /* @__PURE__ */ s(() => {
37
+ const e = v(n);
38
+ if (e === void 0)
39
+ throw new Error("useTheme must be used within a ThemeProvider");
40
+ return e;
41
+ }, "useTheme");
42
+ export {
43
+ P as ThemeProvider,
44
+ S as useTheme
45
+ };
@@ -392,6 +392,9 @@
392
392
  .fc\:h-12 {
393
393
  height: calc(var(--fc-spacing) * 12);
394
394
  }
395
+ .fc\:h-\[1\.2rem\] {
396
+ height: 1.2rem;
397
+ }
395
398
  .fc\:h-\[1\.15rem\] {
396
399
  height: 1.15rem;
397
400
  }
@@ -437,9 +440,15 @@
437
440
  .fc\:w-8 {
438
441
  width: calc(var(--fc-spacing) * 8);
439
442
  }
443
+ .fc\:w-64 {
444
+ width: calc(var(--fc-spacing) * 64);
445
+ }
440
446
  .fc\:w-72 {
441
447
  width: calc(var(--fc-spacing) * 72);
442
448
  }
449
+ .fc\:w-\[1\.2rem\] {
450
+ width: 1.2rem;
451
+ }
443
452
  .fc\:w-\[90\%\] {
444
453
  width: 90%;
445
454
  }
@@ -482,6 +491,9 @@
482
491
  .fc\:origin-\(--radix-dropdown-menu-content-transform-origin\) {
483
492
  transform-origin: var(--radix-dropdown-menu-content-transform-origin);
484
493
  }
494
+ .fc\:origin-\(--radix-hover-card-content-transform-origin\) {
495
+ transform-origin: var(--radix-hover-card-content-transform-origin);
496
+ }
485
497
  .fc\:origin-\(--radix-popover-content-transform-origin\) {
486
498
  transform-origin: var(--radix-popover-content-transform-origin);
487
499
  }
@@ -512,9 +524,27 @@
512
524
  --tw-translate-y: calc(-50% - 2px);
513
525
  translate: var(--tw-translate-x) var(--tw-translate-y);
514
526
  }
527
+ .fc\:scale-0 {
528
+ --tw-scale-x: 0%;
529
+ --tw-scale-y: 0%;
530
+ --tw-scale-z: 0%;
531
+ scale: var(--tw-scale-x) var(--tw-scale-y);
532
+ }
533
+ .fc\:scale-100 {
534
+ --tw-scale-x: 100%;
535
+ --tw-scale-y: 100%;
536
+ --tw-scale-z: 100%;
537
+ scale: var(--tw-scale-x) var(--tw-scale-y);
538
+ }
539
+ .fc\:rotate-0 {
540
+ rotate: 0deg;
541
+ }
515
542
  .fc\:rotate-45 {
516
543
  rotate: 45deg;
517
544
  }
545
+ .fc\:rotate-90 {
546
+ rotate: 90deg;
547
+ }
518
548
  .fc\:animate-in {
519
549
  animation: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none);
520
550
  }
@@ -2397,6 +2427,32 @@
2397
2427
  }
2398
2428
  }
2399
2429
  }
2430
+ .fc\:dark\:scale-0 {
2431
+ &:is(.dark *) {
2432
+ --tw-scale-x: 0%;
2433
+ --tw-scale-y: 0%;
2434
+ --tw-scale-z: 0%;
2435
+ scale: var(--tw-scale-x) var(--tw-scale-y);
2436
+ }
2437
+ }
2438
+ .fc\:dark\:scale-100 {
2439
+ &:is(.dark *) {
2440
+ --tw-scale-x: 100%;
2441
+ --tw-scale-y: 100%;
2442
+ --tw-scale-z: 100%;
2443
+ scale: var(--tw-scale-x) var(--tw-scale-y);
2444
+ }
2445
+ }
2446
+ .fc\:dark\:-rotate-90 {
2447
+ &:is(.dark *) {
2448
+ rotate: calc(90deg * -1);
2449
+ }
2450
+ }
2451
+ .fc\:dark\:rotate-0 {
2452
+ &:is(.dark *) {
2453
+ rotate: 0deg;
2454
+ }
2455
+ }
2400
2456
  .fc\:dark\:bg-foreground {
2401
2457
  &:is(.dark *) {
2402
2458
  background-color: var(--foreground);
@@ -2874,6 +2930,21 @@
2874
2930
  inherits: false;
2875
2931
  initial-value: 0;
2876
2932
  }
2933
+ @property --tw-scale-x {
2934
+ syntax: "*";
2935
+ inherits: false;
2936
+ initial-value: 1;
2937
+ }
2938
+ @property --tw-scale-y {
2939
+ syntax: "*";
2940
+ inherits: false;
2941
+ initial-value: 1;
2942
+ }
2943
+ @property --tw-scale-z {
2944
+ syntax: "*";
2945
+ inherits: false;
2946
+ initial-value: 1;
2947
+ }
2877
2948
  @property --tw-space-y-reverse {
2878
2949
  syntax: "*";
2879
2950
  inherits: false;
@@ -3027,6 +3098,9 @@
3027
3098
  --tw-translate-x: 0;
3028
3099
  --tw-translate-y: 0;
3029
3100
  --tw-translate-z: 0;
3101
+ --tw-scale-x: 1;
3102
+ --tw-scale-y: 1;
3103
+ --tw-scale-z: 1;
3030
3104
  --tw-space-y-reverse: 0;
3031
3105
  --tw-space-x-reverse: 0;
3032
3106
  --tw-border-style: solid;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/F1na/fina-react-ds"
6
6
  },
7
7
  "private": false,
8
- "version": "1.0.5",
8
+ "version": "1.0.7",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"