glints-aries 4.0.269 → 4.0.271
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/es/@next/Carousel/Carousel.js +3 -1
- package/es/@next/Pagination/IconPagination.d.ts +3 -0
- package/es/@next/Pagination/IconPagination.js +25 -0
- package/es/@next/Pagination/IconPagination.stories.d.ts +5 -0
- package/es/@next/Pagination/PaginationStyle.d.ts +3 -0
- package/es/@next/Pagination/PaginationStyle.js +18 -6
- package/es/@next/Pagination/index.d.ts +2 -1
- package/es/@next/Pagination/index.js +2 -1
- package/es/@next/Pagination/paginationUtils.d.ts +8 -0
- package/es/@next/index.d.ts +1 -1
- package/es/@next/index.js +1 -1
- package/lib/@next/Carousel/Carousel.js +3 -1
- package/lib/@next/Pagination/IconPagination.d.ts +3 -0
- package/lib/@next/Pagination/IconPagination.js +31 -0
- package/lib/@next/Pagination/IconPagination.stories.d.ts +5 -0
- package/lib/@next/Pagination/PaginationStyle.d.ts +3 -0
- package/lib/@next/Pagination/PaginationStyle.js +20 -5
- package/lib/@next/Pagination/index.d.ts +2 -1
- package/lib/@next/Pagination/index.js +12 -3
- package/lib/@next/Pagination/paginationUtils.d.ts +8 -0
- package/lib/@next/index.d.ts +1 -1
- package/lib/@next/index.js +4 -2
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ export var Carousel = function Carousel(_ref) {
|
|
|
18
18
|
_ref$showArrows = _ref.showArrows,
|
|
19
19
|
showArrows = _ref$showArrows === void 0 ? true : _ref$showArrows;
|
|
20
20
|
var slideRef = useRef(null);
|
|
21
|
+
var slideTimeout = useRef();
|
|
21
22
|
var _useState = useState(0),
|
|
22
23
|
activeIndex = _useState[0],
|
|
23
24
|
setActiveIndex = _useState[1];
|
|
@@ -59,7 +60,8 @@ export var Carousel = function Carousel(_ref) {
|
|
|
59
60
|
};
|
|
60
61
|
useEffect(function () {
|
|
61
62
|
if (autoRotate) {
|
|
62
|
-
|
|
63
|
+
if (slideTimeout.current) clearTimeout(slideTimeout.current);
|
|
64
|
+
slideTimeout.current = setTimeout(function () {
|
|
63
65
|
updateActiveIndex(activeIndex + 1);
|
|
64
66
|
}, duration);
|
|
65
67
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconPaginationStyledNav, StyledBorderPaginationButton, StyledLabel } from './PaginationStyle';
|
|
3
|
+
import { Icon } from '../Icon';
|
|
4
|
+
export var IconPagination = /*#__PURE__*/React.forwardRef(function IconPagination(_ref, ref) {
|
|
5
|
+
var label = _ref.label,
|
|
6
|
+
disableNext = _ref.disableNext,
|
|
7
|
+
disablePrevious = _ref.disablePrevious,
|
|
8
|
+
onNext = _ref.onNext,
|
|
9
|
+
onPrevious = _ref.onPrevious;
|
|
10
|
+
return /*#__PURE__*/React.createElement(IconPaginationStyledNav, {
|
|
11
|
+
ref: ref
|
|
12
|
+
}, /*#__PURE__*/React.createElement(StyledBorderPaginationButton, {
|
|
13
|
+
"data-testid": "previous-page",
|
|
14
|
+
disabled: disablePrevious,
|
|
15
|
+
onClick: onPrevious
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
17
|
+
name: "ri-arrow-m-left-line"
|
|
18
|
+
})), label && /*#__PURE__*/React.createElement(StyledLabel, null, label), /*#__PURE__*/React.createElement(StyledBorderPaginationButton, {
|
|
19
|
+
"data-testid": "next-page",
|
|
20
|
+
disabled: disableNext,
|
|
21
|
+
onClick: onNext
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
23
|
+
name: "ri-arrow-m-right-line"
|
|
24
|
+
})));
|
|
25
|
+
});
|
|
@@ -2,7 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { PageButtonProps } from './PageButton';
|
|
3
3
|
export declare const StyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
4
4
|
export declare const SimplePaginationStyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
5
|
+
export declare const IconPaginationStyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
5
6
|
export declare const StyledPageButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
6
7
|
export declare const StyledSimplePaginationButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
8
|
+
export declare const StyledBorderPaginationButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
9
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
10
|
export declare const StyledActiveSimplePaginationButton: import("styled-components").StyledComponent<(props: PageButtonProps) => JSX.Element, any, {}, never>;
|
|
8
11
|
export declare const StyledSimplePaginationInput: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../NumberInput").NumberInputProps & React.RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { NumberInput } from '../NumberInput';
|
|
4
|
-
import { borderRadius2 } from '../utilities/borderRadius';
|
|
4
|
+
import { borderRadius2, borderRadius4 } from '../utilities/borderRadius';
|
|
5
5
|
import { Blue, Neutral } from '../utilities/colors';
|
|
6
|
-
import { space4 } from '../utilities/spacing';
|
|
6
|
+
import { space12, space4 } from '../utilities/spacing';
|
|
7
7
|
import { PageButton } from './PageButton';
|
|
8
8
|
export var StyledNav = styled.nav.withConfig({
|
|
9
9
|
displayName: "PaginationStyle__StyledNav",
|
|
@@ -13,21 +13,33 @@ export var SimplePaginationStyledNav = styled(StyledNav).withConfig({
|
|
|
13
13
|
displayName: "PaginationStyle__SimplePaginationStyledNav",
|
|
14
14
|
componentId: "sc-1hi5sa8-1"
|
|
15
15
|
})(["gap:4px;"]);
|
|
16
|
+
export var IconPaginationStyledNav = styled(StyledNav).withConfig({
|
|
17
|
+
displayName: "PaginationStyle__IconPaginationStyledNav",
|
|
18
|
+
componentId: "sc-1hi5sa8-2"
|
|
19
|
+
})(["gap:0px;align-items:center;column-gap:1px;"]);
|
|
16
20
|
export var StyledPageButton = styled.button.withConfig({
|
|
17
21
|
displayName: "PaginationStyle__StyledPageButton",
|
|
18
|
-
componentId: "sc-1hi5sa8-
|
|
22
|
+
componentId: "sc-1hi5sa8-3"
|
|
19
23
|
})(["cursor:pointer;height:32px;min-width:32px;border:0;background:transparent;border-radius:", ";padding:", ";color:", ";&:hover{background:", ";}&:disabled{color:", ";}svg{fill:", ";width:24px;height:24px;}&[data-active='true']{background:", ";color:", ";}&:disabled svg{fill:", ";}&[data-active='true']:disabled{background:", ";color:", ";}"], borderRadius2, space4, Neutral.B18, Neutral.B95, Neutral.B85, Neutral.B40, Blue.S08, Blue.S99, Neutral.B85, Neutral.B95, Neutral.B85);
|
|
20
24
|
export var StyledSimplePaginationButton = styled(StyledPageButton).withConfig({
|
|
21
25
|
displayName: "PaginationStyle__StyledSimplePaginationButton",
|
|
22
|
-
componentId: "sc-1hi5sa8-
|
|
26
|
+
componentId: "sc-1hi5sa8-4"
|
|
23
27
|
})(["pointer-events:none;"]);
|
|
28
|
+
export var StyledBorderPaginationButton = styled(StyledPageButton).withConfig({
|
|
29
|
+
displayName: "PaginationStyle__StyledBorderPaginationButton",
|
|
30
|
+
componentId: "sc-1hi5sa8-5"
|
|
31
|
+
})(["outline:1px solid ", ";height:36px;min-width:36px;svg{vertical-align:middle;}&:first-of-type{border-radius:", " 0 0 ", ";}&:last-of-type{border-radius:0 ", " ", " 0;}&:hover{background:", ";}&:disabled{background:", ";}"], Neutral.B85, borderRadius4, borderRadius4, borderRadius4, borderRadius4, Blue.S08, Neutral.B95);
|
|
32
|
+
export var StyledLabel = styled.div.withConfig({
|
|
33
|
+
displayName: "PaginationStyle__StyledLabel",
|
|
34
|
+
componentId: "sc-1hi5sa8-6"
|
|
35
|
+
})(["padding:0 ", " 0;vertical-align:middle;"], space12);
|
|
24
36
|
export var StyledActiveSimplePaginationButton = styled(function (props) {
|
|
25
37
|
return /*#__PURE__*/React.createElement(PageButton, props);
|
|
26
38
|
}).withConfig({
|
|
27
39
|
displayName: "PaginationStyle__StyledActiveSimplePaginationButton",
|
|
28
|
-
componentId: "sc-1hi5sa8-
|
|
40
|
+
componentId: "sc-1hi5sa8-7"
|
|
29
41
|
})(["background:", ";color:", ";&:hover{background:", ";color:", ";}"], Blue.S08, Blue.S99, Neutral.B95, Neutral.B18);
|
|
30
42
|
export var StyledSimplePaginationInput = styled(NumberInput).withConfig({
|
|
31
43
|
displayName: "PaginationStyle__StyledSimplePaginationInput",
|
|
32
|
-
componentId: "sc-1hi5sa8-
|
|
44
|
+
componentId: "sc-1hi5sa8-8"
|
|
33
45
|
})(["padding:0;text-align:center;height:32px;width:32px;"]);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare type PaginationProps = {
|
|
2
3
|
/** Total items to be displayed, must be positive integer and above 0 */
|
|
3
4
|
totalItems: number;
|
|
@@ -8,6 +9,13 @@ export declare type PaginationProps = {
|
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
onPageChanged?: (currentPage: number) => void;
|
|
10
11
|
};
|
|
12
|
+
export declare type IconPaginationProps = {
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
disableNext?: boolean;
|
|
15
|
+
disablePrevious?: boolean;
|
|
16
|
+
onNext?: () => void;
|
|
17
|
+
onPrevious?: () => void;
|
|
18
|
+
};
|
|
11
19
|
export declare const defaultPageSize = 10;
|
|
12
20
|
export declare const defaultBufferSize = 2;
|
|
13
21
|
export declare const getAllPages: (pageSize: number, total: number) => number;
|
package/es/@next/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { Link, LinkProps } from './Link';
|
|
|
26
26
|
export { Menu, MenuProps } from './Menu';
|
|
27
27
|
export { Modal, ModalContext, ModalProps, ModalProvider, useModal, } from './Modal';
|
|
28
28
|
export { NumberInput, NumberInputProps } from './NumberInput';
|
|
29
|
-
export { Pagination, PaginationProps, SimplePagination } from './Pagination';
|
|
29
|
+
export { IconPagination, IconPaginationProps, Pagination, PaginationProps, SimplePagination, } from './Pagination';
|
|
30
30
|
export { PasswordInput, PasswordInputProps } from './PasswordInput';
|
|
31
31
|
export { Popover, PopoverProps } from './Popover';
|
|
32
32
|
export { RadioButton, RadioButtonProps } from './RadioButton';
|
package/es/@next/index.js
CHANGED
|
@@ -27,7 +27,7 @@ export { Link, LinkProps } from './Link';
|
|
|
27
27
|
export { Menu, MenuProps } from './Menu';
|
|
28
28
|
export { Modal, ModalContext, ModalProps, ModalProvider, useModal } from './Modal';
|
|
29
29
|
export { NumberInput, NumberInputProps } from './NumberInput';
|
|
30
|
-
export { Pagination, PaginationProps, SimplePagination } from './Pagination';
|
|
30
|
+
export { IconPagination, IconPaginationProps, Pagination, PaginationProps, SimplePagination } from './Pagination';
|
|
31
31
|
export { PasswordInput, PasswordInputProps } from './PasswordInput';
|
|
32
32
|
export { Popover, PopoverProps } from './Popover';
|
|
33
33
|
export { RadioButton, RadioButtonProps } from './RadioButton';
|
|
@@ -24,6 +24,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
24
24
|
_ref$showArrows = _ref.showArrows,
|
|
25
25
|
showArrows = _ref$showArrows === void 0 ? true : _ref$showArrows;
|
|
26
26
|
var slideRef = (0, _react.useRef)(null);
|
|
27
|
+
var slideTimeout = (0, _react.useRef)();
|
|
27
28
|
var _useState = (0, _react.useState)(0),
|
|
28
29
|
activeIndex = _useState[0],
|
|
29
30
|
setActiveIndex = _useState[1];
|
|
@@ -65,7 +66,8 @@ var Carousel = function Carousel(_ref) {
|
|
|
65
66
|
};
|
|
66
67
|
(0, _react.useEffect)(function () {
|
|
67
68
|
if (autoRotate) {
|
|
68
|
-
|
|
69
|
+
if (slideTimeout.current) clearTimeout(slideTimeout.current);
|
|
70
|
+
slideTimeout.current = setTimeout(function () {
|
|
69
71
|
updateActiveIndex(activeIndex + 1);
|
|
70
72
|
}, duration);
|
|
71
73
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.IconPagination = void 0;
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
var _PaginationStyle = require("./PaginationStyle");
|
|
8
|
+
var _Icon = require("../Icon");
|
|
9
|
+
var IconPagination = /*#__PURE__*/_react["default"].forwardRef(function IconPagination(_ref, ref) {
|
|
10
|
+
var label = _ref.label,
|
|
11
|
+
disableNext = _ref.disableNext,
|
|
12
|
+
disablePrevious = _ref.disablePrevious,
|
|
13
|
+
onNext = _ref.onNext,
|
|
14
|
+
onPrevious = _ref.onPrevious;
|
|
15
|
+
return /*#__PURE__*/_react["default"].createElement(_PaginationStyle.IconPaginationStyledNav, {
|
|
16
|
+
ref: ref
|
|
17
|
+
}, /*#__PURE__*/_react["default"].createElement(_PaginationStyle.StyledBorderPaginationButton, {
|
|
18
|
+
"data-testid": "previous-page",
|
|
19
|
+
disabled: disablePrevious,
|
|
20
|
+
onClick: onPrevious
|
|
21
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon.Icon, {
|
|
22
|
+
name: "ri-arrow-m-left-line"
|
|
23
|
+
})), label && /*#__PURE__*/_react["default"].createElement(_PaginationStyle.StyledLabel, null, label), /*#__PURE__*/_react["default"].createElement(_PaginationStyle.StyledBorderPaginationButton, {
|
|
24
|
+
"data-testid": "next-page",
|
|
25
|
+
disabled: disableNext,
|
|
26
|
+
onClick: onNext
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon.Icon, {
|
|
28
|
+
name: "ri-arrow-m-right-line"
|
|
29
|
+
})));
|
|
30
|
+
});
|
|
31
|
+
exports.IconPagination = IconPagination;
|
|
@@ -2,7 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { PageButtonProps } from './PageButton';
|
|
3
3
|
export declare const StyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
4
4
|
export declare const SimplePaginationStyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
5
|
+
export declare const IconPaginationStyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
5
6
|
export declare const StyledPageButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
6
7
|
export declare const StyledSimplePaginationButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
8
|
+
export declare const StyledBorderPaginationButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
9
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
10
|
export declare const StyledActiveSimplePaginationButton: import("styled-components").StyledComponent<(props: PageButtonProps) => JSX.Element, any, {}, never>;
|
|
8
11
|
export declare const StyledSimplePaginationInput: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../NumberInput").NumberInputProps & React.RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.StyledSimplePaginationInput = exports.StyledSimplePaginationButton = exports.StyledPageButton = exports.StyledNav = exports.StyledActiveSimplePaginationButton = exports.SimplePaginationStyledNav = void 0;
|
|
5
|
+
exports.StyledSimplePaginationInput = exports.StyledSimplePaginationButton = exports.StyledPageButton = exports.StyledNav = exports.StyledLabel = exports.StyledBorderPaginationButton = exports.StyledActiveSimplePaginationButton = exports.SimplePaginationStyledNav = exports.IconPaginationStyledNav = void 0;
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _NumberInput = require("../NumberInput");
|
|
@@ -20,25 +20,40 @@ var SimplePaginationStyledNav = (0, _styledComponents["default"])(StyledNav).wit
|
|
|
20
20
|
componentId: "sc-1hi5sa8-1"
|
|
21
21
|
})(["gap:4px;"]);
|
|
22
22
|
exports.SimplePaginationStyledNav = SimplePaginationStyledNav;
|
|
23
|
+
var IconPaginationStyledNav = (0, _styledComponents["default"])(StyledNav).withConfig({
|
|
24
|
+
displayName: "PaginationStyle__IconPaginationStyledNav",
|
|
25
|
+
componentId: "sc-1hi5sa8-2"
|
|
26
|
+
})(["gap:0px;align-items:center;column-gap:1px;"]);
|
|
27
|
+
exports.IconPaginationStyledNav = IconPaginationStyledNav;
|
|
23
28
|
var StyledPageButton = _styledComponents["default"].button.withConfig({
|
|
24
29
|
displayName: "PaginationStyle__StyledPageButton",
|
|
25
|
-
componentId: "sc-1hi5sa8-
|
|
30
|
+
componentId: "sc-1hi5sa8-3"
|
|
26
31
|
})(["cursor:pointer;height:32px;min-width:32px;border:0;background:transparent;border-radius:", ";padding:", ";color:", ";&:hover{background:", ";}&:disabled{color:", ";}svg{fill:", ";width:24px;height:24px;}&[data-active='true']{background:", ";color:", ";}&:disabled svg{fill:", ";}&[data-active='true']:disabled{background:", ";color:", ";}"], _borderRadius.borderRadius2, _spacing.space4, _colors.Neutral.B18, _colors.Neutral.B95, _colors.Neutral.B85, _colors.Neutral.B40, _colors.Blue.S08, _colors.Blue.S99, _colors.Neutral.B85, _colors.Neutral.B95, _colors.Neutral.B85);
|
|
27
32
|
exports.StyledPageButton = StyledPageButton;
|
|
28
33
|
var StyledSimplePaginationButton = (0, _styledComponents["default"])(StyledPageButton).withConfig({
|
|
29
34
|
displayName: "PaginationStyle__StyledSimplePaginationButton",
|
|
30
|
-
componentId: "sc-1hi5sa8-
|
|
35
|
+
componentId: "sc-1hi5sa8-4"
|
|
31
36
|
})(["pointer-events:none;"]);
|
|
32
37
|
exports.StyledSimplePaginationButton = StyledSimplePaginationButton;
|
|
38
|
+
var StyledBorderPaginationButton = (0, _styledComponents["default"])(StyledPageButton).withConfig({
|
|
39
|
+
displayName: "PaginationStyle__StyledBorderPaginationButton",
|
|
40
|
+
componentId: "sc-1hi5sa8-5"
|
|
41
|
+
})(["outline:1px solid ", ";height:36px;min-width:36px;svg{vertical-align:middle;}&:first-of-type{border-radius:", " 0 0 ", ";}&:last-of-type{border-radius:0 ", " ", " 0;}&:hover{background:", ";}&:disabled{background:", ";}"], _colors.Neutral.B85, _borderRadius.borderRadius4, _borderRadius.borderRadius4, _borderRadius.borderRadius4, _borderRadius.borderRadius4, _colors.Blue.S08, _colors.Neutral.B95);
|
|
42
|
+
exports.StyledBorderPaginationButton = StyledBorderPaginationButton;
|
|
43
|
+
var StyledLabel = _styledComponents["default"].div.withConfig({
|
|
44
|
+
displayName: "PaginationStyle__StyledLabel",
|
|
45
|
+
componentId: "sc-1hi5sa8-6"
|
|
46
|
+
})(["padding:0 ", " 0;vertical-align:middle;"], _spacing.space12);
|
|
47
|
+
exports.StyledLabel = StyledLabel;
|
|
33
48
|
var StyledActiveSimplePaginationButton = (0, _styledComponents["default"])(function (props) {
|
|
34
49
|
return /*#__PURE__*/_react["default"].createElement(_PageButton.PageButton, props);
|
|
35
50
|
}).withConfig({
|
|
36
51
|
displayName: "PaginationStyle__StyledActiveSimplePaginationButton",
|
|
37
|
-
componentId: "sc-1hi5sa8-
|
|
52
|
+
componentId: "sc-1hi5sa8-7"
|
|
38
53
|
})(["background:", ";color:", ";&:hover{background:", ";color:", ";}"], _colors.Blue.S08, _colors.Blue.S99, _colors.Neutral.B95, _colors.Neutral.B18);
|
|
39
54
|
exports.StyledActiveSimplePaginationButton = StyledActiveSimplePaginationButton;
|
|
40
55
|
var StyledSimplePaginationInput = (0, _styledComponents["default"])(_NumberInput.NumberInput).withConfig({
|
|
41
56
|
displayName: "PaginationStyle__StyledSimplePaginationInput",
|
|
42
|
-
componentId: "sc-1hi5sa8-
|
|
57
|
+
componentId: "sc-1hi5sa8-8"
|
|
43
58
|
})(["padding:0;text-align:center;height:32px;width:32px;"]);
|
|
44
59
|
exports.StyledSimplePaginationInput = StyledSimplePaginationInput;
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
var _exportNames = {
|
|
5
|
-
PaginationProps: true
|
|
5
|
+
PaginationProps: true,
|
|
6
|
+
IconPaginationProps: true
|
|
6
7
|
};
|
|
7
|
-
exports.PaginationProps = void 0;
|
|
8
|
+
exports.PaginationProps = exports.IconPaginationProps = void 0;
|
|
8
9
|
var _Pagination = require("./Pagination");
|
|
9
10
|
Object.keys(_Pagination).forEach(function (key) {
|
|
10
11
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -12,6 +13,13 @@ Object.keys(_Pagination).forEach(function (key) {
|
|
|
12
13
|
if (key in exports && exports[key] === _Pagination[key]) return;
|
|
13
14
|
exports[key] = _Pagination[key];
|
|
14
15
|
});
|
|
16
|
+
var _IconPagination = require("./IconPagination");
|
|
17
|
+
Object.keys(_IconPagination).forEach(function (key) {
|
|
18
|
+
if (key === "default" || key === "__esModule") return;
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
20
|
+
if (key in exports && exports[key] === _IconPagination[key]) return;
|
|
21
|
+
exports[key] = _IconPagination[key];
|
|
22
|
+
});
|
|
15
23
|
var _SimplePagination = require("./SimplePagination");
|
|
16
24
|
Object.keys(_SimplePagination).forEach(function (key) {
|
|
17
25
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -20,4 +28,5 @@ Object.keys(_SimplePagination).forEach(function (key) {
|
|
|
20
28
|
exports[key] = _SimplePagination[key];
|
|
21
29
|
});
|
|
22
30
|
var _paginationUtils = require("./paginationUtils");
|
|
23
|
-
exports.PaginationProps = _paginationUtils.PaginationProps;
|
|
31
|
+
exports.PaginationProps = _paginationUtils.PaginationProps;
|
|
32
|
+
exports.IconPaginationProps = _paginationUtils.IconPaginationProps;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare type PaginationProps = {
|
|
2
3
|
/** Total items to be displayed, must be positive integer and above 0 */
|
|
3
4
|
totalItems: number;
|
|
@@ -8,6 +9,13 @@ export declare type PaginationProps = {
|
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
onPageChanged?: (currentPage: number) => void;
|
|
10
11
|
};
|
|
12
|
+
export declare type IconPaginationProps = {
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
disableNext?: boolean;
|
|
15
|
+
disablePrevious?: boolean;
|
|
16
|
+
onNext?: () => void;
|
|
17
|
+
onPrevious?: () => void;
|
|
18
|
+
};
|
|
11
19
|
export declare const defaultPageSize = 10;
|
|
12
20
|
export declare const defaultBufferSize = 2;
|
|
13
21
|
export declare const getAllPages: (pageSize: number, total: number) => number;
|
package/lib/@next/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { Link, LinkProps } from './Link';
|
|
|
26
26
|
export { Menu, MenuProps } from './Menu';
|
|
27
27
|
export { Modal, ModalContext, ModalProps, ModalProvider, useModal, } from './Modal';
|
|
28
28
|
export { NumberInput, NumberInputProps } from './NumberInput';
|
|
29
|
-
export { Pagination, PaginationProps, SimplePagination } from './Pagination';
|
|
29
|
+
export { IconPagination, IconPaginationProps, Pagination, PaginationProps, SimplePagination, } from './Pagination';
|
|
30
30
|
export { PasswordInput, PasswordInputProps } from './PasswordInput';
|
|
31
31
|
export { Popover, PopoverProps } from './Popover';
|
|
32
32
|
export { RadioButton, RadioButtonProps } from './RadioButton';
|
package/lib/@next/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
5
|
-
exports.useModal = exports.useIndexResourceState = exports.useAlert = exports.UploadProps = exports.Upload = exports.TypographyProps = exports.Typography = exports.TooltipProps = void 0;
|
|
4
|
+
exports.TextInputProps = exports.TextInput = exports.TextAreaProps = exports.TextArea = exports.TagProps = exports.Tag = exports.TabsProps = exports.Tabs = exports.TableRowProps = exports.TableHeaderProps = exports.TableCellProps = exports.TabProps = exports.TabModel = exports.Tab = exports.Switch = exports.SpinnerProps = exports.Spinner = exports.Spacing = exports.SkeletonTextProps = exports.SkeletonText = exports.SkeletonImageSquareProps = exports.SkeletonImageSquare = exports.SkeletonImageCircleProps = exports.SkeletonImageCircle = exports.SimplePagination = exports.SideSheetProps = exports.SideSheet = exports.SelectProps = exports.Select = exports.RadioButtonProps = exports.RadioButton = exports.PrimaryButton = exports.PopoverProps = exports.Popover = exports.PasswordInputProps = exports.PasswordInput = exports.PaginationProps = exports.Pagination = exports.OutlineMonochromeButton = exports.OutlineButton = exports.NumberInputProps = exports.NumberInput = exports.ModalProvider = exports.ModalProps = exports.ModalContext = exports.Modal = exports.MenuProps = exports.Menu = exports.LinkProps = exports.Link = exports.InlineErrorProps = exports.InlineError = exports.IndexTableProps = exports.IndexTable = exports.IconProps = exports.IconPaginationProps = exports.IconPagination = exports.Icon = exports.Fonts = exports.EmptyState = exports.DropShadow = exports.Divider = exports.DestructiveButton = exports.DataTableProps = exports.DataTable = exports.CurrencyInputProps = exports.CurrencyInput = exports.ComboboxProps = exports.Combobox = exports.Colors = exports.CheckboxProps = exports.Checkbox = exports.CarouselProps = exports.Carousel = exports.CardProps = exports.Card = exports.ButtonProps = exports.ButtonGroupProps = exports.ButtonGroup = exports.Button = exports.Breakpoints = exports.BorderRadius = exports.BarProps = exports.Bar = exports.BannerProps = exports.Banner = exports.BadgeProps = exports.Badge = exports.AvatarProps = exports.Avatar = exports.AlertWithProvider = exports.AlertProvider = exports.AlertProps = exports.AlertContextProps = exports.AlertContext = exports.Alert = exports.ActionListSection = exports.ActionListProps = exports.ActionListItem = exports.ActionList = void 0;
|
|
5
|
+
exports.useModal = exports.useIndexResourceState = exports.useAlert = exports.UploadProps = exports.Upload = exports.TypographyProps = exports.Typography = exports.TooltipProps = exports.TooltipPosition = exports.Tooltip = void 0;
|
|
6
6
|
var BorderRadius = _interopRequireWildcard(require("./utilities/borderRadius"));
|
|
7
7
|
exports.BorderRadius = BorderRadius;
|
|
8
8
|
var Breakpoints = _interopRequireWildcard(require("./utilities/breakpoints"));
|
|
@@ -98,6 +98,8 @@ var _NumberInput = require("./NumberInput");
|
|
|
98
98
|
exports.NumberInput = _NumberInput.NumberInput;
|
|
99
99
|
exports.NumberInputProps = _NumberInput.NumberInputProps;
|
|
100
100
|
var _Pagination = require("./Pagination");
|
|
101
|
+
exports.IconPagination = _Pagination.IconPagination;
|
|
102
|
+
exports.IconPaginationProps = _Pagination.IconPaginationProps;
|
|
101
103
|
exports.Pagination = _Pagination.Pagination;
|
|
102
104
|
exports.PaginationProps = _Pagination.PaginationProps;
|
|
103
105
|
exports.SimplePagination = _Pagination.SimplePagination;
|