@uiw/react-pagination
Advanced tools
Comparing version 4.21.14 to 5.0.0-bate-0
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 |
@@ -10,2 +10,3 @@ "use strict"; | ||
}); | ||
var _exportNames = {}; | ||
exports["default"] = Pagination; | ||
@@ -23,2 +24,16 @@ | ||
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"); | ||
@@ -184,3 +199,3 @@ | ||
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, | ||
@@ -191,5 +206,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 | ||
@@ -200,3 +222,9 @@ }); | ||
// 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) | ||
@@ -206,3 +234,9 @@ }); | ||
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(), | ||
@@ -214,3 +248,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"), | ||
@@ -231,4 +269,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) { | ||
@@ -153,3 +154,3 @@ var { | ||
return /*#__PURE__*/_jsxs("ul", _extends({ | ||
return /*#__PURE__*/_jsxs(PaginationStyleBaseUL, _extends({ | ||
className: cls, | ||
@@ -160,5 +161,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 | ||
@@ -169,3 +177,9 @@ }); | ||
// 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 | ||
@@ -175,3 +189,9 @@ }); | ||
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(), | ||
@@ -181,3 +201,7 @@ onClick: () => handleClick(item), | ||
}, idx); | ||
}), pageSizeOptions.length > 0 && /*#__PURE__*/_jsx("li", { | ||
}), pageSizeOptions.length > 0 && /*#__PURE__*/_jsx(PaginationStyleBaseLI, { | ||
params: { | ||
isOptions: true, | ||
size | ||
}, | ||
className: prefixCls + "-options", | ||
@@ -184,0 +208,0 @@ children: /*#__PURE__*/_jsx(Select, { |
{ | ||
"name": "@uiw/react-pagination", | ||
"version": "4.21.14", | ||
"version": "5.0.0-bate-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.14", | ||
"@uiw/utils": "^4.21.14" | ||
"@uiw/react-select": "^5.0.0-bate-0", | ||
"@uiw/utils": "^5.0.0-bate-0" | ||
} | ||
} |
@@ -18,6 +18,4 @@ Pagination 分页 | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&background=transparent&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Pagination, Divider } from 'uiw'; | ||
@@ -58,6 +56,3 @@ | ||
ReactDOM.render( | ||
<Demo />, | ||
_mount_ | ||
); | ||
export default Demo | ||
``` | ||
@@ -67,15 +62,14 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
```jsx mdx:preview&background=transparent&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Pagination, Divider } from 'uiw'; | ||
ReactDOM.render( | ||
<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>, | ||
_mount_ | ||
); | ||
</div> | ||
} | ||
export default Demo | ||
``` | ||
@@ -87,9 +81,8 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
```jsx mdx:preview&background=transparent&codeSandbox=true&codePen=true | ||
import React from 'react'; | ||
import { Pagination, Divider } from 'uiw'; | ||
ReactDOM.render( | ||
<div> | ||
function Demo() { | ||
return <div> | ||
<Pagination | ||
@@ -120,5 +113,6 @@ current={5} | ||
/> | ||
</div>, | ||
_mount_ | ||
); | ||
</div> | ||
} | ||
export default Demo | ||
``` | ||
@@ -125,0 +119,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104644
16
1173
5
1
127
+ Added@emotion/is-prop-valid@1.2.2(transitive)
+ Added@emotion/memoize@0.8.1(transitive)
+ Added@emotion/unitless@0.8.1(transitive)
+ Added@types/stylis@4.2.5(transitive)
+ Added@uiw/react-select@5.0.0-bate-9(transitive)
+ Added@uiw/utils@5.0.0-bate-9(transitive)
+ Addedcamelize@1.0.1(transitive)
+ Addedcss-color-keywords@1.0.0(transitive)
+ Addedcss-to-react-native@3.2.0(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedpostcss@8.4.38(transitive)
+ Addedpostcss-value-parser@4.2.0(transitive)
+ Addedshallowequal@1.1.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedstyled-components@6.1.13(transitive)
+ Addedstylis@4.3.2(transitive)
+ Addedtslib@2.6.2(transitive)
- Removed@uiw/react-select@4.22.3(transitive)
- Removed@uiw/utils@4.22.3(transitive)
Updated@uiw/utils@^5.0.0-bate-0