shadcn-ui-react 0.2.8 → 0.3.1

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.js CHANGED
@@ -319,11 +319,12 @@ var BreadcrumbEllipsis = (_a) => {
319
319
  };
320
320
  BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
321
321
 
322
- // src/components/button.tsx
322
+ // src/components/Button/button.tsx
323
323
  import { Slot as Slot2 } from "@radix-ui/react-slot";
324
324
  import { cva as cva3 } from "class-variance-authority";
325
325
  import * as React5 from "react";
326
- import { jsx as jsx6 } from "react/jsx-runtime";
326
+ import { Loader2 } from "lucide-react";
327
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
327
328
  var buttonVariants = cva3(
328
329
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
329
330
  {
@@ -351,14 +352,40 @@ var buttonVariants = cva3(
351
352
  );
352
353
  var Button = React5.forwardRef(
353
354
  (_a, ref) => {
354
- var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
355
+ var _b = _a, {
356
+ className,
357
+ variant,
358
+ size,
359
+ asChild = false,
360
+ loading = false,
361
+ loaderClassName,
362
+ children
363
+ } = _b, props = __objRest(_b, [
364
+ "className",
365
+ "variant",
366
+ "size",
367
+ "asChild",
368
+ "loading",
369
+ "loaderClassName",
370
+ "children"
371
+ ]);
355
372
  const Comp = asChild ? Slot2 : "button";
356
- return /* @__PURE__ */ jsx6(
373
+ return /* @__PURE__ */ jsxs3(
357
374
  Comp,
358
- __spreadValues({
359
- className: cn(buttonVariants({ variant, size, className })),
360
- ref
361
- }, props)
375
+ __spreadProps(__spreadValues({
376
+ className: cn(
377
+ buttonVariants({ variant, size }),
378
+ className,
379
+ loading && "relative"
380
+ ),
381
+ ref,
382
+ disabled: loading || props.disabled
383
+ }, props), {
384
+ children: [
385
+ loading ? /* @__PURE__ */ jsx6(Loader2, { className: cn(loaderClassName, "animate-spin mr-2") }) : null,
386
+ children
387
+ ]
388
+ })
362
389
  );
363
390
  }
364
391
  );
@@ -4493,7 +4520,7 @@ CardFooter.displayName = "CardFooter";
4493
4520
  import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons";
4494
4521
  import useEmblaCarousel from "embla-carousel-react";
4495
4522
  import * as React34 from "react";
4496
- import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
4523
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
4497
4524
  var CarouselContext = React34.createContext(null);
4498
4525
  function useCarousel() {
4499
4526
  const context = React34.useContext(CarouselContext);
@@ -4636,7 +4663,7 @@ CarouselItem.displayName = "CarouselItem";
4636
4663
  var CarouselPrevious = React34.forwardRef((_a, ref) => {
4637
4664
  var _b = _a, { className, variant = "outline", size = "icon" } = _b, props = __objRest(_b, ["className", "variant", "size"]);
4638
4665
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
4639
- return /* @__PURE__ */ jsxs3(
4666
+ return /* @__PURE__ */ jsxs4(
4640
4667
  Button,
4641
4668
  __spreadProps(__spreadValues({
4642
4669
  ref,
@@ -4661,7 +4688,7 @@ CarouselPrevious.displayName = "CarouselPrevious";
4661
4688
  var CarouselNext = React34.forwardRef((_a, ref) => {
4662
4689
  var _b = _a, { className, variant = "outline", size = "icon" } = _b, props = __objRest(_b, ["className", "variant", "size"]);
4663
4690
  const { orientation, scrollNext, canScrollNext } = useCarousel();
4664
- return /* @__PURE__ */ jsxs3(
4691
+ return /* @__PURE__ */ jsxs4(
4665
4692
  Button,
4666
4693
  __spreadProps(__spreadValues({
4667
4694
  ref,
@@ -4727,7 +4754,7 @@ import * as React37 from "react";
4727
4754
  import * as DialogPrimitive from "@radix-ui/react-dialog";
4728
4755
  import { Cross2Icon } from "@radix-ui/react-icons";
4729
4756
  import * as React36 from "react";
4730
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
4757
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
4731
4758
  var Dialog = DialogPrimitive.Root;
4732
4759
  var DialogTrigger = DialogPrimitive.Trigger;
4733
4760
  var DialogPortal = DialogPrimitive.Portal;
@@ -4748,9 +4775,9 @@ var DialogOverlay = React36.forwardRef((_a, ref) => {
4748
4775
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
4749
4776
  var DialogContent = React36.forwardRef((_a, ref) => {
4750
4777
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
4751
- return /* @__PURE__ */ jsxs4(DialogPortal, { children: [
4778
+ return /* @__PURE__ */ jsxs5(DialogPortal, { children: [
4752
4779
  /* @__PURE__ */ jsx11(DialogOverlay, {}),
4753
- /* @__PURE__ */ jsxs4(
4780
+ /* @__PURE__ */ jsxs5(
4754
4781
  DialogPrimitive.Content,
4755
4782
  __spreadProps(__spreadValues({
4756
4783
  ref,
@@ -4761,7 +4788,7 @@ var DialogContent = React36.forwardRef((_a, ref) => {
4761
4788
  }, props), {
4762
4789
  children: [
4763
4790
  children,
4764
- /* @__PURE__ */ jsxs4(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
4791
+ /* @__PURE__ */ jsxs5(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
4765
4792
  /* @__PURE__ */ jsx11(Cross2Icon, { className: "h-4 w-4" }),
4766
4793
  /* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Close" })
4767
4794
  ] })
@@ -4832,7 +4859,7 @@ var DialogDescription = React36.forwardRef((_a, ref) => {
4832
4859
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
4833
4860
 
4834
4861
  // src/components/command.tsx
4835
- import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
4862
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
4836
4863
  var Command = React37.forwardRef((_a, ref) => {
4837
4864
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4838
4865
  return /* @__PURE__ */ jsx12(
@@ -4853,7 +4880,7 @@ var CommandDialog = (_a) => {
4853
4880
  };
4854
4881
  var CommandInput = React37.forwardRef((_a, ref) => {
4855
4882
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4856
- return /* @__PURE__ */ jsxs5("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
4883
+ return /* @__PURE__ */ jsxs6("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
4857
4884
  /* @__PURE__ */ jsx12(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
4858
4885
  /* @__PURE__ */ jsx12(
4859
4886
  CommandPrimitive.Input,
@@ -4952,7 +4979,7 @@ import {
4952
4979
  DotFilledIcon
4953
4980
  } from "@radix-ui/react-icons";
4954
4981
  import * as React38 from "react";
4955
- import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
4982
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
4956
4983
  var ContextMenu = ContextMenuPrimitive.Root;
4957
4984
  var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
4958
4985
  var ContextMenuGroup = ContextMenuPrimitive.Group;
@@ -4961,7 +4988,7 @@ var ContextMenuSub = ContextMenuPrimitive.Sub;
4961
4988
  var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
4962
4989
  var ContextMenuSubTrigger = React38.forwardRef((_a, ref) => {
4963
4990
  var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
4964
- return /* @__PURE__ */ jsxs6(
4991
+ return /* @__PURE__ */ jsxs7(
4965
4992
  ContextMenuPrimitive.SubTrigger,
4966
4993
  __spreadProps(__spreadValues({
4967
4994
  ref,
@@ -5024,7 +5051,7 @@ var ContextMenuItem = React38.forwardRef((_a, ref) => {
5024
5051
  ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
5025
5052
  var ContextMenuCheckboxItem = React38.forwardRef((_a, ref) => {
5026
5053
  var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
5027
- return /* @__PURE__ */ jsxs6(
5054
+ return /* @__PURE__ */ jsxs7(
5028
5055
  ContextMenuPrimitive.CheckboxItem,
5029
5056
  __spreadProps(__spreadValues({
5030
5057
  ref,
@@ -5044,7 +5071,7 @@ var ContextMenuCheckboxItem = React38.forwardRef((_a, ref) => {
5044
5071
  ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
5045
5072
  var ContextMenuRadioItem = React38.forwardRef((_a, ref) => {
5046
5073
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
5047
- return /* @__PURE__ */ jsxs6(
5074
+ return /* @__PURE__ */ jsxs7(
5048
5075
  ContextMenuPrimitive.RadioItem,
5049
5076
  __spreadProps(__spreadValues({
5050
5077
  ref,
@@ -5108,7 +5135,7 @@ ContextMenuShortcut.displayName = "ContextMenuShortcut";
5108
5135
  // src/components/drawer.tsx
5109
5136
  import * as React39 from "react";
5110
5137
  import { Drawer as DrawerPrimitive } from "vaul";
5111
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
5138
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
5112
5139
  var Drawer = (_a) => {
5113
5140
  var _b = _a, {
5114
5141
  shouldScaleBackground = true
@@ -5139,9 +5166,9 @@ var DrawerOverlay = React39.forwardRef((_a, ref) => {
5139
5166
  DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
5140
5167
  var DrawerContent = React39.forwardRef((_a, ref) => {
5141
5168
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
5142
- return /* @__PURE__ */ jsxs7(DrawerPortal, { children: [
5169
+ return /* @__PURE__ */ jsxs8(DrawerPortal, { children: [
5143
5170
  /* @__PURE__ */ jsx14(DrawerOverlay, {}),
5144
- /* @__PURE__ */ jsxs7(
5171
+ /* @__PURE__ */ jsxs8(
5145
5172
  DrawerPrimitive.Content,
5146
5173
  __spreadProps(__spreadValues({
5147
5174
  ref,
@@ -5221,7 +5248,7 @@ import {
5221
5248
  DotFilledIcon as DotFilledIcon2
5222
5249
  } from "@radix-ui/react-icons";
5223
5250
  import * as React40 from "react";
5224
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
5251
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
5225
5252
  var DropdownMenu = DropdownMenuPrimitive.Root;
5226
5253
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
5227
5254
  var DropdownMenuGroup = DropdownMenuPrimitive.Group;
@@ -5230,7 +5257,7 @@ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
5230
5257
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
5231
5258
  var DropdownMenuSubTrigger = React40.forwardRef((_a, ref) => {
5232
5259
  var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
5233
- return /* @__PURE__ */ jsxs8(
5260
+ return /* @__PURE__ */ jsxs9(
5234
5261
  DropdownMenuPrimitive.SubTrigger,
5235
5262
  __spreadProps(__spreadValues({
5236
5263
  ref,
@@ -5295,7 +5322,7 @@ var DropdownMenuItem = React40.forwardRef((_a, ref) => {
5295
5322
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
5296
5323
  var DropdownMenuCheckboxItem = React40.forwardRef((_a, ref) => {
5297
5324
  var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
5298
- return /* @__PURE__ */ jsxs8(
5325
+ return /* @__PURE__ */ jsxs9(
5299
5326
  DropdownMenuPrimitive.CheckboxItem,
5300
5327
  __spreadProps(__spreadValues({
5301
5328
  ref,
@@ -5315,7 +5342,7 @@ var DropdownMenuCheckboxItem = React40.forwardRef((_a, ref) => {
5315
5342
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
5316
5343
  var DropdownMenuRadioItem = React40.forwardRef((_a, ref) => {
5317
5344
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
5318
- return /* @__PURE__ */ jsxs8(
5345
+ return /* @__PURE__ */ jsxs9(
5319
5346
  DropdownMenuPrimitive.RadioItem,
5320
5347
  __spreadProps(__spreadValues({
5321
5348
  ref,
@@ -5402,7 +5429,7 @@ import { cva as cva4 } from "class-variance-authority";
5402
5429
  import * as React41 from "react";
5403
5430
  import { jsx as jsx17 } from "react/jsx-runtime";
5404
5431
  var labelVariants = cva4(
5405
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
5432
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
5406
5433
  );
5407
5434
  var Label3 = React41.forwardRef((_a, ref) => {
5408
5435
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -5441,7 +5468,8 @@ var Input = React42.forwardRef(
5441
5468
  Input.displayName = "Input";
5442
5469
 
5443
5470
  // src/components/Form/form-field.tsx
5444
- import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
5471
+ import { Asterisk } from "lucide-react";
5472
+ import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
5445
5473
  var FormFieldContext = React43.createContext(
5446
5474
  null
5447
5475
  );
@@ -5451,11 +5479,11 @@ var FormField = (_a) => {
5451
5479
  control,
5452
5480
  label,
5453
5481
  placeholder,
5454
- required,
5482
+ requiredLabel,
5455
5483
  className = "px-4 py-6 shadow-inner drop-shadow-xl",
5456
- classNameLabel,
5457
- classNameMessage,
5458
- classNameRequired,
5484
+ labelClassName,
5485
+ messageClassName,
5486
+ requiredLabelClassName,
5459
5487
  rules,
5460
5488
  shouldUnregister,
5461
5489
  defaultValue,
@@ -5465,11 +5493,11 @@ var FormField = (_a) => {
5465
5493
  "control",
5466
5494
  "label",
5467
5495
  "placeholder",
5468
- "required",
5496
+ "requiredLabel",
5469
5497
  "className",
5470
- "classNameLabel",
5471
- "classNameMessage",
5472
- "classNameRequired",
5498
+ "labelClassName",
5499
+ "messageClassName",
5500
+ "requiredLabelClassName",
5473
5501
  "rules",
5474
5502
  "shouldUnregister",
5475
5503
  "defaultValue",
@@ -5488,10 +5516,18 @@ var FormField = (_a) => {
5488
5516
  rules,
5489
5517
  shouldUnregister,
5490
5518
  defaultValue,
5491
- render: ({ field }) => /* @__PURE__ */ jsxs9(FormItem, { children: [
5492
- label && /* @__PURE__ */ jsxs9(FormLabel, { className: classNameLabel, children: [
5519
+ render: ({ field }) => /* @__PURE__ */ jsxs10(FormItem, { children: [
5520
+ label && /* @__PURE__ */ jsxs10(FormLabel, { className: cn("flex items-center self-center gap-0", labelClassName), children: [
5493
5521
  label,
5494
- required && /* @__PURE__ */ jsx19("span", { className: cn("text-red-500", classNameRequired), children: "*" })
5522
+ requiredLabel && /* @__PURE__ */ jsx19(
5523
+ Asterisk,
5524
+ {
5525
+ className: cn(
5526
+ "h-3 w-3 text-red-500 ml-[1px]",
5527
+ requiredLabelClassName
5528
+ )
5529
+ }
5530
+ )
5495
5531
  ] }),
5496
5532
  /* @__PURE__ */ jsx19(FormControl, { children: /* @__PURE__ */ jsx19(
5497
5533
  Input,
@@ -5501,11 +5537,10 @@ var FormField = (_a) => {
5501
5537
  onChange == null ? void 0 : onChange(e.target.value);
5502
5538
  },
5503
5539
  placeholder,
5504
- required,
5505
5540
  className
5506
5541
  })
5507
5542
  ) }),
5508
- fieldError && /* @__PURE__ */ jsx19(FormMessage, { className: classNameMessage, children: fieldError })
5543
+ fieldError && /* @__PURE__ */ jsx19(FormMessage, { className: messageClassName, children: fieldError })
5509
5544
  ] })
5510
5545
  }
5511
5546
  ) });
@@ -5646,7 +5681,7 @@ import {
5646
5681
  Image as Image2,
5647
5682
  Laptop,
5648
5683
  LayoutDashboardIcon,
5649
- Loader2,
5684
+ Loader2 as Loader22,
5650
5685
  LogIn,
5651
5686
  Moon,
5652
5687
  MoreVertical,
@@ -5666,7 +5701,7 @@ var IconsApp = __spreadValues({
5666
5701
  login: LogIn,
5667
5702
  close: X,
5668
5703
  profile: User2Icon,
5669
- spinner: Loader2,
5704
+ spinner: Loader22,
5670
5705
  kanban: CircuitBoardIcon,
5671
5706
  chevronLeft: ChevronLeft,
5672
5707
  chevronRight: ChevronRight,
@@ -5695,7 +5730,7 @@ var Icons = IconsApp;
5695
5730
  import { DashIcon } from "@radix-ui/react-icons";
5696
5731
  import { OTPInput, OTPInputContext } from "input-otp";
5697
5732
  import * as React45 from "react";
5698
- import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
5733
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
5699
5734
  var InputOTP = React45.forwardRef((_a, ref) => {
5700
5735
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
5701
5736
  return /* @__PURE__ */ jsx21(
@@ -5720,7 +5755,7 @@ var InputOTPSlot = React45.forwardRef((_a, ref) => {
5720
5755
  var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
5721
5756
  const inputOTPContext = React45.useContext(OTPInputContext);
5722
5757
  const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
5723
- return /* @__PURE__ */ jsxs10(
5758
+ return /* @__PURE__ */ jsxs11(
5724
5759
  "div",
5725
5760
  __spreadProps(__spreadValues({
5726
5761
  ref,
@@ -5752,7 +5787,7 @@ import {
5752
5787
  } from "@radix-ui/react-icons";
5753
5788
  import * as MenubarPrimitive from "@radix-ui/react-menubar";
5754
5789
  import * as React46 from "react";
5755
- import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
5790
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
5756
5791
  var MenubarMenu = MenubarPrimitive.Menu;
5757
5792
  var MenubarGroup = MenubarPrimitive.Group;
5758
5793
  var MenubarPortal = MenubarPrimitive.Portal;
@@ -5788,7 +5823,7 @@ var MenubarTrigger = React46.forwardRef((_a, ref) => {
5788
5823
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
5789
5824
  var MenubarSubTrigger = React46.forwardRef((_a, ref) => {
5790
5825
  var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
5791
- return /* @__PURE__ */ jsxs11(
5826
+ return /* @__PURE__ */ jsxs12(
5792
5827
  MenubarPrimitive.SubTrigger,
5793
5828
  __spreadProps(__spreadValues({
5794
5829
  ref,
@@ -5856,7 +5891,7 @@ var MenubarItem = React46.forwardRef((_a, ref) => {
5856
5891
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
5857
5892
  var MenubarCheckboxItem = React46.forwardRef((_a, ref) => {
5858
5893
  var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
5859
- return /* @__PURE__ */ jsxs11(
5894
+ return /* @__PURE__ */ jsxs12(
5860
5895
  MenubarPrimitive.CheckboxItem,
5861
5896
  __spreadProps(__spreadValues({
5862
5897
  ref,
@@ -5876,7 +5911,7 @@ var MenubarCheckboxItem = React46.forwardRef((_a, ref) => {
5876
5911
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
5877
5912
  var MenubarRadioItem = React46.forwardRef((_a, ref) => {
5878
5913
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
5879
- return /* @__PURE__ */ jsxs11(
5914
+ return /* @__PURE__ */ jsxs12(
5880
5915
  MenubarPrimitive.RadioItem,
5881
5916
  __spreadProps(__spreadValues({
5882
5917
  ref,
@@ -5938,7 +5973,7 @@ var MenubarShortcut = (_a) => {
5938
5973
  MenubarShortcut.displayname = "MenubarShortcut";
5939
5974
 
5940
5975
  // src/components/modal.tsx
5941
- import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
5976
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
5942
5977
  var Modal = ({
5943
5978
  title,
5944
5979
  description,
@@ -5952,8 +5987,8 @@ var Modal = ({
5952
5987
  onClose();
5953
5988
  }
5954
5989
  };
5955
- return /* @__PURE__ */ jsx23(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ jsxs12(DialogContent, { className, children: [
5956
- /* @__PURE__ */ jsxs12(DialogHeader, { children: [
5990
+ return /* @__PURE__ */ jsx23(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ jsxs13(DialogContent, { className, children: [
5991
+ /* @__PURE__ */ jsxs13(DialogHeader, { children: [
5957
5992
  /* @__PURE__ */ jsx23(DialogTitle, { children: title }),
5958
5993
  /* @__PURE__ */ jsx23(DialogDescription, { children: description })
5959
5994
  ] }),
@@ -5966,10 +6001,10 @@ import { ChevronDownIcon as ChevronDownIcon2 } from "@radix-ui/react-icons";
5966
6001
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
5967
6002
  import { cva as cva5 } from "class-variance-authority";
5968
6003
  import * as React47 from "react";
5969
- import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
6004
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
5970
6005
  var NavigationMenu = React47.forwardRef((_a, ref) => {
5971
6006
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
5972
- return /* @__PURE__ */ jsxs13(
6007
+ return /* @__PURE__ */ jsxs14(
5973
6008
  NavigationMenuPrimitive.Root,
5974
6009
  __spreadProps(__spreadValues({
5975
6010
  ref,
@@ -6006,7 +6041,7 @@ var navigationMenuTriggerStyle = cva5(
6006
6041
  );
6007
6042
  var NavigationMenuTrigger = React47.forwardRef((_a, ref) => {
6008
6043
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6009
- return /* @__PURE__ */ jsxs13(
6044
+ return /* @__PURE__ */ jsxs14(
6010
6045
  NavigationMenuPrimitive.Trigger,
6011
6046
  __spreadProps(__spreadValues({
6012
6047
  ref,
@@ -6081,7 +6116,7 @@ import {
6081
6116
  } from "@radix-ui/react-icons";
6082
6117
  import * as React48 from "react";
6083
6118
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
6084
- import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
6119
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
6085
6120
  var Pagination = (_a) => {
6086
6121
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6087
6122
  return /* @__PURE__ */ jsx25(
@@ -6141,7 +6176,7 @@ var PaginationPreviousLast = (_a) => {
6141
6176
  } = _b, props = __objRest(_b, [
6142
6177
  "className"
6143
6178
  ]);
6144
- return /* @__PURE__ */ jsxs14(
6179
+ return /* @__PURE__ */ jsxs15(
6145
6180
  PaginationLink,
6146
6181
  __spreadProps(__spreadValues({
6147
6182
  "aria-label": "Go to previous page",
@@ -6162,7 +6197,7 @@ var PaginationPrevious = (_a) => {
6162
6197
  } = _b, props = __objRest(_b, [
6163
6198
  "className"
6164
6199
  ]);
6165
- return /* @__PURE__ */ jsxs14(
6200
+ return /* @__PURE__ */ jsxs15(
6166
6201
  PaginationLink,
6167
6202
  __spreadProps(__spreadValues({
6168
6203
  "aria-label": "Go to previous page",
@@ -6183,7 +6218,7 @@ var PaginationNext = (_a) => {
6183
6218
  } = _b, props = __objRest(_b, [
6184
6219
  "className"
6185
6220
  ]);
6186
- return /* @__PURE__ */ jsxs14(
6221
+ return /* @__PURE__ */ jsxs15(
6187
6222
  PaginationLink,
6188
6223
  __spreadProps(__spreadValues({
6189
6224
  "aria-label": "Go to next page",
@@ -6204,7 +6239,7 @@ var PaginationNextLast = (_a) => {
6204
6239
  } = _b, props = __objRest(_b, [
6205
6240
  "className"
6206
6241
  ]);
6207
- return /* @__PURE__ */ jsxs14(
6242
+ return /* @__PURE__ */ jsxs15(
6208
6243
  PaginationLink,
6209
6244
  __spreadProps(__spreadValues({
6210
6245
  "aria-label": "Go to next page",
@@ -6225,7 +6260,7 @@ var PaginationEllipsis = (_a) => {
6225
6260
  } = _b, props = __objRest(_b, [
6226
6261
  "className"
6227
6262
  ]);
6228
- return /* @__PURE__ */ jsxs14(
6263
+ return /* @__PURE__ */ jsxs15(
6229
6264
  "span",
6230
6265
  __spreadProps(__spreadValues({
6231
6266
  "aria-hidden": true,
@@ -6370,10 +6405,10 @@ var ResizableHandle = (_a) => {
6370
6405
  // src/components/scroll-area.tsx
6371
6406
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
6372
6407
  import * as React52 from "react";
6373
- import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
6408
+ import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
6374
6409
  var ScrollArea = React52.forwardRef((_a, ref) => {
6375
6410
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6376
- return /* @__PURE__ */ jsxs15(
6411
+ return /* @__PURE__ */ jsxs16(
6377
6412
  ScrollAreaPrimitive.Root,
6378
6413
  __spreadProps(__spreadValues({
6379
6414
  ref,
@@ -6453,13 +6488,13 @@ import {
6453
6488
  } from "@radix-ui/react-icons";
6454
6489
  import * as SelectPrimitive from "@radix-ui/react-select";
6455
6490
  import * as React54 from "react";
6456
- import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
6491
+ import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
6457
6492
  var Select2 = SelectPrimitive.Root;
6458
6493
  var SelectGroup = SelectPrimitive.Group;
6459
6494
  var SelectValue = SelectPrimitive.Value;
6460
6495
  var SelectTrigger = React54.forwardRef((_a, ref) => {
6461
6496
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6462
- return /* @__PURE__ */ jsxs16(
6497
+ return /* @__PURE__ */ jsxs17(
6463
6498
  SelectPrimitive.Trigger,
6464
6499
  __spreadProps(__spreadValues({
6465
6500
  ref,
@@ -6510,7 +6545,7 @@ var SelectScrollDownButton = React54.forwardRef((_a, ref) => {
6510
6545
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
6511
6546
  var SelectContent = React54.forwardRef((_a, ref) => {
6512
6547
  var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
6513
- return /* @__PURE__ */ jsx32(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs16(
6548
+ return /* @__PURE__ */ jsx32(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs17(
6514
6549
  SelectPrimitive.Content,
6515
6550
  __spreadProps(__spreadValues({
6516
6551
  ref,
@@ -6552,7 +6587,7 @@ var SelectLabel = React54.forwardRef((_a, ref) => {
6552
6587
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
6553
6588
  var SelectItem = React54.forwardRef((_a, ref) => {
6554
6589
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6555
- return /* @__PURE__ */ jsxs16(
6590
+ return /* @__PURE__ */ jsxs17(
6556
6591
  SelectPrimitive.Item,
6557
6592
  __spreadProps(__spreadValues({
6558
6593
  ref,
@@ -6610,7 +6645,7 @@ import * as SheetPrimitive from "@radix-ui/react-dialog";
6610
6645
  import { Cross2Icon as Cross2Icon2 } from "@radix-ui/react-icons";
6611
6646
  import { cva as cva6 } from "class-variance-authority";
6612
6647
  import * as React56 from "react";
6613
- import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
6648
+ import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
6614
6649
  var Sheet = SheetPrimitive.Root;
6615
6650
  var SheetTrigger = SheetPrimitive.Trigger;
6616
6651
  var SheetClose = SheetPrimitive.Close;
@@ -6648,9 +6683,9 @@ var sheetVariants = cva6(
6648
6683
  );
6649
6684
  var SheetContent = React56.forwardRef((_a, ref) => {
6650
6685
  var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
6651
- return /* @__PURE__ */ jsxs17(SheetPortal, { children: [
6686
+ return /* @__PURE__ */ jsxs18(SheetPortal, { children: [
6652
6687
  /* @__PURE__ */ jsx34(SheetOverlay, {}),
6653
- /* @__PURE__ */ jsxs17(
6688
+ /* @__PURE__ */ jsxs18(
6654
6689
  SheetPrimitive.Content,
6655
6690
  __spreadProps(__spreadValues({
6656
6691
  ref,
@@ -6658,7 +6693,7 @@ var SheetContent = React56.forwardRef((_a, ref) => {
6658
6693
  }, props), {
6659
6694
  children: [
6660
6695
  children,
6661
- /* @__PURE__ */ jsxs17(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
6696
+ /* @__PURE__ */ jsxs18(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
6662
6697
  /* @__PURE__ */ jsx34(Cross2Icon2, { className: "h-4 w-4" }),
6663
6698
  /* @__PURE__ */ jsx34("span", { className: "sr-only", children: "Close" })
6664
6699
  ] })
@@ -6744,10 +6779,10 @@ function Skeleton(_a) {
6744
6779
  // src/components/slider.tsx
6745
6780
  import * as SliderPrimitive from "@radix-ui/react-slider";
6746
6781
  import * as React57 from "react";
6747
- import { jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
6782
+ import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
6748
6783
  var Slider = React57.forwardRef((_a, ref) => {
6749
6784
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6750
- return /* @__PURE__ */ jsxs18(
6785
+ return /* @__PURE__ */ jsxs19(
6751
6786
  SliderPrimitive.Root,
6752
6787
  __spreadProps(__spreadValues({
6753
6788
  ref,
@@ -7298,7 +7333,7 @@ function useToast() {
7298
7333
  }
7299
7334
 
7300
7335
  // src/shared/alert-modal.tsx
7301
- import { jsx as jsx46, jsxs as jsxs19 } from "react/jsx-runtime";
7336
+ import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
7302
7337
  var AlertModal = ({
7303
7338
  isOpen,
7304
7339
  onClose,
@@ -7319,7 +7354,7 @@ var AlertModal = ({
7319
7354
  isOpen,
7320
7355
  onClose,
7321
7356
  className,
7322
- children: children ? children : /* @__PURE__ */ jsxs19("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
7357
+ children: children ? children : /* @__PURE__ */ jsxs20("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
7323
7358
  /* @__PURE__ */ jsx46(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
7324
7359
  /* @__PURE__ */ jsx46(Button, { disabled: loading, variant: "destructive", onClick: onConfirm, children: confirmText })
7325
7360
  ] })
@@ -7330,9 +7365,9 @@ var AlertModal = ({
7330
7365
  // src/shared/breadcrumbs.tsx
7331
7366
  import { Slash } from "lucide-react";
7332
7367
  import { Fragment } from "react";
7333
- import { jsx as jsx47, jsxs as jsxs20 } from "react/jsx-runtime";
7368
+ import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
7334
7369
  function Breadcrumbs({ items, className, classNameList }) {
7335
- return /* @__PURE__ */ jsx47(Breadcrumb, { className, children: /* @__PURE__ */ jsx47(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ jsxs20(Fragment, { children: [
7370
+ return /* @__PURE__ */ jsx47(Breadcrumb, { className, children: /* @__PURE__ */ jsx47(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ jsxs21(Fragment, { children: [
7336
7371
  index !== items.length - 1 && /* @__PURE__ */ jsx47(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx47(BreadcrumbLink, { href: item.link, children: item.title }) }),
7337
7372
  index < items.length - 1 && /* @__PURE__ */ jsx47(BreadcrumbSeparator, { children: /* @__PURE__ */ jsx47(Slash, {}) }),
7338
7373
  index === items.length - 1 && /* @__PURE__ */ jsx47(BreadcrumbPage, { children: item.title })
@@ -7353,7 +7388,7 @@ import {
7353
7388
  useReactTable
7354
7389
  } from "@tanstack/react-table";
7355
7390
  import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
7356
- import { Fragment as Fragment2, jsx as jsx48, jsxs as jsxs21 } from "react/jsx-runtime";
7391
+ import { Fragment as Fragment2, jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
7357
7392
  function DataTable({
7358
7393
  columns,
7359
7394
  data,
@@ -7364,6 +7399,8 @@ function DataTable({
7364
7399
  rowPerPageLabel = "Rows per page",
7365
7400
  ofLabel = "of",
7366
7401
  pageLabel = "Page",
7402
+ isRowsSelected = true,
7403
+ rowsSelectedLabel = "row(s) selected",
7367
7404
  className,
7368
7405
  emptyData,
7369
7406
  bodyClassName,
@@ -7372,7 +7409,8 @@ function DataTable({
7372
7409
  rowClassName,
7373
7410
  tableClassName,
7374
7411
  onPageChange,
7375
- onClick
7412
+ onClick,
7413
+ onPageSizeChange
7376
7414
  }) {
7377
7415
  const [pagination, setPagination] = React67.useState({
7378
7416
  pageIndex: Math.max(page - 1, 0),
@@ -7397,11 +7435,11 @@ function DataTable({
7397
7435
  };
7398
7436
  useEffect4(() => {
7399
7437
  if (onPageChange) {
7400
- onPageChange(pagination.pageIndex);
7438
+ onPageChange(pagination.pageIndex + 1);
7401
7439
  }
7402
- }, [pagination, setPagination]);
7403
- return /* @__PURE__ */ jsxs21(Fragment2, { children: [
7404
- /* @__PURE__ */ jsxs21(
7440
+ }, [pagination]);
7441
+ return /* @__PURE__ */ jsxs22(Fragment2, { children: [
7442
+ /* @__PURE__ */ jsxs22(
7405
7443
  ScrollArea,
7406
7444
  {
7407
7445
  className: cn(
@@ -7409,7 +7447,7 @@ function DataTable({
7409
7447
  className
7410
7448
  ),
7411
7449
  children: [
7412
- /* @__PURE__ */ jsxs21(Table, { className: cn("relative", tableClassName), children: [
7450
+ /* @__PURE__ */ jsxs22(Table, { className: cn("relative", tableClassName), children: [
7413
7451
  /* @__PURE__ */ jsx48(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx48(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx48(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : flexRender(
7414
7452
  header.column.columnDef.header,
7415
7453
  header.getContext()
@@ -7439,23 +7477,30 @@ function DataTable({
7439
7477
  ]
7440
7478
  }
7441
7479
  ),
7442
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row", children: [
7443
- /* @__PURE__ */ jsxs21("div", { className: "flex w-full items-center justify-between", children: [
7444
- /* @__PURE__ */ jsxs21("div", { className: "text-muted-foreground flex-1 text-sm", children: [
7480
+ /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row", children: [
7481
+ /* @__PURE__ */ jsxs22("div", { className: "flex w-full items-center justify-between", children: [
7482
+ isRowsSelected ? /* @__PURE__ */ jsxs22("div", { className: "text-muted-foreground flex-1 text-sm", children: [
7445
7483
  table.getFilteredSelectedRowModel().rows.length,
7446
7484
  " ",
7447
7485
  ofLabel,
7448
7486
  " ",
7449
7487
  table.getFilteredRowModel().rows.length,
7450
- " row(s) selected."
7451
- ] }),
7452
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center space-x-2", children: [
7488
+ " " + rowsSelectedLabel
7489
+ ] }) : null,
7490
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center space-x-2", children: [
7453
7491
  /* @__PURE__ */ jsx48("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
7454
- /* @__PURE__ */ jsxs21(
7492
+ /* @__PURE__ */ jsxs22(
7455
7493
  Select2,
7456
7494
  {
7457
7495
  value: `${pagination.pageSize}`,
7458
- onValueChange: (value) => setPagination(__spreadProps(__spreadValues({}, pagination), { pageSize: Number(value) })),
7496
+ onValueChange: (value) => {
7497
+ const newSize = Number(value);
7498
+ setPagination(__spreadProps(__spreadValues({}, pagination), {
7499
+ pageSize: newSize,
7500
+ pageIndex: 0
7501
+ }));
7502
+ if (onPageSizeChange) onPageSizeChange(newSize);
7503
+ },
7459
7504
  children: [
7460
7505
  /* @__PURE__ */ jsx48(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ jsx48(SelectValue, { placeholder: pagination.pageSize }) }),
7461
7506
  /* @__PURE__ */ jsx48(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx48(SelectItem, { value: `${size}`, children: size }, size)) })
@@ -7464,8 +7509,8 @@ function DataTable({
7464
7509
  )
7465
7510
  ] })
7466
7511
  ] }),
7467
- /* @__PURE__ */ jsxs21("div", { className: "flex w-full items-center justify-between gap-2 sm:justify-end", children: [
7468
- /* @__PURE__ */ jsxs21("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
7512
+ /* @__PURE__ */ jsxs22("div", { className: "flex w-full items-center justify-between gap-2 sm:justify-end", children: [
7513
+ /* @__PURE__ */ jsxs22("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
7469
7514
  pageLabel,
7470
7515
  " ",
7471
7516
  pagination.pageIndex + 1,
@@ -7474,7 +7519,7 @@ function DataTable({
7474
7519
  " ",
7475
7520
  pageCount
7476
7521
  ] }),
7477
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center space-x-2", children: [
7522
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center space-x-2", children: [
7478
7523
  /* @__PURE__ */ jsx48(
7479
7524
  Button,
7480
7525
  {
@@ -7530,7 +7575,7 @@ function DataTable({
7530
7575
  }
7531
7576
 
7532
7577
  // src/shared/data-table-skeleton.tsx
7533
- import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
7578
+ import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
7534
7579
  function DataTableSkeleton({
7535
7580
  columnCount,
7536
7581
  rowCount = 10,
@@ -7538,27 +7583,27 @@ function DataTableSkeleton({
7538
7583
  filterableColumnCount = 0,
7539
7584
  showViewOptions = true
7540
7585
  }) {
7541
- return /* @__PURE__ */ jsxs22("div", { className: "w-full space-y-3 overflow-auto", children: [
7542
- /* @__PURE__ */ jsxs22("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
7543
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
7586
+ return /* @__PURE__ */ jsxs23("div", { className: "w-full space-y-3 overflow-auto", children: [
7587
+ /* @__PURE__ */ jsxs23("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
7588
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
7544
7589
  searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ jsx49(Skeleton, { className: "h-10 w-[150px] lg:w-[250px]" }, i)) : null,
7545
7590
  filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ jsx49(Skeleton, { className: "h-10 w-[70px] border-dashed" }, i)) : null
7546
7591
  ] }),
7547
7592
  showViewOptions ? /* @__PURE__ */ jsx49(Skeleton, { className: "ml-auto hidden h-7 w-[70px] lg:flex" }) : null
7548
7593
  ] }),
7549
- /* @__PURE__ */ jsx49("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs22(Table, { children: [
7594
+ /* @__PURE__ */ jsx49("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs23(Table, { children: [
7550
7595
  /* @__PURE__ */ jsx49(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ jsx49(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx49(TableHead, { children: /* @__PURE__ */ jsx49(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
7551
7596
  /* @__PURE__ */ jsx49(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ jsx49(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx49(TableCell, { children: /* @__PURE__ */ jsx49(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
7552
7597
  ] }) }),
7553
- /* @__PURE__ */ jsxs22("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: [
7598
+ /* @__PURE__ */ jsxs23("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: [
7554
7599
  /* @__PURE__ */ jsx49("div", { className: "flex-1", children: /* @__PURE__ */ jsx49(Skeleton, { className: "h-8 w-40" }) }),
7555
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
7556
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center space-x-2", children: [
7600
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
7601
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center space-x-2", children: [
7557
7602
  /* @__PURE__ */ jsx49(Skeleton, { className: "h-8 w-24" }),
7558
7603
  /* @__PURE__ */ jsx49(Skeleton, { className: "h-8 w-[70px]" })
7559
7604
  ] }),
7560
7605
  /* @__PURE__ */ jsx49("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: /* @__PURE__ */ jsx49(Skeleton, { className: "h-8 w-20" }) }),
7561
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center space-x-2", children: [
7606
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center space-x-2", children: [
7562
7607
  /* @__PURE__ */ jsx49(Skeleton, { className: "hidden size-8 lg:block" }),
7563
7608
  /* @__PURE__ */ jsx49(Skeleton, { className: "size-8" }),
7564
7609
  /* @__PURE__ */ jsx49(Skeleton, { className: "size-8" }),
@@ -7574,7 +7619,7 @@ import { AvatarIcon } from "@radix-ui/react-icons";
7574
7619
  import { CameraIcon } from "lucide-react";
7575
7620
  import { useEffect as useEffect5, useState as useState5 } from "react";
7576
7621
  import { useDropzone } from "react-dropzone";
7577
- import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
7622
+ import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
7578
7623
  function FileUpload({
7579
7624
  onChange,
7580
7625
  value,
@@ -7599,10 +7644,10 @@ function FileUpload({
7599
7644
  "relative h-36 w-36 overflow-hidden rounded-full bg-gray-200 shadow-2xl ",
7600
7645
  classNameContent
7601
7646
  ),
7602
- children: /* @__PURE__ */ jsxs23("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
7647
+ children: /* @__PURE__ */ jsxs24("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
7603
7648
  /* @__PURE__ */ jsx50("input", __spreadValues({}, getInputProps())),
7604
7649
  value && !!value.length ? /* @__PURE__ */ jsx50(ImagePreview, { file: value[0] }) : /* @__PURE__ */ jsx50(AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
7605
- /* @__PURE__ */ jsxs23("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: [
7650
+ /* @__PURE__ */ jsxs24("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: [
7606
7651
  /* @__PURE__ */ jsx50(CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
7607
7652
  label
7608
7653
  ] })
@@ -7630,9 +7675,9 @@ function ImagePreview({ file }) {
7630
7675
  }
7631
7676
 
7632
7677
  // src/shared/heading.tsx
7633
- import { jsx as jsx51, jsxs as jsxs24 } from "react/jsx-runtime";
7678
+ import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
7634
7679
  function Heading({ title, description, className }) {
7635
- return /* @__PURE__ */ jsxs24("div", { className, children: [
7680
+ return /* @__PURE__ */ jsxs25("div", { className, children: [
7636
7681
  /* @__PURE__ */ jsx51("h2", { className: "text-xl font-bold tracking-tight text-primary sm:text-3xl", children: title }),
7637
7682
  /* @__PURE__ */ jsx51("p", { className: "text-sm text-muted-foreground", children: description })
7638
7683
  ] });
@@ -7640,9 +7685,9 @@ function Heading({ title, description, className }) {
7640
7685
 
7641
7686
  // src/shared/page-head.tsx
7642
7687
  import { Helmet } from "react-helmet-next";
7643
- import { jsx as jsx52, jsxs as jsxs25 } from "react/jsx-runtime";
7688
+ import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
7644
7689
  function PageHead({ title = "shadcn-ui-react" }) {
7645
- return /* @__PURE__ */ jsx52(Helmet, { children: /* @__PURE__ */ jsxs25("title", { children: [
7690
+ return /* @__PURE__ */ jsx52(Helmet, { children: /* @__PURE__ */ jsxs26("title", { children: [
7646
7691
  " ",
7647
7692
  title,
7648
7693
  " "
@@ -7650,7 +7695,7 @@ function PageHead({ title = "shadcn-ui-react" }) {
7650
7695
  }
7651
7696
 
7652
7697
  // src/shared/pagination-section.tsx
7653
- import { jsx as jsx53, jsxs as jsxs26 } from "react/jsx-runtime";
7698
+ import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
7654
7699
  function PaginationSection({
7655
7700
  totalPosts,
7656
7701
  postsPerPage,
@@ -7720,8 +7765,8 @@ function PaginationSection({
7720
7765
  }
7721
7766
  return renderedPages;
7722
7767
  };
7723
- return /* @__PURE__ */ jsx53("div", { className: "p-4", children: /* @__PURE__ */ jsx53(Pagination, { children: /* @__PURE__ */ jsxs26(PaginationContent, { children: [
7724
- /* @__PURE__ */ jsxs26(PaginationItem, { children: [
7768
+ return /* @__PURE__ */ jsx53("div", { className: "p-4", children: /* @__PURE__ */ jsx53(Pagination, { children: /* @__PURE__ */ jsxs27(PaginationContent, { children: [
7769
+ /* @__PURE__ */ jsxs27(PaginationItem, { children: [
7725
7770
  /* @__PURE__ */ jsx53(
7726
7771
  PaginationPreviousLast,
7727
7772
  {
@@ -7732,7 +7777,7 @@ function PaginationSection({
7732
7777
  /* @__PURE__ */ jsx53(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
7733
7778
  ] }),
7734
7779
  renderPages(),
7735
- /* @__PURE__ */ jsxs26(PaginationItem, { children: [
7780
+ /* @__PURE__ */ jsxs27(PaginationItem, { children: [
7736
7781
  /* @__PURE__ */ jsx53(PaginationNext, { onClick: handleNextPage, size: void 0 }),
7737
7782
  /* @__PURE__ */ jsx53(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
7738
7783
  ] })