@datum-cloud/datum-ui 0.3.0-alpha.3670fb2 → 0.3.0-alpha.7487874

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 (132) hide show
  1. package/dist/app-navigation/index.mjs +12 -0
  2. package/dist/app-navigation-CCvjPijd.mjs +416 -0
  3. package/dist/autocomplete/index.mjs +1 -1
  4. package/dist/{autocomplete-B9bCkXtz.mjs → autocomplete-DcKO7pj5.mjs} +1 -1
  5. package/dist/avatar-stack/index.mjs +2 -2
  6. package/dist/{avatar-stack-Bh-tLz0X.mjs → avatar-stack-B21McFeb.mjs} +1 -1
  7. package/dist/{calendar-date-picker-mlbzp3xR.mjs → calendar-date-picker-Bw6Mrr-P.mjs} +2 -1
  8. package/dist/components/base/index.d.ts +1 -0
  9. package/dist/components/base/index.d.ts.map +1 -1
  10. package/dist/components/base/sidebar/index.d.ts +2 -0
  11. package/dist/components/base/sidebar/index.d.ts.map +1 -0
  12. package/dist/components/{features → base}/sidebar/sidebar.d.ts +1 -1
  13. package/dist/components/base/sidebar/sidebar.d.ts.map +1 -0
  14. package/dist/components/base/skeleton/index.d.ts +1 -1
  15. package/dist/components/base/skeleton/index.d.ts.map +1 -1
  16. package/dist/components/base/skeleton/skeleton.d.ts +22 -0
  17. package/dist/components/base/skeleton/skeleton.d.ts.map +1 -0
  18. package/dist/components/base/typography/typography.d.ts +2 -2
  19. package/dist/components/features/app-navigation/app-navigation.d.ts +14 -0
  20. package/dist/components/features/app-navigation/app-navigation.d.ts.map +1 -0
  21. package/dist/components/features/app-navigation/index.d.ts +4 -0
  22. package/dist/components/features/app-navigation/index.d.ts.map +1 -0
  23. package/dist/components/features/{sidebar/nav-main.d.ts → app-navigation/nav-menu.d.ts} +3 -3
  24. package/dist/components/features/app-navigation/nav-menu.d.ts.map +1 -0
  25. package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts +2 -1
  26. package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts.map +1 -1
  27. package/dist/components/features/data-table/components/active-filters.d.ts +1 -1
  28. package/dist/components/features/data-table/components/active-filters.d.ts.map +1 -1
  29. package/dist/components/features/data-table/components/loading.d.ts.map +1 -1
  30. package/dist/components/features/data-table/components/search.d.ts +1 -1
  31. package/dist/components/features/data-table/components/search.d.ts.map +1 -1
  32. package/dist/components/features/data-table/core/client-provider.d.ts +6 -7
  33. package/dist/components/features/data-table/core/client-provider.d.ts.map +1 -1
  34. package/dist/components/features/data-table/core/data-table-context.d.ts +14 -0
  35. package/dist/components/features/data-table/core/data-table-context.d.ts.map +1 -1
  36. package/dist/components/features/data-table/core/filter-engine.d.ts +5 -0
  37. package/dist/components/features/data-table/core/filter-engine.d.ts.map +1 -1
  38. package/dist/components/features/data-table/core/server-provider.d.ts +6 -7
  39. package/dist/components/features/data-table/core/server-provider.d.ts.map +1 -1
  40. package/dist/components/features/data-table/core/store.d.ts.map +1 -1
  41. package/dist/components/features/data-table/data-table.d.ts +1 -1
  42. package/dist/components/features/data-table/filters/checkbox-filter.d.ts +1 -1
  43. package/dist/components/features/data-table/filters/checkbox-filter.d.ts.map +1 -1
  44. package/dist/components/features/data-table/filters/date-picker-filter.d.ts +1 -1
  45. package/dist/components/features/data-table/filters/date-picker-filter.d.ts.map +1 -1
  46. package/dist/components/features/data-table/filters/select-filter.d.ts +1 -1
  47. package/dist/components/features/data-table/filters/select-filter.d.ts.map +1 -1
  48. package/dist/components/features/data-table/hooks/index.d.ts +1 -1
  49. package/dist/components/features/data-table/hooks/index.d.ts.map +1 -1
  50. package/dist/components/features/data-table/hooks/use-data-table-client.d.ts +2 -15
  51. package/dist/components/features/data-table/hooks/use-data-table-client.d.ts.map +1 -1
  52. package/dist/components/features/data-table/hooks/use-data-table-server.d.ts +2 -25
  53. package/dist/components/features/data-table/hooks/use-data-table-server.d.ts.map +1 -1
  54. package/dist/components/features/data-table/hooks/use-is-client.d.ts +8 -0
  55. package/dist/components/features/data-table/hooks/use-is-client.d.ts.map +1 -0
  56. package/dist/components/features/data-table/hooks/use-selectors.d.ts +4 -35
  57. package/dist/components/features/data-table/hooks/use-selectors.d.ts.map +1 -1
  58. package/dist/components/features/data-table/index.d.ts +2 -4
  59. package/dist/components/features/data-table/index.d.ts.map +1 -1
  60. package/dist/components/features/data-table/types.d.ts +23 -30
  61. package/dist/components/features/data-table/types.d.ts.map +1 -1
  62. package/dist/components/features/index.d.ts +1 -1
  63. package/dist/components/features/index.d.ts.map +1 -1
  64. package/dist/data-table/index.mjs +395 -363
  65. package/dist/date-picker/index.mjs +2 -2
  66. package/dist/dropdown/index.mjs +1 -1
  67. package/dist/dropzone/index.mjs +1 -1
  68. package/dist/empty-content/index.mjs +1 -1
  69. package/dist/form/index.mjs +3 -3
  70. package/dist/grid/index.mjs +1 -1
  71. package/dist/hooks/index.mjs +2 -2
  72. package/dist/index.mjs +34 -32
  73. package/dist/input-number/index.mjs +1 -1
  74. package/dist/input-with-addons/index.mjs +1 -1
  75. package/dist/loader-overlay/index.mjs +1 -1
  76. package/dist/map/index.mjs +1 -1
  77. package/dist/{map-ClJD-qxm.mjs → map-2RG9pYZR.mjs} +1 -1
  78. package/dist/more-actions/index.mjs +2 -2
  79. package/dist/{more-actions-DbC8dyed.mjs → more-actions-BODYgG1C.mjs} +2 -2
  80. package/dist/page-title/index.mjs +1 -1
  81. package/dist/sidebar/index.mjs +4 -5
  82. package/dist/{sidebar-C4NqSr4r.mjs → sidebar-BW76ss_f.mjs} +6 -415
  83. package/dist/skeleton/index.mjs +2 -1
  84. package/dist/skeleton-DZ31pU4B.mjs +28 -0
  85. package/dist/stepper/index.mjs +1 -1
  86. package/dist/styles/root.css +3 -0
  87. package/dist/switch/index.mjs +1 -1
  88. package/dist/table/index.mjs +1 -1
  89. package/dist/tabs/index.mjs +1 -1
  90. package/dist/tag-input/index.mjs +1 -1
  91. package/dist/task-queue/index.mjs +3 -3
  92. package/dist/{task-queue-dropdown-fo3TX58Q.mjs → task-queue-dropdown-DtS0IKci.mjs} +3 -3
  93. package/dist/textarea/index.mjs +1 -1
  94. package/dist/theme/index.mjs +1 -1
  95. package/dist/toast/index.mjs +1 -1
  96. package/dist/tooltip/index.mjs +1 -1
  97. package/dist/typography/index.mjs +1 -1
  98. package/dist/{use-copy-to-clipboard-C7xqNxBX.mjs → use-copy-to-clipboard-C9cT2Qb-.mjs} +1 -1
  99. package/dist/{use-stepper-CB1injte.mjs → use-stepper-DJd8o9dV.mjs} +8 -8
  100. package/dist/visually-hidden/index.mjs +1 -1
  101. package/package.json +85 -79
  102. package/dist/components/features/data-table/hooks/use-data-table-context.d.ts +0 -2
  103. package/dist/components/features/data-table/hooks/use-data-table-context.d.ts.map +0 -1
  104. package/dist/components/features/sidebar/app-sidebar.d.ts +0 -14
  105. package/dist/components/features/sidebar/app-sidebar.d.ts.map +0 -1
  106. package/dist/components/features/sidebar/index.d.ts +0 -4
  107. package/dist/components/features/sidebar/index.d.ts.map +0 -1
  108. package/dist/components/features/sidebar/nav-main.d.ts.map +0 -1
  109. package/dist/components/features/sidebar/sidebar.d.ts.map +0 -1
  110. /package/dist/{col-RfO7d6AR.mjs → col-DCneNxQj.mjs} +0 -0
  111. /package/dist/{dropdown-Cs7Xr8w7.mjs → dropdown-Dgm_b6Mm.mjs} +0 -0
  112. /package/dist/{dropzone-BT5fEDEF.mjs → dropzone-DR6O9OdU.mjs} +0 -0
  113. /package/dist/{empty-content-iDu3NUqG.mjs → empty-content-Dm7_5jO9.mjs} +0 -0
  114. /package/dist/{input-number-D9ydFith.mjs → input-number-D1HCcTXO.mjs} +0 -0
  115. /package/dist/{input-with-addons-CdgiUQce.mjs → input-with-addons-DN9LGwUU.mjs} +0 -0
  116. /package/dist/{loader-overlay-D83QeQNj.mjs → loader-overlay-CpA0zV8D.mjs} +0 -0
  117. /package/dist/{map-leaflet-imports-CdzvEnzY.mjs → map-leaflet-imports-CgEyVRnp.mjs} +0 -0
  118. /package/dist/{page-title-SGchAF6Y.mjs → page-title-D62FV6vD.mjs} +0 -0
  119. /package/dist/{skeleton-Cs6Q5GQc.mjs → skeleton-CkE23wsL.mjs} +0 -0
  120. /package/dist/{stepper-BG9DIzN5.mjs → stepper-CZeks9Ex.mjs} +0 -0
  121. /package/dist/{switch-B2VVauH6.mjs → switch-Cn9IM2gC.mjs} +0 -0
  122. /package/dist/{table-Dc3HfbM4.mjs → table-Dpzh0VPK.mjs} +0 -0
  123. /package/dist/{tabs-Ccb4uqbe.mjs → tabs-OYVCDOif.mjs} +0 -0
  124. /package/dist/{tag-input-BfHaKoMF.mjs → tag-input-DorFQ9bA.mjs} +0 -0
  125. /package/dist/{textarea-X4OjkqLJ.mjs → textarea-KZUKGHlO.mjs} +0 -0
  126. /package/dist/{theme.provider-Nun_O9-O.mjs → theme.provider-BG3cS9xe.mjs} +0 -0
  127. /package/dist/{to-api-format-zI26rEBI.mjs → to-api-format-CzPt5UAX.mjs} +0 -0
  128. /package/dist/{tooltip-DZFG1iMs.mjs → tooltip-U3XxlW4l.mjs} +0 -0
  129. /package/dist/{typography-T7WgvO77.mjs → typography-DdrxIJMd.mjs} +0 -0
  130. /package/dist/{use-debounce-Ctljs3MB.mjs → use-debounce-Dc95PFRX.mjs} +0 -0
  131. /package/dist/{use-toast-DN-fZBzJ.mjs → use-toast-DBmysDS6.mjs} +0 -0
  132. /package/dist/{visuallyhidden-CgkVhApW.mjs → visuallyhidden-CfBnXfvh.mjs} +0 -0
@@ -2,425 +2,16 @@ import { t as cn } from "./cn-DWCc1QRE.mjs";
2
2
  import { t as Separator } from "./separator-T2ppyD-8.mjs";
3
3
  import { t as Button } from "./button-AzpnV-WB.mjs";
4
4
  import { t as Icon } from "./icon-wrapper-9ticVbRL.mjs";
5
- import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "./collapsible-Bt9UYfv3.mjs";
6
5
  import { t as Input } from "./input-fzXBheCN.mjs";
7
6
  import { a as SheetHeader, n as SheetContent, o as SheetTitle, r as SheetDescription, t as Sheet } from "./sheet-Cemwh78x.mjs";
8
- import { t as Skeleton } from "./skeleton-Cs6Q5GQc.mjs";
9
- import { i as TooltipProvider, t as Tooltip } from "./tooltip-DZFG1iMs.mjs";
7
+ import { t as Skeleton } from "./skeleton-CkE23wsL.mjs";
8
+ import { i as TooltipProvider, t as Tooltip } from "./tooltip-U3XxlW4l.mjs";
10
9
  import { cva } from "class-variance-authority";
11
- import { ChevronRight, ExternalLinkIcon, PanelLeftCloseIcon, PanelLeftOpenIcon } from "lucide-react";
10
+ import { PanelLeftCloseIcon, PanelLeftOpenIcon } from "lucide-react";
12
11
  import * as React$1 from "react";
13
- import { Fragment, useCallback, useEffect, useRef, useState } from "react";
14
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
15
13
  import { Slot } from "@radix-ui/react-slot";
16
- import { motion } from "motion/react";
17
14
 
18
- //#region src/components/features/sidebar/nav-main.tsx
19
- const NAV_STYLES = {
20
- menuButton: "rounded-xl h-8 font-normal text-xs transition-all px-2 py-1 data-[active=true]:bg-sidebar data-[active=true]:text-foreground data-[active=true]:text-sidebar-primary data-[active=true]:[&>svg]:text-primary hover:bg-sidebar hover:text-sidebar-primary hover:[&>svg]:text-sidebar-primary hover:bg-sidebar-accent data-[active=true]:bg-sidebar-accent hover:font-semibold data-[active=true]:hover:[&>svg]:text-sidebar-primary transition-colors duration-300 gap-2.5 text-foreground [&>svg]:text-icon-primary",
21
- disabled: "pointer-events-none opacity-50",
22
- icon: "duration-300 transition-all",
23
- iconSmall: "size-4 duration-300 transition-all"
24
- };
25
- function NavIcon({ icon: IconComponent, className, size = "default" }) {
26
- if (!IconComponent) return null;
27
- return /* @__PURE__ */ jsx(Icon, {
28
- icon: IconComponent,
29
- className: cn(size === "small" ? NAV_STYLES.iconSmall : NAV_STYLES.icon, className)
30
- });
31
- }
32
- NavIcon.displayName = "NavIcon";
33
- function NavSidebarMenuButton({ ref, item, isActive, disableTooltip, className, children, asChild, ...props }) {
34
- return /* @__PURE__ */ jsx(SidebarMenuButton, {
35
- ref,
36
- tooltip: disableTooltip ? void 0 : item.title,
37
- isActive,
38
- disabled: item.disabled,
39
- asChild,
40
- className: cn(NAV_STYLES.menuButton, item.disabled && NAV_STYLES.disabled, className),
41
- ...props,
42
- children: asChild ? children : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(NavIcon, { icon: item.icon }), children] })
43
- });
44
- }
45
- NavSidebarMenuButton.displayName = "NavSidebarMenuButton";
46
- function NavMain({ ref, className, items, currentPath, linkComponent: LinkComp = "a", overrideState, itemClassName, disableTooltip, closeOnNavigation, ...props }) {
47
- const pathname = currentPath;
48
- const { state: sidebarState, isMobile, closeForNavigation, setOpen } = useSidebar();
49
- const [openItems, setOpenItems] = useState({});
50
- const isInitialMount = useRef(true);
51
- const previousOpenItems = useRef({});
52
- const previousPathname = useRef(pathname);
53
- const state = overrideState ?? sidebarState;
54
- const previousState = useRef(state);
55
- useEffect(() => {
56
- previousOpenItems.current = openItems;
57
- if (isInitialMount.current) isInitialMount.current = false;
58
- }, [openItems]);
59
- useEffect(() => {
60
- previousPathname.current = pathname;
61
- }, [pathname]);
62
- const activeNavItem = useCallback((item) => {
63
- const normalize = (p) => {
64
- let result = p.startsWith("/") ? p : `/${p}`;
65
- if (result !== "/" && result.endsWith("/")) result = result.slice(0, -1);
66
- return result;
67
- };
68
- const cleanCurrentPath = normalize(pathname);
69
- if (!item.href) return false;
70
- const cleanNavPath = normalize(item.href);
71
- if (cleanNavPath === "/") return cleanCurrentPath === "/";
72
- const hasActiveDescendant = (navItem) => {
73
- if (!navItem.children || navItem.children.length === 0) return false;
74
- return navItem.children.some((child) => {
75
- if (!child.href) return hasActiveDescendant(child);
76
- const cleanChildPath = normalize(child.href);
77
- if (cleanCurrentPath === cleanChildPath || cleanCurrentPath.startsWith(`${cleanChildPath}/`)) return true;
78
- return hasActiveDescendant(child);
79
- });
80
- };
81
- if ((item.children || []).length > 0) {
82
- if (hasActiveDescendant(item)) return false;
83
- return cleanCurrentPath === cleanNavPath;
84
- }
85
- const isExcluded = item.excludePaths?.some((excludePath) => {
86
- const cleanExcludePath = normalize(excludePath);
87
- return cleanCurrentPath === cleanExcludePath || cleanCurrentPath.startsWith(`${cleanExcludePath}/`);
88
- }) ?? false;
89
- const isDirectMatch = cleanCurrentPath === cleanNavPath || !isExcluded && cleanCurrentPath.startsWith(`${cleanNavPath}/`);
90
- const isTabChildMatch = item.tabChildLinks?.some((childPath) => {
91
- const cleanChildPath = normalize(childPath);
92
- return cleanCurrentPath === cleanChildPath || cleanCurrentPath.startsWith(`${cleanChildPath}/`);
93
- }) ?? false;
94
- return isDirectMatch || isTabChildMatch;
95
- }, [pathname]);
96
- const hasActiveDescendant = useCallback((item) => {
97
- if (activeNavItem(item)) return true;
98
- if (item.children) return item.children.some((child) => hasActiveDescendant(child));
99
- return false;
100
- }, [activeNavItem]);
101
- const findItemByHref = useCallback((href, items) => {
102
- for (const item of items) {
103
- if (item.href === href) return item;
104
- if (item.children) {
105
- const found = findItemByHref(href, item.children);
106
- if (found) return found;
107
- }
108
- }
109
- return null;
110
- }, []);
111
- useEffect(() => {
112
- if (previousState.current === "expanded" && state === "collapsed") setOpenItems((prev) => {
113
- const newOpenItems = {};
114
- Object.keys(prev).forEach((itemHref) => {
115
- const item = findItemByHref(itemHref, items);
116
- if (item && hasActiveDescendant(item)) newOpenItems[itemHref] = true;
117
- });
118
- return newOpenItems;
119
- });
120
- previousState.current = state;
121
- }, [
122
- state,
123
- items,
124
- hasActiveDescendant,
125
- findItemByHref
126
- ]);
127
- const toggleItem = (itemId) => {
128
- setOpenItems((prev) => ({
129
- ...prev,
130
- [itemId]: !prev[itemId]
131
- }));
132
- };
133
- const handleNavigation = useCallback(() => {
134
- if (closeOnNavigation && !isMobile) closeForNavigation();
135
- }, [
136
- closeOnNavigation,
137
- isMobile,
138
- closeForNavigation
139
- ]);
140
- const renderNavItem = (item, level = 0) => {
141
- if ("hidden" in item && item.hidden) return null;
142
- const itemKey = `${item.title}-${item.href || ""}-${level}`;
143
- if ("type" in item && item.type === "group") return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(SidebarGroup, {
144
- className: "mb-2 p-0! px-2",
145
- children: [item.title && /* @__PURE__ */ jsx(SidebarGroupLabel, {
146
- className: "lowercase group-data-[state=collapsed]:hidden first-letter:uppercase",
147
- children: item.title
148
- }), /* @__PURE__ */ jsx(SidebarGroupContent, {
149
- className: "flex flex-col gap-1",
150
- children: (item.children || []).map((child) => renderNavItem(child, level + 1))
151
- })]
152
- }), /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2 hidden group-data-[state=collapsed]:block" })] }, itemKey);
153
- const isActive = activeNavItem(item);
154
- const pathnameExistInDropdowns = item.children?.filter((dropdownItem) => pathname.includes(dropdownItem.href)) || [];
155
- const hasChildren = (item.children || []).length > 0;
156
- const isOpen = openItems[item.href] !== void 0 ? openItems[item.href] : Boolean(pathnameExistInDropdowns.length);
157
- const hasActiveChild = pathnameExistInDropdowns.length > 0;
158
- if (state === "collapsed" && !isMobile && level <= 2 && hasChildren) return /* @__PURE__ */ jsxs(Fragment, { children: [
159
- item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-1" }),
160
- /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsxs("div", {
161
- className: "flex flex-col px-2",
162
- children: [/* @__PURE__ */ jsx(NavSidebarMenuButton, {
163
- item,
164
- isActive,
165
- disableTooltip,
166
- className: itemClassName,
167
- onClick: () => {
168
- setOpen(true);
169
- if (item.href) setOpenItems((prev) => ({
170
- ...prev,
171
- [item.href]: true
172
- }));
173
- }
174
- }), hasActiveChild && /* @__PURE__ */ jsx(motion.div, {
175
- variants: {
176
- hidden: { opacity: 0 },
177
- visible: {
178
- opacity: 1,
179
- transition: {
180
- staggerChildren: .05,
181
- delayChildren: .1
182
- }
183
- }
184
- },
185
- initial: "hidden",
186
- animate: "visible",
187
- className: "flex flex-col gap-0.5",
188
- children: item.children?.map((subItem) => {
189
- const isSubItemActive = activeNavItem(subItem);
190
- return /* @__PURE__ */ jsx(motion.div, {
191
- variants: {
192
- hidden: { opacity: 0 },
193
- visible: {
194
- opacity: 1,
195
- transition: {
196
- duration: .2,
197
- ease: "easeOut"
198
- }
199
- }
200
- },
201
- children: /* @__PURE__ */ jsx(SidebarMenuButton, {
202
- tooltip: subItem.title,
203
- isActive: isSubItemActive,
204
- className: "h-6 p-0 group-data-[collapsible=icon]:h-6! group-data-[collapsible=icon]:p-0!",
205
- asChild: true,
206
- children: /* @__PURE__ */ jsx(LinkComp, {
207
- className: "flex items-center justify-center",
208
- ...LinkComp === "a" ? { href: subItem.href || "" } : { to: subItem.href || "" },
209
- onClick: () => {
210
- handleNavigation();
211
- },
212
- children: /* @__PURE__ */ jsx("span", { className: cn("size-1 rounded-full", isSubItemActive ? "bg-primary" : "bg-sidebar-primary-foreground") })
213
- })
214
- })
215
- }, `collapsed-dot-${subItem.href}-${level}`);
216
- })
217
- })]
218
- }) }),
219
- item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
220
- ] }, itemKey);
221
- if (hasChildren && level <= 3) return /* @__PURE__ */ jsxs(Fragment, { children: [
222
- item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
223
- /* @__PURE__ */ jsx(SidebarMenu, {
224
- className: "px-2",
225
- children: /* @__PURE__ */ jsx(Collapsible, {
226
- asChild: true,
227
- open: isOpen,
228
- onOpenChange: (open) => {
229
- if (item.href) setOpenItems((prev) => ({
230
- ...prev,
231
- [item.href]: open
232
- }));
233
- },
234
- className: "group/collapsible",
235
- children: /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [/* @__PURE__ */ jsx(CollapsibleTrigger, {
236
- asChild: true,
237
- className: "w-full",
238
- children: /* @__PURE__ */ jsxs(NavSidebarMenuButton, {
239
- item,
240
- isActive,
241
- disableTooltip,
242
- className: itemClassName,
243
- children: [/* @__PURE__ */ jsx("span", { children: item.title }), /* @__PURE__ */ jsx(Icon, {
244
- icon: ChevronRight,
245
- className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
246
- })]
247
- })
248
- }), /* @__PURE__ */ jsx(CollapsibleContent, {
249
- className: "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden",
250
- children: /* @__PURE__ */ jsx("div", {
251
- style: {
252
- minHeight: 0,
253
- overflow: "hidden"
254
- },
255
- children: /* @__PURE__ */ jsx(motion.div, {
256
- variants: {
257
- hidden: { opacity: 0 },
258
- visible: {
259
- opacity: 1,
260
- transition: {
261
- staggerChildren: .05,
262
- delayChildren: .1
263
- }
264
- }
265
- },
266
- initial: isInitialMount.current || previousOpenItems.current[item.href] === openItems[item.href] && previousState.current === state && previousPathname.current === pathname && !hasActiveChild ? "visible" : "hidden",
267
- animate: isOpen ? "visible" : "hidden",
268
- children: /* @__PURE__ */ jsx(SidebarMenuSub, {
269
- className: cn(level >= 1 ? "mr-0 pr-[.1rem]" : "", level === 2 ? "pl-4" : "", level === 3 ? "pl-6" : "", "mr-0 gap-0.5 pr-0"),
270
- children: item.children?.map((subItem, index) => /* @__PURE__ */ jsx(motion.div, {
271
- variants: {
272
- hidden: { opacity: 0 },
273
- visible: {
274
- opacity: 1,
275
- transition: {
276
- duration: .2,
277
- ease: "easeOut"
278
- }
279
- }
280
- },
281
- children: renderNavItem(subItem, level + 1)
282
- }, `${subItem.href}-${level}-${index}`))
283
- })
284
- }, `collapsible-${item.href}-${isOpen}`)
285
- })
286
- })] })
287
- }, `collapsed-item-drop-down-item-${item.title}-${level}`)
288
- }),
289
- item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
290
- ] }, itemKey);
291
- const renderCollapsible = (currentItem, currentLevel) => {
292
- const currentItemIsActive = activeNavItem(currentItem);
293
- const currentItemPathnameExistInDropdowns = currentItem.children?.filter((dropdownItem) => pathname.includes(dropdownItem.href)) || [];
294
- return /* @__PURE__ */ jsx(Collapsible, {
295
- asChild: true,
296
- open: openItems[currentItem.href] || Boolean(currentItemPathnameExistInDropdowns.length),
297
- onOpenChange: (open) => {
298
- if (currentItem.href) setOpenItems((prev) => ({
299
- ...prev,
300
- [currentItem.href]: open
301
- }));
302
- },
303
- className: "group/collapsible",
304
- children: /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [/* @__PURE__ */ jsx(CollapsibleTrigger, {
305
- asChild: true,
306
- className: "w-full",
307
- children: /* @__PURE__ */ jsxs(NavSidebarMenuButton, {
308
- item: currentItem,
309
- isActive: currentItemIsActive,
310
- disableTooltip,
311
- className: itemClassName,
312
- children: [/* @__PURE__ */ jsx("span", { children: currentItem.title }), /* @__PURE__ */ jsx(Icon, {
313
- icon: ChevronRight,
314
- className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
315
- })]
316
- })
317
- }), /* @__PURE__ */ jsx(CollapsibleContent, {
318
- className: "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up overflow-hidden",
319
- children: /* @__PURE__ */ jsx("div", {
320
- style: {
321
- minHeight: 0,
322
- overflow: "hidden"
323
- },
324
- children: /* @__PURE__ */ jsx(SidebarMenuSub, {
325
- className: cn(currentLevel >= 1 ? "mr-0 pr-[.1rem]" : "", "gap-0.5"),
326
- children: currentItem.children?.map((subItem) => renderNavItem(subItem, currentLevel + 1))
327
- })
328
- })
329
- })] }, `collapsible-sidebar-${currentItem.title}-${currentLevel}`)
330
- }, `collapsed-item-drop-down-item-${currentItem.title}-${currentLevel}`);
331
- };
332
- if (level <= 2 && hasChildren) return /* @__PURE__ */ jsxs(Fragment, { children: [
333
- item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
334
- /* @__PURE__ */ jsx(SidebarMenu, {
335
- className: "px-2",
336
- children: renderCollapsible(item, level)
337
- }),
338
- item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
339
- ] }, itemKey);
340
- return /* @__PURE__ */ jsxs(Fragment, { children: [
341
- item.showSeparatorAbove && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" }),
342
- /* @__PURE__ */ jsx(SidebarMenu, {
343
- className: cn(`level_${level} px-2`),
344
- children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(NavSidebarMenuButton, {
345
- asChild: true,
346
- item,
347
- isActive: isActive && !hasActiveChild,
348
- disableTooltip,
349
- onClick: () => hasChildren && toggleItem(item.href),
350
- className: cn(level >= 1 && "h-6", itemClassName),
351
- children: item.type === "externalLink" ? /* @__PURE__ */ jsxs("a", {
352
- href: item.href || "",
353
- target: "_blank",
354
- rel: "noopener noreferrer",
355
- className: "flex items-center justify-between",
356
- children: [/* @__PURE__ */ jsxs("div", {
357
- className: "flex items-center gap-2",
358
- children: [item?.icon && /* @__PURE__ */ jsx(Icon, {
359
- icon: item.icon,
360
- className: "size-4 transition-all duration-300"
361
- }), /* @__PURE__ */ jsx("span", { children: item.title })]
362
- }), /* @__PURE__ */ jsx(Icon, {
363
- icon: ExternalLinkIcon,
364
- className: "ml-auto size-4"
365
- })]
366
- }) : /* @__PURE__ */ jsxs(LinkComp, {
367
- ...LinkComp === "a" ? { href: item.href || "" } : { to: item.href || "" },
368
- onClick: handleNavigation,
369
- onMouseEnter: () => item.onPrefetch?.(),
370
- children: [item?.icon && /* @__PURE__ */ jsx(Icon, {
371
- icon: item.icon,
372
- className: "text-sidebar-primary transition-all duration-300"
373
- }), /* @__PURE__ */ jsx("span", { children: item.title })]
374
- })
375
- }) })
376
- }),
377
- item.showSeparatorBelow && /* @__PURE__ */ jsx(SidebarSeparator, { className: "my-2" })
378
- ] }, itemKey);
379
- };
380
- return /* @__PURE__ */ jsx("ul", {
381
- ref,
382
- "data-sidebar": "menu",
383
- className: cn("flex h-full w-full min-w-0 flex-col gap-0.5 py-2", className),
384
- ...props,
385
- children: (items || []).map((item) => renderNavItem(item))
386
- });
387
- }
388
- NavMain.displayName = "NavMain";
389
-
390
- //#endregion
391
- //#region src/components/features/sidebar/app-sidebar.tsx
392
- function AppSidebar({ navItems, title, closeOnNavigation, defaultOpen, currentPath, linkComponent, ...props }) {
393
- const { setOpen } = useSidebar();
394
- useEffect(() => {
395
- if (defaultOpen === false) setOpen(false);
396
- }, [defaultOpen, setOpen]);
397
- return /* @__PURE__ */ jsx(Sidebar, {
398
- collapsible: props.collapsible ?? "offcanvas",
399
- ...props,
400
- children: /* @__PURE__ */ jsxs(SidebarContent, {
401
- className: "gap-0",
402
- children: [
403
- title && /* @__PURE__ */ jsx(SidebarHeader, {
404
- className: "px-4 pt-4 pb-0",
405
- children: title
406
- }),
407
- navItems.length > 0 && /* @__PURE__ */ jsx(NavMain, {
408
- className: "h-fit py-2",
409
- items: navItems,
410
- currentPath,
411
- linkComponent,
412
- closeOnNavigation
413
- }),
414
- props.collapsible !== "none" && /* @__PURE__ */ jsx(SidebarFooter, {
415
- className: "mt-auto p-2",
416
- children: /* @__PURE__ */ jsx(SidebarTrigger, {})
417
- })
418
- ]
419
- })
420
- });
421
- }
422
-
423
- //#endregion
424
15
  //#region ../shadcn/hooks/use-mobile.ts
425
16
  const MOBILE_BREAKPOINT = 768;
426
17
  function useIsMobile() {
@@ -438,7 +29,7 @@ function useIsMobile() {
438
29
  }
439
30
 
440
31
  //#endregion
441
- //#region src/components/features/sidebar/sidebar.tsx
32
+ //#region src/components/base/sidebar/sidebar.tsx
442
33
  const SIDEBAR_COOKIE_NAME = "sidebar_state";
443
34
  const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
444
35
  const SIDEBAR_WIDTH = "13rem";
@@ -942,4 +533,4 @@ function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false,
942
533
  }
943
534
 
944
535
  //#endregion
945
- export { SidebarTrigger as C, NavMain as E, SidebarSeparator as S, AppSidebar as T, SidebarMenuSub as _, SidebarGroupAction as a, SidebarProvider as b, SidebarHeader as c, SidebarMenu as d, SidebarMenuAction as f, SidebarMenuSkeleton as g, SidebarMenuItem as h, SidebarGroup as i, SidebarInput as l, SidebarMenuButton as m, SidebarContent as n, SidebarGroupContent as o, SidebarMenuBadge as p, SidebarFooter as r, SidebarGroupLabel as s, Sidebar as t, SidebarInset as u, SidebarMenuSubButton as v, useSidebar as w, SidebarRail as x, SidebarMenuSubItem as y };
536
+ export { SidebarTrigger as C, SidebarSeparator as S, SidebarMenuSub as _, SidebarGroupAction as a, SidebarProvider as b, SidebarHeader as c, SidebarMenu as d, SidebarMenuAction as f, SidebarMenuSkeleton as g, SidebarMenuItem as h, SidebarGroup as i, SidebarInput as l, SidebarMenuButton as m, SidebarContent as n, SidebarGroupContent as o, SidebarMenuBadge as p, SidebarFooter as r, SidebarGroupLabel as s, Sidebar as t, SidebarInset as u, SidebarMenuSubButton as v, useSidebar as w, SidebarRail as x, SidebarMenuSubItem as y };
@@ -1,4 +1,5 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
- import { t as Skeleton } from "../skeleton-Cs6Q5GQc.mjs";
2
+ import "../skeleton-CkE23wsL.mjs";
3
+ import { t as Skeleton } from "../skeleton-DZ31pU4B.mjs";
3
4
 
4
5
  export { Skeleton };
@@ -0,0 +1,28 @@
1
+ import { t as cn } from "./cn-DWCc1QRE.mjs";
2
+ import { t as Skeleton$1 } from "./skeleton-CkE23wsL.mjs";
3
+ import "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+
6
+ //#region src/components/base/skeleton/skeleton.tsx
7
+ /**
8
+ * Datum Skeleton component – extends shadcn Skeleton with Datum-specific styling.
9
+ *
10
+ * Wraps the shadcn Skeleton so you can add custom base styles here and pass
11
+ * additional className for overrides. All standard div props are supported.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Skeleton className="h-4 w-48" />
16
+ * <Skeleton className="h-8 w-full rounded-lg" />
17
+ * ```
18
+ */
19
+ function Skeleton({ ref, className, ...props }) {
20
+ return /* @__PURE__ */ jsx(Skeleton$1, {
21
+ className: cn("bg-muted-foreground/10 animate-pulse rounded-md", className),
22
+ ...props
23
+ });
24
+ }
25
+ Skeleton.displayName = "Skeleton";
26
+
27
+ //#endregion
28
+ export { Skeleton as t };
@@ -1,5 +1,5 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
2
  import "../button-AzpnV-WB.mjs";
3
- import { t as defineStepper } from "../stepper-BG9DIzN5.mjs";
3
+ import { t as defineStepper } from "../stepper-CZeks9Ex.mjs";
4
4
 
5
5
  export { defineStepper };
@@ -22,6 +22,9 @@
22
22
  /* Figma design tokens — source of truth */
23
23
  @import './tokens/figma-tokens.css';
24
24
 
25
+ /* Animation utilities required by shadcn component transitions */
26
+ @import 'tw-animate-css';
27
+
25
28
  /* Shadcn/ui base variables and component styles */
26
29
  @import './shadcn/shadcn.css';
27
30
 
@@ -1,4 +1,4 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
- import { t as Switch } from "../switch-B2VVauH6.mjs";
2
+ import { t as Switch } from "../switch-Cn9IM2gC.mjs";
3
3
 
4
4
  export { Switch };
@@ -1,4 +1,4 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
- import { a as TableFooter, c as TableRow, i as TableCell, n as TableBody, o as TableHead, r as TableCaption, s as TableHeader, t as Table } from "../table-Dc3HfbM4.mjs";
2
+ import { a as TableFooter, c as TableRow, i as TableCell, n as TableBody, o as TableHead, r as TableCaption, s as TableHeader, t as Table } from "../table-Dpzh0VPK.mjs";
3
3
 
4
4
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -1,3 +1,3 @@
1
- import { a as TabsTrigger, i as TabsList, n as TabsContent, r as TabsLinkTrigger, t as Tabs } from "../tabs-Ccb4uqbe.mjs";
1
+ import { a as TabsTrigger, i as TabsList, n as TabsContent, r as TabsLinkTrigger, t as Tabs } from "../tabs-OYVCDOif.mjs";
2
2
 
3
3
  export { Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger };
@@ -1,5 +1,5 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
2
  import "../input-DuyjEKEW.mjs";
3
- import { t as TagsInput } from "../tag-input-BfHaKoMF.mjs";
3
+ import { t as TagsInput } from "../tag-input-DorFQ9bA.mjs";
4
4
 
5
5
  export { TagsInput };
@@ -1,7 +1,7 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
2
  import "../dialog-DXBaT9gA.mjs";
3
- import "../table-Dc3HfbM4.mjs";
4
- import "../tooltip-DZFG1iMs.mjs";
5
- import { _ as RedisTaskStorage, a as TaskPanelItem, b as createProjectMetadata, c as TaskPanelHeader, d as useCurrentScope, f as useTasksWithLabels, g as detectStorage, h as TaskQueue, i as TaskPanel, l as getContextLabel, m as TaskQueueProvider, n as TaskSummaryDialog, o as TaskPanelCounter, p as useTaskQueue, r as TaskQueueTrigger, s as TaskPanelActions, t as TaskQueueDropdown, u as matchesCurrentScope, v as LocalTaskStorage, x as createUserMetadata, y as createOrgMetadata } from "../task-queue-dropdown-fo3TX58Q.mjs";
3
+ import "../tooltip-U3XxlW4l.mjs";
4
+ import "../table-Dpzh0VPK.mjs";
5
+ import { _ as RedisTaskStorage, a as TaskPanelItem, b as createProjectMetadata, c as TaskPanelHeader, d as useCurrentScope, f as useTasksWithLabels, g as detectStorage, h as TaskQueue, i as TaskPanel, l as getContextLabel, m as TaskQueueProvider, n as TaskSummaryDialog, o as TaskPanelCounter, p as useTaskQueue, r as TaskQueueTrigger, s as TaskPanelActions, t as TaskQueueDropdown, u as matchesCurrentScope, v as LocalTaskStorage, x as createUserMetadata, y as createOrgMetadata } from "../task-queue-dropdown-DtS0IKci.mjs";
6
6
 
7
7
  export { LocalTaskStorage, RedisTaskStorage, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, createOrgMetadata, createProjectMetadata, createUserMetadata, detectStorage, getContextLabel, matchesCurrentScope, useCurrentScope, useTaskQueue, useTasksWithLabels };
@@ -4,9 +4,9 @@ import { t as SpinnerIcon } from "./spinner.icon-Bg8zgGh0.mjs";
4
4
  import { t as Button } from "./button-C1wRfGtT.mjs";
5
5
  import { t as Icon } from "./icon-wrapper-9ticVbRL.mjs";
6
6
  import { t as Dialog } from "./dialog-bnMMf9GD.mjs";
7
- import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "./table-Dc3HfbM4.mjs";
8
- import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-DZFG1iMs.mjs";
9
- import { h as DropdownMenuTrigger, r as DropdownMenuContent, t as DropdownMenu } from "./dropdown-Cs7Xr8w7.mjs";
7
+ import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-U3XxlW4l.mjs";
8
+ import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "./table-Dpzh0VPK.mjs";
9
+ import { h as DropdownMenuTrigger, r as DropdownMenuContent, t as DropdownMenu } from "./dropdown-Dgm_b6Mm.mjs";
10
10
  import { Ban, CheckCircle2, CircleAlert, CircleCheck, CornerDownRightIcon, FileIcon, ListTodo, X, XCircle } from "lucide-react";
11
11
  import { createContext, use, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
12
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
2
  import "../textarea-QYRcDEpK.mjs";
3
- import { t as Textarea } from "../textarea-X4OjkqLJ.mjs";
3
+ import { t as Textarea } from "../textarea-KZUKGHlO.mjs";
4
4
 
5
5
  export { Textarea };
@@ -1,3 +1,3 @@
1
- import { i as ClientOnly, n as useTheme, r as ThemeScript, t as ThemeProvider } from "../theme.provider-Nun_O9-O.mjs";
1
+ import { i as ClientOnly, n as useTheme, r as ThemeScript, t as ThemeProvider } from "../theme.provider-BG3cS9xe.mjs";
2
2
 
3
3
  export { ClientOnly, ThemeProvider, ThemeScript, useTheme };
@@ -1,3 +1,3 @@
1
- import { n as Toaster, r as toast, t as useToast } from "../use-toast-DN-fZBzJ.mjs";
1
+ import { n as Toaster, r as toast, t as useToast } from "../use-toast-DBmysDS6.mjs";
2
2
 
3
3
  export { Toaster, toast, useToast };
@@ -1,4 +1,4 @@
1
1
  import "../utils-Bfgoe-Gm.mjs";
2
- import { t as Tooltip } from "../tooltip-DZFG1iMs.mjs";
2
+ import { t as Tooltip } from "../tooltip-U3XxlW4l.mjs";
3
3
 
4
4
  export { Tooltip };
@@ -1,3 +1,3 @@
1
- import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "../typography-T7WgvO77.mjs";
1
+ import { a as ListItem, c as Title, d as titleVariants, i as List, l as paragraphVariants, n as Code, o as Paragraph, r as Link, s as Text, t as Blockquote, u as textVariants } from "../typography-DdrxIJMd.mjs";
2
2
 
3
3
  export { Blockquote, Code, Link, List, ListItem, Paragraph, Text, Title, paragraphVariants, textVariants, titleVariants };
@@ -1,4 +1,4 @@
1
- import { r as toast } from "./use-toast-DN-fZBzJ.mjs";
1
+ import { r as toast } from "./use-toast-DBmysDS6.mjs";
2
2
  import { useCallback, useEffect, useRef, useState } from "react";
3
3
 
4
4
  //#region src/hooks/use-copy-to-clipboard.ts
@@ -7,14 +7,14 @@ import { t as Input } from "./input-fzXBheCN.mjs";
7
7
  import { t as Label } from "./label-_ste_Re3.mjs";
8
8
  import { n as RadioGroupItem, t as RadioGroup } from "./radio-group-B9Hm77LQ.mjs";
9
9
  import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-CwVIFWFO.mjs";
10
- import { t as Switch } from "./switch-B2VVauH6.mjs";
11
- import { t as Textarea } from "./textarea-X4OjkqLJ.mjs";
12
- import { t as Tooltip } from "./tooltip-DZFG1iMs.mjs";
13
- import { t as Autocomplete } from "./autocomplete-B9bCkXtz.mjs";
14
- import { r as toast } from "./use-toast-DN-fZBzJ.mjs";
15
- import { t as useCopyToClipboard } from "./use-copy-to-clipboard-C7xqNxBX.mjs";
16
- import { t as defineStepper } from "./stepper-BG9DIzN5.mjs";
17
- import { t as InputWithAddons } from "./input-with-addons-CdgiUQce.mjs";
10
+ import { t as Tooltip } from "./tooltip-U3XxlW4l.mjs";
11
+ import { t as Switch } from "./switch-Cn9IM2gC.mjs";
12
+ import { t as Textarea } from "./textarea-KZUKGHlO.mjs";
13
+ import { t as Autocomplete } from "./autocomplete-DcKO7pj5.mjs";
14
+ import { r as toast } from "./use-toast-DBmysDS6.mjs";
15
+ import { t as useCopyToClipboard } from "./use-copy-to-clipboard-C9cT2Qb-.mjs";
16
+ import { t as defineStepper } from "./stepper-CZeks9Ex.mjs";
17
+ import { t as InputWithAddons } from "./input-with-addons-DN9LGwUU.mjs";
18
18
  import { Form } from "./form/index.mjs";
19
19
  import { CheckIcon, CircleHelp, CopyIcon } from "lucide-react";
20
20
  import * as React$1 from "react";
@@ -1,3 +1,3 @@
1
- import { t as VisuallyHidden } from "../visuallyhidden-CgkVhApW.mjs";
1
+ import { t as VisuallyHidden } from "../visuallyhidden-CfBnXfvh.mjs";
2
2
 
3
3
  export { VisuallyHidden };