armtek-uikit-react 1.0.131 → 1.0.132

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/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.131","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*","react-transition-group":"^4.4.5"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
1
+ {"name":"armtek-uikit-react","version":"1.0.132","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*","react-transition-group":"^4.4.5"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
@@ -2,14 +2,14 @@ import { StackProps } from '../../ui/Stack';
2
2
  type OwnProps = {
3
3
  page: number;
4
4
  total: number;
5
- perPage: number;
5
+ pageSize: number;
6
6
  onChange: (page: number) => void;
7
7
  };
8
8
  export type PaginationProps = OwnProps & Omit<Partial<PaginationPerPageProps>, keyof OwnProps> & Omit<StackProps, keyof OwnProps>;
9
9
  export declare const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
10
10
  type PaginationPerPageProps = {
11
- perPageList: number[];
11
+ pageSizes: number[];
12
12
  perPageListLabel?: string;
13
- onChangePerPage: (value: number) => void;
13
+ onPageSizeSelect: (value: number) => void;
14
14
  };
15
15
  export default Pagination;
@@ -13,12 +13,12 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
13
13
  const MAX_DISPLAY = 5;
14
14
  export const Pagination = props => {
15
15
  const {
16
- perPage,
17
- perPageList,
16
+ pageSize,
17
+ pageSizes,
18
18
  perPageListLabel,
19
19
  total,
20
20
  page,
21
- onChangePerPage,
21
+ onPageSizeSelect,
22
22
  onChange,
23
23
  ...stackProps
24
24
  } = props;
@@ -39,10 +39,10 @@ export const Pagination = props => {
39
39
  return /*#__PURE__*/_jsx(_Fragment, {
40
40
  children: /*#__PURE__*/_jsxs(Stack, {
41
41
  spacing: 'small',
42
- children: [perPageList && onChangePerPage && /*#__PURE__*/_jsx(PaginationPerPage, {
42
+ children: [pageSizes && onPageSizeSelect && /*#__PURE__*/_jsx(PaginationPerPage, {
43
43
  ...props,
44
- perPageList: perPageList,
45
- onChangePerPage: onChangePerPage
44
+ pageSizes: pageSizes,
45
+ onPageSizeSelect: onPageSizeSelect
46
46
  }), /*#__PURE__*/_jsxs(Stack, {
47
47
  center: true,
48
48
  ...stackProps,
@@ -107,16 +107,16 @@ export const Pagination = props => {
107
107
  };
108
108
  const PaginationPerPage = props => {
109
109
  const {
110
- perPage,
111
- perPageList,
110
+ pageSize,
111
+ pageSizes,
112
112
  perPageListLabel,
113
- onChangePerPage
113
+ onPageSizeSelect
114
114
  } = props;
115
115
  const [visible, setVisible] = useState(false);
116
116
  const btnRef = useRef(null);
117
117
  const handleClose = () => setVisible(false);
118
118
  const handleClick = item => {
119
- onChangePerPage(item);
119
+ onPageSizeSelect(item);
120
120
  handleClose();
121
121
  };
122
122
  return /*#__PURE__*/_jsxs(Stack, {
@@ -135,7 +135,7 @@ const PaginationPerPage = props => {
135
135
  }),
136
136
  size: 'small',
137
137
  color: 'neutral',
138
- children: perPage
138
+ children: pageSize
139
139
  }), /*#__PURE__*/_jsx(Popover, {
140
140
  placement: 'bottom',
141
141
  open: visible,
@@ -144,9 +144,9 @@ const PaginationPerPage = props => {
144
144
  classes: {
145
145
  paper: 'p-0'
146
146
  },
147
- children: perPageList.map(item => /*#__PURE__*/_jsx(ListItem, {
147
+ children: pageSizes.map(item => /*#__PURE__*/_jsx(ListItem, {
148
148
  onClick: () => handleClick(item),
149
- active: item === perPage,
149
+ active: item === pageSize,
150
150
  children: item
151
151
  }, item))
152
152
  })]