@pingux/astro 2.182.1 → 2.182.2-alpha.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/lib/cjs/components/Pagination/Pagination.js +13 -5
- package/lib/cjs/components/Pagination/Pagination.stories.js +11 -1
- package/lib/cjs/libs/astro/src/hooks/usePagination/usePagination.d.ts +2 -0
- package/lib/cjs/libs/astro/src/types/pagination.d.ts +3 -0
- package/lib/cjs/libs/astro/tsconfig.lib.tsbuildinfo +1 -1
- package/lib/components/Pagination/Pagination.js +13 -5
- package/lib/components/Pagination/Pagination.stories.js +11 -1
- package/package.json +1 -1
|
@@ -47,6 +47,8 @@ var RangeSelectPopover = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
|
|
|
47
47
|
})))));
|
|
48
48
|
});
|
|
49
49
|
var Pagination = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
50
|
+
var previousButtonIconProps = props.previousButtonIconProps,
|
|
51
|
+
nextButtonIconProps = props.nextButtonIconProps;
|
|
50
52
|
var _usePagination = (0, _usePagination2["default"])(props),
|
|
51
53
|
state = _usePagination.state,
|
|
52
54
|
previousButtonProps = _usePagination.previousButtonProps,
|
|
@@ -67,10 +69,16 @@ var Pagination = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
67
69
|
})), (0, _react2.jsx)(_index.Box, {
|
|
68
70
|
variant: "pagination.iconWrapper",
|
|
69
71
|
isRow: true
|
|
70
|
-
}, (0, _react2.jsx)(_index.IconButton, previousButtonProps, (0, _react2.jsx)(_index.Icon, {
|
|
71
|
-
icon: _ChevronLeftIcon["default"]
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
}, (0, _react2.jsx)(_index.IconButton, previousButtonProps, (0, _react2.jsx)(_index.Icon, (0, _extends2["default"])({
|
|
73
|
+
icon: _ChevronLeftIcon["default"],
|
|
74
|
+
title: {
|
|
75
|
+
name: 'Previous'
|
|
76
|
+
}
|
|
77
|
+
}, previousButtonIconProps))), (0, _react2.jsx)(_index.IconButton, nextButtonProps, (0, _react2.jsx)(_index.Icon, (0, _extends2["default"])({
|
|
78
|
+
icon: _ChevronRightIcon["default"],
|
|
79
|
+
title: {
|
|
80
|
+
name: 'Next'
|
|
81
|
+
}
|
|
82
|
+
}, nextButtonIconProps))))));
|
|
75
83
|
});
|
|
76
84
|
var _default = exports["default"] = Pagination;
|
|
@@ -91,7 +91,17 @@ var Default = exports.Default = function Default(args) {
|
|
|
91
91
|
gap: 'sm'
|
|
92
92
|
}
|
|
93
93
|
}, (0, _react2.jsx)(_index.Pagination, (0, _extends2["default"])({
|
|
94
|
-
totalCount: 250
|
|
94
|
+
totalCount: 250,
|
|
95
|
+
nextButtonIconProps: {
|
|
96
|
+
title: {
|
|
97
|
+
name: 'Next'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
previousButtonIconProps: {
|
|
101
|
+
title: {
|
|
102
|
+
name: 'Previous'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
95
105
|
}, args)));
|
|
96
106
|
};
|
|
97
107
|
var WithListView = exports.WithListView = function WithListView() {
|
|
@@ -668,6 +668,8 @@ declare const usePagination: (props: PaginationProps) => {
|
|
|
668
668
|
};
|
|
669
669
|
containerProps: {
|
|
670
670
|
setCurrentPageIndex?: () => void;
|
|
671
|
+
previousButtonIconProps?: import("../..").IconProps;
|
|
672
|
+
nextButtonIconProps?: import("../..").IconProps;
|
|
671
673
|
};
|
|
672
674
|
offsetMenuProps: object | undefined;
|
|
673
675
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps } from './button';
|
|
3
|
+
import { IconProps } from './icon';
|
|
3
4
|
import { PopoverMenuProps } from './popoverMenu';
|
|
4
5
|
type PaginationState = {
|
|
5
6
|
currentPageIndex: number;
|
|
@@ -38,6 +39,8 @@ export interface PaginationProps {
|
|
|
38
39
|
previousButtonProps?: ButtonProps;
|
|
39
40
|
setCurrentPageIndex?: () => void;
|
|
40
41
|
totalCount: number;
|
|
42
|
+
previousButtonIconProps?: IconProps;
|
|
43
|
+
nextButtonIconProps?: IconProps;
|
|
41
44
|
}
|
|
42
45
|
export interface RangeSelectPopoverProps extends PopoverMenuProps {
|
|
43
46
|
buttonProps?: ButtonProps;
|