@zendeskgarden/react-pagination 9.0.0-next.7 → 9.0.0-next.9

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 (29) hide show
  1. package/dist/esm/elements/CursorPagination/CursorPagination.js +32 -0
  2. package/dist/esm/elements/CursorPagination/components/First.js +33 -0
  3. package/dist/esm/elements/CursorPagination/components/Last.js +34 -0
  4. package/dist/esm/elements/CursorPagination/components/Next.js +34 -0
  5. package/dist/esm/elements/CursorPagination/components/Previous.js +34 -0
  6. package/dist/esm/elements/OffsetPagination/OffsetPagination.js +163 -0
  7. package/dist/esm/elements/OffsetPagination/components/Gap.js +29 -0
  8. package/dist/esm/elements/OffsetPagination/components/Next.js +35 -0
  9. package/dist/esm/elements/OffsetPagination/components/Page.js +31 -0
  10. package/dist/esm/elements/OffsetPagination/components/Previous.js +35 -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 +29 -0
  19. package/dist/esm/styled/OffsetPagination/StyledGapListItem.js +32 -0
  20. package/dist/esm/styled/OffsetPagination/StyledList.js +22 -0
  21. package/dist/esm/styled/OffsetPagination/StyledListItem.js +22 -0
  22. package/dist/esm/styled/OffsetPagination/StyledNav.js +22 -0
  23. package/dist/esm/styled/OffsetPagination/StyledNavigation.js +23 -0
  24. package/dist/esm/styled/OffsetPagination/StyledPage.js +27 -0
  25. package/dist/esm/styled/OffsetPagination/StyledPageBase.js +44 -0
  26. package/dist/index.cjs.js +32 -54
  27. package/dist/typings/styled/CursorPagination/StyledIcon.d.ts +2 -2
  28. package/package.json +5 -5
  29. package/dist/index.esm.js +0 -518
@@ -0,0 +1,29 @@
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
+ import styled, { css } from 'styled-components';
8
+ import { StyledBaseIcon, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const marginStyles = props => {
11
+ const {
12
+ $type,
13
+ theme
14
+ } = props;
15
+ const margin = theme.space.base;
16
+ if (theme.rtl) {
17
+ return css(["margin-", ":", "px;"], $type === 'last' || $type === 'next' ? 'right' : 'left', margin);
18
+ }
19
+ return css(["margin-", ":", "px;"], $type === 'first' || $type === 'previous' ? 'right' : 'left', margin);
20
+ };
21
+ const StyledIcon = styled(StyledBaseIcon).withConfig({
22
+ displayName: "StyledIcon",
23
+ componentId: "sc-2vzk6e-0"
24
+ })(["", " transform:", ";"], marginStyles, props => props.theme.rtl && 'rotate(180deg)');
25
+ StyledIcon.defaultProps = {
26
+ theme: DEFAULT_THEME
27
+ };
28
+
29
+ export { StyledIcon };
@@ -0,0 +1,32 @@
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
+ import styled, { css } from 'styled-components';
8
+ import { math } from 'polished';
9
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME, getLineHeight } from '@zendeskgarden/react-theming';
10
+ import { StyledListItem } from './StyledListItem.js';
11
+
12
+ const COMPONENT_ID = 'pagination.gap';
13
+ const sizeStyles = props => {
14
+ const shift = 2;
15
+ const fontSize = math(`${props.theme.fontSizes.md} + ${shift}`);
16
+ const height = `${props.theme.space.base * 8}px`;
17
+ const lineHeight = getLineHeight(height, fontSize);
18
+ const padding = `${props.theme.space.base * 1.5}px`;
19
+ return css(["padding:0 ", ";min-width:", ";max-width:", ";height:", ";line-height:", ";font-size:", ";"], padding, height, math(`${height} * 2`), height, lineHeight, fontSize);
20
+ };
21
+ const StyledGapListItem = styled(StyledListItem).attrs({
22
+ 'data-garden-id': COMPONENT_ID,
23
+ 'data-garden-version': '9.0.0-next.9'
24
+ }).withConfig({
25
+ displayName: "StyledGapListItem",
26
+ componentId: "sc-10wd0iz-0"
27
+ })(["display:inline-block;text-align:center;color:", ";", ";&:hover{color:inherit;}", ";"], p => getColorV8('neutralHue', 600, p.theme), props => sizeStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
28
+ StyledGapListItem.defaultProps = {
29
+ theme: DEFAULT_THEME
30
+ };
31
+
32
+ export { StyledGapListItem };
@@ -0,0 +1,22 @@
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
+ import styled from 'styled-components';
8
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'pagination.list';
11
+ const StyledList = styled.ul.attrs({
12
+ 'data-garden-id': COMPONENT_ID,
13
+ 'data-garden-version': '9.0.0-next.9'
14
+ }).withConfig({
15
+ displayName: "StyledList",
16
+ componentId: "sc-1uz2jxo-0"
17
+ })(["direction:", ";display:flex;justify-content:center;margin:0;padding:0;list-style:none;white-space:nowrap;color:", ";:focus{outline:none;}", ";"], props => props.theme.rtl && 'rtl', props => getColorV8('neutralHue', 600, props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
18
+ StyledList.defaultProps = {
19
+ theme: DEFAULT_THEME
20
+ };
21
+
22
+ export { StyledList };
@@ -0,0 +1,22 @@
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
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'pagination.list_item';
11
+ const StyledListItem = styled.li.attrs({
12
+ 'data-garden-id': COMPONENT_ID,
13
+ 'data-garden-version': '9.0.0-next.9'
14
+ }).withConfig({
15
+ displayName: "StyledListItem",
16
+ componentId: "sc-16j4sju-0"
17
+ })(["box-sizing:border-box;margin-left:", ";user-select:none;&", "{margin-left:0;}", ";"], props => `${props.theme.space.base}px`, props => props.theme.rtl ? ':last-of-type' : ':first-of-type', props => retrieveComponentStyles(COMPONENT_ID, props));
18
+ StyledListItem.defaultProps = {
19
+ theme: DEFAULT_THEME
20
+ };
21
+
22
+ export { StyledListItem };
@@ -0,0 +1,22 @@
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
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'pagination.pagination_view';
11
+ const StyledNav = styled.nav.attrs({
12
+ 'data-garden-id': COMPONENT_ID,
13
+ 'data-garden-version': '9.0.0-next.9'
14
+ }).withConfig({
15
+ displayName: "StyledNav",
16
+ componentId: "sc-ppnpkw-0"
17
+ })(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
18
+ StyledNav.defaultProps = {
19
+ theme: DEFAULT_THEME
20
+ };
21
+
22
+ export { StyledNav };
@@ -0,0 +1,23 @@
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
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledPage } from './StyledPage.js';
10
+
11
+ const COMPONENT_ID = 'pagination.navigation';
12
+ const StyledNavigation = styled(StyledPage).attrs({
13
+ 'data-garden-id': COMPONENT_ID,
14
+ 'data-garden-version': '9.0.0-next.9'
15
+ }).withConfig({
16
+ displayName: "StyledNavigation",
17
+ componentId: "sc-1lpl8pp-0"
18
+ })(["display:flex;align-items:center;justify-content:center;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
19
+ StyledNavigation.defaultProps = {
20
+ theme: DEFAULT_THEME
21
+ };
22
+
23
+ export { StyledNavigation };
@@ -0,0 +1,27 @@
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
+ import styled, { css } from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledPageBase } from './StyledPageBase.js';
10
+
11
+ const COMPONENT_ID = 'pagination.page';
12
+ const sizeStyles = props => {
13
+ const height = props.theme.space.base * 8;
14
+ return css(["min-width:", "px;max-width:", "px;&[aria-current='true']{max-width:none;}"], height, height * 2);
15
+ };
16
+ const StyledPage = styled(StyledPageBase).attrs({
17
+ 'data-garden-id': COMPONENT_ID,
18
+ 'data-garden-version': '9.0.0-next.9'
19
+ }).withConfig({
20
+ displayName: "StyledPage",
21
+ componentId: "sc-sxjfwy-0"
22
+ })(["", ";&[aria-current=\"true\"]{font-weight:", ";}", ";"], props => sizeStyles(props), props => props.theme.fontWeights.semibold, props => retrieveComponentStyles(COMPONENT_ID, props));
23
+ StyledPage.defaultProps = {
24
+ theme: DEFAULT_THEME
25
+ };
26
+
27
+ export { StyledPage };
@@ -0,0 +1,44 @@
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
+ import styled, { css } from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME, getColorV8, focusStyles, getLineHeight } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'pagination.page';
11
+ const colorStyles = props => {
12
+ const defaultColor = getColorV8('neutralHue', 600, props.theme);
13
+ const hoverForegroundColor = getColorV8('neutralHue', 700, props.theme);
14
+ const hoverBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.08);
15
+ const activeForegroundColor = getColorV8('neutralHue', 800, props.theme);
16
+ const activeBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.2);
17
+ const currentForegroundColor = activeForegroundColor;
18
+ const currentBackgroundColor = hoverBackgroundColor;
19
+ const currentHoverBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.16);
20
+ const currentActiveBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.28);
21
+ return css(["border:none;background:transparent;color:", ";&:hover{background-color:", ";color:", ";}", " &:active,&:focus-visible:active{background-color:", ";color:", ";}&[aria-current='page']{background-color:", ";color:", ";}&[aria-current='page']:hover{background-color:", ";}&[aria-current='page']:active{background-color:", ";}:disabled,[aria-disabled='true']{background-color:transparent;color:", ";}"], defaultColor, hoverBackgroundColor, hoverForegroundColor, focusStyles({
22
+ theme: props.theme,
23
+ inset: true
24
+ }), activeBackgroundColor, activeForegroundColor, currentBackgroundColor, currentForegroundColor, currentHoverBackgroundColor, currentActiveBackgroundColor, getColorV8('grey', 300, props.theme));
25
+ };
26
+ const sizeStyles = props => {
27
+ const fontSize = props.theme.fontSizes.md;
28
+ const height = `${props.theme.space.base * 8}px`;
29
+ const lineHeight = getLineHeight(height, fontSize);
30
+ const padding = `${props.theme.space.base * 1.5}px`;
31
+ return css(["padding:0 ", ";height:", ";line-height:", ";font-size:", ";"], padding, height, lineHeight, fontSize);
32
+ };
33
+ const StyledPageBase = styled.button.attrs({
34
+ 'data-garden-id': COMPONENT_ID,
35
+ 'data-garden-version': '9.0.0-next.9'
36
+ }).withConfig({
37
+ displayName: "StyledPageBase",
38
+ componentId: "sc-ttwj4u-0"
39
+ })(["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;font-family:inherit;user-select:none;", ";&[aria-current='page']{font-weight:", ";}&::-moz-focus-inner{border:0;}:disabled,[aria-disabled='true']{cursor:default;}", ";", ";"], props => props.hidden && 'hidden', props => props.theme.borderRadii.md, props => sizeStyles(props), props => props.theme.fontWeights.semibold, props => colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
40
+ StyledPageBase.defaultProps = {
41
+ theme: DEFAULT_THEME
42
+ };
43
+
44
+ export { StyledPageBase };
package/dist/index.cjs.js CHANGED
@@ -1,10 +1,9 @@
1
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
-
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
+ */
8
7
  'use strict';
9
8
 
10
9
  var React = require('react');
@@ -38,25 +37,10 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
38
37
  var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
39
38
  var styled__default = /*#__PURE__*/_interopDefault(styled);
40
39
 
41
- function _extends$4() {
42
- _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
43
- for (var i = 1; i < arguments.length; i++) {
44
- var source = arguments[i];
45
- for (var key in source) {
46
- if (Object.prototype.hasOwnProperty.call(source, key)) {
47
- target[key] = source[key];
48
- }
49
- }
50
- }
51
- return target;
52
- };
53
- return _extends$4.apply(this, arguments);
54
- }
55
-
56
40
  const COMPONENT_ID$8 = 'pagination.list';
57
41
  const StyledList = styled__default.default.ul.attrs({
58
42
  'data-garden-id': COMPONENT_ID$8,
59
- 'data-garden-version': '9.0.0-next.7'
43
+ 'data-garden-version': '9.0.0-next.9'
60
44
  }).withConfig({
61
45
  displayName: "StyledList",
62
46
  componentId: "sc-1uz2jxo-0"
@@ -68,7 +52,7 @@ StyledList.defaultProps = {
68
52
  const COMPONENT_ID$7 = 'pagination.list_item';
69
53
  const StyledListItem = styled__default.default.li.attrs({
70
54
  'data-garden-id': COMPONENT_ID$7,
71
- 'data-garden-version': '9.0.0-next.7'
55
+ 'data-garden-version': '9.0.0-next.9'
72
56
  }).withConfig({
73
57
  displayName: "StyledListItem",
74
58
  componentId: "sc-16j4sju-0"
@@ -102,7 +86,7 @@ const sizeStyles$2 = props => {
102
86
  };
103
87
  const StyledPageBase = styled__default.default.button.attrs({
104
88
  'data-garden-id': COMPONENT_ID$6,
105
- 'data-garden-version': '9.0.0-next.7'
89
+ 'data-garden-version': '9.0.0-next.9'
106
90
  }).withConfig({
107
91
  displayName: "StyledPageBase",
108
92
  componentId: "sc-ttwj4u-0"
@@ -118,7 +102,7 @@ const sizeStyles$1 = props => {
118
102
  };
119
103
  const StyledPage = styled__default.default(StyledPageBase).attrs({
120
104
  'data-garden-id': COMPONENT_ID$5,
121
- 'data-garden-version': '9.0.0-next.7'
105
+ 'data-garden-version': '9.0.0-next.9'
122
106
  }).withConfig({
123
107
  displayName: "StyledPage",
124
108
  componentId: "sc-sxjfwy-0"
@@ -130,7 +114,7 @@ StyledPage.defaultProps = {
130
114
  const COMPONENT_ID$4 = 'cursor_pagination';
131
115
  const StyledCursorPagination = styled__default.default.nav.attrs({
132
116
  'data-garden-id': COMPONENT_ID$4,
133
- 'data-garden-version': '9.0.0-next.7'
117
+ 'data-garden-version': '9.0.0-next.9'
134
118
  }).withConfig({
135
119
  displayName: "StyledCursorPagination",
136
120
  componentId: "sc-qmfecg-0"
@@ -142,7 +126,7 @@ StyledCursorPagination.defaultProps = {
142
126
  const COMPONENT_ID$3 = 'cursor_pagination.cursor';
143
127
  const StyledCursor = styled__default.default(StyledPageBase).attrs({
144
128
  'data-garden-id': COMPONENT_ID$3,
145
- 'data-garden-version': '9.0.0-next.7',
129
+ 'data-garden-version': '9.0.0-next.9',
146
130
  as: 'button'
147
131
  }).withConfig({
148
132
  displayName: "StyledCursor",
@@ -154,22 +138,16 @@ StyledCursor.defaultProps = {
154
138
 
155
139
  const marginStyles = props => {
156
140
  const {
157
- type,
141
+ $type,
158
142
  theme
159
143
  } = props;
160
144
  const margin = theme.space.base;
161
145
  if (theme.rtl) {
162
- return styled.css(["margin-", ":", "px;"], type === 'last' || type === 'next' ? 'right' : 'left', margin);
146
+ return styled.css(["margin-", ":", "px;"], $type === 'last' || $type === 'next' ? 'right' : 'left', margin);
163
147
  }
164
- return styled.css(["margin-", ":", "px;"], type === 'first' || type === 'previous' ? 'right' : 'left', margin);
148
+ return styled.css(["margin-", ":", "px;"], $type === 'first' || $type === 'previous' ? 'right' : 'left', margin);
165
149
  };
166
- const StyledIcon = styled__default.default(_ref => {
167
- let {
168
- children,
169
- ...props
170
- } = _ref;
171
- return React.cloneElement(React.Children.only(children), props);
172
- }).withConfig({
150
+ const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).withConfig({
173
151
  displayName: "StyledIcon",
174
152
  componentId: "sc-2vzk6e-0"
175
153
  })(["", " transform:", ";"], marginStyles, props => props.theme.rtl && 'rotate(180deg)');
@@ -188,7 +166,7 @@ const sizeStyles = props => {
188
166
  };
189
167
  const StyledGapListItem = styled__default.default(StyledListItem).attrs({
190
168
  'data-garden-id': COMPONENT_ID$2,
191
- 'data-garden-version': '9.0.0-next.7'
169
+ 'data-garden-version': '9.0.0-next.9'
192
170
  }).withConfig({
193
171
  displayName: "StyledGapListItem",
194
172
  componentId: "sc-10wd0iz-0"
@@ -200,7 +178,7 @@ StyledGapListItem.defaultProps = {
200
178
  const COMPONENT_ID$1 = 'pagination.navigation';
201
179
  const StyledNavigation = styled__default.default(StyledPage).attrs({
202
180
  'data-garden-id': COMPONENT_ID$1,
203
- 'data-garden-version': '9.0.0-next.7'
181
+ 'data-garden-version': '9.0.0-next.9'
204
182
  }).withConfig({
205
183
  displayName: "StyledNavigation",
206
184
  componentId: "sc-1lpl8pp-0"
@@ -212,7 +190,7 @@ StyledNavigation.defaultProps = {
212
190
  const COMPONENT_ID = 'pagination.pagination_view';
213
191
  const StyledNav = styled__default.default.nav.attrs({
214
192
  'data-garden-id': COMPONENT_ID,
215
- 'data-garden-version': '9.0.0-next.7'
193
+ 'data-garden-version': '9.0.0-next.9'
216
194
  }).withConfig({
217
195
  displayName: "StyledNav",
218
196
  componentId: "sc-ppnpkw-0"
@@ -256,7 +234,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
256
234
  const PreviousComponent$1 = React.forwardRef((props, ref) => {
257
235
  const ariaLabel = reactTheming.useText(PreviousComponent$1, props, 'aria-label', 'Previous page');
258
236
  const theme = React.useContext(styled.ThemeContext);
259
- return React__namespace.default.createElement(StyledNavigation, _extends$4({
237
+ return React__namespace.default.createElement(StyledNavigation, Object.assign({
260
238
  type: "button"
261
239
  }, props, {
262
240
  "aria-label": ariaLabel,
@@ -269,7 +247,7 @@ const Previous$1 = PreviousComponent$1;
269
247
  const NextComponent$1 = React.forwardRef((props, ref) => {
270
248
  const ariaLabel = reactTheming.useText(NextComponent$1, props, 'aria-label', 'Next page');
271
249
  const theme = React.useContext(styled.ThemeContext);
272
- return React__namespace.default.createElement(StyledNavigation, _extends$4({
250
+ return React__namespace.default.createElement(StyledNavigation, Object.assign({
273
251
  type: "button"
274
252
  }, props, {
275
253
  "aria-label": ariaLabel,
@@ -281,7 +259,7 @@ const Next$1 = NextComponent$1;
281
259
 
282
260
  const PageComponent = React.forwardRef((props, ref) => {
283
261
  const ariaLabel = reactTheming.useText(PageComponent, props, 'aria-label', `Page ${props.children}`);
284
- return React__namespace.default.createElement(StyledPage, _extends$4({
262
+ return React__namespace.default.createElement(StyledPage, Object.assign({
285
263
  type: "button"
286
264
  }, props, {
287
265
  "aria-label": ariaLabel,
@@ -293,7 +271,7 @@ const Page = PageComponent;
293
271
 
294
272
  const GapComponent = React.forwardRef((props, ref) => {
295
273
  const ariaLabel = reactTheming.useText(GapComponent, props, 'aria-label', 'Ellipsis indicating non-visible pages');
296
- return React__namespace.default.createElement(StyledGapListItem, _extends$4({}, props, {
274
+ return React__namespace.default.createElement(StyledGapListItem, Object.assign({}, props, {
297
275
  "aria-label": ariaLabel,
298
276
  ref: ref
299
277
  }), "\u2026");
@@ -421,7 +399,7 @@ const OffsetPagination = React.forwardRef((_ref, ref) => {
421
399
  };
422
400
  return React__namespace.default.createElement(StyledNav, {
423
401
  "aria-label": navigationLabel
424
- }, React__namespace.default.createElement(StyledList, _extends$4({}, otherProps, {
402
+ }, React__namespace.default.createElement(StyledList, Object.assign({}, otherProps, {
425
403
  ref: ref
426
404
  }), renderPreviousPage(), totalPages > 0 && renderPages(), renderNextPage()));
427
405
  });
@@ -460,10 +438,10 @@ const FirstComponent = React.forwardRef((_ref, ref) => {
460
438
  children,
461
439
  ...other
462
440
  } = _ref;
463
- return React__namespace.default.createElement(StyledCursor, _extends$4({
441
+ return React__namespace.default.createElement(StyledCursor, Object.assign({
464
442
  ref: ref
465
443
  }, other), React__namespace.default.createElement(StyledIcon, {
466
- type: "first"
444
+ $type: "first"
467
445
  }, React__namespace.default.createElement(SvgChevronDoubleLeftStroke, null)), React__namespace.default.createElement("span", null, children));
468
446
  });
469
447
  FirstComponent.displayName = 'CursorPagination.First';
@@ -474,11 +452,11 @@ const NextComponent = React.forwardRef((_ref, ref) => {
474
452
  children,
475
453
  ...other
476
454
  } = _ref;
477
- return React__namespace.default.createElement(StyledCursor, _extends$4({
455
+ return React__namespace.default.createElement(StyledCursor, Object.assign({
478
456
  ref: ref,
479
457
  as: "button"
480
458
  }, other), React__namespace.default.createElement("span", null, children), React__namespace.default.createElement(StyledIcon, {
481
- type: "next"
459
+ $type: "next"
482
460
  }, React__namespace.default.createElement(SvgChevronRightStroke, null)));
483
461
  });
484
462
  NextComponent.displayName = 'CursorPagination.Next';
@@ -489,11 +467,11 @@ const PreviousComponent = React.forwardRef((_ref, ref) => {
489
467
  children,
490
468
  ...other
491
469
  } = _ref;
492
- return React__namespace.default.createElement(StyledCursor, _extends$4({
470
+ return React__namespace.default.createElement(StyledCursor, Object.assign({
493
471
  ref: ref,
494
472
  as: "button"
495
473
  }, other), React__namespace.default.createElement(StyledIcon, {
496
- type: "previous"
474
+ $type: "previous"
497
475
  }, React__namespace.default.createElement(SvgChevronLeftStroke, null)), React__namespace.default.createElement("span", null, children));
498
476
  });
499
477
  PreviousComponent.displayName = 'CursorPagination.Previous';
@@ -520,17 +498,17 @@ const LastComponent = React.forwardRef((_ref, ref) => {
520
498
  children,
521
499
  ...other
522
500
  } = _ref;
523
- return React__namespace.default.createElement(StyledCursor, _extends$4({
501
+ return React__namespace.default.createElement(StyledCursor, Object.assign({
524
502
  ref: ref,
525
503
  as: "button"
526
504
  }, other), React__namespace.default.createElement("span", null, children), React__namespace.default.createElement(StyledIcon, {
527
- type: "last"
505
+ $type: "last"
528
506
  }, React__namespace.default.createElement(SvgChevronDoubleRightStroke, null)));
529
507
  });
530
508
  LastComponent.displayName = 'CursorPagination.Last';
531
509
  const Last = LastComponent;
532
510
 
533
- const CursorPaginationComponent = React.forwardRef((props, ref) => React__namespace.default.createElement(StyledCursorPagination, _extends$4({
511
+ const CursorPaginationComponent = React.forwardRef((props, ref) => React__namespace.default.createElement(StyledCursorPagination, Object.assign({
534
512
  ref: ref
535
513
  }, props)));
536
514
  CursorPaginationComponent.displayName = 'CursorPagination';
@@ -7,6 +7,6 @@
7
7
  /// <reference types="react" />
8
8
  import { DefaultTheme } from 'styled-components';
9
9
  export interface IStyledIcon {
10
- type: 'first' | 'next' | 'previous' | 'last';
10
+ $type: 'first' | 'next' | 'previous' | 'last';
11
11
  }
12
- export declare const StyledIcon: import("styled-components").StyledComponent<({ children, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {}, never>;
12
+ export declare const StyledIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {}, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-pagination",
3
- "version": "9.0.0-next.7",
3
+ "version": "9.0.0-next.9",
4
4
  "description": "Components relating to pagination in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/zendeskgarden/react-components/issues"
11
11
  },
12
12
  "main": "dist/index.cjs.js",
13
- "module": "dist/index.esm.js",
13
+ "module": "dist/esm/index.js",
14
14
  "files": [
15
15
  "dist"
16
16
  ],
@@ -26,13 +26,13 @@
26
26
  "prop-types": "^15.5.7"
27
27
  },
28
28
  "peerDependencies": {
29
- "@zendeskgarden/react-theming": "^9.0.0",
29
+ "@zendeskgarden/react-theming": ">=9.0.0-next",
30
30
  "react": ">=16.8.0",
31
31
  "react-dom": ">=16.8.0",
32
32
  "styled-components": "^5.3.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@zendeskgarden/react-theming": "^9.0.0-next.7",
35
+ "@zendeskgarden/react-theming": "^9.0.0-next.9",
36
36
  "@zendeskgarden/svg-icons": "7.0.0"
37
37
  },
38
38
  "keywords": [
@@ -45,5 +45,5 @@
45
45
  "access": "public"
46
46
  },
47
47
  "zendeskgarden:src": "src/index.ts",
48
- "gitHead": "50a2b45b2e237a490a6d460818d33498b92479ec"
48
+ "gitHead": "771281b562d376a6aee04b0cd71dd888b3ae4a1d"
49
49
  }