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

@snack-uikit/pagination

Package Overview
Dependencies
Maintainers
0
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snack-uikit/pagination - npm Package Compare versions

Comparing version 0.6.11 to 0.6.12-preview-d907dbcf.0

4

dist/components/Pagination/Pagination.d.ts

@@ -8,2 +8,4 @@ import { WithSupportProps } from '@snack-uikit/utils';

page: number;
/** Максимальное количество страниц/элементов, помещающихся до транкейта */
maxLength?: number;
/** Колбек смены значения */

@@ -18,2 +20,2 @@ onChange(page: number): void;

}>;
export declare function Pagination({ total, page, onChange, className, size, ...rest }: PaginationProps): import("react/jsx-runtime").JSX.Element;
export declare function Pagination({ total, page, onChange, className, size, maxLength, ...rest }: PaginationProps): import("react/jsx-runtime").JSX.Element;

@@ -27,3 +27,3 @@ var __rest = (this && this.__rest) || function (s, e) {

export function Pagination(_a) {
var { total, page, onChange, className, size = SIZE.S } = _a, rest = __rest(_a, ["total", "page", "onChange", "className", "size"]);
var { total, page, onChange, className, size = SIZE.S, maxLength = MAX_LENGTH } = _a, rest = __rest(_a, ["total", "page", "onChange", "className", "size", "maxLength"]);
const entries = getPaginationEntries({

@@ -33,3 +33,3 @@ firstPage: FIRST_PAGE,

currentPage: page,
maxLength: MAX_LENGTH,
maxLength,
});

@@ -36,0 +36,0 @@ const buttonRefs = useRef([]);

@@ -53,4 +53,4 @@ import { getRange } from './getRange';

const { firstPage, lastPage, currentPage, currentPageSiblingsCount } = state;
const groupFirstPage = currentPage - currentPageSiblingsCount / 2;
const groupLastPage = currentPage + currentPageSiblingsCount / 2;
const groupFirstPage = Math.floor(currentPage - currentPageSiblingsCount / 2);
const groupLastPage = Math.floor(currentPage + currentPageSiblingsCount / 2);
const group = getRange(groupFirstPage, groupLastPage).map(createPageEntry);

@@ -57,0 +57,0 @@ return [

@@ -7,3 +7,3 @@ {

"title": "Pagination",
"version": "0.6.11",
"version": "0.6.12-preview-d907dbcf.0",
"sideEffects": [

@@ -40,3 +40,3 @@ "*.css",

},
"gitHead": "b5cf5887d7e1a31571c4ca424b022ef391ed4fef"
"gitHead": "75e1b1c158ad3540a0aa132333a4cccbce3e7217"
}

@@ -40,2 +40,3 @@ # Pagination

| total* | `number` | - | Общее количество страниц |
| maxLength | `number` | 7 | Максимальное количество страниц/элементов, помещающихся до транкейта |
| className | `string` | - | CSS класснейм |

@@ -42,0 +43,0 @@ | size | enum Size: `"xs"`, `"s"` | s | Размер |

@@ -84,4 +84,4 @@ import { getRange } from './getRange';

const { firstPage, lastPage, currentPage, currentPageSiblingsCount } = state;
const groupFirstPage = currentPage - currentPageSiblingsCount / 2;
const groupLastPage = currentPage + currentPageSiblingsCount / 2;
const groupFirstPage = Math.floor(currentPage - currentPageSiblingsCount / 2);
const groupLastPage = Math.floor(currentPage + currentPageSiblingsCount / 2);
const group = getRange(groupFirstPage, groupLastPage).map(createPageEntry);

@@ -88,0 +88,0 @@

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