@semcore/pagination 17.2.0 → 17.2.1
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 +8 -0
- package/lib/cjs/Pagination.js +30 -25
- package/lib/cjs/Pagination.js.map +1 -1
- package/lib/cjs/Pagination.type.js +2 -0
- package/lib/cjs/Pagination.type.js.map +1 -0
- package/lib/cjs/index.js +13 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/pagination.shadow.css +3 -17
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/Pagination.js +30 -25
- package/lib/es6/Pagination.js.map +1 -1
- package/lib/es6/Pagination.type.js +2 -0
- package/lib/es6/Pagination.type.js.map +1 -0
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/pagination.shadow.css +3 -17
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/Pagination.mjs +37 -32
- package/lib/esm/Pagination.type.mjs +1 -0
- package/lib/esm/index.mjs +1 -0
- package/lib/esm/style/pagination.shadow.css +3 -17
- package/lib/types/Pagination.d.ts +8 -0
- package/lib/types/Pagination.type.d.ts +96 -0
- package/lib/types/index.d.ts +2 -73
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +135 -0
- package/package.json +10 -10
- package/vite.config.ts +1 -1
- package/vitest.config.mts +17 -0
- package/lib/cjs/index.d.js +0 -2
- package/lib/cjs/index.d.js.map +0 -1
- package/lib/es6/index.d.js +0 -2
- package/lib/es6/index.d.js.map +0 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export declare const localizedMessages: {
|
|
2
|
+
de: {
|
|
3
|
+
prevPageLabel: string;
|
|
4
|
+
nextPageLabel: string;
|
|
5
|
+
pageInputLabel: string;
|
|
6
|
+
totalPagesLabel: string;
|
|
7
|
+
pagination: string;
|
|
8
|
+
firstPage: string;
|
|
9
|
+
lastPage: string;
|
|
10
|
+
};
|
|
11
|
+
en: {
|
|
12
|
+
prevPageLabel: string;
|
|
13
|
+
nextPageLabel: string;
|
|
14
|
+
pageInputLabel: string;
|
|
15
|
+
totalPagesLabel: string;
|
|
16
|
+
pagination: string;
|
|
17
|
+
firstPage: string;
|
|
18
|
+
lastPage: string;
|
|
19
|
+
};
|
|
20
|
+
es: {
|
|
21
|
+
prevPageLabel: string;
|
|
22
|
+
nextPageLabel: string;
|
|
23
|
+
pageInputLabel: string;
|
|
24
|
+
totalPagesLabel: string;
|
|
25
|
+
pagination: string;
|
|
26
|
+
firstPage: string;
|
|
27
|
+
lastPage: string;
|
|
28
|
+
};
|
|
29
|
+
fr: {
|
|
30
|
+
prevPageLabel: string;
|
|
31
|
+
nextPageLabel: string;
|
|
32
|
+
pageInputLabel: string;
|
|
33
|
+
totalPagesLabel: string;
|
|
34
|
+
pagination: string;
|
|
35
|
+
firstPage: string;
|
|
36
|
+
lastPage: string;
|
|
37
|
+
};
|
|
38
|
+
it: {
|
|
39
|
+
prevPageLabel: string;
|
|
40
|
+
nextPageLabel: string;
|
|
41
|
+
pageInputLabel: string;
|
|
42
|
+
totalPagesLabel: string;
|
|
43
|
+
pagination: string;
|
|
44
|
+
firstPage: string;
|
|
45
|
+
lastPage: string;
|
|
46
|
+
};
|
|
47
|
+
ja: {
|
|
48
|
+
prevPageLabel: string;
|
|
49
|
+
nextPageLabel: string;
|
|
50
|
+
pageInputLabel: string;
|
|
51
|
+
totalPagesLabel: string;
|
|
52
|
+
pagination: string;
|
|
53
|
+
firstPage: string;
|
|
54
|
+
lastPage: string;
|
|
55
|
+
};
|
|
56
|
+
ko: {
|
|
57
|
+
prevPageLabel: string;
|
|
58
|
+
nextPageLabel: string;
|
|
59
|
+
pageInputLabel: string;
|
|
60
|
+
totalPagesLabel: string;
|
|
61
|
+
pagination: string;
|
|
62
|
+
firstPage: string;
|
|
63
|
+
lastPage: string;
|
|
64
|
+
};
|
|
65
|
+
nl: {
|
|
66
|
+
prevPageLabel: string;
|
|
67
|
+
nextPageLabel: string;
|
|
68
|
+
pageInputLabel: string;
|
|
69
|
+
totalPagesLabel: string;
|
|
70
|
+
pagination: string;
|
|
71
|
+
firstPage: string;
|
|
72
|
+
lastPage: string;
|
|
73
|
+
};
|
|
74
|
+
pt: {
|
|
75
|
+
prevPageLabel: string;
|
|
76
|
+
nextPageLabel: string;
|
|
77
|
+
pageInputLabel: string;
|
|
78
|
+
totalPagesLabel: string;
|
|
79
|
+
pagination: string;
|
|
80
|
+
firstPage: string;
|
|
81
|
+
lastPage: string;
|
|
82
|
+
};
|
|
83
|
+
ru: {
|
|
84
|
+
prevPageLabel: string;
|
|
85
|
+
nextPageLabel: string;
|
|
86
|
+
pageInputLabel: string;
|
|
87
|
+
totalPagesLabel: string;
|
|
88
|
+
};
|
|
89
|
+
tr: {
|
|
90
|
+
prevPageLabel: string;
|
|
91
|
+
nextPageLabel: string;
|
|
92
|
+
pageInputLabel: string;
|
|
93
|
+
totalPagesLabel: string;
|
|
94
|
+
pagination: string;
|
|
95
|
+
firstPage: string;
|
|
96
|
+
lastPage: string;
|
|
97
|
+
};
|
|
98
|
+
vi: {
|
|
99
|
+
prevPageLabel: string;
|
|
100
|
+
nextPageLabel: string;
|
|
101
|
+
pageInputLabel: string;
|
|
102
|
+
totalPagesLabel: string;
|
|
103
|
+
pagination: string;
|
|
104
|
+
firstPage: string;
|
|
105
|
+
lastPage: string;
|
|
106
|
+
};
|
|
107
|
+
zh: {
|
|
108
|
+
prevPageLabel: string;
|
|
109
|
+
nextPageLabel: string;
|
|
110
|
+
pageInputLabel: string;
|
|
111
|
+
totalPagesLabel: string;
|
|
112
|
+
pagination: string;
|
|
113
|
+
firstPage: string;
|
|
114
|
+
lastPage: string;
|
|
115
|
+
};
|
|
116
|
+
pl: {
|
|
117
|
+
prevPageLabel: string;
|
|
118
|
+
nextPageLabel: string;
|
|
119
|
+
pageInputLabel: string;
|
|
120
|
+
totalPagesLabel: string;
|
|
121
|
+
pagination: string;
|
|
122
|
+
firstPage: string;
|
|
123
|
+
lastPage: string;
|
|
124
|
+
};
|
|
125
|
+
sv: {
|
|
126
|
+
prevPageLabel: string;
|
|
127
|
+
nextPageLabel: string;
|
|
128
|
+
pageInputLabel: string;
|
|
129
|
+
totalPagesLabel: string;
|
|
130
|
+
pagination: string;
|
|
131
|
+
firstPage: string;
|
|
132
|
+
lastPage: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export type LocalizedMessages = typeof localizedMessages;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/pagination",
|
|
3
3
|
"description": "Semrush Pagination Component",
|
|
4
|
-
"version": "17.2.
|
|
4
|
+
"version": "17.2.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"require": "./lib/cjs/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "^17.2.
|
|
18
|
-
"@semcore/input-number": "^17.2.
|
|
19
|
-
"@semcore/input": "^17.2.
|
|
20
|
-
"@semcore/link": "^17.2.
|
|
21
|
-
"@semcore/typography": "^17.2.
|
|
17
|
+
"@semcore/button": "^17.2.1",
|
|
18
|
+
"@semcore/input-number": "^17.2.1",
|
|
19
|
+
"@semcore/input": "^17.2.1",
|
|
20
|
+
"@semcore/link": "^17.2.1",
|
|
21
|
+
"@semcore/typography": "^17.2.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^17.2.
|
|
24
|
+
"@semcore/base-components": "^17.2.1",
|
|
25
25
|
"@semcore/icon": "^17.2.0"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"directory": "semcore/pagination"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@semcore/core": "17.2.
|
|
34
|
-
"@semcore/base-components": "17.2.
|
|
33
|
+
"@semcore/core": "17.2.1",
|
|
34
|
+
"@semcore/base-components": "17.2.1",
|
|
35
35
|
"@semcore/testing-utils": "1.0.0",
|
|
36
36
|
"@semcore/icon": "17.2.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build": "pnpm semcore-builder
|
|
39
|
+
"build": "pnpm semcore-builder && pnpm vite build"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/vite.config.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { resolve as resolvePath } from 'node:path';
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vitest/config';
|
|
4
|
+
|
|
5
|
+
import { vitestPlugins, vitestResolve } from '../../vitest.config.mts';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: vitestPlugins,
|
|
9
|
+
resolve: vitestResolve,
|
|
10
|
+
test: {
|
|
11
|
+
include: [
|
|
12
|
+
'__tests__/**/*.test.tsx',
|
|
13
|
+
],
|
|
14
|
+
environment: 'jsdom',
|
|
15
|
+
setupFiles: [resolvePath(__dirname, '../../tools/testing-utils/setupTests')],
|
|
16
|
+
},
|
|
17
|
+
});
|
package/lib/cjs/index.d.js
DELETED
package/lib/cjs/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport type { InputProps } from '@semcore/input';\nimport type Input from '@semcore/input';\nimport type { NSText } from '@semcore/typography';\n\nexport type PaginationProps = BoxProps &\n WithI18nEnhanceProps & {\n /**\n * Total number of pages\n * @default 1\n */\n totalPages?: number;\n /**\n * Active page number\n * @default 1\n */\n currentPage?: number;\n /**\n * Callback for changing the active page\n * @param pageNumber\n */\n onCurrentPageChange?: (pageNumber: number) => void;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Sizes for pagination panel\n * @default 'm'\n */\n size?: 'm' | 'l';\n };\n\nexport type TotalPagesProps = NSText.Props & WithI18nEnhanceProps & {};\n\nexport type PageInputProps = InputProps & WithI18nEnhanceProps & {};\n\nexport type PaginationContext = {\n getFirstPageProps: PropGetterFn;\n getPrevPageProps: PropGetterFn;\n getNextPageProps: PropGetterFn;\n getPageInputProps: PropGetterFn;\n getTotalPagesProps: PropGetterFn;\n};\n\nexport type PaginationHandlers = {\n totalPages: (value: number) => void;\n currentPage: (value: number) => void;\n};\n\ndeclare const Pagination: Intergalactic.Component<\n 'div',\n PaginationProps,\n PaginationContext,\n [handlers: PaginationHandlers]\n> & {\n PrevPage: typeof Button;\n NextPage: typeof Button;\n FirstPage: typeof Button;\n TotalPages: Intergalactic.Component<\n 'button',\n TotalPagesProps,\n {},\n [handlers: PaginationHandlers]\n >;\n PageInput: Intergalactic.Component<'div', PageInputProps, {}, [handlers: PaginationHandlers]> & {\n Value: typeof Input.Value;\n Addon: typeof Input.Addon;\n };\n};\n\nexport default Pagination;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/index.d.js
DELETED
package/lib/es6/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport type { InputProps } from '@semcore/input';\nimport type Input from '@semcore/input';\nimport type { NSText } from '@semcore/typography';\n\nexport type PaginationProps = BoxProps &\n WithI18nEnhanceProps & {\n /**\n * Total number of pages\n * @default 1\n */\n totalPages?: number;\n /**\n * Active page number\n * @default 1\n */\n currentPage?: number;\n /**\n * Callback for changing the active page\n * @param pageNumber\n */\n onCurrentPageChange?: (pageNumber: number) => void;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Sizes for pagination panel\n * @default 'm'\n */\n size?: 'm' | 'l';\n };\n\nexport type TotalPagesProps = NSText.Props & WithI18nEnhanceProps & {};\n\nexport type PageInputProps = InputProps & WithI18nEnhanceProps & {};\n\nexport type PaginationContext = {\n getFirstPageProps: PropGetterFn;\n getPrevPageProps: PropGetterFn;\n getNextPageProps: PropGetterFn;\n getPageInputProps: PropGetterFn;\n getTotalPagesProps: PropGetterFn;\n};\n\nexport type PaginationHandlers = {\n totalPages: (value: number) => void;\n currentPage: (value: number) => void;\n};\n\ndeclare const Pagination: Intergalactic.Component<\n 'div',\n PaginationProps,\n PaginationContext,\n [handlers: PaginationHandlers]\n> & {\n PrevPage: typeof Button;\n NextPage: typeof Button;\n FirstPage: typeof Button;\n TotalPages: Intergalactic.Component<\n 'button',\n TotalPagesProps,\n {},\n [handlers: PaginationHandlers]\n >;\n PageInput: Intergalactic.Component<'div', PageInputProps, {}, [handlers: PaginationHandlers]> & {\n Value: typeof Input.Value;\n Addon: typeof Input.Addon;\n };\n};\n\nexport default Pagination;\n"],"mappings":"","ignoreList":[]}
|