@fayz-ai/ui 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/{chunk-XIRJGVDK.cjs → chunk-7ZQQZD4Q.cjs} +34 -37
  2. package/dist/{chunk-ID2HQK2Q.js.map → chunk-7ZQQZD4Q.cjs.map} +1 -1
  3. package/dist/{chunk-SVVKUMSL.cjs → chunk-B3BTZDTA.cjs} +10 -42
  4. package/dist/chunk-B3BTZDTA.cjs.map +1 -0
  5. package/dist/{chunk-O5F4LLSL.js → chunk-DYMBFHD7.js} +8 -7
  6. package/dist/chunk-DYMBFHD7.js.map +1 -0
  7. package/dist/{chunk-BVF2KPTT.js → chunk-G6OKZ7WL.js} +30 -3
  8. package/dist/chunk-G6OKZ7WL.js.map +1 -0
  9. package/dist/{chunk-A7O7KGNL.js → chunk-M34ACV5E.js} +23 -4
  10. package/dist/chunk-M34ACV5E.js.map +1 -0
  11. package/dist/{chunk-WF3STNDX.cjs → chunk-MUGRP5DD.cjs} +53 -34
  12. package/dist/chunk-MUGRP5DD.cjs.map +1 -0
  13. package/dist/{chunk-MI6FOB4O.cjs → chunk-NZV47HWO.cjs} +31 -2
  14. package/dist/chunk-NZV47HWO.cjs.map +1 -0
  15. package/dist/{chunk-2GDQUARM.js → chunk-R4LPSXTT.js} +8 -38
  16. package/dist/chunk-R4LPSXTT.js.map +1 -0
  17. package/dist/{chunk-TDGSY5W6.cjs → chunk-R4SQ2GVD.cjs} +8 -7
  18. package/dist/chunk-R4SQ2GVD.cjs.map +1 -0
  19. package/dist/{chunk-ID2HQK2Q.js → chunk-VVQ45ZDZ.js} +35 -38
  20. package/dist/chunk-VVQ45ZDZ.js.map +1 -0
  21. package/dist/dashboard/OnboardingWidget.d.ts.map +1 -1
  22. package/dist/dashboard/index.cjs +26 -26
  23. package/dist/dashboard/index.js +2 -2
  24. package/dist/index.cjs +137 -137
  25. package/dist/index.js +5 -5
  26. package/dist/layout/Sidebar.d.ts +4 -0
  27. package/dist/layout/Sidebar.d.ts.map +1 -1
  28. package/dist/layout/index.cjs +19 -19
  29. package/dist/layout/index.js +1 -1
  30. package/dist/primitives/index.cjs +83 -83
  31. package/dist/primitives/index.js +2 -2
  32. package/dist/primitives/search-select.d.ts +3 -1
  33. package/dist/primitives/search-select.d.ts.map +1 -1
  34. package/dist/theme/index.cjs +8 -8
  35. package/dist/theme/index.d.ts.map +1 -1
  36. package/dist/theme/index.js +1 -1
  37. package/package.json +3 -3
  38. package/src/dashboard/OnboardingWidget.tsx +32 -1
  39. package/src/layout/Sidebar.tsx +69 -29
  40. package/src/primitives/search-select.tsx +12 -4
  41. package/src/theme/index.ts +9 -6
  42. package/dist/chunk-2GDQUARM.js.map +0 -1
  43. package/dist/chunk-A7O7KGNL.js.map +0 -1
  44. package/dist/chunk-BVF2KPTT.js.map +0 -1
  45. package/dist/chunk-MI6FOB4O.cjs.map +0 -1
  46. package/dist/chunk-O5F4LLSL.js.map +0 -1
  47. package/dist/chunk-SVVKUMSL.cjs.map +0 -1
  48. package/dist/chunk-TDGSY5W6.cjs.map +0 -1
  49. package/dist/chunk-WF3STNDX.cjs.map +0 -1
  50. package/dist/chunk-XIRJGVDK.cjs.map +0 -1
@@ -61,6 +61,7 @@ var ICON_MAP = {
61
61
  ShoppingCart: lucideReact.ShoppingCart,
62
62
  Target: lucideReact.Target,
63
63
  Wrench: lucideReact.Wrench,
64
+ Truck: lucideReact.Truck,
64
65
  Receipt: lucideReact.Receipt,
65
66
  ShoppingBag: lucideReact.ShoppingBag,
66
67
  ClipboardList: lucideReact.ClipboardList,
@@ -149,26 +150,23 @@ function NavItem({
149
150
  onNavigate
150
151
  }) {
151
152
  const Icon = getIcon(item.icon);
152
- const content = /* @__PURE__ */ jsxRuntime.jsxs(
153
- "button",
154
- {
155
- onClick: () => onNavigate(item.route),
156
- className: chunkH6OULCHF_cjs.cn(
157
- "flex w-full items-center gap-3 rounded-md px-2.5 py-1.5 text-[13px] font-medium transition-colors",
158
- "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
159
- isActive ? "bg-sidebar-accent font-semibold text-sidebar-accent-foreground shadow-sm" : "text-sidebar-foreground/80",
160
- collapsed && "justify-center px-2"
161
- ),
162
- children: [
163
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4 shrink-0" }),
164
- !collapsed && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
165
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children: item.label }),
166
- item.premium && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Crown, { className: "ml-auto h-3.5 w-3.5 shrink-0 text-amber-500", "aria-hidden": true }),
167
- item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto rounded-full bg-primary px-2 py-0.5 text-xs font-semibold text-primary-foreground", children: item.badge })
168
- ] })
169
- ]
170
- }
153
+ const isExternal = !!item.href;
154
+ const className = chunkH6OULCHF_cjs.cn(
155
+ "flex w-full items-center gap-3 rounded-md px-2.5 py-1.5 text-[13px] font-medium transition-colors",
156
+ "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
157
+ isActive ? "bg-sidebar-accent font-semibold text-sidebar-accent-foreground shadow-sm" : "text-sidebar-foreground/80",
158
+ collapsed && "justify-center px-2"
171
159
  );
160
+ const inner = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
161
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4 shrink-0" }),
162
+ !collapsed && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
163
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children: item.label }),
164
+ isExternal && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "ml-auto h-3.5 w-3.5 shrink-0 opacity-50", "aria-hidden": true }),
165
+ item.premium && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Crown, { className: chunkH6OULCHF_cjs.cn("h-3.5 w-3.5 shrink-0 text-amber-500", !isExternal && "ml-auto"), "aria-hidden": true }),
166
+ item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkH6OULCHF_cjs.cn("rounded-full bg-primary px-2 py-0.5 text-xs font-semibold text-primary-foreground", !isExternal && !item.premium && "ml-auto"), children: item.badge })
167
+ ] })
168
+ ] });
169
+ const content = isExternal ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, target: "_blank", rel: "noopener noreferrer", className, children: inner }) : /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => onNavigate(item.route), className, children: inner });
172
170
  if (collapsed) {
173
171
  return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip__namespace.Root, { delayDuration: 0, children: [
174
172
  /* @__PURE__ */ jsxRuntime.jsx(Tooltip__namespace.Trigger, { asChild: true, children: content }),
@@ -261,21 +259,18 @@ function NavGroup({
261
259
  open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-4 mt-0.5 space-y-0.5 border-l border-sidebar-border/50 pl-3", children: item.children?.map((child) => {
262
260
  const ChildIcon = getIcon(child.icon);
263
261
  const isActive = child.route === activeRoute;
264
- return /* @__PURE__ */ jsxRuntime.jsxs(
265
- "button",
266
- {
267
- onClick: () => onNavigate(child.route),
268
- className: chunkH6OULCHF_cjs.cn(
269
- "flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors",
270
- isActive ? "font-medium text-sidebar-accent-foreground" : "text-sidebar-muted hover:text-sidebar-accent-foreground"
271
- ),
272
- children: [
273
- /* @__PURE__ */ jsxRuntime.jsx(ChildIcon, { className: "h-3.5 w-3.5 shrink-0" }),
274
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: child.label })
275
- ]
276
- },
277
- child.id
262
+ const childExternal = !!child.href;
263
+ const childClass = chunkH6OULCHF_cjs.cn(
264
+ "flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors",
265
+ isActive ? "font-medium text-sidebar-accent-foreground" : "text-sidebar-muted hover:text-sidebar-accent-foreground"
278
266
  );
267
+ const childInner = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
268
+ /* @__PURE__ */ jsxRuntime.jsx(ChildIcon, { className: "h-3.5 w-3.5 shrink-0" }),
269
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children: child.label }),
270
+ childExternal && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "h-3 w-3 shrink-0 opacity-50", "aria-hidden": true }),
271
+ child.premium && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Crown, { className: "h-3 w-3 shrink-0 text-amber-500", "aria-hidden": true })
272
+ ] });
273
+ return childExternal ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: child.href, target: "_blank", rel: "noopener noreferrer", className: childClass, children: childInner }, child.id) : /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => onNavigate(child.route), className: childClass, children: childInner }, child.id);
279
274
  }) })
280
275
  ] });
281
276
  }
@@ -319,7 +314,7 @@ function Sidebar({
319
314
  item.id
320
315
  );
321
316
  const navBody = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
322
- topContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 space-y-2", children: topContent }),
317
+ topContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 space-y-2", children: React3__namespace.isValidElement(topContent) ? React3__namespace.cloneElement(topContent, { collapsed }) : topContent }),
323
318
  mainItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
324
319
  sectionHeading(sectionLabels?.main),
325
320
  mainItems.map(renderItem)
@@ -396,7 +391,9 @@ function Sidebar({
396
391
  {
397
392
  className: chunkH6OULCHF_cjs.cn(
398
393
  "relative flex-1 p-2",
399
- outgoing ? "overflow-hidden" : "overflow-y-auto"
394
+ // scrollbar-none: the rail still scrolls, but without the native
395
+ // scrollbar gutter eating into the nav items.
396
+ outgoing ? "overflow-hidden" : "overflow-y-auto scrollbar-none"
400
397
  ),
401
398
  children: [
402
399
  outgoing && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1822,5 +1819,5 @@ exports.useModuleHeaderActionsSlot = useModuleHeaderActionsSlot;
1822
1819
  exports.useModuleHeaderSlot = useModuleHeaderSlot;
1823
1820
  exports.useModuleLayout = useModuleLayout;
1824
1821
  exports.useNavTransition = useNavTransition;
1825
- //# sourceMappingURL=chunk-XIRJGVDK.cjs.map
1826
- //# sourceMappingURL=chunk-XIRJGVDK.cjs.map
1822
+ //# sourceMappingURL=chunk-7ZQQZD4Q.cjs.map
1823
+ //# sourceMappingURL=chunk-7ZQQZD4Q.cjs.map