@zendeskgarden/react-pagination 9.0.0-next.6 → 9.0.0-next.8
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/esm/elements/CursorPagination/CursorPagination.js +32 -0
- package/dist/esm/elements/CursorPagination/components/First.js +33 -0
- package/dist/esm/elements/CursorPagination/components/Last.js +34 -0
- package/dist/esm/elements/CursorPagination/components/Next.js +34 -0
- package/dist/esm/elements/CursorPagination/components/Previous.js +34 -0
- package/dist/esm/elements/OffsetPagination/OffsetPagination.js +163 -0
- package/dist/esm/elements/OffsetPagination/components/Gap.js +29 -0
- package/dist/esm/elements/OffsetPagination/components/Next.js +35 -0
- package/dist/esm/elements/OffsetPagination/components/Page.js +31 -0
- package/dist/esm/elements/OffsetPagination/components/Previous.js +35 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-double-left-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-double-right-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +25 -0
- package/dist/esm/styled/CursorPagination/StyledCursor.js +24 -0
- package/dist/esm/styled/CursorPagination/StyledCursorPagination.js +22 -0
- package/dist/esm/styled/CursorPagination/StyledIcon.js +36 -0
- package/dist/esm/styled/OffsetPagination/StyledGapListItem.js +32 -0
- package/dist/esm/styled/OffsetPagination/StyledList.js +22 -0
- package/dist/esm/styled/OffsetPagination/StyledListItem.js +22 -0
- package/dist/esm/styled/OffsetPagination/StyledNav.js +22 -0
- package/dist/esm/styled/OffsetPagination/StyledNavigation.js +23 -0
- package/dist/esm/styled/OffsetPagination/StyledPage.js +27 -0
- package/dist/esm/styled/OffsetPagination/StyledPageBase.js +44 -0
- package/dist/index.cjs.js +25 -41
- package/package.json +5 -5
- package/dist/index.esm.js +0 -518
|
@@ -0,0 +1,36 @@
|
|
|
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 { cloneElement, Children } from 'react';
|
|
8
|
+
import styled, { css } from 'styled-components';
|
|
9
|
+
import { DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
|
|
11
|
+
const marginStyles = props => {
|
|
12
|
+
const {
|
|
13
|
+
type,
|
|
14
|
+
theme
|
|
15
|
+
} = props;
|
|
16
|
+
const margin = theme.space.base;
|
|
17
|
+
if (theme.rtl) {
|
|
18
|
+
return css(["margin-", ":", "px;"], type === 'last' || type === 'next' ? 'right' : 'left', margin);
|
|
19
|
+
}
|
|
20
|
+
return css(["margin-", ":", "px;"], type === 'first' || type === 'previous' ? 'right' : 'left', margin);
|
|
21
|
+
};
|
|
22
|
+
const StyledIcon = styled(_ref => {
|
|
23
|
+
let {
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
} = _ref;
|
|
27
|
+
return cloneElement(Children.only(children), props);
|
|
28
|
+
}).withConfig({
|
|
29
|
+
displayName: "StyledIcon",
|
|
30
|
+
componentId: "sc-2vzk6e-0"
|
|
31
|
+
})(["", " transform:", ";"], marginStyles, props => props.theme.rtl && 'rotate(180deg)');
|
|
32
|
+
StyledIcon.defaultProps = {
|
|
33
|
+
theme: DEFAULT_THEME
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
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.8'
|
|
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.8'
|
|
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.8'
|
|
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.8'
|
|
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.8'
|
|
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.8'
|
|
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.8'
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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.
|
|
43
|
+
'data-garden-version': '9.0.0-next.8'
|
|
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.
|
|
55
|
+
'data-garden-version': '9.0.0-next.8'
|
|
72
56
|
}).withConfig({
|
|
73
57
|
displayName: "StyledListItem",
|
|
74
58
|
componentId: "sc-16j4sju-0"
|
|
@@ -88,7 +72,7 @@ const colorStyles = props => {
|
|
|
88
72
|
const currentBackgroundColor = hoverBackgroundColor;
|
|
89
73
|
const currentHoverBackgroundColor = reactTheming.getColorV8('primaryHue', 600, props.theme, 0.16);
|
|
90
74
|
const currentActiveBackgroundColor = reactTheming.getColorV8('primaryHue', 600, props.theme, 0.28);
|
|
91
|
-
return styled.css(["border:none;background:transparent;color:", ";&:hover{background-color:", ";color:", ";}", " &:active,&:focus-visible:active
|
|
75
|
+
return styled.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, reactTheming.focusStyles({
|
|
92
76
|
theme: props.theme,
|
|
93
77
|
inset: true
|
|
94
78
|
}), activeBackgroundColor, activeForegroundColor, currentBackgroundColor, currentForegroundColor, currentHoverBackgroundColor, currentActiveBackgroundColor, reactTheming.getColorV8('grey', 300, props.theme));
|
|
@@ -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.
|
|
89
|
+
'data-garden-version': '9.0.0-next.8'
|
|
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.
|
|
105
|
+
'data-garden-version': '9.0.0-next.8'
|
|
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.
|
|
117
|
+
'data-garden-version': '9.0.0-next.8'
|
|
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.
|
|
129
|
+
'data-garden-version': '9.0.0-next.8',
|
|
146
130
|
as: 'button'
|
|
147
131
|
}).withConfig({
|
|
148
132
|
displayName: "StyledCursor",
|
|
@@ -188,7 +172,7 @@ const sizeStyles = props => {
|
|
|
188
172
|
};
|
|
189
173
|
const StyledGapListItem = styled__default.default(StyledListItem).attrs({
|
|
190
174
|
'data-garden-id': COMPONENT_ID$2,
|
|
191
|
-
'data-garden-version': '9.0.0-next.
|
|
175
|
+
'data-garden-version': '9.0.0-next.8'
|
|
192
176
|
}).withConfig({
|
|
193
177
|
displayName: "StyledGapListItem",
|
|
194
178
|
componentId: "sc-10wd0iz-0"
|
|
@@ -200,7 +184,7 @@ StyledGapListItem.defaultProps = {
|
|
|
200
184
|
const COMPONENT_ID$1 = 'pagination.navigation';
|
|
201
185
|
const StyledNavigation = styled__default.default(StyledPage).attrs({
|
|
202
186
|
'data-garden-id': COMPONENT_ID$1,
|
|
203
|
-
'data-garden-version': '9.0.0-next.
|
|
187
|
+
'data-garden-version': '9.0.0-next.8'
|
|
204
188
|
}).withConfig({
|
|
205
189
|
displayName: "StyledNavigation",
|
|
206
190
|
componentId: "sc-1lpl8pp-0"
|
|
@@ -212,7 +196,7 @@ StyledNavigation.defaultProps = {
|
|
|
212
196
|
const COMPONENT_ID = 'pagination.pagination_view';
|
|
213
197
|
const StyledNav = styled__default.default.nav.attrs({
|
|
214
198
|
'data-garden-id': COMPONENT_ID,
|
|
215
|
-
'data-garden-version': '9.0.0-next.
|
|
199
|
+
'data-garden-version': '9.0.0-next.8'
|
|
216
200
|
}).withConfig({
|
|
217
201
|
displayName: "StyledNav",
|
|
218
202
|
componentId: "sc-ppnpkw-0"
|
|
@@ -256,7 +240,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
|
|
|
256
240
|
const PreviousComponent$1 = React.forwardRef((props, ref) => {
|
|
257
241
|
const ariaLabel = reactTheming.useText(PreviousComponent$1, props, 'aria-label', 'Previous page');
|
|
258
242
|
const theme = React.useContext(styled.ThemeContext);
|
|
259
|
-
return React__namespace.default.createElement(StyledNavigation,
|
|
243
|
+
return React__namespace.default.createElement(StyledNavigation, Object.assign({
|
|
260
244
|
type: "button"
|
|
261
245
|
}, props, {
|
|
262
246
|
"aria-label": ariaLabel,
|
|
@@ -269,7 +253,7 @@ const Previous$1 = PreviousComponent$1;
|
|
|
269
253
|
const NextComponent$1 = React.forwardRef((props, ref) => {
|
|
270
254
|
const ariaLabel = reactTheming.useText(NextComponent$1, props, 'aria-label', 'Next page');
|
|
271
255
|
const theme = React.useContext(styled.ThemeContext);
|
|
272
|
-
return React__namespace.default.createElement(StyledNavigation,
|
|
256
|
+
return React__namespace.default.createElement(StyledNavigation, Object.assign({
|
|
273
257
|
type: "button"
|
|
274
258
|
}, props, {
|
|
275
259
|
"aria-label": ariaLabel,
|
|
@@ -281,7 +265,7 @@ const Next$1 = NextComponent$1;
|
|
|
281
265
|
|
|
282
266
|
const PageComponent = React.forwardRef((props, ref) => {
|
|
283
267
|
const ariaLabel = reactTheming.useText(PageComponent, props, 'aria-label', `Page ${props.children}`);
|
|
284
|
-
return React__namespace.default.createElement(StyledPage,
|
|
268
|
+
return React__namespace.default.createElement(StyledPage, Object.assign({
|
|
285
269
|
type: "button"
|
|
286
270
|
}, props, {
|
|
287
271
|
"aria-label": ariaLabel,
|
|
@@ -293,7 +277,7 @@ const Page = PageComponent;
|
|
|
293
277
|
|
|
294
278
|
const GapComponent = React.forwardRef((props, ref) => {
|
|
295
279
|
const ariaLabel = reactTheming.useText(GapComponent, props, 'aria-label', 'Ellipsis indicating non-visible pages');
|
|
296
|
-
return React__namespace.default.createElement(StyledGapListItem,
|
|
280
|
+
return React__namespace.default.createElement(StyledGapListItem, Object.assign({}, props, {
|
|
297
281
|
"aria-label": ariaLabel,
|
|
298
282
|
ref: ref
|
|
299
283
|
}), "\u2026");
|
|
@@ -421,7 +405,7 @@ const OffsetPagination = React.forwardRef((_ref, ref) => {
|
|
|
421
405
|
};
|
|
422
406
|
return React__namespace.default.createElement(StyledNav, {
|
|
423
407
|
"aria-label": navigationLabel
|
|
424
|
-
}, React__namespace.default.createElement(StyledList,
|
|
408
|
+
}, React__namespace.default.createElement(StyledList, Object.assign({}, otherProps, {
|
|
425
409
|
ref: ref
|
|
426
410
|
}), renderPreviousPage(), totalPages > 0 && renderPages(), renderNextPage()));
|
|
427
411
|
});
|
|
@@ -460,7 +444,7 @@ const FirstComponent = React.forwardRef((_ref, ref) => {
|
|
|
460
444
|
children,
|
|
461
445
|
...other
|
|
462
446
|
} = _ref;
|
|
463
|
-
return React__namespace.default.createElement(StyledCursor,
|
|
447
|
+
return React__namespace.default.createElement(StyledCursor, Object.assign({
|
|
464
448
|
ref: ref
|
|
465
449
|
}, other), React__namespace.default.createElement(StyledIcon, {
|
|
466
450
|
type: "first"
|
|
@@ -474,7 +458,7 @@ const NextComponent = React.forwardRef((_ref, ref) => {
|
|
|
474
458
|
children,
|
|
475
459
|
...other
|
|
476
460
|
} = _ref;
|
|
477
|
-
return React__namespace.default.createElement(StyledCursor,
|
|
461
|
+
return React__namespace.default.createElement(StyledCursor, Object.assign({
|
|
478
462
|
ref: ref,
|
|
479
463
|
as: "button"
|
|
480
464
|
}, other), React__namespace.default.createElement("span", null, children), React__namespace.default.createElement(StyledIcon, {
|
|
@@ -489,7 +473,7 @@ const PreviousComponent = React.forwardRef((_ref, ref) => {
|
|
|
489
473
|
children,
|
|
490
474
|
...other
|
|
491
475
|
} = _ref;
|
|
492
|
-
return React__namespace.default.createElement(StyledCursor,
|
|
476
|
+
return React__namespace.default.createElement(StyledCursor, Object.assign({
|
|
493
477
|
ref: ref,
|
|
494
478
|
as: "button"
|
|
495
479
|
}, other), React__namespace.default.createElement(StyledIcon, {
|
|
@@ -520,7 +504,7 @@ const LastComponent = React.forwardRef((_ref, ref) => {
|
|
|
520
504
|
children,
|
|
521
505
|
...other
|
|
522
506
|
} = _ref;
|
|
523
|
-
return React__namespace.default.createElement(StyledCursor,
|
|
507
|
+
return React__namespace.default.createElement(StyledCursor, Object.assign({
|
|
524
508
|
ref: ref,
|
|
525
509
|
as: "button"
|
|
526
510
|
}, other), React__namespace.default.createElement("span", null, children), React__namespace.default.createElement(StyledIcon, {
|
|
@@ -530,7 +514,7 @@ const LastComponent = React.forwardRef((_ref, ref) => {
|
|
|
530
514
|
LastComponent.displayName = 'CursorPagination.Last';
|
|
531
515
|
const Last = LastComponent;
|
|
532
516
|
|
|
533
|
-
const CursorPaginationComponent = React.forwardRef((props, ref) => React__namespace.default.createElement(StyledCursorPagination,
|
|
517
|
+
const CursorPaginationComponent = React.forwardRef((props, ref) => React__namespace.default.createElement(StyledCursorPagination, Object.assign({
|
|
534
518
|
ref: ref
|
|
535
519
|
}, props)));
|
|
536
520
|
CursorPaginationComponent.displayName = 'CursorPagination';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-pagination",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.8",
|
|
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.
|
|
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": "
|
|
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.
|
|
35
|
+
"@zendeskgarden/react-theming": "^9.0.0-next.8",
|
|
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": "
|
|
48
|
+
"gitHead": "a3d6534843d5a4f5cb60b52bc67264f3230f2da0"
|
|
49
49
|
}
|