@semcore/pagination 3.0.11 → 3.0.12
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 +6 -0
- package/lib/cjs/Pagination.js +11 -11
- package/lib/es6/Pagination.js +11 -11
- package/package.json +1 -1
- package/src/Pagination.jsx +0 -307
- package/src/index.d.ts +0 -57
- package/src/index.js +0 -1
- package/src/style/pagination.shadow.css +0 -51
- package/src/translations/de.json +0 -6
- package/src/translations/en.json +0 -6
- package/src/translations/es.json +0 -6
- package/src/translations/fr.json +0 -6
- package/src/translations/it.json +0 -6
- package/src/translations/ja.json +0 -6
- package/src/translations/ko.json +0 -6
- package/src/translations/pt.json +0 -6
- package/src/translations/ru.json +0 -6
- package/src/translations/vi.json +0 -6
- package/src/translations/zh.json +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.0.12] - 2022-07-21
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.28.0 ~> 2.29.0]).
|
|
10
|
+
|
|
5
11
|
## [3.0.11] - 2022-07-14
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/lib/cjs/Pagination.js
CHANGED
|
@@ -82,20 +82,20 @@ var style = (
|
|
|
82
82
|
/*__reshadow_css_start__*/
|
|
83
83
|
_core.sstyled.insert(
|
|
84
84
|
/*__inner_css_start__*/
|
|
85
|
-
".
|
|
85
|
+
".___SPagination_wisyn_gg_{display:flex;justify-content:flex-start;align-items:center}.___SNextPage_wisyn_gg_,.___SPrevPage_wisyn_gg_{align-self:center;margin-left:8px}.___SLabel_wisyn_gg_:not(:first-child){margin-left:16px}.___STotalPages_wisyn_gg_{align-self:center;line-height:normal}.___STotalPagesLabel_wisyn_gg_{margin-left:8px;margin-right:4px}.___SPageInput_wisyn_gg_{max-width:68px;margin-left:4px}.___SPageInputValue_wisyn_gg_:focus~.___SPageInputAddon_wisyn_gg_{visibility:visible;clip:auto;position:static}.___SPageInputAddon_wisyn_gg_{visibility:hidden;clip:rect(1px,1px,1px,1px);position:absolute}.___SLabel_wisyn_gg_,.___STotalPages_wisyn_gg_,.___STotalPagesLabel_wisyn_gg_{font-size:14px;line-height:1.42}"
|
|
86
86
|
/*__inner_css_end__*/
|
|
87
|
-
, "
|
|
87
|
+
, "wisyn_gg_")
|
|
88
88
|
/*__reshadow_css_end__*/
|
|
89
89
|
, {
|
|
90
|
-
"__SPagination": "
|
|
91
|
-
"__SNextPage": "
|
|
92
|
-
"__SPrevPage": "
|
|
93
|
-
"__SLabel": "
|
|
94
|
-
"__STotalPages": "
|
|
95
|
-
"__STotalPagesLabel": "
|
|
96
|
-
"__SPageInput": "
|
|
97
|
-
"__SPageInputValue": "
|
|
98
|
-
"__SPageInputAddon": "
|
|
90
|
+
"__SPagination": "___SPagination_wisyn_gg_",
|
|
91
|
+
"__SNextPage": "___SNextPage_wisyn_gg_",
|
|
92
|
+
"__SPrevPage": "___SPrevPage_wisyn_gg_",
|
|
93
|
+
"__SLabel": "___SLabel_wisyn_gg_",
|
|
94
|
+
"__STotalPages": "___STotalPages_wisyn_gg_",
|
|
95
|
+
"__STotalPagesLabel": "___STotalPagesLabel_wisyn_gg_",
|
|
96
|
+
"__SPageInput": "___SPageInput_wisyn_gg_",
|
|
97
|
+
"__SPageInputValue": "___SPageInputValue_wisyn_gg_",
|
|
98
|
+
"__SPageInputAddon": "___SPageInputAddon_wisyn_gg_"
|
|
99
99
|
});
|
|
100
100
|
var i18n = {
|
|
101
101
|
de: _de["default"],
|
package/lib/es6/Pagination.js
CHANGED
|
@@ -50,20 +50,20 @@ var style = (
|
|
|
50
50
|
/*__reshadow_css_start__*/
|
|
51
51
|
_sstyled.insert(
|
|
52
52
|
/*__inner_css_start__*/
|
|
53
|
-
".
|
|
53
|
+
".___SPagination_wisyn_gg_{display:flex;justify-content:flex-start;align-items:center}.___SNextPage_wisyn_gg_,.___SPrevPage_wisyn_gg_{align-self:center;margin-left:8px}.___SLabel_wisyn_gg_:not(:first-child){margin-left:16px}.___STotalPages_wisyn_gg_{align-self:center;line-height:normal}.___STotalPagesLabel_wisyn_gg_{margin-left:8px;margin-right:4px}.___SPageInput_wisyn_gg_{max-width:68px;margin-left:4px}.___SPageInputValue_wisyn_gg_:focus~.___SPageInputAddon_wisyn_gg_{visibility:visible;clip:auto;position:static}.___SPageInputAddon_wisyn_gg_{visibility:hidden;clip:rect(1px,1px,1px,1px);position:absolute}.___SLabel_wisyn_gg_,.___STotalPages_wisyn_gg_,.___STotalPagesLabel_wisyn_gg_{font-size:14px;line-height:1.42}"
|
|
54
54
|
/*__inner_css_end__*/
|
|
55
|
-
, "
|
|
55
|
+
, "wisyn_gg_")
|
|
56
56
|
/*__reshadow_css_end__*/
|
|
57
57
|
, {
|
|
58
|
-
"__SPagination": "
|
|
59
|
-
"__SNextPage": "
|
|
60
|
-
"__SPrevPage": "
|
|
61
|
-
"__SLabel": "
|
|
62
|
-
"__STotalPages": "
|
|
63
|
-
"__STotalPagesLabel": "
|
|
64
|
-
"__SPageInput": "
|
|
65
|
-
"__SPageInputValue": "
|
|
66
|
-
"__SPageInputAddon": "
|
|
58
|
+
"__SPagination": "___SPagination_wisyn_gg_",
|
|
59
|
+
"__SNextPage": "___SNextPage_wisyn_gg_",
|
|
60
|
+
"__SPrevPage": "___SPrevPage_wisyn_gg_",
|
|
61
|
+
"__SLabel": "___SLabel_wisyn_gg_",
|
|
62
|
+
"__STotalPages": "___STotalPages_wisyn_gg_",
|
|
63
|
+
"__STotalPagesLabel": "___STotalPagesLabel_wisyn_gg_",
|
|
64
|
+
"__SPageInput": "___SPageInput_wisyn_gg_",
|
|
65
|
+
"__SPageInputValue": "___SPageInputValue_wisyn_gg_",
|
|
66
|
+
"__SPageInputAddon": "___SPageInputAddon_wisyn_gg_"
|
|
67
67
|
});
|
|
68
68
|
var i18n = {
|
|
69
69
|
de: de,
|
package/package.json
CHANGED
package/src/Pagination.jsx
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import createComponent, { Component, sstyled, Root } from '@semcore/core';
|
|
3
|
-
import { Box } from '@semcore/flex-box';
|
|
4
|
-
import Input from '@semcore/input';
|
|
5
|
-
import Link from '@semcore/link';
|
|
6
|
-
import { Text } from '@semcore/typography';
|
|
7
|
-
import Button from '@semcore/button';
|
|
8
|
-
import Return from '@semcore/icon/Return/m';
|
|
9
|
-
import ChevronDoubleLeft from '@semcore/icon/ChevronDoubleLeft/m';
|
|
10
|
-
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
11
|
-
import de from './translations/de.json';
|
|
12
|
-
import en from './translations/en.json';
|
|
13
|
-
import es from './translations/es.json';
|
|
14
|
-
import fr from './translations/fr.json';
|
|
15
|
-
import it from './translations/it.json';
|
|
16
|
-
import ja from './translations/ja.json';
|
|
17
|
-
import ru from './translations/ru.json';
|
|
18
|
-
import zh from './translations/zh.json';
|
|
19
|
-
import pt from './translations/pt.json';
|
|
20
|
-
import ko from './translations/ko.json';
|
|
21
|
-
import vi from './translations/vi.json';
|
|
22
|
-
|
|
23
|
-
import style from './style/pagination.shadow.css';
|
|
24
|
-
|
|
25
|
-
const i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };
|
|
26
|
-
|
|
27
|
-
const KEY_ENTER = 13;
|
|
28
|
-
|
|
29
|
-
function formatThousands(value) {
|
|
30
|
-
const main = String(value);
|
|
31
|
-
const length = main.length;
|
|
32
|
-
let output = '';
|
|
33
|
-
let i = length - 1;
|
|
34
|
-
|
|
35
|
-
while (i >= 0) {
|
|
36
|
-
output = main.charAt(i) + output;
|
|
37
|
-
if ((length - i) % 3 === 0 && i > 0) {
|
|
38
|
-
output = `,${output}`;
|
|
39
|
-
}
|
|
40
|
-
i -= 1;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return output;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
class PaginationRoot extends Component {
|
|
47
|
-
static displayName = 'Pagination';
|
|
48
|
-
|
|
49
|
-
static defaultProps = (props) => {
|
|
50
|
-
const totalPages = props.totalPages || props.defaultTotalPages || 1;
|
|
51
|
-
return {
|
|
52
|
-
defaultCurrentPage: 1,
|
|
53
|
-
defaultTotalPages: 1,
|
|
54
|
-
i18n,
|
|
55
|
-
children: (
|
|
56
|
-
<>
|
|
57
|
-
{totalPages === 1 ? null : (
|
|
58
|
-
<>
|
|
59
|
-
<Pagination.FirstPage />
|
|
60
|
-
<Pagination.PrevPage />
|
|
61
|
-
<Pagination.NextPage />
|
|
62
|
-
</>
|
|
63
|
-
)}
|
|
64
|
-
<Pagination.PageInput />
|
|
65
|
-
<Pagination.TotalPages />
|
|
66
|
-
</>
|
|
67
|
-
),
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
static style = style;
|
|
71
|
-
static enhance = [i18nEnhance()];
|
|
72
|
-
|
|
73
|
-
state = {
|
|
74
|
-
// Crutch, so as not to take out `dirtyCurrentPage` in props
|
|
75
|
-
dirtyCurrentPage: undefined,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
uncontrolledProps() {
|
|
79
|
-
return {
|
|
80
|
-
totalPages: null,
|
|
81
|
-
currentPage: null,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
componentDidUpdate(prevProps) {
|
|
86
|
-
if (prevProps.currentPage !== undefined && prevProps.currentPage !== this.asProps.currentPage) {
|
|
87
|
-
this.setState({ dirtyCurrentPage: undefined });
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
handlePageChange = (currentPage) => {
|
|
92
|
-
currentPage = Number(currentPage);
|
|
93
|
-
if (Number.isNaN(currentPage)) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
this.handlers.currentPage(currentPage);
|
|
97
|
-
this.setState({ dirtyCurrentPage: undefined });
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
handlePageValueChange = (value) => {
|
|
101
|
-
const { dirtyCurrentPage } = this.state;
|
|
102
|
-
if (Number.isNaN(Number(value))) {
|
|
103
|
-
value = dirtyCurrentPage;
|
|
104
|
-
}
|
|
105
|
-
this.setState({ dirtyCurrentPage: value });
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
handlePageValueBlur = () => {
|
|
109
|
-
const { currentPage } = this.asProps;
|
|
110
|
-
this.setState({ dirtyCurrentPage: currentPage });
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
getDirtyCurrentPage = () => {
|
|
114
|
-
const { dirtyCurrentPage } = this.state;
|
|
115
|
-
const { totalPages } = this.asProps;
|
|
116
|
-
const finalValue = dirtyCurrentPage > totalPages ? totalPages : dirtyCurrentPage;
|
|
117
|
-
return finalValue <= 0 ? 1 : finalValue;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
handlePageInputIconClick = () => {
|
|
121
|
-
const dirtyCurrentPage = this.getDirtyCurrentPage();
|
|
122
|
-
this.handlePageChange(dirtyCurrentPage);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
handlePageInputKeyDown = (event) => {
|
|
126
|
-
if (event.keyCode !== KEY_ENTER) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
const dirtyCurrentPage = this.getDirtyCurrentPage();
|
|
130
|
-
this.handlePageChange(dirtyCurrentPage);
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
getFirstPageProps = () => {
|
|
134
|
-
const { currentPage } = this.asProps;
|
|
135
|
-
const disabled = currentPage <= 1;
|
|
136
|
-
return {
|
|
137
|
-
disabled,
|
|
138
|
-
onClick: () => this.handlePageChange(1),
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
getPrevPageProps = () => {
|
|
143
|
-
const { currentPage, getI18nText } = this.asProps;
|
|
144
|
-
const disabled = currentPage <= 1;
|
|
145
|
-
return {
|
|
146
|
-
disabled,
|
|
147
|
-
onClick: () => this.handlePageChange(currentPage - 1),
|
|
148
|
-
getI18nText,
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
getNextPageProps = () => {
|
|
153
|
-
const { currentPage, totalPages, getI18nText } = this.asProps;
|
|
154
|
-
const disabled = !(currentPage < totalPages);
|
|
155
|
-
return {
|
|
156
|
-
disabled,
|
|
157
|
-
onClick: () => this.handlePageChange(currentPage + 1),
|
|
158
|
-
getI18nText,
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
getPageInputProps = () => {
|
|
163
|
-
const { getI18nText } = this.asProps;
|
|
164
|
-
return {
|
|
165
|
-
getI18nText,
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
getPageInputAddonProps = () => {
|
|
170
|
-
return {
|
|
171
|
-
onClick: this.handlePageInputIconClick,
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
getPageInputValueProps = () => {
|
|
176
|
-
const { dirtyCurrentPage } = this.state;
|
|
177
|
-
const { currentPage, totalPages, getI18nText } = this.asProps;
|
|
178
|
-
return {
|
|
179
|
-
min: 1,
|
|
180
|
-
max: totalPages,
|
|
181
|
-
value: dirtyCurrentPage === undefined ? currentPage : dirtyCurrentPage,
|
|
182
|
-
onBlur: this.handlePageValueBlur,
|
|
183
|
-
onChange: this.handlePageValueChange,
|
|
184
|
-
onKeyDown: this.handlePageInputKeyDown,
|
|
185
|
-
getI18nText,
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
getTotalPagesProps = () => {
|
|
190
|
-
const { currentPage, totalPages, getI18nText } = this.asProps;
|
|
191
|
-
return {
|
|
192
|
-
children: formatThousands(totalPages),
|
|
193
|
-
disabled: currentPage === totalPages,
|
|
194
|
-
onClick: () => this.handlePageChange(totalPages),
|
|
195
|
-
getI18nText,
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
render() {
|
|
200
|
-
const SPagination = Root;
|
|
201
|
-
const { Children } = this.asProps;
|
|
202
|
-
return sstyled(this.asProps.styles)(
|
|
203
|
-
<SPagination render={Box} tag="nav" aria-label="pagination">
|
|
204
|
-
<Children />
|
|
205
|
-
</SPagination>,
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
class FirstPage extends Component {
|
|
211
|
-
static defaultProps = () => ({
|
|
212
|
-
children: <Button.Addon tag={ChevronDoubleLeft} />,
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
render() {
|
|
216
|
-
return <Root render={Button} aria-label="First page" />;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
class NextPage extends Component {
|
|
221
|
-
static defaultProps = (props) => ({
|
|
222
|
-
children: props.getI18nText('nextPageLabel'),
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
render() {
|
|
226
|
-
const SNextPage = Root;
|
|
227
|
-
return sstyled(this.asProps.styles)(<SNextPage render={Button} use="primary" theme="info" />);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
class PrevPage extends Component {
|
|
232
|
-
static defaultProps = (props) => ({
|
|
233
|
-
children: props.getI18nText('prevPageLabel'),
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
render() {
|
|
237
|
-
const SPrevPage = Root;
|
|
238
|
-
return sstyled(this.asProps.styles)(<SPrevPage render={Button} />);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
class TotalPages extends Component {
|
|
243
|
-
render() {
|
|
244
|
-
const STotalPages = Root;
|
|
245
|
-
const STotalPagesLabel = Text;
|
|
246
|
-
const { styles, getI18nText } = this.asProps;
|
|
247
|
-
|
|
248
|
-
return sstyled(styles)(
|
|
249
|
-
<>
|
|
250
|
-
<STotalPagesLabel>{getI18nText('totalPagesLabel')}</STotalPagesLabel>
|
|
251
|
-
<STotalPages render={Link} tag="button" type="button" />
|
|
252
|
-
</>,
|
|
253
|
-
);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const PageInputValue = (props) => {
|
|
258
|
-
const SPageInputValue = Root;
|
|
259
|
-
return sstyled(props.styles)(<SPageInputValue render={Input.Value} aria-label="Current page" />);
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
const PageInputAddon = (props) => {
|
|
263
|
-
const SPageInputAddon = Root;
|
|
264
|
-
return sstyled(props.styles)(<SPageInputAddon render={Input.Addon} />);
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
class PageInput extends Component {
|
|
268
|
-
render() {
|
|
269
|
-
const SPageInput = Root;
|
|
270
|
-
const SLabel = Text;
|
|
271
|
-
const { Children, getI18nText, styles } = this.asProps;
|
|
272
|
-
|
|
273
|
-
return sstyled(styles)(
|
|
274
|
-
<>
|
|
275
|
-
<SLabel>{getI18nText('pageInputLabel')}</SLabel>
|
|
276
|
-
<SPageInput render={Input} controlsLength={Children.origin ? undefined : 2}>
|
|
277
|
-
{Children.origin ? (
|
|
278
|
-
<Children />
|
|
279
|
-
) : (
|
|
280
|
-
<>
|
|
281
|
-
<Pagination.PageInput.Value />
|
|
282
|
-
<Pagination.PageInput.Addon interactive>
|
|
283
|
-
<Return />
|
|
284
|
-
</Pagination.PageInput.Addon>
|
|
285
|
-
</>
|
|
286
|
-
)}
|
|
287
|
-
</SPageInput>
|
|
288
|
-
</>,
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
const Pagination = createComponent(PaginationRoot, {
|
|
294
|
-
PrevPage,
|
|
295
|
-
NextPage,
|
|
296
|
-
FirstPage,
|
|
297
|
-
TotalPages,
|
|
298
|
-
PageInput: [
|
|
299
|
-
PageInput,
|
|
300
|
-
{
|
|
301
|
-
Value: PageInputValue,
|
|
302
|
-
Addon: PageInputAddon,
|
|
303
|
-
},
|
|
304
|
-
],
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
export default Pagination;
|
package/src/index.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { IBoxProps } from '@semcore/flex-box';
|
|
4
|
-
import Input, { IInputProps } from '@semcore/input';
|
|
5
|
-
import { ITextProps } from '@semcore/typography';
|
|
6
|
-
import Button from '@semcore/button';
|
|
7
|
-
import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
8
|
-
|
|
9
|
-
export interface IPaginationProps extends IBoxProps, IWithI18nEnhanceProps {
|
|
10
|
-
/**
|
|
11
|
-
* Total number of pages
|
|
12
|
-
* @default 1
|
|
13
|
-
*/
|
|
14
|
-
totalPages?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Active page number
|
|
17
|
-
* @default 1
|
|
18
|
-
*/
|
|
19
|
-
currentPage?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Callback for changing the active page
|
|
22
|
-
* @param pageNumber
|
|
23
|
-
*/
|
|
24
|
-
onCurrentPageChange?: (pageNumber: number) => void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ITotalPagesProps extends ITextProps, IWithI18nEnhanceProps {}
|
|
28
|
-
|
|
29
|
-
export interface IPageInputProps extends IInputProps, IWithI18nEnhanceProps {}
|
|
30
|
-
|
|
31
|
-
export interface IPaginationContext {
|
|
32
|
-
getFirstPageProps: PropGetterFn;
|
|
33
|
-
getPrevPageProps: PropGetterFn;
|
|
34
|
-
getNextPageProps: PropGetterFn;
|
|
35
|
-
getPageInputProps: PropGetterFn;
|
|
36
|
-
getTotalPagesProps: PropGetterFn;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface IPaginationHandlers {
|
|
40
|
-
totalPages: (value: number) => void;
|
|
41
|
-
currentPage: (value: number) => void;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
declare const Pagination: (<T>(
|
|
45
|
-
props: CProps<IPaginationProps & T, IPaginationContext, IPaginationHandlers>,
|
|
46
|
-
) => ReturnEl) & {
|
|
47
|
-
PrevPage: (props: ComponentProps<typeof Button>) => ReturnEl;
|
|
48
|
-
NextPage: (props: ComponentProps<typeof Button>) => ReturnEl;
|
|
49
|
-
FirstPage: (props: ComponentProps<typeof Button>) => ReturnEl;
|
|
50
|
-
TotalPages: (props: CProps<ITotalPagesProps, {}, IPaginationHandlers>) => ReturnEl;
|
|
51
|
-
PageInput: (<T>(props: CProps<IPageInputProps & T, {}, IPaginationHandlers>) => ReturnEl) & {
|
|
52
|
-
Value: typeof Input.Value;
|
|
53
|
-
Addon: typeof Input.Addon;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default Pagination;
|
package/src/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Pagination';
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
|
|
3
|
-
SPagination {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: flex-start;
|
|
6
|
-
align-items: center;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
SNextPage,
|
|
10
|
-
SPrevPage {
|
|
11
|
-
align-self: center;
|
|
12
|
-
margin-left: 8px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
SLabel:not(:first-child) {
|
|
16
|
-
margin-left: 16px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
STotalPages {
|
|
20
|
-
align-self: center;
|
|
21
|
-
line-height: normal;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
STotalPagesLabel {
|
|
25
|
-
margin-left: 8px;
|
|
26
|
-
margin-right: 4px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
SPageInput {
|
|
30
|
-
max-width: 68px;
|
|
31
|
-
margin-left: 4px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
SPageInputValue:focus ~ SPageInputAddon {
|
|
35
|
-
visibility: visible;
|
|
36
|
-
clip: initial;
|
|
37
|
-
position: static;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
SPageInputAddon {
|
|
41
|
-
visibility: hidden;
|
|
42
|
-
clip: rect(1px, 1px, 1px, 1px);
|
|
43
|
-
position: absolute;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
SLabel,
|
|
47
|
-
STotalPages,
|
|
48
|
-
STotalPagesLabel {
|
|
49
|
-
font-size: var(--fs-200);
|
|
50
|
-
line-height: var(--lh-200);
|
|
51
|
-
}
|
package/src/translations/de.json
DELETED
package/src/translations/en.json
DELETED
package/src/translations/es.json
DELETED
package/src/translations/fr.json
DELETED
package/src/translations/it.json
DELETED
package/src/translations/ja.json
DELETED
package/src/translations/ko.json
DELETED
package/src/translations/pt.json
DELETED
package/src/translations/ru.json
DELETED
package/src/translations/vi.json
DELETED