govuk_publishing_components 29.12.1 → 29.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/govuk_publishing_components/action-link-arrow--white.png +0 -0
- data/app/assets/images/govuk_publishing_components/action-link-arrow--white.svg +1 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/gtm-page-views.js +5 -3
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/pii-remover.js +135 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +2 -0
- data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +10 -0
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +19 -0
- data/app/assets/javascripts/govuk_publishing_components/components/table.js +52 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +7 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -92
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +33 -36
- data/app/views/govuk_publishing_components/components/_table.html.erb +60 -30
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +2 -1
- data/app/views/govuk_publishing_components/components/docs/action_link.yml +8 -0
- data/app/views/govuk_publishing_components/components/docs/previous_and_next_navigation.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/table.yml +30 -0
- data/config/locales/ar.yml +6 -0
- data/config/locales/az.yml +6 -0
- data/config/locales/be.yml +6 -0
- data/config/locales/bg.yml +6 -0
- data/config/locales/bn.yml +6 -0
- data/config/locales/cs.yml +6 -0
- data/config/locales/cy.yml +6 -0
- data/config/locales/da.yml +6 -0
- data/config/locales/de.yml +6 -0
- data/config/locales/dr.yml +6 -0
- data/config/locales/el.yml +6 -0
- data/config/locales/en.yml +8 -2
- data/config/locales/es-419.yml +6 -0
- data/config/locales/es.yml +6 -0
- data/config/locales/et.yml +6 -0
- data/config/locales/fa.yml +6 -0
- data/config/locales/fi.yml +6 -0
- data/config/locales/fr.yml +6 -0
- data/config/locales/gd.yml +6 -0
- data/config/locales/gu.yml +6 -0
- data/config/locales/he.yml +6 -0
- data/config/locales/hi.yml +6 -0
- data/config/locales/hr.yml +6 -0
- data/config/locales/hu.yml +6 -0
- data/config/locales/hy.yml +6 -0
- data/config/locales/id.yml +6 -0
- data/config/locales/is.yml +6 -0
- data/config/locales/it.yml +6 -0
- data/config/locales/ja.yml +6 -0
- data/config/locales/ka.yml +6 -0
- data/config/locales/kk.yml +6 -0
- data/config/locales/ko.yml +6 -0
- data/config/locales/lt.yml +6 -0
- data/config/locales/lv.yml +6 -0
- data/config/locales/ms.yml +6 -0
- data/config/locales/mt.yml +6 -0
- data/config/locales/nl.yml +6 -0
- data/config/locales/no.yml +6 -0
- data/config/locales/pa-pk.yml +6 -0
- data/config/locales/pa.yml +6 -0
- data/config/locales/pl.yml +6 -0
- data/config/locales/ps.yml +6 -0
- data/config/locales/pt.yml +6 -0
- data/config/locales/ro.yml +6 -0
- data/config/locales/ru.yml +6 -0
- data/config/locales/si.yml +6 -0
- data/config/locales/sk.yml +6 -0
- data/config/locales/sl.yml +6 -0
- data/config/locales/so.yml +6 -0
- data/config/locales/sq.yml +6 -0
- data/config/locales/sr.yml +6 -0
- data/config/locales/sv.yml +6 -0
- data/config/locales/sw.yml +6 -0
- data/config/locales/ta.yml +6 -0
- data/config/locales/th.yml +6 -0
- data/config/locales/tk.yml +6 -0
- data/config/locales/tr.yml +6 -0
- data/config/locales/uk.yml +6 -0
- data/config/locales/ur.yml +6 -0
- data/config/locales/uz.yml +6 -0
- data/config/locales/vi.yml +6 -0
- data/config/locales/zh-hk.yml +6 -0
- data/config/locales/zh-tw.yml +6 -0
- data/config/locales/zh.yml +6 -0
- data/lib/govuk_publishing_components/app_helpers/table_helper.rb +3 -3
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +1 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +2 -1
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +102 -44
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +7 -1
- data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +3 -2
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +10 -10
- data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +92 -1
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +2 -1
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +3 -0
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +14 -6
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -3
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +2 -1
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +76 -1
- data/node_modules/govuk-frontend/govuk/components/pagination/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/_index.scss +244 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +300 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/macro-options.json +128 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/pagination/template.njk +62 -0
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +147 -43
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +7 -1
- data/node_modules/govuk-frontend/govuk/components/radios/template.njk +3 -2
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +56 -2
- data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +7 -1
- data/node_modules/govuk-frontend/govuk/components/select/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +2 -1
- data/node_modules/govuk-frontend/govuk-esm/all.mjs +12 -12
- data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +3 -3
- data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +2 -2
- data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +3 -3
- data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +4 -4
- data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +3 -3
- data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +3 -3
- data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +3 -3
- data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +1 -1
- data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +4 -4
- data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +3 -3
- data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +6 -6
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{DOMTokenList.js → DOMTokenList.mjs} +0 -0
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Document.js → Document.mjs} +0 -0
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{classList.js → classList.mjs} +4 -4
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{closest.js → closest.mjs} +1 -1
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{matches.js → matches.mjs} +0 -0
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{nextElementSibling.js → nextElementSibling.mjs} +2 -2
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/{previousElementSibling.js → previousElementSibling.mjs} +2 -2
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Element.js → Element.mjs} +1 -1
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Event.js → Event.mjs} +3 -3
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/{bind.js → bind.mjs} +1 -1
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/{defineProperty.js → defineProperty.mjs} +0 -0
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/{Window.js → Window.mjs} +0 -0
- data/node_modules/govuk-frontend/package.json +8 -2
- metadata +25 -14
data/config/locales/zh.yml
CHANGED
@@ -130,7 +130,9 @@ zh:
|
|
130
130
|
organisation_schema:
|
131
131
|
all_content_search_description: 查找 %{organisation} 的全部内容
|
132
132
|
previous_and_next_navigation:
|
133
|
+
next:
|
133
134
|
pagination: 分页
|
135
|
+
previous:
|
134
136
|
print_link:
|
135
137
|
text: 打印本页面
|
136
138
|
radio:
|
@@ -196,5 +198,9 @@ zh:
|
|
196
198
|
summary_list:
|
197
199
|
delete: 删除
|
198
200
|
edit: 更改
|
201
|
+
table:
|
202
|
+
filter_count:
|
203
|
+
filter_label:
|
204
|
+
filter_message:
|
199
205
|
tabs:
|
200
206
|
contents: 目录
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module GovukPublishingComponents
|
2
2
|
module AppHelpers
|
3
3
|
class TableHelper
|
4
|
-
def self.helper(context, caption = nil, opt = {})
|
4
|
+
def self.helper(context, caption = nil, id = nil, opt = {})
|
5
5
|
builder = TableBuilder.new(context.tag)
|
6
6
|
|
7
7
|
classes = %w[gem-c-table govuk-table]
|
@@ -10,7 +10,7 @@ module GovukPublishingComponents
|
|
10
10
|
caption_classes = %w[govuk-table__caption]
|
11
11
|
caption_classes << opt[:caption_classes] if opt[:caption_classes]
|
12
12
|
|
13
|
-
context.tag.table class: classes do
|
13
|
+
context.tag.table class: classes, id: id do
|
14
14
|
context.concat context.tag.caption caption, class: caption_classes
|
15
15
|
yield(builder)
|
16
16
|
end
|
@@ -41,7 +41,7 @@ module GovukPublishingComponents
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def row
|
44
|
-
tag.tr class: "govuk-table__row" do
|
44
|
+
tag.tr class: "govuk-table__row js-govuk-table__row" do
|
45
45
|
yield(self)
|
46
46
|
end
|
47
47
|
end
|
@@ -83,10 +83,11 @@
|
|
83
83
|
"maxlength": 10,
|
84
84
|
"label": {
|
85
85
|
"text": "Full address",
|
86
|
+
"classes": "govuk-label--l",
|
86
87
|
"isPageHeading": true
|
87
88
|
}
|
88
89
|
},
|
89
|
-
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n </h1>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\" aria-describedby=\"textarea-with-page-heading-info\"></textarea>\n</div>\n\n <div id=\"textarea-with-page-heading-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n</div>\n\n</div>",
|
90
|
+
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--l\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n </h1>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\" aria-describedby=\"textarea-with-page-heading-info\"></textarea>\n</div>\n\n <div id=\"textarea-with-page-heading-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n</div>\n\n</div>",
|
90
91
|
"hidden": false
|
91
92
|
},
|
92
93
|
{
|