laif-ds 0.2.20 → 0.2.21
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/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/ui/app-stepper.js +212 -0
- package/dist/components/ui/stepper.js +387 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +30 -28
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +70 -69
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +24 -25
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +22 -23
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +28 -29
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +1 -2
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +49 -50
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +22 -23
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +6 -7
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +31 -32
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +6 -7
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +20 -21
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +5 -6
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +17 -18
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +39 -40
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +13 -14
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +20 -21
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +8 -9
- package/dist/node_modules/cmdk/dist/index.js +2 -2
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/vaul/dist/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +3 -2
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.js +0 -255
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -137
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.js +0 -50
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-dialog/dist/index.js +0 -258
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -137
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-slot/dist/index.js +0 -50
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { default as o } from "./components/ui/gantt/components/Gantt/Gantt.js";
|
|
3
3
|
import { AspectRatio as a } from "./components/ui/aspect-ratio.js";
|
|
4
|
-
import { Avatar as i, AvatarFallback as p, AvatarImage as
|
|
4
|
+
import { Avatar as i, AvatarFallback as p, AvatarImage as m } from "./components/ui/avatar.js";
|
|
5
5
|
import { Badge as u, badgeVariants as x } from "./components/ui/badge.js";
|
|
6
6
|
import { Button as g, buttonVariants as C } from "./components/ui/button.js";
|
|
7
7
|
import { Checkbox as f } from "./components/ui/checkbox.js";
|
|
@@ -21,7 +21,7 @@ import { Toggle as K, toggleVariants as Q } from "./components/ui/toggle.js";
|
|
|
21
21
|
import { Tooltip as Y, TooltipContent as Z, TooltipProvider as _, TooltipTrigger as $ } from "./components/ui/tooltip.js";
|
|
22
22
|
import { TypingIndicator as re } from "./components/ui/typing-indicator.js";
|
|
23
23
|
import { Toaster as te } from "./components/ui/toaster.js";
|
|
24
|
-
import { Accordion as ne, AccordionContent as ie, AccordionItem as pe, AccordionTrigger as
|
|
24
|
+
import { Accordion as ne, AccordionContent as ie, AccordionItem as pe, AccordionTrigger as me } from "./components/ui/accordion.js";
|
|
25
25
|
import { Alert as ue, AlertDescription as xe, AlertTitle as de } from "./components/ui/alert.js";
|
|
26
26
|
import { AlertDialog as Ce, AlertDialogAction as be, AlertDialogCancel as fe, AlertDialogContent as se, AlertDialogDescription as Se, AlertDialogFooter as Me, AlertDialogHeader as ce, AlertDialogTitle as Te, AlertDialogTrigger as De } from "./components/ui/alert-dialog.js";
|
|
27
27
|
import { AsyncSelect as Ie } from "./components/ui/async-select.js";
|
|
@@ -30,7 +30,7 @@ import { Card as Fe, CardContent as we, CardDescription as Ge, CardFooter as Le,
|
|
|
30
30
|
import { Typo as ke } from "./components/ui/typo.js";
|
|
31
31
|
import { Command as Ne, CommandDialog as ze, CommandEmpty as Ee, CommandGroup as Ve, CommandInput as Oe, CommandItem as Ue, CommandList as We, CommandSeparator as je, CommandShortcut as qe } from "./components/ui/command.js";
|
|
32
32
|
import { ContextMenu as Ke, ContextMenuCheckboxItem as Qe, ContextMenuContent as Xe, ContextMenuGroup as Ye, ContextMenuItem as Ze, ContextMenuLabel as _e, ContextMenuPortal as $e, ContextMenuRadioGroup as er, ContextMenuRadioItem as rr, ContextMenuSeparator as or, ContextMenuShortcut as tr, ContextMenuSub as ar, ContextMenuSubContent as nr, ContextMenuSubTrigger as ir, ContextMenuTrigger as pr } from "./components/ui/context-menu.js";
|
|
33
|
-
import { DatePicker as
|
|
33
|
+
import { DatePicker as lr } from "./components/ui/date-picker.js";
|
|
34
34
|
import { InputSelector as xr } from "./components/ui/input-selector.js";
|
|
35
35
|
import { Dialog as gr, DialogContent as Cr, DialogDescription as br, DialogFooter as fr, DialogHeader as sr, DialogTitle as Sr, DialogTrigger as Mr } from "./components/ui/dialog.js";
|
|
36
36
|
import { Drawer as Tr, DrawerContent as Dr, DrawerDescription as Ar, DrawerFooter as Ir, DrawerHeader as Pr, DrawerTitle as hr, DrawerTrigger as vr } from "./components/ui/drawer.js";
|
|
@@ -38,7 +38,7 @@ import { Form as wr, FormControl as Gr, FormDescription as Lr, FormField as Br,
|
|
|
38
38
|
import { HoverCard as zr, HoverCardContent as Er, HoverCardTrigger as Vr } from "./components/ui/hover-card.js";
|
|
39
39
|
import { Menubar as Ur, MenubarCheckboxItem as Wr, MenubarContent as jr, MenubarGroup as qr, MenubarItem as Jr, MenubarLabel as Kr, MenubarMenu as Qr, MenubarPortal as Xr, MenubarRadioGroup as Yr, MenubarRadioItem as Zr, MenubarSeparator as _r, MenubarShortcut as $r, MenubarSub as eo, MenubarSubContent as ro, MenubarSubTrigger as oo, MenubarTrigger as to } from "./components/ui/menubar.js";
|
|
40
40
|
import { MultipleSelector as no } from "./components/ui/multiple-selector.js";
|
|
41
|
-
import { Pagination as po, PaginationContent as
|
|
41
|
+
import { Pagination as po, PaginationContent as mo, PaginationEllipsis as lo, PaginationItem as uo, PaginationLink as xo, PaginationNext as go, PaginationPrevious as Co } from "./components/ui/pagination.js";
|
|
42
42
|
import { Popover as fo, PopoverContent as so, PopoverTrigger as So } from "./components/ui/popover.js";
|
|
43
43
|
import { PromptSuggestions as co } from "./components/ui/prompt-suggestions.js";
|
|
44
44
|
import { ResizableHandle as Do, ResizablePanel as Ao, ResizablePanelGroup as Io } from "./components/ui/resizable.js";
|
|
@@ -48,7 +48,7 @@ import { Sheet as zo, SheetContent as Eo, SheetDescription as Vo, SheetFooter as
|
|
|
48
48
|
import { Table as Jo, TableBody as Ko, TableCaption as Qo, TableCell as Xo, TableFooter as Yo, TableHead as Zo, TableHeader as _o, TableRow as $o } from "./components/ui/table.js";
|
|
49
49
|
import { Tabs as rt, TabsContent as ot, TabsList as tt, TabsTrigger as at } from "./components/ui/tabs.js";
|
|
50
50
|
import { ToggleGroup as it, ToggleGroupItem as pt } from "./components/ui/toggle-group.js";
|
|
51
|
-
import { Breadcrumb as
|
|
51
|
+
import { Breadcrumb as lt, BreadcrumbEllipsis as ut, BreadcrumbItem as xt, BreadcrumbLink as dt, BreadcrumbList as gt, BreadcrumbPage as Ct, BreadcrumbSeparator as bt } from "./components/ui/breadcrumb.js";
|
|
52
52
|
import { Slider as st } from "./components/ui/slider.js";
|
|
53
53
|
import { CircularProgress as Mt } from "./components/ui/charts/circular.js";
|
|
54
54
|
import { ThemeSwitcher as Tt } from "./components/ui/theme-switcher.js";
|
|
@@ -63,7 +63,7 @@ import { AppEditor as Zt } from "./components/ui/app-editor.js";
|
|
|
63
63
|
import { AppMultipleSelectDropdown as $t } from "./components/ui/app-multiple-select-dropdown.js";
|
|
64
64
|
import { AppSelect as ra } from "./components/ui/app-select.js";
|
|
65
65
|
import { AppSidebar as ta } from "./components/ui/app-sidebar.js";
|
|
66
|
-
import { Chat as na, ChatContainer as ia, ChatForm as pa, ChatMessages as
|
|
66
|
+
import { Chat as na, ChatContainer as ia, ChatForm as pa, ChatMessages as ma } from "./components/ui/chat.js";
|
|
67
67
|
import { ChatMessage as ua } from "./components/ui/chat-message.js";
|
|
68
68
|
import { Confirmer as da, confirm as ga } from "./components/ui/confirmer.js";
|
|
69
69
|
import { DataTable as ba } from "./components/ui/data-table.js";
|
|
@@ -78,23 +78,24 @@ import { MarkdownRenderer as Ra } from "./components/ui/markdown-renderer.js";
|
|
|
78
78
|
import { MessageInput as ka } from "./components/ui/message-input.js";
|
|
79
79
|
import { MessageList as Na } from "./components/ui/message-list.js";
|
|
80
80
|
import { NavigationMenu as Ea, NavigationMenuContent as Va, NavigationMenuIndicator as Oa, NavigationMenuItem as Ua, NavigationMenuLink as Wa, NavigationMenuList as ja, NavigationMenuTrigger as qa, NavigationMenuViewport as Ja } from "./components/ui/navigation-menu.js";
|
|
81
|
-
import { Sidebar as Qa, SidebarContent as Xa, SidebarFooter as Ya, SidebarGroup as Za, SidebarGroupAction as _a, SidebarGroupContent as $a, SidebarGroupLabel as en, SidebarHeader as rn, SidebarInput as on, SidebarInset as tn, SidebarMenu as an, SidebarMenuAction as nn, SidebarMenuBadge as pn, SidebarMenuButton as
|
|
81
|
+
import { Sidebar as Qa, SidebarContent as Xa, SidebarFooter as Ya, SidebarGroup as Za, SidebarGroupAction as _a, SidebarGroupContent as $a, SidebarGroupLabel as en, SidebarHeader as rn, SidebarInput as on, SidebarInset as tn, SidebarMenu as an, SidebarMenuAction as nn, SidebarMenuBadge as pn, SidebarMenuButton as mn, SidebarMenuItem as ln, SidebarMenuSkeleton as un, SidebarMenuSub as xn, SidebarMenuSubButton as dn, SidebarMenuSubItem as gn, SidebarProvider as Cn, SidebarRail as bn, SidebarSeparator as fn, SidebarTrigger as sn, useSidebar as Sn } from "./components/ui/sidebar.js";
|
|
82
82
|
import { DataCrossTable as cn } from "./components/ui/tables/data-cross-table/data-cross-table.js";
|
|
83
83
|
import { DataCrossTableButtonsGroup as Dn } from "./components/ui/tables/data-cross-table/data-cross-table-buttons.js";
|
|
84
84
|
import { DataCrossTableProvider as In } from "./components/ui/tables/data-cross-table/data-cross-table-context.js";
|
|
85
85
|
import { WeeklyCalendar as hn } from "./components/ui/weekly-calendar/weekly-calendar.js";
|
|
86
86
|
import { cn as Fn, downloadFile as wn, hexContrast as Gn, hexToRgba as Ln, previewFile as Bn, stringToHexColor as Rn } from "./lib/utils.js";
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
87
|
+
import { AppStepper as kn } from "./components/ui/app-stepper.js";
|
|
88
|
+
import { useAudioRecording as Nn } from "./hooks/use-audio-recording.js";
|
|
89
|
+
import { useAutoScroll as En } from "./hooks/use-auto-scroll.js";
|
|
90
|
+
import { useAutosizeTextArea as On } from "./hooks/use-autosize-textarea.js";
|
|
91
|
+
import { useCopyToClipboard as Wn } from "./hooks/use-copy-to-clipboard.js";
|
|
92
|
+
import { useDebounce as qn } from "./hooks/use-debounce.js";
|
|
93
|
+
import { useIsMobile as Kn } from "./hooks/use-mobile.js";
|
|
93
94
|
export {
|
|
94
95
|
ne as Accordion,
|
|
95
96
|
ie as AccordionContent,
|
|
96
97
|
pe as AccordionItem,
|
|
97
|
-
|
|
98
|
+
me as AccordionTrigger,
|
|
98
99
|
ue as Alert,
|
|
99
100
|
xe as AlertDescription,
|
|
100
101
|
Ce as AlertDialog,
|
|
@@ -111,14 +112,15 @@ export {
|
|
|
111
112
|
$t as AppMultipleSelectDropdown,
|
|
112
113
|
ra as AppSelect,
|
|
113
114
|
ta as AppSidebar,
|
|
115
|
+
kn as AppStepper,
|
|
114
116
|
a as AspectRatio,
|
|
115
117
|
Ie as AsyncSelect,
|
|
116
118
|
Ht as AudioVisualizer,
|
|
117
119
|
i as Avatar,
|
|
118
120
|
p as AvatarFallback,
|
|
119
|
-
|
|
121
|
+
m as AvatarImage,
|
|
120
122
|
u as Badge,
|
|
121
|
-
|
|
123
|
+
lt as Breadcrumb,
|
|
122
124
|
ut as BreadcrumbEllipsis,
|
|
123
125
|
xt as BreadcrumbItem,
|
|
124
126
|
dt as BreadcrumbLink,
|
|
@@ -148,7 +150,7 @@ export {
|
|
|
148
150
|
ia as ChatContainer,
|
|
149
151
|
pa as ChatForm,
|
|
150
152
|
ua as ChatMessage,
|
|
151
|
-
|
|
153
|
+
ma as ChatMessages,
|
|
152
154
|
f as Checkbox,
|
|
153
155
|
Mt as CircularProgress,
|
|
154
156
|
S as Collapsible,
|
|
@@ -185,7 +187,7 @@ export {
|
|
|
185
187
|
In as DataCrossTableProvider,
|
|
186
188
|
Aa as DataRepeatTypes,
|
|
187
189
|
ba as DataTable,
|
|
188
|
-
|
|
190
|
+
lr as DatePicker,
|
|
189
191
|
gr as Dialog,
|
|
190
192
|
Cr as DialogContent,
|
|
191
193
|
br as DialogDescription,
|
|
@@ -261,8 +263,8 @@ export {
|
|
|
261
263
|
qa as NavigationMenuTrigger,
|
|
262
264
|
Ja as NavigationMenuViewport,
|
|
263
265
|
po as Pagination,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
+
mo as PaginationContent,
|
|
267
|
+
lo as PaginationEllipsis,
|
|
266
268
|
uo as PaginationItem,
|
|
267
269
|
xo as PaginationLink,
|
|
268
270
|
go as PaginationNext,
|
|
@@ -308,8 +310,8 @@ export {
|
|
|
308
310
|
an as SidebarMenu,
|
|
309
311
|
nn as SidebarMenuAction,
|
|
310
312
|
pn as SidebarMenuBadge,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
+
mn as SidebarMenuButton,
|
|
314
|
+
ln as SidebarMenuItem,
|
|
313
315
|
un as SidebarMenuSkeleton,
|
|
314
316
|
xn as SidebarMenuSub,
|
|
315
317
|
dn as SidebarMenuSubButton,
|
|
@@ -358,13 +360,13 @@ export {
|
|
|
358
360
|
Ta as safePreviewFileModal,
|
|
359
361
|
Rn as stringToHexColor,
|
|
360
362
|
Q as toggleVariants,
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
Nn as useAudioRecording,
|
|
364
|
+
En as useAutoScroll,
|
|
365
|
+
On as useAutosizeTextArea,
|
|
366
|
+
Wn as useCopyToClipboard,
|
|
367
|
+
qn as useDebounce,
|
|
366
368
|
Xt as useEditorModal,
|
|
367
369
|
yr as useFormField,
|
|
368
|
-
|
|
370
|
+
Kn as useIsMobile,
|
|
369
371
|
Sn as useSidebar
|
|
370
372
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { computePosition as I, offset as J, shift as K, flip as N, size as Q, hide as T, limitShift as X, arrow as
|
|
3
|
-
import { autoUpdate as
|
|
4
|
-
import * as
|
|
5
|
-
import { useLayoutEffect as Y
|
|
6
|
-
import * as
|
|
7
|
-
var
|
|
2
|
+
import { computePosition as I, offset as J, shift as K, flip as N, size as Q, hide as T, limitShift as X, arrow as z } from "../../dom/dist/floating-ui.dom.js";
|
|
3
|
+
import { autoUpdate as pe, platform as ge } from "../../dom/dist/floating-ui.dom.js";
|
|
4
|
+
import * as o from "react";
|
|
5
|
+
import { useLayoutEffect as Y } from "react";
|
|
6
|
+
import * as Z from "react-dom";
|
|
7
|
+
var b = typeof document < "u", ee = function() {
|
|
8
|
+
}, w = b ? Y : ee;
|
|
8
9
|
function R(e, t) {
|
|
9
10
|
if (e === t)
|
|
10
11
|
return !0;
|
|
@@ -12,7 +13,7 @@ function R(e, t) {
|
|
|
12
13
|
return !1;
|
|
13
14
|
if (typeof e == "function" && e.toString() === t.toString())
|
|
14
15
|
return !0;
|
|
15
|
-
let n, r,
|
|
16
|
+
let n, r, i;
|
|
16
17
|
if (e && t && typeof e == "object") {
|
|
17
18
|
if (Array.isArray(e)) {
|
|
18
19
|
if (n = e.length, n !== t.length) return !1;
|
|
@@ -21,13 +22,13 @@ function R(e, t) {
|
|
|
21
22
|
return !1;
|
|
22
23
|
return !0;
|
|
23
24
|
}
|
|
24
|
-
if (
|
|
25
|
+
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length)
|
|
25
26
|
return !1;
|
|
26
27
|
for (r = n; r-- !== 0; )
|
|
27
|
-
if (!{}.hasOwnProperty.call(t,
|
|
28
|
+
if (!{}.hasOwnProperty.call(t, i[r]))
|
|
28
29
|
return !1;
|
|
29
30
|
for (r = n; r-- !== 0; ) {
|
|
30
|
-
const p =
|
|
31
|
+
const p = i[r];
|
|
31
32
|
if (!(p === "_owner" && e.$$typeof) && !R(e[p], t[p]))
|
|
32
33
|
return !1;
|
|
33
34
|
}
|
|
@@ -38,72 +39,72 @@ function R(e, t) {
|
|
|
38
39
|
function A(e) {
|
|
39
40
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
+
function L(e, t) {
|
|
42
43
|
const n = A(e);
|
|
43
44
|
return Math.round(t * n) / n;
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
const t =
|
|
46
|
+
function k(e) {
|
|
47
|
+
const t = o.useRef(e);
|
|
47
48
|
return w(() => {
|
|
48
49
|
t.current = e;
|
|
49
50
|
}), t;
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function oe(e) {
|
|
52
53
|
e === void 0 && (e = {});
|
|
53
54
|
const {
|
|
54
55
|
placement: t = "bottom",
|
|
55
56
|
strategy: n = "absolute",
|
|
56
57
|
middleware: r = [],
|
|
57
|
-
platform:
|
|
58
|
+
platform: i,
|
|
58
59
|
elements: {
|
|
59
60
|
reference: p,
|
|
60
61
|
floating: q
|
|
61
62
|
} = {},
|
|
62
|
-
transform:
|
|
63
|
-
whileElementsMounted:
|
|
63
|
+
transform: D = !0,
|
|
64
|
+
whileElementsMounted: E,
|
|
64
65
|
open: x
|
|
65
|
-
} = e, [
|
|
66
|
+
} = e, [s, C] = o.useState({
|
|
66
67
|
x: 0,
|
|
67
68
|
y: 0,
|
|
68
69
|
strategy: n,
|
|
69
70
|
placement: t,
|
|
70
71
|
middlewareData: {},
|
|
71
72
|
isPositioned: !1
|
|
72
|
-
}), [M, B] =
|
|
73
|
+
}), [M, B] = o.useState(r);
|
|
73
74
|
R(M, r) || B(r);
|
|
74
|
-
const [U, V] =
|
|
75
|
-
|
|
76
|
-
}, []),
|
|
77
|
-
|
|
78
|
-
}, []), u = p || U, l = q || W, a =
|
|
75
|
+
const [U, V] = o.useState(null), [W, G] = o.useState(null), O = o.useCallback((f) => {
|
|
76
|
+
f !== a.current && (a.current = f, V(f));
|
|
77
|
+
}, []), _ = o.useCallback((f) => {
|
|
78
|
+
f !== d.current && (d.current = f, G(f));
|
|
79
|
+
}, []), u = p || U, l = q || W, a = o.useRef(null), d = o.useRef(null), y = o.useRef(s), H = E != null, S = k(E), P = k(i), v = k(x), g = o.useCallback(() => {
|
|
79
80
|
if (!a.current || !d.current)
|
|
80
81
|
return;
|
|
81
|
-
const
|
|
82
|
+
const f = {
|
|
82
83
|
placement: t,
|
|
83
84
|
strategy: n,
|
|
84
85
|
middleware: M
|
|
85
86
|
};
|
|
86
|
-
P.current && (
|
|
87
|
+
P.current && (f.platform = P.current), I(a.current, d.current, f).then((h) => {
|
|
87
88
|
const m = {
|
|
88
89
|
...h,
|
|
89
90
|
// The floating element's position may be recomputed while it's closed
|
|
90
91
|
// but still mounted (such as when transitioning out). To ensure
|
|
91
92
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
92
93
|
// setting it to `true` when `open === false` (must be specified).
|
|
93
|
-
isPositioned:
|
|
94
|
+
isPositioned: v.current !== !1
|
|
94
95
|
};
|
|
95
|
-
$.current && !R(y.current, m) && (y.current = m,
|
|
96
|
-
|
|
96
|
+
$.current && !R(y.current, m) && (y.current = m, Z.flushSync(() => {
|
|
97
|
+
C(m);
|
|
97
98
|
}));
|
|
98
99
|
});
|
|
99
|
-
}, [M, t, n, P,
|
|
100
|
+
}, [M, t, n, P, v]);
|
|
100
101
|
w(() => {
|
|
101
|
-
x === !1 && y.current.isPositioned && (y.current.isPositioned = !1,
|
|
102
|
-
...
|
|
102
|
+
x === !1 && y.current.isPositioned && (y.current.isPositioned = !1, C((f) => ({
|
|
103
|
+
...f,
|
|
103
104
|
isPositioned: !1
|
|
104
105
|
})));
|
|
105
106
|
}, [x]);
|
|
106
|
-
const $ =
|
|
107
|
+
const $ = o.useRef(!1);
|
|
107
108
|
w(() => ($.current = !0, () => {
|
|
108
109
|
$.current = !1;
|
|
109
110
|
}), []), w(() => {
|
|
@@ -113,25 +114,25 @@ function re(e) {
|
|
|
113
114
|
g();
|
|
114
115
|
}
|
|
115
116
|
}, [u, l, g, S, H]);
|
|
116
|
-
const
|
|
117
|
+
const F = o.useMemo(() => ({
|
|
117
118
|
reference: a,
|
|
118
119
|
floating: d,
|
|
119
|
-
setReference:
|
|
120
|
-
setFloating:
|
|
121
|
-
}), [
|
|
120
|
+
setReference: O,
|
|
121
|
+
setFloating: _
|
|
122
|
+
}), [O, _]), c = o.useMemo(() => ({
|
|
122
123
|
reference: u,
|
|
123
124
|
floating: l
|
|
124
|
-
}), [u, l]),
|
|
125
|
-
const
|
|
125
|
+
}), [u, l]), j = o.useMemo(() => {
|
|
126
|
+
const f = {
|
|
126
127
|
position: n,
|
|
127
128
|
left: 0,
|
|
128
129
|
top: 0
|
|
129
130
|
};
|
|
130
131
|
if (!c.floating)
|
|
131
|
-
return
|
|
132
|
-
const h =
|
|
133
|
-
return
|
|
134
|
-
...
|
|
132
|
+
return f;
|
|
133
|
+
const h = L(c.floating, s.x), m = L(c.floating, s.y);
|
|
134
|
+
return D ? {
|
|
135
|
+
...f,
|
|
135
136
|
transform: "translate(" + h + "px, " + m + "px)",
|
|
136
137
|
...A(c.floating) >= 1.5 && {
|
|
137
138
|
willChange: "transform"
|
|
@@ -141,16 +142,16 @@ function re(e) {
|
|
|
141
142
|
left: h,
|
|
142
143
|
top: m
|
|
143
144
|
};
|
|
144
|
-
}, [n,
|
|
145
|
-
return
|
|
146
|
-
...
|
|
145
|
+
}, [n, D, c.floating, s.x, s.y]);
|
|
146
|
+
return o.useMemo(() => ({
|
|
147
|
+
...s,
|
|
147
148
|
update: g,
|
|
148
|
-
refs:
|
|
149
|
+
refs: F,
|
|
149
150
|
elements: c,
|
|
150
|
-
floatingStyles:
|
|
151
|
-
}), [
|
|
151
|
+
floatingStyles: j
|
|
152
|
+
}), [s, g, F, c, j]);
|
|
152
153
|
}
|
|
153
|
-
const
|
|
154
|
+
const te = (e) => {
|
|
154
155
|
function t(n) {
|
|
155
156
|
return {}.hasOwnProperty.call(n, "current");
|
|
156
157
|
}
|
|
@@ -160,49 +161,49 @@ const ee = (e) => {
|
|
|
160
161
|
fn(n) {
|
|
161
162
|
const {
|
|
162
163
|
element: r,
|
|
163
|
-
padding:
|
|
164
|
+
padding: i
|
|
164
165
|
} = typeof e == "function" ? e(n) : e;
|
|
165
|
-
return r && t(r) ? r.current != null ?
|
|
166
|
+
return r && t(r) ? r.current != null ? z({
|
|
166
167
|
element: r.current,
|
|
167
|
-
padding:
|
|
168
|
-
}).fn(n) : {} : r ?
|
|
168
|
+
padding: i
|
|
169
|
+
}).fn(n) : {} : r ? z({
|
|
169
170
|
element: r,
|
|
170
|
-
padding:
|
|
171
|
+
padding: i
|
|
171
172
|
}).fn(n) : {};
|
|
172
173
|
}
|
|
173
174
|
};
|
|
174
175
|
}, fe = (e, t) => ({
|
|
175
176
|
...J(e),
|
|
176
177
|
options: [e, t]
|
|
177
|
-
}),
|
|
178
|
+
}), ie = (e, t) => ({
|
|
178
179
|
...K(e),
|
|
179
180
|
options: [e, t]
|
|
180
181
|
}), se = (e, t) => ({
|
|
181
182
|
...X(e),
|
|
182
183
|
options: [e, t]
|
|
183
|
-
}),
|
|
184
|
+
}), ue = (e, t) => ({
|
|
184
185
|
...N(e),
|
|
185
186
|
options: [e, t]
|
|
186
|
-
}),
|
|
187
|
+
}), le = (e, t) => ({
|
|
187
188
|
...Q(e),
|
|
188
189
|
options: [e, t]
|
|
189
|
-
}),
|
|
190
|
+
}), ce = (e, t) => ({
|
|
190
191
|
...T(e),
|
|
191
192
|
options: [e, t]
|
|
192
|
-
}),
|
|
193
|
-
...
|
|
193
|
+
}), ae = (e, t) => ({
|
|
194
|
+
...te(e),
|
|
194
195
|
options: [e, t]
|
|
195
196
|
});
|
|
196
197
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
198
|
+
ae as arrow,
|
|
199
|
+
pe as autoUpdate,
|
|
199
200
|
I as computePosition,
|
|
200
|
-
|
|
201
|
-
|
|
201
|
+
ue as flip,
|
|
202
|
+
ce as hide,
|
|
202
203
|
se as limitShift,
|
|
203
204
|
fe as offset,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
ge as platform,
|
|
206
|
+
ie as shift,
|
|
207
|
+
le as size,
|
|
208
|
+
oe as useFloating
|
|
208
209
|
};
|
|
@@ -10,13 +10,13 @@ import { createCollapsibleScope as M, Root as $, Trigger as ee, Content as oe }
|
|
|
10
10
|
import { useId as re } from "../../react-id/dist/index.js";
|
|
11
11
|
import { useDirection as te } from "../../react-direction/dist/index.js";
|
|
12
12
|
import { jsx as n } from "react/jsx-runtime";
|
|
13
|
-
var d = "Accordion", ne = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [
|
|
13
|
+
var d = "Accordion", ne = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [E, ce, ie] = W(d), [b] = Q(d, [
|
|
14
14
|
ie,
|
|
15
15
|
M
|
|
16
|
-
]),
|
|
16
|
+
]), S = M(), V = s.forwardRef(
|
|
17
17
|
(o, c) => {
|
|
18
18
|
const { type: e, ...t } = o, i = t, r = t;
|
|
19
|
-
return /* @__PURE__ */ n(
|
|
19
|
+
return /* @__PURE__ */ n(E.Provider, { scope: o.__scopeAccordion, children: e === "multiple" ? /* @__PURE__ */ n(de, { ...r, ref: c }) : /* @__PURE__ */ n(se, { ...i, ref: c }) });
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
V.displayName = d;
|
|
@@ -80,18 +80,18 @@ var [H, ae] = b(d), [K, le] = b(
|
|
|
80
80
|
);
|
|
81
81
|
}), [pe, I] = b(d), L = s.forwardRef(
|
|
82
82
|
(o, c) => {
|
|
83
|
-
const { __scopeAccordion: e, disabled: t, dir: i, orientation: r = "vertical", ...l } = o, a = s.useRef(null), p = X(a, c), m = ce(e), u = te(i) === "ltr", h = Z(o.onKeyDown, (
|
|
84
|
-
if (!ne.includes(
|
|
85
|
-
const F =
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
let f =
|
|
83
|
+
const { __scopeAccordion: e, disabled: t, dir: i, orientation: r = "vertical", ...l } = o, a = s.useRef(null), p = X(a, c), m = ce(e), u = te(i) === "ltr", h = Z(o.onKeyDown, (C) => {
|
|
84
|
+
if (!ne.includes(C.key)) return;
|
|
85
|
+
const F = C.target, x = m().filter((N) => !N.ref.current?.disabled), A = x.findIndex((N) => N.ref.current === F), D = x.length;
|
|
86
|
+
if (A === -1) return;
|
|
87
|
+
C.preventDefault();
|
|
88
|
+
let f = A;
|
|
89
89
|
const _ = 0, w = D - 1, R = () => {
|
|
90
|
-
f =
|
|
90
|
+
f = A + 1, f > w && (f = _);
|
|
91
91
|
}, P = () => {
|
|
92
|
-
f =
|
|
92
|
+
f = A - 1, f < _ && (f = w);
|
|
93
93
|
};
|
|
94
|
-
switch (
|
|
94
|
+
switch (C.key) {
|
|
95
95
|
case "Home":
|
|
96
96
|
f = _;
|
|
97
97
|
break;
|
|
@@ -121,7 +121,7 @@ var [H, ae] = b(d), [K, le] = b(
|
|
|
121
121
|
disabled: t,
|
|
122
122
|
direction: i,
|
|
123
123
|
orientation: r,
|
|
124
|
-
children: /* @__PURE__ */ n(
|
|
124
|
+
children: /* @__PURE__ */ n(E.Slot, { scope: e, children: /* @__PURE__ */ n(
|
|
125
125
|
T.div,
|
|
126
126
|
{
|
|
127
127
|
...l,
|
|
@@ -135,7 +135,7 @@ var [H, ae] = b(d), [K, le] = b(
|
|
|
135
135
|
}
|
|
136
136
|
), g = "AccordionItem", [fe, k] = b(g), z = s.forwardRef(
|
|
137
137
|
(o, c) => {
|
|
138
|
-
const { __scopeAccordion: e, value: t, ...i } = o, r = I(g, e), l = ae(g, e), a =
|
|
138
|
+
const { __scopeAccordion: e, value: t, ...i } = o, r = I(g, e), l = ae(g, e), a = S(e), p = re(), m = t && l.value.includes(t) || !1, v = r.disabled || o.disabled;
|
|
139
139
|
return /* @__PURE__ */ n(
|
|
140
140
|
fe,
|
|
141
141
|
{
|
|
@@ -179,10 +179,10 @@ var G = "AccordionHeader", U = s.forwardRef(
|
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
181
|
U.displayName = G;
|
|
182
|
-
var
|
|
182
|
+
var y = "AccordionTrigger", j = s.forwardRef(
|
|
183
183
|
(o, c) => {
|
|
184
|
-
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(
|
|
185
|
-
return /* @__PURE__ */ n(
|
|
184
|
+
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(y, e), l = le(y, e), a = S(e);
|
|
185
|
+
return /* @__PURE__ */ n(E.ItemSlot, { scope: e, children: /* @__PURE__ */ n(
|
|
186
186
|
ee,
|
|
187
187
|
{
|
|
188
188
|
"aria-disabled": r.open && !l.collapsible || void 0,
|
|
@@ -195,10 +195,10 @@ var S = "AccordionTrigger", j = s.forwardRef(
|
|
|
195
195
|
) });
|
|
196
196
|
}
|
|
197
197
|
);
|
|
198
|
-
j.displayName =
|
|
198
|
+
j.displayName = y;
|
|
199
199
|
var Y = "AccordionContent", q = s.forwardRef(
|
|
200
200
|
(o, c) => {
|
|
201
|
-
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(Y, e), l =
|
|
201
|
+
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(Y, e), l = S(e);
|
|
202
202
|
return /* @__PURE__ */ n(
|
|
203
203
|
oe,
|
|
204
204
|
{
|
|
@@ -221,7 +221,7 @@ q.displayName = Y;
|
|
|
221
221
|
function B(o) {
|
|
222
222
|
return o ? "open" : "closed";
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var we = V, Re = z, Pe = U, Ne = j, ye = q;
|
|
225
225
|
export {
|
|
226
226
|
V as Accordion,
|
|
227
227
|
q as AccordionContent,
|
|
@@ -229,9 +229,8 @@ export {
|
|
|
229
229
|
z as AccordionItem,
|
|
230
230
|
j as AccordionTrigger,
|
|
231
231
|
ye as Content,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
we as createAccordionScope
|
|
232
|
+
Pe as Header,
|
|
233
|
+
Re as Item,
|
|
234
|
+
we as Root,
|
|
235
|
+
Ne as Trigger
|
|
237
236
|
};
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import { createContextScope as b } from "../../react-context/dist/index.js";
|
|
4
4
|
import { useComposedRefs as u } from "../../react-compose-refs/dist/index.js";
|
|
5
|
-
import { createDialogScope as
|
|
5
|
+
import { createDialogScope as v, Root as w, Trigger as M, WarningProvider as x, Content as I, Title as L, Description as $, Close as A, Portal as F, Overlay as G } from "../../react-dialog/dist/index.js";
|
|
6
6
|
import { composeEventHandlers as j } from "../../primitive/dist/index.js";
|
|
7
7
|
import { createSlottable as W } from "../../react-slot/dist/index.js";
|
|
8
8
|
import { jsx as i, jsxs as Y } from "react/jsx-runtime";
|
|
9
|
-
var f = "AlertDialog", [q
|
|
10
|
-
|
|
11
|
-
]), n =
|
|
9
|
+
var f = "AlertDialog", [q] = b(f, [
|
|
10
|
+
v
|
|
11
|
+
]), n = v(), D = (e) => {
|
|
12
12
|
const { __scopeAlertDialog: o, ...r } = e, t = n(o);
|
|
13
13
|
return /* @__PURE__ */ i(w, { ...t, ...r, modal: !0 });
|
|
14
14
|
};
|
|
@@ -76,20 +76,20 @@ var h = "AlertDialogDescription", E = l.forwardRef((e, o) => {
|
|
|
76
76
|
return /* @__PURE__ */ i($, { ...a, ...t, ref: o });
|
|
77
77
|
});
|
|
78
78
|
E.displayName = h;
|
|
79
|
-
var K = "AlertDialogAction",
|
|
79
|
+
var K = "AlertDialogAction", P = l.forwardRef(
|
|
80
80
|
(e, o) => {
|
|
81
81
|
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
82
|
-
return /* @__PURE__ */ i(
|
|
82
|
+
return /* @__PURE__ */ i(A, { ...a, ...t, ref: o });
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
|
-
|
|
86
|
-
var
|
|
85
|
+
P.displayName = K;
|
|
86
|
+
var S = "AlertDialogCancel", T = l.forwardRef(
|
|
87
87
|
(e, o) => {
|
|
88
|
-
const { __scopeAlertDialog: r, ...t } = e, { cancelRef: a } = z(
|
|
89
|
-
return /* @__PURE__ */ i(
|
|
88
|
+
const { __scopeAlertDialog: r, ...t } = e, { cancelRef: a } = z(S, r), g = n(r), p = u(o, a);
|
|
89
|
+
return /* @__PURE__ */ i(A, { ...g, ...t, ref: p });
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
|
-
T.displayName =
|
|
92
|
+
T.displayName = S;
|
|
93
93
|
var Q = ({ contentRef: e }) => {
|
|
94
94
|
const o = `\`${s}\` requires a description for the component to be accessible for screen reader users.
|
|
95
95
|
|
|
@@ -103,11 +103,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
103
103
|
e.current?.getAttribute("aria-describedby")
|
|
104
104
|
) || console.warn(o);
|
|
105
105
|
}, [o, e]), null;
|
|
106
|
-
},
|
|
106
|
+
}, te = D, ae = m, ie = y, le = _, ne = N, se = P, ce = T, pe = C, ge = E;
|
|
107
107
|
export {
|
|
108
|
-
|
|
108
|
+
se as Action,
|
|
109
109
|
D as AlertDialog,
|
|
110
|
-
|
|
110
|
+
P as AlertDialogAction,
|
|
111
111
|
T as AlertDialogCancel,
|
|
112
112
|
N as AlertDialogContent,
|
|
113
113
|
E as AlertDialogDescription,
|
|
@@ -115,13 +115,12 @@ export {
|
|
|
115
115
|
y as AlertDialogPortal,
|
|
116
116
|
C as AlertDialogTitle,
|
|
117
117
|
m as AlertDialogTrigger,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
te as createAlertDialogScope
|
|
118
|
+
ce as Cancel,
|
|
119
|
+
ne as Content,
|
|
120
|
+
ge as Description,
|
|
121
|
+
le as Overlay,
|
|
122
|
+
ie as Portal,
|
|
123
|
+
te as Root,
|
|
124
|
+
pe as Title,
|
|
125
|
+
ae as Trigger
|
|
127
126
|
};
|