@semcore/pagination 3.2.9 → 3.2.11

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 CHANGED
@@ -2,59 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [3.2.9] - 2022-09-29
5
+ ## [3.2.11] - 2022-10-06
6
6
 
7
7
  ### Changed
8
8
 
9
- - Version patch update due to children dependencies update (`@semcore/icon` [2.30.4 ~> 2.31.0]).
10
-
11
- ## [3.2.8] - 2022-09-21
12
-
13
- ### Changed
14
-
15
- - Version patch update due to children dependencies update (`@semcore/icon` [2.30.3 ~> 2.30.4]).
16
-
17
- ## [3.2.7] - 2022-09-21
18
-
19
- ### Changed
20
-
21
- - Version patch update due to children dependencies update (`@semcore/icon` [2.30.2 ~> 2.30.3]).
22
-
23
- ## [3.2.6] - 2022-09-20
24
-
25
- ### Changed
26
-
27
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.16 ~> 4.0.17]).
28
-
29
- ## [3.2.5] - 2022-08-30
30
-
31
- ### Changed
32
-
33
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.15 ~> 4.0.16], `@semcore/flex-box` [4.5.10 ~> 4.5.11], `@semcore/icon` [2.30.1 ~> 2.30.2], `@semcore/input` [3.0.14 ~> 3.0.15], `@semcore/link` [4.1.3 ~> 4.1.4], `@semcore/utils` [3.37.0 ~> 3.37.1]).
34
-
35
- ## [3.2.4] - 2022-08-30
36
-
37
- ### Changed
38
-
39
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.14 ~> 4.0.15], `@semcore/link` [4.1.2 ~> 4.1.3]).
40
-
41
- ## [3.2.3] - 2022-08-29
42
-
43
- ### Changed
44
-
45
- - Version patch update due to children dependencies update (`@semcore/link` [4.1.1 ~> 4.1.2]).
46
-
47
- ## [3.2.2] - 2022-08-25
48
-
49
- ### Changed
50
-
51
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.13 ~> 4.0.14], `@semcore/link` [4.1.0 ~> 4.1.1]).
52
-
53
- ## [3.2.1] - 2022-08-23
54
-
55
- ### Changed
56
-
57
- - Version patch update due to children dependencies update (`@semcore/input` [3.0.13 ~> 3.0.14]).
9
+ - Version patch update due to children dependencies update (`@semcore/icon` [2.32.2 ~> 2.33.0]).
58
10
 
59
11
  ## [3.2.0] - 2022-08-22
60
12
 
@@ -68,12 +20,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
68
20
 
69
21
  - Version patch update due to children dependencies update (`@semcore/button` [4.0.12 ~> 4.0.13]).
70
22
 
71
- ## [3.1.1] - 2022-08-19
72
-
73
- ### Changed
74
-
75
- - Version patch update due to children dependencies update (`@semcore/link` [4.0.11 ~> 4.1.0]).
76
-
77
23
  ## [3.1.0] - 2022-08-17
78
24
 
79
25
  ### Added
@@ -86,114 +32,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
86
32
 
87
33
  - Version patch update due to children dependencies update (`@semcore/icon` [2.30.0 ~> 2.30.1]).
88
34
 
89
- ## [3.0.18] - 2022-08-18
90
-
91
- ### Changed
92
-
93
- - Version patch update due to children dependencies update (`@semcore/icon` [2.29.5 ~> 2.30.0]).
94
-
95
- ## [3.0.17] - 2022-08-18
96
-
97
- ### Changed
98
-
99
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.11 ~> 4.0.12], `@semcore/flex-box` [4.5.9 ~> 4.5.10], `@semcore/icon` [2.29.4 ~> 2.29.5], `@semcore/input` [3.0.12 ~> 3.0.13], `@semcore/link` [4.0.10 ~> 4.0.11], `@semcore/utils` [3.36.0 ~> 3.37.0]).
100
-
101
- ## [3.0.16] - 2022-08-11
102
-
103
- ### Changed
104
-
105
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.10 ~> 4.0.11], `@semcore/flex-box` [4.5.8 ~> 4.5.9], `@semcore/icon` [2.29.3 ~> 2.29.4], `@semcore/input` [3.0.11 ~> 3.0.12], `@semcore/link` [4.0.9 ~> 4.0.10], `@semcore/typography` [4.0.11 ~> 4.1.0], `@semcore/utils` [3.35.1 ~> 3.36.0]).
106
-
107
- ## [3.0.15] - 2022-07-25
108
-
109
- ### Changed
110
-
111
- - Version patch update due to children dependencies update (`@semcore/icon` [2.29.1 ~> 2.29.2]).
112
-
113
- ## [3.0.14] - 2022-07-25
114
-
115
- ### Changed
116
-
117
- - Version patch update due to children dependencies update (`@semcore/input` [3.0.9 ~> 3.0.10]).
118
-
119
- ## [3.0.13] - 2022-07-22
120
-
121
- ### Changed
122
-
123
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.8 ~> 4.0.9], `@semcore/flex-box` [4.5.6 ~> 4.5.7], `@semcore/icon` [2.29.0 ~> 2.29.1], `@semcore/input` [3.0.8 ~> 3.0.9], `@semcore/link` [4.0.7 ~> 4.0.8], `@semcore/utils` [3.34.0 ~> 3.35.0]).
124
-
125
- ## [3.0.12] - 2022-07-21
126
-
127
- ### Changed
128
-
129
- - Version patch update due to children dependencies update (`@semcore/icon` [2.28.0 ~> 2.29.0]).
130
-
131
- ## [3.0.11] - 2022-07-14
132
-
133
- ### Changed
134
-
135
- - Version patch update due to children dependencies update (`@semcore/input` [3.0.7 ~> 3.0.8]).
136
-
137
- ## [3.0.10] - 2022-07-14
138
-
139
- ### Changed
140
-
141
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.7 ~> 4.0.8], `@semcore/input` [3.0.6 ~> 3.0.7]).
142
-
143
- ## [3.0.9] - 2022-07-07
144
-
145
- ### Changed
146
-
147
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.6 ~> 4.0.7], `@semcore/flex-box` [4.5.5 ~> 4.5.6], `@semcore/icon` [2.27.0 ~> 2.28.0], `@semcore/input` [3.0.5 ~> 3.0.6], `@semcore/link` [4.0.6 ~> 4.0.7], `@semcore/utils` [3.33.0 ~> 3.34.0]).
148
-
149
- ## [3.0.8] - 2022-06-02
150
-
151
- ### Changed
152
-
153
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.5 ~> 4.0.6], `@semcore/flex-box` [4.5.4 ~> 4.5.5], `@semcore/icon` [2.26.1 ~> 2.27.0], `@semcore/input` [3.0.4 ~> 3.0.5], `@semcore/link` [4.0.5 ~> 4.0.6], `@semcore/utils` [3.32.2 ~> 3.33.0]).
154
-
155
- ## [3.0.7] - 2022-05-31
156
-
157
- ### Changed
158
-
159
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.4 ~> 4.0.5], `@semcore/flex-box` [4.5.3 ~> 4.5.4], `@semcore/icon` [2.26.0 ~> 2.26.1], `@semcore/input` [3.0.3 ~> 3.0.4], `@semcore/link` [4.0.4 ~> 4.0.5], `@semcore/utils` [3.32.1 ~> 3.32.2]).
160
-
161
- ## [3.0.6] - 2022-05-27
162
-
163
- ### Changed
164
-
165
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.3 ~> 4.0.4]).
166
-
167
- ## [3.0.5] - 2022-05-23
168
-
169
- ### Changed
170
-
171
- - Version patch update due to children dependencies update (`@semcore/icon` [2.25.1 ~> 2.26.0], `@semcore/input` [3.0.2 ~> 3.0.3], `@semcore/link` [4.0.3 ~> 4.0.4]).
172
-
173
- ## [3.0.4] - 2022-05-23
174
-
175
- ### Changed
176
-
177
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.2 ~> 4.0.3]).
178
-
179
- ## [3.0.3] - 2022-05-19
180
-
181
- ### Changed
182
-
183
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.1 ~> 4.0.2], `@semcore/flex-box` [4.5.1 ~> 4.5.3], `@semcore/icon` [2.25.0 ~> 2.25.1], `@semcore/input` [3.0.1 ~> 3.0.2], `@semcore/link` [4.0.2 ~> 4.0.3], `@semcore/typography` [4.0.1 ~> 4.0.3], `@semcore/utils` [3.32.0 ~> 3.32.1]).
184
-
185
- ## [3.0.2] - 2022-05-18
186
-
187
- ### Changed
188
-
189
- - Version patch update due to children dependencies update (`@semcore/button` [4.0.0 ~> 4.0.1], `@semcore/link` [4.0.1 ~> 4.0.2]).
190
-
191
- ## [3.0.1] - 2022-05-18
192
-
193
- ### Changed
194
-
195
- - Version patch update due to children dependencies update (`@semcore/icon` [2.24.0 ~> 2.25.0], `@semcore/input` [3.0.0 ~> 3.0.1], `@semcore/link` [4.0.0 ~> 4.0.1]).
196
-
197
35
  ## [3.0.0] - 2022-05-17
198
36
 
199
37
  ### BREAK
@@ -207,12 +45,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
207
45
 
208
46
  - Version patch update due to children dependencies update (`@semcore/icon` [2.21.0 ~> 2.24.0]).
209
47
 
210
- ## [2.5.1] - 2022-04-28
211
-
212
- ### Changed
213
-
214
- - Version patch update due to children dependencies update (`@semcore/icon` [2.20.0 ~> 2.21.0]).
215
-
216
48
  ## [2.5.0] - 2022-04-25
217
49
 
218
50
  ### Fixed
@@ -225,12 +57,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
225
57
 
226
58
  - Version patch update due to children dependencies update (`@semcore/icon` [2.19.4 ~> 2.20.0]).
227
59
 
228
- ## [2.4.3] - 2022-03-14
229
-
230
- ### Changed
231
-
232
- - Version patch update due to children dependencies update (`@semcore/button` [3.3.6 ~> 3.3.7], `@semcore/flex-box` [4.5.0 ~> 4.5.1], `@semcore/icon` [2.19.3 ~> 2.19.4], `@semcore/input` [2.2.4 ~> 2.2.5], `@semcore/link` [3.5.0 ~> 3.5.1], `@semcore/utils` [3.31.2 ~> 3.31.2]).
233
-
234
60
  ## [2.4.1] - 2022-02-24
235
61
 
236
62
  ### Added
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright ©, 2022, Semrush Inc. (written by Roman Lysov, Sergey Kobets, Mikhail Karachev, Julia Mnizhek, Elena Krasnopolskaia, Mikhail Sereniti).
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -86,20 +86,20 @@ var style = (
86
86
  /*__reshadow_css_start__*/
87
87
  _core.sstyled.insert(
88
88
  /*__inner_css_start__*/
89
- ".___SPagination_19cjt_gg_{display:flex;justify-content:flex-start;align-items:center}.___SNextPage_19cjt_gg_,.___SPrevPage_19cjt_gg_{align-self:center;margin-left:8px}.___SLabel_19cjt_gg_:not(:first-child){margin-left:16px}.___STotalPages_19cjt_gg_{align-self:center;line-height:normal}.___STotalPagesLabel_19cjt_gg_{margin-left:8px;margin-right:4px}.___SPageInput_19cjt_gg_{max-width:68px;margin-left:4px}.___SPageInputValue_19cjt_gg_:focus~.___SPageInputAddon_19cjt_gg_{visibility:visible;clip:auto;position:static}.___SPageInputAddon_19cjt_gg_{visibility:hidden;clip:rect(1px,1px,1px,1px);position:absolute}.___SLabel_19cjt_gg_,.___STotalPages_19cjt_gg_,.___STotalPagesLabel_19cjt_gg_{font-size:14px;line-height:1.42}"
89
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SPagination_ymymw_gg_ {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n}\n\n.___SNextPage_ymymw_gg_,\n.___SPrevPage_ymymw_gg_ {\n align-self: center;\n margin-left: 8px;\n}\n\n.___SLabel_ymymw_gg_:not(:first-child) {\n margin-left: 16px;\n}\n\n.___STotalPages_ymymw_gg_ {\n align-self: center;\n line-height: normal;\n}\n\n.___STotalPagesLabel_ymymw_gg_ {\n margin-left: 8px;\n margin-right: 4px;\n}\n\n.___SPageInput_ymymw_gg_ {\n max-width: 68px;\n margin-left: 4px;\n}\n\n.___SPageInputValue_ymymw_gg_:focus ~ .___SPageInputAddon_ymymw_gg_ {\n visibility: visible;\n clip: auto;\n clip: initial;\n position: static;\n}\n\n.___SPageInputAddon_ymymw_gg_ {\n visibility: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute;\n}\n\n.___SLabel_ymymw_gg_,\n.___STotalPages_ymymw_gg_,\n.___STotalPagesLabel_ymymw_gg_ {\n font-size: 14px;\n line-height: 1.42;\n}\n"
90
90
  /*__inner_css_end__*/
91
- , "19cjt_gg_")
91
+ , "ymymw_gg_")
92
92
  /*__reshadow_css_end__*/
93
93
  , {
94
- "__SPagination": "___SPagination_19cjt_gg_",
95
- "__SNextPage": "___SNextPage_19cjt_gg_",
96
- "__SPrevPage": "___SPrevPage_19cjt_gg_",
97
- "__SLabel": "___SLabel_19cjt_gg_",
98
- "__STotalPages": "___STotalPages_19cjt_gg_",
99
- "__STotalPagesLabel": "___STotalPagesLabel_19cjt_gg_",
100
- "__SPageInput": "___SPageInput_19cjt_gg_",
101
- "__SPageInputValue": "___SPageInputValue_19cjt_gg_",
102
- "__SPageInputAddon": "___SPageInputAddon_19cjt_gg_"
94
+ "__SPagination": "___SPagination_ymymw_gg_",
95
+ "__SNextPage": "___SNextPage_ymymw_gg_",
96
+ "__SPrevPage": "___SPrevPage_ymymw_gg_",
97
+ "__SLabel": "___SLabel_ymymw_gg_",
98
+ "__STotalPages": "___STotalPages_ymymw_gg_",
99
+ "__STotalPagesLabel": "___STotalPagesLabel_ymymw_gg_",
100
+ "__SPageInput": "___SPageInput_ymymw_gg_",
101
+ "__SPageInputValue": "___SPageInputValue_ymymw_gg_",
102
+ "__SPageInputAddon": "___SPageInputAddon_ymymw_gg_"
103
103
  });
104
104
  var i18n = {
105
105
  de: _de["default"],
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\nimport Input, { IInputProps } from '@semcore/input';\nimport { ITextProps } from '@semcore/typography';\nimport Button from '@semcore/button';\nimport { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\n\nexport interface IPaginationProps extends IBoxProps, IWithI18nEnhanceProps {\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}\n\nexport interface ITotalPagesProps extends ITextProps, IWithI18nEnhanceProps {}\n\nexport interface IPageInputProps extends IInputProps, IWithI18nEnhanceProps {}\n\nexport interface IPaginationContext {\n getFirstPageProps: PropGetterFn;\n getPrevPageProps: PropGetterFn;\n getNextPageProps: PropGetterFn;\n getPageInputProps: PropGetterFn;\n getTotalPagesProps: PropGetterFn;\n}\n\nexport interface IPaginationHandlers {\n totalPages: (value: number) => void;\n currentPage: (value: number) => void;\n}\n\ndeclare const Pagination: (<T>(\n props: CProps<IPaginationProps & T, IPaginationContext, IPaginationHandlers>,\n) => ReturnEl) & {\n PrevPage: (props: ComponentProps<typeof Button>) => ReturnEl;\n NextPage: (props: ComponentProps<typeof Button>) => ReturnEl;\n FirstPage: (props: ComponentProps<typeof Button>) => ReturnEl;\n TotalPages: (props: CProps<ITotalPagesProps, {}, IPaginationHandlers>) => ReturnEl;\n PageInput: (<T>(props: CProps<IPageInputProps & T, {}, IPaginationHandlers>) => ReturnEl) & {\n Value: typeof Input.Value;\n Addon: typeof Input.Addon;\n };\n};\n\nexport default Pagination;\n"],"mappings":""}
@@ -52,20 +52,20 @@ var style = (
52
52
  /*__reshadow_css_start__*/
53
53
  _sstyled.insert(
54
54
  /*__inner_css_start__*/
55
- ".___SPagination_19cjt_gg_{display:flex;justify-content:flex-start;align-items:center}.___SNextPage_19cjt_gg_,.___SPrevPage_19cjt_gg_{align-self:center;margin-left:8px}.___SLabel_19cjt_gg_:not(:first-child){margin-left:16px}.___STotalPages_19cjt_gg_{align-self:center;line-height:normal}.___STotalPagesLabel_19cjt_gg_{margin-left:8px;margin-right:4px}.___SPageInput_19cjt_gg_{max-width:68px;margin-left:4px}.___SPageInputValue_19cjt_gg_:focus~.___SPageInputAddon_19cjt_gg_{visibility:visible;clip:auto;position:static}.___SPageInputAddon_19cjt_gg_{visibility:hidden;clip:rect(1px,1px,1px,1px);position:absolute}.___SLabel_19cjt_gg_,.___STotalPages_19cjt_gg_,.___STotalPagesLabel_19cjt_gg_{font-size:14px;line-height:1.42}"
55
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SPagination_ymymw_gg_ {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n}\n\n.___SNextPage_ymymw_gg_,\n.___SPrevPage_ymymw_gg_ {\n align-self: center;\n margin-left: 8px;\n}\n\n.___SLabel_ymymw_gg_:not(:first-child) {\n margin-left: 16px;\n}\n\n.___STotalPages_ymymw_gg_ {\n align-self: center;\n line-height: normal;\n}\n\n.___STotalPagesLabel_ymymw_gg_ {\n margin-left: 8px;\n margin-right: 4px;\n}\n\n.___SPageInput_ymymw_gg_ {\n max-width: 68px;\n margin-left: 4px;\n}\n\n.___SPageInputValue_ymymw_gg_:focus ~ .___SPageInputAddon_ymymw_gg_ {\n visibility: visible;\n clip: auto;\n clip: initial;\n position: static;\n}\n\n.___SPageInputAddon_ymymw_gg_ {\n visibility: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute;\n}\n\n.___SLabel_ymymw_gg_,\n.___STotalPages_ymymw_gg_,\n.___STotalPagesLabel_ymymw_gg_ {\n font-size: 14px;\n line-height: 1.42;\n}\n"
56
56
  /*__inner_css_end__*/
57
- , "19cjt_gg_")
57
+ , "ymymw_gg_")
58
58
  /*__reshadow_css_end__*/
59
59
  , {
60
- "__SPagination": "___SPagination_19cjt_gg_",
61
- "__SNextPage": "___SNextPage_19cjt_gg_",
62
- "__SPrevPage": "___SPrevPage_19cjt_gg_",
63
- "__SLabel": "___SLabel_19cjt_gg_",
64
- "__STotalPages": "___STotalPages_19cjt_gg_",
65
- "__STotalPagesLabel": "___STotalPagesLabel_19cjt_gg_",
66
- "__SPageInput": "___SPageInput_19cjt_gg_",
67
- "__SPageInputValue": "___SPageInputValue_19cjt_gg_",
68
- "__SPageInputAddon": "___SPageInputAddon_19cjt_gg_"
60
+ "__SPagination": "___SPagination_ymymw_gg_",
61
+ "__SNextPage": "___SNextPage_ymymw_gg_",
62
+ "__SPrevPage": "___SPrevPage_ymymw_gg_",
63
+ "__SLabel": "___SLabel_ymymw_gg_",
64
+ "__STotalPages": "___STotalPages_ymymw_gg_",
65
+ "__STotalPagesLabel": "___STotalPagesLabel_ymymw_gg_",
66
+ "__SPageInput": "___SPageInput_ymymw_gg_",
67
+ "__SPageInputValue": "___SPageInputValue_ymymw_gg_",
68
+ "__SPageInputAddon": "___SPageInputAddon_ymymw_gg_"
69
69
  });
70
70
  var i18n = {
71
71
  de: de,
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\nimport Input, { IInputProps } from '@semcore/input';\nimport { ITextProps } from '@semcore/typography';\nimport Button from '@semcore/button';\nimport { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\n\nexport interface IPaginationProps extends IBoxProps, IWithI18nEnhanceProps {\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}\n\nexport interface ITotalPagesProps extends ITextProps, IWithI18nEnhanceProps {}\n\nexport interface IPageInputProps extends IInputProps, IWithI18nEnhanceProps {}\n\nexport interface IPaginationContext {\n getFirstPageProps: PropGetterFn;\n getPrevPageProps: PropGetterFn;\n getNextPageProps: PropGetterFn;\n getPageInputProps: PropGetterFn;\n getTotalPagesProps: PropGetterFn;\n}\n\nexport interface IPaginationHandlers {\n totalPages: (value: number) => void;\n currentPage: (value: number) => void;\n}\n\ndeclare const Pagination: (<T>(\n props: CProps<IPaginationProps & T, IPaginationContext, IPaginationHandlers>,\n) => ReturnEl) & {\n PrevPage: (props: ComponentProps<typeof Button>) => ReturnEl;\n NextPage: (props: ComponentProps<typeof Button>) => ReturnEl;\n FirstPage: (props: ComponentProps<typeof Button>) => ReturnEl;\n TotalPages: (props: CProps<ITotalPagesProps, {}, IPaginationHandlers>) => ReturnEl;\n PageInput: (<T>(props: CProps<IPageInputProps & T, {}, IPaginationHandlers>) => ReturnEl) & {\n Value: typeof Input.Value;\n Addon: typeof Input.Addon;\n };\n};\n\nexport default Pagination;\n"],"mappings":""}
package/package.json CHANGED
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "@semcore/pagination",
3
3
  "description": "Semrush Pagination Component",
4
- "version": "3.2.9",
4
+ "version": "3.2.11",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
- "scripts": {
12
- "build": "build --source=js",
13
- "test": "jest"
14
- },
15
11
  "dependencies": {
16
12
  "@semcore/button": "^4",
17
13
  "@semcore/flex-box": "^4",
@@ -34,6 +30,11 @@
34
30
  "directory": "semcore/pagination"
35
31
  },
36
32
  "devDependencies": {
33
+ "@types/react": "16.8 - 17",
37
34
  "@semcore/jest-preset-ui": "1.0.0"
35
+ },
36
+ "scripts": {
37
+ "build": "pnpm semcore-builder --source=js",
38
+ "test": "jest"
38
39
  }
39
- }
40
+ }
@@ -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;
@@ -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;