Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-pagination

Package Overview
Dependencies
Maintainers
2
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-pagination - npm Package Compare versions

Comparing version 4.21.23 to 5.0.0-bate.2.0

cjs/style/index.d.ts

3

cjs/index.d.ts
import { IProps, HTMLUlProps } from '@uiw/utils';
import './style/index.less';
export * from './style';
export interface PaginationProps extends IProps, Omit<HTMLUlProps, 'onChange'> {

@@ -26,1 +26,2 @@ prefixCls?: string;

export default function Pagination(props: PaginationProps): JSX.Element;
//# sourceMappingURL=index.d.ts.map

@@ -8,2 +8,3 @@ "use strict";

});
var _exportNames = {};
exports["default"] = Pagination;

@@ -15,2 +16,14 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

var _reactSelect = _interopRequireDefault(require("@uiw/react-select"));
var _style = require("./style");
Object.keys(_style).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _style[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _style[key];
}
});
});
var _jsxRuntime = require("react/jsx-runtime");

@@ -151,3 +164,3 @@ var _excluded = ["className", "style", "prefixCls", "alignment", "size", "total", "pageSize", "pageSizeOptions", "current", "onChange", "onShowSizeChange", "divider"];

};
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_style.PaginationStyleBaseUL, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
className: cls,

@@ -158,5 +171,12 @@ style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, style), {}, {

}, other), {}, {
params: {
isDivider: divider,
size: size
},
children: [initPageSoure.map(function (item, idx) {
// eslint-disable-next-line jsx-a11y/anchor-is-valid
var label = /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
var label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.PaginationStyleBaseLIA, {
params: {
size: size
},
children: item.label

@@ -166,7 +186,19 @@ });

// eslint-disable-next-line jsx-a11y/anchor-is-valid
label = /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.PaginationStyleBaseLIA, {
params: {
type: item.type,
isArrow: true,
size: size,
disabled: item.disabled
},
className: "arrow ".concat(item.type)
});
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.PaginationStyleBaseLI, {
params: {
disabled: item.disabled,
active: item.active,
size: size,
isDivider: divider
},
className: [item.active ? 'active' : null, item.disabled ? 'disabled' : null].filter(Boolean).join(' ').trim(),

@@ -178,3 +210,7 @@ onClick: function onClick() {

}, idx);
}), pageSizeOptions.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
}), pageSizeOptions.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.PaginationStyleBaseLI, {
params: {
isOptions: true,
size: size
},
className: "".concat(prefixCls, "-options"),

@@ -195,3 +231,2 @@ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect["default"], {

}
module.exports = exports.default;
//# sourceMappingURL=index.js.map
import { IProps, HTMLUlProps } from '@uiw/utils';
import './style/index.less';
export * from './style';
export interface PaginationProps extends IProps, Omit<HTMLUlProps, 'onChange'> {

@@ -26,1 +26,2 @@ prefixCls?: string;

export default function Pagination(props: PaginationProps): JSX.Element;
//# sourceMappingURL=index.d.ts.map

@@ -6,5 +6,6 @@ import _extends from "@babel/runtime/helpers/extends";

import Select from '@uiw/react-select';
import "./style/index.css";
import { PaginationStyleBaseUL, PaginationStyleBaseLI, PaginationStyleBaseLIA } from './style';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
export * from './style';
export default function Pagination(props) {

@@ -131,3 +132,3 @@ var {

};
return /*#__PURE__*/_jsxs("ul", _extends({
return /*#__PURE__*/_jsxs(PaginationStyleBaseUL, _extends({
className: cls,

@@ -138,5 +139,12 @@ style: _extends({}, style, {

}, other, {
params: {
isDivider: divider,
size
},
children: [initPageSoure.map((item, idx) => {
// eslint-disable-next-line jsx-a11y/anchor-is-valid
var label = /*#__PURE__*/_jsx("a", {
var label = /*#__PURE__*/_jsx(PaginationStyleBaseLIA, {
params: {
size
},
children: item.label

@@ -146,7 +154,19 @@ });

// eslint-disable-next-line jsx-a11y/anchor-is-valid
label = /*#__PURE__*/_jsx("a", {
label = /*#__PURE__*/_jsx(PaginationStyleBaseLIA, {
params: {
type: item.type,
isArrow: true,
size,
disabled: item.disabled
},
className: "arrow " + item.type
});
}
return /*#__PURE__*/_jsx("li", {
return /*#__PURE__*/_jsx(PaginationStyleBaseLI, {
params: {
disabled: item.disabled,
active: item.active,
size,
isDivider: divider
},
className: [item.active ? 'active' : null, item.disabled ? 'disabled' : null].filter(Boolean).join(' ').trim(),

@@ -156,3 +176,7 @@ onClick: () => handleClick(item),

}, idx);
}), pageSizeOptions.length > 0 && /*#__PURE__*/_jsx("li", {
}), pageSizeOptions.length > 0 && /*#__PURE__*/_jsx(PaginationStyleBaseLI, {
params: {
isOptions: true,
size
},
className: prefixCls + "-options",

@@ -159,0 +183,0 @@ children: /*#__PURE__*/_jsx(Select, {

{
"name": "@uiw/react-pagination",
"version": "4.21.23",
"version": "5.0.0-bate.2.0",
"description": "Pagination component",

@@ -44,8 +44,9 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"react": ">=16.9.0",
"react-dom": ">=16.9.0"
"react-dom": ">=16.9.0",
"styled-components": ">=5.3.5"
},
"dependencies": {
"@uiw/react-select": "^4.21.23",
"@uiw/utils": "^4.21.23"
"@uiw/react-select": "^5.0.0-bate.2.0",
"@uiw/utils": "^5.0.0-bate.2.0"
}
}

@@ -18,7 +18,8 @@ Pagination 分页

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=transparent&codeSandbox=true&codePen=true
import React from 'react';
import { Pagination, Divider } from 'uiw';
export default function Demo() {
const Demo = () => {
const [pageObj, setPageObj] = React.useState({

@@ -54,2 +55,4 @@ current: 2,

}
export default Demo
```

@@ -59,15 +62,14 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=transparent&codeSandbox=true&codePen=true
import React from 'react';
import { Pagination, Divider } from 'uiw';
export default function Demo() {
return (
<div>
<Pagination size="small" current={1} pageSize={5} pageSizeOptions={[5, 10, 20, 30]} total={249} />
<Divider />
<Pagination size="small" current={1} pageSize={10} total={50} />
</div>
);
function Demo() {
return <div>
<Pagination size="small" current={1} pageSize={5} pageSizeOptions={[5, 10, 20, 30]} total={249} />
<Divider />
<Pagination size="small" current={1} pageSize={10} total={50} />
</div>
}
export default Demo
```

@@ -79,37 +81,37 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=transparent&codeSandbox=true&codePen=true
import React from 'react';
import { Pagination, Divider } from 'uiw';
export default function Demo() {
return (
<div>
<Pagination
current={5}
total={250}
onChange={(pageNumber) => {
console.log(`pageNumber:${pageNumber}`)
}}
/>
<Divider />
<Pagination
current={1}
alignment="center"
total={250}
onChange={(pageNumber) => {
console.log(`pageNumber:${pageNumber}`)
}}
/>
<Divider />
<Pagination
current={25}
alignment="right"
total={250}
onChange={(pageNumber) => {
console.log(`pageNumber:${pageNumber}`)
}}
/>
</div>
);
function Demo() {
return <div>
<Pagination
current={5}
total={250}
onChange={(pageNumber) => {
console.log(`pageNumber:${pageNumber}`)
}}
/>
<Divider />
<Pagination
current={1}
alignment="center"
total={250}
onChange={(pageNumber) => {
console.log(`pageNumber:${pageNumber}`)
}}
/>
<Divider />
<Pagination
current={25}
alignment="right"
total={250}
onChange={(pageNumber) => {
console.log(`pageNumber:${pageNumber}`)
}}
/>
</div>
}
export default Demo
```

@@ -116,0 +118,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc