laif-ds 0.2.19 → 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.
Files changed (51) hide show
  1. package/dist/_virtual/index4.js +5 -5
  2. package/dist/_virtual/index5.js +5 -5
  3. package/dist/_virtual/index6.js +2 -2
  4. package/dist/_virtual/index7.js +2 -2
  5. package/dist/components/ui/app-stepper.js +212 -0
  6. package/dist/components/ui/file-preview.js +215 -138
  7. package/dist/components/ui/file-previewer.js +1 -1
  8. package/dist/components/ui/file-uploader.js +109 -96
  9. package/dist/components/ui/stepper.js +387 -0
  10. package/dist/index.d.ts +52 -1
  11. package/dist/index.js +30 -28
  12. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +70 -69
  13. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +24 -25
  14. package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +22 -23
  15. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +28 -29
  16. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +1 -2
  17. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +49 -50
  18. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +22 -23
  19. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +6 -7
  20. package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +31 -32
  21. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +56 -57
  22. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +6 -7
  23. package/dist/node_modules/@radix-ui/react-progress/dist/index.js +20 -21
  24. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +12 -13
  25. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +5 -6
  26. package/dist/node_modules/@radix-ui/react-select/dist/index.js +17 -18
  27. package/dist/node_modules/@radix-ui/react-slider/dist/index.js +39 -40
  28. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +12 -13
  29. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +13 -14
  30. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +20 -21
  31. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +8 -9
  32. package/dist/node_modules/cmdk/dist/index.js +2 -2
  33. package/dist/node_modules/eventemitter3/index2.js +1 -1
  34. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  35. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  36. package/dist/node_modules/unified/lib/index.js +1 -1
  37. package/dist/node_modules/vaul/dist/index.js +1 -1
  38. package/dist/styles.v3.css +1 -1
  39. package/package.json +3 -2
  40. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.js +0 -255
  41. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
  42. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -137
  43. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
  44. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
  45. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.js +0 -50
  46. package/dist/node_modules/vaul/node_modules/@radix-ui/react-dialog/dist/index.js +0 -258
  47. package/dist/node_modules/vaul/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
  48. package/dist/node_modules/vaul/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -137
  49. package/dist/node_modules/vaul/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
  50. package/dist/node_modules/vaul/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
  51. package/dist/node_modules/vaul/node_modules/@radix-ui/react-slot/dist/index.js +0 -50
package/dist/index.d.ts CHANGED
@@ -180,6 +180,29 @@ declare interface AppSidebarProps extends React_2.ComponentProps<typeof Sidebar>
180
180
  linkProps?: Record<string, any>;
181
181
  }
182
182
 
183
+ declare interface AppStep {
184
+ id: number;
185
+ label: React_2.ReactNode;
186
+ component: React_2.ReactNode;
187
+ completed?: boolean;
188
+ disabled?: boolean;
189
+ loading?: boolean;
190
+ }
191
+
192
+ export declare function AppStepper({ steps, align, size, showSeparators, defaultStep, allowStepNavigation, allowClickOnlyCompleted, onStepClick, indicators, ...stepperProps }: AppStepperProps): JSX.Element;
193
+
194
+ declare interface AppStepperProps extends Omit<StepperProps, "children"> {
195
+ steps: AppStep[];
196
+ align?: "horizontal" | "vertical";
197
+ size?: "sm" | "md";
198
+ showSeparators?: boolean;
199
+ defaultStep?: number;
200
+ allowStepNavigation?: boolean;
201
+ allowClickOnlyCompleted?: boolean;
202
+ onStepClick?: (step: AppStep, index: number) => void;
203
+ indicators?: StepIndicators_2;
204
+ }
205
+
183
206
  export declare function AspectRatio({ ...props }: AspectRatioProps): JSX.Element;
184
207
 
185
208
  declare type AspectRatioProps = React.ComponentProps<typeof AspectRatioPrimitive.Root>;
@@ -893,13 +916,13 @@ declare interface FilePreviewProps {
893
916
  export declare const FileUploader: default_2.FC<FileUploaderProps>;
894
917
 
895
918
  declare interface FileUploaderProps {
896
- accept?: string;
897
919
  extensions?: AcceptItem[];
898
920
  multiple?: boolean;
899
921
  onUpload?: (files: File[]) => void;
900
922
  description?: string;
901
923
  formatDescription?: string;
902
924
  selectedLabel?: string;
925
+ removeAllLabel?: string;
903
926
  maxTotalSize?: number;
904
927
  maxFiles?: number;
905
928
  }
@@ -1715,6 +1738,34 @@ declare interface SourcePart {
1715
1738
  type: "source";
1716
1739
  }
1717
1740
 
1741
+ declare type StepIndicators = {
1742
+ active?: React_2.ReactNode;
1743
+ completed?: React_2.ReactNode;
1744
+ inactive?: React_2.ReactNode;
1745
+ loading?: React_2.ReactNode;
1746
+ };
1747
+
1748
+ declare type StepIndicators_2 = {
1749
+ active?: React_2.ReactNode;
1750
+ completed?: React_2.ReactNode;
1751
+ inactive?: React_2.ReactNode;
1752
+ loading?: React_2.ReactNode;
1753
+ };
1754
+
1755
+ declare type StepperOrientation = "horizontal" | "vertical";
1756
+
1757
+ declare interface StepperProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stepperVariants> {
1758
+ defaultValue?: number;
1759
+ value?: number;
1760
+ onValueChange?: (value: number) => void;
1761
+ orientation?: StepperOrientation;
1762
+ indicators?: StepIndicators;
1763
+ }
1764
+
1765
+ declare const stepperVariants: (props?: ({
1766
+ orientation?: "horizontal" | "vertical" | null | undefined;
1767
+ } & ClassProp) | undefined) => string;
1768
+
1718
1769
  export declare const stringToHexColor: (str: string) => string;
1719
1770
 
1720
1771
  export declare function Switch({ className, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root>): JSX.Element;
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 l } from "./components/ui/avatar.js";
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 le } from "./components/ui/accordion.js";
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 mr } from "./components/ui/date-picker.js";
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 lo, PaginationEllipsis as mo, PaginationItem as uo, PaginationLink as xo, PaginationNext as go, PaginationPrevious as Co } from "./components/ui/pagination.js";
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 mt, BreadcrumbEllipsis as ut, BreadcrumbItem as xt, BreadcrumbLink as dt, BreadcrumbList as gt, BreadcrumbPage as Ct, BreadcrumbSeparator as bt } from "./components/ui/breadcrumb.js";
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 la } from "./components/ui/chat.js";
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 ln, SidebarMenuItem as mn, 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";
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 { useAudioRecording as kn } from "./hooks/use-audio-recording.js";
88
- import { useAutoScroll as Nn } from "./hooks/use-auto-scroll.js";
89
- import { useAutosizeTextArea as En } from "./hooks/use-autosize-textarea.js";
90
- import { useCopyToClipboard as On } from "./hooks/use-copy-to-clipboard.js";
91
- import { useDebounce as Wn } from "./hooks/use-debounce.js";
92
- import { useIsMobile as qn } from "./hooks/use-mobile.js";
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
- le as AccordionTrigger,
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
- l as AvatarImage,
121
+ m as AvatarImage,
120
122
  u as Badge,
121
- mt as Breadcrumb,
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
- la as ChatMessages,
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
- mr as DatePicker,
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
- lo as PaginationContent,
265
- mo as PaginationEllipsis,
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
- ln as SidebarMenuButton,
312
- mn as SidebarMenuItem,
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
- kn as useAudioRecording,
362
- Nn as useAutoScroll,
363
- En as useAutosizeTextArea,
364
- On as useCopyToClipboard,
365
- Wn as useDebounce,
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
- qn as useIsMobile,
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 L } from "../../dom/dist/floating-ui.dom.js";
3
- import { autoUpdate as me, platform as pe } from "../../dom/dist/floating-ui.dom.js";
4
- import * as f from "react";
5
- import { useLayoutEffect as Y, useEffect as Z } from "react";
6
- import * as b from "react-dom";
7
- var w = typeof document < "u" ? Y : Z;
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, s;
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 (s = Object.keys(e), n = s.length, n !== Object.keys(t).length)
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, s[r]))
28
+ if (!{}.hasOwnProperty.call(t, i[r]))
28
29
  return !1;
29
30
  for (r = n; r-- !== 0; ) {
30
- const p = s[r];
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 v(e, t) {
42
+ function L(e, t) {
42
43
  const n = A(e);
43
44
  return Math.round(t * n) / n;
44
45
  }
45
- function E(e) {
46
- const t = f.useRef(e);
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 re(e) {
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: s,
58
+ platform: i,
58
59
  elements: {
59
60
  reference: p,
60
61
  floating: q
61
62
  } = {},
62
- transform: k = !0,
63
- whileElementsMounted: D,
63
+ transform: D = !0,
64
+ whileElementsMounted: E,
64
65
  open: x
65
- } = e, [i, O] = f.useState({
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] = f.useState(r);
73
+ }), [M, B] = o.useState(r);
73
74
  R(M, r) || B(r);
74
- const [U, V] = f.useState(null), [W, G] = f.useState(null), _ = f.useCallback((o) => {
75
- o !== a.current && (a.current = o, V(o));
76
- }, []), C = f.useCallback((o) => {
77
- o !== d.current && (d.current = o, G(o));
78
- }, []), u = p || U, l = q || W, a = f.useRef(null), d = f.useRef(null), y = f.useRef(i), H = D != null, S = E(D), P = E(s), F = E(x), g = f.useCallback(() => {
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 o = {
82
+ const f = {
82
83
  placement: t,
83
84
  strategy: n,
84
85
  middleware: M
85
86
  };
86
- P.current && (o.platform = P.current), I(a.current, d.current, o).then((h) => {
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: F.current !== !1
94
+ isPositioned: v.current !== !1
94
95
  };
95
- $.current && !R(y.current, m) && (y.current = m, b.flushSync(() => {
96
- O(m);
96
+ $.current && !R(y.current, m) && (y.current = m, Z.flushSync(() => {
97
+ C(m);
97
98
  }));
98
99
  });
99
- }, [M, t, n, P, F]);
100
+ }, [M, t, n, P, v]);
100
101
  w(() => {
101
- x === !1 && y.current.isPositioned && (y.current.isPositioned = !1, O((o) => ({
102
- ...o,
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 $ = f.useRef(!1);
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 j = f.useMemo(() => ({
117
+ const F = o.useMemo(() => ({
117
118
  reference: a,
118
119
  floating: d,
119
- setReference: _,
120
- setFloating: C
121
- }), [_, C]), c = f.useMemo(() => ({
120
+ setReference: O,
121
+ setFloating: _
122
+ }), [O, _]), c = o.useMemo(() => ({
122
123
  reference: u,
123
124
  floating: l
124
- }), [u, l]), z = f.useMemo(() => {
125
- const o = {
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 o;
132
- const h = v(c.floating, i.x), m = v(c.floating, i.y);
133
- return k ? {
134
- ...o,
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, k, c.floating, i.x, i.y]);
145
- return f.useMemo(() => ({
146
- ...i,
145
+ }, [n, D, c.floating, s.x, s.y]);
146
+ return o.useMemo(() => ({
147
+ ...s,
147
148
  update: g,
148
- refs: j,
149
+ refs: F,
149
150
  elements: c,
150
- floatingStyles: z
151
- }), [i, g, j, c, z]);
151
+ floatingStyles: j
152
+ }), [s, g, F, c, j]);
152
153
  }
153
- const ee = (e) => {
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: s
164
+ padding: i
164
165
  } = typeof e == "function" ? e(n) : e;
165
- return r && t(r) ? r.current != null ? L({
166
+ return r && t(r) ? r.current != null ? z({
166
167
  element: r.current,
167
- padding: s
168
- }).fn(n) : {} : r ? L({
168
+ padding: i
169
+ }).fn(n) : {} : r ? z({
169
170
  element: r,
170
- padding: s
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
- }), oe = (e, t) => ({
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
- }), ie = (e, t) => ({
184
+ }), ue = (e, t) => ({
184
185
  ...N(e),
185
186
  options: [e, t]
186
- }), ue = (e, t) => ({
187
+ }), le = (e, t) => ({
187
188
  ...Q(e),
188
189
  options: [e, t]
189
- }), le = (e, t) => ({
190
+ }), ce = (e, t) => ({
190
191
  ...T(e),
191
192
  options: [e, t]
192
- }), ce = (e, t) => ({
193
- ...ee(e),
193
+ }), ae = (e, t) => ({
194
+ ...te(e),
194
195
  options: [e, t]
195
196
  });
196
197
  export {
197
- ce as arrow,
198
- me as autoUpdate,
198
+ ae as arrow,
199
+ pe as autoUpdate,
199
200
  I as computePosition,
200
- ie as flip,
201
- le as hide,
201
+ ue as flip,
202
+ ce as hide,
202
203
  se as limitShift,
203
204
  fe as offset,
204
- pe as platform,
205
- oe as shift,
206
- ue as size,
207
- re as useFloating
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"], [y, ce, ie] = W(d), [b, we] = Q(d, [
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
- ]), E = M(), V = s.forwardRef(
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(y.Provider, { scope: o.__scopeAccordion, children: e === "multiple" ? /* @__PURE__ */ n(de, { ...r, ref: c }) : /* @__PURE__ */ n(se, { ...i, ref: c }) });
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, (A) => {
84
- if (!ne.includes(A.key)) return;
85
- const F = A.target, x = m().filter((N) => !N.ref.current?.disabled), C = x.findIndex((N) => N.ref.current === F), D = x.length;
86
- if (C === -1) return;
87
- A.preventDefault();
88
- let f = 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, (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 = C + 1, f > w && (f = _);
90
+ f = A + 1, f > w && (f = _);
91
91
  }, P = () => {
92
- f = C - 1, f < _ && (f = w);
92
+ f = A - 1, f < _ && (f = w);
93
93
  };
94
- switch (A.key) {
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(y.Slot, { scope: e, 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 = E(e), p = re(), m = t && l.value.includes(t) || !1, v = r.disabled || o.disabled;
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 S = "AccordionTrigger", j = s.forwardRef(
182
+ var y = "AccordionTrigger", j = s.forwardRef(
183
183
  (o, c) => {
184
- const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(S, e), l = le(S, e), a = E(e);
185
- return /* @__PURE__ */ n(y.ItemSlot, { scope: e, children: /* @__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 = S;
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 = E(e);
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 Re = V, Pe = z, Ne = U, Se = j, ye = q;
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
- Ne as Header,
233
- Pe as Item,
234
- Re as Root,
235
- Se as Trigger,
236
- we as createAccordionScope
232
+ Pe as Header,
233
+ Re as Item,
234
+ we as Root,
235
+ Ne as Trigger
237
236
  };