@lglab/compose-ui 0.22.0 → 0.24.0
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.d.ts +165 -0
- package/dist/index.js +209 -183
- package/dist/navigation-menu.d.ts +96 -0
- package/dist/navigation-menu.js +176 -0
- package/dist/toast.d.ts +81 -0
- package/dist/toast.js +151 -0
- package/package.json +9 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { JSX } from 'react/jsx-runtime';
|
|
|
10
10
|
import { Menu } from '@base-ui/react/menu';
|
|
11
11
|
import { Menubar } from '@base-ui/react/menubar';
|
|
12
12
|
import { Meter } from '@base-ui/react/meter';
|
|
13
|
+
import { NavigationMenu } from '@base-ui/react/navigation-menu';
|
|
13
14
|
import { Popover } from '@base-ui/react/popover';
|
|
14
15
|
import { PreviewCard } from '@base-ui/react/preview-card';
|
|
15
16
|
import { Progress } from '@base-ui/react/progress';
|
|
@@ -19,6 +20,7 @@ import { Separator as Separator_2 } from '@base-ui/react/separator';
|
|
|
19
20
|
import { Slider } from '@base-ui/react/slider';
|
|
20
21
|
import { Switch } from '@base-ui/react/switch';
|
|
21
22
|
import { Tabs } from '@base-ui/react/tabs';
|
|
23
|
+
import { Toast } from '@base-ui/react/toast';
|
|
22
24
|
import { Toggle as Toggle_2 } from '@base-ui/react/toggle';
|
|
23
25
|
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
|
24
26
|
import { Tooltip } from '@base-ui/react/tooltip';
|
|
@@ -933,6 +935,97 @@ export declare const MeterValue: {
|
|
|
933
935
|
|
|
934
936
|
export declare type MeterValueProps = React_2.ComponentProps<typeof Meter.Value>;
|
|
935
937
|
|
|
938
|
+
export declare const NavigationMenuArrow: {
|
|
939
|
+
({ className, ...props }: NavigationMenuArrowProps): JSX.Element;
|
|
940
|
+
displayName: string;
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
export declare type NavigationMenuArrowProps = React_2.ComponentProps<typeof NavigationMenu.Arrow>;
|
|
944
|
+
|
|
945
|
+
export declare const NavigationMenuBackdrop: {
|
|
946
|
+
({ className, ...props }: NavigationMenuBackdropProps): JSX.Element;
|
|
947
|
+
displayName: string;
|
|
948
|
+
};
|
|
949
|
+
|
|
950
|
+
export declare type NavigationMenuBackdropProps = React_2.ComponentProps<typeof NavigationMenu.Backdrop>;
|
|
951
|
+
|
|
952
|
+
export declare const NavigationMenuContent: {
|
|
953
|
+
({ className, ...props }: NavigationMenuContentProps): JSX.Element;
|
|
954
|
+
displayName: string;
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
export declare type NavigationMenuContentProps = React_2.ComponentProps<typeof NavigationMenu.Content>;
|
|
958
|
+
|
|
959
|
+
export declare const NavigationMenuIcon: {
|
|
960
|
+
({ className, ...props }: NavigationMenuIconProps): JSX.Element;
|
|
961
|
+
displayName: string;
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
export declare type NavigationMenuIconProps = React_2.ComponentProps<typeof NavigationMenu.Icon>;
|
|
965
|
+
|
|
966
|
+
export declare const NavigationMenuItem: {
|
|
967
|
+
({ className, ...props }: NavigationMenuItemProps): JSX.Element;
|
|
968
|
+
displayName: string;
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
export declare type NavigationMenuItemProps = React_2.ComponentProps<typeof NavigationMenu.Item>;
|
|
972
|
+
|
|
973
|
+
export declare const NavigationMenuLink: {
|
|
974
|
+
({ className, ...props }: NavigationMenuLinkProps): JSX.Element;
|
|
975
|
+
displayName: string;
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
export declare type NavigationMenuLinkProps = React_2.ComponentProps<typeof NavigationMenu.Link>;
|
|
979
|
+
|
|
980
|
+
export declare const NavigationMenuList: {
|
|
981
|
+
({ className, ...props }: NavigationMenuListProps): JSX.Element;
|
|
982
|
+
displayName: string;
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
export declare type NavigationMenuListProps = React_2.ComponentProps<typeof NavigationMenu.List>;
|
|
986
|
+
|
|
987
|
+
export declare const NavigationMenuPopup: {
|
|
988
|
+
({ className, ...props }: NavigationMenuPopupProps): JSX.Element;
|
|
989
|
+
displayName: string;
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
export declare type NavigationMenuPopupProps = React_2.ComponentProps<typeof NavigationMenu.Popup>;
|
|
993
|
+
|
|
994
|
+
export declare const NavigationMenuPortal: {
|
|
995
|
+
(props: NavigationMenuPortalProps): JSX.Element;
|
|
996
|
+
displayName: string;
|
|
997
|
+
};
|
|
998
|
+
|
|
999
|
+
export declare type NavigationMenuPortalProps = React_2.ComponentProps<typeof NavigationMenu.Portal>;
|
|
1000
|
+
|
|
1001
|
+
export declare const NavigationMenuPositioner: {
|
|
1002
|
+
({ className, sideOffset, collisionPadding, ...props }: NavigationMenuPositionerProps): JSX.Element;
|
|
1003
|
+
displayName: string;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
export declare type NavigationMenuPositionerProps = React_2.ComponentProps<typeof NavigationMenu.Positioner>;
|
|
1007
|
+
|
|
1008
|
+
export declare const NavigationMenuRoot: {
|
|
1009
|
+
({ className, ...props }: NavigationMenuRootProps): JSX.Element;
|
|
1010
|
+
displayName: string;
|
|
1011
|
+
};
|
|
1012
|
+
|
|
1013
|
+
export declare type NavigationMenuRootProps = React_2.ComponentProps<typeof NavigationMenu.Root>;
|
|
1014
|
+
|
|
1015
|
+
export declare const NavigationMenuTrigger: {
|
|
1016
|
+
({ className, ...props }: NavigationMenuTriggerProps): JSX.Element;
|
|
1017
|
+
displayName: string;
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
export declare type NavigationMenuTriggerProps = React_2.ComponentProps<typeof NavigationMenu.Trigger>;
|
|
1021
|
+
|
|
1022
|
+
export declare const NavigationMenuViewport: {
|
|
1023
|
+
({ className, ...props }: NavigationMenuViewportProps): JSX.Element;
|
|
1024
|
+
displayName: string;
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
export declare type NavigationMenuViewportProps = React_2.ComponentProps<typeof NavigationMenu.Viewport>;
|
|
1028
|
+
|
|
936
1029
|
export declare const PopoverArrow: {
|
|
937
1030
|
({ className, ...props }: PopoverArrowProps): JSX.Element;
|
|
938
1031
|
displayName: string;
|
|
@@ -1243,6 +1336,78 @@ export declare type TabsTabProps = React_2.ComponentProps<typeof Tabs.Tab> & {
|
|
|
1243
1336
|
size?: 'sm' | 'default' | 'lg';
|
|
1244
1337
|
};
|
|
1245
1338
|
|
|
1339
|
+
export { Toast }
|
|
1340
|
+
|
|
1341
|
+
export declare const ToastAction: {
|
|
1342
|
+
({ className, variant, size, ...props }: ToastActionProps): JSX.Element;
|
|
1343
|
+
displayName: string;
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
export declare type ToastActionProps = React_2.ComponentProps<typeof Toast.Action> & {
|
|
1347
|
+
variant?: ButtonVariant;
|
|
1348
|
+
size?: ButtonSize;
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
export declare const ToastClose: {
|
|
1352
|
+
({ className, ...props }: ToastCloseProps): JSX.Element;
|
|
1353
|
+
displayName: string;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
export declare type ToastCloseProps = React_2.ComponentProps<typeof Toast.Close>;
|
|
1357
|
+
|
|
1358
|
+
export declare const ToastContent: {
|
|
1359
|
+
({ className, ...props }: ToastContentProps): JSX.Element;
|
|
1360
|
+
displayName: string;
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
export declare type ToastContentProps = React_2.ComponentProps<typeof Toast.Content>;
|
|
1364
|
+
|
|
1365
|
+
export declare const ToastDescription: {
|
|
1366
|
+
({ className, ...props }: ToastDescriptionProps): JSX.Element;
|
|
1367
|
+
displayName: string;
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
export declare type ToastDescriptionProps = React_2.ComponentProps<typeof Toast.Description>;
|
|
1371
|
+
|
|
1372
|
+
declare type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
1373
|
+
|
|
1374
|
+
export declare const ToastPositioner: {
|
|
1375
|
+
({ className, ...props }: ToastPositionerProps): JSX.Element;
|
|
1376
|
+
displayName: string;
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
export declare type ToastPositionerProps = React_2.ComponentProps<typeof Toast.Positioner>;
|
|
1380
|
+
|
|
1381
|
+
export declare const ToastProvider: {
|
|
1382
|
+
(props: ToastProviderProps): JSX.Element;
|
|
1383
|
+
displayName: string;
|
|
1384
|
+
};
|
|
1385
|
+
|
|
1386
|
+
export declare type ToastProviderProps = React_2.ComponentProps<typeof Toast.Provider>;
|
|
1387
|
+
|
|
1388
|
+
export declare const ToastRoot: {
|
|
1389
|
+
({ className, ...props }: ToastRootProps): JSX.Element;
|
|
1390
|
+
displayName: string;
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
export declare type ToastRootProps = React_2.ComponentProps<typeof Toast.Root>;
|
|
1394
|
+
|
|
1395
|
+
export declare const ToastTitle: {
|
|
1396
|
+
({ className, ...props }: ToastTitleProps): JSX.Element;
|
|
1397
|
+
displayName: string;
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
export declare type ToastTitleProps = React_2.ComponentProps<typeof Toast.Title>;
|
|
1401
|
+
|
|
1402
|
+
export declare const ToastViewport: {
|
|
1403
|
+
({ className, position, ...props }: ToastViewportProps): JSX.Element;
|
|
1404
|
+
displayName: string;
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
export declare type ToastViewportProps = React_2.ComponentProps<typeof Toast.Viewport> & {
|
|
1408
|
+
position?: ToastPosition;
|
|
1409
|
+
};
|
|
1410
|
+
|
|
1246
1411
|
export declare const Toggle: {
|
|
1247
1412
|
({ className, variant, size, ...props }: ToggleProps): JSX.Element;
|
|
1248
1413
|
displayName: string;
|
package/dist/index.js
CHANGED
|
@@ -1,194 +1,220 @@
|
|
|
1
1
|
import { Button as r } from "./button.js";
|
|
2
|
-
import { CollapsiblePanel as a, CollapsibleRoot as
|
|
3
|
-
import { AlertDialogBackdrop as
|
|
4
|
-
import { AlertDialog as
|
|
5
|
-
import { AvatarFallback as
|
|
6
|
-
import { ScrollAreaContent as
|
|
7
|
-
import { Separator as
|
|
8
|
-
import { SwitchRoot as V, SwitchThumb as
|
|
9
|
-
import { Toggle as
|
|
10
|
-
import { TabsIndicator as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
2
|
+
import { CollapsiblePanel as a, CollapsibleRoot as i, CollapsibleTrigger as n } from "./collapsible.js";
|
|
3
|
+
import { AlertDialogBackdrop as l, AlertDialogClose as p, AlertDialogDescription as M, AlertDialogPopup as g, AlertDialogPortal as d, AlertDialogRoot as m, AlertDialogTitle as b, AlertDialogTrigger as c, AlertDialogViewport as C } from "./alert-dialog.js";
|
|
4
|
+
import { AlertDialog as x } from "@base-ui/react/alert-dialog";
|
|
5
|
+
import { AvatarFallback as s, AvatarImage as v, AvatarRoot as D, AvatarStack as R } from "./avatar.js";
|
|
6
|
+
import { ScrollAreaContent as A, ScrollAreaCorner as w, ScrollAreaRoot as f, ScrollAreaScrollbar as S, ScrollAreaThumb as k, ScrollAreaViewport as h } from "./scroll-area.js";
|
|
7
|
+
import { Separator as N } from "./separator.js";
|
|
8
|
+
import { SwitchRoot as V, SwitchThumb as B } from "./switch.js";
|
|
9
|
+
import { Toggle as H } from "./toggle.js";
|
|
10
|
+
import { TabsIndicator as q, TabsList as y, TabsPanel as z, TabsRoot as E, TabsTab as J } from "./tabs.js";
|
|
11
|
+
import { ToastAction as O, ToastClose as Q, ToastContent as U, ToastDescription as W, ToastPositioner as X, ToastProvider as Y, ToastRoot as Z, ToastTitle as _, ToastViewport as $ } from "./toast.js";
|
|
12
|
+
import { DialogBackdrop as eo, DialogClose as ro, DialogDescription as to, DialogFooter as ao, DialogHeader as io, DialogPopup as no, DialogPortal as uo, DialogRoot as lo, DialogTitle as po, DialogTrigger as Mo } from "./dialog.js";
|
|
13
|
+
import { DrawerBackdrop as mo, DrawerClose as bo, DrawerContent as co, DrawerDescription as Co, DrawerFooter as Po, DrawerHeader as xo, DrawerPopup as To, DrawerPortal as so, DrawerRoot as vo, DrawerTitle as Do, DrawerTrigger as Ro } from "./drawer.js";
|
|
14
|
+
import { AccordionHeader as Ao, AccordionItem as wo, AccordionPanel as fo, AccordionRoot as So, AccordionTrigger as ko } from "./accordion.js";
|
|
15
|
+
import { MeterIndicator as Lo, MeterLabel as No, MeterRoot as Go, MeterTrack as Vo, MeterValue as Bo } from "./meter.js";
|
|
16
|
+
import { NavigationMenuArrow as Ho, NavigationMenuBackdrop as jo, NavigationMenuContent as qo, NavigationMenuIcon as yo, NavigationMenuItem as zo, NavigationMenuLink as Eo, NavigationMenuList as Jo, NavigationMenuPopup as Ko, NavigationMenuPortal as Oo, NavigationMenuPositioner as Qo, NavigationMenuRoot as Uo, NavigationMenuTrigger as Wo, NavigationMenuViewport as Xo } from "./navigation-menu.js";
|
|
17
|
+
import { MenuArrow as Zo, MenuCheckboxItem as _o, MenuCheckboxItemIndicator as $o, MenuCheckboxItemLabel as oe, MenuGroup as ee, MenuGroupLabel as re, MenuItem as te, MenuPopup as ae, MenuPortal as ie, MenuPositioner as ne, MenuRadioGroup as ue, MenuRadioItem as le, MenuRadioItemIndicator as pe, MenuRadioItemLabel as Me, MenuRoot as ge, MenuSeparator as de, MenuSubmenuRoot as me, MenuSubmenuTrigger as be, MenuTrigger as ce } from "./menu.js";
|
|
18
|
+
import { PopoverArrow as Pe, PopoverBackdrop as xe, PopoverClose as Te, PopoverDescription as se, PopoverPopup as ve, PopoverPortal as De, PopoverPositioner as Re, PopoverRoot as Ie, PopoverTitle as Ae, PopoverTrigger as we, PopoverViewport as fe } from "./popover.js";
|
|
19
|
+
import { ProgressIndicator as ke, ProgressLabel as he, ProgressRoot as Le, ProgressTrack as Ne, ProgressValue as Ge } from "./progress.js";
|
|
20
|
+
import { ToggleGroupItem as Be, ToggleGroupRoot as Fe } from "./toggle-group.js";
|
|
21
|
+
import { CardContent as je, CardDescription as qe, CardFooter as ye, CardHeader as ze, CardMedia as Ee, CardRoot as Je, CardSection as Ke, CardTitle as Oe } from "./card.js";
|
|
22
|
+
import { ContextMenuArrow as Ue, ContextMenuCheckboxItem as We, ContextMenuCheckboxItemIndicator as Xe, ContextMenuCheckboxItemLabel as Ye, ContextMenuGroup as Ze, ContextMenuGroupLabel as _e, ContextMenuItem as $e, ContextMenuPopup as or, ContextMenuPortal as er, ContextMenuPositioner as rr, ContextMenuRadioGroup as tr, ContextMenuRadioItem as ar, ContextMenuRadioItemIndicator as ir, ContextMenuRadioItemLabel as nr, ContextMenuRoot as ur, ContextMenuSeparator as lr, ContextMenuSubmenuRoot as pr, ContextMenuSubmenuTrigger as Mr, ContextMenuTrigger as gr } from "./context-menu.js";
|
|
23
|
+
import { MenubarArrow as mr, MenubarCheckboxItem as br, MenubarCheckboxItemIndicator as cr, MenubarCheckboxItemLabel as Cr, MenubarGroup as Pr, MenubarGroupLabel as xr, MenubarItem as Tr, MenubarMenu as sr, MenubarPopup as vr, MenubarPortal as Dr, MenubarPositioner as Rr, MenubarRadioGroup as Ir, MenubarRadioItem as Ar, MenubarRadioItemIndicator as wr, MenubarRadioItemLabel as fr, MenubarRoot as Sr, MenubarSeparator as kr, MenubarSubmenuRoot as hr, MenubarSubmenuTrigger as Lr, MenubarTrigger as Nr } from "./menubar.js";
|
|
24
|
+
import { SliderControl as Vr, SliderIndicator as Br, SliderRoot as Fr, SliderThumb as Hr, SliderTrack as jr, SliderValue as qr } from "./slider.js";
|
|
25
|
+
import { TooltipArrow as zr, TooltipPopup as Er, TooltipPortal as Jr, TooltipPositioner as Kr, TooltipProvider as Or, TooltipRoot as Qr, TooltipTrigger as Ur } from "./tooltip.js";
|
|
26
|
+
import { PreviewCardArrow as Xr, PreviewCardBackdrop as Yr, PreviewCardPopup as Zr, PreviewCardPortal as _r, PreviewCardPositioner as $r, PreviewCardRoot as ot, PreviewCardTrigger as et } from "./preview-card.js";
|
|
27
|
+
import { Toast as tt } from "@base-ui/react/toast";
|
|
25
28
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
Ao as AccordionHeader,
|
|
30
|
+
wo as AccordionItem,
|
|
31
|
+
fo as AccordionPanel,
|
|
32
|
+
So as AccordionRoot,
|
|
33
|
+
ko as AccordionTrigger,
|
|
34
|
+
x as AlertDialog,
|
|
35
|
+
l as AlertDialogBackdrop,
|
|
33
36
|
p as AlertDialogClose,
|
|
34
37
|
M as AlertDialogDescription,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
g as AlertDialogPopup,
|
|
39
|
+
d as AlertDialogPortal,
|
|
40
|
+
m as AlertDialogRoot,
|
|
41
|
+
b as AlertDialogTitle,
|
|
42
|
+
c as AlertDialogTrigger,
|
|
43
|
+
C as AlertDialogViewport,
|
|
44
|
+
s as AvatarFallback,
|
|
45
|
+
v as AvatarImage,
|
|
46
|
+
D as AvatarRoot,
|
|
47
|
+
R as AvatarStack,
|
|
45
48
|
r as Button,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
je as CardContent,
|
|
50
|
+
qe as CardDescription,
|
|
51
|
+
ye as CardFooter,
|
|
52
|
+
ze as CardHeader,
|
|
53
|
+
Ee as CardMedia,
|
|
54
|
+
Je as CardRoot,
|
|
55
|
+
Ke as CardSection,
|
|
56
|
+
Oe as CardTitle,
|
|
54
57
|
a as CollapsiblePanel,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
58
|
+
i as CollapsibleRoot,
|
|
59
|
+
n as CollapsibleTrigger,
|
|
60
|
+
Ue as ContextMenuArrow,
|
|
61
|
+
We as ContextMenuCheckboxItem,
|
|
62
|
+
Xe as ContextMenuCheckboxItemIndicator,
|
|
63
|
+
Ye as ContextMenuCheckboxItemLabel,
|
|
64
|
+
Ze as ContextMenuGroup,
|
|
65
|
+
_e as ContextMenuGroupLabel,
|
|
66
|
+
$e as ContextMenuItem,
|
|
67
|
+
or as ContextMenuPopup,
|
|
68
|
+
er as ContextMenuPortal,
|
|
69
|
+
rr as ContextMenuPositioner,
|
|
70
|
+
tr as ContextMenuRadioGroup,
|
|
71
|
+
ar as ContextMenuRadioItem,
|
|
72
|
+
ir as ContextMenuRadioItemIndicator,
|
|
73
|
+
nr as ContextMenuRadioItemLabel,
|
|
74
|
+
ur as ContextMenuRoot,
|
|
75
|
+
lr as ContextMenuSeparator,
|
|
76
|
+
pr as ContextMenuSubmenuRoot,
|
|
77
|
+
Mr as ContextMenuSubmenuTrigger,
|
|
78
|
+
gr as ContextMenuTrigger,
|
|
79
|
+
eo as DialogBackdrop,
|
|
80
|
+
ro as DialogClose,
|
|
81
|
+
to as DialogDescription,
|
|
82
|
+
ao as DialogFooter,
|
|
83
|
+
io as DialogHeader,
|
|
84
|
+
no as DialogPopup,
|
|
85
|
+
uo as DialogPortal,
|
|
86
|
+
lo as DialogRoot,
|
|
87
|
+
po as DialogTitle,
|
|
88
|
+
Mo as DialogTrigger,
|
|
89
|
+
mo as DrawerBackdrop,
|
|
90
|
+
bo as DrawerClose,
|
|
91
|
+
co as DrawerContent,
|
|
92
|
+
Co as DrawerDescription,
|
|
93
|
+
Po as DrawerFooter,
|
|
94
|
+
xo as DrawerHeader,
|
|
95
|
+
To as DrawerPopup,
|
|
96
|
+
so as DrawerPortal,
|
|
97
|
+
vo as DrawerRoot,
|
|
98
|
+
Do as DrawerTitle,
|
|
99
|
+
Ro as DrawerTrigger,
|
|
100
|
+
Zo as MenuArrow,
|
|
101
|
+
_o as MenuCheckboxItem,
|
|
102
|
+
$o as MenuCheckboxItemIndicator,
|
|
103
|
+
oe as MenuCheckboxItemLabel,
|
|
104
|
+
ee as MenuGroup,
|
|
105
|
+
re as MenuGroupLabel,
|
|
106
|
+
te as MenuItem,
|
|
107
|
+
ae as MenuPopup,
|
|
108
|
+
ie as MenuPortal,
|
|
109
|
+
ne as MenuPositioner,
|
|
110
|
+
ue as MenuRadioGroup,
|
|
111
|
+
le as MenuRadioItem,
|
|
112
|
+
pe as MenuRadioItemIndicator,
|
|
113
|
+
Me as MenuRadioItemLabel,
|
|
114
|
+
ge as MenuRoot,
|
|
115
|
+
de as MenuSeparator,
|
|
116
|
+
me as MenuSubmenuRoot,
|
|
117
|
+
be as MenuSubmenuTrigger,
|
|
118
|
+
ce as MenuTrigger,
|
|
119
|
+
mr as MenubarArrow,
|
|
120
|
+
br as MenubarCheckboxItem,
|
|
121
|
+
cr as MenubarCheckboxItemIndicator,
|
|
122
|
+
Cr as MenubarCheckboxItemLabel,
|
|
123
|
+
Pr as MenubarGroup,
|
|
124
|
+
xr as MenubarGroupLabel,
|
|
125
|
+
Tr as MenubarItem,
|
|
126
|
+
sr as MenubarMenu,
|
|
127
|
+
vr as MenubarPopup,
|
|
128
|
+
Dr as MenubarPortal,
|
|
129
|
+
Rr as MenubarPositioner,
|
|
130
|
+
Ir as MenubarRadioGroup,
|
|
131
|
+
Ar as MenubarRadioItem,
|
|
132
|
+
wr as MenubarRadioItemIndicator,
|
|
133
|
+
fr as MenubarRadioItemLabel,
|
|
134
|
+
Sr as MenubarRoot,
|
|
135
|
+
kr as MenubarSeparator,
|
|
136
|
+
hr as MenubarSubmenuRoot,
|
|
137
|
+
Lr as MenubarSubmenuTrigger,
|
|
138
|
+
Nr as MenubarTrigger,
|
|
139
|
+
Lo as MeterIndicator,
|
|
140
|
+
No as MeterLabel,
|
|
141
|
+
Go as MeterRoot,
|
|
142
|
+
Vo as MeterTrack,
|
|
143
|
+
Bo as MeterValue,
|
|
144
|
+
Ho as NavigationMenuArrow,
|
|
145
|
+
jo as NavigationMenuBackdrop,
|
|
146
|
+
qo as NavigationMenuContent,
|
|
147
|
+
yo as NavigationMenuIcon,
|
|
148
|
+
zo as NavigationMenuItem,
|
|
149
|
+
Eo as NavigationMenuLink,
|
|
150
|
+
Jo as NavigationMenuList,
|
|
151
|
+
Ko as NavigationMenuPopup,
|
|
152
|
+
Oo as NavigationMenuPortal,
|
|
153
|
+
Qo as NavigationMenuPositioner,
|
|
154
|
+
Uo as NavigationMenuRoot,
|
|
155
|
+
Wo as NavigationMenuTrigger,
|
|
156
|
+
Xo as NavigationMenuViewport,
|
|
157
|
+
Pe as PopoverArrow,
|
|
158
|
+
xe as PopoverBackdrop,
|
|
159
|
+
Te as PopoverClose,
|
|
160
|
+
se as PopoverDescription,
|
|
161
|
+
ve as PopoverPopup,
|
|
162
|
+
De as PopoverPortal,
|
|
163
|
+
Re as PopoverPositioner,
|
|
164
|
+
Ie as PopoverRoot,
|
|
165
|
+
Ae as PopoverTitle,
|
|
166
|
+
we as PopoverTrigger,
|
|
167
|
+
fe as PopoverViewport,
|
|
168
|
+
Xr as PreviewCardArrow,
|
|
169
|
+
Yr as PreviewCardBackdrop,
|
|
170
|
+
Zr as PreviewCardPopup,
|
|
171
|
+
_r as PreviewCardPortal,
|
|
172
|
+
$r as PreviewCardPositioner,
|
|
173
|
+
ot as PreviewCardRoot,
|
|
174
|
+
et as PreviewCardTrigger,
|
|
175
|
+
ke as ProgressIndicator,
|
|
176
|
+
he as ProgressLabel,
|
|
177
|
+
Le as ProgressRoot,
|
|
178
|
+
Ne as ProgressTrack,
|
|
179
|
+
Ge as ProgressValue,
|
|
180
|
+
A as ScrollAreaContent,
|
|
181
|
+
w as ScrollAreaCorner,
|
|
166
182
|
f as ScrollAreaRoot,
|
|
167
|
-
|
|
183
|
+
S as ScrollAreaScrollbar,
|
|
168
184
|
k as ScrollAreaThumb,
|
|
169
185
|
h as ScrollAreaViewport,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
186
|
+
N as Separator,
|
|
187
|
+
Vr as SliderControl,
|
|
188
|
+
Br as SliderIndicator,
|
|
189
|
+
Fr as SliderRoot,
|
|
190
|
+
Hr as SliderThumb,
|
|
191
|
+
jr as SliderTrack,
|
|
192
|
+
qr as SliderValue,
|
|
177
193
|
V as SwitchRoot,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
B as SwitchThumb,
|
|
195
|
+
q as TabsIndicator,
|
|
196
|
+
y as TabsList,
|
|
197
|
+
z as TabsPanel,
|
|
198
|
+
E as TabsRoot,
|
|
199
|
+
J as TabsTab,
|
|
200
|
+
tt as Toast,
|
|
201
|
+
O as ToastAction,
|
|
202
|
+
Q as ToastClose,
|
|
203
|
+
U as ToastContent,
|
|
204
|
+
W as ToastDescription,
|
|
205
|
+
X as ToastPositioner,
|
|
206
|
+
Y as ToastProvider,
|
|
207
|
+
Z as ToastRoot,
|
|
208
|
+
_ as ToastTitle,
|
|
209
|
+
$ as ToastViewport,
|
|
210
|
+
H as Toggle,
|
|
211
|
+
Be as ToggleGroupItem,
|
|
212
|
+
Fe as ToggleGroupRoot,
|
|
213
|
+
zr as TooltipArrow,
|
|
214
|
+
Er as TooltipPopup,
|
|
215
|
+
Jr as TooltipPortal,
|
|
216
|
+
Kr as TooltipPositioner,
|
|
217
|
+
Or as TooltipProvider,
|
|
218
|
+
Qr as TooltipRoot,
|
|
219
|
+
Ur as TooltipTrigger
|
|
194
220
|
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { NavigationMenu } from '@base-ui/react/navigation-menu';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
|
|
5
|
+
export declare const NavigationMenuArrow: {
|
|
6
|
+
({ className, ...props }: NavigationMenuArrowProps): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare type NavigationMenuArrowProps = React_2.ComponentProps<typeof NavigationMenu.Arrow>;
|
|
11
|
+
|
|
12
|
+
export declare const NavigationMenuBackdrop: {
|
|
13
|
+
({ className, ...props }: NavigationMenuBackdropProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export declare type NavigationMenuBackdropProps = React_2.ComponentProps<typeof NavigationMenu.Backdrop>;
|
|
18
|
+
|
|
19
|
+
export declare const NavigationMenuContent: {
|
|
20
|
+
({ className, ...props }: NavigationMenuContentProps): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export declare type NavigationMenuContentProps = React_2.ComponentProps<typeof NavigationMenu.Content>;
|
|
25
|
+
|
|
26
|
+
export declare const NavigationMenuIcon: {
|
|
27
|
+
({ className, ...props }: NavigationMenuIconProps): JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export declare type NavigationMenuIconProps = React_2.ComponentProps<typeof NavigationMenu.Icon>;
|
|
32
|
+
|
|
33
|
+
export declare const NavigationMenuItem: {
|
|
34
|
+
({ className, ...props }: NavigationMenuItemProps): JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export declare type NavigationMenuItemProps = React_2.ComponentProps<typeof NavigationMenu.Item>;
|
|
39
|
+
|
|
40
|
+
export declare const NavigationMenuLink: {
|
|
41
|
+
({ className, ...props }: NavigationMenuLinkProps): JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare type NavigationMenuLinkProps = React_2.ComponentProps<typeof NavigationMenu.Link>;
|
|
46
|
+
|
|
47
|
+
export declare const NavigationMenuList: {
|
|
48
|
+
({ className, ...props }: NavigationMenuListProps): JSX.Element;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export declare type NavigationMenuListProps = React_2.ComponentProps<typeof NavigationMenu.List>;
|
|
53
|
+
|
|
54
|
+
export declare const NavigationMenuPopup: {
|
|
55
|
+
({ className, ...props }: NavigationMenuPopupProps): JSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export declare type NavigationMenuPopupProps = React_2.ComponentProps<typeof NavigationMenu.Popup>;
|
|
60
|
+
|
|
61
|
+
export declare const NavigationMenuPortal: {
|
|
62
|
+
(props: NavigationMenuPortalProps): JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export declare type NavigationMenuPortalProps = React_2.ComponentProps<typeof NavigationMenu.Portal>;
|
|
67
|
+
|
|
68
|
+
export declare const NavigationMenuPositioner: {
|
|
69
|
+
({ className, sideOffset, collisionPadding, ...props }: NavigationMenuPositionerProps): JSX.Element;
|
|
70
|
+
displayName: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export declare type NavigationMenuPositionerProps = React_2.ComponentProps<typeof NavigationMenu.Positioner>;
|
|
74
|
+
|
|
75
|
+
export declare const NavigationMenuRoot: {
|
|
76
|
+
({ className, ...props }: NavigationMenuRootProps): JSX.Element;
|
|
77
|
+
displayName: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export declare type NavigationMenuRootProps = React_2.ComponentProps<typeof NavigationMenu.Root>;
|
|
81
|
+
|
|
82
|
+
export declare const NavigationMenuTrigger: {
|
|
83
|
+
({ className, ...props }: NavigationMenuTriggerProps): JSX.Element;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export declare type NavigationMenuTriggerProps = React_2.ComponentProps<typeof NavigationMenu.Trigger>;
|
|
88
|
+
|
|
89
|
+
export declare const NavigationMenuViewport: {
|
|
90
|
+
({ className, ...props }: NavigationMenuViewportProps): JSX.Element;
|
|
91
|
+
displayName: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export declare type NavigationMenuViewportProps = React_2.ComponentProps<typeof NavigationMenu.Viewport>;
|
|
95
|
+
|
|
96
|
+
export { }
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { NavigationMenu as o } from "@base-ui/react/navigation-menu";
|
|
4
|
+
import { A as c } from "./arrow-svg-C6zQTvgS.js";
|
|
5
|
+
import { c as n } from "./utils-B6yFEsav.js";
|
|
6
|
+
const i = [
|
|
7
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium outline-none select-none",
|
|
8
|
+
"h-9 px-4 py-2",
|
|
9
|
+
"transition-colors",
|
|
10
|
+
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
11
|
+
"focus:bg-accent focus:text-accent-foreground"
|
|
12
|
+
], r = [
|
|
13
|
+
"group-data-content/content:block group-data-content/content:h-auto group-data-content/content:w-auto group-data-content/content:p-2",
|
|
14
|
+
"group-data-content/content:hover:bg-accent group-data-content/content:hover:text-accent-foreground"
|
|
15
|
+
], l = ({ className: t, ...a }) => /* @__PURE__ */ e(o.Root, { className: n("min-w-max", t), ...a });
|
|
16
|
+
l.displayName = "NavigationMenuRoot";
|
|
17
|
+
const u = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
18
|
+
o.List,
|
|
19
|
+
{
|
|
20
|
+
className: n("flex items-center gap-1 relative", t),
|
|
21
|
+
...a
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
u.displayName = "NavigationMenuList";
|
|
25
|
+
const g = ({ className: t, ...a }) => /* @__PURE__ */ e(o.Item, { className: n(t), ...a });
|
|
26
|
+
g.displayName = "NavigationMenuItem";
|
|
27
|
+
const p = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
28
|
+
o.Trigger,
|
|
29
|
+
{
|
|
30
|
+
className: n(
|
|
31
|
+
i,
|
|
32
|
+
r,
|
|
33
|
+
"group gap-1",
|
|
34
|
+
"group-data-content/content:inline-flex group-data-content/content:w-full group-data-content/content:justify-between",
|
|
35
|
+
t
|
|
36
|
+
),
|
|
37
|
+
...a
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
p.displayName = "NavigationMenuTrigger";
|
|
41
|
+
const m = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
42
|
+
o.Icon,
|
|
43
|
+
{
|
|
44
|
+
className: n(
|
|
45
|
+
"transition-transform duration-200 ease-in-out",
|
|
46
|
+
"group-data-popup-open:rotate-180",
|
|
47
|
+
t
|
|
48
|
+
),
|
|
49
|
+
...a
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
m.displayName = "NavigationMenuIcon";
|
|
53
|
+
const f = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
54
|
+
o.Content,
|
|
55
|
+
{
|
|
56
|
+
"data-content": !0,
|
|
57
|
+
className: n(
|
|
58
|
+
"group/content",
|
|
59
|
+
"w-[calc(100vw-40px)] h-full p-2 xs:w-max xs:min-w-[400px] xs:w-max",
|
|
60
|
+
"transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
61
|
+
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
62
|
+
"data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]",
|
|
63
|
+
"data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%]",
|
|
64
|
+
t
|
|
65
|
+
),
|
|
66
|
+
...a
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
f.displayName = "NavigationMenuContent";
|
|
70
|
+
const b = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
71
|
+
o.Link,
|
|
72
|
+
{
|
|
73
|
+
className: n(
|
|
74
|
+
i,
|
|
75
|
+
r,
|
|
76
|
+
"data-active:bg-accent data-active:text-accent-foreground",
|
|
77
|
+
t
|
|
78
|
+
),
|
|
79
|
+
...a
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
b.displayName = "NavigationMenuLink";
|
|
83
|
+
const N = (t) => /* @__PURE__ */ e(o.Portal, { ...t });
|
|
84
|
+
N.displayName = "NavigationMenuPortal";
|
|
85
|
+
const v = ({
|
|
86
|
+
className: t,
|
|
87
|
+
sideOffset: a = 10,
|
|
88
|
+
collisionPadding: s = { top: 5, bottom: 5, left: 20, right: 20 },
|
|
89
|
+
...d
|
|
90
|
+
}) => /* @__PURE__ */ e(
|
|
91
|
+
o.Positioner,
|
|
92
|
+
{
|
|
93
|
+
className: n(
|
|
94
|
+
"z-50 box-border",
|
|
95
|
+
"h-(--positioner-height) w-(--positioner-width) max-w-(--available-width)",
|
|
96
|
+
"transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
97
|
+
"data-instant:transition-none",
|
|
98
|
+
// Gap element to maintain hover when moving to popup
|
|
99
|
+
"before:absolute before:content-['']",
|
|
100
|
+
"data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0 data-[side=bottom]:before:h-2.5",
|
|
101
|
+
"data-[side=top]:before:right-0 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:left-0 data-[side=top]:before:h-2.5",
|
|
102
|
+
"data-[side=left]:before:top-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:bottom-0 data-[side=left]:before:w-2.5",
|
|
103
|
+
"data-[side=right]:before:top-0 data-[side=right]:before:bottom-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:w-2.5",
|
|
104
|
+
t
|
|
105
|
+
),
|
|
106
|
+
sideOffset: a,
|
|
107
|
+
collisionPadding: s,
|
|
108
|
+
...d
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
v.displayName = "NavigationMenuPositioner";
|
|
112
|
+
const h = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
113
|
+
o.Popup,
|
|
114
|
+
{
|
|
115
|
+
className: n(
|
|
116
|
+
"relative rounded-lg border border-border bg-background shadow-lg",
|
|
117
|
+
"h-(--popup-height) w-(--popup-width)",
|
|
118
|
+
"origin-(--transform-origin)",
|
|
119
|
+
"transition-[opacity,transform,width,height,scale] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
120
|
+
"data-starting-style:scale-90 data-starting-style:opacity-0",
|
|
121
|
+
"data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150",
|
|
122
|
+
t
|
|
123
|
+
),
|
|
124
|
+
...a
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
h.displayName = "NavigationMenuPopup";
|
|
128
|
+
const y = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
129
|
+
o.Viewport,
|
|
130
|
+
{
|
|
131
|
+
className: n("relative h-full w-full overflow-hidden", t),
|
|
132
|
+
...a
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
y.displayName = "NavigationMenuViewport";
|
|
136
|
+
const x = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
137
|
+
o.Arrow,
|
|
138
|
+
{
|
|
139
|
+
className: n(
|
|
140
|
+
"flex transition-[left] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
141
|
+
"data-[side=bottom]:top-[-9px] data-[side=left]:right-[-14px] data-[side=left]:rotate-90 data-[side=right]:left-[-14px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-9px] data-[side=top]:rotate-180",
|
|
142
|
+
t
|
|
143
|
+
),
|
|
144
|
+
...a,
|
|
145
|
+
children: /* @__PURE__ */ e(c, {})
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
x.displayName = "NavigationMenuArrow";
|
|
149
|
+
const w = ({ className: t, ...a }) => /* @__PURE__ */ e(
|
|
150
|
+
o.Backdrop,
|
|
151
|
+
{
|
|
152
|
+
className: n(
|
|
153
|
+
"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm",
|
|
154
|
+
"transition-opacity duration-200",
|
|
155
|
+
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
156
|
+
t
|
|
157
|
+
),
|
|
158
|
+
...a
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
w.displayName = "NavigationMenuBackdrop";
|
|
162
|
+
export {
|
|
163
|
+
x as NavigationMenuArrow,
|
|
164
|
+
w as NavigationMenuBackdrop,
|
|
165
|
+
f as NavigationMenuContent,
|
|
166
|
+
m as NavigationMenuIcon,
|
|
167
|
+
g as NavigationMenuItem,
|
|
168
|
+
b as NavigationMenuLink,
|
|
169
|
+
u as NavigationMenuList,
|
|
170
|
+
h as NavigationMenuPopup,
|
|
171
|
+
N as NavigationMenuPortal,
|
|
172
|
+
v as NavigationMenuPositioner,
|
|
173
|
+
l as NavigationMenuRoot,
|
|
174
|
+
p as NavigationMenuTrigger,
|
|
175
|
+
y as NavigationMenuViewport
|
|
176
|
+
};
|
package/dist/toast.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { Toast } from '@base-ui/react/toast';
|
|
4
|
+
|
|
5
|
+
declare type ButtonSize = 'sm' | 'default' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg';
|
|
6
|
+
|
|
7
|
+
declare type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';
|
|
8
|
+
|
|
9
|
+
export { Toast }
|
|
10
|
+
|
|
11
|
+
export declare const ToastAction: {
|
|
12
|
+
({ className, variant, size, ...props }: ToastActionProps): JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export declare type ToastActionProps = React_2.ComponentProps<typeof Toast.Action> & {
|
|
17
|
+
variant?: ButtonVariant;
|
|
18
|
+
size?: ButtonSize;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export declare const ToastClose: {
|
|
22
|
+
({ className, ...props }: ToastCloseProps): JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export declare type ToastCloseProps = React_2.ComponentProps<typeof Toast.Close>;
|
|
27
|
+
|
|
28
|
+
export declare const ToastContent: {
|
|
29
|
+
({ className, ...props }: ToastContentProps): JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare type ToastContentProps = React_2.ComponentProps<typeof Toast.Content>;
|
|
34
|
+
|
|
35
|
+
export declare const ToastDescription: {
|
|
36
|
+
({ className, ...props }: ToastDescriptionProps): JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export declare type ToastDescriptionProps = React_2.ComponentProps<typeof Toast.Description>;
|
|
41
|
+
|
|
42
|
+
export declare type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
43
|
+
|
|
44
|
+
export declare const ToastPositioner: {
|
|
45
|
+
({ className, ...props }: ToastPositionerProps): JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export declare type ToastPositionerProps = React_2.ComponentProps<typeof Toast.Positioner>;
|
|
50
|
+
|
|
51
|
+
export declare const ToastProvider: {
|
|
52
|
+
(props: ToastProviderProps): JSX.Element;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export declare type ToastProviderProps = React_2.ComponentProps<typeof Toast.Provider>;
|
|
57
|
+
|
|
58
|
+
export declare const ToastRoot: {
|
|
59
|
+
({ className, ...props }: ToastRootProps): JSX.Element;
|
|
60
|
+
displayName: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export declare type ToastRootProps = React_2.ComponentProps<typeof Toast.Root>;
|
|
64
|
+
|
|
65
|
+
export declare const ToastTitle: {
|
|
66
|
+
({ className, ...props }: ToastTitleProps): JSX.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export declare type ToastTitleProps = React_2.ComponentProps<typeof Toast.Title>;
|
|
71
|
+
|
|
72
|
+
export declare const ToastViewport: {
|
|
73
|
+
({ className, position, ...props }: ToastViewportProps): JSX.Element;
|
|
74
|
+
displayName: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export declare type ToastViewportProps = React_2.ComponentProps<typeof Toast.Viewport> & {
|
|
78
|
+
position?: ToastPosition;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export { }
|
package/dist/toast.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { Toast as e } from "@base-ui/react/toast";
|
|
4
|
+
import { Toast as N } from "@base-ui/react/toast";
|
|
5
|
+
import { b as n } from "./button-variants-CbFMPwc8.js";
|
|
6
|
+
import { c as i } from "./utils-B6yFEsav.js";
|
|
7
|
+
const d = (t) => /* @__PURE__ */ o(e.Provider, { ...t });
|
|
8
|
+
d.displayName = "ToastProvider";
|
|
9
|
+
const p = ({
|
|
10
|
+
className: t,
|
|
11
|
+
position: a = "bottom-right",
|
|
12
|
+
...s
|
|
13
|
+
}) => /* @__PURE__ */ o(
|
|
14
|
+
e.Viewport,
|
|
15
|
+
{
|
|
16
|
+
"data-position": a,
|
|
17
|
+
className: i(
|
|
18
|
+
"fixed z-50 w-[356px] outline-none",
|
|
19
|
+
// Vertical position
|
|
20
|
+
"data-[position^=bottom]:bottom-4",
|
|
21
|
+
"data-[position^=top]:top-4",
|
|
22
|
+
// Horizontal position
|
|
23
|
+
"data-[position$=right]:right-4",
|
|
24
|
+
"data-[position$=left]:left-4",
|
|
25
|
+
"data-[position$=center]:left-1/2 data-[position$=center]:-translate-x-1/2",
|
|
26
|
+
t
|
|
27
|
+
),
|
|
28
|
+
...s
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
p.displayName = "ToastViewport";
|
|
32
|
+
const l = ({ className: t, ...a }) => /* @__PURE__ */ o(
|
|
33
|
+
e.Root,
|
|
34
|
+
{
|
|
35
|
+
className: i(
|
|
36
|
+
// Base styles
|
|
37
|
+
"group flex w-full flex-col gap-1 rounded-lg border border-border bg-background p-4 shadow-lg",
|
|
38
|
+
"transition-[transform,opacity,height] duration-500 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
39
|
+
"absolute z-[calc(1000-var(--toast-index))]",
|
|
40
|
+
"h-(--height) select-none",
|
|
41
|
+
// CSS custom properties for stacking
|
|
42
|
+
"[--gap:0.75rem] [--peek:0.75rem]",
|
|
43
|
+
"[--scale:calc(max(0,1-(var(--toast-index)*0.1)))]",
|
|
44
|
+
"[--shrink:calc(1-var(--scale))]",
|
|
45
|
+
"[--height:var(--toast-frontmost-height,var(--toast-height))]",
|
|
46
|
+
// Expanded state height
|
|
47
|
+
"data-expanded:h-(--toast-height)",
|
|
48
|
+
// Ending styles (shared)
|
|
49
|
+
"data-ending-style:opacity-0",
|
|
50
|
+
"data-limited:opacity-0",
|
|
51
|
+
// Gap element for hover interaction
|
|
52
|
+
'after:absolute after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-[""]',
|
|
53
|
+
// ===== BOTTOM POSITIONS =====
|
|
54
|
+
"in-data-[position^=bottom]:bottom-0",
|
|
55
|
+
"in-data-[position^=bottom]:origin-bottom",
|
|
56
|
+
"in-data-[position^=bottom]:[--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))]",
|
|
57
|
+
"in-data-[position^=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))]",
|
|
58
|
+
"in-data-[position^=bottom]:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]",
|
|
59
|
+
"in-data-[position^=bottom]:data-starting-style:transform-[translateY(150%)]",
|
|
60
|
+
"in-data-[position^=bottom]:data-ending-style:transform-[translateY(150%)]",
|
|
61
|
+
"in-data-[position^=bottom]:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))]",
|
|
62
|
+
"in-data-[position^=bottom]:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))]",
|
|
63
|
+
"in-data-[position^=bottom]:after:top-full",
|
|
64
|
+
// ===== TOP POSITIONS =====
|
|
65
|
+
"in-data-[position^=top]:top-0",
|
|
66
|
+
"in-data-[position^=top]:origin-top",
|
|
67
|
+
"in-data-[position^=top]:[--offset-y:calc(var(--toast-offset-y)+calc(var(--toast-index)*var(--gap))+var(--toast-swipe-movement-y))]",
|
|
68
|
+
"in-data-[position^=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--peek))+(var(--shrink)*var(--height))))_scale(var(--scale))]",
|
|
69
|
+
"in-data-[position^=top]:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]",
|
|
70
|
+
"in-data-[position^=top]:data-starting-style:transform-[translateY(-150%)]",
|
|
71
|
+
"in-data-[position^=top]:data-ending-style:transform-[translateY(-150%)]",
|
|
72
|
+
"in-data-[position^=top]:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))]",
|
|
73
|
+
"in-data-[position^=top]:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))]",
|
|
74
|
+
"in-data-[position^=top]:after:bottom-full",
|
|
75
|
+
// ===== HORIZONTAL POSITIONS =====
|
|
76
|
+
"in-data-[position$=right]:right-0",
|
|
77
|
+
"in-data-[position$=left]:left-0",
|
|
78
|
+
"in-data-[position$=center]:left-0 in-data-[position$=center]:right-0",
|
|
79
|
+
// Left/right swipe exit animations
|
|
80
|
+
"data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
|
|
81
|
+
"data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
|
|
82
|
+
t
|
|
83
|
+
),
|
|
84
|
+
...a
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
l.displayName = "ToastRoot";
|
|
88
|
+
const m = ({ className: t, ...a }) => /* @__PURE__ */ o(
|
|
89
|
+
e.Content,
|
|
90
|
+
{
|
|
91
|
+
className: i(
|
|
92
|
+
"flex flex-col gap-1 overflow-hidden",
|
|
93
|
+
"transition-opacity duration-250",
|
|
94
|
+
"data-behind:pointer-events-none data-behind:opacity-0",
|
|
95
|
+
"data-expanded:pointer-events-auto data-expanded:opacity-100",
|
|
96
|
+
t
|
|
97
|
+
),
|
|
98
|
+
...a
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
m.displayName = "ToastContent";
|
|
102
|
+
const c = ({ className: t, ...a }) => /* @__PURE__ */ o(e.Title, { className: i("font-semibold", t), ...a });
|
|
103
|
+
c.displayName = "ToastTitle";
|
|
104
|
+
const f = ({ className: t, ...a }) => /* @__PURE__ */ o(e.Description, { className: i("text-sm", t), ...a });
|
|
105
|
+
f.displayName = "ToastDescription";
|
|
106
|
+
const v = ({ className: t, variant: a, size: s = "sm", ...r }) => /* @__PURE__ */ o(
|
|
107
|
+
e.Action,
|
|
108
|
+
{
|
|
109
|
+
className: i("w-fit mt-2", n({ variant: a, size: s }), t),
|
|
110
|
+
...r
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
v.displayName = "ToastAction";
|
|
114
|
+
const g = ({ className: t, ...a }) => /* @__PURE__ */ o(
|
|
115
|
+
e.Close,
|
|
116
|
+
{
|
|
117
|
+
className: i(
|
|
118
|
+
n({ variant: "ghost", size: "icon" }),
|
|
119
|
+
"absolute right-2 top-2 size-6",
|
|
120
|
+
t
|
|
121
|
+
),
|
|
122
|
+
...a
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
g.displayName = "ToastClose";
|
|
126
|
+
const y = ({ className: t, ...a }) => /* @__PURE__ */ o(
|
|
127
|
+
e.Positioner,
|
|
128
|
+
{
|
|
129
|
+
className: i(
|
|
130
|
+
"z-50",
|
|
131
|
+
"transition-[top,left,right,bottom,transform]",
|
|
132
|
+
"duration-[0.35s]",
|
|
133
|
+
"ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
134
|
+
t
|
|
135
|
+
),
|
|
136
|
+
...a
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
y.displayName = "ToastPositioner";
|
|
140
|
+
export {
|
|
141
|
+
N as Toast,
|
|
142
|
+
v as ToastAction,
|
|
143
|
+
g as ToastClose,
|
|
144
|
+
m as ToastContent,
|
|
145
|
+
f as ToastDescription,
|
|
146
|
+
y as ToastPositioner,
|
|
147
|
+
d as ToastProvider,
|
|
148
|
+
l as ToastRoot,
|
|
149
|
+
c as ToastTitle,
|
|
150
|
+
p as ToastViewport
|
|
151
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lglab/compose-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "A collection of components built with Base UI & Tailwind CSS",
|
|
5
5
|
"author": "LGLab",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,6 +74,10 @@
|
|
|
74
74
|
"import": "./dist/meter.js",
|
|
75
75
|
"types": "./dist/meter.d.ts"
|
|
76
76
|
},
|
|
77
|
+
"./navigation-menu": {
|
|
78
|
+
"import": "./dist/navigation-menu.js",
|
|
79
|
+
"types": "./dist/navigation-menu.d.ts"
|
|
80
|
+
},
|
|
77
81
|
"./popover": {
|
|
78
82
|
"import": "./dist/popover.js",
|
|
79
83
|
"types": "./dist/popover.d.ts"
|
|
@@ -106,6 +110,10 @@
|
|
|
106
110
|
"import": "./dist/tabs.js",
|
|
107
111
|
"types": "./dist/tabs.d.ts"
|
|
108
112
|
},
|
|
113
|
+
"./toast": {
|
|
114
|
+
"import": "./dist/toast.js",
|
|
115
|
+
"types": "./dist/toast.d.ts"
|
|
116
|
+
},
|
|
109
117
|
"./toggle": {
|
|
110
118
|
"import": "./dist/toggle.js",
|
|
111
119
|
"types": "./dist/toggle.d.ts"
|