@zendeskgarden/react-pagination 8.57.1 → 8.59.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/dist/index.cjs.js CHANGED
@@ -42,338 +42,157 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
42
42
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
43
43
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
44
44
 
45
- function ownKeys(object, enumerableOnly) {
46
- var keys = Object.keys(object);
47
-
48
- if (Object.getOwnPropertySymbols) {
49
- var symbols = Object.getOwnPropertySymbols(object);
50
- enumerableOnly && (symbols = symbols.filter(function (sym) {
51
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
52
- })), keys.push.apply(keys, symbols);
53
- }
54
-
55
- return keys;
56
- }
57
-
58
- function _objectSpread2(target) {
59
- for (var i = 1; i < arguments.length; i++) {
60
- var source = null != arguments[i] ? arguments[i] : {};
61
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
62
- _defineProperty(target, key, source[key]);
63
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
64
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
65
- });
66
- }
67
-
68
- return target;
69
- }
70
-
71
- function _defineProperty(obj, key, value) {
72
- if (key in obj) {
73
- Object.defineProperty(obj, key, {
74
- value: value,
75
- enumerable: true,
76
- configurable: true,
77
- writable: true
78
- });
79
- } else {
80
- obj[key] = value;
81
- }
82
-
83
- return obj;
84
- }
85
-
86
45
  function _extends$4() {
87
46
  _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
88
47
  for (var i = 1; i < arguments.length; i++) {
89
48
  var source = arguments[i];
90
-
91
49
  for (var key in source) {
92
50
  if (Object.prototype.hasOwnProperty.call(source, key)) {
93
51
  target[key] = source[key];
94
52
  }
95
53
  }
96
54
  }
97
-
98
55
  return target;
99
56
  };
100
57
  return _extends$4.apply(this, arguments);
101
58
  }
102
59
 
103
- function _objectWithoutPropertiesLoose(source, excluded) {
104
- if (source == null) return {};
105
- var target = {};
106
- var sourceKeys = Object.keys(source);
107
- var key, i;
108
-
109
- for (i = 0; i < sourceKeys.length; i++) {
110
- key = sourceKeys[i];
111
- if (excluded.indexOf(key) >= 0) continue;
112
- target[key] = source[key];
113
- }
114
-
115
- return target;
116
- }
117
-
118
- function _objectWithoutProperties(source, excluded) {
119
- if (source == null) return {};
120
-
121
- var target = _objectWithoutPropertiesLoose(source, excluded);
122
-
123
- var key, i;
124
-
125
- if (Object.getOwnPropertySymbols) {
126
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
127
-
128
- for (i = 0; i < sourceSymbolKeys.length; i++) {
129
- key = sourceSymbolKeys[i];
130
- if (excluded.indexOf(key) >= 0) continue;
131
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
132
- target[key] = source[key];
133
- }
134
- }
135
-
136
- return target;
137
- }
138
-
139
- function _slicedToArray(arr, i) {
140
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
141
- }
142
-
143
- function _arrayWithHoles(arr) {
144
- if (Array.isArray(arr)) return arr;
145
- }
146
-
147
- function _iterableToArrayLimit(arr, i) {
148
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
149
-
150
- if (_i == null) return;
151
- var _arr = [];
152
- var _n = true;
153
- var _d = false;
154
-
155
- var _s, _e;
156
-
157
- try {
158
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
159
- _arr.push(_s.value);
160
-
161
- if (i && _arr.length === i) break;
162
- }
163
- } catch (err) {
164
- _d = true;
165
- _e = err;
166
- } finally {
167
- try {
168
- if (!_n && _i["return"] != null) _i["return"]();
169
- } finally {
170
- if (_d) throw _e;
171
- }
172
- }
173
-
174
- return _arr;
175
- }
176
-
177
- function _unsupportedIterableToArray(o, minLen) {
178
- if (!o) return;
179
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
180
- var n = Object.prototype.toString.call(o).slice(8, -1);
181
- if (n === "Object" && o.constructor) n = o.constructor.name;
182
- if (n === "Map" || n === "Set") return Array.from(o);
183
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
184
- }
185
-
186
- function _arrayLikeToArray(arr, len) {
187
- if (len == null || len > arr.length) len = arr.length;
188
-
189
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
190
-
191
- return arr2;
192
- }
193
-
194
- function _nonIterableRest() {
195
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
196
- }
197
-
198
- var COMPONENT_ID$6 = 'pagination.pagination_view';
199
- var StyledPagination = styled__default["default"].ul.attrs({
60
+ const COMPONENT_ID$6 = 'pagination.pagination_view';
61
+ const StyledPagination = styled__default["default"].ul.attrs({
200
62
  'data-garden-id': COMPONENT_ID$6,
201
- 'data-garden-version': '8.57.1'
63
+ 'data-garden-version': '8.59.0'
202
64
  }).withConfig({
203
65
  displayName: "StyledPagination",
204
66
  componentId: "sc-1b7nye9-0"
205
- })(["direction:", ";display:flex;justify-content:center;margin:0;padding:0;white-space:nowrap;color:", ";:focus{outline:none;}", ";"], function (props) {
206
- return props.theme.rtl && 'rtl';
207
- }, function (props) {
208
- return reactTheming.getColor('neutralHue', 600, props.theme);
209
- }, function (props) {
210
- return reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props);
211
- });
67
+ })(["direction:", ";display:flex;justify-content:center;margin:0;padding:0;white-space:nowrap;color:", ";:focus{outline:none;}", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getColor('neutralHue', 600, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
212
68
  StyledPagination.defaultProps = {
213
69
  theme: reactTheming.DEFAULT_THEME
214
70
  };
215
71
 
216
- var COMPONENT_ID$5 = 'pagination.page';
217
- var colorStyles = function colorStyles(props) {
218
- var defaultColor = reactTheming.getColor('neutralHue', 600, props.theme);
219
- var hoverForegroundColor = reactTheming.getColor('neutralHue', 700, props.theme);
220
- var hoverBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.08);
221
- var boxShadowColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.35);
222
- var activeForegroundColor = reactTheming.getColor('neutralHue', 800, props.theme);
223
- var activeBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.2);
224
- var currentForegroundColor = activeForegroundColor;
225
- var currentBackgroundColor = hoverBackgroundColor;
226
- var currentHoverBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.16);
227
- var currentActiveBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.28);
72
+ const COMPONENT_ID$5 = 'pagination.page';
73
+ const colorStyles = props => {
74
+ const defaultColor = reactTheming.getColor('neutralHue', 600, props.theme);
75
+ const hoverForegroundColor = reactTheming.getColor('neutralHue', 700, props.theme);
76
+ const hoverBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.08);
77
+ const boxShadowColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.35);
78
+ const activeForegroundColor = reactTheming.getColor('neutralHue', 800, props.theme);
79
+ const activeBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.2);
80
+ const currentForegroundColor = activeForegroundColor;
81
+ const currentBackgroundColor = hoverBackgroundColor;
82
+ const currentHoverBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.16);
83
+ const currentActiveBackgroundColor = reactTheming.getColor('primaryHue', 600, props.theme, 0.28);
228
84
  return styled.css(["color:", ";&:hover{background-color:", ";color:", ";}&[data-garden-focus-visible]{box-shadow:inset ", ";}&: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, props.theme.shadows.md(boxShadowColor), activeBackgroundColor, activeForegroundColor, currentBackgroundColor, currentForegroundColor, currentHoverBackgroundColor, currentActiveBackgroundColor, reactTheming.getColor('grey', 300, props.theme));
229
85
  };
230
- var sizeStyles$2 = function sizeStyles(props) {
231
- var fontSize = props.theme.fontSizes.md;
232
- var height = "".concat(props.theme.space.base * 8, "px");
233
- var lineHeight = reactTheming.getLineHeight(height, fontSize);
234
- var padding = "".concat(props.theme.space.base * 1.5, "px");
86
+ const sizeStyles$2 = props => {
87
+ const fontSize = props.theme.fontSizes.md;
88
+ const height = `${props.theme.space.base * 8}px`;
89
+ const lineHeight = reactTheming.getLineHeight(height, fontSize);
90
+ const padding = `${props.theme.space.base * 1.5}px`;
235
91
  return styled.css(["padding:0 ", ";height:", ";line-height:", ";font-size:", ";"], padding, height, lineHeight, fontSize);
236
92
  };
237
- var StyledPageBase = styled__default["default"].li.attrs({
93
+ const StyledPageBase = styled__default["default"].li.attrs({
238
94
  'data-garden-id': COMPONENT_ID$5,
239
- 'data-garden-version': '8.57.1'
95
+ 'data-garden-version': '8.59.0'
240
96
  }).withConfig({
241
97
  displayName: "StyledPageBase",
242
98
  componentId: "sc-lw1w9j-0"
243
- })(["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;", ";&:focus{outline:none;}&[aria-current='true']{font-weight:", ";}:disabled,[aria-disabled='true']{cursor:default;}", ";", ";"], function (props) {
244
- return props.hidden && 'hidden';
245
- }, function (props) {
246
- return props.theme.borderRadii.md;
247
- }, function (props) {
248
- return sizeStyles$2(props);
249
- }, function (props) {
250
- return props.theme.fontWeights.semibold;
251
- }, function (props) {
252
- return colorStyles(props);
253
- }, function (props) {
254
- return reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props);
255
- });
99
+ })(["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;", ";&:focus{outline: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 => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
256
100
  StyledPageBase.defaultProps = {
257
101
  theme: reactTheming.DEFAULT_THEME
258
102
  };
259
103
 
260
- var COMPONENT_ID$4 = 'pagination.page';
261
- var sizeStyles$1 = function sizeStyles(props) {
262
- var height = "".concat(props.theme.space.base * 8, "px");
263
- return styled.css(["min-width:", ";max-width:", ";&[aria-current='true']{max-width:none;}"], height, polished.math("".concat(height, " * 2")));
104
+ const COMPONENT_ID$4 = 'pagination.page';
105
+ const sizeStyles$1 = props => {
106
+ const height = `${props.theme.space.base * 8}px`;
107
+ return styled.css(["min-width:", ";max-width:", ";&[aria-current='true']{max-width:none;}"], height, polished.math(`${height} * 2`));
264
108
  };
265
- var StyledPage = styled__default["default"](StyledPageBase).attrs({
109
+ const StyledPage = styled__default["default"](StyledPageBase).attrs({
266
110
  'data-garden-id': COMPONENT_ID$4,
267
- 'data-garden-version': '8.57.1'
111
+ 'data-garden-version': '8.59.0'
268
112
  }).withConfig({
269
113
  displayName: "StyledPage",
270
114
  componentId: "sc-1k0een3-0"
271
- })(["margin-left:", ";", ";&[aria-current=\"true\"]{font-weight:", ";}&", "{margin-left:0;}", ";"], function (props) {
272
- return "".concat(props.theme.space.base, "px");
273
- }, function (props) {
274
- return sizeStyles$1(props);
275
- }, function (props) {
276
- return props.theme.fontWeights.semibold;
277
- }, function (props) {
278
- return props.theme.rtl ? ':last-of-type' : ':first-of-type';
279
- }, function (props) {
280
- return reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props);
281
- });
115
+ })(["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 => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
282
116
  StyledPage.defaultProps = {
283
117
  theme: reactTheming.DEFAULT_THEME
284
118
  };
285
119
 
286
- var COMPONENT_ID$3 = 'cursor_pagination';
287
- var StyledCursorPagination = styled__default["default"].nav.attrs({
120
+ const COMPONENT_ID$3 = 'cursor_pagination';
121
+ const StyledCursorPagination = styled__default["default"].nav.attrs({
288
122
  'data-garden-id': COMPONENT_ID$3,
289
- 'data-garden-version': '8.57.1'
123
+ 'data-garden-version': '8.59.0'
290
124
  }).withConfig({
291
125
  displayName: "StyledCursorPagination",
292
126
  componentId: "sc-qmfecg-0"
293
- })(["display:flex;justify-content:center;", ";"], function (props) {
294
- return reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props);
295
- });
127
+ })(["display:flex;justify-content:center;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
296
128
  StyledCursorPagination.defaultProps = {
297
129
  theme: reactTheming.DEFAULT_THEME
298
130
  };
299
131
 
300
- var COMPONENT_ID$2 = 'cursor_pagination.cursor';
301
- var StyledCursor = styled__default["default"](StyledPageBase).attrs({
132
+ const COMPONENT_ID$2 = 'cursor_pagination.cursor';
133
+ const StyledCursor = styled__default["default"](StyledPageBase).attrs({
302
134
  'data-garden-id': COMPONENT_ID$2,
303
- 'data-garden-version': '8.57.1',
135
+ 'data-garden-version': '8.59.0',
304
136
  as: 'button'
305
137
  }).withConfig({
306
138
  displayName: "StyledCursor",
307
139
  componentId: "sc-507ee-0"
308
- })(["display:flex;align-items:center;border:none;background:transparent;padding:", ";overflow:visible;&:not(", "-of-type){margin-right:", "px;}", ";"], function (props) {
309
- return "0px ".concat(props.theme.space.base * 2, "px");
310
- }, function (props) {
311
- return props.theme.rtl ? ':first' : ':last';
312
- }, function (props) {
313
- return props.theme.space.base;
314
- }, function (props) {
315
- return reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props);
316
- });
140
+ })(["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 => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
317
141
  StyledCursor.defaultProps = {
318
142
  theme: reactTheming.DEFAULT_THEME
319
143
  };
320
144
 
321
- var _excluded$5 = ["children"];
322
- var marginStyles = function marginStyles(props) {
323
- var type = props.type,
324
- theme = props.theme;
325
- var margin = theme.space.base;
145
+ const marginStyles = props => {
146
+ const {
147
+ type,
148
+ theme
149
+ } = props;
150
+ const margin = theme.space.base;
326
151
  if (theme.rtl) {
327
152
  return styled.css(["margin-", ":", "px;"], type === 'last' || type === 'next' ? 'right' : 'left', margin);
328
153
  }
329
154
  return styled.css(["margin-", ":", "px;"], type === 'first' || type === 'previous' ? 'right' : 'left', margin);
330
155
  };
331
- var StyledIcon = styled__default["default"](function (_ref) {
332
- var children = _ref.children,
333
- props = _objectWithoutProperties(_ref, _excluded$5);
156
+ const StyledIcon = styled__default["default"](_ref => {
157
+ let {
158
+ children,
159
+ ...props
160
+ } = _ref;
334
161
  return React.cloneElement(React.Children.only(children), props);
335
162
  }).withConfig({
336
163
  displayName: "StyledIcon",
337
164
  componentId: "sc-2vzk6e-0"
338
- })(["", " transform:", ";"], marginStyles, function (props) {
339
- return props.theme.rtl && 'rotate(180deg)';
340
- });
165
+ })(["", " transform:", ";"], marginStyles, props => props.theme.rtl && 'rotate(180deg)');
341
166
  StyledIcon.defaultProps = {
342
167
  theme: reactTheming.DEFAULT_THEME
343
168
  };
344
169
 
345
- var COMPONENT_ID$1 = 'pagination.gap';
346
- var sizeStyles = function sizeStyles(props) {
347
- var shift = 2;
348
- var marginTop = "-".concat(shift, "px");
349
- var fontSize = polished.math("".concat(props.theme.fontSizes.md, " + ").concat(shift));
170
+ const COMPONENT_ID$1 = 'pagination.gap';
171
+ const sizeStyles = props => {
172
+ const shift = 2;
173
+ const marginTop = `-${shift}px`;
174
+ const fontSize = polished.math(`${props.theme.fontSizes.md} + ${shift}`);
350
175
  return styled.css(["margin-top:", ";font-size:", ";"], marginTop, fontSize);
351
176
  };
352
- var StyledGap = styled__default["default"](StyledPage).attrs({
177
+ const StyledGap = styled__default["default"](StyledPage).attrs({
353
178
  'data-garden-id': COMPONENT_ID$1,
354
- 'data-garden-version': '8.57.1'
179
+ 'data-garden-version': '8.59.0'
355
180
  }).withConfig({
356
181
  displayName: "StyledGap",
357
182
  componentId: "sc-1hqjltf-0"
358
- })(["cursor:default;", ";&:hover{background-color:transparent;color:inherit;}", ";"], function (props) {
359
- return sizeStyles(props);
360
- }, function (props) {
361
- return reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props);
362
- });
183
+ })(["cursor:default;", ";&:hover{background-color:transparent;color:inherit;}", ";"], props => sizeStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
363
184
  StyledGap.defaultProps = {
364
185
  theme: reactTheming.DEFAULT_THEME
365
186
  };
366
187
 
367
- var COMPONENT_ID = 'pagination.navigation';
368
- var StyledNavigation = styled__default["default"](StyledPage).attrs({
188
+ const COMPONENT_ID = 'pagination.navigation';
189
+ const StyledNavigation = styled__default["default"](StyledPage).attrs({
369
190
  'data-garden-id': COMPONENT_ID,
370
- 'data-garden-version': '8.57.1'
191
+ 'data-garden-version': '8.59.0'
371
192
  }).withConfig({
372
193
  displayName: "StyledNavigation",
373
194
  componentId: "sc-184uuwe-0"
374
- })(["display:flex;align-items:center;justify-content:center;", ";"], function (props) {
375
- return reactTheming.retrieveComponentStyles(COMPONENT_ID, props);
376
- });
195
+ })(["display:flex;align-items:center;justify-content:center;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
377
196
  StyledNavigation.defaultProps = {
378
197
  theme: reactTheming.DEFAULT_THEME
379
198
  };
@@ -389,7 +208,8 @@ var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
389
208
  height: 16,
390
209
  focusable: "false",
391
210
  viewBox: "0 0 16 16",
392
- "aria-hidden": "true"
211
+ "aria-hidden": "true",
212
+ role: "img"
393
213
  }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
394
214
  fill: "currentColor",
395
215
  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"
@@ -407,85 +227,84 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
407
227
  height: 16,
408
228
  focusable: "false",
409
229
  viewBox: "0 0 16 16",
410
- "aria-hidden": "true"
230
+ "aria-hidden": "true",
231
+ role: "img"
411
232
  }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
412
233
  fill: "currentColor",
413
234
  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"
414
235
  })));
415
236
  };
416
237
 
417
- var PreviousComponent$1 = React.forwardRef(function (props, ref) {
418
- var ariaLabel = reactTheming.useText(PreviousComponent$1, props, 'aria-label', 'Previous page');
419
- var theme = React.useContext(styled.ThemeContext);
238
+ const PreviousComponent$1 = React.forwardRef((props, ref) => {
239
+ const ariaLabel = reactTheming.useText(PreviousComponent$1, props, 'aria-label', 'Previous page');
240
+ const theme = React.useContext(styled.ThemeContext);
420
241
  return React__default["default"].createElement(StyledNavigation, _extends$4({}, props, {
421
242
  "aria-label": ariaLabel,
422
243
  ref: ref
423
244
  }), theme.rtl ? React__default["default"].createElement(SvgChevronRightStroke, null) : React__default["default"].createElement(SvgChevronLeftStroke, null));
424
245
  });
425
246
  PreviousComponent$1.displayName = 'Pagination.Previous';
426
- var Previous$1 = PreviousComponent$1;
247
+ const Previous$1 = PreviousComponent$1;
427
248
 
428
- var NextComponent$1 = React.forwardRef(function (props, ref) {
429
- var ariaLabel = reactTheming.useText(NextComponent$1, props, 'aria-label', 'Next page');
430
- var theme = React.useContext(styled.ThemeContext);
249
+ const NextComponent$1 = React.forwardRef((props, ref) => {
250
+ const ariaLabel = reactTheming.useText(NextComponent$1, props, 'aria-label', 'Next page');
251
+ const theme = React.useContext(styled.ThemeContext);
431
252
  return React__default["default"].createElement(StyledNavigation, _extends$4({}, props, {
432
253
  "aria-label": ariaLabel,
433
254
  ref: ref
434
255
  }), theme.rtl ? React__default["default"].createElement(SvgChevronLeftStroke, null) : React__default["default"].createElement(SvgChevronRightStroke, null));
435
256
  });
436
257
  NextComponent$1.displayName = 'Pagination.Next';
437
- var Next$1 = NextComponent$1;
258
+ const Next$1 = NextComponent$1;
438
259
 
439
- var PageComponent = React.forwardRef(function (props, ref) {
440
- var text = props['aria-current'] ? "Current page, page ".concat(props.children) : "Page ".concat(props.children);
441
- var ariaLabel = reactTheming.useText(PageComponent, props, 'aria-label', text);
260
+ const PageComponent = React.forwardRef((props, ref) => {
261
+ const text = props['aria-current'] ? `Current page, page ${props.children}` : `Page ${props.children}`;
262
+ const ariaLabel = reactTheming.useText(PageComponent, props, 'aria-label', text);
442
263
  return React__default["default"].createElement(StyledPage, _extends$4({}, props, {
443
264
  "aria-label": ariaLabel,
444
265
  ref: ref
445
266
  }));
446
267
  });
447
268
  PageComponent.displayName = 'Pagination.Page';
448
- var Page = PageComponent;
269
+ const Page = PageComponent;
449
270
 
450
- var GapComponent = React.forwardRef(function (props, ref) {
451
- return React__default["default"].createElement(StyledGap, _extends$4({}, props, {
452
- ref: ref
453
- }), "\u2026");
454
- });
271
+ const GapComponent = React.forwardRef((props, ref) => React__default["default"].createElement(StyledGap, _extends$4({}, props, {
272
+ ref: ref
273
+ }), "\u2026"));
455
274
  GapComponent.displayName = 'Pagination.Gap';
456
- var Gap = GapComponent;
457
-
458
- var _excluded$4 = ["currentPage", "transformPageProps", "totalPages", "pagePadding", "pageGap", "onChange"];
459
- var PREVIOUS_KEY = 'previous';
460
- var NEXT_KEY = 'next';
461
- var Pagination = React.forwardRef(function (_ref, ref) {
462
- var controlledCurrentPage = _ref.currentPage,
463
- transformPageProps = _ref.transformPageProps,
464
- totalPages = _ref.totalPages,
465
- pagePadding = _ref.pagePadding,
466
- pageGap = _ref.pageGap,
467
- onChange = _ref.onChange,
468
- otherProps = _objectWithoutProperties(_ref, _excluded$4);
469
- var _useState = React.useState(),
470
- _useState2 = _slicedToArray(_useState, 2),
471
- focusedItem = _useState2[0],
472
- setFocusedItem = _useState2[1];
473
- var _useState3 = React.useState(1),
474
- _useState4 = _slicedToArray(_useState3, 2),
475
- internalCurrentPage = _useState4[0],
476
- setInternalCurrentPage = _useState4[1];
477
- var currentPage = containerUtilities.getControlledValue(controlledCurrentPage, internalCurrentPage);
478
- var theme = React.useContext(styled.ThemeContext);
479
- var _usePagination = containerPagination.usePagination({
275
+ const Gap = GapComponent;
276
+
277
+ const PREVIOUS_KEY = 'previous';
278
+ const NEXT_KEY = 'next';
279
+ const Pagination = React.forwardRef((_ref, ref) => {
280
+ let {
281
+ currentPage: controlledCurrentPage,
282
+ transformPageProps,
283
+ totalPages,
284
+ pagePadding,
285
+ pageGap,
286
+ onChange,
287
+ ...otherProps
288
+ } = _ref;
289
+ const [focusedItem, setFocusedItem] = React.useState();
290
+ const [internalCurrentPage, setInternalCurrentPage] = React.useState(1);
291
+ const currentPage = containerUtilities.getControlledValue(controlledCurrentPage, internalCurrentPage);
292
+ const theme = React.useContext(styled.ThemeContext);
293
+ const {
294
+ getContainerProps,
295
+ getPageProps,
296
+ getPreviousPageProps,
297
+ getNextPageProps
298
+ } = containerPagination.usePagination({
480
299
  rtl: theme.rtl,
481
- focusedItem: focusedItem,
300
+ focusedItem,
482
301
  selectedItem: currentPage,
483
- onFocus: function onFocus(item) {
302
+ onFocus: item => {
484
303
  setFocusedItem(item);
485
304
  },
486
- onSelect: function onSelect(item) {
487
- var updatedCurrentPage = item;
488
- var updatedFocusedKey = focusedItem;
305
+ onSelect: item => {
306
+ let updatedCurrentPage = item;
307
+ let updatedFocusedKey = focusedItem;
489
308
  if (updatedCurrentPage === PREVIOUS_KEY && currentPage > 1) {
490
309
  updatedCurrentPage = currentPage - 1;
491
310
  if (updatedCurrentPage === 1 && focusedItem === PREVIOUS_KEY) {
@@ -503,92 +322,89 @@ var Pagination = React.forwardRef(function (_ref, ref) {
503
322
  setFocusedItem(updatedFocusedKey);
504
323
  setInternalCurrentPage(updatedCurrentPage);
505
324
  }
506
- }),
507
- getContainerProps = _usePagination.getContainerProps,
508
- getPageProps = _usePagination.getPageProps,
509
- getPreviousPageProps = _usePagination.getPreviousPageProps,
510
- getNextPageProps = _usePagination.getNextPageProps;
511
- var getTransformedProps = function getTransformedProps(pageType) {
512
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
513
- var pageNumber = arguments.length > 2 ? arguments[2] : undefined;
325
+ });
326
+ const getTransformedProps = function (pageType) {
327
+ let props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
328
+ let pageNumber = arguments.length > 2 ? arguments[2] : undefined;
514
329
  if (transformPageProps) {
515
330
  return transformPageProps(pageType, props, pageNumber);
516
331
  }
517
332
  return props;
518
333
  };
519
- var renderPreviousPage = function renderPreviousPage() {
520
- var isFirstPageSelected = totalPages > 0 && currentPage === 1;
521
- var focusRef = React__default["default"].createRef();
522
- var props = isFirstPageSelected ?
334
+ const renderPreviousPage = () => {
335
+ const isFirstPageSelected = totalPages > 0 && currentPage === 1;
336
+ const focusRef = React__default["default"].createRef();
337
+ const props = isFirstPageSelected ?
523
338
  {
524
339
  hidden: true
525
- } : _objectSpread2(_objectSpread2({}, getPreviousPageProps({
526
- 'aria-label': '',
527
- role: null,
528
- item: PREVIOUS_KEY,
529
- focusRef: focusRef
530
- })), {}, {
340
+ } : {
341
+ ...getPreviousPageProps({
342
+ 'aria-label': '',
343
+ role: null,
344
+ item: PREVIOUS_KEY,
345
+ focusRef
346
+ }),
531
347
  'aria-label': undefined
532
- });
348
+ };
533
349
  return React__default["default"].createElement(Previous$1, _extends$4({
534
350
  isFocused: focusedItem === PREVIOUS_KEY
535
351
  }, getTransformedProps('previous', props), {
536
352
  ref: focusRef
537
353
  }));
538
354
  };
539
- var renderNextPage = function renderNextPage() {
540
- var isLastPageSelected = currentPage === totalPages;
541
- var focusRef = React__default["default"].createRef();
542
- var props = isLastPageSelected ?
355
+ const renderNextPage = () => {
356
+ const isLastPageSelected = currentPage === totalPages;
357
+ const focusRef = React__default["default"].createRef();
358
+ const props = isLastPageSelected ?
543
359
  {
544
360
  hidden: true
545
- } : _objectSpread2(_objectSpread2({}, getNextPageProps({
546
- 'aria-label': '',
547
- role: null,
548
- item: NEXT_KEY,
549
- focusRef: focusRef
550
- })), {}, {
361
+ } : {
362
+ ...getNextPageProps({
363
+ 'aria-label': '',
364
+ role: null,
365
+ item: NEXT_KEY,
366
+ focusRef
367
+ }),
551
368
  'aria-label': undefined
552
- });
369
+ };
553
370
  return React__default["default"].createElement(Next$1, _extends$4({
554
371
  isFocused: focusedItem === NEXT_KEY
555
372
  }, getTransformedProps('next', props), {
556
373
  ref: focusRef
557
374
  }));
558
375
  };
559
- var createGap = function createGap(pageIndex) {
560
- return React__default["default"].createElement(Gap, _extends$4({
561
- key: "gap-".concat(pageIndex)
562
- }, getTransformedProps('gap')));
563
- };
564
- var createPage = function createPage(pageIndex) {
565
- var focusRef = React__default["default"].createRef();
566
- var props = _objectSpread2(_objectSpread2({}, getPageProps({
567
- 'aria-label': '',
568
- role: null,
569
- item: pageIndex,
570
- focusRef: focusRef
571
- })), {}, {
376
+ const createGap = pageIndex => React__default["default"].createElement(Gap, _extends$4({
377
+ key: `gap-${pageIndex}`
378
+ }, getTransformedProps('gap')));
379
+ const createPage = pageIndex => {
380
+ const focusRef = React__default["default"].createRef();
381
+ const props = {
382
+ ...getPageProps({
383
+ 'aria-label': '',
384
+ role: null,
385
+ item: pageIndex,
386
+ focusRef
387
+ }),
572
388
  'aria-label': undefined,
573
389
  title: pageIndex
574
- });
390
+ };
575
391
  return React__default["default"].createElement(Page, _extends$4({
576
392
  key: pageIndex
577
393
  }, getTransformedProps('page', props, pageIndex), {
578
394
  ref: focusRef
579
395
  }), pageIndex);
580
396
  };
581
- var renderPages = function renderPages() {
582
- var pages = [];
583
- var PADDING = pagePadding;
584
- var GAP = pageGap;
585
- for (var pageIndex = 1; pageIndex <= totalPages; pageIndex++) {
397
+ const renderPages = () => {
398
+ const pages = [];
399
+ const PADDING = pagePadding;
400
+ const GAP = pageGap;
401
+ for (let pageIndex = 1; pageIndex <= totalPages; pageIndex++) {
586
402
  if (pageIndex === currentPage || pageIndex < GAP || pageIndex > totalPages - GAP + 1) {
587
403
  pages.push(createPage(pageIndex));
588
404
  continue;
589
405
  }
590
- var minimum = void 0;
591
- var maximum = void 0;
406
+ let minimum;
407
+ let maximum;
592
408
  if (currentPage <= GAP + PADDING) {
593
409
  minimum = GAP + 1;
594
410
  maximum = minimum + PADDING * 2;
@@ -653,17 +469,19 @@ var SvgChevronDoubleLeftStroke = function SvgChevronDoubleLeftStroke(props) {
653
469
  height: 16,
654
470
  focusable: "false",
655
471
  viewBox: "0 0 16 16",
656
- "aria-hidden": "true"
472
+ "aria-hidden": "true",
473
+ role: "img"
657
474
  }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
658
475
  fill: "currentColor",
659
476
  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"
660
477
  })));
661
478
  };
662
479
 
663
- var _excluded$3 = ["children"];
664
- var FirstComponent = React.forwardRef(function (_ref, ref) {
665
- var children = _ref.children,
666
- other = _objectWithoutProperties(_ref, _excluded$3);
480
+ const FirstComponent = React.forwardRef((_ref, ref) => {
481
+ let {
482
+ children,
483
+ ...other
484
+ } = _ref;
667
485
  return React__default["default"].createElement(StyledCursor, _extends$4({
668
486
  ref: ref
669
487
  }, other), React__default["default"].createElement(StyledIcon, {
@@ -671,12 +489,13 @@ var FirstComponent = React.forwardRef(function (_ref, ref) {
671
489
  }, React__default["default"].createElement(SvgChevronDoubleLeftStroke, null)), React__default["default"].createElement("span", null, children));
672
490
  });
673
491
  FirstComponent.displayName = 'CursorPagination.First';
674
- var First = FirstComponent;
492
+ const First = FirstComponent;
675
493
 
676
- var _excluded$2 = ["children"];
677
- var NextComponent = React.forwardRef(function (_ref, ref) {
678
- var children = _ref.children,
679
- other = _objectWithoutProperties(_ref, _excluded$2);
494
+ const NextComponent = React.forwardRef((_ref, ref) => {
495
+ let {
496
+ children,
497
+ ...other
498
+ } = _ref;
680
499
  return React__default["default"].createElement(StyledCursor, _extends$4({
681
500
  ref: ref,
682
501
  as: "button"
@@ -685,12 +504,13 @@ var NextComponent = React.forwardRef(function (_ref, ref) {
685
504
  }, React__default["default"].createElement(SvgChevronRightStroke, null)));
686
505
  });
687
506
  NextComponent.displayName = 'CursorPagination.Next';
688
- var Next = NextComponent;
507
+ const Next = NextComponent;
689
508
 
690
- var _excluded$1 = ["children"];
691
- var PreviousComponent = React.forwardRef(function (_ref, ref) {
692
- var children = _ref.children,
693
- other = _objectWithoutProperties(_ref, _excluded$1);
509
+ const PreviousComponent = React.forwardRef((_ref, ref) => {
510
+ let {
511
+ children,
512
+ ...other
513
+ } = _ref;
694
514
  return React__default["default"].createElement(StyledCursor, _extends$4({
695
515
  ref: ref,
696
516
  as: "button"
@@ -699,7 +519,7 @@ var PreviousComponent = React.forwardRef(function (_ref, ref) {
699
519
  }, React__default["default"].createElement(SvgChevronLeftStroke, null)), React__default["default"].createElement("span", null, children));
700
520
  });
701
521
  PreviousComponent.displayName = 'CursorPagination.Previous';
702
- var Previous = PreviousComponent;
522
+ const Previous = PreviousComponent;
703
523
 
704
524
  var _path;
705
525
 
@@ -712,17 +532,19 @@ var SvgChevronDoubleRightStroke = function SvgChevronDoubleRightStroke(props) {
712
532
  height: 16,
713
533
  focusable: "false",
714
534
  viewBox: "0 0 16 16",
715
- "aria-hidden": "true"
535
+ "aria-hidden": "true",
536
+ role: "img"
716
537
  }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
717
538
  fill: "currentColor",
718
539
  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"
719
540
  })));
720
541
  };
721
542
 
722
- var _excluded = ["children"];
723
- var LastComponent = React.forwardRef(function (_ref, ref) {
724
- var children = _ref.children,
725
- other = _objectWithoutProperties(_ref, _excluded);
543
+ const LastComponent = React.forwardRef((_ref, ref) => {
544
+ let {
545
+ children,
546
+ ...other
547
+ } = _ref;
726
548
  return React__default["default"].createElement(StyledCursor, _extends$4({
727
549
  ref: ref,
728
550
  as: "button"
@@ -731,15 +553,13 @@ var LastComponent = React.forwardRef(function (_ref, ref) {
731
553
  }, React__default["default"].createElement(SvgChevronDoubleRightStroke, null)));
732
554
  });
733
555
  LastComponent.displayName = 'CursorPagination.Last';
734
- var Last = LastComponent;
556
+ const Last = LastComponent;
735
557
 
736
- var CursorPaginationComponent = React.forwardRef(function (props, ref) {
737
- return React__default["default"].createElement(StyledCursorPagination, _extends$4({
738
- ref: ref
739
- }, props));
740
- });
558
+ const CursorPaginationComponent = React.forwardRef((props, ref) => React__default["default"].createElement(StyledCursorPagination, _extends$4({
559
+ ref: ref
560
+ }, props)));
741
561
  CursorPaginationComponent.displayName = 'CursorPagination';
742
- var CursorPagination = CursorPaginationComponent;
562
+ const CursorPagination = CursorPaginationComponent;
743
563
  CursorPagination.First = First;
744
564
  CursorPagination.Next = Next;
745
565
  CursorPagination.Previous = Previous;