lecom-ui 2.6.4 → 2.6.6

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.
@@ -27,7 +27,8 @@ PaginationItem.displayName = "PaginationItem";
27
27
  const PaginationPrevious = ({
28
28
  className,
29
29
  disabled,
30
- isActive
30
+ isActive,
31
+ onClick
31
32
  }) => /* @__PURE__ */ React.createElement(
32
33
  Button,
33
34
  {
@@ -36,6 +37,7 @@ const PaginationPrevious = ({
36
37
  variant: "ghost",
37
38
  color: "grey",
38
39
  size: "small",
40
+ onClick,
39
41
  className: cn(isActive && "bg-white", className)
40
42
  },
41
43
  /* @__PURE__ */ React.createElement(ChevronLeft, { size: 20 })
@@ -44,7 +46,8 @@ PaginationPrevious.displayName = "PaginationPrevious";
44
46
  const PaginationNext = ({
45
47
  className,
46
48
  disabled,
47
- isActive
49
+ isActive,
50
+ onClick
48
51
  }) => /* @__PURE__ */ React.createElement(
49
52
  Button,
50
53
  {
@@ -53,6 +56,7 @@ const PaginationNext = ({
53
56
  variant: "ghost",
54
57
  color: "grey",
55
58
  size: "small",
59
+ onClick,
56
60
  className: cn(isActive && "bg-white", className)
57
61
  },
58
62
  /* @__PURE__ */ React.createElement(ChevronRight, { size: 20 })
@@ -61,24 +65,33 @@ PaginationNext.displayName = "PaginationNext";
61
65
  const PaginationEllipsis = ({
62
66
  className,
63
67
  disabled,
64
- isActive
65
- }) => /* @__PURE__ */ React.createElement(
66
- Button,
67
- {
68
- disabled,
69
- iconButton: true,
70
- variant: "ghost",
71
- color: "grey",
72
- size: "small",
73
- className: cn(isActive && "bg-white", className)
74
- },
75
- /* @__PURE__ */ React.createElement(MoreHorizontal, { size: 20 })
76
- );
68
+ isActive,
69
+ asChild,
70
+ onClick
71
+ }) => {
72
+ if (asChild) {
73
+ return /* @__PURE__ */ React.createElement(MoreHorizontal, { size: 20 });
74
+ }
75
+ return /* @__PURE__ */ React.createElement(
76
+ Button,
77
+ {
78
+ disabled,
79
+ iconButton: true,
80
+ variant: "ghost",
81
+ color: "grey",
82
+ size: "small",
83
+ onClick,
84
+ className: cn(isActive && "bg-white", className)
85
+ },
86
+ /* @__PURE__ */ React.createElement(MoreHorizontal, { size: 20 })
87
+ );
88
+ };
77
89
  PaginationEllipsis.displayName = "PaginationEllipsis";
78
90
  const PaginationIndex = ({
79
91
  className,
80
92
  disabled,
81
93
  isActive,
94
+ onClick,
82
95
  children
83
96
  }) => /* @__PURE__ */ React.createElement(
84
97
  Button,
@@ -88,6 +101,7 @@ const PaginationIndex = ({
88
101
  variant: "ghost",
89
102
  color: "grey",
90
103
  size: "small",
104
+ onClick,
91
105
  className: cn(isActive && "bg-white", className)
92
106
  },
93
107
  children
package/dist/index.d.ts CHANGED
@@ -500,6 +500,8 @@ type PaginationButtonProps = {
500
500
  className?: string;
501
501
  disabled?: boolean;
502
502
  isActive?: boolean;
503
+ asChild?: boolean;
504
+ onClick?: () => void;
503
505
  };
504
506
  interface PaginationIndexProps extends PaginationButtonProps {
505
507
  children: React.ReactNode;
@@ -511,19 +513,19 @@ declare const Pagination: {
511
513
  declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
512
514
  declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
513
515
  declare const PaginationPrevious: {
514
- ({ className, disabled, isActive, }: PaginationButtonProps): React.JSX.Element;
516
+ ({ className, disabled, isActive, onClick, }: PaginationButtonProps): React.JSX.Element;
515
517
  displayName: string;
516
518
  };
517
519
  declare const PaginationNext: {
518
- ({ className, disabled, isActive, }: PaginationButtonProps): React.JSX.Element;
520
+ ({ className, disabled, isActive, onClick, }: PaginationButtonProps): React.JSX.Element;
519
521
  displayName: string;
520
522
  };
521
523
  declare const PaginationEllipsis: {
522
- ({ className, disabled, isActive, }: PaginationButtonProps): React.JSX.Element;
524
+ ({ className, disabled, isActive, asChild, onClick, }: PaginationButtonProps): React.JSX.Element;
523
525
  displayName: string;
524
526
  };
525
527
  declare const PaginationIndex: {
526
- ({ className, disabled, isActive, children, }: PaginationIndexProps): React.JSX.Element;
528
+ ({ className, disabled, isActive, onClick, children, }: PaginationIndexProps): React.JSX.Element;
527
529
  displayName: string;
528
530
  };
529
531
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",