@fayz-ai/ui 0.40.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DC6NZZ55.js → chunk-3HGLZIQT.js} +140 -344
- package/dist/chunk-3HGLZIQT.js.map +1 -0
- package/dist/{chunk-N57676HW.js → chunk-4BP33MTZ.js} +4 -4
- package/dist/{chunk-N57676HW.js.map → chunk-4BP33MTZ.js.map} +1 -1
- package/dist/{chunk-TP4YGQY7.js → chunk-L6PNGGHM.js} +732 -246
- package/dist/chunk-L6PNGGHM.js.map +1 -0
- package/dist/{chunk-KVYT76DD.js → chunk-ZMS7TNJD.js} +149 -196
- package/dist/chunk-ZMS7TNJD.js.map +1 -0
- package/dist/dashboard/index.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/layout/AppShell.d.ts +4 -1
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/primitives/bulk-action-bar.d.ts +3 -1
- package/dist/primitives/bulk-action-bar.d.ts.map +1 -1
- package/dist/primitives/data-table.d.ts +8 -1
- package/dist/primitives/data-table.d.ts.map +1 -1
- package/dist/primitives/dropdown.d.ts +2 -2
- package/dist/primitives/dropdown.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +1 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +3 -3
- package/dist/primitives/list-view.d.ts +3 -1
- package/dist/primitives/list-view.d.ts.map +1 -1
- package/dist/primitives/mobile-scrim.d.ts +29 -0
- package/dist/primitives/mobile-scrim.d.ts.map +1 -0
- package/dist/primitives/modal.d.ts +10 -1
- package/dist/primitives/modal.d.ts.map +1 -1
- package/dist/primitives/page-actions.d.ts +5 -14
- package/dist/primitives/page-actions.d.ts.map +1 -1
- package/dist/primitives/use-row-selection.d.ts +2 -0
- package/dist/primitives/use-row-selection.d.ts.map +1 -1
- package/dist/styles.css +61 -6
- package/package.json +2 -2
- package/dist/chunk-DC6NZZ55.js.map +0 -1
- package/dist/chunk-KVYT76DD.js.map +0 -1
- package/dist/chunk-TP4YGQY7.js.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { cn, ConfirmDialog } from './chunk-FKYFYGAS.js';
|
|
1
|
+
import { cn, ConfirmDialog, Button } from './chunk-FKYFYGAS.js';
|
|
2
2
|
import { ICON_MAP } from './chunk-ZTS5S6BZ.js';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React16 from 'react';
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
-
import { X, Loader2, ChevronLeft, ArrowLeft, Bell, PanelLeft, PanelLeftClose, Search, CornerDownLeft, Menu, Crown, ChevronsRight, ChevronsLeft,
|
|
5
|
+
import { X, ChevronRight, Check, Circle, Loader2, ChevronLeft, ArrowLeft, ChevronDown, MoreHorizontal, Bell, PanelLeft, PanelLeftClose, Search, CornerDownLeft, Menu, Crown, ChevronsRight, ChevronsLeft, Info, ExternalLink, CreditCard, Sparkles, Home, ChevronUp, Plus, Settings, SlidersHorizontal, MoreVertical, UserCog, LogOut } from 'lucide-react';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
8
9
|
import { useTranslation, useNavReferrer, routeModule, navHistoryBack, recordNavigation } from '@fayz-ai/core';
|
|
9
10
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
10
11
|
import { create } from 'zustand';
|
|
@@ -28,11 +29,11 @@ var Modal = DialogPrimitive.Root;
|
|
|
28
29
|
var ModalTrigger = DialogPrimitive.Trigger;
|
|
29
30
|
var ModalClose = DialogPrimitive.Close;
|
|
30
31
|
var ModalPortal = DialogPrimitive.Portal;
|
|
31
|
-
var ModalHostContext =
|
|
32
|
+
var ModalHostContext = React16.createContext(null);
|
|
32
33
|
function useModalHost() {
|
|
33
|
-
return
|
|
34
|
+
return React16.useContext(ModalHostContext);
|
|
34
35
|
}
|
|
35
|
-
var ModalOverlay =
|
|
36
|
+
var ModalOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
36
37
|
DialogPrimitive.Overlay,
|
|
37
38
|
{
|
|
38
39
|
ref,
|
|
@@ -45,9 +46,9 @@ var ModalOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
45
46
|
}
|
|
46
47
|
));
|
|
47
48
|
ModalOverlay.displayName = "ModalOverlay";
|
|
48
|
-
var ModalContent =
|
|
49
|
-
const [host, setHost] =
|
|
50
|
-
const attach =
|
|
49
|
+
var ModalContent = React16.forwardRef(({ className, children, size = "lg", hideClose, noPadding, onPointerDownOutside, onInteractOutside, onCloseAutoFocus, ...props }, ref) => {
|
|
50
|
+
const [host, setHost] = React16.useState(null);
|
|
51
|
+
const attach = React16.useCallback((node) => {
|
|
51
52
|
setHost(node);
|
|
52
53
|
if (typeof ref === "function") ref(node);
|
|
53
54
|
else if (ref) ref.current = node;
|
|
@@ -112,16 +113,249 @@ function ModalBody({ className, ...props }) {
|
|
|
112
113
|
}
|
|
113
114
|
);
|
|
114
115
|
}
|
|
115
|
-
function ModalFooter({ className, ...props }) {
|
|
116
|
-
|
|
116
|
+
function ModalFooter({ className, variant = "inline", start, children, ...props }) {
|
|
117
|
+
if (variant === "bar") {
|
|
118
|
+
return /* @__PURE__ */ jsxs(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: cn(
|
|
122
|
+
"flex shrink-0 items-center justify-between gap-3 border-t fayz-glass-divider px-5 py-2.5",
|
|
123
|
+
"pb-[calc(0.625rem+env(safe-area-inset-bottom))] sm:pb-2.5",
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
...props,
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-3", children: start }),
|
|
129
|
+
/* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children })
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
return /* @__PURE__ */ jsx("div", { className: cn("mt-auto flex flex-col-reverse gap-2 pb-[env(safe-area-inset-bottom)] sm:mt-0 sm:flex-row sm:justify-end sm:gap-0 sm:space-x-2 sm:pb-0 shrink-0", className), ...props, children });
|
|
117
135
|
}
|
|
118
|
-
var ModalTitle =
|
|
136
|
+
var ModalTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props }));
|
|
119
137
|
ModalTitle.displayName = "ModalTitle";
|
|
120
|
-
var ModalDescription =
|
|
138
|
+
var ModalDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
121
139
|
ModalDescription.displayName = "ModalDescription";
|
|
140
|
+
function useScrim(open) {
|
|
141
|
+
const [mounted, setMounted] = React16.useState(open);
|
|
142
|
+
const [visible, setVisible] = React16.useState(open);
|
|
143
|
+
React16.useEffect(() => {
|
|
144
|
+
if (open) {
|
|
145
|
+
setMounted(true);
|
|
146
|
+
let frame = requestAnimationFrame(() => {
|
|
147
|
+
frame = requestAnimationFrame(() => setVisible(true));
|
|
148
|
+
});
|
|
149
|
+
return () => cancelAnimationFrame(frame);
|
|
150
|
+
}
|
|
151
|
+
setVisible(false);
|
|
152
|
+
const timer = window.setTimeout(() => setMounted(false), SCRIM_MS);
|
|
153
|
+
return () => window.clearTimeout(timer);
|
|
154
|
+
}, [open]);
|
|
155
|
+
return { mounted, visible };
|
|
156
|
+
}
|
|
157
|
+
var SCRIM_MS = 200;
|
|
158
|
+
function MobileScrim({ open, onClose, focus }) {
|
|
159
|
+
const scrim = useScrim(open);
|
|
160
|
+
const [box, setBox] = React16.useState(null);
|
|
161
|
+
React16.useEffect(() => {
|
|
162
|
+
if (open) setBox(focus ? focus.getBoundingClientRect() : null);
|
|
163
|
+
}, [open, focus]);
|
|
164
|
+
if (!scrim.mounted || typeof document === "undefined") return null;
|
|
165
|
+
const fade = cn("transition-opacity duration-200 motion-reduce:transition-none", scrim.visible ? "opacity-100" : "opacity-0");
|
|
166
|
+
return createPortal(
|
|
167
|
+
box ? /* @__PURE__ */ jsx("div", { "aria-hidden": true, onClick: onClose, className: cn("fixed inset-0 z-[100] overflow-hidden md:hidden", fade), children: /* @__PURE__ */ jsx(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
className: cn(
|
|
171
|
+
"absolute rounded-xl ring-1 ring-foreground/10 transition-transform duration-200 ease-out motion-reduce:transition-none",
|
|
172
|
+
scrim.visible ? "scale-100" : "scale-[1.04]"
|
|
173
|
+
),
|
|
174
|
+
style: {
|
|
175
|
+
left: box.left,
|
|
176
|
+
top: box.top,
|
|
177
|
+
width: box.width,
|
|
178
|
+
height: box.height,
|
|
179
|
+
boxShadow: "0 0 0 200vmax hsl(var(--foreground) / 0.4)"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
) }) : /* @__PURE__ */ jsx("div", { "aria-hidden": true, onClick: onClose, className: cn("fixed inset-0 z-[100] bg-foreground/40 md:hidden", fade) }),
|
|
183
|
+
document.body
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
function Dropdown({ open: openProp, defaultOpen, onOpenChange, ...props }) {
|
|
187
|
+
const [own, setOwn] = React16.useState(defaultOpen ?? false);
|
|
188
|
+
const open = openProp ?? own;
|
|
189
|
+
const change = (next) => {
|
|
190
|
+
setOwn(next);
|
|
191
|
+
onOpenChange?.(next);
|
|
192
|
+
};
|
|
193
|
+
const [trigger, setTrigger] = React16.useState(null);
|
|
194
|
+
const focus = open ? trigger?.closest("[data-scrim-focus]") ?? null : null;
|
|
195
|
+
return /* @__PURE__ */ jsxs(DropdownTriggerContext.Provider, { value: setTrigger, children: [
|
|
196
|
+
/* @__PURE__ */ jsx(MobileScrim, { open, onClose: () => change(false), focus }),
|
|
197
|
+
/* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { open, onOpenChange: change, ...props })
|
|
198
|
+
] });
|
|
199
|
+
}
|
|
200
|
+
var DropdownTriggerContext = React16.createContext(null);
|
|
201
|
+
var DropdownTrigger = React16.forwardRef((props, ref) => {
|
|
202
|
+
const register = React16.useContext(DropdownTriggerContext);
|
|
203
|
+
const setRef = React16.useCallback((el) => {
|
|
204
|
+
register?.(el);
|
|
205
|
+
if (typeof ref === "function") ref(el);
|
|
206
|
+
else if (ref) ref.current = el;
|
|
207
|
+
}, [register, ref]);
|
|
208
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { ref: setRef, ...props });
|
|
209
|
+
});
|
|
210
|
+
DropdownTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;
|
|
211
|
+
var DropdownGroup = DropdownMenuPrimitive.Group;
|
|
212
|
+
var DropdownPortal = DropdownMenuPrimitive.Portal;
|
|
213
|
+
var DropdownSub = DropdownMenuPrimitive.Sub;
|
|
214
|
+
var DropdownRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
215
|
+
var DropdownSubTrigger = React16.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
216
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
217
|
+
{
|
|
218
|
+
ref,
|
|
219
|
+
className: cn(
|
|
220
|
+
"flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm outline-none focus:bg-muted data-[state=open]:bg-muted",
|
|
221
|
+
inset && "pl-8",
|
|
222
|
+
className
|
|
223
|
+
),
|
|
224
|
+
...props,
|
|
225
|
+
children: [
|
|
226
|
+
children,
|
|
227
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
));
|
|
231
|
+
DropdownSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
232
|
+
var DropdownSubContent = React16.forwardRef(({ className, ...props }, ref) => (
|
|
233
|
+
// Portaled, like DropdownContent. Without it the submenu renders inside the
|
|
234
|
+
// parent panel's DOM — and that panel is `overflow-hidden`, so the submenu
|
|
235
|
+
// was clipped to its box: a flyout you could open and never reach.
|
|
236
|
+
/* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
237
|
+
DropdownMenuPrimitive.SubContent,
|
|
238
|
+
{
|
|
239
|
+
ref,
|
|
240
|
+
className: cn(
|
|
241
|
+
"fayz-glass-surface fz-menu-glass z-[110] min-w-[8rem] overflow-hidden rounded-card border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
242
|
+
className
|
|
243
|
+
),
|
|
244
|
+
...props
|
|
245
|
+
}
|
|
246
|
+
) })
|
|
247
|
+
));
|
|
248
|
+
DropdownSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
249
|
+
var DropdownContent = React16.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
250
|
+
DropdownMenuPrimitive.Content,
|
|
251
|
+
{
|
|
252
|
+
ref,
|
|
253
|
+
sideOffset,
|
|
254
|
+
className: cn(
|
|
255
|
+
"fayz-glass-surface fz-menu-glass z-[110] min-w-[8rem] overflow-hidden rounded-card border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
256
|
+
className
|
|
257
|
+
),
|
|
258
|
+
...props
|
|
259
|
+
}
|
|
260
|
+
) }));
|
|
261
|
+
DropdownContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
262
|
+
var DropdownItem = React16.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
263
|
+
DropdownMenuPrimitive.Item,
|
|
264
|
+
{
|
|
265
|
+
ref,
|
|
266
|
+
className: cn(
|
|
267
|
+
"relative flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
268
|
+
inset && "pl-8",
|
|
269
|
+
className
|
|
270
|
+
),
|
|
271
|
+
...props
|
|
272
|
+
}
|
|
273
|
+
));
|
|
274
|
+
DropdownItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
275
|
+
var DropdownCheckboxItem = React16.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
276
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
277
|
+
{
|
|
278
|
+
ref,
|
|
279
|
+
className: cn(
|
|
280
|
+
"relative flex cursor-default select-none items-center rounded-button py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
281
|
+
className
|
|
282
|
+
),
|
|
283
|
+
checked,
|
|
284
|
+
...props,
|
|
285
|
+
children: [
|
|
286
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
287
|
+
children
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
));
|
|
291
|
+
DropdownCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
292
|
+
var DropdownRadioItem = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
293
|
+
DropdownMenuPrimitive.RadioItem,
|
|
294
|
+
{
|
|
295
|
+
ref,
|
|
296
|
+
className: cn(
|
|
297
|
+
"relative flex cursor-default select-none items-center rounded-button py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
298
|
+
className
|
|
299
|
+
),
|
|
300
|
+
...props,
|
|
301
|
+
children: [
|
|
302
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
303
|
+
children
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
));
|
|
307
|
+
DropdownRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
308
|
+
var DropdownLabel = React16.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
309
|
+
DropdownMenuPrimitive.Label,
|
|
310
|
+
{
|
|
311
|
+
ref,
|
|
312
|
+
className: cn(
|
|
313
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
314
|
+
inset && "pl-8",
|
|
315
|
+
className
|
|
316
|
+
),
|
|
317
|
+
...props
|
|
318
|
+
}
|
|
319
|
+
));
|
|
320
|
+
DropdownLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
321
|
+
var DropdownSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
322
|
+
DropdownMenuPrimitive.Separator,
|
|
323
|
+
{
|
|
324
|
+
ref,
|
|
325
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
326
|
+
...props
|
|
327
|
+
}
|
|
328
|
+
));
|
|
329
|
+
DropdownSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
330
|
+
var DropdownShortcut = ({
|
|
331
|
+
className,
|
|
332
|
+
...props
|
|
333
|
+
}) => {
|
|
334
|
+
return /* @__PURE__ */ jsx(
|
|
335
|
+
"span",
|
|
336
|
+
{
|
|
337
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
338
|
+
...props
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
};
|
|
342
|
+
DropdownShortcut.displayName = "DropdownShortcut";
|
|
343
|
+
var WIDE_QUERY = "(min-width: 768px)";
|
|
344
|
+
function useIsWide(query = WIDE_QUERY) {
|
|
345
|
+
const [wide, setWide] = React16.useState(
|
|
346
|
+
() => typeof window === "undefined" ? true : window.matchMedia(query).matches
|
|
347
|
+
);
|
|
348
|
+
React16.useEffect(() => {
|
|
349
|
+
const mq = window.matchMedia(query);
|
|
350
|
+
const onChange = () => setWide(mq.matches);
|
|
351
|
+
mq.addEventListener("change", onChange);
|
|
352
|
+
return () => mq.removeEventListener("change", onChange);
|
|
353
|
+
}, [query]);
|
|
354
|
+
return wide;
|
|
355
|
+
}
|
|
122
356
|
var HIDDEN = { visible: false, saving: false };
|
|
123
|
-
var SaveBarApiContext =
|
|
124
|
-
var SaveBarStateContext =
|
|
357
|
+
var SaveBarApiContext = React16.createContext(null);
|
|
358
|
+
var SaveBarStateContext = React16.createContext({ visible: false, saving: false });
|
|
125
359
|
var _saveBarVisible = false;
|
|
126
360
|
var saveFlow = { current: null };
|
|
127
361
|
var requestSave = (onSave) => {
|
|
@@ -140,7 +374,7 @@ function setSaveBarVisibleSignal(v) {
|
|
|
140
374
|
_saveBarSubs.forEach((fn) => fn());
|
|
141
375
|
}
|
|
142
376
|
function useSaveBarVisible() {
|
|
143
|
-
return
|
|
377
|
+
return React16.useSyncExternalStore(
|
|
144
378
|
(cb) => {
|
|
145
379
|
_saveBarSubs.add(cb);
|
|
146
380
|
return () => {
|
|
@@ -152,10 +386,10 @@ function useSaveBarVisible() {
|
|
|
152
386
|
);
|
|
153
387
|
}
|
|
154
388
|
function SaveBarProvider({ children }) {
|
|
155
|
-
const [state, setState] =
|
|
156
|
-
const handlers =
|
|
157
|
-
const entries =
|
|
158
|
-
const api =
|
|
389
|
+
const [state, setState] = React16.useState({ visible: false, saving: false });
|
|
390
|
+
const handlers = React16.useRef({});
|
|
391
|
+
const entries = React16.useRef([]);
|
|
392
|
+
const api = React16.useMemo(() => ({
|
|
159
393
|
setState,
|
|
160
394
|
handlers,
|
|
161
395
|
entries,
|
|
@@ -165,16 +399,16 @@ function SaveBarProvider({ children }) {
|
|
|
165
399
|
setState(top ? top.state : HIDDEN);
|
|
166
400
|
}
|
|
167
401
|
}), []);
|
|
168
|
-
const backStack =
|
|
169
|
-
const backApi =
|
|
170
|
-
|
|
402
|
+
const backStack = React16.useRef([]);
|
|
403
|
+
const backApi = React16.useMemo(() => ({ stack: backStack }), []);
|
|
404
|
+
React16.useEffect(() => {
|
|
171
405
|
setSaveBarVisibleSignal(state.visible);
|
|
172
406
|
}, [state.visible]);
|
|
173
|
-
const [leaveTo, setLeaveTo] =
|
|
174
|
-
const bypass =
|
|
407
|
+
const [leaveTo, setLeaveTo] = React16.useState(null);
|
|
408
|
+
const bypass = React16.useRef(false);
|
|
175
409
|
if (state.saving && saveFlow.current) saveFlow.current.started = true;
|
|
176
410
|
const t = useTranslation();
|
|
177
|
-
|
|
411
|
+
React16.useEffect(() => {
|
|
178
412
|
if (!state.dirty || state.host || typeof window === "undefined") return;
|
|
179
413
|
const guarded = window.location.href;
|
|
180
414
|
const onNav = (e) => {
|
|
@@ -209,7 +443,7 @@ function SaveBarProvider({ children }) {
|
|
|
209
443
|
bypass.current = false;
|
|
210
444
|
}, 0);
|
|
211
445
|
};
|
|
212
|
-
|
|
446
|
+
React16.useEffect(() => {
|
|
213
447
|
function onKey(e) {
|
|
214
448
|
if (state.visible && !state.saving) {
|
|
215
449
|
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
@@ -252,7 +486,7 @@ function SaveBarProvider({ children }) {
|
|
|
252
486
|
)
|
|
253
487
|
] }) }) });
|
|
254
488
|
}
|
|
255
|
-
var BackNavApiContext =
|
|
489
|
+
var BackNavApiContext = React16.createContext(null);
|
|
256
490
|
function isEditableTarget(target) {
|
|
257
491
|
const el = target;
|
|
258
492
|
if (!el || !el.tagName) return false;
|
|
@@ -260,12 +494,12 @@ function isEditableTarget(target) {
|
|
|
260
494
|
return tag === "input" || tag === "textarea" || tag === "select" || el.isContentEditable;
|
|
261
495
|
}
|
|
262
496
|
function useBackHandler(onBack) {
|
|
263
|
-
const api =
|
|
264
|
-
const ref =
|
|
265
|
-
|
|
497
|
+
const api = React16.useContext(BackNavApiContext);
|
|
498
|
+
const ref = React16.useRef(onBack);
|
|
499
|
+
React16.useEffect(() => {
|
|
266
500
|
ref.current = onBack;
|
|
267
501
|
});
|
|
268
|
-
|
|
502
|
+
React16.useEffect(() => {
|
|
269
503
|
if (!api) return;
|
|
270
504
|
const stack = api.stack.current;
|
|
271
505
|
stack.push(ref);
|
|
@@ -276,16 +510,16 @@ function useBackHandler(onBack) {
|
|
|
276
510
|
}, [api]);
|
|
277
511
|
}
|
|
278
512
|
function useSaveBar({ dirty, alwaysVisible, saving = false, onSave, onDiscard, message, saveLabel, discardLabel }) {
|
|
279
|
-
const api =
|
|
513
|
+
const api = React16.useContext(SaveBarApiContext);
|
|
280
514
|
const host = useModalHost();
|
|
281
|
-
const entry =
|
|
282
|
-
|
|
515
|
+
const entry = React16.useRef({ state: HIDDEN, handlers: {} });
|
|
516
|
+
React16.useEffect(() => {
|
|
283
517
|
entry.current.handlers = { onSave, onDiscard };
|
|
284
518
|
if (api && api.entries.current[api.entries.current.length - 1] === entry.current) {
|
|
285
519
|
api.handlers.current = entry.current.handlers;
|
|
286
520
|
}
|
|
287
521
|
});
|
|
288
|
-
|
|
522
|
+
React16.useEffect(() => {
|
|
289
523
|
if (!api) return;
|
|
290
524
|
const list = api.entries.current;
|
|
291
525
|
list.push(entry.current);
|
|
@@ -296,19 +530,19 @@ function useSaveBar({ dirty, alwaysVisible, saving = false, onSave, onDiscard, m
|
|
|
296
530
|
api.sync();
|
|
297
531
|
};
|
|
298
532
|
}, [api]);
|
|
299
|
-
|
|
533
|
+
React16.useEffect(() => {
|
|
300
534
|
if (!api) return;
|
|
301
535
|
entry.current.state = { visible: dirty || !!alwaysVisible, dirty, saving, message, saveLabel, discardLabel, host };
|
|
302
536
|
if (api.entries.current[api.entries.current.length - 1] === entry.current) api.sync();
|
|
303
537
|
}, [api, dirty, alwaysVisible, saving, message, saveLabel, discardLabel, host]);
|
|
304
538
|
}
|
|
305
539
|
function SaveBar({ className }) {
|
|
306
|
-
const state =
|
|
307
|
-
const api =
|
|
540
|
+
const state = React16.useContext(SaveBarStateContext);
|
|
541
|
+
const api = React16.useContext(SaveBarApiContext);
|
|
308
542
|
const t = useTranslation();
|
|
309
|
-
const [rendered, setRendered] =
|
|
310
|
-
const [closing, setClosing] =
|
|
311
|
-
|
|
543
|
+
const [rendered, setRendered] = React16.useState(state.visible);
|
|
544
|
+
const [closing, setClosing] = React16.useState(false);
|
|
545
|
+
React16.useEffect(() => {
|
|
312
546
|
if (state.visible) {
|
|
313
547
|
setRendered(true);
|
|
314
548
|
setClosing(false);
|
|
@@ -374,7 +608,7 @@ function SaveBar({ className }) {
|
|
|
374
608
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
375
609
|
var Tooltip = TooltipPrimitive.Root;
|
|
376
610
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
377
|
-
var TooltipContent =
|
|
611
|
+
var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (
|
|
378
612
|
// Portaled: inside a scroll box (a table, a modal body) the tip was clipped by its container.
|
|
379
613
|
/* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
380
614
|
TooltipPrimitive.Content,
|
|
@@ -419,7 +653,7 @@ var usePageHeaderStore = create((set, get) => ({
|
|
|
419
653
|
function useRegisterPageActions() {
|
|
420
654
|
const add = usePageHeaderStore((s) => s.addActions);
|
|
421
655
|
const remove = usePageHeaderStore((s) => s.removeActions);
|
|
422
|
-
|
|
656
|
+
React16.useEffect(() => {
|
|
423
657
|
add();
|
|
424
658
|
return remove;
|
|
425
659
|
}, [add, remove]);
|
|
@@ -442,7 +676,7 @@ function usePageTitleSlotHost() {
|
|
|
442
676
|
function usePageHeaderHost() {
|
|
443
677
|
const addHost = usePageHeaderStore((s) => s.addHost);
|
|
444
678
|
const removeHost = usePageHeaderStore((s) => s.removeHost);
|
|
445
|
-
|
|
679
|
+
React16.useEffect(() => {
|
|
446
680
|
addHost();
|
|
447
681
|
return removeHost;
|
|
448
682
|
}, [addHost, removeHost]);
|
|
@@ -460,30 +694,30 @@ function PageHeaderOutlet({ className, active = true }) {
|
|
|
460
694
|
const hasActions = usePageHeaderStore((s) => s.actions > 0);
|
|
461
695
|
const addOutlet = usePageHeaderStore((s) => s.addOutlet);
|
|
462
696
|
const removeOutlet = usePageHeaderStore((s) => s.removeOutlet);
|
|
463
|
-
|
|
697
|
+
React16.useEffect(() => {
|
|
464
698
|
if (!active) return;
|
|
465
699
|
addOutlet();
|
|
466
700
|
return removeOutlet;
|
|
467
701
|
}, [active, addOutlet, removeOutlet]);
|
|
468
|
-
|
|
702
|
+
React16.useEffect(() => {
|
|
469
703
|
if (active) return;
|
|
470
704
|
setOutletSlot(null);
|
|
471
705
|
setOutletActionsSlot(null);
|
|
472
706
|
}, [active, setOutletSlot, setOutletActionsSlot]);
|
|
473
707
|
if (!active) return null;
|
|
474
|
-
return
|
|
708
|
+
return React16.createElement(
|
|
475
709
|
"div",
|
|
476
710
|
{ className: `flex min-h-9 items-center justify-between gap-3${claimed || hasActions ? "" : " hidden"} ${className ?? "mb-3"}` },
|
|
477
|
-
|
|
478
|
-
|
|
711
|
+
React16.createElement("div", { ref: setOutletSlot, className: "flex min-w-0 flex-1 items-center" }),
|
|
712
|
+
React16.createElement("div", { ref: setOutletActionsSlot, className: "flex shrink-0 items-center gap-2" })
|
|
479
713
|
);
|
|
480
714
|
}
|
|
481
715
|
function usePageHeader(active, options) {
|
|
482
|
-
const id =
|
|
716
|
+
const id = React16.useId();
|
|
483
717
|
const claim = usePageHeaderStore((s) => s.claim);
|
|
484
718
|
const release = usePageHeaderStore((s) => s.release);
|
|
485
719
|
const back = options?.back ?? false;
|
|
486
|
-
|
|
720
|
+
React16.useEffect(() => {
|
|
487
721
|
if (!active) {
|
|
488
722
|
release(id);
|
|
489
723
|
return;
|
|
@@ -500,18 +734,18 @@ function useModuleViewLabel() {
|
|
|
500
734
|
}
|
|
501
735
|
function usePublishModuleViewLabel(label) {
|
|
502
736
|
const setLabel = usePageHeaderStore((s) => s.setModuleViewLabel);
|
|
503
|
-
|
|
737
|
+
React16.useEffect(() => {
|
|
504
738
|
setLabel(label ?? null);
|
|
505
739
|
return () => setLabel(null);
|
|
506
740
|
}, [label, setLabel]);
|
|
507
741
|
}
|
|
508
742
|
function PageTitlePortal({ children }) {
|
|
509
743
|
const slot = usePageTitleSlot();
|
|
510
|
-
if (!slot) return
|
|
744
|
+
if (!slot) return React16.createElement(React16.Fragment, null, children);
|
|
511
745
|
return createPortal(children, slot);
|
|
512
746
|
}
|
|
513
|
-
var Hint =
|
|
514
|
-
if (!label) return
|
|
747
|
+
var Hint = React16.forwardRef(function Hint2({ label, children, side = "top", delayDuration = 0, ...rest }, ref) {
|
|
748
|
+
if (!label) return React16.cloneElement(children, { ...rest, ref });
|
|
515
749
|
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, { delayDuration, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
516
750
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, ...rest, ref, children }),
|
|
517
751
|
/* @__PURE__ */ jsx(TooltipContent, { side, className: "px-2 py-1 text-xs font-medium", children: label })
|
|
@@ -600,7 +834,7 @@ function PageHeader({ title, onBack, parentLabel, backLabel }) {
|
|
|
600
834
|
const hasHost = useHasPageHeaderHost();
|
|
601
835
|
const { onBack: effectiveOnBack, parentLabel: effectiveParent } = useCrossModuleBack(onBack, parentLabel);
|
|
602
836
|
useBackHandler(effectiveOnBack);
|
|
603
|
-
const node =
|
|
837
|
+
const node = React16.useMemo(() => /* @__PURE__ */ jsx(
|
|
604
838
|
PageHeaderCrumb,
|
|
605
839
|
{
|
|
606
840
|
title,
|
|
@@ -612,17 +846,198 @@ function PageHeader({ title, onBack, parentLabel, backLabel }) {
|
|
|
612
846
|
if (hasHost) return /* @__PURE__ */ jsx(PageTitlePortal, { children: node });
|
|
613
847
|
return /* @__PURE__ */ jsx("div", { className: "mb-4", children: node });
|
|
614
848
|
}
|
|
849
|
+
function iconOf(action, className) {
|
|
850
|
+
const Icon = action.icon;
|
|
851
|
+
return Icon ? /* @__PURE__ */ jsx(Icon, { className }) : null;
|
|
852
|
+
}
|
|
853
|
+
function PageActionBar({ actions, className }) {
|
|
854
|
+
const wide = useIsWide();
|
|
855
|
+
const visible = actions.filter((a) => !a.hidden);
|
|
856
|
+
if (visible.length === 0) return null;
|
|
857
|
+
if (!wide) {
|
|
858
|
+
const usable = visible.filter((a) => !a.desktopOnly);
|
|
859
|
+
if (usable.length === 0) return null;
|
|
860
|
+
const fab = /* @__PURE__ */ jsx(PageActionFab, { actions: usable });
|
|
861
|
+
const fabHost = typeof document !== "undefined" ? document.querySelector(".shell-enter") ?? document.body : null;
|
|
862
|
+
return fabHost ? createPortal(fab, fabHost) : fab;
|
|
863
|
+
}
|
|
864
|
+
let seenPrimary = false;
|
|
865
|
+
const primary = [];
|
|
866
|
+
const secondary = [];
|
|
867
|
+
const utility = [];
|
|
868
|
+
const danger = [];
|
|
869
|
+
for (const a of visible) {
|
|
870
|
+
const intent = a.intent ?? "secondary";
|
|
871
|
+
if (intent === "primary" && !seenPrimary) {
|
|
872
|
+
seenPrimary = true;
|
|
873
|
+
primary.push(a);
|
|
874
|
+
continue;
|
|
875
|
+
}
|
|
876
|
+
if (intent === "danger") {
|
|
877
|
+
danger.push(a);
|
|
878
|
+
continue;
|
|
879
|
+
}
|
|
880
|
+
if (intent === "utility") {
|
|
881
|
+
utility.push(a);
|
|
882
|
+
continue;
|
|
883
|
+
}
|
|
884
|
+
secondary.push(a);
|
|
885
|
+
}
|
|
886
|
+
const head = primary[0];
|
|
887
|
+
const menu = [...secondary, ...danger];
|
|
888
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex shrink-0 items-center gap-2", className), children: [
|
|
889
|
+
utility.map((a) => (
|
|
890
|
+
// Um botão só de ícone não diz o que faz. `title=` parecia resolver e
|
|
891
|
+
// não resolve: espera ~1s que ninguém controla, sai na pintura do
|
|
892
|
+
// sistema operacional, nunca aparece no toque e vários leitores de tela
|
|
893
|
+
// pulam. Hint é o tooltip do design system, e o texto é ANUNCIADO.
|
|
894
|
+
/* @__PURE__ */ jsx(Hint, { label: a.label, children: /* @__PURE__ */ jsx(
|
|
895
|
+
Button,
|
|
896
|
+
{
|
|
897
|
+
variant: "ghost",
|
|
898
|
+
size: "icon",
|
|
899
|
+
onClick: () => void a.onSelect(),
|
|
900
|
+
disabled: a.disabled,
|
|
901
|
+
"aria-label": a.label,
|
|
902
|
+
"data-testid": a.testId,
|
|
903
|
+
"data-tour": `action.${a.id}`,
|
|
904
|
+
children: iconOf(a, "h-4 w-4")
|
|
905
|
+
}
|
|
906
|
+
) }, a.id)
|
|
907
|
+
)),
|
|
908
|
+
head && menu.length === 0 && /* @__PURE__ */ jsxs(Button, { className: head.ai ? "fz-ai-button" : void 0, onClick: () => void head.onSelect(), disabled: head.disabled, "data-testid": head.testId, "data-tour": `action.${head.id}`, children: [
|
|
909
|
+
iconOf(head, "mr-1.5 h-4 w-4"),
|
|
910
|
+
head.label
|
|
911
|
+
] }),
|
|
912
|
+
head && menu.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
913
|
+
/* @__PURE__ */ jsxs(Button, { className: "rounded-r-none", onClick: () => void head.onSelect(), disabled: head.disabled, "data-testid": head.testId, "data-tour": `action.${head.id}`, children: [
|
|
914
|
+
iconOf(head, "mr-1.5 h-4 w-4"),
|
|
915
|
+
head.label
|
|
916
|
+
] }),
|
|
917
|
+
/* @__PURE__ */ jsxs(Dropdown, { children: [
|
|
918
|
+
/* @__PURE__ */ jsx(DropdownTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Hint, { label: `${head.label}\u2026`, children: /* @__PURE__ */ jsx(
|
|
919
|
+
Button,
|
|
920
|
+
{
|
|
921
|
+
className: "-ml-px rounded-l-none px-2",
|
|
922
|
+
"aria-label": `${head.label}\u2026`,
|
|
923
|
+
"data-tour": menu.map((a) => `action.${a.id}`).join(" "),
|
|
924
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
925
|
+
}
|
|
926
|
+
) }) }),
|
|
927
|
+
/* @__PURE__ */ jsx(DropdownContent, { align: "end", className: "w-56", children: /* @__PURE__ */ jsx(ActionItems, { actions: menu }) })
|
|
928
|
+
] })
|
|
929
|
+
] }),
|
|
930
|
+
!head && menu.length > 0 && /* @__PURE__ */ jsxs(Dropdown, { children: [
|
|
931
|
+
/* @__PURE__ */ jsx(DropdownTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Hint, { label: "A\xE7\xF5es", children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "icon", "aria-label": "A\xE7\xF5es", children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }) }),
|
|
932
|
+
/* @__PURE__ */ jsx(DropdownContent, { align: "end", className: "w-56", children: /* @__PURE__ */ jsx(ActionItems, { actions: menu }) })
|
|
933
|
+
] })
|
|
934
|
+
] });
|
|
935
|
+
}
|
|
936
|
+
function ActionItems({ actions, stagger }) {
|
|
937
|
+
const out = [];
|
|
938
|
+
actions.forEach((a, i) => {
|
|
939
|
+
const isDanger = a.intent === "danger";
|
|
940
|
+
const prevSafe = i > 0 && actions[i - 1].intent !== "danger";
|
|
941
|
+
if (isDanger && prevSafe) out.push(/* @__PURE__ */ jsx(DropdownSeparator, {}, `${a.id}-sep`));
|
|
942
|
+
out.push(
|
|
943
|
+
/* @__PURE__ */ jsxs(
|
|
944
|
+
DropdownItem,
|
|
945
|
+
{
|
|
946
|
+
disabled: a.disabled,
|
|
947
|
+
onSelect: () => void a.onSelect(),
|
|
948
|
+
"data-testid": a.testId,
|
|
949
|
+
style: stagger ? { ["--i"]: i } : void 0,
|
|
950
|
+
className: cn("gap-2", stagger && "fz-fab-item min-h-12 gap-3 px-3 text-[15px]", isDanger && "text-destructive focus:text-destructive", a.ai && "fz-ai-action"),
|
|
951
|
+
children: [
|
|
952
|
+
iconOf(a, "h-4 w-4 shrink-0"),
|
|
953
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
954
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate", children: a.label }),
|
|
955
|
+
a.description && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-muted-foreground", children: a.description })
|
|
956
|
+
] })
|
|
957
|
+
]
|
|
958
|
+
},
|
|
959
|
+
a.id
|
|
960
|
+
)
|
|
961
|
+
);
|
|
962
|
+
});
|
|
963
|
+
return /* @__PURE__ */ jsx(Fragment, { children: out });
|
|
964
|
+
}
|
|
965
|
+
function PageActionFab({ actions }) {
|
|
966
|
+
const byIntent = (i) => actions.filter((a) => (a.intent ?? "secondary") === i);
|
|
967
|
+
const utility = byIntent("utility");
|
|
968
|
+
const main = [...byIntent("primary"), ...byIntent("secondary"), ...byIntent("danger")];
|
|
969
|
+
if (main.length === 0) return /* @__PURE__ */ jsx(FabButton, { actions: utility, tone: "neutral" });
|
|
970
|
+
const isCreate = main.every((a) => a.creates ?? a.icon === Plus);
|
|
971
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
972
|
+
utility.length > 0 && /* @__PURE__ */ jsx(FabButton, { actions: utility, tone: "neutral", mini: true }),
|
|
973
|
+
/* @__PURE__ */ jsx(FabButton, { actions: main, tone: isCreate ? "primary" : "neutral" })
|
|
974
|
+
] });
|
|
975
|
+
}
|
|
976
|
+
function FabButton({ actions, tone, mini }) {
|
|
977
|
+
const [open, setOpen] = React16.useState(false);
|
|
978
|
+
if (actions.length === 0) return null;
|
|
979
|
+
const isCreate = tone === "primary";
|
|
980
|
+
const FabIcon = isCreate ? Plus : MoreVertical;
|
|
981
|
+
const style = {
|
|
982
|
+
bottom: mini ? "calc(var(--fz-bottom-bar, 0px) + 4.75rem)" : "calc(var(--fz-bottom-bar, 0px) + 1rem)"
|
|
983
|
+
};
|
|
984
|
+
const shell = cn(
|
|
985
|
+
"fz-tap fixed z-40 flex items-center justify-center rounded-full",
|
|
986
|
+
"transition-transform active:scale-95 md:hidden",
|
|
987
|
+
// Centred on the main circle's column, so the two read as one stack.
|
|
988
|
+
mini ? "right-5 h-12 w-12" : "right-4 h-14 w-14",
|
|
989
|
+
// Glass, like the bars it floats between: a tinted fill over a heavy blur,
|
|
990
|
+
// lit on the top edge. The blur is what keeps the glyph legible over
|
|
991
|
+
// whatever scrolls beneath — the fill alone would not.
|
|
992
|
+
"backdrop-blur-xl backdrop-saturate-150",
|
|
993
|
+
isCreate ? "bg-primary/75 text-primary-foreground ring-1 ring-white/25 shadow-[inset_0_1px_0_rgb(255_255_255/0.35),0_10px_24px_-8px_hsl(var(--primary)/0.5)]" : "bg-card/60 text-foreground ring-1 ring-border/60 shadow-[inset_0_1px_0_rgb(255_255_255/0.5),0_10px_24px_-10px_rgb(0_0_0/0.35)]"
|
|
994
|
+
);
|
|
995
|
+
if (actions.length === 1) {
|
|
996
|
+
const only = actions[0];
|
|
997
|
+
const Icon = only.icon ?? FabIcon;
|
|
998
|
+
return /* @__PURE__ */ jsx(
|
|
999
|
+
"button",
|
|
1000
|
+
{
|
|
1001
|
+
type: "button",
|
|
1002
|
+
style,
|
|
1003
|
+
className: shell,
|
|
1004
|
+
onClick: () => void only.onSelect(),
|
|
1005
|
+
disabled: only.disabled,
|
|
1006
|
+
"aria-label": only.label,
|
|
1007
|
+
"data-testid": only.testId,
|
|
1008
|
+
children: /* @__PURE__ */ jsx(Icon, { className: mini ? "h-5 w-5" : "h-6 w-6" })
|
|
1009
|
+
}
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
1012
|
+
return /* @__PURE__ */ jsxs(Dropdown, { open, onOpenChange: setOpen, children: [
|
|
1013
|
+
/* @__PURE__ */ jsx(DropdownTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1014
|
+
"button",
|
|
1015
|
+
{
|
|
1016
|
+
type: "button",
|
|
1017
|
+
style,
|
|
1018
|
+
className: cn(shell, open && "z-[105]", isCreate && "fz-fab-trigger"),
|
|
1019
|
+
"aria-label": actionsMenuLabel,
|
|
1020
|
+
children: /* @__PURE__ */ jsx(FabIcon, { className: mini ? "h-5 w-5" : "h-6 w-6" })
|
|
1021
|
+
}
|
|
1022
|
+
) }),
|
|
1023
|
+
/* @__PURE__ */ jsx(DropdownContent, { side: "top", align: "end", sideOffset: 12, className: "fz-fab-menu w-72 p-1.5 md:hidden", children: /* @__PURE__ */ jsx(ActionItems, { actions, stagger: true }) })
|
|
1024
|
+
] });
|
|
1025
|
+
}
|
|
1026
|
+
var actionsMenuLabel = "A\xE7\xF5es";
|
|
1027
|
+
function setActionsMenuLabel(label) {
|
|
1028
|
+
actionsMenuLabel = label;
|
|
1029
|
+
}
|
|
615
1030
|
var GUTTER_PX = 8;
|
|
616
1031
|
var CLOSE_DELAY_MS = 140;
|
|
617
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
618
|
-
function
|
|
1032
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React16.useLayoutEffect : React16.useEffect;
|
|
1033
|
+
function iconOf2(name) {
|
|
619
1034
|
if (!name) return null;
|
|
620
1035
|
return ICON_MAP[name] ?? null;
|
|
621
1036
|
}
|
|
622
|
-
var RailFlyoutContext =
|
|
1037
|
+
var RailFlyoutContext = React16.createContext(null);
|
|
623
1038
|
var RailFlyoutProvider = RailFlyoutContext.Provider;
|
|
624
1039
|
function useRailRow(content) {
|
|
625
|
-
const flyout =
|
|
1040
|
+
const flyout = React16.useContext(RailFlyoutContext);
|
|
626
1041
|
if (!flyout || !content) return {};
|
|
627
1042
|
return flyout.rowProps(content);
|
|
628
1043
|
}
|
|
@@ -632,19 +1047,19 @@ function useRailFlyout({
|
|
|
632
1047
|
activeRoute,
|
|
633
1048
|
onNavigate
|
|
634
1049
|
}) {
|
|
635
|
-
const [state, setState] =
|
|
636
|
-
const [pos, setPos] =
|
|
637
|
-
const [animate, setAnimate] =
|
|
638
|
-
const panelRef =
|
|
639
|
-
const closeTimer =
|
|
640
|
-
const lastContent =
|
|
641
|
-
const cancelClose =
|
|
1050
|
+
const [state, setState] = React16.useState(null);
|
|
1051
|
+
const [pos, setPos] = React16.useState({ top: 0, arrow: 20 });
|
|
1052
|
+
const [animate, setAnimate] = React16.useState(false);
|
|
1053
|
+
const panelRef = React16.useRef(null);
|
|
1054
|
+
const closeTimer = React16.useRef(null);
|
|
1055
|
+
const lastContent = React16.useRef(null);
|
|
1056
|
+
const cancelClose = React16.useCallback(() => {
|
|
642
1057
|
if (closeTimer.current) {
|
|
643
1058
|
clearTimeout(closeTimer.current);
|
|
644
1059
|
closeTimer.current = null;
|
|
645
1060
|
}
|
|
646
1061
|
}, []);
|
|
647
|
-
const show =
|
|
1062
|
+
const show = React16.useCallback(
|
|
648
1063
|
(anchor, content2) => {
|
|
649
1064
|
if (!enabled) return;
|
|
650
1065
|
cancelClose();
|
|
@@ -652,19 +1067,19 @@ function useRailFlyout({
|
|
|
652
1067
|
},
|
|
653
1068
|
[enabled, cancelClose]
|
|
654
1069
|
);
|
|
655
|
-
const hide =
|
|
1070
|
+
const hide = React16.useCallback(() => {
|
|
656
1071
|
cancelClose();
|
|
657
1072
|
closeTimer.current = setTimeout(() => setState(null), CLOSE_DELAY_MS);
|
|
658
1073
|
}, [cancelClose]);
|
|
659
|
-
const dismiss =
|
|
1074
|
+
const dismiss = React16.useCallback(() => {
|
|
660
1075
|
cancelClose();
|
|
661
1076
|
setState(null);
|
|
662
1077
|
}, [cancelClose]);
|
|
663
|
-
|
|
664
|
-
|
|
1078
|
+
React16.useEffect(() => () => cancelClose(), [cancelClose]);
|
|
1079
|
+
React16.useEffect(() => {
|
|
665
1080
|
if (!enabled) dismiss();
|
|
666
1081
|
}, [enabled, dismiss]);
|
|
667
|
-
const reposition =
|
|
1082
|
+
const reposition = React16.useCallback(() => {
|
|
668
1083
|
const rail = railRef.current;
|
|
669
1084
|
const anchor = state?.anchor;
|
|
670
1085
|
if (!rail || !anchor) return;
|
|
@@ -679,7 +1094,7 @@ function useRailFlyout({
|
|
|
679
1094
|
setPos({ top, arrow });
|
|
680
1095
|
}, [railRef, state]);
|
|
681
1096
|
useIsomorphicLayoutEffect(reposition, [reposition, state?.content.key]);
|
|
682
|
-
|
|
1097
|
+
React16.useEffect(() => {
|
|
683
1098
|
if (!state) return;
|
|
684
1099
|
const rail = railRef.current;
|
|
685
1100
|
const onScroll = () => reposition();
|
|
@@ -691,7 +1106,7 @@ function useRailFlyout({
|
|
|
691
1106
|
};
|
|
692
1107
|
}, [state, railRef, reposition]);
|
|
693
1108
|
const visible = !!state;
|
|
694
|
-
|
|
1109
|
+
React16.useEffect(() => {
|
|
695
1110
|
if (!visible) {
|
|
696
1111
|
setAnimate(false);
|
|
697
1112
|
return;
|
|
@@ -699,7 +1114,7 @@ function useRailFlyout({
|
|
|
699
1114
|
const id = requestAnimationFrame(() => setAnimate(true));
|
|
700
1115
|
return () => cancelAnimationFrame(id);
|
|
701
1116
|
}, [visible]);
|
|
702
|
-
|
|
1117
|
+
React16.useEffect(() => {
|
|
703
1118
|
if (!visible) return;
|
|
704
1119
|
const onKey = (event) => {
|
|
705
1120
|
if (event.key === "Escape") dismiss();
|
|
@@ -707,7 +1122,7 @@ function useRailFlyout({
|
|
|
707
1122
|
window.addEventListener("keydown", onKey);
|
|
708
1123
|
return () => window.removeEventListener("keydown", onKey);
|
|
709
1124
|
}, [visible, dismiss]);
|
|
710
|
-
const rowProps =
|
|
1125
|
+
const rowProps = React16.useCallback(
|
|
711
1126
|
(content2) => ({
|
|
712
1127
|
onMouseEnter: (event) => show(event.currentTarget, content2),
|
|
713
1128
|
onFocus: (event) => show(event.currentTarget, content2),
|
|
@@ -817,7 +1232,7 @@ function FlyoutBody({
|
|
|
817
1232
|
hasEntries && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
818
1233
|
/* @__PURE__ */ jsx("div", { className: "my-1 h-px bg-sidebar-border" }),
|
|
819
1234
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col", children: entries.map((entry) => {
|
|
820
|
-
const EntryIcon =
|
|
1235
|
+
const EntryIcon = iconOf2(entry.icon);
|
|
821
1236
|
const isActive = !!entry.route && entry.route === activeRoute;
|
|
822
1237
|
return /* @__PURE__ */ jsxs(
|
|
823
1238
|
"button",
|
|
@@ -888,7 +1303,7 @@ function NavChildConnector({ onPath, active }) {
|
|
|
888
1303
|
] });
|
|
889
1304
|
}
|
|
890
1305
|
var RAIL_PUSH_MS = 260;
|
|
891
|
-
var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ?
|
|
1306
|
+
var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? React16.useLayoutEffect : React16.useEffect;
|
|
892
1307
|
function getIcon(name) {
|
|
893
1308
|
return ICON_MAP[name] ?? Home;
|
|
894
1309
|
}
|
|
@@ -1099,7 +1514,7 @@ function NavGroup({
|
|
|
1099
1514
|
// case in an app that groups its rail).
|
|
1100
1515
|
/* @__PURE__ */ jsx("button", { "data-tour": `nav.${child.route}`, onClick: () => onNavigate(child.route), className: childClass, children: childInner })
|
|
1101
1516
|
);
|
|
1102
|
-
if (!childConnector) return /* @__PURE__ */ jsx(
|
|
1517
|
+
if (!childConnector) return /* @__PURE__ */ jsx(React16.Fragment, { children: row }, child.id);
|
|
1103
1518
|
const activeIndex = item.children.findIndex((c) => c.route === activeRoute);
|
|
1104
1519
|
const onPath = activeIndex >= 0 && childIndex < activeIndex;
|
|
1105
1520
|
return (
|
|
@@ -1121,9 +1536,9 @@ function NavGroup({
|
|
|
1121
1536
|
] });
|
|
1122
1537
|
}
|
|
1123
1538
|
function withCollapsed(slot, collapsed) {
|
|
1124
|
-
if (!
|
|
1539
|
+
if (!React16.isValidElement(slot)) return slot;
|
|
1125
1540
|
if (typeof slot.type === "string") return slot;
|
|
1126
|
-
return
|
|
1541
|
+
return React16.cloneElement(slot, { collapsed });
|
|
1127
1542
|
}
|
|
1128
1543
|
var SKELETON_ROWS = [
|
|
1129
1544
|
{ width: 56, group: false },
|
|
@@ -1165,7 +1580,7 @@ function Sidebar({
|
|
|
1165
1580
|
}) {
|
|
1166
1581
|
const currentPath = currentPathProp;
|
|
1167
1582
|
const activeRoute = resolveActiveRoute(navigation, currentPath);
|
|
1168
|
-
const railRef =
|
|
1583
|
+
const railRef = React16.useRef(null);
|
|
1169
1584
|
const flyout = useRailFlyout({
|
|
1170
1585
|
enabled: collapsed,
|
|
1171
1586
|
railRef,
|
|
@@ -1178,14 +1593,14 @@ function Sidebar({
|
|
|
1178
1593
|
const handleNavigate = (route) => {
|
|
1179
1594
|
onNavigate?.(route);
|
|
1180
1595
|
};
|
|
1181
|
-
const groupWithActiveRoute =
|
|
1596
|
+
const groupWithActiveRoute = React16.useMemo(() => {
|
|
1182
1597
|
const groups = navigation.filter((item) => item.children && item.children.length > 0);
|
|
1183
1598
|
return groups.find(
|
|
1184
1599
|
(item) => item.route === activeRoute || item.children.some((child) => child.route === activeRoute)
|
|
1185
1600
|
)?.id ?? null;
|
|
1186
1601
|
}, [navigation, activeRoute]);
|
|
1187
|
-
const [openGroup, setOpenGroup] =
|
|
1188
|
-
|
|
1602
|
+
const [openGroup, setOpenGroup] = React16.useState(groupWithActiveRoute);
|
|
1603
|
+
React16.useEffect(() => {
|
|
1189
1604
|
if (groupWithActiveRoute) setOpenGroup(groupWithActiveRoute);
|
|
1190
1605
|
}, [groupWithActiveRoute]);
|
|
1191
1606
|
const sectionHeading = (label) => label && !collapsed ? /* @__PURE__ */ jsx("p", { className: "px-2.5 pb-0.5 pt-1 text-[10px] font-semibold uppercase tracking-wider text-sidebar-muted", children: label }) : null;
|
|
@@ -1237,10 +1652,10 @@ function Sidebar({
|
|
|
1237
1652
|
mainItems.length > 0 && renderSection(mainItems, sectionLabels?.main),
|
|
1238
1653
|
secondaryItems.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-6", children: renderSection(secondaryItems, sectionLabels?.secondary) })
|
|
1239
1654
|
] });
|
|
1240
|
-
const [outgoing, setOutgoing] =
|
|
1241
|
-
const lastBodyRef =
|
|
1242
|
-
const lastKeyRef =
|
|
1243
|
-
const timerRef =
|
|
1655
|
+
const [outgoing, setOutgoing] = React16.useState(null);
|
|
1656
|
+
const lastBodyRef = React16.useRef(null);
|
|
1657
|
+
const lastKeyRef = React16.useRef(navKey);
|
|
1658
|
+
const timerRef = React16.useRef(null);
|
|
1244
1659
|
useIsomorphicLayoutEffect2(() => {
|
|
1245
1660
|
if (lastKeyRef.current !== navKey) {
|
|
1246
1661
|
const previousBody = lastBodyRef.current;
|
|
@@ -1253,7 +1668,7 @@ function Sidebar({
|
|
|
1253
1668
|
}
|
|
1254
1669
|
lastBodyRef.current = navBody;
|
|
1255
1670
|
});
|
|
1256
|
-
|
|
1671
|
+
React16.useEffect(() => () => {
|
|
1257
1672
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
1258
1673
|
}, []);
|
|
1259
1674
|
return (
|
|
@@ -1497,7 +1912,7 @@ function ShellSearch({
|
|
|
1497
1912
|
const rail = tone === "rail";
|
|
1498
1913
|
const contextual = !!onValueChange && !collapsed;
|
|
1499
1914
|
const query = value ?? "";
|
|
1500
|
-
const inputRef =
|
|
1915
|
+
const inputRef = React16.useRef(null);
|
|
1501
1916
|
const escalate = () => setCommandPaletteOpen(true, query);
|
|
1502
1917
|
const surface = rail ? "bg-sidebar-accent/40 text-sidebar-muted hover:bg-sidebar-accent/70 hover:text-sidebar-foreground" : "bg-accent/40 text-muted-foreground hover:bg-accent/70 hover:text-foreground";
|
|
1503
1918
|
const ring = rail ? "focus-within:bg-sidebar-accent/70 focus-within:ring-1 focus-within:ring-sidebar-accent-foreground/25" : "focus-within:bg-accent/70 focus-within:ring-1 focus-within:ring-ring/40";
|
|
@@ -1608,7 +2023,7 @@ function TopbarUserMenu({
|
|
|
1608
2023
|
onBilling,
|
|
1609
2024
|
userMenuExtras
|
|
1610
2025
|
}) {
|
|
1611
|
-
const [open, setOpen] =
|
|
2026
|
+
const [open, setOpen] = React16.useState(false);
|
|
1612
2027
|
if (!user) return null;
|
|
1613
2028
|
const initial = (user.fullName?.trim()?.[0] ?? user.email?.[0] ?? "?").toUpperCase();
|
|
1614
2029
|
const item = (label, onClick, Icon) => onClick ? /* @__PURE__ */ jsxs(
|
|
@@ -1692,7 +2107,7 @@ function getIcon2(name) {
|
|
|
1692
2107
|
return ICON_MAP[name] ?? Home;
|
|
1693
2108
|
}
|
|
1694
2109
|
function NavDropdown({ item, currentPath, onNavigate }) {
|
|
1695
|
-
const [open, setOpen] =
|
|
2110
|
+
const [open, setOpen] = React16.useState(false);
|
|
1696
2111
|
const Icon = getIcon2(item.icon);
|
|
1697
2112
|
const isChildActive = item.children?.some(
|
|
1698
2113
|
(child) => currentPath === child.route || currentPath.startsWith(child.route + "/")
|
|
@@ -1860,9 +2275,9 @@ function Topbar({
|
|
|
1860
2275
|
] });
|
|
1861
2276
|
}
|
|
1862
2277
|
function useSheetDrag({ onDismiss, canDrag }) {
|
|
1863
|
-
const [offset, setOffset] =
|
|
1864
|
-
const [dragging, setDragging] =
|
|
1865
|
-
const start =
|
|
2278
|
+
const [offset, setOffset] = React16.useState(0);
|
|
2279
|
+
const [dragging, setDragging] = React16.useState(false);
|
|
2280
|
+
const start = React16.useRef(null);
|
|
1866
2281
|
const onPointerDown = (e) => {
|
|
1867
2282
|
if (e.pointerType === "mouse") return;
|
|
1868
2283
|
if (canDrag && !canDrag()) return;
|
|
@@ -1896,9 +2311,9 @@ function useSheetDrag({ onDismiss, canDrag }) {
|
|
|
1896
2311
|
handlers: { onPointerDown, onPointerMove, onPointerUp: end, onPointerCancel: end }
|
|
1897
2312
|
};
|
|
1898
2313
|
}
|
|
1899
|
-
var SheetCloseContext =
|
|
2314
|
+
var SheetCloseContext = React16.createContext(null);
|
|
1900
2315
|
function useSheetClose() {
|
|
1901
|
-
const close =
|
|
2316
|
+
const close = React16.useContext(SheetCloseContext);
|
|
1902
2317
|
return close ?? (() => {
|
|
1903
2318
|
});
|
|
1904
2319
|
}
|
|
@@ -1912,9 +2327,9 @@ function BottomSheet({
|
|
|
1912
2327
|
className,
|
|
1913
2328
|
label
|
|
1914
2329
|
}) {
|
|
1915
|
-
const [leaving, setLeaving] =
|
|
1916
|
-
const scroller =
|
|
1917
|
-
const close =
|
|
2330
|
+
const [leaving, setLeaving] = React16.useState(false);
|
|
2331
|
+
const scroller = React16.useRef(null);
|
|
2332
|
+
const close = React16.useCallback(() => {
|
|
1918
2333
|
setLeaving(true);
|
|
1919
2334
|
window.setTimeout(onClose, 200);
|
|
1920
2335
|
}, [onClose]);
|
|
@@ -1922,7 +2337,7 @@ function BottomSheet({
|
|
|
1922
2337
|
onDismiss: close,
|
|
1923
2338
|
canDrag: () => (scroller.current?.scrollTop ?? 0) <= 0
|
|
1924
2339
|
});
|
|
1925
|
-
|
|
2340
|
+
React16.useEffect(() => {
|
|
1926
2341
|
const onKey = (e) => {
|
|
1927
2342
|
if (e.key !== "Escape") return;
|
|
1928
2343
|
if (onBack) onBack();
|
|
@@ -1931,15 +2346,15 @@ function BottomSheet({
|
|
|
1931
2346
|
window.addEventListener("keydown", onKey);
|
|
1932
2347
|
return () => window.removeEventListener("keydown", onKey);
|
|
1933
2348
|
}, [close, onBack]);
|
|
1934
|
-
|
|
2349
|
+
React16.useEffect(() => {
|
|
1935
2350
|
const previous = document.body.style.overflow;
|
|
1936
2351
|
document.body.style.overflow = "hidden";
|
|
1937
2352
|
return () => {
|
|
1938
2353
|
document.body.style.overflow = previous;
|
|
1939
2354
|
};
|
|
1940
2355
|
}, []);
|
|
1941
|
-
const [host, setHost] =
|
|
1942
|
-
|
|
2356
|
+
const [host, setHost] = React16.useState(null);
|
|
2357
|
+
React16.useEffect(() => {
|
|
1943
2358
|
setHost(document.body);
|
|
1944
2359
|
}, []);
|
|
1945
2360
|
if (!host) return null;
|
|
@@ -2054,17 +2469,17 @@ function SheetRow({
|
|
|
2054
2469
|
}
|
|
2055
2470
|
);
|
|
2056
2471
|
}
|
|
2057
|
-
var ModuleHeaderSlotContext =
|
|
2472
|
+
var ModuleHeaderSlotContext = React16.createContext(null);
|
|
2058
2473
|
function useModuleHeaderSlot() {
|
|
2059
|
-
return
|
|
2474
|
+
return React16.useContext(ModuleHeaderSlotContext);
|
|
2060
2475
|
}
|
|
2061
|
-
var ModuleHeaderActionsSlotContext =
|
|
2476
|
+
var ModuleHeaderActionsSlotContext = React16.createContext(null);
|
|
2062
2477
|
function useModuleHeaderActionsSlot() {
|
|
2063
|
-
return
|
|
2478
|
+
return React16.useContext(ModuleHeaderActionsSlotContext);
|
|
2064
2479
|
}
|
|
2065
|
-
var PageRailSlotContext =
|
|
2480
|
+
var PageRailSlotContext = React16.createContext(null);
|
|
2066
2481
|
function usePageRailSlot() {
|
|
2067
|
-
return
|
|
2482
|
+
return React16.useContext(PageRailSlotContext);
|
|
2068
2483
|
}
|
|
2069
2484
|
function isCreateRoute(route) {
|
|
2070
2485
|
return !!route && /\/(new|create)$/.test(route);
|
|
@@ -2091,6 +2506,62 @@ function ShellPageTitle({
|
|
|
2091
2506
|
}
|
|
2092
2507
|
);
|
|
2093
2508
|
}
|
|
2509
|
+
function MobileQuickControls({ children }) {
|
|
2510
|
+
const [open, setOpen] = React16.useState(false);
|
|
2511
|
+
const [hasItems, setHasItems] = React16.useState(false);
|
|
2512
|
+
const rootRef = React16.useRef(null);
|
|
2513
|
+
const panelRef = React16.useRef(null);
|
|
2514
|
+
React16.useEffect(() => {
|
|
2515
|
+
const panel = panelRef.current;
|
|
2516
|
+
if (!panel) return;
|
|
2517
|
+
const read2 = () => setHasItems(!!panel.querySelector("button, a, input, select, [role]"));
|
|
2518
|
+
read2();
|
|
2519
|
+
const observer = new MutationObserver(read2);
|
|
2520
|
+
observer.observe(panel, { childList: true, subtree: true });
|
|
2521
|
+
return () => observer.disconnect();
|
|
2522
|
+
}, []);
|
|
2523
|
+
React16.useEffect(() => {
|
|
2524
|
+
if (!open) return;
|
|
2525
|
+
const onDown = (e) => {
|
|
2526
|
+
const target = e.target;
|
|
2527
|
+
if (!target || rootRef.current?.contains(target)) return;
|
|
2528
|
+
if (target.closest('[data-radix-popper-content-wrapper], [role="dialog"]')) return;
|
|
2529
|
+
setOpen(false);
|
|
2530
|
+
};
|
|
2531
|
+
document.addEventListener("pointerdown", onDown);
|
|
2532
|
+
return () => document.removeEventListener("pointerdown", onDown);
|
|
2533
|
+
}, [open]);
|
|
2534
|
+
return /* @__PURE__ */ jsxs("div", { ref: rootRef, className: cn("relative", open && "z-[105]", !hasItems && "hidden"), children: [
|
|
2535
|
+
/* @__PURE__ */ jsx(MobileScrim, { open, onClose: () => setOpen(false) }),
|
|
2536
|
+
/* @__PURE__ */ jsx(
|
|
2537
|
+
"button",
|
|
2538
|
+
{
|
|
2539
|
+
type: "button",
|
|
2540
|
+
onClick: () => setOpen((v) => !v),
|
|
2541
|
+
"aria-label": "Ajustes r\xE1pidos",
|
|
2542
|
+
"aria-expanded": open,
|
|
2543
|
+
className: cn(
|
|
2544
|
+
"inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent",
|
|
2545
|
+
open && "bg-accent text-foreground"
|
|
2546
|
+
),
|
|
2547
|
+
children: /* @__PURE__ */ jsx(SlidersHorizontal, { className: "h-5 w-5" })
|
|
2548
|
+
}
|
|
2549
|
+
),
|
|
2550
|
+
/* @__PURE__ */ jsx(
|
|
2551
|
+
"div",
|
|
2552
|
+
{
|
|
2553
|
+
ref: panelRef,
|
|
2554
|
+
className: cn(
|
|
2555
|
+
"absolute right-0 top-full z-30 mt-2 flex w-[min(20rem,calc(100vw-2rem))] flex-col items-stretch gap-1.5 rounded-2xl border border-border bg-popover p-3 text-[15px] text-popover-foreground shadow-lg fz-menu-glass [&>*]:min-h-11",
|
|
2556
|
+
// Rail-shaped controls are written in the rail's tokens; here they sit on paper.
|
|
2557
|
+
"[--sidebar-accent-foreground:var(--accent-foreground)] [--sidebar-accent:var(--accent)] [--sidebar-foreground:var(--foreground)] [--sidebar-muted:var(--muted-foreground)]",
|
|
2558
|
+
!open && "hidden"
|
|
2559
|
+
),
|
|
2560
|
+
children
|
|
2561
|
+
}
|
|
2562
|
+
)
|
|
2563
|
+
] });
|
|
2564
|
+
}
|
|
2094
2565
|
function SidebarLayout({
|
|
2095
2566
|
navigation = [],
|
|
2096
2567
|
navLoading = false,
|
|
@@ -2152,10 +2623,11 @@ function SidebarLayout({
|
|
|
2152
2623
|
const setSidebarCollapsed = useLayoutStore((s) => s.setSidebarCollapsed);
|
|
2153
2624
|
const mobileMenuOpen = useLayoutStore((st) => st.mobileDrawerOpen);
|
|
2154
2625
|
const setMobileMenuOpen = useLayoutStore((st) => st.setMobileDrawerOpen);
|
|
2155
|
-
const [headerSlot, setHeaderSlot] =
|
|
2156
|
-
const [actionsSlot, setActionsSlot] =
|
|
2157
|
-
const [pageRailSlot, setPageRailSlot] =
|
|
2626
|
+
const [headerSlot, setHeaderSlot] = React16.useState(null);
|
|
2627
|
+
const [actionsSlot, setActionsSlot] = React16.useState(null);
|
|
2628
|
+
const [pageRailSlot, setPageRailSlot] = React16.useState(null);
|
|
2158
2629
|
const hasPageActions = useHasPageActions();
|
|
2630
|
+
const wide = useIsWide();
|
|
2159
2631
|
return /* @__PURE__ */ jsx(SaveBarProvider, { children: /* @__PURE__ */ jsx(ModuleHeaderSlotContext.Provider, { value: headerSlot, children: /* @__PURE__ */ jsx(ModuleHeaderActionsSlotContext.Provider, { value: actionsSlot, children: /* @__PURE__ */ jsx(PageRailSlotContext.Provider, { value: pageRailSlot, children: /* @__PURE__ */ jsxs("div", { className: cn(
|
|
2160
2632
|
"shell-enter fz-viewport-h flex overflow-hidden bg-background",
|
|
2161
2633
|
hasBottomNav && "fz-has-bottom-bar",
|
|
@@ -2210,7 +2682,7 @@ function SidebarLayout({
|
|
|
2210
2682
|
// 44px on a phone — the height every other bar in this product now
|
|
2211
2683
|
// uses (the "Mais" screen, a sheet's header) and the height a phone's
|
|
2212
2684
|
// own navigation bar has. Desktop keeps its 56px band.
|
|
2213
|
-
"min-h-[44px] md:min-h-14 border-b border-border",
|
|
2685
|
+
"min-h-[44px] md:min-h-14 md:border-b md:border-border",
|
|
2214
2686
|
// On a phone this band IS the navigation bar, so it is made of the
|
|
2215
2687
|
// same glass as the tab bar below it and the sheets between them —
|
|
2216
2688
|
// one material for the chrome, the page reading through all of it.
|
|
@@ -2262,11 +2734,12 @@ function SidebarLayout({
|
|
|
2262
2734
|
}
|
|
2263
2735
|
),
|
|
2264
2736
|
topbarStart,
|
|
2737
|
+
barOwnsNav && pagePrimary && pageTitle && /* @__PURE__ */ jsx("h1", { className: "absolute left-1/2 top-1/2 max-w-[50%] -translate-x-1/2 -translate-y-1/2 truncate text-[15px] font-semibold text-foreground md:hidden", children: pageTitle }),
|
|
2265
2738
|
/* @__PURE__ */ jsx("div", { ref: setHeaderSlot, className: "flex min-w-0 flex-1 items-center" })
|
|
2266
2739
|
] }),
|
|
2267
2740
|
/* @__PURE__ */ jsx("div", { className: "hidden min-w-0 flex-1 justify-center px-2 md:flex", children: /* @__PURE__ */ jsx(ShellSearch, { tone: "bar", label: searchLabel, className: "w-full max-w-[280px]" }) }),
|
|
2268
2741
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 shrink-0 items-center justify-end gap-2 md:flex-1", children: [
|
|
2269
|
-
topbarEnd,
|
|
2742
|
+
wide ? topbarEnd : /* @__PURE__ */ jsx(MobileQuickControls, { children: topbarEnd }),
|
|
2270
2743
|
notificationSlot
|
|
2271
2744
|
] })
|
|
2272
2745
|
] }),
|
|
@@ -2436,9 +2909,9 @@ function TopbarLayout({
|
|
|
2436
2909
|
const saveBarVisible = useSaveBarVisible();
|
|
2437
2910
|
const mobileMenuOpen = useLayoutStore((st) => st.mobileDrawerOpen);
|
|
2438
2911
|
const setMobileMenuOpen = useLayoutStore((st) => st.setMobileDrawerOpen);
|
|
2439
|
-
const [headerSlot, setHeaderSlot] =
|
|
2440
|
-
const [actionsSlot, setActionsSlot] =
|
|
2441
|
-
const [pageRailSlot, setPageRailSlot] =
|
|
2912
|
+
const [headerSlot, setHeaderSlot] = React16.useState(null);
|
|
2913
|
+
const [actionsSlot, setActionsSlot] = React16.useState(null);
|
|
2914
|
+
const [pageRailSlot, setPageRailSlot] = React16.useState(null);
|
|
2442
2915
|
const rawClaimed = usePageHeaderClaimed();
|
|
2443
2916
|
const setTitleSlot = usePageTitleSlotHost();
|
|
2444
2917
|
const hasOutlet = useHasPageHeaderOutlet();
|
|
@@ -2577,10 +3050,10 @@ function MobileMoreScreen({
|
|
|
2577
3050
|
onDismiss,
|
|
2578
3051
|
onClose
|
|
2579
3052
|
}) {
|
|
2580
|
-
const [pushed, setPushed] =
|
|
2581
|
-
const [query, setQuery] =
|
|
2582
|
-
const scroller =
|
|
2583
|
-
const close =
|
|
3053
|
+
const [pushed, setPushed] = React16.useState(null);
|
|
3054
|
+
const [query, setQuery] = React16.useState("");
|
|
3055
|
+
const scroller = React16.useRef(null);
|
|
3056
|
+
const close = React16.useCallback(() => {
|
|
2584
3057
|
onClose();
|
|
2585
3058
|
}, [onClose]);
|
|
2586
3059
|
const drag = useSheetDrag({
|
|
@@ -2589,7 +3062,7 @@ function MobileMoreScreen({
|
|
|
2589
3062
|
// a pushed section would dismiss the screen the back button is for.
|
|
2590
3063
|
canDrag: () => !pushed && (scroller.current?.scrollTop ?? 0) <= 0
|
|
2591
3064
|
});
|
|
2592
|
-
|
|
3065
|
+
React16.useEffect(() => {
|
|
2593
3066
|
const onKey = (e) => {
|
|
2594
3067
|
if (e.key !== "Escape") return;
|
|
2595
3068
|
if (pushed) setPushed(null);
|
|
@@ -2598,7 +3071,7 @@ function MobileMoreScreen({
|
|
|
2598
3071
|
window.addEventListener("keydown", onKey);
|
|
2599
3072
|
return () => window.removeEventListener("keydown", onKey);
|
|
2600
3073
|
}, [close, pushed]);
|
|
2601
|
-
|
|
3074
|
+
React16.useEffect(() => {
|
|
2602
3075
|
const previous = document.body.style.overflow;
|
|
2603
3076
|
document.body.style.overflow = "hidden";
|
|
2604
3077
|
return () => {
|
|
@@ -2618,13 +3091,13 @@ function MobileMoreScreen({
|
|
|
2618
3091
|
else onNavigate?.(route);
|
|
2619
3092
|
};
|
|
2620
3093
|
const q = query.trim().toLowerCase();
|
|
2621
|
-
const flat =
|
|
3094
|
+
const flat = React16.useMemo(
|
|
2622
3095
|
() => navigation.flatMap((n) => n.children?.length ? n.children : [n]),
|
|
2623
3096
|
[navigation]
|
|
2624
3097
|
);
|
|
2625
3098
|
const searching = q.length > 0;
|
|
2626
3099
|
const hits = searching ? flat.filter((n) => n.label.toLowerCase().includes(q)) : [];
|
|
2627
|
-
const sections =
|
|
3100
|
+
const sections = React16.useMemo(() => {
|
|
2628
3101
|
const out = [];
|
|
2629
3102
|
for (const key of ["main", "secondary", "settings"]) {
|
|
2630
3103
|
const items = navigation.filter((n) => n.section === key);
|
|
@@ -2893,23 +3366,23 @@ function MinimalLayout({
|
|
|
2893
3366
|
] });
|
|
2894
3367
|
}
|
|
2895
3368
|
function MobileOverlay({ onClose, onNavigate, ...sidebarProps }) {
|
|
2896
|
-
const [visible, setVisible] =
|
|
2897
|
-
|
|
3369
|
+
const [visible, setVisible] = React16.useState(false);
|
|
3370
|
+
React16.useEffect(() => {
|
|
2898
3371
|
const id = requestAnimationFrame(() => setVisible(true));
|
|
2899
3372
|
return () => cancelAnimationFrame(id);
|
|
2900
3373
|
}, []);
|
|
2901
|
-
const close =
|
|
3374
|
+
const close = React16.useCallback(() => {
|
|
2902
3375
|
setVisible(false);
|
|
2903
3376
|
window.setTimeout(onClose, 250);
|
|
2904
3377
|
}, [onClose]);
|
|
2905
|
-
|
|
3378
|
+
React16.useEffect(() => {
|
|
2906
3379
|
const previous = document.body.style.overflow;
|
|
2907
3380
|
document.body.style.overflow = "hidden";
|
|
2908
3381
|
return () => {
|
|
2909
3382
|
document.body.style.overflow = previous;
|
|
2910
3383
|
};
|
|
2911
3384
|
}, []);
|
|
2912
|
-
|
|
3385
|
+
React16.useEffect(() => {
|
|
2913
3386
|
const onKey = (e) => {
|
|
2914
3387
|
if (e.key === "Escape") close();
|
|
2915
3388
|
};
|
|
@@ -3009,14 +3482,16 @@ function MobileBottomNav({
|
|
|
3009
3482
|
onAssistant,
|
|
3010
3483
|
assistantOpen,
|
|
3011
3484
|
moreOpen,
|
|
3012
|
-
retracted
|
|
3485
|
+
retracted,
|
|
3486
|
+
frame,
|
|
3487
|
+
assistantFace
|
|
3013
3488
|
}) {
|
|
3014
3489
|
const path = currentPath ?? "";
|
|
3015
|
-
const [openSheet, setOpenSheet] =
|
|
3016
|
-
|
|
3490
|
+
const [openSheet, setOpenSheet] = React16.useState(null);
|
|
3491
|
+
React16.useEffect(() => {
|
|
3017
3492
|
setOpenSheet(null);
|
|
3018
3493
|
}, [currentPath]);
|
|
3019
|
-
|
|
3494
|
+
React16.useEffect(() => {
|
|
3020
3495
|
if (retracted) setOpenSheet(null);
|
|
3021
3496
|
}, [retracted]);
|
|
3022
3497
|
const sheetItem = openSheet != null ? items[openSheet] : void 0;
|
|
@@ -3028,9 +3503,13 @@ function MobileBottomNav({
|
|
|
3028
3503
|
"aria-hidden": retracted || void 0,
|
|
3029
3504
|
className: cn(
|
|
3030
3505
|
"fz-safe-b fixed inset-x-0 bottom-0 z-50 flex min-h-16 items-stretch justify-around md:hidden",
|
|
3031
|
-
"
|
|
3506
|
+
"fz-glass-tabbar text-sidebar-foreground",
|
|
3032
3507
|
"motion-safe:transition-transform motion-safe:duration-200 motion-safe:ease-out",
|
|
3033
|
-
|
|
3508
|
+
// The framed shell rounds its content card; the bar is the phone's
|
|
3509
|
+
// piece of that same frame.
|
|
3510
|
+
frame && "rounded-t-[28px]",
|
|
3511
|
+
// Past its own height: the assistant button stands above the bar's edge.
|
|
3512
|
+
retracted && "pointer-events-none translate-y-[calc(100%+2.5rem)]"
|
|
3034
3513
|
),
|
|
3035
3514
|
children: items.map((item, i) => {
|
|
3036
3515
|
if ("kind" in item && item.kind === "action") {
|
|
@@ -3046,18 +3525,36 @@ function MobileBottomNav({
|
|
|
3046
3525
|
}
|
|
3047
3526
|
) }, item.id);
|
|
3048
3527
|
}
|
|
3528
|
+
if ("kind" in item && item.kind === "assistant") {
|
|
3529
|
+
const AssistantIcon = bottomNavIcon(item.icon, Sparkles);
|
|
3530
|
+
const label2 = item.label ?? "IA";
|
|
3531
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-start justify-center", children: /* @__PURE__ */ jsx(
|
|
3532
|
+
"button",
|
|
3533
|
+
{
|
|
3534
|
+
type: "button",
|
|
3535
|
+
onClick: () => {
|
|
3536
|
+
setOpenSheet(null);
|
|
3537
|
+
onAssistant?.();
|
|
3538
|
+
},
|
|
3539
|
+
"aria-label": label2,
|
|
3540
|
+
"aria-expanded": !!assistantOpen,
|
|
3541
|
+
className: cn(
|
|
3542
|
+
"-mt-3 flex h-[60px] w-[60px] items-center justify-center rounded-full shadow-lg ring-[5px] ring-sidebar transition-transform active:scale-95",
|
|
3543
|
+
assistantFace ? "bg-card" : "bg-primary text-primary-foreground",
|
|
3544
|
+
assistantOpen && "ring-sidebar-accent-foreground"
|
|
3545
|
+
),
|
|
3546
|
+
children: assistantFace ?? /* @__PURE__ */ jsx(AssistantIcon, { className: "h-6 w-6" })
|
|
3547
|
+
}
|
|
3548
|
+
) }, "assistant");
|
|
3549
|
+
}
|
|
3049
3550
|
const isMore = "kind" in item && item.kind === "more";
|
|
3050
|
-
const
|
|
3051
|
-
const
|
|
3052
|
-
const
|
|
3053
|
-
|
|
3054
|
-
isMore ? Menu : isAssistant ? Sparkles : Home
|
|
3055
|
-
);
|
|
3056
|
-
const route = isMore || isAssistant ? void 0 : item.route;
|
|
3057
|
-
const children = isMore || isAssistant ? void 0 : item.children?.filter((c) => !isCreateRoute(c.route));
|
|
3551
|
+
const label = isMore ? item.label ?? "Mais" : item.label;
|
|
3552
|
+
const Icon = bottomNavIcon(item.icon, isMore ? Menu : Home);
|
|
3553
|
+
const route = isMore ? void 0 : item.route;
|
|
3554
|
+
const children = isMore ? void 0 : item.children?.filter((c) => !isCreateRoute(c.route));
|
|
3058
3555
|
const hasChoices = !!children && children.length > 1;
|
|
3059
3556
|
const sheetOpen = openSheet === i;
|
|
3060
|
-
const isActive = isMore ? !!moreOpen :
|
|
3557
|
+
const isActive = isMore ? !!moreOpen : sheetOpen ? true : route === "/" ? path === "/" || path === "" : !!route && (path === route || path.startsWith(route + "/"));
|
|
3061
3558
|
return /* @__PURE__ */ jsxs(
|
|
3062
3559
|
"button",
|
|
3063
3560
|
{
|
|
@@ -3067,15 +3564,11 @@ function MobileBottomNav({
|
|
|
3067
3564
|
setOpenSheet(null);
|
|
3068
3565
|
return onMore?.();
|
|
3069
3566
|
}
|
|
3070
|
-
if (isAssistant) {
|
|
3071
|
-
setOpenSheet(null);
|
|
3072
|
-
return onAssistant?.();
|
|
3073
|
-
}
|
|
3074
3567
|
if (hasChoices) return setOpenSheet(sheetOpen ? null : i);
|
|
3075
3568
|
onNavigate?.(children?.[0]?.route ?? route);
|
|
3076
3569
|
},
|
|
3077
3570
|
"aria-current": isActive && route && !hasChoices ? "page" : void 0,
|
|
3078
|
-
"aria-expanded": isMore
|
|
3571
|
+
"aria-expanded": isMore ? isActive : hasChoices ? sheetOpen : void 0,
|
|
3079
3572
|
"aria-haspopup": hasChoices ? "menu" : void 0,
|
|
3080
3573
|
className: cn(
|
|
3081
3574
|
// min-h-[44px] is the floor a finger needs; the bar was letting
|
|
@@ -3084,16 +3577,6 @@ function MobileBottomNav({
|
|
|
3084
3577
|
isActive ? "text-sidebar-accent-foreground" : "text-sidebar-muted"
|
|
3085
3578
|
),
|
|
3086
3579
|
children: [
|
|
3087
|
-
/* @__PURE__ */ jsx(
|
|
3088
|
-
"span",
|
|
3089
|
-
{
|
|
3090
|
-
"aria-hidden": true,
|
|
3091
|
-
className: cn(
|
|
3092
|
-
"absolute inset-x-3 top-0 h-0.5 rounded-full transition-opacity",
|
|
3093
|
-
isActive ? "bg-sidebar-accent-foreground opacity-100" : "opacity-0"
|
|
3094
|
-
)
|
|
3095
|
-
}
|
|
3096
|
-
),
|
|
3097
3580
|
/* @__PURE__ */ jsxs("span", { className: "relative flex items-center", children: [
|
|
3098
3581
|
/* @__PURE__ */ jsx(Icon, { className: "h-5 w-5 shrink-0" }),
|
|
3099
3582
|
hasChoices && /* @__PURE__ */ jsx(
|
|
@@ -3107,10 +3590,10 @@ function MobileBottomNav({
|
|
|
3107
3590
|
}
|
|
3108
3591
|
)
|
|
3109
3592
|
] }),
|
|
3110
|
-
/* @__PURE__ */ jsx("span", { className: "max-w-full truncate text-[11px] leading-tight", children: label })
|
|
3593
|
+
/* @__PURE__ */ jsx("span", { className: cn("max-w-full truncate text-[11px] leading-tight", isActive && "font-semibold"), children: label })
|
|
3111
3594
|
]
|
|
3112
3595
|
},
|
|
3113
|
-
isMore ? "more" :
|
|
3596
|
+
isMore ? "more" : `${route}-${i}`
|
|
3114
3597
|
);
|
|
3115
3598
|
})
|
|
3116
3599
|
}
|
|
@@ -3166,6 +3649,7 @@ function AppShell({
|
|
|
3166
3649
|
onBottomNavAction,
|
|
3167
3650
|
onAssistantToggle,
|
|
3168
3651
|
assistantOpen,
|
|
3652
|
+
assistantFace,
|
|
3169
3653
|
mobileHeader = "minimal",
|
|
3170
3654
|
immersive = false,
|
|
3171
3655
|
userMenuSlot,
|
|
@@ -3188,7 +3672,7 @@ function AppShell({
|
|
|
3188
3672
|
const hasBottomNav = !!bottomNav?.length;
|
|
3189
3673
|
const barOwnsNav = bottomNavReachesAll(bottomNav);
|
|
3190
3674
|
const menuNavigation = appNavigation ?? navigation;
|
|
3191
|
-
const routeLabel =
|
|
3675
|
+
const routeLabel = React16.useCallback((path) => {
|
|
3192
3676
|
let best;
|
|
3193
3677
|
const consider = (route, label) => {
|
|
3194
3678
|
if (!route || !label) return;
|
|
@@ -3203,14 +3687,14 @@ function AppShell({
|
|
|
3203
3687
|
}
|
|
3204
3688
|
return best?.label ?? pageTitle ?? "";
|
|
3205
3689
|
}, [menuNavigation, pageTitle]);
|
|
3206
|
-
|
|
3690
|
+
React16.useEffect(() => {
|
|
3207
3691
|
if (!currentPath) return;
|
|
3208
3692
|
if (currentPath === MENU_ROUTE) return;
|
|
3209
3693
|
const label = routeLabel(currentPath);
|
|
3210
3694
|
if (!label) return;
|
|
3211
3695
|
recordNavigation(currentPath, label);
|
|
3212
3696
|
}, [currentPath, routeLabel]);
|
|
3213
|
-
const destinationRoutes =
|
|
3697
|
+
const destinationRoutes = React16.useMemo(() => {
|
|
3214
3698
|
const routes = [];
|
|
3215
3699
|
for (const item of menuNavigation) {
|
|
3216
3700
|
if (item.route) routes.push(item.route);
|
|
@@ -3219,7 +3703,7 @@ function AppShell({
|
|
|
3219
3703
|
return routes;
|
|
3220
3704
|
}, [menuNavigation]);
|
|
3221
3705
|
const isDestination = !!currentPath && destinationRoutes.includes(currentPath);
|
|
3222
|
-
|
|
3706
|
+
React16.useEffect(() => {
|
|
3223
3707
|
setDestinationRoutes(destinationRoutes);
|
|
3224
3708
|
}, [destinationRoutes]);
|
|
3225
3709
|
const pageClaimedBack = useHasPageHeaderBack();
|
|
@@ -3227,7 +3711,7 @@ function AppShell({
|
|
|
3227
3711
|
const barRetracted = !!pageBack || pageClaimedBack || inSettings;
|
|
3228
3712
|
const mobileDrawerOpen = useLayoutStore((st) => st.mobileDrawerOpen);
|
|
3229
3713
|
const setMobileDrawerOpen = useLayoutStore((st) => st.setMobileDrawerOpen);
|
|
3230
|
-
|
|
3714
|
+
React16.useEffect(() => {
|
|
3231
3715
|
if (useLayoutStore.getState().drawerKeepOpenOnce) {
|
|
3232
3716
|
useLayoutStore.setState({ drawerKeepOpenOnce: false });
|
|
3233
3717
|
return;
|
|
@@ -3235,12 +3719,12 @@ function AppShell({
|
|
|
3235
3719
|
setMobileDrawerOpen(false);
|
|
3236
3720
|
}, [currentPath]);
|
|
3237
3721
|
const menuRouteOpen = barOwnsNav && currentPath === MENU_ROUTE;
|
|
3238
|
-
const firstDestination =
|
|
3722
|
+
const firstDestination = React16.useMemo(() => {
|
|
3239
3723
|
const first = bottomNav?.find((i) => !("kind" in i) || i.kind === "route");
|
|
3240
3724
|
return first?.route ?? "/";
|
|
3241
3725
|
}, [bottomNav]);
|
|
3242
|
-
const menuOrigin =
|
|
3243
|
-
const openMenu =
|
|
3726
|
+
const menuOrigin = React16.useRef(void 0);
|
|
3727
|
+
const openMenu = React16.useCallback(() => {
|
|
3244
3728
|
if (!barOwnsNav) {
|
|
3245
3729
|
setMobileDrawerOpen(true);
|
|
3246
3730
|
return;
|
|
@@ -3251,10 +3735,10 @@ function AppShell({
|
|
|
3251
3735
|
menuOrigin.current = currentPath;
|
|
3252
3736
|
onNavigate?.(MENU_ROUTE);
|
|
3253
3737
|
}, [barOwnsNav, currentPath, onNavigate, setMobileDrawerOpen]);
|
|
3254
|
-
const [menuLeaving, setMenuLeaving] =
|
|
3255
|
-
const [menuLingering, setMenuLingering] =
|
|
3256
|
-
const menuTimer =
|
|
3257
|
-
const dismissMenu =
|
|
3738
|
+
const [menuLeaving, setMenuLeaving] = React16.useState(false);
|
|
3739
|
+
const [menuLingering, setMenuLingering] = React16.useState(false);
|
|
3740
|
+
const menuTimer = React16.useRef(void 0);
|
|
3741
|
+
const dismissMenu = React16.useCallback((navigate) => {
|
|
3258
3742
|
window.clearTimeout(menuTimer.current);
|
|
3259
3743
|
setMenuLingering(true);
|
|
3260
3744
|
setMenuLeaving(true);
|
|
@@ -3264,8 +3748,8 @@ function AppShell({
|
|
|
3264
3748
|
setMenuLingering(false);
|
|
3265
3749
|
}, 240);
|
|
3266
3750
|
}, []);
|
|
3267
|
-
|
|
3268
|
-
const closeMenu =
|
|
3751
|
+
React16.useEffect(() => () => window.clearTimeout(menuTimer.current), []);
|
|
3752
|
+
const closeMenu = React16.useCallback(() => {
|
|
3269
3753
|
if (!barOwnsNav) {
|
|
3270
3754
|
setMobileDrawerOpen(false);
|
|
3271
3755
|
return;
|
|
@@ -3278,7 +3762,7 @@ function AppShell({
|
|
|
3278
3762
|
onNavigate?.(back);
|
|
3279
3763
|
});
|
|
3280
3764
|
}, [barOwnsNav, setMobileDrawerOpen, onNavigate, firstDestination, dismissMenu]);
|
|
3281
|
-
|
|
3765
|
+
React16.useEffect(() => {
|
|
3282
3766
|
if (!menuRouteOpen || typeof window === "undefined") return;
|
|
3283
3767
|
const wide = window.matchMedia("(min-width: 768px)");
|
|
3284
3768
|
const settle = () => {
|
|
@@ -3300,6 +3784,8 @@ function AppShell({
|
|
|
3300
3784
|
moreOpen: barOwnsNav ? menuRouteOpen : mobileDrawerOpen,
|
|
3301
3785
|
onAssistant: onAssistantToggle,
|
|
3302
3786
|
assistantOpen,
|
|
3787
|
+
assistantFace,
|
|
3788
|
+
frame: contentFrame,
|
|
3303
3789
|
retracted: barRetracted
|
|
3304
3790
|
}
|
|
3305
3791
|
) : null;
|
|
@@ -3439,13 +3925,13 @@ function SplitWithRightRail({
|
|
|
3439
3925
|
maxWidth = 720,
|
|
3440
3926
|
resizeLabel = "Resize panel"
|
|
3441
3927
|
}) {
|
|
3442
|
-
const [width, setWidth] =
|
|
3443
|
-
const [dragging, setDragging] =
|
|
3444
|
-
const clamp =
|
|
3928
|
+
const [width, setWidth] = React16.useState(defaultWidth);
|
|
3929
|
+
const [dragging, setDragging] = React16.useState(false);
|
|
3930
|
+
const clamp = React16.useCallback(
|
|
3445
3931
|
(value) => Math.min(maxWidth, Math.max(minWidth, value)),
|
|
3446
3932
|
[minWidth, maxWidth]
|
|
3447
3933
|
);
|
|
3448
|
-
|
|
3934
|
+
React16.useEffect(() => {
|
|
3449
3935
|
if (!dragging) return;
|
|
3450
3936
|
const onMove = (event) => {
|
|
3451
3937
|
event.preventDefault();
|
|
@@ -3467,7 +3953,7 @@ function SplitWithRightRail({
|
|
|
3467
3953
|
document.body.style.cursor = previousCursor;
|
|
3468
3954
|
};
|
|
3469
3955
|
}, [dragging, clamp]);
|
|
3470
|
-
|
|
3956
|
+
React16.useEffect(() => {
|
|
3471
3957
|
if (dragging) return;
|
|
3472
3958
|
onWidthChange?.(width);
|
|
3473
3959
|
}, [dragging]);
|
|
@@ -3682,12 +4168,12 @@ function ViewTabs({ value, onChange, options, "aria-label": ariaLabel, className
|
|
|
3682
4168
|
);
|
|
3683
4169
|
}) });
|
|
3684
4170
|
}
|
|
3685
|
-
var NavTransitionContext =
|
|
4171
|
+
var NavTransitionContext = React16.createContext("slide");
|
|
3686
4172
|
function NavTransitionProvider({ value, children }) {
|
|
3687
4173
|
return /* @__PURE__ */ jsx(NavTransitionContext.Provider, { value, children });
|
|
3688
4174
|
}
|
|
3689
4175
|
function useNavTransition() {
|
|
3690
|
-
return
|
|
4176
|
+
return React16.useContext(NavTransitionContext);
|
|
3691
4177
|
}
|
|
3692
4178
|
function resolveTransitionClass(transition, direction) {
|
|
3693
4179
|
if (transition === "none") return "";
|
|
@@ -3707,26 +4193,26 @@ function PageTransition({
|
|
|
3707
4193
|
return /* @__PURE__ */ jsx("div", { className: cn(animClass, className), children }, transitionKey);
|
|
3708
4194
|
}
|
|
3709
4195
|
var EMPTY = [];
|
|
3710
|
-
var PageTrailContext =
|
|
4196
|
+
var PageTrailContext = React16.createContext(EMPTY);
|
|
3711
4197
|
function PageTrail({
|
|
3712
4198
|
label,
|
|
3713
4199
|
href,
|
|
3714
4200
|
onNavigate,
|
|
3715
4201
|
children
|
|
3716
4202
|
}) {
|
|
3717
|
-
const parent =
|
|
3718
|
-
const trail =
|
|
4203
|
+
const parent = React16.useContext(PageTrailContext);
|
|
4204
|
+
const trail = React16.useMemo(
|
|
3719
4205
|
() => [...parent, { label, href, onNavigate }],
|
|
3720
4206
|
[parent, label, href, onNavigate]
|
|
3721
4207
|
);
|
|
3722
4208
|
return /* @__PURE__ */ jsx(PageTrailContext.Provider, { value: trail, children });
|
|
3723
4209
|
}
|
|
3724
4210
|
function usePageTrail() {
|
|
3725
|
-
return
|
|
4211
|
+
return React16.useContext(PageTrailContext);
|
|
3726
4212
|
}
|
|
3727
4213
|
function usePageTrailParent(href) {
|
|
3728
|
-
const trail =
|
|
3729
|
-
return
|
|
4214
|
+
const trail = React16.useContext(PageTrailContext);
|
|
4215
|
+
return React16.useMemo(() => {
|
|
3730
4216
|
const above = href ? trail.filter((c) => c.href !== href) : trail;
|
|
3731
4217
|
return above[above.length - 1];
|
|
3732
4218
|
}, [trail, href]);
|
|
@@ -3742,8 +4228,8 @@ function useCurrentRouteHref() {
|
|
|
3742
4228
|
const clean = hash.split("?")[0];
|
|
3743
4229
|
return clean.startsWith("/") ? clean : `/${clean}`;
|
|
3744
4230
|
};
|
|
3745
|
-
const [href, setHref] =
|
|
3746
|
-
|
|
4231
|
+
const [href, setHref] = React16.useState(read2);
|
|
4232
|
+
React16.useEffect(() => {
|
|
3747
4233
|
const handler = () => setHref(read2());
|
|
3748
4234
|
window.addEventListener("hashchange", handler);
|
|
3749
4235
|
handler();
|
|
@@ -3754,7 +4240,7 @@ function useCurrentRouteHref() {
|
|
|
3754
4240
|
function useTrailBack(href) {
|
|
3755
4241
|
const current = useCurrentRouteHref();
|
|
3756
4242
|
const parent = usePageTrailParent(href ?? current);
|
|
3757
|
-
return
|
|
4243
|
+
return React16.useMemo(
|
|
3758
4244
|
() => parent ? { onBack: () => navigateToCrumb(parent), parentLabel: parent.label } : {},
|
|
3759
4245
|
[parent]
|
|
3760
4246
|
);
|
|
@@ -3781,23 +4267,23 @@ function CollapsibleColumn({
|
|
|
3781
4267
|
"aria-label": ariaLabel
|
|
3782
4268
|
}) {
|
|
3783
4269
|
const pinnedKey = `${storageKey}.pinned`;
|
|
3784
|
-
const [collapsed, setCollapsed] =
|
|
3785
|
-
const [pinned, setPinned] =
|
|
3786
|
-
const [hovering, setHovering] =
|
|
3787
|
-
const hoveringRef =
|
|
3788
|
-
const collapsedRef =
|
|
4270
|
+
const [collapsed, setCollapsed] = React16.useState(() => read(storageKey));
|
|
4271
|
+
const [pinned, setPinned] = React16.useState(() => read(pinnedKey));
|
|
4272
|
+
const [hovering, setHovering] = React16.useState(false);
|
|
4273
|
+
const hoveringRef = React16.useRef(false);
|
|
4274
|
+
const collapsedRef = React16.useRef(collapsed);
|
|
3789
4275
|
collapsedRef.current = collapsed;
|
|
3790
|
-
const autoRef =
|
|
4276
|
+
const autoRef = React16.useRef(false);
|
|
3791
4277
|
const open = !collapsed || hovering;
|
|
3792
4278
|
const width = open ? COLUMN_WIDTH : COLUMN_COLLAPSED_WIDTH;
|
|
3793
4279
|
const setHover = (on) => {
|
|
3794
4280
|
hoveringRef.current = on;
|
|
3795
4281
|
setHovering(on);
|
|
3796
4282
|
};
|
|
3797
|
-
|
|
4283
|
+
React16.useEffect(() => {
|
|
3798
4284
|
onWidth?.(width);
|
|
3799
4285
|
}, [width, onWidth]);
|
|
3800
|
-
const setOpenState =
|
|
4286
|
+
const setOpenState = React16.useCallback((nextCollapsed) => {
|
|
3801
4287
|
setCollapsed(nextCollapsed);
|
|
3802
4288
|
setPinned(!nextCollapsed);
|
|
3803
4289
|
autoRef.current = false;
|
|
@@ -3808,7 +4294,7 @@ function CollapsibleColumn({
|
|
|
3808
4294
|
}
|
|
3809
4295
|
if (nextCollapsed) setHover(false);
|
|
3810
4296
|
}, [storageKey, pinnedKey]);
|
|
3811
|
-
|
|
4297
|
+
React16.useEffect(() => {
|
|
3812
4298
|
if (squeezed === void 0) return;
|
|
3813
4299
|
if (squeezed) {
|
|
3814
4300
|
if (!collapsedRef.current) {
|
|
@@ -3820,8 +4306,8 @@ function CollapsibleColumn({
|
|
|
3820
4306
|
setCollapsed(false);
|
|
3821
4307
|
}
|
|
3822
4308
|
}, [squeezed]);
|
|
3823
|
-
const seen =
|
|
3824
|
-
|
|
4309
|
+
const seen = React16.useRef(null);
|
|
4310
|
+
React16.useEffect(() => {
|
|
3825
4311
|
if (autoCollapseKey === void 0) return;
|
|
3826
4312
|
if (seen.current === null) {
|
|
3827
4313
|
seen.current = autoCollapseKey;
|
|
@@ -3835,14 +4321,14 @@ function CollapsibleColumn({
|
|
|
3835
4321
|
}, autoCollapseMs);
|
|
3836
4322
|
return () => clearTimeout(t);
|
|
3837
4323
|
}, [autoCollapseKey, collapsed, pinned, autoCollapseMs]);
|
|
3838
|
-
const scrollRef =
|
|
3839
|
-
const [hasMore, setHasMore] =
|
|
3840
|
-
const onScroll =
|
|
4324
|
+
const scrollRef = React16.useRef(null);
|
|
4325
|
+
const [hasMore, setHasMore] = React16.useState(false);
|
|
4326
|
+
const onScroll = React16.useCallback(() => {
|
|
3841
4327
|
const el = scrollRef.current;
|
|
3842
4328
|
if (!el) return;
|
|
3843
4329
|
setHasMore(el.scrollHeight - el.scrollTop - el.clientHeight > 4);
|
|
3844
4330
|
}, []);
|
|
3845
|
-
|
|
4331
|
+
React16.useEffect(() => {
|
|
3846
4332
|
onScroll();
|
|
3847
4333
|
const el = scrollRef.current;
|
|
3848
4334
|
if (!el) return;
|
|
@@ -3852,11 +4338,11 @@ function CollapsibleColumn({
|
|
|
3852
4338
|
ro.disconnect();
|
|
3853
4339
|
};
|
|
3854
4340
|
}, [onScroll, open, children]);
|
|
3855
|
-
const boxRef =
|
|
3856
|
-
const panelRef =
|
|
3857
|
-
const [seamed, setSeamed] =
|
|
3858
|
-
const armedRef =
|
|
3859
|
-
const publish =
|
|
4341
|
+
const boxRef = React16.useRef(null);
|
|
4342
|
+
const panelRef = React16.useRef(null);
|
|
4343
|
+
const [seamed, setSeamed] = React16.useState(false);
|
|
4344
|
+
const armedRef = React16.useRef(false);
|
|
4345
|
+
const publish = React16.useCallback(() => {
|
|
3860
4346
|
if (!seamTop) return;
|
|
3861
4347
|
const el = panelRef.current;
|
|
3862
4348
|
const card = el?.closest(".fz-page-surface");
|
|
@@ -3879,10 +4365,10 @@ function CollapsibleColumn({
|
|
|
3879
4365
|
});
|
|
3880
4366
|
}
|
|
3881
4367
|
}, [seamTop]);
|
|
3882
|
-
|
|
4368
|
+
React16.useEffect(() => {
|
|
3883
4369
|
publish();
|
|
3884
4370
|
}, [publish, width]);
|
|
3885
|
-
|
|
4371
|
+
React16.useEffect(() => {
|
|
3886
4372
|
if (!seamTop) return;
|
|
3887
4373
|
const el = panelRef.current;
|
|
3888
4374
|
const card = el?.closest(".fz-page-surface");
|
|
@@ -4012,7 +4498,7 @@ function viewBarSubscribe(l) {
|
|
|
4012
4498
|
};
|
|
4013
4499
|
}
|
|
4014
4500
|
function ViewBarHost() {
|
|
4015
|
-
const active =
|
|
4501
|
+
const active = React16.useSyncExternalStore(viewBarSubscribe, () => viewBarCount > 0);
|
|
4016
4502
|
return /* @__PURE__ */ jsx(
|
|
4017
4503
|
"div",
|
|
4018
4504
|
{
|
|
@@ -4025,8 +4511,8 @@ function ViewBarHost() {
|
|
|
4025
4511
|
);
|
|
4026
4512
|
}
|
|
4027
4513
|
function PageViewBar({ children }) {
|
|
4028
|
-
const slot =
|
|
4029
|
-
|
|
4514
|
+
const slot = React16.useSyncExternalStore(viewBarSubscribe, () => viewBarSlot);
|
|
4515
|
+
React16.useEffect(() => {
|
|
4030
4516
|
viewBarCount++;
|
|
4031
4517
|
viewBarNotify();
|
|
4032
4518
|
return () => {
|
|
@@ -4063,9 +4549,9 @@ function RailSections({ sections, search, collapsed }) {
|
|
|
4063
4549
|
}
|
|
4064
4550
|
var RAIL_COLLAPSED_KEY = "fayz.subnav.collapsed";
|
|
4065
4551
|
function RailColumn({ className, "aria-label": ariaLabel, sections, search, footer }) {
|
|
4066
|
-
const boxRef =
|
|
4067
|
-
const [squeezed, setSqueezed] =
|
|
4068
|
-
|
|
4552
|
+
const boxRef = React16.useRef(null);
|
|
4553
|
+
const [squeezed, setSqueezed] = React16.useState(void 0);
|
|
4554
|
+
React16.useEffect(() => {
|
|
4069
4555
|
if (typeof window === "undefined") return;
|
|
4070
4556
|
const row = boxRef.current?.parentElement?.parentElement;
|
|
4071
4557
|
if (!row) return;
|
|
@@ -4125,10 +4611,10 @@ function unpublishSubNav(id) {
|
|
|
4125
4611
|
subNavNotify();
|
|
4126
4612
|
}
|
|
4127
4613
|
function useSubNavPublished() {
|
|
4128
|
-
return
|
|
4614
|
+
return React16.useSyncExternalStore(subNavSubscribe, () => published, () => published);
|
|
4129
4615
|
}
|
|
4130
4616
|
function useSubNavHost() {
|
|
4131
|
-
|
|
4617
|
+
React16.useEffect(() => {
|
|
4132
4618
|
subNavHosts++;
|
|
4133
4619
|
subNavNotify();
|
|
4134
4620
|
return () => {
|
|
@@ -4138,7 +4624,7 @@ function useSubNavHost() {
|
|
|
4138
4624
|
}, []);
|
|
4139
4625
|
}
|
|
4140
4626
|
function useHasSubNavHost() {
|
|
4141
|
-
return
|
|
4627
|
+
return React16.useSyncExternalStore(subNavSubscribe, () => subNavHosts > 0, () => false);
|
|
4142
4628
|
}
|
|
4143
4629
|
function SubNavBand({ sections, "aria-label": ariaLabel, className }) {
|
|
4144
4630
|
const items = sections.flatMap((s) => s.items);
|
|
@@ -4170,13 +4656,13 @@ function SubNavBandHost({ leading, label }) {
|
|
|
4170
4656
|
);
|
|
4171
4657
|
}
|
|
4172
4658
|
function PageSubNav({ items, sections, search, footer, style, "aria-label": ariaLabel }) {
|
|
4173
|
-
const id =
|
|
4659
|
+
const id = React16.useId();
|
|
4174
4660
|
const hasHost = useHasSubNavHost();
|
|
4175
4661
|
const resolved = sections ?? (items ? [{ items }] : []);
|
|
4176
|
-
const ref =
|
|
4662
|
+
const ref = React16.useRef(resolved);
|
|
4177
4663
|
ref.current = resolved;
|
|
4178
4664
|
const signature = JSON.stringify(resolved.map((s) => [s.key, s.heading, s.items.map((i) => [i.id, i.label, i.icon, !!i.active, !!i.premium])]));
|
|
4179
|
-
|
|
4665
|
+
React16.useEffect(() => {
|
|
4180
4666
|
publishSubNav({ id, label: ariaLabel, sections: ref.current });
|
|
4181
4667
|
return () => unpublishSubNav(id);
|
|
4182
4668
|
}, [id, ariaLabel, signature]);
|
|
@@ -4204,16 +4690,16 @@ function PremiumBadge({ className }) {
|
|
|
4204
4690
|
const tip = t("upgrade.badgeTooltip");
|
|
4205
4691
|
return /* @__PURE__ */ jsx("span", { title: tip, "aria-label": tip, className: cn("inline-flex shrink-0", className), children: /* @__PURE__ */ jsx(Crown, { className: "h-3.5 w-3.5 text-amber-500", "aria-hidden": true }) });
|
|
4206
4692
|
}
|
|
4207
|
-
var ModuleLayoutContext =
|
|
4693
|
+
var ModuleLayoutContext = React16.createContext("rail");
|
|
4208
4694
|
function ModuleLayoutProvider({ variant, children }) {
|
|
4209
4695
|
return /* @__PURE__ */ jsx(ModuleLayoutContext.Provider, { value: variant, children });
|
|
4210
4696
|
}
|
|
4211
4697
|
function useModuleLayout() {
|
|
4212
|
-
return
|
|
4698
|
+
return React16.useContext(ModuleLayoutContext);
|
|
4213
4699
|
}
|
|
4214
4700
|
function RailNavItem({ item, collapsed }) {
|
|
4215
|
-
const [expanded, setExpanded] =
|
|
4216
|
-
|
|
4701
|
+
const [expanded, setExpanded] = React16.useState(false);
|
|
4702
|
+
React16.useEffect(() => {
|
|
4217
4703
|
if (collapsed) setExpanded(false);
|
|
4218
4704
|
}, [collapsed]);
|
|
4219
4705
|
const Icon = item.icon ? ICON_MAP[item.icon] ?? null : null;
|
|
@@ -4280,9 +4766,9 @@ function defaultChildOf(item) {
|
|
|
4280
4766
|
return kids.find((c) => c.defaultChild) ?? kids.find((c) => /(^|-)list$/i.test(c.id)) ?? kids.find((c) => !/(^|-)(new|novo|nova|create)$/i.test(c.id)) ?? kids[0];
|
|
4281
4767
|
}
|
|
4282
4768
|
function MobileTabs({ nav }) {
|
|
4283
|
-
const scrollRef =
|
|
4284
|
-
const [expandedId, setExpandedId] =
|
|
4285
|
-
|
|
4769
|
+
const scrollRef = React16.useRef(null);
|
|
4770
|
+
const [expandedId, setExpandedId] = React16.useState(null);
|
|
4771
|
+
React16.useEffect(() => {
|
|
4286
4772
|
const container = scrollRef.current;
|
|
4287
4773
|
if (!container) return;
|
|
4288
4774
|
const activeEl = container.querySelector('[data-active="true"]');
|
|
@@ -4355,12 +4841,12 @@ function MobileTabs({ nav }) {
|
|
|
4355
4841
|
})()
|
|
4356
4842
|
] });
|
|
4357
4843
|
}
|
|
4358
|
-
var BackStyleContext =
|
|
4844
|
+
var BackStyleContext = React16.createContext("link");
|
|
4359
4845
|
function BackStyleProvider({ style, children }) {
|
|
4360
4846
|
return /* @__PURE__ */ jsx(BackStyleContext.Provider, { value: style, children });
|
|
4361
4847
|
}
|
|
4362
4848
|
function useBackStyle() {
|
|
4363
|
-
return
|
|
4849
|
+
return React16.useContext(BackStyleContext);
|
|
4364
4850
|
}
|
|
4365
4851
|
function SubpageHeader({ title, subtitle, description, icon, onBack, parentLabel, actions, backStyle, inline }) {
|
|
4366
4852
|
const t = useTranslation();
|
|
@@ -4516,8 +5002,8 @@ function ModuleHeader({ nav }) {
|
|
|
4516
5002
|
function ModulePage({ title: _title, subtitle, nav, children, className, headerAction, showHeader = true, sidebarFooter, navVariant, viewKey, direction, navFilterPlaceholder }) {
|
|
4517
5003
|
const ctxVariant = useModuleLayout();
|
|
4518
5004
|
const variant = navVariant ?? ctxVariant;
|
|
4519
|
-
const [navQuery, setNavQuery] =
|
|
4520
|
-
const filteredNav =
|
|
5005
|
+
const [navQuery, setNavQuery] = React16.useState("");
|
|
5006
|
+
const filteredNav = React16.useMemo(() => {
|
|
4521
5007
|
const q = navQuery.trim().toLowerCase();
|
|
4522
5008
|
if (!q) return nav;
|
|
4523
5009
|
const hit = (label) => label.toLowerCase().includes(q);
|
|
@@ -4529,7 +5015,7 @@ function ModulePage({ title: _title, subtitle, nav, children, className, headerA
|
|
|
4529
5015
|
}, [nav, navQuery]);
|
|
4530
5016
|
const transitionKey = viewKey ?? "view";
|
|
4531
5017
|
const onSubpage = useHasPageHeaderBack();
|
|
4532
|
-
const activeLabel =
|
|
5018
|
+
const activeLabel = React16.useMemo(() => {
|
|
4533
5019
|
if (onSubpage) return null;
|
|
4534
5020
|
for (const item of nav) {
|
|
4535
5021
|
const kid = item.children?.find((c) => c.active);
|
|
@@ -4570,6 +5056,6 @@ function ModulePage({ title: _title, subtitle, nav, children, className, headerA
|
|
|
4570
5056
|
] });
|
|
4571
5057
|
}
|
|
4572
5058
|
|
|
4573
|
-
export { AppShell, BackStyleProvider, BottomSheet, COLUMN_WIDTH, CollapsibleColumn, HeaderTabs, Hint, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, ModuleLayoutProvider, ModulePage, NavTransitionProvider, PageHeader, PageHeaderActions, PageHeaderCrumb, PageHeaderOutlet, PageRail, PageSubNav, PageTabs, PageTitlePortal, PageTrail, PageTransition, PageViewBar, RailColumn, RailNavItem, SUB_NAV_STYLE, SaveBar, SaveBarProvider, SheetCard, SheetRow, ShellSearch, Sidebar, SubpageHeader, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Topbar, ViewTabs, bottomNavReachesAll, isCreateRoute, navigateToCrumb, useBackHandler, useBackStyle, useCrossModuleBack, useCurrentRouteHref, useHasPageActions, useHasPageHeaderBack, useHasPageHeaderHost, useHasPageHeaderOutlet, useLayoutStore, useModalHost, useModuleHeaderActionsSlot, useModuleHeaderSlot, useModuleLayout, useModuleViewLabel, useNavTransition, usePageHeader, usePageHeaderClaimed, usePageHeaderHost, usePageTrail, usePageTrailParent, usePublishModuleViewLabel, useRailRow, useRegisterPageActions, useSaveBar, useSaveBarVisible, useSheetClose, useSheetDrag, useTrailBack };
|
|
4574
|
-
//# sourceMappingURL=chunk-
|
|
4575
|
-
//# sourceMappingURL=chunk-
|
|
5059
|
+
export { AppShell, BackStyleProvider, BottomSheet, COLUMN_WIDTH, CollapsibleColumn, Dropdown, DropdownCheckboxItem, DropdownContent, DropdownGroup, DropdownItem, DropdownLabel, DropdownPortal, DropdownRadioGroup, DropdownRadioItem, DropdownSeparator, DropdownShortcut, DropdownSub, DropdownSubContent, DropdownSubTrigger, DropdownTrigger, HeaderTabs, Hint, MobileScrim, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, ModuleLayoutProvider, ModulePage, NavTransitionProvider, PageActionBar, PageHeader, PageHeaderActions, PageHeaderCrumb, PageHeaderOutlet, PageRail, PageSubNav, PageTabs, PageTitlePortal, PageTrail, PageTransition, PageViewBar, RailColumn, RailNavItem, SUB_NAV_STYLE, SaveBar, SaveBarProvider, SheetCard, SheetRow, ShellSearch, Sidebar, SubpageHeader, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Topbar, ViewTabs, WIDE_QUERY, bottomNavReachesAll, isCreateRoute, navigateToCrumb, setActionsMenuLabel, useBackHandler, useBackStyle, useCrossModuleBack, useCurrentRouteHref, useHasPageActions, useHasPageHeaderBack, useHasPageHeaderHost, useHasPageHeaderOutlet, useIsWide, useLayoutStore, useModalHost, useModuleHeaderActionsSlot, useModuleHeaderSlot, useModuleLayout, useModuleViewLabel, useNavTransition, usePageHeader, usePageHeaderClaimed, usePageHeaderHost, usePageTrail, usePageTrailParent, usePublishModuleViewLabel, useRailRow, useRegisterPageActions, useSaveBar, useSaveBarVisible, useSheetClose, useSheetDrag, useTrailBack };
|
|
5060
|
+
//# sourceMappingURL=chunk-L6PNGGHM.js.map
|
|
5061
|
+
//# sourceMappingURL=chunk-L6PNGGHM.js.map
|