@zendeskgarden/react-pagination 8.75.1 → 8.76.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.
Files changed (26) hide show
  1. package/dist/esm/elements/CursorPagination/CursorPagination.js +30 -0
  2. package/dist/esm/elements/CursorPagination/components/First.js +31 -0
  3. package/dist/esm/elements/CursorPagination/components/Last.js +32 -0
  4. package/dist/esm/elements/CursorPagination/components/Next.js +32 -0
  5. package/dist/esm/elements/CursorPagination/components/Previous.js +32 -0
  6. package/dist/esm/elements/Pagination/Pagination.js +208 -0
  7. package/dist/esm/elements/Pagination/components/Gap.js +22 -0
  8. package/dist/esm/elements/Pagination/components/Next.js +31 -0
  9. package/dist/esm/elements/Pagination/components/Page.js +28 -0
  10. package/dist/esm/elements/Pagination/components/Previous.js +31 -0
  11. package/dist/esm/index.js +8 -0
  12. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-double-left-stroke.svg.js +25 -0
  13. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-double-right-stroke.svg.js +25 -0
  14. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +25 -0
  15. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +25 -0
  16. package/dist/esm/styled/CursorPagination/StyledCursor.js +24 -0
  17. package/dist/esm/styled/CursorPagination/StyledCursorPagination.js +22 -0
  18. package/dist/esm/styled/CursorPagination/StyledIcon.js +36 -0
  19. package/dist/esm/styled/Pagination/StyledGap.js +30 -0
  20. package/dist/esm/styled/Pagination/StyledNavigation.js +23 -0
  21. package/dist/esm/styled/Pagination/StyledPage.js +28 -0
  22. package/dist/esm/styled/Pagination/StyledPageBase.js +44 -0
  23. package/dist/esm/styled/Pagination/StyledPagination.js +22 -0
  24. package/dist/index.cjs.js +26 -42
  25. package/package.json +5 -5
  26. package/dist/index.esm.js +0 -530
package/dist/index.esm.js DELETED
@@ -1,530 +0,0 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
-
8
- import * as React from 'react';
9
- import React__default, { cloneElement, Children, forwardRef, useContext, useState } from 'react';
10
- import PropTypes from 'prop-types';
11
- import styled, { css, ThemeContext } from 'styled-components';
12
- import { usePagination } from '@zendeskgarden/container-pagination';
13
- import { getControlledValue } from '@zendeskgarden/container-utilities';
14
- import { getColorV8, retrieveComponentStyles, DEFAULT_THEME, focusStyles, getLineHeight, useText } from '@zendeskgarden/react-theming';
15
- import { math } from 'polished';
16
-
17
- function _extends$4() {
18
- _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
19
- for (var i = 1; i < arguments.length; i++) {
20
- var source = arguments[i];
21
- for (var key in source) {
22
- if (Object.prototype.hasOwnProperty.call(source, key)) {
23
- target[key] = source[key];
24
- }
25
- }
26
- }
27
- return target;
28
- };
29
- return _extends$4.apply(this, arguments);
30
- }
31
-
32
- const COMPONENT_ID$6 = 'pagination.pagination_view';
33
- const StyledPagination = styled.ul.attrs({
34
- 'data-garden-id': COMPONENT_ID$6,
35
- 'data-garden-version': '8.75.1'
36
- }).withConfig({
37
- displayName: "StyledPagination",
38
- componentId: "sc-1b7nye9-0"
39
- })(["direction:", ";display:flex;justify-content:center;margin:0;padding:0;white-space:nowrap;color:", ";:focus{outline:none;}", ";"], props => props.theme.rtl && 'rtl', props => getColorV8('neutralHue', 600, props.theme), props => retrieveComponentStyles(COMPONENT_ID$6, props));
40
- StyledPagination.defaultProps = {
41
- theme: DEFAULT_THEME
42
- };
43
-
44
- const COMPONENT_ID$5 = 'pagination.page';
45
- const colorStyles = props => {
46
- const defaultColor = getColorV8('neutralHue', 600, props.theme);
47
- const hoverForegroundColor = getColorV8('neutralHue', 700, props.theme);
48
- const hoverBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.08);
49
- const activeForegroundColor = getColorV8('neutralHue', 800, props.theme);
50
- const activeBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.2);
51
- const currentForegroundColor = activeForegroundColor;
52
- const currentBackgroundColor = hoverBackgroundColor;
53
- const currentHoverBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.16);
54
- const currentActiveBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.28);
55
- return css(["color:", ";&:hover{background-color:", ";color:", ";}", " &:active,&:focus-visible:active,&[data-garden-focus-visible]:active{background-color:", ";color:", ";}&[aria-current='true']{background-color:", ";color:", ";}&[aria-current='true']:hover{background-color:", ";}&[aria-current='true']:active{background-color:", ";}:disabled,[aria-disabled='true']{background-color:transparent;color:", ";}"], defaultColor, hoverBackgroundColor, hoverForegroundColor, focusStyles({
56
- theme: props.theme,
57
- inset: true
58
- }), activeBackgroundColor, activeForegroundColor, currentBackgroundColor, currentForegroundColor, currentHoverBackgroundColor, currentActiveBackgroundColor, getColorV8('grey', 300, props.theme));
59
- };
60
- const sizeStyles$2 = props => {
61
- const fontSize = props.theme.fontSizes.md;
62
- const height = `${props.theme.space.base * 8}px`;
63
- const lineHeight = getLineHeight(height, fontSize);
64
- const padding = `${props.theme.space.base * 1.5}px`;
65
- return css(["padding:0 ", ";height:", ";line-height:", ";font-size:", ";"], padding, height, lineHeight, fontSize);
66
- };
67
- const StyledPageBase = styled.li.attrs({
68
- 'data-garden-id': COMPONENT_ID$5,
69
- 'data-garden-version': '8.75.1'
70
- }).withConfig({
71
- displayName: "StyledPageBase",
72
- componentId: "sc-lw1w9j-0"
73
- })(["box-sizing:border-box;display:inline-block;transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;visibility:", ";border-radius:", ";cursor:pointer;overflow:hidden;text-align:center;text-overflow:ellipsis;user-select:none;", ";&[aria-current='true']{font-weight:", ";}:disabled,[aria-disabled='true']{cursor:default;}", ";", ";"], props => props.hidden && 'hidden', props => props.theme.borderRadii.md, props => sizeStyles$2(props), props => props.theme.fontWeights.semibold, props => colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID$5, props));
74
- StyledPageBase.defaultProps = {
75
- theme: DEFAULT_THEME
76
- };
77
-
78
- const COMPONENT_ID$4 = 'pagination.page';
79
- const sizeStyles$1 = props => {
80
- const height = `${props.theme.space.base * 8}px`;
81
- return css(["min-width:", ";max-width:", ";&[aria-current='true']{max-width:none;}"], height, math(`${height} * 2`));
82
- };
83
- const StyledPage = styled(StyledPageBase).attrs({
84
- 'data-garden-id': COMPONENT_ID$4,
85
- 'data-garden-version': '8.75.1'
86
- }).withConfig({
87
- displayName: "StyledPage",
88
- componentId: "sc-1k0een3-0"
89
- })(["margin-left:", ";", ";&[aria-current=\"true\"]{font-weight:", ";}&", "{margin-left:0;}", ";"], props => `${props.theme.space.base}px`, props => sizeStyles$1(props), props => props.theme.fontWeights.semibold, props => props.theme.rtl ? ':last-of-type' : ':first-of-type', props => retrieveComponentStyles(COMPONENT_ID$4, props));
90
- StyledPage.defaultProps = {
91
- theme: DEFAULT_THEME
92
- };
93
-
94
- const COMPONENT_ID$3 = 'cursor_pagination';
95
- const StyledCursorPagination = styled.nav.attrs({
96
- 'data-garden-id': COMPONENT_ID$3,
97
- 'data-garden-version': '8.75.1'
98
- }).withConfig({
99
- displayName: "StyledCursorPagination",
100
- componentId: "sc-qmfecg-0"
101
- })(["display:flex;justify-content:center;", ";"], props => retrieveComponentStyles(COMPONENT_ID$3, props));
102
- StyledCursorPagination.defaultProps = {
103
- theme: DEFAULT_THEME
104
- };
105
-
106
- const COMPONENT_ID$2 = 'cursor_pagination.cursor';
107
- const StyledCursor = styled(StyledPageBase).attrs({
108
- 'data-garden-id': COMPONENT_ID$2,
109
- 'data-garden-version': '8.75.1',
110
- as: 'button'
111
- }).withConfig({
112
- displayName: "StyledCursor",
113
- componentId: "sc-507ee-0"
114
- })(["display:flex;align-items:center;border:none;background:transparent;padding:", ";overflow:visible;&:not(", "-of-type){margin-right:", "px;}", ";"], props => `0px ${props.theme.space.base * 2}px`, props => props.theme.rtl ? ':first' : ':last', props => props.theme.space.base, props => retrieveComponentStyles(COMPONENT_ID$2, props));
115
- StyledCursor.defaultProps = {
116
- theme: DEFAULT_THEME
117
- };
118
-
119
- const marginStyles = props => {
120
- const {
121
- type,
122
- theme
123
- } = props;
124
- const margin = theme.space.base;
125
- if (theme.rtl) {
126
- return css(["margin-", ":", "px;"], type === 'last' || type === 'next' ? 'right' : 'left', margin);
127
- }
128
- return css(["margin-", ":", "px;"], type === 'first' || type === 'previous' ? 'right' : 'left', margin);
129
- };
130
- const StyledIcon = styled(_ref => {
131
- let {
132
- children,
133
- ...props
134
- } = _ref;
135
- return cloneElement(Children.only(children), props);
136
- }).withConfig({
137
- displayName: "StyledIcon",
138
- componentId: "sc-2vzk6e-0"
139
- })(["", " transform:", ";"], marginStyles, props => props.theme.rtl && 'rotate(180deg)');
140
- StyledIcon.defaultProps = {
141
- theme: DEFAULT_THEME
142
- };
143
-
144
- const COMPONENT_ID$1 = 'pagination.gap';
145
- const sizeStyles = props => {
146
- const shift = 2;
147
- const marginTop = `-${shift}px`;
148
- const fontSize = math(`${props.theme.fontSizes.md} + ${shift}`);
149
- return css(["margin-top:", ";font-size:", ";"], marginTop, fontSize);
150
- };
151
- const StyledGap = styled(StyledPage).attrs({
152
- 'data-garden-id': COMPONENT_ID$1,
153
- 'data-garden-version': '8.75.1'
154
- }).withConfig({
155
- displayName: "StyledGap",
156
- componentId: "sc-1hqjltf-0"
157
- })(["cursor:default;", ";&:hover{background-color:transparent;color:inherit;}", ";"], props => sizeStyles(props), props => retrieveComponentStyles(COMPONENT_ID$1, props));
158
- StyledGap.defaultProps = {
159
- theme: DEFAULT_THEME
160
- };
161
-
162
- const COMPONENT_ID = 'pagination.navigation';
163
- const StyledNavigation = styled(StyledPage).attrs({
164
- 'data-garden-id': COMPONENT_ID,
165
- 'data-garden-version': '8.75.1'
166
- }).withConfig({
167
- displayName: "StyledNavigation",
168
- componentId: "sc-184uuwe-0"
169
- })(["display:flex;align-items:center;justify-content:center;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
170
- StyledNavigation.defaultProps = {
171
- theme: DEFAULT_THEME
172
- };
173
-
174
- var _path$3;
175
- function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
176
- var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
177
- return /*#__PURE__*/React.createElement("svg", _extends$3({
178
- xmlns: "http://www.w3.org/2000/svg",
179
- width: 16,
180
- height: 16,
181
- focusable: "false",
182
- viewBox: "0 0 16 16",
183
- "aria-hidden": "true"
184
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
185
- fill: "currentColor",
186
- d: "M10.39 12.688a.5.5 0 01-.718.69l-.062-.066-4-5a.5.5 0 01-.054-.542l.054-.082 4-5a.5.5 0 01.83.55l-.05.074L6.641 8l3.75 4.688z"
187
- })));
188
- };
189
-
190
- var _path$2;
191
- function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
192
- var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
193
- return /*#__PURE__*/React.createElement("svg", _extends$2({
194
- xmlns: "http://www.w3.org/2000/svg",
195
- width: 16,
196
- height: 16,
197
- focusable: "false",
198
- viewBox: "0 0 16 16",
199
- "aria-hidden": "true"
200
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
201
- fill: "currentColor",
202
- d: "M5.61 3.312a.5.5 0 01.718-.69l.062.066 4 5a.5.5 0 01.054.542l-.054.082-4 5a.5.5 0 01-.83-.55l.05-.074L9.359 8l-3.75-4.688z"
203
- })));
204
- };
205
-
206
- const PreviousComponent$1 = forwardRef((props, ref) => {
207
- const ariaLabel = useText(PreviousComponent$1, props, 'aria-label', 'Previous page');
208
- const theme = useContext(ThemeContext);
209
- return React__default.createElement(StyledNavigation, _extends$4({}, props, {
210
- "aria-label": ariaLabel,
211
- ref: ref
212
- }), theme.rtl ? React__default.createElement(SvgChevronRightStroke, null) : React__default.createElement(SvgChevronLeftStroke, null));
213
- });
214
- PreviousComponent$1.displayName = 'Pagination.Previous';
215
- const Previous$1 = PreviousComponent$1;
216
-
217
- const NextComponent$1 = forwardRef((props, ref) => {
218
- const ariaLabel = useText(NextComponent$1, props, 'aria-label', 'Next page');
219
- const theme = useContext(ThemeContext);
220
- return React__default.createElement(StyledNavigation, _extends$4({}, props, {
221
- "aria-label": ariaLabel,
222
- ref: ref
223
- }), theme.rtl ? React__default.createElement(SvgChevronLeftStroke, null) : React__default.createElement(SvgChevronRightStroke, null));
224
- });
225
- NextComponent$1.displayName = 'Pagination.Next';
226
- const Next$1 = NextComponent$1;
227
-
228
- const PageComponent = forwardRef((props, ref) => {
229
- const text = props['aria-current'] ? `Current page, page ${props.children}` : `Page ${props.children}`;
230
- const ariaLabel = useText(PageComponent, props, 'aria-label', text);
231
- return React__default.createElement(StyledPage, _extends$4({}, props, {
232
- "aria-label": ariaLabel,
233
- ref: ref
234
- }));
235
- });
236
- PageComponent.displayName = 'Pagination.Page';
237
- const Page = PageComponent;
238
-
239
- const GapComponent = forwardRef((props, ref) => React__default.createElement(StyledGap, _extends$4({}, props, {
240
- ref: ref
241
- }), "\u2026"));
242
- GapComponent.displayName = 'Pagination.Gap';
243
- const Gap = GapComponent;
244
-
245
- const PREVIOUS_KEY = 'previous';
246
- const NEXT_KEY = 'next';
247
- const Pagination = forwardRef((_ref, ref) => {
248
- let {
249
- currentPage: controlledCurrentPage,
250
- transformPageProps,
251
- totalPages,
252
- pagePadding,
253
- pageGap,
254
- onChange,
255
- ...otherProps
256
- } = _ref;
257
- const [focusedItem, setFocusedItem] = useState();
258
- const [internalCurrentPage, setInternalCurrentPage] = useState(1);
259
- const currentPage = getControlledValue(controlledCurrentPage, internalCurrentPage);
260
- const theme = useContext(ThemeContext);
261
- const {
262
- getContainerProps,
263
- getPageProps,
264
- getPreviousPageProps,
265
- getNextPageProps
266
- } = usePagination({
267
- rtl: theme.rtl,
268
- focusedItem,
269
- selectedItem: currentPage,
270
- onFocus: item => {
271
- setFocusedItem(item);
272
- },
273
- onSelect: item => {
274
- let updatedCurrentPage = item;
275
- let updatedFocusedKey = focusedItem;
276
- if (updatedCurrentPage === PREVIOUS_KEY && currentPage > 1) {
277
- updatedCurrentPage = currentPage - 1;
278
- if (updatedCurrentPage === 1 && focusedItem === PREVIOUS_KEY) {
279
- updatedFocusedKey = 1;
280
- }
281
- } else if (updatedCurrentPage === NEXT_KEY && currentPage < totalPages) {
282
- updatedCurrentPage = currentPage + 1;
283
- if (updatedCurrentPage === totalPages && updatedFocusedKey === NEXT_KEY) {
284
- updatedFocusedKey = totalPages;
285
- }
286
- }
287
- if (onChange && updatedCurrentPage !== undefined) {
288
- onChange(updatedCurrentPage);
289
- }
290
- setFocusedItem(updatedFocusedKey);
291
- setInternalCurrentPage(updatedCurrentPage);
292
- }
293
- });
294
- const getTransformedProps = function (pageType) {
295
- let props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
296
- let pageNumber = arguments.length > 2 ? arguments[2] : undefined;
297
- if (transformPageProps) {
298
- return transformPageProps(pageType, props, pageNumber);
299
- }
300
- return props;
301
- };
302
- const renderPreviousPage = () => {
303
- const isFirstPageSelected = totalPages > 0 && currentPage === 1;
304
- const focusRef = React__default.createRef();
305
- const props = isFirstPageSelected ?
306
- {
307
- hidden: true
308
- } : {
309
- ...getPreviousPageProps({
310
- 'aria-label': '',
311
- role: null,
312
- item: PREVIOUS_KEY,
313
- focusRef
314
- }),
315
- 'aria-label': undefined
316
- };
317
- return React__default.createElement(Previous$1, _extends$4({
318
- isFocused: focusedItem === PREVIOUS_KEY
319
- }, getTransformedProps('previous', props), {
320
- ref: focusRef
321
- }));
322
- };
323
- const renderNextPage = () => {
324
- const isLastPageSelected = currentPage === totalPages;
325
- const focusRef = React__default.createRef();
326
- const props = isLastPageSelected ?
327
- {
328
- hidden: true
329
- } : {
330
- ...getNextPageProps({
331
- 'aria-label': '',
332
- role: null,
333
- item: NEXT_KEY,
334
- focusRef
335
- }),
336
- 'aria-label': undefined
337
- };
338
- return React__default.createElement(Next$1, _extends$4({
339
- isFocused: focusedItem === NEXT_KEY
340
- }, getTransformedProps('next', props), {
341
- ref: focusRef
342
- }));
343
- };
344
- const createGap = pageIndex => React__default.createElement(Gap, _extends$4({
345
- key: `gap-${pageIndex}`
346
- }, getTransformedProps('gap')));
347
- const createPage = pageIndex => {
348
- const focusRef = React__default.createRef();
349
- const props = {
350
- ...getPageProps({
351
- 'aria-label': '',
352
- role: null,
353
- item: pageIndex,
354
- focusRef
355
- }),
356
- 'aria-label': undefined,
357
- title: pageIndex
358
- };
359
- return React__default.createElement(Page, _extends$4({
360
- key: pageIndex
361
- }, getTransformedProps('page', props, pageIndex), {
362
- ref: focusRef
363
- }), pageIndex);
364
- };
365
- const renderPages = () => {
366
- const pages = [];
367
- const PADDING = pagePadding;
368
- const GAP = pageGap;
369
- for (let pageIndex = 1; pageIndex <= totalPages; pageIndex++) {
370
- if (pageIndex === currentPage || pageIndex < GAP || pageIndex > totalPages - GAP + 1) {
371
- pages.push(createPage(pageIndex));
372
- continue;
373
- }
374
- let minimum;
375
- let maximum;
376
- if (currentPage <= GAP + PADDING) {
377
- minimum = GAP + 1;
378
- maximum = minimum + PADDING * 2;
379
- } else if (currentPage >= totalPages - GAP - PADDING) {
380
- maximum = totalPages - GAP;
381
- minimum = maximum - PADDING * 2;
382
- } else {
383
- minimum = currentPage - PADDING;
384
- maximum = currentPage + PADDING;
385
- }
386
- if (pageIndex >= minimum && pageIndex <= currentPage || pageIndex >= currentPage && pageIndex <= maximum) {
387
- pages.push(createPage(pageIndex));
388
- continue;
389
- }
390
- if (pageIndex === GAP) {
391
- if (minimum > GAP + 1 && currentPage > GAP + PADDING + 1) {
392
- pages.push(createGap(pageIndex));
393
- } else {
394
- pages.push(createPage(pageIndex));
395
- }
396
- continue;
397
- }
398
- if (pageIndex === totalPages - GAP + 1) {
399
- if (maximum < totalPages - GAP && currentPage < totalPages - GAP - PADDING) {
400
- pages.push(createGap(pageIndex));
401
- } else {
402
- pages.push(createPage(pageIndex));
403
- }
404
- continue;
405
- }
406
- }
407
- return pages;
408
- };
409
- return React__default.createElement(StyledPagination, _extends$4({}, getContainerProps({
410
- role: null
411
- }), otherProps, {
412
- ref: ref
413
- }), renderPreviousPage(), totalPages > 0 && renderPages(), renderNextPage());
414
- });
415
- Pagination.propTypes = {
416
- currentPage: PropTypes.number.isRequired,
417
- totalPages: PropTypes.number.isRequired,
418
- pagePadding: PropTypes.number,
419
- pageGap: PropTypes.number,
420
- onChange: PropTypes.func,
421
- transformPageProps: PropTypes.func
422
- };
423
- Pagination.defaultProps = {
424
- pagePadding: 2,
425
- pageGap: 2
426
- };
427
- Pagination.displayName = 'Pagination';
428
-
429
- var _path$1;
430
- function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
431
- var SvgChevronDoubleLeftStroke = function SvgChevronDoubleLeftStroke(props) {
432
- return /*#__PURE__*/React.createElement("svg", _extends$1({
433
- xmlns: "http://www.w3.org/2000/svg",
434
- width: 16,
435
- height: 16,
436
- focusable: "false",
437
- viewBox: "0 0 16 16",
438
- "aria-hidden": "true"
439
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
440
- fill: "currentColor",
441
- d: "M7.812 13.39a.5.5 0 01-.64-.012l-.062-.066-4-5a.5.5 0 01-.054-.542l.054-.082 4-5a.5.5 0 01.83.55l-.05.074L4.141 8l3.75 4.688a.5.5 0 01-.079.702zm5 0a.5.5 0 01-.64-.012l-.062-.066-4-5a.5.5 0 01-.054-.542l.054-.082 4-5a.5.5 0 01.83.55l-.05.074L9.141 8l3.75 4.688a.5.5 0 01-.079.702z"
442
- })));
443
- };
444
-
445
- const FirstComponent = forwardRef((_ref, ref) => {
446
- let {
447
- children,
448
- ...other
449
- } = _ref;
450
- return React__default.createElement(StyledCursor, _extends$4({
451
- ref: ref
452
- }, other), React__default.createElement(StyledIcon, {
453
- type: "first"
454
- }, React__default.createElement(SvgChevronDoubleLeftStroke, null)), React__default.createElement("span", null, children));
455
- });
456
- FirstComponent.displayName = 'CursorPagination.First';
457
- const First = FirstComponent;
458
-
459
- const NextComponent = forwardRef((_ref, ref) => {
460
- let {
461
- children,
462
- ...other
463
- } = _ref;
464
- return React__default.createElement(StyledCursor, _extends$4({
465
- ref: ref,
466
- as: "button"
467
- }, other), React__default.createElement("span", null, children), React__default.createElement(StyledIcon, {
468
- type: "next"
469
- }, React__default.createElement(SvgChevronRightStroke, null)));
470
- });
471
- NextComponent.displayName = 'CursorPagination.Next';
472
- const Next = NextComponent;
473
-
474
- const PreviousComponent = forwardRef((_ref, ref) => {
475
- let {
476
- children,
477
- ...other
478
- } = _ref;
479
- return React__default.createElement(StyledCursor, _extends$4({
480
- ref: ref,
481
- as: "button"
482
- }, other), React__default.createElement(StyledIcon, {
483
- type: "previous"
484
- }, React__default.createElement(SvgChevronLeftStroke, null)), React__default.createElement("span", null, children));
485
- });
486
- PreviousComponent.displayName = 'CursorPagination.Previous';
487
- const Previous = PreviousComponent;
488
-
489
- var _path;
490
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
491
- var SvgChevronDoubleRightStroke = function SvgChevronDoubleRightStroke(props) {
492
- return /*#__PURE__*/React.createElement("svg", _extends({
493
- xmlns: "http://www.w3.org/2000/svg",
494
- width: 16,
495
- height: 16,
496
- focusable: "false",
497
- viewBox: "0 0 16 16",
498
- "aria-hidden": "true"
499
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
500
- fill: "currentColor",
501
- d: "M8.188 2.61a.5.5 0 01.64.013l.062.065 4 5a.5.5 0 01.054.542l-.054.082-4 5a.5.5 0 01-.83-.55l.05-.074L11.859 8l-3.75-4.688a.5.5 0 01.079-.702zm-5 0a.5.5 0 01.64.013l.062.065 4 5a.5.5 0 01.054.542l-.054.082-4 5a.5.5 0 01-.83-.55l.05-.074L6.859 8l-3.75-4.688a.5.5 0 01.079-.702z"
502
- })));
503
- };
504
-
505
- const LastComponent = forwardRef((_ref, ref) => {
506
- let {
507
- children,
508
- ...other
509
- } = _ref;
510
- return React__default.createElement(StyledCursor, _extends$4({
511
- ref: ref,
512
- as: "button"
513
- }, other), React__default.createElement("span", null, children), React__default.createElement(StyledIcon, {
514
- type: "last"
515
- }, React__default.createElement(SvgChevronDoubleRightStroke, null)));
516
- });
517
- LastComponent.displayName = 'CursorPagination.Last';
518
- const Last = LastComponent;
519
-
520
- const CursorPaginationComponent = forwardRef((props, ref) => React__default.createElement(StyledCursorPagination, _extends$4({
521
- ref: ref
522
- }, props)));
523
- CursorPaginationComponent.displayName = 'CursorPagination';
524
- const CursorPagination = CursorPaginationComponent;
525
- CursorPagination.First = First;
526
- CursorPagination.Next = Next;
527
- CursorPagination.Previous = Previous;
528
- CursorPagination.Last = Last;
529
-
530
- export { CursorPagination, Pagination };