@lglab/compose-ui 0.22.0 → 0.23.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 +73 -0
- package/dist/index.js +173 -161
- package/dist/toast.d.ts +81 -0
- package/dist/toast.js +151 -0
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { Separator as Separator_2 } from '@base-ui/react/separator';
|
|
|
19
19
|
import { Slider } from '@base-ui/react/slider';
|
|
20
20
|
import { Switch } from '@base-ui/react/switch';
|
|
21
21
|
import { Tabs } from '@base-ui/react/tabs';
|
|
22
|
+
import { Toast } from '@base-ui/react/toast';
|
|
22
23
|
import { Toggle as Toggle_2 } from '@base-ui/react/toggle';
|
|
23
24
|
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
|
24
25
|
import { Tooltip } from '@base-ui/react/tooltip';
|
|
@@ -1243,6 +1244,78 @@ export declare type TabsTabProps = React_2.ComponentProps<typeof Tabs.Tab> & {
|
|
|
1243
1244
|
size?: 'sm' | 'default' | 'lg';
|
|
1244
1245
|
};
|
|
1245
1246
|
|
|
1247
|
+
export { Toast }
|
|
1248
|
+
|
|
1249
|
+
export declare const ToastAction: {
|
|
1250
|
+
({ className, variant, size, ...props }: ToastActionProps): JSX.Element;
|
|
1251
|
+
displayName: string;
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
export declare type ToastActionProps = React_2.ComponentProps<typeof Toast.Action> & {
|
|
1255
|
+
variant?: ButtonVariant;
|
|
1256
|
+
size?: ButtonSize;
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
export declare const ToastClose: {
|
|
1260
|
+
({ className, ...props }: ToastCloseProps): JSX.Element;
|
|
1261
|
+
displayName: string;
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
export declare type ToastCloseProps = React_2.ComponentProps<typeof Toast.Close>;
|
|
1265
|
+
|
|
1266
|
+
export declare const ToastContent: {
|
|
1267
|
+
({ className, ...props }: ToastContentProps): JSX.Element;
|
|
1268
|
+
displayName: string;
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
export declare type ToastContentProps = React_2.ComponentProps<typeof Toast.Content>;
|
|
1272
|
+
|
|
1273
|
+
export declare const ToastDescription: {
|
|
1274
|
+
({ className, ...props }: ToastDescriptionProps): JSX.Element;
|
|
1275
|
+
displayName: string;
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
export declare type ToastDescriptionProps = React_2.ComponentProps<typeof Toast.Description>;
|
|
1279
|
+
|
|
1280
|
+
declare type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
1281
|
+
|
|
1282
|
+
export declare const ToastPositioner: {
|
|
1283
|
+
({ className, ...props }: ToastPositionerProps): JSX.Element;
|
|
1284
|
+
displayName: string;
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
export declare type ToastPositionerProps = React_2.ComponentProps<typeof Toast.Positioner>;
|
|
1288
|
+
|
|
1289
|
+
export declare const ToastProvider: {
|
|
1290
|
+
(props: ToastProviderProps): JSX.Element;
|
|
1291
|
+
displayName: string;
|
|
1292
|
+
};
|
|
1293
|
+
|
|
1294
|
+
export declare type ToastProviderProps = React_2.ComponentProps<typeof Toast.Provider>;
|
|
1295
|
+
|
|
1296
|
+
export declare const ToastRoot: {
|
|
1297
|
+
({ className, ...props }: ToastRootProps): JSX.Element;
|
|
1298
|
+
displayName: string;
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
export declare type ToastRootProps = React_2.ComponentProps<typeof Toast.Root>;
|
|
1302
|
+
|
|
1303
|
+
export declare const ToastTitle: {
|
|
1304
|
+
({ className, ...props }: ToastTitleProps): JSX.Element;
|
|
1305
|
+
displayName: string;
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1308
|
+
export declare type ToastTitleProps = React_2.ComponentProps<typeof Toast.Title>;
|
|
1309
|
+
|
|
1310
|
+
export declare const ToastViewport: {
|
|
1311
|
+
({ className, position, ...props }: ToastViewportProps): JSX.Element;
|
|
1312
|
+
displayName: string;
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
export declare type ToastViewportProps = React_2.ComponentProps<typeof Toast.Viewport> & {
|
|
1316
|
+
position?: ToastPosition;
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1246
1319
|
export declare const Toggle: {
|
|
1247
1320
|
({ className, variant, size, ...props }: ToggleProps): JSX.Element;
|
|
1248
1321
|
displayName: string;
|
package/dist/index.js
CHANGED
|
@@ -1,166 +1,168 @@
|
|
|
1
1
|
import { Button as r } from "./button.js";
|
|
2
|
-
import { CollapsiblePanel as a, CollapsibleRoot as
|
|
3
|
-
import { AlertDialogBackdrop as u, AlertDialogClose as p, AlertDialogDescription as M, AlertDialogPopup as b, AlertDialogPortal as
|
|
2
|
+
import { CollapsiblePanel as a, CollapsibleRoot as i, CollapsibleTrigger as n } from "./collapsible.js";
|
|
3
|
+
import { AlertDialogBackdrop as u, AlertDialogClose as p, AlertDialogDescription as M, AlertDialogPopup as b, AlertDialogPortal as d, AlertDialogRoot as g, AlertDialogTitle as m, AlertDialogTrigger as C, AlertDialogViewport as c } from "./alert-dialog.js";
|
|
4
4
|
import { AlertDialog as P } from "@base-ui/react/alert-dialog";
|
|
5
|
-
import { AvatarFallback as
|
|
5
|
+
import { AvatarFallback as s, AvatarImage as D, AvatarRoot as R, AvatarStack as I } from "./avatar.js";
|
|
6
6
|
import { ScrollAreaContent as w, ScrollAreaCorner as S, ScrollAreaRoot as f, ScrollAreaScrollbar as v, ScrollAreaThumb as k, ScrollAreaViewport as h } from "./scroll-area.js";
|
|
7
7
|
import { Separator as G } from "./separator.js";
|
|
8
|
-
import { SwitchRoot as
|
|
8
|
+
import { SwitchRoot as B, SwitchThumb as F } from "./switch.js";
|
|
9
9
|
import { Toggle as j } from "./toggle.js";
|
|
10
10
|
import { TabsIndicator as y, TabsList as z, TabsPanel as E, TabsRoot as J, TabsTab as K } from "./tabs.js";
|
|
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 {
|
|
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 lo, DialogRoot as uo, DialogTitle as po, DialogTrigger as Mo } from "./dialog.js";
|
|
13
|
+
import { DrawerBackdrop as go, DrawerClose as mo, DrawerContent as Co, DrawerDescription as co, DrawerFooter as xo, DrawerHeader as Po, DrawerPopup as To, DrawerPortal as so, DrawerRoot as Do, DrawerTitle as Ro, DrawerTrigger as Io } from "./drawer.js";
|
|
14
|
+
import { AccordionHeader as wo, AccordionItem as So, AccordionPanel as fo, AccordionRoot as vo, AccordionTrigger as ko } from "./accordion.js";
|
|
15
|
+
import { MeterIndicator as Lo, MeterLabel as Go, MeterRoot as Vo, MeterTrack as Bo, MeterValue as Fo } from "./meter.js";
|
|
16
|
+
import { MenuArrow as jo, MenuCheckboxItem as qo, MenuCheckboxItemIndicator as yo, MenuCheckboxItemLabel as zo, MenuGroup as Eo, MenuGroupLabel as Jo, MenuItem as Ko, MenuPopup as No, MenuPortal as Oo, MenuPositioner as Qo, MenuRadioGroup as Uo, MenuRadioItem as Wo, MenuRadioItemIndicator as Xo, MenuRadioItemLabel as Yo, MenuRoot as Zo, MenuSeparator as _o, MenuSubmenuRoot as $o, MenuSubmenuTrigger as oe, MenuTrigger as ee } from "./menu.js";
|
|
17
|
+
import { PopoverArrow as te, PopoverBackdrop as ae, PopoverClose as ie, PopoverDescription as ne, PopoverPopup as le, PopoverPortal as ue, PopoverPositioner as pe, PopoverRoot as Me, PopoverTitle as be, PopoverTrigger as de, PopoverViewport as ge } from "./popover.js";
|
|
18
|
+
import { ProgressIndicator as Ce, ProgressLabel as ce, ProgressRoot as xe, ProgressTrack as Pe, ProgressValue as Te } from "./progress.js";
|
|
19
|
+
import { ToggleGroupItem as De, ToggleGroupRoot as Re } from "./toggle-group.js";
|
|
20
|
+
import { CardContent as Ae, CardDescription as we, CardFooter as Se, CardHeader as fe, CardMedia as ve, CardRoot as ke, CardSection as he, CardTitle as Le } from "./card.js";
|
|
21
|
+
import { ContextMenuArrow as Ve, ContextMenuCheckboxItem as Be, ContextMenuCheckboxItemIndicator as Fe, ContextMenuCheckboxItemLabel as He, ContextMenuGroup as je, ContextMenuGroupLabel as qe, ContextMenuItem as ye, ContextMenuPopup as ze, ContextMenuPortal as Ee, ContextMenuPositioner as Je, ContextMenuRadioGroup as Ke, ContextMenuRadioItem as Ne, ContextMenuRadioItemIndicator as Oe, ContextMenuRadioItemLabel as Qe, ContextMenuRoot as Ue, ContextMenuSeparator as We, ContextMenuSubmenuRoot as Xe, ContextMenuSubmenuTrigger as Ye, ContextMenuTrigger as Ze } from "./context-menu.js";
|
|
22
|
+
import { MenubarArrow as $e, MenubarCheckboxItem as or, MenubarCheckboxItemIndicator as er, MenubarCheckboxItemLabel as rr, MenubarGroup as tr, MenubarGroupLabel as ar, MenubarItem as ir, MenubarMenu as nr, MenubarPopup as lr, MenubarPortal as ur, MenubarPositioner as pr, MenubarRadioGroup as Mr, MenubarRadioItem as br, MenubarRadioItemIndicator as dr, MenubarRadioItemLabel as gr, MenubarRoot as mr, MenubarSeparator as Cr, MenubarSubmenuRoot as cr, MenubarSubmenuTrigger as xr, MenubarTrigger as Pr } from "./menubar.js";
|
|
23
|
+
import { SliderControl as sr, SliderIndicator as Dr, SliderRoot as Rr, SliderThumb as Ir, SliderTrack as Ar, SliderValue as wr } from "./slider.js";
|
|
24
|
+
import { TooltipArrow as fr, TooltipPopup as vr, TooltipPortal as kr, TooltipPositioner as hr, TooltipProvider as Lr, TooltipRoot as Gr, TooltipTrigger as Vr } from "./tooltip.js";
|
|
25
|
+
import { PreviewCardArrow as Fr, PreviewCardBackdrop as Hr, PreviewCardPopup as jr, PreviewCardPortal as qr, PreviewCardPositioner as yr, PreviewCardRoot as zr, PreviewCardTrigger as Er } from "./preview-card.js";
|
|
26
|
+
import { Toast as Kr } from "@base-ui/react/toast";
|
|
25
27
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
wo as AccordionHeader,
|
|
29
|
+
So as AccordionItem,
|
|
30
|
+
fo as AccordionPanel,
|
|
31
|
+
vo as AccordionRoot,
|
|
32
|
+
ko as AccordionTrigger,
|
|
31
33
|
P as AlertDialog,
|
|
32
34
|
u as AlertDialogBackdrop,
|
|
33
35
|
p as AlertDialogClose,
|
|
34
36
|
M as AlertDialogDescription,
|
|
35
37
|
b as AlertDialogPopup,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
d as AlertDialogPortal,
|
|
39
|
+
g as AlertDialogRoot,
|
|
38
40
|
m as AlertDialogTitle,
|
|
39
41
|
C as AlertDialogTrigger,
|
|
40
42
|
c as AlertDialogViewport,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
s as AvatarFallback,
|
|
44
|
+
D as AvatarImage,
|
|
45
|
+
R as AvatarRoot,
|
|
44
46
|
I as AvatarStack,
|
|
45
47
|
r as Button,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
Ae as CardContent,
|
|
49
|
+
we as CardDescription,
|
|
50
|
+
Se as CardFooter,
|
|
51
|
+
fe as CardHeader,
|
|
52
|
+
ve as CardMedia,
|
|
53
|
+
ke as CardRoot,
|
|
54
|
+
he as CardSection,
|
|
55
|
+
Le as CardTitle,
|
|
54
56
|
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
|
-
|
|
57
|
+
i as CollapsibleRoot,
|
|
58
|
+
n as CollapsibleTrigger,
|
|
59
|
+
Ve as ContextMenuArrow,
|
|
60
|
+
Be as ContextMenuCheckboxItem,
|
|
61
|
+
Fe as ContextMenuCheckboxItemIndicator,
|
|
62
|
+
He as ContextMenuCheckboxItemLabel,
|
|
63
|
+
je as ContextMenuGroup,
|
|
64
|
+
qe as ContextMenuGroupLabel,
|
|
65
|
+
ye as ContextMenuItem,
|
|
66
|
+
ze as ContextMenuPopup,
|
|
67
|
+
Ee as ContextMenuPortal,
|
|
68
|
+
Je as ContextMenuPositioner,
|
|
69
|
+
Ke as ContextMenuRadioGroup,
|
|
70
|
+
Ne as ContextMenuRadioItem,
|
|
71
|
+
Oe as ContextMenuRadioItemIndicator,
|
|
72
|
+
Qe as ContextMenuRadioItemLabel,
|
|
73
|
+
Ue as ContextMenuRoot,
|
|
74
|
+
We as ContextMenuSeparator,
|
|
75
|
+
Xe as ContextMenuSubmenuRoot,
|
|
76
|
+
Ye as ContextMenuSubmenuTrigger,
|
|
77
|
+
Ze as ContextMenuTrigger,
|
|
78
|
+
eo as DialogBackdrop,
|
|
79
|
+
ro as DialogClose,
|
|
80
|
+
to as DialogDescription,
|
|
81
|
+
ao as DialogFooter,
|
|
82
|
+
io as DialogHeader,
|
|
83
|
+
no as DialogPopup,
|
|
84
|
+
lo as DialogPortal,
|
|
85
|
+
uo as DialogRoot,
|
|
86
|
+
po as DialogTitle,
|
|
87
|
+
Mo as DialogTrigger,
|
|
88
|
+
go as DrawerBackdrop,
|
|
89
|
+
mo as DrawerClose,
|
|
90
|
+
Co as DrawerContent,
|
|
91
|
+
co as DrawerDescription,
|
|
92
|
+
xo as DrawerFooter,
|
|
93
|
+
Po as DrawerHeader,
|
|
94
|
+
To as DrawerPopup,
|
|
95
|
+
so as DrawerPortal,
|
|
96
|
+
Do as DrawerRoot,
|
|
97
|
+
Ro as DrawerTitle,
|
|
98
|
+
Io as DrawerTrigger,
|
|
99
|
+
jo as MenuArrow,
|
|
100
|
+
qo as MenuCheckboxItem,
|
|
101
|
+
yo as MenuCheckboxItemIndicator,
|
|
102
|
+
zo as MenuCheckboxItemLabel,
|
|
103
|
+
Eo as MenuGroup,
|
|
104
|
+
Jo as MenuGroupLabel,
|
|
105
|
+
Ko as MenuItem,
|
|
106
|
+
No as MenuPopup,
|
|
107
|
+
Oo as MenuPortal,
|
|
108
|
+
Qo as MenuPositioner,
|
|
109
|
+
Uo as MenuRadioGroup,
|
|
110
|
+
Wo as MenuRadioItem,
|
|
111
|
+
Xo as MenuRadioItemIndicator,
|
|
112
|
+
Yo as MenuRadioItemLabel,
|
|
113
|
+
Zo as MenuRoot,
|
|
114
|
+
_o as MenuSeparator,
|
|
115
|
+
$o as MenuSubmenuRoot,
|
|
116
|
+
oe as MenuSubmenuTrigger,
|
|
117
|
+
ee as MenuTrigger,
|
|
118
|
+
$e as MenubarArrow,
|
|
119
|
+
or as MenubarCheckboxItem,
|
|
120
|
+
er as MenubarCheckboxItemIndicator,
|
|
121
|
+
rr as MenubarCheckboxItemLabel,
|
|
122
|
+
tr as MenubarGroup,
|
|
123
|
+
ar as MenubarGroupLabel,
|
|
124
|
+
ir as MenubarItem,
|
|
125
|
+
nr as MenubarMenu,
|
|
126
|
+
lr as MenubarPopup,
|
|
127
|
+
ur as MenubarPortal,
|
|
128
|
+
pr as MenubarPositioner,
|
|
129
|
+
Mr as MenubarRadioGroup,
|
|
130
|
+
br as MenubarRadioItem,
|
|
131
|
+
dr as MenubarRadioItemIndicator,
|
|
132
|
+
gr as MenubarRadioItemLabel,
|
|
133
|
+
mr as MenubarRoot,
|
|
134
|
+
Cr as MenubarSeparator,
|
|
135
|
+
cr as MenubarSubmenuRoot,
|
|
136
|
+
xr as MenubarSubmenuTrigger,
|
|
137
|
+
Pr as MenubarTrigger,
|
|
138
|
+
Lo as MeterIndicator,
|
|
139
|
+
Go as MeterLabel,
|
|
140
|
+
Vo as MeterRoot,
|
|
141
|
+
Bo as MeterTrack,
|
|
142
|
+
Fo as MeterValue,
|
|
143
|
+
te as PopoverArrow,
|
|
144
|
+
ae as PopoverBackdrop,
|
|
145
|
+
ie as PopoverClose,
|
|
146
|
+
ne as PopoverDescription,
|
|
147
|
+
le as PopoverPopup,
|
|
148
|
+
ue as PopoverPortal,
|
|
149
|
+
pe as PopoverPositioner,
|
|
150
|
+
Me as PopoverRoot,
|
|
151
|
+
be as PopoverTitle,
|
|
152
|
+
de as PopoverTrigger,
|
|
153
|
+
ge as PopoverViewport,
|
|
154
|
+
Fr as PreviewCardArrow,
|
|
155
|
+
Hr as PreviewCardBackdrop,
|
|
156
|
+
jr as PreviewCardPopup,
|
|
157
|
+
qr as PreviewCardPortal,
|
|
158
|
+
yr as PreviewCardPositioner,
|
|
159
|
+
zr as PreviewCardRoot,
|
|
160
|
+
Er as PreviewCardTrigger,
|
|
161
|
+
Ce as ProgressIndicator,
|
|
162
|
+
ce as ProgressLabel,
|
|
163
|
+
xe as ProgressRoot,
|
|
164
|
+
Pe as ProgressTrack,
|
|
165
|
+
Te as ProgressValue,
|
|
164
166
|
w as ScrollAreaContent,
|
|
165
167
|
S as ScrollAreaCorner,
|
|
166
168
|
f as ScrollAreaRoot,
|
|
@@ -168,27 +170,37 @@ export {
|
|
|
168
170
|
k as ScrollAreaThumb,
|
|
169
171
|
h as ScrollAreaViewport,
|
|
170
172
|
G as Separator,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
sr as SliderControl,
|
|
174
|
+
Dr as SliderIndicator,
|
|
175
|
+
Rr as SliderRoot,
|
|
176
|
+
Ir as SliderThumb,
|
|
177
|
+
Ar as SliderTrack,
|
|
178
|
+
wr as SliderValue,
|
|
179
|
+
B as SwitchRoot,
|
|
178
180
|
F as SwitchThumb,
|
|
179
181
|
y as TabsIndicator,
|
|
180
182
|
z as TabsList,
|
|
181
183
|
E as TabsPanel,
|
|
182
184
|
J as TabsRoot,
|
|
183
185
|
K as TabsTab,
|
|
186
|
+
Kr as Toast,
|
|
187
|
+
O as ToastAction,
|
|
188
|
+
Q as ToastClose,
|
|
189
|
+
U as ToastContent,
|
|
190
|
+
W as ToastDescription,
|
|
191
|
+
X as ToastPositioner,
|
|
192
|
+
Y as ToastProvider,
|
|
193
|
+
Z as ToastRoot,
|
|
194
|
+
_ as ToastTitle,
|
|
195
|
+
$ as ToastViewport,
|
|
184
196
|
j as Toggle,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
De as ToggleGroupItem,
|
|
198
|
+
Re as ToggleGroupRoot,
|
|
199
|
+
fr as TooltipArrow,
|
|
200
|
+
vr as TooltipPopup,
|
|
201
|
+
kr as TooltipPortal,
|
|
202
|
+
hr as TooltipPositioner,
|
|
203
|
+
Lr as TooltipProvider,
|
|
204
|
+
Gr as TooltipRoot,
|
|
205
|
+
Vr as TooltipTrigger
|
|
194
206
|
};
|
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.23.0",
|
|
4
4
|
"description": "A collection of components built with Base UI & Tailwind CSS",
|
|
5
5
|
"author": "LGLab",
|
|
6
6
|
"license": "MIT",
|
|
@@ -106,6 +106,10 @@
|
|
|
106
106
|
"import": "./dist/tabs.js",
|
|
107
107
|
"types": "./dist/tabs.d.ts"
|
|
108
108
|
},
|
|
109
|
+
"./toast": {
|
|
110
|
+
"import": "./dist/toast.js",
|
|
111
|
+
"types": "./dist/toast.d.ts"
|
|
112
|
+
},
|
|
109
113
|
"./toggle": {
|
|
110
114
|
"import": "./dist/toggle.js",
|
|
111
115
|
"types": "./dist/toggle.d.ts"
|