@youversion/design-system-components 0.15.1 → 0.16.0
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 +14 -0
- package/dist/index.es.js +1123 -874
- package/dist/index.umd.js +2 -2
- package/dist/src/Pagination/Pagination.d.ts +24 -0
- package/dist/src/Pagination/Pagination.d.ts.map +1 -0
- package/dist/src/Pagination/Pagination.stories.d.ts +6 -0
- package/dist/src/Pagination/Pagination.stories.d.ts.map +1 -0
- package/dist/src/Pagination/index.d.ts +2 -0
- package/dist/src/Pagination/index.d.ts.map +1 -0
- package/dist/src/Search/Search.d.ts +2 -2
- package/dist/src/Search/Search.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/stories/Icons.stories.d.ts +16 -1
- package/dist/src/stories/Icons.stories.d.ts.map +1 -1
- package/dist/src/utils/get-visible-pagination-buttons/getVisiblePaginationButtons.d.ts +22 -0
- package/dist/src/utils/get-visible-pagination-buttons/getVisiblePaginationButtons.d.ts.map +1 -0
- package/dist/src/utils/get-visible-pagination-buttons/index.d.ts +2 -0
- package/dist/src/utils/get-visible-pagination-buttons/index.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface paginationProps {
|
|
2
|
+
/** Max pages to return at a time. */
|
|
3
|
+
maxPages?: number;
|
|
4
|
+
/** The current selected page. */
|
|
5
|
+
page: number;
|
|
6
|
+
/** A array of all page values. */
|
|
7
|
+
pages: Array<number | string>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* This function returns an array of the nearest (5) pages numbers around the current page.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const shownPage = pagination(\{
|
|
14
|
+
* page: 4,
|
|
15
|
+
* pages: ['cursor-1', 'cursor-2', 'cursor-3', 'cursor-4', 'cursor-5', 'cursor-6'],
|
|
16
|
+
* \});
|
|
17
|
+
* // returns
|
|
18
|
+
* shownPages = ['cursor-2', 'cursor-3', 'cursor-4', 'cursor-5', 'cursor-6']
|
|
19
|
+
*
|
|
20
|
+
. */
|
|
21
|
+
export declare const getVisiblePaginationButtons: ({ page, pages, maxPages }: paginationProps) => (string | number)[];
|
|
22
|
+
//# sourceMappingURL=getVisiblePaginationButtons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVisiblePaginationButtons.d.ts","sourceRoot":"","sources":["../../../../src/utils/get-visible-pagination-buttons/getVisiblePaginationButtons.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;IAWI;AACJ,eAAO,MAAM,2BAA2B,8BAAmC,eAAe,wBAiBzF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/get-visible-pagination-buttons/index.tsx"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youversion/design-system-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"main": "./dist/index.umd.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@react-aria/overlays": "3.14.0",
|
|
25
|
-
"@youversion/design-system-core": "0.2.
|
|
26
|
-
"@youversion/design-system-icons": "0.
|
|
25
|
+
"@youversion/design-system-core": "0.2.1",
|
|
26
|
+
"@youversion/design-system-icons": "0.4.0",
|
|
27
27
|
"@youversion/design-system-tokens": "0.1.0",
|
|
28
28
|
"clsx": "1.2.1",
|
|
29
29
|
"tailwind-merge": "1.13.2"
|