govuk_publishing_components 29.13.0 → 29.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/action-link-arrow--white.png +0 -0
  3. data/app/assets/images/govuk_publishing_components/action-link-arrow--white.svg +1 -0
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/gtm-page-views.js +5 -3
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/pii-remover.js +135 -0
  6. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +2 -0
  7. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +10 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +7 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -92
  10. data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -0
  11. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +33 -36
  12. data/app/views/govuk_publishing_components/components/docs/accordion.yml +2 -1
  13. data/app/views/govuk_publishing_components/components/docs/action_link.yml +8 -0
  14. data/app/views/govuk_publishing_components/components/docs/previous_and_next_navigation.yml +1 -1
  15. data/config/locales/ar.yml +2 -0
  16. data/config/locales/az.yml +2 -0
  17. data/config/locales/be.yml +2 -0
  18. data/config/locales/bg.yml +2 -0
  19. data/config/locales/bn.yml +2 -0
  20. data/config/locales/cs.yml +2 -0
  21. data/config/locales/cy.yml +2 -0
  22. data/config/locales/da.yml +2 -0
  23. data/config/locales/de.yml +2 -0
  24. data/config/locales/dr.yml +2 -0
  25. data/config/locales/el.yml +2 -0
  26. data/config/locales/en.yml +2 -0
  27. data/config/locales/es-419.yml +2 -0
  28. data/config/locales/es.yml +2 -0
  29. data/config/locales/et.yml +2 -0
  30. data/config/locales/fa.yml +2 -0
  31. data/config/locales/fi.yml +2 -0
  32. data/config/locales/fr.yml +2 -0
  33. data/config/locales/gd.yml +2 -0
  34. data/config/locales/gu.yml +2 -0
  35. data/config/locales/he.yml +2 -0
  36. data/config/locales/hi.yml +2 -0
  37. data/config/locales/hr.yml +2 -0
  38. data/config/locales/hu.yml +2 -0
  39. data/config/locales/hy.yml +2 -0
  40. data/config/locales/id.yml +2 -0
  41. data/config/locales/is.yml +2 -0
  42. data/config/locales/it.yml +2 -0
  43. data/config/locales/ja.yml +2 -0
  44. data/config/locales/ka.yml +2 -0
  45. data/config/locales/kk.yml +2 -0
  46. data/config/locales/ko.yml +2 -0
  47. data/config/locales/lt.yml +2 -0
  48. data/config/locales/lv.yml +2 -0
  49. data/config/locales/ms.yml +2 -0
  50. data/config/locales/mt.yml +2 -0
  51. data/config/locales/nl.yml +2 -0
  52. data/config/locales/no.yml +2 -0
  53. data/config/locales/pa-pk.yml +2 -0
  54. data/config/locales/pa.yml +2 -0
  55. data/config/locales/pl.yml +2 -0
  56. data/config/locales/ps.yml +2 -0
  57. data/config/locales/pt.yml +2 -0
  58. data/config/locales/ro.yml +2 -0
  59. data/config/locales/ru.yml +2 -0
  60. data/config/locales/si.yml +2 -0
  61. data/config/locales/sk.yml +2 -0
  62. data/config/locales/sl.yml +2 -0
  63. data/config/locales/so.yml +2 -0
  64. data/config/locales/sq.yml +2 -0
  65. data/config/locales/sr.yml +2 -0
  66. data/config/locales/sv.yml +2 -0
  67. data/config/locales/sw.yml +2 -0
  68. data/config/locales/ta.yml +2 -0
  69. data/config/locales/th.yml +2 -0
  70. data/config/locales/tk.yml +2 -0
  71. data/config/locales/tr.yml +2 -0
  72. data/config/locales/uk.yml +2 -0
  73. data/config/locales/ur.yml +2 -0
  74. data/config/locales/uz.yml +2 -0
  75. data/config/locales/vi.yml +2 -0
  76. data/config/locales/zh-hk.yml +2 -0
  77. data/config/locales/zh-tw.yml +2 -0
  78. data/config/locales/zh.yml +2 -0
  79. data/lib/govuk_publishing_components/version.rb +1 -1
  80. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  81. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +1 -0
  82. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +2 -1
  83. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +102 -44
  84. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +7 -1
  85. data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +3 -2
  86. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +10 -10
  87. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +92 -1
  88. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +2 -1
  89. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +3 -0
  90. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +14 -6
  91. data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -3
  92. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +2 -1
  93. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  94. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +76 -1
  95. data/node_modules/govuk-frontend/govuk/components/pagination/README.md +15 -0
  96. data/node_modules/govuk-frontend/govuk/components/pagination/_index.scss +244 -0
  97. data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  98. data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +300 -0
  99. data/node_modules/govuk-frontend/govuk/components/pagination/macro-options.json +128 -0
  100. data/node_modules/govuk-frontend/govuk/components/pagination/macro.njk +3 -0
  101. data/node_modules/govuk-frontend/govuk/components/pagination/template.njk +62 -0
  102. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +147 -43
  103. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +7 -1
  104. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +3 -2
  105. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +56 -2
  106. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +7 -1
  107. data/node_modules/govuk-frontend/govuk/components/select/template.njk +1 -1
  108. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +2 -1
  109. data/node_modules/govuk-frontend/govuk-esm/all.mjs +12 -12
  110. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +3 -3
  111. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +2 -2
  112. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +3 -3
  113. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +4 -4
  114. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +3 -3
  115. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +3 -3
  116. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +3 -3
  117. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +1 -1
  118. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +4 -4
  119. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +3 -3
  120. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +6 -6
  121. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{DOMTokenList.js → DOMTokenList.mjs} +0 -0
  122. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Document.js → Document.mjs} +0 -0
  123. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{classList.js → classList.mjs} +4 -4
  124. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{closest.js → closest.mjs} +1 -1
  125. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{matches.js → matches.mjs} +0 -0
  126. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{nextElementSibling.js → nextElementSibling.mjs} +2 -2
  127. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{previousElementSibling.js → previousElementSibling.mjs} +2 -2
  128. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Element.js → Element.mjs} +1 -1
  129. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Event.js → Event.mjs} +3 -3
  130. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/{bind.js → bind.mjs} +1 -1
  131. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/{defineProperty.js → defineProperty.mjs} +0 -0
  132. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Window.js → Window.mjs} +0 -0
  133. data/node_modules/govuk-frontend/package.json +8 -2
  134. metadata +24 -14
@@ -0,0 +1,300 @@
1
+ {
2
+ "component": "pagination",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "previous": {
8
+ "href": "/previous"
9
+ },
10
+ "next": {
11
+ "href": "/next"
12
+ },
13
+ "items": [
14
+ {
15
+ "number": 1,
16
+ "href": "/page/1"
17
+ },
18
+ {
19
+ "number": 2,
20
+ "current": true
21
+ },
22
+ {
23
+ "number": 3,
24
+ "href": "/page/3"
25
+ }
26
+ ]
27
+ },
28
+ "html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous</span></a>\n </div>\n <ul class=\"govuk-pagination__list\"><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li></ul><div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">Next</span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg></a>\n </div></nav>",
29
+ "hidden": false
30
+ },
31
+ {
32
+ "name": "with custom navigation landmark",
33
+ "options": {
34
+ "previous": {
35
+ "href": "/previous"
36
+ },
37
+ "next": {
38
+ "href": "/next"
39
+ },
40
+ "landmarkLabel": "search",
41
+ "items": [
42
+ {
43
+ "number": 1,
44
+ "href": "/page/1"
45
+ },
46
+ {
47
+ "number": 2,
48
+ "current": true
49
+ },
50
+ {
51
+ "number": 3,
52
+ "href": "/page/3"
53
+ }
54
+ ]
55
+ },
56
+ "html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"search\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous</span></a>\n </div>\n <ul class=\"govuk-pagination__list\"><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li></ul><div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">Next</span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg></a>\n </div></nav>",
57
+ "hidden": false
58
+ },
59
+ {
60
+ "name": "with custom link and item text",
61
+ "options": {
62
+ "previous": {
63
+ "href": "/previous",
64
+ "text": "Previous page"
65
+ },
66
+ "next": {
67
+ "href": "/next",
68
+ "text": "Next page"
69
+ },
70
+ "items": [
71
+ {
72
+ "number": "one",
73
+ "href": "/page/1"
74
+ },
75
+ {
76
+ "number": "two",
77
+ "current": true
78
+ },
79
+ {
80
+ "number": "three",
81
+ "href": "/page/3"
82
+ }
83
+ ]
84
+ },
85
+ "html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous page</span></a>\n </div>\n <ul class=\"govuk-pagination__list\"><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page one\">\n one\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"\" aria-label=\"Page two\" aria-current=\"page\">\n two\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page three\">\n three\n </a>\n </li></ul><div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">Next page</span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg></a>\n </div></nav>",
86
+ "hidden": false
87
+ },
88
+ {
89
+ "name": "with custom accessible labels on item links",
90
+ "options": {
91
+ "previous": {
92
+ "href": "/previous"
93
+ },
94
+ "next": {
95
+ "href": "/next"
96
+ },
97
+ "items": [
98
+ {
99
+ "number": 1,
100
+ "href": "/page/1",
101
+ "visuallyHiddenText": "1st page"
102
+ },
103
+ {
104
+ "number": 2,
105
+ "current": true,
106
+ "visuallyHiddenText": "2nd page (you are currently on this page)"
107
+ },
108
+ {
109
+ "number": 3,
110
+ "href": "/page/3",
111
+ "visuallyHiddenText": "3rd page"
112
+ }
113
+ ]
114
+ },
115
+ "html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous</span></a>\n </div>\n <ul class=\"govuk-pagination__list\"><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"1st page\">\n 1\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"\" aria-label=\"2nd page (you are currently on this page)\" aria-current=\"page\">\n 2\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"3rd page\">\n 3\n </a>\n </li></ul><div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">Next</span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg></a>\n </div></nav>",
116
+ "hidden": false
117
+ },
118
+ {
119
+ "name": "with many pages",
120
+ "options": {
121
+ "previous": {
122
+ "href": "/previous"
123
+ },
124
+ "next": {
125
+ "href": "/next"
126
+ },
127
+ "items": [
128
+ {
129
+ "number": 1,
130
+ "href": "/page/1"
131
+ },
132
+ {
133
+ "ellipsis": true
134
+ },
135
+ {
136
+ "number": 8,
137
+ "href": "/page/8"
138
+ },
139
+ {
140
+ "number": 9,
141
+ "href": "/page/9"
142
+ },
143
+ {
144
+ "number": 10,
145
+ "current": true
146
+ },
147
+ {
148
+ "number": 11,
149
+ "href": "/page/11"
150
+ },
151
+ {
152
+ "number": 12,
153
+ "href": "/page/12"
154
+ },
155
+ {
156
+ "ellipsis": true
157
+ },
158
+ {
159
+ "number": 40,
160
+ "href": "/page/40"
161
+ }
162
+ ]
163
+ },
164
+ "html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous</span></a>\n </div>\n <ul class=\"govuk-pagination__list\"><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--ellipses\">&ctdot;</li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/8\" aria-label=\"Page 8\">\n 8\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/9\" aria-label=\"Page 9\">\n 9\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"\" aria-label=\"Page 10\" aria-current=\"page\">\n 10\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/11\" aria-label=\"Page 11\">\n 11\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/12\" aria-label=\"Page 12\">\n 12\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--ellipses\">&ctdot;</li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/40\" aria-label=\"Page 40\">\n 40\n </a>\n </li></ul><div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">Next</span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg></a>\n </div></nav>",
165
+ "hidden": false
166
+ },
167
+ {
168
+ "name": "first page",
169
+ "options": {
170
+ "next": {
171
+ "href": "/next"
172
+ },
173
+ "items": [
174
+ {
175
+ "number": 1,
176
+ "current": true
177
+ },
178
+ {
179
+ "number": 2,
180
+ "href": "/page/2"
181
+ },
182
+ {
183
+ "number": 3,
184
+ "href": "/page/3"
185
+ }
186
+ ]
187
+ },
188
+ "html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\"><ul class=\"govuk-pagination__list\"><li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"\" aria-label=\"Page 1\" aria-current=\"page\">\n 1\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\">\n 2\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li></ul><div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">Next</span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg></a>\n </div></nav>",
189
+ "hidden": false
190
+ },
191
+ {
192
+ "name": "last page",
193
+ "options": {
194
+ "previous": {
195
+ "href": "/previous"
196
+ },
197
+ "items": [
198
+ {
199
+ "number": 1,
200
+ "href": "/page/1"
201
+ },
202
+ {
203
+ "number": 2,
204
+ "href": "/page/2"
205
+ },
206
+ {
207
+ "number": 3,
208
+ "current": true
209
+ }
210
+ ]
211
+ },
212
+ "html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous</span></a>\n </div>\n <ul class=\"govuk-pagination__list\"><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li><li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\">\n 2\n </a>\n </li><li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"\" aria-label=\"Page 3\" aria-current=\"page\">\n 3\n </a>\n </li></ul></nav>",
213
+ "hidden": false
214
+ },
215
+ {
216
+ "name": "with prev and next only",
217
+ "options": {
218
+ "previous": {
219
+ "href": "/previous"
220
+ },
221
+ "next": {
222
+ "href": "/next"
223
+ }
224
+ },
225
+ "html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">Previous</span></a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">Next</span></a>\n </div></nav>",
226
+ "hidden": false
227
+ },
228
+ {
229
+ "name": "with prev and next only and labels",
230
+ "options": {
231
+ "previous": {
232
+ "text": "Previous page",
233
+ "labelText": "1 of 3",
234
+ "href": "/previous"
235
+ },
236
+ "next": {
237
+ "text": "Next page",
238
+ "labelText": "3 of 3",
239
+ "href": "/next"
240
+ }
241
+ },
242
+ "html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous page</span><span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">1 of 3</span></a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Next page</span><span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">3 of 3</span></a>\n </div></nav>",
243
+ "hidden": false
244
+ },
245
+ {
246
+ "name": "with prev and next only and very long labels",
247
+ "options": {
248
+ "previous": {
249
+ "text": "Previous page",
250
+ "labelText": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
251
+ "href": "/previous"
252
+ },
253
+ "next": {
254
+ "text": "Next page",
255
+ "labelText": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
256
+ "href": "/next"
257
+ }
258
+ },
259
+ "html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous page</span><span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span></a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Next page</span><span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span></a>\n </div></nav>",
260
+ "hidden": false
261
+ },
262
+ {
263
+ "name": "with prev and next only in a different language",
264
+ "options": {
265
+ "previous": {
266
+ "text": "précédente",
267
+ "href": "/previous",
268
+ "visuallyHiddenText": "Page précédente"
269
+ },
270
+ "next": {
271
+ "text": "suivante",
272
+ "href": "/next",
273
+ "visuallyHiddenText": "Page suivante"
274
+ }
275
+ },
276
+ "html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">précédente</span></a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">suivante</span></a>\n </div></nav>",
277
+ "hidden": false
278
+ },
279
+ {
280
+ "name": "with previous only",
281
+ "options": {
282
+ "previous": {
283
+ "href": "/previous"
284
+ }
285
+ },
286
+ "html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">Previous</span></a>\n </div>\n </nav>",
287
+ "hidden": false
288
+ },
289
+ {
290
+ "name": "with next only",
291
+ "options": {
292
+ "next": {
293
+ "href": "/next"
294
+ }
295
+ },
296
+ "html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"results\"><div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">Next</span></a>\n </div></nav>",
297
+ "hidden": false
298
+ }
299
+ ]
300
+ }
@@ -0,0 +1,128 @@
1
+ [
2
+ {
3
+ "name": "items",
4
+ "type": "array",
5
+ "required": false,
6
+ "description": "The array of link objects.",
7
+ "params": [
8
+ {
9
+ "name": "number",
10
+ "type": "string",
11
+ "required": false,
12
+ "description": "The pagination item text - usually a page number."
13
+ },
14
+ {
15
+ "name": "visuallyHiddenText",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "The visually hidden label (for the pagination item) which will be applied to an `aria-label` and announced by screen readers on the pagination item link. Should include page number."
19
+ },
20
+ {
21
+ "name": "href",
22
+ "type": "string",
23
+ "required": true,
24
+ "description": "The link's URL."
25
+ },
26
+ {
27
+ "name": "current",
28
+ "type": "boolean",
29
+ "required": false,
30
+ "description": "Set to `true` to indicate the current page the user is on."
31
+ },
32
+ {
33
+ "name": "ellipsis",
34
+ "type": "boolean",
35
+ "required": false,
36
+ "description": "Use this option if you want to specify an ellipsis at a given point between numbers. If you set this option as `true`, any other options for the item are ignored."
37
+ },
38
+ {
39
+ "name": "attributes",
40
+ "type": "object",
41
+ "required": false,
42
+ "description": "The HTML attributes (for example, data attributes) you want to add to the anchor."
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "name": "previous",
48
+ "type": "object",
49
+ "required": false,
50
+ "description": "A link to the previous page, if there is a previous page.",
51
+ "params": [
52
+ {
53
+ "name": "text",
54
+ "type": "string",
55
+ "required": false,
56
+ "description": "The link text to the previous page. Defaults to 'Previous page', where 'page' is visually hidden."
57
+ },
58
+ {
59
+ "name": "labelText",
60
+ "type": "string",
61
+ "required": false,
62
+ "description": "The optional label that goes underneath the link to the previous page, providing further context for the user about where the link goes."
63
+ },
64
+ {
65
+ "name": "href",
66
+ "type": "string",
67
+ "required": true,
68
+ "description": "The previous page's URL."
69
+ },
70
+ {
71
+ "name": "attributes",
72
+ "type": "object",
73
+ "required": false,
74
+ "description": "The HTML attributes (for example, data attributes) you want to add to the anchor."
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "name": "next",
80
+ "type": "object",
81
+ "required": false,
82
+ "description": "A link to the next page, if there is a next page.",
83
+ "params": [
84
+ {
85
+ "name": "text",
86
+ "type": "string",
87
+ "required": false,
88
+ "description": "The link text to the next page. Defaults to 'Next page', where 'page' is visually hidden."
89
+ },
90
+ {
91
+ "name": "labelText",
92
+ "type": "string",
93
+ "required": false,
94
+ "description": "The optional label that goes underneath the link to the next page, providing further context for the user about where the link goes."
95
+ },
96
+ {
97
+ "name": "href",
98
+ "type": "string",
99
+ "required": true,
100
+ "description": "The next page's URL."
101
+ },
102
+ {
103
+ "name": "attributes",
104
+ "type": "object",
105
+ "required": false,
106
+ "description": "The HTML attributes (for example, data attributes) you want to add to the anchor."
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "name": "landmarkLabel",
112
+ "type": "string",
113
+ "required": false,
114
+ "description": "The label for the navigation landmark that wraps the pagination. Defaults to 'results'."
115
+ },
116
+ {
117
+ "name": "classes",
118
+ "type": "string",
119
+ "required": false,
120
+ "description": "The classes you want to add to the pagination `nav` parent."
121
+ },
122
+ {
123
+ "name": "attributes",
124
+ "type": "object",
125
+ "required": false,
126
+ "description": "The HTML attributes (for example, data attributes) you want to add to the pagination `nav` parent."
127
+ }
128
+ ]
@@ -0,0 +1,3 @@
1
+ {% macro govukPagination(params) %}
2
+ {%- include "./template.njk" -%}
3
+ {% endmacro %}
@@ -0,0 +1,62 @@
1
+ {% set blockLevel = not params.items and (params.next or params.previous) %}
2
+
3
+ <nav class="govuk-pagination {{- ' ' + params.classes if params.classes }} {{- ' govuk-pagination--block' if blockLevel }}" role="navigation" aria-label="{{ params.landmarkLabel | default("results") }} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}" {%- endfor -%}">
4
+ {%- if params.previous and params.previous.href -%}
5
+ <div class="govuk-pagination__prev">
6
+ <a class="govuk-link govuk-pagination__link" href="{{ params.previous.href }}" rel="prev" {%- for attribute, value in params.previous.attributes %} {{ attribute }}="{{ value }}" {%- endfor -%}>
7
+ <svg class="govuk-pagination__icon govuk-pagination__icon--prev" xmlns="http://www.w3.org/2000/svg" height="13" width="15" aria-hidden="true" focusable="false" viewBox="0 0 15 13">
8
+ <path d="m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z"></path>
9
+ </svg>
10
+ <span class="govuk-pagination__link-title {{- ' govuk-pagination__link-title--decorated' if blockLevel and not params.previous.labelText }}">
11
+ {{- params.previous.text | default("Previous") -}}
12
+ </span>
13
+ {%- if params.previous.labelText and blockLevel -%}
14
+ <span class="govuk-visually-hidden">:</span>
15
+ <span class="govuk-pagination__link-label">{{ params.previous.labelText }}</span>
16
+ {%- endif -%}
17
+ </a>
18
+ </div>
19
+ {% endif %}
20
+
21
+ {%- if params.items -%}
22
+ <ul class="govuk-pagination__list">
23
+ {%- for item in params.items -%}
24
+ {%- if item.ellipsis -%}
25
+ <li class="govuk-pagination__item govuk-pagination__item--ellipses">&ctdot;</li>
26
+ {%- elseif item.number -%}
27
+ <li class="govuk-pagination__item {{- ' govuk-pagination__item--current' if item.current }}">
28
+ <a class="govuk-link govuk-pagination__link" href="{{ item.href }}" aria-label="{{ item.visuallyHiddenText | default("Page " + item.number) }}" {%- if item.current %} aria-current="page" {%- endif -%} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}" {%- endfor -%}>
29
+ {{ item.number }}
30
+ </a>
31
+ </li>
32
+ {%- endif -%}
33
+ {%- endfor -%}
34
+ </ul>
35
+ {%- endif -%}
36
+
37
+ {%- if params.next and params.next.href -%}
38
+ {%- set nextArrow -%}
39
+ <svg class="govuk-pagination__icon govuk-pagination__icon--next" xmlns="http://www.w3.org/2000/svg" height="13" width="15" aria-hidden="true" focusable="false" viewBox="0 0 15 13">
40
+ <path d="m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z"></path>
41
+ </svg>
42
+ {%- endset -%}
43
+
44
+ <div class="govuk-pagination__next">
45
+ <a class="govuk-link govuk-pagination__link" href="{{ params.next.href }}" rel="next" {%- for attribute, value in params.next.attributes %} {{ attribute }}="{{ value }}" {%- endfor -%}>
46
+ {%- if blockLevel -%}
47
+ {{- nextArrow | safe -}}
48
+ {%- endif %}
49
+ <span class="govuk-pagination__link-title {{- ' govuk-pagination__link-title--decorated' if blockLevel and not params.next.labelText }}">
50
+ {{- params.next.text | default("Next") -}}
51
+ </span>
52
+ {%- if params.next.labelText and blockLevel -%}
53
+ <span class="govuk-visually-hidden">:</span>
54
+ <span class="govuk-pagination__link-label">{{ params.next.labelText }}</span>
55
+ {%- endif -%}
56
+ {%- if not blockLevel -%}
57
+ {{- nextArrow | safe -}}
58
+ {%- endif -%}
59
+ </a>
60
+ </div>
61
+ {%- endif -%}
62
+ </nav>