@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/README.md +12 -0
- package/dist/AlertDialogProvider.cjs.js +1 -1
- package/dist/AlertDialogProvider.esm.js +1 -1
- package/dist/DialogProvider.cjs.js +1 -1
- package/dist/DialogProvider.esm.js +1 -1
- package/dist/Icon.cjs.js +1 -1
- package/dist/Icon.esm.js +40 -38
- package/dist/SplitButton.cjs.js +396 -1
- package/dist/SplitButton.esm.js +658 -49
- package/dist/ThemeProvider.cjs.js +1 -1
- package/dist/ThemeProvider.esm.js +4 -4
- package/dist/components/AlertDialogProvider.cjs.js +1 -1
- package/dist/components/AlertDialogProvider.esm.js +1 -1
- package/dist/components/DialogProvider.cjs.js +1 -1
- package/dist/components/DialogProvider.esm.js +1 -1
- package/dist/components/Icon.d.ts +2 -0
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/SplitButton.cjs.js +1 -1
- package/dist/components/SplitButton.d.ts +4 -2
- package/dist/components/SplitButton.d.ts.map +1 -1
- package/dist/components/SplitButton.esm.js +3 -2
- package/dist/components/ThemeProvider.cjs.js +1 -1
- package/dist/components/ThemeProvider.esm.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +344 -327
- package/dist/{runtime-3cc1c386-b4118dbe.mjs → runtime-4ac0107b-3a3f8a32.mjs} +230 -248
- package/dist/runtime-4ac0107b-b526ae0d.js +1 -0
- package/package.json +1 -1
- package/dist/runtime-3cc1c386-9d1b191c.js +0 -1
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
|
|
5
|
-
import { Alert as
|
|
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
|
|
8
|
+
import { PasswordField as Ae } from "./PasswordField.esm.js";
|
|
9
9
|
import { TagsInput as be } from "./TagsInput.esm.js";
|
|
10
|
-
import { OTPInput as
|
|
11
|
-
import { Dropzone as
|
|
12
|
-
import { Textarea as
|
|
13
|
-
import { Field as
|
|
14
|
-
import { ControlGroup as Re, Description as Le, FieldError as
|
|
15
|
-
import { Combobox as
|
|
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
|
|
20
|
-
import { Chart as
|
|
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
|
|
25
|
-
import { DateRangePicker as
|
|
26
|
-
import { DateField as
|
|
27
|
-
import { NumberField as
|
|
28
|
-
import { MultiSelect as
|
|
29
|
-
import { SplitButton as
|
|
30
|
-
import { TransferList as
|
|
31
|
-
import { Sortable as
|
|
32
|
-
import { InlineEdit as
|
|
33
|
-
import { TimePicker as
|
|
34
|
-
import { DateTimePicker as
|
|
35
|
-
import { DateRangeTimePicker as
|
|
36
|
-
import { Gantt as
|
|
37
|
-
import { Stepper as
|
|
38
|
-
import { Wizard as
|
|
39
|
-
import { Rating as
|
|
40
|
-
import { QuickActions as
|
|
41
|
-
import { NavigationMenu as
|
|
42
|
-
import { Menubar as
|
|
43
|
-
import { Dialog as
|
|
44
|
-
import { DialogProvider as
|
|
45
|
-
import { Popover as
|
|
46
|
-
import { Tabs as
|
|
47
|
-
import { Menu as
|
|
48
|
-
import { Icon as
|
|
49
|
-
import { ToastAPI as
|
|
50
|
-
import { Toast as
|
|
51
|
-
import { FloatingToolbar as
|
|
52
|
-
import { BlockControls as
|
|
53
|
-
import { Command as
|
|
54
|
-
import { CommandPalette as
|
|
55
|
-
import { ContextMenu as
|
|
56
|
-
import { SelectionPopup as
|
|
57
|
-
import { PluginPanel as
|
|
58
|
-
import { Form as
|
|
59
|
-
import { useRef as
|
|
60
|
-
import
|
|
61
|
-
import { Box as
|
|
62
|
-
import { Flex as
|
|
63
|
-
import { Grid as
|
|
64
|
-
import { PlacementGrid as
|
|
65
|
-
import { MasonryGrid as
|
|
66
|
-
import { Section as
|
|
67
|
-
import { Container as
|
|
68
|
-
import { Sidebar as
|
|
69
|
-
import { Panel as
|
|
70
|
-
import { Tree as
|
|
71
|
-
import { Breadcrumb as
|
|
72
|
-
import { AppHeader as
|
|
73
|
-
import { Drawer as
|
|
74
|
-
import { Layout as
|
|
75
|
-
import { ThemeProvider as
|
|
76
|
-
import { Collection as
|
|
77
|
-
import { Listbox as
|
|
78
|
-
import { RovingFocusGroup as
|
|
79
|
-
import { DismissableLayer as
|
|
80
|
-
import { FocusScope as
|
|
81
|
-
import { Positioner as
|
|
82
|
-
import { Anchor as
|
|
83
|
-
import { Checkbox as
|
|
84
|
-
import { RadioGroup as
|
|
85
|
-
import { Switch as
|
|
86
|
-
import { Toggle as
|
|
87
|
-
import { ToggleGroup as
|
|
88
|
-
import { AspectRatio as
|
|
89
|
-
import { Avatar as
|
|
90
|
-
import { Presence as
|
|
91
|
-
import { Progress as
|
|
92
|
-
import { Meter as
|
|
93
|
-
import { Portal as
|
|
94
|
-
import { ScrollArea as
|
|
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
|
|
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
|
|
101
|
+
import { Accordion as An } from "./Accordion.esm.js";
|
|
102
102
|
import { DirectionProvider as bn } from "./DirectionProvider.esm.js";
|
|
103
|
-
import { HoverCard as
|
|
104
|
-
import { Card as
|
|
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
|
|
107
|
-
import { AlertDialogProvider as
|
|
108
|
-
import { AnimatedText as
|
|
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
|
|
112
|
-
import { AnimatedBeam as
|
|
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
|
|
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
|
|
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 =
|
|
125
|
-
const
|
|
126
|
-
return
|
|
127
|
-
}, []),
|
|
128
|
-
const
|
|
129
|
-
return
|
|
130
|
-
}, []),
|
|
131
|
-
var
|
|
132
|
-
const
|
|
133
|
-
return
|
|
134
|
-
}, []),
|
|
135
|
-
var
|
|
136
|
-
const
|
|
137
|
-
return (
|
|
138
|
-
}, []),
|
|
139
|
-
var
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
}, []), b =
|
|
143
|
-
var
|
|
144
|
-
const
|
|
145
|
-
return (
|
|
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:
|
|
164
|
+
return { ref: p, submit: u, validate: h, getValues: x, reset: m, isDirty: c, markClean: b };
|
|
148
165
|
}
|
|
149
|
-
function
|
|
166
|
+
function z(p, u) {
|
|
150
167
|
if (p) {
|
|
151
168
|
if (typeof p == "function") {
|
|
152
|
-
p(
|
|
169
|
+
p(u);
|
|
153
170
|
return;
|
|
154
171
|
}
|
|
155
|
-
p.current =
|
|
172
|
+
p.current = u;
|
|
156
173
|
}
|
|
157
174
|
}
|
|
158
175
|
function X(p) {
|
|
159
|
-
const { placement:
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
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
|
|
164
|
-
|
|
165
|
-
top: Math.round(
|
|
166
|
-
left: Math.round(
|
|
167
|
-
placement:
|
|
168
|
-
arrow:
|
|
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
|
-
}, [
|
|
171
|
-
(
|
|
172
|
-
|
|
187
|
+
}, [u, h]), D = l(
|
|
188
|
+
(n) => {
|
|
189
|
+
P || S(n), n ? m == null || m() : c == null || c();
|
|
173
190
|
},
|
|
174
|
-
[
|
|
175
|
-
),
|
|
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 (!
|
|
194
|
+
if (!g)
|
|
178
195
|
return;
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
196
|
+
const n = e.current, i = r.current;
|
|
197
|
+
if (!n || !i)
|
|
181
198
|
return;
|
|
182
|
-
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
},
|
|
186
|
-
|
|
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",
|
|
189
|
-
let
|
|
205
|
+
window.addEventListener("scroll", a, !0), window.addEventListener("resize", A);
|
|
206
|
+
let d = null, t = null;
|
|
190
207
|
try {
|
|
191
|
-
typeof ResizeObserver < "u" && (
|
|
208
|
+
typeof ResizeObserver < "u" && (d = new ResizeObserver(A), t = new ResizeObserver(A), d.observe(n), t.observe(i));
|
|
192
209
|
} catch {
|
|
193
|
-
|
|
210
|
+
d = t = null;
|
|
194
211
|
}
|
|
195
212
|
return () => {
|
|
196
|
-
window.removeEventListener("scroll",
|
|
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
|
-
}, [
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
}, []),
|
|
202
|
-
|
|
203
|
-
}, []),
|
|
204
|
-
|
|
205
|
-
).filter(Boolean) : [],
|
|
206
|
-
const
|
|
207
|
-
if (!
|
|
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
|
|
226
|
+
const a = Math.max(0, Math.min(i.length - 1, n));
|
|
210
227
|
try {
|
|
211
|
-
|
|
228
|
+
i[a].focus();
|
|
212
229
|
} catch {
|
|
213
230
|
}
|
|
214
|
-
},
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
const
|
|
222
|
-
|
|
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:
|
|
226
|
-
floatingRef:
|
|
227
|
-
coords:
|
|
228
|
-
update:
|
|
229
|
-
open:
|
|
230
|
-
setOpen:
|
|
231
|
-
toggle:
|
|
232
|
-
openPopup:
|
|
233
|
-
closePopup:
|
|
234
|
-
getReferenceProps: (
|
|
235
|
-
const { onClick:
|
|
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
|
-
...
|
|
238
|
-
ref: (
|
|
239
|
-
|
|
254
|
+
...d,
|
|
255
|
+
ref: (t) => {
|
|
256
|
+
L(t), z(A, t);
|
|
240
257
|
},
|
|
241
258
|
"aria-haspopup": b,
|
|
242
|
-
"aria-controls":
|
|
243
|
-
"aria-expanded":
|
|
244
|
-
onClick: (
|
|
245
|
-
|
|
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: (
|
|
248
|
-
|
|
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: (
|
|
253
|
-
const { onKeyDown:
|
|
269
|
+
getFloatingProps: (n = {}) => {
|
|
270
|
+
const { onKeyDown: i, style: a, ref: A, ...d } = n;
|
|
254
271
|
return {
|
|
255
|
-
...
|
|
256
|
-
id:
|
|
257
|
-
ref: (
|
|
258
|
-
|
|
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
|
-
...
|
|
280
|
+
...a || {},
|
|
264
281
|
position: "absolute",
|
|
265
|
-
top: `${
|
|
266
|
-
left: `${
|
|
282
|
+
top: `${w.top}px`,
|
|
283
|
+
left: `${w.left}px`
|
|
267
284
|
},
|
|
268
|
-
hidden: !
|
|
269
|
-
onKeyDown: (
|
|
270
|
-
|
|
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:
|
|
275
|
-
focusLastItem:
|
|
276
|
-
focusNext:
|
|
277
|
-
focusPrev:
|
|
291
|
+
focusFirstItem: I,
|
|
292
|
+
focusLastItem: N,
|
|
293
|
+
focusNext: B,
|
|
294
|
+
focusPrev: H
|
|
278
295
|
};
|
|
279
296
|
}
|
|
280
297
|
V();
|
|
281
298
|
export {
|
|
282
|
-
|
|
283
|
-
|
|
299
|
+
An as Accordion,
|
|
300
|
+
oe as Alert,
|
|
284
301
|
ne as AlertActions,
|
|
285
302
|
ie as AlertDescription,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
303
|
+
Sn as AlertDialog,
|
|
304
|
+
In as AlertDialogActions,
|
|
305
|
+
kn as AlertDialogContent,
|
|
306
|
+
Fn as AlertDialogDescription,
|
|
290
307
|
Rn as AlertDialogIcon,
|
|
291
|
-
|
|
308
|
+
Nn as AlertDialogProvider,
|
|
292
309
|
Ln as AlertDialogTitle,
|
|
293
310
|
ae as AlertIcon,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
326
|
+
br as BlockControls,
|
|
327
|
+
Br as Box,
|
|
328
|
+
no as Breadcrumb,
|
|
312
329
|
_ as Button,
|
|
313
330
|
Ye as Calendar,
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
331
|
+
Tn as Card,
|
|
332
|
+
Qe as Chart,
|
|
333
|
+
No as Checkbox,
|
|
317
334
|
xn as Collapsible,
|
|
318
|
-
|
|
335
|
+
wo as Collection,
|
|
319
336
|
_e as ColorPicker,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
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
|
-
|
|
336
|
-
|
|
352
|
+
jt as Dialog,
|
|
353
|
+
Xt as DialogProvider,
|
|
337
354
|
bn as DirectionProvider,
|
|
338
|
-
|
|
355
|
+
Mo as DismissableLayer,
|
|
339
356
|
Xn as Dock,
|
|
340
|
-
|
|
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
|
-
|
|
364
|
+
ve as Dropzone,
|
|
348
365
|
qe as EmptyState,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
366
|
+
ke as Field,
|
|
367
|
+
Ee as FieldError,
|
|
368
|
+
Ne as Fieldset,
|
|
352
369
|
Ce as FileUpload,
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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
|
-
|
|
379
|
+
At as InlineEdit,
|
|
363
380
|
ge as Input,
|
|
364
381
|
Cn as Label,
|
|
365
|
-
|
|
366
|
-
|
|
382
|
+
go as Layout,
|
|
383
|
+
yo as Listbox,
|
|
367
384
|
ei as Marquee,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
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
|
-
|
|
404
|
+
Pe as OTPInput,
|
|
388
405
|
Zn as Orbiter,
|
|
389
406
|
gn as Pagination,
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
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
|
-
|
|
427
|
+
Xr as Sidebar,
|
|
411
428
|
ai as Skeleton,
|
|
412
429
|
ni as Slider,
|
|
413
|
-
|
|
414
|
-
|
|
430
|
+
pn as Slot,
|
|
431
|
+
gt as Sortable,
|
|
415
432
|
Vn as SpinningText,
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
433
|
+
ct as SplitButton,
|
|
434
|
+
eo as Splitter,
|
|
435
|
+
St as Stepper,
|
|
436
|
+
zo as Switch,
|
|
420
437
|
Ue as Table,
|
|
421
|
-
|
|
438
|
+
tr as Tabs,
|
|
422
439
|
be as TagsInput,
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
440
|
+
Se as Textarea,
|
|
441
|
+
Ao as ThemeProvider,
|
|
442
|
+
at as TimeField,
|
|
443
|
+
bt as TimePicker,
|
|
427
444
|
Je as Timeline,
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
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
|
-
|
|
435
|
-
|
|
436
|
-
|
|
451
|
+
te as Tooltip,
|
|
452
|
+
xt as TransferList,
|
|
453
|
+
ro as Tree,
|
|
437
454
|
cn as VisuallyHidden,
|
|
438
|
-
|
|
439
|
-
|
|
455
|
+
kt as Wizard,
|
|
456
|
+
cr as toast,
|
|
440
457
|
ci as toastAdvanced,
|
|
441
|
-
|
|
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
|
-
|
|
464
|
+
Yt as useDialog,
|
|
448
465
|
X as useFloating,
|
|
449
466
|
J as useForm,
|
|
450
|
-
|
|
451
|
-
|
|
467
|
+
Do as useTheme,
|
|
468
|
+
xr as useToast
|
|
452
469
|
};
|