@allxsmith/bestax-bulma 5.17.0 → 5.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.
@@ -24,12 +24,45 @@ export interface PaginationProps extends React.HTMLAttributes<HTMLElement>, Omit
24
24
  align?: 'centered' | 'right';
25
25
  /** Renders pagination with rounded corners. */
26
26
  rounded?: boolean;
27
- /** Total number of pages (for custom implementations). */
27
+ /**
28
+ * The number of pages. Given `total` and no children, `Pagination` renders
29
+ * the whole control itself: Previous, Next and a link for each page it
30
+ * shows, with an ellipsis where it skips some. Given children, it renders
31
+ * those as they are, and `total` and the other page props do nothing.
32
+ */
28
33
  total?: number;
29
- /** Current page (for controlled implementations). */
34
+ /**
35
+ * The page shown as current, counting from 1, when rendering from `total`.
36
+ * Leave it out and `Pagination` keeps the page itself, starting at 1.
37
+ */
30
38
  current?: number;
31
- /** Callback when a page is selected. */
39
+ /**
40
+ * Called with the page chosen, when rendering from `total`. Choosing the
41
+ * page already current doesn't call it.
42
+ */
32
43
  onPageChange?: (page: number) => void;
44
+ /** How many pages to show on each side of the current one, when rendering from `total`. */
45
+ siblingCount?: number;
46
+ /** How many pages to always show at the start and at the end, when rendering from `total`. */
47
+ boundaryCount?: number;
48
+ /** The Previous link's content, when rendering from `total`. */
49
+ previousLabel?: React.ReactNode;
50
+ /** The Next link's content, when rendering from `total`. */
51
+ nextLabel?: React.ReactNode;
52
+ /** Disables every link, when rendering from `total`. */
53
+ disabled?: boolean;
54
+ /**
55
+ * The `href` for a page's link, when rendering from `total`, making each
56
+ * one a real link (`page => '?page=' + page`). A click then calls
57
+ * `onPageChange` and the browser follows the link too. Without it the
58
+ * links have no `href`, act as buttons, and Enter or Space chooses a page.
59
+ */
60
+ getPageHref?: (page: number) => string;
61
+ /**
62
+ * The accessible name of a page's link, when rendering from `total`, since
63
+ * its content is only the number (`page => 'Page ' + page` by default).
64
+ */
65
+ getPageLabel?: (page: number) => string;
33
66
  /** Additional CSS classes. */
34
67
  className?: string;
35
68
  /** Custom pagination content (usually subcomponents). */
@@ -24,12 +24,45 @@ export interface PaginationProps extends React.HTMLAttributes<HTMLElement>, Omit
24
24
  align?: 'centered' | 'right';
25
25
  /** Renders pagination with rounded corners. */
26
26
  rounded?: boolean;
27
- /** Total number of pages (for custom implementations). */
27
+ /**
28
+ * The number of pages. Given `total` and no children, `Pagination` renders
29
+ * the whole control itself: Previous, Next and a link for each page it
30
+ * shows, with an ellipsis where it skips some. Given children, it renders
31
+ * those as they are, and `total` and the other page props do nothing.
32
+ */
28
33
  total?: number;
29
- /** Current page (for controlled implementations). */
34
+ /**
35
+ * The page shown as current, counting from 1, when rendering from `total`.
36
+ * Leave it out and `Pagination` keeps the page itself, starting at 1.
37
+ */
30
38
  current?: number;
31
- /** Callback when a page is selected. */
39
+ /**
40
+ * Called with the page chosen, when rendering from `total`. Choosing the
41
+ * page already current doesn't call it.
42
+ */
32
43
  onPageChange?: (page: number) => void;
44
+ /** How many pages to show on each side of the current one, when rendering from `total`. */
45
+ siblingCount?: number;
46
+ /** How many pages to always show at the start and at the end, when rendering from `total`. */
47
+ boundaryCount?: number;
48
+ /** The Previous link's content, when rendering from `total`. */
49
+ previousLabel?: React.ReactNode;
50
+ /** The Next link's content, when rendering from `total`. */
51
+ nextLabel?: React.ReactNode;
52
+ /** Disables every link, when rendering from `total`. */
53
+ disabled?: boolean;
54
+ /**
55
+ * The `href` for a page's link, when rendering from `total`, making each
56
+ * one a real link (`page => '?page=' + page`). A click then calls
57
+ * `onPageChange` and the browser follows the link too. Without it the
58
+ * links have no `href`, act as buttons, and Enter or Space chooses a page.
59
+ */
60
+ getPageHref?: (page: number) => string;
61
+ /**
62
+ * The accessible name of a page's link, when rendering from `total`, since
63
+ * its content is only the number (`page => 'Page ' + page` by default).
64
+ */
65
+ getPageLabel?: (page: number) => string;
33
66
  /** Additional CSS classes. */
34
67
  className?: string;
35
68
  /** Custom pagination content (usually subcomponents). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allxsmith/bestax-bulma",
3
- "version": "5.17.0",
3
+ "version": "5.18.0",
4
4
  "description": "A fully-typed React component library for the Bulma CSS framework. Build modern UIs quickly with reusable, accessible, and customizable Bulma-based React components.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.esm.js",