Socket
Socket
Sign inDemoInstall

react-responsive-pagination

Package Overview
Dependencies
Maintainers
1
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive-pagination - npm Package Compare versions

Comparing version 2.0.0-beta.8 to 2.0.0-beta.9

7

CHANGELOG.md
# React Responsive Pagination Changelog
# [2.0.0-beta.9](https://github.com/jonelantha/react-responsive-pagination/compare/v2.0.0-beta.8...v2.0.0-beta.9) (2023-03-22)
### Features
* restore React import ([c9533ef](https://github.com/jonelantha/react-responsive-pagination/commit/c9533efe1abe782f459bd3f3af5c2249358335ff))
# [2.0.0-beta.8](https://github.com/jonelantha/react-responsive-pagination/compare/v2.0.0-beta.7...v2.0.0-beta.8) (2023-03-21)

@@ -4,0 +11,0 @@

4

dist/index.d.ts

@@ -1,2 +0,2 @@

/// <reference types="react" />
import React from 'react';
import { NarrowBehaviour } from './narrowBehaviour.js';

@@ -6,3 +6,3 @@ import { LabelBehaviour } from './labelBehaviour.js';

export declare const bootstrap5PaginationPreset: {};
declare const _default: import("react").MemoExoticComponent<typeof ResponsivePaginationDev>;
declare const _default: React.MemoExoticComponent<typeof ResponsivePaginationDev>;
export default _default;

@@ -9,0 +9,0 @@ declare function ResponsivePaginationDev(props: ResponsivePaginationProps): JSX.Element | null;

@@ -1,3 +0,2 @@

import { jsx as _jsx } from "react/jsx-runtime";
import { memo, useEffect } from 'react';
import React, { memo, useEffect } from 'react';
import PropTypes from 'prop-types';

@@ -50,7 +49,9 @@ import { usePaginationItems } from './hooks/usePaginationItems.js';

}
return (_jsx("ul", { className: getContainerClassName(), ref: ref, children: items.map(item => item.gotoPage !== undefined ? (
// item = ClickableItem
_jsx("li", { className: `${pageItemClassName}${item.active && activeItemClassName ? ' ' + activeItemClassName : ''}`, "aria-current": item.active && ariaCurrentAttr ? 'page' : undefined, children: _jsx("a", { className: pageLinkClassName, href: linkHref === 'hash' ? '#' : undefined, onClick: preventDefault(() => handlePageChange(item.gotoPage)), "aria-label": item.a11yLabel, children: getLabel(item) }) }, item.key)) : (
// item = NonClickableItem
_jsx("li", { className: `${pageItemClassName} ${disabledItemClassName}`, "aria-hidden": item.a11yHidden, children: _jsx("span", { className: pageLinkClassName, "aria-label": item.a11yLabel, children: getLabel(item) }) }, item.key))) }));
return (React.createElement("ul", { className: getContainerClassName(), ref: ref }, items.map(item => item.gotoPage !== undefined ? (
// item = ClickableItem
React.createElement("li", { key: item.key, className: `${pageItemClassName}${item.active && activeItemClassName ? ' ' + activeItemClassName : ''}`, "aria-current": item.active && ariaCurrentAttr ? 'page' : undefined },
React.createElement("a", { className: pageLinkClassName, href: linkHref === 'hash' ? '#' : undefined, onClick: preventDefault(() => handlePageChange(item.gotoPage)), "aria-label": item.a11yLabel }, getLabel(item)))) : (
// item = NonClickableItem
React.createElement("li", { key: item.key, className: `${pageItemClassName} ${disabledItemClassName}`, "aria-hidden": item.a11yHidden },
React.createElement("span", { className: pageLinkClassName, "aria-label": item.a11yLabel }, getLabel(item)))))));
}

@@ -57,0 +58,0 @@ ResponsivePagination.propTypes = {

@@ -1,4 +0,4 @@

import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
export function defaultLabelBehaviour({ a11yLabel, label }) {
return !a11yLabel ? label : _jsx("span", { "aria-hidden": "true", children: label });
return !a11yLabel ? label : React.createElement("span", { "aria-hidden": "true" }, label);
}

@@ -9,4 +9,6 @@ export function srOnlySpanLabel({ a11yActiveLabel = '(current)', srOnlyClassName = 'sr-only', } = {}) {

const srOnlyLabel = activePage && a11yActiveLabel ? ` ${a11yActiveLabel}` : item.a11yLabel;
return (_jsxs(_Fragment, { children: [!item.a11yLabel ? item.label : _jsx("span", { "aria-hidden": "true", children: item.label }), srOnlyLabel && _jsx("span", { className: srOnlyClassName, children: srOnlyLabel })] }));
return (React.createElement(React.Fragment, null,
!item.a11yLabel ? item.label : React.createElement("span", { "aria-hidden": "true" }, item.label),
srOnlyLabel && React.createElement("span", { className: srOnlyClassName }, srOnlyLabel)));
};
}
{
"name": "react-responsive-pagination",
"version": "2.0.0-beta.8",
"version": "2.0.0-beta.9",
"description": "React component for responsive pagination",

@@ -58,4 +58,4 @@ "author": "jonelantha",

"peerDependencies": {
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},

@@ -62,0 +62,0 @@ "devDependencies": {

@@ -83,3 +83,3 @@ # React Responsive Pagination

- React 18, 17 and 16.14 upwards
- React 18, 17 and 16.8 upwards
- Modern browsers only - not suitable for IE 11

@@ -86,0 +86,0 @@

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