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.cjs CHANGED
@@ -576,10 +576,11 @@ var BreadcrumbEllipsis = (_a) => {
576
576
  };
577
577
  BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
578
578
 
579
- // src/components/button.tsx
579
+ // src/components/Button/button.tsx
580
580
  var import_react_slot2 = require("@radix-ui/react-slot");
581
581
  var import_class_variance_authority3 = require("class-variance-authority");
582
582
  var React5 = __toESM(require("react"), 1);
583
+ var import_lucide_react = require("lucide-react");
583
584
  var import_jsx_runtime6 = require("react/jsx-runtime");
584
585
  var buttonVariants = (0, import_class_variance_authority3.cva)(
585
586
  "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",
@@ -608,14 +609,40 @@ var buttonVariants = (0, import_class_variance_authority3.cva)(
608
609
  );
609
610
  var Button = React5.forwardRef(
610
611
  (_a, ref) => {
611
- var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
612
+ var _b = _a, {
613
+ className,
614
+ variant,
615
+ size,
616
+ asChild = false,
617
+ loading = false,
618
+ loaderClassName,
619
+ children
620
+ } = _b, props = __objRest(_b, [
621
+ "className",
622
+ "variant",
623
+ "size",
624
+ "asChild",
625
+ "loading",
626
+ "loaderClassName",
627
+ "children"
628
+ ]);
612
629
  const Comp = asChild ? import_react_slot2.Slot : "button";
613
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
630
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
614
631
  Comp,
615
- __spreadValues({
616
- className: cn(buttonVariants({ variant, size, className })),
617
- ref
618
- }, props)
632
+ __spreadProps(__spreadValues({
633
+ className: cn(
634
+ buttonVariants({ variant, size }),
635
+ className,
636
+ loading && "relative"
637
+ ),
638
+ ref,
639
+ disabled: loading || props.disabled
640
+ }, props), {
641
+ children: [
642
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.Loader2, { className: cn(loaderClassName, "animate-spin mr-2") }) : null,
643
+ children
644
+ ]
645
+ })
619
646
  );
620
647
  }
621
648
  );
@@ -5646,7 +5673,7 @@ var import_class_variance_authority4 = require("class-variance-authority");
5646
5673
  var React41 = __toESM(require("react"), 1);
5647
5674
  var import_jsx_runtime17 = require("react/jsx-runtime");
5648
5675
  var labelVariants = (0, import_class_variance_authority4.cva)(
5649
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
5676
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
5650
5677
  );
5651
5678
  var Label3 = React41.forwardRef((_a, ref) => {
5652
5679
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -5685,6 +5712,7 @@ var Input = React42.forwardRef(
5685
5712
  Input.displayName = "Input";
5686
5713
 
5687
5714
  // src/components/Form/form-field.tsx
5715
+ var import_lucide_react2 = require("lucide-react");
5688
5716
  var import_jsx_runtime19 = require("react/jsx-runtime");
5689
5717
  var FormFieldContext = import_react33.default.createContext(
5690
5718
  null
@@ -5695,11 +5723,11 @@ var FormField = (_a) => {
5695
5723
  control,
5696
5724
  label,
5697
5725
  placeholder,
5698
- required,
5726
+ requiredLabel,
5699
5727
  className = "px-4 py-6 shadow-inner drop-shadow-xl",
5700
- classNameLabel,
5701
- classNameMessage,
5702
- classNameRequired,
5728
+ labelClassName,
5729
+ messageClassName,
5730
+ requiredLabelClassName,
5703
5731
  rules,
5704
5732
  shouldUnregister,
5705
5733
  defaultValue,
@@ -5709,11 +5737,11 @@ var FormField = (_a) => {
5709
5737
  "control",
5710
5738
  "label",
5711
5739
  "placeholder",
5712
- "required",
5740
+ "requiredLabel",
5713
5741
  "className",
5714
- "classNameLabel",
5715
- "classNameMessage",
5716
- "classNameRequired",
5742
+ "labelClassName",
5743
+ "messageClassName",
5744
+ "requiredLabelClassName",
5717
5745
  "rules",
5718
5746
  "shouldUnregister",
5719
5747
  "defaultValue",
@@ -5733,9 +5761,17 @@ var FormField = (_a) => {
5733
5761
  shouldUnregister,
5734
5762
  defaultValue,
5735
5763
  render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FormItem, { children: [
5736
- label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FormLabel, { className: classNameLabel, children: [
5764
+ label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FormLabel, { className: cn("flex items-center self-center gap-0", labelClassName), children: [
5737
5765
  label,
5738
- required && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: cn("text-red-500", classNameRequired), children: "*" })
5766
+ requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5767
+ import_lucide_react2.Asterisk,
5768
+ {
5769
+ className: cn(
5770
+ "h-3 w-3 text-red-500 ml-[1px]",
5771
+ requiredLabelClassName
5772
+ )
5773
+ }
5774
+ )
5739
5775
  ] }),
5740
5776
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5741
5777
  Input,
@@ -5745,11 +5781,10 @@ var FormField = (_a) => {
5745
5781
  onChange == null ? void 0 : onChange(e.target.value);
5746
5782
  },
5747
5783
  placeholder,
5748
- required,
5749
5784
  className
5750
5785
  })
5751
5786
  ) }),
5752
- fieldError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormMessage, { className: classNameMessage, children: fieldError })
5787
+ fieldError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormMessage, { className: messageClassName, children: fieldError })
5753
5788
  ] })
5754
5789
  }
5755
5790
  ) });
@@ -5875,35 +5910,35 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
5875
5910
 
5876
5911
  // src/components/icons.tsx
5877
5912
  var icon = __toESM(require("lucide-react"), 1);
5878
- var import_lucide_react = require("lucide-react");
5913
+ var import_lucide_react3 = require("lucide-react");
5879
5914
  var IconsApp = __spreadValues({
5880
- dashboard: import_lucide_react.LayoutDashboardIcon,
5881
- logo: import_lucide_react.Command,
5882
- login: import_lucide_react.LogIn,
5883
- close: import_lucide_react.X,
5884
- profile: import_lucide_react.User2Icon,
5885
- spinner: import_lucide_react.Loader2,
5886
- kanban: import_lucide_react.CircuitBoardIcon,
5887
- chevronLeft: import_lucide_react.ChevronLeft,
5888
- chevronRight: import_lucide_react.ChevronRight,
5889
- trash: import_lucide_react.Trash,
5890
- employee: import_lucide_react.UserX2Icon,
5891
- post: import_lucide_react.FileText,
5892
- page: import_lucide_react.File,
5893
- media: import_lucide_react.Image,
5894
- settings: import_lucide_react.Settings,
5895
- billing: import_lucide_react.CreditCard,
5896
- ellipsis: import_lucide_react.MoreVertical,
5897
- add: import_lucide_react.Plus,
5898
- warning: import_lucide_react.AlertTriangle,
5899
- user: import_lucide_react.User,
5900
- arrowRight: import_lucide_react.ArrowRight,
5901
- help: import_lucide_react.HelpCircle,
5902
- pizza: import_lucide_react.Pizza,
5903
- sun: import_lucide_react.SunMedium,
5904
- moon: import_lucide_react.Moon,
5905
- laptop: import_lucide_react.Laptop,
5906
- check: import_lucide_react.Check
5915
+ dashboard: import_lucide_react3.LayoutDashboardIcon,
5916
+ logo: import_lucide_react3.Command,
5917
+ login: import_lucide_react3.LogIn,
5918
+ close: import_lucide_react3.X,
5919
+ profile: import_lucide_react3.User2Icon,
5920
+ spinner: import_lucide_react3.Loader2,
5921
+ kanban: import_lucide_react3.CircuitBoardIcon,
5922
+ chevronLeft: import_lucide_react3.ChevronLeft,
5923
+ chevronRight: import_lucide_react3.ChevronRight,
5924
+ trash: import_lucide_react3.Trash,
5925
+ employee: import_lucide_react3.UserX2Icon,
5926
+ post: import_lucide_react3.FileText,
5927
+ page: import_lucide_react3.File,
5928
+ media: import_lucide_react3.Image,
5929
+ settings: import_lucide_react3.Settings,
5930
+ billing: import_lucide_react3.CreditCard,
5931
+ ellipsis: import_lucide_react3.MoreVertical,
5932
+ add: import_lucide_react3.Plus,
5933
+ warning: import_lucide_react3.AlertTriangle,
5934
+ user: import_lucide_react3.User,
5935
+ arrowRight: import_lucide_react3.ArrowRight,
5936
+ help: import_lucide_react3.HelpCircle,
5937
+ pizza: import_lucide_react3.Pizza,
5938
+ sun: import_lucide_react3.SunMedium,
5939
+ moon: import_lucide_react3.Moon,
5940
+ laptop: import_lucide_react3.Laptop,
5941
+ check: import_lucide_react3.Check
5907
5942
  }, icon);
5908
5943
  var Icons = IconsApp;
5909
5944
 
@@ -6288,7 +6323,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
6288
6323
  // src/components/pagination.tsx
6289
6324
  var import_react_icons12 = require("@radix-ui/react-icons");
6290
6325
  var React48 = __toESM(require("react"), 1);
6291
- var import_lucide_react2 = require("lucide-react");
6326
+ var import_lucide_react4 = require("lucide-react");
6292
6327
  var import_jsx_runtime25 = require("react/jsx-runtime");
6293
6328
  var Pagination = (_a) => {
6294
6329
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -6357,7 +6392,7 @@ var PaginationPreviousLast = (_a) => {
6357
6392
  className: cn("gap-1 pl-2.5", className)
6358
6393
  }, props), {
6359
6394
  children: [
6360
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react2.ChevronLeft, { className: "h-4 w-4" }),
6395
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronLeft, { className: "h-4 w-4" }),
6361
6396
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Previous Last" })
6362
6397
  ]
6363
6398
  })
@@ -6421,7 +6456,7 @@ var PaginationNextLast = (_a) => {
6421
6456
  }, props), {
6422
6457
  children: [
6423
6458
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Next Last" }),
6424
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react2.ChevronRight, { className: "h-4 w-4" })
6459
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" })
6425
6460
  ]
6426
6461
  })
6427
6462
  );
@@ -7531,13 +7566,13 @@ var AlertModal = ({
7531
7566
  };
7532
7567
 
7533
7568
  // src/shared/breadcrumbs.tsx
7534
- var import_lucide_react3 = require("lucide-react");
7569
+ var import_lucide_react5 = require("lucide-react");
7535
7570
  var import_react35 = require("react");
7536
7571
  var import_jsx_runtime47 = require("react/jsx-runtime");
7537
7572
  function Breadcrumbs({ items, className, classNameList }) {
7538
7573
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react35.Fragment, { children: [
7539
7574
  index !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbLink, { href: item.link, children: item.title }) }),
7540
- index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react3.Slash, {}) }),
7575
+ index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react5.Slash, {}) }),
7541
7576
  index === items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbPage, { children: item.title })
7542
7577
  ] }, item.title)) }) });
7543
7578
  }
@@ -7546,7 +7581,7 @@ function Breadcrumbs({ items, className, classNameList }) {
7546
7581
  var import_react36 = __toESM(require("react"), 1);
7547
7582
  var import_react_icons18 = require("@radix-ui/react-icons");
7548
7583
  var import_react_table = require("@tanstack/react-table");
7549
- var import_lucide_react4 = require("lucide-react");
7584
+ var import_lucide_react6 = require("lucide-react");
7550
7585
  var import_jsx_runtime48 = require("react/jsx-runtime");
7551
7586
  function DataTable({
7552
7587
  columns,
@@ -7558,6 +7593,8 @@ function DataTable({
7558
7593
  rowPerPageLabel = "Rows per page",
7559
7594
  ofLabel = "of",
7560
7595
  pageLabel = "Page",
7596
+ isRowsSelected = true,
7597
+ rowsSelectedLabel = "row(s) selected",
7561
7598
  className,
7562
7599
  emptyData,
7563
7600
  bodyClassName,
@@ -7566,7 +7603,8 @@ function DataTable({
7566
7603
  rowClassName,
7567
7604
  tableClassName,
7568
7605
  onPageChange,
7569
- onClick
7606
+ onClick,
7607
+ onPageSizeChange
7570
7608
  }) {
7571
7609
  const [pagination, setPagination] = import_react36.default.useState({
7572
7610
  pageIndex: Math.max(page - 1, 0),
@@ -7591,9 +7629,9 @@ function DataTable({
7591
7629
  };
7592
7630
  (0, import_react36.useEffect)(() => {
7593
7631
  if (onPageChange) {
7594
- onPageChange(pagination.pageIndex);
7632
+ onPageChange(pagination.pageIndex + 1);
7595
7633
  }
7596
- }, [pagination, setPagination]);
7634
+ }, [pagination]);
7597
7635
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
7598
7636
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7599
7637
  ScrollArea,
@@ -7635,21 +7673,28 @@ function DataTable({
7635
7673
  ),
7636
7674
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row", children: [
7637
7675
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
7638
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-muted-foreground flex-1 text-sm", children: [
7676
+ isRowsSelected ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-muted-foreground flex-1 text-sm", children: [
7639
7677
  table.getFilteredSelectedRowModel().rows.length,
7640
7678
  " ",
7641
7679
  ofLabel,
7642
7680
  " ",
7643
7681
  table.getFilteredRowModel().rows.length,
7644
- " row(s) selected."
7645
- ] }),
7682
+ " " + rowsSelectedLabel
7683
+ ] }) : null,
7646
7684
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center space-x-2", children: [
7647
7685
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
7648
7686
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7649
7687
  Select2,
7650
7688
  {
7651
7689
  value: `${pagination.pageSize}`,
7652
- onValueChange: (value) => setPagination(__spreadProps(__spreadValues({}, pagination), { pageSize: Number(value) })),
7690
+ onValueChange: (value) => {
7691
+ const newSize = Number(value);
7692
+ setPagination(__spreadProps(__spreadValues({}, pagination), {
7693
+ pageSize: newSize,
7694
+ pageIndex: 0
7695
+ }));
7696
+ if (onPageSizeChange) onPageSizeChange(newSize);
7697
+ },
7653
7698
  children: [
7654
7699
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectValue, { placeholder: pagination.pageSize }) }),
7655
7700
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectItem, { value: `${size}`, children: size }, size)) })
@@ -7690,7 +7735,7 @@ function DataTable({
7690
7735
  pageIndex: pagination.pageIndex - 1
7691
7736
  })),
7692
7737
  disabled: pagination.pageIndex === 0,
7693
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react4.ChevronLeftIcon, { className: "h-4 w-4" })
7738
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronLeftIcon, { className: "h-4 w-4" })
7694
7739
  }
7695
7740
  ),
7696
7741
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
@@ -7703,7 +7748,7 @@ function DataTable({
7703
7748
  pageIndex: pagination.pageIndex + 1
7704
7749
  })),
7705
7750
  disabled: pagination.pageIndex + 1 >= pageCount,
7706
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react4.ChevronRightIcon, { className: "h-4 w-4" })
7751
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronRightIcon, { className: "h-4 w-4" })
7707
7752
  }
7708
7753
  ),
7709
7754
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
@@ -7765,7 +7810,7 @@ function DataTableSkeleton({
7765
7810
 
7766
7811
  // src/shared/fileupload.tsx
7767
7812
  var import_react_icons19 = require("@radix-ui/react-icons");
7768
- var import_lucide_react5 = require("lucide-react");
7813
+ var import_lucide_react7 = require("lucide-react");
7769
7814
  var import_react37 = require("react");
7770
7815
  var import_react_dropzone = require("react-dropzone");
7771
7816
  var import_jsx_runtime50 = require("react/jsx-runtime");
@@ -7797,7 +7842,7 @@ function FileUpload({
7797
7842
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", __spreadValues({}, getInputProps())),
7798
7843
  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" }),
7799
7844
  /* @__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: [
7800
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react5.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
7845
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react7.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
7801
7846
  label
7802
7847
  ] })
7803
7848
  ] }))
package/dist/index.d.cts CHANGED
@@ -92,6 +92,8 @@ declare const buttonVariants: (props?: ({
92
92
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
93
93
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
94
94
  asChild?: boolean;
95
+ loading?: boolean;
96
+ loaderClassName?: string;
95
97
  }
96
98
  declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
97
99
 
@@ -314,14 +316,14 @@ type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldP
314
316
  control?: Control<TFieldValues, any, TFieldValues>;
315
317
  placeholder?: string;
316
318
  className?: string;
317
- classNameLabel?: string;
318
- classNameMessage?: string;
319
- classNameRequired?: string;
319
+ labelClassName?: string;
320
+ messageClassName?: string;
321
+ requiredLabelClassName?: string;
320
322
  label?: string;
321
- required?: boolean;
323
+ requiredLabel?: boolean;
322
324
  onChange?: (value: string) => void;
323
325
  } & React__default.InputHTMLAttributes<HTMLInputElement>;
324
- declare const FormField: <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, required, className, classNameLabel, classNameMessage, classNameRequired, rules, shouldUnregister, defaultValue, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
326
+ declare const FormField: <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, requiredLabel, className, labelClassName, messageClassName, requiredLabelClassName, rules, shouldUnregister, defaultValue, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
325
327
  declare const FormItem: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
326
328
  declare const FormLabel: React__default.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React__default.RefAttributes<HTMLLabelElement>, "ref"> & React__default.RefAttributes<HTMLLabelElement>>;
327
329
  declare const useFormField: () => {
@@ -517,7 +519,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
517
519
  declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
518
520
 
519
521
  declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => react_jsx_runtime.JSX.Element;
520
- declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLMapElement | HTMLAnchorElement | HTMLButtonElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
522
+ declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLMapElement | HTMLAnchorElement | HTMLButtonElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
521
523
  className?: string | undefined;
522
524
  collapsedSize?: number | undefined;
523
525
  collapsible?: boolean | undefined;
@@ -726,17 +728,20 @@ interface DataTableProps<TData, TValue> {
726
728
  page?: number;
727
729
  perPage?: number;
728
730
  onPageChange?: (page: number) => void;
731
+ onPageSizeChange?: (pageSize: number) => void;
729
732
  onClick?: (row: TData) => void;
730
733
  columns: ColumnDef<TData, TValue>[];
731
734
  data: TData[];
732
735
  pageSizeOptions?: number[];
733
736
  pageCount: number;
737
+ isRowsSelected?: boolean;
738
+ rowsSelectedLabel?: string;
734
739
  rowPerPageLabel?: string;
735
740
  pageLabel?: string;
736
741
  ofLabel?: string;
737
742
  emptyData?: React__default.ReactNode;
738
743
  }
739
- declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, className, emptyData, bodyClassName, cellClassName, headerClassName, rowClassName, tableClassName, onPageChange, onClick, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
744
+ declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, rowsSelectedLabel, className, emptyData, bodyClassName, cellClassName, headerClassName, rowClassName, tableClassName, onPageChange, onClick, onPageSizeChange, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
740
745
 
741
746
  type DataTableSkeletonProps = {
742
747
  columnCount: number;
package/dist/index.d.ts CHANGED
@@ -92,6 +92,8 @@ declare const buttonVariants: (props?: ({
92
92
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
93
93
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
94
94
  asChild?: boolean;
95
+ loading?: boolean;
96
+ loaderClassName?: string;
95
97
  }
96
98
  declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
97
99
 
@@ -314,14 +316,14 @@ type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldP
314
316
  control?: Control<TFieldValues, any, TFieldValues>;
315
317
  placeholder?: string;
316
318
  className?: string;
317
- classNameLabel?: string;
318
- classNameMessage?: string;
319
- classNameRequired?: string;
319
+ labelClassName?: string;
320
+ messageClassName?: string;
321
+ requiredLabelClassName?: string;
320
322
  label?: string;
321
- required?: boolean;
323
+ requiredLabel?: boolean;
322
324
  onChange?: (value: string) => void;
323
325
  } & React__default.InputHTMLAttributes<HTMLInputElement>;
324
- declare const FormField: <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, required, className, classNameLabel, classNameMessage, classNameRequired, rules, shouldUnregister, defaultValue, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
326
+ declare const FormField: <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, requiredLabel, className, labelClassName, messageClassName, requiredLabelClassName, rules, shouldUnregister, defaultValue, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
325
327
  declare const FormItem: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
326
328
  declare const FormLabel: React__default.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React__default.RefAttributes<HTMLLabelElement>, "ref"> & React__default.RefAttributes<HTMLLabelElement>>;
327
329
  declare const useFormField: () => {
@@ -517,7 +519,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
517
519
  declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
518
520
 
519
521
  declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => react_jsx_runtime.JSX.Element;
520
- declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLMapElement | HTMLAnchorElement | HTMLButtonElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
522
+ declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLMapElement | HTMLAnchorElement | HTMLButtonElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
521
523
  className?: string | undefined;
522
524
  collapsedSize?: number | undefined;
523
525
  collapsible?: boolean | undefined;
@@ -726,17 +728,20 @@ interface DataTableProps<TData, TValue> {
726
728
  page?: number;
727
729
  perPage?: number;
728
730
  onPageChange?: (page: number) => void;
731
+ onPageSizeChange?: (pageSize: number) => void;
729
732
  onClick?: (row: TData) => void;
730
733
  columns: ColumnDef<TData, TValue>[];
731
734
  data: TData[];
732
735
  pageSizeOptions?: number[];
733
736
  pageCount: number;
737
+ isRowsSelected?: boolean;
738
+ rowsSelectedLabel?: string;
734
739
  rowPerPageLabel?: string;
735
740
  pageLabel?: string;
736
741
  ofLabel?: string;
737
742
  emptyData?: React__default.ReactNode;
738
743
  }
739
- declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, className, emptyData, bodyClassName, cellClassName, headerClassName, rowClassName, tableClassName, onPageChange, onClick, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
744
+ declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, rowsSelectedLabel, className, emptyData, bodyClassName, cellClassName, headerClassName, rowClassName, tableClassName, onPageChange, onClick, onPageSizeChange, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
740
745
 
741
746
  type DataTableSkeletonProps = {
742
747
  columnCount: number;