@synerise/ds-pagination 1.0.51 → 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 CHANGED
@@ -3,6 +3,14 @@
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
+
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)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-pagination
13
+
6
14
  ## [1.0.51](https://github.com/synerise/synerise-design/compare/@synerise/ds-pagination@1.0.50...@synerise/ds-pagination@1.0.51) (2026-03-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-pagination
package/README.md CHANGED
@@ -11,5 +11,10 @@ Pagination UI Component
11
11
 
12
12
  ## API
13
13
 
14
+ All [Ant Design Pagination props](https://4x.ant.design/components/pagination/#API) are supported. The component spreads all props onto the underlying `antd` Pagination. The following prop has custom handling:
15
+
14
16
  | Property | Description | Type | Default |
15
17
  | -------- | ----------- | ---- | ------- |
18
+ | `locale` | Pagination locale. Merged with `{ page: '' }` so the Ant default page label is suppressed. Consumer-supplied keys take precedence. | `PaginationLocale` | `{ page: '' }` |
19
+
20
+ > **Note:** `itemRender` is always overridden internally to render DS-styled ghost icon buttons for prev, next, jump-prev, and jump-next controls. Passing a custom `itemRender` has no effect.
@@ -1,6 +1,4 @@
1
- import { type PaginationProps } from 'antd/lib/pagination';
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;
@@ -1,78 +1,49 @@
1
- var _excluded = ["locale"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import AntPagination from 'antd/lib/pagination';
5
- import React, { useCallback } from 'react';
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
- var ITEM_RENDER_TYPE = {
11
- prev: 'prev',
12
- next: 'next',
13
- jumpPrev: 'jump-prev',
14
- jumpNext: 'jump-next'
7
+ const ITEM_RENDER_TYPE = {
8
+ prev: "prev",
9
+ next: "next",
10
+ jumpPrev: "jump-prev",
11
+ jumpNext: "jump-next"
15
12
  };
16
- var Pagination = function Pagination(_ref) {
17
- var locale = _ref.locale,
18
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
19
- var renderItem = useCallback(function (_current, type, originalElement) {
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
- return /*#__PURE__*/React.createElement(Button, {
24
- mode: "single-icon",
25
- type: "ghost"
26
- }, /*#__PURE__*/React.createElement(Icon, {
27
- component: /*#__PURE__*/React.createElement(AngleLeftS, null)
28
- }));
29
- }
30
- case ITEM_RENDER_TYPE.next:
31
- {
32
- return /*#__PURE__*/React.createElement(Button, {
33
- mode: "single-icon",
34
- type: "ghost"
35
- }, /*#__PURE__*/React.createElement(Icon, {
36
- component: /*#__PURE__*/React.createElement(AngleRightS, null)
37
- }));
38
- }
39
- case ITEM_RENDER_TYPE.jumpPrev:
40
- {
41
- return /*#__PURE__*/React.createElement(Button, {
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 /*#__PURE__*/React.createElement(AntPagination, _extends({}, props, {
72
- locale: _extends({
73
- page: ''
74
- }, locale),
75
- itemRender: renderItem
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
@@ -1 +1,4 @@
1
- export { default } from './Pagination';
1
+ import { default as default2 } from "./Pagination.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
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.51",
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": "pnpm run build:js && pnpm run build:css && pnpm run defs",
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": "pnpm run build:js -- --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.16",
39
- "@synerise/ds-icon": "^1.14.1",
40
- "@synerise/ds-select": "^1.3.18"
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": "8dfafc5d7278f09d430f1e7499782d05c76b47c0"
47
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
48
48
  }