@synerise/ds-pagination 1.0.52 → 1.0.53
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/CHANGELOG.md +4 -0
- package/dist/Pagination.d.ts +2 -4
- package/dist/Pagination.js +43 -72
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/index.js +4 -1
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.53](https://github.com/synerise/synerise-design/compare/@synerise/ds-pagination@1.0.52...@synerise/ds-pagination@1.0.53) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-pagination
|
|
9
|
+
|
|
6
10
|
## [1.0.52](https://github.com/synerise/synerise-design/compare/@synerise/ds-pagination@1.0.51...@synerise/ds-pagination@1.0.52) (2026-03-20)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @synerise/ds-pagination
|
package/dist/Pagination.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import '@synerise/ds-core/dist/js/style';
|
|
4
|
-
import './style/index.less';
|
|
1
|
+
import { PaginationProps } from 'antd/lib/pagination';
|
|
2
|
+
import { default as React } from 'react';
|
|
5
3
|
declare const Pagination: ({ locale, ...props }: PaginationProps) => React.JSX.Element;
|
|
6
4
|
export default Pagination;
|
package/dist/Pagination.js
CHANGED
|
@@ -1,78 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import Button from '@synerise/ds-button';
|
|
7
|
-
import '@synerise/ds-core/dist/js/style';
|
|
8
|
-
import Icon, { AngleLeftS, AngleRightS, DoubleAngleLeftS, DoubleAngleRightS, OptionHorizontalM } from '@synerise/ds-icon';
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import AntPagination from "antd/lib/pagination";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import Button from "@synerise/ds-button";
|
|
5
|
+
import Icon, { OptionHorizontalM, DoubleAngleRightS, DoubleAngleLeftS, AngleRightS, AngleLeftS } from "@synerise/ds-icon";
|
|
9
6
|
import "./style/index.css";
|
|
10
|
-
|
|
11
|
-
prev:
|
|
12
|
-
next:
|
|
13
|
-
jumpPrev:
|
|
14
|
-
jumpNext:
|
|
7
|
+
const ITEM_RENDER_TYPE = {
|
|
8
|
+
prev: "prev",
|
|
9
|
+
next: "next",
|
|
10
|
+
jumpPrev: "jump-prev",
|
|
11
|
+
jumpNext: "jump-next"
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const Pagination = ({
|
|
14
|
+
locale,
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
const renderItem = useCallback((_current, type, originalElement) => {
|
|
20
18
|
switch (type) {
|
|
21
|
-
case ITEM_RENDER_TYPE.prev:
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
mode: "single-icon",
|
|
43
|
-
type: "ghost"
|
|
44
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
45
|
-
className: "default-icon",
|
|
46
|
-
component: /*#__PURE__*/React.createElement(OptionHorizontalM, null)
|
|
47
|
-
}), /*#__PURE__*/React.createElement(Icon, {
|
|
48
|
-
className: "hover-icon",
|
|
49
|
-
component: /*#__PURE__*/React.createElement(DoubleAngleLeftS, null)
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
case ITEM_RENDER_TYPE.jumpNext:
|
|
53
|
-
{
|
|
54
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
55
|
-
mode: "single-icon",
|
|
56
|
-
type: "ghost"
|
|
57
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
58
|
-
className: "default-icon",
|
|
59
|
-
component: /*#__PURE__*/React.createElement(OptionHorizontalM, null)
|
|
60
|
-
}), /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
-
className: "hover-icon",
|
|
62
|
-
component: /*#__PURE__*/React.createElement(DoubleAngleRightS, null)
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
default:
|
|
66
|
-
{
|
|
67
|
-
return originalElement;
|
|
68
|
-
}
|
|
19
|
+
case ITEM_RENDER_TYPE.prev: {
|
|
20
|
+
return /* @__PURE__ */ jsx(Button, { mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleLeftS, {}) }) });
|
|
21
|
+
}
|
|
22
|
+
case ITEM_RENDER_TYPE.next: {
|
|
23
|
+
return /* @__PURE__ */ jsx(Button, { mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleRightS, {}) }) });
|
|
24
|
+
}
|
|
25
|
+
case ITEM_RENDER_TYPE.jumpPrev: {
|
|
26
|
+
return /* @__PURE__ */ jsxs(Button, { mode: "single-icon", type: "ghost", children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Icon, { className: "default-icon", component: /* @__PURE__ */ jsx(OptionHorizontalM, {}) }),
|
|
28
|
+
/* @__PURE__ */ jsx(Icon, { className: "hover-icon", component: /* @__PURE__ */ jsx(DoubleAngleLeftS, {}) })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
case ITEM_RENDER_TYPE.jumpNext: {
|
|
32
|
+
return /* @__PURE__ */ jsxs(Button, { mode: "single-icon", type: "ghost", children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Icon, { className: "default-icon", component: /* @__PURE__ */ jsx(OptionHorizontalM, {}) }),
|
|
34
|
+
/* @__PURE__ */ jsx(Icon, { className: "hover-icon", component: /* @__PURE__ */ jsx(DoubleAngleRightS, {}) })
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
default: {
|
|
38
|
+
return originalElement;
|
|
39
|
+
}
|
|
69
40
|
}
|
|
70
41
|
}, []);
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
42
|
+
return /* @__PURE__ */ jsx(AntPagination, { ...props, locale: {
|
|
43
|
+
page: "",
|
|
44
|
+
...locale
|
|
45
|
+
}, itemRender: renderItem });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
Pagination as default
|
|
77
49
|
};
|
|
78
|
-
export default Pagination;
|
|
File without changes
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-pagination",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.53",
|
|
4
4
|
"description": "Pagination UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-button": "^1.5.
|
|
39
|
-
"@synerise/ds-icon": "^1.15.
|
|
40
|
-
"@synerise/ds-select": "^1.3.
|
|
38
|
+
"@synerise/ds-button": "^1.5.18",
|
|
39
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
40
|
+
"@synerise/ds-select": "^1.3.20"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@synerise/ds-core": "*",
|
|
44
44
|
"antd": "4.24.16",
|
|
45
45
|
"react": ">=16.9.0 <= 18.3.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
48
48
|
}
|