@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 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 n, CollapsibleTrigger as i } from "./collapsible.js";
3
- import { AlertDialogBackdrop as u, AlertDialogClose as p, AlertDialogDescription as M, AlertDialogPopup as b, AlertDialogPortal as g, AlertDialogRoot as d, AlertDialogTitle as m, AlertDialogTrigger as C, AlertDialogViewport as c } from "./alert-dialog.js";
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 D, AvatarImage as R, AvatarRoot as s, AvatarStack as I } from "./avatar.js";
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 V, SwitchThumb as F } from "./switch.js";
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 { DialogBackdrop as O, DialogClose as Q, DialogDescription as U, DialogFooter as W, DialogHeader as X, DialogPopup as Y, DialogPortal as Z, DialogRoot as _, DialogTitle as $, DialogTrigger as oo } from "./dialog.js";
12
- import { DrawerBackdrop as ro, DrawerClose as to, DrawerContent as ao, DrawerDescription as no, DrawerFooter as io, DrawerHeader as lo, DrawerPopup as uo, DrawerPortal as po, DrawerRoot as Mo, DrawerTitle as bo, DrawerTrigger as go } from "./drawer.js";
13
- import { AccordionHeader as Co, AccordionItem as co, AccordionPanel as xo, AccordionRoot as Po, AccordionTrigger as To } from "./accordion.js";
14
- import { MeterIndicator as Ro, MeterLabel as so, MeterRoot as Io, MeterTrack as Ao, MeterValue as wo } from "./meter.js";
15
- import { MenuArrow as fo, MenuCheckboxItem as vo, MenuCheckboxItemIndicator as ko, MenuCheckboxItemLabel as ho, MenuGroup as Lo, MenuGroupLabel as Go, MenuItem as Bo, MenuPopup as Vo, MenuPortal as Fo, MenuPositioner as Ho, MenuRadioGroup as jo, MenuRadioItem as qo, MenuRadioItemIndicator as yo, MenuRadioItemLabel as zo, MenuRoot as Eo, MenuSeparator as Jo, MenuSubmenuRoot as Ko, MenuSubmenuTrigger as No, MenuTrigger as Oo } from "./menu.js";
16
- import { PopoverArrow as Uo, PopoverBackdrop as Wo, PopoverClose as Xo, PopoverDescription as Yo, PopoverPopup as Zo, PopoverPortal as _o, PopoverPositioner as $o, PopoverRoot as oe, PopoverTitle as ee, PopoverTrigger as re, PopoverViewport as te } from "./popover.js";
17
- import { ProgressIndicator as ne, ProgressLabel as ie, ProgressRoot as le, ProgressTrack as ue, ProgressValue as pe } from "./progress.js";
18
- import { ToggleGroupItem as be, ToggleGroupRoot as ge } from "./toggle-group.js";
19
- import { CardContent as me, CardDescription as Ce, CardFooter as ce, CardHeader as xe, CardMedia as Pe, CardRoot as Te, CardSection as De, CardTitle as Re } from "./card.js";
20
- import { ContextMenuArrow as Ie, ContextMenuCheckboxItem as Ae, ContextMenuCheckboxItemIndicator as we, ContextMenuCheckboxItemLabel as Se, ContextMenuGroup as fe, ContextMenuGroupLabel as ve, ContextMenuItem as ke, ContextMenuPopup as he, ContextMenuPortal as Le, ContextMenuPositioner as Ge, ContextMenuRadioGroup as Be, ContextMenuRadioItem as Ve, ContextMenuRadioItemIndicator as Fe, ContextMenuRadioItemLabel as He, ContextMenuRoot as je, ContextMenuSeparator as qe, ContextMenuSubmenuRoot as ye, ContextMenuSubmenuTrigger as ze, ContextMenuTrigger as Ee } from "./context-menu.js";
21
- import { MenubarArrow as Ke, MenubarCheckboxItem as Ne, MenubarCheckboxItemIndicator as Oe, MenubarCheckboxItemLabel as Qe, MenubarGroup as Ue, MenubarGroupLabel as We, MenubarItem as Xe, MenubarMenu as Ye, MenubarPopup as Ze, MenubarPortal as _e, MenubarPositioner as $e, MenubarRadioGroup as or, MenubarRadioItem as er, MenubarRadioItemIndicator as rr, MenubarRadioItemLabel as tr, MenubarRoot as ar, MenubarSeparator as nr, MenubarSubmenuRoot as ir, MenubarSubmenuTrigger as lr, MenubarTrigger as ur } from "./menubar.js";
22
- import { SliderControl as Mr, SliderIndicator as br, SliderRoot as gr, SliderThumb as dr, SliderTrack as mr, SliderValue as Cr } from "./slider.js";
23
- import { TooltipArrow as xr, TooltipPopup as Pr, TooltipPortal as Tr, TooltipPositioner as Dr, TooltipProvider as Rr, TooltipRoot as sr, TooltipTrigger as Ir } from "./tooltip.js";
24
- import { PreviewCardArrow as wr, PreviewCardBackdrop as Sr, PreviewCardPopup as fr, PreviewCardPortal as vr, PreviewCardPositioner as kr, PreviewCardRoot as hr, PreviewCardTrigger as Lr } from "./preview-card.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 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
- Co as AccordionHeader,
27
- co as AccordionItem,
28
- xo as AccordionPanel,
29
- Po as AccordionRoot,
30
- To as AccordionTrigger,
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
- g as AlertDialogPortal,
37
- d as AlertDialogRoot,
38
+ d as AlertDialogPortal,
39
+ g as AlertDialogRoot,
38
40
  m as AlertDialogTitle,
39
41
  C as AlertDialogTrigger,
40
42
  c as AlertDialogViewport,
41
- D as AvatarFallback,
42
- R as AvatarImage,
43
- s as AvatarRoot,
43
+ s as AvatarFallback,
44
+ D as AvatarImage,
45
+ R as AvatarRoot,
44
46
  I as AvatarStack,
45
47
  r as Button,
46
- me as CardContent,
47
- Ce as CardDescription,
48
- ce as CardFooter,
49
- xe as CardHeader,
50
- Pe as CardMedia,
51
- Te as CardRoot,
52
- De as CardSection,
53
- Re as CardTitle,
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
- n as CollapsibleRoot,
56
- i as CollapsibleTrigger,
57
- Ie as ContextMenuArrow,
58
- Ae as ContextMenuCheckboxItem,
59
- we as ContextMenuCheckboxItemIndicator,
60
- Se as ContextMenuCheckboxItemLabel,
61
- fe as ContextMenuGroup,
62
- ve as ContextMenuGroupLabel,
63
- ke as ContextMenuItem,
64
- he as ContextMenuPopup,
65
- Le as ContextMenuPortal,
66
- Ge as ContextMenuPositioner,
67
- Be as ContextMenuRadioGroup,
68
- Ve as ContextMenuRadioItem,
69
- Fe as ContextMenuRadioItemIndicator,
70
- He as ContextMenuRadioItemLabel,
71
- je as ContextMenuRoot,
72
- qe as ContextMenuSeparator,
73
- ye as ContextMenuSubmenuRoot,
74
- ze as ContextMenuSubmenuTrigger,
75
- Ee as ContextMenuTrigger,
76
- O as DialogBackdrop,
77
- Q as DialogClose,
78
- U as DialogDescription,
79
- W as DialogFooter,
80
- X as DialogHeader,
81
- Y as DialogPopup,
82
- Z as DialogPortal,
83
- _ as DialogRoot,
84
- $ as DialogTitle,
85
- oo as DialogTrigger,
86
- ro as DrawerBackdrop,
87
- to as DrawerClose,
88
- ao as DrawerContent,
89
- no as DrawerDescription,
90
- io as DrawerFooter,
91
- lo as DrawerHeader,
92
- uo as DrawerPopup,
93
- po as DrawerPortal,
94
- Mo as DrawerRoot,
95
- bo as DrawerTitle,
96
- go as DrawerTrigger,
97
- fo as MenuArrow,
98
- vo as MenuCheckboxItem,
99
- ko as MenuCheckboxItemIndicator,
100
- ho as MenuCheckboxItemLabel,
101
- Lo as MenuGroup,
102
- Go as MenuGroupLabel,
103
- Bo as MenuItem,
104
- Vo as MenuPopup,
105
- Fo as MenuPortal,
106
- Ho as MenuPositioner,
107
- jo as MenuRadioGroup,
108
- qo as MenuRadioItem,
109
- yo as MenuRadioItemIndicator,
110
- zo as MenuRadioItemLabel,
111
- Eo as MenuRoot,
112
- Jo as MenuSeparator,
113
- Ko as MenuSubmenuRoot,
114
- No as MenuSubmenuTrigger,
115
- Oo as MenuTrigger,
116
- Ke as MenubarArrow,
117
- Ne as MenubarCheckboxItem,
118
- Oe as MenubarCheckboxItemIndicator,
119
- Qe as MenubarCheckboxItemLabel,
120
- Ue as MenubarGroup,
121
- We as MenubarGroupLabel,
122
- Xe as MenubarItem,
123
- Ye as MenubarMenu,
124
- Ze as MenubarPopup,
125
- _e as MenubarPortal,
126
- $e as MenubarPositioner,
127
- or as MenubarRadioGroup,
128
- er as MenubarRadioItem,
129
- rr as MenubarRadioItemIndicator,
130
- tr as MenubarRadioItemLabel,
131
- ar as MenubarRoot,
132
- nr as MenubarSeparator,
133
- ir as MenubarSubmenuRoot,
134
- lr as MenubarSubmenuTrigger,
135
- ur as MenubarTrigger,
136
- Ro as MeterIndicator,
137
- so as MeterLabel,
138
- Io as MeterRoot,
139
- Ao as MeterTrack,
140
- wo as MeterValue,
141
- Uo as PopoverArrow,
142
- Wo as PopoverBackdrop,
143
- Xo as PopoverClose,
144
- Yo as PopoverDescription,
145
- Zo as PopoverPopup,
146
- _o as PopoverPortal,
147
- $o as PopoverPositioner,
148
- oe as PopoverRoot,
149
- ee as PopoverTitle,
150
- re as PopoverTrigger,
151
- te as PopoverViewport,
152
- wr as PreviewCardArrow,
153
- Sr as PreviewCardBackdrop,
154
- fr as PreviewCardPopup,
155
- vr as PreviewCardPortal,
156
- kr as PreviewCardPositioner,
157
- hr as PreviewCardRoot,
158
- Lr as PreviewCardTrigger,
159
- ne as ProgressIndicator,
160
- ie as ProgressLabel,
161
- le as ProgressRoot,
162
- ue as ProgressTrack,
163
- pe as ProgressValue,
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
- Mr as SliderControl,
172
- br as SliderIndicator,
173
- gr as SliderRoot,
174
- dr as SliderThumb,
175
- mr as SliderTrack,
176
- Cr as SliderValue,
177
- V as SwitchRoot,
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
- be as ToggleGroupItem,
186
- ge as ToggleGroupRoot,
187
- xr as TooltipArrow,
188
- Pr as TooltipPopup,
189
- Tr as TooltipPortal,
190
- Dr as TooltipPositioner,
191
- Rr as TooltipProvider,
192
- sr as TooltipRoot,
193
- Ir as TooltipTrigger
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
  };
@@ -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.22.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"