@editora/ui-react 0.1.11 → 0.1.12

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.esm.js CHANGED
@@ -1,452 +1,469 @@
1
1
  'use client';
2
2
  import { p as V } from "./_internals-d86cc997.mjs";
3
3
  import { Button as _ } from "./Button.esm.js";
4
- import { Tooltip as re } from "./Tooltip.esm.js";
5
- import { Alert as te, AlertActions as ne, AlertDescription as ie, AlertIcon as ae, AlertTitle as pe } from "./Alert.esm.js";
4
+ import { Tooltip as te } from "./Tooltip.esm.js";
5
+ import { Alert as oe, AlertActions as ne, AlertDescription as ie, AlertIcon as ae, AlertTitle as fe } from "./Alert.esm.js";
6
6
  import { Dropdown as me, DropdownContent as se, DropdownItem as le, DropdownSectionLabel as ce, DropdownSeparator as ue, DropdownTrigger as xe } from "./Dropdown.esm.js";
7
7
  import { Input as ge } from "./Input.esm.js";
8
- import { PasswordField as De } from "./PasswordField.esm.js";
8
+ import { PasswordField as Ae } from "./PasswordField.esm.js";
9
9
  import { TagsInput as be } from "./TagsInput.esm.js";
10
- import { OTPInput as Te, PinInput as ve } from "./PinInput.esm.js";
11
- import { Dropzone as Se, FileUpload as Ce } from "./FileUpload.esm.js";
12
- import { Textarea as Me } from "./Textarea.esm.js";
13
- import { Field as Fe } from "./Field.esm.js";
14
- import { ControlGroup as Re, Description as Le, FieldError as Ne, Fieldset as Ee } from "./FieldSemantics.esm.js";
15
- import { Combobox as Ge } from "./Combobox.esm.js";
10
+ import { OTPInput as Pe, PinInput as ye } from "./PinInput.esm.js";
11
+ import { Dropzone as ve, FileUpload as Ce } from "./FileUpload.esm.js";
12
+ import { Textarea as Se } from "./Textarea.esm.js";
13
+ import { Field as ke } from "./Field.esm.js";
14
+ import { ControlGroup as Re, Description as Le, FieldError as Ee, Fieldset as Ne } from "./FieldSemantics.esm.js";
15
+ import { Combobox as He } from "./Combobox.esm.js";
16
16
  import { Badge as ze } from "./Badge.esm.js";
17
17
  import { EmptyState as qe } from "./EmptyState.esm.js";
18
18
  import { Table as Ue } from "./Table.esm.js";
19
- import { DataTable as Ke } from "./DataTable.esm.js";
20
- import { Chart as We } from "./Chart.esm.js";
19
+ import { DataTable as $e } from "./DataTable.esm.js";
20
+ import { Chart as Qe } from "./Chart.esm.js";
21
21
  import { Timeline as Je } from "./Timeline.esm.js";
22
22
  import { Calendar as Ye } from "./Calendar.esm.js";
23
23
  import { ColorPicker as _e } from "./ColorPicker.esm.js";
24
- import { DatePicker as rr } from "./DatePicker.esm.js";
25
- import { DateRangePicker as tr } from "./DateRangePicker.esm.js";
26
- import { DateField as ir, TimeField as ar } from "./DateField.esm.js";
27
- import { NumberField as fr } from "./NumberField.esm.js";
28
- import { MultiSelect as sr } from "./MultiSelect.esm.js";
29
- import { SplitButton as cr } from "./SplitButton.esm.js";
30
- import { TransferList as xr } from "./TransferList.esm.js";
31
- import { Sortable as gr } from "./Sortable.esm.js";
32
- import { InlineEdit as Dr } from "./InlineEdit.esm.js";
33
- import { TimePicker as br } from "./TimePicker.esm.js";
34
- import { DateTimePicker as Tr } from "./DateTimePicker.esm.js";
35
- import { DateRangeTimePicker as wr } from "./DateRangeTimePicker.esm.js";
36
- import { Gantt as Cr } from "./Gantt.esm.js";
37
- import { Stepper as Mr } from "./Stepper.esm.js";
38
- import { Wizard as Fr } from "./Wizard.esm.js";
39
- import { Rating as Rr } from "./Rating.esm.js";
40
- import { QuickActions as Nr } from "./QuickActions.esm.js";
41
- import { NavigationMenu as Br, NavigationMenuContent as Gr, NavigationMenuIndicator as Hr, NavigationMenuItem as zr, NavigationMenuLink as Vr, NavigationMenuList as qr, NavigationMenuRoot as Or, NavigationMenuTrigger as Ur, NavigationMenuViewport as $r } from "./NavigationMenu.esm.js";
42
- import { Menubar as Qr } from "./Menubar.esm.js";
43
- import { Dialog as jr } from "./Dialog.esm.js";
44
- import { DialogProvider as Xr, useDialog as Yr } from "./DialogProvider.esm.js";
45
- import { Popover as _r } from "./Popover.esm.js";
46
- import { Tabs as ro } from "./Tabs.esm.js";
47
- import { Menu as to, MenuItem as no, MenuSectionLabel as io, MenuSeparator as ao } from "./Menu.esm.js";
48
- import { Icon as fo } from "./Icon.esm.js";
49
- import { ToastAPI as so, ToastProvider as lo, toast as co, toastApi as uo, useToast as xo } from "./ToastAPI.esm.js";
50
- import { Toast as Ao } from "./Toast.esm.js";
51
- import { FloatingToolbar as Po } from "./FloatingToolbar.esm.js";
52
- import { BlockControls as yo } from "./BlockControls.esm.js";
53
- import { Command as vo, CommandItem as wo } from "./Command.esm.js";
54
- import { CommandPalette as Co, CommandPaletteItem as Io } from "./CommandPalette.esm.js";
55
- import { ContextMenu as ko } from "./ContextMenu.esm.js";
56
- import { SelectionPopup as ho } from "./SelectionPopup.esm.js";
57
- import { PluginPanel as Lo } from "./PluginPanel.esm.js";
58
- import { Form as Eo } from "./Form.esm.js";
59
- import { useRef as D, useCallback as f, useState as E, useEffect as q } from "react";
60
- import { V as O } from "./runtime-3cc1c386-b4118dbe.mjs";
61
- import { Box as Go } from "./Box.esm.js";
62
- import { Flex as zo } from "./Flex.esm.js";
63
- import { Grid as qo } from "./Grid.esm.js";
64
- import { PlacementGrid as Uo } from "./PlacementGrid.esm.js";
65
- import { MasonryGrid as Ko } from "./MasonryGrid.esm.js";
66
- import { Section as Wo } from "./Section.esm.js";
67
- import { Container as Jo } from "./Container.esm.js";
68
- import { Sidebar as Yo } from "./Sidebar.esm.js";
69
- import { Panel as _o, PanelGroup as et, Splitter as rt } from "./PanelGroup.esm.js";
70
- import { Tree as tt } from "./Tree.esm.js";
71
- import { Breadcrumb as it } from "./Breadcrumb.esm.js";
72
- import { AppHeader as pt, AppHeaderCenter as ft, AppHeaderEnd as mt, AppHeaderStart as st, AppHeaderSubtitle as lt, AppHeaderTitle as ct } from "./AppHeader.esm.js";
73
- import { Drawer as xt } from "./Drawer.esm.js";
74
- import { Layout as gt } from "./Layout.esm.js";
75
- import { ThemeProvider as Dt, useTheme as Pt } from "./ThemeProvider.esm.js";
76
- import { Collection as yt } from "./Collection.esm.js";
77
- import { Listbox as vt } from "./Listbox.esm.js";
78
- import { RovingFocusGroup as St } from "./RovingFocusGroup.esm.js";
79
- import { DismissableLayer as It } from "./DismissableLayer.esm.js";
80
- import { FocusScope as kt } from "./FocusScope.esm.js";
81
- import { Positioner as ht } from "./Positioner.esm.js";
82
- import { Anchor as Lt } from "./Anchor.esm.js";
83
- import { Checkbox as Et } from "./Checkbox.esm.js";
84
- import { RadioGroup as Gt } from "./RadioGroup.esm.js";
85
- import { Switch as zt } from "./Switch.esm.js";
86
- import { Toggle as qt } from "./Toggle.esm.js";
87
- import { ToggleGroup as Ut } from "./ToggleGroup.esm.js";
88
- import { AspectRatio as Kt } from "./AspectRatio.esm.js";
89
- import { Avatar as Wt } from "./Avatar.esm.js";
90
- import { Presence as Jt } from "./Presence.esm.js";
91
- import { Progress as Yt } from "./Progress.esm.js";
92
- import { Meter as _t } from "./Meter.esm.js";
93
- import { Portal as rn } from "./Portal.esm.js";
94
- import { ScrollArea as tn } from "./ScrollArea.esm.js";
24
+ import { DatePicker as tt } from "./DatePicker.esm.js";
25
+ import { DateRangePicker as ot } from "./DateRangePicker.esm.js";
26
+ import { DateField as it, TimeField as at } from "./DateField.esm.js";
27
+ import { NumberField as pt } from "./NumberField.esm.js";
28
+ import { MultiSelect as st } from "./MultiSelect.esm.js";
29
+ import { SplitButton as ct } from "./SplitButton.esm.js";
30
+ import { TransferList as xt } from "./TransferList.esm.js";
31
+ import { Sortable as gt } from "./Sortable.esm.js";
32
+ import { InlineEdit as At } from "./InlineEdit.esm.js";
33
+ import { TimePicker as bt } from "./TimePicker.esm.js";
34
+ import { DateTimePicker as Pt } from "./DateTimePicker.esm.js";
35
+ import { DateRangeTimePicker as Tt } from "./DateRangeTimePicker.esm.js";
36
+ import { Gantt as Ct } from "./Gantt.esm.js";
37
+ import { Stepper as St } from "./Stepper.esm.js";
38
+ import { Wizard as kt } from "./Wizard.esm.js";
39
+ import { Rating as Rt } from "./Rating.esm.js";
40
+ import { QuickActions as Et } from "./QuickActions.esm.js";
41
+ import { NavigationMenu as Bt, NavigationMenuContent as Ht, NavigationMenuIndicator as Gt, NavigationMenuItem as zt, NavigationMenuLink as Vt, NavigationMenuList as qt, NavigationMenuRoot as Ot, NavigationMenuTrigger as Ut, NavigationMenuViewport as Wt } from "./NavigationMenu.esm.js";
42
+ import { Menubar as Kt } from "./Menubar.esm.js";
43
+ import { Dialog as jt } from "./Dialog.esm.js";
44
+ import { DialogProvider as Xt, useDialog as Yt } from "./DialogProvider.esm.js";
45
+ import { Popover as _t } from "./Popover.esm.js";
46
+ import { Tabs as tr } from "./Tabs.esm.js";
47
+ import { Menu as or, MenuItem as nr, MenuSectionLabel as ir, MenuSeparator as ar } from "./Menu.esm.js";
48
+ import { Icon as pr } from "./Icon.esm.js";
49
+ import { ToastAPI as sr, ToastProvider as lr, toast as cr, toastApi as ur, useToast as xr } from "./ToastAPI.esm.js";
50
+ import { Toast as gr } from "./Toast.esm.js";
51
+ import { FloatingToolbar as Ar } from "./FloatingToolbar.esm.js";
52
+ import { BlockControls as br } from "./BlockControls.esm.js";
53
+ import { Command as Pr, CommandItem as yr } from "./Command.esm.js";
54
+ import { CommandPalette as vr, CommandPaletteItem as Cr } from "./CommandPalette.esm.js";
55
+ import { ContextMenu as Sr } from "./ContextMenu.esm.js";
56
+ import { SelectionPopup as kr } from "./SelectionPopup.esm.js";
57
+ import { PluginPanel as Rr } from "./PluginPanel.esm.js";
58
+ import { Form as Er } from "./Form.esm.js";
59
+ import { useRef as y, useCallback as l, useState as G, useEffect as q } from "react";
60
+ import "./runtime-4ac0107b-3a3f8a32.mjs";
61
+ import { Box as Br } from "./Box.esm.js";
62
+ import { Flex as Gr } from "./Flex.esm.js";
63
+ import { Grid as Vr } from "./Grid.esm.js";
64
+ import { PlacementGrid as Or } from "./PlacementGrid.esm.js";
65
+ import { MasonryGrid as Wr } from "./MasonryGrid.esm.js";
66
+ import { Section as Kr } from "./Section.esm.js";
67
+ import { Container as jr } from "./Container.esm.js";
68
+ import { Sidebar as Xr } from "./Sidebar.esm.js";
69
+ import { Panel as Zr, PanelGroup as _r, Splitter as eo } from "./PanelGroup.esm.js";
70
+ import { Tree as ro } from "./Tree.esm.js";
71
+ import { Breadcrumb as no } from "./Breadcrumb.esm.js";
72
+ import { AppHeader as ao, AppHeaderCenter as fo, AppHeaderEnd as po, AppHeaderStart as mo, AppHeaderSubtitle as so, AppHeaderTitle as lo } from "./AppHeader.esm.js";
73
+ import { Drawer as uo } from "./Drawer.esm.js";
74
+ import { Layout as go } from "./Layout.esm.js";
75
+ import { ThemeProvider as Ao, useTheme as Do } from "./ThemeProvider.esm.js";
76
+ import { Collection as wo } from "./Collection.esm.js";
77
+ import { Listbox as yo } from "./Listbox.esm.js";
78
+ import { RovingFocusGroup as vo } from "./RovingFocusGroup.esm.js";
79
+ import { DismissableLayer as Mo } from "./DismissableLayer.esm.js";
80
+ import { FocusScope as Io } from "./FocusScope.esm.js";
81
+ import { Positioner as Fo } from "./Positioner.esm.js";
82
+ import { Anchor as Lo } from "./Anchor.esm.js";
83
+ import { Checkbox as No } from "./Checkbox.esm.js";
84
+ import { RadioGroup as Ho } from "./RadioGroup.esm.js";
85
+ import { Switch as zo } from "./Switch.esm.js";
86
+ import { Toggle as qo } from "./Toggle.esm.js";
87
+ import { ToggleGroup as Uo } from "./ToggleGroup.esm.js";
88
+ import { AspectRatio as $o } from "./AspectRatio.esm.js";
89
+ import { Avatar as Qo } from "./Avatar.esm.js";
90
+ import { Presence as Jo } from "./Presence.esm.js";
91
+ import { Progress as Yo } from "./Progress.esm.js";
92
+ import { Meter as _o } from "./Meter.esm.js";
93
+ import { Portal as tn } from "./Portal.esm.js";
94
+ import { ScrollArea as on } from "./ScrollArea.esm.js";
95
95
  import { Separator as an } from "./Separator.esm.js";
96
- import { Slot as fn } from "./Slot.esm.js";
96
+ import { Slot as pn } from "./Slot.esm.js";
97
97
  import { Toolbar as sn } from "./Toolbar.esm.js";
98
98
  import { VisuallyHidden as cn } from "./VisuallyHidden.esm.js";
99
99
  import { Collapsible as xn } from "./Collapsible.esm.js";
100
100
  import { Pagination as gn } from "./Pagination.esm.js";
101
- import { Accordion as Dn } from "./Accordion.esm.js";
101
+ import { Accordion as An } from "./Accordion.esm.js";
102
102
  import { DirectionProvider as bn } from "./DirectionProvider.esm.js";
103
- import { HoverCard as Tn } from "./HoverCard.esm.js";
104
- import { Card as wn } from "./Card.esm.js";
103
+ import { HoverCard as Pn } from "./HoverCard.esm.js";
104
+ import { Card as Tn } from "./Card.esm.js";
105
105
  import { Label as Cn } from "./Label.esm.js";
106
- import { AlertDialog as Mn, AlertDialogActions as kn, AlertDialogContent as Fn, AlertDialogDescription as hn, AlertDialogIcon as Rn, AlertDialogTitle as Ln } from "./AlertDialog.esm.js";
107
- import { AlertDialogProvider as En, useAlertDialog as Bn } from "./AlertDialogProvider.esm.js";
108
- import { AnimatedText as Hn } from "./AnimatedText.esm.js";
106
+ import { AlertDialog as Sn, AlertDialogActions as In, AlertDialogContent as kn, AlertDialogDescription as Fn, AlertDialogIcon as Rn, AlertDialogTitle as Ln } from "./AlertDialog.esm.js";
107
+ import { AlertDialogProvider as Nn, useAlertDialog as Bn } from "./AlertDialogProvider.esm.js";
108
+ import { AnimatedText as Gn } from "./AnimatedText.esm.js";
109
109
  import { SpinningText as Vn } from "./SpinningText.esm.js";
110
110
  import { NumberTicker as On } from "./NumberTicker.esm.js";
111
- import { AnimatedList as $n } from "./AnimatedList.esm.js";
112
- import { AnimatedBeam as Qn } from "./AnimatedBeam.esm.js";
111
+ import { AnimatedList as Wn } from "./AnimatedList.esm.js";
112
+ import { AnimatedBeam as Kn } from "./AnimatedBeam.esm.js";
113
113
  import { IconCloud as jn } from "./IconCloud.esm.js";
114
114
  import { Dock as Xn } from "./Dock.esm.js";
115
115
  import { Orbiter as Zn } from "./Orbiter.esm.js";
116
116
  import { Marquee as ei } from "./Marquee.esm.js";
117
- import { Select as oi } from "./Select.esm.js";
117
+ import { Select as ri } from "./Select.esm.js";
118
118
  import { Slider as ni } from "./Slider.esm.js";
119
119
  import { Skeleton as ai } from "./Skeleton.esm.js";
120
- import { AnimatedNumber as fi, useAnimatedNumber as mi, useAnimatedNumberValue as si } from "./AnimatedNumber.esm.js";
120
+ import { AnimatedNumber as pi, useAnimatedNumber as mi, useAnimatedNumberValue as si } from "./AnimatedNumber.esm.js";
121
121
  import { toastAdvanced as ci, default as ui, toastPro as xi } from "@editora/toast";
122
122
  import "react-dom";
123
+ function O(p, u, h = "top") {
124
+ const x = typeof h == "string" ? { placement: h } : h, m = x.placement || "top", c = typeof x.offset == "number" ? x.offset : 8, b = !!x.shift, e = p.getBoundingClientRect(), r = u.getBoundingClientRect();
125
+ let o = 0, f = 0;
126
+ m === "top" ? (o = e.top - r.height - c, f = e.left + (e.width - r.width) / 2) : m === "bottom" ? (o = e.bottom + c, f = e.left + (e.width - r.width) / 2) : m === "left" ? (o = e.top + (e.height - r.height) / 2, f = e.left - r.width - c) : (o = e.top + (e.height - r.height) / 2, f = e.right + c);
127
+ const w = e.left + e.width / 2, C = e.top + e.height / 2, P = Math.round(w - f), M = Math.round(C - o);
128
+ if (b) {
129
+ const S = window.innerWidth || document.documentElement.clientWidth, g = window.innerHeight || document.documentElement.clientHeight;
130
+ if (m === "top" || m === "bottom") {
131
+ const s = S - r.width - 4;
132
+ f < 4 && (f = Math.min(s, f + (4 - f))), f > s && (f = Math.max(4, f - (f - s)));
133
+ } else {
134
+ const s = g - r.height - 4;
135
+ o < 4 && (o = Math.min(s, o + (4 - o))), o > s && (o = Math.max(4, o - (o - s)));
136
+ }
137
+ }
138
+ return { top: o, left: f, placement: m, x: P, y: M };
139
+ }
123
140
  function J() {
124
- const p = D(null), s = f(async () => {
125
- const o = p.current;
126
- return o ? await o.submit() : !1;
127
- }, []), P = f(async () => {
128
- const o = p.current;
129
- return o ? await o.validate() : { valid: !0, errors: {} };
130
- }, []), g = f(() => {
131
- var t;
132
- const o = p.current;
133
- return o ? (t = o.getValues) == null ? void 0 : t.call(o) : {};
134
- }, []), x = f((o) => {
135
- var a;
136
- const t = p.current;
137
- return (a = t == null ? void 0 : t.reset) == null ? void 0 : a.call(t, o);
138
- }, []), d = f(() => {
139
- var t;
140
- const o = p.current;
141
- return o ? typeof o.isDirty == "function" ? !!o.isDirty() : ((t = o.hasAttribute) == null ? void 0 : t.call(o, "dirty")) || !1 : !1;
142
- }, []), b = f((o) => {
143
- var a;
144
- const t = p.current;
145
- return (a = t == null ? void 0 : t.markClean) == null ? void 0 : a.call(t, o);
141
+ const p = y(null), u = l(async () => {
142
+ const e = p.current;
143
+ return e ? await e.submit() : !1;
144
+ }, []), h = l(async () => {
145
+ const e = p.current;
146
+ return e ? await e.validate() : { valid: !0, errors: {} };
147
+ }, []), x = l(() => {
148
+ var r;
149
+ const e = p.current;
150
+ return e ? (r = e.getValues) == null ? void 0 : r.call(e) : {};
151
+ }, []), m = l((e) => {
152
+ var o;
153
+ const r = p.current;
154
+ return (o = r == null ? void 0 : r.reset) == null ? void 0 : o.call(r, e);
155
+ }, []), c = l(() => {
156
+ var r;
157
+ const e = p.current;
158
+ return e ? typeof e.isDirty == "function" ? !!e.isDirty() : ((r = e.hasAttribute) == null ? void 0 : r.call(e, "dirty")) || !1 : !1;
159
+ }, []), b = l((e) => {
160
+ var o;
161
+ const r = p.current;
162
+ return (o = r == null ? void 0 : r.markClean) == null ? void 0 : o.call(r, e);
146
163
  }, []);
147
- return { ref: p, submit: s, validate: P, getValues: g, reset: x, isDirty: d, markClean: b };
164
+ return { ref: p, submit: u, validate: h, getValues: x, reset: m, isDirty: c, markClean: b };
148
165
  }
149
- function B(p, s) {
166
+ function z(p, u) {
150
167
  if (p) {
151
168
  if (typeof p == "function") {
152
- p(s);
169
+ p(u);
153
170
  return;
154
171
  }
155
- p.current = s;
172
+ p.current = u;
156
173
  }
157
174
  }
158
175
  function X(p) {
159
- const { placement: s = "bottom", offset: P = 8, open: g, onOpen: x, onClose: d, role: b = "menu" } = p || {}, o = D(null), t = D(null), a = D(null), C = D(`floating-${Math.random().toString(36).slice(2, 9)}`), [v, G] = E({ top: 0, left: 0, placement: s }), w = typeof g < "u", [H, z] = E(!!g), c = w ? !!g : H, A = f(() => {
160
- const r = o.current, n = t.current;
161
- if (!r || !n)
176
+ const { placement: u = "bottom", offset: h = 8, open: x, onOpen: m, onClose: c, role: b = "menu" } = p || {}, e = y(null), r = y(null), o = y(null), f = y(`floating-${Math.random().toString(36).slice(2, 9)}`), [w, C] = G({ top: 0, left: 0, placement: u }), P = typeof x < "u", [M, S] = G(!!x), g = P ? !!x : M, s = l(() => {
177
+ const n = e.current, i = r.current;
178
+ if (!n || !i)
162
179
  return;
163
- const i = O(r, n, { placement: s, offset: P });
164
- G({
165
- top: Math.round(i.top),
166
- left: Math.round(i.left),
167
- placement: i.placement,
168
- arrow: i.x || i.y ? { x: i.x, y: i.y } : void 0
180
+ const a = O(n, i, { placement: u, offset: h });
181
+ C({
182
+ top: Math.round(a.top),
183
+ left: Math.round(a.left),
184
+ placement: a.placement,
185
+ arrow: a.x || a.y ? { x: a.x, y: a.y } : void 0
169
186
  });
170
- }, [s, P]), u = f(
171
- (r) => {
172
- w || z(r), r ? x == null || x() : d == null || d();
187
+ }, [u, h]), D = l(
188
+ (n) => {
189
+ P || S(n), n ? m == null || m() : c == null || c();
173
190
  },
174
- [w, x, d]
175
- ), I = f(() => u(!c), [c, u]), M = f(() => u(!0), [u]), k = f(() => u(!1), [u]);
191
+ [P, m, c]
192
+ ), k = l(() => D(!g), [g, D]), F = l(() => D(!0), [D]), R = l(() => D(!1), [D]);
176
193
  q(() => {
177
- if (!c)
194
+ if (!g)
178
195
  return;
179
- const r = o.current, n = t.current;
180
- if (!r || !n)
196
+ const n = e.current, i = r.current;
197
+ if (!n || !i)
181
198
  return;
182
- A();
183
- const i = () => {
184
- a.current && cancelAnimationFrame(a.current), a.current = requestAnimationFrame(() => A());
185
- }, l = () => {
186
- a.current && cancelAnimationFrame(a.current), a.current = requestAnimationFrame(() => A());
199
+ s();
200
+ const a = () => {
201
+ o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => s());
202
+ }, A = () => {
203
+ o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => s());
187
204
  };
188
- window.addEventListener("scroll", i, !0), window.addEventListener("resize", l);
189
- let m = null, e = null;
205
+ window.addEventListener("scroll", a, !0), window.addEventListener("resize", A);
206
+ let d = null, t = null;
190
207
  try {
191
- typeof ResizeObserver < "u" && (m = new ResizeObserver(l), e = new ResizeObserver(l), m.observe(r), e.observe(n));
208
+ typeof ResizeObserver < "u" && (d = new ResizeObserver(A), t = new ResizeObserver(A), d.observe(n), t.observe(i));
192
209
  } catch {
193
- m = e = null;
210
+ d = t = null;
194
211
  }
195
212
  return () => {
196
- window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", l), m == null || m.disconnect(), e == null || e.disconnect(), a.current && cancelAnimationFrame(a.current), a.current = null;
213
+ window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", A), d == null || d.disconnect(), t == null || t.disconnect(), o.current && cancelAnimationFrame(o.current), o.current = null;
197
214
  };
198
- }, [c, A]);
199
- const F = f((r) => {
200
- o.current = r;
201
- }, []), h = f((r) => {
202
- t.current = r;
203
- }, []), y = () => t.current ? Array.from(
204
- t.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')
205
- ).filter(Boolean) : [], T = (r) => {
206
- const n = y();
207
- if (!n.length)
215
+ }, [g, s]);
216
+ const L = l((n) => {
217
+ e.current = n;
218
+ }, []), E = l((n) => {
219
+ r.current = n;
220
+ }, []), T = () => r.current ? Array.from(
221
+ r.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')
222
+ ).filter(Boolean) : [], v = (n) => {
223
+ const i = T();
224
+ if (!i.length)
208
225
  return;
209
- const i = Math.max(0, Math.min(n.length - 1, r));
226
+ const a = Math.max(0, Math.min(i.length - 1, n));
210
227
  try {
211
- n[i].focus();
228
+ i[a].focus();
212
229
  } catch {
213
230
  }
214
- }, S = () => T(0), R = () => {
215
- const r = y();
216
- r.length && T(r.length - 1);
217
- }, L = () => {
218
- const r = y(), n = r.findIndex((i) => i === document.activeElement);
219
- T(n < 0 ? 0 : (n + 1) % r.length);
220
- }, N = () => {
221
- const r = y(), n = r.findIndex((i) => i === document.activeElement);
222
- T(n <= 0 ? r.length - 1 : n - 1);
231
+ }, I = () => v(0), N = () => {
232
+ const n = T();
233
+ n.length && v(n.length - 1);
234
+ }, B = () => {
235
+ const n = T(), i = n.findIndex((a) => a === document.activeElement);
236
+ v(i < 0 ? 0 : (i + 1) % n.length);
237
+ }, H = () => {
238
+ const n = T(), i = n.findIndex((a) => a === document.activeElement);
239
+ v(i <= 0 ? n.length - 1 : i - 1);
223
240
  };
224
241
  return {
225
- referenceRef: F,
226
- floatingRef: h,
227
- coords: v,
228
- update: A,
229
- open: c,
230
- setOpen: u,
231
- toggle: I,
232
- openPopup: M,
233
- closePopup: k,
234
- getReferenceProps: (r = {}) => {
235
- const { onClick: n, onKeyDown: i, ref: l, ...m } = r;
242
+ referenceRef: L,
243
+ floatingRef: E,
244
+ coords: w,
245
+ update: s,
246
+ open: g,
247
+ setOpen: D,
248
+ toggle: k,
249
+ openPopup: F,
250
+ closePopup: R,
251
+ getReferenceProps: (n = {}) => {
252
+ const { onClick: i, onKeyDown: a, ref: A, ...d } = n;
236
253
  return {
237
- ...m,
238
- ref: (e) => {
239
- F(e), B(l, e);
254
+ ...d,
255
+ ref: (t) => {
256
+ L(t), z(A, t);
240
257
  },
241
258
  "aria-haspopup": b,
242
- "aria-controls": C.current,
243
- "aria-expanded": c ? "true" : "false",
244
- onClick: (e) => {
245
- n == null || n(e), !e.defaultPrevented && I();
259
+ "aria-controls": f.current,
260
+ "aria-expanded": g ? "true" : "false",
261
+ onClick: (t) => {
262
+ i == null || i(t), !t.defaultPrevented && k();
246
263
  },
247
- onKeyDown: (e) => {
248
- i == null || i(e), !e.defaultPrevented && e.key === "ArrowDown" && (e.preventDefault(), M(), setTimeout(() => S(), 0));
264
+ onKeyDown: (t) => {
265
+ a == null || a(t), !t.defaultPrevented && t.key === "ArrowDown" && (t.preventDefault(), F(), setTimeout(() => I(), 0));
249
266
  }
250
267
  };
251
268
  },
252
- getFloatingProps: (r = {}) => {
253
- const { onKeyDown: n, style: i, ref: l, ...m } = r;
269
+ getFloatingProps: (n = {}) => {
270
+ const { onKeyDown: i, style: a, ref: A, ...d } = n;
254
271
  return {
255
- ...m,
256
- id: C.current,
257
- ref: (e) => {
258
- h(e), B(l, e);
272
+ ...d,
273
+ id: f.current,
274
+ ref: (t) => {
275
+ E(t), z(A, t);
259
276
  },
260
277
  role: b,
261
278
  tabIndex: -1,
262
279
  style: {
263
- ...i || {},
280
+ ...a || {},
264
281
  position: "absolute",
265
- top: `${v.top}px`,
266
- left: `${v.left}px`
282
+ top: `${w.top}px`,
283
+ left: `${w.left}px`
267
284
  },
268
- hidden: !c,
269
- onKeyDown: (e) => {
270
- n == null || n(e), !e.defaultPrevented && (e.key === "Escape" ? (e.preventDefault(), k()) : e.key === "ArrowDown" ? (e.preventDefault(), L()) : e.key === "ArrowUp" ? (e.preventDefault(), N()) : e.key === "Home" ? (e.preventDefault(), S()) : e.key === "End" && (e.preventDefault(), R()));
285
+ hidden: !g,
286
+ onKeyDown: (t) => {
287
+ i == null || i(t), !t.defaultPrevented && (t.key === "Escape" ? (t.preventDefault(), R()) : t.key === "ArrowDown" ? (t.preventDefault(), B()) : t.key === "ArrowUp" ? (t.preventDefault(), H()) : t.key === "Home" ? (t.preventDefault(), I()) : t.key === "End" && (t.preventDefault(), N()));
271
288
  }
272
289
  };
273
290
  },
274
- focusFirstItem: S,
275
- focusLastItem: R,
276
- focusNext: L,
277
- focusPrev: N
291
+ focusFirstItem: I,
292
+ focusLastItem: N,
293
+ focusNext: B,
294
+ focusPrev: H
278
295
  };
279
296
  }
280
297
  V();
281
298
  export {
282
- Dn as Accordion,
283
- te as Alert,
299
+ An as Accordion,
300
+ oe as Alert,
284
301
  ne as AlertActions,
285
302
  ie as AlertDescription,
286
- Mn as AlertDialog,
287
- kn as AlertDialogActions,
288
- Fn as AlertDialogContent,
289
- hn as AlertDialogDescription,
303
+ Sn as AlertDialog,
304
+ In as AlertDialogActions,
305
+ kn as AlertDialogContent,
306
+ Fn as AlertDialogDescription,
290
307
  Rn as AlertDialogIcon,
291
- En as AlertDialogProvider,
308
+ Nn as AlertDialogProvider,
292
309
  Ln as AlertDialogTitle,
293
310
  ae as AlertIcon,
294
- pe as AlertTitle,
295
- Lt as Anchor,
296
- Qn as AnimatedBeam,
297
- $n as AnimatedList,
298
- fi as AnimatedNumber,
299
- Hn as AnimatedText,
300
- pt as AppHeader,
301
- ft as AppHeaderCenter,
302
- mt as AppHeaderEnd,
303
- st as AppHeaderStart,
304
- lt as AppHeaderSubtitle,
305
- ct as AppHeaderTitle,
306
- Kt as AspectRatio,
307
- Wt as Avatar,
311
+ fe as AlertTitle,
312
+ Lo as Anchor,
313
+ Kn as AnimatedBeam,
314
+ Wn as AnimatedList,
315
+ pi as AnimatedNumber,
316
+ Gn as AnimatedText,
317
+ ao as AppHeader,
318
+ fo as AppHeaderCenter,
319
+ po as AppHeaderEnd,
320
+ mo as AppHeaderStart,
321
+ so as AppHeaderSubtitle,
322
+ lo as AppHeaderTitle,
323
+ $o as AspectRatio,
324
+ Qo as Avatar,
308
325
  ze as Badge,
309
- yo as BlockControls,
310
- Go as Box,
311
- it as Breadcrumb,
326
+ br as BlockControls,
327
+ Br as Box,
328
+ no as Breadcrumb,
312
329
  _ as Button,
313
330
  Ye as Calendar,
314
- wn as Card,
315
- We as Chart,
316
- Et as Checkbox,
331
+ Tn as Card,
332
+ Qe as Chart,
333
+ No as Checkbox,
317
334
  xn as Collapsible,
318
- yt as Collection,
335
+ wo as Collection,
319
336
  _e as ColorPicker,
320
- Ge as Combobox,
321
- vo as Command,
322
- wo as CommandItem,
323
- Co as CommandPalette,
324
- Io as CommandPaletteItem,
325
- Jo as Container,
326
- ko as ContextMenu,
337
+ He as Combobox,
338
+ Pr as Command,
339
+ yr as CommandItem,
340
+ vr as CommandPalette,
341
+ Cr as CommandPaletteItem,
342
+ jr as Container,
343
+ Sr as ContextMenu,
327
344
  Re as ControlGroup,
328
- Ke as DataTable,
329
- ir as DateField,
330
- rr as DatePicker,
331
- tr as DateRangePicker,
332
- wr as DateRangeTimePicker,
333
- Tr as DateTimePicker,
345
+ $e as DataTable,
346
+ it as DateField,
347
+ tt as DatePicker,
348
+ ot as DateRangePicker,
349
+ Tt as DateRangeTimePicker,
350
+ Pt as DateTimePicker,
334
351
  Le as Description,
335
- jr as Dialog,
336
- Xr as DialogProvider,
352
+ jt as Dialog,
353
+ Xt as DialogProvider,
337
354
  bn as DirectionProvider,
338
- It as DismissableLayer,
355
+ Mo as DismissableLayer,
339
356
  Xn as Dock,
340
- xt as Drawer,
357
+ uo as Drawer,
341
358
  me as Dropdown,
342
359
  se as DropdownContent,
343
360
  le as DropdownItem,
344
361
  ce as DropdownSectionLabel,
345
362
  ue as DropdownSeparator,
346
363
  xe as DropdownTrigger,
347
- Se as Dropzone,
364
+ ve as Dropzone,
348
365
  qe as EmptyState,
349
- Fe as Field,
350
- Ne as FieldError,
351
- Ee as Fieldset,
366
+ ke as Field,
367
+ Ee as FieldError,
368
+ Ne as Fieldset,
352
369
  Ce as FileUpload,
353
- zo as Flex,
354
- Po as FloatingToolbar,
355
- kt as FocusScope,
356
- Eo as Form,
357
- Cr as Gantt,
358
- qo as Grid,
359
- Tn as HoverCard,
360
- fo as Icon,
370
+ Gr as Flex,
371
+ Ar as FloatingToolbar,
372
+ Io as FocusScope,
373
+ Er as Form,
374
+ Ct as Gantt,
375
+ Vr as Grid,
376
+ Pn as HoverCard,
377
+ pr as Icon,
361
378
  jn as IconCloud,
362
- Dr as InlineEdit,
379
+ At as InlineEdit,
363
380
  ge as Input,
364
381
  Cn as Label,
365
- gt as Layout,
366
- vt as Listbox,
382
+ go as Layout,
383
+ yo as Listbox,
367
384
  ei as Marquee,
368
- Ko as MasonryGrid,
369
- to as Menu,
370
- no as MenuItem,
371
- io as MenuSectionLabel,
372
- ao as MenuSeparator,
373
- Qr as Menubar,
374
- _t as Meter,
375
- sr as MultiSelect,
376
- Br as NavigationMenu,
377
- Gr as NavigationMenuContent,
378
- Hr as NavigationMenuIndicator,
379
- zr as NavigationMenuItem,
380
- Vr as NavigationMenuLink,
381
- qr as NavigationMenuList,
382
- Or as NavigationMenuRoot,
383
- Ur as NavigationMenuTrigger,
384
- $r as NavigationMenuViewport,
385
- fr as NumberField,
385
+ Wr as MasonryGrid,
386
+ or as Menu,
387
+ nr as MenuItem,
388
+ ir as MenuSectionLabel,
389
+ ar as MenuSeparator,
390
+ Kt as Menubar,
391
+ _o as Meter,
392
+ st as MultiSelect,
393
+ Bt as NavigationMenu,
394
+ Ht as NavigationMenuContent,
395
+ Gt as NavigationMenuIndicator,
396
+ zt as NavigationMenuItem,
397
+ Vt as NavigationMenuLink,
398
+ qt as NavigationMenuList,
399
+ Ot as NavigationMenuRoot,
400
+ Ut as NavigationMenuTrigger,
401
+ Wt as NavigationMenuViewport,
402
+ pt as NumberField,
386
403
  On as NumberTicker,
387
- Te as OTPInput,
404
+ Pe as OTPInput,
388
405
  Zn as Orbiter,
389
406
  gn as Pagination,
390
- _o as Panel,
391
- et as PanelGroup,
392
- De as PasswordField,
393
- ve as PinInput,
394
- Uo as PlacementGrid,
395
- Lo as PluginPanel,
396
- _r as Popover,
397
- rn as Portal,
398
- ht as Positioner,
399
- Jt as Presence,
400
- Yt as Progress,
401
- Nr as QuickActions,
402
- Gt as RadioGroup,
403
- Rr as Rating,
404
- St as RovingFocusGroup,
405
- tn as ScrollArea,
406
- Wo as Section,
407
- oi as Select,
408
- ho as SelectionPopup,
407
+ Zr as Panel,
408
+ _r as PanelGroup,
409
+ Ae as PasswordField,
410
+ ye as PinInput,
411
+ Or as PlacementGrid,
412
+ Rr as PluginPanel,
413
+ _t as Popover,
414
+ tn as Portal,
415
+ Fo as Positioner,
416
+ Jo as Presence,
417
+ Yo as Progress,
418
+ Et as QuickActions,
419
+ Ho as RadioGroup,
420
+ Rt as Rating,
421
+ vo as RovingFocusGroup,
422
+ on as ScrollArea,
423
+ Kr as Section,
424
+ ri as Select,
425
+ kr as SelectionPopup,
409
426
  an as Separator,
410
- Yo as Sidebar,
427
+ Xr as Sidebar,
411
428
  ai as Skeleton,
412
429
  ni as Slider,
413
- fn as Slot,
414
- gr as Sortable,
430
+ pn as Slot,
431
+ gt as Sortable,
415
432
  Vn as SpinningText,
416
- cr as SplitButton,
417
- rt as Splitter,
418
- Mr as Stepper,
419
- zt as Switch,
433
+ ct as SplitButton,
434
+ eo as Splitter,
435
+ St as Stepper,
436
+ zo as Switch,
420
437
  Ue as Table,
421
- ro as Tabs,
438
+ tr as Tabs,
422
439
  be as TagsInput,
423
- Me as Textarea,
424
- Dt as ThemeProvider,
425
- ar as TimeField,
426
- br as TimePicker,
440
+ Se as Textarea,
441
+ Ao as ThemeProvider,
442
+ at as TimeField,
443
+ bt as TimePicker,
427
444
  Je as Timeline,
428
- Ao as Toast,
429
- so as ToastAPI,
430
- lo as ToastProvider,
431
- qt as Toggle,
432
- Ut as ToggleGroup,
445
+ gr as Toast,
446
+ sr as ToastAPI,
447
+ lr as ToastProvider,
448
+ qo as Toggle,
449
+ Uo as ToggleGroup,
433
450
  sn as Toolbar,
434
- re as Tooltip,
435
- xr as TransferList,
436
- tt as Tree,
451
+ te as Tooltip,
452
+ xt as TransferList,
453
+ ro as Tree,
437
454
  cn as VisuallyHidden,
438
- Fr as Wizard,
439
- co as toast,
455
+ kt as Wizard,
456
+ cr as toast,
440
457
  ci as toastAdvanced,
441
- uo as toastApi,
458
+ ur as toastApi,
442
459
  ui as toastLegacy,
443
460
  xi as toastPro,
444
461
  Bn as useAlertDialog,
445
462
  mi as useAnimatedNumber,
446
463
  si as useAnimatedNumberValue,
447
- Yr as useDialog,
464
+ Yt as useDialog,
448
465
  X as useFloating,
449
466
  J as useForm,
450
- Pt as useTheme,
451
- xo as useToast
467
+ Do as useTheme,
468
+ xr as useToast
452
469
  };