@zendeskgarden/react-pagination 9.0.0-next.8 → 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.
@@ -24,7 +24,7 @@ const FirstComponent = forwardRef((_ref, ref) => {
24
24
  return React__default.createElement(StyledCursor, Object.assign({
25
25
  ref: ref
26
26
  }, other), React__default.createElement(StyledIcon, {
27
- type: "first"
27
+ $type: "first"
28
28
  }, React__default.createElement(SvgChevronDoubleLeftStroke, null)), React__default.createElement("span", null, children));
29
29
  });
30
30
  FirstComponent.displayName = 'CursorPagination.First';
@@ -25,7 +25,7 @@ const LastComponent = forwardRef((_ref, ref) => {
25
25
  ref: ref,
26
26
  as: "button"
27
27
  }, other), React__default.createElement("span", null, children), React__default.createElement(StyledIcon, {
28
- type: "last"
28
+ $type: "last"
29
29
  }, React__default.createElement(SvgChevronDoubleRightStroke, null)));
30
30
  });
31
31
  LastComponent.displayName = 'CursorPagination.Last';
@@ -25,7 +25,7 @@ const NextComponent = forwardRef((_ref, ref) => {
25
25
  ref: ref,
26
26
  as: "button"
27
27
  }, other), React__default.createElement("span", null, children), React__default.createElement(StyledIcon, {
28
- type: "next"
28
+ $type: "next"
29
29
  }, React__default.createElement(SvgChevronRightStroke, null)));
30
30
  });
31
31
  NextComponent.displayName = 'CursorPagination.Next';
@@ -25,7 +25,7 @@ const PreviousComponent = forwardRef((_ref, ref) => {
25
25
  ref: ref,
26
26
  as: "button"
27
27
  }, other), React__default.createElement(StyledIcon, {
28
- type: "previous"
28
+ $type: "previous"
29
29
  }, React__default.createElement(SvgChevronLeftStroke, null)), React__default.createElement("span", null, children));
30
30
  });
31
31
  PreviousComponent.displayName = 'CursorPagination.Previous';
@@ -11,7 +11,7 @@ import { StyledPageBase } from '../OffsetPagination/StyledPageBase.js';
11
11
  const COMPONENT_ID = 'cursor_pagination.cursor';
12
12
  const StyledCursor = styled(StyledPageBase).attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.0.0-next.8',
14
+ 'data-garden-version': '9.0.0-next.9',
15
15
  as: 'button'
16
16
  }).withConfig({
17
17
  displayName: "StyledCursor",
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'cursor_pagination';
11
11
  const StyledCursorPagination = styled.nav.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.8'
13
+ 'data-garden-version': '9.0.0-next.9'
14
14
  }).withConfig({
15
15
  displayName: "StyledCursorPagination",
16
16
  componentId: "sc-qmfecg-0"
@@ -4,28 +4,21 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { cloneElement, Children } from 'react';
8
7
  import styled, { css } from 'styled-components';
9
- import { DEFAULT_THEME } from '@zendeskgarden/react-theming';
8
+ import { StyledBaseIcon, DEFAULT_THEME } from '@zendeskgarden/react-theming';
10
9
 
11
10
  const marginStyles = props => {
12
11
  const {
13
- type,
12
+ $type,
14
13
  theme
15
14
  } = props;
16
15
  const margin = theme.space.base;
17
16
  if (theme.rtl) {
18
- return css(["margin-", ":", "px;"], type === 'last' || type === 'next' ? 'right' : 'left', margin);
17
+ return css(["margin-", ":", "px;"], $type === 'last' || $type === 'next' ? 'right' : 'left', margin);
19
18
  }
20
- return css(["margin-", ":", "px;"], type === 'first' || type === 'previous' ? 'right' : 'left', margin);
19
+ return css(["margin-", ":", "px;"], $type === 'first' || $type === 'previous' ? 'right' : 'left', margin);
21
20
  };
22
- const StyledIcon = styled(_ref => {
23
- let {
24
- children,
25
- ...props
26
- } = _ref;
27
- return cloneElement(Children.only(children), props);
28
- }).withConfig({
21
+ const StyledIcon = styled(StyledBaseIcon).withConfig({
29
22
  displayName: "StyledIcon",
30
23
  componentId: "sc-2vzk6e-0"
31
24
  })(["", " transform:", ";"], marginStyles, props => props.theme.rtl && 'rotate(180deg)');
@@ -20,7 +20,7 @@ const sizeStyles = props => {
20
20
  };
21
21
  const StyledGapListItem = styled(StyledListItem).attrs({
22
22
  'data-garden-id': COMPONENT_ID,
23
- 'data-garden-version': '9.0.0-next.8'
23
+ 'data-garden-version': '9.0.0-next.9'
24
24
  }).withConfig({
25
25
  displayName: "StyledGapListItem",
26
26
  componentId: "sc-10wd0iz-0"
@@ -10,7 +10,7 @@ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgard
10
10
  const COMPONENT_ID = 'pagination.list';
11
11
  const StyledList = styled.ul.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.8'
13
+ 'data-garden-version': '9.0.0-next.9'
14
14
  }).withConfig({
15
15
  displayName: "StyledList",
16
16
  componentId: "sc-1uz2jxo-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'pagination.list_item';
11
11
  const StyledListItem = styled.li.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.8'
13
+ 'data-garden-version': '9.0.0-next.9'
14
14
  }).withConfig({
15
15
  displayName: "StyledListItem",
16
16
  componentId: "sc-16j4sju-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'pagination.pagination_view';
11
11
  const StyledNav = styled.nav.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.8'
13
+ 'data-garden-version': '9.0.0-next.9'
14
14
  }).withConfig({
15
15
  displayName: "StyledNav",
16
16
  componentId: "sc-ppnpkw-0"
@@ -11,7 +11,7 @@ import { StyledPage } from './StyledPage.js';
11
11
  const COMPONENT_ID = 'pagination.navigation';
12
12
  const StyledNavigation = styled(StyledPage).attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.0.0-next.8'
14
+ 'data-garden-version': '9.0.0-next.9'
15
15
  }).withConfig({
16
16
  displayName: "StyledNavigation",
17
17
  componentId: "sc-1lpl8pp-0"
@@ -15,7 +15,7 @@ const sizeStyles = props => {
15
15
  };
16
16
  const StyledPage = styled(StyledPageBase).attrs({
17
17
  'data-garden-id': COMPONENT_ID,
18
- 'data-garden-version': '9.0.0-next.8'
18
+ 'data-garden-version': '9.0.0-next.9'
19
19
  }).withConfig({
20
20
  displayName: "StyledPage",
21
21
  componentId: "sc-sxjfwy-0"
@@ -32,7 +32,7 @@ const sizeStyles = props => {
32
32
  };
33
33
  const StyledPageBase = styled.button.attrs({
34
34
  'data-garden-id': COMPONENT_ID,
35
- 'data-garden-version': '9.0.0-next.8'
35
+ 'data-garden-version': '9.0.0-next.9'
36
36
  }).withConfig({
37
37
  displayName: "StyledPageBase",
38
38
  componentId: "sc-ttwj4u-0"
package/dist/index.cjs.js CHANGED
@@ -40,7 +40,7 @@ var styled__default = /*#__PURE__*/_interopDefault(styled);
40
40
  const COMPONENT_ID$8 = 'pagination.list';
41
41
  const StyledList = styled__default.default.ul.attrs({
42
42
  'data-garden-id': COMPONENT_ID$8,
43
- 'data-garden-version': '9.0.0-next.8'
43
+ 'data-garden-version': '9.0.0-next.9'
44
44
  }).withConfig({
45
45
  displayName: "StyledList",
46
46
  componentId: "sc-1uz2jxo-0"
@@ -52,7 +52,7 @@ StyledList.defaultProps = {
52
52
  const COMPONENT_ID$7 = 'pagination.list_item';
53
53
  const StyledListItem = styled__default.default.li.attrs({
54
54
  'data-garden-id': COMPONENT_ID$7,
55
- 'data-garden-version': '9.0.0-next.8'
55
+ 'data-garden-version': '9.0.0-next.9'
56
56
  }).withConfig({
57
57
  displayName: "StyledListItem",
58
58
  componentId: "sc-16j4sju-0"
@@ -86,7 +86,7 @@ const sizeStyles$2 = props => {
86
86
  };
87
87
  const StyledPageBase = styled__default.default.button.attrs({
88
88
  'data-garden-id': COMPONENT_ID$6,
89
- 'data-garden-version': '9.0.0-next.8'
89
+ 'data-garden-version': '9.0.0-next.9'
90
90
  }).withConfig({
91
91
  displayName: "StyledPageBase",
92
92
  componentId: "sc-ttwj4u-0"
@@ -102,7 +102,7 @@ const sizeStyles$1 = props => {
102
102
  };
103
103
  const StyledPage = styled__default.default(StyledPageBase).attrs({
104
104
  'data-garden-id': COMPONENT_ID$5,
105
- 'data-garden-version': '9.0.0-next.8'
105
+ 'data-garden-version': '9.0.0-next.9'
106
106
  }).withConfig({
107
107
  displayName: "StyledPage",
108
108
  componentId: "sc-sxjfwy-0"
@@ -114,7 +114,7 @@ StyledPage.defaultProps = {
114
114
  const COMPONENT_ID$4 = 'cursor_pagination';
115
115
  const StyledCursorPagination = styled__default.default.nav.attrs({
116
116
  'data-garden-id': COMPONENT_ID$4,
117
- 'data-garden-version': '9.0.0-next.8'
117
+ 'data-garden-version': '9.0.0-next.9'
118
118
  }).withConfig({
119
119
  displayName: "StyledCursorPagination",
120
120
  componentId: "sc-qmfecg-0"
@@ -126,7 +126,7 @@ StyledCursorPagination.defaultProps = {
126
126
  const COMPONENT_ID$3 = 'cursor_pagination.cursor';
127
127
  const StyledCursor = styled__default.default(StyledPageBase).attrs({
128
128
  'data-garden-id': COMPONENT_ID$3,
129
- 'data-garden-version': '9.0.0-next.8',
129
+ 'data-garden-version': '9.0.0-next.9',
130
130
  as: 'button'
131
131
  }).withConfig({
132
132
  displayName: "StyledCursor",
@@ -138,22 +138,16 @@ StyledCursor.defaultProps = {
138
138
 
139
139
  const marginStyles = props => {
140
140
  const {
141
- type,
141
+ $type,
142
142
  theme
143
143
  } = props;
144
144
  const margin = theme.space.base;
145
145
  if (theme.rtl) {
146
- 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);
147
147
  }
148
- 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);
149
149
  };
150
- const StyledIcon = styled__default.default(_ref => {
151
- let {
152
- children,
153
- ...props
154
- } = _ref;
155
- return React.cloneElement(React.Children.only(children), props);
156
- }).withConfig({
150
+ const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).withConfig({
157
151
  displayName: "StyledIcon",
158
152
  componentId: "sc-2vzk6e-0"
159
153
  })(["", " transform:", ";"], marginStyles, props => props.theme.rtl && 'rotate(180deg)');
@@ -172,7 +166,7 @@ const sizeStyles = props => {
172
166
  };
173
167
  const StyledGapListItem = styled__default.default(StyledListItem).attrs({
174
168
  'data-garden-id': COMPONENT_ID$2,
175
- 'data-garden-version': '9.0.0-next.8'
169
+ 'data-garden-version': '9.0.0-next.9'
176
170
  }).withConfig({
177
171
  displayName: "StyledGapListItem",
178
172
  componentId: "sc-10wd0iz-0"
@@ -184,7 +178,7 @@ StyledGapListItem.defaultProps = {
184
178
  const COMPONENT_ID$1 = 'pagination.navigation';
185
179
  const StyledNavigation = styled__default.default(StyledPage).attrs({
186
180
  'data-garden-id': COMPONENT_ID$1,
187
- 'data-garden-version': '9.0.0-next.8'
181
+ 'data-garden-version': '9.0.0-next.9'
188
182
  }).withConfig({
189
183
  displayName: "StyledNavigation",
190
184
  componentId: "sc-1lpl8pp-0"
@@ -196,7 +190,7 @@ StyledNavigation.defaultProps = {
196
190
  const COMPONENT_ID = 'pagination.pagination_view';
197
191
  const StyledNav = styled__default.default.nav.attrs({
198
192
  'data-garden-id': COMPONENT_ID,
199
- 'data-garden-version': '9.0.0-next.8'
193
+ 'data-garden-version': '9.0.0-next.9'
200
194
  }).withConfig({
201
195
  displayName: "StyledNav",
202
196
  componentId: "sc-ppnpkw-0"
@@ -447,7 +441,7 @@ const FirstComponent = React.forwardRef((_ref, ref) => {
447
441
  return React__namespace.default.createElement(StyledCursor, Object.assign({
448
442
  ref: ref
449
443
  }, other), React__namespace.default.createElement(StyledIcon, {
450
- type: "first"
444
+ $type: "first"
451
445
  }, React__namespace.default.createElement(SvgChevronDoubleLeftStroke, null)), React__namespace.default.createElement("span", null, children));
452
446
  });
453
447
  FirstComponent.displayName = 'CursorPagination.First';
@@ -462,7 +456,7 @@ const NextComponent = React.forwardRef((_ref, ref) => {
462
456
  ref: ref,
463
457
  as: "button"
464
458
  }, other), React__namespace.default.createElement("span", null, children), React__namespace.default.createElement(StyledIcon, {
465
- type: "next"
459
+ $type: "next"
466
460
  }, React__namespace.default.createElement(SvgChevronRightStroke, null)));
467
461
  });
468
462
  NextComponent.displayName = 'CursorPagination.Next';
@@ -477,7 +471,7 @@ const PreviousComponent = React.forwardRef((_ref, ref) => {
477
471
  ref: ref,
478
472
  as: "button"
479
473
  }, other), React__namespace.default.createElement(StyledIcon, {
480
- type: "previous"
474
+ $type: "previous"
481
475
  }, React__namespace.default.createElement(SvgChevronLeftStroke, null)), React__namespace.default.createElement("span", null, children));
482
476
  });
483
477
  PreviousComponent.displayName = 'CursorPagination.Previous';
@@ -508,7 +502,7 @@ const LastComponent = React.forwardRef((_ref, ref) => {
508
502
  ref: ref,
509
503
  as: "button"
510
504
  }, other), React__namespace.default.createElement("span", null, children), React__namespace.default.createElement(StyledIcon, {
511
- type: "last"
505
+ $type: "last"
512
506
  }, React__namespace.default.createElement(SvgChevronDoubleRightStroke, null)));
513
507
  });
514
508
  LastComponent.displayName = 'CursorPagination.Last';
@@ -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.8",
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>",
@@ -32,7 +32,7 @@
32
32
  "styled-components": "^5.3.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@zendeskgarden/react-theming": "^9.0.0-next.8",
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": "a3d6534843d5a4f5cb60b52bc67264f3230f2da0"
48
+ "gitHead": "771281b562d376a6aee04b0cd71dd888b3ae4a1d"
49
49
  }