shadcn-ui-react 0.2.1 → 0.2.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.
package/dist/index.cjs CHANGED
@@ -4263,36 +4263,36 @@ var require_dom_export = __commonJS({
4263
4263
  };
4264
4264
  }
4265
4265
  var React310 = __toESM2(require("react"));
4266
- var React70 = __toESM2(require("react"));
4267
- var DataRouterContext = React70.createContext(null);
4266
+ var React71 = __toESM2(require("react"));
4267
+ var DataRouterContext = React71.createContext(null);
4268
4268
  DataRouterContext.displayName = "DataRouter";
4269
- var DataRouterStateContext = React70.createContext(null);
4269
+ var DataRouterStateContext = React71.createContext(null);
4270
4270
  DataRouterStateContext.displayName = "DataRouterState";
4271
- var ViewTransitionContext = React70.createContext({
4271
+ var ViewTransitionContext = React71.createContext({
4272
4272
  isTransitioning: false
4273
4273
  });
4274
4274
  ViewTransitionContext.displayName = "ViewTransition";
4275
- var FetchersContext = React70.createContext(
4275
+ var FetchersContext = React71.createContext(
4276
4276
  /* @__PURE__ */ new Map()
4277
4277
  );
4278
4278
  FetchersContext.displayName = "Fetchers";
4279
- var AwaitContext = React70.createContext(null);
4279
+ var AwaitContext = React71.createContext(null);
4280
4280
  AwaitContext.displayName = "Await";
4281
- var NavigationContext = React70.createContext(
4281
+ var NavigationContext = React71.createContext(
4282
4282
  null
4283
4283
  );
4284
4284
  NavigationContext.displayName = "Navigation";
4285
- var LocationContext = React70.createContext(
4285
+ var LocationContext = React71.createContext(
4286
4286
  null
4287
4287
  );
4288
4288
  LocationContext.displayName = "Location";
4289
- var RouteContext = React70.createContext({
4289
+ var RouteContext = React71.createContext({
4290
4290
  outlet: null,
4291
4291
  matches: [],
4292
4292
  isDataRoute: false
4293
4293
  });
4294
4294
  RouteContext.displayName = "Route";
4295
- var RouteErrorContext = React70.createContext(null);
4295
+ var RouteErrorContext = React71.createContext(null);
4296
4296
  RouteErrorContext.displayName = "RouteError";
4297
4297
  var React210 = __toESM2(require("react"));
4298
4298
  var ENABLE_DEV_WARNINGS = true;
@@ -10943,36 +10943,36 @@ var require_development = __commonJS({
10943
10943
  };
10944
10944
  }
10945
10945
  var React310 = __toESM2(require("react"));
10946
- var React70 = __toESM2(require("react"));
10947
- var DataRouterContext = React70.createContext(null);
10946
+ var React71 = __toESM2(require("react"));
10947
+ var DataRouterContext = React71.createContext(null);
10948
10948
  DataRouterContext.displayName = "DataRouter";
10949
- var DataRouterStateContext = React70.createContext(null);
10949
+ var DataRouterStateContext = React71.createContext(null);
10950
10950
  DataRouterStateContext.displayName = "DataRouterState";
10951
- var ViewTransitionContext = React70.createContext({
10951
+ var ViewTransitionContext = React71.createContext({
10952
10952
  isTransitioning: false
10953
10953
  });
10954
10954
  ViewTransitionContext.displayName = "ViewTransition";
10955
- var FetchersContext = React70.createContext(
10955
+ var FetchersContext = React71.createContext(
10956
10956
  /* @__PURE__ */ new Map()
10957
10957
  );
10958
10958
  FetchersContext.displayName = "Fetchers";
10959
- var AwaitContext = React70.createContext(null);
10959
+ var AwaitContext = React71.createContext(null);
10960
10960
  AwaitContext.displayName = "Await";
10961
- var NavigationContext = React70.createContext(
10961
+ var NavigationContext = React71.createContext(
10962
10962
  null
10963
10963
  );
10964
10964
  NavigationContext.displayName = "Navigation";
10965
- var LocationContext = React70.createContext(
10965
+ var LocationContext = React71.createContext(
10966
10966
  null
10967
10967
  );
10968
10968
  LocationContext.displayName = "Location";
10969
- var RouteContext = React70.createContext({
10969
+ var RouteContext = React71.createContext({
10970
10970
  outlet: null,
10971
10971
  matches: [],
10972
10972
  isDataRoute: false
10973
10973
  });
10974
10974
  RouteContext.displayName = "Route";
10975
- var RouteErrorContext = React70.createContext(null);
10975
+ var RouteErrorContext = React71.createContext(null);
10976
10976
  RouteErrorContext.displayName = "RouteError";
10977
10977
  var React210 = __toESM2(require("react"));
10978
10978
  var ENABLE_DEV_WARNINGS = true;
@@ -16887,6 +16887,7 @@ __export(index_exports, {
16887
16887
  ResizablePanelGroup: () => ResizablePanelGroup,
16888
16888
  ScrollArea: () => ScrollArea,
16889
16889
  ScrollBar: () => ScrollBar,
16890
+ SearchInput: () => SearchInput,
16890
16891
  Select: () => Select2,
16891
16892
  SelectContent: () => SelectContent,
16892
16893
  SelectGroup: () => SelectGroup,
@@ -25665,8 +25666,44 @@ function useToast() {
25665
25666
  });
25666
25667
  }
25667
25668
 
25668
- // src/shared/alert-modal.tsx
25669
+ // src/components/search-input.tsx
25670
+ var import_react34 = __toESM(require("react"), 1);
25671
+ var import_use_debounce = require("use-debounce");
25669
25672
  var import_jsx_runtime44 = require("react/jsx-runtime");
25673
+ function SearchInput({
25674
+ value,
25675
+ placeholder,
25676
+ className,
25677
+ debounceTime = 750,
25678
+ onSearch
25679
+ }) {
25680
+ const [searchTerm, setSearchTerm] = import_react34.default.useState(value);
25681
+ const [debouncedValue] = (0, import_use_debounce.useDebounce)(searchTerm, debounceTime);
25682
+ const handleSettingSearchParams = (0, import_react34.useCallback)((newSearchValue) => {
25683
+ if (newSearchValue === "" || newSearchValue === void 0 || !newSearchValue) {
25684
+ onSearch(newSearchValue);
25685
+ return;
25686
+ }
25687
+ }, []);
25688
+ import_react34.default.useEffect(() => {
25689
+ handleSettingSearchParams(debouncedValue);
25690
+ }, [debouncedValue, handleSettingSearchParams]);
25691
+ import_react34.default.useEffect(() => {
25692
+ setSearchTerm(value);
25693
+ }, [value]);
25694
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
25695
+ Input,
25696
+ {
25697
+ placeholder: placeholder || `Search...`,
25698
+ value: searchTerm,
25699
+ onChange: (event) => setSearchTerm(event.target.value),
25700
+ className: cn("w-full md:max-w-sm", className)
25701
+ }
25702
+ );
25703
+ }
25704
+
25705
+ // src/shared/alert-modal.tsx
25706
+ var import_jsx_runtime45 = require("react/jsx-runtime");
25670
25707
  var AlertModal = ({
25671
25708
  isOpen,
25672
25709
  onClose,
@@ -25679,7 +25716,7 @@ var AlertModal = ({
25679
25716
  className,
25680
25717
  children
25681
25718
  }) => {
25682
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
25719
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
25683
25720
  Modal,
25684
25721
  {
25685
25722
  title,
@@ -25687,9 +25724,9 @@ var AlertModal = ({
25687
25724
  isOpen,
25688
25725
  onClose,
25689
25726
  className,
25690
- children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
25691
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
25692
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, { disabled: loading, variant: "destructive", onClick: onConfirm, children: confirmText })
25727
+ children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
25728
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
25729
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { disabled: loading, variant: "destructive", onClick: onConfirm, children: confirmText })
25693
25730
  ] })
25694
25731
  }
25695
25732
  );
@@ -25697,13 +25734,13 @@ var AlertModal = ({
25697
25734
 
25698
25735
  // src/shared/breadcrumbs.tsx
25699
25736
  var import_lucide_react3 = require("lucide-react");
25700
- var import_react34 = require("react");
25701
- var import_jsx_runtime45 = require("react/jsx-runtime");
25737
+ var import_react35 = require("react");
25738
+ var import_jsx_runtime46 = require("react/jsx-runtime");
25702
25739
  function Breadcrumbs({ items, className, classNameList }) {
25703
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react34.Fragment, { children: [
25704
- index !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbLink, { href: item.link, children: item.title }) }),
25705
- index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react3.Slash, {}) }),
25706
- index === items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbPage, { children: item.title })
25740
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react35.Fragment, { children: [
25741
+ index !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbLink, { href: item.link, children: item.title }) }),
25742
+ index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react3.Slash, {}) }),
25743
+ index === items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbPage, { children: item.title })
25707
25744
  ] }, item.title)) }) });
25708
25745
  }
25709
25746
 
@@ -25711,25 +25748,25 @@ function Breadcrumbs({ items, className, classNameList }) {
25711
25748
  var import_react_router_dom2 = __toESM(require_dist2(), 1);
25712
25749
 
25713
25750
  // src/routes/use-pathname.tsx
25714
- var import_react35 = require("react");
25751
+ var import_react36 = require("react");
25715
25752
  var import_react_router_dom = __toESM(require_dist2(), 1);
25716
25753
  function usePathname() {
25717
25754
  const { pathname } = (0, import_react_router_dom.useLocation)();
25718
- return (0, import_react35.useMemo)(() => pathname, [pathname]);
25755
+ return (0, import_react36.useMemo)(() => pathname, [pathname]);
25719
25756
  }
25720
25757
 
25721
25758
  // src/hooks/use-sidebar.tsx
25722
- var import_react36 = require("react");
25723
- var import_jsx_runtime46 = require("react/jsx-runtime");
25724
- var SidebarContext = (0, import_react36.createContext)({
25759
+ var import_react37 = require("react");
25760
+ var import_jsx_runtime47 = require("react/jsx-runtime");
25761
+ var SidebarContext = (0, import_react37.createContext)({
25725
25762
  isMinimized: false,
25726
25763
  toggle: () => {
25727
25764
  }
25728
25765
  });
25729
- var useSidebar = () => (0, import_react36.useContext)(SidebarContext);
25766
+ var useSidebar = () => (0, import_react37.useContext)(SidebarContext);
25730
25767
 
25731
25768
  // src/shared/dashboard-nav.tsx
25732
- var import_jsx_runtime47 = require("react/jsx-runtime");
25769
+ var import_jsx_runtime48 = require("react/jsx-runtime");
25733
25770
  function DashboardNav({
25734
25771
  items,
25735
25772
  setOpen,
@@ -25740,10 +25777,10 @@ function DashboardNav({
25740
25777
  if (!(items == null ? void 0 : items.length)) {
25741
25778
  return null;
25742
25779
  }
25743
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("nav", { className: "grid items-start gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipProvider, { children: items.map((item, index) => {
25780
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("nav", { className: "grid items-start gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipProvider, { children: items.map((item, index) => {
25744
25781
  const Icon2 = Icons[item.icon || "arrowRight"];
25745
- return item.href && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip, { children: [
25746
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
25782
+ return item.href && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Tooltip, { children: [
25783
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
25747
25784
  import_react_router_dom2.Link,
25748
25785
  {
25749
25786
  to: item.disabled ? "/" : item.href,
@@ -25756,12 +25793,12 @@ function DashboardNav({
25756
25793
  if (setOpen) setOpen(false);
25757
25794
  },
25758
25795
  children: [
25759
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon2, { className: `ml-2.5 size-5` }),
25760
- isMobileNav || !isMinimized && !isMobileNav ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "mr-2 truncate", children: item.title }) : ""
25796
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon2, { className: `ml-2.5 size-5` }),
25797
+ isMobileNav || !isMinimized && !isMobileNav ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mr-2 truncate", children: item.title }) : ""
25761
25798
  ]
25762
25799
  }
25763
25800
  ) }),
25764
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
25801
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
25765
25802
  TooltipContent,
25766
25803
  {
25767
25804
  align: "center",
@@ -25776,7 +25813,7 @@ function DashboardNav({
25776
25813
  }
25777
25814
 
25778
25815
  // src/shared/data-table-skeleton.tsx
25779
- var import_jsx_runtime48 = require("react/jsx-runtime");
25816
+ var import_jsx_runtime49 = require("react/jsx-runtime");
25780
25817
  function DataTableSkeleton({
25781
25818
  columnCount,
25782
25819
  rowCount = 10,
@@ -25784,31 +25821,31 @@ function DataTableSkeleton({
25784
25821
  filterableColumnCount = 0,
25785
25822
  showViewOptions = true
25786
25823
  }) {
25787
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "w-full space-y-3 overflow-auto", children: [
25788
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
25789
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
25790
- searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-10 w-[150px] lg:w-[250px]" }, i)) : null,
25791
- filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-10 w-[70px] border-dashed" }, i)) : null
25824
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "w-full space-y-3 overflow-auto", children: [
25825
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
25826
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
25827
+ searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-10 w-[150px] lg:w-[250px]" }, i)) : null,
25828
+ filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-10 w-[70px] border-dashed" }, i)) : null
25792
25829
  ] }),
25793
- showViewOptions ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "ml-auto hidden h-7 w-[70px] lg:flex" }) : null
25830
+ showViewOptions ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "ml-auto hidden h-7 w-[70px] lg:flex" }) : null
25794
25831
  ] }),
25795
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Table, { children: [
25796
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
25797
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
25832
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Table, { children: [
25833
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
25834
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
25798
25835
  ] }) }),
25799
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full flex-col items-center justify-between gap-4 overflow-auto px-2 py-1 sm:flex-row sm:gap-8", children: [
25800
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-8 w-40" }) }),
25801
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
25802
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center space-x-2", children: [
25803
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-8 w-24" }),
25804
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-8 w-[70px]" })
25836
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex w-full flex-col items-center justify-between gap-4 overflow-auto px-2 py-1 sm:flex-row sm:gap-8", children: [
25837
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-8 w-40" }) }),
25838
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
25839
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center space-x-2", children: [
25840
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-8 w-24" }),
25841
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-8 w-[70px]" })
25805
25842
  ] }),
25806
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-8 w-20" }) }),
25807
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center space-x-2", children: [
25808
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "hidden size-8 lg:block" }),
25809
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "size-8" }),
25810
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "size-8" }),
25811
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "hidden size-8 lg:block" })
25843
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "h-8 w-20" }) }),
25844
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center space-x-2", children: [
25845
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "hidden size-8 lg:block" }),
25846
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "size-8" }),
25847
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "size-8" }),
25848
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Skeleton, { className: "hidden size-8 lg:block" })
25812
25849
  ] })
25813
25850
  ] })
25814
25851
  ] })
@@ -25816,11 +25853,11 @@ function DataTableSkeleton({
25816
25853
  }
25817
25854
 
25818
25855
  // src/shared/data-table.tsx
25819
- var import_react37 = __toESM(require("react"), 1);
25856
+ var import_react38 = __toESM(require("react"), 1);
25820
25857
  var import_react_icons18 = require("@radix-ui/react-icons");
25821
25858
  var import_react_table = require("@tanstack/react-table");
25822
25859
  var import_lucide_react4 = require("lucide-react");
25823
- var import_jsx_runtime49 = require("react/jsx-runtime");
25860
+ var import_jsx_runtime50 = require("react/jsx-runtime");
25824
25861
  function DataTable({
25825
25862
  columns,
25826
25863
  data,
@@ -25841,7 +25878,7 @@ function DataTable({
25841
25878
  onPageChange,
25842
25879
  onClick
25843
25880
  }) {
25844
- const [pagination, setPagination] = import_react37.default.useState({
25881
+ const [pagination, setPagination] = import_react38.default.useState({
25845
25882
  pageIndex: Math.max(page - 1, 0),
25846
25883
  pageSize: perPage
25847
25884
  });
@@ -25857,11 +25894,11 @@ function DataTable({
25857
25894
  manualPagination: true,
25858
25895
  manualFiltering: true
25859
25896
  });
25860
- (0, import_react37.useEffect)(() => {
25897
+ (0, import_react38.useEffect)(() => {
25861
25898
  onPageChange(pagination.pageIndex);
25862
25899
  }, [pagination, setPagination]);
25863
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
25864
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
25900
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
25901
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
25865
25902
  ScrollArea,
25866
25903
  {
25867
25904
  className: cn(
@@ -25869,24 +25906,24 @@ function DataTable({
25869
25906
  className
25870
25907
  ),
25871
25908
  children: [
25872
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Table, { className: cn("relative", tableClassName), children: [
25873
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
25909
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Table, { className: cn("relative", tableClassName), children: [
25910
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
25874
25911
  header.column.columnDef.header,
25875
25912
  header.getContext()
25876
25913
  ) }, header.id)) }, headerGroup.id)) }),
25877
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableBody, { className: bodyClassName, children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
25914
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableBody, { className: bodyClassName, children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
25878
25915
  TableRow,
25879
25916
  {
25880
25917
  "data-state": row.getIsSelected() ? "selected" : void 0,
25881
25918
  onClick: () => onClick(row.original),
25882
25919
  className: rowClassName,
25883
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableCell, { className: cellClassName, children: (0, import_react_table.flexRender)(
25920
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableCell, { className: cellClassName, children: (0, import_react_table.flexRender)(
25884
25921
  cell.column.columnDef.cell,
25885
25922
  cell.getContext()
25886
25923
  ) }, cell.id))
25887
25924
  },
25888
25925
  row.id
25889
- )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
25926
+ )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
25890
25927
  TableCell,
25891
25928
  {
25892
25929
  colSpan: columns.length,
@@ -25895,13 +25932,13 @@ function DataTable({
25895
25932
  }
25896
25933
  ) }) })
25897
25934
  ] }),
25898
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ScrollBar, { orientation: "horizontal" })
25935
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ScrollBar, { orientation: "horizontal" })
25899
25936
  ]
25900
25937
  }
25901
25938
  ),
25902
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row", children: [
25903
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
25904
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "text-muted-foreground flex-1 text-sm", children: [
25939
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row", children: [
25940
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
25941
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "text-muted-foreground flex-1 text-sm", children: [
25905
25942
  table.getFilteredSelectedRowModel().rows.length,
25906
25943
  " ",
25907
25944
  ofLabel,
@@ -25909,23 +25946,23 @@ function DataTable({
25909
25946
  table.getFilteredRowModel().rows.length,
25910
25947
  " row(s) selected."
25911
25948
  ] }),
25912
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center space-x-2", children: [
25913
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
25914
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
25949
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center space-x-2", children: [
25950
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
25951
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
25915
25952
  Select2,
25916
25953
  {
25917
25954
  value: `${pagination.pageSize}`,
25918
25955
  onValueChange: (value) => setPagination(__spreadProps(__spreadValues({}, pagination), { pageSize: Number(value) })),
25919
25956
  children: [
25920
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectValue, { placeholder: pagination.pageSize }) }),
25921
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectItem, { value: `${size}`, children: size }, size)) })
25957
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectValue, { placeholder: pagination.pageSize }) }),
25958
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectItem, { value: `${size}`, children: size }, size)) })
25922
25959
  ]
25923
25960
  }
25924
25961
  )
25925
25962
  ] })
25926
25963
  ] }),
25927
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex w-full items-center justify-between gap-2 sm:justify-end", children: [
25928
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
25964
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-full items-center justify-between gap-2 sm:justify-end", children: [
25965
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
25929
25966
  pageLabel,
25930
25967
  " ",
25931
25968
  pagination.pageIndex + 1,
@@ -25934,8 +25971,8 @@ function DataTable({
25934
25971
  " ",
25935
25972
  pageCount
25936
25973
  ] }),
25937
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center space-x-2", children: [
25938
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
25974
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center space-x-2", children: [
25975
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
25939
25976
  Button,
25940
25977
  {
25941
25978
  "aria-label": "Go to first page",
@@ -25943,10 +25980,10 @@ function DataTable({
25943
25980
  className: "hidden h-8 w-8 p-0 lg:flex",
25944
25981
  onClick: () => setPagination(__spreadProps(__spreadValues({}, pagination), { pageIndex: 0 })),
25945
25982
  disabled: pagination.pageIndex === 0,
25946
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_icons18.DoubleArrowLeftIcon, { className: "h-4 w-4" })
25983
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_icons18.DoubleArrowLeftIcon, { className: "h-4 w-4" })
25947
25984
  }
25948
25985
  ),
25949
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
25986
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
25950
25987
  Button,
25951
25988
  {
25952
25989
  "aria-label": "Go to previous page",
@@ -25956,10 +25993,10 @@ function DataTable({
25956
25993
  pageIndex: pagination.pageIndex - 1
25957
25994
  })),
25958
25995
  disabled: pagination.pageIndex === 0,
25959
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react4.ChevronLeftIcon, { className: "h-4 w-4" })
25996
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react4.ChevronLeftIcon, { className: "h-4 w-4" })
25960
25997
  }
25961
25998
  ),
25962
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
25999
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
25963
26000
  Button,
25964
26001
  {
25965
26002
  "aria-label": "Go to next page",
@@ -25969,10 +26006,10 @@ function DataTable({
25969
26006
  pageIndex: pagination.pageIndex + 1
25970
26007
  })),
25971
26008
  disabled: pagination.pageIndex + 1 >= pageCount,
25972
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react4.ChevronRightIcon, { className: "h-4 w-4" })
26009
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react4.ChevronRightIcon, { className: "h-4 w-4" })
25973
26010
  }
25974
26011
  ),
25975
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
26012
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
25976
26013
  Button,
25977
26014
  {
25978
26015
  "aria-label": "Go to last page",
@@ -25980,7 +26017,7 @@ function DataTable({
25980
26017
  className: "hidden h-8 w-8 p-0 lg:flex",
25981
26018
  onClick: () => setPagination(__spreadProps(__spreadValues({}, pagination), { pageIndex: pageCount - 1 })),
25982
26019
  disabled: pagination.pageIndex + 1 >= pageCount,
25983
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_icons18.DoubleArrowRightIcon, { className: "h-4 w-4" })
26020
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_icons18.DoubleArrowRightIcon, { className: "h-4 w-4" })
25984
26021
  }
25985
26022
  )
25986
26023
  ] })
@@ -25992,9 +26029,9 @@ function DataTable({
25992
26029
  // src/shared/fileupload.tsx
25993
26030
  var import_react_icons19 = require("@radix-ui/react-icons");
25994
26031
  var import_lucide_react5 = require("lucide-react");
25995
- var import_react38 = require("react");
26032
+ var import_react39 = require("react");
25996
26033
  var import_react_dropzone = require("react-dropzone");
25997
- var import_jsx_runtime50 = require("react/jsx-runtime");
26034
+ var import_jsx_runtime51 = require("react/jsx-runtime");
25998
26035
  function FileUpload({
25999
26036
  onChange,
26000
26037
  value,
@@ -26012,18 +26049,18 @@ function FileUpload({
26012
26049
  const onUpdateFile = (newFiles) => {
26013
26050
  onChange(newFiles);
26014
26051
  };
26015
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
26052
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
26016
26053
  "div",
26017
26054
  {
26018
26055
  className: cn(
26019
26056
  "relative h-36 w-36 overflow-hidden rounded-full bg-gray-200 shadow-2xl ",
26020
26057
  classNameContent
26021
26058
  ),
26022
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
26023
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", __spreadValues({}, getInputProps())),
26024
- value && !!value.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_icons19.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
26025
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { className: "absolute -bottom-5 left-1/2 flex w-full -translate-x-1/2 -translate-y-1/2 transform flex-col items-center justify-center bg-gray-300 bg-opacity-50 py-1 text-xs font-normal text-muted-foreground ", children: [
26026
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react5.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
26059
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
26060
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("input", __spreadValues({}, getInputProps())),
26061
+ value && !!value.length ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_icons19.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
26062
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "absolute -bottom-5 left-1/2 flex w-full -translate-x-1/2 -translate-y-1/2 transform flex-col items-center justify-center bg-gray-300 bg-opacity-50 py-1 text-xs font-normal text-muted-foreground ", children: [
26063
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react5.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
26027
26064
  label
26028
26065
  ] })
26029
26066
  ] }))
@@ -26031,15 +26068,15 @@ function FileUpload({
26031
26068
  ) });
26032
26069
  }
26033
26070
  function ImagePreview({ file }) {
26034
- const [objectUrl, setObjectUrl] = (0, import_react38.useState)(null);
26035
- (0, import_react38.useEffect)(() => {
26071
+ const [objectUrl, setObjectUrl] = (0, import_react39.useState)(null);
26072
+ (0, import_react39.useEffect)(() => {
26036
26073
  const url = URL.createObjectURL(file);
26037
26074
  setObjectUrl(url);
26038
26075
  return () => {
26039
26076
  URL.revokeObjectURL(url);
26040
26077
  };
26041
26078
  }, [file]);
26042
- return objectUrl ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
26079
+ return objectUrl ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
26043
26080
  "img",
26044
26081
  {
26045
26082
  src: objectUrl,
@@ -26053,40 +26090,40 @@ function ImagePreview({ file }) {
26053
26090
  var import_lucide_react6 = require("lucide-react");
26054
26091
 
26055
26092
  // src/providers/theme-provider.tsx
26056
- var import_react39 = require("react");
26057
- var import_jsx_runtime51 = require("react/jsx-runtime");
26093
+ var import_react40 = require("react");
26094
+ var import_jsx_runtime52 = require("react/jsx-runtime");
26058
26095
  var initialState = {
26059
26096
  theme: "system",
26060
26097
  setTheme: () => null
26061
26098
  };
26062
- var ThemeProviderContext = (0, import_react39.createContext)(initialState);
26099
+ var ThemeProviderContext = (0, import_react40.createContext)(initialState);
26063
26100
  var useTheme2 = () => {
26064
- const context = (0, import_react39.useContext)(ThemeProviderContext);
26101
+ const context = (0, import_react40.useContext)(ThemeProviderContext);
26065
26102
  if (context === void 0)
26066
26103
  throw new Error("useTheme must be used within a ThemeProvider");
26067
26104
  return context;
26068
26105
  };
26069
26106
 
26070
26107
  // src/shared/theme-toggle.tsx
26071
- var import_jsx_runtime52 = require("react/jsx-runtime");
26108
+ var import_jsx_runtime53 = require("react/jsx-runtime");
26072
26109
  function ModeToggle() {
26073
26110
  const { setTheme } = useTheme2();
26074
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
26075
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Button, { variant: "outline", size: "icon", children: [
26076
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react6.Sun, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
26077
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react6.Moon, { className: "absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
26078
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "sr-only", children: "Toggle theme" })
26111
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenu, { children: [
26112
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Button, { variant: "outline", size: "icon", children: [
26113
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react6.Sun, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
26114
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react6.Moon, { className: "absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
26115
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "sr-only", children: "Toggle theme" })
26079
26116
  ] }) }),
26080
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuContent, { align: "end", children: [
26081
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuItem, { onClick: () => setTheme("light"), children: "Light" }),
26082
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuItem, { onClick: () => setTheme("dark"), children: "Dark" }),
26083
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuItem, { onClick: () => setTheme("system"), children: "System" })
26117
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenuContent, { align: "end", children: [
26118
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuItem, { onClick: () => setTheme("light"), children: "Light" }),
26119
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuItem, { onClick: () => setTheme("dark"), children: "Dark" }),
26120
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuItem, { onClick: () => setTheme("system"), children: "System" })
26084
26121
  ] })
26085
26122
  ] });
26086
26123
  }
26087
26124
 
26088
26125
  // src/shared/header.tsx
26089
- var import_jsx_runtime53 = require("react/jsx-runtime");
26126
+ var import_jsx_runtime54 = require("react/jsx-runtime");
26090
26127
  var useMatchedPath = (items, pathname) => {
26091
26128
  const matchedPath = items.find((item) => item.href === pathname) || items.find(
26092
26129
  (item) => pathname.startsWith(item.href + "/") && item.href !== "/"
@@ -26096,7 +26133,7 @@ var useMatchedPath = (items, pathname) => {
26096
26133
  function Header2({ items, className, classNameContent }) {
26097
26134
  const pathname = usePathname();
26098
26135
  const headingText = useMatchedPath(items, pathname);
26099
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
26136
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
26100
26137
  "div",
26101
26138
  {
26102
26139
  className: cn(
@@ -26104,10 +26141,10 @@ function Header2({ items, className, classNameContent }) {
26104
26141
  className
26105
26142
  ),
26106
26143
  children: [
26107
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Heading, { title: headingText }),
26108
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("ml-4 flex items-center md:ml-6", classNameContent), children: [
26109
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(UserNav, {}),
26110
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ModeToggle, {})
26144
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Heading, { title: headingText }),
26145
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("ml-4 flex items-center md:ml-6", classNameContent), children: [
26146
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UserNav, {}),
26147
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ModeToggle, {})
26111
26148
  ] })
26112
26149
  ]
26113
26150
  }
@@ -26115,34 +26152,34 @@ function Header2({ items, className, classNameContent }) {
26115
26152
  }
26116
26153
 
26117
26154
  // src/shared/heading.tsx
26118
- var import_jsx_runtime54 = require("react/jsx-runtime");
26155
+ var import_jsx_runtime55 = require("react/jsx-runtime");
26119
26156
  function Heading({ title, description, className }) {
26120
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className, children: [
26121
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: "text-xl font-bold tracking-tight text-primary sm:text-3xl", children: title }),
26122
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
26157
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className, children: [
26158
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h2", { className: "text-xl font-bold tracking-tight text-primary sm:text-3xl", children: title }),
26159
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
26123
26160
  ] });
26124
26161
  }
26125
26162
 
26126
26163
  // src/shared/mobile-sidebar.tsx
26127
26164
  var import_react_router_dom3 = __toESM(require_dist2(), 1);
26128
- var import_jsx_runtime55 = require("react/jsx-runtime");
26165
+ var import_jsx_runtime56 = require("react/jsx-runtime");
26129
26166
  function MobileSidebar({
26130
26167
  items,
26131
26168
  setSidebarOpen,
26132
26169
  sidebarOpen,
26133
26170
  header
26134
26171
  }) {
26135
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Sheet, { open: sidebarOpen, onOpenChange: setSidebarOpen, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SheetContent, { side: "left", className: "bg-background !px-0", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-4 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "space-y-4 px-3 py-2", children: [
26136
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_router_dom3.Link, { to: "/", className: "px-2 py-2 text-2xl font-bold text-white ", children: header ? header : "Logo" }),
26137
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-1 px-2", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DashboardNav, { items, setOpen: setSidebarOpen }) })
26172
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Sheet, { open: sidebarOpen, onOpenChange: setSidebarOpen, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SheetContent, { side: "left", className: "bg-background !px-0", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "space-y-4 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-4 px-3 py-2", children: [
26173
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_router_dom3.Link, { to: "/", className: "px-2 py-2 text-2xl font-bold text-white ", children: header ? header : "Logo" }),
26174
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "space-y-1 px-2", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DashboardNav, { items, setOpen: setSidebarOpen }) })
26138
26175
  ] }) }) }) }) });
26139
26176
  }
26140
26177
 
26141
26178
  // src/shared/page-head.tsx
26142
26179
  var import_react_helmet_next = require("react-helmet-next");
26143
- var import_jsx_runtime56 = require("react/jsx-runtime");
26180
+ var import_jsx_runtime57 = require("react/jsx-runtime");
26144
26181
  function PageHead({ title = "shadcn-ui-react" }) {
26145
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_helmet_next.Helmet, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("title", { children: [
26182
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react_helmet_next.Helmet, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("title", { children: [
26146
26183
  " ",
26147
26184
  title,
26148
26185
  " "
@@ -26150,7 +26187,7 @@ function PageHead({ title = "shadcn-ui-react" }) {
26150
26187
  }
26151
26188
 
26152
26189
  // src/shared/pagination-section.tsx
26153
- var import_jsx_runtime57 = require("react/jsx-runtime");
26190
+ var import_jsx_runtime58 = require("react/jsx-runtime");
26154
26191
  function PaginationSection({
26155
26192
  totalPosts,
26156
26193
  postsPerPage,
@@ -26188,17 +26225,17 @@ function PaginationSection({
26188
26225
  }
26189
26226
  };
26190
26227
  const renderPages = () => {
26191
- const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
26228
+ const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
26192
26229
  PaginationItem,
26193
26230
  {
26194
26231
  className: currentPage === page ? "rounded-md bg-primary" : "",
26195
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
26232
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
26196
26233
  },
26197
26234
  idx
26198
26235
  ));
26199
26236
  if (activePages[0] > 1) {
26200
26237
  renderedPages.unshift(
26201
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
26238
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
26202
26239
  PaginationEllipsis,
26203
26240
  {
26204
26241
  onClick: () => setCurrentPage(activePages[0] - 1)
@@ -26209,7 +26246,7 @@ function PaginationSection({
26209
26246
  }
26210
26247
  if (activePages[activePages.length - 1] < pageNumbers.length) {
26211
26248
  renderedPages.push(
26212
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
26249
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
26213
26250
  PaginationEllipsis,
26214
26251
  {
26215
26252
  onClick: () => setCurrentPage(activePages[activePages.length - 1] + 1)
@@ -26220,38 +26257,38 @@ function PaginationSection({
26220
26257
  }
26221
26258
  return renderedPages;
26222
26259
  };
26223
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(PaginationContent, { children: [
26224
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(PaginationItem, { children: [
26225
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
26260
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(PaginationContent, { children: [
26261
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(PaginationItem, { children: [
26262
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
26226
26263
  PaginationPreviousLast,
26227
26264
  {
26228
26265
  onClick: handlePrevPageLast,
26229
26266
  size: void 0
26230
26267
  }
26231
26268
  ),
26232
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
26269
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
26233
26270
  ] }),
26234
26271
  renderPages(),
26235
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(PaginationItem, { children: [
26236
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PaginationNext, { onClick: handleNextPage, size: void 0 }),
26237
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
26272
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(PaginationItem, { children: [
26273
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PaginationNext, { onClick: handleNextPage, size: void 0 }),
26274
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
26238
26275
  ] })
26239
26276
  ] }) }) });
26240
26277
  }
26241
26278
 
26242
26279
  // src/shared/sidebar.tsx
26243
26280
  var import_lucide_react7 = require("lucide-react");
26244
- var import_react40 = require("react");
26245
- var import_jsx_runtime58 = require("react/jsx-runtime");
26281
+ var import_react41 = require("react");
26282
+ var import_jsx_runtime59 = require("react/jsx-runtime");
26246
26283
  function Sidebar({ items, className }) {
26247
26284
  const { isMinimized, toggle } = useSidebar();
26248
- const [status, setStatus] = (0, import_react40.useState)(false);
26285
+ const [status, setStatus] = (0, import_react41.useState)(false);
26249
26286
  const handleToggle = () => {
26250
26287
  setStatus(true);
26251
26288
  toggle();
26252
26289
  setTimeout(() => setStatus(false), 500);
26253
26290
  };
26254
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
26291
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
26255
26292
  "nav",
26256
26293
  {
26257
26294
  className: cn(
@@ -26261,7 +26298,7 @@ function Sidebar({ items, className }) {
26261
26298
  className
26262
26299
  ),
26263
26300
  children: [
26264
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
26301
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
26265
26302
  "div",
26266
26303
  {
26267
26304
  className: cn(
@@ -26269,8 +26306,8 @@ function Sidebar({ items, className }) {
26269
26306
  isMinimized ? "justify-center " : "justify-between"
26270
26307
  ),
26271
26308
  children: [
26272
- !isMinimized && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h1", { className: "text-2xl font-bold", children: "Logo" }),
26273
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
26309
+ !isMinimized && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h1", { className: "text-2xl font-bold", children: "Logo" }),
26310
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
26274
26311
  import_lucide_react7.ChevronsLeft,
26275
26312
  {
26276
26313
  className: cn(
@@ -26283,51 +26320,51 @@ function Sidebar({ items, className }) {
26283
26320
  ]
26284
26321
  }
26285
26322
  ),
26286
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "space-y-4 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "px-2 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DashboardNav, { items }) }) }) })
26323
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "space-y-4 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "px-2 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DashboardNav, { items }) }) }) })
26287
26324
  ]
26288
26325
  }
26289
26326
  );
26290
26327
  }
26291
26328
 
26292
26329
  // src/shared/user-nav.tsx
26293
- var import_jsx_runtime59 = require("react/jsx-runtime");
26330
+ var import_jsx_runtime60 = require("react/jsx-runtime");
26294
26331
  function UserNav() {
26295
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenu, { children: [
26296
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", className: "relative h-14 w-14 rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Avatar, { className: "h-14 w-14", children: [
26297
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
26332
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenu, { children: [
26333
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { variant: "ghost", className: "relative h-14 w-14 rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Avatar, { className: "h-14 w-14", children: [
26334
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
26298
26335
  AvatarImage,
26299
26336
  {
26300
26337
  src: "https://png.pngtree.com/png-clipart/20230927/original/pngtree-man-avatar-image-for-profile-png-image_13001882.png",
26301
26338
  alt: ""
26302
26339
  }
26303
26340
  ),
26304
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AvatarFallback, { children: "hello" })
26341
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AvatarFallback, { children: "hello" })
26305
26342
  ] }) }) }),
26306
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuContent, { className: "w-56", align: "end", forceMount: true, children: [
26307
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuLabel, { className: "font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col space-y-1", children: [
26308
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm leading-none font-medium", children: "Admin" }),
26309
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-muted-foreground text-xs leading-none", children: "admin@gmail.com" })
26343
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuContent, { className: "w-56", align: "end", forceMount: true, children: [
26344
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuLabel, { className: "font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col space-y-1", children: [
26345
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm leading-none font-medium", children: "Admin" }),
26346
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-muted-foreground text-xs leading-none", children: "admin@gmail.com" })
26310
26347
  ] }) }),
26311
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuSeparator, {}),
26312
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuGroup, { children: [
26313
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuItem, { children: [
26348
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuSeparator, {}),
26349
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuGroup, { children: [
26350
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuItem, { children: [
26314
26351
  "Profile",
26315
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuShortcut, { children: "\u21E7\u2318P" })
26352
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuShortcut, { children: "\u21E7\u2318P" })
26316
26353
  ] }),
26317
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuItem, { children: [
26354
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuItem, { children: [
26318
26355
  "Billing",
26319
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuShortcut, { children: "\u2318B" })
26356
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuShortcut, { children: "\u2318B" })
26320
26357
  ] }),
26321
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuItem, { children: [
26358
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuItem, { children: [
26322
26359
  "Settings",
26323
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuShortcut, { children: "\u2318S" })
26360
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuShortcut, { children: "\u2318S" })
26324
26361
  ] }),
26325
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuItem, { children: "New Team" })
26362
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuItem, { children: "New Team" })
26326
26363
  ] }),
26327
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuSeparator, {}),
26328
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuItem, { onClick: () => console.log("logout"), children: [
26364
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuSeparator, {}),
26365
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuItem, { onClick: () => console.log("logout"), children: [
26329
26366
  "Log out",
26330
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuShortcut, { children: "\u21E7\u2318Q" })
26367
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuShortcut, { children: "\u21E7\u2318Q" })
26331
26368
  ] })
26332
26369
  ] })
26333
26370
  ] });
@@ -26505,6 +26542,7 @@ function UserNav() {
26505
26542
  ResizablePanelGroup,
26506
26543
  ScrollArea,
26507
26544
  ScrollBar,
26545
+ SearchInput,
26508
26546
  Select,
26509
26547
  SelectContent,
26510
26548
  SelectGroup,