@reykjavik/hanna-react 0.10.105 → 0.10.107

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/CHANGELOG.md CHANGED
@@ -4,7 +4,13 @@
4
4
 
5
5
  - ... <!-- Add new lines here. -->
6
6
 
7
- ## 0.10.105
7
+ ## 0.10.107
8
+
9
+ _2023-10-05_
10
+
11
+ - fix: Next and prev links in `Pagination` not working
12
+
13
+ ## 0.10.105 – 0.10.106
8
14
 
9
15
  _2023-10-04_
10
16
 
@@ -13,6 +19,7 @@ _2023-10-04_
13
19
  - feat: Warn about missing/redundant `siteName` prop
14
20
  - fix: Focus error on `SiteSearchAutocomplete` and `AutosuggestSearch`
15
21
  suggestion click
22
+ - fix: Make `GridBlocksProps.items` optional
16
23
 
17
24
  ## 0.10.104
18
25
 
package/GridBlocks.d.ts CHANGED
@@ -8,13 +8,9 @@ export type GridBlockItem = {
8
8
  summary: string | JSX.Element;
9
9
  icon?: Efnistakn;
10
10
  image?: ImageProps;
11
- } & ({
12
11
  href?: string;
13
- links: Array<ButtonProps>;
14
- } | {
15
- href: string;
16
12
  links?: Array<ButtonProps>;
17
- });
13
+ };
18
14
  export type GridBlocksProps = {
19
15
  blocks: Array<GridBlockItem>;
20
16
  twocol?: boolean;
package/Pagination.js CHANGED
@@ -76,7 +76,7 @@ exports.Pagination = (0, react_1.memo)((props) => {
76
76
  const btn = getBtnRenderer(props);
77
77
  return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, classUtils_1.modifiedClass)('Pagination', null, (wrapperProps || {}).className), "aria-label": props.title || texts.defaultTitle.replace(/\$\{pageCount\}/, `${pageCount}`) }),
78
78
  btn({
79
- page: current,
79
+ page: current + 1,
80
80
  modifier: 'next',
81
81
  label: texts.nextLabel,
82
82
  labelLong: texts.nextLabelLong,
@@ -84,7 +84,7 @@ exports.Pagination = (0, react_1.memo)((props) => {
84
84
  }),
85
85
  ' ',
86
86
  btn({
87
- page: current,
87
+ page: current - 1,
88
88
  modifier: 'prev',
89
89
  label: texts.prevLabel,
90
90
  labelLong: texts.pageLabelLong,
@@ -8,13 +8,9 @@ export type GridBlockItem = {
8
8
  summary: string | JSX.Element;
9
9
  icon?: Efnistakn;
10
10
  image?: ImageProps;
11
- } & ({
12
11
  href?: string;
13
- links: Array<ButtonProps>;
14
- } | {
15
- href: string;
16
12
  links?: Array<ButtonProps>;
17
- });
13
+ };
18
14
  export type GridBlocksProps = {
19
15
  blocks: Array<GridBlockItem>;
20
16
  twocol?: boolean;
package/esm/Pagination.js CHANGED
@@ -72,7 +72,7 @@ export const Pagination = memo((props) => {
72
72
  const btn = getBtnRenderer(props);
73
73
  return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('Pagination', null, (wrapperProps || {}).className), "aria-label": props.title || texts.defaultTitle.replace(/\$\{pageCount\}/, `${pageCount}`) }),
74
74
  btn({
75
- page: current,
75
+ page: current + 1,
76
76
  modifier: 'next',
77
77
  label: texts.nextLabel,
78
78
  labelLong: texts.nextLabelLong,
@@ -80,7 +80,7 @@ export const Pagination = memo((props) => {
80
80
  }),
81
81
  ' ',
82
82
  btn({
83
- page: current,
83
+ page: current - 1,
84
84
  modifier: 'prev',
85
85
  label: texts.prevLabel,
86
86
  labelLong: texts.pageLabelLong,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reykjavik/hanna-react",
3
- "version": "0.10.105",
3
+ "version": "0.10.107",
4
4
  "author": "Reykjavík (http://www.reykjavik.is)",
5
5
  "contributors": [
6
6
  "Hugsmiðjan ehf (http://www.hugsmidjan.is)",