@fayz-ai/ui 0.11.0 → 0.12.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/analytics/AnalyticsCard.d.ts.map +1 -1
- package/dist/analytics/derive.d.ts.map +1 -1
- package/dist/{chunk-XRDCYOND.js → chunk-7BHG3XGJ.js} +92 -51
- package/dist/chunk-7BHG3XGJ.js.map +1 -0
- package/dist/{chunk-QSHA2Q27.js → chunk-ZDRHCKRK.js} +33 -17
- package/dist/chunk-ZDRHCKRK.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShellSkeleton.d.ts +1 -1
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -1
- package/dist/primitives/refresh-button.d.ts +18 -0
- package/dist/primitives/refresh-button.d.ts.map +1 -0
- package/dist/styles.css +187 -0
- package/package.json +2 -2
- package/dist/chunk-QSHA2Q27.js.map +0 -1
- package/dist/chunk-XRDCYOND.js.map +0 -1
|
@@ -252,7 +252,11 @@ function NavItem({
|
|
|
252
252
|
const isExternal = !!item.href;
|
|
253
253
|
const hoverProps = collapsed && flyout ? flyout.rowProps(flyoutContentOf(item)) : void 0;
|
|
254
254
|
const className = cn(
|
|
255
|
-
|
|
255
|
+
// 36px rows. The rail was condensed to 28px while it listed every
|
|
256
|
+
// destination flat; with the destinations folded into collapsible groups it
|
|
257
|
+
// shows a handful of rows at rest, and at that length the tight rhythm read
|
|
258
|
+
// as cramped rather than as dense.
|
|
259
|
+
"flex w-full items-center gap-3 rounded-button px-2.5 py-2 text-[13px] font-medium transition-colors",
|
|
256
260
|
"hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
|
|
257
261
|
isActive ? "bg-sidebar-accent font-semibold text-sidebar-accent-foreground shadow-sm" : "text-sidebar-foreground/80",
|
|
258
262
|
collapsed && "justify-center px-2"
|
|
@@ -337,7 +341,9 @@ function NavGroup({
|
|
|
337
341
|
{
|
|
338
342
|
onClick: () => setOpen(!open),
|
|
339
343
|
className: cn(
|
|
340
|
-
|
|
344
|
+
// Same metrics as NavItem — a group header and a plain link are peers
|
|
345
|
+
// in the rail and must share a baseline.
|
|
346
|
+
"flex w-full items-center gap-3 rounded-button px-2.5 py-2 text-[13px] font-medium transition-colors",
|
|
341
347
|
"hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
|
|
342
348
|
isChildActive ? "text-sidebar-accent-foreground" : "text-sidebar-foreground/80"
|
|
343
349
|
),
|
|
@@ -486,7 +492,7 @@ function Sidebar({
|
|
|
486
492
|
const handleNavigate = (route) => {
|
|
487
493
|
onNavigate?.(route);
|
|
488
494
|
};
|
|
489
|
-
const sectionHeading = (label) => label && !collapsed ? /* @__PURE__ */ jsx("p", { className: "px-2.5 pb-
|
|
495
|
+
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;
|
|
490
496
|
const groupRuns = (items) => {
|
|
491
497
|
const runs = [];
|
|
492
498
|
for (const item of items) {
|
|
@@ -498,10 +504,14 @@ function Sidebar({
|
|
|
498
504
|
};
|
|
499
505
|
const renderSection = (items, label) => {
|
|
500
506
|
const runs = groupRuns(items);
|
|
501
|
-
return runs.map((run, i) =>
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
507
|
+
return runs.map((run, i) => (
|
|
508
|
+
// 4px between rows, 20px between runs (a run being a `group` heading's
|
|
509
|
+
// worth of entries — see NavigationItem.group).
|
|
510
|
+
/* @__PURE__ */ jsxs("div", { className: i === 0 ? "space-y-1" : "mt-5 space-y-1", children: [
|
|
511
|
+
sectionHeading(run.group ?? label),
|
|
512
|
+
run.items.map(renderItem)
|
|
513
|
+
] }, run.group ?? `ungrouped-${i}`)
|
|
514
|
+
));
|
|
505
515
|
};
|
|
506
516
|
const renderItem = (item) => item.children && item.children.length > 0 ? /* @__PURE__ */ jsx(NavGroup, { item, collapsed, activeRoute, onNavigate: handleNavigate, childConnector: navChildConnector, flyout }, item.id) : /* @__PURE__ */ jsx(
|
|
507
517
|
NavItem,
|
|
@@ -551,7 +561,13 @@ function Sidebar({
|
|
|
551
561
|
// and has to escape the nav's own scroll box to do it.
|
|
552
562
|
"relative flex h-full flex-col bg-sidebar text-sidebar-foreground transition-all duration-200",
|
|
553
563
|
!borderless && "border-r border-sidebar-border",
|
|
554
|
-
|
|
564
|
+
// 14rem expanded. It was 16rem, which is the width a rail needs when
|
|
565
|
+
// its entries are sentences ("GlossGenius Financing", "Configure your
|
|
566
|
+
// payment methods"); these are one or two words, so the extra 2rem was
|
|
567
|
+
// paid for by the content column on every screen in every app. The
|
|
568
|
+
// labels still truncate, and a long one now truncates 32px earlier —
|
|
569
|
+
// which is the trade, taken deliberately.
|
|
570
|
+
collapsed ? "w-16" : "w-56"
|
|
555
571
|
),
|
|
556
572
|
children: [
|
|
557
573
|
/* @__PURE__ */ jsxs(
|
|
@@ -1110,7 +1126,7 @@ function SidebarLayout({
|
|
|
1110
1126
|
const [headerSlot, setHeaderSlot] = React.useState(null);
|
|
1111
1127
|
const [actionsSlot, setActionsSlot] = React.useState(null);
|
|
1112
1128
|
return /* @__PURE__ */ jsx(SaveBarProvider, { children: /* @__PURE__ */ jsx(ModuleHeaderSlotContext.Provider, { value: headerSlot, children: /* @__PURE__ */ jsx(ModuleHeaderActionsSlotContext.Provider, { value: actionsSlot, children: /* @__PURE__ */ jsxs("div", { className: cn(
|
|
1113
|
-
"flex h-screen overflow-hidden bg-background",
|
|
1129
|
+
"shell-enter flex h-screen overflow-hidden bg-background",
|
|
1114
1130
|
// Frame mode: the inset gap around the framed card takes the sidebar (menu)
|
|
1115
1131
|
// color, so the white card reads as a panel floating on the same tone as the
|
|
1116
1132
|
// left menu. The card's own md:m-2 margin reveals this behind it.
|
|
@@ -1134,7 +1150,7 @@ function SidebarLayout({
|
|
|
1134
1150
|
topContent: sidebarTopContent,
|
|
1135
1151
|
navTop: sidebarNavTop,
|
|
1136
1152
|
footerContent: sidebarFooterContent,
|
|
1137
|
-
borderless:
|
|
1153
|
+
borderless: frame,
|
|
1138
1154
|
userMenuSlot,
|
|
1139
1155
|
notificationSlot,
|
|
1140
1156
|
unreadCount,
|
|
@@ -1229,7 +1245,7 @@ function TopbarLayout({
|
|
|
1229
1245
|
usePageHeaderHost();
|
|
1230
1246
|
const pageHeaderSlot = hasOutlet ? null : rawSlot;
|
|
1231
1247
|
const showTitle = !hasOutlet && !!pageTitle;
|
|
1232
|
-
return /* @__PURE__ */ jsx(SaveBarProvider, { children: /* @__PURE__ */ jsxs("div", { className: "relative flex h-screen flex-col overflow-hidden bg-background", children: [
|
|
1248
|
+
return /* @__PURE__ */ jsx(SaveBarProvider, { children: /* @__PURE__ */ jsxs("div", { className: "shell-enter relative flex h-screen flex-col overflow-hidden bg-background", children: [
|
|
1233
1249
|
/* @__PURE__ */ jsx(
|
|
1234
1250
|
Topbar,
|
|
1235
1251
|
{
|
|
@@ -1291,7 +1307,7 @@ function MinimalLayout({
|
|
|
1291
1307
|
children,
|
|
1292
1308
|
headerEnd
|
|
1293
1309
|
}) {
|
|
1294
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex h-screen flex-col", children: [
|
|
1310
|
+
return /* @__PURE__ */ jsxs("div", { className: "shell-enter flex h-screen flex-col", children: [
|
|
1295
1311
|
/* @__PURE__ */ jsxs("header", { className: "flex h-14 shrink-0 items-center justify-between border-b border-border bg-card px-4 md:px-6", children: [
|
|
1296
1312
|
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: logo ?? /* @__PURE__ */ jsx("span", { className: "text-lg font-bold", children: "App" }) }),
|
|
1297
1313
|
headerEnd && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: headerEnd })
|
|
@@ -1705,8 +1721,8 @@ function BootSpinner({ className }) {
|
|
|
1705
1721
|
{
|
|
1706
1722
|
"aria-hidden": true,
|
|
1707
1723
|
className: cn(
|
|
1708
|
-
"block h-7 w-7 animate-spin rounded-full border-2 border-
|
|
1709
|
-
"motion-reduce:animate-none motion-reduce:border-t-
|
|
1724
|
+
"block h-7 w-7 animate-spin rounded-full border-2 border-foreground/20 border-t-foreground/70",
|
|
1725
|
+
"motion-reduce:animate-none motion-reduce:border-t-foreground/20 motion-reduce:animate-pulse",
|
|
1710
1726
|
className
|
|
1711
1727
|
)
|
|
1712
1728
|
}
|
|
@@ -1718,7 +1734,7 @@ function AppShellSkeleton({ label, className }) {
|
|
|
1718
1734
|
{
|
|
1719
1735
|
role: "status",
|
|
1720
1736
|
"aria-busy": "true",
|
|
1721
|
-
className: cn("flex h-screen items-center justify-center overflow-hidden bg-
|
|
1737
|
+
className: cn("flex h-screen items-center justify-center overflow-hidden bg-background", className),
|
|
1722
1738
|
children: [
|
|
1723
1739
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: label }),
|
|
1724
1740
|
/* @__PURE__ */ jsx(BootSpinner, {})
|
|
@@ -2167,5 +2183,5 @@ function ContentSplitTrigger({ label, iconOnly, className }) {
|
|
|
2167
2183
|
}
|
|
2168
2184
|
|
|
2169
2185
|
export { AppShell, AppShellSkeleton, BackStyleProvider, ContentSplit, ContentSplitTrigger, ModuleLayoutProvider, ModulePage, NavTransitionProvider, PageHeaderActions, PageTrail, PageTransition, Sidebar, SubpageHeader, Topbar, navigateToCrumb, useBackStyle, useModuleHeaderActionsSlot, useModuleHeaderSlot, useModuleLayout, useNavTransition, usePageTrail, usePageTrailParent };
|
|
2170
|
-
//# sourceMappingURL=chunk-
|
|
2171
|
-
//# sourceMappingURL=chunk-
|
|
2186
|
+
//# sourceMappingURL=chunk-ZDRHCKRK.js.map
|
|
2187
|
+
//# sourceMappingURL=chunk-ZDRHCKRK.js.map
|