@datum-cloud/datum-ui 2.0.0 → 2.3.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.
Files changed (80) hide show
  1. package/dist/app-navigation/index.mjs +2 -2
  2. package/dist/{app-navigation-CNig4Maj.mjs → app-navigation--tEBCrfl.mjs} +180 -164
  3. package/dist/autocomplete/index.mjs +1 -1
  4. package/dist/{autocomplete-DM6JYV4W.mjs → autocomplete-DZ_HSBak.mjs} +1 -1
  5. package/dist/autosearch/index.mjs +1 -1
  6. package/dist/{calendar-date-picker-AzvSqjeS.mjs → calendar-date-picker-ynSGADfR.mjs} +1 -1
  7. package/dist/components/base/sheet/sheet.d.ts +2 -1
  8. package/dist/components/base/sidebar/context.d.ts +3 -0
  9. package/dist/components/base/sidebar/shell.d.ts +2 -2
  10. package/dist/components/features/app-navigation/nav-menu/index.d.ts +1 -1
  11. package/dist/components/features/app-navigation/nav-menu/nav-menu-context.d.ts +4 -0
  12. package/dist/components/features/app-navigation/nav-menu/nav-menu-item.d.ts +3 -0
  13. package/dist/components/features/app-navigation/nav-menu/types.d.ts +18 -0
  14. package/dist/components/features/date-time/date-time.d.ts +6 -0
  15. package/dist/components/features/date-time/formatters.d.ts +13 -0
  16. package/dist/components/features/date-time/index.d.ts +3 -0
  17. package/dist/components/features/date-time/types.d.ts +47 -0
  18. package/dist/components/features/index.d.ts +1 -0
  19. package/dist/components/features/logs/components/detail.d.ts +3 -0
  20. package/dist/components/features/logs/components/explorer.d.ts +3 -0
  21. package/dist/components/features/logs/components/filters.d.ts +11 -0
  22. package/dist/components/features/logs/components/root.d.ts +2 -0
  23. package/dist/components/features/logs/components/status-badge.d.ts +7 -0
  24. package/dist/components/features/logs/components/table.d.ts +3 -0
  25. package/dist/components/features/logs/components/toolbar.d.ts +12 -0
  26. package/dist/components/features/logs/fixtures/index.d.ts +2 -0
  27. package/dist/components/features/logs/hooks/use-controllable-state.d.ts +5 -0
  28. package/dist/components/features/logs/hooks/use-logs.d.ts +3 -0
  29. package/dist/components/features/logs/index.d.ts +4 -0
  30. package/dist/components/features/logs/logs.d.ts +18 -0
  31. package/dist/components/features/logs/types.d.ts +105 -0
  32. package/dist/components/features/logs/utils/build-logql.d.ts +2 -0
  33. package/dist/components/features/logs/utils/constants.d.ts +6 -0
  34. package/dist/components/features/logs/utils/facets.d.ts +3 -0
  35. package/dist/components/features/logs/utils/flatten-loki.d.ts +3 -0
  36. package/dist/components/features/logs/utils/format-timestamp.d.ts +4 -0
  37. package/dist/components/features/logs/utils/index.d.ts +8 -0
  38. package/dist/components/features/logs/utils/parse-log-line.d.ts +7 -0
  39. package/dist/components/features/logs/utils/severity.d.ts +5 -0
  40. package/dist/components/features/logs/utils/time-range.d.ts +3 -0
  41. package/dist/data-table/index.mjs +1 -1
  42. package/dist/{data-table-DjGvAdO_.mjs → data-table-Du7_FLBi.mjs} +4 -4
  43. package/dist/date-picker/index.mjs +3 -3
  44. package/dist/date-time/index.mjs +2 -0
  45. package/dist/date-time-CA-09lnw.mjs +134 -0
  46. package/dist/date-time-picker/index.mjs +1 -1
  47. package/dist/{date-time-picker-D3-DeNo8.mjs → date-time-picker-BzcHrf-A.mjs} +1 -1
  48. package/dist/{picker-b5-x-EHs.mjs → date-time-range-picker-Dog33Ry0.mjs} +22 -456
  49. package/dist/form/index.mjs +1 -1
  50. package/dist/{form-BUUNQfC9.mjs → form-BhBsoMFA.mjs} +4 -4
  51. package/dist/grouped-table/index.mjs +1 -1
  52. package/dist/{grouped-table-D4J3ioHb.mjs → grouped-table--jejU1Jy.mjs} +1 -1
  53. package/dist/index.mjs +21 -20
  54. package/dist/logs/fixtures/index.mjs +231 -0
  55. package/dist/logs/index.mjs +980 -0
  56. package/dist/mobile-sheet/index.mjs +1 -1
  57. package/dist/{mobile-sheet-D9L-JOee.mjs → mobile-sheet-BYp-QQmn.mjs} +1 -1
  58. package/dist/more-actions/index.mjs +1 -1
  59. package/dist/{more-actions-Bx443Ccx.mjs → more-actions-B1FUf2rm.mjs} +1 -1
  60. package/dist/multi-select/index.mjs +1 -1
  61. package/dist/{multi-select-PHaMEbY-.mjs → multi-select-PtdMChPF.mjs} +1 -1
  62. package/dist/picker/index.mjs +2 -1
  63. package/dist/picker-raVuDxsh.mjs +453 -0
  64. package/dist/responsive-dropdown/index.mjs +1 -1
  65. package/dist/{responsive-dropdown-fCmduKaz.mjs → responsive-dropdown-n0Txkax5.mjs} +1 -1
  66. package/dist/responsive-popover/index.mjs +1 -1
  67. package/dist/{responsive-popover-DJZgXWIE.mjs → responsive-popover-C_1nzIvm.mjs} +1 -1
  68. package/dist/rich-text-editor/index.mjs +1 -1
  69. package/dist/{rich-text-editor-CGuSn8xi.mjs → rich-text-editor-Dohp-pbf.mjs} +1 -1
  70. package/dist/sheet/index.mjs +1 -1
  71. package/dist/{sheet-BZViad2U.mjs → sheet-C2i2k5i2.mjs} +2 -2
  72. package/dist/sidebar/index.mjs +1 -1
  73. package/dist/{sidebar-BRUNOqXi.mjs → sidebar-D6BoAr6C.mjs} +53 -16
  74. package/dist/styles/shadcn/animations.css +2 -2
  75. package/dist/task-queue/index.mjs +1 -1
  76. package/dist/{task-queue-dropdown-pqFd4rSf.mjs → task-queue-dropdown-ClLLTMxU.mjs} +1 -1
  77. package/dist/time-picker/index.mjs +1 -1
  78. package/dist/{time-picker-B_fN5vhO.mjs → time-picker-CFhaHTtI.mjs} +1 -1
  79. package/dist/{to-api-format-43Boq7OR.mjs → to-api-format-WC7b9Mcv.mjs} +2 -2
  80. package/package.json +16 -1
@@ -1,3 +1,3 @@
1
- import { C as SidebarProvider, S as SidebarGroupLabel, _ as SidebarMenuSubButton, a as SidebarInput, b as SidebarGroupAction, c as SidebarSeparator, d as SidebarMenuAction, f as SidebarMenuBadge, g as SidebarMenuSub, h as SidebarMenuSkeleton, i as SidebarHeader, l as SidebarTrigger, m as SidebarMenuItem, n as SidebarContent, o as SidebarInset, p as SidebarMenuButton, r as SidebarFooter, s as SidebarRail, t as Sidebar, u as SidebarMenu, v as SidebarMenuSubItem, w as useSidebar, x as SidebarGroupContent, y as SidebarGroup } from "../sidebar-BRUNOqXi.mjs";
2
- import { a as hasActiveDescendant, i as findItemByHref, n as NavMenu, o as isNavItemActive, r as NavMenuItem, s as normalizePath, t as AppNavigation } from "../app-navigation-CNig4Maj.mjs";
1
+ import { C as SidebarProvider, S as SidebarGroupLabel, _ as SidebarMenuSubButton, a as SidebarInput, b as SidebarGroupAction, c as SidebarSeparator, d as SidebarMenuAction, f as SidebarMenuBadge, g as SidebarMenuSub, h as SidebarMenuSkeleton, i as SidebarHeader, l as SidebarTrigger, m as SidebarMenuItem, n as SidebarContent, o as SidebarInset, p as SidebarMenuButton, r as SidebarFooter, s as SidebarRail, t as Sidebar, u as SidebarMenu, v as SidebarMenuSubItem, w as useSidebar, x as SidebarGroupContent, y as SidebarGroup } from "../sidebar-D6BoAr6C.mjs";
2
+ import { a as hasActiveDescendant, i as findItemByHref, n as NavMenu, o as isNavItemActive, r as NavMenuItem, s as normalizePath, t as AppNavigation } from "../app-navigation--tEBCrfl.mjs";
3
3
  export { AppNavigation, NavMenu, NavMenuItem, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, findItemByHref, hasActiveDescendant, isNavItemActive, normalizePath, useSidebar };
@@ -1,7 +1,7 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
2
  import { t as Icon } from "./icon-wrapper-DKfJlJd0.mjs";
3
3
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible/index.mjs";
4
- import { S as SidebarGroupLabel, c as SidebarSeparator, g as SidebarMenuSub, h as SidebarMenuSkeleton, i as SidebarHeader, l as SidebarTrigger, m as SidebarMenuItem, n as SidebarContent, p as SidebarMenuButton, r as SidebarFooter, t as Sidebar, u as SidebarMenu, w as useSidebar, x as SidebarGroupContent, y as SidebarGroup } from "./sidebar-BRUNOqXi.mjs";
4
+ import { c as SidebarSeparator, g as SidebarMenuSub, h as SidebarMenuSkeleton, i as SidebarHeader, l as SidebarTrigger, m as SidebarMenuItem, n as SidebarContent, p as SidebarMenuButton, r as SidebarFooter, t as Sidebar, u as SidebarMenu, w as useSidebar, x as SidebarGroupContent, y as SidebarGroup } from "./sidebar-D6BoAr6C.mjs";
5
5
  import { ChevronRight, ExternalLinkIcon } from "lucide-react";
6
6
  import { createContext, memo, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -132,28 +132,66 @@ function NavSidebarMenuButton({ ref, item, isActive, disableTooltip, className,
132
132
  NavSidebarMenuButton.displayName = "NavSidebarMenuButton";
133
133
  //#endregion
134
134
  //#region src/components/features/app-navigation/nav-menu/nav-menu-item.tsx
135
+ const COLLAPSIBLE_CONTAINER_VARIANTS = {
136
+ hidden: { opacity: 0 },
137
+ visible: {
138
+ opacity: 1,
139
+ transition: {
140
+ staggerChildren: .04,
141
+ delayChildren: .06
142
+ }
143
+ }
144
+ };
145
+ const COLLAPSIBLE_CHILD_VARIANTS = {
146
+ hidden: {
147
+ opacity: 0,
148
+ y: -4
149
+ },
150
+ visible: {
151
+ opacity: 1,
152
+ y: 0,
153
+ transition: {
154
+ duration: .2,
155
+ ease: [
156
+ .32,
157
+ .72,
158
+ 0,
159
+ 1
160
+ ]
161
+ }
162
+ }
163
+ };
135
164
  /** Stable React key for a rendered nav item at a given depth. */
136
165
  function itemKeyOf(item, level) {
137
166
  return `${item.title}-${item.href || ""}-${level}`;
138
167
  }
139
168
  /**
169
+ * Cloudflare-style nav status chip: short inline pill with a dashed border,
170
+ * sitting immediately after the title (never overlapping / corner-pinned).
171
+ * Uses `div` (not `span`) so SidebarMenuButton's `[&>span:last-child]:truncate`
172
+ * does not clip the chip.
173
+ */
174
+ function NavBadge({ badge }) {
175
+ return /* @__PURE__ */ jsx("div", {
176
+ className: cn("text-muted-foreground inline-flex shrink-0 items-center rounded-full border border-dashed px-1.5 py-px", "text-[10px] leading-none font-medium tracking-wide", "border-border/80"),
177
+ children: badge.label
178
+ });
179
+ }
180
+ /**
140
181
  * Recursive nav row. Dispatches to the correct presentational part based on the
141
182
  * item type and the current sidebar state, and renders itself for children.
142
183
  * Memoized so unchanged subtrees skip re-rendering when their props are stable.
184
+ *
185
+ * Items with children use {@link NavCollapsibleItem}. Section headers use
186
+ * {@link NavGroup} (always open, no dropdown).
143
187
  */
144
188
  const NavMenuItem = memo(({ item, level = 0 }) => {
145
- const { state, isMobile } = useNavMenuContext();
146
189
  if (item.hidden) return null;
147
190
  if (item.type === "group") return /* @__PURE__ */ jsx(NavGroup, {
148
191
  item,
149
192
  level
150
193
  });
151
- const hasChildren = (item.children || []).length > 0;
152
- if (state === "collapsed" && !isMobile && level <= 2 && hasChildren) return /* @__PURE__ */ jsx(NavCollapsedItem, {
153
- item,
154
- level
155
- });
156
- if (hasChildren) return /* @__PURE__ */ jsx(NavCollapsibleItem, {
194
+ if ((item.children || []).length > 0) return /* @__PURE__ */ jsx(NavCollapsibleItem, {
157
195
  item,
158
196
  level
159
197
  });
@@ -163,116 +201,85 @@ const NavMenuItem = memo(({ item, level = 0 }) => {
163
201
  });
164
202
  });
165
203
  NavMenuItem.displayName = "NavMenuItem";
166
- /** A labelled group of nav items (recurses into `NavMenuItem` for children). */
204
+ /** A labelled group of nav items (always open Vercel-style section headers). */
167
205
  function NavGroup({ item, level }) {
168
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(SidebarGroup, {
169
- className: "mb-2 p-0! px-2",
170
- children: [item.title && /* @__PURE__ */ jsx(SidebarGroupLabel, {
171
- className: "lowercase group-data-[state=collapsed]:hidden first-letter:uppercase",
172
- children: item.title
173
- }), /* @__PURE__ */ jsx(SidebarGroupContent, {
174
- className: "flex flex-col gap-1",
175
- children: (item.children || []).map((child) => /* @__PURE__ */ jsx(NavMenuItem, {
176
- item: child,
177
- level: level + 1
178
- }, itemKeyOf(child, level + 1)))
179
- })]
180
- }), /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2 hidden group-data-[state=collapsed]:block" })] });
181
- }
182
- /**
183
- * Collapsed-sidebar rendering for an item with children: the parent button
184
- * expands the sidebar, and active descendants are represented as dots.
185
- */
186
- function NavCollapsedItem({ item, level }) {
187
206
  const ctx = useNavMenuContext();
188
- const { pathname, getLinkProps, handleNavigation } = ctx;
189
- const stateKey = getNavItemKey(item, level);
190
- const isActive = isNavItemActive(item, pathname);
191
- const hasActiveChild = (item.children?.filter((child) => hasActiveDescendant(child, pathname)) || []).length > 0;
192
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
207
+ const { pathname, isIconRail, isMobile } = ctx;
208
+ const hasActiveChild = item.children?.some((child) => hasActiveDescendant(child, pathname)) ?? false;
209
+ if (isIconRail && !isMobile) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
193
210
  item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-1" }),
194
- /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsxs("div", {
195
- className: "flex flex-col px-2",
196
- children: [/* @__PURE__ */ jsx(NavSidebarMenuButton, {
211
+ /* @__PURE__ */ jsx(SidebarMenu, {
212
+ className: "px-2",
213
+ children: /* @__PURE__ */ jsx(NavSidebarMenuButton, {
197
214
  item,
198
- isActive,
215
+ isActive: hasActiveChild,
199
216
  disableTooltip: ctx.disableTooltip,
200
- className: ctx.itemClassName,
217
+ className: cn(ctx.itemClassName, hasActiveChild && "[&>svg:first-of-type]:text-primary"),
201
218
  activeClassName: ctx.activeItemClassName,
202
- onClick: () => {
203
- ctx.setOpen(true);
204
- ctx.setOpenItems((prev) => ({
205
- ...prev,
206
- [stateKey]: true
207
- }));
208
- }
209
- }), hasActiveChild && /* @__PURE__ */ jsx(motion.div, {
210
- variants: {
211
- hidden: { opacity: 0 },
212
- visible: {
213
- opacity: 1,
214
- transition: {
215
- staggerChildren: .05,
216
- delayChildren: .1
217
- }
218
- }
219
- },
220
- initial: "hidden",
221
- animate: "visible",
222
- className: "flex flex-col gap-0.5",
223
- children: item.children?.map((subItem) => {
224
- const isSubItemActive = isNavItemActive(subItem, pathname);
225
- return /* @__PURE__ */ jsx(motion.div, {
226
- variants: {
227
- hidden: { opacity: 0 },
228
- visible: {
229
- opacity: 1,
230
- transition: {
231
- duration: .2,
232
- ease: "easeOut"
233
- }
234
- }
235
- },
236
- children: /* @__PURE__ */ jsx(SidebarMenuButton, {
237
- tooltip: subItem.title,
238
- isActive: isSubItemActive,
239
- className: "h-6 p-0 group-data-[collapsible=icon]:h-6! group-data-[collapsible=icon]:p-0!",
240
- asChild: true,
241
- children: /* @__PURE__ */ jsx(ctx.linkComponent, {
242
- className: "flex items-center justify-center",
243
- ...getLinkProps(subItem.href || ""),
244
- onClick: () => {
245
- handleNavigation();
246
- },
247
- children: /* @__PURE__ */ jsx("span", { className: cn("size-1 rounded-full", isSubItemActive ? "bg-primary" : "bg-sidebar-primary-foreground") })
248
- })
249
- })
250
- }, `collapsed-dot-${subItem.href}-${level}`);
219
+ onClick: () => ctx.setOpen(true)
220
+ })
221
+ }),
222
+ item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
223
+ ] });
224
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
225
+ item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
226
+ /* @__PURE__ */ jsxs(SidebarGroup, {
227
+ className: "mb-1 p-0! px-2",
228
+ children: [item.title && /* @__PURE__ */ jsx(SidebarMenu, {
229
+ className: "w-full",
230
+ children: /* @__PURE__ */ jsx(NavSidebarMenuButton, {
231
+ item,
232
+ isActive: hasActiveChild,
233
+ disableTooltip: true,
234
+ className: cn(ctx.itemClassName, hasActiveChild && "[&>svg:first-of-type]:text-primary", "pointer-events-none h-7 text-xs font-medium text-muted-foreground hover:bg-transparent", hasActiveChild && "text-primary"),
235
+ activeClassName: ctx.activeItemClassName,
236
+ children: /* @__PURE__ */ jsx("span", {
237
+ className: "min-w-0 truncate",
238
+ children: item.title
239
+ })
251
240
  })
241
+ }), /* @__PURE__ */ jsx(SidebarGroupContent, {
242
+ className: "flex flex-col gap-0.5",
243
+ children: (item.children || []).map((child) => /* @__PURE__ */ jsx(NavMenuItem, {
244
+ item: child,
245
+ level: level + 1
246
+ }, itemKeyOf(child, level + 1)))
252
247
  })]
253
- }) }),
248
+ }),
254
249
  item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
255
250
  ] });
256
251
  }
257
252
  /**
258
- * Expanded-sidebar rendering for an item with children: a collapsible section
259
- * whose contents recurse into `NavMenuItem`.
253
+ * Collapsible section for items with children. Used in both expanded and
254
+ * icon-collapsed sidebar modes so width animation does not remount the tree.
255
+ * When the sidebar is icon-collapsed, the panel is forced closed; clicking the
256
+ * parent expands the sidebar and opens this section.
260
257
  */
261
258
  function NavCollapsibleItem({ item, level }) {
262
259
  const ctx = useNavMenuContext();
263
- const { pathname, state, openItems, isInitialMount, previousOpenItems, previousState, previousPathname } = ctx;
260
+ const { pathname, state, isIconRail, isMobile, openItems, isInitialMount, previousOpenItems, previousState, previousPathname } = ctx;
264
261
  const stateKey = getNavItemKey(item, level);
265
262
  const isActive = isNavItemActive(item, pathname);
266
263
  const hasActiveChild = (item.children?.filter((child) => hasActiveDescendant(child, pathname)) || []).length > 0;
264
+ const sidebarCollapsed = isIconRail && !isMobile;
267
265
  const isOpen = openItems[stateKey] !== void 0 ? openItems[stateKey] : hasActiveChild;
266
+ const panelOpen = sidebarCollapsed ? false : isOpen;
268
267
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
269
268
  item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
270
269
  /* @__PURE__ */ jsx(SidebarMenu, {
271
270
  className: "px-2",
272
271
  children: /* @__PURE__ */ jsx(Collapsible, {
273
272
  asChild: true,
274
- open: isOpen,
273
+ open: panelOpen,
275
274
  onOpenChange: (open) => {
275
+ if (sidebarCollapsed) {
276
+ ctx.setOpen(true);
277
+ ctx.setOpenItems((prev) => ({
278
+ ...prev,
279
+ [stateKey]: true
280
+ }));
281
+ return;
282
+ }
276
283
  ctx.setOpenItems((prev) => ({
277
284
  ...prev,
278
285
  [stateKey]: open
@@ -286,55 +293,47 @@ function NavCollapsibleItem({ item, level }) {
286
293
  className: "w-full",
287
294
  children: /* @__PURE__ */ jsxs(NavSidebarMenuButton, {
288
295
  item,
289
- isActive,
296
+ isActive: isActive || sidebarCollapsed && hasActiveChild,
290
297
  disableTooltip: ctx.disableTooltip,
291
- className: ctx.itemClassName,
298
+ className: cn(ctx.itemClassName, hasActiveChild && "font-semibold [&>svg:first-of-type]:text-primary"),
292
299
  activeClassName: ctx.activeItemClassName,
293
- children: [/* @__PURE__ */ jsx("span", { children: item.title }), /* @__PURE__ */ jsx(Icon, {
294
- icon: ChevronRight,
295
- className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
296
- })]
300
+ children: [
301
+ /* @__PURE__ */ jsx("span", {
302
+ className: "min-w-0 truncate group-data-[collapsible=icon]:hidden",
303
+ children: item.title
304
+ }),
305
+ item.badge && /* @__PURE__ */ jsx("span", {
306
+ className: "group-data-[collapsible=icon]:hidden",
307
+ children: /* @__PURE__ */ jsx(NavBadge, { badge: item.badge })
308
+ }),
309
+ /* @__PURE__ */ jsx(Icon, {
310
+ icon: ChevronRight,
311
+ className: "ml-auto shrink-0 transition-transform duration-200 group-data-[collapsible=icon]:hidden group-data-[state=open]/collapsible:rotate-90"
312
+ })
313
+ ]
297
314
  })
298
315
  }), /* @__PURE__ */ jsx(CollapsibleContent, {
299
- className: "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden",
316
+ className: "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden group-data-[collapsible=icon]:hidden",
300
317
  children: /* @__PURE__ */ jsx("div", {
301
318
  style: {
302
319
  minHeight: 0,
303
320
  overflow: "hidden"
304
321
  },
305
322
  children: /* @__PURE__ */ jsx(motion.div, {
306
- variants: {
307
- hidden: { opacity: 0 },
308
- visible: {
309
- opacity: 1,
310
- transition: {
311
- staggerChildren: .05,
312
- delayChildren: .1
313
- }
314
- }
315
- },
323
+ variants: COLLAPSIBLE_CONTAINER_VARIANTS,
316
324
  initial: isInitialMount.current || previousOpenItems.current[stateKey] === openItems[stateKey] && previousState.current === state && previousPathname.current === pathname && !hasActiveChild ? "visible" : "hidden",
317
- animate: isOpen ? "visible" : "hidden",
325
+ animate: panelOpen ? "visible" : "hidden",
318
326
  children: /* @__PURE__ */ jsx(SidebarMenuSub, {
319
327
  className: cn(level >= 1 ? "mr-0 pr-[.1rem]" : "", level === 2 ? "pl-4" : "", level === 3 ? "pl-6" : "", "mr-0 gap-0.5 pr-0"),
320
328
  children: item.children?.map((subItem, index) => /* @__PURE__ */ jsx(motion.div, {
321
- variants: {
322
- hidden: { opacity: 0 },
323
- visible: {
324
- opacity: 1,
325
- transition: {
326
- duration: .2,
327
- ease: "easeOut"
328
- }
329
- }
330
- },
329
+ variants: COLLAPSIBLE_CHILD_VARIANTS,
331
330
  children: /* @__PURE__ */ jsx(NavMenuItem, {
332
331
  item: subItem,
333
332
  level: level + 1
334
333
  })
335
334
  }, `${subItem.href}-${level}-${index}`))
336
335
  })
337
- }, `collapsible-${stateKey}-${isOpen}`)
336
+ }, `collapsible-${stateKey}-${panelOpen}`)
338
337
  })
339
338
  })]
340
339
  })
@@ -360,31 +359,49 @@ function NavLeafItem({ item, level }) {
360
359
  item,
361
360
  isActive: isActive && !hasActiveChild,
362
361
  disableTooltip: ctx.disableTooltip,
363
- className: cn(level >= 1 && "h-6", ctx.itemClassName),
362
+ className: cn(level >= 1 && "h-7", item.muted && "[&_svg]:text-muted-foreground", ctx.itemClassName),
364
363
  activeClassName: ctx.activeItemClassName,
365
364
  children: item.type === "externalLink" ? /* @__PURE__ */ jsxs("a", {
366
365
  href: item.href || "",
367
366
  target: "_blank",
368
367
  rel: "noopener noreferrer",
369
- className: "flex items-center justify-between",
370
- children: [/* @__PURE__ */ jsxs("div", {
371
- className: "flex items-center gap-2",
372
- children: [item?.icon && /* @__PURE__ */ jsx(Icon, {
368
+ className: "flex min-w-0 items-center gap-2",
369
+ children: [
370
+ item?.icon && /* @__PURE__ */ jsx(Icon, {
373
371
  icon: item.icon,
374
- className: "size-4 transition-all duration-300"
375
- }), /* @__PURE__ */ jsx("span", { children: item.title })]
376
- }), /* @__PURE__ */ jsx(Icon, {
377
- icon: ExternalLinkIcon,
378
- className: "ml-auto size-4"
379
- })]
372
+ className: "size-4 shrink-0 transition-all duration-300"
373
+ }),
374
+ /* @__PURE__ */ jsx("span", {
375
+ className: "min-w-0 truncate group-data-[collapsible=icon]:hidden",
376
+ children: item.title
377
+ }),
378
+ item.badge ? /* @__PURE__ */ jsx("span", {
379
+ className: "group-data-[collapsible=icon]:hidden",
380
+ children: /* @__PURE__ */ jsx(NavBadge, { badge: item.badge })
381
+ }) : /* @__PURE__ */ jsx(Icon, {
382
+ icon: ExternalLinkIcon,
383
+ className: "ml-auto size-4 shrink-0 group-data-[collapsible=icon]:hidden"
384
+ })
385
+ ]
380
386
  }) : /* @__PURE__ */ jsxs(ctx.linkComponent, {
381
387
  ...getLinkProps(item.href || ""),
382
388
  onClick: handleNavigation,
383
389
  onMouseEnter: () => item.onPrefetch?.(),
384
- children: [item?.icon && /* @__PURE__ */ jsx(Icon, {
385
- icon: item.icon,
386
- className: "text-sidebar-primary transition-all duration-300"
387
- }), /* @__PURE__ */ jsx("span", { children: item.title })]
390
+ className: "flex min-w-0 items-center gap-2",
391
+ children: [
392
+ item?.icon && /* @__PURE__ */ jsx(Icon, {
393
+ icon: item.icon,
394
+ className: "text-sidebar-primary shrink-0 transition-all duration-300"
395
+ }),
396
+ /* @__PURE__ */ jsx("span", {
397
+ className: "min-w-0 truncate group-data-[collapsible=icon]:hidden",
398
+ children: item.title
399
+ }),
400
+ item.badge && /* @__PURE__ */ jsx("span", {
401
+ className: "group-data-[collapsible=icon]:hidden",
402
+ children: /* @__PURE__ */ jsx(NavBadge, { badge: item.badge })
403
+ })
404
+ ]
388
405
  })
389
406
  })
390
407
  })
@@ -396,12 +413,13 @@ function NavLeafItem({ item, level }) {
396
413
  //#region src/components/features/app-navigation/nav-menu/nav-menu.tsx
397
414
  function NavMenu({ ref, className, items, currentPath, linkComponent: LinkComp = "a", overrideState, itemClassName, activeItemClassName, disableTooltip, closeOnNavigation, ...props }) {
398
415
  const pathname = currentPath;
399
- const { state: sidebarState, isMobile, closeForNavigation, setOpen } = useSidebar();
416
+ const { state: sidebarState, isIconRail: sidebarIsIconRail, isMobile, closeForNavigation, setOpen } = useSidebar();
400
417
  const [openItems, setOpenItems] = useState({});
401
418
  const isInitialMount = useRef(true);
402
419
  const previousOpenItems = useRef({});
403
420
  const previousPathname = useRef(pathname);
404
421
  const state = overrideState ?? sidebarState;
422
+ const isIconRail = overrideState ? overrideState === "collapsed" : sidebarIsIconRail;
405
423
  const previousState = useRef(state);
406
424
  useEffect(() => {
407
425
  previousOpenItems.current = openItems;
@@ -443,6 +461,7 @@ function NavMenu({ ref, className, items, currentPath, linkComponent: LinkComp =
443
461
  const contextValue = useMemo(() => ({
444
462
  pathname,
445
463
  state,
464
+ isIconRail,
446
465
  isMobile,
447
466
  openItems,
448
467
  setOpenItems,
@@ -460,6 +479,7 @@ function NavMenu({ ref, className, items, currentPath, linkComponent: LinkComp =
460
479
  }), [
461
480
  pathname,
462
481
  state,
482
+ isIconRail,
463
483
  isMobile,
464
484
  openItems,
465
485
  setOpen,
@@ -540,37 +560,33 @@ function AppNavigation({ navItems, title, closeOnNavigation, defaultOpen, curren
540
560
  useEffect(() => {
541
561
  if (defaultOpen === false) setOpen(false);
542
562
  }, [defaultOpen, setOpen]);
543
- return /* @__PURE__ */ jsx(Sidebar, {
563
+ return /* @__PURE__ */ jsxs(Sidebar, {
544
564
  collapsible: props.collapsible ?? "offcanvas",
545
565
  ...props,
546
- children: /* @__PURE__ */ jsxs(SidebarContent, {
566
+ children: [/* @__PURE__ */ jsxs(SidebarContent, {
547
567
  className: "gap-0",
548
- children: [
549
- title && /* @__PURE__ */ jsx(SidebarHeader, {
550
- className: "px-4 pt-4 pb-0",
551
- children: title
552
- }),
553
- loading ? /* @__PURE__ */ jsx(SidebarGroup, {
554
- className: "mb-2 p-0! px-0",
555
- children: /* @__PURE__ */ jsx(SidebarGroupContent, {
556
- className: "flex flex-col gap-0 py-0",
557
- children: /* @__PURE__ */ jsx(NavSkeleton, {})
558
- })
559
- }) : navItems.length > 0 && /* @__PURE__ */ jsx(NavMenu, {
560
- className: "h-fit py-2",
561
- items: navItems,
562
- currentPath,
563
- linkComponent,
564
- closeOnNavigation,
565
- itemClassName,
566
- activeItemClassName
567
- }),
568
- props.collapsible !== "none" && /* @__PURE__ */ jsx(SidebarFooter, {
569
- className: "mt-auto p-2",
570
- children: /* @__PURE__ */ jsx(SidebarTrigger, {})
568
+ children: [title && /* @__PURE__ */ jsx(SidebarHeader, {
569
+ className: "px-4 pt-4 pb-0",
570
+ children: title
571
+ }), loading ? /* @__PURE__ */ jsx(SidebarGroup, {
572
+ className: "mb-2 p-0! px-0",
573
+ children: /* @__PURE__ */ jsx(SidebarGroupContent, {
574
+ className: "flex flex-col gap-0 py-0",
575
+ children: /* @__PURE__ */ jsx(NavSkeleton, {})
571
576
  })
572
- ]
573
- })
577
+ }) : navItems.length > 0 && /* @__PURE__ */ jsx(NavMenu, {
578
+ className: "h-fit py-2",
579
+ items: navItems,
580
+ currentPath,
581
+ linkComponent,
582
+ closeOnNavigation,
583
+ itemClassName,
584
+ activeItemClassName
585
+ })]
586
+ }), props.collapsible !== "none" && /* @__PURE__ */ jsx(SidebarFooter, {
587
+ className: "border-sidebar-border shrink-0 border-t p-2",
588
+ children: /* @__PURE__ */ jsx(SidebarTrigger, {})
589
+ })]
574
590
  });
575
591
  }
576
592
  //#endregion
@@ -1,2 +1,2 @@
1
- import { t as Autocomplete } from "../autocomplete-DM6JYV4W.mjs";
1
+ import { t as Autocomplete } from "../autocomplete-DZ_HSBak.mjs";
2
2
  export { Autocomplete };
@@ -1,5 +1,5 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
- import { t as ResponsivePopover } from "./responsive-popover-DJZgXWIE.mjs";
2
+ import { t as ResponsivePopover } from "./responsive-popover-C_1nzIvm.mjs";
3
3
  import { t as LoaderOverlay } from "./loader-overlay-DD94azZX.mjs";
4
4
  import { n as OptionList, t as useOptionPicker } from "./use-option-picker-s2bUYwXC.mjs";
5
5
  import { ChevronDown } from "lucide-react";
@@ -1,7 +1,7 @@
1
1
  import { t as cn } from "../utils-Bu32wN-x.mjs";
2
2
  import { t as Button } from "../button-A1qTjZ8U.mjs";
3
3
  import { t as Input } from "../input-j4tbmYYz.mjs";
4
- import { t as ResponsivePopover } from "../responsive-popover-DJZgXWIE.mjs";
4
+ import { t as ResponsivePopover } from "../responsive-popover-C_1nzIvm.mjs";
5
5
  import { t as Tooltip } from "../tooltip-C_SL1imw.mjs";
6
6
  import { n as OptionList, t as useOptionPicker } from "../use-option-picker-s2bUYwXC.mjs";
7
7
  import { AlertCircle, Loader2, X } from "lucide-react";
@@ -1,5 +1,5 @@
1
- import { o as DateRangePicker } from "./picker-b5-x-EHs.mjs";
2
1
  import { t as useDeprecationWarning } from "./use-deprecation-warning-DXrGc0jX.mjs";
2
+ import { a as DateRangePicker } from "./picker-raVuDxsh.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/features/calendar-date-picker/calendar-date-picker.tsx
5
5
  /**
@@ -7,8 +7,9 @@ interface SheetOverlayProps extends React.ComponentProps<typeof SheetPrimitive.O
7
7
  declare function SheetOverlay({ className, ...props }: SheetOverlayProps): React.JSX.Element;
8
8
  interface SheetContentProps extends React.ComponentProps<typeof SheetPrimitive.Content> {
9
9
  side?: 'top' | 'right' | 'bottom' | 'left';
10
+ showCloseButton?: boolean;
10
11
  }
11
- declare function SheetContent({ className, children, side, ...props }: SheetContentProps): React.JSX.Element;
12
+ declare function SheetContent({ className, children, side, showCloseButton, ...props }: SheetContentProps): React.JSX.Element;
12
13
  interface SheetComponent extends React.FC<React.ComponentProps<typeof ShadcnSheet>> {
13
14
  Trigger: typeof SheetTrigger;
14
15
  Content: typeof SheetContent;
@@ -4,6 +4,8 @@ declare const SIDEBAR_WIDTH_MOBILE = "18rem";
4
4
  declare const SIDEBAR_WIDTH_ICON = "3rem";
5
5
  interface SidebarContext {
6
6
  state: 'expanded' | 'collapsed';
7
+ /** True when the sidebar is width-collapsed (icon rail). */
8
+ isIconRail: boolean;
7
9
  open: boolean;
8
10
  setOpen: (open: boolean) => void;
9
11
  openMobile: boolean;
@@ -12,6 +14,7 @@ interface SidebarContext {
12
14
  toggleSidebar: () => void;
13
15
  handleMouseEnter: () => void;
14
16
  handleMouseLeave: () => void;
17
+ cancelHoverLeave: () => void;
15
18
  forceClose: () => void;
16
19
  closeForNavigation: () => void;
17
20
  hasSubLayout: boolean;
@@ -12,7 +12,7 @@ declare function SidebarRail({ className, ...props }: React.ComponentProps<'butt
12
12
  declare function SidebarInset({ className, ...props }: React.ComponentProps<'main'>): React.JSX.Element;
13
13
  declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
14
14
  declare function SidebarHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
15
- declare function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
15
+ declare function SidebarFooter({ className, onMouseEnter, onMouseLeave, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
16
16
  declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
17
- declare function SidebarContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
17
+ declare function SidebarContent({ className, onMouseEnter, onMouseLeave, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
18
18
  export { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInput, SidebarInset, SidebarRail, SidebarSeparator, SidebarTrigger, };
@@ -1,4 +1,4 @@
1
1
  export { findItemByHref, hasActiveDescendant, isNavItemActive, normalizePath, } from './active-path';
2
2
  export { NavMenu } from './nav-menu';
3
3
  export { NavMenuItem } from './nav-menu-item';
4
- export type { NavItem } from './types';
4
+ export type { NavItem, NavItemBadge } from './types';
@@ -11,6 +11,10 @@ export interface NavMenuContextValue {
11
11
  pathname: string;
12
12
  /** Resolved sidebar state (override wins over the sidebar provider). */
13
13
  state: 'expanded' | 'collapsed';
14
+ /**
15
+ * True when the sidebar is in icon-rail (collapsed) mode.
16
+ */
17
+ isIconRail: boolean;
14
18
  isMobile: boolean;
15
19
  openItems: Record<string, boolean>;
16
20
  setOpenItems: Dispatch<SetStateAction<Record<string, boolean>>>;
@@ -5,6 +5,9 @@ declare function itemKeyOf(item: NavItem, level: number): string;
5
5
  * Recursive nav row. Dispatches to the correct presentational part based on the
6
6
  * item type and the current sidebar state, and renders itself for children.
7
7
  * Memoized so unchanged subtrees skip re-rendering when their props are stable.
8
+ *
9
+ * Items with children use {@link NavCollapsibleItem}. Section headers use
10
+ * {@link NavGroup} (always open, no dropdown).
8
11
  */
9
12
  export declare const NavMenuItem: import("react").MemoExoticComponent<({ item, level }: {
10
13
  item: NavItem;
@@ -1,4 +1,18 @@
1
1
  import type { LucideIcon } from 'lucide-react';
2
+ import type { BadgeProps } from '../../../base/badge';
3
+ /**
4
+ * Declarative status chip rendered inline after a nav item title
5
+ * (Cloudflare-style dashed pill: "Beta", "New", "Soon").
6
+ * Data-only so hosts/plugins never pass React nodes into the sidebar.
7
+ *
8
+ * `type` / `theme` are retained for API compatibility but unused — nav chips
9
+ * always use the shared dashed-pill treatment.
10
+ */
11
+ export interface NavItemBadge {
12
+ label: string;
13
+ type?: BadgeProps['type'];
14
+ theme?: BadgeProps['theme'];
15
+ }
2
16
  export interface NavItem {
3
17
  title: string;
4
18
  href: string | null;
@@ -11,6 +25,10 @@ export interface NavItem {
11
25
  hidden?: boolean;
12
26
  showSeparatorAbove?: boolean;
13
27
  showSeparatorBelow?: boolean;
28
+ /** Optional status badge (e.g. "Coming soon", "Beta"). */
29
+ badge?: NavItemBadge;
30
+ /** Soften label/icon color (e.g. planned services) without disabling the link. */
31
+ muted?: boolean;
14
32
  excludePaths?: string[];
15
33
  tabChildLinks?: string[];
16
34
  /** Called when the user hovers over the link (e.g. to prefetch route data). */
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { DateTimeProps } from './types';
3
+ /**
4
+ * Date display with the shared Datum hover tooltip (UTC, local zone, relative, epoch).
5
+ */
6
+ export declare function DateTime({ date, variant, format, addSuffix, tooltip, timezone, disableTimezone, className, separator, timestamp, children, }: DateTimeProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null;
@@ -0,0 +1,13 @@
1
+ import type { FormatterOptions } from './types';
2
+ /** e.g. "June 12th at 11:30 AM" — used for absolute / table dates. */
3
+ export declare const DEFAULT_DATE_FORMAT = "MMMM do 'at' h:mm a";
4
+ export declare function getBrowserTimezone(): string;
5
+ export declare function parseDate(date: string | Date): Date | null;
6
+ export declare function formatAbsoluteDate(date: Date, options: FormatterOptions): string;
7
+ export declare function formatRelativeDate(date: Date, options: FormatterOptions): string;
8
+ export declare function getTimezoneAbbreviation(date: Date, timezone: string): string;
9
+ export declare function formatCombinedDate(date: Date, options: FormatterOptions, separator?: string): string;
10
+ export declare function formatUTCDate(date: Date, format?: string): string;
11
+ export declare function formatTimezoneDate(date: Date, timezone: string, format?: string): string;
12
+ /** Microseconds since epoch, matching the Datum DateTime tooltip. */
13
+ export declare function getTimestamp(date: Date): string;