@nulogy/components 8.17.1 → 8.18.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/dist/main.js CHANGED
@@ -48574,7 +48574,7 @@
48574
48574
  }
48575
48575
 
48576
48576
  if (disabled) {
48577
- return "inital";
48577
+ return "initial";
48578
48578
  }
48579
48579
 
48580
48580
  return theme.colors.lightGrey;
@@ -48617,13 +48617,11 @@
48617
48617
  };
48618
48618
  });
48619
48619
 
48620
- // @ts-nocheck
48621
-
48622
48620
  var PreviousButton = function PreviousButton(_ref) {
48623
48621
  var disabled = _ref.disabled,
48624
48622
  onClick = _ref.onClick,
48625
48623
  label = _ref.label,
48626
- ariaLabel = _ref["aria-label"];
48624
+ ariaLabel = _ref.ariaLabel;
48627
48625
 
48628
48626
  var _useTranslation = useTranslation(),
48629
48627
  t = _useTranslation.t;
@@ -48642,22 +48640,18 @@
48642
48640
  disabled: PropTypes__default["default"].bool,
48643
48641
  onClick: PropTypes__default["default"].func,
48644
48642
  label: PropTypes__default["default"].node,
48645
- "aria-label": PropTypes__default["default"].string
48643
+ ariaLabel: PropTypes__default["default"].string
48646
48644
  };
48647
48645
  PreviousButton.defaultProps = {
48648
48646
  disabled: false,
48649
- onClick: null,
48650
- label: undefined,
48651
- "aria-label": undefined
48647
+ onClick: null
48652
48648
  };
48653
48649
 
48654
- // @ts-nocheck
48655
-
48656
48650
  var NextButton = function NextButton(_ref) {
48657
48651
  var disabled = _ref.disabled,
48658
48652
  onClick = _ref.onClick,
48659
48653
  label = _ref.label,
48660
- ariaLabel = _ref["aria-label"];
48654
+ ariaLabel = _ref.ariaLabel;
48661
48655
 
48662
48656
  var _useTranslation = useTranslation(),
48663
48657
  t = _useTranslation.t;
@@ -48676,91 +48670,112 @@
48676
48670
  disabled: PropTypes__default["default"].bool,
48677
48671
  onClick: PropTypes__default["default"].func,
48678
48672
  label: PropTypes__default["default"].node,
48679
- "aria-label": PropTypes__default["default"].string
48673
+ ariaLabel: PropTypes__default["default"].string
48680
48674
  };
48681
48675
  NextButton.defaultProps = {
48682
48676
  disabled: false,
48683
- onClick: null,
48684
- label: undefined,
48685
- "aria-label": undefined
48677
+ onClick: null
48686
48678
  };
48687
48679
 
48688
- var SEPERATOR = "...";
48689
- var getPageItemstoDisplay = function getPageItemstoDisplay(totalPages, currentPage) {
48680
+ var SEPARATOR = "...";
48681
+ var getPageItemsToDisplay = function getPageItemsToDisplay(totalPages, currentPage) {
48682
+ var MAX_PAGES_TO_SHOW = 6;
48690
48683
  var pages = Array.from({
48691
48684
  length: totalPages
48692
- }, function (v, k) {
48693
- return k + 1;
48685
+ }, function (v, i) {
48686
+ return i + 1;
48694
48687
  });
48695
- var MAX_PAGES_TO_SHOW = 6;
48696
48688
  if (totalPages <= MAX_PAGES_TO_SHOW) return pages;
48697
48689
 
48698
48690
  if (currentPage <= MAX_PAGES_TO_SHOW - 1) {
48699
- return [].concat(pages.slice(0, 5), [SEPERATOR, totalPages]);
48691
+ return [].concat(pages.slice(0, 5), [SEPARATOR, totalPages]);
48700
48692
  }
48701
48693
 
48702
48694
  if (currentPage > totalPages - 5) {
48703
- return [1, SEPERATOR].concat(pages.slice(totalPages - 5));
48695
+ return [1, SEPARATOR].concat(pages.slice(totalPages - 5));
48704
48696
  }
48705
48697
 
48706
- return [1, SEPERATOR].concat(pages.slice(currentPage - 2, currentPage + 2), [SEPERATOR, totalPages]);
48698
+ return [1, SEPARATOR].concat(pages.slice(currentPage - 2, currentPage + 2), [SEPARATOR, totalPages]);
48707
48699
  };
48708
48700
 
48709
- var Pagination = function Pagination(props) {
48710
- var currentPage = props.currentPage,
48711
- totalPages = props.totalPages,
48712
- onNext = props.onNext,
48713
- onPrevious = props.onPrevious,
48714
- onSelectPage = props.onSelectPage,
48715
- nextAriaLabel = props.nextAriaLabel,
48716
- nextLabel = props.nextLabel,
48717
- previousAriaLabel = props.previousAriaLabel,
48718
- previousLabel = props.previousLabel,
48719
- ariaLabel = props["aria-label"],
48720
- restProps = __rest(props, ["currentPage", "totalPages", "onNext", "onPrevious", "onSelectPage", "nextAriaLabel", "nextLabel", "previousAriaLabel", "previousLabel", "aria-label"]);
48701
+ function Pagination(_a) {
48702
+ var currentPage = _a.currentPage,
48703
+ totalPages = _a.totalPages,
48704
+ onNext = _a.onNext,
48705
+ onPrevious = _a.onPrevious,
48706
+ onSelectPage = _a.onSelectPage,
48707
+ nextAriaLabel = _a.nextAriaLabel,
48708
+ nextLabel = _a.nextLabel,
48709
+ previousAriaLabel = _a.previousAriaLabel,
48710
+ previousLabel = _a.previousLabel,
48711
+ scrollToTopAfterPagination = _a.scrollToTopAfterPagination,
48712
+ scrollTargetRef = _a.scrollTargetRef,
48713
+ ariaLabel = _a["aria-label"],
48714
+ restProps = __rest(_a, ["currentPage", "totalPages", "onNext", "onPrevious", "onSelectPage", "nextAriaLabel", "nextLabel", "previousAriaLabel", "previousLabel", "scrollToTopAfterPagination", "scrollTargetRef", "aria-label"]);
48721
48715
 
48722
48716
  var _useTranslation = useTranslation(),
48723
48717
  t = _useTranslation.t;
48724
48718
 
48719
+ var scrollToTop = function scrollToTop() {
48720
+ var _a, _b;
48721
+
48722
+ if (scrollToTopAfterPagination) {
48723
+ var top = (scrollTargetRef === null || scrollTargetRef === void 0 ? void 0 : scrollTargetRef.current) ? window.scrollY + ((_b = (_a = scrollTargetRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.top) : 0;
48724
+ window.scrollTo({
48725
+ top: top,
48726
+ behavior: "smooth"
48727
+ });
48728
+ }
48729
+ };
48730
+
48725
48731
  return /*#__PURE__*/React__default["default"].createElement(Flex, Object.assign({
48726
48732
  as: "nav",
48727
48733
  "aria-label": ariaLabel || t("pagination navigation")
48728
48734
  }, restProps), /*#__PURE__*/React__default["default"].createElement(PreviousButton, {
48729
48735
  disabled: currentPage === 1,
48730
- onClick: onPrevious,
48736
+ onClick: function onClick() {
48737
+ ne.flushSync(function () {
48738
+ onPrevious();
48739
+ });
48740
+ scrollToTop();
48741
+ },
48731
48742
  ariaLabel: previousAriaLabel,
48732
48743
  label: previousLabel
48733
- }), getPageItemstoDisplay(totalPages, currentPage).map(function (page, index) {
48744
+ }), getPageItemsToDisplay(totalPages, currentPage).map(function (page, index) {
48734
48745
  var isCurrentPage = currentPage === page;
48735
- if (page === SEPERATOR) return (
48736
- /*#__PURE__*/
48737
- // eslint-disable-next-line react/no-array-index-key
48738
- React__default["default"].createElement(Text, {
48739
- key: "sep" + index,
48740
- py: "x1",
48741
- mr: "x2",
48742
- fontSize: "small",
48743
- lineHeight: "smallTextBase"
48744
- }, SEPERATOR)
48745
- );else return /*#__PURE__*/React__default["default"].createElement(PageNumber, {
48746
+ if (page === SEPARATOR) return /*#__PURE__*/React__default["default"].createElement(Text, {
48747
+ key: "sep" + index,
48748
+ py: "x1",
48749
+ mr: "x2",
48750
+ fontSize: "small",
48751
+ lineHeight: "smallTextBase"
48752
+ }, SEPARATOR);else return /*#__PURE__*/React__default["default"].createElement(PageNumber, {
48746
48753
  "aria-current": isCurrentPage,
48747
48754
  currentPage: isCurrentPage,
48748
48755
  disabled: isCurrentPage,
48749
48756
  "aria-label": isCurrentPage ? null : t("go to page", {
48750
- count: page
48757
+ count: Number(page)
48751
48758
  }),
48752
48759
  key: page,
48753
48760
  onClick: function onClick() {
48754
- return onSelectPage(page);
48761
+ ne.flushSync(function () {
48762
+ onSelectPage(page);
48763
+ });
48764
+ scrollToTop();
48755
48765
  }
48756
48766
  }, page);
48757
48767
  }), /*#__PURE__*/React__default["default"].createElement(NextButton, {
48758
48768
  disabled: currentPage === totalPages,
48759
- onClick: onNext,
48769
+ onClick: function onClick() {
48770
+ ne.flushSync(function () {
48771
+ onNext();
48772
+ });
48773
+ scrollToTop();
48774
+ },
48760
48775
  ariaLabel: nextAriaLabel,
48761
48776
  label: nextLabel
48762
48777
  }));
48763
- };
48778
+ }
48764
48779
 
48765
48780
  Pagination.propTypes = {
48766
48781
  currentPage: PropTypes__default["default"].number.isRequired,
@@ -11,7 +11,7 @@ import _typeof$1 from '@babel/runtime/helpers/typeof';
11
11
  import { stringify, COMMENT, rulesheet, middleware, RULESET, combine, match as match$k, serialize, copy as copy$1, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, compile, dealloc, alloc, hash as hash$2, charat, strlen, indexof, next, token, from, peek, delimit, slice, position as position$1 } from 'stylis';
12
12
  import _extends$4 from '@babel/runtime/helpers/extends';
13
13
  import 'hoist-non-react-statics';
14
- import ne, { createPortal, findDOMNode } from 'react-dom';
14
+ import ne, { createPortal, findDOMNode, flushSync } from 'react-dom';
15
15
  import '@babel/runtime/helpers/objectSpread2';
16
16
  import '@babel/runtime/helpers/inherits';
17
17
  import '@babel/runtime/helpers/createSuper';
@@ -48557,7 +48557,7 @@ var getHoverBackground = function getHoverBackground(currentPage, disabled, them
48557
48557
  }
48558
48558
 
48559
48559
  if (disabled) {
48560
- return "inital";
48560
+ return "initial";
48561
48561
  }
48562
48562
 
48563
48563
  return theme.colors.lightGrey;
@@ -48600,13 +48600,11 @@ var PageNumber = styled(PaginationButton).withConfig({
48600
48600
  };
48601
48601
  });
48602
48602
 
48603
- // @ts-nocheck
48604
-
48605
48603
  var PreviousButton = function PreviousButton(_ref) {
48606
48604
  var disabled = _ref.disabled,
48607
48605
  onClick = _ref.onClick,
48608
48606
  label = _ref.label,
48609
- ariaLabel = _ref["aria-label"];
48607
+ ariaLabel = _ref.ariaLabel;
48610
48608
 
48611
48609
  var _useTranslation = useTranslation(),
48612
48610
  t = _useTranslation.t;
@@ -48625,22 +48623,18 @@ PreviousButton.propTypes = {
48625
48623
  disabled: PropTypes.bool,
48626
48624
  onClick: PropTypes.func,
48627
48625
  label: PropTypes.node,
48628
- "aria-label": PropTypes.string
48626
+ ariaLabel: PropTypes.string
48629
48627
  };
48630
48628
  PreviousButton.defaultProps = {
48631
48629
  disabled: false,
48632
- onClick: null,
48633
- label: undefined,
48634
- "aria-label": undefined
48630
+ onClick: null
48635
48631
  };
48636
48632
 
48637
- // @ts-nocheck
48638
-
48639
48633
  var NextButton = function NextButton(_ref) {
48640
48634
  var disabled = _ref.disabled,
48641
48635
  onClick = _ref.onClick,
48642
48636
  label = _ref.label,
48643
- ariaLabel = _ref["aria-label"];
48637
+ ariaLabel = _ref.ariaLabel;
48644
48638
 
48645
48639
  var _useTranslation = useTranslation(),
48646
48640
  t = _useTranslation.t;
@@ -48659,91 +48653,112 @@ NextButton.propTypes = {
48659
48653
  disabled: PropTypes.bool,
48660
48654
  onClick: PropTypes.func,
48661
48655
  label: PropTypes.node,
48662
- "aria-label": PropTypes.string
48656
+ ariaLabel: PropTypes.string
48663
48657
  };
48664
48658
  NextButton.defaultProps = {
48665
48659
  disabled: false,
48666
- onClick: null,
48667
- label: undefined,
48668
- "aria-label": undefined
48660
+ onClick: null
48669
48661
  };
48670
48662
 
48671
- var SEPERATOR = "...";
48672
- var getPageItemstoDisplay = function getPageItemstoDisplay(totalPages, currentPage) {
48663
+ var SEPARATOR = "...";
48664
+ var getPageItemsToDisplay = function getPageItemsToDisplay(totalPages, currentPage) {
48665
+ var MAX_PAGES_TO_SHOW = 6;
48673
48666
  var pages = Array.from({
48674
48667
  length: totalPages
48675
- }, function (v, k) {
48676
- return k + 1;
48668
+ }, function (v, i) {
48669
+ return i + 1;
48677
48670
  });
48678
- var MAX_PAGES_TO_SHOW = 6;
48679
48671
  if (totalPages <= MAX_PAGES_TO_SHOW) return pages;
48680
48672
 
48681
48673
  if (currentPage <= MAX_PAGES_TO_SHOW - 1) {
48682
- return [].concat(pages.slice(0, 5), [SEPERATOR, totalPages]);
48674
+ return [].concat(pages.slice(0, 5), [SEPARATOR, totalPages]);
48683
48675
  }
48684
48676
 
48685
48677
  if (currentPage > totalPages - 5) {
48686
- return [1, SEPERATOR].concat(pages.slice(totalPages - 5));
48678
+ return [1, SEPARATOR].concat(pages.slice(totalPages - 5));
48687
48679
  }
48688
48680
 
48689
- return [1, SEPERATOR].concat(pages.slice(currentPage - 2, currentPage + 2), [SEPERATOR, totalPages]);
48681
+ return [1, SEPARATOR].concat(pages.slice(currentPage - 2, currentPage + 2), [SEPARATOR, totalPages]);
48690
48682
  };
48691
48683
 
48692
- var Pagination = function Pagination(props) {
48693
- var currentPage = props.currentPage,
48694
- totalPages = props.totalPages,
48695
- onNext = props.onNext,
48696
- onPrevious = props.onPrevious,
48697
- onSelectPage = props.onSelectPage,
48698
- nextAriaLabel = props.nextAriaLabel,
48699
- nextLabel = props.nextLabel,
48700
- previousAriaLabel = props.previousAriaLabel,
48701
- previousLabel = props.previousLabel,
48702
- ariaLabel = props["aria-label"],
48703
- restProps = __rest(props, ["currentPage", "totalPages", "onNext", "onPrevious", "onSelectPage", "nextAriaLabel", "nextLabel", "previousAriaLabel", "previousLabel", "aria-label"]);
48684
+ function Pagination(_a) {
48685
+ var currentPage = _a.currentPage,
48686
+ totalPages = _a.totalPages,
48687
+ onNext = _a.onNext,
48688
+ onPrevious = _a.onPrevious,
48689
+ onSelectPage = _a.onSelectPage,
48690
+ nextAriaLabel = _a.nextAriaLabel,
48691
+ nextLabel = _a.nextLabel,
48692
+ previousAriaLabel = _a.previousAriaLabel,
48693
+ previousLabel = _a.previousLabel,
48694
+ scrollToTopAfterPagination = _a.scrollToTopAfterPagination,
48695
+ scrollTargetRef = _a.scrollTargetRef,
48696
+ ariaLabel = _a["aria-label"],
48697
+ restProps = __rest(_a, ["currentPage", "totalPages", "onNext", "onPrevious", "onSelectPage", "nextAriaLabel", "nextLabel", "previousAriaLabel", "previousLabel", "scrollToTopAfterPagination", "scrollTargetRef", "aria-label"]);
48704
48698
 
48705
48699
  var _useTranslation = useTranslation(),
48706
48700
  t = _useTranslation.t;
48707
48701
 
48702
+ var scrollToTop = function scrollToTop() {
48703
+ var _a, _b;
48704
+
48705
+ if (scrollToTopAfterPagination) {
48706
+ var top = (scrollTargetRef === null || scrollTargetRef === void 0 ? void 0 : scrollTargetRef.current) ? window.scrollY + ((_b = (_a = scrollTargetRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.top) : 0;
48707
+ window.scrollTo({
48708
+ top: top,
48709
+ behavior: "smooth"
48710
+ });
48711
+ }
48712
+ };
48713
+
48708
48714
  return /*#__PURE__*/React__default.createElement(Flex, Object.assign({
48709
48715
  as: "nav",
48710
48716
  "aria-label": ariaLabel || t("pagination navigation")
48711
48717
  }, restProps), /*#__PURE__*/React__default.createElement(PreviousButton, {
48712
48718
  disabled: currentPage === 1,
48713
- onClick: onPrevious,
48719
+ onClick: function onClick() {
48720
+ flushSync(function () {
48721
+ onPrevious();
48722
+ });
48723
+ scrollToTop();
48724
+ },
48714
48725
  ariaLabel: previousAriaLabel,
48715
48726
  label: previousLabel
48716
- }), getPageItemstoDisplay(totalPages, currentPage).map(function (page, index) {
48727
+ }), getPageItemsToDisplay(totalPages, currentPage).map(function (page, index) {
48717
48728
  var isCurrentPage = currentPage === page;
48718
- if (page === SEPERATOR) return (
48719
- /*#__PURE__*/
48720
- // eslint-disable-next-line react/no-array-index-key
48721
- React__default.createElement(Text, {
48722
- key: "sep" + index,
48723
- py: "x1",
48724
- mr: "x2",
48725
- fontSize: "small",
48726
- lineHeight: "smallTextBase"
48727
- }, SEPERATOR)
48728
- );else return /*#__PURE__*/React__default.createElement(PageNumber, {
48729
+ if (page === SEPARATOR) return /*#__PURE__*/React__default.createElement(Text, {
48730
+ key: "sep" + index,
48731
+ py: "x1",
48732
+ mr: "x2",
48733
+ fontSize: "small",
48734
+ lineHeight: "smallTextBase"
48735
+ }, SEPARATOR);else return /*#__PURE__*/React__default.createElement(PageNumber, {
48729
48736
  "aria-current": isCurrentPage,
48730
48737
  currentPage: isCurrentPage,
48731
48738
  disabled: isCurrentPage,
48732
48739
  "aria-label": isCurrentPage ? null : t("go to page", {
48733
- count: page
48740
+ count: Number(page)
48734
48741
  }),
48735
48742
  key: page,
48736
48743
  onClick: function onClick() {
48737
- return onSelectPage(page);
48744
+ flushSync(function () {
48745
+ onSelectPage(page);
48746
+ });
48747
+ scrollToTop();
48738
48748
  }
48739
48749
  }, page);
48740
48750
  }), /*#__PURE__*/React__default.createElement(NextButton, {
48741
48751
  disabled: currentPage === totalPages,
48742
- onClick: onNext,
48752
+ onClick: function onClick() {
48753
+ flushSync(function () {
48754
+ onNext();
48755
+ });
48756
+ scrollToTop();
48757
+ },
48743
48758
  ariaLabel: nextAriaLabel,
48744
48759
  label: nextLabel
48745
48760
  }));
48746
- };
48761
+ }
48747
48762
 
48748
48763
  Pagination.propTypes = {
48749
48764
  currentPage: PropTypes.number.isRequired,
@@ -1,23 +1,22 @@
1
- import React from "react";
1
+ import React, { ReactNode } from "react";
2
2
  import PropTypes from "prop-types";
3
+ type NextButtonProps = {
4
+ disabled: boolean;
5
+ onClick: React.MouseEventHandler<HTMLButtonElement>;
6
+ label: ReactNode;
7
+ ariaLabel: string;
8
+ };
3
9
  declare const NextButton: {
4
- ({ disabled, onClick, label, "aria-label": ariaLabel }: {
5
- disabled: any;
6
- onClick: any;
7
- label: any;
8
- "aria-label": any;
9
- }): React.JSX.Element;
10
+ ({ disabled, onClick, label, ariaLabel }: NextButtonProps): React.JSX.Element;
10
11
  propTypes: {
11
12
  disabled: PropTypes.Requireable<boolean>;
12
13
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
13
14
  label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
- "aria-label": PropTypes.Requireable<string>;
15
+ ariaLabel: PropTypes.Requireable<string>;
15
16
  };
16
17
  defaultProps: {
17
18
  disabled: boolean;
18
19
  onClick: any;
19
- label: any;
20
- "aria-label": any;
21
20
  };
22
21
  };
23
22
  export default NextButton;
@@ -1,2 +1,5 @@
1
- declare const PageNumber: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
1
+ type PageNumberProps = {
2
+ currentPage: boolean;
3
+ };
4
+ declare const PageNumber: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, PageNumberProps, never>;
2
5
  export default PageNumber;
@@ -1,4 +1,43 @@
1
- import React from "react";
2
- export declare const getPageItemstoDisplay: (totalPages: any, currentPage: any) => any[];
3
- declare const Pagination: React.FC<any>;
1
+ import React, { ReactNode, RefObject } from "react";
2
+ import PropTypes from "prop-types";
3
+ import { FlexProps } from "../Flex/Flex";
4
+ export declare const getPageItemsToDisplay: (totalPages: number, currentPage: number) => (string | number)[];
5
+ type PaginationProps = FlexProps & {
6
+ currentPage: number;
7
+ totalPages: number;
8
+ onNext?: () => void;
9
+ onPrevious?: () => void;
10
+ onSelectPage?: (page: string | number) => void;
11
+ nextLabel?: ReactNode;
12
+ nextAriaLabel?: string;
13
+ previousLabel?: ReactNode;
14
+ previousAriaLabel?: string;
15
+ scrollToTopAfterPagination?: boolean;
16
+ scrollTargetRef?: RefObject<HTMLElement>;
17
+ };
18
+ declare function Pagination({ currentPage, totalPages, onNext, onPrevious, onSelectPage, nextAriaLabel, nextLabel, previousAriaLabel, previousLabel, scrollToTopAfterPagination, scrollTargetRef, "aria-label": ariaLabel, ...restProps }: PaginationProps): React.JSX.Element;
19
+ declare namespace Pagination {
20
+ var propTypes: {
21
+ currentPage: PropTypes.Validator<number>;
22
+ totalPages: PropTypes.Validator<number>;
23
+ onNext: PropTypes.Requireable<(...args: any[]) => any>;
24
+ onPrevious: PropTypes.Requireable<(...args: any[]) => any>;
25
+ onSelectPage: PropTypes.Requireable<(...args: any[]) => any>;
26
+ nextLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
27
+ nextAriaLabel: PropTypes.Requireable<string>;
28
+ previousLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
29
+ previousAriaLabel: PropTypes.Requireable<string>;
30
+ "aria-label": PropTypes.Requireable<string>;
31
+ };
32
+ var defaultProps: {
33
+ onNext: any;
34
+ onPrevious: any;
35
+ onSelectPage: any;
36
+ nextLabel: any;
37
+ nextAriaLabel: any;
38
+ previousLabel: any;
39
+ previousAriaLabel: any;
40
+ "aria-label": any;
41
+ };
42
+ }
4
43
  export default Pagination;
@@ -22,3 +22,4 @@ export declare const WithLessThan5Pages: {
22
22
  name: string;
23
23
  };
24
24
  };
25
+ export declare function ScrollAfterPagination(): React.JSX.Element;
@@ -1,18 +1,22 @@
1
- import React from "react";
1
+ import React, { ReactNode } from "react";
2
2
  import PropTypes from "prop-types";
3
+ type PreviousButtonProps = {
4
+ disabled: boolean;
5
+ onClick: React.MouseEventHandler<HTMLButtonElement>;
6
+ label: ReactNode;
7
+ ariaLabel: string;
8
+ };
3
9
  declare const PreviousButton: {
4
- ({ disabled, onClick, label, "aria-label": ariaLabel }: any): React.JSX.Element;
10
+ ({ disabled, onClick, label, ariaLabel }: PreviousButtonProps): React.JSX.Element;
5
11
  propTypes: {
6
12
  disabled: PropTypes.Requireable<boolean>;
7
13
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
8
14
  label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
- "aria-label": PropTypes.Requireable<string>;
15
+ ariaLabel: PropTypes.Requireable<string>;
10
16
  };
11
17
  defaultProps: {
12
18
  disabled: boolean;
13
19
  onClick: any;
14
- label: any;
15
- "aria-label": any;
16
20
  };
17
21
  };
18
22
  export default PreviousButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "8.17.1",
3
+ "version": "8.18.0",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {